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,100
Comparative Gene Prediction using Conditional Random Fields Jade P. Vinson∗† jpvinson@broad.mit.edu David DeCaprio∗ daved@broad.mit.edu Matthew D. Pearson mdp@broad.mit.edu Stacey Luoma sluoma@broad.mit.edu James E. Galagan jgalag@broad.mit.edu The Broad Institute of MIT and Harvard Cambridge, MA 02142 Abstract Computational gene prediction using generative models has reached a plateau, with several groups converging to a generalized hidden Markov model (GHMM) incorporating phylogenetic models of nucleotide sequence evolution. Further improvements in gene calling accuracy are likely to come through new methods that incorporate additional data, both comparative and species specific. Conditional Random Fields (CRFs), which directly model the conditional probability P(y|x) of a vector of hidden states conditioned on a set of observations, provide a unified framework for combining probabilistic and non-probabilistic information and have been shown to outperform HMMs on sequence labeling tasks in natural language processing. We describe the use of CRFs for comparative gene prediction. We implement a model that encapsulates both a phylogenetic-GHMM (our baseline comparative model) and additional non-probabilistic features. We tested our model on the genome sequence of the fungal human pathogen Cryptococcus neoformans. Our baseline comparative model displays accuracy comparable to the the best available gene prediction tool for this organism. Moreover, we show that discriminative training and the incorporation of non-probabilistic evidence significantly improve performance. Our software implementation, Conrad, is freely available with an open source license at http://www.broad.mit.edu/annotation/conrad/. 1 Introduction Gene prediction is the task of labeling nucleotide sequences to identify the location and components of genes (Figure 1). The accurate automated prediction of genes is essential to both downstream bioinformatic analyses and the interpretation of biological experiments. Currently, the most accurate approach to computational gene prediction is generative modeling. In this approach, one models the joint probability of the hidden gene structure y and the observed nucleotide sequence x. The model parameters θ are chosen to maximize the joint probability of the training data. Given a new set of observations x, one predicts genes by selecting the path of hidden labels y that maximizes Prθ(y, x). Several independent groups have converged on the same generative model: a phylogenetic generalized hidden Markov model with explicit state durations (phylo-GHMM) [1, 2, 3, 4]. ∗These authors contributed equally †Current email: jade@rentec.com Figure 1: The processes of RNA transcription, intron splicing, and protein translation (panel A) and a state diagram for gene structure (panel B). The mirror-symmetry reflects the fact that DNA is double-stranded and genes occur on both strands. The 3-periodicity in the state diagram corresponds to the translation of nucleotide triplets into amino acids. Further improvements in accuracy are likely to come from the incorporation of additional biological signals or new types of experimental data. However, incorporating each signal requires a handcrafted modification which increases the complexity of the generative model: a new theoretical approach is needed. One approach to combining multiple sources of information for gene prediction, conditional maximum likelihood, was proposed in 1994 by Stormo and Haussler [5] and later implemented in the program GAZE by Howe et. al. [6, 7]. In this approach, one defines a Boltzmann distribution where the probability of each hidden sequence is proportional to the exponential of a weighted sum of different types of evidence. One then trains the weights to maximize the conditional probability Prw(y|x) of the hidden sequence given the observations in the training data. A related approach is the use of conditional random fields (CRFs), recently introduced in the context of natural language processing [8]. Like the earlier work in gene prediction, CRFs assign a probability to each hidden sequence that is proportional to the exponential of a weighted sum, and the weights are trained to maximize the conditional probability of the training data. The global convergence guarantee for training weights (Section 2.1 and [8]) is one of the strengths of this approach, but was not noticed in the earlier work on gene prediction. In addition, CRFs were presented in a more abstract framework and have since been applied in several domains. Here, we apply chain-structured CRFs to gene prediction. We introduce a novel strategy for feature selection, allowing us to directly incorporate the best existing generative models with additional sources of evidence in the same theoretical framework. First, we use probabalistic features based on generative models whenever well-developed models are available. In this way we instantiate a phylo-GHMM as a variant of a CRF. Second, we add non-probabilistic features for information that is not easily modeled generatively, such as alignments of expressed sequence tags (ESTs). We developed Conrad, a gene predictor and highly optimized CRF engine. Conrad is freely available with an open source license at http://www.broad.mit.edu/annotation/conrad/. We applied Conrad to predict genes in the fungal human pathogen Cryptococcus neoformans. Our baseline comparative model is as accurate as Twinscan [9, 10], the most accurate gene predictor trained for C. neoformans. Training the weights of our model discriminatively further improves prediction accuracy, indicating that discriminatively trained models can outperform generatively trained models on the same data. The addition of non-probabilistic features further improves prediction accuracy. Figure 2: Graphical models for a first-order chain-structured conditional random field (panel A) and a first-order hidden Markov model (panel B). The variables Yi are hidden states and the variables Xi are observations. The unshaded node is not generated by the model. 2 Conditional Random Fields Conditional random fields are a framework for expressing the conditional probability Pr(⃗y|x) of hidden states ⃗y = (y1, y2, . . . , yn) given observations x [8]. The conditional probabilities assigned by a CRF are proportional to a weighted exponential sum of feature functions: Pr(⃗y|x) = 1 Zλ(x) exp   n X i=1 X j∈J λjfj(yi−1, yi, x, i)  , (1) where Zλ(x) is the normalizing constant or partition function, y0 = start, and J is the collection of features. The conditional probabilities can be viewed as a Boltzman distribution where the pairwise energy between two positions i−1 and i is a weighted sum of the feature functions fj. See Figure 2. The feature functions fj(yi−1, y, x, i) can be any real-valued functions defined for all possible hidden states yi−1 and y, observations x, and positions i. For example, the value of the feature function at position i might depend on the value of the observations x at a distant position, allowing one to capture long-range interactions with a CRF. Varying the weights λ of a CRF, we obtain a family of conditional probabilities Prλ(⃗y|x). An alternative viewpoint comes by reversing the order of summation in Equation 1 and expressing the conditional probability using feature sums Fj that depend on the entire hidden sequence ⃗y: Pr(⃗y|x) = 1 Zλ(x) exp  X j∈J λjFj(⃗y, x)  , where Fj(⃗y, x) = n X i=1 fj(yi−1, yi, x, i). (2) Some of the theoretical properties of CRFs, such as global convergence of weight training, can be derived using only the feature sums Fj. These theoretical derivations also apply to generalizations of CRFs, such as semi-Markov CRFs [11], in which one modifies the formula expressing the feature sums Fj in terms of the feature functions fj. 2.1 Inference and Training Given a CRF and observations x, the inference problem is to determine the sequence of hidden states with the highest conditional probability, ⃗ymax = argmax⃗y (Pr(⃗y|x)). For a linear-chain CRF, each feature function fj depends only on pairs of adjacent hidden states and there is an efficient Viterbi algorithm for solving the inference problem. Given training data (⃗y, x), a CRF is trained in two steps. In the first step, free parameters associated with individual feature functions are fixed using the training data. The training methods can be specific to each feature. In the second step, the weights λ are selected to maximize the conditional log-likelihood: λmax = argmax λ (log (Prλ(⃗y|x))) The log-likelihood is a concave function of λ (its Hessian is the negative covariance matrix of the random variables Fj relative to the Boltzmann distribution). Thus, various iterative methods, such as a gradient-based function optimizer[12], are guaranteed to converge to a global maximum. Using the weights obtained by training, the resulting probability distribution on Prλ(·|x) is the maximum entropy distribution subject to the constraints that the expected value of each feature sum Fj is equal to its value in the training data. One can also train the weights of the CRF to maximize an alternative objective function. For example, one can maximize the expected value GAOF (λ) = EP rλ(S(y, y0, x)) of the similarity between the actual hidden sequence y0 and a random hidden sequence y selected according to Equation 1. This objective function can be optimized using standard gradient-based function optimizers. The gradient is ∂ ∂λj GAOF (λ) = CovP rλ(S(y, y0, x), Fj(y, x)). Global convergence is not guaranteed because the objective function is not necessarily concave. When the similarity function S can be defined in terms of a purely local comparison between the actual hidden sequence and a random hidden sequence, as in S(y, y0, x) = Pn i=1 s(yi−1, yi, y0 i−1, y0 i , x, i), the gradient can be efficiently computed using dynamic programming – this is the level of generality we implemented in Conrad. In this paper we consider this simplest possible alternate objective function, where the local similarity function is 1 at position i if the hidden sequence is correct and 0 otherwise. In this case the alternate objective function is just the expected number of correctly predicted positions. 2.2 Expressing an HMM as a CRF Any conditional probability Pr(⃗y|x) that can be implicitly expressed using an HMM [13] can also be expressed using a CRF. Indeed, the HMM and its corresponding CRF form a generativediscriminative pair [14]. For example, a first-order HMM with transition matrix T, emissions matrix B, and initial hidden state probabilities ⃗π assigns the joint probability Pr(⃗y, ⃗x) = πy1 length−1 Y i=1 Tyi,yi+1 length Y i=1 Byi,xi. Given an observation sequence x, the conditional probabilities implied by this HMM can be expressed as a CRF by defining the following three features and setting all weights to 1.0: fπ(z, w, x, i) = log(πw) if z = start and i = 1 0 otherwise fT (z, w, x, i) = log(Tz,w) if i > 1 0 otherwise fB(z, w, x, i) = log(Bw,xi) Hidden Markov models can be extended in various directions. One of the most important extensions for gene prediction is to explicitly model state durations: for many species the lengths of some components are tightly constrained, such as introns in fungi. The extensions of HMMs to generalized HMMs (GHMMs) and CRFs to semi-Markov CRFs [11] are straightforward but omitted for clarity. 3 Our Model The core issue in designing a CRF is the selection of feature functions. The approach usually taken in natural language processing is to define thousands or millions of features, each of which are indicator functions: 0 most of the time and 1 in specific circumstances. However, for gene prediction there are well-developed probabilistic models that can serve as a starting point in the design of a CRF. We propose a new approach to CRF feature selection with the following guiding principle: use probabilistic models for feature functions when possible and add non-probabistic features only where necessary. The CRF training algorithm determines the relative contributions of these features through discriminative training, without having to assume independence between the features or explicitly model dependencies. Our approach to gene prediction is implemented as Conrad, a highly configurable Java executable. The CRF engine for Conrad uses LBFGS as the gradient solver for training [12, 15, 16] and is highly optimized for speed and memory usage. Because the CRF engine is a separate module with a well-defined interface for feature functions, it can also be used for applications other than gene prediction. 3.1 The baseline comparative model: a phylogenetic GHMM Phylogenetic generalized hidden Markov models are now the standard approach to gene prediction using generative models [1, 2, 3, 4], and capture many of the signals for resolving gene structure (e.g. splice models or phylogenetic models of nucleotide sequence evolution). We define probabilistic features that, when taken together with weights 1.0, reproduce the phylo-GHMM that we refer to as our baseline comparative model. Our baseline comparative model is based on the state diagram of Figure 1, enforces the basic gene constraints (e.g. open reading frames and GT-AG splice junctions), explicitly models intron length using a mixture model, and uses a set of multiply aligned genomes (including the reference genome to be annotated) as observations. The model comprises 29 feature functions of which the following are representative: f1 = δ(yi−1 = exon2 & yi = intron2) log (Pr(xi−3 . . . xi+5) , using a splice donor model trained by maximum likelihood. f2 = δ(yi = exon3) log(Pr(multiple alignment column | reference nucleotide )), using a phylogenetic evolutionary model trained by ML. 3.2 Non-probabalistic features For many signals useful in resolving gene structure (e.g. protein homology, ESTs, CPG islands, or chromatin methylation), a probabilistic model is elusive or is difficult to incorporate in the existing framework. To explore the addition of non-probablistic evidence, we introduce two groups of feature functions, both using 0-1 indicator functions. The first group of feature functions is based on the alignment of expressed sequence tags (ESTs) to the reference genome (ESTs are the experimentally determined sequences of randomly sampled mRNA; see Figure 1): fEST,1 = δ(yi = exon & EST aligned at position i) fEST,2 = δ(yi = intron & position i is in the gap of an EST alignment ) The second group of feature functions is based on the presence of gaps in the multiple alignment, indicative of insertions or deletions (indels) in the evolutionary history of one of the aligned species. Indels are known to be relevant to gene prediction: evolution preserves the functions of most genes and an indel that is not a multiple of three would dirsupt the translation of a protein. Thus, indels not a multiple of three provide evidence against a position being part of an exon. We introduce the features fGAP,1 = δ(yi = exon & an indel of length 0 mod 3 has a boundary at position i ) fGAP,2 = δ(yi = exon & an indel of length 1 or 2 mod 3 has a boundary at position i ), plus the four analogous features for introns and intergenic regions. For both classes of evidence, no satisfying probabilistic models exist. For example, the most systematic attempt at incorporating multiple alignment gaps in a generative model is [17], but this model only represents the case of phylogenetically simple, non-overlapping gaps. 4 Results We evaluated our model using the genome of fungal human pathogen Cryptococcus neoformans strain JEC21 [18]. C. neoformans is an ideal test case due to the availability of genomes for four closely related strains for use as comparative data and a high-quality manual annotation with deep EST sequencing. To determine an absolute benchmark, we compared our baseline comparative model to Twinscan [9, 10], the most accurate comparative gene predictor trained for C. neoformans. Because Twinscan was an input to the manual annotation, we evaluated the accuracy of both predictors by comparing to the alignments of ESTs (which are independent of both predictors) along an entire chromosome (chr 9). At the locations containing both an EST and a gene prediction, the accuracy of our model is comparable to (or better than) that of Twinscan. See Table 1. Table 1: Comparing the prediction accuracy of our baseline comparative model with that of Twinscan. Accuracy statistics are collected at loci where an EST overlaps with a gene prediction. Baseline Comparative Model Twinscan Nucleotide sensitivity (%) 99.71 98.35 Nucleotide specificity (%) 99.26 99.56 Splice sensitivity (%) 94.51 93.93 Splice specificity (%) 95.80 93.20 Figure 3: Gene prediction accuracy increases with additional features and with the training of feature weights. All models were trained with the alternate objective function (see text), with the exception of models labeled “weights fixed”. For the latter, feature weights were fixed at 1.0. Performance on training data (dashed line), performance on testing data (solid lines). Each data point above is the average of 10 cross-validation replicates. We next measured the relative effects of different sets of features and methods for training the feature weights. First, we created a set of 1190 trusted genes by selecting those genes which had EST support along their entire length. We then performed 10 cross-validation replicates for several combinations of a set of features and a method for training weights, and a training set sizes (50, 100, 200, 400, or 800 genes). For each set of replicates, we record the average nucleotide accuracy. See Figure 3. As expected, the testing accuracy increases with larger training sets, while the training accuracy decreases. Note that for these experiments, we do not explicitly model intron length. 4.1 Adding features improves accuracy The effect of including additional features is shown in Figure 3. As can be seen in each case, model accuracy improves as new evidence is added. For a 400 gene training set, adding the EST features increases the accuracy of the baseline single species model from 89.0% to 91.7%. Adding the gap features increases the accuracy of the baseline comparative model from 93.6% to 95.4%. Finally, adding both types of evidence together increases accuracy more than either addition in isolation: adding EST and gap features to the baseline comparative model increases accuracy from 93.6% to 97.0%. Ongoing work is focused on including many additional lines of evidence. 4.2 Training using an alternate objective function The standard training of weights for CRFs seeks to maximize the conditional log probability of the training data. However, this approach has limitations: one would like to use an objective function that is closely related to evaluation criteria relevant to the problem domain. Previous work in natural language processing found no accuracy benefit to changing the objective function [19]. However, relative to the usual training to maximize conditional log-likelihood, we observed about 2% greater nucleotide accuracy in testing data using models trained to maximize an alternative objective function (the expected nucleotide accuracy of a random sequence on training data). See Section 2.1. The results shown in Figure 3 are all using this alternate objective function. For example, for a 400 gene training set, training the weights increases the accuracy of the baseline single species model from 87.2% to 89% and the baseline comparative model from 90.9% to 93.6%. 5 Concluding Remarks CRFs are a promising framework for gene prediction. CRFs offer several advantages relative to standard HMM-based gene prediction methods including the ability to capture long-range dependencies and to incorporate heterogeneous data within a single framework. We have implemented a semi-Markov CRF by explicitly expressing a phylogenetic GHMM within a CRF framework and extending this baseline with non-probabilisitic evidence. When used to predict genes in the fungal human pathogen C. neoformans, our model displays accuracy comparable to the best existing gene prediction tools. Moreover, we show that incorporation of non-probabilistic evidence improves performance. The key issue in designing CRFs is the selection of feature functions, and our approach differs from previous applications. We adopt the following guiding principle: we use probabilistic models as features where possible and incorporate non-probabilistic features only when necessary. In contrast, in natural language processing features are typically indicator functions. Our approach also differs from an initial study of using CRFs for gene prediction [20], which does not use a probabilistic model as the baseline. CRFs offer a solution to an important problem in gene prediction: how to combine probabilistic models of nucleotide sequences with additional evidence from diverse sources. Prior research in this direction has focused on either handcrafted heuristics for a particular type of feature [21], a mixture-of-experts approach applied at each nucleotide position [22], and decision trees [23]. CRFs offer an alternative approach in which probabilistic features and non-probabilistic evidence are both incorporated in the same framework. CRFs are applicable to other discriminative problems in bioinformatics. For example, CRFs can be used train optimal parameters for protein sequence alignment [24]. In all these examples, as with gene predictions, CRFs provide the ability to incorporate supplementary evidence not captured in current generative models. Acknowledgement This work has been supported by NSF grant number MCB-0450812. We thank Nick Patterson for frequent discussions on generative probabilistic modeling. We thank Richard Durbin for recognizing the connection to the earlier work by Stormo and Haussler. We thank the anonymous reviews for indicating which aspects of our work warranted more or less detail relative to the initial submission. References [1] Adam Siepel and David Haussler. Combining phylogenetic and hidden Markov models in biosequence analysis. J Comput Biol, 11(2-3):413–428, 2004. [2] Jon D McAuliffe, Lior Pachter, and Michael I Jordan. Multiple-sequence functional annotation and the generalized hidden Markov phylogeny. Bioinformatics, 20(12):1850–1860, Aug 2004. [3] Jakob Skou Pedersen and Jotun Hein. Gene finding with a hidden Markov model of genome structure and evolution. Bioinformatics, 19(2):219–227, Jan 2003. [4] Randall H Brown, Samuel S Gross, and Michael R Brent. Begin at the beginning: predicting genes with 5’ UTRs. Genome Res, 15(5):742–747, May 2005. [5] G. D. Stormo and D. Haussler. Optimally parsing a sequence into different classes based on multiple types of information. In Proc. of Second Int. Conf. on Intelligent Systems for Molecular Biology, pages 369–375, Menlo Park, CA, 1994. AAAI/MIT Press. [6] Kevin L Howe, Tom Chothia, and Richard Durbin. GAZE: a generic framework for the integration of gene-prediction data by dynamic programming. Genome Res, 12(9):1418–1427, Sep 2002. [7] Kevin L. Howe. Gene prediction using a configurable system for the integration of data by dynamic programming. PhD thesis, University of Cambridge, 2003. [8] John Lafferty, Andrew McCallum, and Fernando Pereira. Conditional random fields: Probabilistic models for segmenting and labeling sequence data. In Proc. 18th International Conf. on Machine Learning, pages 282–289. Morgan Kaufmann, San Francisco, CA, 2001. [9] Aaron E Tenney, Randall H Brown, Charles Vaske, Jennifer K Lodge, Tamara L Doering, and Michael R Brent. Gene prediction and verification in a compact genome with numerous small introns. Genome Res, 14(11):2330–2335, Nov 2004. [10] I Korf, P Flicek, D Duan, and M R Brent. Integrating genomic homology into gene structure prediction. Bioinformatics, 17 Suppl 1:140–148, 2001. [11] S. Sarawagi and W. Cohen. Semimarkov conditional random fields for information extraction. Proceedings of ICML, 2004. [12] Richard H. Byrd, Peihuang Lu, Jorge Nocedal, and Ci You Zhu. A limited memory algorithm for bound constrained optimization. SIAM Journal on Scientific Computing, 16(6):1190–1208, 1995. [13] Lawrence Rabiner. A tutorial on hidden markov models and selected applications in speech recognition. In Alex Waibel and Kai-Fu Lee, editors, Readings in speech recognition, pages 267–296. Morgan Kaufmann, San Mateo, 1990. [14] Charles Sutton and Andrew McCallum. An introduction to conditional random fields for relational learning. In Lise Getoor and Ben Taskar, editors, Statistical Relational Learning. To appear. [15] Hanna Wallach. Efficient training of conditional random fields. Master’s thesis, University of Edinburgh, 2002. [16] F. Sha and F. Pereira. Shallow parsing with conditional random fields. Technical Report CIS TR MS-CIS-02-35, University of Pennsylvania, 2003. [17] Adam Siepel and David Haussler. Computational identification of evolutionarily conserved exons. In Proceedings of the 8th Annual International Conference, RECOMB 2004. ACM, 2004. [18] Brendan J Loftus and Eula Fung et. al. The genome of the basidiomycetous yeast and human pathogen Cryptococcus neoformans. Science, 307(5713):1321–1324, Feb 2005. [19] Yasemin Altun, Mark Johnson, and Thomas Hofmann. Investigating Loss Functions and Optimization Methods for Discriminative Learning of Label Sequences. Proceedings of the 2003 Conference on Empirical Methods in Natural Language Processing. [20] Aron Culotta, David Kulp, and Andrew McCallum. Gene prediction with conditional random fields. Technical Report UM-CS-2005-028, University of Massachusetts, Amherst, April 2005. [21] R F Yeh, L P Lim, and C B Burge. Computational inference of homologous gene structures in the human genome. Genome Res, 11(5):803–816, May 2001. [22] Brona Brejova, Daniel G Brown, Ming Li, and Tomas Vinar. ExonHunter: a comprehensive approach to gene finding. Bioinformatics, 21 Suppl 1:i57–i65, Jun 2005. [23] Jonathan E Allen and Steven L Salzberg. JIGSAW: integration of multiple sources of evidence for gene prediction. Bioinformatics, 21(18):3596–3603, Sep 2005. [24] Chuong B. Do, Samuel S. Gross, and Serafim Batzoglou. Contralign: Discriminative training for protein sequence alignment. In Alberto Apostolico, Concettina Guerra, Sorin Istrail, Pavel A. Pevzner, and Michael S. Waterman, editors, RECOMB, volume 3909 of Lecture Notes in Computer Science, pages 160–174. Springer, 2006.
2006
78
3,101
Learning annotated hierarchies from relational data Daniel M. Roy, Charles Kemp, Vikash K. Mansinghka, and Joshua B. Tenenbaum CSAIL, Dept. of Brain & Cognitive Sciences, MIT, Cambridge, MA 02139 {droy, ckemp, vkm, jbt}@mit.edu Abstract The objects in many real-world domains can be organized into hierarchies, where each internal node picks out a category of objects. Given a collection of features and relations defined over a set of objects, an annotated hierarchy includes a specification of the categories that are most useful for describing each individual feature and relation. We define a generative model for annotated hierarchies and the features and relations that they describe, and develop a Markov chain Monte Carlo scheme for learning annotated hierarchies. We show that our model discovers interpretable structure in several real-world data sets. 1 Introduction Researchers in AI and cognitive science [1, 7] have proposed that hierarchies are useful for representing and reasoning about the objects in many real-world domains. One of the reasons that hierarchies are valuable is that they compactly specify categories at many levels of resolution, each node representing the category of objects at the leaves below the node. Consider, for example, the simple hierarchy shown in Figure 1a, which picks out five categories relevant to a typical university department: employees, staff, faculty, professors, and assistant professors. Suppose that we are given a large data set describing the features of these employees and the interactions among these employees. Each of the five categories will account for some aspects of the data, but different categories will be needed for understanding different features and relations. “Faculty,” for example, is the single most useful category for describing the employees that publish papers (Figure 1b), but three categories may be needed to describe the social interactions among the employees (Figure 1c). In order to understand the structure of the department, it is important not only to understand the hierarchical organization of the employees, but to understand which levels in the hierarchy are appropriate for describing each feature and each relation. Suppose, then, that an annotated hierarchy is a hierarchy along with a specification of the categories in the hierarchy that are relevant to each feature and relation. The idea of an annotated hierarchy is one of the oldest proposals in cognitive science, and researchers including Collins and Quillian [1] and Keil [7] have argued that semantic knowledge is organized into representations with this form. Previous treatments of annotated hierarchies, however, usually suffer from two limitations. First, annotated hierarchies are usually hand-engineered, and there are few proposals describing how they might be learned from data. Second, annotated hierarchies typically capture knowledge only about the features of objects: relations between objects are rarely considered. We address both problems by defining a generative model for objects, features, relations, and hierarchies, and showing how it can be used to recover an annotated hierarchy from raw data. Our generative model for feature data assumes that the objects are located at the leaves of a rooted tree, and that each feature is generated from a partition of the objects “consistent” with the hierarchy. A tree-consistent partition (henceforth, t-c partition) of the objects is a partition of the objects into disjoint categories, i.e. each class in the partition is exactly the set of leaves descending from some node in the tree. Therefore, a t-c partition can be uniquely encoded as the set of these nodes whose leaf descendants comprise the classes (Figure 1a,b). The simplest t-c partition is the singleton set friends with Professors (P) Staff (S) Assistant Profs (A) Faculty (F) Employees (E) orders around works with P S A F E P S A F E P S A F E S P A F E t w A A Direct−Deposit Has Tenure Publishes A,P P,P P,A A,E A,A A F P E S S P,S F,S P,P P,A S,F S,S False S,E (b) True (a) F,S F,F S,S S,F (c) Figure 1: (a) A hierarchy over 15 members of a university department: 5 staff members, 5 professors and 5 assistant professors. (b) Three binary features, each of which is associated with a different t-c partition of the objects. Each class in each partition is labeled with the corresponding node in the tree. (c) Three binary relations, each of which is associated with a different t-c partition of the set of object pairs. Each class in each partition is labeled with the corresponding pair of nodes. containing the root node, which places all objects into a single class. The most complex t-c partition is the set of all leaves, which assigns each object to its own class. We assume that the features of objects in different classes are independent, but that objects in the same class tend to have similar features. Therefore, finding the categories in the tree most relevant to a feature can be formalized as finding the simplest t-c partition that best accounts for the distribution of the feature (Figure 1b). We define an annotated hierarchy as a hierarchy together with a t-c partition for each feature. Although most discussions of annotated hierarchies focus on features, much of the data available to human learners comes in the form of relations. Understanding the structure of social groups, for instance, involves inferences about relations like admires(·, ·), friend-of(·, ·) and brother-of(·, ·). Like the feature case, our generative model for relational data assumes that each (binary) relation is generated from a t-c partition of the set of all pairs of objects. Each class in a t-c partition now corresponds to a pair of categories (i.e. pair of nodes) (Figure 1c), and we assume that all pairs in a given class tend to take similar values. As in the feature case, finding the categories in the tree most relevant to a relation can be formalized as finding the t-c partition that best accounts for the distribution of the relation. The t-c partition for each relation can be viewed as an additional annotation of the tree. The final piece of our generative model is a prior over rooted trees representing hierarchies. Roughly speaking, the best hierarchy will then be the one that provides the best categories with which to summarize all the features and relations. Like other methods for discovering structure in data, our approach may be useful both as a tool for data analysis and as a model of human learning. After describing our approach, we apply it to several data sets inspired by problems faced by human learners. Our first analysis suggests that the model recovers coherent domains given objects and features from several domains (animals, foods, tools and vehicles). Next we show that the model discovers interpretable structure in kinship data, and in data representing relationships between ontological kinds. 2 A generative model for features and relations Our approach is organized around a generative model for feature data and relational data. For simplicity, we present our model for feature and relational data separately, focusing on the case where we have a single binary feature or a single binary relation. After presenting our generative model, we describe how it can be used to recover annotated hierarchies from data. We begin with the case of a single binary feature and define a joint distribution over three entities: a rooted, weighted, binary tree T with O objects at the leaves; a t-c partition of the objects; and feature observations, d. For a feature, a t-c partition π is a set of nodes {n1, n2, . . . , nk}, such that each object is a descendant of exactly one node in π. We will identify each node with the category of objects descending from it. We denote the data for all objects in the category n as dn. If o is a leaf (single object category), then do is the value of the feature for object o. In Figure 1b, three t-c partitions associated with the hierarchy are represented and each class in each partition is labeled with the corresponding category. The joint distribution P(T, w, π, d|λ, γf) is induced by the following generative process: i. Sample a tree T from a uniform distribution over rooted binary trees with O leaves (each leaf will represent an object and there are O objects). Each node n represents a category. ii. For each category n, sample its weight, wn, according to an exponential distribution with parameter λ, i.e. p(wn|λ) = λe−λwn. iii. Sample a t-c partition πf = {n1, n2, . . . , nk} ∼Π(root-of(T )), where Π(n) is a stochastic, set-valued function: Π(n) = {n} n is a leaf, or w.p. φ(wn) ∪iΠ(ni) otherwise (1) where φ(x) = 1−e−x and ni are the children of n. Intuitively, categories with large weight are more likely to be classes in the partition. For the publishes feature in Figure 1b, the t-c partition is {F, S}. iv. For each category n ∈πf, sample θn ∼Beta(γf, γf), where θn is the probability that objects in category n exhibit the feature f. Returning to the publishes example in Figure 1b, two parameters, θF and θS, would be drawn for this feature. v. For each object o, sample its feature value do ∼Bernoulli(θn), where n ∈πf is the category containing o. Consider now the case where we have a single binary relation defined over all ordered pairs of objects {(oi, oj)}. In the relational case, our joint distribution is defined over a rooted, weighted, binary tree; a t-c partition of ordered pairs of objects; and observed, relational data represented as a matrix D where Di,j = 1 if the relation holds between oi and oj. Given a pair of categories (ni, mj), let ni × mj be the set of all pairs of objects (oi, oj) such that oi is an object in the category ni and oj is an object in the category mj. With respect to pairs of trees, a t-c partition, π, is a set of pairs of categories {(n1, m1), (n2, m2), . . . , (nk, mk)} such that, for every pair of objects (oi, oj), there exists exactly one pair (nk, mk) ∈π such that (oi, oj) ∈nk × mk. To help visualize these 2D t-c partitions, we can reorder the columns and rows of the matrix D according to an in-order traversal of the binary tree T . Each t-c partition now splits the matrix into contiguous, rectangular blocks (see Figure 1c, where each rectangular block is labeled with its category pair). Assuming we have already generated a rooted, weighted binary tree, we now specify the generative process for a single binary relation (c.f. steps iii through v in the feature case): iii. Sample a t-c partition πr = {(n1, m1), . . . , (nk, mk)} ∼Π(root-of(T ), root-of(T )), where Π(n, m) is a stochastic, set-valued function: Π(n, m) =    {(n, m)} w.p. φ(wn) · φ(wm) ∪iΠ(ni, m) otherwise, w.p. 1 2 ∪jΠ(n, mj) otherwise (2) where ni/mj are the children of n/m. To handle special cases, if both n, m are leaves, Π(n, m) = {n, m}; if only one of the nodes is a leaf, we default to the feature case on the remaining tree, halting with probability φ(wn) · φ(wm). Intuitively, if a pair of categories (n, m) both have large weight, the process is more likely to group all pairs of objects in n × m into a single class. In Figure 1c, the t-c partition for the works with relation is {(S, S), (S, F), (F, S), (F, F)}. iv. For each pair of categories (n, m) ∈πr, sample θn,m ∼Beta(γr, γr), where θn,m is the probability that the relation holds between any pair of objects in n × m. For the works with relation in Figure 1c, parameters would be drawn for each of the four classes in the t-c partition. v. For each pair of objects (oi, oj), sample the relation Di,j ∼Bernoulli(θn,m), where (n, m) ∈πr and (oi, oj) ∈(n, m). That is, the probability that the relation holds is the same for all pairs in a given class. For data sets with multiple relations and features, we assume that all relations and features are conditionally independent given the weighted tree T . 2.1 Inference Given observations of features and relations, we can use the generative model to ask various questions about the latent hierarchy and its annotations. We start by determining the posterior distribution on the weighted tree topologies, (T, w), given data D = ({d(f)}F f=1, {D(r)}R r=1) over O objects, F features and R relations and hyperparameters λ and γ = ({γf}F f=1, {γr}R r=1). By Bayes’ rule, P(T, w|D, λ, γ) ∝P(T ) P(w|T, λ) P(D|T, w, γ) ∝  1  Y n λe−λwn YF f=1 P(d(f)|T, w, γf) YR r=1 P(D(r)|T, w, γr)  . But P(d(f)|T, w, γf) = P π P(π|T, w) P(d(f)|π, γf), where P(π|T, w) is the distribution over t-c partitions induced by the stochastic function Π and P(d(f)|π, γf) is the likelihood given the partition, marginalizing over the feature probabilities, θn. Because the classes are independent, P(d(f)|π, γf) = Q n∈π P(d(f) n |n ∈π, γf), where Mf(n) = P(d(f) n |n ∈π, γf) is the marginal likelihood for d(f) n , the features for objects in category n. For our binary-valued data sets, Mf(n) is the standard marginal likelihood for the beta-binomial model. Because there are an exponential number of t-c partitions, we present an efficient dynamic program for calculating Tf(n) = P(d(f) n |T, w, γf). Then, Tf(root-of(T )) = P(d(f)|T, w, γf) is the desired quantity. First observe that, for all objects (i.e. leaf nodes) o, Tf(o) = Mf(o). Let n be a node and assume no ancestor of n is in π. With probability φ(wn) = 1 −e−wn, category n will be a single class and the contribution to Tf will be Mf(n). Otherwise, Π(n) splits category n into its children, n1 and n2. Now the possible partitions of the objects in category n are every t-c partition of the objects below n1 paired with every t-c partition below n2. By independence, this contributes Tf(n1)Tf(n2). Hence, Tf(n) = φ(wn)Mf(n) + (1 −φ(wn)) Tf(n1)Tf(n2) if n is an internal node Mf(n) otherwise. For the relational case, we describe a dynamic program Tr(n, m) that calculates P(D(r) n,m|T, w, γr), the probability of all relations between objects in n×m, conditioned on the tree, having marginalized out the t-c partitions and relation probabilities. Let Mr(n, m) = P(D(r) n,m|(n, m) ∈π, γr) be the marginal likelihood of the relations in n × m. For relations, Mf(n, m) is also the beta-binomial. If n and m are both leaves, then Tr(n, m) = Mr(n, m). Otherwise, Tr(n, m) = φ(wn) φ(wm)Mr(n, m) + (1 −φ(wn) φ(wm))    Tr(n, m1)Tr(n, m2) n is a leaf (Tr(n1, m)Tr(n2, m) m is a leaf 1 2 · (Tr(n, m1)Tr(n, m2) + Tr(n1, m)Tr(n2, m)) otherwise The above dynamic programs have linear and quadratic complexity in the number of objects, respectively. Because we can efficiently compute the posterior density of a weighted tree, we can search for the maximum a posteriori (MAP) weighted tree. Conditioned on the MAP tree, we can efficiently compute the MAP t-c partition for each feature and relation. We find the MAP tree first, rather than jointly optimizing for both the topology and partitions, because marginalizing over the t-c partitions produces more robust trees; marginalization has a (Bayesian) ”Occam’s razor” effect and helps avoid overfitting. MAP t-c partitions can be computed by a straightforward modification of the above dynamic programs, replacing sums with max operations and maintaining a list of nodes representing the MAP t-c partition at each node in the tree. We chose to implement global search by building a Markov chain Monte Carlo (MCMC) algorithm with the posterior as the stationary distribution and keeping track of the best tree as the chain mixes. For all the results in this paper, we fixed the hyperparameters of all beta distributions to γ = 0.5 (i.e. the asymptotically least informative prior) and report the (empirical) MAP tree and MAP t-c partitions conditioned on the tree. The MCMC algorithm searches for the MAP tree by cycling through three Metropolis-Hastings (MH) moves adapted from [14]: i. Subtree Pruning and Regrafting: Choose a node n uniformly at random (except the root). Choose a non-descendantnode m. Detach n from its parent and collapse the parent (remove node, attaching the remaining child to the parent’s parent and adding the parent’s weight to the child’s). Sample u ∼Uniform(0, 1) and then insert a new node m′ between m and its parent. Attach n to m′, set wm′ := (1 −u)wm and set wm := uwm. ii. Edge Weight Adjustment: Choose a node n uniformly at random (including the root) and propose a new weight wn (e.g. let x be Normal(log(wt), 1) and let new weight be ex). iii. Subtree Swapping: Choose a node n uniformly at random (except the root). Choose another node n′ such that neither n nor n′ is a descendant of the other, and swap n and n′. The first two moves suffice to make the chain ergodic; subtree swapping is included to improve mixing. The first and last moves are symmetric. We initialized the chain on a random tree with weights set to one, ran the chain for approximately one million iterations and assessed convergence by comparing separate chains started from multiple random initial states. 2.2 Related Work There are several methods that discover hierarchical structure in feature data. Hierarchical clustering [4] has been successfully used for analyzing both biological data [18] and psychological data, but cannot learn the annotated hierarchies that we consider. Bayesian hierarchical clustering (BHC) [6] is a recent alternative which constructs a tree as a byproduct of approximate inference in a flat clustering model, but lacks any notion of annotations. It is possible that a BHC-inspired algorithm could be derived to find approximate MAP annotated hierarchies. Our model for feature data is most closely related to methods for Bayesian phylogenetics [14]. These methods typically assume that features are generated directly by a stochastic process over a tree. Our model adds an intervening layer of abstraction by assuming that partitions are generated by a stochastic process over a tree, and that features are generated from these partitions. By introducing a partition for each feature, we gain the ability to annotate a hierarchy with the levels most relevant to each feature. There are several methods for discovering hierarchical structure in relational data [5, 13], but none of these methods provides a general purpose solution to the problem we consider. Most of these methods take a single relation as input, and assume that the hierarchy captures an underlying community structure: in other words, objects that are often paired in the input are assumed to lie nearby in the tree. Our approach handles multiple relations simultaneously, and allows a more flexible mapping between each relation and the underlying hierarchy. Different relations may depend on very different regions of the hierarchy, and some relations may establish connections between categories that are quite distant in the tree (see Figure 4). Many non-hierarchical methods for relational clustering have also been developed [10, 16, 17]. One family of approaches is based on the stochastic blockmodel [15], of which the Infinite Relational Model (IRM) [9] is perhaps the most flexible. The IRM handles multiple relations simultaneously, and does not assume that each relation has underlying community structure. The IRM, however, does not discover hierarchical structure; instead it partitions the objects into a set of non-overlapping categories. Our relational model is an extension of the blockmodel that discovers a nested set of categories as well as which categories are useful for understanding each relation in the data set. 3 Results We applied our model to three problems inspired by tasks that human learners are required to solve. Our first application used data collected in a feature-listing task by Cree and McRae [2]. Participants in this task listed the features that came to mind when they thought about a given object: when asked to think about a lemon, for example, subjects listed features like “yellow,” “sour,” and “grows on trees.”1 We analyzed a subset of the full data set including 60 common objects and the 100 features most commonly listed for these objects. The 60 objects are shown in Figure 2, and were chosen to represent four domains: animals, food, vehicles and tools. Figure 2 shows the MAP tree identified by our algorithm. The model discovers the four domains as well as superordinate categories (e.g. “living things”, including fruits, vegetables, and animals) and subordinate categories (e.g. “wheeled vehicles”). Figure 2 also shows MAP partitions for 10 1Note that some of the features are noisy — according to these data, onions are not edible, since none of the participants chose to list this feature for onion. Food Tools Vehicles Animals strawberry pineapple grapefruit apple tangerine nectarine lemon grape orange cucumber carrot radish onions lettuce potato clamp drill pliers wrench shovel chisel tomahawk sledgehammer axe hammer hoe scissors screwdriver rake crowbar van car truck bus jeep ship bike helicopter train motorcycle tricycle wheelbarrow submarine yacht jet seal lion dolphin mouse duck tiger rat chicken cat deer squirrel sheep pig horse cow a tool an animal made of metal is edible has a handle is juicy is fast eaten in salads is white has 4 wheels has 4 legs Figure 2: MAP tree recovered from a data set including 60 objects from four domains. MAP partitions for several features are shown: the model discovers, for example, that “is juicy” is associated with only one part of the tree. The weight of each edge in the tree is proportional to its vertical extent. Diseases Chemicals Acquired Abnormality Congenital Abnormality Organ Function Cell Function Physiologic Function Disease or Syndrome Pathologic Function Cell Dysfunction Tissue Cell Anatomical Structure Animal Bird Plant Mammal Natural Process Human−caused Process Therapeutic Procedure Laboratory Procedure Diagnostic Procedure Laboratory Result Finding Sign or Symptom Steroid Carbohydrate Lipid Amino Acid Hormone Enzyme Antibiotic analyzes affects process of causes causes (IRM) Figure 3: MAP tree recovered from 49 relations between entities in a biomedical data set. Four relations are shown (rows and columns permuted to match in-order traversal of the MAP tree). Consider the circled subset of the t-c partition for causes. This block captures the knowledge that “chemicals” cause “diseases.” The Infinite Relational Model (IRM) does not capture the appropriate structure in the relation cause because it does not model the latent hierarchy, instead choosing a single partition to describe the structure across all relations. representative features. The model discovers that some features are associated only with certain parts of the tree: “is juicy” is associated with the fruits, and “is metal” is associated with the manmade items. Discovering domains is a fundamental cognitive problem that may be solved early in development [11], but that is ignored by many cognitive models, which consider only carefully chosen data from a single domain (e.g. data including only animals and only biological features). By organizing the 60 objects into domains and identifying a subset of features that are associated with each domain, our model begins to suggest how infants may parse their environment into coherent domains of objects and features. Our second application explores the acquisition of ontological knowledge, a problem that has been previously discussed by Keil [7]. We demonstrate that our model discovers a simple biomedical ontology given data from the Unified Medical Language System (UMLS) [12]. The full data set includes 135 entities and 49 binary relations, where the entities are ontological categories like ‘Sign or Symptom’, ‘Cell’, and ‘Disease or Syndrome,’ and the relations include verbs like causes, analyzes and affects. We applied our model to a subset of the data including the 30 entities shown in Figure 3. Section 1 Section 3 Section 4 Section 2 OM1 OM1 OM1 OM1 OF1 OF1 OF1 OF1 YF1 YF1 YF1 YF1 YM1 YM1 YM1 YM1 YF3 YF3 OF3 OF3 YF3 YF3 OF3 OF3 YM3 OM3 OM3 YM3 YM3 YM3 OM3 OM3 OF4 OF4 OF4 YF4 YF4 OF4 YF4 YF4 OM4 OM4 YM4 YM4 YM4 YM4 OM4 OM4 YM2 YM2 OM2 OM2 OM2 YM2 YM2 OM2 OF2 OF2 OF2 OF2 YF2 YF2 YF2 YF2 Agngiya Adiaya Umbaidya Anowadya Anowadya (IRM) Figure 4: MAP tree recovered from kinship relations between 64 members of the Alyawarra tribe. Individuals have been labelled with their age, gender and kinship section (e.g. “YF1” is a young female from section 1). MAP partitions are shown for four representative relations: the model discovers that different relations depend on the tree in very different ways; hierarchical structure allows for a compact representation (c.f. IRM). The MAP tree is an ontology that captures several natural groupings, including a category for “living things” (plant, bird, animal and mammal), a category for “chemical substances” (amino acid, lipid, antibiotic, enzyme etc.) and a category for abnormalities. The MAP partitions for each relation identify the relevant categories in the tree relatively cleanly: the model discovers, for example, that the distinction between “living things” and “abnormalities” is irrelevant to the first place of the relation causes, since neither of these categories can cause anything (according to the data set). This distinction, however, is relevant to the second place of causes: substances can cause abnormalities and dysfunctions, but cannot cause “living things”. Note that the MAP partitions for causes and analyzes are rather different: one of the reasons why discovering separate t-c partitions for each relation is important is that different relations can depend on very different parts of an ontology. Our third application is inspired by the problem children face when learning the kinship structure of their social group. This problem is especially acute for children growing up in Australian tribes, which have kinship systems that are more complicated in many ways than Western kinship systems, but which nevertheless display some striking regularities. We focus here on data from the Alyawarra tribe [3]. Denham [3] collected a large data set by asking 104 tribe members to provide kinship terms for each other. Twenty-six different terms were mentioned in total, and four of them are represented in Figure 4. More than one kinship term may describe the relationship between a pair of individuals — since the data set includes only one term per pair, some of the zeros in each matrix represent missing data rather than relationships that do not hold. For simplicity, however, we assume that relationships that were never mentioned do not exist. The Alyawarra tribe is divided into four kinship sections, and these sections are fundamental to the social structure of the tribe. Each individual, for instance, is permitted only to marry individuals from one of the other sections. Whether a kinship term applies between a pair of individuals depends on their sections, ages and genders [3, 8]. We analyzed a subset of the full data set including 64 individuals chosen to equally represent all four sections, both genders, and people young and old. The MAP tree divides the individuals perfectly according to kinship section, and discovers additional structure within each section. Group three, for example, is split by age and then by gender. The MAP partitions for each relation indicate that different relations depend very differently on the structure of the tree. Adiadya refers to a younger member of one’s own kinship section. The MAP partition for this relation contains fine-level structure only along the diagonal, indicating that the model has discovered that the term only applies between individuals from the same kinship section. Umbaidya can be used only between members of sections 1 and 3, and members of sections 2 and 4. Again the MAP partition indicates that the model has discovered this structure. In some places the MAP partitions appears to overfit the data: the partition for Umbaidya, for example, appears to capture some of the noise in this relation. This result may reflect the fact that our generative process is not quite right for these data: in particular, it does not capture the idea that some of the zeroes in each relation represent missing data. 4 Conclusions We developed a probabilistic model that assumes that features and relations are generated over an annotated hierarchy, and showed how this model can be used to recover annotated hierarchies from raw data. Three applications of the model suggested that it is able to recover interpretable structure in real-world data, and may help to explain the computational principles which allow human learners to acquire hierarchical representations of real-world domains. Our approach opens up several avenues for future work. A hierarchy specifies a set of categories, and annotations indicate which of these categories are important for understanding specific features and relations. A natural extension is to learn sets of categories that possess other kinds of structure, such as factorial structure [17]. For example, the kinship data we analyzed may be well described by three sets of overlapping categories where each individual belongs to a kinship section, a gender, and an age group. We have already extended the model to handle continuous data and can imagine other extensions, including higher-order relations, multiple trees, and relations between distinct sets of objects (e.g. given information, say, about the book-buying habits of a set of customers, this extension of our model could discover a hierarchical representation of the customers and a hierarchical representation of the books, and discover the categories of books that tend to be preferred by different kinds of customers). We are also actively exploring variants of our model that permit accurate online approximations for inference; e.g., by placing an exchangeable prior over tree structures based on a Polya-urn scheme, we can derive an efficient particle filter. We have shown that formalizing the intuition behind annotated hierarchies in terms of a prior on trees and partitions and a noise-robust likelihood enabled us to discover interesting structure in realworld data. We expect a fruitful area of research going forward will involve similar marriages between intuitions about structured representation from classical AI and cognitive science and modern inferential machinery from Bayesian statistics and machine learning. References [1] A. M. Collins and M. R. Quillian. Retrieval Time from Semantic Memory. JVLVB, 8:240–248, 1969. [2] G. Cree and K. McRae. Analyzing the factors underlying the structure and computation of the meaning of chipmunk, chisel, cheese, and cello (and many other concrete nouns). JEP Gen., 132:163–201, 2003. [3] W. Denham. The detection of patterns in Alyawarra nonverbal behaviour. PhD thesis, U. of Wash., 1973. [4] R. O. Duda and P. E. Hart. Pattern Classification and Scene Analaysis. Wiley, 2001. [5] M. Girvan and M. E. J. Newman. Community structure in social and biological networks. Proceedings of the National Academy of Sciences, 99(12):7821–7826, 2002. [6] K. Heller and Z. Ghahramani. Bayesian Hierarchical Clustering. In ICML, 2005. [7] F. C. Keil. Semantic and Conceptual Development. Harvard University Press, Cambridge, MA, 1979. [8] C. Kemp, T. L. Griffiths, and J. B. Tenenbaum. Discovering Latent Classes in Relational Data. Technical Report AI Memo 2004-019, MIT, 2004. [9] C. Kemp, J. B. Tenenbaum, T. L. Griffiths, T. Yamada, and N. Ueda. Learning systems of concepts with an infinite relational model. In AAAI, 2006. [10] J. Kubica, A. Moore, J. Schneider, and Y. Yang. Stochastic link and group detection. In NCAI, 2002. [11] J. M. Mandler and L. McDonough. Concept formation in infancy. Cog. Devel., 8:291–318, 1993. [12] A. T. McCray. An upper level ontology for the biomedical domain. Comp. Func. Genom., 4:80–84, 2001. [13] J. Neville, M. Adler, and D. Jensen. Clustering relational data using attribute and link information. In Proc. of the Text Mining and Link Analysis Workshop, IJCAI, 2003. [14] D. L. Swofford, G. J. Olsen, P. J. Waddell, and D. M. Hillis. Phylogenetic inference. Molecular Systematics, 2nd. edition, 1996. [15] Y. J. Wang and G. Y. Wong. Stochastic blockmodels for directed graphs. JASA, 82:8–19, 1987. [16] S. Wasserman and K. Faust. Social network analysis: Methods and applications. Cambridge Press, 1994. [17] A. P. Wolfe and D. Jensen. Playing multiple roles: discovering overlapping roles in social networks. In Proc. of the Workshop on statistical relational learning and its connections to other fields, ICML, 2004. [18] K. Y. Yeung, M. Medvedovic, and R. E. Bumgarner. Clustering gene-expression data with repeated measurements. Genome Biology, 2003.
2006
79
3,102
Predicting spike times from subthreshold dynamics of a neuron Ryota Kobayashi Department of Physics Kyoto University Kyoto 606-8502, Japan kobayashi@ton.scphys.kyoto-u.ac.jp Shigeru Shinomoto Department of Physics Kyoto University Kyoto 606-8502, Japan shinomoto@scphys.kyoto-u.ac.jp Abstract It has been established that a neuron reproduces highly precise spike response to identical fluctuating input currents. We wish to accurately predict the firing times of a given neuron for any input current. For this purpose we adopt a model that mimics the dynamics of the membrane potential, and then take a cue from its dynamics for predicting the spike occurrence for a novel input current. It is found that the prediction is significantly improved by observing the state space of the membrane potential and its time derivative(s) in advance of a possible spike, in comparison to simply thresholding an instantaneous value of the estimated potential. 1 Introduction Since Hodgkin and Huxley [1] described the ionic flux across the neuronal membrane with four nonlinear differential equations more than half a century ago, continuous efforts have been made either to extract an essence of the nonlinear dynamical aspect by simplifying the model, or construct ever more realistic models by including more ionic channels in the model. In the simplification proposed by FitzHugh [2] and Nagumo et al [3], the number of equations is reduced to two: the fast and slow variables which minimally represent the excitable dynamics. The leaky integrate-and-fire model [4], originally proposed far in advance of the Hodgkin-Huxley model, consists of only one variable that corresponds to the membrane potential, with a voltage resetting mechanism. Those simplified models have been successful in not only extracting the essence of the dynamics, but also in reducing the computational cost of studying the large-scale dynamics of an assembly of neurons. In contrast to such taste for simplification, there are also a number of studies that pursue realism by developing multi-compartment models and installing newly found ionic channels. User-friendly simulation platforms, such as NEURON [5] and GENESIS [6], enable experimental neurophysiologists to reproduce casually their experimental results or to explore potentially interesting phenomena for a new experiment to be performed. Though those simulators have been successful in reproducing qualitative aspects of neuronal responses to various conditions, quantitative reproduction as well as prediction for novel experiments appears to be difficult to realize [7]. The difficulty is due to the complexity of the model accompanied with a large number of undetermined free parameters. Even if a true model of a particular neuron is included in the family of models, it is practically difficult to explore the true parameters in the high-dimensional space of parameters that dominate the nonlinear dynamics. Recently it was suggested by Kistler et al [8, 9] to extend the leaky integrate-and-fire model so that real membrane dynamics of any neuron can be adopted. The so called “spike response model” has been successful in not only reproducing the data but also in predicting the spike timing for a novel input current [8, 9, 10, 11]. The details of an integration kernel are learned easily from the sample data. The fairly precise prediction achieved by such a simple model indicates that the spike occurrence is determined principally by the subthreshold dynamics. In other words, the highly nonlinear dynamics of a neuron can be decomposed into two simple, predictable processes: a relatively simple subthreshold dynamics, and the dynamics of an action potential of a nearly fixed shape (Fig.1). dV/dt V subthreshold (predictable) action potential (nearly fixed) Figure 1: The highly nonlinear dynamics of a neuron is decomposed into two simple, predictable processes. In this paper, we propose a framework of improving the prediction of spike times by paying close attention to the transfer between the two predictable processes mentioned above. It is assumed in the original spike response model that a spike occurs if the membrane potential exceeds a certain threshold [9]. We revised this rule to maximally utilize the information of a higher-dimensional state space, consisting of not only the instantaneous membrane potential, but also its time derivative(s). Such a subthreshold state can provide cues for the occurrence of a spike, but with a certain time difference. For the purpose of exploring the optimal time shift, we propose a method of maximizing the mutual information between the subthreshold state and the occurrence of a spike. By employing the linear filter model [12] and the spike response model [9] for mimicking the subthreshold voltage response of a neuron, we examine how much the present framework may improve the prediction for simulation data of the fast-spiking model [13]. 2 Methods The response of a neuron is precisely reproduced when presented with identical fluctuating input currents [14]. This implies that the neuronal membrane potential V (t) is determined by the past input current {I(t)}, or V (t) = F({I(t)}), (1) where F({I(t)}) represents a functional of a time-dependent current I(t). A rapid swing in the polarity of the membrane potential is called a “spike.” The occurrence of a spike could be defined practically by measuring the membrane potential V (t) exceeding a certain threshold, V (t) > Vth. (2) The time of each spike could be defined either as the first time the threshold is exceeded, or as the peak of the action potential that follows the crossing. Kistler et al [8] and Jolivet et al [10, 11] proposed a method of mimicking the membrane dynamics of a target neuron with the simple spike response model in which an input current is linearly integrated. The leaky integrate-and-fire model can be regarded as an example of the spike response model [9]; the differential equation can be rewritten as an integral equation in which the membrane potential is given as the integral of the past input current with an exponentially decaying kernel. The spike response model is an extension of the leaky integrate-and-fire model, where the integrating kernel is adaptively determined by the data, and the after hyperpolarizing potential is added subsequently to every spike. It is also possible to further include terms that reduce the responsiveness and increase the threshold after an action potential takes place. Even in the learning stage, no model is able to perfectly reproduce the output V (t) of a target neuron for a given input I(t). We will denote the output of the model (in the lower case) as v(t) = fk({I(t)}), (3) where k represents a set of model parameters. The model parameters are learned by mimicking sample input-output data. This is achieved by minimizing the integrated square error, Ek = ∫ (V (t) −v(t))2 dt. (4) 2.1 State space method As the output of the model v(t) is not identical to the true membrane potential of the target neuron V (t), a spike occurrence cannot be determined accurately by simply applying the same threshold rule Eq.(2) to v(t). In this paper, we suggest revising the spike generation rule so that a spike occurrence is best predicted from the model potential v(t). Suppose that we have adjusted the parameters of fk({I(t)}) so that the output of the model {v(t)} best approximates the membrane potential {V (t)} of a target neuron for a given set of currents {I(t)}. If the sample data set {I(t), V (t)} employed in learning is large enough, the spike occurrence can be predicted by estimating an empirical probability of a spike being generated at the time t, given a time-dependent orbit of an estimated output, {v(t)}, as pspike(t|{v(t)}). (5) In a practical experiment, however, the amount of collectable data is insufficient for estimating the spiking probability with respect to any orbit of v(t). In place of such exhaustive examination, we suggest utilizing the state space information such as the time derivatives of the model potential at a certain time. The spike occurrence at time t could be predicted from the m-dimensional state space information ⃗v ≡(v, v′, · · · , v(m−1)), as observed at a time s before t, as pspike(t|⃗vt−s), (6) where ⃗vt−s ≡(v(t −s), v′(t −s), · · · , v(m−1)(t −s)). 2.2 Determination of the optimal time shift The time shift s introduced in the spike time prediction, Eq.(6), is chosen to make the prediction more reliable. We propose optimizing the time shift s by maximizing the mutual information between the state space information ⃗vt−s and the presence or absence of a spike at a time interval (t −δt/2, t + δt/2], which is denoted as zt = 1 or 0. The mutual information [15] is given as MI(zt;⃗vt−s) = MI(⃗vt−s; zt) = H(⃗vt−s) −H(⃗vt−s|zt), (7) where H(⃗vt−s) = − ∫ d⃗vt−s p(⃗vt−s) log p(⃗vt−s), (8) H(⃗vt−s|zt) = − ∑ zt∈{0,1} ∫ d⃗vt−s p(⃗vt−s|zt)p(zt) log p(⃗vt−s|zt). (9) Here, p(⃗vt−s|zt) is the probability, given the presence or absence of a spike at time t ∈(t−δt/2, t+ δt/2], of the state being ⃗vt−s, a time s before the spike. With the time difference s optimized, we then obtain the empirical probability of the spike occurrence at the time t, given the state space information at the time t −s, using the Bayes theorem, pspike(t|⃗vt−s) ∝p(zt = 1|⃗vt−s) = p(⃗vt−s|zt)p(zt) p(⃗vt−s) . (10) 3 Results We evaluated our state space method of predicting spike times by applying it to target data obtained for a fast-spiking neuron model proposed by Erisir et al [13] (see Appendix). In this virtual experiment, two fluctuating currents characterized by the same mean and standard deviation are injected to the (model) fast-spiking neuron to obtain two sets of input-output data {I(t), V (t)}. A predictive model was trained using one sample data set, and then its predictive performance for the other sample data was evaluated. Each input current is generated by the Ornstein-Uhlenbeck process. We have tested two kinds of fluctuating currents characterized with different means and standard deviations: (Currents I) the mean µ = 1.5 [µA], the standard deviation σ = 1.0 [µA] and the time scale of the fluctuation τ = 2 [msec]; (Currents II) the mean µ = 0.0 [µA], the standard deviation σ = 4.0 [µA] and the time scale of the fluctuation τ = 2 [msec]. For each set with these statistics, we derived two independent sequences of I(t). In this study we adopted the linear filter model and the spike response model as prediction models. 40 t (ms) 0 1 2 K(t) s (ms) 0 0.01 0.02 0.03 MI A B 0 0 20 4 8 Figure 2: A: The estimated kernel. B: The mutual information between the estimated potential and the occurrence of a spike. We briefly describe here the results for the linear filter model [12], v(t) = ∫∞ 0 K(t′)I(t −t′) dt′ + v0. (11) The model parameters k consist of the shape of the kernel K(t) and the constant v0. In learning the target sample data {I(t), V (t)}, these parameters are adjusted to minimize the integrated square error, Eq.(4). Figure 2A depicts the shape of the kernel K(t) estimated from the target sample data {I(t), V (t)} obtained from the virtual experiment of the fast-spiking neuron model. Based on the voltage estimation v(t) with respect to sample data, we compute the empirical probabilities, p(⃗vt−s), p(⃗vt−s|zt) and p(zt) for two-dimensional state space information ⃗vt−s ≡ (v(t −s), v′(t −s)). In computing empirical probabilities, we quantized the two-dimensional phase space ⃗v ≡(v, v′), and the time. In the discretized time, we counted the occurrence of a spike, zt = 1, for the bins in which the true membrane potential V (t) exceeds a reasonable threshold Vth. With a sufficiently small time step (we adopted δt = 0.1 [msec]), a single spike is transformed into a succession of spike occurrences zt = 1. The mutual information computed according to Eq.(7) is depicted in Fig. 2B whose maximum position of s ≈2 [msec] determines the optimal time shift. The spike is predicted if the estimated probability pspike(t|⃗vt−s) of Eq.(10) exceeds a certain threshold value. Though it would be more efficient to use the systematic method suggested by Paninski et al [16], we determined the threshold value empirically so that the coincidence factor Γ described in the following is maximized. Figure 3 compares a naive thresholding method and our state space method, in reference to the original spike times. It is observed from this figure that the prediction of the state space method is more accurate and robust than that of thresholding method. 0 50 V(t) v(t) 3000 3500 t (ms) pspike(t) 0 50 Figure 3: Comparison of the spike time predictions. (Top): The target membrane potential V (t). (Middle): Prediction by thresholding the model potential. (Bottom): Prediction by the present state space method. Vertical arrows represent the predicted spikes. Figure 4 depicts an orbit in the state space of (V, V ′) of a target neuron for an instance of the spike generation, and the orbit of the predictive model in the state space of (v, v′) that mimics it. The predictive model can mimic the target orbit in the subthreshold region, but fails to catch the spiking orbit in the suprathreshold region. The spike occurrence is predicted by estimating the conditional probability, Eq.(10), given the state (v, v′) of the predictive model. Contour lines of the probability in Figure 4C are not parallel to the dv/dt-axis. The contour lines for higher probabilities of spiking resemble an ad hoc “dynamic spike threshold” introduced by Azouz and Gray [17]. Namely, v drops with dv/dt along the contour lines. Contrastingly, the contour lines for lower probabilities of spiking are inversely curved: v increases with dv/dt along the contour lines. In the present framework, the state space information corresponding to the relatively low probability of spiking is effectively used for predicting spike times. Prediction performance is compared with the benchmark of Kistler et al [8], the “coincidence factor,” Γ(∆) = Ncoinc −〈Ncoinc〉 1 2(Ndata + Nmodel) 1 1 −2ν∆, (12) where Ndata and Nmodel respectively represent the numbers of spikes in the original data and prediction model, Ncoinc is the number of coincident spikes with the precision of ∆, 〈Ncoinc〉= 2ν∆Ndata is the expected number of coincidences of the data and the Poisson spikes with rate ν. ∆is chosen as 2 [msec] in accordance with Jolivet et al [10]. Table 1: The coincidence factors evaluated for two methods of prediction based on the linear filter model. method Currents I Currents II thresholding 0.272 0.567 state space 0.430 0.666 -2 0 2 6 8 10 12 14 dV/dt dv/dt -2 0 2 -500 0 500 0 40 80 120 V b c b c a a dV/dt V A B C 6 8 10 12 14 v Figure 4: A: An orbit in the state space of (V, V ′) of a target neuron for an instance of the spike generation (from 3240 to 3270 [msec] of Fig. 3). B: magnified view. C: The orbit in the state space of (v, v′) of the predictive model that mimics the target neuron. Contours represent the probability of spike occurrence computed with the Bayes formula, Eq.(10).The dashed lines represent the threshold adopted in the naive thresholding method (Fig 3 Middle). Three points a, b, and c in the spaces of (V, V ′) and (v, v′) represent the states of identical times, respectively, t = 3242, 3252 and 3253 [msec]. Table 2: The coincidence factors evaluated for two methods of prediction based on the spike response model. method Currents I Currents II thresholding 0.501 0.805 state space 0.641 0.842 The coincidence factors evaluated for a simple thresholding method and the state space method based on the linear filter model are summarized in Table 1, and those based on the spike response model are summarized in Table 2. It is observed that the prediction is significantly improved by our state space method. It should be noted, however, that a model with the same set of parameters does not perform well over a range of inputs generated with different mean and variance: The model parameterized with the Currents I does not effectively predict the spikes of the neuron for the Current II, and vice versa. Nevertheless, our state-space method exhibits the better prediction than the naive thresholding strategy, if the statistics of the different inputs are relatively similar. 4 Summary We proposed a method of evaluating the probability of the spike occurrence by observing the state space of the membrane potential and its time derivative(s) in advance of the possible spike time. It is found that the prediction is significantly improved by the state space method compared to the prediction obtained by simply thresholding an instantaneous value of the estimated potential. It is interesting to apply our method to biological data and categorize neurons based on their spiking mechanisms. The state space method developed here is a rather general framework that may be applicable to any nonlinear phenomena composed of locally predictable dynamics. The generalization of linear filter analysis developed here has a certain similarity to the Linear-Nonlinear-Poisson (LNP) model [18, 19]. It would be interesting to generalize the present method of analysis to a wider range of phenomena such as the analysis of the coding of visual system [19, 20]. Acknowledgments This study is supported in part by Grants-in-Aid for Scientific Research to SS from the Ministry of Education, Culture, Sports, Science and Technology of Japan (16300068, 18020015) and the 21st Century COE ”Center for Diversity and Universality in Physics” and to RK from Foundation For C & C Promotion. Appendix: Fast-spiking neuron model The fast-spiking neuron model proposed by Erisir et al [13] was used in this contribution as a (virtual) target experiment. The details of the model were adjusted to Jolivet et al [10] to allow the direct comparison of the performances. Specifically, the model is described as C du(t) dt = −[INa + IK1 + IK2 + IL] + Iext(t) , (13) INa = gNam3h(u −ENa) , (14) IK1 = gK1n4 1(u −EK) , IK2 = gK2n2 2(u −EK) , (15) IL = gL(u −EL) , (16) where the gate variables x ≡n1, n2, m and h obey the differential equations of the form, dx dt = αx(u)(1 −x) −βx(u)x, (17) whose parameters αx(u) and βx(u) are functions of u, as listed in Table 3. Table 3: The parameters for the fast-spiking model. The membrane capacity is C = 1.0[µF/cm2]. Channel Variable α β gx(mS/cm2) Ex(mV) Na m −3020+40u 1−exp(−u−75.5 13.5 ) 1.2262 exp( u 42.248 ) 112.5 74 −− h 0.0035 exp( u 24.186 ) 0.8712+0.017u 1−exp(−51.25+u 5.2 ) −− −− K1 n1 0.014(44+u) 1−exp(−44+u 2.3 ) 0.0043 exp( 44+u 34 ) 0.225 −90.0 K2 n2 u−95 1−exp(−u−95 11.8 ) 0.025 exp( u 22.22 ) 225.0 −90.0 L −− −− −− 0.25 −70 References [1] Hodgkin, A.L. & Huxley, A.F. (1952) J. Physiol. 117:500-544. [2] FitzHugh, R. (1961) Biophys. J. 1:445-466. [3] Nagumo, J., Arimoto, S. & Yoshizawa, S. (1962) Proc. IRE 50:2061-2070. [4] Lapicque, L. (1907) J. Physiol. Pathol. Gen. 9:620-635. [5] Hines, M.L. & Carnevale, N.T. (1997) Neural Comp. 9:1179-1209. [6] Bower, J.M. & Beeman, D. (1995) The Book of GENESIS: Exploring Realistic Neural Models with the GEneral NEural SImulation System. New York: Springer-Verlag. [7] Tsubo, Y., Kaneko, T. & Shinomoto, S. (2004) Neural Networks 17:165-173. [8] Kistler, W., Gerstner, W. & van Hemmen, J.L. (1997) Neural Comp. 9:1015-1045. [9] Gerstner, W. & Kistler, W. (2002) Spiking Neuron Models: Single Neurons, Populations, Plasticity. Cambridge: Cambridge Univ. Press. [10] Jolivet, R., Lewis, T.J. & Gerstner, W. (2004) J. Neurophysiol. 92:959-976. [11] Jolivet, R., Rauch, A., L¨uscher, H.R. & Gerstner, W. (2006) Integrate-and-Fire models with adaptation are good enough: predicting spike times under random current injection. In Y. Weiss, B. Sch¨olkopf and J. Platt (eds.), Advances in Neural Information Processing Systems 18, pp. 595-602. Cambridge, MA: MIT Press. [12] Westwick, D.T. & Kearney, R.E. (2003) Identification of Nonlinear Physiological Systems. (Ieee Press Series in Biomedical Engineering) Piscataway: Wiley-IEEE Press. [13] Erisir, A., Lau, D., Rudy, B. & Leonard, C.S. (1999) J. Neurophysiol. 82:2476-2489. [14] Mainen, Z.F. & Sejnowski, T.J. (1995) Science 268:1503-1506. [15] MacKay, D. (2003) Information Theory, Inference and Learning Algorithms. Cambridge: Cambridge Univ. Press. [16] Paninski, L., Pillow, J.W. & Simoncelli, E.P. (2005) Neurocomputing 65-66: 379-385 [17] Azouz, R. & Gray, C.M. (2000) PNAS 97(14):8110-8115. [18] Chichilnisky, E.J. (2001) Network 12(2):199-213. [19] Pillow, J.W., Paninski, L., Uzzell, V.J., Simoncelli, E.P. & Chichilnisky, E.J. (2005) Journal of Neuroscience 25(47):11003-11013. [20] Arcas, B.A., Fairhall, A.L. & Bialek, W. (2003) Neural Comp. 15:1715-1749.
2006
8
3,103
Single Channel Speech Separation Using Factorial Dynamics John R. Hershey Trausti Kristjansson Steven Rennie Peder A. Olsen IBM Thomas J. Watson Research Center Yorktown Heights, NY 10598 Abstract Human listeners have the extraordinary ability to hear and recognize speech even when more than one person is talking. Their machine counterparts have historically been unable to compete with this ability, until now. We present a modelbased system that performs on par with humans in the task of separating speech of two talkers from a single-channel recording. Remarkably, the system surpasses human recognition performance in many conditions. The models of speech use temporal dynamics to help infer the source speech signals, given mixed speech signals. The estimated source signals are then recognized using a conventional speech recognition system. We demonstrate that the system achieves its best performance when the model of temporal dynamics closely captures the grammatical constraints of the task. One of the hallmarks of human perception is our ability to solve the auditory cocktail party problem: we can direct our attention to a given speaker in the presence of interfering speech, and understand what was said remarkably well. Until now the same could not be said for automatic speech recognition systems. However, we have recently introduced a system which in many conditions performs this task better than humans [1][2]. The model addresses the Pascal Speech Separation Challenge task [3], and outperforms all other published results by more than 10% word error rate (WER). In this model, dynamics are modeled using a layered combination of one or two Markov chains: one for long-term dependencies and another for short-term dependencies. The combination of the two speakers was handled via an iterative Laplace approximation method known as Algonquin [4]. Here we describe experiments that show better performance on the same task with a simpler version of the model. The task we address is provided by the PASCAL Speech Separation Challenge [3], which provides standard training, development, and test data sets of single-channel speech mixtures following an arbitrary but simple grammar. In addition, the challenge organizers have conducted human-listening experiments to provide an interesting baseline for comparison of computational techniques. The overall system we developed is composed of the three components: a speaker identification and gain estimation component, a signal separation component, and a speech recognition system. In this paper we focus on the signal separation component, which is composed of the acoustic and grammatical models. The details of the other components are discussed in [2]. Single-channel speech separation has previously been attempted using Gaussian mixture models (GMMs) on individual frames of acoustic features. However such models tend to perform well only when speakers are of different gender or have rather different voices [4]. When speakers have similar voices, speaker-dependent mixture models cannot unambiguously identify the component speakers. In such cases it is helpful to model the temporal dynamics of the speech. Several models in the literature have attempted to do so either for recognition [5, 6] or enhancement [7, 8] of speech. Such models have typically been based on a discrete-state hidden Markov model (HMM) operating on a frame-based acoustic feature vector. Modeling the dynamics of the log spectrum of speech is challenging in that different speech components evolve at different time-scales. For example the excitation, which carries mainly pitch, versus the filter, which consists of the formant structure, are somewhat independent of each other. The formant structure closely follows the sequences of phonemes in each word, which are pronounced at a rate of several per second. In non-tonal languages such as English, the pitch fluctuates with prosody over the course of a sentence, and is not directly coupled with the words being spoken. Nevertheless, it seems to be important in separating speech, because the pitch harmonics carry predictable structure that stands out against the background. We address the various dynamic components of speech by testing different levels of dynamic constraints in our models. We explore four different levels of dynamics: no dynamics, low-level acoustic dynamics, high-level grammar dynamics, and a layered combination, dual dynamics, of the acoustic and grammar dynamics. The grammar dynamics and dual dynamics models perform the best in our experiments. The acoustic models are combined to model mixtures of speech using two methods: a nonlinear model known as Algonquin, which models the combination of log-spectrum models as a sum in the power spectrum, and a simpler max model that combines two log spectra using the max function. It turns out that whereas Algonquin works well, our formulation of the max model does better overall. With the combination of the max model and grammar-level dynamics, the model produces remarkable results: it is often able to extract two utterances from a mixture even when they are from the same speaker 1. Overall results are given in Table 1, which shows that our closest competitors are human listeners. Table 1: Overall word error rates across all conditions on the challenge task. Human: average human error rate, IBM: our best result, Next Best: the best of the eight other published results on this task, and Chance: the theoretical error rate for random guessing. System: Human IBM Next Best Chance Word Error Rate: 22.3% 22.6% 34.2% 93.0% 1 Speech Models The model consists of an acoustic model and temporal dynamics model for each source, and a mixing model, which models how the source models are combined to describe the mixture. The acoustic features were short-time log spectrum frames computed every 15 ms. Each frame was of length 40 ms and a 640-point mixed-radix FFT was used. The DC component was discarded, producing a 319-dimensional log-power-spectrum feature vector yt. The acoustic model consists of a set of diagonal-covariance Gaussians in the features. For a given speaker, a, we model the conditional probability of the log-power spectrum of each source signal xa given a discrete acoustic state sa as Gaussian, p(xa|sa) = N(xa; µsa, Σsa), with mean µsa, and covariance matrix Σsa. We used 256 Gaussians, one per acoustic state, to model the acoustic space of each speaker. For efficiency and tractability we restrict the covariance to be diagonal. A model with no dynamics can be formulated by producing state probabilities p(sa), and is depicted in 1(a). Acoustic Dynamics: To capture the low-level dynamics of the acoustic signal, we modeled the acoustic dynamics of a given speaker, a, via state transitions p(sa t |sa t−1) as shown in Figure 1(b). There are 256 acoustic states, hence for each speaker a, we estimated a 256×256 element transition matrix Aa. Grammar Dynamics: The grammar dynamics are modeled by grammar state transitions, p(va t |va t−1), which consist of left-to-right phone models. The legal word sequences are given by the Speech Separation Challenge grammar [3] and are modeled using a set of pronunciations that 1Demos and information can be found at: http : //www.research.ibm.com/speechseparation sa t−1 xt−1 sa t xt (a) No Dynamics sa t−1 xt−1 sa t xt (b) Acoustic Dynamics va t−1 sa t−1 xt−1 va t sa t xt (c) Grammar Dynamics va t−1 sa t−1 xt−1 va t sa t xt (d) Dual Dynamics Figure 1: Graph of models for a given source. In (a), there are no dynamics, so the model is a simple mixture model. In (b), only acoustic dynamics are modeled. In (c), grammar dynamics are modeled with a shared set of acoustic Gaussians, in (d) dual – grammar and acoustic – dynamics have been combined. Note that (a) (b) and (c) are special cases of (d), where different nodes are assumed independent. map from words to three-state context-dependent phone models. The state transition probabilities derived from these phone models are sparse in the sense that most transition probabilities are zero. We model speaker dependent distributions p(sa|va) that associate the grammar states, va to the speaker-dependent acoustic states. These are learned from training data where the grammar state sequences and acoustic state sequences are known for each utterance. The grammar of our system has 506 states, so we estimate a 506 × 256 element conditional probability matrix Ba for each speaker. Dual Dynamics: The dual-dynamics model combines the acoustic dynamics with the grammar dynamics. It is useful in this case to avoid modeling the full combination of s and v states in the joint transitions p(sa t |sa t−1, vt). Instead we make a naive-Bayes assumption to approximate this as 1 zp(sa t |sa t−1)αp(sa t |vt)β, where α and β adjust the relative influence of the two probabilities, and z is the normalizing constant. Here we simply use the probability matrices Aa and Ba, defined above. 2 Mixed Speech Models The speech separation challenge involves recognizing speech in mixtures of signals from two speakers, a and b. We consider only mixing models that operate independently on each frequency for analytical and computational tractability. The short-time log spectrum of the mixture yt, in a given frequency band, is related to that of the two sources xa t and xb t via the mixing model given by the conditional probability distribution, p(y|xa, xb). The joint distribution of the observation and source in one feature dimension, given the source states is thus: p(yt, xa t , xb t|sa t , sb t) = p(yt|xa t , xb t)p(xa t |sa t )p(xb t|sb t). (1) In general, to infer and reconstruct speech we need to compute the likelihood of the observed mixture p(yt|sa t , sb t) = Z p(yt, xa t , xb t|sa t , sb t)dxa t dxb t, (2) and the posterior expected values of the sources given the states, E(xa t |yt, sa t , sb t) = Z xa t p(xa t , xb t|yt, sa t , sb t)dxa t dxb t, (3) and similarly for xb t. These quantities, combined with a prior model for the joint state sequences {sa 1..T , sb 1..T }, allow us to compute the minimum mean squared error (MMSE) estimators E(xa 1..T |y1..T ) or the maximum a posteriori (MAP) estimate E(xa 1..T |y1..T , ˆsa1..T , ˆsb1..T ), where ˆsa1..T , ˆsb1..T = arg maxsa 1..T ,sb 1..T p(sa 1..T , sb 1..T |y1..T ), where the subscript, 1..T, refers to all frames in the signal. The mixing model can be defined in a number of ways. We explore two popular candidates, for which the above integrals can be readily computed: Algonquin, and the max model. sa xa sb xb y (a) Mixing Model (vavb)t−1 (sasb)t−1 yt (vavb)t (sasb)t yt (b) Dual Dynamics Factorial Model Figure 2: Model combination for two talkers. In (a) all dependencies are shown. In (b) the full dual-dynamics model is graphed with the xa and xb integrated out, and corresponding states from each speaker combined into product states. The other models are special cases of this graph with different edges removed, as in Figure 1. Algonquin: The relationship between the sources and mixture in the log power spectral domain is approximated as p(yt|xa t , xb t) = N(yt; log(exp(xa t ) + exp(xb t)), Ψ) (4) where Ψ is introduced to model the error due to the omission of phase [4]. An iterative NewtonLaplace method accurately approximates the conditional posterior p(xa t , xb t|yt, sa t , sb t) from (1) as Gaussian. This Gaussian allows us to analytically compute the observation likelihood p(yt|sa t , sb t) and expected value E(xa t |yt, sa t , sb t), as in [4]. Max model: The mixing model is simplified using the fact that log of a sum is approximately the log of the maximum: p(y|xa, xb) = δ y −max(xa, xb)  (5) In this model the likelihood is p(yt|sa t , sb t) = pxa t (yt|sa t )Φxb(yt|sb t) + pxb t(yt|sb t)Φxa t (yt|sa t ), (6) where Φxa t (yt|sa t ) = R yt −∞N(xa t ; µsa t , Σsa t )dxa t is a Gaussian cumulative distribution function [5]. In [5], such a model was used to compute state likelihoods and find the optimal state sequence. In [8], a simplified model was used to infer binary masking values for refiltering. We take the max model a step further and derive source posteriors, so that we can compute the MMSE estimators for the log power spectrum. Note that the source posteriors in xa t and xb t are each a mixture of a delta function and a truncated Gaussian. Thus we analytically derive the necessary expected value: E(xa t |yt, sa t , sb t) = p(xa t =yt|yt, sa t , sb t)yt + p(xa t < yt|yt, sa t , sb t)E(xa t |xa t < yt, sa t ) (7) = πa t yt + πb t  µsa t −Σsa t pxa t (yt|sa t ) Φxa t (yt|sa t )  , (8) with weights πa t = p(xa t=yt|yt, sa t , sb t) = pxa t (yt|sa t )Φxb(yt|sb t)/p(yt|sa t , sb t), and πb t = 1 −πa t . For many pairs of states one model is significantly louder than another µsa ≫µsb in a given frequency band, relative to their variances. In such cases it is reasonable to approximate the likelihood as p(yt|sa t , sb t) ≈pxa t (yt|sa t ), and the posterior expected values according to E(xa t |yt, sa t , sb t) ≈yt and E(xb t|yt, sa t , sb t) ≈min(yt, µsb t), and similarly for µsa ≪µsb. 3 Likelihood Estimation Because of the large number of state combinations, the model would not be practical without techniques to reduce computation time. To speed up the evaluation of the joint state likelihood, we employed both band quantization of the acoustic Gaussians and joint-state pruning. Band Quantization: One source of computational savings stems from the fact that some of the Gaussians in our model may differ only in a few features. Band quantization addresses this by approximating each of the D Gaussians of each model with a shared set of d Gaussians, where d ≪ D, in each of the F frequency bands of the feature vector. A similar idea is described in [9]. It relies on the use of a diagonal covariance matrix, so that p(xa|sa) = Q f N(xa f; µf,sa, Σf,sa), where Σf,sa are the diagonal elements of covariance matrix Σsa. The mapping Mf(si) associates each of the D Gaussians with one of the d Gaussians in band f. Now ˆp(xa|sa) = Q f N(xa f; µf,Mf (sa), Σf,Mf (sa)) is used as a surrogate for p(xa|sa). Figure 3 illustrates the idea. Figure 3: In band quantization, many multi-dimensional Gaussians are mapped to a few unidimensional Gaussians. Under this model the d Gaussians are optimized by minimizing the KL-divergence D(P sa p(sa)p(xa|sa)|| P sa p(sa)ˆp(xa|sa)), and likewise for sb. Then in each frequency band, only d×d, instead of D×D combinations of Gaussians have to be evaluated to compute p(y|sa, sb). Despite the relatively small number of components d in each band, taken across bands, band quantization is capable of expressing dF distinct patterns, in an F-dimensional feature space, although in practice only a subset of these will be used to approximate the Gaussians in a given model. We used d = 8 and D = 256, which reduced the likelihood computation time by three orders of magnitude. Joint State Pruning: Another source of computational savings comes from the sparseness of the model. Only a handful of sa, sb combinations have likelihoods that are significantly larger than the rest for a given observation. Only these states are required to adequately explain the observation. By pruning the total number of combinations down to a smaller number we can speed up the likelihood calculation, estimation of the components signals, as well as the temporal inference. However, we must estimate the likelihoods in order to determine which states to retain. We therefore used band-quantization to estimate likelihoods for all states, perform state pruning, and then the full model on the pruned states using the exact parameters. In the experiments reported here, we pruned down to 256 state combinations. The effect of these speedup methods on accuracy will be reported in a future publication. 4 Inference In our experiments we performed inference in four different conditions: no dynamics, with acoustic dynamics only, with grammar dynamics only, and with dual dynamics (acoustic and grammar). With no dynamics the source models reduce to GMMs and we infer MMSE estimates of the sources based on p(xa, xb|y) as computed from (1), using Algonquin or the max model. Once the log spectrum of each source is estimated, we estimate the corresponding time-domain signal as shown in [4]. In the acoustic dynamics condition the exact inference algorithm uses a 2-Dimensional Viterbi search, described below, with acoustic temporal constraints p(st|st−1) and likelihoods from Eqn. (1), to find the most likely joint state sequence s1..T . Similarly in the grammar dynamics condition, 2-D Viterbi search is used to infer the grammar state sequences, v1..T . Instead of single Gaussians as the likelihood models, however, we have mixture models in this case. So we can perform an MMSE estimate of the sources by averaging over the posterior probability of the mixture components given the grammar Viterbi sequence, and the observations. It is critical to use the 2-D Viterbi algorithm in both cases, rather than the forward-backward algorithm, because in the same-speaker condition at 0dB, the acoustic models and dynamics are symmetric. This symmetry means that the posterior is essentially bimodal and averaging over these modes would yield identical estimates for both speakers. By finding the best path through the joint state space, the 2-D Viterbi algorithm breaks this symmetry and allows the model to make different estimates for each speaker. In the dual-dynamics condition we use the model of section 2(b). With two speakers, exact inference is computationally complex because the full joint distribution of the grammar and acoustic states, (va × sa) × (vb × sb) is required and is very large in number. Instead we perform approximate inference by alternating the 2-D Viterbi search between two factors: the Cartesian product sa × sb of the acoustic state sequences and the Cartesian product va × vb of the grammar state sequences. When evaluating each state sequence we hold the other chain constant, which decouples its dynamics and allows for efficient inference. This is a useful factorization because the states sa and sb interact strongly with each other and similarly for va and vb. Again, in the same-talker condition, the 2-D Viterbi search breaks the symmetry in each factor. 2-D Viterbi search: The Viterbi algorithm estimates the maximum-likelihood state sequence s1..T given the observations x1..T . The complexity of the Viterbi search is O(TD2) where D is the number of states and T is the number of frames. For producing MAP estimates of the 2 sources, we require a 2 dimensional Viterbi search which finds the most likely joint state sequences sa 1..T and sb 1..T given the mixed signal y1..T as was proposed in [5]. On the surface, the 2-D Viterbi search appears to be of complexity O(TD4). Surprisingly, it can be computed in O(TD3) operations. This stems from the fact that the dynamics for each chain are independent. The forward-backward algorithm for a factorial HMM with N state variables requires only O(TNDN+1) rather than the O(TD2N) required for a naive implementation [10]. The same is true for the Viterbi algorithm. In the Viterbi algorithm, we wish to find the most probable paths leading to each state by finding the two arguments sa t−1 and sb t−1 of the following maximization: {ˆsa t−1, ˆsb t−1} = arg max sa t−1sb t−1 p(sa t |sa t−1)p(sb t|sb t−1)p(sa t−1, sb t−1|y1..t−1) = arg max sa t−1 p(sa t |sa t−1) max sb t−1 p(sb t|sb t−1)p(sa t−1, sb t−1|y1..t−1). (9) The two maximizations can be done in sequence, requiring O(D3) operations with O(D2) storage for each step. In general, as with the forward-backward algorithm, the N-dimensional Viterbi search requires O(TNDN+1) operations. We can also exploit the sparsity of the transition matrices and observation likelihoods, by pruning unlikely values. Using both of these methods our implementation of 2-D Viterbi search is faster than the acoustic likelihood computation that serves as its input, for the model sizes and grammars chosen in the speech separation task. Speaker and Gain Estimation: In the challenge task, the gains and identities of the two speakers were unknown at test time and were selected from a set of 34 speakers which were mixed at SNRs ranging from 6dB to -9dB. We used speaker-dependent acoustic models because of their advantages when separating different speakers. These models were trained on gain-normalized data, so the models are not well matched to the different gains of the signals at test time. This means that we have to estimate both the speaker identities and the gain in order to adapt our models to the source signals for each test utterance. The number of speakers and range of SNRs in the test set makes it too expensive to consider every possible combination of models and gains. Instead, we developed an efficient model-based method for identifying the speakers and gains, described in [2]. The algorithm is based upon a very simple idea: identify and utilize frames that are dominated by a single source – based on their likelihoods under each speaker-dependent acoustic model – to determine what sources are present in the mixture. Using this criteria we can eliminate most of the unlikely speakers, and explore all combinations of the remaining speakers. An approximate EM procedure is then used to select a single pair of speakers and estimate their gains. Recognition: Although inference in the system may involve recognition of the words– for models that contain a grammar –we still found that a separately trained recognizer performed better. After reconstruction, each of the two signals is therefore decoded with a speech recognition system that incorporates Speaker Dependent Labeling (SDL) [2]. This method uses speaker dependent models for each of the 34 speakers. Instead of using the speaker identities provided by the speaker ID and gain module, we followed the approach for gender dependent labeling (GDL) described in [11]. This technique provides better results than if the true speaker ID is specified. 5 Results The Speech Separation Challenge [3] involves separating the mixed speech of two speakers drawn from of a set of 34 speakers. An example utterance is place white by R 4 now. In each recording, one of the speakers says white while the other says blue, red or green. The task is to recognize the letter and the digit of the speaker that said white. Using the SDL recognizer, we decoded the two estimated signals under the assumption that one signal contains white and the other does not, and vice versa. We then used the association that yielded the highest combined likelihood. Same Talker Same Gender Different Gender All 0 20 40 60 80 WER (%) No Separation No dynamics Acoustic Dyn. Grammar Dyn Dual Dyn Human Figure 4: Average word error rate (WER) as a function of model dynamics, in different talker conditions, compared to Human error rates, using Algonquin. Human listener performance [3] is compared in Figure 4 to results using the SDL recognizer without speech separation, and for each the proposed models. Performance is poor without separation in all conditions. With no dynamics the models do surprisingly well in the different talker conditions, but poorly when the signals come from the same talker. Acoustic dynamics gives some improvement, mainly in the same-talker condition. The grammar dynamics seems to give the most benefit, bringing the error rate in the same-gender condition below that of humans. The dual-dynamics model performed about the same as the grammar dynamics model, despite our intuitions. Replacing Algonquin with the max model reduced the error rate in the dual dynamics model (from 24.3% to 23.5%) and grammar dynamics model (from 24.6% to 22.6%), which brings the latter closer than any other model to the human recognition rate of 22.3%. Figure 5 shows the relative word error rate of the best system compared to human subjects. When both speakers are around the same loudness, the system exceeds human performance, and in the same-gender condition makes less than half the errors of the humans. Human listeners do better when the two signals are at different levels, even if the target is below the masker (i.e., in -9dB), suggesting that they are better able to make use of differences in amplitude as a cue for separation. 6 dB 3 dB 0 dB −3 dB −6 dB −9 dB −100 −50 0 50 100 150 200 Signal to Noise Ratio (SNR) Relative Word Error Rate (WER) Same Talker Same Gender Different Gender Human Figure 5: Word error rate of best system relative to human performance. Shaded area is where the system outperforms human listeners. An interesting question is to what extent different grammar constraints affect the results. To test this, we limited the grammar to just the two test utterances, and the error rate on the estimated sources dropped to around 10%. This may be a useful paradigm for separating speech from background noise when the text is known, such as in closed-captioned recordings. At the other extreme, in realistic speech recognition scenarios, there is little knowledge of the background speaker’s grammar. In such cases the benefits of models of low-level acoustic continuity over purely grammar-based systems may be more apparent. It is our hope that further experiments with both human and machine listeners will provide us with a better understanding of the differences in their performance characteristics, and provide insights into how the human auditory system functions, as well as how automatic speech perception in general can be brought to human levels of performance. References [1] T. Kristjansson, J. R. Hershey, P. A. Olsen, S. Rennie, and R. Gopinath, “Super-human multi-talker speech recognition: The IBM 2006 speech separation challenge system,” in ICSLP, 2006. [2] Steven Rennie, Pedera A. Olsen, John R. Hershey, and Trausti Kristjansson, “Separating multiple speakers using temporal constraints,” in ISCA Workshop on Statistical And Perceptual Audition, 2006. [3] Martin Cooke and Tee-Won Lee, “Interspeech speech separation challenge,” http : //www.dcs.shef.ac.uk/ ∼martin/SpeechSeparationChallenge.htm, 2006. [4] T. Kristjansson, J. Hershey, and H. Attias, “Single microphone source separation using high resolution signal reconstruction,” ICASSP, 2004. [5] P. Varga and R.K. Moore, “Hidden Markov model decomposition of speech and noise,” ICASSP, pp. 845–848, 1990. [6] M. Gales and S. Young, “Robust continuous speech recognition using parallel model combination,” IEEE Transactions on Speech and Audio Processing, vol. 4, no. 5, pp. 352–359, September 1996. [7] Y. Ephraim, “A Bayesian estimation approach for speech enhancement using hidden Markov models.,” vol. 40, no. 4, pp. 725–735, 1992. [8] S. Roweis, “Factorial models and refiltering for speech separation and denoising,” Eurospeech, pp. 1009–1012, 2003. [9] E. Bocchieri, “Vector quantization for the efficient computation of continuous density likelihoods. proceedings of the international conference on acoustics,” in ICASSP, 1993, vol. II, pp. 692–695. [10] Zoubin Ghahramani and Michael I. Jordan, “Factorial hidden Markov models,” in Advances in Neural Information Processing Systems, vol. 8. [11] Peder Olsen and Satya Dharanipragada, “An efficient integrated gender detection scheme and time mediated averaging of gender dependent acoustic models,” in Eurospeech 2003, 2003, vol. 4, pp. 2509–2512.
2006
80
3,104
A Small World Threshold for Economic Network Formation Eyal Even-Dar Computer and Information Science University of Pennsylvania Philadelphia, PA 19104 evendar@seas.upenn.edu Michael Kearns Computer and Information Science University of Pennsylvania Philadelphia, PA 19104 mkearns@cis.upenn.edu Abstract We introduce a game-theoretic model for network formation inspired by earlier stochastic models that mix localized and long-distance connectivity. In this model, players may purchase edges at distance d at a cost of dα, and wish to minimize the sum of their edge purchases and their average distance to other players. In this model, we show there is a striking “small world” threshold phenomenon: in two dimensions, if α < 2 then every Nash equilibrium results in a network of constant diameter (independent of network size), and if α > 2 then every Nash equilibrium results in a network whose diameter grows as a root of the network size, and thus is unbounded. We contrast our results with those of Kleinberg [8] in a stochastic model, and empirically investigate the “navigability” of equilibrium networks. Our theoretical results all generalize to higher dimensions. 1 Introduction Research over the last decade from fields as diverse as biology, sociology, economics and computer science has established the frequent empirical appearance of certain structural properties in naturally occurring networks. These properties include small diameter, local clustering of edges, and heavy-tailed degree distributions [11]. Not content to simply catalog such apparently “universal” properties, many researchers have proposed stochastic models of decentralized network formation that can explain their emergence. A typical such model is known as preferential attachment [3], in which arriving vertices are probabilistically more likely to form links to existing vertices with high degree; this generative process is known to form networks with power law degree distributions. In parallel with these advances, economists and computer scientists have examined models in which networks are formed due to “rational” or game-theoretic forces rather than probabilistic ones. In such models networks are formed via the self-interested behavior of individuals who benefit from participation in the network [7]. Common examples include models in which a vertex or player can purchase edges, and would like to minimize their average shortest-path distance to all other vertices in the jointly formed network. A player’s overall utility thus balances the desire to purchase few edges yet still be “well-connected” in the network. While stochastic models for network formation define a (possibly complex) distribution over possible networks, the game-theoretic models are typically equated with their (possibly complex) set of (Nash) equilibrium networks. It is also common to analyze the so-called Price of Anarchy [9] in such models, which measures how much worse an equilibrium network can be than some measure of social or centralized optimality [6, 2, 5, 1]. In this paper we introduce and give a rather sharp analysis of a network formation model of the game-theoretic variety, but which was inspired by a striking result of Kleinberg [8] in a stochastic model, and thus forms a bridge between these two lines of thought. In Kleinberg’s stochastic model, the network formation process begins on an underlying substrate network that is highly regular — for instance, a grid in two dimensions. This regular substrate is viewed as a coarse model of “local” connectivity, such as one’s geographically close neighbors. The stochastic process then adds “longdistance” edges to the grid, in an attempt to model connections formed by travel, chance meetings, and so on. Kleinberg’s model assumes that the probability that an edge connecting two vertices whose grid distance is d is proportional to 1/dα for some α > 0 — thus, longer-distance edges are less likely, but will still appear in significant numbers due to the long tail of the generating distribution. An interesting recent empirical study [4] of the migration patterns of dollar bills provides evidence for the validity of such a model. In a theoretical examination of the “six degrees of separation” or “small world” folklore first popularized by the pioneering empirical work of Travers and Milgram [10], Kleinberg proved that only for α = 2 will the resulting network be likely to support the routing of messages on short paths using a natural distributed algorithm. For larger values of α the network simply does not have short paths (small diameter), and for smaller values the diameter is quite small, but the long-distance edges cannot be exploited effectively from only local topological information. Our model and result can be viewed as an “economic” contrast to Kleinberg’s. We again begin with a regular substrate like the grid in two dimensions; these edges are viewed as being provided free of charge to the players or vertices. A vertex u is then free to purchase an edge to a vertex v at grid distance d = δ(u, v) at a cost of dα for α > 0. Thus, longer-distance edges now have higher cost rather than lower probability, but again in a power law form. We analyze the networks that are Nash equilibria of a game in which each player’s payoff is the negative of the sum of their edge purchases and average distances to the other vertices. Our main result is a precise analysis of the diameter (longest shortest path between any pair of vertices) of equilibrium networks in this model. In particular, we show a sharp threshold result: for any α < 2, every pure Nash equilibrium network has only constant diameter (that is, diameter independent of the network size n); and for any α > 2, every pure Nash equilibrium has diameter that grows as a root of the network size (that is, unbounded and growing rapidly with n). In the full version, we show in addition that the threshold phenomenon occurs in mixed Nash equilibrium as well. Despite the outward similarity, there are some important differences between our results and Kleinberg’s. In addition to the proofs being essentially unrelated (since one requires a stochastic and the other an equilibrium analysis), Kleinberg’s result establishes a “knife’s edge” (fast routing only at α exactly 2), while ours is a threshold or phase transition — there is a broad range of α values yielding constant diameter, which sharply crosses over to polynomial growth at α = 2. On the other hand, for α = 2 Kleinberg establishes that in his model not only that there is small (though order log(n)2 rather than constant) diameter, but that short paths can be navigated by a naive greedy routing algorithm. However, simulation results discussed in Section 5 suggest that the equilibrium networks of our model do support fast routing as well. Like Kleinberg’s results, all of ours generalize to higher dimensions as well, with the threshold occurring at α = r in r-dimensional space. The outline of the paper is as follows. In Section 2 we define our game-theoretic model and introduce the required equilibrium concepts. In Section 3 we provide the constant diameter upper bound for r = 2 when α < 2, and also even better constants for α ≤1. Section 4 provides the diameter lower bound for α > 2, while in Section 5 we explore greedy routing in equilibrium networks via simulation. 2 Preliminaries We devote this section to a formal definition of the model. We assume that the players are located on a grid, so each player v is uniquely identified with a grid point (a, b), where 1 ≤a, b ≤√n; thus the total number of players is n. The action of player vi is a vector si ∈{0, 1}n indicating which edges to other players vi has purchased. We let s = s1 × · · · × sn be the joint action of all the players, v1, ..., vn. We also use s−i to denote the joint action of all players except player vi. The Graph. The joint action s defines an undirected graph G(s) as follows. The nodes of G(s) are the players V = {v1, . . . , vn}. An edge (vi, vj) is bought by player vi if and only if si(j) = 1. Let Ei(si) = {(vi, vj) | si(j) = 1} be the set of edges bought by player vi and let E(s) = ∪i∈V Ei(si). The graph induced by s is G(s) = (V, E(s)). Distances and Costs. The grid defines a natural distance δ. Let vi be the player identified with the grid point (a, b) and vi′ with (a′, b′); then their grid distance is δ(vi, vi′) = |a −a′| + |b −b′|. Next we define a natural family of edge cost functions in which the cost of an edge is a function of the grid distance: c(vi, vj) = ½ 0 δ(vi, vj) = 1 aδ(vi, vj)α otherwise where a, α > 0 are parameters of the model. Thus, grid edges are free to the players, and longer edges have a cost polynomial in their grid distance. The Game. We are now ready to define the formal network formation game we shall analyze. The overall cost function ci of player vi is defined as ci(s) = ci(si, s−i) = X e∈Ei(si) c(e) + n X j=1 ∆G(s)(vi, vj) where ∆G(s)(u, v) is the shortest distance between u and v in G(s). Thus, in this game player i wishes to minimize ci(s), which requires balancing edge costs and shortest paths. We emphasize that players benefit from edge purchases by other players, since shortest paths are measured with respect to the overall graph formed by all edges purchased. The graph diameter is defined as maxi,j ∆G(s)(vi, vj). Equilibrium Concepts. A joint action s = s1 × · · · × sn is said to be a Nash equilibrium if for every player i and any alternative action ˆsi ∈{0, 1}n, we have ci(si, s−i) ≤ci(ˆsi, s−i). If s is a Nash equilibrium we say that its corresponding graph G(s) is an equilibrium graph. A joint action s = s1 ×· · ·×sn is said to be link stable if for every player i and any alternative action ˆsi ∈{0, 1}n that differs from si in exactly one coordinate (i.e. one edge), we have ci(si, s−i) ≤ci(ˆsi, s−i). If s is link stable we say that its corresponding graph G(s) is a stable graph. Note that an equilibrium graph implies a link stable graph. Link stability means that the graph is stable under single-edge unilateral deviations (as opposed to Nash, which permits arbitrary unilateral deviations), and is a private case of the pairwise stability given notion given in [7]. The popularity of the link stable notion is due to its simplicity and due to the fact that it is easily computable, as opposed to computing best responses which in similar problems is known to be NP-Hard [6]. Note that as the grid edges are free, the diameter of an equilibrium or link stable graph is bounded by 2√n. 3 Constant Diameter at Equilibrium for α ∈[0, 2] In this section we analyze the diameter of equilibrium networks when α ∈[0, 2]. Our results actually hold under the more general notion of link stability as well. The following is the first of our two main theorems. Theorem 3.1 For any constant ϵ > 0, if α = 2 −ϵ, then there exists a constant c(α) such that for any n, all Nash equilibria or link stable graphs over n players have diameter at most c(α). The proof of this theorem has a number of technical subtleties, so we first provide its intuition, which is illustrated in Figure 1(B). We analyze an equilibrium (or link stable) graph in stages, and focus on the distance of vertices to some focal player u. In each stage we argue that more grid-distant players have an incentive to purchase an edge to u due to the centrality of u in the graph. We start with the following simple fact: for every nodes v and w we have that if δ(v, w) ≤d then ∆G(s)(v, w) ≤d since all grid edges are free. We would like to show that even a stronger property holds — namely, that if δ(v, w) ≤dα then ∆G(s)(w, v) ≤d for some α > 1. Since this property is no longer simply implied by the grid edges, it requires arguing that grid-distant vertices have an incentive to purchase edges to each other. Suppose there are nodes u and v such that ∆G(s)(u, v) ≥d. We first define a “close” graph neighborhood of u, Su = {w|∆G(s)(u, w) ≤ d/3}. Note that for every w ∈Su we have that ∆G(s)(v, w) ≥2d/3. Next we would like to claim that the cardinality of Su is large — thus u’s neighborhood is densely populated. For this we define Sδ u = {w|δ(u, w) ≤d/3} ⊆Su. Using the grid topology (see Figure 1(A)) we see that |Sδ u| is of order d2. u v v’ δ = d3/α δ = d Sδ u The grid center Nodes in distance 1 Nodes in distance 2 Nodes in distance 3 (A) (B) All distances are on the grid Figure 1: (A) The number of nodes at exact distance k is exactly 4k, while the number within k is order k2. (B) Illustration of the main argument of Theorem 3.1. Here u and v are vertices at grid distance d, while u and v′ are at grid distance d′, where d ≤d3/α ≤d′. In the proof we use the size of Sδ u to show that v benefits by purchasing an edge to u and thus must be distance 1 to u in the equilibrium graph; this in turn allows us to argue that v′ wishes to purchase an edge to u as well. Now consider the benefit to v of buying the edge (v, u) (which is not in the graph since ∆G(s)(u, v) ≥d). Since the distance from v to every node in Su is reduced by at least d/3 and the set size is at least order d2, we have that the benefit is of order d3. The fact that this edge was not bought implies that δ(v, u)α = Ω(d3). Therefore, we have that ∆G(s)(u, v) ≥d implies that δ(u, v) = Ω(d3/α), which is the contrapositive of δ(u, v) = O(d3/α) implies ∆G(s)(u, v) ≤d. In other words, for “small enough” values of α (quantified in the full proof), vertices quite distant from u in the grid have an incentive to buy an edge to u, by virtue of the dense population in Sδ u. But this in turn argues that the size of Su is even larger than Sδ u; we then “bootstrap” this argument to show that yet further vertices have an incentive to connect to u, and so on. We now proceed with the formal proof based on this argument. Lemma 3.2 Let G(s) be an equilibrium or link stable graph and u be the grid center. Suppose that for every node v such that δ(u, v) ≤dβ (where β ≥1 and dβ < √n/2), we have that ∆G(s)(u, v) ≤d. Then for every d, and for every node v such that δ(u, v) ≤21/α(d/3)β′, where β′ = 2β+1 α , we have that ∆G(s)(u, v) ≤d. Proof: Let v be a node such that ∆G(s)(u, v) = d and let Su = {w|∆G(s)(u, w) ≤d/3}; observe that d′ = minw∈Su ∆G(s)(w, v) is at least 2d 3 and thus v’s benefit of buying the edge (v, u) is at least d 3|Su|. Next we would like to bound the size of Su from below. Using the topology of the grid, the grid the center node has 4k nodes (See Figure 1(A)) in exact grid distance k (if k ≤n/2), which implies that the center node has 2k2 nodes in grid distance at most k. The set Su contains all nodes such that ∆G(s)(u, w) ≤d/3 by definition which implies by our assumption that it includes all nodes w such that δ(u, w) ≤(d/3)β. Therefore, the size of Su is at least 2(d/3)2β. Now since G(s) is an equilibrium or link stable graph, it means that v would not like to buy the edge (u, v) and thus δ(u, v)α > 2(d/3)2β · d/3 = 2d2β+1 32β+1 Taking the α root, we have that ∆G(s)(u, v) > d implies δ(u, v) ≥21/α d(2β+1)/α 3(2β+1)/α , which is the contrapositive of δ(u, v) ≤21/α d(2β+1)/α 3(2β+1)/α implies ∆G(s)(u, v) ≤d, as required. Equipped with this lemma we can prove rather strong results regarding the case where α = 2−ϵ, for ϵ > 0. In the previous lemma there are two parts in the change of the radius — one is the exponent, which grows, and the second is that instead of having d in the base we have only d/3. The next lemma shows that as long as d is large enough we can ignore the fact that the base decreases from d to d/3 — and thus “amplify” the exponent β in the preceding analysis to a larger exponent (1+ϵ1)β. u v S2 u Figure 2: A graph with diameter of 6. Lemma 3.3 (Amplification Lemma) Let G(s) be an equilibrium or link stable graph. Let α = 2 −ϵ for some ϵ > 0. Let c(α) be a constant determined by subsequent analysis. Suppose that for every d > c(α), for every node v such that δ(u, v) ≤dβ (where β ≥1, dβ < √n/2, and u is the grid center), we have that ∆G(s)(u, v) ≤d. Then for every d > c(α), for every node v such that δ(u, v) ≤dβ′, where β′ = β(1 + ϵ1), we have that ∆G(s)(u, v) ≤d, where ϵ1 = ϵ 2(2−ϵ). Proof: Set c(α) = 3 1+2ϵ1 ϵ1 . By Lemma 3.2 we have that for every d > 3 1+2ϵ1 ϵ1 for every nodes u and v such that δ(u, v) ≤(d/3) ˆ β 2 , where ˆβ = 2β+1 α , we have that ∆G(s)(u, v) ≤d. (d/3) ˆβ 2 = (d/3) 2β+1 α 2 = d(1+ ϵ 2−ϵ )β+1/α 2 · 3(1+ ϵ 2−ϵ )β+1/α > d(1+ ϵ 2−ϵ )β 3(1+ ϵ 2−ϵ )β = d(1+ϵ1)βdϵ1β 3(1+2ϵ1)β ≥d(1+ϵ1)β where both inequalities hold for d ≥c(α) Now we are ready to prove the main theorem of this section. Proof: (Theorem 3.1) Let c′(α) = 3 1+2ϵ1 ϵ1 , where ϵ1 = ϵ 2(2−ϵ) and let u be the grid center. For every node v such that δ(u, v) ≤c′(α), we must have ∆G(s)(u, v) ≤c′(α), since all grid edges are part of G(s). Next we prove that all nodes within grid distance √n/2 are within graph distance c′(α). Since ∆G(s)(u, v) ≤δ(u, v), we can apply Lemma 3.3 to obtain that in radius c′(α) of u in G, are all nodes v such that δ(u, v) ≤c′(α)1+ϵ1. We repeat this argument recursively and obtain after the k-th time, that all nodes v such that δ(u, v) ≤c′(α)(1+ϵ1)k satisfy ∆G(s)(u, v) ≤c′(α). Taking k = log1+ϵ1(√n/2), this implies that there are n/2 nodes within c′(α) from u. Now suppose there exists a node v such that ∆G(s)(u, v) ≥3c′(α). Then by buying the edge (v, u), u’s benefit is at least 2c′(α)n/2 (we know that there are at least n/2 nodes within graph distance of c′(α) from u), while its cost is bounded by √nα < n (since any node grid distance from u is at most √n). Setting c(α) = 6c′(α), we obtain the theorem. 3.1 Even Smaller Constant Diameter at Equilibrium for α ≤1 The constant diameter bound c(α) in Theorem 3.1 blows up as ϵ approaches 0. In this section we show that for α < 1, rather small constant bounds hold. Note that when α ≤1, the most expensive edge cost is bounded by 2a√n, where a is the edge cost constant. We will use this fact to show that every equilibrium graph G(s) has a small constant diameter. Let u, v ∈V , we let TG(s)(u, v) be the set of all nodes that u can reach on a shortest path that includes v. Formally, TG(s)(u, v) = {w | ∆G(s)(u, w) = ∆G(s)(u, v) + ∆G(s)(v, w)}. We start by providing a technical lemma. Lemma 3.4 Let G(s) be an equilibrium or link stable graph. Let u, v ∈V be an arbitrary pair of players. If (u, v) /∈E(s) then | TG(s)(u, v) | ≤ δ(u,v)α ∆G(s)(u,v)−1. Proof: Buying the edge (u, v) (at a cost of δ(u, v)α) makes the distance from u to every w ∈ TG(s)(u, v) shorter by ∆G(s)(u, v) −1. However, s is a Nash equilibrium, thus we know that the edge (u, v) was not bought. This implies that the benefit (∆G(s)(u, v) −1) · |TG(s)(u, v)| from buying the edge is bounded by δ(u, v)α. Lemma 3.5 Let G(s) = (V, E(s)) be an equilibrium graph and let u, v ∈V . • If α < 1 then ∆G(s)(u, v) ≤5. • If α = 1 then ∆G(s)(u, v) ≤2⌈a2 + 4⌉ Proof: We prove for the case that the cost functions is aδ(u, v) and omit the proof for the case where α < 1 which is similar. Assume for contradiction that there exist a node v such that ∆G(s)(u, v) ≥ ⌈a2 + 4⌉+ 1, where u is the grid center node (note that the grid distance from u is bounded by √n). Let S2 u = {w|∆G(s)(u, w) ≤2} be the set of nodes at a distance of at most 2 from u (See Figure 3.1) including u. We first bound the size of S2 u. For every node w ∈S2 u we have ∆G(s)(u, w) ≥⌈a2+4⌉−1. Buying the edge (v, u) makes the distance between v and every w ∈S2 u at most 3. Thus, the benefit from buying the edge (v, u) is at least (⌈a2+4⌉−1−3)|S2 u| = ⌈a2⌉|S2 u|. However, the edge (v, u) /∈E(s) and is not part of the equilibrium graph. Therefore, the benefit from buying it is at most δ(v, u). This implies that ⌈a2⌉|S2 u| ≤δ(v, u) ≤a√n. Now we look on a shortest paths tree rooted at u. There are at most √n/⌈a2⌉−2 nodes at a distance of 2 from u. Each one of them has at most a√n descendants by Lemma 3.4. Since the graph is connected, we get that a√n/⌈a2⌉(a√n −2) + a√n/⌈a2⌉≥n, which is a contradiction. 3.2 The Case α = 2 In this case we obtain neither a constant upper bound nor a polynomial lower bound. We show that for α = 2 the diameter is bounded by O(√n2/√logn), which is bounded by √nc for every constant c (i.e. this bound is very small as well); however it bounds from above any polylogarithmic function. Theorem 3.6 Let the edge cost be c((u, v) = δ(u, v)2, and let G(s) = (V, E(s)) be an equilibrium or link stable graph . Then the graph diameter is bounded by O(√n2/√logn). Proof: We again apply Lemma 3.2 repeatedly, but now with α = 2. After applying it for the first time we have that all nodes which are in grid distance ( d 3)3/2 from u the grid center are within graph distance d. Recall that Su = {w|∆G(s)(u, w) ≤d/3}. Using the same arguments we construct a series of distances xk, such that if δ(u, v) ≤xk then ∆G(s)(u, v) ≤d. We begin with x1 as ( d 3)3/2 and now compute x2: x2 2 > d 3|Su| = d 3(d3/2 33/2 /33/2)2 Solving it we obtain that x2 = d4/2 37/2 . Suppose that after repeating the argument for the kth time we have that xk is at least dak/3bk. Using this bound we derive a lower bound on the size of Su and obtain the following bound for the k + 1 iteration: x2 k+1 > d 3|Su| = d 3(dak/3ak 3bk )2 Thus we obtain that xk+1 = dak+1/2 3bk+ak+1/2 and ak+1 = ak + 1/2 bk+1 = bk + ak + 1/2. Our next goal is to estimate ak and bk. The estimation of ak is straight forward and ak = k/2 + 1. For bk it is enough for our needs to consider an upper bound; since we have bk+1 = bk +k/2+3/2, one can easily verify that k2/2 is an upper bound for k ≥3. Therefore, in order to provide an upper bound on the distance form the center grid u we would like to find an initial d such that ∃k such that dk/2 3k2/2 ≥√n and d is minimal. This clearly holds for d = n2/√logn and k = √logn and can be shown to be the minimal value for which it holds. Now using similar arguments to previous proofs we show that every other node cannot be further away from u. 4 Polynomial Diameter at Equilibrium for α > 2 We now give our second main result, which states that for α > 2 the diameter grows as a root of n and is thus unbounded. Theorem 4.1 For any α, the diameter of any Nash equilibrium or link stable graph is Ω(√n α−2 α+1 ). Before giving the proof we note that this bound implies a trivial lower bound of a constant for α ≤2, and a polynomial for α > 2. For instance, setting α = 3 we obtain a lower bound of Ω(√n1/4). We first provide a simple lemma (stated without proof) regarding the influence of one edge on a connected graph’s diameter. Lemma 4.2 Let G = (V, E) be a connected graph with diameter C, and Let G′ = (V, E S{e}) for any edge e then the diameter of G′ is at least C/2. Proof: (Theorem 4.1) Let D be the diameter of an equilibrium graph, and d be the grid distance of (w, v) the most expensive edge bought in G, note that the most expensive edge corresponds to the longest edge in grid distance terms. First we observe that D ≥2√n/d, as the grid diameter is 2√n and the fastest way to traverse it is through edges of maximal length which is d. By Lemma 4.2 the benefit of buying an edge (u, v) is at most 2D(n −3), since the diameter before was at most 2D and the distance to your two neighbor and yourself has not been changed. Therefore, have δ(u, v)α = dα ≤2D(n −3). Next we use the two simple bounds dα ≤ 2Dn (1) 2√n/d ≤ D (2) Substituting the bound of d in Equation 2 into equation 1 we obtain that (2√n/D)α ≤ 2Dn (2√n)α 2n ≤ D1+α c(√n α−2 1+α ) ≤ D as required. 5 Simulations The analyses we have considered so far examine static properties of equilibrium and link stable graphs, and as such do not shed light on natural dynamics that might lead to them. In this section we briefly describe dynamical simulations on a 100 × 100 grid (which has 108 possible edges). At each iteration a random vertex u is selected. With probability 1/2, an existing edge of u (grid or longdistance) is selected at random, and we compute whether (given the current global configuration of the graph), u would prefer not to purchase this edge, in which case it is deleted. With probability 1/2, we instead select a second random vertex v, and compute whether (again given the global graph) u would like to purchase the edge (u, v), in which case it is added. Note that if this dynamic converges, it is to a link stable graph and not necessarily a Nash equilibrium, since only single-edge deviations are considered. The left panel of Figure 3 shows the worst-case diameter as a function of the number of iterations, and demonstrates the qualitative validity of our theory for this dynamic. For α = 1, 2 the diameter quickly falls to a rather small value (less than 10). The asymptotes for α = 3, 4 are considerably higher. The right panel revisits the question that was the primary interest of Kleinberg’s work [8], namely the efficiency of “naive” or greedy navigation or routing. If we wish to route a message from the grid center to a randomly chosen destination, and the message is always forwarded from its current vertex to the graph neighbor whose grid address is closest to the destination, how long will it take? Kleinberg was the first to observe and explain the fact that the mere existence of short paths (small diameter) may not be sufficient for such greedy local routing algorithms to find the short paths. In the right panel of Figure 3 we show that the routing efficiency does in fact seem to echo our theoretical results — for the aforementioned dynamic, very short paths (only slightly higher than the diameter) are found for small α, much longer paths for larger α. 0 5 10 15 x 10 5 0 10 20 30 40 50 60 Iterations Average distance Dynamics α = 1 α = 2 α = 3 α = 4 0 5 10 15 x 10 5 0 10 20 30 40 50 60 Iterations Average greedy routing distance Greedy routing and dynamics α = 1 α = 2 α = 3 α = 4 Figure 3: Left panel: graph diameter vs. iterations for a simple dynamic. Right panel: greedy routing efficiency vs. iterations for the same dynamic. 6 Extensions We conclude by briefly mentioning generalizations of our theoretical results that we omit detailing. All of the results carry over higher dimensions, where the threshold phenomenon takes place at α equaling the grid dimension. We can also easily handle the case where the grid wraps around rather than having boundaries. We can also generalize to the pairwise link stability notion of [7], in which that the cost of each link is shared between the end points of the edge. Finally, we can construct network that are stable. References [1] S. Albers, S. Eilts, E. Even-Dar, Y. Mansour, and L. Roditty. On Nash equilibria for a network creation game. In Proc. of SODA, pages 89–98, 2006. [2] E. Anshelevich, A. Dasgupta, J. Kleinberg, E. Tardos, T. Wexler, and T. Roughgarden. The price of stability for network design with fair cost allocation. In Proc. of FOCS, pages 295–304, 2004. [3] Albert-L´aszl´o Barab´asi and R. Albert. Emergence of scaling in random networks. Science, 286:509–512, 1999. [4] D. Brockmann, L. Hufnagel, and T. Geisel. The scaling laws of human travel. Nature, 439:462–465, 2005. [5] J. Corbo and D.C. Parkes. The price of selfish behavior in bilateral network formation. In Proc. of PODC, pages 99–107, 2005. [6] A. Fabrikant, A. Luthra, E. Maneva, C. ˜H. Papadimitriou, and S. Shenker. On a network creation game. In Proc. of PODC, pages 347–351, 2003. [7] M. Jackson. A survey of models of network formation:stability and efficiency. In G. Demange and M. Wooders, editors, Group Formation in Economics: Networks, Clubs and Coalitions. 2003. [8] Jon Klienberg. Navigation in a small world. Nature, 406:845, 2000. [9] E. Koutsoupias and C. H. Papadimitriou. Worst-case equilibria. In Proceedings of 16th STACS, pages 404–413, 1999. [10] J. Travers and S. Miligram. An expiermental study of small world problem. Sociometry, 32:425, 1969. [11] Duncan J. Watts. Six Degrees: The Science of a Connected Age. W. W. Norton, Cambridge, Mass., 2003.
2006
81
3,105
iLSTD: Eligibility Traces and Convergence Analysis Alborz Geramifard Michael Bowling Martin Zinkevich Richard S. Sutton Department of Computing Science University of Alberta Edmonton, Alberta {alborz,bowling,maz,sutton}@cs.ualberta.ca Abstract We present new theoretical and empirical results with the iLSTD algorithm for policy evaluation in reinforcement learning with linear function approximation. iLSTD is an incremental method for achieving results similar to LSTD, the dataefficient, least-squares version of temporal difference learning, without incurring the full cost of the LSTD computation. LSTD is O(n2), where n is the number of parameters in the linear function approximator, while iLSTD is O(n). In this paper, we generalize the previous iLSTD algorithm and present three new results: (1) the first convergence proof for an iLSTD algorithm; (2) an extension to incorporate eligibility traces without changing the asymptotic computational complexity; and (3) the first empirical results with an iLSTD algorithm for a problem (mountain car) with feature vectors large enough (n = 10, 000) to show substantial computational advantages over LSTD. 1 Introduction A key part of many reinforcement learning algorithms is a policy evaluation process, in which the value function of a policy is estimated online from data. In this paper, we consider the problem of policy evaluation where the value function estimate is a linear function of state features and is updated after each time step. Temporal difference (TD) learning is a common approach to this problem [Sutton, 1988]. The TD algorithm updates its value-function estimate based on the observed TD error on each time step. The TD update takes only O(n) computation per time step, where n is the number of features. However, because conventional TD methods do not make any later use of the time step’s data, they may require a great deal of data to compute an accurate estimate. More recently, LSTD [Bradtke and Barto, 1996] and its extension LSTD(λ) [Boyan, 2002] were introduced as alternatives. Rather than making updates on each step to improve the estimate, these methods maintain compact summaries of all observed state transitions and rewards and solve for the value function which has zero expected TD error over the observed data. However, although LSTD and LSTD(λ) make more efficient use of the data, they require O(n2) computation per time step, which is often impractical for the large feature sets needed in many applications. Hence, practitioners are often faced with the dilemma of having to chose between excessive computational expense and excessive data expense. Recently, Geramifard and colleagues [2006] introduced an incremental least-squares TD algorithm, iLSTD, as a compromise between the computational burden of LSTD and the relative data inefficiency of TD. The algorithm focuses on the common situation of large feature sets where only a small number of features are non-zero on any given time step. iLSTD’s per-time-step computational complexity in this case is only O(n). In empirical results on a simple problem, iLSTD exhibited a rate of learning similar to that of LSTD. In this paper, we substantially extend the iLSTD algorithm, generalizing it in two key ways. First, we include the use of eligibility traces, defining iLSTD(λ) consistent with the family of TD(λ) and LSTD(λ) algorithms. We show that, under the iLSTD assumptions, the per-time-step computational complexity of this algorithm remains linear in the number of features. Second, we generalize the feature selection mechanism. We prove that for a general class of selection mechanisms, iLSTD(λ) converges to the same solution as TD(λ) and LSTD(λ), for all 0 ≤λ ≤1. 2 Background Reinforcement learning is an approach to finding optimal policies in sequential decision making problems with an unknown environment [e.g., see Sutton and Barto, 1998]. We focus on the class of environments known as Markov decision processes (MDPs). An MDP is a tuple, (S, A, Pa ss′, Ra ss′, γ), where S is a set of states, A is a set of actions, Pa ss′ is the probability of reaching state s′ after taking action a in state s, and Ra ss′ is the reward received when that transition occurs, and γ ∈[0, 1] is a discount rate parameter. A trajectory of experience is a sequence s0, a0, r1, s1, a1, r2, s2, . . ., where the agent in s1 takes action a1 and receives reward r2 while transitioning to s2 before taking a2, etc. Given a policy, one often wants to estimate the policy’s state-value function, or expected sum of discounted future rewards: V π(s) = E " ∞ X t=1 γt−1rt s0 = s, π # . In particular, we are interested in approximating V π using a linear function approximator. Let φ : S →ℜn, be some features of the state space. Linear value functions are of the form Vθ(s) = φ(s)T θ, where θ ∈ℜn are the parameters of the value function. In this work we will exclusively consider sparse feature representations: for all states s the number of non-zero features in φ(s) is no more than k ≪n. Sparse feature representations are quite common as a generic approach to handling non-linearity [e.g., Stone et al., 2005].1 2.1 Temporal Difference Learning TD(λ) is the traditional approach to policy evaluation [see Sutton and Barto, 1998]. It is based on the computation of a λ-return, Rλ t (V ), at each time step: Rλ t (V ) = (1 −λ) ∞ X k=1 λk−1 γkV (st+k) + k X i=1 γi−1rt+i ! . Note that the λ-return is a weighted sum of k-step returns, each of which looks ahead k steps summing the discounted rewards as well as the estimated value of the resulting state. The λ-return forms the basis of the update to the value function parameters: θt+1 = θt + αtφ(st) (Rt(Vθt) −Vθt(st)) , where αt is the learning rate. This “forward view” requires a complete trajectory to compute the λ-return and update the parameters. The “backward view” is a more efficient implementation that depends only on one-step returns and an eligibility trace vector: θt+1 = θt + αtut(θt) ut(θ) = zt (rt+1 + γVθ(st+1) −Vθ(st)) zt = λγzt+1 + φ(st), where zt is the eligibility trace and ut(θ) is the TD update. Notice that TD(λ) requires only a constant number of vector operations and so is O(n) per time step. In the special case where λ = 0 and the feature representation is sparse, this complexity can be reduced to O(k). In addition, TD(λ) is guaranteed to converge [Tsitsiklis and Van Roy, 1997]. 1Throughout this paper we will use non-bolded symbols to refer to scalars (e.g., γ and αt), bold-faced lower-case symbols to refer to vectors (e.g., θ and bt), and bold-faced upper-case symbols for matrices (e.g., At). 2.2 Least-Squares TD Least-squares TD (LSTD) was first introduced by Bradtke and Barto [1996] and later extended with λ-returns by Boyan [2002]. LSTD(λ) can be viewed as immediately solving for the value function parameters which would result in the sum of TD updates over the observed trajectory being zero. Let µt(θ) be the sum of the TD updates through time t. If we let φt = φ(st) then, µt(θ) = t X i=1 ui(θ) = t X i=1 zi ri+1 + γVθ(si+1) −Vθ(si)  = t X i=1 zi  ri+1 + γφT i+1θ −φT i θ  = t X i=1 ziri+1 | {z } bt − t X i=1 zi(φi −γφi+1)T | {z } At θ = bt −Atθ. (1) Since we want to choose parameters such that the sum of TD updates is zero, we set Equation 1 to zero and solve for the new parameter vector, θt+1 = A−1 t bt. The online version of LSTD(λ) incorporates each observed reward and state transition into the b vector and the A matrix and then solves for a new θ. Notice that, once b and A are updated, the experience tuple can be forgotten without losing any information. Because A only changes by a small amount on each time step, A−1 can also be maintained incrementally. The computation requirement is O(n2) per time step. Like TD(λ), LSTD(λ) is guaranteed to converge [Boyan, 2002]. 2.3 iLSTD iLSTD was recently introduced to provide a balance between LSTD’s data efficiency and TD’s time efficiency for λ = 0 when the feature representation is sparse [Geramifard et al., 2006]. The basic idea is to maintain the same A matrix and b vector as LSTD, but to only incrementally solve for θ. The update to θ requires some care as the sum TD update itself would require O(n2). iLSTD instead updates only single dimensions of θ, each of which requires O(n). By updating m parameters of θ, which is a parameter that can be varied to trade off data and computational efficiency, iLSTD requires O(mn + k2) per time step, which is linear in n. The result is that iLSTD can scale to much larger feature spaces than LSTD, while still retaining much of its data efficiency. Although the original formulation of iLSTD had no proof of convergence, it was shown in synthetic domains to perform nearly as well as LSTD with dramatically less computation. In the remainder of the paper, we describe a generalization, iLSTD(λ), of the original algorithm to handle λ > 0. By also generalizing the mechanism used to select the feature parameters to update, we additionally prove sufficient conditions for convergence. 3 The New Algorithm with Eligibility Traces The iLSTD(λ) algorithm is shown in Algorithm 1. The new algorithm is a generalization of the original iLSTD algorithm in two key ways. First, it uses eligibility traces (z) to handle λ > 0. Line 5 updates z, and lines 5–9 incrementally compute the same At, bt, and µt as described in Equation 1. Second, the dimension selection mechanism has been relaxed. Any feature selection mechanism can be employed in line 11 to select a dimension of the sum TD update vector (µ).2 Line 12 will then take a step in that dimension, and line 13 updates the µ vector accordingly. The original iLSTD algorithm can be recovered by simply setting λ to zero and selecting features according to the dimension of µ with maximal magnitude. We now examine iLSTD(λ)’s computational complexity. 2The choice of this mechanism will determine the convergence properties of the algorithm, as discussed in the next section. Algorithm 1: iLSTD(λ) Complexity 0 s ←s0, z ←0, A ←0, µ ←0, t ←0 1 Initialize θ arbitrarily 2 repeat 3 Take action according to π and observe r, s′ 4 t ←t + 1 5 z ←γλz + φ(s) O(n) 6 ∆b ←zr O(n) 7 ∆A ←z(φ(s) −γφ(s′))T O(kn) 8 A ←A + ∆A O(kn) 9 µ ←µ + ∆b −(∆A)θ O(kn) 10 for i from 1 to m do 11 j ←choose an index of µ using some feature selection mechanism 12 θj ←θj + αµj O(1) 13 µ ←µ −αµjAej O(n) 14 end for 15 s ←s′ 16 end repeat Theorem 1 Assume that the feature selection mechanism takes O(n) computation. If there are n features and, for any given state s, φ(s) has at most k non-zero elements, then the iLSTD(λ) algorithm requires O((m + k)n) computation per time step. Proof Outside of the inner loop, lines 7–9 are the most computationally expensive steps of iLSTD(λ). Since we assumed that each feature vector has at most k non-zero elements, and the z vector can have up to n non-zero elements, the z (φ(s) −γφ(s′))T matrix (line 7) has at most 2kn non-zero elements. This leads to O(nk) complexity for the outside of the loop. Inside, the complexity remains unchanged from iLSTD with the most expensive lines being 11 and 13. Because µ and A do not have any specific structure, the inside loop time3 is O(n). Thus, the final bound for the algorithm’s per-time-step computational complexity is O((m + k)n). □ 4 Convergence We now consider the convergence properties of iLSTD(λ). Our analysis follows that of Bertsekas and Tsitsiklis [1996] very closely to establish that iLSTD(λ) converges to the same solution that TD(λ) does. However, whereas in their analysis they considered Ct and dt that had expectations that converged quickly, we consider Ct and dt that may converge more slowly, but in value instead of expectation. In order to establish our result, we consider the theoretical model where for all t, yt ∈Rn,dt ∈Rn, Rt, Ct ∈Rn×n, βt ∈R, and: yt+1 = yt + βt(Rt)(Ctyt + dt). (2) On every round, Ct and dt are selected first, followed by Rt. Define Ft to be the state of the algorithm on round t before Rt is selected. Ct and dt are sequences of random variables. In order to prove convergence of yt, we assume that there is a C∗, d∗, v, µ > 0, and M such that: A1. C∗is negative definite, A2. Ct converges to C∗with probability 1, A3. dt converges to d∗with probability 1, A4. E[Rt|Ft] = I, and ∥Rt∥≤M, A5. limT →∞ PT t=1 βt = ∞, and A6. βt < vt−µ. 3Note that Aei selects the ith column of A and so does not require the usual quadratic time for multiplying a vector by a square matrix. Theorem 2 Given the above assumptions, yt converges to −(C∗)−1d∗with probability 1. The proof of this theorem is included in the additional material and will be made available as a companion technical report. Now we can map iLSTD(λ) on to this mathematical model: 1. yt = θt, 2. βt = tα/n, 3. Ct = −At/t, 4. dt = bt/t, and 5. Rt is a matrix, where there is an n on the diagonal in position (kt, kt) (where kt is uniform random over the set {1,..., n} and i.i.d.) and zeroes everywhere else. The final assumption defines the simplest possible feature selection mechanism sufficient for convergence, viz., uniform random selection of features. Theorem 3 If the Markov decision process is finite, iLSTD(λ) with a uniform random feature selection mechanism converges to the same result as TD(λ). Although this result is for uniform random selection, note that Theorem 2 outlines a broad range of possible mechanisms sufficient for convergence. However, the greedy selection of the original iLSTD algorithm does not meet these conditions, and so has no guarantee of convergence. As we will see in the next section, though, greedy selection performs quite well despite this lack of asymptotic guarantee. In summary, finding a good feature selection mechanism remains an open research question. As a final aside, one can go beyond iLSTD(λ) and consider the case where Rt = I, i.e., we take a step in all directions at once on every round. This does not correspond to any feature selection mechanism and in fact requires O(n2) computation. However, we can examine this algorithm’s rate of convergence. In particular we find it converges linearly fast to LSTD(λ). Theorem 4 If Ct is negative definite, for some β dependent upon Ct, if Rt = I, then there exists an ζ ∈(0, 1) such that for all yt, if yt+1 = yt + β(Ctyt + dt), then yt+1 + (Ct)−1dt < ζ yt + (Ct)−1dt . This may explain why iLSTD(λ)’s performance, despite only updating a single dimension, approaches LSTD(λ) so quickly in the experimental results in the next section. 5 Empirical Results We now examine the empirical performance of iLSTD(λ). We first consider the simple problem introduced by Boyan [2002] and on which the original iLSTD was evaluated. We then explore the larger mountain car problem with a tile coding function approximator. In both problems, we compare TD(λ), LSTD(λ), and two variants of iLSTD(λ). We evaluate both the random feature selection mechanism (“iLSTD-random”), which is guaranteed to converge,4 as well as the original iLSTD feature selection rule (“iLSTD-greedy”), which is not. In both cases, the number of dimensions picked per iteration is m = 1. The step size (α) used for both iLSTD(λ) and TD(λ) was of the same form as in Boyan’s experiments, with a slightly faster decay rate in order to make it consistent with the proof’s assumption. αt = α0 N0 + 1 N0 + Episode#1.1 For the TD(λ) and iLSTD(λ) algorithms, the best α0 and N0 have been selected through experimental search of the sets of α0 ∈{0.01, 0.1, 1} and N0 ∈{100, 100, 106} for each domain and λ value, which is also consistent with Boyan’s original experiments. 4When selecting features randomly we exclude dimensions with zero sum TD update. To be consistent with the assumptions of Theorem 2, we compensate by multiplying the learning rate αt by the fraction of features that are non-zero at time t. -3 0 -2 -3 -3 -3 -3 -3 -3 -3 -3 -3 1 0 2 3 4 5 13 1 0 0 0 0 0 .25 .75 0 0 0 1 0 0 0 0 0 0 .5 .5 0 0 .75 .25 0 0 1 0 (a) Goal (b) Figure 1: The two experimental domains: (a) Boyan’s chain example and (b) mountain car. 0 0.5 0.7 0.8 0.9 1 10 −2 10 −1 10 0  RMS error of V(s) over all states TD iLSTD−Random iLSTD−Greedy LSTD Figure 2: Performance of various algorithms in Boyan’s chain problem with 6 different lambda values. Each line represents the averaged error over last 100 episodes after 100, 200, and 1000 episodes respectively. Results are also averaged over 30 trials. 5.1 Boyan Chain Problem The first domain we consider is the Boyan chain problem. Figure 1(a) shows the Markov chain together with the feature vectors corresponding to each state. This is an episodic task where the discount factor γ is one. The chain starts in state 13 and finishes in state 0. For all states s > 2, there exists an equal probability of ending up in (s −1) and (s −2). The reward is -3 for all transitions except from state 2 to 1 and state 1 to 0, where the rewards are -2 and 0, respectively. Figure 2 shows the comparative results. The horizontal axis corresponds to different λ values, while the vertical axis illustrates the RMS error in a log scale averaged over all states uniformly. Note that in this domain, the optimum solution is in the space spanned by the feature vectors: θ∗= (−24, −16, −8, 0)T . Each line shows the averaged error over last 100 episodes after 100, 200, and 1000 episodes over the same set of observed trajectories based on 30 trials. As expected, LSTD(λ) requires the least amount of data, obtaining a low average error after only 100 episodes. With only 200 episodes, though, the iLSTD(λ) methods are performing as well as LSTD(λ), and dramatically outperforming TD(λ). Finally, notice that iLSTD-Greedy(λ) despite its lack of asymptotic guarantee, is actually performing slightly better than iLSTD-Random(λ) for all cases of λ. Although λ did not play a significant role for LSTD(λ) which matches the observation of Boyan [Boyan, 1999], λ > 0 does show an improvement in performance for the iLSTD(λ) methods. Table 1 shows the total averaged per-step CPU time for each method. For all methods sparse matrix optimizations were utilized and LSTD used the efficient incremental inverse implementation. Although TD(λ) is the fastest method, the overall difference between the timings in this domain is very small, which is due to the small number of features and a small ratio n k . In the next domain, we illustrate the effect of a larger and more interesting feature space where this ratio is larger. CPU time/step (msec) Algorithm Boyan’s chain Mountain car TD(λ) 0.305±7.0e-4 5.35±3.5e-3 iLSTD(λ) 0.370±7.0e-4 9.80±2.8e-1 LSTD(λ) 0.367±7.0e-4 253.42 Table 1: The averaged CPU time per step of the algorithms used in Boyan’s chain and mountain car problems. 0 200 400 600 800 1000 10 2 10 3 10 4 10 5 Episode Loss Function ! = 0 TD iLSTD-Random iLSTD-Greedy LSTD Small Medium Large Easy Hard 10 −2 10 −1 10 0 10 1 10 2 10 3 10 4 10 5 10 6 10 7 10 8 Boyan Chain Mountain Car Error Measure Random Greedy !−Greedy Boltzmann 0 200 400 600 800 1000 10 2 10 3 10 4 10 5 Episode Loss Function ! = 0 TD iLSTD-Random iLSTD-Greedy LSTD Small Medium Large Easy Hard 10 −2 10 −1 10 0 10 1 10 2 10 3 10 4 10 5 10 6 10 7 10 8 Boyan Chain Mountain Car Error Measure Random Greedy !−Greedy Boltzmann Small Medium Large Easy Hard 10 −2 10 −1 10 0 10 1 10 2 10 3 10 4 10 5 10 6 10 7 10 8 Boyan Chain Mountain Car Error Measure Random Greedy !−Greedy Boltzmann Small Medium Large Easy Hard 10 −2 10 −1 10 0 10 1 10 2 10 3 10 4 10 5 10 6 10 7 10 8 Boyan Chain Mountain Car Error Measure Random Greedy !−Greedy Boltzmann 0 200 400 600 800 1000 10 3 10 4 10 5 Episode Loss Function ! = 0.9 TD iLSTD-Random LSTD Small Medium Large Easy Hard 10 −2 10 −1 10 0 10 1 10 2 10 3 10 4 10 5 10 6 10 7 10 8 Boyan Chain Mountain Car Error Measure Random Greedy !−Greedy Boltzmann Small Medium Large Easy Hard 10 −2 10 −1 10 0 10 1 10 2 10 3 10 4 10 5 10 6 10 7 10 8 Boyan Chain Mountain Car Error Measure Random Greedy !−Greedy Boltzmann Small Medium Large Easy Hard 10 −2 10 −1 10 0 10 1 10 2 10 3 10 4 10 5 10 6 10 7 10 8 Boyan Chain Mountain Car Error Measure Random Greedy !−Greedy Boltzmann 0 200 400 600 800 1000 10 2 10 3 10 4 10 5 Episode Loss Function ! = 0 TD iLSTD-Random iLSTD-Greedy LSTD Figure 3: Performance of various methods in mountain car problem with two different lambda values. LSTD was run only every 100 episodes. Results are averaged over 30 trials. 5.2 Mountain Car Our second test-bed is the mountain car domain [e.g., see Sutton and Barto, 1998]. Illustrated in Figure 1(b), the episodic task for the car is to reach the goal state. Possible actions are accelerate forward, accelerate backward, and coast. The observation is a pair of continuous values: position and velocity. The initial value of the state was -1 for position and 0 for velocity. Further details about the mountain car problem are available online [RL Library, 2006]. As we are focusing on policy evaluation, the policy was fixed for the car to always accelerate in the direction of its current velocity, although the environment is stochastic and the chosen action is replaced with a random one with 10% probability. Tile Coding [e.g., see Sutton, 1996] was selected as our linear function approximator. We used ten tilings (k = 10) over the combination of the two parameter sets and hashed the tilings into 10,000 features (n = 10, 000). The rest of the settings were identical to those in the Boyan chain domain. Figure 3 shows the results of the different methods on this problem with two different λ values. The horizontal axis shows the number of episodes, while the vertical axis represents our loss function in log scale. The loss we used was ||bλ −Aλθ||2, where Aλ and bλ were computed for each λ from 200,000 episodes of interaction with the environment. With λ = 0, both iLSTD(λ) methods performed considerably better than TD(λ) in terms of data efficiency. The iLSTD(λ) methods even reached a level competitive with LSTD(λ) after 600 episodes. For λ = 0.9, it proved to be difficult to find stable learning rate parameters for iLSTD-Greedy(λ). While some iterations performed competitively with LSTD(λ), others performed extremely poorly with little show of convergence. Hence, we did not include the performance line in the figure. This fact may suggest that the greedy feature selection mechanism does not converge, or it may simply be more sensitive to the learning rate. Finally, notice that the plotted loss depends upon λ, and so the two graphs cannot be directly compared. In this environment the n k is relatively large ( 10,000 10 = 1000), which translates into a dramatic improvement of iLSTD(λ) over LSTD as can be see in Table 1. Again sparse matrix optimizations were utilized and LSTD(λ) used the efficient incremental ivnerse implementation. The computational demands of LSTD(λ) can easily prohibit its application in domains with a large feature space. When the feature representation is sparse, though, iLSTD(λ) can still achieve results competitive with LSTD(λ) using computation more on par with the time efficient TD(λ). 6 Conclusion In this paper, we extended the previous iLSTD algorithm by incorporating eligibility traces without increasing the asymptotic per time-step complexity. This extension resulted in improvements in performance in both the Boyan chain and mountain car domains. We also relaxed the dimension selection mechanism of the algorithm and presented sufficient conditions on the mechanism under which iLSTD(λ) is guaranteed to converge. Our empirical results showed that while LSTD(λ) can be impractical in on-line learning tasks with a large number of features, iLSTD(λ) still scales well while having similar performance to LSTD. This work opens up a number of interesting directions for future study. Our results have focused on two very simple feature selection mechanisms: random and greedy. Although the greedy mechanism does not meet our sufficient conditions for convergence, it actually performed slightly better on the examined domains than the theoretically guaranteed random selection. It would be interesting to perform a thorough exploration of possible mechanisms to find a mechanism with both good empirical performance while satisfying our sufficient conditions for convergence. In addition, it would be interesting to apply iLSTD(λ) in even more challenging environments where the large number of features has completely prevented the least-squares approach, such as in simulated soccer keepaway [Stone et al., 2005]. References [Bertsekas and Tsitsiklis, 1996] Dmitri P. Bertsekas and John N. Tsitsiklis. Neuro-Dynamic Programming. Athena Scientific, 1996. [Boyan, 1999] Justin A. Boyan. Least-squares temporal difference learning. In Proceedings of the Sixteenth International Conference on Machine Learning, pages 49–56. Morgan Kaufmann, San Francisco, CA, 1999. [Boyan, 2002] Justin A. Boyan. Technical update: Least-squares temporal difference learning. Machine Learning, 49:233–246, 2002. [Bradtke and Barto, 1996] S. Bradtke and A. Barto. Linear least-squares algorithms for temporal difference learning. Machine Learning, 22:33–57, 1996. [Geramifard et al., 2006] Alborz Geramifard, Michael Bowling, and Richard S. Sutton. Incremental least-squares temporal difference learning. In Proceedings of the Twenty-First National Conference on Artificial Intelligence (AAAI), pages 356–361. AAAI Press, 2006. [RL Library, 2006] RL Library. The University of Alberta reinforcement learning library. http: //rlai.cs.ualberta.ca/RLR/environment.html, 2006. [Stone et al., 2005] Peter Stone, Richard S. Sutton, and Gregory Kuhlmann. Reinforcement learning for robocup soccer keepaway. International Society for Adaptive Behavior, 13(3):165–188, 2005. [Sutton and Barto, 1998] R. S. Sutton and A. G. Barto. Reinforcement Learning: An Introduction. MIT Press, 1998. [Sutton, 1988] Richard S. Sutton. Learning to predict by the methods of temporal differences. Machine Learning, 3:9–44, 1988. [Sutton, 1996] Richard S. Sutton. Generalization in reinforcement learning: Successful examples using sparse coarse coding. In Advances in Neural Information Processing Systems 8, pages 1038–1044. The MIT Press, 1996. [Tsitsiklis and Van Roy, 1997] John N. Tsitsiklis and Benjamin Van Roy. An analysis of temporaldifference learning with function approximation. IEEE Transactions on Automatic Control, 42(5):674–690, 1997.
2006
82
3,106
Sparse Kernel Orthonormalized PLS for feature extraction in large data sets Jer´onimo Arenas-Garc´ıa, Kaare Brandt Petersen and Lars Kai Hansen Informatics and Mathematical Modelling Technical University of Denmark DK-2800 Kongens Lyngby, Denmark {jag,kbp,lkh}@imm.dtu.dk Abstract In this paper we are presenting a novel multivariate analysis method. Our scheme is based on a novel kernel orthonormalized partial least squares (PLS) variant for feature extraction, imposing sparsity constrains in the solution to improve scalability. The algorithm is tested on a benchmark of UCI data sets, and on the analysis of integrated short-time music features for genre prediction. The upshot is that the method has strong expressive power even with rather few features, is clearly outperforming the ordinary kernel PLS, and therefore is an appealing method for feature extraction of labelled data. 1 Introduction Partial Least Squares (PLS) is, in its general form, a family of techniques for analyzing relations between data sets by latent variables. It is a basic assumption that the information is overrepresented in the data sets, and that these therefore can be reduced in dimensionality by the latent variables. Exactly how these are found and how the data is projected varies within the approach, but they are often maximizing the covariance of two projected expressions. One of the appealing properties of PLS, which has made it popular, is that it can handle data sets with more dimensions than samples and massive collinearity between the variables. The basic PLS algorithm considers two data sets X and Y, where samples are arranged in rows, and consists on finding latent variables which account for the covariance XT Y between the data sets. This is done either as an iterative procedure or as an eigenvalue problem. Given the latent variables, the data sets X and Y are then transformed in a process which subtracts the information contained in the latent variables. This process, which is often referred to as deflation, can be done in a number of ways and these different approaches are defining the many variants of PLS. Among the many variants of PLS, the one that has become particularly popular is the algorithm presented in [17] and studied in further details in [3]. The algorithm described in these, will in this paper be referred to as PLS2, and is based on the following two assumptions: First, that the latent variables of X are good predictors of Y and, second, that there is a linear relation between the latent variables of X and of Y. This linear relation is implying a certain deflation scheme, where the latent variable of X is used to deflate also the Y data set. Several other variants of PLS exist such as “PLS Mode A” [16], Orthonormalized PLS [18] and PLS-SB [11]; see [1] for a discussion of the early history of PLS, [15] for a more recent and technical description, and [9] and for a very well-written contemporary overview. No matter how refined the various early developments of PLS become, they are still linear projections. Therefore, in the cases where the variables of the input and output spaces are not linearly related, the challenge of the data is still poorly handled. To counter this, different non-linear versions of PLS have been developed, and these can be categorized on two fundamentally different approaches: 1) The modified PLS2 variants in which the linear relation between the latent variables is substituted by a non-linear relation; and 2) the kernel variants in which the PLS algorithm has been reformulated to fit a kernel approach. In the second approach, the input data is mapped by a non-linear function into a high-dimensional space in which ordinary linear PLS is performed on the transformed data. A central property of this kernel approach is, as always, the exploitation of the kernel trick, i.e., that only the inner products in the transformed space are necessary and not the explicit non-linear mapping. It was Rosipal and Trejo who first presented a non-linear kernel variant of PLS in [7]. In that paper, the kernel matrix and the Y matrix are deflated in the same way, and the PLS variant is thus more in line with the PLS2 variant than with the traditional algorithm from 1975 (PLS Mode A). The non-linear kernel PLS by Rosipal and Trejo is in this paper referred to as simply KPLS2, although many details could advocate more detailed nomenclator. The appealing property of kernel algorithms in general is that one can obtain the flexibility of nonlinear expressions while still solving only linear equations. The downside is that for a data set of l samples, the kernel matrices to be handled are l × l, which, even for a moderate number of samples, quickly becomes a problem with respect to both memory and computing time. This problem is present not only in the training phase, but also when predicting the output given some large training data set: evaluating thousands of kernels for every new input vector is, in most applications, not acceptable. Furthermore, there is, for these so-called dense solutions in multivariate analysis, also the problem of overfitting. To counter the impractical dense solutions in kernel PLS, a few solutions have been proposed: In [2], the feature mapping directly is approximated following the Nystrom method, and in [6] the underlying cost function is modified to impose sparsity. In this paper, we introduce a novel kernel PLS variant called Reduced Kernel Orthonormalized Partial Least Squares (rKOPLS) for large scale feature extraction. It consists of two parts: A novel orthonormalized variant of kernel PLS called KOPLS, and a sparse approximation for large scale data sets. Compared to related approaches like [8], the KOPLS is transforming only the input data, and is keeping them orthonormal at two stages: the images in feature space and the projections in feature space. The sparse approximation is along the lines of [4], that is, we are representing the reduced kernel matrix as an outer product of a reduced and a full feature mapping, and thus keeping more information than changing the cost function or doing simple subsampling. Since rKOPLS is specially designed to handle large data sets, our experimental work will focus on such data sets, paying extra attention to the prediction of music genre, an application that typically involves large amount of high dimensional data. The abilities of our algorithm to discover non-linear relations between input and output data will be illustrated, as will be the relevance of the derived features compared to those provided by an existing kernel PLS method. The paper is structured as follows: In Section 2, the novel kernel orthonormalized PLS variant is introduced, and in Section 3 the sparse approximation is presented. Section 4 shows numerical results on UCI benchmark data sets, and on the above mentioned music application. In the last section, the main results are summarized and discussed. 2 Kernel Orthonormalized Partial Least Squares Consider we are given a set of pairs {φ(xi), yi}l i=1, with xi ∈ℜN, yi ∈ℜM, and φ(x) : ℜN →F a function that maps the input data into some Reproducing Kernel Hilbert Space (RKHS), usually referred to as feature space, of very large or even infinite dimension. Let us also introduce the matrices Φ = [φ(x1), . . . , φ(xl)]T and Y = [y1, . . . , yl]T , and denote by Φ′ = ΦU and Y′ = YV two matrices, each one containing np projections of the original input and output data, U and V being the projection matrices of sizes dim(F) × np and M × np, respectively. The objective of (kernel) Multivariate Analysis (MVA) algorithms is to search for projection matrices such that the projected input and output data are maximally aligned. For instance, Kernel Canonical Correlation Analysis (KCCA) finds the projections that maximize the correlation between the projected data, while Kernel Partial Least Squares (KPLS) provides the directions for maximum covariance: KPLS : maximize: Tr{UT ˜Φ T ˜YV} subject to: UT U = VT V = I (1) where ˜Φ and ˜Y are centered versions of Φ and Y, respectively, I is the identity matrix of size np, and the T superscript denotes matrix or vector transposition. In this paper, we propose a kernel extension of a different MVA method, namely, the Orthonormalized Partial Least Squares [18]. Our proposed kernel variant, called KOPLS, can be stated in the kernel framework as KOPLS : maximize: Tr{UT ˜Φ T ˜Y ˜YT ˜ΦU} subject to: UT ˜Φ T ˜ΦU = I (2) Note that, unlike KCCA or KPLS, KOPLS only extracts projections of the input data. It is known that Orthonormalized PLS is optimal for performing linear regression on the input data when a bottleneck is imposed for data dimensionality reduction [10]. Similarly, KOPLS provides optimal projections for linear multi-regression in feature space. In other words, the solution to (2) also minimizes the sum of squares of the residuals of the approximation of the label matrix: ∥˜Y −˜Φ ′ ˆB∥2 F , ˆB = ( ˜Φ ′T ˜Φ ′)−1 ˜Φ ′T ˜Y (3) where ∥· ∥F denotes the Frobenius norm of a matrix and ˆB is the optimal regression matrix. Similarly to other MVA methods, KOPLS is not only useful for multi-regression problems, but it can also be used as a very powerful kernel feature extractor in supervised problems, including also the multi-label case, when Y is used to encode class membership information. The optimality condition suggests that the features obtained by KOPLS will be more relevant than those provided by other MVA methods, in the sense that they will allow similar or better accuracy rates using fewer projections, a conjecture that we will investigate in the experiments section of the paper. Coming back to the KOPLS optimization problem, when projecting data into an infinite dimensional space, we need to use the Representer Theorem that states that each of the projection vectors in U can be expressed as a linear combination of the training data. Then, introducing U = ˜ΦT A into (2), where A = [α1, . . . , αnp] and αi is an l-length column vector containing the coefficients for the ith projection vector, the maximization problem can be reformulated as: maximize: Tr{AT KxKyKxA} subject to: AT KxKxA = I (4) where we have defined the centered kernel matrices Kx = ˜Φ ˜Φ T and Ky = ˜Y ˜YT , such that only inner products in F are involved 1. Applying ordinary linear algebra to (4), it can be shown that the columns of A are given by the solutions to the following generalized eigenvalue problem: KxKyKxα = λKxKxα (5) There are a number of ways to solve the above problem. We propose a procedure consisting of iteratively calculating the best projection vector, and then deflating the involved matrices. In short, the optimization procedure at step i consists of the following two differentiated stages: 1. Find the largest generalized eigenvalue of (5), and its corresponding generalized eigenvector: {λi, αi}. Normalize αi so that condition αiKxKxαi = 1 is satisfied. 2. Deflate the l × l matrix KxKyKx according to: KxKyKx ←KxKyKx −λiKxKxαiαT i KxKx The motivation for this deflation strategy can be found in [13], in the discussion of generalized eigenvalue problems. Some intuition can be obtained if we observe its equivalence with Ky ←Ky −λiKxαiαT i Kx which accounts for removing from the label matrix Y the best approximation based on the projections computed at step i, i.e., Kxαi. It can be shown that this deflation scheme decreases by 1 the rank of KxKyKx at each step. Since the rank of the original matrix Ky is at most rank(Y), this is the maximum number of projections that can be derived when using KOPLS. This iterative algorithm, which is very similar in nature to the iterative algorithms used for other MVA approaches, has the advantage that, at every iteration, the achieved solution is optimal with respect to the current number of projections. 1Centering of data in feature space can easily be done from the original kernel matrix. Details on this process are given in most text books describing kernel methods, e.g. [13, 12]. 3 Compact approximation of the KOPLS solution The kernel formulation of the OPLS algorithm we have just presented suffers some drawbacks. In particular, as most other kernel methods, KOPLS requires the computation and storage of a kernel matrix of size l × l, which limits the maximum size of the datasets where the algorithm can be applied. In addition to this, algebraic procedures to solve the generalized eigenvalue problem (5) normally require the inversion of matrix KxKx which is usually rank deficient. Finally, the matrix A will in general be dense rather than sparse, a fact which implies that when new data needs to be projected, it will be necessary to compute the kernels between the new data and all the samples in the training data set. Although it is possible to think of different solutions for each of the above issues, our proposal here is to impose sparsity in the projection vectors representation, i.e., we will use the approximation U = ΦT RB, where ΦR is a subset of the training data containing only R patterns (R < l) and B = [β1, · · · , βnp] contains the parameters of the compact model. Although more sophisticated strategies can be followed in order to select the training data to be incorporated into the basis ΦR, we will rely on random selection, very much in the line of the sparse greedy approximation proposed in [4] to reduce the computational burden of Support Vector Machines (SVMs). Replacing U in (2) by its approximation, we get an alternative maximization problem that constitutes the basis for a KOPLS algorithm with reduced complexity (rKOPLS): rKOPLS : maximize: Tr{BT KRKyKT RB} subject to: BT KRKT RB = I (6) where we have defined KR = ΦR ˜Φ T , which is a reduced kernel matrix of size R × l. Note that, to keep the algorithm as simple as possible, we decided not to center the patterns in the basis ΦR. Our simulation results suggest that centering ΦR does not result in improved performance. Similarly to the standard KOPLS algorithm, the projections for the rKOPLS algorithm can be obtained by solving KRKyKT Rβ = λKRKT Rβ (7) The iterative two-stage procedure described at the end of the previous section can still be used by simple replacement of the following matrices and variables: KOPLS rKOPLS αi βi KxKx KRKT R KxKyKx KRKyKT R To conclude the presentation of the rKOPLS algorithm, let us summarize some of its more relevant properties, and how it solves the different limitations of the standard KOPLS formulation: • Unlike KOPLS, the solution provided by rKOPLS is enforced to be sparse, so that new data is projected with only R kernel evaluations per pattern (in contrast to l evaluations for KOPLS). This is a very desirable property, specially when dealing with large data sets. • Training rKOPLS projections only requires the computation of a reduced kernel matrix KR of size R × l. Nevertheless, note that the approach we have followed is very different to subsampling, since rKOPLS is still using all training data in the MVA objective function. • The rKOPLS algorithm only needs matrices KRKT R and KRKyKT R. It is easy to show that both matrices can be calculated without explicitly computing KR, so that memory requirements go down to O(R2) and O(RM), respectively. Again, this is a very convenient property when dealing with large scale problems. • Parameter R acts as a sort of regularizer, making KRKT R full rank. Table 1 compares the complexity of KOPLS and rKOPLS, as well as that of the KPLS2 algorithm. Note that KPLS2 does not admit a compact formulation as the one we have used for the new method, since the full kernel matrix is still needed for the deflation step. The main inconvenience of rKOPLS in relation to KPLS2 it that it requires the inversion of a matrix of size R×R. However, this normally KOPLS rKOPLS KPLS2 Number of nodes l R l Size of Kernel Matrix l × l R × l l × l Storage requirements O(l2) O(R2) O(l2) Maximum np ≤min{r(Φ), r(Y)} ≤min{R, r(Φ), r(Y)} ≤r(Φ) Table 1: Summary of the most relevant characteristics of the proposed KOPLS and rKOPLS algorithms. Complexity for KPLS2 is also included for comparison purposes. We denote the rank of a matrix with r(·). # Train/Test # Clases dim ν-SVM (%) (linear) vehicle 500 / 346 4 18 66.18 segmentation 1310 / 1000 7 18 91.7 optdigits 3823 / 1797 10 64 96.33 satellite 4435 / 2000 6 36 83.25 pendigits 7494 / 3498 10 16 94.77 letter 10000 / 10000 26 16 79.81 Table 2: UCI benchmark datasets. Accuracy error rates for a linear ν-SVM are also provided. pays off in terms of reduction of computational time and storage requirements. In addition to this, our extensive simulation work shows that the projections provided by rKOPLS are generally more relevant than those of KPLS2. 4 Experiments In this section, we will illustrate the ability of rKOPLS to discover relevant projections of the data. To do this, we compare the discriminative power of the features extracted by rKOPLS and KPLS2 in several multi-class classification problems. In particular, we include experiments on a benchmark of problems taken from the repository at the University of California Irvine (UCI) 2, and on a musical genre classification problem. This latter task is a good example of an application where rKOPLS can be specially useful, given the fact that the extraction of features from the raw audio data normally results in very large data sets of high dimensional data. 4.1 UCI Benchmark Data Sets We start by analyzing the performance of our method in six standard UCI multi-class classification problems. Table 2 summarizes the main properties of the problems that constitute our benchmark. The last four problems can be considered large problems for MVA algorithms, which are in general not sparse and require the computation of the kernels between any two points in the training set. Our first set of experiments consists on comparing the discriminative performance of the features calculated by rKOPLS and KPLS2. For classification, we use one of the simplest possible models: we compute the pseudoinverse of the projected training data to calculate ˆB (see Eq. (3)), and then classify according to ˜Φ ′ ˆB using a “winner-takes-all” (w.t.a.) activation function. For the kernel MVA algorithms we used a Gaussian kernel k(xi, xj) = exp −∥xi −xj∥2 2/2σ2 using 10-fold cross-validation (10-CV) on the training set to estimate σ. To obtain some reference accuracy rates, we also trained a ν-SVM with Gaussian kernel, using the LIBSVM implementation3 and 10-CV was carried out for both the kernel width and ν. Accuracy error rates for rKOPLS and different values of R are displayed in the first rows and first columns of Table 3. Comparing these results with SVM (under the rbf-SVM column), we can 2http://www.ics.uci.edu/∼mlearn/MLRepository.html 3Software available at http://www.csie.ntu.edu.tw/∼cjlin/libsvm rKOPLS - pseudo+w.t.a. KPLS2 - pseudo + w.t.a R = 250 R = 500 R = 1000 l′ = √ 250 l l′ = √ 500 l l′ = √ 1000 l l′ = l vehicle 80.4 ± 1.2 79.9 — 81.3 ± 1.3 80.5 — 80.5 segmentation 95.7 ± 0.4 95.5 ± 0.3 — 93.9 ± 0.5 94.2 ± 0.5 — 95.1 optdigits 97.4 ± 0.2 97.7 ± 0.1 98.2 ± 0.2 96.5 ± 0.3 97 ± 0.3 97 ± 0.2 97.6 satellite 89.8 ± 0.2 90.6 ± 0.3 91 ± 0.2 89.7 ± 0.4 90.3 ± 0.6 91.1 ± 0.3 91.8 pendigits 97.6 ± 0.1 98.2 ± 0.1 98.1 ± 0.2 97.4 ± 0.2 97.6 ± 0.1 97.7 ± 0.2 96.9 letter 84.8 ± 0.3 90 ± 0.2 92.9 ± 0.4 84 ± 0.6 86 ± 0.6 86.2 ± 0.4 — rKOPLS - SVM KPLS2 - SVM rbf-SVM vehicle 81.2 ± 1 80.3 — 81.2 ± 1.1 80.6 — 83 segmentation 95.1 ± 2 95.4 ± 0.4 — 95.6 ± 0.5 94.8 ± 0.3 — 95.2 optdigits 97.3 ± 0.2 97.6 ± 0.1 98.2 ± 0.2 96.4 ± 0.2 96.9 ± 0.2 96.9 ± 0.3 97.2 satellite 89.6 ± 0.6 90.5 ± 0.4 91 ± 0.2 89.7 ± 0.5 90.4 ± 0.6 90.8 ± 0.5 91.9 pendigits 97.6 ± 0.2 98.2 ± 0.1 98.1 ± 0.2 96.9 ± 0.1 97.1 ± 0.2 97.3 ± 0.2 98.1 letter 88.8 ± 1.5 92.1 ± 0.2 93.9 ± 0.3 85.8 ± 0.5 85.9 ± 1.1 87.7 ± 1.2 96.2 Table 3: Classification performance in a benchmark of UCI datasets. Accuracy rates (%) and standard deviation of the estimation are given for 10 different runs of rKOPLS and KPLS2, both when using the pseudoinverse of the projected data together with the “winner-takes-all” activation function (first rows), and when using a ν-SVM linear classifier (last rows). The results achieved by an SVM with linear classifier are also provided in the bottom right corner. conclude that the rKOPLS approach is very close in performance or better than SVM in four out of the six problems. A clearly worse performance is observed in the smallest data set (vehicle) due to overfitting. For letter, we can see that, even for R = 1000, accuracy rates are far from those of SVM. The reason for this is that SVM is using 6226 support vectors, so that a very dense architecture seems to be necessary for this particular problem. To make a fair comparison with the KPLS2 method, the training dataset was subsampled, selecting at random l′ samples, with l′ being the first integer larger than or equal to √ R × l. In this way, both rKOPLS and KPLS2 need the same number of kernel evaluations. Note that, even in this case, KPLS2 results in an architecture with l′ nodes (l′ > R), so that projections of data are more expensive than for the respective rKOPLS. In any case, we must point out that subsampling was only considered for training the projections, but all training data was used to compute the pseudoinverse of the projected training data. Results without subsampling are also provided in Table 3 under the l′ = l column except for the letter data set which we were unable to process due to massive memory problems. As a first comment, we have to point out that all the results for KPLS2 were obtained using 100 projections, which were necessary to guarantee the convergence of the method. In contrast to this, the maximum number of projections that the rKOPLS can provide equals the rank of the label matrix, i.e., the number of classes of each problem minus 1. In spite of using a much smaller number of projections, our algorithm performed significantly better than KPLS2 with subsampling in four out of the five largest problems. As a final set of experiments, we have replaced the classification step by a linear ν-SVM. The results, which are displayed in the bottom part of Table 3, are in general similar to those obtained with the pseudoinverse approach, both for rKOPLS and KPLS2. However, we can see that the linear SVM is able to better exploit the projections provided by the MVA methods in vehicle and letter, precisely the two problems where previous results were less satisfactory. Based on the above set of experiments, we can conclude that rKOPLS provides more discriminative features than KPLS2. In addition to this, these projections are more “informative”, in the sense that we can obtain a better recognition accuracy using a smaller number of projections. An additional advantage of rKOPLS in relation to KPLS2 is that it provides architectures with less nodes. 4.2 Feature Extraction for Music Genre Classification In this subsection we consider the problem of predicting the genre of a song using the audio data only, a task which since the seminal paper [14] has been subject of much interest. The data set we 100 250 500 750 20 25 30 35 40 45 R , l’ Accuracy rates KPLS2, AR rKOPLS, AR KPLS2, song rKOPLS, song 0 10 20 30 40 50 0 10 20 30 40 Number of projections Accuracy rates KPLS2, AR rKOPLS, AR KPLS2, song rKOPLS, song Random (a) (b) Figure 1: Genre classification performance of KPLS2 and rKOPLS. analyze has been previously investigated in [5], and consists of 1317 snippets each of 30 seconds distributed evenly among 11 music genres: alternative, country, easy listening, electronica, jazz, latin, pop&dance, rap&hip-hop, r&b, reggae and rock. The music snippets are MP3 (MPEG1layer3) encoded music with a bitrate of 128 kbps or higher, down sampled to 22050 Hz, and they are processed following the method in [5]: MFCC features are extracted from overlapping frames of the song, using a window size of 20 ms. Then, to capture temporal correlation, a Multivariate Autoregressive (AR) model is adjusted for every 1.2 seconds of the song, and finally the parameters of the AR model are stacked into a 135 length feature vector for every such frame. For training and testing the system we have split the data set into two subsets with 817 and 500 songs, respectively. After processing the audio data, we have 57388 and 36556 135-dimensional vectors in the training and test partitions, an amount which for most kernel MVA methods is prohibitively large. For the rKOPLS, however, the compact representation is enabling usage of the entire training data. In Figure 1 the results are shown. Note that, in this case, comparisons between rKOPLS and KPLS2 are for a fixed architecture complexity (R = l′), since the most significant computational burden for the training of the system is in the projection of the data. Since every song consists of about seventy AR vectors, we can measure the classification accuracy in two different ways: 1) On the level of individual AR vectors or 2) by majority voting among the AR vectors of a given song. The results shown in Figure 1 are very clear: Compared to KPLS2, the rKOPLS is not only consistently performing better as seen in Figure 1(a), but is also doing so with much fewer projections. The strong results are very pronounced in Figure 1(b) where, for R = 750, rKOPLS is outperforming ordinary KPLS, and is doing so with only ten projections compared to fifty projections of the KPLS2. This demonstrates that the features extracted by rKOPLS holds much more information relevant to the genre classification task than KPLS2. 5 Conclusions In this paper we have presented a novel kernel PLS algorithm, that we call reduced kernel orthonormalized PLS (rKOPLS). Compared to similar approaches, rKOPLS is making the data in feature space orthonormal, and imposing sparsity on the solution to ensure competitive performance on large data sets. Our method has been tested on a benchmark of UCI data sets, and we have found that the results were competitive in comparison to those of rbf-SVM, and superior to those of the ordinary KPLS2 method. Furthermore, when applied to a music genre classification task, rKOPLS performed very well even with only a few features, keeping also the complexity of the algorithm under control. Because of the nature of music data, in which both the number of dimensions and samples are very large, we believe that feature extraction methods such as rKOPLS can become crucial to music information retrieval tasks, and hope that other researchers in the community will be able to benefit from our results. Acknowledgments This work was partly supported by the Danish Technical Research Council, through the framework project ‘Intelligent Sound’, www.intelligentsound.org (STVF No. 26-04-0092), and by the Spanish Ministry of Education and Science with a Postdoctoral Felowship to the first author. References [1] Paul Geladi. Notes on the history and nature of partial least squares (PLS) modelling. Journal of Chemometrics, 2:231–246, 1988. [2] L. Hoegaerts, J. A. K. Suykens, J. Vanderwalle, and B. De Moor. Primal space sparse kernel partial least squares regression for large problems. In Proceedings of International Joint Conference on Neural Networks (IJCNN), 2004. [3] Agnar Hoskuldsson. PLS regression methods. Journal of Chemometrics, 2:211–228, 1988. [4] Yuh-Jye Lee and O. L. Mangasarian. RSVM: reduced support vector machines. In Data Mining Institute Technical Report 00-07, July 2000. CD Proceedings of the SIAM International Conference on Data Mining, Chicago, April 5-7, 2001,, 2001. [5] Anders Meng, Peter Ahrendt, Jan Larsen, and Lars Kai Hansen. Temporal feature integration for music genre classification. IEEE Trans. Audio, Speech & Language Process., to appear. [6] Michinari Momma and Kristin Bennett. Sparse kernel partial least squares regression. In Proceedings of Conference on learning theory (COLT), 2003. [7] Roman Rosipal and Leonard J. Trejo. Kernel partial least squares regression in reproducing kernel hilbert space. Journal of Machine Learning Research, 2:97–123, 2001. [8] Roman Rosipal, Leonard J. Trejo, and Bryan Matthews. Kernel pls-svc for linear and nonlinear classifiction. In Proceedings of Internation Conference on Machine Learning (ICML), 2003. [9] Kramer N. Rosipal R. Overview and recent advances in partial least squares. In Subspace, Latent Structure and Feature Selection Techniques, 2006. [10] Sam Roweis and Carlos Brody. Linear heteroencoders. Technical report, Gatsby Computational Neuroscience Unit, 1999. [11] Paul D. Sampson, Ann P. Streissguth, Helen M. Barr, and Fred L. Bookstein. Neurobehavioral effetcs of prenatal alcohol: Part II. Partial Least Squares analysis. Neurotoxicology and teratology, 11:477–491, 1989. [12] Bernhard Schoelkopf and Alexander Smola. Learning with kernels. MIT Press, 2002. [13] John Shawe-Taylor and Nello Christiani. Kernel Methods for Pattern Analysis. Cambridge University Press, 2004. [14] George Tzanetakis and Perry Cook. Music genre classification of audio signals. IEEE Transactions on Speech and Audio Processing, 10(5):293–302, July 2002. [15] Jacob A. Wegelin. A survey of partial least squares (PLS) methods, with emphasis on the two-block case. Technical report, University of Washington, 2000. [16] Herman Wold. Path models with latent variables: the NIPALS approach. In Quatitative sociology: International perspectives on mathematical and statistical Model Building, pages 307–357. Academic Press, 1975. [17] S. Wold, C. Albano, W. J. Dunn, U. Edlund, K. Esbensen, P. Geladi, S. Hellberg, E. Johansson, W. Lindberg, and M. Sjostrom. Chemometrics, Mathematics and Statistics in Chemistry, chapter Multivariate Data Analysis in Chemistry, page 17. Reidel Publishing Company, 1984. [18] K. Worsley, J. Poline, K. Friston, and A. Evans. Characterizing the response of pet and fMRI data using multivariate linear models (MLM). NeuroImage, 6:305– 319, 1998.
2006
83
3,107
Data Integration for Classification Problems Employing Gaussian Process Priors Mark Girolami Department of Computing Science University of Glasgow Scotland, UK girolami@dcs.gla.ac.uk Mingjun Zhong IRISA, Campus de Beaulieu F-35042 Rennes Cedex France zmingjun@irisa.fr Abstract By adopting Gaussian process priors a fully Bayesian solution to the problem of integrating possibly heterogeneous data sets within a classification setting is presented. Approximate inference schemes employing Variational & Expectation Propagation based methods are developed and rigorously assessed. We demonstrate our approach to integrating multiple data sets on a large scale protein fold prediction problem where we infer the optimal combinations of covariance functions and achieve state-of-the-art performance without resorting to any ad hoc parameter tuning and classifier combination. 1 Introduction Various emerging quantitative measurement technologies in the life sciences are producing genome, transcriptome and proteome-wide data collections which has motivated the development of data integration methods within an inferential framework. It has been demonstrated that for certain prediction tasks within computational biology synergistic improvements in performance can be obtained via the integration of a number of (possibly heterogeneous) data sources. In [2] six different data representations of proteins were employed for fold recognition of proteins using Support Vector Machines (SVM). It was observed that certain data combinations provided increased accuracy over the use of any single dataset. Likewise in [9] a comprehensive experimental study observed improvements in SVM based gene function prediction when data from both microarray expression and phylogentic profiles were manually combined. More recently protein network inference was shown to be improved when various genomic data sources were integrated [16] and in [1] it was shown that superior prediction accuracy of protein-protein interactions was obtainable when a number of diverse data types were combined in an SVM. Whilst all of these papers exploited the kernel method in providing a means of data fusion within SVM based classifiers it was initially only in [5] that a means of estimating an optimal linear combination of the kernel functions was presented using semi-definite programming. However, the methods developed in [5] are based on binary SVM’s, whilst arguably the majority of important classification problems within computational biology are inherently multiclass. It is unclear how this approach could be extended in a straightforward or practical manner to discrimination over multiple-classes. In addition the SVM is non-probabilistic and whilst post hoc methods for obtaining predictive probabilities are available [10] these are not without problems such as overfitting. On the other hand Gaussian Process (GP) methods [11], [8] for classification provide a very natural way to both integrate and infer optimal combinations of multiple heterogeneous datasets via composite covariance functions within the Bayesian framework an idea first proposed in [8]. In this paper it is shown that GP’s can indeed be successfully employed on general classification problems, without recourse to ad hoc binary classification combination schemes, where there are multiple data sources which are also optimally combined employing full Bayesian inference. A large scale example of protein fold prediction [2] is provided where state-of-the-art predictive performance is achieved in a straightforward manner without resorting to any extensive ad hoc engineering of the solution (see [2], [13]). As an additional important by-product of this work inference employing Variational Bayesian (VB) and Expectation Propagation (EP) based approximations for GP classification over multiple classes are studied and assessed in detail. It has been unclear whether EP based approximations would provide similar improvements in performance in the multi-class setting over the Laplace approximation and this work provides experimental evidence that both Variational and EP based approximations perform as well as a Gibbs sampler consistently outperforming the Laplace approximation. In addition we see that there is no statistically significant practical advantage of EP based approximations over VB approximations in this particular setting. 2 Integrating Data with Gaussian Process Priors Let us denote each of J independent (possibly heterogeneous) feature representations, Fj(X), of an object X by xj ∀ j = 1 · · · J . For each object there is a corresponding polychotomous response target variable, t, so to model this response we assume an additive generalized regression model. Each distinct data representation of X, Fj(X) = xj, is nonlinearly transformed such that fj(xj) : Fj 7→R and a linear model is employed in this new space such that the overall nonlinear transformation is f(X) = P j βjfj(xj). 2.1 Composite Covariance Functions Rather than specifying an explicit functional form for each of the functions fj(xj) we assume that each nonlinear function corresponds to a Gaussian process (GP) [11] such that fj(xj) ∼GP(θj) where GP(θj) corresponds to a GP with trend and covariance functions mj(xj) and Cj(xj, x′ j; θj) where θj denotes a set of hyper-parameters associated with the covariance function. Due to the assumed independence of the feature representations the overall nonlinear function will also be a realization of a Gaussian process defined as f(X) ∼GP (θ1 · · · θJ , β1 · · · βJ ) where now the overall trend and covariance functions follow as P j βjmj(xj) and P j β2 j Cj(xj, x′ j; θj). For N object samples, X1 · · · XN, each defined by the J feature representations, x1 j · · · xN j , denoted by Xj, with associated class specific response fk = [fk(X1) · · · fk(XN)]T the overall GP prior is a multivariate Normal such that fk | Xj=1···J, θ1k, · · · θJ k, α1k · · · αJ k ∼Nfk  0, X j αjkCjk(θjk)  (1) The positive random variables β2 jk are denoted by αjk, zero-trend GP functions have been assumed and each Cjk(θjk) is an N ×N matrix with elements Cj(xm j , xn j ; θjk). A GP functional prior, over all possible responses (classes), is now available where possibly heterogeneous data sources are integrated via the composite covariance function. It is then, in principle, a straightforward matter to perform Bayesian inference with this model and no further recourse to ad hoc binary classifier combination methods or ancillary optimizations to obtain the data combination weights is required. 2.2 Bayesian Inference As we are concerned with classification problems over possibly multiple classes we employ a multinomial probit likelihood rather than a multinomial logit as it provides a means of developing a Gibbs sampler, and subsequent computationally efficient approximations, for the GP random variables. The Gibbs sampler is to be preferred over the Metropolis scheme as no tuning of a proposal distribution is required. As in [3] the auxiliary variables ynk = fk(Xn) + ϵnk, ϵnk ∼N(0, 1) are introduced and the N ×1 dimensional vector of target class values associated with each Xn is given as t where each element tn ∈{1, · · · , K}. The N × K matrix of GP random variables fk(Xn) is denoted by F. We represent the N × 1 dimensional columns of F by F·,k and the corresponding K × 1 dimensional vectors, Fn,·, which are formed by the indexed rows of F . The N × K matrix of auxiliary variables ynk is represented as Y, where the N × 1 dimensional columns are denoted by Y·,k and the corresponding K × 1 dimensional vectors are obtained from the rows of Y as Yn,·. The multinomial probit likelihood [3] is adopted which follows as tn = j if ynj = argmax 1≤k≤K {ynk} (2) and this has the effect of dividing RK into K non-overlapping K-dimensional cones Ck = {y : yk > yi, k ̸= i} where RK = ∪kCk and so each P(tn = i|Yn,·) can be represented as δ(yni > ynk ∀k ̸= i). Class specific independent Gamma priors, with parameters ϕk, are placed on each αjk and the individual components of θjk (denote Θk = {θjk, αjk}j=1···J ), a further Gamma prior is placed on each element of ϕk with overall parameters a and b so this defines the full model likelihood and associated priors. 2.3 MCMC Procedure Samples from the full posterior P(Y, F, Θ1···K, ϕ1···K|X1···N, t, a, b) can be obtained from the following Metropolis-within-Blocked-Gibbs Sampling scheme indexing over all n = 1 · · · N and k = 1 · · · K. Y(i+1) n,· |F(i) n,·, tn ∼ T N(F(i) n,·, I, tn) (3) F(i+1) ·,k |Y(i+1) ·,k , Θ(i) k , X1,··· ,N ∼ N(Σ(i) k Y(i+1) ·,k , Σ(i) k ) (4) Θ(i+1) 1 |F(i+1) ·,1 , Y(i+1) ·,k , ϕ(i) 1 , X1,··· ,N ∼ P(Θ(i+1) k ) (5) ϕ(i+1) k |Θ(i+1) k , ak, bk ∼ P(ϕ(i+1) k ) (6) where T N(Fn,·, I, tn) denotes a conic truncation of a multivariate Gaussian with location parameters Fn,· and dispersion parameters I and the dimension indicated by the class value of tn will be the largest. An accept-reject strategy can be employed in sampling from the conic truncated Gaussian however this will very quickly become inefficient for problems with moderately large numbers of classes and as such a further Gibbs sampling scheme may be required. Each Σ(i) k = C(i) k (I+C(i) k )−1 and C(i) k = P j=1 α(i) jk Cjk(θ(i) jk ) with the elements of Cjk(θ(i) jk ) defined as Cj(xm j , xn j ; θ(i) jk ). A Metropolis sub-sampler is required to obtain samples for the conditional distribution over the composite covariance function parameters P(Θ(i+1) k ) and finally P(ϕ(i+1) k ) is a simple product of Gamma distributions. The predictive likelihood of a test sample X∗is P(t∗= k|X∗, X1···N, t, a, b) which can be obtained by integrating over the posterior and predictive prior such that Z P(t∗= k|f∗)p(f∗|Ω, X∗, X1···N)p(Ω|X1···N, t, a, b)df∗dΩ (7) where Ω= Y, Θ1···K. A Monte-Carlo estimate is obtained by using samples drawn from the full posterior 1 S PS s=1 R P(t∗= k|f∗)p(f∗|Ω(s), X∗, X1···N)df∗and the integral over the predictive prior requires further conditional samples, f (l|s) ∗ , to be drawn from each p(f∗|Ω(s), X∗, X1···N) finally yielding a Monte Carlo approximation of P(t∗= k|X∗, X1···N, t, a, b) 1 LS L X l=1 S X s=1 P  t∗= k|f (l|s) ∗  = 1 LS L X l=1 S X s=1 Ep(u)    Y j̸=k Φ  u + f (l|s) ∗,k −f (l|s) ∗,j     (8) MCMC procedures for GP classification have been previously presented in [8] and whilst this provides a practical means to perform Bayesian inference employing GP’s the computational cost incurred and difficulties associated with monitoring convergence and running multiple-chains on reasonably sized problems are well documented and have motivated the development of computationally less costly approximations [15]. A recent study has shown that EP is superior to the Laplace approximation for binary classification [4] and that for multi-class classification VB methods are superior to the Laplace approximation [3]. However the comparison between Variational and EP based approximations for the multi-class setting have not been considered in the literature and so we seek to address this issue in the following sections. 2.4 Variational Approximation From the conditional probabilities which appear in the Gibbs sampler it can be seen that a mean field approximation gives a simple iterative scheme which provides a computationally efficient alternative to the full sampler (including the Metropolis sub-sampler for the covariance function parameters), details of which are given in [3]. However given the excellent performance of EP on a number of approximate Bayesian inference problems it is incumbent on us to consider an EP solution here. We should point out that only the top level inference on the GP variables is considered here and the composite covariance function parameters will be obtained using another appropriate type-II maximum likelihood optimization scheme if possible. 2.5 Expectation Propagation with Full Posterior Covariance The required posterior can also be approximated by EP [7]. In this case the multinomial probit likelihood is approximated by a multivariate Gaussian such that p(F|t, X1···N) ≈Q(F) = Q k p(F·,k|X1···N) Q n gn(Fn,·)1 where gn(Fn,·) = NFn,·(µn, Λn), µn is a K × 1 vector and Λn is a full K × K dimensional covariance matrix. Denoting the cavity density as Q\n(F) = Q k p(F·,k|X1···N) Q i,i̸=n gi(Fi,·), EP proceeds by iteratively re-estimating the moments µn, Λn by moment matching [7] giving the following µnew n = Eˆpn{Fn,·} and Λnew n = Eˆpn{Fn,·FT n,·} −Eˆpn{Fn,·}Eˆpn{Fn,·}T, (9) where ˆpn = Z−1 n Q\n(Fn,·)p(tn|Fn,·), and Zn is the required normalizing (partition) function which is required to obtain the above mean and covariance estimates. To proceed an analytic form for the partition function Zn is required. Indeed for binary classification employing a binomial probit likelihood an elegant EP solution follows due to the analytic form of the partition function [4]. However for the case of multiple classes with a multinomial probit likelihood the partition function no longer has a closed analytic form and further approximations are required to make any progress. There are two strategies which we consider, the first retains the full posterior coupling in the covariance matrices Λn by employing Laplace Propagation (LP) [14] and the second assumes no posterior coupling in Λn by setting this as a diagonal covariance matrix. The second form of approximation has been adopted in [12] when developing a multi-class version of the Informative Vector Machine (IVM) [6]. In the first case where we employ LP an additional significant O(K3N 3) computational scaling will be incurred however it can be argued that the retention of the posterior coupling is important. For the second case clearly we lose this explicit posterior coupling but, of course, do not incur the expensive computational overhead required of LP. We observed in unreported experiments that there is little of statistical significance lost, in terms of predictive performance, when assuming a factorable form for each ˆpn. LP proceeds by propagating the approximate moments such that µnew n ≈argmax Fn,· log ˆpn and Λnew n ≈  −∂2 log ˆpn ∂Fn,·∂FTn,· −1 (10) The required derivatives follow straightforwardly and details are included in the accompanying material. The approximate predictive distribution for a new data point x∗requires a Monte Carlo estimate employing samples drawn from a K-dimensional multivariate Gaussian for which details are given in the supplementary material2. 2.6 Expectation Propagation with Diagonal Posterior Covariance By assuming a factorable approximate posterior, as in the variational approximation [3], a distinct simplification of the problem setting follows, where now we assume that gn(Fn,·) = Q k NFn,k(µn,k, λn,k) i.e. is a factorable distribution. This assumption has already been made in [12] in developing an EP based multi-class IVM. Now significant computational simplification follows where the required moment matching amounts to µnew nk = Eˆpnk{Fn,k} and λnew nk = Eˆpnk{F2 n,k} −Eˆpnk{Fn,k}2 where the density ˆpnk has a partition function which now has the analytic form Zn = Ep(u)p(v)    K Y j=1,j̸=i Φ  u + v q λ\n ni + µ\n ni −µ\n nj q 1 + λ\n nj      (11) 1Conditioning on the covariance function parameters and associated hyper-parameters is implicit 2Supplementary material http://www.dcs.gla.ac.uk/people/personal/girolami/ pubs_2006/NIPS2006/index.htm where u and v are both standard Normal random variables (v q λ\n ni = Fn,i −µ\n ni ) with λ\n ni and µ\n ni having the usual meanings (details in accompanying material). Derivatives of this partition function follow in a straightforward way now allowing the required EP updates to proceed (details in supplementary material). The approximate predictive distribution for a new data point X∗in this case takes a similar form to that for the Variational approximation [3]. So we have P(t∗= k|X∗, X1···N, t) = Ep(u)p(v)    K Y j=1,j̸=k Φ u + v p λ∗ k + µ∗ k −µ∗ j p1 + λ∗ j !   (12) where the predictive mean and variance follow in standard form. µ∗ j = (C∗ j)T (Cj + Λj)−1 µj and λ∗ j = c∗ j −(C∗ j)T (Cj + Λj)−1 C∗ j (13) It should be noted here that the expectation over p(u) and p(v) could be computed by using either Gaussian quadrature or a simple Monte Carlo approximation which is straightforward as sampling from a univariate standardized Normal only is required. The VB approximation [3] however only requires a 1-D Monte Carlo integral rather than the 2-D one required here. 3 Experiments Before considering the main example of data integration within a large scale protein fold prediction problem we attempt to assess a number of approximate inference schemes for GP multi-class classification. We provide a short comparative study of the Laplace, VB, and both possible EP approximations by employing the Gibbs sampler as the comparative gold standard. For these experiments six multi-class data sets are employed 3, i.e., Iris (N = 150, K = 3), Wine (N = 178, K = 3), Soybean (N = 47, K = 4), Teaching (N = 151, K = 3), Waveform (N = 300, K = 3) and ABE (N = 300, K = 3, which is a subset of the Isolet dataset using the letters ‘A’, ‘B’ and ‘E’,). A single radial basis covariance function with one length scale parameter is used in this comparative study. Ten-fold cross validation (CV) was used to estimate the predictive log-likelihood and the percentage predictive error. Within each of the ten folds a further 10 CV routine was employed to select the length-scale of the covariance function. For the Gibbs sampler, after a burn-in of 2000 samples, the following 3000 samples were used for inference, and the predictive error and likelihood were computed from the 3000 post-burn-in samples. For each data set and each method the percentage predictive error and the predictive log-likelihood were estimated in this manner. The summary results given as the mean and standard deviation over the ten folds are shown in Table 1. The results which cannot be distinguished from each other, under a Wilcoxon rank sum test with a 5% significance level, are highlighted in bold. From those results, we can see that across most data sets used, the predictive log-likelihood obtained from the Laplace approximation is lower than those of the three other methods. In our observations, the predictive performance of VB and the IEP approximation are consistently indistinguishable from the performance achieved from the Gibbs sampler. From the experiments conducted there is no evidence to suggest any difference in predictive performance between IEP & VB methods in the case of multi-way classification. As there is no benefit in choosing an EP based approximation over the Variational one we now select the Variational approximation in that inference over the covariance parameters follows simply by obtaining posterior mean estimates using an importance sampler. As a brief illustration of how the Variational approximation compares to the full Metropolis-withinBlocked-Gibbs Sampler consider a toy dataset consisting of three classes formed by a Gaussian surrounded by two annular rings having ten features only two of which are predictive of the class labels [3]. We can compare the compute time taken to obtain reasonable predictions from the full MCMC and the approximate Variational scheme [3]. Figure 1 (a) shows the samples of the covariance function parameters Θ drawn from the Metropolis subsampler4 and overlaid in black the corresponding approximate posterior mean estimates obtained from the variational scheme [3]. It 3http://www.ics.uci.edu/˜mlearn/MPRepository.html 4It should be noted that multiple Metropolis sub-chains had to be run in order to obtain reasonable sampling of the Θ ∈R10 + Table 1: Percentage predictive error (PE) and predictive log-likelihood (PL) for six data sets from UCI computed using Laplace, Variational Bayes (VB), independent EP (IEP), as well as MCMC using Gibbs sampler. Best results which are statistically indistinguishable from each other are highlighted in bold. ABE Iris PE PL PE PL Laplace 4.000±3.063 -0.290±0.123 3.333±3.513 -0.132±0.052 VB 2.000±2.330 -0.164±0.026 3.333±3.513 -0.087±0.056 Gibbs 3.333±3.143 -0.158±0.037 3.333±3.513 -0.079±0.056 IEP 5.333±5.019 -0.139±0.050 3.333±3.513 -0.063±0.059 Wine Soybean PE PL PE PL Laplace 3.889±5.885 -0.258±0.045 0.000±0.000 -0.359±0.040 VB 2.222±3.884 -0.182±0.057 0.000±0.000 -0.158±0.034 Gibbs 4.514±5.757 -0.177±0.054 0.000±0.000 -0.158±0.039 IEP 3.889±5.885 -0.133±0.047 0.000±0.000 -0.172±0.037 Teach Wave PE PL PE PL Laplace 39.24±15.74 -0.836±0.072 17.50±9.17 -0.430±0.085 VB 41.12±9.92 -0.711±0.125 18.33±9.46 -0.410±0.100 Gibbs 42.41±6.22 -0.730±0.113 15.83±8.29 -0.380±0.116 IEP 42.54±11.32 -0.800±0.072 17.50±10.72 -0.383±0.107 10 0 10 1 10 2 10 −4 10 −2 10 0 (a) 10 0 10 5 0 10 20 30 40 50 60 70 Time (Seconds − Log) Percentage Error (b) 10 0 10 5 −1.2 −1 −0.8 −0.6 −0.4 −0.2 Time (Seconds − Log) Predictive Likelihood (c) Figure 1: (a) Progression of MCMC and Variational methods in estimating covariance function parameters, vertical axis denotes each θd, horizontal axis is time (all log scale) (b) percentage error under the MCMC (gray) and Variational (black) schemes, (c) predictive likelihood under both schemes. is clear that after 100 calls to the sub-sampler the samples obtained reflect the relevance of the features, however the deterministic steps taken in the variational routine achieve this in just over ten computational steps of equal cost to the Metropolis sub-sampler. Figure 1 (b) shows the predictive error incurred by the classifier and under the MCMC scheme 30,000 CPU seconds are required to achieve the same level of predictive accuracy under the variational approximation obtained in 200 seconds (a factor of 150 times faster). This is due, in part, to the additional level of sampling from the predictive prior which is required when using MCMC to obtain predictive posteriors. Because of these results we now adopt the variational approximation for the following large scale experiment. 4 Protein Fold Prediction with GP Based Data Fusion To illustrate the proposed GP based method of data integration a substantial protein fold classification problem originally studied in [2] and more recently in [13] is considered. The task is to devise a predictor of 27 distinct SCOP classes from a set (N = 314) of low homology protein sequences. Six AA HP PT PY SS VP MA MF 0 10 20 30 40 50 60 Percent Accuracy (a) AA HP PT PY SS VP MA MF 0 0.05 0.1 0.15 0.2 Predictive Likelihood (b) AA HP PT SS VP PZ 0 0.5 1 1.5 2 2.5 Alpha Weight (c) Figure 2: (a) The prediction accuracy for each individual data set and the corresponding combinations, (MA) employing inferred weights and (MF) employing a fixed weighting scheme (b) The predictive likelihood achieved for each individual data set and with the integrated data (c) The posterior mean values of the covariance function weights α1 · · · α6. different data representations (each comprised of around 20 features) are available characterizing (1) Amino Acid composition (AA); (2) Hydrophobicity profile (HP); (3) Polarity (PT); (4) Polarizability (PY); (5) Secondary Structure (SS); (6) Van der Waals volume profile of the protein (VP). In [2] a number of classifier and data combination strategies were employed in devising a multiway classifier from a series of binary SVM’s. In the original work of [2] the best predictive accuracy obtained on an independent set (N = 385) of low sequence similarity proteins was 53%. It was noted after extensive careful manual experimentation by the authors that a combination of Gaussian kernels each composed of the (AA), (SS) and (HP) datasets significantly improved predictive accuracy. More recently in [13] a heavily tuned ad hoc ensemble combination of classifiers raised this performance to 62% the best reported on this problem. We employ the proposed GP based method (Variational approximation) in devising a classifier for this task where now we employ a composite covariance function (shared across all 27 classes), a linear combination of RBF functions for each data set. Figure (2) shows the predictive performance of the GP classifier in terms of percentage prediction accuracy (a) and predictive likelihood on the independent test set (b). We note a significant synergistic increase in performance when all data sets are combined and weighted (MA) where the overall performance accuracy achieved is 62%. Although the 0-1 loss test error is the same for an equal weighting of the data sets (MF) and that obtained using the proposed inference procedure (MA) for (MA) there is an increase in predictive likelihood i.e. more confident correct predictions being made. It is interesting to note that the weighting obtained (posterior mean for α) Figure (2.c) weights the (AA) & (SS) with equal importance whilst other data sets play less of a role in performance improvement. 5 Conclusions In this paper we have considered the problem of integrating data sets within a classification setting, a common scenario within many bioinformatics problems. We have argued that the GP prior provides an elegant solution to this problem within the Bayesian inference framework. To obtain a computationally practical solution three approximate approaches to multi-class classification with GP priors, i.e. Laplace, Variational and EP based approximations have been considered. It is found that EP and Variational approximations approach the performance of a Gibbs sampler and indeed their predictive performances are indistinguishable at the 5% level of significance. The full EP (FEP) approximation employing LP has an excessive computational cost and there is little to recommend it in terms of predictive performance over the independent assumption (IEP). Likewise there is little to distinguish between IEP and VB approximations in terms of predictive performance in the multi-class classification setting though further experiments on a larger number of data sets is desirable. We employ VB to infer the optimal parameterized combinations of covariance functions for the protein fold prediction problem over 27 possible folds and achieve state-of-the-art performance without recourse to any ad hoc tinkering and tuning and the inferred combination weights are intuitive in terms of the information content of the highest weighted data sets. This is a highly practical solution to the problem of heterogenous data fusion in the classification setting which employs Bayesian inferential semantics throughout in a consistent manner. We note that on the fold prediction problem the best performance achieved is equaled without resorting to complex and ad hoc data and classifier weighting and combination schemes. 5.1 Acknowledgements MG is supported by the Engineering and Physical Sciences Research Council (UK) grant number EP/C010620/1, MZ is supported by the National Natural Science Foundation of China grant number 60501021. References [1] A. Ben-Hur and W.S. Noble. Kernel methods for predicting protein-protein interactions. Bioinformatics, 21, Suppl. 1:38–46, 2005. [2] Chris Ding and Inna Dubchak. Multi-class protein fold recognition using support vector machines and neural networks. Bioinformatics, 17:349–358, 2001. [3] Mark Girolami and Simon Rogers. Variational Bayesian multinomial probit regression with Gaussian process priors. Neural Computation, 18(8):1790–1817, 2006. [4] M. Kuss and C.E. Rasmussen. Assessing approximate inference for binary Gaussian process classification. Journal of Machine Learning Research, 6:1679–1704, 2005. [5] G. R. G. Lanckriet, T. De Bie, N. Cristianini, M. I. Jordan, and W. S. Noble. A statistical framework for genomic data fusion. Bioinformatics, 20:2626–2635, 2004. [6] Neil Lawrence, Matthias Seeger, and Ralf Herbrich. Fast sparse Gaussian process methods: The informative vector machine. In S. Thrun S. Becker and K. Obermayer, editors, Advances in Neural Information Processing Systems 15. MIT Press. [7] Thomas Minka. A family of algorithms for approximate Bayesian inference. PhD thesis, MIT, 2001. [8] R. Neal. Regression and classification using Gaussian process priors. In A.P. Dawid, M. Bernardo, J.O. Berger, and A.F.M. Smith, editors, Bayesian Statistics 6, pages 475–501. Oxford University Press, 1998. [9] Paul Pavlidis, Jason Weston, Jinsong Cai, and William Stafford Noble. Learning gene functional classifications from multiple data types. Journal of Computational Biology, 9(2):401– 411, 2002. [10] J.C. Platt. Probabilities for support vector machines. In A. Smola, P. Bartlett, B. Schlkopf, and D. Schuurmans, editors, Advances in Large Margin Classifiers, pages 61–74. MIT Press, 1999. [11] Carl Edward Rasmussen and Christopher K. I. Williams. Gaussian Processes for Machine Learning. MIT Press, 2006. [12] M.W. Seeger, N.D. Lawrence, and R. Herbrich. Efficient nonparametric Bayesian modelling with sparse Gaussian process approximations. Technical Report, ”http://www.kyb.tuebingen.mpg.de/bs/people/seeger/”, 2006. [13] Hong-Bin Shen and Kuo-Chen Chou. Ensemble classifier for protein fold pattern recognition. Bioinformatics, Advanced Access(doi:10.1093), 2006. [14] Alexander Smola, Vishy Vishwanathan, and Eleazar Eskin. Laplace propagation. In Sebastian Thrun, Lawrence Saul, and Bernhard Sch¨olkopf, editors, Advances in Neural Information Processing Systems 16. MIT Press, Cambridge, MA, 2004. [15] C.K.I. Williams and D. Barber. Bayesian classification with Gaussian processes. IEEE Transactions on Pattern Analysis and Machine Intelligence, 20(12):1342–1352, 1998. [16] Y. Yamanishi, J. P. Vert, and M. Kanehisa. Protein network inference from multiple genomic data: a supervised approach. Bioinformatics, 20, Suppl. 1:363–370, 2004.
2006
84
3,108
Stochastic Relational Models for Discriminative Link Prediction Kai Yu NEC Laboratories America Cupertino, CA 95014 Wei Chu CCLS, Columbia University New York, NY 10115 Shipeng Yu, Volker Tresp, Zhao Xu Siemens AG, Corporate Research & Technology, 81739 Munich, Germany Abstract We introduce a Gaussian process (GP) framework, stochastic relational models (SRM), for learning social, physical, and other relational phenomena where interactions between entities are observed. The key idea is to model the stochastic structure of entity relationships (i.e., links) via a tensor interaction of multiple GPs, each defined on one type of entities. These models in fact define a set of nonparametric priors on infinite dimensional tensor matrices, where each element represents a relationship between a tuple of entities. By maximizing the marginalized likelihood, information is exchanged between the participating GPs through the entire relational network, so that the dependency structure of links is messaged to the dependency of entities, reflected by the adapted GP kernels. The framework offers a discriminative approach to link prediction, namely, predicting the existences, strengths, or types of relationships based on the partially observed linkage network as well as the attributes of entities (if given). We discuss properties and variants of SRM and derive an efficient learning algorithm. Very encouraging experimental results are achieved on a toy problem and a user-movie preference link prediction task. In the end we discuss extensions of SRM to general relational learning tasks. 1 Introduction Relational learning concerns the modeling of physical, social, or other phenomena, where rich types of entities interact via complex relational structures. If compared to the traditional machine learning settings, the entity relationships provide additional structural information. A simple example of a relational setting is the user-movie rating database, which contains user entities with user attributes (e.g., age, gender, education), movie entities with movie attributes (e.g., year, genre, director), and ratings (i.e., relations between users and movies). A typical relational learning problem is entity classification, for example, segmenting users into groups. One may apply usual clustering or classification methods based on a flat structure of data, where each user is associated with a vector of user attributes. However a sound model should additionally explore the user-movie relations as well as even the movie attributes, since like-minded users tend to give similar ratings on the same movie, and may like (or dislike) movies with similar genres. Relational learning addresses this and similar situation where it is not natural to transform the data into a flat structure. Entity classification in a relational setting has gained considerable attentions, like webpage classification using both textual contents and hyperlinks. However, in other occasions relationships themselves are often of central interest. For example, one may want to predict protein-protein interactions, or in another application, user ratings for products. The family of these problems has been called link prediction1, which is the primary topic of this paper. In general, link prediction includes link existence prediction (i.e., does a link exist?), link classification (i.e., what type of the relationship?), and link regression (i.e., how does the user rate the item?). In this paper we propose a family of stochastic relational models (SRM) for link prediction and other relational learning tasks. The key idea of SRM is a stochastic link-wise process induced by a tensor interplay of multiple entity-wise Gaussian processes (GP). These models in fact define a set of nonparametric priors on an infinite dimensional tensor matrix, where each element represents a relationship between a tuple of entities. By maximizing the marginalized likelihood, information is exchanged between the participating GPs through the entire relational network, so that the dependency structure of links is messaged to the dependency of entities, reflected by the learned entity-wise GP kernels (i.e., GP covariance functions). SRM is discriminative because training is on a conditional model of links. We present various models of SRM and address the computational issue, which is crucial in link prediction because the number of potential links grows exponentially with the entity size. SRM has shown encouraging results in our experiments. This paper is organized as follows. We introduce the stochastic relational models in Sec. 2, and describe the algorithms for inference and parameter estimation in Sec. 3 and Sec. 4, followed by Sec. 5 on implementation details. Then we discuss the related work in Sec. 6 and report experimental results in Sec. 7, followed by conclusions and extensions in Sec. 8. 2 Stochastic Relational Models We first consider pairwise asymmetric links r between entities u ∈U and v ∈V. The two sets U and V can be identical or different. We use u or v to represent the attribute vectors of entities or their identity when entity attributes are unavailable. Note that ri,n ≡r(ui, vn) does not have to be identical to rn,i when U = V, i.e. relationships can be asymmetrical. Extensions to involve more than two entity sets, multi-way relations (i.e., links connecting more than two entities), and symmetric links are straightforward and will be briefly discussed in Sec. 8. We assume that the observable links r are derived as local measurements of a real-valued latent relational function t : U × V →R, and each link ri,n is solely dependent on its latent value ti,n, modeled by the likelihood p(ri,n|ti,n). The focus of this paper is a family of stochastic relational processes acting on U × V, the space of entity pairs, to generate the latent relational function t, via a tensor interaction of two independent entity-specific GPs, one acting on U and the other on V. We call them processes because U and V can both encompass an infinite number of entities. Let the relational processes be characterized by hyperparameters θ = {θΣ, θΩ}, θΣ for the GP kernel function on U and θΩfor the GP kernel function on V, a SRM thus defines a Bayesian prior p(t|θ) for the latent variables t. Let I be the index set of entity pairs having observed links, the marginal likelihood (also called evidence) under such a prior is p(RI|θ) =   (i,n)∈I p(ri,n|ti,n)p(t|θ)dt, θ = {θΣ, θΩ} (1) where RI = {ri,n}(i,n)∈I. We estimate the hyperparameters θ by maximizing the evidence, which is an empirical Bayesian approach to learning the relational structure of data. Once θ are determined, we can predict the link for a new pair of entities via marginalization over the a posteriori p(t|RI, θ). 2.1 Choices for the Piror p(t|θ) In order to represent a rich class of link structures, p(t|θ) should be sufficiently expressive. In the following subsections, we will present three cases of p(t|θ), from specific to general, by gradually extending conventional GP models. 2.1.1 A Brief Introduction to Gaussian Processes A GP defines a nonparametric prior distribution over functions in Bayesian inference. A random real-valued function f : X →R follows a GP prior, denoted by GP(µ, Σ), if for every finite set 1We will use “link” and “relationship” interchangeably throughout this paper. {xi}N i=1, f = {f(xi}N i=1 follows a multivariate Gaussian distribution with mean µ = {µ(xi)}N i=1 and covariance (or kernel) Σ = {Σ(xi, xj; θΣ)}N i,j=1 with parameter θΣ. Given D = {xi, yi}N i=1, where yi is a measurement of f(xi) corrupted by Gaussian noise, one can make predictions via the marginal likelihood p(y|x, D, θΣ) =  p(y|f, x)p(f|D, θΣ)df. For non-Gaussian measurement processes, as in classification models, the integral cannot be solved analytically, and approximation for inference is required. A comprehensive coverage of GP models can be found in [9]. 2.1.2 Hierarchical Gaussian Processes By observing the relational data collectively, one may notice that two entities ui and uj in U demonstrate correlated relationships to entities in V. For example, two users often show opposite or close opinions on movies, or two hub web pages are co-linked by a set of other authority web pages. In this case, the dependency structure of links can be reduced to a dependency structure of entities in U. A hierarchical GP (HGP) model [13], originally proposed for multi-task learning, can be conveniently applied in such a situation. The model assumes that, for every v ∈V, its relational function t(·, v) : U →R is an i.i.d. sample drawn from a common entity-wise GP with covariance Σ : U × U →R. This provides a case of p(t|θ) in a SRM, where θ = θΣ determines the GP kernel function Σ. Optimizing the GP kernel Σ via evidence maximization means to learn the dependency of entities in U, summarized over all the entities v ∈V. There is a drawback if applying HGP to link prediction. The model only learns a one-side structure, while ignoring the dependency in V. In particular, the attributes of entities v cannot be incorporated even if their entity attributes are available. However, for the mentioned applications, it also makes sense to explore the dependency between movies, or the dependency between authority web pages. 2.1.3 Tensor Gaussian Processes To overcome the shortcoming of HGP, we consider a more complex SRM, which employs two GP kernel functions Σ : U × U →R and Ω: V × V →R. The model explains the relational dependency through the entity dependencies of both V and U. Let θ = {θΣ, θΩ}, we describe a stochastic relational process p(t|θ) as the following: Definition 2.1 (Tensor Gaussian Processes). Given two sets U and V, a collection of random variables {t(u, v)|t : U × V →R} follow a tensor Gaussian processes (TGP), if for every finite sets {u1, . . . , uN} and {v1, . . . , vM}, random variables T = {t(ui, vn)}, organized into an N × M matrix, have a matrix-variate normal distribution NN×M(T|B, Σ, Ω) = (2π)−MN 2 |Σ|−M 2 |Ω|−N 2 etr  −1 2Σ−1(T −B)Ω−1(T −B)⊤  characterized by mean B = {b(ui, vn)} and positive definite covariance matrices Σ = {Σ(ui, uj; θΣ)} and Ω= {Ω(vn, vm; θΩ)}. This random process is denoted as T GP(b, Σ, Ω).2 In the above theorem etr[·] is a shortcut for exp[trace(·)]. It is easy to see that the model reduces to the HGP model if Ω= I. As a key difference, the new model treats the relational function t as a whole sample from a TGP, instead of being formed by i.i.d. functions in the HGP model. Let vec(T⊤) = [t1,1, t1,2, . . . , t1,M, t2,1, . . . , t2,M, . . . , tN,M]⊤. If T ∼NN×M(T|B, Σ, Ω), then vec(T⊤) ∼N(0, Υ), where the covariance Υ = Σ ⊗Ωis the Kronecker product of two covariance matrices [6]. In other words, TGP is in fact a GP for the relational function t, where the kernel function Υ : (U × V) × (U × V) →R is defined via a tensor product of two GP kernels Cov(ti,n, tj,m) = Υ[(ui, vn), (uj, vm)] = Σ(ui, uj)Ω(vn, vm). The model explains the dependence structure of links by the dependence structure of participating entities. It is well known that a linear predictive model has a GP interpretation if its linear weights follow a Gaussian prior. A similar connection exists for TGP. Theorem 2.2. Let U ⊆RP , V ⊆RQ, and W ∼NP ×Q(0, IP , IQ), where IP denotes a P × P identity matrix and ⟨·, ·⟩denotes the inner product, then the bilinear function t(u, v) = u⊤Wv follows T GP(0, Σ, Ω) with Σ(ui, uj) = ⟨ui, uj⟩and Ω(vn, vm) = ⟨vn, vm⟩. 2Hereafter we always assume b(u, v) = 0 in TGP for simplicity. The proof is straightforward through Cov[t(ui, vn), t(uj, vm)] = ⟨ui, uj⟩⟨vn, vm⟩and E[t(ui, vn)] = 0, where E[·] means expectation. In practice, the linear model will help to provide an efficient discriminative approach to link prediction. It appears that link prediction using TGP is almost the same as a normal GP regression or classification, except that the hyperparameters θ now have two parts, θΣ for Σ and θΩfor Ω. Unfortunately TGP inference suffers from a serious computational problem – it does not scale well for even a small size of entities. For example, if there is a fixed portion of missing data for pairwise relationships between N u-entities and M v-entities, the size of observations scales in O(NM). Since GP inference has the complexity cubic to the size of data, the complexity O(N3M 3) of TGP is computationally prohibitive. 2.1.4 A Family of Stochastic Processes for Entity Relationships To improve the scalability of SRM, and also describe the relational dependency in a way similar to TGP, we propose a family of stochastic processes p(t|θ) for entity relationships. Definition 2.3 (Stochastic Relational Processes). A relational function t : U × V →R is said to follow a stochastic relational process (SRP), if t(u, v) = 1 √ d d k=1 fk(u)gk(v), fk(u) iid∼GP(0, Σ), gk(v) iid∼GP(0, Ω). We denote t ∼SRPd(0, Σ, Ω), where d is the degrees of freedom. Interestingly, there exists an intimate connection between SRP and TGP: Theorem 2.4. SRPd(0, Σ, Ω) converges to T GP(0, Σ, Ω) in the limit d →∞. Proof. Based on the central limit theory, for every (ui, vn), ti,n ≡t(ui, vn) converges to a Gaussian random variable. In the next steps, we prove E[ti,n] = 0 and Cov(ti,n, tj,m) = E[ti,ntj,m] = 1 d{d k=1 E[fk(ui)fk(uj)gk(vn)gk(vm)] + d k̸=κ E[fk(ui)fκ(uj)gk(vn)gκ(vm)]} = 1 d d k=1 E[fk(ui)fk(uj)gk(vn)gk(vm)] = Σ(ui, uj)Ω(vn, vm). The theorem suggests that there is a constructive definition of TGP, where relationships are formed via interactions between infinite samples from two GPs. Moreover, given a sufficiently large d, SRP will provide a close approximation to TGP. SRP is a general family of priors for modeling the relationships between entities, in which HGP and TGP are special cases. The generalization offers several advantages: (1) SRP can model symmetric links between the same set of entities. If we build a generative process where U = V, Σ = Ωand fk = gk, then on every finite sets {ui}N i=1, T = {t(ui, uj)} is always a symmetric matrix; (2) Given a fixed d, the inference with SRP obtains a much reduced complexity. In Sec. 3 we will introduce an inference algorithm that scales in O[d(N3 + M 3)], which is much less than O(N 3M 3). 2.2 Choices for the Likelihood p(ri,n|ti,n) The likelihood term describes the dependency of observable relationships on the latent variables. It should be tailored to the types of observations to be modeled. Here we list three possible situations: • Binary Classification: Relationships may take categorical states, e.g., “cue” or ”no cue” in disease-treatment relationship prediction. It is popular to consider binary classification and employ the probit function to model the Bernoulli distribution over class labels, i.e. p(ri,n|ti,n) = Φ (ri,nti,n), where Φ(·) is a cumulative normal function, and ri,n ∈{−1, +1}. • Regression: In this case we consider ri,n taking continuous values. For example, one may want to predict the rating of user u for movie v. The corresponding likelihood function is essentially defined by a noise model, e.g. a univariate Gaussian noise with variance ρ2 and zero mean. • One-class Problem: Sometimes one observed the presence of links between entities, for example, the hyperlinks between web pages. Based on the open-world assumption, if a web page does not link to another, it does not mean that they are unrelated. Therefore, we employ the likelihood p(ri,n|ti,n) = Φ(ri,nti,n −b) for those observed links ri,n = 1, where b is an offset. 3 Inference with Laplacian Approximation We have described the relational model under a prior of SRP, in which HGP and TGP are subcases. Now we develop the inference algorithm to compute the sufficient statistics of the a posteriori distribution of latent variables. Let F = {fi,k}, G = {gn,k}, f k = [f1,k, . . . , fN,k]⊤and gk = [g1,k, . . . , gM,k]⊤, where fi,k = fk(ui), gn,k = gk(vn). Then the posterior distribution p(F, G|RI, θ) is proportional to the joint distribution of the complete data: p  RI, F, G|θ  ∝  (i,n)∈I p ri,n d k=1 fi,kgn,k √ d exp −1 2 d k=1  f ⊤ k Σ−1f k + g⊤ k Ω−1gk  An exact inference is intractable due to the coupling between fi,k and gn,k in the likelihood term. In this paper we apply Laplacian approximation, which approximates p(F, G|RI, θ) by a multivariate normal distribution q(F, G|β) with sufficient statistics β. At the first step, we compute the means by finding the mode in the posterior, {F∗, G∗} = arg min {F,G}  J(F, G) = −log p(RI, F, G|θ)  (2) We solve the minimization by the conjugate gradient method. The gradients are calculated by ∂J(F, G) ∂F = 1 √ d SG + Σ−1F, ∂J(F, G) ∂G = 1 √ d S⊤F + Ω−1G, where S ∈RN×M have elements si,n = ∂[−log p(ri,n|ti,n)]/∂ti,n, ti,n = d k=1 fi,kgn,k/ √ d, if (i, n) ∈I, otherwise si,n = 0. At the second step we calculate the covariance by C = H−1, where H is the Hessian, i.e., the second-order derivatives of J(F, G) with respect to {F, G}. However the inverse is prohibitive because H is a huge matrix. To reduce the complexity, we assume that there exist disjoint groups of latent variables, each group is second-order independent to any other at their equilibriums. We factorize the approximating distribution as q(F, G|β) = d k=1 q(f k|f ∗ k, Σk)q(gk|g∗ k, Ωk), where f ∗ k and g∗ k are the solution from Eq. (2), and Σk, Ωk are the covariances matrices. This follows the facts: (1) Each fk (or gk) indirectly interacts with other f κ (or gκ), κ ̸= k, through the sum  κ̸=k f κg⊤ κ , indicating that f k (or gk) across different k are only loosely dependent to each other, especially for a large d; (2) The dependency between fi,k and gn,k is witnessed via at most only one observation in RI. Therefore we can compute the Hessian for each group separately and obtain the covariances: Σk = (Φ(k) + Σ−1)−1, with φ(k) i,i = n:(i,n)∈I ζi,ng2 n,k d , φ(k) i,j = 0 (3) Ωk = (Ψ(k) + Ω−1)−1, with ψ(k) n,n = i:(i,n)∈I ζi,nf 2 i,k d , ψ(k) n,m = 0 (4) where ζi,n = ∂2[−log p(ri,n|ti,n)]/∂t2 i,n. Then we obtain the sufficient statistics F∗, G∗, {Σk} and {Ωk}. Finally we note that, the posterior distribution of {F, G} has many modes (Simply, shuffling the order of latent dimensions or changing the signs of both fk and gk does not change the probability.). However each mode is equally well in constructing the relational function t. 4 Structural Learning by Hyperparameter Estimation We assign a hyper prior p(θ|α) and estimate θ by maximizing a penalized marginal likelihood θ∗= arg max θ={θΣ,θΩ}  log  G  F p(RI, F, G|θ)dFdG + log p(θ|α)  (5) So far the optimization (5) is quite general. In principal, it allows to learn some parametric forms of kernel functions Σ(ui, uj; θΣ) and Ω(vn, vm; θΩ) that are generalizable to new entities. In this paper we particularly consider an situation where entity attributes are not fully informative or even absent. Therefore we introduce a direct parameterization θΣ = Σ, θΩ= Ω, and assign conjugate inverse-Wishart priors Σ ∼IWN(λd, Σ0) and Ω∼IWM(λd, Ω0), namely p(Σ|λd, Σ0) ∝det(Σ)−λd 2 etr  −λd 2 Σ−1Σ0  , p(Ω|λd, Ω0) ∝det(Ω)−λd 2 etr  −λd 2 Ω−1Ω0  , where λ > 0 so that λd denotes the degrees of freedom, Σ0 and Ω0 are the base kernels. Then we apply an iterative expectation-maximization (EM) algorithm to solve the problem (5). In the E-step, we follow Sec. 3 to compute q(F, G|β). In the M-step, we update the hyperparameters by maximizing the expected log-likelihood of the complete data max {Σ,Ω} Eq [log p(RI, F, G|Σ, Ω)] + log p(Σ|λd, Σ0) + log p(Ω|λd, Ω0) where Eq[·] is the expectation over q(F, G|β). Due to the conjugacy of the hyper prior, the maximization have an analytical solution, Σ = λΣ0 + 1 d d k=1(f ∗ kf ∗ k ⊤+ Σk) λ + 1 , Ω= λΩ0 + 1 d d k=1(g∗ kg∗ k ⊤+ Ωk) λ + 1 . (6) 5 Implementation Details The parameters Σ0, Ω0, d and λ have to be pre-specified. We let the base kernels have the form Σ0(ui, uj) = (1 −a)γ(ui, uj) + aδi,j and Ω0(vn, vm) = (1 −η)ξ(vn, vm) + ηδn,m, where 1 ≥ a, η ≥0, δ is a Dirac delta kernel (δi,j = 1 if i = j, otherwise δi,j = 0), γ(·, ·) and ξ(·, ·) are some kernel functions defined on entity attributes, which reflect our prior notion of similarities between entities. We use a and η to penalize the effects of γ(·, ·) and ξ(·, ·), respectively, when entity attributes are deficient. If the attributes are unavailable, we set a = η = 1. The dimensionality d should be properly chosen, otherwise a too small d may deteriorate the modeling flexibility. We determine d and λ based on the prediction performance on a validation set of links. The learning algorithm iterates the E-step with Eq. (2), (3), (4), and the M-step with Eq. (6) until convergence. In the experiments of this paper we use p(ri,n|t∗ i,n) to make predictions, where t∗is computed from F∗and G∗. In a longer version the predictive uncertainty of ti,n will be considered. 6 Related Work There is a history of probabilistic relational models (PRM) [8] in machine learning. Getoor et al. [5] introduced link uncertainty and defined a generative model for both entity attributes and links. Recently, [12] and [7] independently introduced an infinite (hidden) relational model to avoid the difficulty of structural learning in PRM by explaining links via a potentially infinite number of hidden states of entities. Since discriminatively trained models generally outperform generative models in prediction tasks, Taskar et al. proposed relational Markov networks (RMNs) for link prediction [11], by describing a conditional distribution of links given entity attributes and other links. RMN has to define a class of potential functions on cliques of random variables based on the observed relational structure. Compared to RMN, SRM is nonparametric because structural information (e.g., cliques as well as the classes of potential functions) is not pre-defined but learned from data. Very recently a GP model was developed to learn from undirected graphs [4], which turns out to be a special rank-one case of SRM with d = 1, Σ = Ω, and fk = hk. In another work [1] a SVM using a tensor kernel based on user and item attributes was used to predict user ratings on items, which is similar to our TGP case and suffers a salability problem. When attributes are deficient or unavailable, the model does not work well, while SRM can learn informative kernels purely from only links (see Sec. 7). SRM is interestingly related to the recent fast maximum-margin matrix factorization (MMMF) in [10]. If we fix Σ and Ωas uninformative Dirac kernels, the mode of our Laplacian approximation is equivalent to the solution of Eq.(5) in [10] with the loss function l(ri,n, ti,n) = −log p(ri,n|ti,n). However SRM significantly differs from MMMF in two important aspects: (1) SRM is a supervised predictive model because entity attributes enter the model by forming informative priors (Σ, Ω) and hyper priors (Σ0, Ω0); (2) More importantly, SRM deals with (a) 5 10 15 20 10 20 30 (b) 5 10 15 20 10 20 30 (c) 5 10 15 20 10 20 30 (d) 5 10 15 20 10 20 30 (e) 10 20 30 10 20 30 (f) 5 10 15 20 5 10 15 20 (g) 10 20 30 10 20 30 (h) 5 10 15 20 5 10 15 20 (i) 10 20 30 10 20 30 (j) 5 10 15 20 5 10 15 20 Figure 1: Link prediction on synthetic data: (a) training data, where black entry means positive links, white means negative links, and gray means missing; (b) prediction of MMMF (classification rate 0.906); (c) prediction of SRM with noninformative prior (classification rate 0.942); (d) prediction of SRM with informative prior (classification rate 0.965); (e-f) informative Σ0 and Ω0; (g-h) learned Σ and Ωwith noninformative prior; (i-j) learned Σ and Ωwith informative prior. structural learning by adapting the kernels and marginalizing out the latent relational function, while MMMF only estimates the mode of the latent relational function with fixed Dirac kernels. 7 Experiments Synthetic Data: We generated two sets of entities U = {ui}20 i=1 and V = {vn}30 n=1 on a real line such that ui = 0.1i and vn = 0.1n. The positions of entities were used to compute two RBF kernels that serve as informative Σ0 and Ω0. Then we further made a deformation on the real line to form 2 clusters in U and 3 clusters in V. RBF function computed on the deformed scale gives two kernel matrices Σ and Ωwhose diagonal block structure reflects the clusters. Binary links between U and V are obtained by taking the sign of a function, which is a sample from T GP(0, Σ, Ω). We randomly withdrew 50% of links for training, and left the remaining for test (see Fig. 1-(a)). We performed two variants of SRM, one with informative Σ0 and Ω0 (see Fig. 1-(e,f)) and the other with noninformative Dirac kernels Σ0 = Ω0 = I, and compared with MMMF [10]. In all the cases we set d = 20. The classification accuracy rates of two SRMs, 0.942 and 0.965, are both better than 0.906 of MMMF. As shown in Fig. 1, the block structures of learned kernels indicate that both SRMs can learn the cluster structure of entities from links. The structural kernel optimization enables SRM to outperform MMMF, even with a completely noninformative prior. Note that the informative prior really helps SRM to achieve the best accuracy. Eachmovie Data: We tested our algorithms on a data set from [3], which is a subset of EachMovie data, containing 5000 users’ ratings, i.e., 1, 2, 3, 4, 5, or 6, on 1623 movies. We selected the first 1000 users and organized the data into a 1000 × 1623 table with 63, 592 observed ratings. We compared SRM with MMMF in a regression task to predict the ‘rating link’ between users and movies. In SRM we set Σ0 = Ω0 = I. For both methods the dimensionality was chosen as d = 20. In MMMF we used the square error loss. We repeated the experiments for 10 times, where at each time we randomly withdrew 70% ratings for training and left the remaining for test. Root-mean-square error (RMSE) and mean-absolute error (MAE) were used to evaluate the accuracy. The results of all the repeats, as well as the means and standard deviations, are shown in Table 1 and Table 2. Compared to MMMF, SRM significantly reduces the prediction error by over 12% in terms of both RMSE and MAE. 8 Conclusions and Future Extensions In this paper we proposed a stochastic relational model (SRM) for learning relational data. Entity relationships are modeled by a tensor interaction of multiple Gaussian processes (GPs). We proposed a family of relational processes and showed its convergence to a tensor Gaussian process if the degrees of freedom goes to infinity. The process imposes an effective prior on the entity relationships, Table 1: User-movie rating prediction error measured by RMSE Repeats 1 2 3 4 5 6 7 8 9 10 mean ± std. MMMF 1.366 1.367 1.372 1.377 1.363 1.368 1.356 1.380 1.358 1.373 1.368 ± 0.008 SRM 1.195 1.199 1.192 1.200 1.198 1.209 1.204 1.208 1.189 1.209 1.200±0.007 Table 2: User-movie rating prediction error measured by MAE Repeats 1 2 3 4 5 6 7 8 9 10 mean ± std. MMMF 1.067 1.066 1.074 1.076 1.066 1.073 1.060 1.074 1.062 1.072 1.060±0.006 SRM 0.924 0.928 0.924 0.923 0.924 0.934 0.931 0.932 0.918 0.933 0.927± 0.005 and leads to a discriminative link prediction model. We demonstrated the excellent results of SRM on a synthetic data set and a user-movie rating prediction problem. Though the current work focused on the application of link prediction, the model can be used for general relational learning purposes. There are several directions to extend the current model: (1) SRM can describe a joint distribution of entity links and entity classes conditioned on entity-wise GP kernels. Therefore entity classification can be solved in a relational context; (2) One can extend SRM to model multi-way relations where more than two entities participate in a single relationship; (3) SRM can also be applied to model pairwise relations between multiple entity sets, where kernel updates amount to propagation of information through the entire relational network; (4) As discussed in Sec. 2.1.2, SRM is a natural extension of hierarchical Bayesian multi-task models, by explicitly modeling the dependency over tasks. In a recent work [2] a tensor GP for multi-task learning was independently suggested; (5) Finally, it is extremely important to make the algorithm scalable to very large relational data, like the Netflix problem, containing about 480,000 users and 17,000 movies. Acknowledgement The authors thank Andreas Krause, Chris Williams, Shenghuo Zhu, and Wei Xu for the fruitful discussions. References [1] J. Basilico and T. Hofmann. Unifying collaborative and content-based filtering. In Proceedings of the 21st International Conference on Machine Learning (ICML), 2004. [2] E. V. Bonilla, F. V. Agakov, and C. K. I. Williams. Kernel multi-task learning using task-specific features. In Proceedings of the 11th International Conference on Artificial Intelligence and Statistics (AISTATS), 2007. To appear. [3] J. S. Breese, D. Heckerman, and C. Kadie. Empirical analysis of predictive algorithms for collaborative filtering. In Proceedings of the 14th Conference on Uncertainty in Artificial Intelligence (UAI), 1998. [4] W. Chu, V. Sindhwani, Z. Ghahramani, and S. S. Keerthi. Relational learning with gaussian processes. In Neural Information Processing Systems (NIPS), 2007. To appear. [5] L. Getoor, E. Segal, B. Taskar, and D. Koller. Probabilistic models of text and link structure for hypertext classification. In Proceedings ICJAI Workshop on Text Learning: Beyond Supervision, 2001. [6] Arjun K. Gupta and Daya K. Naga. Matrix Variate Distributions. 1999. [7] 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 21st National Conference on Artificial Intelligence (AAAI), 2006. [8] D. Koller and A. Pfeffer. Probabilistic frame-based systems. In Proceedings of National Conference on Artificial Intelligence (AAAI), 1998. [9] C. Rasmussen and C. K. I. Williams. Gaussian Processes for Machine Learning. MIT Press, 2006. [10] Jason D. M. Rennie and Nati Srebro. Fast maximum margin matrix factorization for collaborative prediction. In Proceedings of the 22nd International Conference on Machine Learning (ICML), 2005. [11] B. Taskar, M. F. Wong, P. Abbeel, and D. Koller. Link prediction in relational data. In Neural Information Processing Systems Conference (NIPS), 2004. [12] Z. Xu, V. Tresp, K. Yu, and H.-P. Kriegel. Infinite hidden relational models. In Proceedings of the 22nd International Conference on Uncertainty in Artificial Intelligence (UAI), 2006. [13] K. Yu, V. Tresp, and A. Schwaighofer. Learning Gaussian processes from multiple tasks. In Proceedings of 22nd International Conference on Machine Learning (ICML), 2005.
2006
85
3,109
Adaptive Spatial Filters with predefined Region of Interest for EEG based Brain-Computer-Interfaces Moritz Grosse-Wentrup Institute of Automatic Control Engineering Technische Universit¨at M¨unchen 80333 M¨unchen, Germany moritz@tum.de Klaus Gramann Department Psychology Ludwig-Maximilians-Universit¨at M¨unchen 80802 M¨unchen, Germany gramann@psy.uni-muenchen.de Martin Buss Institute of Automatic Control Engineering Technische Universit¨at M¨unchen 80333 M¨unchen, Germany mb@tum.de Abstract The performance of EEG-based Brain-Computer-Interfaces (BCIs) critically depends on the extraction of features from the EEG carrying information relevant for the classification of different mental states. For BCIs employing imaginary movements of different limbs, the method of Common Spatial Patterns (CSP) has been shown to achieve excellent classification results. The CSP-algorithm however suffers from a lack of robustness, requiring training data without artifacts for good performance. To overcome this lack of robustness, we propose an adaptive spatial filter that replaces the training data in the CSP approach by a-priori information. More specifically, we design an adaptive spatial filter that maximizes the ratio of the variance of the electric field originating in a predefined region of interest (ROI) and the overall variance of the measured EEG. Since it is known that the component of the EEG used for discriminating imaginary movements originates in the motor cortex, we design two adaptive spatial filters with the ROIs centered in the hand areas of the left and right motor cortex. We then use these to classify EEG data recorded during imaginary movements of the right and left hand of three subjects, and show that the adaptive spatial filters outperform the CSP-algorithm, enabling classification rates of up to 94.7 % without artifact rejection. 1 Introduction Brain-Computer-Interfaces (BCIs) allow communication without using the peripheral nervous systems by detecting intentional changes in the mental state of a user (see [1] for a review). For BCIs based on electroencephalography (EEG), different mental states are correlated with spatio-temporal pattern changes in the EEG. These can be detected and used for transmitting information by a suitable classification algorithm. While a variety of mental states can be used to induce pattern changes in the EEG, most BCIs utilize motor imagery of different limbs for this purpose. This is based on the observation that movement preparation of a certain limb leads to a power decrease (event related desynchronization - ERD) in the µ- (∼8 −12 Hz) and β-spectrum (∼18 −26 Hz) over the area of the contralateral motor cortex representing the specific limb [2]. This ERD can also be observed in motor imagery, which was first used in [3] to discriminate imaginary movements of the left vs. imaginary movements of the right hand. While the methods presented in this paper are also applicable to BCIs that are not based on motor imagery, we restrict the discussion to this class of BCIs for sake of simplicity. In general, a BCI has to accomplish two tasks. The first task is the feature extraction, i.e., the extraction of information from the EEG relevant for discriminating different mental states. The second task is the actual classification of these feature vectors. For BCIs based on EEG, the feature extraction is aggravated by the fact that due to volume conduction only the superimposed electric activity of a large area of cortex can be measured at every electrode. While it is known that the ERD caused by motor imagery originates in the motor cortex [4], the EEG measured on the scalp over the motor cortex includes electrical activity of multiple neural sources that are not related to the imaginary movements. This in turn leads to a lower signal-to-noise-ratio (SNR) and subsequently to a lower classification accuracy. For this reason, algorithms have been developed that use multiple recording sites (electrodes) to improve feature extraction. One of the most successful algorithms in this context, as evidenced by the 2003 BCI Competition [5], is the method of Common Spatial Patterns (CSP). It was introduced to EEG analysis in [6] and first utilized for BCIs in [7]. Given two EEG data sets recorded during motor imagery of the left and right hand, the CSP-algorithm finds two linear transformations that maximize the variance of the one while minimizing the variance of the other data set. With the CSP-algorithm used for feature extraction, it has been shown that a simple linear classification algorithm suffices to obtain classification rates above 90 % for trained subjects [7]. While these are impressive results, the CSP algorithm suffers from a lack of robustness. The algorithm is trained to maximize the differences between two datasets, regardless of the cause of these differences. In the ideal case the spatio-temporal differences are caused only by the motor imagery, in which case the algorithm can be claimed to be optimal. In practice, however, the differences between two datasets will be due to multiple causes such as spontaneous EEG activity, other mental states or any kind of artifacts. For example, if a strong artifact is present in only one of the data sets, the CSP is trained on the artifact and not on the differences caused by motor imagery [7]. Consequently, the CSP algorithm requires artifact free data, which is a serious impairment for its practical use. In this paper, we propose to replace the information used for training in the CSP algorithm by apriori information. This is possible, since it is known that the signal of interest for the classification of imaginary movements originates in the motor cortex [4]. More specifically, we design an adaptive spatial filter (ASF) that maximizes the ratio of the variance of the electric field originating in a predefined region of interest (ROI) in the cortex and the overall variance of the EEG measurements. In this way, we can design spatial filters that optimally suppress electric activity originating from other areas than the chosen ROI. By designing two spatial filters with the respective ROIs centered in the hand areas of the motor cortex in the left and right hemisphere, we achieve a robust feature extraction that enables better classification results than obtained with the CSP-algorithm. The rest of this paper is organized as follows. In the methods section, we briefly review the CSPalgorithm, derive the ASF and discuss its properties. In the results section, the ASF is applied to EEG data of three subjects, recorded during imaginary movements of the right and left hand. The results are compared with the CSP-algorithm, and it is shown that the ASF is superior to the CSP approach. This is evidenced by a significant increase in measured ERD and higher classification accuracy. We conclude the paper with a discussion of the results and future lines of research. 2 Methods In this section we will first briefly review the CSP-algorithm, and then show how the information used for training the CSP-algorithm can be replaced by a-priori information. We then derive the ASF, and conclude the section with some remarks on the theoretical properties of the ASF. 2.1 The Common Spatial Patterns Algorithm Given two EEG data sets x1 ∈RN×T and x2 ∈RN×T with N the number of electrodes and T the number of samples, the CSP-algorithm finds a linear transformation w that maximizes the variance of the one while minimizing the variance of the other data set. This can be formulated as the following optimization problem [8]: max w wTR1w wTR2w  (1) with R1 and R2 the spatial covariance matrices of x1 and x2. This optimization problem is in the form of the well known Rayleigh quotient, which means that the solution to (1) is given by the eigenvector with the largest eigenvalue of the generalized eigenvalue problem R1w = λR2w. (2) The two eigenvectors w1 and w2 with the largest and smallest respective eigenvalue represent two spatial filters that maximize the variance of the one while minimizing the variance of the other data set. If data set x1 was recorded during imaginary movements of the left while data set x2 was recorded during imaginary movements of the right hand, and the differences between the two data sets are only caused by motor imagery, the two spatial filters w1 and w2 optimally (in terms of the second moments) extract the component of a data set caused by the respective motor imagery. In practice, however, the differences between two datasets will have multiple causes such as spontaneous EEG activity, mental states unrelated to the motor imagery or muscular artifacts. If the CSP-algorithm is applied to such data, the linear transformations w1/2 will be trained to extract the artifactual components of the EEG and not the spatial-temporal pattern changes caused by the motor imagery. 2.2 Derivation of the Adaptive Spatial Filter To overcome the sensitivity of the CSP-algorithm to artifacts in the EEG, and achieve a robust feature extraction, we replace the information used for training in the CSP-algorithm by a-priori information. In the case of motor imagery, the specific a-priori information is that the signal of interest for classification originates in the motor cortex. We will now show how the component of the EEG originating in a certain ROI, chosen to correspond to the motor cortex for our purpose, can be estimated in an optimal manner. In general, it would be desirable to derive a spatial filter that eliminates all electric activity that does not originate in a chosen ROI. This however is not possible due to the ill-posed nature of the inverse problem of EEG (c.f., [9]). In EEG recordings, electric activity originating from an infinite dimensional space (the continuous current distribution within the brain) is mapped onto a finite number of measurement electrodes. Hence, the best one can do is to find a spatial filter that in some sense optimally suppresses all activity not originating in the chosen ROI. Towards this goal, note that the electric field generated by the brain at a position r outside the head is given by (c.f., [10]) Φ(r, t) = Z V L(r, r′)TP(r′, t)dV (r′), (3) with V the volume of the brain, P : R3 × R 7→R3 the tissue dipole moment (source strength) at position r′ and time t in x, y, and z - direction, and L : R3 × R3 7→R3 the so called leadfield equation, describing the projection strength of a source with dipole moment in x, y, and z - direction at position r′ to a measured electric field at position r. Note that the leadfield equation incorporates all geometric and conductive properties of the brain. In EEG recordings, the electric field of the brain is spatially sampled at i = 1 . . . N electrodes on the scalp with position ri, resulting in a measurement vector x(t) with the elements xi(t) = Z V L(ri, r′)TP(r′, t)dV (r′), i = 1 . . . N. (4) We now wish to find a linear transformation of the measured EEG y(t) = wTx(t) (5) that maximizes the ratio of the variance of the electric field originating in a certain area of the cortex and the overall variance. For this we define the component of the EEG originating in a certain ROI as ˜x(t), with the elements ˜xi(t) = Z ROI L(ri, r′)TP(r′, t)dV (r′), i = 1 . . . N. (6) The spatial filter w is then found by max w {f(w)} with f(w) = wT˜x(t)˜x(t)Tw wTx(t)x(t)Tw = wTR˜x(t)w wTRx(t)w (7) and R˜x(t) and Rx(t) the (spatial) covariance matrices of ˜x(t) and x(t). Note that this optimization problem is in the same form as that of the CSP-algorithm in (1). As for (1), the solution to (7) is given by the eigenvector with the largest eigenvalue of the generalized eigenvalue problem R˜x(t)w = λRx(t)w. (8) The crucial difference between the CSP- and the ASF-algorithm is that for the CSP-algorithm the covariance matrix R1 in the numerator of (1), describing the signal subspace of the data, is given by the measured EEG of one condition. For the ASF-algorithm, the corresponding covariance matrix R˜x(t) is replaced by a-priori knowledge independent of the measured EEG. We will now show how estimates of the two covariance matrices R˜x(t) and Rx(t), necessary for solving (8), can be obtained. Assuming stationarity of the EEG, i.e., a constant covariance matrix, Rx(t) can be replaced by the estimated sample covariance matrix ˆRx = 1 T T X t=1 x(t)x(t)T, (9) with T the number of samples. The covariance matrix of the EEG originating in the ROI however is substantially harder to estimate. To obtain an estimate of R˜x(t), we first derive an estimate of (6). This is done by placing an equally spaced grid with nodes at locations r′ i, i = 1 . . . M in the ROI, and replacing the integral over the ROI by a sum over the M grid points, ˜xi(t) = M X j=1 L(r′ j, ri)TP(r′ j, t). (10) The estimated component of the EEG originating in the ROI can then be written in matrix notation as ˜x(t) = Lp(t), (11) with L ∈RN×3M describing the projection strength of the M sources in x, y, and z - direction to each of the N electrodes, and p(t) ∈R3M representing the dipole moments of the M sources. The estimate of the covariance matrix is then given by ˆR˜x(t) = Lp(t)p(t)TLT = LRp(t)LT. (12) In absence of any prior knowledge, the covariance matrix of the sources in the ROI is assumed to be the identity matrix, i.e., Rp(t) = I3M. The leadfield matrix L on the other hand can be estimated by a suitable model of EEG volume conduction. For sake of simplicity, we only consider a four-shell spherical head model, i.e., each column li of the leadfield matrix L is found by placing a single current dipole with unit dipole moment at position ri in a four shell spherical head model, and calculating its projection to each of the N electrodes [11]. In summary, the adaptive linear spatial filter w is given by the eigenvector with the largest eigenvalue of the generalized eigenvalue problem LLTw = λ ˆRxw. (13) Note that the largest eigenvalue corresponds to the achieved ratio of the ASF, i.e., f(w) = λ. The largest eigenvalue of (13) thus is a measure for the quality of the obtained ASF. It is also important to point out that the covariance matrix of the component of the EEG originating in the ROI is assumed to be the identity matrix, implying that sources in the ROI are not correlated. This surely is an assumption that is not physiologically justified. We will address this issue in the discussion. Finally, note that the quality of the obtained filter also depends on the rank of the covariance matrix of the electric activity originating in the ROI. The higher the rank of R˜x, the more degrees of freedom of the spatial filter are required to pass activity from the signal subspace, i.e., activity originating in the ROI, and consequently less degrees of freedom are available for suppressing electric activity originating outside the ROI. The quality of the spatial filter thus decreases with the rank of R˜x. For this reason, it is beneficial to only consider radially oriented dipole sources in the ROI, which leads to a covariance matrix with a lower rank than if dipole moments in x, y, and z direction are considered. Furthermore, this is a physiologically justified assumption, since neurons in a cortical column are oriented radially to the surface of the cortex (c.f., [9]). 3 Results In this section, we evaluate the effectiveness of the ASF by applying it to EEG data gathered from three subjects during motor imagery of the right and left hand, and compare its performance with the CSP-algorithm. Subsequently motor imagery of the left/right hand will be termed condition IL/IR. 3.1 Experimental Setup Three subjects (S1, S2, S3) participated in the experiment, all of which were male, aged 26, 30, and 27 years, and had no known neurological disorders. Subjects S1 and S2 had no experience with motor imagery or BCIs, while subject S3 participated in a motor imagery experiment for the second time. The subjects were placed in a shielded room approximately two meters in front of a screen, and were asked to continually imagine opening and closing their right/left hand as long as an arrow pointing in the respective direction was displayed on the screen. The subjects were explicitly instructed to perform haptic motor imagery, i.e., to feel how they were opening and closing their hands, to ensure that actual motor imagery and not visual imagery was used. Each trial started with a fixation cross, which was superimposed by an arrow either pointing to the right or to the left after three seconds. The center of the arrow was placed in the middle of the screen to avoid lateralized visual evoked potentials. The arrow was removed again after further seven seconds, indicating the end of one trial. A total of 300 trials were recorded for each subject, consisting of 150 trials for each condition in randomized order. During the experiment, EEG was recorded at 128 channels with a sampling rate of 500 Hz. Electrode Cz was used as a reference, and the data was re-referenced offline to common average. The spatial position of each electrode was measured with a tracking system. No trials were rejected and no artifact correction was employed. 3.2 Design of the Common Spatial Patterns For each subject, the CSPs were found by by first bandpass-filtering the data between 10 - 30 Hz (as suggested in [7]) using a sixth order butterworth filter, and then calculating the sample covariance matrices R1 and R2 for both conditions (IL and IR) of all trials in a time window ranging from 3.5 to 10 s (i.e., starting 500 ms after the instruction which motor imagery to perform). Equation (2) was then solved and only the two most discriminative eigenvectors w1,CSP and w2,CSP, i.e., those with the largest and smallest respective eigenvalue, were used to obtain estimates of the two most discriminative components of each data set. 3.3 Design of the Adaptive Spatial Filters To obtain estimates of the electric field originating in the hand areas of the left and right motor cortex, two ASFs were designed. For the first ASF, the ROI was chosen as a sphere located 1 cm inside the cortex radially below electrode C3 (centered above the hand area of the motor cortex of the left hemisphere) with a radius of 1 cm. Radially oriented dipoles with unit moment were placed on an equally spaced grid 2 mm apart from each other inside the sphere, and their respective projections to each of the electrodes were calculated as in [11] to obtain an estimate of the leadfield matrix L in (11). For this purpose, the measured positions of the electrodes were radially projected onto the outermost sphere of the headmodel. The second ASF was designed in the same fashion, but with the center of the sphere located at the same depth as the first one radially below electrode C4 (centered above the hand area of the motor cortex of the right hemisphere). For each of the 300 trials of each subject, the data covariance matrix of the recorded EEG was estimated according to (9), using EEG data in the same time window as for computation of the CSPS (3.5 to 10 s of each trial). The two ASFs with the ROIs centered below electrodes C3 and C4 were then calculated by solving the generalized eigenvalue problem (13), and taking the eigenvector with the largest eigenvalue as the ASF. The estimated activity inside the ROIs was then obtained by multiplying the ASFs with the observed EEG of that trial according to (5). Note that this was done independently for each recorded trial. C3 / C4 CSP 1/ CSP 2 ASF 1 / ASF 2 IR - IL IL - IR Time [s] Time [s] Time [s] Hz Hz dB dB 5 5 10 10 15 15 20 20 25 25 30 30 35 35 40 40 45 45 0 0 2 2 4 4 6 6 8 8 −2 −2 −4 −4 −6 −6 −8 −8 1 1 1 2 2 2 3 3 3 4 4 4 5 5 5 6 6 6 7 7 7 8 8 8 9 9 9 Figure 1: Difference plots of ERS/ERD relative to pre-stimulus baseline (0 - 3 s) between conditions IL and IR for subject S3. Time of stimulus onset is marked by the dotted vertical line. See text for explanations. 3.4 Experimental Results To obtain estimates of the frequency bands suitable for classification, event related synchronization and desynchronization (ERS/ERD) was calculated for each subject relative to the pre-stimulus baseline (0 - 3 s) as implemented in [12]. This was done independently for the EEG measured at electrodes C3 and C4, the EEG components obtained by the CSP-algorithm and the estimated EEG components originating in the motor cortex as obtained by the ASFs. Since motor imagery leads to a contralateral ERD, the ERS/ERD of condition IL was subtracted from the ERS/ERD of condition IR for measurements at electrode C3 and spatial filters focusing on the left hemisphere, and vice versa for measurements at electrode C4 and spatial filters focusing on the right hemisphere. The results for subject S3 are shown in Fig. 1. As can be seen in the first column, an ERD-difference of about 3 dB can be measured over the contralateral motor cortex at electrodes C3 and C4 in two frequency bands, starting briefly after the instruction to perform the motor imagery. The two reactive frequency bands are centered roughly around 12 and 25 Hz, agreeing well with the expected ERD in the µ- and β-band [3]. The components extracted by the CSPs, shown in the second column of Fig. 1, show a different picture. While the first CSP (top row) extracts the ERD in the µ- and β-band with roughly the same SNR as in the first row of Fig. 1, high-frequency noise is also mixed in. The second CSP (bottom row) on the other hand does not extract the ERD related to motor imagery, but focuses on a strong artifactual component above 15 Hz. The third column of Fig. 1 shows the results obtained with the ASFs centered radially below electrodes C3 and C4. The observed ERD is similar to the one measured directly at electrodes C3 and C4 (first column of Fig. 1), but shows a much stronger ERD of about 7 dB in the µ- and β-band. These observation are also reflected in the actual CSPs (calculated for the whole data set) and ASFs (calculated for one representative trial) of subject S3 shown in Fig. 2. While CSP 1 focuses on electrodes in the vicinity of electrode C3, CSP 2 focuses on frontal areas of the recorded EEG that are not related motor control. The ASFs on the other hand can be seen to focus on motor areas surrounding electrodes C3 and C4, with various minor patches distributed over the scalp that suppress electric activity originating outside the ROI. It is thus evident that the ASFs improve the SNR of the component of the EEG related to motor imagery relative to just measuring the ERD above the motor cortex, while the CSPs fail to extract the ERD related to motor imagery due to artifactual components. Similar ERS/ERD results were obtained for subject S2, while only a very weak ERS/ERD could be observed for subject S1 for all three evaluation schemes. The ERD plots at electrodes C3 and C4 of each subject were then used to heuristically determine the time window and two reactive frequency bands used for actual classification. These are summarized in Tab. 1. For classification, the reactive frequency bands of the data sets obtained by the ASF 1 CSP 1 ASF 2 CSP 2 C3 C3 C3 C3 C4 C4 C4 C4 Figure 2: Spatial filters obtained by the CSP- and the ASF-algorithm for subject S3. Table 1: Classification results SUBJECT TIME WINDOW FREQ. BANDS C3/C4 CSP ASF S1 3.5 - 10 s 17 - 18 & 26 - 28 Hz 58.0 % 48.3 % 63.0 % S2 3.5 - 10 s 9 - 12.5 & 23 - 26 Hz 87.0 % 49.0 % 90.3 % S3 3.5 - 10 s 12 - 14 & 20 - 30 Hz 77.3 % 60.7 % 94.7 % CSP-algorithm, the ASFs, and the raw EEG data measured at electrodes C3 and C4 were extracted by using a sixth-order butterworth filter. For each of the three evaluation approaches, the feature vectors were formed by calculating the variance in each of the two frequency bands for each trial. This resulted in a four dimensional feature vector for each trial and each evaluation approach. The feature vectors were then classified using leave-one-out cross validation with Fisher Linear Discriminant Analysis (c.f., [13]). Note that for the CSP algorithm this required recalculation of the CSPs for each cross validation. The classification results for each approach and all three subject are shown in Tab. 1. As can be seen in Tab. 1, the ASFs lead to an increase in classification accuracy relative to measuring the ERS/ERD at electrodes C3 and C4 of 3.3 - 17.4 %. The CSP-algorithm on the other hand leads to worse classification results compared to only using the ERS/ERD measured at electrodes C3/C4. In fact, for S1 and S2 the classification accuracy was not above chance for the CSP-algorithm. In agreement with [7], the ERS/ERD as well as the CSP plots for subjects S1 and S2 (not shown here) indicate that this is due to the fact that the CSPs focus on artifactual components that are not related to motor imagery. Subjects S2 and S3 achieved a classification accuracy of 90.3 and 94.7 % using the ASFs, while subject S1 only achieved 63 %. This correlates with the personal report of the subjects, with S2 and S3 reporting that they considered their motor imagery to be successful, while S1 reported difficulties in imaging opening and closing his hands. 4 Discussion In this paper, we presented a new approach for feature extraction for EEG-based BCIs. We derived an adaptive spatial filter that maximizes the ratio of the variance of the electric field originating in a specified ROI of cortex and the overall variance of the measured EEG. By designing two ASFs with the ROIs centered in the hand areas of the motor cortex, we showed that classification accuracy of imaginary movements of the left and right hand increased between 3.3 and 17.4 % relative to using the EEG measured directly above motor areas at electrodes C3 and C4. This was achieved without any artifact correction or rejection of trials. In contrast, applying the CSP-algorithm to the same data sets lead to a classification accuracy below that of only using recordings from electrodes C3 and C4 for feature extraction for one subject, and a classification accuracy that was not above chance for the other two subjects. This was due to the lack of robustness of the CSP-algorithm, focusing on artifactual components of the EEG. We thus conclude that the proposed ASF-method enables a significant increase in classification accuracy, and is very robust to artifactual components in the EEG. While the presented results are already promising, several aspects of the ASF can be further optimized. These include the four-shell spherical head model used for estimating the leadfield matrix, which is the most simple and inaccurate model available in the literature. Employing more realistic models for volume conduction, such as finite element or boundary element methods (FEM/BEM), are expected to further increase classification accuracy. Furthermore, the ROIs were heuristically chosen as spheres located radially below electrodes C3 and C4. Due to individual differences in physiology and/or misplacement of the electrode caps, the ROIs were unlikely to be centered in the hand areas of the motor cortex of each subject. Optimization of the center and extent of the ROI, either by a-priori knowledge gained by fMRI scans or by numerical optimization of the ERD in specific frequency bands, is expected to lead to higher SNRs and hence higher classification accuracy. Another issue that can be addressed to improve performance of the ASF is the physiologically not justified assumption of uncorrelated sources in the ROI. Besides optimization issues of parameters, future lines of research include extending the algorithm to multi class problems, e.g., BCIs using motor imagery of more than two limbs. Conceptually, this can be done by designing another ASF centered in that area of motor cortex representing the specific limb. Further research has to show which body parts are most suited for this task. Finally, all work presented here has been done offline. Online versions of the ASF-algorithm are under development and will be presented in future work. References [1] J.R. Wolpaw, N. Birbaumer, D.J. McFarland, G. Pfurtscheller, and T.M. Vaughan. Braincomputer interfaces for communication and control. Clinical Neurophysiology, 113(6):767– 791, 2002. [2] H.H. Jasper and W. Penfield. Electrocorticograms in man: effect of the voluntary movement upon the electrical activity of the precentral gyrus. Arch. Psychiat. Z. Neurol., 183:163–174, 1949. [3] G. Pfurtscheller, Ch. Neuper, D. Flotzinger, and M. Pregenzer. EEG-based discrimination between imagination of right and left hand movement. Electroencephalography and Clinical Neurophysiology, 103:642–651, 1997. [4] G. Pfurtscheller and F.H. Lopes da Silva. Event-related EEG/MEG synchronization and desynchronization: basic principles. Clinical Neurophysiology, 110:1842–1857, 1999. [5] G. Blanchard and B. Blankertz. BCI competition 2003 - data set IIa: Spatial patterns of self-controlled brain rythm modulations. IEEE Transactions on Biomedical Engineering, 51(6):1062–1066, 2004. [6] Z.J. Koles. The quantitative extraction and topographic mapping of the abnormal components in the clinical EEG. Electroencephalography and Clinical Neurophysiology, 79:440– 447, 1991. [7] H. Ramoser, J. Mueller-Gerking, and G. Pfurtscheller. Optimal spatial filtering of single trial EEG during imagined hand movement. IEEE Transactions on Rehabilitation Engineering, 8(4):441–446, 2000. [8] L.C. Parra, C.D. Spence, A.D. Gerson, and P. Sajda. Recipes for linear analysis of EEG. Neuroimage, 28:326–341, 2005. [9] S. Baillet, J.C. Mosher, and R.M. Leahy. Electromagnetic brain mapping. IEEE Signal Processing Magazine, 18(6):14–30, 2001. [10] P.L. Nunez and R. Shrinivasan. Electric Fields of the Brain. The Neurophysics of EEG. Oxford University Press, 2nd edition, 2006. [11] B.N. Cuffin and D. Cohen. Comparison of the magnetoencephalogram and electroencephalogram. Electroencephalography and Clinical Neurophysiology, 47(2):132–146, 1979. [12] A. Delorme and S. Makeig. EEGLAB: an open source toolbox for analysis of single-trial EEG dynamics. Journal of Neuroscience Methods, 134:9–21, 2004. [13] R.O. Duda, P.E. Hart, and D.G. Stork. Pattern Classification. Wiley, 2nd edition, 2000.
2006
86
3,110
A recipe for optimizing a time-histogram Hideaki Shimazaki Department of Physics, Graduate School of Science Kyoto University Kyoto 606-8502, Japan shimazaki@ton.scphys.kyoto-u.ac.jp Shigeru Shinomoto Department of Physics, Graduate School of Science Kyoto University Kyoto 606-8502, Japan shinomoto@scphys.kyoto-u.ac.jp Abstract The time-histogram method is a handy tool for capturing the instantaneous rate of spike occurrence. In most of the neurophysiological literature, the bin size that critically determines the goodness of the fit of the time-histogram to the underlying rate has been selected by individual researchers in an unsystematic manner. We propose an objective method for selecting the bin size of a time-histogram from the spike data, so that the time-histogram best approximates the unknown underlying rate. The resolution of the histogram increases, or the optimal bin size decreases, with the number of spike sequences sampled. It is notable that the optimal bin size diverges if only a small number of experimental trials are available from a moderately fluctuating rate process. In this case, any attempt to characterize the underlying spike rate will lead to spurious results. Given a paucity of data, our method can also suggest how many more trials are needed until the set of data can be analyzed with the required resolution. 1 Introduction The rate of spike occurrence, or the firing rate, of a neuron can be captured by the (peri-stimulus) time-histogram (PSTH) [1, 2], which is constructed easily as follows: Align spike sequences to the onset of stimuli, divide time into discrete bins, count the number of spikes that enter each bin, and divide the counts by the bin size and the number of sequences. The shape of a PSTH depends on the choice of the bin size. With too large a bin size, one cannot represent the detailed time-dependent rate, while with too small a bin size, the time-histogram fluctuates greatly and one cannot discern the underlying spike rate. There exists an ideal bin size for estimating the spike rate for each set of experimental data. This important parameter has mostly been selected subjectively by individual researchers. We devised a method of selecting the bin size objectively so that a PSTH best approximates the underlying rate, which is unknown. In the course of our study, we found an interesting paper that proposed an empirical method of choosing the histogram bin size for a probability density function (Rudemo M, (1982) Scandinavian Journal of Statistics 9: 65-78 [3]). Although applicable to a Poisson point process, this theory appears to have rarely been applied to PSTHs. It would be preferable to have a theory in accordance with the procedures of neurophysiological experiments in which a stimulus is repeated to extract a signal from a neuron. Given a set of experimental data, we wish to not only determine the optimal bin size, but also estimate how many more experimental trials should be performed in order to obtain a resolution we deem sufficient. It was revealed by a theoretical analysis that the optimal bin size may diverge for a small number of spike sequences derived from a moderately fluctuating rate [4]. This implies that any attempt to characterize the underlying rate will lead to spurious results. The present method can indicate the divergence of the optimal bin size only from the spike data. Even under such a condition, the present method nevertheless provides an inference on the number of trails that need to be performed in order to obtain a meaningful estimated rate. 2 Methods We consider sequences of spikes repeatedly recorded from identical experimental trials. A recent analysis revealed that in vivo spike trains are not simply random, but possess inter-spike-interval distributions intrinsic and specific to individual neurons [5, 6]. However, spikes accumulated from a large number of spike trains recorded from a single neuron are, in the majority, mutually independent. Being free from the intrinsic inter-spike-interval distributions of individual spike trains, the accumulated spikes can be regarded as being derived repeatedly from Poisson processes of an identical time-dependent rate [7, 8]. It would be natural to assess the goodness of the fit of the estimator ˆλt to the underlying spike rate λt over the total observation period T by the mean integrated squared error (MISE), MISE ≡1 T Z T 0 E (ˆλt −λt)2 dt, (1) where E refers to the expectation over different realization of point events, given λt. We suggest a method for minimizing the MISE with respect to the bin size ∆. The difficulty of the present problem comes from the fact that the underlying spike rate λt is not known. 2.1 Selection of the bin size We choose the (bar-graph) PSTH as a way to estimate the rate ˆλt, and explore a method to select the bin size of a PSTH that minimizes MISE in Eq.(1). A PSTH is constructed simply by counting the number of spikes that belong to each bin. For an observation period T, we obtain N = ⌊T/∆⌋ intervals. The number of spikes accumulated from all n sequences in the ith interval is counted as ki. The bar height at the ith bin is given by ki/n∆. Given a bin of width ∆, the expected height of a bar graph for t ∈[0, ∆] is the time-averaged rate, θ = 1 ∆ Z ∆ 0 λt dt. (2) The total number of spikes k from n spike sequences that enter a bin of width ∆obeys a Poisson distribution with the expected number n∆θ, p(k | n∆θ) = (n∆θ)k k! e−n∆θ . (3) The unbiased estimator for θ is given as ˆθ = k/(n∆), which is the empirical height of the bar graph for t ∈[0, ∆]. By segmenting the total observation period T into N intervals of size ∆, the MISE defined in Eq.(1) can be rewritten as MISE = 1 ∆ Z ∆ 0 1 N N X i=1 n E ( ˆθi −λt+(i−1)∆)2o dt, (4) where ˆθi ≡ki/(n∆). Hereafter we denote the average over those segmented rate λt+(i−1)∆as an average over an ensemble of (segmented) rate functions {λt} defined in an interval of t ∈[0, ∆]: MISE = 1 ∆ Z ∆ 0 D E ( ˆθ −λt )2E dt. (5) Table 1: A method for bin size selection for a PSTH (i) Divide the observation period T into N bins of width ∆, and count the number of spikes ki from all n sequences that enter the ith bin. (ii) Construct the mean and variance of the number of spikes {ki} as, ¯k ≡1 N N X i=1 ki, and v ≡1 N N X i=1 (ki −¯k)2. (iii) Compute the cost function, Cn(∆) = 2¯k −v (n∆)2 . (iv) Repeat i through iii while changing the bin size ∆to search for ∆∗ that minimizes Cn(∆). The expectation E now refers to the average over the spike count, or ˆθ = k/(n∆), given a rate function λt, or its mean value, θ. The MISE can be decomposed into two parts, MISE = 1 ∆ Z ∆ 0 D E ( ˆθ −θ + θ −λt)2E dt = D E(ˆθ −θ)2E + 1 ∆ Z ∆ 0 D (λt −θ)2E dt. (6) The first and second terms are respectively the stochastic fluctuation of the estimator ˆθ around the expected mean rate θ, and the temporal fluctuation of λt around its mean θ over an interval of length ∆, averaged over the segments. The second term of Eq.(6) can further be decomposed into two parts, 1 ∆ Z ∆ 0 (λt −⟨θ⟩+ ⟨θ⟩−θ)2 dt = 1 ∆ Z ∆ 0 D (λt −⟨θ⟩)2E dt − D (θ −⟨θ⟩)2E . (7) The first term in the rhs of Eq.(7) represents a mean squared fluctuation of the underlying rate λt from the mean rate ⟨θ⟩, and is independent of the bin size ∆, because 1 ∆ Z ∆ 0 D (λt −⟨θ⟩)2E dt = 1 T Z T 0 (λt −⟨θ⟩)2 dt. (8) We define a cost function by subtracting this term from the original MISE, Cn(∆) ≡ MISE −1 ∆ Z ∆ 0 D (λt −⟨θ⟩)2E dt = D E(ˆθ −θ)2E − D (θ −⟨θ⟩)2E . (9) This cost function corresponds to the “risk function” in the report by Rudemo, (Eq. 2.3), obtained by direct decomposition of the MISE [3]. The second term in Eq.(9) represents the temporal fluctuation of the expected mean rate θ for individual intervals of period ∆. As the expected mean rate is not an observable quantity, we must replace the fluctuation of the expected mean rate with that of the observable estimator ˆθ. Using the decomposition rule for an unbiased estimator (Eˆθ = θ), D E(ˆθ −⟨Eˆθ⟩)2E = D E(ˆθ −θ + θ −⟨θ⟩)2E = D E(ˆθ −θ)2E + D (θ −⟨θ⟩)2E , (10) the cost function is transformed into Cn (∆) = 2 D E(ˆθ −θ)2E − D E(ˆθ −⟨Eˆθ⟩)2E . (11) Due to the assumed Poisson nature of the point process, the number of spikes k counted in each bin obeys a Poisson distribution: the variance of k is equal to the mean. For the estimated rate defined as ˆθ = k/(n∆), this variance-mean relation corresponds to E(ˆθ −θ)2 = 1 n∆Eˆθ. (12) By incorporating Eq.(12) into Eq.(11), the cost function is given as a function of the estimator ˆθ, Cn (∆) = 2 n∆ D Eˆθ E − D E(ˆθ −⟨Eˆθ⟩)2E . (13) The optimal bin size is obtained by minimizing the cost function Cn(∆): ∆∗≡arg min ∆Cn(∆). (14) By replacing the expectation of ˆθ in Eq.(13) with the sample spike counts, the method is converted into a user-friendly recipe summarized in Table 1. 2.2 Extrapolation of the cost function With the method developed in the preceding subsection, we can determine the optimal bin size for a given set of experimental data. In this section, we develop a method to estimate how the optimal bin size decreases when more experimental trials are added to the data set. Assume that we are in possession of n spike sequences. The fluctuation of the expected mean rate (θ −⟨θ⟩)2 in Eq.(10) is replaced with the empirical fluctuation of the time-histogram ˆθn using the decomposition rule for the unbiased estimator ˆθn satisfying Eˆθn = θ, D E(ˆθn −⟨Eˆθn⟩)2E = D E(ˆθn −θ + θ −⟨θ⟩)2E = D E(ˆθn −θ)2E + (θ −⟨θ⟩)2 . (15) The expected cost function for m sequences can be obtained by substituting the above equation into Eq.(9), yielding Cm (∆|n) = D E(ˆθm −θ)2E + D E(ˆθn −θ)2E − D E(ˆθn −⟨Eˆθn⟩)2E . (16) Using the variance-mean relation for the Poisson distribution, Eq.(12), and E(ˆθm −θ)2 = 1 m∆Eˆθm = 1 m∆Eˆθn, (17) we obtain Cm (∆|n) =  1 m −1 n  1 ∆ D Eˆθn E + Cn (∆) , (18) where Cn (∆) is the original cost function, Eq.(13), computed using the estimators ˆθn. By replacing the expectation with sample spike count averages, the cost function for m sequences can be extrapolated as Cm (∆|n) with this formula, using the sample mean ¯k and variance v of the numbers of spikes, given n sequences and the bin size ∆. The extrapolation method is summarized in Table 2. It may come to pass that the original cost function Cn(∆) computed for n spike sequences does not have a minimum, or have a minimum at a bin size comparable to the observation period T. In such a case, with the method summarized in Table 2, one may estimate the critical number of sequences nc above which the cost function has a finite bin size ∆∗, and consider carrying out more experiments to obtain a reasonable rate estimation. In the case that the optimal bin size exhibits continuous divergence, the cost function can be expanded as Cn(∆) ∼µ  1 n −1 nc  1 ∆+ u 1 ∆2 , (19) where we have introduced nc and u, which are independent of n. The optimal bin size undergoes a phase transition from the vanishing 1/∆∗for n < nc to a finite 1/∆∗for n > nc. In this case, the inverse optimal bin size is expanded in the vicinity of nc as 1/∆∗∝(1/n −1/nc). We can Table 2: A method for extrapolating the cost function for a PSTH (A) Construct the extrapolated cost function, Cm (∆|n) =  1 m −1 n  ¯k n∆2 + Cn(∆), using the sample mean ¯k and variance v of the number of spikes obtained from n sequences of spikes. (B) Search for ∆∗ m that minimizes Cm (∆|n). (C) Repeat A and B while changing m, and plot 1/∆∗ m vs 1/m to search for the critical value 1/m = 1/ˆnc above which 1/∆∗ m practically vanishes. estimate the critical value ˆnc by applying this asymptotic relation to the set of ˆ∆∗ m estimated from Cm(∆|n) for various values of m: 1 ∆∗m ∝  1 m −1 ˆnc  . (20) It should be noted that there are cases that the optimal bin size exhibits discontinuous divergence from a finite value. Even in such cases, the plot of {1/m, 1/∆∗} could be useful in exploring a discontinuous transition from nonvanishing values of 1/∆∗to practically vanishing values. 2.3 Theoretical cost function In this section, we obtain a “theoretical” cost function directly from a process with a known underlying rate, λt, and compare it with the “empirical” cost function which can be evaluated without knowing the rate process. Note that this theoretical cost function is not available in real experimental conditions in which the underlying rate is not known. The present estimator ˆθ ≡k/(n∆) is a uniformly minimum variance unbiased estimator (UMVUE) of θ, which achieves the lower bound of the Cram´er-Rao inequality [9, 10], E(ˆθ −θ)2 = " − ∞ X k=0 p (k|θ) ∂2 log p (k|θ) ∂θ2 #−1 = θ n∆. (21) Inserting this into Eq.(9), the cost function is represented as Cn (∆) = ⟨θ⟩ n∆− D (θ −⟨θ⟩)2E = µ n∆−1 ∆2 Z ∆ 0 Z ∆ 0 φ (t1 −t2) dt1dt2, (22) where µ is the mean rate, and φ(t) is the autocorrelation function of the rate fluctuation, λt −µ. Based on the symmetry φ(t) = φ(−t), the cost function can be rewritten as Cn (∆) = µ n∆−1 ∆2 Z ∆ −∆ (∆−|t|)φ(t) dt ≈ µ n∆−1 ∆ Z ∞ −∞ φ(t) dt + 1 ∆2 Z ∞ −∞ |t|φ(t) dt, (23) which can be identified with Eq.(19) with parameters given by nc = µ Z ∞ −∞ φ(t) dt , (24) u = Z ∞ −∞ |t|φ(t) dt. (25) A B C D 0 0.1 0.2 0.3 0.4 0.5 -100 0 100 200 Empirical cost function Theoretical cost function 0 60 120 0 1 2 Underlying rate, t Time, t 0 1 2 0 1 2 Histograms, ^ t 0 30 60 0 30 60 Spike Sequences 0 60 Cost function, 30 Figure 1: A: (Dots): The empirical cost function, Cn(∆), computed from spike data according to the method in Table 1. (Solid line): The “theoretical” cost function computed directly from the underlying fluctuating rate, with Eq.(22). B: (Above): The underlying fluctuating rate λt. (Middle): Spike sequences derived from the rate. (Below): Time-histograms made using three types of bin sizes: too small, optimal, and too large. Model parameters: the number of sequences n = 30; total observation period T = 30 [sec]; the mean rate µ = 30 [1/s]; the amplitude of rate fluctuation σ = 10 [1/s]; time scale of rate fluctuation τ = 0.05 [s]. 3 Results Our first objective was to develop a method for selecting the ideal bin size using spike sequences derived repeatedly from Poisson processes, all with a given identical rate λt. The MISE of the PSTH from the underlying rate is minimized by minimizing the cost function Cn(∆). Figure 1A displays the cost function computed with the method summarized in Table 1. This “empirical” cost function is compared with the “theoretical” cost function Eq.(22) that is computed directly from the underlying rate λt. The figure exhibits that the “empirical” cost function is consistent with the “theoretical” cost function. The time-histogram constructed using the optimal bin size is compared with those constructed using non-optimal bin sizes in Figs. 1B, demonstrating the effectiveness of the present method of bin size selection. We also tested a method for extrapolating the cost function. Figures 2A and B demonstrate the extrapolated cost functions for several sequences with differing values of m and the plot of {1/m, 1/∆∗} for estimating the critical value 1/m = 1/ˆnc, above which 1/∆∗practically vanishes. Figure 2C depicts the critical number ˆnc estimated from the smaller or larger numbers of spike sequences n. The empirically estimated critical number ˆnc approximates the theoretically predicted critical number nc computed using Eq.(24). Note that the critical number is correctly estimated from the small number of sequences, with which the optimal bin size practically diverges (n < nc). 4 Summary We have developed a method for optimizing the bin size, so that the PSTH best represents the (unknown) underlying spike rate. For a small number of spike sequences derived from a modestly 0 2 4 6 8 10 -5 0 5 0.02 0.06 0.1 0 6 0 10 20 30 40 0 10 20 30 A B Number of sequences, n m=20 m=10 m=30 1/m C ^ n c Extrapolated cost function Estimated optimal bin size 12 10 Estimated critical number, 40 Figure 2: A: Extrapolated cost functions Cm (∆|n) plotted against 1/∆for several numbers of sequences m = 10, 20 and 30 computed from n = 10 sample sequences. B: The plot of {1/m, 1/∆∗} used for estimating the critical value 1/m = 1/ˆnc, above which 1/∆∗practically vanishes. C: The number of spike sequences n used to obtain the extrapolated cost function Cm (∆|n) and an estimated critical number ˆnc. Model parameters: the number of sequences n = 10; total observation period T = 30 [sec]; the mean rate µ = 30 [1/s]; the amplitude of rate fluctuation σ = 4 [1/s]; time scale of rate fluctuation τ = 0.05 [s]. The theoretical critical number is computed with Eq.(24), giving nc = 21.1 for the present underlying fluctuating rate. This theoretical nc is depicted as the horizontal dashed line. fluctuating rate, the cost function does not have a minimum, implying the uselessness of the rate estimation. Our method can nevertheless extrapolate the cost function for any number of spike sequences, and suggest how many trials are needed in order to obtain a meaningful time-histogram with the required accuracy. The suitability of the present method was demonstrated by application to spike sequences generated by time-dependent Poisson processes. Acknowledgements This study is supported in part by Grants-in-Aid for Scientific Research to SS from the Ministry of Education, Culture, Sports, Science and Technology of Japan (16300068, 18020015) and the 21st Century COE “Center for Diversity and Universality in Physics”. HS is supported by the Research Fellowship of the Japan Society for the Promotion of Science for Young Scientists. References [1] E. D. Adrian. The Basis of Sensation: The Action of the Sense Organs. W.W. Norton, New York, 1928. [2] G. L. Gerstein and N. Y. S. Kiang. An approach to the quantitative analysis of electrophysiological data from single neurons. Biophysical Journal, 1(1):15–28, 1960. [3] M. Rudemo. Empirical choice of histograms and kernel density estimators. Scandinavian Journal of Statistics, 9(2):65–78, 1982. [4] S. Koyama and S. Shinomoto. Histogram bin width selection for time-dependent poisson processes. Journal of Physics A-Mathematical and General, 37(29):7255–7265, 2004. [5] S. Shinomoto, K. Shima, and J. Tanji. Differences in spiking patterns among cortical neurons. Neural Computation, 15(12):2823–2842, 2003. [6] S. Shinomoto, Y. Miyazaki, H. Tamura, and I. Fujita. Regional and laminar differences in in vivo firing patterns of primate cortical neurons. Journal of Neurophysiology, 94(1):567–575, 2005. [7] D. L. Snyder. Random Point Processes. John Wiley & Sons, Inc., New York, 1975. [8] D. J. Daley and D. Vere-Jones. An Introduction to the Theory of Point Processes. SpringerVerlag, New York, USA, 1988. [9] R. E. Blahut. Principles and practice of information theory. Addison-Wesley, Reading, Mass, 1987. [10] T. M. Cover and J. A. Thomas. Elements of Information Theory. John Wiley & Sons, Inc., New York, 1991.
2006
87
3,111
Inducing Metric Violations in Human Similarity Judgements Julian Laub1, Jakob Macke2, Klaus-Robert Müller1,3 and Felix A. Wichmann2 1 Fraunhofer FIRST.IDA, Kekulestr. 7, 12489 Berlin, Germany 2 Max Planck Institut for Biological Cybernetics, Spemannstr. 38, 72076 Tübingen, Germany 3 University of Potsdam, Department of Computer Science August-Bebel-Strasse 89, 14482 Potsdam, Germany {jlaub,klaus}@first.fhg.de {felix,jakob}@tuebingen.mpg.de Abstract Attempting to model human categorization and similarity judgements is both a very interesting but also an exceedingly difficult challenge. Some of the difficulty arises because of conflicting evidence whether human categorization and similarity judgements should or should not be modelled as to operate on a mental representation that is essentially metric. Intuitively, this has a strong appeal as it would allow (dis)similarity to be represented geometrically as distance in some internal space. Here we show how a single stimulus, carefully constructed in a psychophysical experiment, introduces l2 violations in what used to be an internal similarity space that could be adequately modelled as Euclidean. We term this one influential data point a conflictual judgement. We present an algorithm of how to analyse such data and how to identify the crucial point. Thus there may not be a strict dichotomy between either a metric or a non-metric internal space but rather degrees to which potentially large subsets of stimuli are represented metrically with a small subset causing a global violation of metricity. 1 Introduction The central aspect of quantitative approaches in psychology is to adequately model human behaviour. In perceptual research, for example, all successful models of visual perception tacitly assume that at least simple visual stimuli are processed, transformed and compared to some internal reference in a metric space. In cognitive psychology many models of human categorisation, too, assume that stimuli “similar” to each other are grouped together in categories. Within a category similarity is very high whereas between categories similarity is low. This coincides with intuitive notions of categorization which, too, tend to rely on similarity despite serious problems in defining what similarity means or ought to mean [6]. Work on similarity and generalization in psychology has been hugely influenced by the work of Roger Shepard on similarity and categorization [12, 14, 11, 4, 13]. Shepard explicitly assumes that similarity is a distance measure in a metric space, and many perceptual categorization models follow Shepard’s general framework [8, 3]. This notion of similarity is frequently linked to a geometric representation where stimuli are points in a space and the similarity is linked to an intuitive metric on this space, e.g. the Euclidean metric. In a well-known and influential series of papers Tversky and colleagues have challenged the idea of a geometric representation of similarity, however [16, 17]. They provided convincing evidence that (intuitive, and certainly Euclidean) geometric representations cannot account for human similarity judgements—at least for the highly cognitive and non-perceptual stimuli they employed in their studies. Within their experimental context pairwise dissimilarity measurements violated metricity, in particular symmetry and the triangle inequality. Technically, violations of Euclideanity translate into non positive semi-definite similarity matrices (“pseudo-Gram” matrices) [15], a fact, which imposes severe constraints on the data analysis procedures. Typical approaches to overcome these problems involve leaving out negative eigenvalues altogether or shifting the spectrum for subsequent (Kernel-)PCA analysis [10, 7]. The shortcomings of such methods are that they assume that the data really are Euclidean and that all violations are only due to noise. Shepard’s solution to non-metricity was to find non-linear transformations of the similarity data of the subjects to make them Euclidean, and/or use non-Euclidean metrics such as the city-block metric (or other Minkowski p-norms with p ̸= 2)[11, 4]. Yet another way how metric violations may arise in experimental data—whilst retaining the notion that the internal, mental representation is really metric—is to invoke attentional re-weighting of dimensions during similarity judgements and categorisation tasks [1]. Here we develop a position in between the seeming dichotomy of “metric versus non-metric” internal representations: Our alternative and complementary suggestion is that a potentially very small subset—in fact a single observation or data point or stimulus—of the data may induce the non-metricity, or at least a non-Euclidean metric: in a theoretical setting it has been shown that systematic violation of metricity can be due to an interesting subset of the data—i.e. not due to noise [5]. We show how conflictual judgments can introduce metric violation in a situation where the human similarity judgments are based upon smooth geometric features and are otherwise essentially Euclidean. First we present a simple model which explains the occurrence of metric violations in similarity data, with a special focus on human similarity judgments. Thereafter both models are tested with data obtained from psychophysical experiments specifically designed to induce conflictual judgments. 2 Modeling metric violations for single conflictual situations A dissimilarity function d is called metric if: d(xi, xj) ⩾0 ∀xi, xj ∈X, d(xi, xj) = 0 iff xi = xj, d(xi, xj) = d(xj, xi) ∀xi, xj ∈X, d(xi, xk) + d(xk, xj) ⩾d(xi, xj) ∀xi, xj, xk ∈X. A dissimilarity matrix D = (Dij) will be called metric if there exists a metric d such that Dij = d(·, ·). D = (Dij) will be called squared Euclidean if the metric derives from l2. It can be shown that D is l2 (Euclidean) iff C = −1 2QDQ is positive semi-definite (Q = I −1 nee′ be the projection matrix on the orthogonal complement of e = (1, 1, . . . 1)′). C is called the Gram matrix. An indefinite C will be called a pseudo-Gram matrix. A non-metric D is, a fortiori, non l2 and thus its associated C is indefinite. On the other hand, when C is indefinite, we can conclude that D is non l2, but not necessarily non-metric. Non-metricity of D must be verified by testing the above four requirements. We now introduce a simple model for conflictual human similarity. Let {f1, f2, . . . fn} be a basis. A given data point xi can be decomposed in this basis as xi = Pn k=1 α(i) k fk. The squared l2 distance between xi and xj therefore reads: dij = ||xi −xj||2 = Pn k=1 α(i) k −α(j) k  fk 2. However this assumes constant feature-perception, i.e. a constant mental image with respect to different tasks. In the realm of human perception this is not always the case, as illustrated by the following well known ambiguous figure (Fig. 1). We hypothesise that the ambiguous perception of such figures corresponds to some kind of “perceptual state-switching”. If the state-switching could be experimentally induced within a single experiment and subject, this may cause metric or at least Euclidean violations by this conflictual judgment. A possible way to model such conflictual situations in human similarity judgments is to introduce states {ω(1), ω(2) . . . ω(d)}, ω(l) ∈Rn for l = 1, 2, . . . d, affecting the features. The similarity judgment between objects then depends on the perceptual state (weight) the subject is in. Assuming that the person is in state ω(l) the distance becomes: dij = ||xi−xj||2 = Pn k=1 α(i) k −α(j) k  ω(l) k fk 2. With no further restriction this model yields non-metric distance matrices. ω may vary between different subjects reflecting their different focus of attention, thus we will not average the similarity judgments over different subjects but only over different trials of one single subject, assuming that for a given person ω is constant. In order to interpret the metric violations, we propose the following simple algorithm, which allows to specifically visualize the information coded by the negative eigenvalues. It essentially relies upon 1 2345 6 7 8 9 10 11 1213 14 1516 x y Figure 1: Left: What do you see? A young lady or an old woman? If you were to compare this picture to a large set of images of young ladies or old women, the perceptual state-switch could induce large individual weights on the similarity. Right: Simple data distribution (left) used in the proof of concept illustration in subsection 2.1. the embedding of non-metric pairwise data into a pseudo-Euclidean space (see [2, 9] and references therein for details): non squared-Euclidean D C = −1/2QDQ −−−−−−−−−−−−−→C with negative eigenvalues C spectral decomposition −−−−−−−−−−−−−−−→V ΛV ⊤= V |Λ| 1 2 M|Λ| 1 2 V ⊤ X∗ P = |ΛP |1/2V ⊤ P , where V is the column matrix of eigenvectors, Λ the diagonal matrix of the corresponding eigenvalues and M the block-matrix consisting of the blocks Ip×p, −Iq×q and 0k×k (with k = n −p −q) The columns of X∗ P contain the vectors xi in p-dimensional subspace P. Retaining only the first two coordinates (P = {v1, v2}) of the obtained vectors corresponds to a projection onto the first two leading eigendirections. Retaining the last two (P = {vn, vn−1}) is a projection onto the last two eigendirections: This corresponds to a projection onto directions related to the negative part of C and containing the information coded by the l2 violations. 2.1 Proof of concept illustration: single conflicts introduce metric violations We now illustrate the model for a single conflictual situation. Consider a weight ω(l) constant for all feature-vectors, taken to be the unit vectors ek in this example. Then we have dij = ωlij2 Pn k=1 α(i) k −α(j) k  ek 2 = ωlij2∥xi −xj∥2 2, where ∥· ∥2 is the usual unweighted Euclidean norm. For a simple illustration we take 16 points distributed in two Gaussian blobs (Fig. 1, right) with squared Euclidean distance given by d2 to represent the objects to compare. Suppose an experimental subject is to pairwise compare these objects to give it a dissimilarity score and that a conflictual situation arises for the pairs (2, 3), (7, 2) and (6, 5) translating in a strong weighting of these dissimilarities. For the sake of the example, we chose the (largely exaggerated) weights to be 150, 70 and 220 respectively, acting as follows: d(2, 3) = d2(2, 3) · 150, d(7, 2) = d2(7, 2) · 70, d(6, 5) = d2(6, 5) · 220. The corresponding d is non-Euclidean and its associated C is indefinite. The spectrum of C is given in Fig. 2, right, and exhibits a clear negative spectrum. Fig. 2 shows the projection onto the leading positive and leading negative eigendirections of the both the unweighted distance (top row) and the weighted distance matrix (bottom row). Both yield the same grouping in the positive part. In the negative eigenspace we obtain a singular distribution for the unweighted case. This is not the case for the weighted dissimilarity: we see that the distribution in the negative separates the points whose mutual distance has been (strongly) weighted. The information contained in the negative part, reflecting the information coded by metric or l2 violations, codes in this case for the individual weighting of the (dis)similarities. . . . . . . . . . . . . . . . . Eigenvalues 12 345 6 7 8 910 11 1213 14 15 16 First component Second component 123456789 10 11 12 13 14 15 16 Second last component Last component . . . . . . . . . . . . . . . . Eigenvalues 1 2 34 5 6 78 9 1011 12 131415 16 First component Second component 1 2 34 56 7 8 910 11 12 1314 15 16 Second last component Last component Figure 2: Proof of concept: Unperturbed dissimilarity matrix (no conflict) and weighted dissimilarity matrix (conflict). Single weighting of dissimilarities introduce metric violations and hence l2 violations which reflect in negative spectra. The conflictual points are peripheral in the projection onto the negative eigenspace centered around the bulk of points whose dissimilarities are essentially Euclidean. Note that because of the huge weights, these effects are largely exaggerated in comparison to real world judgments. 3 Experiments Twenty gray-scale 256 x 256-pixel images of faces were generated from the MPI-face database 1. All faces were normalized to have the same mean and standard deviation of pixel intensities, the same area, and were aligned such that the cross-correlation of each face to a mean face of the database was maximal. Faces were presented at an angle of 15 degrees and were illuminated primarily with ambient light together with an additional but weak point source at 65 degrees azimuth and 25 degree eccentricity. To show the viability of our approach we require a data set with a good representation of the notion of facial similarity, and to ensure that the data set encompasses both extremes of (dis-)similarity. In the absence of a formal theory of facial similarity we hand-selected a set of faces we thought may show the hypothesised effect: Sixteen of the twenty faces were selected because prior studies had shown them to be consistently and correctly categorised as male or female [18]. Three of the remaining four faces were females that previous subjects found very difficult to categorise and labelled them as female or male almost exactly half of the time. The last face was the mean (androgynous) face across the database. Figure 3 shows the twenty faces thus selected. Prior to the pairwise comparisons all subjects viewed all twenty faces simultaneously arranged in a 4 x 5 grid on the experimental monitor. The subjects were asked to inspect the entire set of faces to obtain a general notion of the relative similarity of the faces and they were instructed to use the entire scale in the following rating task. Subjects were allowed to view the stimuli for however long they wanted. Only thereafter did they proceed to the actual similarity rating stage. Pairwise comparisons of twenty faces requires 20 2  = 190 trials; each of our four subjects completed four repetitions resulting in a total of 760 trials per subject. During the rating stage faces were shown in pairs in random order for a total duration of 4 seconds (200 msec fade-in, 3600 msec full contrast view, 200 msec fade-out). Subjects were allowed to respond as fast as the wished but had to respond within 5 seconds, i.e. 1 second after the faces had disappeared at the very latest. Similarity was rated on a discrete integer scale between 1 (very dissimilar) and 5 (very similar). The final similarity rating per subject was the mean of the four repetitions within a single subject. 1The MPI face database is located at http://faces.kyb.tuebingen.mpg.de 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 Figure 3: Our data set: Faces 1 to 8 are unambiguous males, faces 9 to 16 are unambiguous females. Faces 17 to 19 are ambiguous and have been attributed to either sex in roughly half the cases. Face 20 is a mean face. All stimuli were presented on a carefully linearised Siemens SMM21106LS gray-scale monitor with 1024 x768 resolution at a refresh rate of 130Hz driven by a Cambridge Research Systems Visage graphics controller using purpose-written software. The mean luminance of the display was 213 cd/m2 and presentation of the stimuli did not change the mean luminance of the display. Three subjects with normal or corrected-to-normalvision—naive to the purpose of the experiment— acted as observers; they were paid for their participation. We will discuss in detail the results obtained with the first subject. The results from the other subjects are summarized. In order to exhibit how a single conflictual judgment can break metricity, we follow a two-fold procedure: we first chose a data set of unambiguous faces whose dissimilarities are Euclidean or essential Euclidean. Second, we compare this subsets of faces to a set with those very same unambiguous males and females extended by one additional conflict generating face creating (see Figure 4 for a schematic illustration). Figure 4: The unambiguous females and unambiguous males lead to a pairwise dissimilarity matrix which is essentially Euclidean. The addition of one single conflicting face introduces the l2 violations. 3.1 Subject 1 We chose a subset of faces which has the property that their mutual dissimilarities are essentially Euclidean (Fig. 5). The conflict generating face is 19 and will be denoted as X. Fig. 5 shows that the set of unambiguous faces is essentially Euclidean: the smallest eigenvalues of the spectrum are almost zero. This reflects in an almost singular projection in the eigenspace spanned by the eigenvectors associated to the negative eigenvalues. The projection onto the eigenspace spanned by the eigenvectors associated to the positive eigenvalues separates males from females which corresponds to the unique salient feature in the data set. . . . . . . . . . . . Eigenvalues 1 2 34 5 6 7 8 9 10 11 First component Second component 1 2 3 4 5 6 7 89 1011 Second last component Last component Figure 5: Left: Spectrum with only minor l2 violations, Middle: males vs. females. Right: when a metric is (essentially) Euclidean, the points are concentrated on a singularity in the negative eigenspace. In order to provoke the conflictual situation, we add one single conflicting face, denoted by X. This face has been attributed in previous experiences to either sex in 50 % of the cases. This addition causes the spectrum to flip down, hinting at a unambiguous l2 violation, see Fig. 6. Furthermore, it can be verified that the triangle inequality is violated in several instances by addition of this conflicting judgment reflecting that violation indeed is metric in this case. . . . . . . . . . . . . Eigenvalues 1 2 34 X 5 6 7 8 9 10 11 First component Second component 1 23 4 X 5 6 7 8 9 10 11 Second last component Last component Figure 6: Left: Spectrum with l2-violations, Middle: males vs. females. Right: The conflicting face X is separated from the bulk of faces corresponding to the Euclidean dissimilarities. The positive projection remains almost unchanged and again separates male from female faces with X in between, reflecting its intermediate position between the males and the females. In the negative projection the X can be seen as separating of the bulk of points which are mutually Euclidean. This corresponds to the effect, albeit not as pronounced, described in the proof of concept illustration 2.1. Thus we see that the introduction of a conflicting face within a coherent set of unambiguous faces is the cause of the metric violation. 3.2 Subject 2 and 3 The same procedure was applied to the similarity judgments given by Subject 2 and 3. Since the individual perceptual states are incommensurable between different subjects (the reason why we do not average over subjects but only within a subject) the extracted Euclidean subset were different for each of them. However, the process which created the l2-violation is the same. Figures 7 and 8 show this process: a conflicting observation destroys the underlying Euclidean structure in the judgements. Both for Subject 2 and 3 the X lying between the unambiguous faces reflects outside the bulk of Euclidean points concentrated around the singularity in the negative projections. . . . . . . . . Eigenvalues 1 4 5 7 9 11 14 16 First component Second component 1457911 14 16 Second last component Last component . . . . . . . . . Eigenvalues 1 4 5 7 9 11 14 16 X First component Second component 14 5 7911 14 16 X Second last component Last component Figure 7: Subject 2: In the upper row, the subset of faces which whose dissimilarities are Euclidean. The lower row shows the effect of introducing a conflicting face X and the subsequent weighting. . . . . . . . . . . . . . Eigenvalues 2 3 4 5 6 7 8 9 10 11 12 13 15 First component Second component 234 56789 10 11 12 13 15 Second last component Last component . . . . . . . . . . . . . . Eigenvalues 23 4 5 6 7 8 9 10 11 12 13 15 X First component Second component 234 5678910 11 12 13 15 X Second last component Last component Figure 8: Subject 3: In the upper row, the subset of faces which whose dissimilarities are essentially Euclidean. The lower row shows the effect of introducing a conflicting face X and the subsequent weighting. Again we obtain that the introduction of a single conflicting face within a set of unambiguous faces for which the human similarity judgment is essentially Euclidean introduces the l2 violations. This strongly corroborates our conflict model and the statement that metric violations in human similarity judgments have a specific meaning, a conflictual judgment for this case. 4 Conclusion We presented a simple experiment in which we could show how a single, purposely selected stimulus introduces l2 violations in what appeared to have been an internal Euclidean similarity space of facial attributes. Importantly, thus, it may not be that there is a clear dichotomy in that internal representations of similarity are either metric or not, rather that they may be for “easy” stimuli but “ambiguous” ones can cause metric violations—at least l2 violations in our setting. We have clearly shown that these violations are caused by conflictual points in a data set: the addition of one such point caused the spectra of the Gram matrices to “flip down” reflecting the l2 violation. Further research will involve the acquisition of more pairwise similarity judgements in conflicting situations as well as the refinement of our existing experiments. In particular, we would like to know whether it is possible to create larger, scalable conflicts, i.e. conflicts which lead to a much stronger re-weighting and thus to clearer separation of the conflicting point from the bulk of Euclidean points. References [1] F. Gregory Ashby and W. William Lee. Predicting similarity and categorization from identification. Journal of Experimental Psychology: General, 120(2):150–172, 1991. [2] L. Goldfarb. A unified approach to pattern recognition. Pattern Recognition, 17:575–582, 1984. [3] J.K. Kruschke. ALCOVE: an exemplar-based connectionist model of category learning. Psychological Review, 99(1):22–44, 1992. [4] J.B. Kruskal. Multidimensional scaling by optimizing goodness of fit to a nonmetric hypothesis. Psychometrika, 29(1):1–27, 1964. [5] J. Laub and K.-R. Müller. Feature discovery in non-metric pairwise data. Journal of Machine Learning, 5:801–818, 2004. [6] D.L. Medin, R.L. Goldstone, and D. Gentner. Respects for similarity. Psychological Review, 100(2):254– 278, 1993. [7] S. Mika, B. Schölkopf, A.J. Smola, K.-R. Müller, M. Scholz, and G. Rätsch. Kernel PCA and de–noising in feature spaces. In M.S. Kearns, S.A. Solla, and D.A. Cohn, editors, Advances in Neural Information Processing Systems, volume 11, pages 536–542. MIT Press: Cambridge, MA, 1999. [8] R.M. Nosofsky. Attention, similarity, and the indentification-categorization relationship. Journal of Experimental Psychology: General, 115:39–57, 1986. [9] E. P¸ekalska, P. Paclík, and R. P. W. Duin. A generalized kernel approach to dissimilarity-based classification. Journal of Machine Learning Research, 2:175–211, 2001. [10] B. Schölkopf, A. Smola, and K.-R. Müller. Nonlinear component analysis as a kernel eigenvalue problem. Neural Computation, 10:1299–1319, 1998. [11] R. N. Shepard. The analysis of proximities: Multidimensional scaling with an unknown distance function. Psychometrika, 27(2):125–140, 1962. [12] R.N. Shepard. Stimulus and response generalization: A stochastic model relating generalization to distance in psychological space. Psychometrika, 22:325–345, 1957. [13] R.N. Shepard. Toward a universal law of generalization for psychological science. Science, 237(4820):1317–1323, 1987. [14] Roger N. Shepard, Carl I. Hovland, and Herbert M. Jenkins. Learning and memorization of classifications. Psychological Monographs, 75(13):1–42, 1961. [15] W. S. Torgerson. Theory and Methods of Scaling. John Wiley and Sons, New York, 1958. [16] A. Tversky. Features of similarity. Psychological Review, 84(4):327–352, 1977. [17] A. Tversky and I. Gati. Similarity, separability, and the triangle inequality. Psychological Review, 89(2):123–154, 1982. [18] F. A. Wichmann, A. B. A. Graf, E. P. Simoncelli, H. H. Bülthoff, and B. Schölkopf. Machine learning applied to perception: decision-images for classification. In Advances in Neural Information Processing Systems 17, pages 1489–1496. MIT Press, 2005.
2006
88
3,112
Nonnegative Sparse PCA Ron Zass and Amnon Shashua ∗ Abstract We describe a nonnegative variant of the ”Sparse PCA” problem. The goal is to create a low dimensional representation from a collection of points which on the one hand maximizes the variance of the projected points and on the other uses only parts of the original coordinates, and thereby creating a sparse representation. What distinguishes our problem from other Sparse PCA formulations is that the projection involves only nonnegative weights of the original coordinates — a desired quality in various fields, including economics, bioinformatics and computer vision. Adding nonnegativity contributes to sparseness, where it enforces a partitioning of the original coordinates among the new axes. We describe a simple yet efficient iterative coordinate-descent type of scheme which converges to a local optimum of our optimization criteria, giving good results on large real world datasets. 1 Introduction Both nonnegative and sparse decompositions of data are desirable in domains where the underlying factors have a physical interpretation: In economics, sparseness increases the efficiency of a portfolio, while nonnegativity both increases its efficiency and reduces its risk [7]. In biology, each coordinate axis may correspond to a specific gene, the sparseness is necessary for finding focalized local patterns hidden in the data, and the nonnegativity is required due to the robustness of biological systems – where observed change in the expression level of a specific gene emerges from either positive or negative influence, rather than a combination of both which partly cancel each other [1]. In computer vision, coordinates may correspond to pixels, and nonnegative sparse decomposition is related to the extraction of relevant parts from images [10]; and in machine learning sparseness is closely related to feature selection and to improved generalization in learning algorithms, while nonnegativity relates to probability distributions. Principal Component Analysis (PCA) is a popular wide spread method of data decomposition with applications throughout science and engineering. The decomposition performed by PCA is a linear combination of the input coordinates where the coefficients of the combination (the principal vectors) form a low-dimensional subspace that corresponds to the direction of maximal variance in the data. PCA is attractive for a number of reasons. The maximum variance property provides a way to compress the data with minimal information loss. In fact, the principal vectors provide the closest (in least squares sense) linear subspace to the data. Second, the representation of the data in the projected space is uncorrelated, which is a useful property for subsequent statistical analysis. Third, the PCA decomposition can be achieved via an eigenvalue decomposition of the data covariance matrix. Two particular drawbacks of PCA are the lack of sparseness of the principal vectors, i.e., all the data coordinates participate in the linear combination, and the fact that the linear combination may mix both positive and negative weights, which might partly cancel each other. The purpose of our work is to incorporate both nonnegativity and sparseness into PCA, maintaining the maximal variance property of PCA. In other words, the goal is to find a collection of sparse nonnegative principal ∗School of Engineering and Computer Science, Hebrew University of Jerusalem, Jerusalem 91904, Israel. vectors spanning a low-dimensional space that preserves as much as possible the variance of the data. We present an efficient and simple algorithm for Nonnegative Sparse PCA, and demonstrate good results over real world datasets. 1.1 Related Work The desire of adding a sparseness property to PCA has been a focus of attention in the past decade starting from the work of [8] who applied axis rotations and component thresholding to the more recent computational techniques SCoTLASS L1 norm approach [9], elastic net L1 regression SPCA [14], DSPCA based on relaxing a hard cardinality cap constraint with a convex approximation [2], and most recently the work of [12] which applies post-processing renormalization steps to improve any approximate solution, in addition to two different algorithms that search for the active coordinates of the principal component based on spectral bounds. These references above can be divided into two paradigms: (i) adding L1 norm terms to the PCA formulation as it is known that L1 approximates L0 much better than L2, (ii) relaxing a hard cardinality (L0 norm) constraint on the principal vectors. In both cases the orthonormality of the principal vector set is severely compromised or even abandoned and it is left unclear to what degree the resulting principal basis explains most of the variance present in the data. While the above methods do not deal with nonnegativity at all, other approaches focus on nonnegativity but are neutral to the variance of the resulting factors, and hence recover parts which are not necessarily informative. A popular example is the Nonnegative Matrix Factorization (NMF) [10] and the sparse versions of it [6, 11, 5, 4] that seek the best reconstruction of the input using nonnegative (sparse) prototypes and weights. We start with adding nonnegativity to PCA. An interesting direct byproduct of nonnegativity in PCA is that the coordinates split among the principal vectors. This makes the principal vectors disjoint, where each coordinate is non-zero in at most one vector. We can therefore view the principal vectors as parts. We then relax the disjoint property, as for most applications some overlap among parts is desired, allowing some overlap among the principal vectors. We further introduce a ”sparseness” term to the optimization criterion to cover situations where the part (or semi-part) decomposition is not sufficient to guarantee sparsity (such as when the dimension of the input space far exceeds the number of principal vectors). The structure of the paper is as follows: In Sections 2 and 3 we introduce the formulation of Nonnegative Sparse PCA. An efficient coordinate descent algorithm for finding a local optimum is derived in Section 4. Our experiments in Section 5 demonstrate the effectiveness of the approach on large real-world datasets, followed by conclusions in Section 6. 2 Nonnegative (Semi-Disjoint) PCA To the original PCA, which maximizes the variance, we add nonnegativity, showing that this addition alone ensures some sparseness by turning the principal vectors into a disjoint set of vectors, meaning that each coordinate is non-zero in at most one principal vector. We will later relax the disjoint property, as it is too excessive for most applications. Let x1, ..., xn ∈Rd form a zero mean collection of data points, arranged as the columns of the matrix X ∈Rd×n, and u1, ..., uk ∈Rd be the desired principal vectors, arranged as the columns of the matrix U ∈Rd×k. Adding a nonnegativity constraint to PCA gives us the following optimization problem: max U 1 2∥U T X∥2 F s.t. U T U = I, U ≥0 (1) where ∥A∥2 F = P ij a2 ij is the square Frobenius norm. Clearly, the combination of U T U = I and U ≥0 entails that U is disjoint, meaning that each row of U contains at most one non-zero element. While having disjoint principal component may be considered as a kind of sparseness, it is too restrictive for most problems. For example, a stock may be a part of more than one sector, genes are typically involved in several biological processes [1], a pixel may be a shared among several image parts, and so forth. We therefore wish to allow some overlap among the principal vectors. The degree of coordinate overlap can be represented by an orthonormality distance measure which is nonnegative and vanishes iff U is orthonormal. The function ∥I −U T U∥2 F is typically used in the literature (cf. [13], pg. 275–277) as a measure for orthonormality and the relaxed version of eqn. 1 becomes, max U 1 2∥U T X∥2 F −α 4 ∥I −U T U∥2 F s.t. U ≥0 (2) where α > 0 is a balancing parameter between reconstruction and orthonormality. We see that the tradeoff for relaxing the disjoint property of Nonnegative PCA is also to relax the maximum variance property of PCA — the constrained optimization tries to preserve the variance when possible but allows to tradeoff higher variance with some degree of coordinate overlap among the principal vectors. Next, we add sparseness to this formulation. 3 Nonnegative Sparse PCA (NSPCA) While semi-disjoint principal components can be considered sparse when the number of coordinates is small, it may be too dense when the number of coordinates highly exceeds the number of principal vectors. In such case, the average number of non-zero elements per principal vector would be high. We therefore consider minimizing the number of non-zero elements directly, ∥U∥L0 = Pk i=1 Pn j=1 δuij, where δx equals one if x is non-zero and zero otherwise. Adding this to the criteria of eqn. 2 we have, max U 1 2∥U T X∥2 F −α 4 ∥I −U T U∥2 F −β∥U∥L0 s.t. U ≥0 where β ≥0 controls the amount of additional sparseness required. The L0 norm could be relaxed by replacing it with a L1 term and since U is nonnegative we obtain the relaxed sparseness term: ∥U∥L1 = 1T U1, where 1 is a column vector with all elements equal to one. The relaxed problem becomes, max U 1 2∥U T X∥2 F −α 4 ∥I −U T U∥2 F −β1T U1 s.t. U ≥0 (3) 4 Algorithm For certain values of α and β, solving the problem of eqn. 3 is NP-hard. For example, for large enough values of α and for β = 0 we obtain the original problem of eqn. 1. This is a concave quadratic programming, which is an NP-hard problem [3]. It is therefore unrealistic to look for a global solution of eqn. 3, and we have to settle with a local maximum. The objective of eqn. 3 as a function of urs (the s row of the ur column vector) is, f(urs) = −α 4 u4 rs + c2 2 u2 rs + c1urs + const (4) where const stands for terms that do not depend on urs and, c1 = d X i=1,i̸=s asiuri −α · k X i=1,i̸=r d X j=1,j̸=s urjuijuis −β, c2 = ass + α −α · d X i=1,i̸=s u2 ri −α · k X i=1,i̸=r u2 is where A = XXT . Setting the derivative with respect to urs to zero we obtain a cubic equation, ∂f ∂urs = −αu3 rs + c2urs + c1 = 0 (5) Evaluating eqn. 4 for the nonnegative roots of eqn. 5 and zero, the nonnegative global maximum of f(urs) can be found (see Fig. 1). Note that as urs approaches ∞the criteria goes to −∞, and since the function is continues a nonnegative maximum must exist. A coordinate-descent scheme for updating each entry of U one following the other would converge to a local maximum of the −10 −5 0 5 10 −2000 −1500 −1000 −500 0 500 1000 urs f(urs) −10 −5 0 5 10 −500 0 500 1000 1500 urs ∂ f / ∂ urs Figure 1: A 4th order polynomial (left) and its derivative (right). In order to find the global nonnegative maximum, the function has to be inspected at all nonnegative extrema (where the derivative is zero) and at urs = 0. constrained objective function, as summarized bellow: Algorithm 1 Nonnegative Sparse PCA (NSPCA) • Start with an initial guess for U. • Iterate over entries (r, s) of U until convergence: – Set the value of urs to the global nonnegative maximizer of eqn. 4 by evaluating it over all nonnegative roots of eqn. 5 and zero. Caching some calculation results from the update of one element of U to the other, each update is done in O(d), and the entire matrix U is updated in O(d2k). It is easy to see that the gradient at the convergence point of Alg. 1 is orthogonal to the constraints in eqn. 3, and therefore Alg. 1 converges to a local maximum of the problem. It is also worthwhile to compare this nonnegative coordinate-descent scheme with the nonnegative coordinate-descent scheme of Lee and Seung [10]. The update rule of [10] is multiplicative, which holds two inherent drawbacks. First, it cannot turn positive values into zero or vise versa, and therefore the solution will never be on the boundary itself, a drawback that does not exist in our scheme. Second, since it is multiplicative, the perseverance of nonnegativity is built upon the nonnegativity of the input, and therefore it cannot be applied to our problem while our scheme can be also applied to NMF. In other words, a practical aspect our the NSPCA algorithm is that it can handle general (not necessarily non-negative) input matrices — such as zero-mean covariance matrices. 5 Experiments We start by demonstrating the role of the α and β parameters in the task of extracting face parts. We use the MIT CBCL Face Dataset #1 of 2429 aligned face images, 19 by 19 pixels each, a dataset that was extensively used to demonstrate the ability of Nonnegative Matrix Factorization (NMF) [10] methods. We start with α = 2 × 107 and β = 0 to extract the 10 principal vectors in Fig. 2(a), and then increase α to 5 × 108 to get the principal vectors in Fig. 2(b). Note that as α increases the overlap among the principal vectors decreases and the holistic nature of some of the vectors in Fig. 2(a) vanishes. The vectors also become sparser, but this is only a byproduct of their nonoverlapping nature. Fig. 3(a) shows the amount of overlap ∥I −U T U∥as a function of α, showing a consistence drop in the overlap as α increases. We now set α back to 2 × 107 as in Fig. 2(a), but set the value of β to be 2 × 106 to get the factors in Fig. 2(d). The vectors become sparser as β increases, but this time the sparseness emerges from a drop of less informative pixels within the original vectors of Fig. 2(a), rather than a replacement of the holistic principal vectors with ones that are part based in nature. The amount of non-zero elements in the principal vectors, ∥U∥L0, is plotted as a function of β in Fig. 3(b), showing the increment in sparseness as β increases. (a) (b) (c) (d) (e) (f) Figure 2: The role of α and β is demonstrated in the task of extracting ten image features using the MIT-CBCL Face Dataset #1. At the top row (a), we use α = 2 × 107 and β = 0. In (b) we increase α to 5 × 108 while β stays zero, to get more localized parts that has lower amount of overlap. In (c) we reset α to be 2 × 107 as in (a), but increase β to be 2 × 106. While we increase β, pixels that explain less variance are dropped from the factors, but the overlapping nature of the factors remains. (See Fig. 3 for a detailed study.) In (d) we show the ten leading principal components of PCA, in (e) the ten factors of NMF, and in (f) the leading principal vectors of GSPCA when allowing 55 active pixels per principal vector. Next we study how the different dimensional reduction methods aid the generalization ability of SVM in the task of face detection. To measure the generalization ability we use the Receiver Operating Characteristics (ROC) curve, a two dimensional graph measuring the classification ability of an algorithm over a dataset, showing the amount of true-positives as a function of the amount of false-positives. The wider the area under this curve is, the better the generalization is. Again, we use the MIT CBCL Face Dataset #1, where 1000 face images and 2000 non-face images were used as a training set, and the rest of the dataset used as a test set. The dimensional reduction was performed over the 1000 face images of the training set. We run linear SVM on the ten features extracted by NSPCA when using different values of α and β, showing in Fig. 4(a) that as the principal factors become less overlapping (higher α) and sparser (higher β), the ROC curve is higher, meaning that SVM is able to generalize better. Next, we compare the ROC curve produced by linear SVM when using the NSPCA extracted features (with α = 5 × 108 and β = 2 × 106) to the ones produced when using PCA and NMF (the principal vectors are displayed in Fig. 2(d) and Fig. 2(e), correspondingly). As a representative of the Sparse PCA methods we use the recent Greedy Sparse PCA (GSPCA) of [12] that shows comparable or better results to all other Sparse PCA methods (see the principal vectors in Fig. 2(f)). Fig. 4(b) shows that better generalization is achieved when using the NSPCA extracted features, and hence a more reliable face detection. Since NSPCA is limited to nonnegative entries of the principal vectors, it can inherently explain less variance than Sparse PCA algorithms which are not constrained in that way, similarly to the fact that Sparse PCA algorithms can explain less variance than PCA. While this limitation holds, NSPCA still manages to explain a large amount of the variance. We demonstrate that in Fig. 5, where we compare the amount of cumulative explained variance and cumulative cardinality of different Sparse PCA algorithms over the Pit Props dataset, a classic dataset used throughout the Sparse PCA literature. In domains where nonnegativity is intrinsic to the problem, however, using NSPCA extracted features improves the generalization ability of learning algorithms, as we have demonstrated above for the face detection problem. 6 Summary Our method differs substantially from previous approaches to sparse PCA — a difference that begins with the definition of the problem itself. Other sparse PCA methods try to limit the cardinality (number of non-zero elements) of each principal vector, and therefore accept as input a (soft) limitation on 6 7 8 9 10 0 2 4 6 8 || I − UTU || log10(α) 5 6 7 8 0 500 1000 1500 2000 2500 |U|L 0 log10(β) (a) (b) Figure 3: (a) The amount of overlap and orthogonality as a function of α, where higher values of α decrease the overlap and increase the orthogonality, and (b) the amount of non-zero elements as a function of β, where higher values of β enforce sparseness. 0 20 40 60 80 100 0 20 40 60 80 100 % False Positives % True Positives α=2x107, β=0 α=5x108, β=0 α=2x107, β=2x106 α=5x108, β=2x106 0 20 40 60 80 100 0 20 40 60 80 100 % False Positives % True Positives NSPCA GSPCA NMF PCA (a) (b) Figure 4: The ROC curve of SVM in the task of face detection over the MIT CBCL Face Dataset #1 (a) when using different values of α and β, showing improved generalization when using principal vectors that has less overlap (higher α) and that are sparser (higher β); and (b) when using NMF, PCA, GSPCA and NSPCA extracted features, showing better generalization when using NSPCA. 1 2 3 4 5 6 20% 30% 40% 50% 60% 70% 80% 90% 100% # of PCs Cumulative Variance PCA SCoTLASS SPCA DSPCA ESPCA NSPCA 1 2 3 4 5 6 0 10 20 30 40 50 # of PCs Cumulative Cardinality SCoTLASS SPCA DSPCA ESPCA NSPCA (a) (b) Figure 5: (a) Cumulative explained variance and (b) cumulative cardinality as a function of the number of principal components on the Pit Props dataset, a classic dataset that is typically used to evaluate Sparse PCA algorithms. Although NSPCA is more constrained than other Sparse PCA algorithms, and therefore can explain less variance just like Sparse PCA algorithms can explain less variance than PCA, and although the dataset is not nonnegative in nature, NSPCA shows competitive results when the number of principal components increases. that cardinality. In addition, most sparse PCA methods focus on the task of finding a single principal vector. Our method, on the other hand, splits the coordinates among the different principal vectors, and therefore its input is the number of principal vectors, or parts, rather than the size of each part. As a consequence, the natural way to use our algorithm is to search for all principal vectors together. In that sense, it bears resemblance to the Nonnegative Matrix Factorization problem, from which our method departs significantly in the sense that it focus on informative parts, as it maximizes the variance. Furthermore, the non-negativity of the output does not rely on having non-negative input matrices to the process thereby permitting zero-mean covariance matrices to be fed into the process just as being done with PCA. References [1] Liviu Badea and Doina Tilivea. Sparse factorizations of gene expression guided by binding data. In Pacific Symposium on Biocomputing, 2005. [2] Alexandre d’Aspremont, Laurent El Ghaoui, Michael I. Jordan, and Gert R. G. Lanckriet. A direct formulation for sparse PCA using semidefinite programming. In Proceedings of the conference on Neural Information Processing Systems (NIPS), 2004. [3] C. A. Floudas and V. Visweswaran. Quadratic optimization. In Handbook of global optimization, pages 217–269. Kluwer Acad. Publ., Dordrecht, 1995. [4] Matthias Heiler and Christoph Schn¨orr. Learning non-negative sparse image codes by convex programming. In Proc. of the 10th IEEE Intl. Conf. on Comp. Vision (ICCV), 2005. [5] Patrik O. Hoyer. Non-negative sparse coding. In Neural Networks for Signal Processing, 2002. Proceedings of the 2002 12th IEEE Workshop on, pages 557–565, 2002. [6] Patrik O. Hoyer. Non-negative matrix factorization with sparseness constraints. Journal of Machine Learning Research, 5:1457–1469, 2004. [7] Ravi Jagannathan and Tongshu Ma. Risk reduction in large portfolios: Why imposing the wrong constraints helps. Journal of Finance, 58(4):1651–1684, 08 2003. [8] Ian T. Jolliffe. Rotation of principal components: Choice of normalization constraints. Journal of Applied Statistics, 22(1):29–35, 1995. [9] Ian T. Jolliffe, Nickolay T. Trendafilov, and Mudassir Uddin. A modified principal component technique based on the LASSO. Journal of Computational and Graphical Statistics, 12(3):531–547, September 2003. [10] D. D. Lee and H. S. Seung. Learning the parts of objects by non-negative matrix factorization. Nature, 401(6755):788–791, October 1999. [11] S. Li, X. Hou, H. Zhang, and Q. Cheng. Learning spatially localized, parts-based representation. In Proceedings of the IEEE Conference on Computer Vision and Pattern Recognition, 2001. [12] Baback Moghaddam, Yair Weiss, and Shai Avidan. Spectral bounds for sparse pca: Exact and greedy algorithms. In Proceedings of the conference on Neural Information Processing Systems (NIPS), 2005. [13] Beresford N. Parlett. The symmetric eigenvalue problem. Prentice-Hall, Inc., Upper Saddle River, NJ, USA, 1980. [14] H. Zou, T. Hastie, and R. Tibshirani. Sparse principal component analysis, 2004.
2006
89
3,113
Blind source separation for over-determined delayed mixtures Lars Omlor, Martin Giese∗ Laboratory for Action Representation and Learning Department of Cognitive Neurology, Hertie Institute for Clinical Brain Research University of T¨ubingen, Germany Abstract Blind source separation, i.e. the extraction of unknown sources from a set of given signals, is relevant for many applications. A special case of this problem is dimension reduction, where the goal is to approximate a given set of signals by superpositions of a minimal number of sources. Since in this case the signals outnumber the sources the problem is over-determined. Most popular approaches for addressing this problem are based on purely linear mixing models. However, many applications like the modeling of acoustic signals, EMG signals, or movement trajectories, require temporal shift-invariance of the extracted components. This case has only rarely been treated in the computational literature, and specifically for the case of dimension reduction almost no algorithms have been proposed. We present a new algorithm for the solution of this problem, which is based on a timefrequency transformation (Wigner-Ville distribution) of the generative model. We show that this algorithm outperforms classical source separation algorithms for linear mixtures, and also a related method for mixtures with delays. In addition, applying the new algorithm to trajectories of human gaits, we demonstrate that it is suitable for the extraction of spatio-temporal components that are easier to interpret than components extracted with other classical algorithms. 1 Introduction Blind source separation techniques, such as Independent Components Analysis (ICA), have received great interest in many domains including neuroscience [3; 19; 2], machine learning [12; 11], and speech and signal processing [25]. A variety of algorithms have been proposed for different types of mixing models. Many studies have focused on instantaneous mixing, where target signals are modeled by the linear superposition of a number of source signals separately for each point in time. Another set of studies has treated convolutive mixing, where signals result from the superposition of filtered source signals (see [9] and [6] for review). Much less explored are algorithms for anechoic mixing. In this case, signals are approximated by linear combinations of source signals with time delays. Classical cases of anechoic mixing arise in electrical engineering, when signals from multiple antennas are received asynchronously, or in acoustics when sound signals are recorded with multiple microphones resulting in different running times. A few algorithms have been proposed for the solution of under-determined anechoic mixing problems, where the number of sources exceeds the number of signals [8; 4; 25; 22]. A method that treats the case of equal numbers of signals and sources, which is based on joint diagonalization of spectral matrices, has been proposed by Yeredor [24]. Almost no work exists on over-determined anechoic mixing problems, where the number of source signals is smaller than the number of original signals – the case that is most important for dimension reduction problems. Most ∗WWW home page: http://www.uni-tuebingen.de/uni/knv/arl/index.html existing methods for the solution of under-determined problems cannot be transferred to the overdetermined case, because they involve additional assumptions about the data (e.g. specific spatial structure [20]) or the solution (e.g. sparseness [4]). One approach employed for under-determined anechoic mixtures is based on the assumption of small delays and a linearization of the mixture model [5]. While this original method cannot be transferred to our problem, since it requires additional assumptions about the spatial structure of the data, preliminary work in [1] applies the same basic approximation for the over-determined case. In this paper we present a new algorithm for the solution of the over-determined anechoic mixing problem, which makes no further assumptions about the size of the delays. The proposed method is derived by applying methods from stochastic time-frequency analysis. We tested the novel algorithm with two different test data sets, human movement trajectories and synthetic mixtures of acoustic signals. We demonstrate that the method results in more accurate solutions with fewer sources than classical methods (like PCA and normal ICA) for instantaneous mixing. Also, we demonstrate that our algorithm outperforms the SOBIDS algorithm in [1] for anechoic mixtures. In addition, we demonstrate that the method seems suitable for the extraction of biologically meaningful components from human movement data. 2 Source separation for over-determined delayed mixtures 2.1 Delayed mixture problem In the following we assume that m signals xi(t), 1 ≤i ≤m have been observed. These signals are approximated by a linear combination of n source signals sj(t) with 1 ≤j ≤n, with temporal delays τij. In the case of anechoic mixing signals and sources obey the relationship: xi(t) = n X j=1 αij · sj(t −τij) i = 1, · · · , m (1) In the over-determined case the signals outnumber the sources, i.e. m ≥n. Equation (1) is a special case of a convolutive mixture problem, where the filter kernels are given by delta functions. However, the treatment as general deconvolution problem would neglect the special structure of the convolutive kernel that is given by a weighted sum of delta pulses: xi = n X j=1 (αijδ(t −τij)) ∗sj i = 1, · · · , m (2) Nevertheless, this formulation suggests a treatment of this problem exploiting the framework of harmonic analysis. Since normal Fourier transformation of equation (1) results in frequency-dependent mixtures of complex phase terms, time-frequency analysis turns out to be a more appropriate framework for the separation of sources in the above mixture models. 2.2 Wigner Ville Spectrum In signal processing and acoustics a variety of time-frequency representations have been proposed, ranging from linear and multilinear to nonlinear transformations. Due to their close connections to energy and correlation measures, specifically bilinear or quadratic distributions seem very appealing. A very popular quadratic representation is the Wigner distribution, and its modifications that are included in Cohen’s class [7]. While the Wigner Ville Spectrum is usually defined as a deterministic integral transform, it can also be extended for the analysis of (nonstationary) random processes resulting in the following definition for the Wigner Ville spectrum (WVS): Assuming that x(t) is a random process and x∗(t) = ¯x(−t) the reversed conjugated process, the WVS can be defined as [16]: Wx(t, ω) = Z τ E n x  t + τ 2  x∗ t −τ 2 o e−2πiωτdτ (3) The WVS is basically a 2-D function defined over the time-frequency plain, which can loosely be interpreted as a time-frequency distribution of the mean energy of x(t). The definition (3) implies many useful properties [16], three of which are particularly useful for the following derivation. If F denotes the Fourier Transform and Tτ, Mf the time and frequency shift operators, e.g. (TτMfx)(t) := e−2πif(t−τ)x(t −τ), then the WVS has the following properties: 1. Time-frequency shift covariance: W(Tτ Mf x)(t, ω) = Wx(t −τ, ω −f) (4) 2. Marginal properties: Z Wx(t, ω)dt = E{|Fx|2} (5) Z Wx(t, ω)df = E{|x|2} (6) 3. Mean group delay: tx(ω) := R tWx(t, ω)dt R Wx(t, ω)dt (7) Since the group delay (7) is not uniquely defined in the stochastic case [15], the last property gives a natural definition. Consistent with the standard definition for deterministic signals, the group delay for the deterministic case can be rewritten: −1 2π ∂ ∂ω arg((Fx)(ω)) = tx(ω) = R tWx(t, ω)dt R Wx(t, ω)dt . 2.3 Application to the delayed mixture model The original mixture model can be rewritten in the time-frequency domain by computing the WVS of both sides of (1): Wxi(t, ω) = Z E  n X j,k=1 αijαiksj(t + τ 2 −τij)s∗ k(t −τ 2 −τik)  e−2πiωτdτ = n X j,k=1 αijαik Z E  sj(t + τ 2 −τij)s∗ k(t −τ 2 −τik)  e−2πiωτdτ (8) Assuming that the source signals sj are statistically independent equation (8) can be further simplified, since all cross terms of the form E{sisj} with i ̸= j will vanish (assuming additionally E{si} = 0). This together with the shift covariance of the distribution leads to the central equation: Wxi(t, ω) = n X j |α|2 ijWsj(t −τij, ω) i = 1, · · · , m (9) Several existing algorithms for the solution of general convolutive or instantaneous mixture problems have exploited the 2-D structure of expressions equivalent or similar to equation (9), e.g. by time-frequency masking [25] or joint diagonalization [24; 1]. However, the 2-D representation of a 1-D random process is redundant and sometimes may conceal the structure of the underlying data due to interference [10]. Furthermore, the increased amount of data often results in prohibitive computational costs for large-scale problems. This redundancy can be avoided by projecting the WVS back onto several 1-D random processes. The most simple projections are obtained by computing the first- and zero-order moments of equation (9). These moments can be computed analytically making use of equations (5) and (7), resulting in: E{|Fxi|2} = Z Wxi(t, ω)dt = n X j |α|2 ij Z Wsj(t −τij, ω)dt = n X j |α|2 ijE{|Fsj|2} (10) and analogously E{|Fxi(ω)|2} · txi(ω) = n X j  |α|2 ij · E{|Fsi|2} ·  tsj(ω) + τij   . (11) Equation (10) defines an instantaneous mixture problem with non-negativity constrains. Such problems can be treated with standard nonnegative matrix factorization [14] or ICA [11; 12] approaches. After solving equation (10), the remaining unknowns in equation (11) are the delays and the group delay (complex phase). By successive solution of these two equations the expected values of all unknown parameters can be determined. So instead of resolving (9) it is sufficient to solve (10) and (11) by successive iteration. This suggests the following two-step algorithm to estimate the unknowns in the model (1). 2.4 Two-step algorithm The last result implies the following algorithm for the estimation of the sources, delays, and the mixing matrix in (1): 1. Compute |Fxi|2 and solve |Fxi|2(ω) = n X j |α|2 ij|Fsj|2(ω) (12) e.g. using non-negative matrix factorization. For our implementation we applied an algorithm for Bayesian non-negative ICA [11]. 2. Initialize τij = 0 and iterate the following steps: (a) Numerically solve : |Fxi(ω)|2 · ∂ ∂ω arg{Fxi} = n X j |α|2 ij · |Fsi|2 ·  ∂ ∂ω arg{Fsj} + τij  (13) for the term ∂ ∂ωarg{Fsj}. Integrate the solution to obtain Fsj. (b) Exploiting the knowledge of the sources sj it is possible to update the mixing and the delay matrix through optimization of the following cost function, which is derived from (1), where S(⃗τj) = (sk(ti −τjk))i,k, Aj = (αij)i: [ b⃗τj, c Aj] = argmin[ ⃗ τj,Aj]∥xj −Aj · S(⃗τj)∥2 (14) This minimization is accomplished following [21], assuming uncorrelatedness for the sources and independence of the time delays. (c) Update τij and go back to (a), until convergence is achieved. 3 Test data sets For comparing the novel algorithm with other related methods we used two different types of data sets. A first set of data was generated artificially by mixing different sound sources, varying the mixing weights and the delays. This data was non-periodic and enabled us to validate the accuracy of the reconstruction of the source signals. The second data set were human movement trajectories of emotional gaits that were recorded using motion capture. The gait trajectories were periodic and served for testing the suitability of the new method for extracting biologically interpretable movement components. Our first data set consisted of synthetically generated delayed mixtures generated from segments of speech and sound signals taken from an ICA benchmark data set described in [6]. The data basis contained in total 14 signals, with a length of 8000 time points each. In order to obtain statistically representative results, data sets were recomputed 20 times with random selection of the source signals, and/or of the mixing and delay matrices. Three types of mixtures were generated: (I) Mixtures of 2 source segments with random mixing and delay matrices (2 × 2), each resulting in two simulated signals x1,2. This data set was used to compare the new method with PCA and (fast) ICA [12]. Data set (I) was included to show that the new algorithm is also able to address the even-determined case (n = m). (II) Mixtures of 2 randomly selected segments from the speech data basis using the constant mixing matrix A = [1, 2; 3, 1; 10, 5; 1, 2; 1, 1] and the constant delay matrix T = (τij)ij = [0, 4000; 2500, 5000; 100, 200; 1, 1; 500, 333]. This data set was used to compare the new method with PCA and ICA, and the SOBIDS algorithm [1], which requires at least twice as many signals as sources. Data set (II) with fixed mixing and delay matrices was included since completely random generation sometimes produced degenerated anechoic mixtures (instantaneous mixtures or ill-conditioned mixing matrices). (III) A third data set was generated by mixing two randomly selected source segments with random mixture matrices and random delay matrices. To compare the performance of the different algorithms we used a performance measure M that was defined by the maximum of the cross-correlations between extracted sources, sextract,j, and original sources sorig,j (after appropriate matching of the individual sources, since the recovered sources are not ordered in a specific manner): M = (1/n) n X j=1 max τ |E{sextract,j(t) · sorig,j(t + τ)}| The second test data set consisted of movement trajectories of human actors walking neutrally, or with different emotional styles (happy, angry, sad and fearful). The movements were recorded using a VICON 612 motion capture system with 7 cameras, obtaining the 3D positions of 41 passive markers on the bodies of the actors. We recorded trajectories from 13 lay actors, repeating each walking style three times per actor. A hierarchical kinematic body model (skeleton) with 17 joints was fitted to the marker positions, and joint angles were computed. Rotations between adjacent body segments were described as Euler angles, defining flexion, abduction and rotation about the connecting joints. The data for the unsupervised learning procedure included only the flexion angles of the hip, knee, elbow, shoulder and the clavicle, since the other angles had relatively high noise levels. From each trajectory only one gait cycle was extracted, which was time normalized. This resulted in a data set with 1950 samples with a length of 100 time points each. 3.1 Results Delayed mixtures of sound sources: Figure 1 shows the results for the extraction of the sound sources from the data sets (I)-(III). The bar plots show means and standard deviations of the performance measure M over twenty simulations. On all data sets our new method shows an overall performance measure above 80%, while PCA and ICA show performances between 50 and 60%. The SOBIDS algorithm reaches a performance level of 72%. For a more accurate statistical comparison of the different methods we used a one-way repeated measure ANOVA for the measure M. There was a significant effect for all three data sets. Post-hoc comparison using the Least Significant Difference (LSD) [18] revealed that our new method was significantly better than PCA and ICA for all three data sets. Our method significantly outperformed the SOBIDS algorithm for data set (III). For data set (II) the difference between these two algorithms was not significant, due to the increased overall variability in this data set. The better performance of our algorithm compared to PCA and ICA results from the appropriate modeling of time delays. The better performance compared to the SOBIDS algorithm might be explained by the fact that this algorithm requires the assumption of small delays. Figure 1: Comparison of different blind source separation algorithms for synthetic mixtures of sound signals with delays (data sets I-III, see text). The stars indicate significant (p < 0.001) differences compared to the new algorithm. Human gait trajectories: With the second data set we tested whether the proposed novel algorithm is suitable for the extraction of interpretable source signals from human movement data. By performing normal ICA separately on individual joint trajectories and comparing the extracted sources, we had observed before that such sources are often very similar except for time shifts between different joints. This motivates the hypothesis that (1) might provide an appropriate generative model for such gait trajectories. This hypothesis is confirmed by the data presented in Figure 2 that shows the approximation quality (explained variance) for different numbers of extracted sources and comparing four different algorithms: PCA, (fast) ICA [12], Bayesian positive ICA [11], SOBIDS, and the new algorithm. The new method outperforms all other methods, and in particular the methods without time delays. Specifically, the new algorithm is capable of approximating 97% of the trajectory data with only 3 sources, while PCA and ICA require more than 6 sources to achieve the same level of accuracy. Figure 2: Comparison of different blind source separation algorithms. Explained variance is shown for different numbers of extracted sources. In order to test whether the novel algorithm results in source signals that provide useful interpretations of biological data we modeled all trajectories in our gait data sets by linear superpositions of the extracted sources and analyzed the resulting mixture matrices A. To extract weight components that are specific for individual emotional styles we modeled the mixture matrices applying sparse linear regression. The (vectorized) weights of the individual gait trajectories for emotion j, defining the vector aj, were approximated by the sum of a component a0 (containing the weights that characterize neutral walking) and an emotion-specific contribution. Formally, this multi-linear regression model can be written as aj ≈a0 + C · ej , (15) where C is a weight matrix that determines the emotion-specific contributions to the mixing weights. Its columns are given by the differences between the weights for the different emotional styles (happy, sad, fearful and angry) and the weights for neutral walking. In order to obtain easily interpretable results, the matrix C was sparsified by L1 norm minimization. The solution of the linear regression problem was obtained by minimizing the following cost function (with γ > 0) using quadratic programming: E(C) = X j ∥aj −a0 −C · ej∥2 + γ X i,j |Cij| (16) This regression basically computes the mean differences between the weights for neutral walking and for emotional walking. The sparsification separates automatically important and less important features. The concentration of the variance into a few important predictors simplifies the interpretation. Figure 3 shows a gray level plot of the matrix C, illustrating the weight differences compared to neutral walking for the four different emotional styles and the different joint angles. Positive elements of the matrix indicate cases where the joint amplitudes for the emotional gait are increased compared to normal walking. Negative elements are indicated by white triangles in the lower left corner of the individual cells of the plot. They correspond to cases where the joint angle amplitudes for the emotional walk are reduced compared to normal walking. The + and −signs in the figure summarize data from psychophysical experiments that have investigated kinematic features that were important for the perception of emotional gaits [17; 23]. Plus signs indicate cases where (perceived) increases of the joint amplitudes compared to normal walking were correlated with the perception of the corresponding emotion, and minus signs to cases where a (perceived) reduction of the joint angle amplitudes was correlated with the perception of the corresponding emotion. Comparison between these psychophysical results and the elements of the matrix C (Figure 3a) shows a very close match between the weight changes and the features that are important for the perception of emotions from gaits. This implies that the novel algorithm extracts features that can be meaningfully interpreted in a biological sense. Figure 3b shows the results of the same analysis for sources that had been extracted with PCA, matching the numbers of non-zero elements of the estimated matrix C. For gait trajectories the source signals by PCA and ICA are virtually identical. Therefore, results in Figure 3 would be unchanged for ICA. In either case, the match is significantly worse than for the sources extracted with the novel algorithm (panel a). In addition, the signs of the matrix elements often do not match the signs of the amplitude changes in the psychophysical experiments. This implies that the new algorithm extracts spatio-temporal components from human gait data that are more easily interpretable than components extracted with PCA. Figure 3: Elements of the weight matrix C, encoding emotion-specific deviations from neutral walking, for different degrees of freedom. Negative elements are indicated by white triangles in the lower left corners of the cells. Kinematic features that have been shown to be important for the perception of emotions from gait in psychophysical experiments are indicated by the plus and minus signs. (Details see text.) 3.2 Conclusion We present a new algorithm for the solution of over-determined blind source separation problems for mixtures of sources with delays. The proposed method has been derived by application of a timefrequency transformation to the mixture model, resulting in a two-step algorithm that combines positive ICA with another iterative optimization step. We demonstrate that the developed algorithm outperforms other source separation algorithms with and without time delays on synthetic data sets defined by delayed mixtures of speech signals, and also on real data sets obtained by motion capture of human full-body movements. For human movements we also demonstrate that, at least for the case of human gait, the new algorithm provides a more compact and interpretable representations than the alternative methods we tested. To our knowledge the proposed algorithm is the first one that solves over-determined delayed mixing problems without specific additional assumptions about the structure of the delay matrix, e.g. limited sizes of the delays. In contrast to nonnegative matrix factorization with delays [2], the proposed method is applicable to non-positive signals and sources. Future work will focus on testing the algorithm with a broader range of data sets, also including particularly non-periodic human movements. In addition, it seems possible to extend the proposed method for multi-dimensional translation vectors (delays), making it applicable for the learning of translation-invariant features in two-dimensional images. Acknowledgments This work was supported by HFSP, DFG, the Volkswagenstiftung and the EU FP6 Project ’COBOL’. We thank C.L. Roether for help with the trajectory acquisition and the psychological interpretation of the data, and W. Ilg for support with the motion capturing. References [1] J. Ashtar, et al (2004) A novel approach to blind separation of delayed sources in linear mixtures. 7th Semester Signal Processing, Aalborg University. [2] A. d’Avella, E. Bizzi (2005) Shared and specific muscle synergies in natural motor behaviors. Proc Natl Acad Sci U S A 102(8) 3076-3081. [3] A.J. Bell, T.J. Sejnowski (1995) An information-maximization approach to blind separation and blind deconvolution. Neural Computation 7 1129-1159. [4] P. Bofill (2003) Underdetermined blind separation of delayed sound sources in the frequency domain. Neurocomputing Vol. 55 627-641. [5] A. Celik, et al (2005) Gradient Flow Independent Component Analysis in Micropower VLSI. Advances in Neural Information Processing Systems 18, 187-194. [6] A. Cichocki, S. Amari, (2002) Adaptive Blind Signal and Image Processing. John Wiley, Chichester (2002.) [7] L. Cohen (1995) Time-Frequency Analysis. Englewood Cliffs, NJ. PrenticeHall. [8] B. Emile, P. Comon (1998) Estimation of time delays between unknown colored signals. Signal Processing 69 93–100. [9] P.D. O’Grady, B.A. Pearlmutter, S.T. Rickard (1982) Survey of sparse and non-sparse methods in source separation. International Journal of Imaging Systems and Technology (IJIST), special issue on blind source separation and deconvolution in imaging and image processing (15). [10] F. Hlawatsch, P. Flandrin (1997) The Interference Structure of the Wigner Distribution and Related Time-Frequency Signal Representations. The Wigner Distribution -Theory and Applications in Signal Processing. Amsterdam: Elsevier, 59-133. [11] P. Hojen-Sorensen, O. Winther, L. Hansen (2002) Mean field approaches to independent component analysis. Neural Computation 14 889-918. [12] A. Hyv¨arinen, E.O., (1997) A fast fixed-point algorithm for independent component analysis. Neural Computation 9 1483-1492. [13] Y. Ivanenko, R. Poppele, F. Lacquaniti (2004) Five basic muscle activation patterns account for muscle activity during human locomotion. J Physiol. 556(Pt1) 267-282. [14] D.D. Lee, H.S. Seung (1999) Learning the parts of objects by Non-Negative Matrix Factorization. Nature 401. [15] W. Martin (1982) Time-frequency analysis of random signals. Proc. IEEE Int. Conf. on Acoust., Speech and Signal Processing. 1325-1328. [16] G. Matz, F. Hlawatsch (2003) Wigner distributions (nearly) everywhere: Time-frequency analysis of signals, systems, random processes, signal spaces, and frames. Signal Processing, special section ”From Signal Processing Theory to Implementation” on the occasion of the 65th birthday of W. Mecklenbr¨auker 83 1355-1378. [17] M. de Meijer (1989) The contribution of general features of body movement to the attribution of emotions. Journal of nonverbal behaviour 13 247-268 [18] R. G. Miller Jr. (1981) Simultaneous Statistical Inference. Springer, New York, NY, 2nd edition. [19] R. Vig´ario, V. Jousm¨aki, M. H¨am¨al¨ainen, R. Hari, E.Oja (1998) Independent component analysis for identification of artifacts in magnetoencephalographic recordings. Advances in Neural Information Processing Systems 10 229-235. [20] R. Roy, T. Kailath (1989) ESPRIT—Estimation of signal parameters via rotational invariance techniques. IEEE Trans. Acoust., Speech, Sig. Proc. 37 984-995. [21] A. Swindelhurst (1998) Time delay and spatial signature estimation using known asynchronous signals. IEEE Trans. on Sig. Proc. ASSP-33,no. 6 1461-1470. [22] K. Torkkola (1996) Blind separation of delayed sources based on information maximization. ICASSP’96 3509-3512. [23] H. G. Wallbott (1998) Bodily expression of emotion. European Journal of Social Psychology 28 879-896. [24] A. Yeredor (2003) Time-delay estimation in mixtures. Acoustics, Speech, and Signal Processing 5 237-240. [25] ¨O. Y´ylmaz, S.Rickard (2004) Blind Separation of Speech Mixtures via Time-Frequency Masking. IEEE Transactions On Signal Processing 52 1830-1847.
2006
9
3,114
Context dependent amplification of both rate and event-correlation in a VLSI network of spiking neurons Elisabetta Chicca, Giacomo Indiveri and Rodney J. Douglas Institute of Neuroinformatics University - ETH Zurich Winterthurerstrasse 190, CH-8057 Zurich, Switzerland chicca,giacomo,rjd@ini.phys.ethz.ch Abstract Cooperative competitive networks are believed to play a central role in cortical processing and have been shown to exhibit a wide set of useful computational properties. We propose a VLSI implementation of a spiking cooperative competitive network and show how it can perform context dependent computation both in the mean firing rate domain and in spike timing correlation space. In the mean rate case the network amplifies the activity of neurons belonging to the selected stimulus and suppresses the activity of neurons receiving weaker stimuli. In the event correlation case, the recurrent network amplifies with a higher gain the correlation between neurons which receive highly correlated inputs while leaving the mean firing rate unaltered. We describe the network architecture and present experimental data demonstrating its context dependent computation capabilities. 1 Introduction There is an increasing body of evidence supporting the hypothesis that recurrent cooperative competitive neural networks play a central role in cortical processing [1]. Anatomical studies demonstrated that the majority of synapses in the mammalian cortex originate within the cortex itself [1,2]. Similarly, it has been shown that neurons with similar functional properties are aggregated together in modules or columns and most connections are made locally within the neighborhood of a 1 mm column [3]. From the computational point of view, recurrent cooperative competitive networks have been investigated extensively in the past [4–6]. Already in the late 70’s Amari and Arbib [4] applied the concept of dynamic neural fields1 [7, 8] to develop a unifying mathematical framework to study cooperative competitive neural network models based on a series of detailed models of biological systems [9–11]. In 1994, Douglas et al. [5] argued that recurrent cortical circuits restore analog signals on the basis of their connectivity patterns and produce selective neuronal responses while maintaining network stability. To support this hypothesis they proposed the cortical amplifier2 model and showed that a network of cortical amplifiers performs signal restoration and noise suppression by amplifying the correlated signal in a pattern that was stored in the connectivity of the network, without amplifying the noise. In 1998, Hansel and Sompolinsky presented a detailed model for cor1In the dynamic neural fields approach neural networks are described as a continuous medium rather than a set of discrete neurons. A differential equation describes the activation of the neural tissue at different position in the neural network. 2The cortical amplifier consists of a population of identical neurons, connected to each other with the same excitatory synaptic strength, sharing a common inhibitory feedback and the same input. E E E E E E I I I E E E E E E E I I I E E E E E E E I I I E E E E E E E AER OUTPUT AER INPUT E E E E E E I I I E E E E E E E I I I E E E E E E E I I I E AER INPUT E E I I E Figure 1: The chip architecture. Squares represent excitatory (E) and inhibitory (I) synapses, trapezoids represent I&F neurons. The synapse can be stimulated by external (AER) inputs and by local events. The I&F neurons can transmit their spikes off-chip and/or to the locally connected synapses (see text for details). The local connectivity implements a cooperative competitive network with first and secon dneighbors recurrent excitatory connections and global inhibition. The first and second neighbor connections of the neurons at the edges of the array are connected to pads. This allows us to leave the network open, or implement closed boundary conditions (to form a ring of neurons), using off-chip jumpers. The global inhibitory neuron (bottom left) receives excitation from all neurons in the array and its output inhibits all of them. tical feature selectivity based on recurrent cooperative competitive networks [6] where they showed how these models can account for some of the emergent cooperative cortical properties observed in nature. Recently it has been argued that recurrent cooperative competitive networks exhibit at the same time computational properties both in an analog way (e.g. amplification or filtering) and in a digital way (e.g. digital selection) [12]. To demonstrate the digital selection and analog amplification capabilities of these type of networks Hahnloser et al. proposed a VLSI chip in which neurons are implemented as linear threshold units and input and output signals encode mean firing rates. The recurrent connectivity of the network proposed in [12] comprises self-excitation, first and second neighbors recurrent excitatory connections, and global inhibition. We are particularly interested in the use of these types of networks in spike based multi-chip sensory systems [13] as a computational module capable of performing stimulus selection, signal restoration and noise suppression. Here we propose a spike-based VLSI neural network that allows us to explore these computational properties both in the mean rate and time domain. The device we propose comprises a ring of excitatory Integrate-and-Fire (I&F) neurons with first and second neighbors recurrent excitatory connections and a global inhibitory neuron which receives excitation from all the neurons in the ring. In the next Section we describe the network architecture, and in Section 3 and 4 we show how this network can perform context dependent computation in the mean rate domain and in the time domain respectively. 2 The VLSI Spiking Cooperative Competitive Network Several examples of VLSI competitive networks of spiking neurons have already been presented in literature [14–19]. In 1992, De Yong et al. [16] proposed a VLSI winner-take-all (WTA) spiking network consisting of 4 neurons with all-to-all inhibitory connections. In 1993, a different VLSI WTA chip comprising also 4 neurons was proposed, it used global inhibition to implement the WTA behavior [17]. More recent implementations of spiking VLSI cooperative competitive networks consist of larger arrays and show more complex behavior thanks also to more advanced VLSI processes and testing instruments currently available [14,15,18,19]. 0 2 4 6 8 10 0 5 10 15 20 25 30 Time (s) Neuron address 0 20 40 Mean f (Hz) (a) 0 2 4 6 8 10 0 5 10 15 20 25 30 Time (s) Neuron address 0 20 40 Mean f (Hz) (b) Figure 2: Raster plot for the suppression experiments. (a) Feed-forward network response. The left panel shows the raster plot of the network activity in response to two Gaussian shaped, Poisson distributed, input spike trains, with mean firing rates ranging from 0 to 120 Hz. The right panel shows the mean frequencies of the neurons ion the feed-forward network. The feed-forward network response directly reflects the applied input: on average, the neurons produce an output spike in response to about every 6 input spikes. Note how the global inhibitory neuron (address number 1) is not active. (b) Cooperative-competitive network response. The left panel shows the raster plot of the network activity in response to the same input applied to the feed-forward network. The right panel shows the mean output frequencies of the neurons in the cooperative-competitive network. The recurrent connectivity (lateral excitation and global inhibition) amplifies the activity of the neurons with highest mean output frequency and suppresses the activity of other neurons (compare with right panel of (a)). Most of the previously proposed VLSI models focused on hard WTA behaviors (only the neuron that receives the strongest input is active). Our device allows us to explore hard and soft WTA behaviors both in the mean rate and spike timing domain. Here we explore the network’s ability to perform context dependent computation using the network in the soft WTA mode. The VLSI network we designed comprises 31 excitatory neurons and 1 global inhibitory neuron [15]. Cooperation between neurons is implemented by first and second neighbors recurrent excitatory connections. Depending on the relative strength of excitation and inhibition the network can be operated either in hard or soft WTA mode. On top of the local hardwired recurrent connectivity the network comprises 16 AER3 synapses per neuron. The chip was fabricated in a 0.8 µm, n-well, double metal, double poly, CMOS process using the Europractice service. The architecture of the VLSI network of I&F neurons is shown in Fig. 1. It is a two-dimensional array containing a row of 32 neurons, each connected to a column of afferent synaptic circuits. Each column contains 14 AER excitatory synapses, 2 AER inhibitory synapses and 6 locally connected (hard-wired) synapses. The circuits implementing the chip’s I&F neurons and synapses have been described in [22]. When an input address-event is received, the synapse with the corresponding row and column address is stimulated. If the input address-events routed to the synapse integrate up to the neuron’s spiking threshold, then that neuron generates an output address-event which is transmitted off-chip. Arbitrary network architectures can be implemented using off-chip look-up tables and routing the chip’s output address-events to one or more AER input synapses. The synapse address can belong to a different chip, therefore, arbitrary multi-chip architectures can be implemented. Synapses with local hard-wired connectivity are used to realize the cooperative competitive network with nearest neighbor and second nearest neighbor interactions (see Fig. 1): 31 neurons of the array 3In the Address Event Representation (AER) input and output spikes are real-time digital events that carry analog information structure [20]. An asynchronous communication protocol based on the AER is the most efficient for signal transmission across neuromorphic devices [21]. 5 10 15 20 25 30 0 5 10 15 20 25 30 35 40 Neuron address Normalized mean activity Baseline Weak Inhibition Strong Inhibition (a) 5 10 15 20 25 30 0 5 10 15 20 25 30 35 Neuron address Normalized mean activity Baseline Weak Lateral Excitation Strong Lateral Excitation (b) Figure 3: Suppression as a function of the strength of global inhibition and lateral excitation. (a) The graph shows the mean firing rate of the neurons for three different connectivity conditions and in response to the same stimulus. The continuous line represents the baseline: the activity of the neurons in response to the external stimulus when the local connections are not active (feed-forward network). The dashed and dotted lines represent the activity of the feed-back network for weak and strong inhibition respectively and fixed lateral excitation. For weak inhibition the neurons that receive the strongest inputs amplify their activity. (b) Activity of the network for three different connectivity conditions. The continuous line represents the baseline (response of the feed-forward network to the input stimulus). The dashed and dotted lines represent the activity of the feed-back network for weak and strong lateral excitation respectively and fixed global inhibition. For strong lateral excitation the neurons that receive the highest input amplify their activity. send their spikes to 31 local excitatory synapses on the global inhibitory neuron; the inhibitory neuron, in turn, stimulates local inhibitory synapses of the 31 excitatory neurons; each excitatory neuron stimulates its first and second neighbors on both sides using two sets of locally connected synapses. The first and second neighbor connections of the neurons at the edges of the array are connected to pads. This allows us to leave the network open, or implement closed boundary conditions (to form a ring of neurons [12]), using off-chip jumpers. All of the synapses on the chip can be switched off. This allows us to inactivate either the local synaptic connections, or the AER ones, or to use local synapses in conjunction with the AER ones. In addition, a uniform constant DC current can be injected to all the neurons in the array thus producing a regular “spontaneous” activity throughout the whole array. 3 Competition in mean rate space In our recurrent network competition is implemented using one global inhibitory neuron and cooperation using first and second nearest neighbors excitatory connections, nonetheless it performs complex non-linear operations similar to those observed in more general cooperative competitive networks. These networks, often used to model cortical feature selectivity [6, 23], are typically tested with bell-shaped inputs. Within this context we can map sensory inputs (e.g. obtained from a silicon retina, a silicon cochlea, or other AER sensory systems) onto the network’s AER synapses in a way to implement different types of feature maps. For example, Chicca et al. [24] recently presented an orientation selectivity system implemented by properly mapping the activity of a silicon retina onto AER input synapses of our chip. Moreover the flexibility of the AER infrastructure, combined with the large number of externally addressable AER synapses of our VLSI device, allows us to perform cooperative competitive computation across different feature spaces in parallel. We explored the behavior of the network using synthetic control stimuli: we stimulated the chip via its input AER synapses with Poisson distributed spike trains, using Gaussian shaped mean frequency profiles. A custom PCI-AER board [24] was used to stimulate the chip and monitor its activity. 0 5 10 15 20 25 30 −0.02 0 0.02 0.04 0.06 0.08 0.1 0.12 0.14 0.16 Neuron address Mean correlation coefficient 10 20 30 5 10 15 20 25 30 0 0.2 0.4 0.6 (a) 0 5 10 15 20 25 30 −0.01 0 0.01 0.02 0.03 0.04 0.05 0.06 0.07 0.08 Neuron address Mean correlation coefficient 10 20 30 5 10 15 20 25 30 0 0.05 0.1 0.15 0.2 0.25 0.3 (b) Figure 4: (a) Mean correlation coefficient among input spike trains used to stimulate the neurons of our network. The figure inset shows the pairwise correlations between each input source. (b) Mean correlation coefficient of output spike trains, when the cooperative-competitive connections of the network are disabled (feed-forward mode). Note the different scales on the y-axis and in the inset color bars. 0 5 10 15 20 25 30 −0.01 0 0.01 0.02 0.03 0.04 0.05 0.06 0.07 0.08 Neuron address Mean correlation coefficient 10 20 30 5 10 15 20 25 30 0 0.1 0.2 0.3 (a) 0 5 10 15 20 25 30 −0.01 0 0.01 0.02 0.03 0.04 0.05 0.06 0.07 0.08 Neuron address Mean correlation coefficient 10 20 30 5 10 15 20 25 30 0 0.1 0.2 0.3 0.4 0.5 (b) Figure 5: (a) Correlation coefficient of output spike trains, when only global inhibition is enabled; (b) Correlation coefficient of output spike trains when both global inhibition and local excitation are enabled. Suppression of least effective stimuli was tested using two Gaussian shaped inputs with different amplitude (in terms of mean frequency) composed by Poisson trains of spikes. Two examples of raw data for these experiments in the feed-forward and recurrent network conditions are shown in Fig. 2(a) and 2(b) respectively. The output of the network is shown in Fig. 3(a) for two different values of the strength of global inhibition (modulated using the weight of the connection from the excitatory neurons to the global inhibitory neuron) and a fixed strength of lateral excitation. The activity of the recurrent network has to be compared with the activity of the feed-forward network (“baseline” activity plotted in Fig. 2(a) and represented by the continuous line in Fig. 3(a)) in response to the same stimulus to easily estimate the effect of the recurrent connectivity. The most active neurons cooperatively amplify their activity through lateral excitation and efficiently drive the global inhibitory neuron to suppress the activity of other neurons (dashed line in Fig. 3(a)). When the strength of global inhibition is high the amplification given by the lateral excitatory connections can be completely suppressed (dotted line in Fig. 3(a)). A similar behavior is observed when the strength of lateral excitation is modulated (see Fig. 3(b)). For strong lateral excitation (dashed line in Fig. 3(b)) amplification is observed for the neurons receiving the input with highest mean frequency and suppression of neurons stimulated by trains with lower mean frequencies occur. When lateral excitation is weak (dotted line in Fig. 3(b)), global inhibition dominates and the activity of all neurons is suppressed. The non-linearity of this behavior is evident when we compare the effect of recurrent connectivity on the peak of the lowest hill of activity and on the side of the highest hill of activity (e.g. neuron 23 and 11 respectively, in Fig. 3(a)). In the feed-forward network (continuous line) these two neurons have a similar mean out frequency (∼12 Hz), nevertheless the effect of recurrent connectivity on their activity is different. The activity of neuron 11 is amplified by a factor of 1.24 while the activity of neuron 23 is suppressed by a factor of 0.39 (dashed line). This difference shows that the network is able to act differently on similar mean rates depending on the spatial context, distinguishing the relevant signal from distractors and noise. 4 Competition in correlation space Here we test the context-dependent computation properties of the cooperative competitive network, also in the spike-timing domain. We stimulated the neurons with correlated, Poisson distributed spike trains and analyzed the network’s response properties in correlation space, as a function of its excitatory/inhibitory connection settings. Figure 4(a) shows the mean correlation coefficient between each input spike train with the spike trains sent to all other neurons in the array. The figure inset shows the pair-wise correlation coefficient across all neuron addresses: neurons 7 through 11 have one common source of input (35Hz) and five independent sources (15Hz) for a total mean firing rate of 50Hz and a 70% correlation; neurons 17 through 21 were stimulated with one common source of input at 25Hz and five independent sources at 25HZ, for a total mean firing rate of 50Hz and a 50% correlation; all other neurons were stimulated with uncorrelated sources at 50Hz. The auto-correlation coefficients (along the diagonal in the figure’s inset) are not plotted, for sake of clarity. When used as a plain feed-forward network (with all local connections disabled), the neurons generate output spike trains that reflect the distributions of the input signal, both in the mean firing rate domain (see Fig.2(a)) and in the correlation domain (see Fig.4(b)). The lower output mean firing rates and smaller amount of correlations among output spikes are due to the integrating properties of the I&F neuron and of the AER synapses. In Fig.5 we show the response of the network when global inhibition and recurrent local excitation are activated. Enabling only global inhibition, without recurrent excitation has no substantial effect with respect to the feed-forward case (compare Fig.5(a) with Fig.4(b)). However, when both competition and cooperation are enabled the network produces context-dependent effects in the correlation space that are equivalent to the ones observed in the mean-rate domain: the correlation among neurons that received inputs with highest correlation is amplified, with respect to the feed-forward case, while the correlation between neurons that were stimulated by weakly correlated sources is comparable to the correlation between all other neurons in the array. Given the nature of the connectivity patterns in our chip, the correlation among neighboring neurons is increased throughout the array, independent of the input sources, hence the mean correlation coefficient is higher throughout the whole network. However, the difference in correlation between the base level and the group with highest correlation is significantly higher when cooperation and competition are enabled, with respect to the feed-forward case. At the same time, the difference in correlation between the base level and the group with lowest correlation when cooperation and competition are enabled cannot be distinguished from that of the feed-forward case. See Tab. 1 for the estimated mean and standard deviation in the four conditions. These are preliminary experiments that provide encouraging results. We are currently in the process of designing an equivalent architecture one a new chip using an AMS 0.35µm technology, with 256 neurons and 8192 synapses. We will use the new chip to perform much more thorough experiments to extend the analysis presented in this Section. 5 Discussion We presented a hardware cooperative competitive network composed of spiking VLSI neurons and analog synapses, and used it to simulate in real-time network architectures similar to those studied by Amari and Arbib [4], Douglas et al. [5], Hansel and Sompolinsky [6], and Dayan and Abbott [25]. We showed how the hardware cooperative competitive network can exhibit the type of complex Table 1: Difference in correlation between the base level and the two groups with correlated input in the feed-forward and cooperative-competitive network Cooperative Feed-forward competitive network network Highest correlation group 0.029±0.007 0.04±0.01 Lowest correlation group 0.009±0.006 0.010±0.007 non-linear behaviors observed in biological neural systems. These behaviors have been extensively studied in continuous models but were never demonstrated in hardware spiking systems before. We pointed out how the recurrent network can act differently on neurons with similar activity depending on the local context (i.e. mean firing rates, or mean correlation coefficient). In the mean rate case the network amplifies the activity of neurons belonging to the selected stimulus and suppresses the activity of neurons belonging to distractors or at noise level. This property is particular relevant in the context of signal restoration. We believe that this is one of the mechanisms used by biological systems to perform highly reliable computation restoring signals on the basis of cooperative-competitive interaction among elementary units of recurrent networks and hence on the basis of the context of the signal. In the mean correlation coefficient case, the recurrent network amplifies more efficiently the correlation between neurons which receive highly correlated inputs while keeping the average mean firing rate constant. This result supports the idea that correlation can be viewed as an additional coding dimension for building internal representations [26]. Acknowledgments This work was supported in part by the EU grants ALAVLSI (IST-2001-38099) and DAISY (FP62005-015803), and in part by the Swiss National Science Foundation (PMPD2-110298/1). References [1] R. J. Douglas and K. A. C. Martin. Neural circuits of the neocortex. Annual Review of Neuroscience, 27:419–51, 2004. [2] T. Binzegger, R. J. Douglas, and K. Martin. A quantitative map of the circuit of cat primary visual cortex. Journal of Neuroscience, 24(39):8441–53, 1994. [3] E. R. Kandel, J.H. Schwartz, and T. M. Jessell. Principles of Neural Science. Mc Graw Hill, 2000. [4] S. Amari and M. A. Arbib. Competition and cooperation in neural nets. In J. Metzler, editor, Systems Neuroscience, pages 119–65. Academic Press, 1977. [5] R. J. Douglas, M. A. Mahowald, and K. A. C. Martin. Hybrid analog-digital architectures for neuromorphic systems. In Proc. IEEE World Congress on Computational Intelligence, volume 3, pages 1848–1853. IEEE, 1994. [6] D. Hansel and H. Somplinsky. Methods in Neuronal Modeling, chapter Modeling Feature Selectivity in Local Cortical Circuits, pages 499–567. MIT Press, Cambridge, Massachusetts, 1998. [7] S. Amari. Dynamics of pattern formation in lateral-inhibition type neural fields. Biological Cybernetics, 27:77–87, 1977. [8] W. Erlhagen and G. Sch¨oner. Dynamic field theory of movement preparation. Psychological Review, 109:545–572, 2002. [9] P. Dev. Perception of depth surfaces in random–dot stereograms: a neural model. International Journal of Man–Machine Studies, 7:511–28, 1975. [10] R. L. Didday. A model of visuomotor mechanisms in the frog optic tectum. Mathematical Biosciences, 30:169–80, 1976. [11] W. L. Kilmer, W. S. McCulloch, and J. Blum. A model of the vertebrate central command system. International Journal of Man-Machine Studies, 1:279–309, 1969. [12] R. Hahnloser, R. Sarpeshkar, M. Mahowald, R. J. Douglas, and S. Seung. Digital selection and analog amplification co-exist in an electronic circuit inspired by neocortex. Nature, 405(6789):947–951, 2000. [13] R. Serrano-Gotarredona, M. Oster, P. Lichtsteiner, A. Linares-Barranco, R. Paz-Vicente, F. G´omez-Rodr´ıguez, H. Kolle Riis, T. Delbr¨uck, S. C. Liu, S. Zahnd, A. M. Whatley, R. J. Douglas, P. H¨afliger, G. Jimenez-Moreno, A. Civit, T. Serrano-Gotarredona, A. AcostaJim´enez, and B. Linares-Barranco. AER building blocks for multi-layer multi-chip neuromorphic vision systems. In S. Becker, S. Thrun, and K. Obermayer, editors, Advances in Neural Information Processing Systems, volume 15. MIT Press, Dec 2005. [14] J.P. Abrahamsen, P. Hafliger, and T.S. Lande. A time domain winner-take-all network of integrate-and-fire neurons. In 2004 IEEE International Symposium on Circuits and Systems, volume 5, pages V–361 – V–364, May 2004. [15] E. Chicca, G. Indiveri, and R. J. Douglas. An event based VLSI network of integrate-and-fire neurons. In Proceedings of IEEE International Symposium on Circuits and Systems, pages V-357–V-360. IEEE, 2004. [16] M. R. DeYong, R. L. Findley, and C. Fields. The design, fabrication, and test of a new VLSI hybrid analog-digital neural processing element. IEEE Transactions on Neural Networks, 3(3):363–74, 1992. [17] P. Hylander, J. Meador, and E. Frie. VLSI implementaion of pulse coded winner take all networks. In Proceedings of the 36th Midwest Symposium on Circuits and Systems, volume 1, pages 758–761, 1993. [18] G. Indiveri, R. M¨urer, and J. Kramer. Active vision using an analog VLSI model of selective attention. IEEE Transactions on Circuits and Systems II, 48(5):492–500, May 2001. [19] M. Oster and S.-C. Liu. A winner-take-all spiking network with spiking inputs. In 11th IEEE International Conference on Electronics, Circuits and Systems (ICECS 2004), 2004. [20] K. A. Boahen. Retinomorphic Vision Systems: Reverse Engineering the Vertebrate Retina. Ph.D. thesis, California Institute of Technology, Pasadena, CA, 1997. [21] E. Culurciello and A. G. Andreou. A comparative study of access topologies for chip-level address-event communication channels. IEEE Transactions on Neural Networks, 14(5):1266– 77, September 2003. [22] E. Chicca, D. Badoni, V. Dante, M. D’Andreagiovanni, G. Salina, S. Fusi, and P. Del Giudice. A VLSI recurrent network of integrate–and–fire neurons connected by plastic synapses with long term memory. IEEE Transactions on Neural Networks, 14(5):1297–1307, September 2003. [23] R. Ben-Yishai, R. Lev Bar-Or, and H. Sompolinsky. Theory of orientation tuning in visual cortex. Proceedings of the National Academy of Sciences of the USA, 92(9):3844–3848, April 1995. [24] E. Chicca, A. M. Whatley, V. Dante, P. Lichtsteiner, T. Delbruck, P. Del Giudice, R. J. Douglas, and G. Indiveri. A multi-chip pulse-based neuromorphic infrastructure and its application to a model of orientation selectivity. IEEE Transactions on Circuits and Systems I, Regular Papers, 2006. (In press). [25] P. Dayan and F. Abbott. Theoretical Neuroscience: Computational and Mathematical Modeling of Neural Systems. MIT Press, 2001. [26] E. Salinas and T. J. Sejnowski. Correlated neuronal activity and the flow of neural information. Nature Reviews Neuroscience, 2:539–550, 2001.
2006
90
3,115
PAC-Bayes Bounds for the Risk of the Majority Vote and the Variance of the Gibbs Classifier Alexandre Lacasse, Franc¸ois Laviolette and Mario Marchand D´epartement IFT-GLO Universit´e Laval Qu´ebec, Canada Firstname.Secondname@ift.ulaval.ca Pascal Germain D´epartement IFT-GLO Universit´e Laval Qu´ebec, Canada Pascal.Germain.1@ulaval.ca Nicolas Usunier Laboratoire d’informatique de Paris 6 Universit´e Pierre et Marie Curie, Paris, France Nicolas.Usunier@lip6.fr Abstract We propose new PAC-Bayes bounds for the risk of the weighted majority vote that depend on the mean and variance of the error of its associated Gibbs classifier. We show that these bounds can be smaller than the risk of the Gibbs classifier and can be arbitrarily close to zero even if the risk of the Gibbs classifier is close to 1/2. Moreover, we show that these bounds can be uniformly estimated on the training data for all possible posteriors Q. Moreover, they can be improved by using a large sample of unlabelled data. 1 Introduction The PAC-Bayes approach, initiated by [1], aims at providing PAC guarantees to “Bayesian-like” learning algorithms. Within this approach, we consider a prior1 distribution P over a space of classifiers that characterizes our prior belief about good classifiers (before the observation of the data) and a posterior distribution Q (over the same space of classifiers) that takes into account the additional information provided by the training data. A remarkable result, known as the “PACBayes theorem”, provides a risk bound for the Q-weigthed majority-vote by bounding the risk of an associated stochastic classifier called the Gibbs classifier. Bounds previously existed which showed that you can de-randomize back to the Majority Vote classifier, but these come at a cost of worse risk. Naively, one would expect that the de-randomized classifier would perform better. Indeed, it is well-known that voting can dramatically improve performance when the “community” of classifiers tend to compensate the individual errors. The actual PAC-Bayes framework is currently unable to evaluate whether or not this compensation occurs. Consequently, this framework can not currently help in producing highly accurate voted combinations of classifiers. In this paper, we present new PAC-Bayes bounds on the risk of the Majority Vote classifier based on the estimation of the mean and variance of the errors of the associated Gibbs classifier. These bounds allow to prove that a sufficient condition to provide an accurate combination is (1) that the error of the Gibbs classifier is less than half and (2) the mean pairwise covariance of the errors of the classifiers appearing in the vote is small. In general, the bound allows to detect when the voted combination provably outperforms its associated Gibbs classifier. 1Priors have been used for many years in statistics. The priors in this paper have only indirect links with the Bayesian priors. We will nevertheless use this language, since it comes from previous work. 2 Basic Definitions We consider binary classification problems where the input space X consists of an arbitrary subset of Rn and the output space Y = {−1, +1}. An example z def = (x, y) is an input-output pair where x ∈X and y ∈Y. Throughout the paper, we adopt the PAC setting where each example z is drawn according to a fixed, but unknown, probability distribution D on X × Y. We consider learning algorithms that work in a fixed hypothesis space H of binary classifiers (defined without reference to the training data). The risk R(h) of any classifier h: X →Y is defined as the probability that h misclassifies an example drawn according to D: R(h) def = Pr (x,y)∼D ³ h(x) ̸= y ´ = E (x,y)∼D I(h(x) ̸= y), where I(a) = 1 if predicate a is true and 0 otherwise. Given a training set S, m will always represent its number of examples. Moreover, if S = ⟨z1, . . . , zm⟩, the empirical risk RS(h) on S, of any classifier h, is defined according to: RS(h) def = 1 m m X i=1 I(h(xi) ̸= yi). After observing the training set S, the task of the learner is to choose a posterior distribution Q over H such that the Q-weighted Majority Vote classifier, BQ, will have the smallest possible risk. On any input training example x, the output, BQ(x), of the Majority Vote classifier BQ (also called the Bayes classifier) is given by: BQ(x) def = sgn · E h∼Q h(x) ¸ , where sgn(s) = +1 if real number s > 0 and sgn(s) = −1 otherwise. The output of the deterministic Majority Vote classifier BQ is thus closely related to the output of a stochastic classifier called the Gibbs classifier. To classify an input example x, the Gibbs classifier GQ chooses randomly a (deterministic) classifier h according to Q to classify x. The true risk R(GQ) and the empirical risk RS(GQ) of the Gibbs classifier are thus given by: R(GQ) def = E h∼Q R(h) = E h∼Q E (x,y)∼D I(h(x) ̸= y) (1) RS(GQ) def = E h∼Q RS(h) = E h∼Q 1 m m X i=1 I(h(xi) ̸= yi). (2) The PAC-Bayes theorem gives a tight risk bound for the Gibbs classifier GQ that depends on how far is the chosen posterior Q from a prior P that must be chosen before observing the data. The PAC-Bayes theorem was first proposed by [2]. The bound presented here can be found in [3]. Theorem 1 (PAC-Bayes Theorem) For any prior distribution P over H, and any δ ∈]0, 1], we have Pr S∼Dm µ ∀Q over H : kl(RS(GQ)∥R(GQ)) ≤1 m · KL(Q∥P) + ln m + 1 δ ¸¶ ≥1 −δ , where KL(Q∥P) is the Kullback-Leibler divergence between Q and P: KL(Q∥P) def = E h∼Q ln Q(h) P(h) , and where kl(q∥p) is the Kullback-Leibler divergence between the Bernoulli distributions with probability of success q and probability of success p: kl(q∥p) def = q ln q p + (1 −q) ln 1−q 1−p. This theorem has recently been generalized by [4] to the sample-compression setting. In this paper, however, we restrict ourselves to the more common case where the set H of classifiers is defined without reference to the training data. A bound given for the risk of Gibbs classifiers can straightforwardly be turned into a bound for the risk of Majority Vote classifiers. Indeed, whenever BQ misclassifies x, at least half of the classifiers (under measure Q), misclassifies x. It follows that the error rate of GQ is at least half of the error rate of BQ. Hence R(BQ) ≤2R(GQ). A method to decrease the R(BQ)/R(GQ) ratio to 1+ϵ (for some small positive ϵ) has been proposed by [5] for large-margin classifiers. For a suitably chosen prior and posterior, [5] have also shown that RS(GQ) is small when the corresponding Majority Vote classifier BQ achieves a large separating margin on the training data. Consequently, the PAC-Bayes theorem yields a tight risk bound for large margin classifiers. Even if we can imagine situations where R(BQ) > R(GQ), they have been rarely encountered in practice. In fact, situations where R(BQ) is much smaller than R(GQ) seem to occur much more often. For example, consider the extreme case where the true label y of x is 1 iff Eh∼Qh(x) > 1/2. In this case R(BQ) = 0 whereas R(GQ) can be as high as 1/2 −ϵ for some arbitrary small ϵ. The situations where R(BQ) is much smaller than R(GQ) are not captured by the PAC-Bayes theorem. In the next section, we provide a bound on R(BQ) that depends on R(GQ) and other properties that can be estimated from the training data. This bound can be arbitrary close to 0 even for a large R(GQ) as long as R(GQ) < 1/2 and as long as we have a sufficiently large population of classifiers for which their errors are sufficiently “uncorrelated”. 3 A Bound on R(BQ) that Can Be Much Smaller than R(GQ) All of our relations between R(BQ) and R(GQ) arise by considering the Q-weight WQ(x, y) of classifiers making errors on example (x, y): WQ(x, y) def = E h∼Q I(h(x) ̸= y) . (3) Clearly, we have: Pr (x,y)∼D(WQ(x, y) > 1/2) ≤R(BQ) ≤ Pr (x,y)∼D(WQ(x, y) ≥1/2). (4) Hence, Pr (x,y)∼D (WQ(x, y) ≥1/2) gives a very tight upper bound on R(BQ). Moreover, E (x,y)∼D WQ(x, y) = E (x,y)∼D E h∼Q I(h(x) ̸= y) = R(GQ) (5) and Var (x,y)∼D (WQ) = E (x,y)∼D µ (WQ)2 − ³ E (x,y)∼D WQ ´2¶ = E (x,y)∼D ³ E h1∼Q I(h1(x) ̸= y) E h2∼Q I(h2(x) ̸= y) ´ −R2(GQ) = E h1∼Q E h2∼Q ³ E (x,y)∼D I(h1(x) ̸= y)I(h2(x) ̸= y) −R(h1)R(h2) ´ def = E h1∼Q E h2∼Q coverr(h1, h2) , (6) where coverr(h1, h2) denotes the covariance of the errors of h1 and h2 on examples drawn by D. The next theorem is therefore a direct consequence of the one-sided Chebychev (or CantelliChebychev) inequality [6]: Pr (WQ ≥a + E(WQ)) ≤ Var(WQ) Var(WQ)+a2 for any a > 0. Theorem 2 For any distribution Q over a class of classifiers, if R(GQ) ≤1/2 then we have R(BQ) ≤ Var (x,y)∼D (WQ) Var (x,y)∼D (WQ) + (1/2 −R(GQ))2 = Var (x,y)∼D (1 −2WQ) E (x,y)∼D (1 −2WQ)2 def = CQ. We will always use here the first form of CQ. However, note that 1 −2WQ = P h∈H Q(h)yh(x) is just the margin of the Q-convex combination realized on (x, y). Hence, the second form of CQ is simply the variance of the margin divided by its second moment! The looser two-sided Chebychev inequality was used in [7] to bound the risk of random forests. However, the one-sided bound CQ is much tighter. For example, the two-sided bound in [7] diverges when R(GQ) →1/2, but CQ ≤1 whenever R(GQ) ≤1/2. In fact, as explained in [8], the one-sided Chebychev bound is the tightest possible upper bound for any random variable which is based only on its expectation and variance. The next result shows that, when the number of voters tends to infinity (and the weight of each voter tends to zero), the variance of WQ will tend to 0 provided that the average of the covariance of the risks of all pairs of distinct voters is ≤0. In particular, the variance will always tend to 0 if the risk of the voters are pairwise independent. Proposition 3 For any countable class H of classifiers and any distribution Q over H, we have Var (x,y)∼D (WQ) ≤ 1 4 X h∈H Q2(h) + X h1∈H X h2∈H: h2̸=h1 Q(h1)Q(h2)coverr(h1, h2). The proof is straightforward and is left to the reader. The key observation that comes out of this result is that P h∈H Q2(h) is usually much smaller than one. Consider, for example, the case where Q is uniform on H with |H| = n. Then q = P h∈H Q2(h) = 1/n. Moreover, if coverr(h1, h2) ≤0 for each pair of distinct classifiers in H, then Var(WQ) ≤1/(4n). Hence, in these cases, we have that CQ ∈O(1/n) whenever 1/2−R(GQ) is larger than some positive constant independent of n. Thus, even when R(GQ) is large, we see that R(BQ) can be arbitrarily close to 0 as we increase the number of classifiers having non-positive pairwise covariance of their risk. To further motivate the use of CQ, we have investigated, on several UCI binary classification data sets, how R(GQ), Var(WQ) and CQ are respectively related to R(BQ). The results of Figure 1 have been obtained with the Adaboost [9] algorithm used with “decision stumps” as weak learners. Each data set was split in two halves: one used for training and the other for testing. In the chart relating R(GQ) and R(BQ), we see that we almost always have R(BQ) < R(GQ). There is, however, no clear correlation between R(BQ) and R(GQ). We also see no clear correlation between R(BQ) and Var(WQ) in the second chart. In contrast, the chart of CQ vs R(BQ) shows a strong correlation. Indeed, it is almost a linear relation! 0 0,1 0,2 0,3 0,4 0,5 0 0,1 0,2 0,3 0,4 0,5 R (B Q ) on test R (GQ ) on test breast-cancer breast-w credit-g hepatitis ionosphere kr-vs-kp labor mushroom sick sonar vote 0 0,05 0,1 0,15 0,2 0,25 0 0,1 0,2 0,3 0,4 0,5 R (B Q ) on test Var(WQ ) on test breast-cancer breast-w credit-g hepatitis ionosphere kr-vs-kp labor mushroom sick sonar vote 0 0,2 0,4 0,6 0,8 1 0 0,1 0,2 0,3 0,4 0,5 R (B Q ) on test CQ on test breast-cancer breast-w credit-g hepatitis ionosphere kr-vs-kp labor mushroom sick sonar vote Figure 1: Relation, on various data sets, between R(BQ) and R(GQ), Var(WQ), and CQ. 4 New PAC-Bayes Theorems A uniform estimate of CQ can be obtained if we have uniform upper bounds on R(GQ) and on the variance of WQ. While the original PAC-Bayes theorem provides an upper bound on R(GQ) that holds uniformly for all posteriors Q, obtaining such bounds for the variance of a random variable is still an issue. To achieve this goal, we will have to generalize the PAC-Bayes theorem for expectations over pairs of classifiers since E(W 2 Q) is fundamentally such an expectation. Definition 4 For any probability distribution Q over H, we define the expected joint error (eQ), the expected joint success (sQ), and the expected disagreement (dQ) as eQ def = E h1∼Q E h2∼Q ³ E (x,y)∼D I(h1(x) ̸= y)I(h2(x) ̸= y) ´ sQ def = E h1∼Q E h2∼Q ³ E (x,y)∼D I(h1(x) = y)I(h2(x) = y) ´ dQ def = E h1∼Q E h2∼Q ³ E (x,y)∼D I(h1(x) ̸= h2(x)) ´ . The empirical estimates, over a training set S = ⟨z1, . . . , zm⟩, of these expectations are defined as usual, i.e., c eQ def = E h1∼Q E h2∼Q ¡ 1 m Pm i=1 I(h1(x) ̸= y)I(h2(x) ̸= y) ¢ , etc. It is easy to see that eQ = E (x,y)∼DW 2 Q , sQ = E (x,y)∼D(1−WQ)2, and dQ = E (x,y)∼D2WQ(1−WQ) . (7) Thus, we have eQ + sQ + dQ = 1 and 2eQ + dQ = 2R(GQ). This implies, R(GQ) = eQ + 1 2 · dQ = 1 2 · (1 + eQ −sQ) (8) Var(WQ) = eQ−(R(GQ))2 = eQ−(eQ + 1 2 ·dQ)2 = eQ−1 4 ·(1 + eQ −sQ)2 (9) Moreover, in that new setting, the denominator of CQ can elegantly be rewritten as Var(WQ) + (1/2 −R(GQ))2 = 1/4 −dQ/2. (10) The next theorem can be used to bound separately either eQ, sQ or dQ. Theorem 5 For any prior distribution P over H, and any δ ∈]0, 1], we have: Pr S∼Dm µ ∀Q over H : kl( c αQ∥αQ) ≤1 m · 2·KL(Q∥P) + ln (m + 1) δ ¸¶ ≥1 −δ where αQ can be either eQ, sQ or dQ. In contrast with Theorem 5, the next theorem will enable us to bound directly Var(WQ), by bounding any pair of expectations among eQ, sQ and dQ. Theorem 6 For any prior distribution P over H, and any δ ∈]0, 1], we have: Pr S∼Dm µ ∀Q over H : kl( c αQ, c βQ∥αQ, βQ) ≤1 m · 2·KL(Q∥P) + ln (m + 1)(m + 2) 2δ ¸¶ ≥1 −δ where αQ and βQ can be any two distinct choices among eQ, sQ and dQ, and where kl(q1, q2∥p1, p2) def = q1 ln q1 p1 + q2 ln q2 p2 + (1 −q1 −q2) ln 1 −q1 −q2 1 −p1 −p2 is the Kullback-Leibler divergence between the distributions of two trivalent random variables Yq and Yp with P(Yq =a) = q1, P(Yq =b) = q2 and P(Yq =c) = 1−q1−q2 (and similarly for Yp). The proof of Theorem 5 can be seen as a special case of Theorem 1. The proof of Theorem 6 essentially follows the proof of Theorem 1 given in [4]; except that it is based on a trinomial distribution instead of a binomial one2. 2For the proofs of these theorems, see a long version of the paper at http://www.ift.ulaval.ca/ ∼laviolette/Publications/publications.html. 5 PAC-Bayes Bounds for Var(WQ) and R(BQ) From the two theorems of the preceding section, one can easily derive several PAC-Bayes bounds of the variance of WQ and therefore, of the majority vote. Since CQ is a quotient. Thus, an upper bound on CQ will degrade rapidly if the bounds on the numerator and the denominator are not tight — especially for majority votes obtained by boosting algorithms where both the numerator and the denominator tend to be small. For this reason, we will derive more than one PAC-Bayes bound for the majority vote, and compare their accuracy. First, we need the following notations that are related to Theorems 1, 5 and 6. Given any prior distribution P over H, R δ Q,S def = ½ r : kl(RS(GQ)∥r) ≤1 m h KL(Q∥P) + ln (m + 1) δ i¾ , E δ Q,S def = ½ e : kl(c eQ∥e) ≤1 m h 2·KL(Q∥P) + ln (m + 1) δ i¾ , D δ Q,S def = ½ d : kl(c dQ∥d) ≤1 m h 2·KL(Q∥P) + ln (m + 1) δ i¾ , A δ Q,S def = ½ (e, s) : kl(c eQ, c sQ∥e, s) ≤1 m h 2·KL(Q∥P) + ln (m + 1)(m + 2) δ i¾ . Since v v+a = 1 1+a/v, it follows from Theorem 2 that an upper bound of both Var(WQ) and R(GQ) will give an upper bound on CQ, and hence on R(BQ). Hence, a first bound can be obtained, from Equation 9, by suitably applying Theorem 5 (with αQ = eQ) and Theorem 1. PAC-Bound 1 For any prior distribution P over H, and any δ ∈]0, 1], we have Pr S∼Dm µ ∀Q over H : Var (x,y)∼D WQ ≤sup Eδ/2 Q,S − ³ inf Rδ/2 Q,S ´2 ¶ ≥1 −δ , Pr S∼Dm   ∀Q over H : R(BQ) ≤ sup Eδ/2 Q,S − ³ inf Rδ/2 Q,S ´2 sup Eδ/2 Q,S − ³ inf Rδ/2 Q,S ´2 + ³ 1 2 −sup Rδ/2 Q,S ´2   ≥1 −δ . Since Bound 1 necessitates two PAC approximations to calculate the variance, it would be better if we could obtain directly an upper bound for Var(WQ). The following result, which is a direct consequence of Theorem 6 and Equation 9, shows how it can be done. PAC-Bound 2 For any prior distribution P over H, and any δ ∈]0, 1], we have Pr S∼Dm à ∀Q over H : Var (x,y)∼D WQ ≤ sup (e,s)∈A δ Q,S ½ e −1 4 · (1 + e −s)2 ¾! ≥1 −δ , Pr S∼Dm       ∀Q over H : R(BQ) ≤ sup (e,s)∈Aδ/2 Q,S © e −1 4 · (1 + e −s)2ª sup (e,s)∈Aδ/2 Q,S © e −1 4 · (1 + e −s)2ª + ³ 1 2 −sup Rδ/2 Q,S ´2       ≥1 −δ . As illustrated in Figure 2, Bound 2 is generally tighter than Bound 1. This gain is principally due to the fact that the values of e and s, that are used to bound the variance, are tied together inside the kl() and have to tradeoff their values (e “tries to be” as large as possible and s as small as possible). Because of this tradeoff, e is generally not an upper bound of eQ, and s not a lower bound of sQ. In the semi-supervised framework, we can achieve better results, because the labels of the examples do not affect the value of dQ (see Definition 4). Hence, in presence of a large amount of unlabelled data, one can use Theorem 5 to obtain very accurate upper and lower bounds of dQ. This combined with an upper bound of eQ, still computed via Theorem 5 but on the labelled data, gives rise to the following semi-supervised upper bound3 of Var(WQ). The bound on R(BQ) then follows from Theorem 2 and Equation 10. PAC-Bound 3 (semi-supervised bound) For any prior distribution P over H, and any δ ∈]0, 1]: Pr S∼Dm S′∼Dm′ unlabelled µ ∀Q over H : Var (x,y)∼D WQ ≤sup E δ Q,S − ³ sup E δ Q,S + 1 2 · inf D δ Q,S′ ´2¶ ≥1 −δ Pr S∼Dm S′∼Dm′ unlabelled   ∀Q over H : R(BQ) ≤ sup E δ Q,S − ³ sup E δ Q,S + 1 2 · inf D δ Q,S′ ´2 1/4 − 1 2 · sup D δ Q,S′   ≥1 −δ We see, on the left part of Figure 2, that Bound 2 on Var(WQ) is much tighter than Bound 1. We can also see that, by using unlabeled data4 to estimate dQ, Bound 3 provides an other significant improvement. These numerical results were obtained by using Adaboost [9] with decision stumps on the Mushroom UCI data set (which contains 8124 examples). This data set was randomly split into two halves: one for training and one for testing. 0 0,02 0,04 0,06 0,08 0,1 0,12 0,14 0,16 1 11 21 31 41 T Var(W Q ) PAC-Bound 1 Var(W Q ) PAC-Bound 2 Var(W Q ) PAC-Bound 3 Var(W Q ) on test 0 0,2 0,4 0,6 0,8 1 1,2 1 11 21 31 41 T R (B Q ) PAC-Bound 1 R (B Q ) PAC-Bound : 2R (G Q ) using Thm 1 R (B Q ) PAC-Bound 2 R (B Q ) PAC-Bound 3 C Q on test R (B Q ) on test Figure 2: Bounds on Var(WQ) (left) and bounds on R(BQ) (right). As illustrated by Figure 2, Bound 2 and Bound 3 are (resp. for the supervised and semi-supervised frameworks) very tight upper bounds of the variance. Unfortunately they do not lead to tight upper bounds of R(BQ). Indeed, one can see in Figure 2 that after T = 8, all the bounds are degrading even if the true value of CQ (on which they are based) continues to decrease. This drawback is due to the fact that, when the value of dQ tends to 1/2, the denominator of CQ tends to 0. Hence, if dQ is close to 1/2, Var(WQ) must be small as well. Thus, any slack in the bound of Var(WQ) has a multiplicative effect on each of the three proposed PAC-bounds of R(BQ). Unfortunately, boosting algorithms tend to construct majority votes with expected an disagreement dQ just slightly under 1/2. Based on the next proposition, we will show that this drawback is, in a sense, unavoidable. Proposition 7 (Inapproachability result) Let Q be any distribution over a class of classifiers, and let B < 1 be any upper bound of CQ which holds with confidence 1 −δ. If R(GQ) < 1/2 then 1/2 − q (1/4 −dQ/2) ¡ 1 −B ¢ is an upper bound of R(GQ) which holds with confidence 1 −δ. 3It follows, from an easy calculation, that a lower bound of dQ, together with an upper bound of eQ, gives rise to an upper bound of eQ −(eQ + 1 2 · dQ)2. By Equation 9, we then obtain an upper bound of Var(WQ). 4The UCI database (used here) does not have any unlabeled examples. To simulate the extreme case where we have an infinite amount of unlabeled data, we simply used the empirical value of dQ computed on the testing set. For the data set used in Figure 2, Proposition 7, together with Bound 3 on R(BQ) (viewed as a bound on CQ), gives a PAC-bound on R(GQ) which is just slightly lower (≈0.5%) than the classical PAC-Bayes bound on R(GQ) given by Theorem 1. Since any bound better than Bound 3 for CQ will continue to improve the bound on R(GQ), it seems unlikely that such a better bound exists. Moreover, this drawback should occur for any bound on the majority vote that only considers Gibbs’ risk and the variance of WQ because, as already explained, CQ is the tightest possible bound of R(BQ) that is based only on E(WQ) and Var(WQ). Hence, to improve our results in the situation where dQ is closed to 1/2, one will have to consider higher moments. However, it is not clear that this will lead to a better bound of R(BQ) because, even if Theorem 5 generalizes to higher moments, its tightness is then degrading. Indeed, for the kth moment, the factor 2 that multiplies KL(Q∥P) in Theorem 5 grows to k. However, it might be possible to overcome this degradation by using a generalization of Theorem 6 as we have done in this paper to obtain our tightest supervised bound for the variance (Bound 2). Indeed, if we evaluate the tightness of that bound on the variance (w.r.t. its value on the test set), and compare it with the tightness of the bound on R(GQ) given by Theorem 1, we find that both accuracies are at about 3%. This is to be contrasted with the tightness of Bound 1 and seems to indicate that we have prevented degradation even if the variance deals with both the first and the second moment of WQ; whereas the Gibbs’ risk deals only with the first moment. 6 Conclusion We have derived a risk bound for the weighted majority vote that depends on the mean and variance of the error of its associated Gibbs classifier (Theorem 2). The proposed bound is based on the onesided Chebychev’s inequality, which is the tightest inequality for any real-valued random variables given only the expectation and the variance. As shown on Figures 1, this bound seems to have a strong predictive power on the risk of the majority vote. We have also shown that the original PAC-Bayes Theorem, together with new ones, can be used to obtain high confidence estimates of this new risk bound that hold uniformly for all posterior distributions. Moreover, the new PAC-Bayes theorems give rise to the first uniform bounds on the variance of the Gibbs’s risk (more precisely, the variance of the associate random variable WQ). Even if there are arguments showing that bounds of higher moments of WQ should be looser, we have empirically found that one of the proposed bounds (Bound 2) does not show any sign of degradation in comparison with the classical PAC-Bayes bound on R(GQ) (which is the first moment). Surprisingly, there is an improvement for Bound 3 in the semi-supervised framework. This also opens up the possibility that the generalization of Theorem 2 to higher moment be applicable to real data. Such generalizations might overcome the main drawback of our approach, namely, the fact that the PAC-bounds, based on Theorem 2, degrade when the expected disagreement (dQ) is close to 1/2. Acknowledgments: Work supported by NSERC Discovery grants 262067 and 0122405. References [1] David McAllester. Some PAC-Bayesian theorems. Machine Learning, 37:355–363, 1999. [2] David McAllester. PAC-Bayesian stochastic model selection. Machine Learning, 51:5–21, 2003. [3] David McAllester. Simplified PAC-Bayesian margin bounds. Proceedings of the 16th Annual Conference on Learning Theory, Lecture Notes in Artificial Intelligence, 2777:203–215, 2003. [4] Franc¸ois Laviolette and Mario Marchand. PAC-Bayes risk bounds for sample-compressed Gibbs classifiers. Proc. of the 22nth International Conference on Machine Learning (ICML 2005), pages 481–488, 2005. [5] John Langford and John Shawe-Taylor. PAC-Bayes & margins. In S. Thrun S. Becker and K. Obermayer, editors, Advances in Neural Information Processing Systems 15, pages 423–430. MIT Press, Cambridge, MA, 2003. [6] Luc Devroye, L´aszl´o Gy¨orfi, and G´abor Lugosi. A Probabilistic Theory of Pattern Recognition. Springer Verlag, New York, NY, 1996. [7] Leo Breiman. Random forests. Machine Learning, 45(1):5–32, 2001. [8] Dimitris Bertsimas and Ioana Popescu. Optimal inequalities in probability theory: A convex optimization approach. SIAM J. on Optimization, 15(3):780–804, 2005. [9] Robert E. Schapire and Yoram Singer. Improved boosting using confidence-rated predictions. Machine Learning, 37(3):297–336, 1999.
2006
91
3,116
Generalized Regularized Least-Squares Learning with Predefined Features in a Hilbert Space Wenye Li, Kin-Hong Lee, Kwong-Sak Leung Department of Computer Science and Engineering The Chinese University of Hong Kong Shatin, Hong Kong, China {wyli, khlee, ksleung}@cse.cuhk.edu.hk Abstract Kernel-based regularized learning seeks a model in a hypothesis space by minimizing the empirical error and the model’s complexity. Based on the representer theorem, the solution consists of a linear combination of translates of a kernel. This paper investigates a generalized form of representer theorem for kernel-based learning. After mapping predefined features and translates of a kernel simultaneously onto a hypothesis space by a specific way of constructing kernels, we proposed a new algorithm by utilizing a generalized regularizer which leaves part of the space unregularized. Using a squared-loss function in calculating the empirical error, a simple convex solution is obtained which combines predefined features with translates of the kernel. Empirical evaluations have confirmed the effectiveness of the algorithm for supervised learning tasks. 1 Introduction Supervised learning, or learning from examples, refers to the task of training a system by a set of examples which are specified by input-output pairs. The system is used to predict the output value for any valid input object after training. Examples of such tasks include regression which produces continuous values, and classification which predicts a class label for an input object. Vapnik’s seminal work[1] shows that the key to effectively solving this problem is by controlling the solution’s complexity, which leads to the techniques known as regularized kernel methods[1] [2][3] and regularization networks[4]. The work championed by Poggio and other researchers[5][6] implicitly treats learning as an approximation problem and gives a general scheme with ideas going back to modern regularization theory[7][8][9]. For both frameworks, a solution is sought by simultaneously minimizing the empirical error and the complexity. More precisely, given a training set D = (xi; yi)m i=1, an estimator f : X →Y, where X is a closed subset of Rd and Y ⊂R, is given by min f∈HK 1 m m X i=1 V (yi, f (xi)) + γ ∥f∥2 K (1) where V is a convex loss function, ∥f∥K is the norm of f in a reproducing kernel Hilbert space (RKHS) HK induced by a positive definite function (a kernel) Kx (x′) = K (x, x′), and γ is a regularization parameter that makes a trade-off between the empirical error and the complexity. γ ∥f∥2 K is also called a regularizer. According to representer theorem [10][11] [12], the minimizer of (1) admits a simple solution as a linear combination of translates of the kernel K by the training data f ∗= m X i=1 ciKxi, ci ∈R, 1 ≤i ≤m for a variety of loss functions. Different loss functions lead to different learning algorithms. For example, when used for classification, a squared-loss (y −f (x))2 brings about the regularized least-squares classification (RLSC) algorithm[13][14][15]; while a hinge loss (1 −yf (x))+ ≡ max (1 −yf (x) , 0) corresponds to the classical support vector machines(SVM). Using this model, data are implicitly projected onto the hypothesis space HK via a transformation φK : x →Kx and a linear functional is sought by finding its representer in HK, which generally has infinite dimensions. It is generally believed that learning problems associated with infinite dimensions are ill-posed and need regularization. However, finite dimensional problems are often associated with well-posedness and do not need regularization. Motivated by this, we unified these two views in this paper. Using an existing trick in designing kernels, an RKHS is constructed which contains a subspace spanned by some predefined features and this subspace is left unregularized during the learning process. Empirical results have shown the embedding of these features often has the effect of stabilizing the algorithms’s performance for different choices of kernels and prevents the results from deteriorating for inappropriate kernels. The paper is organized as follows. First, a generalized regularized learning model and its associated representer theorem are studied. Then, we introduce an existing trick with which we constructed a hypothesis space which has a subspace of the predefined features. Next, a generic learning algorithm is proposed based on the model and especially evaluated for classification problems. Empirical results have confirmed the benefits brought by the algorithm. A note on notation. Throughout the paper, vectors and matrices are represented in bold notation and scalars in normal script, e.g. x1, · · · , xm ∈Rd, K ∈Rm×m, and y1, · · · , ym ∈R. I and O are used to denote an identity matrix and a zero matrix of appropriate sizes, respectively. For clarity, the size of a matrix is sometimes added as a subscript, such as Om×ℓ. 2 Generalized regularized least-squares learning model Suppose the space HK decomposes into the direct sum: HK = H0 ⊕H1, where H0 is spanned by ℓ(≤m) linearly independent features: H0 = span (ϕ1, · · · , ϕℓ). We propose the generalized regularized least-squares (G-RLS) learning model as min f∈HK L (f) = 1 m m X i=1 (yi −f (xi))2 + γ ∥f −Pf∥2 K , (2) where Pf is the orthogonal projection of f onto H0. Suppose f ∗is the minimizer of (2). For any f ∈HK, let f = f ∗+ δg where δ ∈R and g ∈HK. Now take derivative w.r.t. δ and notice that ∂L ∂δ |δ=0 = 0 . Then −2 m m X i=1 (yi −f ∗(xi)) g (xi) + 2γ ⟨f ∗−Pf ∗, g⟩K = 0, (3) where ⟨·, ·⟩K denotes the inner product in HK. This equation holds for any g ∈HK. In particular, setting g = Kx gives f ∗−Pf ∗= Pm i=1 (yi −f ∗(xi)) Kxi mγ . (4) Pf ∗is the orthogonal projection of f ∗onto H0 and hence, Pf ∗= ℓ X p=1 λpϕp, λp ∈R, 1 ≤p ≤ℓ. (5) So (4) is simplified to f ∗= ℓ X p=1 λpϕp + m X i=1 ciKxi, (6) where ci = yi −f ∗(xi) mγ , 1 ≤i ≤m. (7) The coefficients λ1, · · · , λℓ, c1, · · · , cm are uniquely specified by m + ℓlinear equations. The first m equations are obtained by substituting (6) into (7). The rest ℓequations are derived from the orthogonality constraint between Pf ∗and f −Pf ∗, which can be written as * ϕp, m X i=1 ciKxi + K = 0, 1 ≤p ≤ℓ, (8) or equivalently due to the property of reproducing kernels, m X i=1 ciϕp (xi) = 0, 1 ≤p ≤ℓ. (9) The solution (6) derived from (2) satisfies the reproduction property. Suppose (xi; yi)m i=1 comes purely from a model which is perfectly linearly related to ϕ1, · · · , ϕℓ, it is desirable to get back a solution that is independent of the other features. As an evident result of (2), the property is satisfied. The parameters c1, · · · , cm in the resulting estimator (6) are all zero, which makes the regularizer in (2) equal to zero. 3 Kernel construction By decomposing a hypothesis space HK and studying a generalized regularizer, we have proposed the G-RLS model and derived a solution which consists of predefined features as well as translates of a kernel function. In this section, starting with predefined features ϕ1, · · · , ϕℓand a kernel Φ, we will construct a hypothesis space which contains the features and translates of the kernel by using an existing trick. 3.1 A kernel construction trick Let’s consider the following reproducing kernel K (x, x′) = H (x, x′) + ℓ X p=1 ϕ′ p (x) ϕ′ p (x′) (10) where H (x, x′) = Φ (x, x′) − ℓ X p=1 ϕ′ p (x) Φ (xp, x′) − ℓ X q=1 ϕ′ q (x′) Φ (x, xq) (11) + ℓ X p=1 ℓ X q=1 ϕ′ p (x) ϕ′ q (x′) Φ (xp, xq) , Φ is any strictly positive definite function, and ϕ′ 1, · · · , ϕ′ ℓdefines a linear transformation of ϕ1, · · · , ϕℓw.r.t. x1, · · · , xℓ, " ϕ′ 1 (x) · · · ϕ′ ℓ(x) # = " ϕ1 (x1) · · · ϕ1 (xℓ) · · · · · · ϕℓ(x1) · · · ϕℓ(xℓ) #−1 " ϕ1 (x) · · · ϕℓ(x) # (12) which satisfies ϕ′ q (xp) =  1 0 1 ≤p = q ≤ℓ 1 ≤p ̸= q ≤ℓ. (13) This trick is studied in [16] to provide an alternative basis for radial basis functions and first used in a fast RBF interpolation algorithm[17]. A sketch of properties which are peripheral to our concerns in this paper are given below. Kxp = ϕ′ p, 1 ≤p ≤ℓ (14) ϕ′ p, ϕ′ q K =  1 0 1 ≤p = q ≤ℓ 1 ≤p ̸= q ≤ℓ (15) Hxp = H (xp, ·) = 0, 1 ≤p ≤ℓ (16) Hxi, ϕ′ p K = H (xi, ·) , ϕ′ p K = 0, ℓ+ 1 ≤i ≤m, 1 ≤p ≤ℓ (17) Hxi, Hxj K = H (xi, xj) , ℓ+ 1 ≤i, j ≤m (18) Another property is that the matrix H = (H (xi, xj))m i,j=ℓ+1 is strictly positive definite, which will be used in the computations below. By constructing a kernel K using this trick, predefined features ϕ1, · · · , ϕℓare explicitly mapped onto HK which has a subspace H0 = span (ϕ′ 1, · · · , ϕ′ ℓ) = span (ϕ1, · · · , ϕℓ). By property (15), we can see that ϕ′ 1, · · · , ϕ′ ℓalso forms an orthonormal basis of H0. 3.2 Computation After projecting the features ϕ1, · · · , ϕℓonto an RKHS HK, let’s study the regularized minimization problem in (2). As shown in (6), the minimizer has a form of a linear combination of predefined features and translates of a kernel. By the properties of K in (14)-(17), the minimizer can be rewritten as: f ∗ = ℓ X p=1 λpϕp + m X i=1 ciKxi = ℓ X p=1 λ′ pϕ′ p + ℓ X i=1 ciϕ′ i + m X i=ℓ+1 ci Hxi + ℓ X p=1 ϕ′ p (xi) ϕ′ p !! = ℓ X p=1 λ′ p + cp + m X i=ℓ+1 ciϕ′ p (xi) ! ϕ′ p + m X i=ℓ+1 ciHxi = ℓ X p=1 ˜λpϕ′ p + m X i=ℓ+1 ˜ciHxi (19) where ˜λ1, · · · , ˜λℓ, ˜cℓ+1, · · · , ˜cm are m parameters to be determined. Furthermore, from the orthogonal property between ϕ′ p and Hxi in (17), we have f ∗−Pf ∗= m X i=ℓ+1 ˜ciHxi. (20) To determine the values of ˜λ =  ˜λ1, · · · , ˜λℓ T and ˜c = (˜cℓ+1, · · · , ˜cm)T , we need ∥f ∗−Pf ∗∥2 K = m X i,j=ℓ+1 ˜ci˜cjH (xi, xj) =  ˜λ ˜c T ˜H  ˜λ ˜c  (21) where ˜H =  Oℓ×ℓ Oℓ×(m−ℓ) O(m−ℓ)×ℓ H  . Substituting (21) into (2), we have L = 1 m  y −˜K  ˜λ ˜c T  y −˜K  ˜λ ˜c  + γ  ˜λ ˜c T ˜H  ˜λ ˜c  (22) where ˜K =  Iℓ×ℓ Oℓ×(m−ℓ) ET H  and E = ϕ′ p (xi) ℓ,m p=1,i=ℓ+1. Take derivative w.r.t.  ˜λ ˜c  and set the derivative to zero, and we get ˜K2  ˜λ ˜c  + γm ˜H  ˜λ ˜c  = ˜Ky. (23) Since ˜K−1 =  Iℓ×ℓ O(m−ℓ)×ℓ −H−1ET H−1  and ˜K−1 ˜H = ˜I =  Oℓ×ℓ Oℓ×(m−ℓ) O(m−ℓ)×ℓ I(m−ℓ)×(m−ℓ)  , we have  ˜K + γm˜I   ˜λ ˜c  = y, (24) i.e.  Iℓ×ℓ Oℓ×(m−ℓ) ET H + γmI   ˜λ ˜c  =  y1 y2  , (25) where y1 = (y1, · · · , yℓ)T and y2 = (yℓ+1, · · · , ym)T . Equation (25) uniquely specifies ˜λ by ˜λ = y1, (26) and ˜c by (H + γmI)˜c = y2 −ET ˜λ. (27) H+γmI is a strictly positive definite matrix. The equation can be efficiently solved either by conjugate gradient or by Cholesky factorization. The worst case complexity is O  (m −ℓ)3 ≈O m3 . It is also possible to investigate iterative methods for solving linear systems coupled with recent advances in fast matrix-vector multiplication methods (e.g. fast multipole method), and the complexity reduces to nearly O (m log m), which provides the potential to solve large scale problems. 4 A generic learning algorithm Based on the discussions above, a generic learning algorithm (G-RLS algorithm) is summarized below. 1. Start with data (xi; yi)m i=1. 2. For ℓ(≤m) predefined linearly independent features ϕ1, · · · , ϕℓof the data, define ϕ′ 1, · · · , ϕ′ ℓaccording to equation (12). 3. Choose a symmetric, strictly positive definite function Φx (x′) = Φ (x, x′) which is continuous on X × X. Define H according to equation (11). 4. The estimator f : X →Y is given by f (x) = ℓ X p=1 ˜λpϕ′ p (x) + m X i=ℓ+1 ˜ciHxi (x) (28) where ˜λ1, · · · , ˜λℓ, ˜cℓ+1, · · · , ˜cm are obtained by solving equations (26) and (27). The algorithm can be applied to a number of applications including regression and binary classification. As a simple example for regression, noisy points were randomly generated via a function y = |5 −x|, and we fitted the data by a curve. Polynomial features up to the second degree (ϕ1 = 1, ϕ2 = x, ϕ3 = x2) were used for G-RLS algorithm along with a Gaussian RBF kernel Φx (·) = e−∥x−·∥2 σ2 . We selected ridge regression with the Gaussian RBF kernel for a comparison, which can be regarded as an implementation of standard regularized least-squares model for regression tasks. For both algorithms, three trials were made in which the parameter σ was set to a large value, to a small value, and by cross validation respectively. For each σ, the parameter γ was set by cross validation. Comparing with ridge regression in figure 1(b), the existence of polynomial features in G-RLS has the effect of stabilizing the results, as shown in figure 1(a). Varying σ, different fitting results were obtained by ridge regression. However, for G-RLS algorithm, the difference was not evident. In the case of generalized regularized least-squares classification (G-RLSC), each yi of the training set takes the values {−1, 1}. The predicted label of any x depends on the sign of (28) y =  1, −1 f (x) > 0 otherwise . G-RLSC uses the ”classical” squared-loss as a classification loss criterion. The effectiveness of this criterion has been reported by the empirical results[13][14][15]. −5 −4 −3 −2 −1 0 1 2 3 4 5 −1 0 1 2 3 4 5 data σ2=cv σ2=1000 σ2=0.001 (a) G-RLS Regression −5 −4 −3 −2 −1 0 1 2 3 4 5 −1 0 1 2 3 4 5 data σ2=cv σ2=1000 σ2=0.001 (b) Ridge Regression Figure 1: A Regression Example. The existence of polynomial features in G-RLS helped to improve the stability of the algorithm. 5 Experiments To evaluate the performance of G-RLS algorithm, empirical results are reported on text categorization tasks using the three datasets from CMU text mining group1. The 7-sectors dataset has 4, 573 web pages belonging to seven economic sectors, with each sector containing pages varying from 300 to 1, 099. The 4-universities dataset consists of 8, 282 webpages collected mainly from four universities, in which the pages belong to seven classes and each class has 137 to 3, 764 pages. The 20-newsgroups dataset collects UseNet postings into twenty newsgroups and each group has about 1, 000 messages. We experimented with its four major subsets. The first subset has 5 groups (comp.*), the second 4 groups (rec.*), the third 4 groups (sci.*) and the last 4 groups (talk.*). For each dataset, we removed all but the 2, 000 words with highest mutual information with the class variable by rainbow package[18]. The document was represented as bag-of-words with linear normalization into [−1, 1]. Probabilistic latent semantic analysis[19] (pLSA) was used to get ten latent features ϕ1, · · · , ϕ10 out of the data. Experiments were carried out with different number (100˜3, 200) of data for training and the rest for testing. Each experiment consisted of ten runs and the average accuracy is reported. In each run, the data were separated by the xval-prep utility accompanied in C4.5 package2. Figure 2 compares the performance of G-RLSC, RLSC and SVM. It is shown that G-RLSC reports improved results on most of the datasets except on 4-universities. Moreover, an insightful observation may find that although SVM excels on the dataset when the number of training data increases, G-RLSC shows better performance than standard RLSC. A possible reason is that the hinge loss used by SVM is more appropriate than the squared-loss used by RLSC and G-RLSC on this dataset; while the embedding of pLSA features still improves the accuracy. 6 Conclusion In this paper, we first proposed a generic G-RLS learning model. Unlike the standard kernel-based methods which only consider the translates of a kernel for model learning, the new model takes predefined features into special consideration. A generalized regularizer is studied which leaves part of the hypothesis space unregularized. Similar ideas were explored in spline smoothing[9] in which low degree polynomials are not regularized. Another example is semi-parametric SVM[2], which considers the addition of some features to the kernel expansion for SVM. However, to our knowledge, few learning algorithms and applications have been studied along this line from a unified RKHS regularization point of view, or investigated for empirical evaluations. The second part of our work presented a practical computation method based on the model. An RKHS that contains the combined solutions is explicitly constructed based on a special trick in designing kernels. (The idea of a conditionally positive definite function[20] is lurking in the back1http://www.cs.cmu.edu/˜TextLearning/datasets.html 2http://www.rulequest.com/Personal/c4.5r8.tar.gz. XQLYHUVLWLHV               *5/6& 5/6&%R: 5/6&S/6$ 690%R: 690S/6$ FRPS               *5/6& 5/6&%R: 5/6&S/6$ 690%R: 690S/6$ UHF               *5/6& 5/6&%R: 5/6&S/6$ 690%R: 690S/6$ VFL               *5/6& 5/6&%R: 5/6&S/6$ 690%R: 690S/6$ WDON               *5/6& 5/6&%R: 5/6&S/6$ 690%R: 690S/6$ VHFWRUV               *5/6& 5/6&%R: 5/6&S/6$ 690%R: 690S/6$ Figure 2: Classification accuracies on CMU text datasets with different number of training samples. Ten pLSA features along with a linear kernel Φ were used for G-RLSC. Both bag-of-words (BoW) and pLSA representations of documents were experimented for RLSC and SVM with a linear kernel. The parameter γ was selected via cross validation. For multi-classification, G-RLSC and RLSC used one-versus-all strategy. SVM used one-versus-one strategy. ground of this trick, which goes beyond the discussion of this paper.) With the construction of the RKHS, the computation is further optimized and the theoretical analysis of such algorithms is also potentially facilitated. We evaluated G-RLS learning algorithm in text categorization. The empirical results from real-world applications have confirmed the effectiveness of the algorithm. Acknowledgments The authors thank Dr. Haixuan Yang for useful discussions. This research was partially supported by RGC Earmarked Grant #4173/04E and #4132/05E of Hong Kong SAR and RGC Research Grant Direct Allocation of the Chinese University of Hong Kong. References [1] V.N. Vapnik. Statistical Learning Theory. John Wiley and Sons, 1998. [2] B. Sch¨olkopf and A.J. Smola. Learning with Kernels. The MIT Press, 2002. [3] J.S. Taylor and N. Cristianini. Kernel Methods for Pattern Analysis. Cambridge University Press, 2004. [4] T. Evgeniou, M. Pontil, and T. Poggio. Regularization networks and support vector machines. Adv. Comput. Math., 13:1–50, 2000. [5] T. Poggio and F. Girosi. Regularization algorithms for learning that are equivalent to multilayer networks. Science, 247:978–982, 1990. [6] T. Poggio and S. Smale. The mathematics of learning: Dealing with data. Not. Am. Math. Soc, 50:537– 544, 2003. [7] A.N. Tikhonov and V.Y. Arsenin. Solutions of Ill-Posed Problems. Winston and Sons, 1977. [8] V.A. Morozov. Methods for Solving Incorrectly Posed Problems. Springer-Verlag, 1984. [9] G. Wahba. Spline Models for Observational Data. SIAM, 1990. [10] G. Kimeldorf and G. Wahba. Some results on Tchebycheffian spline functions. J. Math. Anal. Appl., 33:82–95, 1971. [11] F. Girosi, M.J. Jones, and T. Poggio. Regularization theory and neural networks architectures. Neural Comput., 7:219–269, 1995. [12] B. Sch¨olkopf, R. Herbrich, and A.J. Smola. A generalized representer theorem. In COLT’2001 and EuroCOLT’2001, 2001. [13] R.M. Rifkin. Everything Old is New Again: A Fresh Look at Historical Approaches in Machine Learning. PhD thesis, Massachusetts Institute of Technology, 2002. [14] G. Fung and O.L. Mangasarian. Proximal support vector machine classifiers. In KDD’01, 2001. [15] J.A.K. Suykens and J. Vandewalle. Least squares support vector machine classifiers. Neural Process. Lett., 9:293–300, 1999. [16] W. Light and H. Wayne. Spaces of distributions, interpolation by translates of a basis function and error estimates. J. Numer. Math., 81:415–450, 1999. [17] R.K. Beatson, W.A. Light, and S. Billings. Fast solution of the radial basis function interpolation equations: Domain decomposition methods. SIAM J. Sci. Comput., 22:1717–1740, 2000. [18] A.K. McCallum. Bow: A toolkit for statistical language modeling, text retrieval, classification and clustering. http://www.cs.cmu.edu/∼mccallum/bow, 1996. [19] T. Hofmann. Probabilistic latent semantic analysis. In UAI’99, 1999. [20] C.A. Micchelli. Interpolation of scattered data: Distances, matrices, and conditionally positive definite functions. Constr. Approx., 2:11–22, 1986.
2006
92
3,117
Map-Reduce for Machine Learning on Multicore Cheng-Tao Chu ∗ chengtao@stanford.edu Sang Kyun Kim ∗ skkim38@stanford.edu Yi-An Lin ∗ ianl@stanford.edu YuanYuan Yu ∗ yuanyuan@stanford.edu Gary Bradski ∗† garybradski@gmail Andrew Y. Ng ∗ ang@cs.stanford.edu Kunle Olukotun ∗ kunle@cs.stanford.edu ∗. CS. Department, Stanford University 353 Serra Mall, Stanford University, Stanford CA 94305-9025. †. Rexee Inc. Abstract We are at the beginning of the multicore era. Computers will have increasingly many cores (processors), but there is still no good programming framework for these architectures, and thus no simple and unified way for machine learning to take advantage of the potential speed up. In this paper, we develop a broadly applicable parallel programming method, one that is easily applied to many different learning algorithms. Our work is in distinct contrast to the tradition in machine learning of designing (often ingenious) ways to speed up a single algorithm at a time. Specifically, we show that algorithms that fit the Statistical Query model [15] can be written in a certain “summation form,” which allows them to be easily parallelized on multicore computers. We adapt Google’s map-reduce [7] paradigm to demonstrate this parallel speed up technique on a variety of learning algorithms including locally weighted linear regression (LWLR), k-means, logistic regression (LR), naive Bayes (NB), SVM, ICA, PCA, gaussian discriminant analysis (GDA), EM, and backpropagation (NN). Our experimental results show basically linear speedup with an increasing number of processors. 1 Introduction Frequency scaling on silicon—the ability to drive chips at ever higher clock rates—is beginning to hit a power limit as device geometries shrink due to leakage, and simply because CMOS consumes power every time it changes state [9, 10]. Yet Moore’s law [20], the density of circuits doubling every generation, is projected to last between 10 and 20 more years for silicon based circuits [10]. By keeping clock frequency fixed, but doubling the number of processing cores on a chip, one can maintain lower power while doubling the speed of many applications. This has forced an industrywide shift to multicore. We thus approach an era of increasing numbers of cores per chip, but there is as yet no good framework for machine learning to take advantage of massive numbers of cores. There are many parallel programming languages such as Orca, Occam ABCL, SNOW, MPI and PARLOG, but none of these approaches make it obvious how to parallelize a particular algorithm. There is a vast literature on distributed learning and data mining [18], but very little of this literature focuses on our goal: A general means of programming machine learning on multicore. Much of this literature contains a long and distinguished tradition of developing (often ingenious) ways to speed up or parallelize individual learning algorithms, for instance cascaded SVMs [11]. But these yield no general parallelization technique for machine learning and, more pragmatically, specialized implementations of popular algorithms rarely lead to widespread use. Some examples of more general papers are: Caregea et. al. [5] give some general data distribution conditions for parallelizing machine learning, but restrict the focus to decision trees; Jin and Agrawal [14] give a general machine learning programming approach, but only for shared memory machines. This doesn’t fit the architecture of cellular or grid type multiprocessors where cores have local cache, even if it can be dynamically reallocated. In this paper, we focuses on developing a general and exact technique for parallel programming of a large class of machine learning algorithms for multicore processors. The central idea of this approach is to allow a future programmer or user to speed up machine learning applications by ”throwing more cores” at the problem rather than search for specialized optimizations. This paper’s contributions are: (i) We show that any algorithm fitting the Statistical Query Model may be written in a certain “summation form.” This form does not change the underlying algorithm and so is not an approximation, but is instead an exact implementation. (ii) The summation form does not depend on, but can be easily expressed in a map-reduce [7] framework which is easy to program in. (iii) This technique achieves basically linear speed-up with the number of cores. We attempt to develop a pragmatic and general framework. What we do not claim: (i) We make no claim that our technique will necessarily run faster than a specialized, one-off solution. Here we achieve linear speedup which in fact often does beat specific solutions such as cascaded SVM [11] (see section 5; however, they do handle kernels, which we have not addressed). (ii) We make no claim that following our framework (for a specific algorithm) always leads to a novel parallelization undiscovered by others. What is novel is the larger, broadly applicable framework, together with a pragmatic programming paradigm, map-reduce. (iii) We focus here on exact implementation of machine learning algorithms, not on parallel approximations to algorithms (a worthy topic, but one which is beyond this paper’s scope). In section 2 we discuss the Statistical Query Model, our summation form framework and an example of its application. In section 3 we describe how our framework may be implemented in a Googlelike map-reduce paradigm. In section 4 we choose 10 frequently used machine learning algorithms as examples of what can be coded in this framework. This is followed by experimental runs on 10 moderately large data sets in section 5, where we show a good match to our theoretical computational complexity results. Basically, we often achieve linear speedup in the number of cores. Section 6 concludes the paper. 2 Statistical Query and Summation Form For multicore systems, Sutter and Larus [25] point out that multicore mostly benefits concurrent applications, meaning ones where there is little communication between cores. The best match is thus if the data is subdivided and stays local to the cores. To achieve this, we look to Kearns’ Statistical Query Model [15]. The Statistical Query Model is sometimes posed as a restriction on the Valiant PAC model [26], in which we permit the learning algorithm to access the learning problem only through a statistical query oracle. Given a function f(x, y) over instances, the statistical query oracle returns an estimate of the expectation of f(x, y) (averaged over the training/test distribution). Algorithms that calculate sufficient statistics or gradients fit this model, and since these calculations may be batched, they are expressible as a sum over data points. This class of algorithms is large; We show 10 popular algorithms in section 4 below. An example that does not fit is that of learning an XOR over a subset of bits. [16, 15]. However, when an algorithm does sum over the data, we can easily distribute the calculations over multiple cores: We just divide the data set into as many pieces as there are cores, give each core its share of the data to sum the equations over, and aggregate the results at the end. We call this form of the algorithm the “summation form.” As an example, consider ordinary least squares (linear regression), which fits a model of the form y = θT x by solving: θ∗= minθ Pm i=1(θT xi −yi)2 The parameter θ is typically solved for by Algorithm Engine Reducer Master 1.1.3: reduce 1: run 2 1.1.1.1: query_info 1.1.3.1: query_info 1.1.1.2 1.1.3.2 Mapper Mapper Mapper Mapper 1.1: run 1.2 1.1.1: map (split data) 1.1.2: intermediate data 1.1.4: result Data 0: data input Figure 1: Multicore map-reduce framework defining the design matrix X ∈Rm×n to be a matrix whose rows contain the training instances x1, . . . , xm, letting ⃗y = [y1, . . . , ym]m be the vector of target labels, and solving the normal equations to obtain θ∗= (XT X)−1XT ⃗y. To put this computation into summation form, we reformulate it into a two phase algorithm where we first compute sufficient statistics by summing over the data, and then aggregate those statistics and solve to get θ∗= A−1b. Concretely, we compute A = XT X and b = XT⃗y as follows: A = Pm i=1(xixT i ) and b = Pm i=1(xiyi). The computation of A and b can now be divided into equal size pieces and distributed among the cores. We next discuss an architecture that lends itself to the summation form: Map-reduce. 3 Architecture Many programming frameworks are possible for the summation form, but inspired by Google’s success in adapting a functional programming construct, map-reduce [7], for wide spread parallel programming use inside their company, we adapted this same construct for multicore use. Google’s map-reduce is specialized for use over clusters that have unreliable communication and where individual computers may go down. These are issues that multicores do not have; thus, we were able to developed a much lighter weight architecture for multicores, shown in Figure 1. Figure 1 shows a high level view of our architecture and how it processes the data. In step 0, the map-reduce engine is responsible for splitting the data by training examples (rows). The engine then caches the split data for the subsequent map-reduce invocations. Every algorithm has its own engine instance, and every map-reduce task will be delegated to its engine (step 1). Similar to the original map-reduce architecture, the engine will run a master (step 1.1) which coordinates the mappers and the reducers. The master is responsible for assigning the split data to different mappers, and then collects the processed intermediate data from the mappers (step 1.1.1 and 1.1.2). After the intermediate data is collected, the master will in turn invoke the reducer to process it (step 1.1.3) and return final results (step 1.1.4). Note that some mapper and reducer operations require additional scalar information from the algorithms. In order to support these operations, the mapper/reducer can obtain this information through the query info interface, which can be customized for each different algorithm (step 1.1.1.1 and 1.1.3.2). 4 Adopted Algorithms In this section, we will briefly discuss the algorithms we have implemented based on our framework. These algorithms were chosen partly by their popularity of use in NIPS papers, and our goal will be to illustrate how each algorithm can be expressed in summation form. We will defer the discussion of the theoretical improvement that can be achieved by this parallelization to Section 4.1. In the following, x or xi denotes a training vector and y or yi denotes a training label. • Locally Weighted Linear Regression (LWLR) LWLR [28, 3] is solved by finding the solution of the normal equations Aθ = b, where A = Pm i=1 wi(xixT i ) and b = Pm i=1 wi(xiyi). For the summation form, we divide the computation among different mappers. In this case, one set of mappers is used to compute P subgroup wi(xixT i ) and another set to compute P subgroup wi(xiyi). Two reducers respectively sum up the partial values for A and b, and the algorithm finally computes the solution θ = A−1b. Note that if wi = 1, the algorithm reduces to the case of ordinary least squares (linear regression). • Naive Bayes (NB) In NB [17, 21], we have to estimate P(xj = k|y = 1), P(xj = k|y = 0), and P(y) from the training data. In order to do so, we need to sum over xj = k for each y label in the training data to calculate P(x|y). We specify different sets of mappers to calculate the following: P subgroup 1{xj = k|y = 1}, P subgroup 1{xj = k|y = 0}, P subgroup 1{y = 1} and P subgroup 1{y = 0}. The reducer then sums up intermediate results to get the final result for the parameters. • Gaussian Discriminative Analysis (GDA) The classic GDA algorithm [13] needs to learn the following four statistics P(y), µ0, µ1 and Σ. For all the summation forms involved in these computations, we may leverage the map-reduce framework to parallelize the process. Each mapper will handle the summation (i.e. Σ 1{yi = 1}, Σ 1{yi = 0}, Σ 1{yi = 0}xi, etc) for a subgroup of the training samples. Finally, the reducer will aggregate the intermediate sums and calculate the final result for the parameters. • k-means In k-means [12], it is clear that the operation of computing the Euclidean distance between the sample vectors and the centroids can be parallelized by splitting the data into individual subgroups and clustering samples in each subgroup separately (by the mapper). In recalculating new centroid vectors, we divide the sample vectors into subgroups, compute the sum of vectors in each subgroup in parallel, and finally the reducer will add up the partial sums and compute the new centroids. • Logistic Regression (LR) For logistic regression [23], we choose the form of hypothesis as hθ(x) = g(θT x) = 1/(1 + exp(−θT x)) Learning is done by fitting θ to the training data where the likelihood function can be optimized by using Newton-Raphson to update θ := θ −H−1∇θℓ(θ). ∇θℓ(θ) is the gradient, which can be computed in parallel by mappers summing up P subgroup(y(i) −hθ(x(i)))x(i) j each NR step i. The computation of the hessian matrix can be also written in a summation form of H(j, k) := H(j, k) + hθ(x(i))(hθ(x(i)) −1)x(i) j x(i) k for the mappers. The reducer will then sum up the values for gradient and hessian to perform the update for θ. • Neural Network (NN) We focus on backpropagation [6] By defining a network structure (we use a three layer network with two output neurons classifying the data into two categories), each mapper propagates its set of data through the network. For each training example, the error is back propagated to calculate the partial gradient for each of the weights in the network. The reducer then sums the partial gradient from each mapper and does a batch gradient descent to update the weights of the network. • Principal Components Analysis (PCA) PCA [29] computes the principle eigenvectors of the covariance matrix Σ = 1 m ¡Pm i=1 xixT i ¢ −µµT over the data. In the definition for Σ, the term ¡Pm i=1 xixT i ¢ is already expressed in summation form. Further, we can also express the mean vector µ as a sum, µ = 1 m Pm i=1 xi. The sums can be mapped to separate cores, and then the reducer will sum up the partial results to produce the final empirical covariance matrix. • Independent Component Analysis (ICA) ICA [1] tries to identify the independent source vectors based on the assumption that the observed data are linearly transformed from the source data. In ICA, the main goal is to compute the unmixing matrix W. We implement batch gradient ascent to optimize the W’s likelihood. In this scheme, we can independently calculate the expression " 1 −2g(wT 1 x(i)) ... # x(i)T in the mappers and sum them up in the reducer. • Expectation Maximization (EM) For EM [8] we use Mixture of Gaussian as the underlying model as per [19]. For parallelization: In the E-step, every mapper processes its subset of the training data and computes the corresponding w(i) j (expected pseudo count). In Mphase, three sets of parameters need to be updated: p(y), µ, and Σ. For p(y), every mapper will compute P subgroup(w(i) j ), and the reducer will sum up the partial result and divide it by m. For µ, each mapper will compute P subgroup(w(i) j ∗x(i)) and P subgroup(w(i) j ), and the reducer will sum up the partial result and divide them. For Σ, every mapper will compute P subgroup(w(i) j ∗(x(i) −µj) ∗(x(i) −µj)T ) and P subgroup(w(i) j ), and the reducer will again sum up the partial result and divide them. • Support Vector Machine (SVM) Linear SVM’s [27, 22] primary goal is to optimize the following primal problem minw,b ∥w∥2 + C P i:ξi>0 ξp i s.t. y(i)(wT x(i) + b) ≥1 − ξi where p is either 1 (hinge loss) or 2 (quadratic loss). [2] has shown that the primal problem for quadratic loss can be solved using the following formula where sv are the support vectors: ∇= 2w + 2C P i∈sv (w · xi −yi)xi & Hessian H = I + C P i∈sv xixT i We perform batch gradient descent to optimize the objective function. The mappers will calculate the partial gradient P subgroup(i∈sv) (w · xi −yi)xi and the reducer will sum up the partial results to update w vector. Some implementations of machine learning algorithms, such as ICA, are commonly done with stochastic gradient ascent, which poses a challenge to parallelization. The problem is that in every step of gradient ascent, the algorithm updates a common set of parameters (e.g. the unmixing W matrix in ICA). When one gradient ascent step (involving one training sample) is updating W, it has to lock down this matrix, read it, compute the gradient, update W, and finally release the lock. This “lock-release” block creates a bottleneck for parallelization; thus, instead of stochastic gradient ascent, our algorithms above were implemented using batch gradient ascent. 4.1 Algorithm Time Complexity Analysis Table 1 shows the theoretical complexity analysis for the ten algorithms we implemented on top of our framework. We assume that the dimension of the inputs is n (i.e., x ∈Rn), that we have m training examples, and that there are P cores. The complexity of iterative algorithms is analyzed for one iteration, and so their actual running time may be slower.1 A few algorithms require matrix inversion or an eigen-decomposition of an n-by-n matrix; we did not parallelize these steps in our experiments, because for us m >> n, and so their cost is small. However, there is extensive research in numerical linear algebra on parallelizing these numerical operations [4], and in the complexity analysis shown in the table, we have assumed that matrix inversion and eigen-decompositions can be sped up by a factor of P ′ on P cores. (In practice, we expect P ′ ≈P.) In our own software implementation, we had P ′ = 1. Further, the reduce phase can minimize communication by combining data as it’s passed back; this accounts for the log(P) factor. As an example of our running-time analysis, for single-core LWLR we have to compute A = Pm i=1 wi(xixT i ), which gives us the mn2 term. This matrix must be inverted for n3; also, the reduce step incurs a covariance matrix communication cost of n2. 5 Experiments To provide fair comparisons, each algorithm had two different versions: One running map-reduce, and the other a serial implementation without the framework. We conducted an extensive series of experiments to compare the speed up on data sets of various sizes (table 2), on eight commonly used machine learning data sets from the UCI Machine Learning repository and two other ones from a [anonymous] research group (Helicopter Control and sensor data). Note that not all the experiments make sense from an output view – regression on categorical data – but our purpose was to test speedup so we ran every algorithm over all the data. The first environment we conducted experiments on was an Intel X86 PC with two Pentium-III 700 MHz CPUs and 1GB physical memory. The operating system was Linux RedHat 8.0 Kernel 2.4.201If, for example, the number of iterations required grows with m. However, this would affect single- and multi-core implementations equally. single multi LWLR O(mn2 + n3) O( mn2 P + n3 P ′ + n2 log(P)) LR O(mn2 + n3) O( mn2 P + n3 P ′ + n2 log(P)) NB O(mn + nc) O( mn P + nc log(P)) NN O(mn + nc) O( mn P + nc log(P)) GDA O(mn2 + n3) O( mn2 P + n3 P ′ + n2 log(P)) PCA O(mn2 + n3) O( mn2 P + n3 P ′ + n2 log(P)) ICA O(mn2 + n3) O( mn2 P + n3 P ′ + n2 log(P)) k-means O(mnc) O( mnc P + mn log(P)) EM O(mn2 + n3) O( mn2 P + n3 P ′ + n2 log(P)) SVM O(m2n) O( m2n P + n log(P)) Table 1: time complexity analysis Data Sets samples (m) features (n) Adult 30162 14 Helicopter Control 44170 21 Corel Image Features 68040 32 IPUMS Census 88443 61 Synthetic Time Series 100001 10 Census Income 199523 40 ACIP Sensor 229564 8 KDD Cup 99 494021 41 Forest Cover Type 581012 55 1990 US Census 2458285 68 Table 2: data sets size and description 8smp. In addition, we also ran extensive comparison experiments on a 16 way Sun Enterprise 6000, running Solaris 10; here, we compared results using 1,2,4,8, and 16 cores. 5.1 Results and Discussion Table 3 shows the speedup on dual processors over all the algorithms on all the data sets. As can be seen from the table, most of the algorithms achieve more than 1.9x times performance improvement. For some of the experiments, e.g. gda/covertype, ica/ipums, nn/colorhistogram, etc., we obtain a greater than 2x speedup. This is because the original algorithms do not utilize all the cpu cycles efficiently, but do better when we distribute the tasks to separate threads/processes. Figure 2 shows the speedup of the algorithms over all the data sets for 2,4,8 and 16 processing cores. In the figure, the thick lines shows the average speedup, the error bars show the maximum and minimum speedups and the dashed lines show the variance. Speedup is basically linear with number lwlr gda nb logistic pca ica svm nn kmeans em Adult 1.922 1.801 1.844 1.962 1.809 1.857 1.643 1.825 1.947 1.854 Helicopter 1.93 2.155 1.924 1.92 1.791 1.856 1.744 1.847 1.857 1.86 Corel Image 1.96 1.876 2.002 1.929 1.97 1.936 1.754 2.018 1.921 1.832 IPUMS 1.963 2.23 1.965 1.938 1.965 2.025 1.799 1.974 1.957 1.984 Synthetic 1.909 1.964 1.972 1.92 1.842 1.907 1.76 1.902 1.888 1.804 Census Income 1.975 2.179 1.967 1.941 2.019 1.941 1.88 1.896 1.961 1.99 Sensor 1.927 1.853 2.01 1.913 1.955 1.893 1.803 1.914 1.953 1.949 KDD 1.969 2.216 1.848 1.927 2.012 1.998 1.946 1.899 1.973 1.979 Cover Type 1.961 2.232 1.951 1.935 2.007 2.029 1.906 1.887 1.963 1.991 Census 2.327 2.292 2.008 1.906 1.997 2.001 1.959 1.883 1.946 1.977 avg. 1.985 2.080 1.950 1.930 1.937 1.944 1.819 1.905 1.937 1.922 Table 3: Speedups achieved on a dual core processor, without load time. Numbers reported are dualcore time / single-core time. Super linear speedup sometimes occurs due to a reduction in processor idle time with multiple threads. (a) (b) (c) (d) (e) (f) (g) (h) (i) Figure 2: (a)-(i) show the speedup from 1 to 16 processors of all the algorithms over all the data sets. The Bold line is the average, error bars are the max and min speedups and the dashed lines are the variance. of cores, but with a slope < 1.0. The reason for the sub-unity slope is increasing communication overhead. For simplicity and because the number of data points m typically dominates reduction phase communication costs (typically a factor of n2 but n << m), we did not parallelize the reduce phase where we could have combined data on the way back. Even so, our simple SVM approach gets about 13.6% speed up on average over 16 cores whereas the specialized SVM cascade [11] averages only 4%. Finally, the above are runs on multiprocessor machines. We finish by reporting some confirming results and higher performance on a proprietary multicore simulator over the sensor dataset.2 NN speedup was [16 cores, 15.5x], [32 cores, 29x], [64 cores, 54x]. LR speedup was [16 cores, 15x], [32 cores, 29.5x], [64 cores, 53x]. Multicore machines are generally faster than multiprocessor machines because communication internal to the chip is much less costly. 6 Conclusion As the Intel and AMD product roadmaps indicate [24], the number of processing cores on a chip will be doubling several times over the next decade, even as individual cores cease to become significantly faster. For machine learning to continue reaping the bounty of Moore’s law and apply to ever larger datasets and problems, it is important to adopt a programming architecture which takes advantage of multicore. In this paper, by taking advantage of the summation form in a map-reduce 2This work was done in collaboration with Intel Corporation. framework, we could parallelize a wide range of machine learning algorithms and achieve a 1.9 times speedup on a dual processor on up to 54 times speedup on 64 cores. These results are in line with the complexity analysis in Table 1. We note that the speedups achieved here involved no special optimizations of the algorithms themselves. We have demonstrated a simple programming framework where in the future we can just “throw cores” at the problem of speeding up machine learning code. Acknowledgments We would like to thank Skip Macy from Intel for sharing his valuable experience in VTune performance analyzer. Yirong Shen, Anya Petrovskaya, and Su-In Lee from Stanford University helped us in preparing various data sets used in our experiments. This research was sponsored in part by the Defense Advanced Research Projects Agency (DARPA) under the ACIP program and grant number NBCH104009. References [1] Sejnowski TJ. Bell AJ. An information-maximization approach to blind separation and blind deconvolution. In Neural Computation, 1995. [2] O. Chapelle. Training a support vector machine in the primal. Journal of Machine Learning Research (submitted), 2006. [3] W. S. Cleveland and S. J. Devlin. Locally weighted regression: An approach to regression analysis by local fitting. In J. Amer. Statist. Assoc. 83, pages 596–610, 1988. [4] L. Csanky. Fast parallel matrix inversion algorithms. SIAM J. Comput., 5(4):618–623, 1976. [5] A. Silvescu D. Caragea and V. Honavar. A framework for learning from distributed data using sufficient statistics and its application to learning decision trees. International Journal of Hybrid Intelligent Systems, 2003. [6] R. J. Williams D. E. Rumelhart, G. E. Hinton. Learning representation by back-propagating errors. In Nature, volume 323, pages 533–536, 1986. [7] J. Dean and S. Ghemawat. Mapreduce: Simplified data processing on large clusters. Operating Systems Design and Implementation, pages 137–149, 2004. [8] N.M. Dempster A.P., Laird and Rubin D.B. [9] D.J. Frank. Power-constrained cmos scaling limits. IBM Journal of Research and Development, 46, 2002. [10] P. Gelsinger. Microprocessors for the new millennium: Challenges, opportunities and new frontiers. In ISSCC Tech. Digest, pages 22–25, 2001. [11] Leon Bottou Igor Durdanovic Hans Peter Graf, Eric Cosatto and Vladimire Vapnik. Parallel support vector machines: The cascade svm. In NIPS, 2004. [12] J. Hartigan. Clustering Algorithms. Wiley, 1975. [13] T. Hastie and R. Tibshirani. Discriminant analysis by gaussian mixtures. Journal of the Royal Statistical Society B, pages 155–176, 1996. [14] R. Jin and G. Agrawal. Shared memory parallelization of data mining algorithms: Techniques, programming interface, and performance. In Second SIAM International Conference on Data Mining,, 2002. [15] M. Kearns. Efficient noise-tolerant learning from statistical queries. pages 392–401, 1999. [16] Michael Kearns and Umesh V. Vazirani. An Introduction to Computational Learning Theory. MIT Press, 1994. [17] David Lewis. Naive (bayes) at forty: The independence asssumption in information retrieval. In ECML98: Tenth European Conference On Machine Learning, 1998. [18] Kun Liu and Hillow Kargupta. Distributed data mining bibliography. http://www.cs.umbc.edu/ hillol/DDMBIB/, 2006. [19] T. K. MOON. The expectation-maximization algorithm. In IEEE Trans. Signal Process, pages 47–59, 1996. [20] G. Moore. Progress in digital integrated electronics. In IEDM Tech. Digest, pages 11–13, 1975. [21] Wayne Iba Pat Langley and Kevin Thompson. An analysis of bayesian classifiers. In AAAI, 1992. [22] John C. Platt. Fast training of support vector machines using sequential minimal optimization. pages 185–208, 1999. [23] Daryl Pregibon. Logistic regression diagnostics. In The Annals of Statistics, volume 9, pages 705–724, 1981. [24] T. Studt. There’s a multicore in your future, http://tinyurl.com/ohd2m, 2006. [25] Herb Sutter and James Larus. Software and the concurrency revolution. Queue, 3(7):54–62, 2005. [26] L.G. Valiant. A theory of the learnable. Communications of the ACM, 3(11):1134–1142, 1984. [27] V. Vapnik. Estimation of Dependencies Based on Empirical Data. Springer Verlag, 1982. [28] R. E. Welsch and E. KUH. Linear regression diagnostics. In Working Paper 173, Nat. Bur. Econ. Res.Inc, 1977. [29] K. Esbensen Wold, S. and P. Geladi. Principal component analysis. In Chemometrics and Intelligent Laboratory Systems, 1987.
2006
93
3,118
Natural Actor-Critic for Road Traffic Optimisation Silvia Richter Albert-Ludwigs-Universit¨at Freiburg, Germany si.richter@web.de Douglas Aberdeen National ICT Australia Canberra, Australia doug.aberdeen@anu.edu.au Jin Yu National ICT Australia Canberra, Australia. jin.yu@anu.edu.au Abstract Current road-traffic optimisation practice around the world is a combination of hand tuned policies with a small degree of automatic adaption. Even state-ofthe-art research controllers need good models of the road traffic, which cannot be obtained directly from existing sensors. We use a policy-gradient reinforcement learning approach to directly optimise the traffic signals, mapping currently deployed sensor observations to control signals. Our trained controllers are (theoretically) compatible with the traffic system used in Sydney and many other cities around the world. We apply two policy-gradient methods: (1) the recent natural actor-critic algorithm, and (2) a vanilla policy-gradient algorithm for comparison. Along the way we extend natural-actor critic approaches to work for distributed and online infinite-horizon problems. 1 Introduction Optimising the performance of existing road networks is a cheap way to reduce the environmental, social, and financial impact of ever increasing volumes of traffic. Road traffic optimisation can be naturally cast as a reinforcement learning (RL) problem. Unfortunately it is in the hardest class of RL problems, having a continuous state space and infinite horizon, and being partially observable and difficult to model. We focus on the use of the natural actor-critic (NAC) algorithm [1] to solve this problem through online interaction with the traffic system. The NAC algorithm is an elegant combination of 4 RL methods: (1) policy-gradient actors to allow local convergence under function approximation and partial observability; (2) natural gradients to incorporate curvature statistics into the gradient-ascent; (3) temporal-difference critics to reduce the variance of gradient estimates; (4) least-squares temporal difference methods to avoid wasting information from costly environment interactions. One contribution of this work is an efficient online version of NAC that avoids large gradient steps, which cannot be guaranteed to be an improvement in the presence of stochastic gradients [2]. We compare this online NAC to a simple online policy-gradient (PG) approach, demonstrating that NAC converges in orders of magnitude less environment interactions. We also compare wall-clock convergence time, and suggest that environments which can be simulated quickly and accurately can be optimised faster with simple PG approaches rather than NAC. This work has grown out of an interaction with the Sydney Road Traffic Authority. Our choice of controls, observations, and algorithms all aim for practical large-scale traffic control. Although our results are based on a simplified traffic simulation system, we could theoretically attach our learning system into real-world traffic networks. Our simple simulator results demonstrate better performance than the automatic adaption schemes used in current proprietary systems. 2 Traffic Control The optimisation problem consists of finding signalling schedules for all intersections in the system that minimise the average travel time, or similar objectives. This is complicated by the fact that many of the influencing state variables cannot be readily measured. Most signal controllers in use today rely only on state information gained from inductive loops in the streets. A stream is a sequence of cars making the same turn (or going straight) through an intersection. A phase is an interval where a subset of the lights at an intersection are green such that a set of streams that will not collide have right of way. A signal cycle is completed when each phase has been on once, the cycle time being the sum of phase times. Traditionally, control algorithms optimise traffic flow via the phase scheme, the split, and the offset. The phase scheme groups the signal lights into phases and determines their order. A split gives a distribution of the cycle time to the individual phases. Offsets can be introduced to coordinate neighbouring intersections, creating a “green wave” for the vehicles travelling along a main road. Approaches to Traffic Control can be grouped into three categories. Fixed time control strategies are calculated off-line, based on historical data. TRANSYT, for example, uses evolutionary algorithms and hill-climbing optimisation [3]. Traffic responsive strategies are real-time, calculating their policies from car counts determined from inductive-loop detectors. SCOOT and SCATS are examples in use around the world [4, 5]. Third generation methods employ sophisticated dynamic traffic models and try to find optimal lengths for all phases, given a fixed phase scheme, e.g., by dynamic programming [4]. The exponential complexity of the problem, however, limits these approaches to local view of a few intersections. Reinforcement learning has also been applied [6], but in a way that uses a value function for each car, which is unrealistic in today’s world. Common to most approaches is that they deal with the insufficient state information by maintaining a model of the traffic situation, derived from available sensor counts. However, imperfections in the model is a further source of errors and performance may consequently suffer. Our methods avoid modelling. We focus on the system that motivated this research, the Sydney Coordinated Adaptive Traffic System (SCATS) [5]. It is used in major cities throughout Australasia and North America. It provides pre-specified plans that are computed from historical data. There is an additional layer of online adaption based on a saturation-balancing algorithm, i.e., SCATS calculates phase timings so that all phases are utilised by vehicles for a fixed percentage of the phase time. Small incremental updates are performed once per cycle. Due to this slow update, rapidly fluctuating traffic conditions pose a problem to SCATS. Furthermore, it does not optimise the global network performance, and its base plans involve hand-tuning to encode offset values. 3 Partially Observable MDP Formulation We cast the traffic problem as a partially observable Markov decision process (POMDP) with states s in a continuous space S. The system is controlled by stochastic actions at ∈A drawn from a random variable (RV) conditioned on the current policy parameters θt, and an observation of the current state o(st), according to Pr(at|o(st), θt). In general POMDPs the observation function o(st) is stochastic. NAC, which has only been presented in literature for the fully observable case so far, can be extended to POMDPs given deterministic observations, as this ensures compatibility of the function approximation and avoids injecting noise into the least squares solution. Our traffic POMDP fulfils this requirement. To simplify notation we set ot := o(st). The state is an RV evolving as a function of the previous state and action according to Pr(st+1|st, at). In the case of road traffic these distributions are continuous and complex, making even approximate methods for model based planning in POMDPs difficult to apply. The loop sensors only count cars that pass over them, or are stationary on them. The controller needs access to the history to attempt to resolve some hidden state. We later describe observations constructed from the sensor readings that incorporate some important elements of history for intersection control. 3.1 Local Rewards A common objective function in traffic control is the average vehicle travel time. However, it is impossible to identify a particular car in the system, let alone what its travel time was. Sophisticated modelling approaches are needed to estimate these quantities. We prefer a direct approach that has the benefits of being trivial to measure from existing sensors and easing the temporal credit assignment problem. For the majority of our experiments we treat each intersection as a local MDP. It is trivial to count all cars that enter the intersection with loop detectors. Therefore, we chose the instant reward rt,i to be the number of cars that entered intersection i over the last time step. The objective for each intersection i is to maximise the normalised discounted throughput: Ri(θ) = E n (1 −γ) X∞ t=0 γtrt,i θ o . Discounting is important because it ensures that the controller prefers to pass cars through as early as possible. While suboptimal policies (in terms of travel time) may achieve the optimal average throughput over a time window, the discounted throughput criterion effectively minimises the total waiting time at an intersection in the finite-horizon case [7]. Ignoring effects such as road saturation and driver adaption (which we explore in our experiments), this would result in minimisation of the system wide travel time. The use of local rewards speeds up learning, especially as the number of intersections grows. Bagnell and Ng [8] demonstrate that local rewards alter the sample complexity from worst case ˜Ω(I), where I is the number of intersections, down to O(log I). Unfortunately, the value of Ri(θ) depends directly on the local steady state distribution Pr(si|θ). Thus changes to the policy of neighbouring intersections can adversely impact intersection i, by influencing the distribution of si. A sufficiently small learning rate allows controllers to adapt to this effectively non-stationary component of the local MDP. We may fail to find the globally optimal cooperative policy without some communication of rewards, but it has proven very effective empirically. 4 Natural Actor-Critic Algorithms Policy-gradient (PG) methods for RL are of interest because it can be easier to learn policies directly than to estimate the exact value of every state of the underlying MDP. While they offer only local convergence guarantees, they do not suffer from the convergence problems exhibited by pure value based methods under function approximation or partial observability [9]. On the other hand, PG methods have suffered from slow convergence compared to value methods due to high variance in the gradient estimates. The natural actor-critic method (NAC) [1] improves this with a combination of PG methods, natural gradients, value estimation, and least-squares temporal-difference Q-learning (LSTD-Q). NAC computes gradient estimates in a batch fashion, followed by a search for the best step size. We introduce an online stochastic gradient ascent using NAC estimates. Stochastic gradient ascent methods often outperform stochastic batch methods [2]. We begin with the Bellman equation for fixed parameters θ where the value of action a in state s is Q(s, a). This can also be written as the value V(s) plus the advantage of action a in state s, or A(s, a): Q(s, a) = V(s) + A(s, a) = r(s, a) + γ Z S Pr(s′|s, a)V(s′) ds′. (1) We substitute linear approximators for the value and advantage functions, with parameter vectors v and w respectively: ˆV(s) := o(s)⊺v, ˆ A(s, a) := (∇θ log Pr(a|o(s), θ))⊺w, leading to o(s)⊺v + (∇θ log Pr(a|o(s), θt))⊺w = r(s, at) + γ Z S Pr(s′|s, a)o(s′)⊺v ds′. (2) The surprising choice of ∇θ log Pr(a|o(s), θ) as features for ˆ A(s, a) has the nice property that the parameters w turn out to be the naturalised gradient of the long-term average reward (and it is compatible with the policy parameterisation [9]). To see this we write out the policy-gradient algorithm [9], where Pr(s|θ) is the steady state probability of state s and b(s) is a baseline to reduce the variance of gradient estimates ∇θR(θ) = Z S Pr(s|θ) Z A ∇θ Pr(a|s)(Q(s, a) −b(s)) da ds. (3) The obvious baseline for making Q(s, a) zero mean is b(s) = V(s), which gives Q(s, a) −V(s) = A(s, a). Again, we substitute the linear approximation ˆ A(s, a) for A(s, a) and make use of the fact that our policy is actually a function of o := o(s) and θ: ∇θR(θ) = Z S Pr(s|θ) Z A ∇θ Pr(a|o, θ)(∇θ log Pr(a|o, θ))⊺w da ds. Further substituting ∇θ Pr(a|o, θ) by Pr(a|o, θ)∇θ log Pr(a|o, θ) gives ∇θR(θ) = Z S Pr(s|θ) Z A Pr(a|o, θ)∇θ log Pr(a|o, θ)(∇θ log Pr(a|o, θ))⊺da ds w =: Fθw A key observation is that the matrix Fθ is the outer product of the log action gradient, integrated over all states and actions. This is exactly the Fisher information matrix [1]. On the other hand, the naturalisation of gradients consists of pre-multiplying the normal gradient by the inverse of the Fisher matrix [10], leading to cancellation of the two Fisher matrices F −1 θ ∇θR(θ) = w. We return to (2) and reformulate it as a temporal-difference estimate of Q(st, at), noting in particular that the integral is replaced by an approximation γot+1vt of the discounted value of the observed next state. This approximation introduces a zero-mean error σ. Rewriting as a linear system yields (ot −γot+1)⊺vt + σ(ot, st, st+1) + (∇θ log Pr(at|ot, θt))⊺wt = r(st, at). [(∇θ log Pr(at|ot, θt)⊺, (ot −γot+1)⊺][w⊺ t , v⊺ t ]⊺+ σ(ot, st, st+1) = r(st, at) zt[(∇θ log Pr(at|ot, θt)⊺, (ot −γot+1)⊺][w⊺ t , v⊺ t ]⊺+ σ(ot, st, st+1) = ztr(st, at) =: gt (4) In (4) we pre-multiply both sides by an eligibility trace zt [11], which gives us the LSTDQ algorithm for a single sample at step t. The NAC algorithm approximates w by averaging both sides over many time steps T and solving AT [w⊺, v⊺]⊺ = bT , where AT = 1/T PT t=1 zt[(∇θ log Pr(at|ot, θt)⊺, (ot −γot+1)⊺] (averaging out the zero-mean noise), and bT = 1/T PT t=0 gt. By analogy with other second-order gradient methods we can view A as containing curvature information about the optimisation manifold, accelerating learning. In the case of NAC it is an elegant combination of the Fisher information matrix and critic information. 4.1 Online Infinite-Horizon Natural Actor Critic We cannot perform a line search on a real world traffic system because during the line search we may try arbitrarily poor step size values. Furthermore, the gradient estimates are noisy, disadvantaging batch methods [2]. E.g., if wt is not accurate a line search can step a long way toward a suboptimal policy and get stuck because the soft-max function used to generate action distributions has a minima for all large parameter values. Methods for preventing line search from going too far typically counteract the advantages of using one at all. Thus, we propose the online version of NAC in Algorithm 1, making a small parameter update at every time step which potentially accelerates convergence because the policy can improve at every step. The main difference between the batch and online versions is the avoidance of the O(d3) matrix inversion (although Cholesky factorisation can help) for solving AT [w⊺, v⊺]⊺= bT , where d = |θ| + |o|. Instead, lines 12 to 15 implement a trick used for Kalman filters: the Sherman-Morrison update of a matrix inverse [2]: (A + zy⊺)−1 = A−1 −A−1zy⊺A−1 1 + y⊺A−1z . In other words, we always work in the inverse space. The update is O(d2), which is still expensive compared to vanilla PG approaches. Faster methods would be possible if the rank one update of A were of the restricted form A+zz⊺. NAC makes up for expensive computations by requiring orders of magnitude fewer steps to converge to a good policy. We retain the aggregation of A,1 using a rolling average implemented by the α weighting (line 12); however we only use instantaneous estimates gt to avoid multiple parameter updates based on the same rewards. The OLPOMDP, or vanilla, algorithm [12] produces per step gradient estimates from the discounted sum of ∇θ log Pr(at|ot, θt), multiplied by the instant reward rt. This is exactly wt if we set At := I for all t. Other PG approaches [9, 10] are also specialisations of NAC. As the simplest and fastest infinite-horizon algorithm we used OLPOMDP for comparison. 5 Policy-Gradient for Traffic Control PG methods are particularly appealing for traffic control for several reasons. The local search, Monte-Carlo gradient estimates, and local rewards improve scalability. The (almost) direct mapping 1This means that At is a mixture of the Fisher matrices for many parameter values. This is unappealing and we expected a discounted average to yield an At that better represents θt. However, this performed poorly, perhaps because decaying α mitigates ill-conditioning in the Fisher matrix as parameter values grow [10]. Alg. 1: An Online Natural Actor-Critic 1: t = 1, A−1 1 = I, θ1 = [0], z1 = [0] 2: ϵ=step size, γ=Critic discount, λ=Actor discount 3: Get observation o1 4: while not converged do 5: Sample action at ∼Pr(·|ot, θt) 6: zt = λzt−1 + [∇θ log Pr(at|ot, θt)⊺, o⊺ t ]⊺ 7: Do action at 8: Get reward rt 9: gt = rtzt 10: Get observation ot+1 11: yt = [∇θ log Pr(·|ot, θt)⊺, o⊺ t ]⊺−γ[0⊺, o⊺ t+1]⊺ 12: αt = 1 −1 t 13: ut = (1 −αt)A−1 t−1zt 14: q⊺ t = y⊺ t A−1 t−1 15: A−1 t = 1 αt A−1 t−1 − utq⊺ t 1.0+q⊺ t zt 16: [w⊺ t , v⊺ t ]⊺= A−1 t gt 17: θt+1 = θt + ϵwt 18: t ←t + 1 19: end while Fig. 2: Convergence properties of NAC (top) compared to OLPOMDP (bottom) over 30 runs in the Offset scenario. of raw sensor information to controls means that we avoid modelling, and also creates a controller that can react immediately to fluctuations in traffic density. We emphasise that, while SCATS has to adapt a single behaviour slowly, our policy is a rich mapping of sensor data to many different behaviours. Neighbouring intersection controllers cooperate through common observations. 5.1 Our Simulator We implemented a simple traffic simulation system, aiming at maximum simulation speed rather than at an accurate model of traffic flow. We did, however, implement a realistic control interface. We modelled the phase control protocol and sensor system based on information from the Sydney traffic authority. Given that the learning algorithm does not depend directly on a model of the system, just the ability to interact with it, our controller can be plugged into a more accurate simulation without modification. Our simplifying assumptions include: all vehicles move at uniform speed; road length is a multiple of the distance cars travel in one step; we ignore interactions between cars or the relative positions of cars within one road segment except in intersection queues. Roads are placed in a sparse grid, and intersections may be defined at grid nodes. Every intersection has two queues per incoming road: one queue for right turns and one for going straight or left. Vehicles drive on the left. Every vehicle has a destination intersection that it navigates to via a shortest path. If a driver can select either intersection queue without changing route distance, they choose the one that is currently green, or has the fewest cars in the queue. This models the adaption of drivers to control policies. To account for the gap between a phase ending and the next starting (inter-green time), and the fact that cars start up slowly, we restrict the number of cars that pass through an intersection in the first green step. This factor deters strategies that flip rapidly between phases. We represent saturated traffic conditions through a road capacity parameter. Cars are only allowed to move into the next road segment if the number of cars there does not exceed 20. 5.2 The Control Architecture Commonly intersections have 2 to 6 phases. Ours have 4 phases: for traffic coming from east or west (EW) straight and left turns, EW right turns, north/south (NS) straight and left turns, and NS right turns. At each time step (corresponding to about 5 seconds real-time) the controller decides which phase to activate in the next step. We do not restrict the order of phases, but to ensure a reasonable policy we enforce the constraint that all phases must be activated at least once within 16 time steps. The controller input for intersection i is ot,i, constructed as follows: Cycle duration: 16 bits, where the nth bit is on in the nth step of the cycle, supporting time based decisions like offsets. Current phase: 4 bits, indicating the previous phase. Current phase duration: 5 bits, indicating that we have spent no more than 1, 2, 4, 8 or 13 continuous time steps in the current phase. Phase durations: 5 bits per phase, in the same format as current duration, counting the total time spent in each phase in the current cycle. Detector active: 8 bits for the 8 loop sensors indiFig. 3: The intersection model, showing 2 phases and detectors. cating whether a car is waiting. Detector history: 3 bits per loop sensor, indicating a saturation level of more than 0, more than half capacity, or capacity, in the current cycle. Neighbour information: 2 bits, giving a delayed comparison of the flows from neighbouring intersections, indicating where traffic is expected from. The controller maps observations ot,i for intersection i to a probability distribution ˜at,i over the P phases using a linear approximator with outputs xt,i and the soft-max function. Let θi be the P × |ot,i| matrix of parameters for intersection i. We additionally define U(p) as the unit vector with a 1 in row p. Thus, assuming exp(xt,i) is element-wise exponentiation xt,i = θiot,i , ˜at,i = exp(xt,i) PP p=1 exp(xt,i(p)) , Pr(at,i = p|ot,i, θi) = ˜at,i(p); ∇θi log Pr(at,i = p|ot,i, θi) = (U(p) −˜at,i)o⊺ t,i , ∇θ log Pr(at|ot, θ) = [∇⊺ θ1, . . . , ∇⊺ θi]⊺. We implemented two baseline controllers for comparison: (1) a uniform controller giving equal length to all phases; (2) A SCATS inspired adaptive controller called SAT that tries to achieve a saturation of 90% (thought to be used by SCATS) for all phases. The exact details of SCATS are not available. We aimed to recreate just the adaptive parts of SCATS. It updates the policy once per cycle depending on the current flows [7]. It does not implement the hand-tuned elements of the SCATS controller, such as offsets between neighbouring intersections. 6 Experiments Our first 4 experiments demonstrate scenarios where we expect PG learning to outperform the adaptive SAT controller. The 5th experiment is a large scale experiment where we had no particular prior reason to expect PG to outperform SAT. Fluctuating. This scenario focuses on an intersection in the centre of a crossroads. The traffic volume entering the system on the NS and EW traffic axes is proportional to a sine and cosine function of the time, respectively. Thus the optimal policy at the centre intersection also oscillates with the traffic volume. This scenario is realistic because upstream intersections release periodic bursts of traffic, which then disperse as they travel along the road. SCATS is known to adapt too slowly to deal well with such situations. The road length is 3 units, and vehicles travel through 3 intersections and along 4 roads, leading to an optimal travel time of 12. On average 3 cars enter the system per time step from each direction. Our results quote the average travel time (TT). Tab. 1 shows that NAC and OLPOMDP both improve upon the uniform controller and SAT. The two PG algorithms get similar results across all scenarios. However, Tab. 2 shows that NAC does so in up to 3 orders of magnitude fewer learning steps, but sometimes requires more CPU time. In a real deployment NAC would be able to keep up with realtime, thus we are much more concerned about reducing learning steps. The tables quote a single run with tuned parameters. To check the reliability of convergence and compare the properties of the two algorithms, Fig. 2 displays the results of 30 runs for both algorithms in one of our scenarios. We also ran the original NAC algorithm, using batch estimates of the direction in a line search to test whether an online NAC is advantageous. We were able to construct a line search that converged faster than online NAC, but always to a significantly worse policy (TT 23 instead of 14.3); or a line search that reached the same policy, but no faster than online. We analysed the sensitivity of training to the removal of observation features. Performance was degraded after removing any set of observations. Removing multiple observations caused a smooth degradation of the policy [7]. Burst. Intersection controllers can learn to “cooperate” by using common observations. In this scenario, we make use of only the neighbours feature in the observations, so the controller must use the detector counts of its neighbours to anticipate traffic. The road network is the same as in the Fluctuating scenario. A steady stream of 1 car per step travels EW, so that it is usually good for the centre controller to give maximum time to the EW-straight phase. With the small probability of 0.02 per step, we input a group of 15 cars from the north, travelling south. When this happens, the controller should interrupt its normal policy and give more time to the NS-straight phase. Table 1 shows that both algorithms learn a good policy in terms of travel time. When examining the learned policies, we noted that the centre intersection controller had indeed learned to switch to the NS-straight phase just in time before the cars arrive, something that SAT and SCATS cannot do. Offset. Many drivers have been frustrated by driving along a main street, to be constantly interrupted by red lights. This scenario demonstrates learning an offset between neighbouring intersections, a feature that needs to be hand-tuned in SCATS. We model one arterial with 3 controlled intersections, neglecting any traffic flowing in from side roads. The road length is two units for 4 roads, resulting in an optimal travel time of 8. We restricted the observations to the cycle duration, meaning that our controllers learned from time information only. NAC learned an optimal policy in this scenario. SAT performed badly because it had no means of implementing an offset. We discovered, however, that learning an optimal policy is difficult, e.g. we failed for a road length of 3 (given limited time). Learning is hard because intersection n + 1 can only begin to learn when intersection n has already converged to an optimal policy. Adaptive Driver. In this scenario, local reward optimisation fails to find the global optimum, so we use the number of cars in the system as the global reward (which minimises the average travel time assuming constant input of cars). This reward is hard to estimate in the real world, but we want to demonstrate the ability of the system to learn cooperative policies using a global reward. Like the previous crossroads scenarios, we have NS and EW streams that interact only at a central intersection (D, in Fig. 4). The streams have the same volume, so the optimal policy splits time uniformly between the NW-straight and EW-straight phases. An additional stream of cars is generated in the south-west corner, at Intersection H, and travels diagonally east to Intersection E. Two equally short routes are available by going straight, or turning east at Intersection F. However, cars that turn east to join the northbound traffic flow must then turn east again at Intersection D, forcing the controller of that intersection to devote time to a third NS-right phase and forcing the main volume of traffic to pause. The optimal strategy is actually to route all cars north from Intersection F, so they join the main eastbound traffic flow. This scenario relies on a driver model that prefers routes with shorter waiting times at intersections among routes of equal distance. Our observations for this scenario consist only of the phase durations, informing the controller how much time it has spent in each phase during the current cycle. Although the average TT of the PG algorithms was only slightly better than SAT’s, their policies were radically different. SAT routed cars equally north and east at the critical intersection F, whilst the PG algorithms routed cars north. In this scenario, a slightly larger volume of of vehicles made SAT cause permanent traffic jams, while the PG algorithms still found the correct policy. In this scenario PG even beat our hand-coded optimal deterministic policy because it used stochasticity to find a “mixed” policy, giving phases a fractional number of steps on average. Large Scale Optimisation. In a 10 × 10 intersection network, perhaps modelling a central business district, each node potentially produces two cars at each time step according to a randomly initialised probability between 0 and 0.25. The two destinations for the cars from each source are initialised randomly, but stay fixed during the experiment to generate some consistent patterns within the network. Driver adaption and stochastic route choices also create some realistic variance. We used local rewards and all observations. OLPOMDP gave an average travel time improvement of 20% over SAT even though this scenario was not tailored for our controller. Such savings in a real city would be more than significant. NAC required around 52,000 iterations to improve on SAT. This would be 3 days of experience in the real world to achieve equivalent performance. Tab. 1: Comparison of best travel times (TT)for all methods and all scenarios. Evaluation for the PG algorithms was over 100,000 steps, after reaching steady state. Scen. Random Unif. SAT NAC OLPOMDP Fluct 250.0 102.0 21.5 14.3 13.4 Burst 197.0 35.0 18.4 13.4 13.5 Offset 17.9 15.0 12.0 8.0 8.0 A.D. 251.0 74.2 17.2 15.8 16.0 100 int. 60.5 54.7 35.1 29.8 27.9 Fig. 4: Adaptive driver scenario. Tab. 2: Optimisation parameters and run times for all scenarios for the PG algorithms. Optimisation was performed for t steps. ‘Secs’ is wall-clock time. Scen. NAC OLPOMDP TT t secs ϵ λ γ TT t secs ϵ λ Fluct. 14.3 4.5 · 106 860,549 10−5 0.9 0.95 13.4 1.1 · 109 491,298 10−3 0.9 Burst 13.4 4.4 · 106 25,454 10−4 0.9 0.95 13.5 9.7 · 108 35,572 10−4 0.9 Offset 8.0 2.1 · 106 1,973 5 · 10−5 0.98 0.9 8.0 6.3 · 108 8,546 5 · 10−6 0.98 A.D. 15.8 9.3 · 107 867,267 10−7 0.98 0.95 16.0 2.2 · 109 807,496 10−6 0.98 100 int. 29.8 2.9 · 105 1,077,151 10−4 0.9 0.95 27.9 3.0 · 108 1,029,428 10−5 0.9 7 Conclusion We described an online stochastic ascent policy-gradient procedure based on the natural actor-critic algorithm. We used it in a distributed road traffic problem to demonstrate where machine learning could improve upon existing proprietary traffic controllers. Our future work will apply this approach to realistic and approved simulators. Improved algorithms will be developed to cope with the increased noise and temporal credit assignment problem inherent in realistic systems. Acknowledgments National ICT Australia is funded by the Australian Government’s Backing Australia’s Ability program and the Centre of Excellence program. References [1] J. Peters, S. Vijayakumar, and S. Schaal. Natural actor-critic. In Proc. ECML., pages 280–291, 2005. [2] L. Bottou and Y. Le Cun. Large scale online learning. In Proc. NIPS’2003, volume 16, 2004. [3] N. H. Gartner, C. J. Messer, and E. Ajay K. Rathi. Traffic Flow Theory: A State of the Art Report Revised Monograph on Traffic Flow Theory. U.S. Department of Transportation, Transportation Research Board,Washington, D.C., 1992. [4] M. Papageorgiou. Traffic Control. In Handbook of Transportation Science. R. W. Hall, Editor, Kluwer Academic Publishers, Boston, 1999. [5] A. G. Sims and K. W. Dobinson. The Sydney coordinated adaptive traffic (SCAT) system philosophy and benefits. IEEE Transactions on Vehicular Technology, VT-29(2):130–137, 1980. [6] M. Wiering. Multi-agent reinforcement learning for traffic light control. In Proc. ICML 2000, 2000. [7] S. Richter. Learning traffic control - towards practical traffic control using policy gradients. Diplomarbeit, Albert-Ludwigs-Universit¨at Freiburg, 2006. [8] J. A. Bagnell and A. Y. Ng. On local rewards and scaling distributed reinforcement learning. In Proc. NIPS’2005, volume 18, 2006. [9] R. S. Sutton, D. McAllester, S. Singh, and Y. Mansour. Policy gradient methods for reinforcement learning with function approximation. In Proc. NIPS, volume 12. MIT Press, 2000. [10] S. Kakade. A natural policy gradient. In Proc. NIPS’2001, volume 14, 2002. [11] J. A. Boyan. Least-squares temporal difference learning. In Proc. ICML 16, pages 49–56, 1999. [12] J. Baxter, P. Bartlett, and L. Weaver. Experiments with infinite-horizon, policy-gradient estimation. JAIR, 15:351–381, 2001.
2006
94
3,119
Implicit Surfaces with Globally Regularised and Compactly Supported Basis Functions Christian Walder†⋆, Bernhard Sch¨olkopf† & Olivier Chapelle† † Max Planck Institute for Biological Cybernetics, 72076 T¨ubingen, Germany ⋆The University of Queensland, Brisbane, Queensland 4072, Australia first.last@tuebingen.mpg.de Abstract We consider the problem of constructing a function whose zero set is to represent a surface, given sample points with surface normal vectors. The contributions include a novel means of regularising multi-scale compactly supported basis functions that leads to the desirable properties previously only associated with fully supported bases, and show equivalence to a Gaussian process with modified covariance function. We also provide a regularisation framework for simpler and more direct treatment of surface normals, along with a corresponding generalisation of the representer theorem. We demonstrate the techniques on 3D problems of up to 14 million data points, as well as 4D time series data. 1 Introduction The problem of reconstructing a surface from a set of points frequently arises in computer graphics. Numerous methods of sampling physical surfaces are now available, including laser scanners, optical triangulation systems and mechanical probing methods. Inferring a surface from millions of points sampled with noise is a non-trivial task however, for which a variety of methods have been proposed. The class of implicit or level set surface representations is a rather large one, however other methods have also been suggested – for a review see [1]. The implicit surface methods closest to the present work are those that construct the implicit using regularised function approximation [2], such as the “Variational Implicits” of Turk and O’Brien [3], which produce excellent results, but at a cubic computational fitting cost in the number of points. The effectiveness of this type of approach is undisputed however, and has led researchers to look for ways to overcome the computational problems. Two main options have emerged. The first approach uses compactly supported kernel functions (we define and discuss kernel functions in Section 2), leading to fast algorithms that are easy to implement [4]. Unfortunately however these methods are suitable for benign data sets only. As noted in [5], compactly supported basis functions “yield surfaces with many undesirable artifacts in addition to the lack of extrapolation across holes”. A similar conclusion was reached in [6] which states that local processing methods are “more sensitive to the quality of input data [than] approximation and interpolation techniques based on globally-supported radial basis functions” – a conclusion corroborated by the results within a different paper from the same group [7]. The second means of overcoming the aforementioned computational problem does not suffer from these problems however, as demonstrated by the FastRBFTMalgorithm [5], which uses the the Fast Multipole Method (FMM) [8] to overcome the computational problems of non-compactly supported kernels. The resulting method is non-trivial to implement however and to date exists only in the proprietary FastRBFTMpackage. We believe that by applying them in a different manner, compactly supported basis functions can lead to high quality results, and the present work is an attempt to bring the reader to the same conclusion. In Section 3 we introduce a new technique for regularising such basis functions which (a) (b) (c) Figure 1: (a) Rendered implicit surface model of “Lucy”, constructed from 14 million points with normals. (b) A planar slice that cuts the nose – the colour represents the value of the embedding function and the black line its zero level. (c) A black dot at each of the 364,982 compactly supported basis function centres which, along with the corresponding dilations and magnitudes, define the implicit. allows high quality, highly scalable algorithms that are relatively easy to implement. We also show that the approximation can be interpreted as a Gaussian process with modified covariance function. Before doing so however, we present in Section 2 the other main contribution of the present work, which is to show how surface normal vectors can be incorporated directly into the regularised regression framework that is typically used for fitting implicit surfaces, thereby avoiding the problematic approach of constructing “off-surface” points for the regression problem. To demonstrate the effectiveness of the method we apply it to various problems in Section 4 before summarising in the final Section 5. 2 Implicit Surface Fitting by Regularised Regression Here we discuss the use of regularised regression [2] for the problem of implicit surface fitting. In Section 2.1 we motivate and introduce a clean and direct means of making use of normal vectors. The following Section 2.2 extends on the ideas in Section 2.1 by formally generalising the important representer theorem. The final Section 2.3 discusses the choice of regulariser (and associated kernel function), as well as the associated computational problems that we overcome in Section 3. 2.1 Regression Based Approaches and the Use of Normal Vectors Typically implicit surface has been done by solving a regularised regression problem [5, 4] arg min f ∥f∥2 H + C m X i=1 (f (xi) −yi)2 , (1) where the yi are some estimate of the signed distance function at the xi, and f is the embedding function which takes on the value zero on the implicit surface. The norm ∥f∥H is a regulariser which takes on larger values for less “smooth” functions. We take H to be a reproducing kernel Hilbert space (RKHS) with representer of evaluation (kernel function) k(·, ·), so that we have the reproducing property, f(x) = ⟨f, k(x, ·)⟩H. The solution to this problem has the form f (x) = m X i αik (xi, x) . (2) Note as a technical aside that the thin-plate kernel case – which we will adopt – requires a somewhat more technical interpretatiosn, as it is only conditionally positive definite. We discuss the positive definite case for clarity only, as it is simpler and yet sufficient to demonstrate the ideas involved. Choosing the (xi, yi) pairs for (2) is itself a non-trivial problem, and heuristics are typically used to prevent contradictory target values (see e.g. [5]). We now propose more direct method, novel in the context of implicit fitting, which avoids these problems. The approach is suggested by the fact that the normal direction of the implicit surface is given by the gradient of the embedding function – thus normal vectors can be incorporated by regression with gradient targets. The function that we seek is the minimiser of: ∥f∥2 H + C1 m X i=1 (f (xi))2 + C2 m X i=1 ∥(∇f) (xi) −ni∥2 Rd , (3) which uses the given surface point/normal pairs (xi, ni) directly. By imposing stationarity and using the reproducing property we can solve for the optimal f. A detailed derivation of this procedure is given in [1]. Here we provide only the result, which is that we have to solve for m coefficients αi as well as a further md coefficients βlj to obtain the optimal solution f (x) = m X i αik (xi, x) + m X i d X l βlikl (xi, x) , (4) where we define kl (xi, x) .= [(∇k) (xi, x)]l, the partial derivative of k in the l-th component of its first argument.1 The coefficients α and βl of the solution are found by solving the system given by 0 = (K + I/C1)α + X l Klβl (5) Nm = Kmα + (Kmm + I/C2)βk + X l̸=m Klmβl, m = 1 . . . d (6) where, writing klm for the second derivatives of k(·, ·) (defined similarly to the first), we’ve defined [Nl]i = [ni]l; [α]i = αi [βl]i = βli; [K]i,j = k(xi, xj) [Kl]i,j = kl(xi, xj) ; [Klm]i,j = klm(xi, xj). In summary, minimum norm approximation in an RKHS with gradient target values is optimally solved by a function in the span of the kernels and derivatives thereof as per Equation 4 (cf. Equation 2), and the coefficients of the solution are given by Equations (5) and (6). It turns out, however, that we can make a more general statement, which we do briefly in the next sub-Section. 2.2 The Representer Theorem with Linear Operators The representer theorem, much celebrated in the Machine Learning community, says that the function minimising an RKHS norm along with some penalties associated with the function value at various points (as in Equation 1 for example) is a sum of kernel functions at those points (as in Equation 2). As we saw in the previous section however, if gradients also appear in the risk function to be minimised, then gradients of the kernel function appear in the optimal solution. We now make a more general statement – the case in the previous section corresponds to the following if we choose the linear operators Li (which we define shortly) as either identities or partial derivatives. The theorem is a generalisation of [9] (using the same proof idea) with equivalence if we choose all Li to be identity operators. The case of general linear operators was in fact dealt with already in [2] (which merely states the earlier result in [10]) – but only for the case of a specific loss function c. The following theorem therefore combines the two frameworks: Theorem 1 Denote by X a non-empty set, by k a reproducing kernel with reproducing kernel Hilbert space H, by Ωa strictly monotonic increasing real-valued function on [0, ∞), by c : Rm →R ∪{∞} an arbitrary cost function, and by L1, . . . Lm a set of linear operators H →H. Each minimiser f ∈H of the regularised risk functional c((L1f)(x1), . . . (Lmf)(xm)) + Ω(||f||2 H) (7) admits the form f = m X i=1 αiL∗ i kxi, (8) where kx ≜k(·, x) and L∗ i denotes the adjoint of Li. 1Square brackets with subscripts indicate matrix elements: [a]i is the i-th element of the vector a. Proof. Decompose f into f = Pm i=1 αiL∗ i kxi + f⊥, with αi ∈R and ⟨f⊥, L∗ i kxi⟩H = 0, for each i = 1 . . . m. Due to the reproducing property we can write, for j = 1 . . . m, (Ljf)(xj) = ⟨(Ljf), k(·, xj)⟩H = m X i=1 αi⟨LjL∗ i kxi, k(·, xj)⟩H + ⟨(Ljf⊥), k(·, xj)⟩H = m X i=1 αi⟨LjL∗ i kxi, k(·, xj)⟩H. Thus, the first term in Equation 7 is independent of f⊥. Moreover, it is clear due to orthogonality that if f⊥̸= 0 then Ω   m X i=1 αiL∗ i kxi + f⊥ 2 H  > Ω   m X i=1 αiL∗ i kxi 2 H  , so that for any fixed αi ∈R, Equation 7 is minimised when f⊥= 0. 2.3 Thin Plate Regulariser and Associated Kernel As is well known (see e.g. [2]), the choice of regulariser (the function norm in Equation 3) leads to a particular kernel function k(·, ·) to be used in Equation 4. For geometrical problems, an excellent regulariser is the thin-plate energy, which for arbitrary order m and dimension d is given by [2]: ∥f∥2 H = ⟨ψf, ψf⟩L2 (9) = d X i1=1 · · · d X im=1 Z ∞ x1=−∞ · · · Z ∞ xd=−∞ „ ∂ ∂xi1 · · · ∂ ∂xim f « „ ∂ ∂xi1 · · · ∂ ∂xim f « dx1 . . . dxd, (10) where ψ is a regularisation operator taking all partial derivatives of order m, which corresponds to a “radial” kernel function of the form k(x, y) = t(||x −y||), where [11] t(r) = r2m−d ln(r) if 2m > d and d is even, r2m−d otherwise. There are a number of good reasons to use this regulariser rather than those leading to compactly supported kernels, as we touched on in the introduction. The main problem with compactly supported kernels is that the corresponding regularisers are somewhat poor for geometrical problems – they always draw the function towards some nominal constant as one moves away from the data, thereby implementing the non-intuitive behaviour of regularising the constant function and making interpolation impossible – for further discussion see [1] as well as [5, 6, 7]. The scheme we propose in Section 3 solves these problems, previously associated with compactly supported basis functions, by defining and computing the regulariser separately from the function basis. 3 A Fast Scheme using Compactly Supported Basis Functions Here we present a fast approximate scheme for solving the problem of the previous Section, in which we restrict the class of functions to the span of a compactly supported, multi-scale basis, as described in Section 3.1, and minimise the thin-plate regulariser within this span as per Section 3.2. 3.1 Restricting the Set of Available Functions Computationally, using the thin-plate spline leads to the problem that the linear system we need to solve (Equations 5 and 6), which is of size m(d + 1), is dense in the sense of having almost all non-zero entries. Since solving such a system na¨ıvely has a cubic time complexity in m, we propose forcing f(·) to take the form: f(·) = p X k=1 πkfk(·), (11) where the individual basis functions are fk(·) = φ(||vk−·||/sk) for some function φ : R+ →R with support [0, 1). The vk and sk are the basis function centres and dilations (or scales), respectively. For φ we choose the B3-spline function: φ(r) = 4 X n=0 (−1)n d!  n d + 1  (r + (d + 1 2 −n))d +, (12) although this choice is rather inconsequential since, as we shall ensure, the regulariser is unrelated to the function basis – any smooth compactly supported basis function could be used. In order to achieve the same interpolating properties as the thin-plate spline, we wish to minimise our regularised risk function given by Equation 3 within the span of Equation 11. The key to doing this is to note that as given before in Equation 9, the regulariser (function norm) can be written as ∥f∥2 H = ⟨ψf, ψf⟩L2. Given this fact, a straightforward calculation leads to the following system for the optimal πk (in the sense of minimising Equation 3): Kreg + C1K T xvKxv + C2 d X l=1 K T xvlKxvl ! π = C2 d X l=1 KxvlNl, (13) where we have defined the following matrices: [Kreg]k,k′ = ⟨ψfk, ψfk′⟩L2; [Kxv]i,k = fk(xi); [Kxvl]i,k = [(∇fk)(xi)]l ; [π]k = πk; [Nl]i = [ni]l . The computational advantage is that the coefficients that we need are now given by a sparse pdimensional positive semi-definite linear system, which can be constructed efficiently by simple code that takes advantage of software libraries for fast nearest neighbour type searches (see e.g. [12]). The system can then be solved efficiently using conjugate gradient type methods. In [1] we describe how we construct a basis with p ≪m that results in a highly sparse linear system, but that still contains good solutions. The critical matter of computing Kreg is dealt with next. 3.2 Computing the Regularisation Matrix We now come to the crucial point of calculating Kreg, which can be thought of as the regularisation matrix. The present Section is highly related to [13], however there numerical methods were resorted to for the calculation of Kreg – presently we shall derive closed form solutions. Also worth comparing to the present Section is [14], where a prior over the expansion coefficients (here the π) is used to mimic a given regulariser within an arbitrary basis, achieving a similar result but without the computational advantages we are aiming for. As we have already noted we can write ∥f∥2 H = ⟨ψf, ψf⟩L2 [2], so that for the function given by Equation 11 we have: ‚‚‚‚‚ p X j=1 πjfj(·) ‚‚‚‚‚ 2 H = * ψ p X j=1 πjfj(·), ψ p X k=1 πkfk(·) + L2 = p X j,k=1 πjπk ⟨ψfj(·), ψfk(·)⟩L2 .= π TKregπ. To build the sparse matrix Kreg, a fast range search library (e.g. [12]) can be used to identify the non-zero entries – that is, all those [Kreg]i,j for which i and j satisfy ∥vi −vj∥≤si + sj. In order to evaluate ⟨ψfj(·), ψfk(·)⟩L2, it is necessary to solve the integral of Equation 10, the full derivation of which we relegate to [1] – here we just provide the main results. It turns out that since the fi are all dilations and translations of the same function φ(∥·∥), then it is sufficient solve for the following function of si, sj and d .= vi −vj: ⟨ψφ((·)si −d), ψφ((·)sj)⟩L2 , which it turns out is given by F−1 ω " (2πj ∥ω∥)2m |s1s2| Φ( ω s1 )Φ( ω s2 ) # (d), (14) Figure 2: Various values of the regularisation parameters lead to various amounts of “smoothing” – here we set C1 = C2 in Equation 3 to an increasing value from top-left to bottom-right of the figure. Figure 3: Ray traced three dimensional implicits, “Happy Buddha” (543K points with normals) and the “Thai Statue” (5 million points with normals). where j2 = −1, Φ = Fx [φ(x)], and by F (and F−1) we mean the Fourier (inverse Fourier) transform operators in the subscripted variable. Computing Fourier transforms in d dimensions difficult in general, but for radial functions g(x) = gr(||x||) it may be made easier by the fact that the Fourier transform in d dimensions (as well as its inverse) can be computed by the single integral: Fx [gr(∥x∥)] (∥ω∥) = (2π) d 2 ||ω|| d−2 2 Z ∞ 0 r d 2 gr(r)J d−2 2 (||ω||r)dr, where Jν(r)is the ν-th order Bessel function of the first kind. Unfortunately the integrals required to attain Equation 14 in closed form cannot be solved for general dimensionality d, regularisation operator ψ and basis function form φ, however we did manage to solve them for arguably the most useful case: d = 3 with the m = 2 thin plate energy and the B3spline basis function of Equation 12. The resulting expressions are rather unwieldy however, so we give only an implementation in the C language in the Appendix of [1], where we also show that for the cases that cannot be solved analytically the required integral can at worst always be transformed to a two dimensional integral for which one can use numerical methods. 3.3 Interpretation as a Gaussian Process Presently we use ideas from [15] to demonstrate that the approximation described in this Section 3 is equivalent to inference in an exact Gaussian Process with covariance function depending on the choice of function basis. Placing a multivariate Gaussian prior over the coefficients in (11), namely π ∼N(0, K−1 reg ), we see that f obeys a zero mean Gaussian process prior – writing [fx]i = f(xi) and denoting expectations by E [·] we have for the covariance E [fxf T x ] = KxzE [ππ T] K T xz = KxzK−1 reg K T xz Now, assuming an iid Gaussian noise model with variance σ2 and defining Kxt etc. similarly to Kxz we can immediately write the joint distribution between the observation at a test point t, that is yt ∼N f(t), σ2 and the vector of observations at the xi, namely yx ∼N fx, σ2I  , which is p(yx, yt) = N  0,  KxzK−1 reg Kzx + σ2I  KxzK−1 reg Kzt KtzK−1 reg Kzx KtzK−1 reg Kzt + σ2I   . The posterior distribution is therefore itself Gaussian, p(yt|yx) ∼N µyt|yx, Σyt|yx  , and we can employ a well known expression2 for the marginals of a multivariate Gaussian followed by the Matrix inversion lemma to derive an expression for the mean of the posterior, µt|y = KxzK−1 reg Kzt T KxzK−1 reg Kzx + σ2I −1 y = Ktz σ2Kreg + K T xzKxz −1 K T xzy. 2 „„ x y « ∼N „„ a b « , „ A C C T B ««« ⇒ ` x|y ∼N ` a + CB−1(y −b), A −CB−1C T´´ Name # Points # Bases Basis Kreg Kxv, Kzv∇ Multiply Solve Total Bunny 34834 9283 0.4 2.4 3.7 11.7 20.4 38.7 Face 75970 7593 0.7 1.9 7.0 20.3 16.0 46.0 Armadillo 172974 45704 6.6 8.5 37.0 123.4 72.3 247.9 Dragon 437645 65288 14.4 16.3 70.9 322.8 1381.4 1805.7 Buddha 543197 105993 117.4 27.4 99.4 423.7 2909.3 3577.2 Asian Dragon 3609455 232197 441.6 60.9 608.3 1885.0 1009.5 4005.2 Thai Statue 4999996 530966 3742.0 197.5 1575.6 3121.2 2569.5 11205.7 Lucy 14027872 364982 1425.8 170.5 3484.1 9367.7 1340.5 15788.5 Table 1: Timing results with a 2.4GHz AMD Opteron 850 processor, for various 3D data sets. Column one is the number of points, each of which has an associated normal vector, and column two is the number of basis vectors (the p of Section 3.1). The remaining columns are all in units of seconds: column three is the time taken to construct the function basis, columns four and five are the times required to construct the indicated matrices, column six is the time required to multiply the matrices as per Equation 13, column seven is the time required to solve that same equation for π and the final column is the total fitting time. By comparison with (11) and (13) (but with C1 = 1/σ2, C2 = 0 and y = 0) we can see that the mean of the posterior distribution is identical to our approximate regularised solution based on compactly supported basis functions. For the corresponding posterior variance we have Σyt|yx = KtzK−1 reg Kzt + σ2 − KtzK−1 reg Kzx  KxzK−1 reg Kzx + σ2I −1 KxzK−1 reg Kzt  = σ2Ktz σ2Kreg + K T xzKxz −1 Kzt + σ2. 4 Experiments We fit models to 3D data sets of up to 14 million data points – timings are given in Table 1, where we also see that good compression ratios are attained, in that relatively few basis functions represent the shapes. Also note that the fitting time scales rather well, from 38 seconds for the Stanford Bunny (35 thousand points with normals) to 4 hours 23 minutes for the Lucy statue (14 million points with normals ≈14×106×(1 value term + 3 gradient terms ) ≈56 million “regression targets”). Taking account of the different hardware the times seem to be similar to those of the FMM approach [5]. Some rendered examples are given in Figures 1 and 3, and the well-behaved nature of the implicit over the entire 3D volume of interest is shown for the Lucy data-set in the accompanying video. In practice the system is extremely robust and produces excellent results without any parameter adjustment – smaller values of C1 and C2 in Equation 3 simply lead to the smoothing effect shown in Figure 2. The system also handles missing and noisy data gracefully, as demonstrated in [1]. Higher dimensional implicit surfaces are also possible, interesting being a 4D representation (3D + “time”) of a moving 3D shape – one use for this being the construction of animation sequences from a time series of 3D point cloud data – in this case both spatial and temporal information can help to resolve noise or missing data problems within individual scans. We demonstrate this in the accompanying video, which shows that 4D surfaces yield superior 3D animation results in comparison to a sequence of 3D models. Also interesting are interpolations in 4D – in the accompanying video we effectively interpolate between two three dimensional shapes. 5 Summary We have presented ideas both theoretically and practically useful for the computer graphics and machine learning communities, demonstrating them within the framework of implicit surface fitting. Many authors have demonstrated fast but limited quality results that occur with compactly supported function bases. The present work differs by precisely minimising a well justified regulariser within the span of such a basis, achieving fast and high quality results. We also showed how normal vectors can be incorporated directly into the usual regression based implicit surface fitting framework, giving a generalisation of the representer theorem. We demonstrated the algorithm on 3D problems of up to 14 million data points and in the accompanying video we showed the advantage of constructing a 4D surface (3D + time) for 3D animation, rather than a sequence of 3D surfaces. Figure 4: Reconstruction of the Stanford bunny after adding Gaussian noise with standard deviation, from left to right, 0, 0.6, 1.5 and 3.6 percent of the radius of the smallest enclosing sphere – the normal vectors were similarly corrupted assuming they had length equal to this radius. The parameters C1 and C2 were chosen automatically using five-fold cross validation. References [1] C. Walder, B. Sch¨olkopf, and O. Chapelle. Implicit surface modelling with a globally regularised basis of compact support. Technical report, Max Planck Institute for Biological Cybernetics, Department of Empirical Inference, Tbingen, Germany, April 2006. [2] G. Wahba. Spline Models for Observational Data. Series in Applied Mathematics, Vol. 59, SIAM, Philadelphia, 1990. [3] Greg Turk and James F. O’Brien. Shape transformation using variational implicit functions. In Proceedings of ACM SIGGRAPH 1999, pages 335–342, August 1999. [4] Bryan S. Morse, Terry S. Yoo, David T. Chen, Penny Rheingans, and K. R. Subramanian. Interpolating implicit surfaces from scattered surface data using compactly supported radial basis functions. In SMI ’01: Proc. Intl. Conf. on Shape Modeling & Applications, Washington, 2001. IEEE Computer Society. [5] J. C. Carr, R. K. Beatson, J. B. Cherrie, T. J. Mitchell, W. R. Fright, B. C. McCallum, and T. R. Evans. Reconstruction and representation of 3d objects with radial basis functions. In ACM SIGGRAPH 2001, pages 67–76. ACM Press, 2001. [6] Yutaka Ohtake, Alexander Belyaev, Marc Alexa, Greg Turk, and Hans-Peter Seidel. Multi-level partition of unity implicits. ACM Transactions on Graphics, 22(3):463–470, July 2003. [7] Y. Ohtake, A. Belyaev, and Hans-Peter Seidel. A multi-scale approach to 3d scattered data interpolation with compactly supported basis functions. In Proc. Intl. Conf. Shape Modeling, Washington, 2003. IEEE Computer Society. [8] L. Greengard and V. Rokhlin. A fast algorithm for particle simulations. J. Comp. Phys., pages 280–292, 1997. [9] Bernhard Sch¨olkopf, Ralf Herbrich, and Alex J. Smola. A generalized representer theorem. In COLT ’01/EuroCOLT ’01: Proceedings of the 14th Annual Conference on Computational Learning Theory, pages 416–426, London, UK, 2001. Springer-Verlag. [10] G. Kimeldorf and G. Wahba. Some results on Tchebycheffian spline functions. Journal of Mathematical Analysis and Applications, 33:82–95, 1971. [11] J. Duchon. Splines minimizing rotation-invariant semi-norms in sobolev spaces. Constructive Theory of Functions of Several Variables, pages 85–100, 1977. [12] C. Merkwirth, U. Parlitz, and W. Lauterborn. Fast nearest neighbor searching for nonlinear signal processing. Phys. Rev. E, 62(2):2089–2097, 2000. [13] Christian Walder, Olivier Chapelle, and Bernhard Sch¨olkopf. Implicit surface modelling as an eigenvalue problem. Proceedings of the 22nd International Conference on Machine Learning, 2005. [14] M. O. Franz and P. V. Gehler. How to choose the covariance for gaussian process regression independently of the basis. In Proc. Gaussian Processes in Practice Workshop, 2006. [15] J. Quionero Candela and C. E. Rasmussen. A unifying view of sparse approximate gaussian process regression. Journal of Machine Learning Research, 6:1935–1959, 12 2005.
2006
95
3,120
Multiple Instance Learning for Computer Aided Diagnosis Glenn Fung, Murat Dundar, Balaji Krishnapuram, R. Bharat Rao CAD & Knowledge Solutions, Siemens Medical Solutions USA, Malvern, PA 19355 {glenn.fung, murat.dundar, balaji.krishnapuram, bharat.rao}@siemens.com Abstract Many computer aided diagnosis (CAD) problems can be best modelled as a multiple-instance learning (MIL) problem with unbalanced data: i.e. , the training data typically consists of a few positive bags, and a very large number of negative instances. Existing MIL algorithms are much too computationally expensive for these datasets. We describe CH, a framework for learning a Convex Hull representation of multiple instances that is significantly faster than existing MIL algorithms. Our CH framework applies to any standard hyperplane-basedlearning algorithm, and for some algorithms, is guaranteed to find the global optimal solution. Experimental studies on two different CAD applications further demonstrate that the proposed algorithm significantly improves diagnostic accuracy when compared to both MIL and traditional classifiers. Although not designed for standard MIL problems (which have both positive and negative bags and relatively balanced datasets), comparisons against other MIL methods on benchmark problems also indicate that the proposed method is competitive with the state-of-the-art. 1 Introduction In many computer aided diagnosis applications, the goal is to detect potentially malignant tumors and lesions in medical images (CT scans, X-ray, MRI etc). In an almost universal paradigm for CAD algorithms, this problem is addressed by a 3 stage system: identification of potentially unhealthy regions of interest (ROI) by a candidate generator, computation of descriptive features for each candidate, and labeling of each candidate (e.g. as normal or diseased) by a classifier. The training dataset for the classifier is generated as follows: Expert radiologists examine a set of images to mark out tumors. Then, candidate ROIs (with associated computed features) are marked positive if they are sufficiently close to a radiologist mark, and negative otherwise. Many CAD datasets have fewer than 1-10% positive candidates. In the CAD literature, standard machine learning algorithms—such as support vector machines (SVM), and Fisher’s linear discriminant—have been employed to train the classifier. In Section 2 we show that CAD data is better modeled in the multiple instance learning (MIL) framework, and subsequently present a novel convex-hull-based MIL algorithm. In Section 3 we provide experimental evidence from two different CAD problems to show that the proposed algorithm is significantly faster than other MIL algorithms, and more accurate when compared to other MIL algorithms and to traditional classifiers. Further—although this is not the main focus of our paper—on traditional benchmarks for MIL, our algorithm is again shown to be competitive with the current state-of-the-art. We conclude with a description of the relationship to previous work, review of our contributions, and directions for future research in Section 4. 2 A Novel Convex Hull MIL algorithm Almost all the standard classification methods explicitly assume that the training samples (i.e., candidates) are drawn identically and independently from an underlying—thoughunknown—distribution. This property is clearly violated in a CAD dataset, due to spatial adjacency of the regions identified by a candidate generator, both the features and the class labels of several adjacent candidates (training instances) are highly correlated. First, because the candidate generators for CAD problems are trying to identify potentially suspicious regions, they tend to produce many candidates that are spatially close to each other; since these often refer to regions that are physically adjacent in an image, the class labels for these candidates are also highly correlated. Second, because candidates are labelled positive if they are within some pre-determined distance from a radiologist mark, multiple positive candidates could correspond with the same (positive) radiologist mark on the image. Note that some of the positively labelled candidates may actually refer to healthy structures that just happen to be near a mark, thereby introducing an asymmetric labeling error in the training data. In MIL terminology from previous literature, a “bag” may contain many observation instances of the same underlying entity, and every training bag is provided a class label (e.g. positive or negative). The objective in MIL is to learn a classifier that correctly classifies at least one instance from every bag. This corresponds perfectly with the the appropriate measure of accuracy for evaluating the classifier in a CAD system. In particular, even if one of the candidates that refers to the underlying malignant structure (radiologist mark) is correctly highlighted to the radiologist, the malignant structure is detected; i.e. , the correct classification of every candidate instance is not as important as the ability to detect at least one candidate that points to a malignant region. Furthermore, we would like to classify every sample that is distant from radiologist mark as negative, this is easily accomplished by considering each negative candidate as a bag. Therefore, it would appear that MIL algorithms should outperform traditional classifiers on CAD datasets. Unfortunately, in practice, most of the conventional MIL algorithms are computationally quite inefficient, and some of them have problems with local minima. In CAD we typically have several thousand mostly negative candidates (instances), and a few hundred positive bags; existing MIL algorithms are simply unable to handle such large datasets due to time or memory requirements. Notation: Let the i-th bag of class j be represented by the matrix Bi j ∈ℜmi j×n, i = 1, . . . , rj , j ∈{±1}, n is the number of features. The row l of Bi j, denoted by Bil j represents the datapoint l of the bag i in class j with l = 1, . . . , mi j. The binary bag-labels are specified by a vector d ∈{±1}rj. The vector e represent a vector with all its elements one. 2.1 Key idea: Relaxation of MIL via Convex-Hulls The original MIL problem requires at least one of the samples in a bag to be correctly labeled by the classifier: this corresponds to a set of discrete constraints on the classifier. By contrast, we shall relax this and require that at least one point in the convex hull of a bag of samples (including, possibly one of the original samples) has to be correctly classified. Figure 1 illustrates the idea using a graphical toy example. This relaxation, (first introduced in [1]) eliminates the combinatorial nature of the MIL problem, allowing algorithms that are more computationally efficient. As mentioned above, we will consider that a bag Bi j is correctly classified if any point inside the convex hull of the bag Bi j (i.e. any convex combination of points of Bi j) is correctly classified. Let λ s.t. 0 ≤λi j, e′λi j = 1 be the vector containing the coefficients of the convex combination that defines the representative point of bag i in class j. Let r be the total number of representative points, i.e. r = r+ + r−. Let γ be the total number of convex hull coefficients corresponding to the representative points in class j, i.e. γj = Prj i=1 mi j, γ = γ+ + γ−. Then, we can formulate the MIL problem as, min (ξ,w,η,λ)∈Rr+n+1+γ νE(ξ) + Φ(w, η) + Ψ(λ) s.t. ξi = di −(λi jBi jw −eη) ξ ∈ Ω e′λi j = 1 0 ≤ λi j (1) Where ξ = {ξ1, . . . , ξr} are slack terms (errors), η is the bias (offset from origin) term, and λ is a vector containing all the λi j for i = 1, . . . , rj, j ∈{±}. E : ℜr ⇒ℜrepresents the loss function, Φ : ℜ(n+1) ⇒ℜis a regularization function on the hyperplane coefficients [2] and Ψ is a regularization function on the convex combination coefficients λi j. Depending on the choice of E, Φ, Ψ and Ω, (1) will lead to MIL versions of several well-known classification algorithms. 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 Figure 1: A toy example illustrating the proposed approach. Positive and negative classes are represented by blue circles and red diamonds respectively. Cyan polyhedrons represent the convex hulls for the three positives bags, the points chosen by our algorithm to represent each bag is shown by blue stars. The magenta line represents the linear hyperplane obtained by our algorithm and the black line represents the hyperplane for the SVM. 1. E(ξ) = ∥(ξ)+∥2 2, Φ(w, η) = ∥(w, η)∥2 2 and Ω= ℜr+, leads to MIL versions of the Quadratic-Programming-SVM [3]. 2. E(ξ) = ∥(ξ)∥2 2, Φ(w, η) = ∥(w, η)∥2 2 and Ω= ℜr, leads to MIL versions of the LeastSquares-SVM. 3. ν = 1, E(ξ) = ∥ξ∥2 2, Ω= {ξ : e′ξj = 0, j ∈{±}} leads to MIL versions of the QP formulation for Fisher’s linear discriminant (FD) [4]. As an example, we derive a special case of the algorithm for the Fisher’s Discriminant, because this choice (FD) brings us some algorithmic as well as computational advantages. 2.2 Convex-Hull MIL for Fisher’s Linear Discriminant Setting ν = 1, E(ξ) = ∥ξ∥2 2, Ω= {ξ : e′ξj = 0, j ∈{±}} in (1) we obtain the following MIL version of the quadratic programming algorithm for Fisher’s Linear Discriminant [4]. min (ξ,w,η,λ)∈Rr+n+1+γ ∥ξ∥2 2 + Φ(w, η) + Ψ(λ) s.t. ξi = di −(λi jBi jw −eη) e′ξj = 0 e′λi j = 1 0 ≤ λi j (2) The number of variables to be optimized in (2) is r+n+1+γ: this is computationally infeasible when the number of bags is large (r > 104). To alleviate the situation, we (a) replace ξi by di −(λi jBi jw− eη) in the objective function, and (b) replace the equality constraints e′ξj = 0 by w′ (µ+ −µ−) = 2. This substitution eliminates the variables ξ, η from the problem and also the corresponding r equality constraints in (2). Effectively, this results in the MIL version of the traditional FD algorithm. As discussed later in the paper, in addition to the obvious computational gains, this manipulation results in some algorithmic advantages as well (For more information on the equivalence between the single instance learning versions of (2) and (3) see [4]). Thus, the optimization problem reduces to: min (w, λ)∈Rn+γ wT SW w + Φ(w) + Ψ(λ) s.t. wT (µ+ −µ−) = b e′λi j = 1 0 ≤ λi j (3) where SW = P j∈{±} 1 rj (Xj −µje′) (Xj −µje′)T is the within class scatter matrix, µj = 1 rj Xje is the mean for class j. Xj ∈ℜrj×n is a matrix containing the rj representative points on ndimensional space such that the row of Xj denoted by bi j = Bi jλi j is the representative point of bag i in class j where i = {1, . . . , rj} and j ∈{±}. 2.3 Alternate Optimization for Convex-Hull MIL Fisher’s Discriminant The proposed mathematical program (3) can be solved used an efficient Alternate Optimization (AO) algorithm [5]. In the AO setting the main optimization problem is subdivided in two smaller or easier subproblems that depend on disjoints subsets of the original variables. When Φ(w) and Ψ(λ) are strongly convex functions, both the original objective function and the two subproblems (for optimizing λ and w) in (3) are strongly convex, meaning that the algorithm converges to a global minimizer [6]. For computational efficiency, in the remainder of the paper we will use the regularizers Φ(w) = ǫ ∥w∥2 2 and Ψ(λ) = ǫ ∥λ∥2 2, where ǫ is a positive regularization parameter. An efficient AO algorithm for solving the mathematical program (3) is described below. Sub Problem 1: Fix λ = λ∗: When we fix λ = λ∗, the problem becomes, min w∈Rn wT SW w + Φ(w) s.t. wT (µ+ −µ−) = b (4) which is the formulation for the Fisher’s Discriminant. Since SW is the sum of two covariance matrices, it is guaranteed to be at least positive semidefinite and thus the problem in (4) is convex. For datasets with r >> n, i.e. the number of bags is much greater than the number of dimensionality, SW is positive definite and thus the problem in (4) is strictly convex. Unlike (1) where the number of constraints is proportional to the number of bags, eliminating ξ and η leaves us with only one constraint. This changes the order of complexity from O(nr2) to O(n2r) and brings some computational advantages when dealing with datasets with r >> n. Sub Problem 2: Fix w = w∗: When we fix w = w∗, the problem becomes min λ∈Rγ λT ¯SW λ + Ψ(λ) s.t. λT (¯µ+ −¯µ−) = b e′λi j = 1 0 ≤ λi j (5) where ¯SW and ¯µ are defined as in (4) with Xj replaced by ¯Xj where ¯Xj ∈ℜrj×γ is now a matrix containing the rj new points on the γ-dimensional space such that the row of ¯Xj denoted by ¯bi j is a vector with its nonzero elements set to Bi jw∗. For the positive class elements Pi−1 k=1 mk + +1 through Pi k=1 mk + of ¯bi j are nonzero, for the negative class nonzero elements are located at Pr+ k=1 mk + + Pi−1 k=1 mk −+ 1 through Pr+ k=1 mk + + Pi k=1 mk −. Note that ¯SW is also a sum of two covariance matrices, it is positive semidefinite and thus the problem in (5) is convex. Unlike sub problem 1 the positive definiteness of ¯SW does not depend on the data, since it always true that r ≤γ. The complexity of (5) is O(nγ2). As it was mentioned before, in CAD applications, a bag is defined as a set of candidates that are spatially close to the radiologist marked ground-truth. Any candidate that is spatially far from this location is considered negative in the training data, therefore the concept of bag for negative examples does not make any practical sense in this scenario. Moreover, since ground truth is only available on the training set, there is no concept of a bag on the test set for both positive and negative examples. The learned classifier labels (ie classifies) individual instances - the bag information for positive examples is only used to help learn a better classifier from the training data. Hence, the problem in (5) can be simplified to account for these practical observations resulting in an optimization problem with O(nγ2 +) complexity. The entire algorithm is summarized below for clarity. 2.4 CH-FD: An Algorithm for Learning Convex Hull Representation of Multiple Instances (0) Choose as initial guess for λi0 = e mi , ∀i = 1, . . . , r, set counter c=0. (i) For fixed λic, ∀i = 1, . . . , r solve for wc in (4). (ii) Fixing w = wc solve for λic, ∀i = 1, . . . , r in (5). (iii) Stop if λ1(c+1) −λ1c, . . . , λr(c+1) −λrc 2is less than some desired tolerance. Else replace λic by λi(c+1) and c by c + 1 and go to (i). The nonlinear version of the proposed algorithm can be obtained by first transforming the original datapoints to a kernel space spanned by all datapoints through a kernel operator, i.e. K : ℜn ⇒ℜ¯γ and then by optimizing (4) and (5) in this new space. Ideally ¯γ is set to γ. However when γ is large, for computational reasons we can use the technique presented in [7] to limit the number of datapoints spanning this new space. This corresponds to constraining w to lie in a subspace of the kernel space. 3 Experimental Results and Discussion For the experiments in section 3.1 , we compare four techniques: naive Fisher’s Discriminnat (FD), CH-FD, EM-DD [8], IDAPR [9]. For IDAPR and EM-DD we used the Matlab implementation of these algorithms also used in [10]. In both experiments we used the linear version of our algorithm. Hence the only parameter that requires tuning is ν which is tuned to optimize the 10-fold Patient Cross Validation on the training data,. All algorithms are trained on the training data and then tested on the sequestered test data. The resulting Receiver Operating Characteristics (ROC) plots are obtained by trying different values of the parameters (τ, ǫ) for IDAPR, and by thresholding the corresponding output for each of the EM-DD, FD and CH-FD. 3.1 Two CAD Datasets: Pulmonary Embolism & Colon Cancer Detection Next, we present the problems that mainly motivated this work. Pulmonary embolism (PE), a potentially life-threatening condition, is a result of underlying venous thromboembolic disease. An early and accurate diagnosis is the key to survival. Computed tomography angiography (CTA) has emerged as an accurate diagnostic tool for PE, and However, there are hundreds of CT slices in each CTA study and manual reading is laborious, time consuming and complicated by various PE lookalikes. Several CAD systems are being developed to assist radiologists to detect and characterize emboli [11], [12]. At four different hospitals (two North American sites and two European sites), we collected 72 cases with 242 PE bags comprised of 1069 positive candidates marked by expert chest radiologists. The cases were randomly divided into two sets: training (48 cases with 173 PE bags and 3655 candidates) and testing (24 cases with 69 PE bags and 1857 candidates). The test group was sequestered and only used to evaluate the performance of the final system. A combined total of 70 features are extracted for each candidate. Colorectal cancer is the third most common cancer in both men and women. It is estimated that in 2004, nearly 147,000 cases of colon and rectal cancer will be diagnosed in the US, and more than 56,730 people would die from colon cancer [13]. CT colonography is emerging as a new procedure to help in early detection of colon polyps. However, reading through a large CT dataset, which typically consists of two CT series of the patient in prone and supine positions, each with several hundred slices, is time-consuming. Colon CAD [14] can play a critical role to help the radiologist avoid the missing of colon polyps. Most polyps, therefore, are represented by two candidates; one obtained from the prone view and the other one from the supine view. Moreover, for large polyps, a typical candidate generation algorithm generates several candidates across the polyp surface. The database of high-resolution CT images used in this study were obtained from seven different sites across US, Europe and Asia. The 188 patients were randomly partitioned into two groups, training comprised of: 65 cases with 127 volumes, 50 polyps bags (179 positive candidates) were identified in this set with a total number of 6569 negative candidates and testing comprised of 123 patients with 237 volumes, a total of 103 polyp bags (232 positive candidates) were identified in this set with a total number of 12752 negative candidates. The test group was sequestered and only used to evaluate the performance of the final system. A total of 75 features are extracted for each candidate. The resulting Receiver Operating Characteristics (ROC) curves are displayed in Figure 2. Although for the PE dataset Figure 2 (left) IDAPR crosses over CH-FD and is more sensitive than CH-FD for extremely high number of false positives, Table 1 show that CH-FD is more accurate than all other methods over the entire space (AUC). Note that CAD performance is only valid in the clinically acceptable range, < 10fp/patient for PE, < 5fp/volume for Colon (generally there are 2 volumes per patient). In the region of clinical interest (AUC-RCI), Table 1 shows that CH-FD significantly outperforms all other methods. Table 1: Comparison of 3 MIL and one traditional algorithms: Computation time, AUC, and normalized AUC in the region of clinical interest for PE and Colon test data Algorithm Time Time AUC AUC AUC-RCI AUC-RCI PE Colon PE Colon PE Colon IAPR 184.6 689.0 0.83 0.70 0.34 0.26 EMDD 903.5 16614.0 0.67 0.80 0.17 0.42 CH-FD 97.2 7.9 0.86 0.90 0.50 0.69 FD 0.19 0.4 0.74 0.88 0.44 0.57 Execution times for all the methods tested are shown in Table 1. As expected, the computational cost is the cheapest for the traditional non-MIL based FD. Among MIL algorithms, for the PE data, CH-FD was roughly 2-times and 9-times as fast than IAPR and EMDD respectively, and for the much larger colon dataset was roughly 85-times and 2000-times faster, respectively(see Table 1). 0 10 20 30 40 50 60 0 0.1 0.2 0.3 0.4 0.5 0.6 0.7 0.8 0.9 1 FP/Patient Sensitivity EMDD IAPR CH−FD FD 0 10 20 30 40 50 60 0 0.1 0.2 0.3 0.4 0.5 0.6 0.7 0.8 0.9 1 False positive per volume Sensitivity CH−FD EMDD IAPR FD Figure 2: ROC curves obtained for (left) PE Testing data and (right) COLON testing Data 3.2 Experiments on Benchmark Datasets We compare CH-FD with several state-of-the-art MIL algorithms on 5 benchmark MIL datasets: 2 Musk datasets [9] and 3 Image Annotation datasets [15]. Each of these datasets contain both positive and negative bags. CH-FD (and MICA) use just the positive bag information and ignore the negative bag information, in effect, treating each negative instance as a separate bag. All the other MIL algorithms use both the positive and negative bag information. The Musk datasets contains feature vectors describing the surfaces of low-energy shapes from molecules. Each feature vector has 166 features. The goal is to differentiate molecules that smell ”musky” from the rest of the molecules. Approximately half of the molecules are known to smell musky. There are two musk datasets. MUSK1 contains 92 molecules with a total of 476 instances. MUSK2 contains 102 molecules with a total of 6598 instances. 72 of the molecules are shared between two datasets but MUSK2 dataset contain more instances for the shared molecules. The Image Annotation data is composed of three different categories, namely Tiger, Elephant, Fox. Each dataset has 100 positive bags and 100 negative bags. We set Φ(w) = ν |λ|. For the musk datasets our results are based on a Radial Basis Function (RBF) kernel K(xi, xj) = exp(−σ ∥x −y∥2). The kernel space is assumed to be spanned by all the datapoints in MUSK1 dataset and a subset of the datapoints in MUSK2 dataset (one tenth of the original training set is randomly selected for this purpose). The width of the kernel function and ν are tuned over a discrete set of five values each to optimize the 10-fold Cross Validation performance. For the Image Annotation data we use the linear version of our algorithm. We follow the benchmark experiment design and report average accuracy of 10 runs of 10-fold Cross Validation Table 2: Average accuracy on Benchmark Datasets. The number in parenthesis represents the relative rank of each of the algorithms (performance-wise) in the corresponding dataset Datasets MUSK1 MUSK2 Elephant Tiger Fox Average Rank CH-FD 88.8 (2) 85.7 (2) 82.4 (2) 82.2 (2) 60.4 (2) 2 IAPR 87.2 (5) 83.6 (6) - (-) - (-) - (-) 5.5 DD 88.0 (3) 84.0 (5) - (-) - (-) - (-) 4 EMDD 84.8 (6) 84.9 (3) 78.3 (5) 72.1 (5) 56.1 (5) 4.8 mi-SVM 87.4 (4) 83.6 (6) 82.2 (3) 78.4 (4) 58.2 (3) 4 MI-SVM 77.9 (8) 84.3 (4) 81.4 (4) 84.0 (1) 57.8 (4) 4.2 MI-NN 88.9 (1) 82.5 (7) - (-) - (-) - (-) 4 MICA 84.4 (7) 90.5 (1) 82.5 (1) 82.0(3) 62.0(1) 3.25 in Table 2. Results for other MIL algorithms from the literature are also reported in the same table. Iterated Discriminant APR (IAPR), Diverse Density (DD) [16], Expectation-Maximization Diverse Density (EM-DD) [8], Maximum Bag Margin Formulation of SVM (mi-SVM, MI-SVM) [15], Multi Instance Neural Networks (MI-NN) [17] are the techniques considered in this experiment for comparison purposes. Results for mi-SVM, MI-SVM and EM-DD are taken from [15]. Table 2 shows that CH-FD is comparable to other techniques on all datasets, even though it ignores the negative bag information. Furthermore, CH-FD appears to be the most stable of the algorithms, at least on these 5 datasets, achieving the most consistent performance as indicated by the ”Average Rank” column. We believe that this stable behavior of our algorithm is due in part because it converges to global solutions avoiding the local minima problem. 4 Discussions Relationship to previous literature on MIL: The Multiple Instance Learning problem described in this paper has been studied widely in the literature [9, 15, 16, 17, 8]. The convex-hull idea presented in this paper to represent each bag is similar in nature to the one presented in [1]. However in contrast with [1] and many other approaches in the literature [9, 15, 17] our formulation leads to a strongly convex minimization problem that converges to a unique minimizer. Since our algorithm considers each negative instance as an individual bag, it is complexity is square proportional to the number of positive instances only which makes it scalable to large datasets with large number of negative examples. Principal contributions of the paper: This paper makes three principal contributions. First, we have identified the need for multiple-instance learning in CAD applications and described the spatial proximity based inter-sample correlations in the label noise for classifier design in this setting. Second, building on an intuitive convex-relaxation of the original MIL problem, this paper presents a new approach to multiple-instance learning. In particular, we dramatically improve the run time by replacing a large set of discrete constraints (at least one instance in each bag has to be correctly classified) with infinite but continuous sets of constraints (at least one convex combination of the original instances in every bag has to be correctly classified). Further, the proposed idea for achieving convexity in the objective function of the training algorithm alleviates the problems of local maxima that occurs in some of the previous MIL algorithms, and often improves the classification accuracy on many practical datasets. Third, we present a practical implementation of this idea in the form of a simple but efficient alternate-optimization algorithm for Convex Hull based Fisher’s Discriminant. In our benchmark experiments, the resulting algorithm achieves accuracy that is comparable to the current state of the art, but at a significantly lower run time (typically several orders of magnitude speed ups were observed). Related work: Note that as the distance between candidate ROI increases, the correlations between their features and labels decreases. In another study, we model the spatial-correlation among neighboring samples. Thus we jointly classify entire batches of correlated samples both during training and testing. Instead of classifying each sample independently, we use this spatial information along with the features of each candidate to simultaneously classify all the candidate ROIs for a single patient/volume in a joint operation [18]. References [1] O. L. Mangasarian and E. W. Wild. Multiple instance classification via successive linear programming. Technical Report 05-02, Data Mining Institute, Univ of Wisconsin, Madison, 2005. [2] V. N. Vapnik. The Nature of Statistical Learning Theory. Springer, New York, 1995. [3] O. L. Mangasarian. Generalized support vector machines. In A. Smola, P. Bartlett, B. Sch¨olkopf, and D. Schuurmans, editors, Advances in Large Margin Classifiers, pages 135–146, Cambridge, MA, 2000. MIT Press. ftp://ftp.cs.wisc.edu/math-prog/tech-reports/98-14.ps. [4] Sebastian Mika, Gunnar R¨atsch, and Klaus-Robert M¨uller. A mathematical programming approach to the kernel fisher algorithm. In NIPS, pages 591–597, 2000. [5] J. Bezdek and R. Hathaway. Convergence of alternating optimization. Neural, Parallel Sci. Comput., 11(4):351–368, 2003. [6] J. Warga. Minimizing certain convex functions. Journal of SIAM on Applied Mathematics, 11:588–593, 1963. [7] Y.-J. Lee and O. L. Mangasarian. RSVM: Reduced support vector machines. Technical Report 00-07, Data Mining Institute, Computer Sciences Department, University of Wisconsin, Madison, Wisconsin, July 2000. Proceedings of the First SIAM International Conference on Data Mining, Chicago, April 5-7, 2001, CD-ROM Proceedings. ftp://ftp.cs.wisc.edu/pub/dmi/tech-reports/00-07.ps. [8] Q. Zhang and S. Goldman. Em-dd: An improved multiple-instance learning technique. In Advances in Neural Information Processing Systems, volume 13. The MIT Press, 2001. [9] Thomas G. Dietterich, Richard H. Lathrop, and Tomas Lozano-Perez. Solving the multiple instance problem with axis-parallel rectangles. Artificial Intelligence, 89(1-2):31–71, 1997. [10] Z. Zhou and M. Zhang. Ensembles of multi-instance learners. In Proceedings of the 14th European Conference on Machine Learning, LNAI 2837, pages 492–502, Cavtat-Dubrovnik, Croatia, 2003. Springer. [11] M. Quist, H. Bouma, C. Van Kuijk, O. Van Delden, and F. Gerritsen. Computer aided detection of pulmonary embolism on multi-detector ct, 2004. [12] C. Zhou, L. M. Hadjiiski, B. Sahiner, H.-P. Chan, S. Patel, P. Cascade, E. A. Kazerooni, and J. Wei. Computerized detection of pulmonary embolism in 3D computed tomographic (CT) images: vessel tracking and segmentation techniques. In Medical Imaging 2003: Image Processing. Edited by Sonka, Milan; Fitzpatrick, J. Michael. Proceedings of the SPIE, Volume 5032, pp. 1613-1620 (2003)., pages 1613–1620, May 2003. [13] D. Jemal, R. Tiwari, T. Murray, A. Ghafoor, A. Saumuels, E. Ward, E. Feuer, and M. Thun. Cancer statistics, 2004. [14] L. Bogoni, P. Cathier, M. Dundar, A. Jerebko, S. Lakare, J. Liang, S. Periaswamy, M. Baker, and M. Macari. Cad for colonography: A tool to address a growing need. British Journal of Radiology, 78:57–62, 2005. [15] S. Andrews, I. Tsochantaridis, and T. Hofmann. Support vector machines for multiple-instance learning. In S. Thrun S. Becker and K. Obermayer, editors, Advances in Neural Information Processing Systems 15, pages 561–568. MIT Press, Cambridge, MA, 2003. [16] Oded Maron and Tom´as Lozano-P´erez. A framework for multiple-instance learning. In Michael I. Jordan, Michael J. Kearns, and Sara A. Solla, editors, Advances in Neural Information Processing Systems, volume 10. The MIT Press, 1998. [17] J. Ramon and L. De Raedt. Multi instance neural networks, 2000. [18] V. Vural, G. Fung, B. Krishnapuram, J. G. Dy, and R. B. Rao. Batch classification with applications in computer aided diagnosis. In Proceedings of the ECML’06, Berlin, Germany, 2006.
2006
96
3,121
A selective attention multi–chip system with dynamic synapses and spiking neurons Chiara Bartolozzi Institute of neuroinformatics UNI-ETH Zurich Wintherthurerstr. 190, 8057, Switzerland chiara@ini.phys.ethz.ch Giacomo Indiveri Institute of neuroinformatics UNI-ETH Zurich Wintherthurerstr. 190, 8057, Switzerland giacomo@ini.phys.ethz.ch Abstract Selective attention is the strategy used by biological sensory systems to solve the problem of limited parallel processing capacity: salient subregions of the input stimuli are serially processed, while non–salient regions are suppressed. We present an mixed mode analog/digital Very Large Scale Integration implementation of a building block for a multi–chip neuromorphic hardware model of selective attention. We describe the chip’s architecture and its behavior, when its is part of a multi–chip system with a spiking retina as input, and show how it can be used to implement in real-time flexible models of bottom-up attention. 1 Introduction Biological systems interact with the outside world in real-time, reacting to complex stimuli in few milliseconds. This is a highly demanding computational task, that requires either very high speed sequential computation or fast massively parallel processing. Real systems however have to cope with limited resources. Biological systems solve this issue by sequentially allocating computational resources on small regions of the input stimuli, for analyzing them in parallel, with a strategy known as Selective Attention, that takes advantage of both sequential and parallel processing. A wise approach to the design of artificial systems that need to interact with the real world in real time is to take inspiration from the strategies developed by biological systems. The psychophysical study of selective attention distinguished two complementary strategies for the selection of salient regions of the input stimuli, one depending on the physical (bottom-up) characteristic of the input, the other depending on its semantic (top-down) and task related properties. Much of the applied research has focused on modeling the bottom-up aspect of selective attention. As a consequence, several software [1, 2, 3] and hardware models [4, 5, 6, 7] based on the concept of saliency map, winner-takes-all (WTA) competition, and inhibition of return (IOR) [8] have been proposed. We focus on HW implementation of such selective attention systems on compact, low-power, analogue VLSI chips. Previous implementations focused on either very abstract object/attention WTA architectures with dedicated single-chip solutions [6], or on very detailed models of spike-based competitive networks [9]; we propose a multi-chip solution that combines the advantages of spikebased solutions for communicating signals across chips, with a dedicated and compact WTA architecture for implementing competition among a large number of elements in parallel. Specifically we present a new chip with 32 × 32 cells, that can sequentially select the most active regions of the input stimuli, the Selective Attention Chip (SAC). It is a transceiver chip employing a spike-based representation (AER, Address-Event-Representation [10]). Its input signals topographically encode the local conspicuousness of the input over the entire visual scene. Its output signals can be used in real time to drive motors of active vision systems or to select subregions of images captured from wide field-of-view cameras. The AER communication protocol and the 2D structure of the network make it particularly suitable for processing signals from silicon spiking retinas. The basic circuits of the chip we present have already been proposed in [11]. The chip we present here comprises improvements in the basic circuits, and additional dynamic components that will be described in Section 3. The chip’s improvements over previous implementations arise from the design of new AER interfacing circuits, both for the input decoding stage and the output arbitration, and new synaptic circuits: the Diff-Pair Integrator (DPI) described in [12]. The DPI is a log-domain compact circuit that reproduces the time course of biological post-synaptic currents. Besides having easily and independently tunable gain and time constant, it produces mean currents proportional to the input frequencies, more suitable for the input of the current-mode WTA cell employed as core computational unit in the SAC. This new circuit allows the analysis of the properties of the chip, including the effect of the introduction of additional dynamic properties to the circuits, such as Short-Term Depression (STD) [13, 14] in the input synapses and spike frequency adaptation in the output Integrate and Fire (I&F) neurons [15]. In the next sections we describe the chip’s architecture and present experimental results from a two chip system comprising the SAC and a silicon “transient” retina that produces spikes in response to temporal changes in scene contrast. 2 The Selective Attention Chip We fabricated a prototype of the SAC in standard AMS 0.35µm CMOS technology. The chip comprises an array of 32 × 32 pixels, each one is 90 × 45µm2 and the whole chip with AER digital interface and pads occupies an area of 10mm2. The basic functionality of the SAC is to scan the input in order of decreasing activity. The chip input and output signals are asynchronous digital pulses (spikes) that use the Address Event Representation (AER) [16]. The input spikes to each pixel are translated into a current (see Iex of Fig.1) by a circuit that models the dynamics of a biological excitatory synapse [12]. A current mode hysteretic Winner–Take–All (WTA) competitive cell compares the input currents of each pixel; the winning cell sources a constant current to the correspondent output leaky Integrate and Fire (I&F) neuron [15]. The spiking neuron in the array then signals which pixel is winning the competition for saliency, and therefore the pixel that receives the highest input frequency. The output spikes of the I&F neuron are sent also to a feedback inhibitory synapse (see Fig. 1), that subtracts current (Iior) from the input node of the WTA cell; the net input current to the winner pixel is then decreased, and a new pixel can eventually be selected. This self-inhibition mechanism is known as Inhibition of Return (IOR) and allows the network to select sequentially the most salient regions of input images, reproducing the attentional scan path. Excitatory Synapse Inhibitory Synapse Hysteretic WTA Output I&F Neuron A E R A E R + AER Input AER Output + Iex Iior IOR To nearest neighbors To nearest neighbors Figure 1: Block diagram of a basic cell of the 32 × 32 selective attention architecture. This basic functionality of the SAC is augmented by the introduction of dynamic properties such as Short-Term Depression (STD) in the input synapses and spike frequency adaptation in the output neuron. STD is a property observed in physiological recordings[17] of synapses that decrease their efficacy when they receive consecutive stimulations. In our synapse the effect of a single spike on the integrated current depends on a voltage, the synaptic weight. The initial weight of the synapse is set by an external voltage reference, then as the synapse receives spikes the effective synaptic weight decreases. STD is a local gain control, that increases sensitivity to changes in the input and makes the synapse insensitive to constant stimulation. Spiking frequency adaptation is another property of neurons that when stimulated with constant input decrease their output firing rate with time. The spiking frequency of the silicon I&F neuron is monotonic with its input current, the adaptation neuron’s mechanism decreases the neuron’s firing rate with time [15]. We exploit this property to decrease the output bandwidth of the SAC. The SAC has been designed with tunable parameters that allow to modify the strength of synaptic contributions, the dynamics of synaptic short term depression and of neuronal adaptation, as well as the spatial extent of competition and the dynamics of IOR. All these parameters enrich the dynamics of the network that can be exploited to model the complex selective attention scan path. 3 Multi–Chip Selective Attention System The SAC uses the asynchronous AER SCX (Silicon Cortex) protocol, that allows multiple AER chips to communicate using spikes, just like the cortex, and can be used in multi–chip systems, with multiple senders and multiple receivers [18, 19]. Using this representation the SAC can exchange data, while processing signals in parallel, in real time [20]. The communication protocol used and the SAC’s bidimensional architecture make it particularly suitable for processing visual inputs coming from artificial spiking retinas. We built a two chip system, connecting a silicon retina [21] to the SAC input. The retina is an AER asynchronous imager that responds to contrast variations, it has 64 × 64 pixels that respond to on and off transients. A dedicated PCI-AER board [18] connects the retina to the SAC, via a look-up table that maps the activity of the 64 × 64 pixels of the retina to the 32 × 32 pixels of the SAC. In this setup the mapping is linear grouping 4 retina pixels to 1 SAC pixel, more complex mappings, as for example the foveal mapping, will be tested in the future. The board allows also to monitor the activity of both chips on a Linux desktop. 4 Experimental Data We performed preliminary experiments with the two chips setup described in the previous section. We stimulated the retina with two black squares flashing at 6Hz on a white background, on a LCD screen, using the matlab PsychoToolbox [22] as shown in Fig. 2. In Fig. 3 we show the response of the two chips to this stimulus: each dot represents the mean firing rate of the correspondent pixel in the chips. The pixels of the retina that focus on the black squares are active and show a high mean firing rate, some other pixels in the array have spontaneous activity. To show the mapping between the retina and the SAC we performed a control experiment: we turned off the competition and the IOR and also we disabled STD and the neuronal adaptation, in this way all the pixels that receive an input activity will be active. All the pixels that receive the input from the pixels of the retina that we stimulate with the black squares are active, more over the spontaneous activity (noise) of the other pixels are ”cleaned”, thanks to the filtering property of the input synapses. In the next figures we show the response of the system to the stimulus described above, while changing the settings of the SAC. In all the figures the top and bottom boxes show raster plots, respectively of the retina and the SAC: each dot corresponds to a spike emitted by a pixel (or neuron) (y axis) at a certain time (x axis). The middle trace shows the voltage Vnet, that is proportional to the total input current (Iex −Iior of Fig. 1) to the WTA cell that receives input from one of the most active pixels of the retina. In Fig. 4(a) we show the same data of Fig. 3, the retina sends many spikes every time the black squares appear and disappear from the screen, the WTA input node, with this settings, receives only the excitatory current from the input synapse, as shown by the increase of the voltage Vnet in correspondence of the retinal spikes. Since in our control experiment there is no competition, all the stimulated pixels are active, as shown in the SAC raster plot. In Fig. 4(b) we show the effect of Figure 2: Multi-chip system: The retina (top-right box) is stimulated with an LCD screen, its output is sent to the SAC (bottom-right box) via the PCIAER board (bottom-left box). The activity of the two chips is monitored via the PCIAER board on a Linux desktop. Neuron X Neuron Y 10 20 30 40 50 60 10 20 30 40 50 60 (a) Neuron X Neuron Y 5 10 15 20 25 30 5 10 15 20 25 30 (b) Figure 3: Response of the two chips to an image. (a) The silicon retina is stimulated, via an LCD screen, with two flashing (6Hz) black squares on a white background (see Fig. 2). We show the mean firing output of each pixel of the retina. The pixels corresponding to the black squares in the image have higher firing rate than the others, some of the pixels of the retina are spontaneously firing at lower frequencies. (b) The activity of the retina is the input of the SAC: the 64 × 64 pixels of the retina are mapped with a ratio 4 : 1 to the 32 × 32 pixels of the SAC. We show the mean firing rate of the SAC pixels in response to the retinal stimulation, when the Winner-Takes-All competition is disabled. In this case the SAC output reflects the input, with some suppression of the noisy pixels due to the filtering properties of the input synaptic circuits. introducing spike frequency adaptation: in this case the output frequency of each neuron decreases, reducing the output bandwidth and the AER-bus traffic. In Fig. 5 we show the effect of competition and Inhibition of Return. When we turn on the WTA competition only one pixel is selected at any time, therefore only one neuron is firing, as shown in the raster plot of Fig. 5(a); on the node Vnet we can observe that when the correspondent neuron is winning there is an extra input current, because it doesn’t reset to its resting value when the synapse is not active. This positive current implements a form of self-excitation that gives hysteretic properties to the network dynamics, and stabilizes the WTA network. If we turn on the inhibitory synapse (Fig. 5(b)), as soon as the neuron starts to fire, 0 0.2 0.4 0.6 0.8 1 1.2 1.4 0 2000 4000 Neuron 0.2 0.4 0.6 0.8 1 1.2 1.4 2 2.2 Vnet (V) 0 0.2 0.4 0.6 0.8 1 1.2 1.4 0 500 1000 Time (sec) Neuron (a) 0 0.2 0.4 0.6 0.8 1 1.2 1.4 0 2000 4000 Neuron 0.2 0.4 0.6 0.8 1 1.2 1.4 2 2.2 Vnet (V) 0 0.2 0.4 0.6 0.8 1 1.2 1.4 0 500 1000 Time (sec) Neuron (b) Figure 4: Time response to black squares flashing on a white background: we use the same stimulation and setup described in Fig 3. The top figure shows the raster plot of the retina output, one dot corresponds to a spike produced by one pixel at a specific time. The retina produces events every time the squares appear on or disappear from the screen. The middle plot shows the voltage Vnet of the input node of the WTA cell correspondent to the synapse that receives input from one of the most active pixel of the retina. The bottom figure shows the raster plot of the SAC neurons. (a) We show the ”control” experiment (same as in Fig 3): the competition, IOR, and all the other features of the SAC are turned off, the output of the chip reproduces the input, with some suppression of the pixels that receive very low activity from the retina, thanks to the input synapses filtering properties. In the middle plot Vnet reflects the effect of the sole input current from the synapse, that integrates the spikes received from the correspondent pixel of the retina. In this case, since the lateral inhibitory connections are switched off, there is no competition and all the output I&F neurons correspondent to the stimulated input synapses are active. (b) We add spike frequency adaptation to the previous experiment settings, the output firing rate of the neurons is decreased, reducing the bandwidth of the SAC output. the inhibitory current decreases the total input current to the correspondent WTA cell: the voltage Vnet reflects this mechanism as it is reset to its resting value even before the input from the retina ceases. The WTA cell is then deselected and the output neuron stops firing, while another neuron is selected and starts firing, as shown in the SAC raster plot. The inhibitory synapse time constant is tunable and when it is slow the effect of inhibition lasts for hundreds of milliseconds after the I&F stopped firing, in this way we prevent that pixel to be reselected immediately and we can have scan path with many different pixels. 5 Conclusions In this paper we presented a neuromorphic device implementing a Winner–Take–All network comprising dynamic synapses and adaptive neurons. This device is designed to be a part of a multi–chip system for Selective Attention: via an AER communication system it can be interfaced to silicon spiking retinas and to software implementations of associative memories. We built a multi–chip system with the SAC and a silicon transient retina. The real time measurements allowed by the physical realization of the system are certainly a powerful method to explore the network behavior by changing its parameters. Preliminary experiments confirmed the basic functionality of the SAC and the robustness of the system; the analysis will be extended with the systematic study of STD, IOR, adaptation and lateral excitatory coupling among the nearby cells. References [1] L. Itti, E. Niebur, and C. Koch. A model of saliency-based visual attention for rapid scene analysis. IEEE Transactions on Pattern Analysis and Machine Intelligence, 20(11):1254–1259, 1998. [2] H. Bosch, R. Milanese, and A. Labbi. Object segmentation by attention-induced oscillations. In Proc. IEEE Int. Joint Conf. Neural Networks, volume 2, pages 1167–1171, 1998. 0 0.2 0.4 0.6 0.8 1 1.2 1.4 0 2000 4000 Neuron 0.2 0.4 0.6 0.8 1 1.2 1.4 2 2.2 Vnet (V) 0 0.2 0.4 0.6 0.8 1 1.2 1.4 0 500 1000 Time (sec) Neuron (a) 0 0.2 0.4 0.6 0.8 1 1.2 1.4 0 2000 4000 Neuron 0.2 0.4 0.6 0.8 1 1.2 1.4 2 2.2 Vnet (V) 0 0.2 0.4 0.6 0.8 1 1.2 1.4 0 500 1000 Time (sec) Neuron (b) Figure 5: Response of the system with WTA competition and Inhibition of Return. The setup, stimulus and figure content are the same as in Fig. 4. (a) We turn on the WTA competition, and the hysteretic self-excitation. The retina activity is unchanged, the node Vnet now reflects the input current from the synapse, and also the contribution of the hysteretic current: when the monitored pixel wins the competition for saliency a current is fed in the input node, and Vnet does not reset to its resting value when the synapse is not active. Now there is only one active neuron in the whole chip, when it does not win the competition for saliency the hysteretic current fades away and another neuron begins spiking. (b) We turn on the inhibitory synapse that implements the self-inhibition (IOR). We can observe the effect of the inhibitory current subtracted from the input node (see text) on Vnet, that with the same input as before sets back to its resting level much faster. The raster plot shows how this mechanism allows to deselect the current winner and select other inputs. [3] S. Baluja and D.A Pomerleau. Expectation-based selective attention for the visual monitoring and control of a robot vehicle. Robotics and Autonomous Systems Journal, 22:329–344, 1997. [4] V. Brajovic and T. Kanade. Computational sensor for visual tracking with attention. IEEE Journal of Solid State Circuits, 33(8):1199–1207, August 1998. [5] T. K. Horiuchi and C. Koch. Analog VLSI-based modeling of the primate oculomotor system. Neural Computation, 11(1):243–265, January 1999. [6] T. G. Morris, T. K. Horiuchi, and S. P. DeWeerth. Object-based selection within an analog VLSI visual attention system. IEEE Transactions on Circuits and Systems II, 45(12):1564–1572, 1998. [7] G. Indiveri. Modeling selective attention using a neuromorphic analog VLSI device. Neural Computation, 12(12):2857–2880, December 2000. [8] C. Koch and S Ullman. Shifts in selective visual-attention – towards the underlying neural circuitry. Human Neurobiology, 4(4):219–227, 1985. [9] E. Chicca. A Neuromorphic VLSI System for Modeling Spike–Based Cooperative Competitive Neural Networks. PhD thesis, ETH Z¨urich, Z¨urich, Switzerland, April 2006. [10] E. Chicca, A. M. Whatley, V. Dante, P. Lichtsteiner, T. Delbruck, P. Del Giudice, R. J. Douglas, and G. Indiveri. A multi-chip pulse-based neuromorphic infrastructure and its application to a model of orientation selectivity. IEEE Transactions on Circuits and Systems I, Regular Papers, 2006. (in press). [11] C. Bartolozzi and G. Indiveri. Selective attention implemented with dynamic synapses and integrate-andfire neurons. NeuroComputing, special issue on Brain Inspired Cognitive Systems, 2005. In press. [12] C. Bartolozzi and G. Indiveri. Silicon synaptic homeostasis. In Brain Inspired Cognitive Systems 2006, 2006. [13] C. Rasche and R. Hahnloser. Silicon synaptic depression. Biological Cybernetics, 84(1):57–62, 2001. [14] M Boegerhausen, P Suter, and S.-C. Liu. Modeling short-term synaptic depression in silicon. Neural Computation, 15(2):331–348, Feb 2003. [15] G. Indiveri. A low-power adaptive integrate-and-fire neuron circuit. In Proc. IEEE International Symposium on Circuits and Systems, pages IV–820–IV–823. IEEE, May 2003. [16] M. Mahowald. An Analog VLSI System for Stereoscopic Vision. Kluwer, Boston, MA, 1994. [17] L. Abbott, K. Sen, J. Varela, and S. Nelson. Synaptic depression and cortical gain control. Science, 275(5297):220–223, 1997. [18] V. Dante and P. Del Giudice. The PCI-AER interface board. In A. Cohen, R. Douglas, T. Horiuchi, G. Indiveri, C. Koch, T. Sejnowski, and S. Shamma, editors, 2001 Telluride Workshop on Neuromorphic Engineering Report, pages 99–103, 2001. http://www.ini.unizh.ch/telluride/previous/report01.pdf. [19] S. R. Deiss, R. J. Douglas, and A. M. Whatley. A pulse-coded communications infrastructure for neuromorphic systems. In W. Maass and C. M. Bishop, editors, Pulsed Neural Networks, chapter 6, pages 157–78. MIT Press, 1998. [20] G. Indiveri. A neuromorphic VLSI device for implementing 2-D selective attention systems. IEEE Transactions on Neural Networks, 12(6):1455–1463, November 2001. [21] P. Lichtsteiner, C. Posch, and T. Delbr¨uck. A 128×128 120dB 30mW asynchronous vision sensor that responds to relative intensity change. In 2006 IEEE ISSCC Digest of Technical Papers, pages 508–509. IEEE, 2006. [22] D.H. Brainard. The psychophisics toolbox. Spatial Vision, 10:433–436, 1997. Acknowledgments This work was inspired by interactions with the participants of the Neuromorphic Engineering Workshop (http://www.ini.unizh.ch/telluride) and was supported by the EU grant ALAVLSI (IST–2001–38099) and DAISY (FP6-2005-015803), and by the Italian CNR (Centro Nazionale delle Ricerche) fellowship 203.22. The silicon retina was provided by Patrick Lichtsteiner. We further wish to thank Matthias Oster and Dylan Muir for providing AER software tools.
2006
97
3,122
Real-time adaptive information-theoretic optimization of neurophysiology experiments∗ Jeremy Lewi† School of Bioengineering Georgia Institute of Technology jlewi@gatech.edu Robert Butera School of Electrical and Computer Engineering Georgia Institute of Technology rbutera@ece.gatech.edu Liam Paninski ‡ Department of Statistics Columbia University liam@stat.columbia.edu Abstract Adaptively optimizing experiments can significantly reduce the number of trials needed to characterize neural responses using parametric statistical models. However, the potential for these methods has been limited to date by severe computational challenges: choosing the stimulus which will provide the most information about the (typically high-dimensional) model parameters requires evaluating a high-dimensional integration and optimization in near-real time. Here we present a fast algorithm for choosing the optimal (most informative) stimulus based on a Fisher approximation of the Shannon information and specialized numerical linear algebra techniques. This algorithm requires only low-rank matrix manipulations and a one-dimensional linesearch to choose the stimulus and is therefore efficient even for high-dimensional stimulus and parameter spaces; for example, we require just 15 milliseconds on a desktop computer to optimize a 100-dimensional stimulus. Our algorithm therefore makes real-time adaptive experimental design feasible. Simulation results show that model parameters can be estimated much more efficiently using these adaptive techniques than by using random (nonadaptive) stimuli. Finally, we generalize the algorithm to efficiently handle both fast adaptation due to spike-history effects and slow, non-systematic drifts in the model parameters. Maximizing the efficiency of data collection is important in any experimental setting. In neurophysiology experiments, minimizing the number of trials needed to characterize a neural system is essential for maintaining the viability of a preparation and ensuring robust results. As a result, various approaches have been developed to optimize neurophysiology experiments online in order to choose the “best” stimuli given prior knowledge of the system and the observed history of the cell’s responses. The “best” stimulus can be defined a number of different ways depending on the experimental objectives. One reasonable choice, if we are interested in finding a neuron’s “preferred stimulus,” is the stimulus which maximizes the firing rate of the neuron [1, 2, 3, 4]. Alternatively, when investigating the coding properties of sensory cells it makes sense to define the optimal stimulus in terms of the mutual information between the stimulus and response [5]. Here we take a system identification approach: we define the optimal stimulus as the one which tells us the most about how a neural system responds to its inputs [6, 7]. We consider neural systems in †http://www.prism.gatech.edu/∼gtg120z ‡http://www.stat.columbia.edu/∼liam which the probability p(rt|{⃗xt, ⃗xt−1, ..., ⃗xt−tk}, {rt−1, . . . , rt−ta}) of the neural response rt given the current and past stimuli {⃗xt, ⃗xt−1, ..., ⃗xt−tk}, and the observed recent history of the neuron’s activity, {rt−1, . . . , rt−ta}, can be described by a model p(rt|{⃗xt}, {rt−1}, ⃗θ), specified by a finite vector of parameters ⃗θ. Since we estimate these parameters from experimental trials, we want to choose our stimuli so as to minimize the number of trials needed to robustly estimate ⃗θ. Two inconvenient facts make it difficult to realize this goal in a computationally efficient manner: 1) model complexity — we typically need a large number of parameters to accurately model a system’s response p(rt|{⃗xt}, {rt−1}, ⃗θ); and 2) stimulus complexity — we are typically interested in neural responses to stimuli ⃗xt which are themselves very high-dimensional (e.g., spatiotemporal movies if we are dealing with visual neurons). In particular, it is computationally challenging to 1) update our a posteriori beliefs about the model parameters p(⃗θ|{rt}, {⃗xt}) given new stimulus-response data, and 2) find the optimal stimulus quickly enough to be useful in an online experimental context. In this work we present methods for solving these problems using generalized linear models (GLM) for the input-output relationship p(rt|{⃗xt}, {rt−1}, ⃗θ) and certain Gaussian approximations of the posterior distribution of the model parameters. Our emphasis is on finding solutions which scale well in high dimensions. We solve problem (1) by using efficient rank-one update methods to update the Gaussian approximation to the posterior, and problem (2) by a reduction to a highly tractable onedimensional optimization problem. Simulation results show that the resulting algorithm produces a set of stimulus-response pairs which is much more informative than the set produced by random sampling. Moreover, the algorithm is efficient enough that it could feasibly run in real-time. Neural systems are highly adaptive and more generally nonstatic. A robust approach to optimal experimental design must be able to cope with changes in ⃗θ. We emphasize that the model framework analyzed here can account for three key types of changes: stimulus adaptation, spike rate adaptation, and random non-systematic changes. Adaptation which is completely stimulus dependent can be accounted for by including enough stimulus history terms in the model p(rt|{⃗xt, ..., ⃗xt−tk}, {rt−1, ..., rt−ta}). Spike-rate adaptation effects, and more generally spike history-dependent effects, are accounted for explicitly in the model (1) below. Finally, we consider slow, non-systematic changes which could potentially be due to changes in the health, arousal, or attentive state of the preparation. Methods We model a neuron as a point process whose conditional intensity function (instantaneous firing rate) is given as the output of a generalized linear model (GLM) [8, 9]. This model class has been discussed extensively elsewhere; briefly, this class is fairly natural from a physiological point of view [10], with close connections to biophysical models such as the integrate-and-fire cell [9], and has been applied in a wide variety of experimental settings [11, 12, 13, 14]. The model is summarized as: λt = E(rt) = f  X i tk X l=1 ki,t−lxi,t−l + ta X j=1 ajrt−j  (1) In the above summation the filter coefficients ki,t−l capture the dependence of the neuron’s instantaneous firing rate λt on the ith component of the vector stimulus at time t −l, ⃗xt−l; the model therefore allows for spatiotemporal receptive fields. For convenience, we arrange all the stimulus coefficients in a vector, ⃗k, which allows for a uniform treatment of the spatial and temporal components of the receptive field. The coefficients aj model the dependence on the observed recent activity r at time t −j (these terms may reflect e.g. refractory effects, burstiness, firing-rate adaptation, etc., depending on the value of the vector ⃗a [9]). For convenience we denote the unknown parameter vector as ⃗θ = {⃗k;⃗a}. The experimental objective is the estimation of the unknown filter coefficients, ⃗θ, given knowledge of the stimuli, ⃗xt, and the resulting responses rt. We chose the nonlinear stage of the GLM, the link function f(), to be the exponential function for simplicity. This choice ensures that the log likelihood of the observed data is a concave function of ⃗θ [9]. Representing and updating the posterior. As emphasized above, our first key task is to efficiently update the posterior distribution of ⃗θ after t trials, p(⃗θt|⃗xt, rt), as new stimulus-response pairs are trial 0 info. max. random trial 100 trial 500 trial 2500 trial 5000 θ true −1 0 1 (a) 0 1000 2000 3000 4000 5000 −500 0 500 1000 1500 2000 Iteration Entropy random info. max. (b) 0 200 400 600 0.001 0.01 0.1 Dimensionality Time(Seconds) total time diagonalization posterior update 1d line Search (c) Figure 1: A) Plots of the estimated receptive field for a simulated visual neuron. The neuron’s receptive field ⃗θ has the Gabor structure shown in the last panel (spike history effects were set to zero for simplicity here, ⃗a = 0). The estimate of ⃗θ is taken as the mean of the posterior, ⃗µt. The images compare the accuracy of the estimates using information maximizing stimuli and random stimuli. B) Plots of the posterior entropies for ⃗θ in these two cases; note that the information-maximizing stimuli constrain the posterior of ⃗θ much more effectively than do random stimuli. C) A plot of the timing of the three steps performed on each iteration as a function of the dimensionality of ⃗θ. The timing for each step was well-fit by a polynomial of degree 2 for the diagonalization, posterior update and total time, and degree 1 for the line search. The times are an average over many iterations. The error-bars for the total time indicate ±1 std. observed. (We use ⃗xt and rt to abbreviate the sequences {⃗xt, . . . , ⃗x0} and {rt, . . . , r0}.) To solve this problem, we approximate this posterior as a Gaussian; this approximation may be justified by the fact that the posterior is the product of two smooth, log-concave terms, the GLM likelihood function and the prior (which we assume to be Gaussian, for simplicity). Furthermore, the main theorem of [7] indicates that a Gaussian approximation of the posterior will be asymptotically accurate. We use a Laplace approximation to construct the Gaussian approximation of the posterior, p(⃗θt|⃗xt, rt): we set ⃗µt to the peak of the posterior (i.e. the maximum a posteriori (MAP) estimate of ⃗θ), and the covariance matrix Ct to the negative inverse of the Hessian of the log posterior at ⃗µt. In general, computing these terms directly requires O(td2 + d3) time (where d = dim(⃗θ); the time-complexity increases with t because to compute the posterior we must form a product of t likelihood terms, and the d3 term is due to the inverse of the Hessian matrix), which is unfortunately too slow when t or d becomes large. Therefore we further approximate p(⃗θt−1|⃗xt−1, rt−1) as Gaussian; to see how this simplifies matters, we use Bayes to write out the posterior: log p(⃗θ|rt,⃗xt) = −1 2(⃗θ −⃗µt−1)T C−1 t−1(⃗θ −⃗µt−1) + −exp  {⃗xt; rt−1}T ⃗θ  (2) + rt{⃗xt; rt−1}T ⃗θ + const d log p(⃗θ|rt,⃗xt) d⃗θ = −(⃗θ −⃗µt−1)T C−1 t−1 +  −exp({⃗xt; rt−1}T ⃗θ) + rt  {⃗xt; rt−1}T d2 log p(⃗θ|rt,⃗xt) dθidθj = −C−1 t−1 −exp({⃗xt; rt−1}T ⃗θ){⃗xt; rt−1}{⃗xt; rt−1}T (3) Now, to update µt we only need to find the peak of a one-dimensional function (as opposed to a d-dimensional function); this follows by noting that that the likelihood only varies along a single direction, {⃗xt; rt−1}, as a function of ⃗θ. At the peak of the posterior, µt, the first term in the gradient must be parallel to {⃗xt; rt−1} because the gradient is zero. Since Ct−1 is non-singular, µt −⃗µt−1 must be parallel to Ct−1{⃗xt; rt−1}. Therefore we just need to solve a one dimensional problem now to determine how much the mean changes in the direction Ct−1{⃗xt; rt−1}; this requires only O(d2) time. Moreover, from the second derivative term above it is clear that computing Ct requires just a rank-one matrix update of Ct−1, which can be evaluated in O(d2) time via the Woodbury matrix lemma. Thus this Gaussian approximation of p(⃗θt−1|⃗xt−1, rt−1) provides a large gain in efficiency; our simulations (data not shown) showed that, despite this improved efficiency, the loss in accuracy due to this approximation was minimal. Deriving the (approximately) optimal stimulus. To simplify the derivation of our maximization strategy, we start by considering models in which the firing rate does not depend on past spiking, so ⃗θ = {⃗k}. To choose the optimal stimulus for trial t+1, we want to maximize the conditional mutual information I(⃗θ; rt+1|⃗xt+1,⃗xt, rt) = H(⃗θ|⃗xt, rt) −H(⃗θ|⃗xt+1, rt+1) (4) with respect to the stimulus ⃗xt+1. The first term does not depend on ⃗xt+1, so maximizing the information requires minimizing the conditional entropy H(⃗θ|⃗xt+1, rt+1) = X rt+1 p(rt+1|⃗xt+1) Z −p(⃗θ|rt+1,⃗xt+1) log p(⃗θ|rt+1,⃗xt+1)d⃗θ = Ert+1|⃗xt+1 log det[Ct+1] + const. (5) We do not average the entropy of p(⃗θ|rt+1,⃗xt+1) over ⃗xt+1 because we are only interested in the conditional entropy for the particular ⃗xt+1 which will be presented next. The equality above is due to our Gaussian approximation of p(⃗θ|⃗xt+1, rt+1). Therefore, we need to minimize Ert+1|⃗xt+1 log det[Ct+1] with respect to ⃗xt+1 . Since we set Ct+1 to be the negative inverse Hessian of the log-posterior, we have: Ct+1 = C−1 t + Jobs(rt+1, ⃗xt+1) −1 , (6) Jobs is the observed Fisher information. Jobs(rt+1, ⃗xt+1) = −∂2 log p(rt+1|ε = ⃗xt t+1⃗θ)/∂ε2 ⃗xt+1⃗xt t+1 (7) Here we use the fact that for the GLM, the likelihood depends only on the dot product, ε = ⃗xt t+1⃗θ. We can use the Woodbury lemma to evaluate the inverse: Ct+1 = Ct  I + D(rt+1, ε)(1 −D(rt+1, ε)⃗xt t+1Ct⃗xt+1)−1⃗xt+1⃗xt t+1Ct  (8) where D(rt+1, ε) = ∂2 log p(rt+1|ε)/∂ε2. Using some basic matrix identities, log det[Ct+1] = log det[Ct] −log(1 −D(rt+1, ε)⃗xt t+1Ct⃗xt+1) (9) = log det[Ct] + D(rt+1, ε)⃗xt t+1Ct⃗xt+1 + o(D(rt+1, ε)⃗xt t+1Ct⃗xt+1) (10) Ignoring the higher order terms, we need to minimize Ert+1|⃗xt+1D(rt+1, ε)⃗xt t+1Ct⃗xt+1. In our case, with f(⃗θt⃗xt+1) = exp(⃗θt⃗xt+1), we can use the moment-generating function of the multivariate info. max. Trial 1 400 800 i 1 50 i.i.d −2 0 2 i 1 50 (a) info. max. i 1 10 i.i.d i 1 10 −10−7 −10−4 −10−1 (b) 1 100 −2 0 2 ki 1 10 −0.05 0 0.05 i ai (c) Figure 2: A comparison of parameter estimates using information-maximizing versus random stimuli for a model neuron whose conditional intensity depends on both the stimulus and the spike history. The images in the top row of A and B show the MAP estimate of ⃗θ after each trial as a row in the image. Intensity indicates the value of the coefficients. The true value of ⃗θ is shown in the second row of images. A) The estimated stimulus coefficients, ⃗k. B) The estimated spike history coefficients, ⃗a. C) The final estimates of the parameters after 800 trials: dashed black line shows true values, dark gray is estimate using information maximizing stimuli, and light gray is estimate using random stimuli. Using our algorithm improved the estimates of ⃗k and ⃗a. Gaussian p(⃗θ|⃗xt, rt) to evaluate this expectation. After some algebra, we find that to maximize I(⃗θ; rt+1|⃗xt+1,⃗xt, rt), we need to maximize F(⃗xt+1) = exp(⃗xT t+1⃗µt) exp(1 2⃗xT t+1Ct⃗xt+1)⃗xT t+1Ct⃗xt+1. (11) Computing the optimal stimulus. For the GLM the most informative stimulus is undefined, since increasing the stimulus power ||⃗xt+1||2 increases the informativeness of any putatively “optimal” stimulus. To obtain a well-posed problem, we optimize the stimulus under the usual power constraint ||⃗xt+1||2 ≤e < ∞. We maximize Eqn. 11 under this constraint using Lagrange multipliers and an eigendecomposition to reduce our original d-dimensional optimization problem to a onedimensional problem. Expressing Eqn. 11 in terms of the eigenvectors of Ct yields: F(⃗xt+1) = exp( X i uiyi + 1 2 X i ciy2 i ) X i ciy2 i (12) = g( X i uiyi)h( X i ciy2 i ) (13) where ui and yi represent the projection of ⃗µt and ⃗xt+1 onto the ith eigenvector and ci is the corresponding eigenvalue. To simplify notation we also introduce the functions g() and h() which are monotonically strictly increasing functions implicitly defined by Eqn. 12. We maximize F(⃗xt+1) by breaking the problem into an inner and outer problem by fixing the value of P i uiyi and maximizing h() subject to that constraint. A single line search over all possible values of P i uiyi will then find the global maximum of F(.). This approach is summarized by the equation: max ⃗y:||⃗y||2=e F(⃗y) = max b  g(b) · h max ⃗y:||⃗y||2=e,⃗yt⃗u=b h( X i ciy2 i ) i Since h() is increasing, to solve the inner problem we only need to solve: max ⃗y:||⃗y||2=e,⃗yt⃗u=b X i ciy2 i (14) This last expression is a quadratic function with quadratic and linear constraints and we can solve it using the Lagrange method for constrained optimization. The result is an explicit system of true θ θi 1 100 info. max. θi 1 100 info. max. no diffusion θi 1 100 random θi trial 1 100 1 400 800 −0.6 −0.4 −0.2 0 0.2 0.4 0.6 0.8 1 (a) −1 0 1 Trial 0 θi −1 0 1 Trial 200 θi 20 40 60 80 100 −1 0 1 Trial 400 θi i random info. max. θ true (b) 0 200 400 600 800 150 200 250 Iteration Entropy random info. max. (c) Figure 3: Estimating the receptive field when ⃗θ is not constant. A) The posterior means ⃗µt and true ⃗θt plotted after each trial. ⃗θ was 100 dimensional, with its components following a Gabor function. To simulate nonsystematic changes in the response function, the center of the Gabor function was moved according to a random walk in between trials. We modeled the changes in ⃗θ as a random walk with a white covariance matrix, Q, with variance .01. In addition to the results for random and information-maximizing stimuli, we also show the ⃗µt given stimuli chosen to maximize the information under the (mistaken) assumption that ⃗θ was constant. Each row of the images plots ⃗θ using intensity to indicate the value of the different components. B) Details of the posterior means ⃗µt on selected trials. C) Plots of the posterior entropies as a function of trial number; once again, we see that information-maximizing stimuli constrain the posterior of ⃗θt more effectively. equations for the optimal yi as a function of the Lagrange multiplier λ1. yi(λ1) = e ||⃗y||2 ui 2(ci −λ1) (15) Thus to find the global optimum we simply vary λ1 (this is equivalent to performing a search over b), and compute the corresponding ⃗y(λ1). For each value of λ1 we compute F(⃗y(λ1)) and choose the stimulus ⃗y(λ1) which maximizes F(). It is possible to show (details omitted) that the maximum of F() must occur on the interval λ1 ≥c0, where c0 is the largest eigenvalue. This restriction on the optimal λ1 makes the implementation of the linesearch significantly faster and more stable. To summarize, updating the posterior and finding the optimal stimulus requires three steps: 1) a rankone matrix update and one-dimensional search to compute µt and Ct; 2) an eigendecomposition of Ct; 3) a one-dimensional search over λ1 ≥c0 to compute the optimal stimulus. The most expensive step here is the eigendecomposition of Ct; in principle this step is O(d3), while the other steps, as discussed above, are O(d2). Here our Gaussian approximation of p(⃗θt−1|⃗xt−1, rt−1) is once again quite useful: recall that in this setting Ct is just a rank-one modification of Ct−1, and there exist efficient algorithms for rank-one eigendecomposition updates [15]. While the worst-case running time of this rank-one modification of the eigendecomposition is still O(d3), we found the average running time in our case to be O(d2) (Fig. 1(c)), due to deflation which reduces the cost of matrix multiplications associated with finding the eigenvectors of repeated eigenvalues. Therefore the total time complexity of our algorithm is empirically O(d2) on average. Spike history terms. The preceding derivation ignored the spike-history components of the GLM model; that is, we fixed ⃗a = 0 in equation (1). Incorporating spike history terms only affects the optimization step of our algorithm; updating the posterior of ⃗θ = {⃗k;⃗a} proceeds exactly as before. The derivation of the optimization strategy proceeds in a similar fashion and leads to an analogous optimization strategy, albeit with a few slight differences in detail which we omit due to space constraints. The main difference is that instead of maximizing the quadratic expression in Eqn. 14 to find the maximum of h(), we need to maximize a quadratic expression which includes a linear term due to the correlation between the stimulus coefficients, ⃗k, and the spike history coefficients,⃗a. The results of our simulations with spike history terms are shown in Fig. 2. Dynamic ⃗θ. In addition to fast changes due to adaptation and spike-history effects, animal preparations often change slowly and nonsystematically over the course of an experiment [16]. We model these effects by letting ⃗θ experience diffusion: ⃗θt+1 = ⃗θt + wt (16) Here wt is a normally distributed random variable with mean zero and known covariance matrix Q. This means that p(⃗θt+1|⃗xt, rt) is Gaussian with mean ⃗µt and covariance Ct + Q. To update the posterior and choose the optimal stimulus, we use the same procedure as described above1. Results Our first simulation considered the use of our algorithm for learning the receptive field of a visually sensitive neuron. We took the neuron’s receptive field to be a Gabor function, as a proxy model of a V1 simple cell. We generated synthetic responses by sampling Eqn. 1 with ⃗θ set to a 25x33 Gabor function. We used this synthetic data to compare how well ⃗θ could be estimated using information maximizing stimuli compared to using random stimuli. The stimuli were 2-d images which were rasterized in order to express ⃗x as a vector. The plots of the posterior means ⃗µt in Fig. 1 (recall these are equivalent to the MAP estimate of ⃗θ) show that the information maximizing strategy converges an order of magnitude more rapidly to the true ⃗θ. These results are supported by the conclusion of [7] that the information maximization strategy is asymptotically never worse than using random stimuli and is in general more efficient. The running time for each step of the algorithm as a function of the dimensionality of ⃗θ is plotted in Fig. 1(c). These results were obtained on a machine with a dual core Intel 2.80GHz XEON processor running Matlab. The solid lines indicate fitted polynomials of degree 1 for the 1d line search and degree 2 for the remaining curves; the total running time for each trial scaled as O(d2), as predicted. When ⃗θ was less than 200 dimensions, the total running time was roughly 50 ms (and for dim(⃗θ) ≈100, the runtime was close to 15 ms), well within the range of tolerable latencies for many experiments. In Fig. 2 we apply our algorithm to characterize the receptive field of a neuron whose response depends on its past spiking. Here, the stimulus coefficients ⃗k were chosen to follow a sine-wave; 1The one difference is that the covariance matrix of p(⃗θt+1|⃗xt+1, rt+1) is in general no longer just a rankone modification of the covariance matrix of p(⃗θt|⃗xt, rt); thus, we cannot use the rank-one update to compute the eigendecomposition. However, it is often reasonable to take Q to be white, Q = cI; in this case the eigenvectors of Ct + Q are those of Ct and the eigenvalues are ci + c where ci is the ith eigenvalue of Ct; thus in this case, our methods may be applied without modification. the spike history coefficients ⃗a were inhibitory and followed an exponential function. When choosing stimuli we updated the posterior for the full ⃗θ = {⃗k;⃗a} simultaneously and maximized the information about both the stimulus coefficients and the spike history coefficients. The information maximizing strategy outperformed random sampling for estimating both the spike history and stimulus coefficients. Our final set of results, Fig. 3, considers a neuron whose receptive field drifts non-systematically with time. We take the receptive field to be a Gabor function whose center moves according to a random walk (we have in mind a slow random drift of eye position during a visual experiment). The results demonstrate the feasibility of the information-maximization strategy in the presence of nonstationary response properties ⃗θ, and emphasize the superiority of adaptive methods in this context. Conclusion We have developed an efficient implementation of an algorithm for online optimization of neurophysiology experiments based on information-theoretic criterion. Reasonable approximations based on a GLM framework allow the algorithm to run in near-real time even for high dimensional parameter and stimulus spaces, and in the presence of spike-rate adaptation and time-varying neural response properties. Despite these approximations the algorithm consistently provides significant improvements over random sampling; indeed, the differences in efficiency are large enough that the information-optimization strategy may permit robust system identification in cases where it is simply not otherwise feasible to estimate the neuron’s parameters using random stimuli. Thus, in a sense, the proposed stimulus-optimization technique significantly extends the reach and power of classical neurophysiology methods. Acknowledgments JL is supported by the Computational Science Graduate Fellowship Program administered by the DOE under contract DE-FG02-97ER25308 and by the NSF IGERT Program in Hybrid Neural Microsystems at Georgia Tech via grant number DGE-0333411. LP is supported by grant EY018003 from the NEI and by a Gatsby Foundation Pilot Grant. We thank P. Latham for helpful conversations. References [1] I. Nelken, et al., Hearing Research 72, 237 (1994). [2] P. Foldiak, Neurocomputing 38–40, 1217 (2001). [3] K. Zhang, et al., Proceedings (Computational and Systems Neuroscience Meeting, 2004). [4] R. C. deCharms, et al., Science 280, 1439 (1998). [5] C. Machens, et al., Neuron 47, 447 (2005). [6] A. Watson, et al., Perception and Psychophysics 33, 113 (1983). [7] L. Paninski, Neural Computation 17, 1480 (2005). [8] P. McCullagh, et al., Generalized linear models (Chapman and Hall, London, 1989). [9] L. Paninski, Network: Computation in Neural Systems 15, 243 (2004). [10] E. Simoncelli, et al., The Cognitive Neurosciences, M. Gazzaniga, ed. (MIT Press, 2004), third edn. [11] P. Dayan, et al., Theoretical Neuroscience (MIT Press, 2001). [12] E. Chichilnisky, Network: Computation in Neural Systems 12, 199 (2001). [13] F. Theunissen, et al., Network: Computation in Neural Systems 12, 289 (2001). [14] L. Paninski, et al., Journal of Neuroscience 24, 8551 (2004). [15] M. Gu, et al., SIAM Journal on Matrix Analysis and Applications 15, 1266 (1994). [16] N. A. Lesica, et al., IEEE Trans. On Neural Systems And Rehabilitation Engineering 13, 194 (2005).
2006
98
3,123
High-Dimensional Graphical Model Selection Using ℓ1-Regularized Logistic Regression Martin J. Wainwright Pradeep Ravikumar John D. Lafferty Department of Statistics Machine Learning Dept. Computer Science Dept. Department of EECS Carnegie Mellon Univ. Machine Learning Dept. Univ. of California, Berkeley Pittsburgh, PA 15213 Carnegie Mellon Univ. Berkeley, CA 94720 Pittsburgh, PA 15213 Abstract We focus on the problem of estimating the graph structure associated with a discrete Markov random field. We describe a method based on ℓ1regularized logistic regression, in which the neighborhood of any given node is estimated by performing logistic regression subject to an ℓ1-constraint. Our framework applies to the high-dimensional setting, in which both the number of nodes p and maximum neighborhood sizes d are allowed to grow as a function of the number of observations n. Our main result is to establish sufficient conditions on the triple (n, p, d) for the method to succeed in consistently estimating the neighborhood of every node in the graph simultaneously. Under certain mutual incoherence conditions analogous to those imposed in previous work on linear regression, we prove that consistent neighborhood selection can be obtained as long as the number of observations n grows more quickly than 6d6 log d + 2d5 log p, thereby establishing that logarithmic growth in the number of samples n relative to graph size p is sufficient to achieve neighborhood consistency. Keywords: Graphical models; Markov random fields; structure learning; ℓ1-regularization; model selection; convex risk minimization; high-dimensional asymptotics; concentration. 1 Introduction Consider a p-dimensional discrete random variable X = (X1, X2, . . . , Xp) where the distribution of X is governed by an unknown undirected graphical model. In this paper, we investigate the problem of estimating the graph structure from an i.i.d. sample of n data points {x(i) = (x(i) 1 , . . . , x(i) p }n i=1. This structure learning problem plays an important role in a broad range of applications where graphical models are used as a probabilistic representation tool, including image processing, document analysis and medical diagnosis. Our approach is to perform an ℓ1-regularized logistic regression of each variable on the remaining variables, and to use the sparsity pattern of the regression vector to infer the underlying neighborhood structure. The main contribution of the paper is a theoretical analysis showing that, under suitable conditions, this procedure recovers the true graph structure with probability one, in the high-dimensional setting in which both the sample size n and graph size p = p(n) increase to infinity. The problem of structure learning for discrete graphical models—due to both its importance and difficulty—has attracted considerable attention. Constraint based approaches use hypothesis testing to estimate the set of conditional independencies in the data, and then determine a graph that most closely represents those independencies [8]. An alternative approach is to view the problem as estimation of a stochastic model, combining a scoring metric on candidate graph structures with a goodness of fit measure to the data. The scoring metric approach must be used together with a search procedure that generates candidate graph structures to be scored. The combinatorial space of graph structures is super-exponential, however, and Chickering [1] shows that this problem is in general NP-hard. The space of candidate structures in scoring based approaches is typically restricted to directed models (Bayesian networks) since the computation of typical score metrics involves computing the normalization constant of the graphical model distribution, which is intractable for general undirected models. Estimation of graph structures in undirected models has thus largely been restricted to simple graph classes such as trees [2], polytrees [3] and hypertrees [9]. The technique of ℓ1 regularization for estimation of sparse models or signals has a long history in many fields; we refer to Tropp [10] for a recent survey. A surge of recent work has shown that ℓ1-regularization can lead to practical algorithms with strong theoretical guarantees (e.g., [4, 5, 6, 10, 11, 12]). In this paper, we adapt the technique of ℓ1-regularized logistic regression to the problem of inferring graph structure. The technique is computationally efficient and thus well-suited to high dimensional problems, since it involves the solution only of standard convex programs. Our main result establishes conditions on the sample size n, graph size p and maximum neighborhood size d under which the true neighborhood structure can be inferred with probability one as (n, p, d) increase. Our analysis, though asymptotic in nature, leads to growth conditions that are sufficiently weak so as to require only that the number of observations n grow logarithmically in terms of the graph size. Consequently, our results establish that graphical structure can be learned from relatively sparse data. Our analysis and results are similar in spirit to the recent work of Meinshausen and B¨uhlmann [5] on covariance selection in Gaussian graphical models, but focusing rather on the case of discrete models. The remainder of this paper is organized as follows. In Section 2, we formulate the problem and establish notation, before moving on to a precise statement of our main result, and a high-level proof outline in Section 3. Sections 4 and 5 detail the proof, with some technical details deferred to the full-length version. Finally, we provide experimental results and a concluding discussion in Section 6. 2 Problem Formulation and Notation Let G = (V, E) denote a graph with vertex set V of size |V | = p and edge set E. We denote by N(s) the set of neighbors of a vertex v ∈V ; that is N(s) = {(s, t) ∈E}. A pairwise graphical model with graph G is a family of probability distributions for a random variable X = (X1, X2, . . . , Xp) given by p(x) ∝Q (s,t)∈E ψst(xs, xt). In this paper, we restrict our attention to the case where each xs ∈{0, 1} is binary, and the family of probability distributions is given by the Ising model p(x; θ) = exp P s∈V θsxs + P (s,t)∈E θstxsxt −Ψ(θ)  . (1) Given such an exponential family in a minimal representation, the log partition function Ψ(θ) is strictly convex, which ensures that the parameter matrix θ is identifiable. We address the following problem of graph learning. Given n samples x(i) ∈{0, 1}p drawn from an unknown distribution p(x; θ∗) of the form (1), let bEn be an estimated set of edges. Our set-up includes the important situation in which the number of variables p may be large relative to the sample size n. In particular, we allow the graph Gn = (Vn, En) to vary with n, so that the number of variables p = |Vn| and the sizes of the neighborhoods ds := |N(s)| may vary with sample size. (For notational clarity we will sometimes omit subscripts indicating a dependence on n.) The goal is to construct an estimator bEn for which P[ bEn = En] →1 as n →∞. Equivalently, we consider the problem of estimating neighborhoods b Nn(s) ⊂Vn so that P[ b Nn(s) = N(s), ∀s ∈Vn] −→1. For many problems of interest, the graphical model provides a compact representation where the size of the neighborhoods are typically small—say ds ≪p for all s ∈Vn. Our goal is to use ℓ1-regularized logistic regression to estimate these neighborhoods; for this paper, the actual values of the parameters θij is a secondary concern. Given input data {(z(i), y(i))}, where z(i) is a p-dimensional covariate and y(i) ∈{0, 1} is a binary response, logistic regression involves minimizing the negative log likelihood fs(θ; x) = 1 n n X i=1 n log(1 + exp(θT z(i))) −y(i)θT z(i)o . (2) We focus on regularized version of this regression problem, involving an ℓ1 constraint on (a subset of) the parameter vector θ. For convenience, we assume that z(i) 1 = 1 is a constant so that θ1 is a bias term, which is not regularized; we denote by θ\s the vector of all coefficients of θ except the one in position s. For the graph learning task, we regress each variable Xs onto the remaining variables, sharing the same data x(i) across problems. This leads to the following collection of optimization problems (p in total, one for each graph node): bθs,λ = arg min θ∈Rp ( 1 n n X i=1 h log(1 + exp(θT z(i,s))) −x(i) s θT z(i,s)i + λn∥θ\s∥1 ) . (3) where s ∈V , and z(i,s) ∈{0, 1}p denotes the vector where z(i,s) t = x(i) t for t ̸= s and z(i,s) s = 1. The parameter θs acts as a bias term, and is not regularized. Thus, the quantity bθs,λ t can be thought of as a penalized conditional likelihood estimate of θs,t. Our estimate of the neighborhood N(s) is then given by b Nn(s) = n t ∈V, t ̸= s : bθs,λ t ̸= 0 o . Our goal is to provide conditions on the graphical model—in particular, relations among the number of nodes p, number of observations n and maximum node degree d—that ensure that the collection of neighborhood estimates (2), one for each node s of the graph, is consistent with high probability. We conclude this section with some additional notation that is used throughout the sequel. Defining the probability p(z(i,s); θ) := [1 + exp(−θT z(i,s))]−1, straightforward calculations yield the gradient and Hessian, respectively, of the negative log likelihood (2): ∇θfs(θ; x) = 1 n n X i=1 p(z(i,s); θ) z(i,s) −θT 1 n n X i=1 x(i) s z(i,s) ! (4a) ∇2 θfs(θ; x) = 1 n n X i=1 p(z(i,s); θ) [1 −p(z(i,s); θ)] z(i,s) (z(i,s))T . (4b) Finally, for ease of notation, we make frequent use the shortand Qs(θ) = ∇2fs(θ; x). 3 Main Result and Outline of Analysis In this section, we begin with a precise statement of our main result, and then provide a high-level overview of the key steps involved in its proof. 3.1 Statement of main result We begin by stating the assumptions that underlie our main result. A subset of the assumptions involve the Fisher information matrix associated with the logistic regression model, defined for each node s ∈V as Q∗ s = E  ps(Z; θ∗) {1 −ps(Z; θ∗)}ZZT  , (5) Note that Q∗ s is the population average of the Hessian Qs(θ∗). For ease of notation we use S to denote the neighborhood N(s), and Sc to denote the complement V −N(s). Our first two assumptions (A1 and A2) place restrictions on the dependency and coherence structure of this Fisher information matrix. We note that these first two assumptions are analogous to conditions imposed in previous work [5, 10, 11, 12] on linear regression. Our third assumption is a growth rate condition on the triple (n, p, d). [A1] Dependency condition: We require that the subset of the Fisher information matrix corresponding to the relevant covariates has bounded eigenvalues: namely, there exist constants Cmin > 0 and Cmax < +∞such that Cmin ≤Λmin(Q∗ SS), and Λmax(Q∗ SS) ≤Cmax. (6) These conditions ensure that the relevant covariates do not become overly dependent, and can be guaranteed (for instance) by assuming that bθs,λ lies within a compact set. [A2] Incoherence condition: Our next assumption captures the intuition that the large number of irrelevant covariates (i.e., non-neighbors of node s) cannot exert an overly strong effect on the subset of relevant covariates (i.e., neighbors of node s). To formalize this intuition, we require the existence of an ϵ ∈(0, 1] such that ∥Q∗ ScS(Q∗ SS)−1∥∞ ≤ 1 −ϵ. (7) Analogous conditions are required for the success of the Lasso in the case of linear regression [5, 10, 11, 12]. [A3] Growth rates: Our second set of assumptions involve the growth rates of the number of observations n, the graph size p, and the maximum node degree d. In particular, we require that: n d5 −6d log(d) −2 log(p) → +∞. (8) Note that this condition allows the graph size p to grow exponentially with the number of observations (i.e., p(n) = exp(nα) for some α ∈(0, 1). Moreover, it is worthwhile noting that for model selection in graphical models, one is typically interested in node degrees d that remain bounded (e.g., d = O(1)), or grow only weakly with graph size (say d = o(log p)). With these assumptions, we now state our main result: Theorem 1. Given a graphical model and triple (n, p, d) such that conditions A1 through A3 are satisfied, suppose that the regularization parameter λn is chosen such that (a) nλ2 n −2 log(p) →+∞, and (b) dλn →0. Then P[ b Nn(s) = N(s), ∀s ∈Vn] →1 as n →+∞. 3.2 Outline of analysis We now provide a high-level roadmap of the main steps involved in our proof of Theorem 1. Our approach is based on the notion of a primal witness: in particular, focusing our attention on a fixed node s ∈V , we define a constructive procedure for generating a primal vector bθ ∈Rp as well as a corresponding subgradient bz ∈Rn that together satisfy the zero-subgradient optimality conditions associated with the convex program (3). We then show that this construction succeeds with probability converging to one under the stated conditions. A key fact is that the convergence rate is sufficiently fast that a simple union bound over all graph nodes shows that we achieve consistent neighborhood estimation for all nodes simultaneously. To provide some insight into the nature of our construction, the analysis in Section 4 shows the neighborhood N(s) is correctly recovered if and only if the pair (bθ, bz) satisfies the following four conditions: (a) bθSc = 0; (b) |bθt| > 0 for all t ∈S; (c) bzS = sgn(θ∗ S); and (d) ∥bzSc∥∞< 1. The first step in our construction is to choose the pair (bθ, bz) such that both conditions (a) and (c) hold. The remainder of the analysis is then devoted to establishing that properties (b) and (d) hold with high probability. In the first part of our analysis, we assume that the dependence (A1) mutual incoherence (A2) conditions hold for the sample Fisher information matrices Qs(θ∗) defined below equation (4b). Under this assumption, we then show that the conditions on λn in the theorem statement suffice to guarantee that properties (b) and (d) hold for the constructed pair (bθ, bz). The remainder of the analysis, provided in the full-length version of this paper, is devoted to showing that under the specified growth conditions (A3), imposing incoherence and dependence assumptions on the population version of the Fisher information Q∗(θ∗) guarantees (with high probability) that analogous conditions hold for the sample quantities Qs(θ∗). While it follows immediately from the law of large numbers that the empirical Fsiher information Qn AA(θ∗) converges to the population version Q∗ AA for any fixed subset, the delicacy is that we require controlling this convergence over subsets of increasing size. Our analysis therefore requires the use of uniform laws of large numbers [7]. 4 Primal-Dual Relations for ℓ1-Regularized Logistic Regression Basic convexity theory can be used to characterize the solutions of ℓ1-regularized logistic regression. We assume in this section that θ1 corresponds to the unregularized bias term, and omit the dependence on sample size n in the notation. The objective is to compute min θ∈Rp L(θ, λ) = min θ∈Rp  f(θ; x) + λ ∥θ\1∥1 −b  = min θ∈Rp  f(θ; x) + λ∥θ\1∥1 (9) The function L(θ, λ) is the Lagrangian function for the problem of minimizing f(θ; x) subject to ∥θ\1∥1 ≤b for some b. The dual function is h(λ) = infθ L(θ, λ). If p ≤n then f(θ; x) is a strictly convex function of θ. Since the ℓ1-norm is convex, it follows that L(θ, λ) is convex in θ and strictly convex in θ for p ≤n. Therefore the set of solutions to (9) is convex. If bθ and bθ′ are two solutions, then by convexity bθ + ρ(bθ′ −bθ) is also a solution for any ρ ∈[0, 1]. Since the solutions minimize f(θ; x) subject to ∥θ\1∥1 ≤b, the value of f(bθ + ρ(bθ′ −bθ)) is independent of ρ, and ∇θf(bθ; x) is independent of the particular solution bθ. These facts are summarized below. Lemma 1. If p ≤n then a unique solution to (9) exists. If p ≥n then the set of solutions is convex, with the value of ∇θf(bθ; x) constant across all solutions. In particular, if p ≥n and |∇θtf(bθ; x)| < λ for some solution bθ, then bθt = 0 for all solutions. The subgradient ∂∥θ\1∥1 ⊂Rp is the collection of all vectors z satisfying |zt| ≤1 and zt = 0 for t = 1 sign(θt) if θt ̸= 0. Any optimum of (9) must satisfy ∂θL(bθ, λ) = ∇θf(bθ; x) + λz = 0 (10) for some z ∈∂∥θ\1∥. The analysis in the following sections shows that, with high probability, a primal-dual pair (bθ, bz) can be constructed so that |bzt| < 1 and therefore bθt = 0 in case θ∗ t = 0 in the true model θ∗from which the data are generated. 5 Constructing a Primal-Dual Pair We now fix a variable Xs for the logistic regression, denoting the set of variables in its neighborhood by S. From the results of the previous section we observe that the ℓ1regularized regression recovers the sparsity pattern if and only if there exists a primal-dual solution pair (bθ, bz) satisfying the zero-subgradient condition, and the conditions (a) bθSc = 0; (b) |bθt| > 0 for all t ∈S and sgn(bθS) = sgn(θ∗S); (c) bzS = sgn(θ∗ S); and (d) ∥bzSc∥∞< 1. Our proof proceeds by showing the existence (with high probability) of a primal-dual pair (bθ, bz) that satisfy these conditions. We begin by setting bθSc = 0, so that (a) holds, and also setting bzS = sgn(bθS), so that (c) holds. We first establish a consistency result when incoherence conditions are imposed on the sample Fisher information Qn. The remaining analysis, deferred to the full-length version, establishes that the incoherence assumption (A2) on the population version ensures that the sample version also obeys the property with probability converging to one exponentially fast. Theorem 2. Suppose that ∥Qn ScS(Qn SS)−1∥∞ ≤ 1 −ϵ (11) for some ϵ ∈(0, 1]. Assume that λn →0 is chosen that λ2 nn −log(p) →+∞and λnd →0. Then P  b N(s) = N(s)  = 1 −O(exp(−cnγ)) for some γ > 0. Proof. Let us introduce the notation W n := 1 n n X i=1 z(i,s) x(i) s − exp(θ∗T z(i,s)) 1 + exp(θ∗T z(i,s)) ! Substituting into the subgradient optimality condition (10) yields the equivalent condition ∇f(bθ; x) −∇f(θ; x) −W n + λnbz = 0. (12) By a Taylor series expansion, this condition can be re-written as ∇2f(θ∗; x) [bθ −θ∗] = W n −λnbz + Rn, (13) where the remainder Rn is a term of order ∥Rn∥2 = O(∥bθ −θ∗∥2). Using our shorthand Qn = ∇2 θf(θ∗; x), we write the zero-subgradient condition (13) in block form as: Qn ScS [bθs,λ S −θ∗ S] = W n Sc −λnbzSc + Rn Sc, (14a) Qn SS [bθs,λ S −θ∗ S] = W n S −λnbzS + Rn S. (14b) It can be shown that the matrix Qn SS is invertible w.p. one, so that these conditions can be rewritten as Qn ScS (Qn SS)−1 [W n S −λnbzS + Rn S] = W n Sc −λnbzSc + Rn Sc. (15) Re-arranging yields the condition Qn ScS (Qn SS)−1 [W n S −Rn S] −[W n Sc −Rn Sc] + λnQn ScS (Qn SS)−1bzS = λnbzSc. (16) Analysis of condition (d): We now demonstrate that ∥bzSc∥∞< 1. Using triangle inequality and the sample incoherence bound (11) we have that ∥bzSc∥∞ ≤ (2 −ϵ) λn [∥W n∥∞+ ∥Rn∥∞] + (1 −ϵ) (17) We complete the proof that ∥bzSc∥∞< 1 with the following two lemmas, proved in the full-length version. Lemma 2. If nλ2 n −log(p) →+∞, then P 2 −ϵ λn ∥W n∥∞≥ϵ 4  → 0 (18) at rate O(exp −nλ2 n + log(p)  ). Lemma 3. If nλ2 n −log(p) →+∞and dλn →0, then we have P 2 −ϵ λn ∥Rn∥∞≥ϵ 4  → 0 (19) at rate O(exp −nλ2 n + log(p)  ). We apply these two lemmas to the bound (17) to obtain that with probability converging to one at rate O(exp  exp nλ2 n −log(p)  , we have ∥bzSc∥∞ ≤ ϵ 4 + ϵ 4 + (1 −ϵ) = 1 −ϵ 2. Analysis of condition (b): We next show that condition (b) can be satisfied, so that sgn(bθS) = sgn(θ∗S). Define ρn := mini∈S |θ∗ S|. From equation (14b), we have bθs,λ S = θ∗ S −(Qn SS)−1 [WS −λnbzS + RS] . (20) Therefore, in order to establish that |bθs,λ i | > 0 for all i ∈S, and moreover that sign(bθs,λ S ) = sign(θ∗ S), it suffices to show that (Qn SS)−1 [WS −λnbzS + RS] ∞ ≤ ρn 2 . Using our eigenvalue bounds, we have (Qn SS)−1 [WS −λnbzS + RS] ∞ ≤ ∥(Qn SS)−1∥∞[∥WS∥∞+ λn + ∥RS∥∞] ≤ √ d ∥(Qn SS)−1∥2 [∥WS∥∞+ λn + ∥RS∥∞] ≤ √ d Cmin [∥WS∥∞+ λn + ∥RS∥∞] . In fact, the righthand side tends to zero from our earlier results on W and R, and the assumption that λnd →0. Together with the exponential rates of convergence established by the stated lemmas, this completes the proof of the result. 6 Experimental Results We briefly describe some experimental results that demonstrate the practical viability and performance of our proposed method. We generated random Ising models (1) using the following procedure: for a given graph size p and maximum degree d, we started with a graph with disconnected cliques of size less than or equal to ten, and for each node, removed edges randomly until the sparsity condition (degree less than d) was satisfied. For all edges (s, t) present in the resulting random graph, we chose the edge weight θst ∼U[−3, 3]. We drew n i.i.d. samples from the resulting random Ising model by exact methods. We implemented the ℓ1-regularized logistic regression by setting the ℓ1 penalty as λn = O((log p)3√n), and solved the convex program using a customized primal-dual algorithm (described in more detail in the full-length version of this paper). We considered various sparsity regimes, including constant (d = Ω(1)), logarithmic (d = α log(p)), or linear (d = αp). In each case, we evaluate a given method in terms of its average precision (one minus the fraction of falsely included edges), and its recall (one minus the fraction of falsely excluded edges). Figure 1 shows results for the case of constant degrees (d ≤4), and graph sizes p ∈{100, 200, 400}, for the AND method (respectively the OR) method, in which an edge (s, t) is included if and only if it is included in the local regressions at both node s and (respectively or) node t. Note that both the precision and recall tend to one as the number of samples n is increased. 7 Conclusion We have shown that a technique based on ℓ1-regularization, in which the neighborhood of any given node is estimated by performing logistic regression subject to an ℓ1-constraint, can be used for consistent model selection in discrete graphical models. Our analysis applies to the high-dimensional setting, in which both the number of nodes p and maximum neighborhood sizes d are allowed to grow as a function of the number of observations n. Whereas the current analysis provides sufficient conditions on the triple (n, p, d) that ensure consistent neighborhood selection, it remains to establish necessary conditions as well [11]. Finally, the ideas described here, while specialized in this paper to the binary case, should be more broadly applicable to discrete graphical models. Acknowledgments Research supported in part by NSF grants IIS-0427206, CCF-0625879 and DMS-0605165. 0 200 400 600 800 1000 1200 1400 1600 1800 2000 0.65 0.7 0.75 0.8 0.85 0.9 0.95 1 Number of Samples Precision AND Precision p = 100 p = 200 p = 400 0 200 400 600 800 1000 1200 1400 1600 1800 2000 0 0.1 0.2 0.3 0.4 0.5 0.6 0.7 Number of Samples Recall AND Recall p = 100 p = 200 p = 400 0 200 400 600 800 1000 1200 1400 1600 1800 2000 0.5 0.55 0.6 0.65 0.7 0.75 0.8 0.85 0.9 0.95 1 Number of Samples Precision OR Precision p = 100 p = 200 p = 400 0 200 400 600 800 1000 1200 1400 1600 1800 2000 0 0.1 0.2 0.3 0.4 0.5 0.6 0.7 Number of Samples Recall OR Recall p = 100 p = 200 p = 400 Figure 1. Precision/recall plots using the AND method (top), and the OR method (bottom). Each panel shows precision/recall versus n, for graph sizes p ∈{100, 200, 400}. References [1] D. Chickering. Learning Bayesian networks is NP-complete. Proceedings of AI and Statistics, 1995. [2] C. Chow and C. Liu. Approximating discrete probability distributions with dependence trees. IEEE Trans. Info. Theory, 14(3):462–467, 1968. [3] S. Dasgupta. Learning polytrees. In Uncertainty on Artificial Intelligence, pages 134– 14, 1999. [4] D. Donoho and M. Elad. Maximal sparsity representation via ℓ1 minimization. Proc. Natl. Acad. Sci., 100:2197–2202, March 2003. [5] N. Meinshausen and P. B¨uhlmann. High dimensional graphs and variable selection with the lasso. Annals of Statistics, 34(3), 2006. [6] A. Y. Ng. Feature selection, l1 vs. l2 regularization, and rotational invariance. In International Conference on Machine Learning, 2004. [7] D. Pollard. Convergence of stochastic processes. Springer-Verlag, New York, 1984. [8] P. Spirtes, C. Glymour, and R. Scheines. Causation, prediction and search. MIT Press, 2000. [9] N. Srebro. Maximum likelihood bounded tree-width Markov networks. Artificial Intelligence, 143(1):123–138, 2003. [10] J. A. Tropp. Just relax: Convex programming methods for identifying sparse signals. IEEE Trans. Info. Theory, 51(3):1030–1051, March 2006. [11] M. J. Wainwright. Sharp thresholds for high-dimensional and noisy sparsity recovery using ℓ1-constrained quadratic programs. In Proc. Allerton Conference on Communication, Control and Computing, October 2006. [12] P. Zhao and B. Yu. Model selection with the lasso. Technical report, UC Berkeley, Department of Statistics, March 2006. Accepted to Journal of Machine Learning Research.
2006
99
3,124
An Analysis of Convex Relaxations for MAP Estimation M. Pawan Kumar V. Kolmogorov P.H.S. Torr Dept. of Computing Computer Science Dept. of Computing Oxford Brookes University University College London Oxford Brookes University pkmudigonda@brookes.ac.uk vnk@adastral.ucl.ac.uk philiptorr@brookes.ac.uk Abstract The problem of obtaining the maximum a posteriori estimate of a general discrete random field (i.e. a random field defined using a finite and discrete set of labels) is known to be NP-hard. However, due to its central importance in many applications, several approximate algorithms have been proposed in the literature. In this paper, we present an analysis of three such algorithms based on convex relaxations: (i) LP-S: the linear programming (LP) relaxation proposed by Schlesinger [20] for a special case and independently in [4, 12, 23] for the general case; (ii) QP-RL: the quadratic programming (QP) relaxation by Ravikumar and Lafferty [18]; and (iii) SOCP-MS: the second order cone programming (SOCP) relaxation first proposed by Muramatsu and Suzuki [16] for two label problems and later extended in [14] for a general label set. We show that the SOCP-MS and the QP-RL relaxations are equivalent. Furthermore, we prove that despite the flexibility in the form of the constraints/objective function offered by QP and SOCP, the LP-S relaxation strictly dominates (i.e. provides a better approximation than) QP-RL and SOCP-MS. We generalize these results by defining a large class of SOCP (and equivalent QP) relaxations which is dominated by the LP-S relaxation. Based on these results we propose some novel SOCP relaxations which strictly dominate the previous approaches. 1 Introduction Discrete random fields are a powerful tool to obtain a probabilistic formulation for various applications in Computer Vision and related areas [3]. Hence, developing accurate and efficient algorithms for performing inference on a given discrete random field is of fundamental importance. In this work, we will focus on the problem of maximum a posteriori (MAP) estimation. MAP estimation is a key step in obtaining the solutions to many applications such as stereo, image stitching and segmentation [21]. Furthermore, it is closely related to many important Combinatorial Optimization problems such as MAXCUT [6], multi-way cut [5], metric labelling [3, 11] and 0-extension [3, 9]. Given data D, a discrete random field models the distribution (i.e. either the joint or the conditional probability) of a labelling for a set of random variables. Each of these variables v = {v0, v1, · · · , vn−1} can take a label from a discrete set l = {l0, l1, · · · , lh−1}. A particular labelling of variables v is specified by a function f whose domain corresponds to the indices of the random variables and whose range is the index of the label set, i.e. f : {0, 1, · · ·, n−1} →{0, 1, · · ·, h−1}. In other words, random variable va takes label lf(a). For convenience, we assume the model to be a conditional random field (CRF) while noting that all the results of this paper also apply to Markov random fields (MRF). A CRF specifies a neighbourhood relationship E between the random variables, i.e. (a, b) ∈E if, and only if, va and vb are neighbouring random variables. Within this framework, the conditional probability of a labelling f given data D is specified as Pr(f|D, θ) = 1 Z(θ) exp(−Q(f; D, θ). Here θ represents the parameters of the CRF and Z(θ) is a normalization constant which ensures that the probability sums to one (also known as the partition function). The energy Q(f; D, θ) is given by Q(f; D, θ) = P va∈v θ1 a;f(a) + P (a,b)∈E θ2 ab;f(a)f(b). The term θ1 a;f(a) is called a unary potential since its value depends on the labelling of one random variable at a time. Similarly, θ2 ab;f(a)f(b) is called a pairwise potential as it depends on a pair of random variables. For simplicity, we assume 1 that θ2 ab;f(a)f(b) = w(a, b)d(f(a), f(b)) where w(a, b) is the weight that indicates the strength of the pairwise relationship between variables va and vb, with w(a, b) = 0 if (a, b) /∈E, and d(·, ·) is a distance function on the labels. As will be seen later, this formulation of the pairwise potentials would allow us to concisely describe our results. The problem of MAP estimation is well known to be NP-hard in general. Since it plays a central role in several applications, many approximate algorithms have been proposed in the literature. In this work, we analyze three such algorithms which are based on convex relaxations. Specifically, we consider: (i) LP-S, the linear programming (LP) relaxation of [4, 12, 20, 23]; (ii) QP-RL, the quadratic programming (QP) relaxation of [18]; and (iii) SOCP-MS, the second order cone programming (SOCP) relaxation of [14, 16]. In order to provide an outline of these relaxations, we formulate the problem of MAP estimation as an Integer Program (IP). 1.1 Integer Programming Formulation We define a binary variable vector x of length nh. We denote the element of x at index a · h + i as xa;i where va ∈v and li ∈l. These elements xa;i specify a labelling f such that xa;i = 1 if f(a) = i and xa;i = −1 otherwise. We say that the variable xa;i belongs to variable va since it defines which label va does (or does not) take. Let X = xx⊤. We refer to the (a · h + i, b · h + j)th element of the matrix X as Xab;ij where va, vb ∈v and li, lj ∈l. Clearly, the following IP finds the labelling with the minimum energy, i.e. it is equivalent to the MAP estimation problem: IP: x∗= arg minx P va,li θ1 a;i (1+xa;i) 2 + P (a,b)∈E,li,lj θ2 ab;ij (1+xa;i+xb;j+Xab;ij) 4 s.t. x ∈{−1, 1}nh, (1) P li∈l xa;i = 2 −h, (2) X = xx⊤. (3) Constraints (1) and (3) specify that the variables x and X are binary such that Xab;ij = xa;ixb;j. We will refer to them as the integer constraints. Constraint (2), which specifies that each variable should be assigned only one label, is known as the uniqueness constraint. Note that one uniqueness constraint is specified for each variable va. Solving the above IP is in general NP-hard. It is therefore common practice to obtain an approximate solution using convex relaxations. We describe four such convex relaxations below. 1.2 Linear Programming Relaxation The LP relaxation (proposed by Schlesinger [20] for a special case and independently in [4, 12, 23] for the general case), which we call LP-S, is given as follows: LP-S: x∗= arg minx P va,li θ1 a;i (1+xa;i) 2 + P (a,b)∈E,li,lj θ2 ab;ij (1+xa;i+xb;j+Xab;ij) 4 s.t. x ∈[−1, 1]nh, X ∈[−1, 1]nh×nh, (4) P li∈l xa;i = 2 −h, (5) P lj∈l Xab;ij = (2 −h)xa;i, (6) Xab;ij = Xba;ji, (7) 1 + xa;i + xb;j + Xab;ij ≥0. (8) In the LP-S relaxation only those elements Xab;ij of X are used for which (a, b) ∈E and li, lj ∈l. Unlike the IP, the feasibility region of the above problem is relaxed such that the variables xa;i and Xab;ij lie in the interval [−1, 1]. Further, the constraint (3) is replaced by equation (6) which is called the marginalization constraint [23]. One marginalization constraint is specified for each (a, b) ∈E and li ∈l. Constraint (7) specifies that X is symmetric. Constraint (8) ensures that θ2 ab;ij is multiplied by a number between 0 and 1 in the objective function. These constraints (7) and (8) are defined for all (a, b) ∈E and li, lj ∈l. Note that the above constraints are not exhaustive, i.e. it is possible to specify other constraints for the problem of MAP estimation (as will be seen in the different relaxations described in the subsequent sections). 1.3 Quadratic Programming Relaxation We now describe the QP relaxation for the MAP estimation IP which was proposed by Ravikumar and Lafferty [18]. To this end, it would be convenient to reformulate the objective function of the IP using a vector of unary potentials of length nh (denoted by ˆθ1) and a matrix of pairwise potentials 2 of size nh × nh (denoted by ˆθ2). The element of the unary potential vector at index (a · h + i) is defined as ˆθ1 a;i = θ1 a;i −P vc∈v P lk∈l |θ2 ac;ik|, where va ∈v and li ∈l. The (a · h + i, b · h + j)th element of the pairwise potential matrix ˆθ2 is defined such that ˆθ2 ab;ij =  P vc∈v P lk∈l |θ2 ac;ik|, if a = b, i = j, θ2 ab;ij otherwise, (9) where va, vb ∈v and li, lj ∈l. In other words, the potentials are modified by defining a pairwise potential ˆθ2 aa;ii and subtracting the value of that potential from the corresponding unary potential θ1 a;i. The advantage of this reformulation is that the matrix ˆθ 2 is guaranteed to be positive semidefinite, i.e. ˆθ 2 ⪰0. Using the fact that for xa;i ∈{−1, 1},  1+xa;i 2 2 = 1+xa;i 2 , it can be shown that the following is equivalent to the MAP estimation problem [18]: QP-RL: x∗= arg minx 1+x 2 ⊤ˆθ 1 + 1+x 2 ⊤ˆθ 2 1+x 2  , (10) s.t. P li∈l xa;i = 2 −h, ∀va ∈v, (11) x ∈{−1, 1}nh, (12) where 1 is a vector of appropriate dimensions whose elements are all equal to 1. By relaxing the feasibility region of the above problem to x ∈[−1, 1]nh, the resulting QP can be solved in polynomial time since ˆθ 2 ⪰0 (i.e. the relaxation of the QP (10)-(12) is convex). We call the above relaxation QP-RL. Note that in [18], the QP-RL relaxation was described using the variable y = 1+x 2 . However, the above formulation can easily be shown to be equivalent to the one presented in [18]. 1.4 Semidefinite Programming Relaxation The SDP relaxation of the MAP estimation problem replaces the non-convex constraint X = xx⊤by the convex semidefinite constraint X −xx⊤⪰0 [6, 15] which can be expressed as  1 x⊤ x X  ⪰0, (13) using Schur’s complement [2]. Further, like LP-S, it relaxes the integer constraints by allowing the variables xa;i and Xab;ij to lie in the interval [−1, 1] with Xaa;ii = 1 for all va ∈v, li ∈l. The SDP relaxation is a well-studied approach which provides accurate solutions for the MAP estimation problem (e.g. see [25]). However, due to its computational inefficiency, it is not practically useful for large scale problems with nh > 1000. See however [17, 19, 22]. 1.5 Second Order Cone Programming Relaxation We now describe the SOCP relaxation that was proposed by Muramatsu and Suzuki [16] for the MAXCUT problem (i.e. MAP estimation with h = 2) and later extended for a general label set [14]. This relaxation, which we call SOCP-MS, is based on the technique of Kim and Kojima [10] who observed that the SDP constraint can be further relaxed to second order cone (SOC) constraints. For this purpose, it employs a set of matrices S = {Ck|Ck = Uk(Uk)⊤⪰0, k = 1, 2, . . ., nC}. Using the fact that the Frobenius dot product of two semidefinite matrices is non-negative, we get ⇒∥(Uk)⊤x∥2 ≤Ck • X, k = 1, · · · , nC. (14) Each of the above SOC constraints may involve some or all variables xa;i and Xab;ij. For example, if Ck ab;ij = 0, then the kth SOC constraint will not involve Xab;ij (since its coefficient will be 0). In order to describe the SOCP-MS relaxation, we consider a pair of neighbouring variables va and vb, i.e. (a, b) ∈E, and a pair of labels li and lj. These two pairs define the following variables: xa;i, xb;j, Xaa;ii = Xbb;jj = 1 and Xab;ij = Xba;ji (since X is symmetric). For each such pair of variables and labels, the SOCP-MS relaxation specifies two SOC constraints which involve only the above variables [14, 16]. In order to specify the exact form of these SOC constraints, we need the following definitions. Using the variables va and vb (where (a, b) ∈E) and labels li and lj, we define the submatrices x(a,b,i,j) and X(a,b,i,j) of x and X respectively as: x(a,b,i,j) =  xa;i xb;j  , X(a,b,i,j) =  Xaa;ii Xab;ij Xba;ji Xbb;jj  . (15) 3 The SOCP-MS relaxation specifies SOC constraints of the form (14) for all pairs of neighbouring variables (a, b) ∈E and labels li, lj ∈l. To this end, it uses the following two matrices: C1 MS =  1 1 1 1  , C2 MS =  1 −1 −1 1  . Hence, in the SOCP-MS formulation, the MAP estimation IP is relaxed to SOCP-MS: x∗= arg minx P va,li θ1 a;i (1+xa;i) 2 + P (a,b)∈E,li,lj θ2 ab;ij (1+xa;i+xb;j+Xab;ij) 4 s.t. x ∈[−1, 1]nh, X ∈[−1, 1]nh×nh, (16) P li∈l xa;i = 2 −h, (17) (xa;i −xb;j)2 ≤2 −2Xab;ij, (18) (xa;i + xb;j)2 ≤2 + 2Xab;ij, (19) Xab;ij = Xba;ji. (20) We refer the reader to [14, 16] for details. 2 Comparing Relaxations In order to compare the relaxations described above, we require the following definitions. We say that a relaxation A dominates the relaxation B (alternatively, B is dominated by A) if and only if min (x,X)∈F(A) e(x, X; θ) ≥ min (x,X)∈F(B) e(x, X; θ), ∀θ, (21) where F(A) and F(B) are the feasibility regions of the relaxations A and B respectively. The term e(x, X; θ) denotes the value of the objective function at (x, X) (i.e. the energy of the possibly fractional labelling (x, X)) for the MAP estimation problem defined over the CRF with parameter θ. Thus the optimal value of the dominating relaxation A is always greater than or equal to the optimal value of relaxation B. We note here that the concept of domination has been used previously in [4] (to compare LP-S with the linear programming relaxation in [11]). Relaxations A and B are said to be equivalent if A dominates B and B dominates A, i.e. their optimal values are equal to each other for all CRFs. A relaxation A is said to strictly dominate relaxation B if A dominates B but B does not dominate A. In other words there exists at least one CRF with parameter θ such that min (x,X)∈F(A) e(x, X; θ) > min (x,X)∈F(B) e(x, X; θ). (22) Note that, by definition, the optimal value of any relaxation would always be less than or equal to the energy of the optimal (i.e. the MAP) labelling. Hence, the optimal value of a strictly dominating relaxation A is closer to the optimal value of the MAP estimation IP compared to that of relaxation B. In other words, A provides a tighter lower bound for MAP estimation than B. Our Results: We prove that LP-S strictly dominates SOCP-MS (see section 3). Further, in section 4, we show that QP-RL is equivalent to SOCP-MS. This implies that LP-S strictly dominates the QP-RL relaxation. In section 5 we generalize the above results by proving that a large class of SOCP (and equivalent QP) relaxations is dominated by LP-S. Based on these results, we propose a novel set of constraints which result in SOCP relaxations that dominate LP-S, QP-RL and SOCP-MS. These relaxations introduce SOC constraints on cycles and cliques formed by the neighbourhood relationship of the CRF. Note that we will only provide the statement of the results here due to page limit. All the proofs are described in [13]. 3 LP-S vs. SOCP-MS We now show that for the MAP estimation problem the linear constraints of LP-S are stronger than the SOCP-MS constraints. In other words the feasibility region of LP-S is a strict subset of the feasibility region of SOCP-MS (i.e. F(LP-S) ⊂F(SOCP-MS)). This in turn would allow us to prove the following theorem. Theorem 1: The LP-S relaxation strictly dominates the SOCP-MS relaxation. 4 QP-RL vs. SOCP-MS We now prove that QP-RL and SOCP-MS are equivalent (i.e. their optimal values are equal for MAP estimation problems defined over all CRFs). Specifically, we consider a vector x which lies in the 4 feasibility regions of the QP-RL and SOCP-MS relaxations, i.e. x ∈[−1, 1]nh. For this vector, we show that the values of the objective functions of the QP-RL and SOCP-MS relaxations are equal. This would imply that if x∗is an optimal solution of QP-RL for some CRF with parameter θ then there exists an optimal solution (x∗, X∗) of the SOCP-MS relaxation. Further, if eQ and eS are the optimal values of the objective functions obtained using the QP-RL and SOCP-MS relaxation, then eQ = eS. Theorem 2: The QP-RL relaxation and the SOCP-MS relaxation are equivalent. Theorems 1 and 2 prove that the LP-S relaxation strictly dominates the QP-RL and SOCP-MS relaxations. A natural question that now arises is whether the additive bound of QP-RL (proved in [18]) is applicable to the LP-S and SOCP-MS relaxations. Our next theorem answers this question in an affirmative. Theorem 3: Using the rounding scheme of [18], LP-S and SOCP-MS provide the same additive bound as the QP-RL relaxation, i.e. S 4 where S = P (a,b)∈E P li,lj∈l |θ2 ab;ij| (i.e. the sum of the absolute values of all pairwise potentials). Furthermore, this bound is tight. The above bound was proved for the case of binary variables (i.e. h = 2) in [8] using a slightly different rounding scheme. 5 QP and SOCP Relaxations over Trees and Cycles We now generalize the results of Theorem 1 by defining a large class of SOCP relaxations which is dominated by LP-S. Specifically, we consider the SOCP relaxations which relax the non-convex constraint X = xx⊤using a set of second order cone (SOC) constraints of the form ||(Uk)⊤x|| ≤Ck • X, k = 1, · · · , nC (23) where Ck = Uk(Uk)⊤⪰0, for all k = 1, · · · , nC. Note that each SOCP relaxation belonging to this class would define an equivalent QP relaxation (similar to the equivalent QP-RL relaxation defined by the SOCP-MS relaxation). Hence, all these QP relaxations will also be dominated by the LP-S relaxation. Before we begin to describe our results in detail, we need to set up some notation as follows. (a) (b) (c) Figure 1: (a) An example CRF defined over four variables which form a cycle. Note that the observed nodes are not shown for the sake of clarity of the image. (b) The set Ek specified by the matrix Ck shown in equation (25), i.e. Ek = {(a, b), (b, c), (c, d)}. (c) The set V k = {a, b, c, d}. See text for definitions of these sets. Notation: We consider an SOC constraint which is of the form described in equation (23), i.e. ||(Uk)⊤x|| ≤Ck • X, (24) where k ∈{1, · · ·, nC}. In order to help the reader understand the notation better, we use an example CRF shown in Fig. 1(a). This CRF is defined over four variables v = {va, vb, vc, vd} (connected to form a cycle of length 4), each of which take a label from the set l = {l0, l1}. For this CRF we specify a constraint using a matrix Ck ⪰0 which is 0 everywhere, except for the following 4 × 4 submatrix:     Ck aa;00 Ck ab;00 Ck ac;00 Ck ad;00 Ck ba;00 Ck bb;00 Ck bc;00 Ck bd;00 Ck ca;00 Ck cb;00 Ck cc;00 Ck cd;00 Ck da;00 Ck db;00 Ck dc;00 Ck dd;00    =    2 1 1 0 1 2 1 1 1 1 2 1 0 1 1 2    (25) Using the SOC constraint shown in equation (24) we define the following two sets: (i) The set Ek is defined such that (a, b) ∈Ek if, and only if, it satisfies the following conditions: (a, b) ∈E, (26) 5 ∃li, lj ∈l such that Ck ab;ij ̸= 0. (27) Recall that E specifies the neighbourhood relationship for the given CRF. In other words Ek is the subset of the edges in the graphical model of the CRF such that Ck specifies constraints for the random variables corresponding to those edges. For the example CRF (shown in Fig. 1(a)) and Ck matrix (in equation (25)), the set Ek obtained is shown in Fig. 1(b). (ii) The set V k is defined as a ∈V k if, and only if, there exists a vb ∈v such that (a, b) ∈Ek. In other words V k is the subset of hidden nodes in the graphical model of the CRF such that Ck specifies constraints for the random variables corresponding to those hidden nodes. Fig. 1(c) shows the set V k for our example SOC constraint. We also define a weighted graph Gk = (V k, Ek) whose vertices are specified by the set V k and whose edges are specified by the set Ek. The weight of an edge (a, b) ∈Ek is given by w(a, b). Recall that w(a, b) specifies the strength of the pairwise relationship between two neighbouring variables va and vb. Thus, for our example SOC constraint, the vertices of this graph are given in Fig. 1(c) while the edges are shown in Fig. 1(b). This graph can be viewed as a subgraph of the graphical model representation for the given CRF. Theorem 4: SOCP relaxations (and the equivalent QP relaxations) which define constraints only using graphs Gk = (V k, Ek) which form (arbitrarily large) trees are dominated by the LP-S relaxation. We note that the above theorem can be proved using the results of [24] on moment constraints (which imply that LP-S provides the exact solution for the MAP estimation problems defined over treestructured random fields). However, our alternative proof presented in [13] allows us to generalize the results of Theorem 4 for certain cycles as follows. Theorem 5: When d(i, j) ≥0 for all li, lj ∈l, the SOCP relaxations which define constraints only using non-overlapping graphs Gk which form (arbitrarily large) even cycles with all positive or all negative weights are dominated by the LP-S relaxation. The above theorem can be proved for cycles of any length whose weights are all negative by a similar construction. Further, it also holds true for odd cycles (i.e. cycles of odd number of variables) which have only one positive or only one negative weight. However, as will be seen in the next section, unlike trees it is not possible to extend these results for any general cycle. 6 Some Useful SOC Constraints We now describe two SOCP relaxations which include all the marginalization constraints specified in LP-S. Note that the marginalization constraints can be incorporated within the SOCP framework but not in the QP framework. 6.1 The SOCP-C Relaxation The SOCP-C relaxation (where C denotes cycles) defines second order cone (SOC) constraints using positive semidefinite matrices C such that the graph G (defined in section 5) form cycles. Let the variables corresponding to vertices of one such cycle G of length c be denoted as vC = {vb|b ∈ {a1, a2, · · · , ac}}. Further, let lC = {lj|j ∈{i1, i2, · · · , ic}} ∈lc be a set of labels for the variables vC. In addition to the marginalization constraints, the SOCP-C relaxation specifies the following SOC constraint: ||U⊤x|| ≤C • X, (28) such that the graph G defined by the above constraint forms a cycle. The matrix C is 0 everywhere except the following elements: Cak,al,ik,il =  λc if k = l, Dc(k, l) otherwise. (29) Here Dc is a c × c matrix which is defined as follows: Dc(k, l) =    1 if |k −l| = 1 (−1)c−1 if |k −l| = c −1 0 otherwise, (30) and λc is the absolute value of the smallest eigenvalue of Dc. In other words the submatrix of C defined by vC and lC has diagonal elements equal to λc and off-diagonal elements equal to the 6 elements of Dc. Clearly, C = U⊤U ⪰0 since its only non-zero submatrix λcI + Dc (where I is a c × c identity matrix) is positive semidefinite. This allows us to define a valid SOC constraint as shown in inequality (28). We choose to define the SOC constraint (28) for only those set of labels lC which satisfy the following: X (ak,al)∈E Dc(k, l)θ2 akal;ikil ≥ X (ak,al)∈E Dc(k, l)θ2 akal;jkjl, ∀{j1, j2, · · · , jc}. (31) Note that this choice is motivated by the fact that the variables Xakal;ikil corresponding to these sets vC and lC are assigned trivial values by the LP-S relaxation in the presence of non-submodular terms. Since marginalization constraints are included in the SOCP-C relaxation, the value of the objective function obtained by solving this relaxation would at least be equal to the value obtained by the LP-S relaxation (i.e. SOCP-C dominates LP-S, see Case II in section 2). We can further show that in the case where |l| = 2 and the constraint (28) is defined over a frustrated cycle (i.e. a cycle with an odd number of non-submodular terms) SOCP-C strictly dominates LP-S. One such example is given in [13]. Note that if the given CRF contains no frustrated cycle, then it can be solved exactly using the method described in [7]. The constraint defined in equation (28) is similar to the (linear) cycle inequality constraints [1] which are given by X k,l Dc(k, l)Xakal;ikil ≥2 −c. (32) We believe that the feasibility region defined by cycle inequalities is a strict subset of the feasibility region defined by equation (28). In other words a relaxation defined by adding cycle inequalities to LP-S would strictly dominate SOCP-C. We are not aware of a formal proof for this. We now describe the SOCP-Q relaxation. 6.2 The SOCP-Q Relaxation In this previous section we saw that LP-S dominates SOCP relaxations whose constraints are defined on trees. However, the SOCP-C relaxation, which defines its constraints using cycles, strictly dominates LP-S. This raises the question whether matrices C, which result in more complicated graphs G, would provide an even better relaxation for the MAP estimation problem. In this section, we answer this question in an affirmative. To this end, we define an SOCP relaxation which specifies constraints such that the resulting graph G from a clique. We denote this relaxation by SOCP-Q (where Q indicates cliques). The SOCP-Q relaxation contains the marginalization constraint and the cycle inequalities (defined above). In addition, it also defines SOC constraints on graphs G which form a clique. We denote the variables corresponding to the vertices of clique G as vQ = {vb|b ∈{a1, a2, · · · , aq}}. Let lQ = {lj|j ∈{i1, i2, · · · , iq}} be a set of labels for these variables vQ. Given this set of variables vQ and labels lQ, we define an SOC constraint using a matrix C of size nh × nh which is zero everywhere except for the elements Cakal;ikil = 1. Clearly, C is a rank 1 matrix with eigenvalue 1 and eigenvector u which is zero everywhere except uak;ik = 1 where vak ∈vQ and lik ∈lQ. This implies that C ⪰0, which enables us to obtain the following SOC constraint: X k xak;ik !2 ≤q + X k,l Xakal;ikil. (33) We choose to specify the above constraint only for the set of labels lQ which satisfy the following condition: X (ak,al)∈E θ2 akal;ikil ≥ X (ak,al)∈E θ2 akal;jkjl, ∀{j1, j2, · · · , jq}. (34) Again, this choice is motivated by the fact that the variables Xakal;ikil corresponding to these sets vQ and lQ are assigned trivial values by the LP-S relaxation in the presence of non-submodular pairwise potentials. When the clique contains a frustrated cycle, it can be shown that SOCP-Q dominates the LP-S relaxation (similar to SOCP-C). Further, using a counter-example, it can proved that the feasibility region given by cycle inequalities is not a subset of the feasibility region defined by constraint (33). One such example is given in [13]. 7 7 Discussion We presented an analysis of approximate algorithms for MAP estimation which are based on convex relaxations. The surprising result of our work is that despite the flexibility in the form of the objective function/constraints offered by QP and SOCP, the LP-S relaxation dominates a large class of QP and SOCP relaxations. It appears that the authors who have previously used SOCP relaxations in the Combinatorial Optimization literature [16] and those who have reported QP relaxation in the Machine Learning literature [18] were unaware of this result. We also proposed two new SOCP relaxations (SOCP-C and SOCP-Q) and presented some examples to prove that they provide a better approximation than LP-S. An interesting direction for future research would be to determine the best SOC constraints for a given MAP estimation problem (e.g. with truncated linear pairwise potentials). Acknowledgments: We thank Pradeep Ravikumar and John Lafferty for careful reading of the manuscript and for pointing out an error in our description of the SOCP-MS relaxation. References [1] F. Barahona and A. Mahjoub. On the cut polytope. Mathematical Programming, 36:157–173, 1986. [2] S. Boyd and L. Vandenberghe. Convex Optimization. Cambridge University Press, 2004. [3] Y. Boykov, O. Veksler, and R. Zabih. Fast approximate energy minimization via graph cuts. PAMI, 23(11):1222–1239, 2001. [4] C. Chekuri, S. Khanna, J. Naor, and L. Zosin. Approximation algorithms for the metric labelling problem via a new linear programming formulation. In SODA, 2001. [5] E. Dalhaus, D. Johnson, C. Papadimitriou, P. Seymour, and M. Yannakakis. The complexity of multiterminal cuts. SICOMP, 23(4):864–894, 1994. [6] M. Goemans and D. Williamson. Improved approximation algorithms for maximum cut and satisfiability problems using semidefinite programming. Journal of ACM, 42:1115–1145, 1995. [7] P. Hammer, P. Hansen, and B. Simeone. Roof duality, complementation and persistency in quadratic 0-1 optimization. Mathematical Programming, 28:121–155, 1984. [8] P. Hammer and B. Kalantari. A bound on the roof duality gap. Technical Report RRR 46, Rutgers Center for Operations Research, Rutgers University, 1987. [9] A. Karzanov. Minimum 0-extension of graph metrics. Euro. J. of Combinatorics, 19:71–101, 1998. [10] S. Kim and M. Kojima. Second-order cone programming relaxation of nonconvex quadratic optimization problems. Technical report, Tokyo Institute of Technology, 2000. [11] J. Kleinberg and E. Tardos. Approximation algorithms for classification problems with pairwise relationships: Metric labeling and Markov random fields. In STOC, pages 14–23, 1999. [12] A. Koster, C. van Hoesel, and A. Kolen. The partial constraint satisfaction problem: Facets and lifting theorems. Operations Research Letters, 23(3-5):89–97, 1998. [13] M. P. Kumar, V. Kolmogorov, and P. H. S. Torr. An analysis of convex relaxations for MAP estimation. Technical report, Oxford Brookes University, 2007. Available at http://cms.brookes.ac.uk/staff/PawanMudigonda/. [14] M. P. Kumar, P. H. S. Torr, and A. Zisserman. Solving Markov random fields using second order cone programming relaxations. In CVPR, volume I, pages 1045–1052, 2006. [15] J. Lasserre. Global optimization with polynomials and the problem of moments. SIAM Journal of Optimization, 11:796–817, 2001. [16] M. Muramatsu and T. Suzuki. A new second-order cone programming relaxation for max-cut problems. Journal of Operations Research of Japan, 43:164–177, 2003. [17] C. Olsson, A. Eriksson, and F. Kahl. Solving large scale binary quadratic problems: Spectral methods vs. semidefinite programming. In CVPR, pages 1–8, 2007. [18] P. Ravikumar and J. Lafferty. Quadratic programming relaxations for metric labelling and Markov random field MAP estimation. In ICML, 2006. [19] C. Schellewald and C. Schnorr. Subgraph matching with semidefinite programming. In IWCIA, 2003. [20] M. Schlesinger. Sintaksicheskiy analiz dvumernykh zritelnikh singnalov v usloviyakh pomekh (syntactic analysis of two-dimensional visual signals in noisy conditions). Kibernetika, 4:113–130, 1976. [21] R. Szeliski, R. Zabih, D. Scharstein, O. Veksler, V. Kolmogorov, A. Agarwala, M. Tappen, and C. Rother. A comparative study of energy minimization methods for markov random fields. In ECCV, pages II: 16–29, 2006. [22] P. H. S. Torr. Solving Markov random fields using semidefinite programming. In AISTATS, 2003. [23] M. Wainwright, T. Jaakola, and A. Willsky. MAP estimation via agreement on trees: Message passing and linear programming. IEEE Trans. on Information Theory, 51(11):3697–3717, 2005. [24] M. Wainwright and M. Jordan. Graphical models, exponential families, and variational inference. Technical Report 649, University of California, Berkeley, 2003. [25] M. Wainwright and M. Jordan. Treewidth-based conditions for exactness of the Sherali-Adams and Lasserre relaxations. Technical Report 671, University of California, Berkeley, 2004. 8
2007
1
3,125
Efficient Principled Learning of Thin Junction Trees Anton Chechetka Carlos Guestrin Carnegie Mellon University Abstract We present the first truly polynomial algorithm for PAC-learning the structure of bounded-treewidth junction trees – an attractive subclass of probabilistic graphical models that permits both the compact representation of probability distributions and efficient exact inference. For a constant treewidth, our algorithm has polynomial time and sample complexity. If a junction tree with sufficiently strong intraclique dependencies exists, we provide strong theoretical guarantees in terms of KL divergence of the result from the true distribution. We also present a lazy extension of our approach that leads to very significant speed ups in practice, and demonstrate the viability of our method empirically, on several real world datasets. One of our key new theoretical insights is a method for bounding the conditional mutual information of arbitrarily large sets of variables with only polynomially many mutual information computations on fixed-size subsets of variables, if the underlying distribution can be approximated by a bounded-treewidth junction tree. 1 Introduction In many applications, e.g., medical diagnosis or datacenter performance monitoring, probabilistic inference plays an important role: to decide on a patient’s treatment, it is useful to know the probability of various illnesses given the known symptoms. Thus, it is important to be able to represent probability distributions compactly and perform inference efficiently. Here, probabilistic graphical models (PGMs) have been successful as compact representations for probability distributions. In order to use a PGM, one needs to define its structure and parameter values. Usually, we only have data (i.e., samples from a probability distribution), and learning the structure from data is thus a crucial task. For most formulations, the structure learning problem is NP-complete, c.f., [10]. Most structure learning algorithms only guarantee that their output is a local optimum. One of the few notable exceptions is the work of Abbeel et al. [1], for learning structure of factor graphs, that provides probably approximately correct (PAC) learnability guarantees. While PGMs can represent probability distributions compactly, exact inference in compact models, such as those of Abbeel et al., remains intractable [7]. An attractive solution is to use junction trees (JTs) of limited treewidth – a subclass of PGMs that permits efficient exact inference. For treewidth k = 1 (trees), the most likely (MLE) structure of a junction tree can be learned efficiently using the Chow-Liu algorithm [6], but the representational power of trees is often insufficient. We address the problem of learning JTs for fixed treewidth k > 1. Learning the most likely such JT is NP-complete [10]. While there are algorithms with global guarantees for learning fixed-treewidth JTs [10, 13], there has been no polynomial algorithm with PAC guarantees. The guarantee of [10] is in terms of the difference in log-likelihood of the MLE JT and the model where all variables are independent: the result is guaranteed to achieve at least a constant fraction of that difference. The constant does not improve as the amount of data increases, so it does not imply PAC learnability. The algorithm of [13] has PAC guarantees, but its complexity is exponential. In contrast, we provide a truly polynomial algorithm with PAC guarantees. The contributions of this paper are as follows: • A theoretical result (Lemma 4) that upper bounds the conditional mutual information of arbitrarily large sets of random variables in polynomial time. In particular, we do not assume that an efficiently computable mutual information oracle exists. • The first polynomial algorithm for PAC-learning the structure of limited-treewidth junction trees with strong intra-clique dependencies. We provide graceful degradation guarantees for distributions that are only approximately representable by JTs with fixed treewidth. 1 x1,x4,x5 x1,x2,x5 x2,x3,x5 x1,x2,x7 x4,x5,x6 4 1 5 3 2 x1,x5 x4,x5 x1,x2 x2,x5 Figure 1: A junction tree. Rectangles denote cliques, separators are marked on the edges. Algorithm 1: Na¨ıve approach to structure learning Input: V , oracle I (·, · | ·), treewidth k, threshold δ L ←∅; // L is a set of “useful components” 1 for S ⊂V s.t. |S| = k do 2 for Q ⊂V-S do 3 if I (Q, V-SQ | S) ≤δ then 4 L ←L ∪(S, Q) 5 return FindConsistentTree(L) 6 • A lazy heuristics that allows to make the algorithm practical. • Empirical evidence of the viability of our approach on real-world datasets. 2 Bounded treewidth graphical models In general, even to represent a probability distribution P(V ) over discrete variables1 V we need space exponential in the size n of V . However, junction trees of limited treewidth allow compact representation and tractable exact inference. We briefly review junction trees (for details see [7]). Let C = {C1, . . . , Cm} be a collection of subsets of V . Elements of C are called cliques. Let T be a set of edges connecting pairs of cliques such that (T, C) is a tree. Definition 1. Tree (T, C) is a junction tree iff it satisfies the running intersection property (RIP): ∀Ci, Cj ∈C and ∀Ck on the (unique) simple path between Ci and Cj, x ∈Ci ∩Cj ⇒x ∈Ck. A set Sij ≡Ci ∩Cj is called the separator corresponding to an edge (i−j) from T. The size of a largest clique in a junction tree minus one is called the treewidth of that tree. For example, in a junction tree in Fig. 1, variable x2 is contained in both clique 3 and 5, so it has to be contained in clique 2, because 2 is on the simple path between 3 and 5. The largest clique in Fig. 1 has size 3, so the treewidth of that junction tree is 2. A distribution P(V ) is representable using junction tree (T, C) if instantiating all variables in a separator Sij renders the variables on different sides of Sij independent. Denote the fact that A is independent of B given C by (A⊥B |C). Let Ci ij be cliques that can be reached from Ci in the (T, C) without using edge (i−j), and denote these reachable variables by V i ij ≡V i ji ≡S Ck∈Ci ij Ck \ Sij. For example, in Fig. 1, S12 = {x1, x5}, V 1 12 = {x4, x6} , V 2 12 = {x2, x3, x7}. Definition 2. P(V ) factors according to junction tree (T, C) iff ∀(i −j) ∈T,  V i ij ⊥V j ij | Sij  . If a distribution P(V ) factors according to some junction tree of treewidth k, we will say that P(V ) is k-JT representable. In this case, a projection P(T,C) of P on (T, C), defined as P(T,C) = Q Ci∈C P(Ci) Q (i−j)∈T P(Sij), (1) is equal to P itself. For clarity, we will only consider maximal junction trees, where all separators have size k. If P is k-JT representable, it also factors according to some maximal JT of treewidth k. In practice the notion of conditional independence is too strong. Instead, a natural relaxation is to require sets of variables to have low conditional mutual information I. Denote H(A) the entropy of A, then I(A,B | S) ≡H(A | S)−H(A | BS) is nonnegative, and zero iff (A ⊥B | S). Intuitively, I (A, B |S) shows how much new information about A can we extract from B if we already know S. Definition 3. (T, C) is an ε-junction tree for P(V ) iff ∀(i −j) ∈T : I  V i ij, V j ij | Sij  ≤ε. 1Notation note: throughout the paper, we use small letters (x, y) to denote variables, capital letters (V, C) to denote sets of variables, and double-barred font (C, D) to denote sets of sets. 2 If there exists an ε-junction tree (T, C) for P(V ), we will say that P is k-JT ε-representable. In this case, the Kullback-Leibler divergence of projection (1) of P on (T, C) from P is bounded [13]: KL P, P(T,C)  ≤nε. (2) This bound means that if we have an ε-junction tree for P(V ), then instead of P we can use its tractable principled approximation P(T,C) for inference. In this paper, we address the problem of learning structure of such junction tree from data (samples from P). 3 Structure learning In this paper, we address the following problem: given data, such as multiple temperature readings from sensors in a sensor network, we treat each datapoint as an instantiation of the random variables V and seek to find a good approximation of P(V ). We will assume that P(V ) is k-JT ε-representable for some ε and aim to find a ˆε-junction tree for P with the same treewidth k and with ˆε as small as possible. Note that the maximal treewidth k is considered to be a constant and not a part of problem input. The complexity of our approach is exponential in k. Algorithm 2: LTCI: find Conditional Independencies in Low-Treewidth distributions Input: V , separator S, oracle I (·, · | ·), threshold δ, max set size q QS ←∪x∈V {x} ; // QS is a set of singletons 1 for A ⊂V-S s.t. |A| ≤q do 2 if minX⊂A I (X, A-X | S) > δ then 3 // find min with Queyranne’s alg. merge all Qi ∈QS, s.t. Qi ∩A ̸= ∅ 4 return QS 5 Let us initially assume that we have an oracle I (·, · | ·) that can compute the mutual information I (A, B | C) exactly for any disjoint subsets A, B, C ⊂V . This is a very strict requirement, which we address in the next section. Using the oracle I, a na¨ıve approach would be to evaluate2 I(Q, V-QS | S) for all possible Q, S ⊂V s.t. |S| = k and record all pairs (S, Q) with I(Q, V-QS | S) ≤ε into a list L. We will say that a junction tree (T, C) is consistent with a list L iff for every separator Sij of (T, C) it holds that (Sij, V i ij) ∈L. After L is formed, any junction tree consistent with L would be an ε-junction tree for P(V ). Such tree would be found by some FindConsistentTree procedure, implemented, e.g., using constraint satisfaction. Alg. 1 summarizes this idea. Algorithms that follow this outline, including ours, form a class of constraint-based approaches. These algorithms use mutual information tests to constrain the set of possible structures and return one that is consistent with the constraints. Unfortunately, using Alg. 1 directly is impractical because its complexity is exponential in the total number of variables n. In the following sections we discuss inefficiencies of Alg. 1 and present efficient solutions. 3.1 Global independence assertions from local tests One can see two problems with the inner loop of Alg. 1 (lines 3-5). First, for each separator we need to call the oracle exponentially many times (2n−k−1, once for every Q ⊂V-S). This drawback is addressed in the next section. Second, the mutual information oracle, I (A, B | S), is called on subsets A and B of size O(n). Unfortunately, the best known way of computing mutual information (and estimating I from data) has time and sample complexity exponential in |A|+|B|+|S|. Previous work has not addressed this problem. In particular, the approach of [13] has exponential complexity, in general, because it needs to estimate I for subsets of size O(n). Our first new result states that we can limit ourselves to computing mutual information over small subsets of variables: Lemma 4. Let P(V ) be a k-JT ε-representable distribution. Let S ⊂V , A ⊂V-S. If ∀X ⊆V-S s.t. |X| ≤k + 1, it holds that I(A ∩X, V-SA ∩X | S) ≤δ, then I(A, V-SA | S) ≤n(ε + δ). We can thus compute an upper bound on I(A, V-SA | S) using O n k  ≡O(nk) (i.e., polynomially many) calls to the oracle I (·, · | ·), and each call will involve at most |S|+k+1 variables. Lemma 4 also bounds the quality of approximation of P by a projection on any junction tree (T, C): Corollary 5. If conditions of Lemma 4 hold for P(V ) with S = Sij and A = V i ij for every separator Sij of a junction tree (T, C), then (T, C) is a n(ε + δ)-junction tree for P(V ). 3.2 Partitioning algorithm for weak conditional independencies Now that we have an efficient upper bound for I (·, · | ·) oracle, let us turn to reducing the number of oracle calls by Alg. 1 from exponential (2n−k−1) to polynomial. In [13], Narasimhan and Bilmes 2Notation note: for any sets A, B, C we will denote A \ (B ∪C) as A-BC to lighten the notation. 3 Algorithm 3: Efficient approach to structure learning Input: V , oracle I (·, · | ·), treewidth k, threshold ε, L = ∅ for S ⊂V s.t. |S| = k do 1 for Q ∈LTCI(V ,S,I,ε,k + 2) do 2 L ←L ∪(S, Q) 3 return FindConsistentTreeDPGreedy(L) 4 Algorithm 4: FindConsistentTreeDPGreedy Input: List L of components (S, Q) for (S, Q) ∈L in the order of increasing |Q| do 1 greedily check if (S, Q) is L-decomposable 2 record the decomposition if it exists 3 if ∃S : (S, V-S) is L-decomposable then 4 return corresponding junction tree 5 else return no tree found 6 present an approximate solution to this problem, assuming that an efficient approximation of oracle I (·, · | ·) exists. A key observation that they relied on is that the function FS(A) ≡I (A, V-SA | S) is submodular: FS(A)+FS(B) ≥FS(A∪B)+FS(A∩B). Queyranne’s algorithm [14] allows the minimization of a submodular function F using O(n3) evaluations of F. [13] combines Queyranne’s algorithm with divide-and-conquer approach to partition V-S into conditionally independent subsets using O(n3) evaluations of I (·, · | ·). However, since I (·, · | ·) is computed for sets of size O(n), complexity of their approach is still exponential in n, in general. Our approach, called LTCI (Alg. 2), in contrast, has polynomial complexity for q = O(1). We will show that q = O(1) in our approach that uses LTCI as a subroutine. To gain intuition for LTCI, suppose there exists a ε-junction tree for P(V ), such that S is a separator and subsets B and C are on different sides of S in the junction tree. By definition, this means I (B, C | S) ≤ε. When we look at subset A ≡B ∪C, the true partitioning is not known, but setting δ = ε, we can test all possible 2|A|−1 ways to partition A into two subsets (X and A-X). If none of the possible partitionings have I (X, A-X | S) ≤ε, we can conclude that all variables in A are on the same side of separator S in any ε-junction tree that includes S as a separator. Notice also that ∀X ⊂A I (X, A-X | S) > δ ⇔min X⊂A I (X, A-X | S) > δ, so we can use Queyranne’s algorithm to evaluate I (·, · | ·) only O(|A|3) times instead of 2|A|−1 times for minimization by exhaustive search. LTCI initially assumes that every variable x forms its own partition Q = {x}. If a test shows that two variables x and y are on the same side of the separator, it follows that their container partitions Q1 ∋x, Q2 ∋y cannot be separated by S, so LTCI merges Q1 and Q2 (line 3 of Alg. 2). This process is then repeated for larger sets of variables, of size up to q, until we converge to a set of partitions that are “almost independent” given S. Proposition 6. The time complexity of LTCI with |S| = k is O n q  nJMI k+q  ≡O  nq+1JMI k+q  , where JMI k+q is the time complexity of computing I (A, B | C) for |A| + |B| + |C| = k + q. It is important that the partitioning algorithm returns partitions that are similar to connected components of V i ij of the true junction tree for P(V ). Formally, let us define two desirable properties. Suppose (T, C) is an ε-junction tree for P(V ), and QSij is an output of the algorithm for separator Sij and threshold δ. We will say that partitioning algorithm is correct iff for δ = ε, ∀Q ∈QSij either Q ⊆V i ij or Q ⊆V j ij. A correct algorithm will never mistakenly put two variables on the same side of a separator. We will say that an algorithm is α-weak iff ∀Q ∈QSij I Q, V-QSij | Sij  ≤α. For small α, an α-weak algorithm puts variables on different sides of a separator only if corresponding mutual information between those variables is not too large. Ideally, we want a correct and δ-weak algorithm; for δ = ε it would separate variables that are on different sides of S in a true junction tree, but not introduce any spurious independencies. LTCI, which we use instead of lines 3-5 in Alg. 1, satisfies the first requirement and a relaxed version of the second: Lemma 7. LTCI, for q ≥k + 1, is correct and n(ε + (k −1)δ)-weak. 3.3 Implementing FindConsistentTree using dynamic programming A concrete form of FindConsistentTree procedure is the last step needed to make Alg. 1 practical. For FindConsistentTree, we adopt a dynamic programming approach from [2] that was also used in [13] for the same purpose. We briefly review the intuition; see [2] for details. Consider a junction tree (T, C). Let Sij be a separator in (T, C) and Ci ij be the set of cliques reachable from Ci without using edge (i −j). Denote T i ij the set of edges from T that connect 4 cliques from Ci ij. If (T, C) is an ε-junction tree for P(V ), then (Ci ij, T i ij) is an ε-junction tree for P(V i ij ∪Sij). Moreover, the subtree (Ci ij, T i ij) consists of a clique Ci and several sub-subtrees that are each connected to Ci. For example, in Fig. 1 the subtree over cliques 1,2,4,5 can be decomposed into clique 2 and two sub-subtrees: one including cliques {1,4} and one with clique 5. The recursive structure suggests dynamic programming approach: given a component (S, Q) such that I (Q, V-QS | S) < δ, check if smaller subtrees can be put together to cover the variables of (S, Q). Formally, we require the following property: Definition 8. (S, Q) ∈L is L-decomposable iff ∃D = ∪i{(Si, Qi)}, x ∈Q s.t. 1. ∀i(Si, Qi) is L-decomposable and ∪m i=1Qi = Q \ {x}; 2. Si ⊂S ∪{x}, i.e., each subcomponent can be connected directly to the clique (S, x); 3. Qi ∩Qj = ∅, ensuring the running intersection property within the subtree over S ∪Q. The set {(S1, Q1), . . . , (Sm, Qm)} is called a decomposition of (S, Q). Unfortunately, checking whether a decomposition exists is equivalent to an NP-complete exact set cover problem because of the requirement Qi ∩Qj = ∅in part 3 of Def. 8. Unfortunately, this challenging issue was not addressed by [13], where the same algorithm was used. To keep complexity polynomial, we use a simple greedy approach: for every x ∈Qi, starting with an empty candidate decomposition D, add (Si, Qi) ∈L to D if the last two properties of Def. 8 hold for (Si, Qi). If eventually Def. 8 holds, return the decomposition D, otherwise return that no decomposition exists. We call the resulting procedure FindConsistentTreeDPGreedy. Proposition 9. For separator size k, time complexity of FindConsistentTreeDPGreedy is O(nk+2) Combining Alg. 2 and FindConsistentTreeDPGreedy, we arrive at Alg. 3. Overall complexity of Alg. 3 is dominated by Alg. 2 and is equal to O(n2k+3JMI 2k+2). In general, FindConsistentTreeDP with greedy decomposition checks may miss a junction tree that is consistent with the list of components L, but there is a class of distributions for which Alg. 3 is guaranteed to find a junction tree. Intuitively, we require that for every (Sij, V i ij) from a ε-junction tree (T, C), Alg. 2 adds all the components from decomposition of (Sij, V i ij) to L and nothing else. This requirement is guaranteed for distributions where variables inside every clique of the junction tree are sufficiently strongly interdependent (have a certain level of mutual information): Lemma 10. If ∃an ε-JT (T, C) for P(V ) s.t. no two edges of T have the same separator, and for every separator S, clique C ∈C, minX⊂C-S I (X, C-XS | S) > (k + 3)ε (we will call (T, C) (k + 3)ε-strongly connected), then Alg. 3, called with δ = ε, will output a nkε-JT for P(V ). 4 Sample complexity So far we have assumed that a mutual information oracle I (·, · | ·) exists for the distribution P(V ) and can be efficiently queried. In real life, however, one only has data (i.e., samples from P(V )) to work with. However, we can get a probabilistic estimate of I (A, B | C), that has accuracy ±∆ with probability 1 −γ, using number of samples and computation time polynomial in 1 ∆and log 1 γ : Theorem 11. (H¨offgen, [9]). The entropy of a probability distribution over 2k + 2 discrete variables with domain size R can be estimated with accuracy ∆with probability at least (1 −γ) using F(k, R, ∆, γ)≡O  R4k+4 ∆2 log2  R2k+2 ∆2  log  R2k+2 γ  samples from P and the same amount of time. If we employ this oracle in our algorithms, the performance guarantee becomes probabilistic: Theorem 12. If there exists a (k + 3)(ε + 2∆)-strongly connected ε-junction tree for P(V ), then Alg. 3, called with δ = ε+∆and ˆI (·, ·, ·) based on Thm. 11, using U ≡F(k, R, ∆, γ n2k+2 ) samples and O(n2k+3U) time, will find a kn(ε+2∆)-junction tree for P(V ) with probability at least (1−γ). Finally, if P(V ) is k-JT representable (i.e., ε = 0), and the corresponding junction tree is strongly connected, then we can let both ∆and γ go to zero and use Alg. 3 to find, with probability arbitrarily close to one, a junction tree that approximates P arbitrarily well in time polynomial in 1 ∆and log 1 γ , i.e., the class of strongly connected k-junction trees is probably approximately correctly learnable3. 3A class P of distributions is PAC learnable if for any P ∈P, δ > 0, γ > 0 a learning algorithm will output P ′ : KL(P, P ′) < δ with probability 1 −γ in time polynomial in 1 δ and log 1 γ . 5 Corollary 13. If there exists an α-strongly connected junction tree for P(V ) with α > 0, then for β < αn, Alg. 3 will learn a β-junction tree for P with probability at least 1 −γ using O  n4 β2 log2 n β log n γ  samples from P(V ) and O  n2k+7 β2 log2 n β log n γ  computation time. 5 Lazy evaluation of mutual information Alg. 3 requires the value of threshold δ as an input. To get tighter quality guarantees, we need to choose the smallest δ for which Alg. 3 finds a junction tree. A priori, this value is not known, so we need a procedure to choose the optimal δ. A natural way to select δ is binary search. For discrete random variables with domain size R, for any P(V ), S, x it holds that I (x, V-Sx |S) ≤logR, so for any δ > logR Alg. 3 is guaranteed to find a junction tree (with all cliques connected to the same separator). Thus, we can restrict binary search to range δ ∈[0, log R]. In binary search, for every value of δ, Alg. 2 checks the result of Queyranne’s algorithm minimizing minX⊂A I (X, A-X | S) for every |S| = k, |A| ≤k+2, which amounts to O(n2k+2) complexity per value of δ. It is possible, however, to find the optimal δ while only checking minX⊂A I (X, A-X | S) for every S and A once over the course of the search process. Intuitively, think of the set of partitions QS in Alg. 2 as a set of connected components of a graph with variables as vertices, and a hyper-edge connecting all variables from A whenever minX⊂A I (X, A-X | S) > δ. As δ increases, some of the hyper-edges disappear, and the number of connected components (or independent sets) may increase. More specifically, a graph QS is maintained for each separator S. For all S, A add a hyper-edge connecting all variables in A annotated with strengthS(A) ≡ minX⊂A I (X, A-X | S) to QS. Until FindConsistentTree(∪SQS) returns a tree, increase δ to be minS,A:hyperedgeS(A)∈QS strengthS(A) (i.e., strength of the weakest remaining hyper-edge), and remove hyperedgeS(A) from QS. Fig. 2(a) shows an example evolution of Qx4 for k = 1. To further save computation time, we exploit two observations: First, if A is a subset of a connected component Q ∈QS, adding hyperedgeS(A) to QS will not change QS. Thus, we do not test any hyper-edge A which is contained in a connected component. However, as δ increases, a component may become disconnected, because such an edge was not added. Therefore, we may have more components than we should (inducing incorrect independencies). This issue is addressed by our second insight: If we find a junction tree for a particular value of δ, we only need to recheck the components used in this tree. These insights lead to a simple, lazy procedure: If FindConsistentTree returns a tree (T, C), we check the hyper-edges that intersect the components used to form (T, C). If none of these edges are added, then we can return (T, C) for this value of δ. Otherwise, some of QS have changed; we can iterate this procedure until we find a solution. 6 Evaluation To evaluate our approach, we have applied it to two real-world (sensor network temperature [8] and San Francisco Bay area traffic [11]) and one artificial (samples from ALARM Bayesian network [4]) datasets. Our implementation, called LPACJT, uses lazy evaluations of I (·, · | ·) from section 5. As baselines for comparison, we used a simple hill-climbing heuristic4, a combination of LPACJT with hill-climbing, where intermediate results returned by FindConsistentTree were used as starting points for hill-climbing, Chow-Liu algorithm, and algorithms of [10] (denoted Karger-Srebro) and [17] (denoted OBS). All experiments were run on a Pentium D 3.4 GHz, with runtimes capped to 10 hours. The necessary entropies were cached in advance. ALARM. This discrete-valued data was sampled from a known Bayesian network with treewidth 4. We learned models with treewidth 3 because of computational concerns. Fig. 2(b) shows the perpoint log-likelihood of learned models on test data depending on the amount of training data. We see that on small training datasets both LPACJT finds better models than a basic hill-climbing approach, but worse than the OBS of [17] and Chow-Liu. The implementation of OBS was the only one to use regularization, so this outcome can be expected. We can also conclude that on this dataset our approach overfits than hill-climbing. For large enough training sets, LPACJT results achieve the likelihood of the true model, despite being limited to models with smaller treewidth. Chow-Liu performs much worse, since it is limited to models with treewidth 1. Fig. 2(c) shows an example of a structure found by LPACJT for ALARM data. LPACJT only missed 3 edges of the true model. 4Hill-climbing had 2 kinds of moves available: replace variable x with variable y in a connected subjunction tree, or relpace a leaf clique Ci with another clique (Ci \ Sij) ∪Smr connected to a separator Smr. 6 x1 0.2 x3 x2 0.4 x1 x3 x2 x1 x3 x2 1.0 = δ 2.0 = δ 4.0 = δ 0.4 0.1 x1 0.2 x3 x2 0.4 0 = δ (a) Example QS evolution 10 2 10 3 10 4 −30 −25 −20 −15 Training set size Log−likelihood ALARM Local LPACJT+Local Karger−Srebro Chow−Liu LPACJT OBS True model (b) ALARM - loglikelihood (c) ALARM - structure 10 2 10 3 10 4 −80 −70 −60 −50 −40 Training set size Log−likelihood Temperature OBS Karger−Srebro LPACJT LPACJT+Local Local Chow−Liu (d) TEMPERATURE loglikelihood 0 1 2 3 x 10 4 −48 −47 −46 Time, seconds Log−Likelihood TEMPERATURE sample run, 2K training points LPACJT (e) TEMPERATURE sample run 10 2 10 3 −60 −50 −40 −30 Training set size Log−likelihood TRAFFIC LPACJT LPACJT+Local Local Karger−Srebro OBS Chow−Liu (f) TRAFFIC loglikelihood Figure 2: An example of evolution of QS for section 5 (2(a)), one structure learned by LPACJT(2(c)), experimental results (2(b),2(d),2(f)), and an example evolution of the test set likelihood of the best found model (2(e)). In 2(c), nodes denote variables, edges connect variables that belong to the same clique, green edges belong to both true and learned models, blue edges belong only to the learned model, red - only to the true one. TEMPERATURE. This data is from a 2-month deployment of 54 sensor nodes (15K datapoints) [8]. Each variable was discretized into 4 bins and we learned models of treewidth 2. Since the locations of the sensor have an ∞-like shape with two loops, the problem of learning a thin junction tree for this data is hard. In Fig. 2(d) one can see that LPACJT performs almost as good as hill-climbing-based approaches, and, on large training sets, much better than Karger-Srebro algorithm. Again, as expected, LPACJT outperforms Chow-Liu algorithm by a significant margin if there is enough data available, but overfits on the smallest training sets. Fig 2(e) shows the evolution of the test set likelihood of the best (highest training set likelihood) structure identified by LPACJT over time. The first structure was identified within 5 minutes, and the final result within 1 hour. TRAFFIC. This dataset contains traffic flow information measured every 5 minutes in 8K locations in California for 1 month [11]. We selected 32 locations in San Francisco Bay area for the experiments, discretized traffic flow values into 4 bins and learned models of treewidth 3. All nonregularized algorithms, including LPACJT, give results of essentially the same quality. 7 Relation to prior work and conclusions For a brief overview of the prior work, we refer the reader to Fig. 3. Most closely related to LPACJT are learning factor graphs of [1] and learning limited-treewidth Markov nets of [13, 10]. Unlike our approach, [1] does not guarantee low treewidth of the result, instead settling for compactness. [13, 10] guarantee low treewidth. However, [10] only guarantees that the difference of the log-likelihood of the result from the fully independent model is within a constant factor from the difference of the most likely JT: LLH(optimal) −LLH(indep.) ≤8kk!2(LLH(learned) −LLH(indep.)). [13] has exponential complexity. Our approach has polynomial complexity and quality guarantees that hold for strongly connected k-JT ε-representable distributions, while those of [13] only hold for ε = 0. We have presented the first truly polynomial algorithm for learning junction trees with limited treewidth. Based on a new upper bound for conditional mutual information that can be computed using polynomial time and number of samples, our algorithm is guaranteed to find a junction tree that is close in KL divergence to the true distribution, for strongly connected k-JT ε-representable distributions. As a special case of these guarantees, we show PAC-learnability of strongly connected k-JT representable distributions. We believe that the new theoretical insights herein provide significant step in the understanding of structure learning in graphical models, and are useful for the analysis of other approaches to the problem. In addition to the theory, we have also demonstrated experimentally that these theoretical ideas are viable, and can, in the future, be used in the development of fast and effective structure learning heuristics. 7 approach model class guarantees true distribution samples time reference score tractable local any any poly† [3, 5] score tree global any any O(n2) [6] score tree mixture local any any O(n2)† [12] score compact local any any poly† [17] score all global any any exp [15] score tractable const-factor any any poly [10] constraint compact PAC◦ positive poly poly [1] constraint all global any ∞ poly(tests) [16] constraint tractable PAC strong k-JT exp‡ exp‡ [13] constraint tractable PAC§ strong k-JT poly poly this paper Figure 3: Prior work. The majority of the literature can be subdivided into score-based [3, 5, 6, 12, 15, 10] and constraint-based [13, 16, 1] approaches. The former try to maximize some target function, usually regularized likelihood, while the latter perform conditional independence tests and restrict the set of candidate structures to those consistent with the results of the tests. Tractable means that the result is guaranteed to be of limited treewidth, compact - with limited connectivity of the graph. Guarantees column shows whether the result is a local or global optimum, whether there are PAC guarantees, or whether the difference of the log-likelihood of the result from the fully independent model is within a const-factor from the difference of the most likely JT. True distribution shows for what class of distributions the guarantees hold. † superscript means per-iteration complexity, poly - O(nO(k)), exp‡ - exponential in general, but poly for special cases. PAC◦and PAC§ mean PAC with (different) graceful degradation guarantees. 8 Acknowledgments This work is supported in part by NSF grant IIS-0644225 and by the ONR under MURI N000140710747. C. Guestrin was also supported in part by an Alfred P. Sloan Fellowship. We thank Nathan Srebro for helpful discussions, and Josep Roure, Ajit Singh, CMU AUTON lab, Mark Teyssier, Daphne Koller, Percy Liang and Nathan Srebro for sharing their source code. References [1] P. Abbeel, D. Koller, and A. Y. Ng. Learning factor graphs in polynomial time and sample complexity. JMLR, 7, 2006. [2] S. Arnborg, D. G. Corneil, and A. Proskurowski. Complexity of finding embeddings in a k-tree. SIAM Journal on Algebraic and Discrete Methods, 8(2):277–284, 1987. [3] F. R. Bach and M. I. Jordan. Thin junction trees. In NIPS, 2002. [4] I. Beinlich, J. Suermondt, M. Chavez, and G. Cooper. The ALARM monitoring system: A case study with two probablistic inference techniques for belief networks. In Euro. Conf. on AI in Medicine, 1988. [5] A. Choi, H. Chan, and A. Darwiche. On Bayesian network approximation by edge deletion. In UAI, 2005. [6] C. Chow and C. Liu. Approximating discrete probability distributions with dependence trees. IEEE Transactions on Information Theory, 14(3):462–467, 1968. [7] R. G. Cowell, P. A. Dawid, S. L. Lauritzen, and D. J. Spiegelhalter. Probabilistic Networks and Expert Systems (Information Science and Statistics). Springer, May 2003. [8] A. Deshpande, C. Guestrin, S. Madden, J. Hellerstein, and W. Hong. Model-driven data acquisition in sensor networks. In VLDB, 2004. [9] K. U. H¨offgen. Learning and robust learning of product distributions. In COLT, 1993. [10] D. Karger and N. Srebro. Learning Markov networks: Maximum bounded tree-width graphs. SODA-01. [11] A. Krause and C. Guestrin. Near-optimal nonmyopic value of information in graphical models. UAI-05. [12] M. Meil˘a and M. I. Jordan. Learning with mixtures of trees. JMLR, 1:1–48, 2001. [13] M. Narasimhan and J. Bilmes. PAC-learning bounded tree-width graphical models. In UAI, 2004. [14] M. Queyranne. Minimizing symmetric submodular functions. Math. Programming, 82(1):3–12, 1998. [15] A. Singh and A. Moore. Finding optimal Bayesian networks by dynamic programming. Technical Report CMU-CALD-05-106, Carnegie Mellon University, Center for Automated Learning and Discovery, 2005. [16] P. Spirtes, C. Glymour, and R. Scheines. Causation, Prediction, and Search. MIT Press, 2001. [17] M. Teyssier and D. Koller. Ordering-based search: A simple and effective algorithm for learning Bayesian networks. In UAI, 2005. 8
2007
10
3,126
Sparse Overcomplete Latent Variable Decomposition of Counts Data Madhusudana Shashanka Mars, Incorporated Hackettstown, NJ shashanka@cns.bu.edu Bhiksha Raj Mitsubishi Electric Research Labs Cambridge, MA bhiksha@merl.com Paris Smaragdis Adobe Systems Newton, MA paris@adobe.com Abstract An important problem in many fields is the analysis of counts data to extract meaningful latent components. Methods like Probabilistic Latent Semantic Analysis (PLSA) and Latent Dirichlet Allocation (LDA) have been proposed for this purpose. However, they are limited in the number of components they can extract and lack an explicit provision to control the “expressiveness” of the extracted components. In this paper, we present a learning formulation to address these limitations by employing the notion of sparsity. We start with the PLSA framework and use an entropic prior in a maximum a posteriori formulation to enforce sparsity. We show that this allows the extraction of overcomplete sets of latent components which better characterize the data. We present experimental evidence of the utility of such representations. 1 Introduction A frequently encountered problem in many fields is the analysis of histogram data to extract meaningful latent factors from it. For text analysis where the data represent counts of word occurrences from a collection of documents, popular techniques available include Probabilistic Latent Semantic Analysis (PLSA; [6]) and Latent Dirichlet Allocation (LDA; [2]). These methods extract components that can be interpreted as topics characterizing the corpus of documents. Although they are primarily motivated by the analysis of text, these methods can be applied to analyze arbitrary count data. For example, images can be interpreted as histograms of multiple draws of pixels, where each draw corresponds to a “quantum of intensity”. PLSA allows us to express distributions that underlie such count data as mixtures of latent components. Extensions to PLSA include methods that attempt to model how these components co-occur (eg. LDA, Correlated Topic Model [1]). One of the main limitations of these models is related to the number of components they can extract. Realistically, it may be expected that the number of latent components in the process underlying any dataset is unrestricted. However, the number of components that can be discovered by LDA or PLSA is restricted by the cardinality of the data, e.g. by the vocabulary of the documents, or the number of pixels of the image analyzed. Any analysis that attempts to find an overcomplete set of a larger number of components encounters the problem of indeterminacy and is liable to result in meaningless or trivial solutions. The second limitation of the models is related to the “expressiveness” of the extracted components i.e. the information content in them. Although the methods aim to find “meaningful” latent components, they do not actually provide any control over the information content in the components. In this paper, we present a learning formulation that addresses both these limitations by employing the notion of sparsity. Sparse coding refers to a representational scheme where, of a set of components that may be combined to compose data, only a small number are combined to represent any particular instance of the data (although the specific set of components may change from instance to 1 instance). In our problem, this translates to permitting the generating process to have an unrestricted number of latent components, but requiring that only a small number of them contribute to the composition of the histogram represented by any data instance. In other words, the latent components must be learned such that the mixture weights with which they are combined to generate any data have low entropy – a set with low entropy implies that only a few mixture weight terms are significant. This addresses both the limitations. Firstly, it largely eliminates the problem of indeterminacy permitting us to learn an unrestricted number of latent components. Secondly, estimation of low entropy mixture weights forces more information on to the latent components, thereby making them more expressive. The basic formulation we use to extract latent components is similar to PLSA. We use an entropic prior to manipulate the entropy of the mixture weights. We formulate the problem in a maximum a posteriori framework and derive inference algorithms. We use an artificial dataset to illustrate the effects of sparsity on the model. We show through simulations that sparsity can lead to components that are more representative of the true nature of the data compared to conventional maximum likelihood learning. We demonstrate through experiments on images that the latent components learned in this manner are more informative enabling us to predict unobserved data. We also demonstrate that they are more discriminative than those learned using regular maximum likelihood methods. We then present conclusions and avenues for future work. 2 Latent Variable Decomposition Consider an F × N count matrix V. We will consider each column of V to be the histogram of an independent set of draws from an underlying multinomial distribution over F discrete values. Each column of V thus represents counts in a unique data set. Vfn, the f th row entry of Vn, the nth column of V, represents the count of f (or the f th discrete symbol that may be generated by the multinomial) in the nth data set. For example, if the columns of V represent word count vectors for a collection of documents, Vfn would be the count of the f th word of the vocabulary in the nth document in the collection. We model all data as having been generated by a process that is characterized by a set of latent probability distributions that, although not directly observed, combine to compose the distribution of any data set. We represent the probability of drawing f from the zth latent distribution by P(f|z), where z is a latent variable. To generate any data set, the latent distributions P(f|z) are combined in proportions that are specific to that set. Thus, each histogram (column) in V is the outcome of draws from a distribution that is a column-specific composition of P(f|z). We can define the distribution underlying the nth column of V as Pn(f) = X z P(f|z)Pn(z), (1) where Pn(f) represents the probability of drawing f in the nth data set in V, and Pn(z) is the mixing proportion signifying the contribution of P(f|z) towards Pn(f). Equation 1 is functionally identical to that used for Probabilistic Latent Semantic Analysis of text data [6]1: if the columns Vn of V represent word count vectors for documents, P(f|z) represents the zth latent topic in the documents. Analogous interpretations may be proposed for other types of data as well. For example, if each column of V represents one of a collection of images (each of which has been unraveled into a column vector), the P(f|z)’s would represent the latent “bases” that compose all images in the collection. In maintaining this latter analogy, we will henceforth refer to P(f|z) as the basis distributions for the process. Geometrically, the normalized columns of V (obtained by scaling the entries of Vn to sum to 1.0), ¯Vn, which we refer to as data distributions, may be viewed as F-dimensional vectors that lie in an (F −1) simplex. The distributions Pn(f) and basis distributions P(f|z) are also F-dimensional vectors in the same simplex. The model expresses Pn(f) as points within the convex hull formed by the basis distributions P(f|z). The aim of the model is to determine P(f|z) such that the model 1PLSA actually represents the joint distribution of n and f as P(n, f) = P(n) P z P(f|z)P(z|n). However the maximum likelihood estimate of P(n) is simply the fraction of all observations from all data sets that occurred in the nth data set and does not affect the estimation of P(f|z) and P(z|n). 2 Simplex Boundary Data Points Basis Vectors Approximation (001) (010) (100) 2 Basis Vectors Simplex Boundary Data Points Basis Vectors Convex Hull (001) (010) (100) 3 Basis Vectors Figure 1: Illustration of the latent variable model. Panels show 3-dimensional data distributions as points within the Standard 2-Simplex given by {(001), (010), (100)}. The left panel shows a set of 2 Basis distributions (compact code) derived from the 400 data points. The right panel shows a set of 3 Basis distributions (complete code). The model approximates data distributions as points lying within the convex hull formed by the basis distributions. Also shown are two data points (marked by + and ×) and their approximations by the model (respectively shown by ♦and □). Pn(f) for any data distribution ¯Vn approximates it closely. Since Pn(f) is constrained to lie within the simplex defined by P(f|z), it can only model ¯Vn accurately if the latter also lies within the hull. Any ¯Vn that lies outside the hull is modeled with error. Thus, the objective of the model is to identify P(f|z) such that they form a convex hull surrounding the data distributions. This is illustrated in Figure 1 for a synthetic data set of 400 3-dimensional data distributions. 2.1 Parameter Estimation Given count matrix V, we estimate P(f|z) and Pn(z) to maximize the likelihood of V. This can be done through iterations of equations derived using the Expectation Maximization (EM) algorithm: Pn(z|f) = Pn(z)P(f|z) P z Pn(z)P(f|z), and (2) P(f|z) = P n VfnPn(z|f) P f P n VfnPn(z|f), Pn(z) = P f VfnPn(z|f) P z P f VfnPn(z|f) (3) Detailed derivation is shown in supplemental material. The EM algorithm guarantees that the above multiplicative updates converge to a local optimum. 2.2 Latent Variable Model as Matrix Factorization We can write the model given by equation (1) in matrix form as pn = Wgn, where pn is a column vector indicating Pn(f), gn is a column vector indicating Pn(z), and W is a matrix with the (f, z)th element corresponding to P(f|z). If we characterize V by R basis distributions, W is an F × R matrix. Concatenating all column vectors pn and gn as matrices P and G respectively, one can write the model as P = WG, where G is an R × N matrix. It is easy to show (as demonstrated in the supplementary material) that the maximum likelihood estimator for P(f|z) and Pn(z) attempts to minimize the Kullback-Leibler (KL) distance between the normalized data distribution Vn and Pn(f), weighted by the total count in Vn. In other words, the model of Equation (1) actually represents the decomposition V ≈WGD = WH (4) where D is an N × N diagonal matrix, whose nth diagonal element is the total number of counts in Vn and H = GD. The astute reader might recognize the decomposition of equation (4) as Nonnegative matrix factorization (NMF; [8]). In fact equations (2) and (3) can be shown to be equivalent to one of the standard update rules for NMF. Representing the decomposition in matrix form immediately reveals one of the shortcomings of the basic model. If R, the number of basis distributions, is equal to F, then a trivial solution exists that achieves perfect decomposition: W = I; H = V, where I is the identity matrix (although the algorithm may not always arrive at this solution). However, this solution is no longer of any utility to us since our aim is to derive basis distributions that are characteristic of the data, whereas the 3 Simplex Boundary Data Points Basis Vectors (001) (010) (100) A B C D E F G Enclosing triangles for ’+’: ABG, ABD, ABE, ACG, ACD, ACE, ACF Figure 2: Illustration of the effect of sparsifying H on the dataset shown in Figure 1. A-G represent 7 basis distributions. The ‘+’ represents a typical data point. It can be accurately represented by any set of three or more bases that form an enclosing polygon and there are many such polygons. However, if we restrict the number of bases used to enclose ‘+’ to be minimized, only the 7 enclosing triangles shown remain as valid solutions. By further imposing the restriction that the entropy of the mixture weights with which the bases (corners) must be combined to represent ‘+’ must be minimum, only one triangle is obtained as the unique optimal enclosure. columns of W in this trivial solution are not specific to any data, but represent the dimensions of the space the data lie in. For overcomplete decompositions where R > F, the solution becomes indeterminate – multiple perfect decompositions are possible. The indeterminacy of the overcomplete decomposition can, however, be greatly reduced by imposing a restriction that the approximation for any ¯Vn must employ minimum number of basis distributions required. By further imposing the constraint that the entropy of gn must be minimized, the indeterminacy of the solution can often be eliminated as illustrated by Figure 2. This principle, which is related to the concept of sparse coding [5], is what we will use to derive overcomplete sets of basis distributions for the data. 3 Sparsity in the Latent Variable Model Sparse coding refers to a representational scheme where, of a set of components that may be combined to compose data, only a small number are combined to represent any particular input. In the context of basis decompositions, the goal of sparse coding is to find a set of bases for any data set such that the mixture weights with which the bases are combined to compose any data are sparse. Different metrics have been used to quantify the sparsity of the mixture weights in the literature. Some approaches minimize variants of the Lp norm of the mixture weights (eg. [7]) while other approaches minimize various approximations of the entropy of the mixture weights. In our approach, we use entropy as a measure of sparsity. We use the entropic prior, which has been used in the maximum entropy literature (see [9]) to manipulate entropy. Given a probability distribution θ, the entropic prior is defined as Pe(θ) ∝e−αH(θ), where H(θ) = −P i θi log θi is the entropy of the distribution and α is a weighting factor. Positive values of α favor distributions with lower entropies while negative values of α favor distributions with higher entropies. Imposing this prior during maximum a posteriori estimation is a way to manipulate the entropy of the distribution. The distribution θ could correspond to the basis distributions P(f|z) or the mixture weights Pn(z) or both. A sparse code would correspond to having the entropic prior on Pn(z) with a positive value for α. Below, we consider the case where both the basis vectors and mixture weights have the entropic prior to keep the exposition general. 3.1 Parameter Estimation We use the EM algorithm to derive the update equations. Let us examine the case where both P(f|z) and Pn(z) have the entropic prior. The set of parameters to be estimated is given by Λ = {P(f|z), Pn(z)}. The a priori distribution over the parameters, P(Λ), corresponds to the entropic priors. We can write log P(Λ), the log-prior, as α X z X f P(f|z) log P(f|z) + β X n X z Pn(z) log Pn(z), (5) 4 (001) (010) (100) 3 Basis Vectors (100) (010) (001) 7 Basis Vectors (100) (010) (001) 10 Basis Vectors Sparsity Param = 0.01 7 Basis Vectors (100) (001) (010) 7 Basis Vectors Sparsity Param = 0.05 (100) (001) (010) Sparsity Param = 0.3 7 Basis Vectors (100) (001) (010) Figure 3: Illustration of the effect of sparsity on the synthetic data set from Figure 1. For visual clarity, we do not display the data points. Top panels: Decomposition without sparsity. Sets of 3 (left), 7 (center), and 10 (right) basis distributions were obtained from the data without employing sparsity. In each case, 20 runs of the estimation algorithm were performed from different initial values. The convex hulls formed by the bases from each of these runs are shown in the panels from left to right. Notice that increasing the number of bases enlarges the sizes of convex hulls, none of which characterize the distribution of the data well. Bottom panels: Decomposition with sparsity. The panels from left to right show the 20 sets of estimates of 7 basis distributions, for increasing values of the sparsity parameter for the mixture weights. The convex hulls quickly shrink to compactly enclose the distribution of the data. where α and β are parameters indicating the degree of sparsity desired in P(f|z) and Pn(z) respectively. As before, we can write the E-step as Pn(z|f) = Pn(z)P(f|z) P z Pn(z)P(f|z). (6) The M-step reduces to the equations ξ P(f|z) + α + α log P(f|z) + ρz = 0, ω Pn(z) + β + β log Pn(z) + τn = 0 (7) where we have let ξ represent P n VfnPn(z|f), ω represent P f VfnPn(z|f), and ρz, τn are Lagrange multipliers. The above M-step equations are systems of simultaneous transcendental equations for P(f|z) and Pn(z). Brand [3] proposes a method to solve such equations using the Lambert W function [4]. It can be shown that P(f|z) and Pn(z) can be estimated as ˆP(f|z) = −ξ/α W(−ξe1+ρz/α/α), ˆPn(z) = −ω/β W(−ωe1+τn/β/β). (8) Equations (7), (8) form a set of fixed-point iterations that typically converge in 2-5 iterations [3]. The final update equations are given by equation (6), and the fixed-point equation-pairs (7), (8). Details of the derivation are provided in supplemental material. Notice that the above equations reduce to the maximum likelihood updates of equations (2) and (3) when α and β are set to zero. More generally, the EM algorithm aims to minimize the KL distance between the true distribution of the data and that of the model, i.e. it attempts to arrive at a model that conserves the entropy of the data, subject to the a priori constraints. Consequently, reducing entropy of the mixture weights Pn(z) to obtain a sparse code results in increased entropy (information) of basis distributions P(f|z). 3.2 Illustration of the Effect of Sparsity The effect and utility of sparse overcomplete representations is demonstrated by Figure 3. In this example, the data (from Figure 1) have four distinct quadrilaterally located clusters. This structure cannot be accurately represented by three or fewer basis distributions, since they can, at best specify 5 A. Occluded Faces B. Reconstructions C. Original Test Images Figure 4: Application of latent variable decomposition for reconstructing faces from occluded images (CBCL Database). (A). Example of a random subset of 36 occluded test images. Four 6 × 6 patches were removed from the images in several randomly chosen configurations (corresponding to the rows). (B). Reconstructed faces from a sparse-overcomplete basis set of 1000 learned components (sparsity parameter = 0.1). (C). Original test images shown for comparison. a triangular simplex, as demonstrated by the top left panel in the figure. Simply increasing the number of bases without constraining the sparsity of the mixture weights does not provide meaningful solutions. However, increasing the sparsity quickly results in solutions that accurately characterize the distribution of the data. A clearer intuition is obtained when we consider the matrix form of the decomposition in Equation 4. The goal of the decomposition is often to identify a set of latent distributions that characterize the underlying process that generated the data V. When no sparsity is enforced on the solution, the trivial solution W = I, H = V is obtained at R = F. In this solution, the entire information in V is borne by H and the bases W becomes uninformative, i.e. they no longer contain information about the underlying process. However, by enforcing sparsity on H the information V is transferred back to W, and non-trivial solutions are possible for R > F. As R increases, however, W become more and more data-like. At R = N another trivial solution is obtained: W = V, and H = D (i.e. G = I). The columns of W now simply represent (scaled versions) of the specific data V rather than the underlying process. For R > N the solutions will now become indeterminate. By enforcing sparsity, we have thus increased the implicit limit on the number of bases that can be estimated without indeterminacy from the smaller dimension of V to the larger one. 4 Experimental Evaluation We hypothesize that if the learned basis distribution are characteristic of the process that generates the data, they must not only generalize to explain new data from the process, but also enable prediction of components of the data that were not observed. Secondly, the bases for a given process must be worse at explaining data that have been generated by any other process. We test both these hypotheses below. In both experiments we utilize images, which we interpret as histograms of repeated draws of pixels, where each draw corresponds to a quantum of intensity. 4.1 Face Reconstruction In this experiment we evaluate the ability of the overcomplete bases to explain new data and predict the values of unobserved components of the data. Specifically, we use it to reconstruct occluded portions of images. We used the CBCL database consisting of 2429 frontal view face images handaligned in a 19 × 19 grid. We preprocessed the images by linearly scaling the grayscale intensities so that pixel mean and standard deviation was 0.25, and then clipped them to the range [0, 1]. 2000 images were randomly chosen as the training set. 100 images from the remaining 429 were randomly chosen as the test set. To create occluded test images, we removed 6 × 6 grids in ten random configurations for 10 test faces each, resulting in 100 occluded images. We created 4 sets of test images, where each set had one, two, three or four 6 × 6 patches removed. Figure 4A represents the case where 4 patches were removed from each face. In a training stage, we learned sets of K ∈{50, 200, 500, 750, 1000} basis distributions from the training data. Sparsity was not used in the compact (R < F) case (50 and 200 bases) and sparsity 6 Basis Vectors Mixture Weights Pixel Image Basis Vectors Mixture Weights Pixel Image Figure 5: 25 Basis distributions (represented as images) extracted for class “2” from training data without sparsity on mixture weights (Left Panel, sparsity parameter = 0) and with sparsity on mixture weights (Right Panel, sparsity parameter = 0.2). Basis images combine in proportion to the mixture weights shown to result in the pixel images shown. β = 0 β = 0.2 β = 0.5 Figure 6: 25 basis distributions learned from training data for class “3” with increasing sparsity parameters on the mixture weights. The sparsity parameter was set to 0, 0.2 and 0.5 respectively. Increasing the sparsity parameter of mixture weights produces bases which are holistic representations of the input (histogram) data instead of parts-like features. was imposed (parameter = 0.1) on the mixture weights in the overcomplete cases (500, 750 and 1000 basis vectors). The procedure for estimating the occluded regions of the a test image has two steps. In the first step, we estimate the distribution underlying the image as a linear combination of the basis distributions. This is done by iterations of Equations 2 and 3 to estimate Pn(z) (the bases P(f|z), being already known, stay fixed) based only on the pixels that are observed (i.e. we marginalize out the occluded pixels). The combination of the bases P(f|z) and the estimated Pn(z) give us the overall distribution Pn(f) for the image. The occluded pixel values at any pixel f is estimated as the expected number of counts at the pixels, given by Pn(f)(P f ′∈{Fo} Vf ′)/(P f ′∈{Fo} Pn(f ′)) where Vf represents the value of the image at the f th pixel and {Fo} is the set of observed pixels. Figure 4B shows the reconstructed faces for the sparse-overcomplete case of 1000 basis vectors. Figure 7A summarizes the results for all cases. Performance is measured by mean Signal-to-Noise-Ratio (SNR), where SNR for an image was computed as the ratio of the sum of squared pixel intensities of the original image to the sum of squared error between the original image pixels and the reconstruction. 4.2 Handwritten Digit Classification In this experiment we evaluate the specificity of the bases to the process represented by the training data set, through a simple example of handwritten digit classification. We used the USPS Handwritten Digits database which has 1100 examples for each digit class. We randomly chose 100 examples from each class and separated them as the test set. The remaining examples were used for training. During training, separate sets of basis distributions P k(f|z) were learned for each class, where k represents the index of the class. Figure 5 shows 25 bases images extracted for the digit “2”. To classify any test image v, we attempted to compute the distribution underlying the image using the bases for each class (by estimating the mixture weights P k v (z), keeping the bases fixed, as before). The “match” of the bases to the test instance was indicated by the likelihood Lk of the image computed using P k(f) = P z P k(f|z)P k v (z) as Lk = P f vf log P k(f). Since we expect the bases for the true class of the image to best compose it, we expect the likelihood for the correct class to be maximum. Hence, the image v was assigned to the class for which likelihood was the highest. 7 50 200 500 750 1000 8 10 12 14 16 18 20 22 24 Number of Basis Components Mean SNR A. Reconstruction Experiment 1 patch 2 patches 3 patches 4 patches 0 0.05 0.1 0.2 0.3 2 2.5 3 3.5 4 4.5 5 Sparsity Parameter Percentage Error B. Classification Experiment 25 50 75 100 200 Figure 7: (A). Results of the face Reconstruction experiment. Mean SNR of the reconstructions is shown as a function of the number of basis vectors and the test case (number of deleted patches, shown in the legend). Notice that the sparse-overcomplete codes consistently perform better than the compact codes. (B). Results of the classification experiment. The legend shows number of basis distributions used. Notice that imposing sparsity almost always leads to better classification performance. In the case of 100 bases, error rate comes down by almost 50% when a sparsity parameter of 0.3 is imposed. Results are shown in Figure 7B. As one can see, imposing sparsity improves classification performance in almost all cases. Figure 6 shows three sets of basis distributions learned for class “3” with different sparsity values on the mixture weights. As the sparsity parameter is increased, bases tend to be holistic representations of the input histograms. This is consistent with improved classification performance - as the representation of basis distributions gets more holistic, the more unlike they become when compared to bases of other classes. Thus, there is a lesser chance that the bases of one class can compose an image in another class, thereby improving performance. 5 Conclusions In this paper, we have presented an algorithm for sparse extraction of overcomplete sets of latent distributions from histogram data. We have used entropy as a measure of sparsity and employed the entropic prior to manipulate the entropy of the estimated parameters. We showed that sparseovercomplete components can lead to an improved characterization of data and can be used in applications such as classification and inference of missing data. We believe further improved characterization may be achieved by the imposition of additional priors that represent known or hypothesized structure in the data, and will be the focus of future research. References [1] DM Blei and JD Lafferty. Correlated Topic Models. In NIPS, 2006. [2] DM Blei, AY Ng, and MI Jordan. Latent Dirichlet Allocation. Journal of Machine Learning Research, 3:993–1022, 2003. [3] ME Brand. Pattern Discovery via Entropy Minimization. In Uncertainty 99: AISTATS 99, 1999. [4] RM Corless, GH Gonnet, DEG Hare, DJ Jeffrey, and DE Knuth. On the Lambert W Function. Advances in Computational mathematics, 1996. [5] DJ Field. What is the Goal of Sensory Coding? Neural Computation, 1994. [6] T Hofmann. Unsupervised Learning by Probabilistic Latent Semantic Analysis. Machine Learning, 42:177–196, 2001. [7] PO Hoyer. Non-negative Matrix Factorization with Sparseness Constraints. Journal of Machine Learning Research, 5, 2004. [8] DD Lee and HS Seung. Algorithms for Non-negative Matrix Factorization. In NIPS, 2001. [9] J Skilling. Classic Maximum Entropy. In J Skilling, editor, Maximum Entropy and Bayesian Methods. Kluwer Academic, 1989. 8
2007
100
3,127
Modelling motion primitives and their timing in biologically executed movements Ben H Williams School of Informatics University of Edinburgh 5 Forrest Hill, EH1 2QL, UK ben.williams@ed.ac.uk Marc Toussaint TU Berlin Franklinstr. 28/29, FR 6-9 10587 Berlin, Germany mtoussai@cs.tu-berlin.de Amos J Storkey School of Informatics University of Edinburgh 5 Forrest Hill, EH1 2QL, UK a.storkey@ed.ac.uk Abstract Biological movement is built up of sub-blocks or motion primitives. Such primitives provide a compact representation of movement which is also desirable in robotic control applications. We analyse handwriting data to gain a better understanding of primitives and their timings in biological movements. Inference of the shape and the timing of primitives can be done using a factorial HMM based model, allowing the handwriting to be represented in primitive timing space. This representation provides a distribution of spikes corresponding to the primitive activations, which can also be modelled using HMM architectures. We show how the coupling of the low level primitive model, and the higher level timing model during inference can produce good reconstructions of handwriting, with shared primitives for all characters modelled. This coupled model also captures the variance profile of the dataset which is accounted for by spike timing jitter. The timing code provides a compact representation of the movement while generating a movement without an explicit timing model produces a scribbling style of output. 1 Introduction Movement planning and control is a very difficult problem in real-world applications. Current robots have very good sensors and actuators, allowing accurate movement execution, however the ability to organise complex sequences of movement is still far superior in biological organisms, despite being encumbered with noisy sensory feedback, and requiring control of many non-linear and variable muscles. The underlying question is that of the representation used to generate biological movement. There is much evidence to suggest that biological movement generation is based upon motor primitives, with discrete muscle synergies found in frog spines, (Bizzi et al., 1995; d’Avella & Bizzi, 2005; d’Avella et al., 2003; Bizzi et al., 2002), evidence of primitives being locally fixed (Kargo & Giszter, 2000), and modularity in human motor learning and adaption (Wolpert et al., 2001; Wolpert & Kawato, 1998). Compact forms of representation for any biologically produced data should therefore also be based upon primitive sub-blocks. 1 (A) (B) Figure 1: (A) A factorial HMM of a handwriting trajectory Yt. The parameters ¯λm t indicate the probability of triggering a primitive in the mth factor at time t and are learnt for one specific character. (B) A hierarchical generative model of handwriting where the random variable c indicates the currently written character and defines a distribution over random variables λm t via a Markov model over Gm. There are several approaches to use this idea of motion primitives for more efficient robotic movement control. (Ijspeert et al., 2003; Schaal et al., 2004) use non-linear attractor dynamics as a motion primitive and train them to generate motion that solves a specific task. (Amit & Matari´c, 2002) use a single attractor system and generate non-linear motion by modulating the attractor point. These approaches define a primitive as a segment of movement rather than understanding movement as a superposition of concurrent primitives. The goal of analysing and better understanding biological data is to extract a generative model of complex movement based on concurrent primitives which may serve as an efficient representation for robotic movement control. This is in contrast to previous studies of handwriting which usually focus on the problem of character classification rather than generation (Singer & Tishby, 1994; Hinton & Nair, 2005). We investigate handwriting data and analyse whether it can be modelled as a superposition of sparsely activated motion primitives. The approach we take can intuitively be compared to a Piano Model (also called Piano roll model (Cemgil et al., 2006)). Just as piano music can (approximately) be modelled as a superposition of the sounds emitted by each key we follow the idea that biological movement is a superposition of pre-learnt motion primitives. This implies that the whole movement can be compactly represented by the timing of each primitive in analogy to a score of music. We formulate a probabilistic generative model that reflects these assumptions. On the lower level a factorial Hidden Markov Model (fHMM, Ghahramani & Jordan, 1997) is used to model the output as a combination of signals emitted from independent primitives (each primitives corresponds to a factor in the fHMM). On the higher level we formulate a model for the primitive timing dependent upon character class. The same motion primitives are shared across characters, only their timings differ. We train this model on handwriting data using an EM-algorithm and thereby infer the primitives and the primitive timings inherent in this data. We find that the inferred timing posterior for a specific character is indeed a compact representation for the specific character which allows for a good reproduction of this character using the learnt primitives. Further, using the timing model learnt on the higher level we can generate new movement – new samples of characters (in the same writing style as the data), and also scribblings that exhibit local similarity to written characters when the higher level timing control is omitted. Section 2 will introduce the probabilistic generative model we propose. Section 3 briefly describes the learning procedures which are variants of the EM-algorithm adapted to our model. Finally in section 4 we present results on handwriting data recorded with a digitisation tablet, show the primitives and timing code we extract, and demonstrate how the learnt model can be used to generate new samples of characters. 2 2 Model Our analysis of primitives and primitive timings in handwriting is based on formulating a corresponding probabilistic generative model. This model can be described on two levels. On the lower level (Figure 1(A)) we consider a factorial Hidden Markov Model (fHMM) where each factor produces the signal of a single primitive and the linear combination of factors generates the observed movement Yt. This level is introduced in the next section and was already considered in (Williams et al., 2006; Williams et al., 2007). It allows the learning and identification of primitives in the data but does not include a model of their timing. In this paper we introduce the full generative model (Figure 1(B)) which includes a generative model for the primitive timing conditioned on the current character. 2.1 Modelling primitives in data Let M be the number of primitives we allow for. We describe a primitive as a strongly constrained Markov process which remains in a zero state most of the time but with some probability ¯λ ∈[0, 1] enters the 1 state and then rigorously runs through all states 2, .., K before it enters the zero state again. While running though its states, this process emits a fixed temporal signal. More rigorously, we have a fHMM composed of M factors. The state of the mth factor at time t is Sm t ∈{0, .., Km}, and the transition probabilities are P(Sm t =b | Sm t−1 =a, ¯λm t ) =      ¯λm t for a = 0 and b = 1 1 −¯λm t for a = 0 and b = 0 1 for a ̸= 0 and b = (a + 1) mod Km 0 otherwise . (1) This process is parameterised by the onset probability ¯λm t of the mth primitive at time t. The M factors emit signals which are combined to produce the observed motion trajectory Yt according to P(Yt | S1:M t ) = N(Yt, M X m=1 W m Sm t , C) , (2) where N(x, a, A) is the Gaussian density function over x with mean a and covariance matrix A. This emission is parameterised by W m s which is constrained to W m 0 = 0 (the zero state does not contribute to the observed signal), and C is a stationary output covariance. The vector W m 1:Km = (W m 1 , .., W m Km) is what we call a primitive and – to stay in the analogy – can be compared to the sound of a piano key. The parameters ¯λm t ∈[0, 1] could be compared to the score of the music. We will describe below how we learn the primitives W m s and also adapt the primitive lengths Km using an EM-algorithm. 2.2 A timing model Considering the ¯λ’s to be fixed parameters is not a suitable model of biological movement. The usage and timing of primitives depends on the character that is written and the timing varies from character to character. Also, the ¯λ’s actually provide a rather high-dimensional representation for the movement. Our model takes a different approach to parameterise the primitive activations. For instance, if a primitive is activated twice in the course of the movement we assume that there have been two signals (“spikes”) emitted from a higher level process which encode the activation times. More formally, let c be a discrete random variable indicating the character to be written, see Figure 1(B). We assume that for each primitive we have another Markovian process which generates a length-L sequence of states Gm l ∈{1, .., R, 0}, P(Gm 1:L | c) = P(Gm 1 | c) L Y l=2 P(Gm l | Gm l−1, c) . (3) The states Gm l encode which primitives are activated and how they are timed, as seen in Figure 2(b). We now define λm t to be a binary random variable that indicate the activation 3 0 0.1 0.2 0.3 0.4 0.5 0.6 0.7 0.8 0 50 100 150 200 250 300 350 ←1 ←2 ←3 Time /ms Training sample number (a) (b) Figure 2: (a) Illustration of equation (4): The Markov process on the states Gm l emits Gaussian components to the onset probabilities P(λm t = 1). (b) Scatter plot of the MAP onsets of a single primitive for different samples of the same character ‘p’. Gaussian components can be fit to each cluster. of a primitive at time t, which we call a “spike”. For a zero-state Gm l = 0 no spike is emitted and thus the probability of λm = 1 is not increased. A non-zero state Gm l = r adds a Gaussian component to the probabilities of λm t = 1 centred around a typical spike time µm r and with variance σm r , P(λm t =1 | Gm 1:Km, c) = L X l=1 δGm l >0 Z t+0.5 t−0.5 N(t, µm Gm l , σm Gm l ) dt . (4) Here, δGm l >0 is zero for Gm l = 0 and 1 otherwise, and the integral essentially discretises the Gaussian density. Additionally, we restrict the Markovian process such that each Gaussian component can emit at most one spike, i.e., we constrain P(Gm l | Gm l−1, c) to be a lower triangular matrix. Given the λ’s, the state transitions in the fHMM factors are as in equation (1), replacing ¯λ by λ. To summarise, the spike probabilities of λm t = 1 are a sum of at most L Gaussian components centred around the means µm l and with variances σm l . Whether or not such a Gaussian component is present is itself randomised and depends on the states Gm l . We can observe at most L spikes in one primitive, the spike times between different primitives are dependent, but we have a Markovian dependency between the presence and timing of spikes within a primitive. The whole process is parameterised by the initial state distribution P(Gm 1 | c), the transition probabilities P(Gm l | Gm l−1, c), the spike means µm r and the variances σm r . All these parameters will be learnt using an EM-algorithm. This timing model is motivated from results with the fHMM-only model: When training the fHMM on data of a single character and then computing the MAP spike times using a Viterbi alignment for each data sample we find that the MAP spike times are roughly Gaussian distributed around a number of means (see Figure 2(b)). This is why we used a sum of Gaussian components to define the onset probabilities P(λ=1). However, the data is more complicated than provided for by a simple Mixture of Gaussians. Not every sample includes an activation for each cluster (which is a source of variation in the handwriting) and there cannot be more than one spike in each cluster. Therefore we introduced the constrained Markov process on the states Gm l which may skip the emission of some spikes. 3 Inference and learning In the experiments we will compare both the fHMM without the timing model (Figure 1(A)) and the full model including the timing model (Figure 1(B)). In the fHMM-only model, inference in the fHMM is done using variational inference as described in (Ghahramani & Jordan, 1997). Using a standard EM-algorithm we can train the parameters W, C and ¯λ. To prevent overfitting we assume the spike probabilities 4 Time /s Primitive number 0.25 0.5 0.75 1 1 2 3 4 5 6 7 8 9 10 −4 −2 0 2 4 −14 −12 −10 −8 −6 −4 −2 0 2 ←1 ←2 ←2 ←3 ←4 ←5 ←6 ←6 ←7 ←8 ←8 ←9 ←9 ←10 Distance /mm Distance /mm −4.5 −1 −10 −5 0 −10 −5 0 0 0.20.4 −0.5 0 0.5 −0.5 0 −0.75 −0.5 −0.25 0 −0.25 0 −0.5 −0.25 0 0 1 2 3 0 2.5 5 0 0.2 0.4 −0.25 0 0.25 0.5 Distance /mm 0 0.20.4 −0.5 −0.25 0 0.25 −0.2 0 −0.75 −0.5 −0.25 Distance /mm −0.2 0 −0.5 −0.25 0 −0.2−0.1 0 −0.3 −0.2 −0.1 0 −5 −2.5 0 2.5 5 −17.5 −15 −12.5 −10 −7.5 −5 −2.5 0 Distance /mm Distance /mm ←1 ←1 ←2 ←3 ←4 ←4 ←5 ←5 ←5 ←7 ←7 ←7 ←7 ←8 ←8 ←1 ←2 ←3 ←3 ←4 ←4 ←5 ←7 ←8 ←8 ←9 ←2 ←3 ←3 ←3 ←3 ←4 ←4 ←4 ←5 ←5 ←7 ←7 ←1 ←1 ←2 ←3 ←4 ←7 ←7 ←8 ←8 ←1 ←2 ←3 ←3 ←4 ←4 ←5 ←7 ←8 ←8 ←8 ←9 (a) (b) (c) Figure 3: (a) Reconstruction of a character from a training dataset, using a subset of the primitives. The thickness of the reconstruction represents the pressure of the pen tip, and the different colours represent the activity of the different primitives, the onsets of which are labelled with an arrow. The posterior probability of primitive onset is shown on the left, highlighting why a spike timing representation is appropriate. (b) Plots of the 10 extracted primitives, as drawn on paper. (c) Generative samples using a flat primitive onset prior, showing scribbling behaviour of uncoupled model. are stationary (λm t constant over t) and learn only a single mean parameter ¯λm for each primitive. In the full model, inference is an iterative process of inference in the timing model and inference in the fHMM. Note that variational inference in the fHMM is itself an iterative process which recomputes the posteriors over Sm t after adapting the variational parameters. We couple this iteration to inference in the timing model in both directions: In each iteration, the posterior over Sm t defines observation likelihoods for inference in the Markov models Gm l . Inversely, the resulting posterior over Gm l defines a new prior over λ’s (a message from Gm l to λm t ) which enter the fHMM inference in the next iteration. Standard M-steps are then used to train all parameters of the fHMM and the timing model. In addition, we use heuristics to adapt the length Km of each primitive: we increase or decrease Km depending on whether the learnt primitive is significantly different to zero in the last time steps. The number of parameters used in the model therefore varies during learning, as the size of W depends upon Km, and the size of G depends upon the number of inferred spikes. In the experiments we will also investigate the reconstruction of data. By this we mean that we take a trained model, use inference to compute the MAP spikes λ for a specific data sample, then we use these λ’s and the definition of our generative model (including the learnt primitives W) to generate a trajectory which can be compared to the original data sample. Such a reconstruction can be computed using both the fHMM-only model and the full model. 4 Results 4.1 Primitive and timing analysis using the fHMM-only We first consider a data set of 300 handwritten ‘p’s recorded using an INTUOS 3 WACOM digitisation tablet http://www.wacom.com/productinfo/9x12.cfm, providing trajectory data at 200Hz. The trajectory Yt we model is the normalised first differential of the data, so that the data mean was close to zero, providing the requirements for the zero state assumption in the model constraints. Three dimensional data was used, x-position, y-position, and pressure. The data collected were separated into samples, or characters, allowing each sample to be separately normalised. Our choice of parameter was M = 10 primitives and we initialised all Km = 20 and constrained them to be smaller than 100 throughout learning. We trained the fHMM-only model on this dataset. Figure 3(a) shows the reconstruction of a specific sample of this data set and the corresponding posterior over λ’s. This clean posterior is the motivation for introducing a model of the spike timings as a compact representation 5 −20 −10 0 10 −50 −45 −40 −35 −30 −25 −20 −15 −10 −5 0 ←1 ←2 ←2 ←3 ←3 ←3 ←4 ←4 ←4 ←5 ←7 ←7 ←8 ←10 ←1 ←2 ←2 ←3 ←3 ←4 ←4 ←4 ←5 ←6 ←6 ←6 ←7 ←7 ←8 ←9 ←9 ←10 ←10 ←10 ←1←2 ←3 ←3 ←4 ←4 ←5 ←6 ←6 ←7 ←7 ←8←8 ←9 ←9 ←10 ←10 ←10 ←10 ←1 ←2 ←3 ←3 ←3 ←4 ←4 ←4 ←5 ←6 ←7 ←8 ←9 ←9 ←10 ←10 ←1 ←2 ←3 ←3 ←4 ←4 ←4 ←4 ←5 ←6 ←6 ←6 ←7 ←7 ←7 ←8 ←9 ←10 ←10 ←10 ←10 ←1 ←2 ←3 ←3 ←4 ←4 ←4 ←5 ←6 ←6 ←6 ←7 ←7 ←8 ←9 ←9 ←10 ←10 ←10 ←1 ←2 ←3 ←3 ←3 ←5 ←6 ←6 ←7 ←7 ←8←9 ←10 ←10 ←10 ←1←2 ←3 ←3 ←3 ←3 ←4 ←4 ←4 ←5 ←6 ←6 ←7 ←7 ←7 ←7 ←8←8 ←9 ←9 ←10 ←10 ←10 ←1 ←2 ←3 ←3 ←4 ←4 ←4 ←5 ←6 ←6 ←7 ←7 ←8 ←8 ←9 ←10 ←10 ←10 ←1 ←2 ←3 ←3 ←4 ←4 ←4 ←5 ←6 ←7 ←8 ←9 ←10 ←10 ←10 ←1 ←2 ←2 ←3 ←3 ←4 ←4 ←4 ←5 ←6 ←6 ←6 ←7 ←7 ←7 ←8 ←8 ←9 ←9 ←10 ←10 ←10 ←1 ←2 ←3 ←3 ←4 ←4 ←5 ←7 ←7 ←8 ←9 ←10 ←10 ←10 ←1 ←2←2 ←3←3 ←3 ←4 ←4 ←4 ←4 ←5 ←6 ←6 ←7 ←7 ←8 ←8 ←9 ←9 ←10 ←10 ←10←10 ←10 ←1 ←2←2 ←3 ←3 ←4 ←5 ←6 ←6 ←7 ←7 ←8 ←8 ←8 ←9 ←10 ←10 ←1 ←2 ←2 ←3 ←3 ←3 ←4 ←4 ←4 ←5 ←6 ←6 ←7 ←7 ←8 ←8 ←8 ←9 ←9 ←10 ←10 ←10 ←10 ←1 ←2 ←2 ←3 ←3 ←3 ←4 ←4 ←5 ←6 ←6 ←7 ←7 ←7 ←8 ←9 ←10 ←10 ←10 ←1 ←2 ←2 ←3 ←3 ←3 ←4 ←4 ←4 ←5 ←6 ←7 ←7 ←9 ←9 ←10 ←10 ←1 ←2 ←2 ←3 ←3 ←3 ←4 ←4 ←4 ←5 ←6 ←6 ←7 ←7 ←8 ←8 ←9 ←10 ←10 ←1 ←2 ←2 ←3 ←3 ←4 ←4 ←5 ←6 ←7 ←8 ←8 ←10 ←10 ←10 ←10 ←1 ←2 ←2 ←3 ←3 ←3 ←4 ←4 ←5 ←6 ←6 ←7 ←7 ←10 ←10 ←10 Distance /mm Distance /mm −800 −600 −400 −200 0 200 400 600 800 0 0.2 0.4 0.6 0.8 1 1.2 1.4 1.6 1.8 2 x 10 4 Velocity error /pixels /sec Number of samples x position y position pressure −10 0 10 20 30 −50 −40 −30 −20 −10 0 Distance /mm Distance /mm (a) (b) (c) Figure 4: (a) Reconstructions of ‘p’s using the full model. (b) Histogram of the reconstruction error, which is 3-dimensional pen movement velocity space. These errors were produced using over 300 samples of a single character. (c) Generative samples using the full generative model (Figure 1(B)). of the data. Equally the reconstruction (using the Viterbi aligned MAP spikes) shows the sufficiency of the spike code to generate the character. Figure 3(b) shows the primitives W m (translated back into pen-space) that were learnt and implicitly used for the reconstruction of the ‘p’. These primitives can be seen to represent typical parts of the ‘p’ character; the arrows in the reconstruction indicate when they are activated. The fHMM-only model can be used to reconstruct a specific data sample using the MAP λ’s of that sample, but it can not ‘autonomously’ produce characters since it lacks a model of the timing. To show the importance of this spike timing information, we can demonstrate the effects of removing it. When using the fHMM-only model as a generative model with the learnt stationary spike probabilities ¯λm the result is a form of primitive babbling, as can be seen in Figure 3(c). Since these scribblings are generated by random expression of the learnt primitives they locally resemble parts of the ‘p’ character. The primitives generalise to other characters if the training dataset contained sufficient variation. Further investigation has shown that 20 primitives learnt from 12 character types are sufficiently generalised to represent all remaining novel character types without further learning, by using a single E-step to fit the pre-learnt parameters to a novel dataset. 4.2 Generating new characters using the full generative model Next we trained the full model on the same ‘p’-dataset. Figure 4(a) shows the reconstructions of some samples of the data set. To the right we see the reconstruction errors in velocity space showing at many time points a perfect reconstruction was attained. Since the full model includes a timing model it can also be run autonomously as a generative model for new character samples. Figure 4(c) displays such new samples of the character ‘p’ generated by the learnt model. As a more challenging problem we collected a data set of over 450 character samples of the letters a, b and c. The full model includes the written character class as a random variable and can thus be trained on multi-character data sets. Note that we restrict the total number of primitives to M = 10 which will require a sharing of primitives across characters. Figure 5(a) shows samples of the training data set while Figure 5(b) shows reconstructions of the same samples using the MAP λ’s in the full model. Generally, the reconstructions using the full model are better than using the fHMM-only model. This can be understood investigating the distribution of the MAP λ’s across different samples under the fHMM-only and the full model, see Figure 6. Coupling the timing and the primitive model during learning has the effect of trying to learn primitives from data that are usually in the same place. Thus, using the full model the inferred spikes are more compactly clustered at the Gaussian components due to the prior imposed from the timing model (the thick black lines correspond to Equation (4)). 6 −10 0 10 20 30 40 −90 −80 −70 −60 −50 −40 −30 −20 −10 0 Distance /mm Distance /mm −10 0 10 20 30 40 −100 −90 −80 −70 −60 −50 −40 −30 −20 −10 0 Distance /mm Distance /mm −10 0 10 20 30 40 −100 −80 −60 −40 −20 0 Distance /mm Distance /mm (a) (b) (c) Figure 5: (a) Training dataset, showing 3 character types, and variation. (b) Reconstruction of dataset using 10 primitives learnt from the dataset in (a). (c) Generative samples using the full generative model (Figure 1(B)). 0 0.1 0.2 0.3 0.4 0.5 0.6 0.7 0.8 Time /ms Primitive − Sample index m=1 m=2 m=3 m=4 m=5 0 0.1 0.2 0.3 0.4 0.5 0.6 0.7 0.8 Time /ms Primitive − Sample index m=5 m=4 m=3 m=2 m=1 (a) (b) Figure 6: (a) Scatter plot of primitive onset spikes for a single character type across all samples and primitives, showing the clustering of certain primitives in particular parts of a character. The horizontal bars separate the results for different primitives. (b) Scatter plot of spikes from same dataset, with a coupled model, showing suppression of outlying spikes and tightening of clusters. The thick black lines displays the prior over λ’s imposed from the timing model via Equation (4). Finally, we run the full model autonomously to generate new character samples, see Figure 5(c). Here the character class, c is first sampled uniform randomly and then all learnt parameters are used to eventually sample a trajectory Yt. The generative samples show interesting variation while still being readably a character. 5 Conclusions In this paper we have shown that it is possible to represent handwriting using a primitive based model. The model consists of a superposition of several arbitrary fixed functions. These functions are time-extended, of variable length (during learning), and are superimposed with learnt offsets. The timing of activations is crucial to the accurate reproduction of the character. With a small amount of timing variation, a distorted version of the original character is reproduced, whilst large (and coordinated) differences in the timing pattern produce different character types. The spike code provides a compact representation of movement, unlike that which has previously been explored in the domain of robotic control. We have proposed to use Markov processes conditioned on the character as a model for these spike emissions. Besides contributing to a better understanding of biological movement, we hope that such models will inspire applications also in robotic control, e.g., for movement optimisation based on spike codings. 7 An assumption made in this work is that the primitives are learnt velocity profiles. We have not included any feedback control systems in the primitive production, however the presence of low-level feedback, such as in a spring system (Hinton & Nair, 2005) or dynamic motor primitives (Ijspeert et al., 2003; Schaal et al., 2004), would be interesting to incorporate into the model, and could perhaps be done by changing the outputs of the fHMM to parameterise the spring systems rather than be Gaussian distributions of velocities. We make no assumptions about how the primitives are learnt in biology. It would be interesting to study the evolution of the primitives during human learning of a new character set. As humans become more confident at writing a character, the reproduction becomes faster, and more repeatable. This could be related to a more accurate and efficient use of primitives already available. However, it might also be the case that new primitives are learnt, or old ones adapted. More research needs to be done to examine these various possibilities of how humans learn new motor skills. Acknowledgements Marc Toussaint was supported by the German Research Foundation (DFG), Emmy Noether fellowship TO 409/1-3. References Amit, R., & Matari´c, M. (2002). Parametric primitives for motor representation and control. Proc. of the Int. Conf. on Robotics and Automation (ICRA) (pp. 863–868). Bizzi, E., d’Avella, A., Saltiel, P., & Trensch, M. (2002). Modular organization of spinal motor systems. The Neuroscientist, 8, 437–442. Bizzi, E., Giszter, S., Loeb, E., Mussa-Ivaldi, F., & Saltiel, P. (1995). Modular organization of motor behavior in the frog’s spinal cord. Trends in Neurosciences, 18, 442–446. Cemgil, A., Kappen, B., & Barber, D. (2006). A generative model for music transcription. IEEE Transactions on Speech and Audio Processing, 14, 679–694. d’Avella, A., & Bizzi, E. (2005). Shared and specific muscle synergies in natural motor behaviors. PNAS, 102, 3076–3081. d’Avella, A., Saltiel, P., & Bizzi, E. (2003). Combinations of muscle synergies in the construction of a natural motor behavior. Nature Neuroscience, 6, 300–308. Ghahramani, Z., & Jordan, M. (1997). Factorial hidden Markov models. Machine Learning, 29, 245–275. Hinton, G. E., & Nair, V. (2005). Inferring motor programs from images of handwritten digits. Advances in Neural Information Processing Systems 18 (NIPS 2005) (pp. 515–522). Ijspeert, A. J., Nakanishi, J., & Schaal, S. (2003). Learning attractor landscapes for learning motor primitives. Advances in Neural Information Processing Systems 15 (NIPS 2003) (pp. 1523–1530). MIT Press, Cambridge. Kargo, W., & Giszter, S. (2000). Rapid corrections of aimed movements by combination of forcefield primitives. J. Neurosci., 20, 409–426. Schaal, S., Peters, J., Nakanishi, J., & Ijspeert, A. (2004). Learning movement primitives. ISRR2003. Singer, Y., & Tishby, N. (1994). Dynamical encoding of cursive handwriting. Biol.Cybern., 71, 227–237. Williams, B., M.Toussaint, & Storkey, A. (2006). Extracting motion primitives from natural handwriting data. Int. Conf. on Artificial Neural Networks (ICANN) (pp. 634–643). Williams, B., M.Toussaint, & Storkey, A. (2007). A primitive based generative model to infer timing information in unpartitioned handwriting data. Int. Jnt. Conf. on Artificial Intelligence (IJCAI) (pp. 1119–1124). Wolpert, D. M., Ghahramani, Z., & Flanagan, J. R. (2001). Perspectives and problems in motor learning. TRENDS in Cog. Sci., 5, 487–494. Wolpert, D. M., & Kawato, M. (1998). Multiple paired forward and inverse models for motor control. Neural Networks, 11, 1317–1329. 8
2007
101
3,128
Subspace-Based Face Recognition in Analog VLSI Gonzalo Carvajal, Waldo Valenzuela and Miguel Figueroa Department of Electrical Engineering, Universidad de Concepción Casilla 160-C, Correo 3, Concepción, Chile {gcarvaja, waldovalenzuela, miguel.figueroa}@udec.cl Abstract We describe an analog-VLSI neural network for face recognition based on subspace methods. The system uses a dimensionality-reduction network whose coefficients can be either programmed or learned on-chip to perform PCA, or programmed to perform LDA. A second network with userprogrammed coefficients performs classification with Manhattan distances. The system uses on-chip compensation techniques to reduce the effects of device mismatch. Using the ORL database with 12x12-pixel images, our circuit achieves up to 85% classification performance (98% of an equivalent software implementation). 1 Introduction Subspace-based techniques for face recognition, such as Eigenfaces [1] and Fisherfaces [2], take advantage of the large redundancy present in most images to compute a lowerdimensional representation of their input data and stored patterns, and perform classification in the reduced subspace. Doing so substantially lowers the storage and computational requirements of the face-recognition task. However, most techniques for dimensionality reduction require a high computational throughput to transform images from the large input data space to the feature subspace. Therefore, software [3] even dedicated digital hardware implementations [4,5] are too large and power-hungry to be used in highly portable systems. Analog VLSI circuits can compute using orders of magnitude less power and die area than their digital counterparts, but their performance is limited by signal offsets, parameter mismatch, charge leakage and nonlinear behavior, particularly in large-scale systems. Traditional circuit-design techniques can reduce these effects, but they increase power and area, rendering analog solutions less attractive. In this paper, we present a neural network for face recognition which implements Principal Components Analysis (PCA) and Linear Discriminant Analysis (LDA) for dimensionality reduction, and Manhattan distances and a loser-take-all (LTA) circuit for classification. We can download the network weights in a chip-in-the loop configuration, or use on-chip learning to compute PCA coefficients. We use local adaptation to achieve good classification performance in the presence of device mismatch. The circuit die area is 2.2mm2 in a 0.35µm CMOS process, with an estimated power dissipation of 18mW. Using PCA reduction and a hard classifier, our network achieves up to 83% accuracy on the Olivetti Research Labs (ORL) face database [6] using 12x12-pixel images, which corresponds to 99% of the accuracy of a software implementation of the algorithm. Using LDA projections and a software Radial Basis Function (RBF) network on the hardware-computed distances yields 85% accuracy (98% of the software performance). 1 2 Eigenspace based face recognition methods The problem of face recognition consists of assigning an identity to an unknown face by comparing it to a database of labeled faces. However, the dimensionality of the input images is usually so high that performing the classification on the original data becomes prohibitively expensive. Fortunately, human faces exhibit relatively regular statistics; therefore, their intrinsic dimensionality is much lower than that of their images. Subspace methods transform the input images to reduce their dimensionality, and perform the classification task on this lower-dimensional feature space. In particular, the Eigenfaces [1] method performs dimensionality reduction using PCA, and classification by choosing the stored face with the lowest distance to the input data. Principal Components Analysis uses a linear transformation from the input space to the feature space, which preserves most of the information (in the mean-square error sense) present in the original vector. Consider a column vector x of dimension n, formed by the concatenated columns of the input image. Let the matrix Xn×N = {x1, x2, . . . , xN} represent a set of N images, such as the image database available for a face recognition task. PCA computes a new matrix Ym×N, with m < n: Y = W*TX (1) The columns of Y are the lower-dimensional projections of the original images in the feature space. The columns of the orthogonal transformation matrix W∗are the eigenvectors associated to the m largest eigenvalues of the covariance matrix of the original image space. Upon presentation of a new face image, the Eigenfaces method first transforms this image into the feature space using the transformation matrix W∗, and then computes the distance between the reduced image and each image class in the reference database. The image is classified with the identity of the closest reference pattern. Fisherfaces [2] performs dimensionality reduction using Linear Discriminant Analysis (LDA). LDA takes advantage of labeled data to maximize the distance between classes in the projected subspace. Considering Xc , c = 1, . . . , Nc as subsets of X containing Ni images of the same subject, LDA defines two matrices: SW = c X i=1 X xk∈Xc (xk −mi)(xk −mi)T , with mi = 1 Ni Ni X k=1 xk (2) SB = c X i=1 Ni(mi −m)(mi −m)T (3) where SW represents the scatter (variance) within classes, and SB is the scatter between different classes. To perform the dimensionality reduction of Eqn. (1), LDA constructs W∗ such that its columns are the m largest eigenvectors of S−1 W SB. This requires SW to be nonsingular, which is often not the case; therefore, LDA frequently uses a PCA preprocessing stage [2]. Fisherfaces can perform classification using a hard classifier on the computed distances between the test data and stored patterns in the LDA subspace, as in Eigenfaces, or it can use a Radial Basis Function (RBF) network. RBF uses a hidden layer of neurons with Gaussian activation functions to detect clusters in the projected subspace. Traditionally, the subspace method use Euclidian distances. However, our experiments show that, as long as the dimensionality reduction preserves enough distance between classes, less computationally expensive distance metrics such as Manhattan distance are equally effective for classification. The Manhattan distance between two vectors x = [x1 . . . xn] and y = [y1 . . . yn] is given by: d = n X i=1 |xi −yi| (4) 2 LTA database input image x n test data y m distances 1 k face ID 2 ... dimensionality reduction (a) Architecture + y1 ym W1,1 Wn,1 W1,m Wn,m b1 b2 x1 c xn + ... ... ... ... (b) Projection network _ _ abs () abs () abs () y1 y2 ym f1,i f2,i fn,i dist i data base _ + ... ... (c) Distance computation Figure 1: Face-recognition hardware. (a) Architecture. A dimensionality-reduction network projects a n-dimensional image onto m dimensions, and loser-take-all (LTA) circuit labels the image by choosing the nearest stored face in the reduced space. (b) The dimensionality reduction network is an array of linear combiners with weights that have been pre-computed or learned on chip. (c) The distance circuit computes the Manhattan distance between the m projections of the test image and the stored face database. In our current implementation, n = 144, m = 39, and k = 40. 3 Hardware Implementation Fig. 1(a) shows the architecture of our face-recognition network. It follows the signal flow described in Section 2, where the n-dimensional test image x is first projected onto the mdimensional feature space (test data y) using an array of m n-input analog linear combiners, shown in Fig. 1(b). The constant input c is a bias used to compensate for the offset introduced by the analog multipliers. The network also stores the m projections of the database face set (the training set) in an array of analog memories. A distance computation block, shown in Fig. 1(c), computes the Manhattan distance between each labeled element in the stored training set and the reduced test data y. A loser-take-all (LTA) circuit, currently implemented in software, selects the smallest distance and labels the test image with the selected class. The linear combiners are based on the synapse shown in Fig. 2(a). An analog Gilbert multiplier computes the product of each pixel of the input image, represented as a differential voltage, and the local synaptic weight. An accurate transformation requires a multiplier response that is linear in the pixel value, therefore we designed the multipliers to maximize the linearity of that input. Device mismatch introduces offsets and gain variance across different multipliers in the network; we describe the calibration techniques used to compensate for these effects in Section 4. The multipliers provide a differential current output, therefore we can add them across a single neuron by connecting them to common wires. Each synaptic weight is stored in an analog nonvolatile memory cell [7] based on floatinggate transistors, shown also in Fig. 2(a). The cell features linear weight-updates based on digital pulses applied to the terminals inc and dec. Using local calibration, also based on floating gates, we independently tune each synapse to achieve symmetric updates in the 3 Gilbert Multiplier FG Memory Cell weight Vw + Vw _ II+ input Vx + Vx _ sum inc dec (a) Hardware synapse FG Mem Cell database element select Current Comp . Crossbar switch If + If Iy + Iy From PCA Iabs Iabs + sum inc dec (b) Distance circuit Figure 2: (a) The synapse is comprised by a Gilbert multiplier and a nonvolatile analog memory cell with local calibration. The output currents are summed across each neuron. (b) Each component of the Manhattan distance is computed as the subtraction of the corresponding principal components and an optional inversion based on the sign of the result. The output currents are summed across all components. presence of device mismatch, and to make the update rates uniform across the entire chip. As a result, the resolution of the memory cell exceeds 12 bits in a 0.35µm CMOS process. Fig. 2(b) depicts the circuit used to compute the Manhattan distance between the test data and the stored patterns. Each projection of the training set is stored as a current in an analog memory cell, simpler and smaller than the cell used in the dimensionality reduction network, and written using a self-limiting write process. The difference between each projection of the pattern and the test input is computed by inverting the polarity of one of the signals and adding the currents. To compute the absolute value, a current comparator based on a simple transconductance amplifier determines the sign of the result and uses a 2×2 crossbar switch to invert the polarity of the outputs if needed. As stated in Section 5, our current implementation considers 12×12-pixel images (n = 144 in Fig. 1). We compute 39 projections using PCA and LDA, and perform the classification using 40 Manhattan-distance units on the 39-dimensional projections. The next section analyzes the effects of device mismatch on the dimensionality-reduction network. 4 Analog implementation of dimensionality reduction networks The arithmetic distortions introduced by the nonlinear transfer function of the analog multipliers, coupled with the effects of device mismatch (offsets and gains), affect the accuracy of the operations performed by the reduction network and become the limiting factor in the classification performance. In order to achieve good performance, we must calibrate the network to compensate for the effect of these limitations. In this section, we analyze and design solutions for two different cases. First, we consider the case when a computer performs PCA or LDA to determine W∗off-line, and downloads the weights onto the chip. Second, we analyze the performance of adaptive on-chip computation of PCA using a Hebbian-learning algorithm. In both cases, we design mechanisms that use local on-chip adaptation to compensate for the offsets and gain variances introduced by device mismatch, thus improving classification performance. In the following analysis we assume that the inputs have zero mean and have been normalized. Also, for simplicity, we assume that the inputs and weights are operating within the linear range of the multipliers. We remove these assumptions when presenting experimental results. Thus, our analysis uses a simplified model of the analog multipliers given by: o = (axx + γx)(aww + γw) (5) where o is the multiplier output, x and w are the inputs, γx and γw represent the input offsets, and ax and aw are the multiplier gains associated with each input. These parameters vary across different multipliers due to device mismatch and are unknown at design time, and difficult to determine even after circuit fabrication. 4 4.1 Dimensionality reduction with precomputed weights Let us consider an analog linear combiner such as the one depicted in Fig. 1(b), which computes the first projection y of x, using the first column w∗of the software precomputed optimal transformation W∗of Eqn. (1). Using the simplified multiplier linear model of Eqn. (5), the linear combiner computes the first projection as: y = xT(AxAww∗+ Axγw) + γT x(Aww∗+ γw) (6) where Ax = diag([ax1 . . . axn]), Aw = diag([aw1 . . . awn]), γx = [γx1 . . . γxn]T, and γw = [γw1 . . . γwn]T represent the gains and offsets of each multiplier. Eqn. (6) shows that device mismatch has two effects on the output: the first term modifies the effective weight value of the network, and the second term represents an offset added to the output (w∗is a constant). Replacing w∗with an adaptive version wk, the structure becomes a classic adaptive linear combiner which, using the optimal weights to generate a reference output signal, can be trained using the well known Least-Mean Squares (LMS) algorithm. Adding a bias synapse b with constant input c and training the network with LMS, the weights converge to [7]: w∗ = (AxAw)−1(w∗−Axγw) (7) b∗ = −(γT x(Aww∗+ γw) + cγb)(cab)−1 (8) where ab and γb are the gain and offset of the analog multiplier associated to the bias input c. These weight values fully compensate for the effects of gain mismatch and offsets. In our hardware implementation, we use m adaptive linear combiners to compute every projection in the feature space, and calibrate these circuits using on-chip LMS local adaptation to compute and store the optimal weight values of Eqns. (7) and (8), achieving a good approximation of the optimal output Y. Fig. 3(a) shows our analog-VLSI implementation of LMS. We train the weight values in the memory cells by providing inputs and a reference output to each linear combiner, and use an on-chip pulse-based compact implementation of the LMS learning rule. In order to improve the convergence of the algorithm, we draw the inputs from a zero-mean random Gaussian distribution. Thus, the performance of the dimensionality reduction network is ultimately limited by the resolution of the memory cells, the reference noise, the learning rate of the LMS training stage and linearity of the multipliers. This last effect can be controlled by restricting the dynamic range of the input to linear range of the multipliers. To measure the accuracy of our implementation, we computed (in software) the first 10 principal components of one half the Olivetti Research Labs (ORL) face database, reduced to 12x12 pixels, and used our on-chip implementation of LMS to train the hardware network to learn the coefficients. We then measured the output of the circuit on the other half of the database. Fig. 3(b) plots the RMS value of the error between the circuit output and the software results, normalized to the RMS value of each principal component. The figure also shows the error when we wrote the coefficients onto the circuit in open-loop, without using LMS. In this case, offset and gain mismatch completely obscure the information present in the signal. LMS training compensates for these effects, and reduces the error energy to between 0.25% and 1% of the energy of the signal. A different experiment (not shown) computing LDA coefficients yields equivalent results. 4.2 On-chip PCA computation In some cases, such as when the face-recognition network is integrated with a camera on a single chip, it may be necessary to train the face database on-chip. It is not practical for the chip to include the hardware resources to compute the optimal weights from the eigenvalue analysis of the training set’s covariance matrix, therefore we compute them on chip using the standard Generalized Hebbian Algorithm (GHA). The computation of the first principal component and the learning rule to update the weights at time k are: yk = xT k wk (9) ∆wk = µyk(xk −x′ k) (10) x′ k = ykwk (11) 5 LMS learning rule wi to adder inc dec X from output y xi ++ yref=xTw* ++ _ noise (a) LMS computation 1 2 3 4 5 6 7 8 9 10 10 −4 10 −2 10 0 10 2 10 4 Principal Component Norm. RMS error (log scale) No circuit calibration On−chip LMS (b) Output error of PCA network Figure 3: Training the PCA network with LMS. (a) Block diagram of our LMS implementation. We present random inputs to each linear combiner, and provide a reference output. A pulse-based implementation of the LMS learning rule updates the memory cells. (b) RMS value of the error for the first 10 principal components, normalized to the RMS value of each PC. where µ is the learning rate of the algorithm and x′k is the reconstruction of the input xk from the first principal component. The distortion introduced to the output by gain mismatch and offsets in Eqn. (9) is identical to Eqn. (6). Similarly to LMS, it is easy to show that a bias input c connected to a synapse b with an anti-Hebbian learning rule ∆bk = µbcyk removes the constant offset added to the output. Therefore, we can eliminate the second term of Eqn. (6) and express the output as: yk = xT k (AxAwwk + Axγw) = xT k wk (12) Using analog multipliers to compute x′k, we obtain: x′k = yk(AyA′ wwk + Ayγ′ w) + γy(A′ wwk + γ′ w) (13) where Ay, A′ w, γy, and γ′ w are the gains and offsets associated with the multipliers used to compute ykwk. Replacing Eqns. (12) and (13) in Eqn. (10), we determine the effective learning rule modified by device mismatch: ∆wk = µyk(x −yk(AyA′ wwk + Ayγ′ w)) = µyk(x −ykw′ k) (14) If we use the same analog multipliers to compute yk and x′k, then Ax = Ay, Aw = A′ w, and γw = γ′ w, and the learning rule becomes: ∆wk = µyk(x −ykwk) (15) where yk and wk are the modified weight and output defined in Eqn. (12). Eqn. (15) is equivalent to the original learning rule in Eqn. (10), but with a new weight vector modified by device mismatch. A convergence analysis for Eqn. (15) is complicated, but by analogy to LMS we can show that the weights indeed converge to the same values given in Eqns. (7) and (8), which compensate for the effects of gain mismatch and offset. Simulation results verify this assumption. Note that this will only be the case if we use the same hardware multipliers to compute yk and x′k. The analysis extends naturally to the higher-order principal components. Fig. 4(a) shows our implementation of the GHA learning rule. The multiplexer shares the analog multipliers between the computation of yk and x′k, and is controlled by a digital signal that alternates its value during the computation and adaptation phases of the algorithm. Unlike LMS, GHA trains the algorithm using the images from the training set. Fig. 4(b) shows the normalized RMS value of the output error for the first 10 principal components. Comparing it to Fig. 3(b), the error is significantly higher than LMS, moving between 4% and 35% of the enery of the output. This higher error is due in part to the nonlinear multiply in the computation of x′k, and because there is a strong dependency between the learning rates used to update the bias synapse and the other weights in the network. However, as Section 5 shows, this error does not translate into a large degradation in the face classification performance. 6 GHA learning rule wi to adder inc dec M U X X from output Compute / update y xi (a) GHA computation 1 2 3 4 5 6 7 8 9 10 10 −4 10 −2 10 0 10 2 10 4 Principal Component Norm. RMS error (log scale) No circuit calibration On−chip GHA (b) Output error of PCA network Figure 4: Training the PCA network with GHA. (a) We reuse the multiplier to compute x′k and use a pulse-based implementation of the GHA rule. (b) RMS value of the error for the first 10 principal components, normalized to the RMS value of each PC. 5 Classification Results We designed and fabricated arithmetic circuits for the building blocks described in the previous sections using a 0.35µm CMOS process, including analog memory cells, multipliers, and weight-update rules for LMS and GHA. We characterized these circuits in the lab and built a software emulator that allows us to test the static performance of different network configurations with less than 0.5% error. We simulated the LTA circuit in software. Using the emulator, we tested the performance of the face-recognition network on the Olivetti Research Labs (ORL) database, consisting on 10 photos of each of 40 total subjects. We used 5 random photos of each subject for the training set and 5 for testing. Limitations in our circuit emulator forced us to reduce the images to 12 × 12 pixels. The estimated power consumption of the circuit with these 144 inputs and 39 projections is 18mW (540nJ per classification with 30µs settling time), and the layout area is 2.2mm2. These numbers represent a 2–5x reduction in area and more than 100x reduction in power compated to standard cell-based digital implementations [4,5]. Fig. 5(a) shows the classification performance of the network using PCA for dimensionality reduction, versus the number of principal components in the subspace. First, we tested the network using PCA for dimensionality reduction. The figure shows the performance of a software implementation of PCA with Euclidean distances, hardware PCA trained with LMS and software-computed weights, and hardware PCA trained with on-chip GHA. Both hardware implementations use Manhattan distances and a software LTA. The plots show the mean of the classification accuracy computed for each of the 40 individuals in the database. The error bars show one standard deviation above and below the mean. The software implementation peaks at 84% classification accuracy, while the hardware LMS and GHA implementations peak at 83% and 79%, respectively. Note that GHA performs only slightly worse than LMS, mainly because we compute and store the principal components of the training set in the face database using the same PCA network used to reduce the dimensionality of the test images, which helps to preserve the distance between classes in the feature space. The standard deviations are similar in all cases. Using an uncalibrated network brings the performance below 5%, mainly due to the offsets in the multipliers which change the PCA projection and take the signals outside of their nominal operating range. Fig. 5(a) shows the classification results using the LDA in the dimensionality reduction network. The results are slightly better than PCA, and the error bars show also a lower variance. The performance of the software implementation of LDA and an a hard-classifier based on Euclidean distances is 83%. The LMS-trained hardware network with Manhattan distances and a software LTA yields 82%. Replacing the LTA with a software RBF classifier, the chip achieves 85% classification performance, while the software implementation (not shown) peaks at 87%. Using 40x40-pixel images and 39 projections, the software LDA network with RBF achieves more than 98% classification accuracy. Therefore, our current results are limited by the resolution of the input images. 7 5 10 15 20 25 30 35 40 0 0.2 0.4 0.6 0.8 1 Number of Principal Componentes Classification Performance PCA+dist (SW) PCA with LMS+ dist (HW) GHA+dist (HW) (a) Classification performance for PCA 5 10 15 20 25 30 35 40 0 0.2 0.4 0.6 0.8 1 Number of LDA Projections Classification Performance LDA+dist+LTA (SW) LDA+dist+LTA (HW) LDA+dist (HW)+RBF (SW) (b) Classification performance for LDA Figure 5: Classification performance for a 12 × 12–pixel version of the ORL database versus number of projections, using PCA and LDA for dimensionality reduction. Computing coefficients off-chip and writing them on the chip using LMS yields between 83% and 85% classification performance for PCA and LDA, respectively. This represents 98%-99% of the performance of a software implementation. 6 Conclusions We presented an analog-VLSI network for face-recognition using subspace methods. We analyzed the effects of device mismatch on the performance of the dimensionality-reduction network and tested two techniques based on local adaptation which compensate for gain mismatch and offsets. We showed that using LMS to train the network on precomputed coefficients to perform PCA or LDA performs better than using GHA to learn PCA coefficients on chip. Ultimately, both techniques perform similarly in the face-classification task with the ORL database, achieving a classification performance of 83%-85% (98%-99% of a software implementation of the algorithms). Simulation results show that the performance is currently limited by the resolution of the input images. We are currently working on the integration LTA and RBF classifiers on chip, and on support of higher-dimensional inputs. Acknowledgments This work was funded by the Chilean government through FONDECYT grant No. 1070485. The authors would like to thank Dr. Seth Bridges for his valuable contribution to this work. References [1] M. Turk and A. Pentland. Face Recognition Using Eigenfaces. Proc. of IEEE Conf. on Computer Vision and Pattern Recognition, pages 586–591, 1991. [2] Peter Belhumeur, Joao Hespanha, and David 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] A. U. Batur, B. E. Flinchbaugh, and M. H. Hayes IIl. A DSP-Based approach for the implementation of face recognition algorithms. In IEEE International Conference on Acoustics, Speech, and Signal Processing, 2003. Proceedings. (ICASSP ’03), volume 2, pages 253–256, 2003. [4] N. Shams, I. Hosseini, M. Sadri, and E. Azarnasab. Low Cost FPGA-Based Highly Accurate Face Recognition System Using Combined Wavelets Withs Subspace Methods. In IEEE International Conference on Image Processing, 2006, pages 2077–2080, 2006. [5] C. S. S. Prasanna, N. Sudha, and V. Kamakoti. A Principal Component Neural Network-Based Face Recognition System and Its ASIC Implementation. In VLSI Design, pages 795–798, 2005. [6] Ferdinando Samaria and Andy Harter. Parameterisation of a Stochastic Model for Human Face Identification. In IEEE Workshop on Applications of Computer Vision, Sarasota (Florida), December 1994. [7] Miguel Figueroa, Esteban Matamala, Gonzalo Carvajal, and Seth Bridges. Adaptive Signal Processing in Mixed-Signal VLSI with Anti-Hebbian Learning. In IEEE Computer Society Annual Symposium on VLSI, pages 133–138, Karlsruhe, Germany, 2006. IEEE. 8
2007
102
3,129
Efficient multiple hyperparameter learning for log-linear models Chuong B. Do Chuan-Sheng Foo Andrew Y. Ng Computer Science Department Stanford University Stanford, CA 94305 {chuongdo,csfoo,ang}@cs.stanford.edu Abstract In problems where input features have varying amounts of noise, using distinct regularization hyperparameters for different features provides an effective means of managing model complexity. While regularizers for neural networks and support vector machines often rely on multiple hyperparameters, regularizers for structured prediction models (used in tasks such as sequence labeling or parsing) typically rely only on a single shared hyperparameter for all features. In this paper, we consider the problem of choosing regularization hyperparameters for log-linear models, a class of structured prediction probabilistic models which includes conditional random fields (CRFs). Using an implicit differentiation trick, we derive an efficient gradient-based method for learning Gaussian regularization priors with multiple hyperparameters. In both simulations and the real-world task of computational RNA secondary structure prediction, we find that multiple hyperparameter learning can provide a significant boost in accuracy compared to using only a single regularization hyperparameter. 1 Introduction In many supervised learning methods, overfitting is controlled through the use of regularization penalties for limiting model complexity. The effectiveness of penalty-based regularization for a given learning task depends not only on the type of regularization penalty used (e.g., L1 vs L2) [29] but also (and perhaps even more importantly) on the choice of hyperparameters governing the regularization penalty (e.g., the hyperparameter λ in an isotropic Gaussian parameter prior, λ||w||2). When only a single hyperparameter must be tuned, cross-validation provides a simple yet reliable procedure for hyperparameter selection. For example, the regularization hyperparameter C in a support vector machine (SVM) is usually tuned by training the SVM with several different values of C, and selecting the one that achieves the best performance on a holdout set. In many situations, using multiple hyperparameters gives the distinct advantage of allowing models with features of varying strength; for instance, in a natural language processing (NLP) task, features based on word bigrams are typically noisier than those based on individual word occurrences, and hence should be “more regularized” to prevent overfitting. Unfortunately, for sophisticated models with multiple hyperparameters [23], the na¨ıve grid search strategy of directly trying out possible combinations of hyperparameter settings quickly grows infeasible as the number of hyperparameters becomes large. Scalable strategies for cross-validation–based hyperparameter learning that rely on computing the gradient of cross-validation loss with respect to the desired hyperparameters arose first in the neural network modeling community [20, 21, 1, 12]. More recently, similar cross-validation optimization techniques have been proposed for other supervised learning models [3], including support vector machines [4, 10, 16], Gaussian processes [35, 33], and related kernel learning methods [18, 17, 39]. Here, we consider the problem of hyperparameter learning for a specialized class of structured classification models known as conditional log-linear models (CLLMs), a generalization of conditional random fields (CRFs) [19]. Whereas standard binary classification involves mapping an object x ∈X to some binary output y ∈Y (where Y = {±1}), the input space X and output space Y in a structured classification task generally contain complex combinatorial objects (such as sequences, trees, or matchings). Designing hyperparameter learning algorithms for structured classification models thus yields a number of unique computational challenges not normally encountered in the flat classification setting. In this paper, we derive a gradient-based approach for optimizing the hyperparameters of a CLLM using the loss incurred on a holdout set. We describe the required algorithms specific to CLLMs which make the needed computations tractable. Finally, we demonstrate on both simulations and a real-world computational biology task that our hyperparameter learning method can give gains over learning flat unstructured regularization priors. 2 Preliminaries Conditional log-linear models (CLLMs) are a probabilistic framework for sequence labeling or parsing problems, where X is an exponentially large space of possible input sequences and Y is an exponentially large space of candidate label sequences or parse trees. Let F : X × Y →Rn be a fixed vector-valued mapping from input-output pairs to an n-dimensional feature space. CLLMs model the conditional probability of y given x as P(y | x; w) = exp(wT F(x, y))/Z(x) where Z(x) = P y′∈Y exp(wT F(x, y′)). Given a training set T =  (x(i), y(i)) m i=1 of i.i.d. labeled inputoutput pairs drawn from some unknown fixed distribution D over X × Y, the parameter learning problem is typically posed as maximum a posteriori (MAP) estimation (or equivalently, regularized logloss minimization): w⋆= arg min w∈Rn 1 2wT Cw − m X i=1 log P(y(i) | x(i); w) ! , (OPT1) where 1 2wT Cw (for some positive definite matrix C) is a regularization penalty used to prevent overfitting. Here, C is the inverse covariance matrix of a Gaussian prior on the parameters w. While a number of efficient procedures exist for solving the optimization problem OPT1 [34, 11], little attention is usually given to choosing an appropriate regularization matrix C. Generally, C is parameterized using a small number of free variables, d ∈Rk, known as the hyperparameters of the model. Given a holdout set H =  (˜x(i), ˜y(i)) ˜m i=1 of i.i.d. examples drawn from D, hyperparameter learning itself can be cast as an optimization problem: minimize d∈Rk − ˜m X i=1 log P  ˜y(i) | ˜x(i); w⋆(C)  . (OPT2) In words, OPT2 finds the hyperparameters d whose regularization matrix C leads the parameter vector w⋆(C) learned from the training set to obtain small logloss on holdout data. For many realworld applications, C is assumed to take a simple form, such as a scaled identity matrix, CI. While this parameterization may be partially motivated by concerns of hyperparameter overfitting [28], such a choice usually stems from the difficulty of hyperparameter inference. In practice, grid-search procedures provide a reliable method for determining hyperparameters to low-precision: one trains the model using several candidate values of C (e.g., C ∈  . . . , 2−2, 2−1, 20, 21, 22, . . . ), and chooses the C that minimizes holdout logloss. While this strategy is suitable for tuning a single model hyperparameter, more sophisticated strategies are necessary when optimizing multiple hyperparameters. 3 Learning multiple hyperparameters In this section, we lay the framework for multiple hyperparameter learning by describing a simple yet flexible parameterization of C that arises quite naturally in many practical problems. We then describe a generic strategy for hyperparameter adaptation via gradient-based optimization. Consider a setting in which predefined subsets of parameter components (which we call regularization groups) are constrained to use the same hyperparameters [6]. For instance, in an NLP task, individual word occurrence features may be placed in a separate regularization group from word bigram features. Formally, let k be a fixed number of regularization groups, and let π : {1, . . . , n} →{1, . . . , k} be a prespecified mapping from parameters to regularization groups. Furthermore, for a vector x ∈Rk, define its expansion x ∈Rn as x = (xπ(1), xπ(2), . . . , xπ(n)). In the sequel, we parameterize C ∈Rn×n in terms of some hyperparameter vector d ∈Rk as the diagonal matrix, C(d) = diag(exp(d)). Under this representation, C(d) is necessarily positive definite, so OPT2 can be written as an unconstrained minimization over the variables d ∈Rk. Specifically, let ℓT (w) = −Pm i=1 log P y(i) | x(i); w  denote the training logloss and ℓH(w) = −P ˜m i=1 log P ˜y(i) | ˜x(i); w  the holdout logloss for a parameter vector w. Omitting the dependence of C on d for notational convenience, we have the optimization problem minimize d∈Rk ℓH(w⋆) subject to w⋆= arg min w∈Rn 1 2wT Cw + ℓT (w)  . (OPT2’) For any fixed setting of these hyperparameters, the objective function of OPT2’ can be evaluated by (1) using the hyperparameters d to determine the regularization matrix C, (2) solving OPT1 using C to determine w⋆and (3) computing the holdout logloss using the parameters w⋆. In this next section, we derive a method for computing the gradient of the objective function of OPT2’ with respect to the hyperparameters. Given both procedures for function and gradient evaluation, we may apply standard gradient-based optimization (e.g., conjugate gradient or L-BFGS [30]) in order to find a local optimum of the objective. In general, we observe that only a few iterations (∼5) are usually sufficient to determine reasonable hyperparameters to low accuracy. 4 The hyperparameter gradient Note that the optimization objective ℓH(w⋆) is a function of w⋆. In turn, w⋆is a function of the hyperparameters d, as implicitly defined by the gradient stationarity condition, Cw⋆+ ∇wℓT (w⋆) = 0. To compute the hyperparameter gradient, we will use both of these facts. 4.1 Deriving the hyperparameter gradient First, we apply the chain rule to the objective function of OPT2’ to obtain ∇dℓH(w⋆) = JT d∇wℓH(w⋆) (1) where Jd is the n × k Jacobian matrix whose (i, j)th entry is ∂w⋆ i /∂dj. The term ∇wℓH(w⋆) is simply the gradient of the holdout logloss evaluated at w⋆. For decomposable models, this may be computed exactly via dynamic programming (e.g., the forward/backward algorithm for chainstructured models or the inside/outside algorithm for grammar-based models). Next, we show how to compute the Jacobian matrix Jd. Recall that at the optimum of the smooth unconstrained optimization problem OPT1, the partial derivative of the objective with respect to any parameter must vanish. In particular, the partial derivative of 1 2wT Cw + ℓT (w) with respect to wi vanishes when w = w⋆, so 0 = CT i w⋆+ ∂ ∂wi ℓT (w⋆), (2) where CT i denotes the ith row of the C matrix. Since (2) uniquely defines w⋆(as OPT1 is a strictly convex optimization problem), we can use implicit differentiation to obtain the needed partial derivatives. Specifically, we can differentiate both sides of (2) with respect to dj to obtain 0 = n X p=1  w⋆ p ∂ ∂dj Cip + Cip ∂ ∂dj w⋆ p  + n X p=1 ∂ ∂wp ∂ ∂wi ℓT (w⋆) ∂ ∂dj w⋆ p, (3) = I{π(i)=j}w⋆ i exp(dj) + n X p=1  Cip + ∂ ∂wp ∂ ∂wi ℓT (w⋆)  ∂ ∂dj w⋆ p. (4) Stacking (4) for all i ∈{1, . . . , n} and j ∈{1, . . . , k}, we obtain the equivalent matrix equation, 0 = B + (C + ∇2 wℓT (w⋆))Jd (5) where B is the n × k matrix whose (i, j)th element is I{π(i)=j}w⋆ i exp(dj), and ∇2 wℓT (w⋆) is the Hessian of the training logloss evaluated at w⋆. Finally, solving these equations for Jd, we obtain Jd = −(C + ∇2 wℓT (w⋆))−1B. (6) 4.2 Computing the hyperparameter gradient efficiently In principle, one could simply use (6) to obtain the Jacobian matrix Jd directly. However, computing the n × n matrix (C + ∇2 wℓT (w⋆))−1 is difficult. Computing the Hessian matrix ∇2 wℓT (w⋆) in a typical CLLM requires approximately n times the cost of a single logloss gradient evaluation. Once the Hessian has been computed, typical matrix inversion routines take O(n3) time. Even more problematic, the Ω(n2) memory usage for storing the Hessian is prohibitive as typical loglinear models (e.g., in NLP) may have thousands or even millions of features. To deal with these Algorithm 1: Gradient computation for hyperparameter selection. Input: training set T =  (x(i), y(i)) m i=1, holdout set H =  (˜x(i), ˜y(i)) ˜m i=1 current hyperparameters d ∈Rk Output: hyperparameter gradient ∇dℓH(w⋆) 1. Compute solution w⋆to OPT1 using regularization matrix C = diag(exp(d)). 2. Form the matrix B ∈Rn×k such that (B)ij = I{π(i)=j}w⋆ i exp(dj). 3. Use conjugate gradient algorithm to solve the linear system, (C + ∇2 wℓT (w⋆))x = ∇wℓH(w⋆). 4. Return −BT x. Figure 1: Pseudocode for gradient computation problems, we first explain why (C+∇2 wℓT (w⋆))v for any arbitrary vector v ∈Rn can be computed in O(n) time, even though forming (C + ∇2 bwℓT (w⋆))−1 is expensive. Using this result, we then describe an efficient procedure for computing the holdout hyperparameter gradient which avoids the expensive Hessian computation and inversion steps of the direct method. First, since C is diagonal, the product of C with any arbitrary vector v is trivially computable in O(n) time. Second, although direct computation of the Hessian is inefficient in a generic log-linear model, computing the product of the Hessian with v can be done quickly, using any of the following techniques, listed in order of increasing implementation effort (and numerical precision): 1. Finite differencing. Use the following numerical approximation: ∇2 wℓT (w⋆) · v = lim r→0 ∇wℓT (w⋆+ rv) −∇wℓt(w⋆) r . (7) 2. Complex step derivative [24]. Use the following identity from complex analysis: ∇2 wℓT (w⋆) · v = lim r→0 Im {∇wℓT (w⋆+ i · rv)} r . (8) where Im {·} denotes the imaginary part of its complex argument (in this case, a vector). Because there is no subtraction in the numerator of the right-hand expression, the complexstep derivative does not suffer from the numerical problems of the finite-differencing method that result from cancellation. As a consequence, much smaller step sizes can be used, allowing for greater accuracy. 3. Analytical computation. Given an existing O(n) algorithm for computing gradients analytically, define the differential operator Rv{f(w)} = lim r→0 f(w + rv) −f(w) r = ∂ ∂rf(w + rv) r=0 , (9) for which one can verify that Rv{∇wℓT (w⋆)} = ∇2 wℓT (w⋆) · v. By applying standard rules for differential operators, Rv{∇wℓT (w⋆)} can be computed recursively using a modified version of the original gradient computation routine; see [31] for details. Hessian-vector products for graphical models were previously used in the context of step-size adaptation for stochastic gradient descent [36]. In our experiments, we found that the simplest method, finite-differencing, provided sufficient accuracy for our application. Given the above procedure for computing matrix-vector products, we can now use the conjugate gradient (CG) method to solve the matrix equation (5) to obtain Jd. Unlike direct methods for solving linear systems Ax = b, CG is an iterative method which relies on the matrix A only through matrix-vector products Av. In practice, few steps of the CG algorithm are generally needed to find an approximate solution of a linear system with acceptable accuracy. Using CG in this way amounts to solving k linear systems, one for each column of the Jd matrix. Unlike the direct method of forming the (C + ∇2 wℓT (w⋆)) matrix and its inverse, solving the linear systems avoids the expensive Ω(n2) cost of Hessian computation and matrix inversion. Nevertheless, even this approach for computing the Jacobian matrices still requires the solution of multiple linear systems, which scales poorly when the number of hyperparameters k is large. (a) (b) (c) y1 y2 · · · yL xj 1 xj 2 · · · xj L xj 1 xj 2 · · · xj L xj L “observed features” j ∈{1, . . . , R} “noise features” j ∈{R + 1, . . . , 40} 0 10 20 30 40 0.1 0.15 0.2 0.25 0.3 0.35 0.4 0.45 0.5 Number of relevant features, R Proportion of incorrect labels grid single separate grouped 0 20 40 60 80 0.3 0.35 0.4 0.45 0.5 0.55 Training set size, M Proportion of incorrect labels grid single separate grouped Figure 2: HMM simulation experiments. (a) State diagram of the HMM used in the simulations. (b) Testing set performance when varying R, using M = 10. (c) Testing set performance when varying M, using R = 5. In both (b) and (c), each point represents an average over 100 independent runs of HMM training/holdout/testing set generation and CRF training and hyperparameter optimization. However, we can do much better by reorganizing the computations in such a way that the Jacobian matrix Jd is never explicitly required. In particular, substituting (6) into (1), ∇dℓH(w⋆) = −BT (C + ∇2 wℓT (w⋆))−1∇wℓH(w⋆) (10) we observe that it suffices to solve the single linear system, (C + ∇2 wℓT (w⋆))x = ∇wℓH(w⋆) (11) and then form ∇dℓH(w⋆) = −BT x. By organizing the computations this way, the number of least squares problems that must be solved is substantially reduced from k to only one. A similar trick was previously used for hyperparameter adaptation in SVMs [16] and kernel logistic regression [33]. Figure 1 shows a summary of our algorithm for hyperparameter gradient computation.1 5 Experiments To test the effectiveness of our hyperparameter learning algorithm, we applied it to two tasks: a simulated sequence labeling task involving noisy features, and a real-world application of conditional log-linear models to the biological problem of RNA secondary structure prediction. Sequence labeling simulation. For our simulation test, we constructed a simple linear-chain hidden Markov model (HMM) with binary-valued hidden nodes, yi ∈{0, 1}.2 We associated 40 binary-valued features xj i, j ∈{1, . . . , 40} with each hidden state yi, including R “relevant” observed features whose values were chosen based on yi, and (40 −R) “irrelevant” noise features whose values were chosen to be either 0 or 1 with equal probability, independent of yi.3 Figure 2a shows the graphical model representing the HMM. For each run, we used the HMM to simulate training, holdout, and testing sets of M, 10, and 1000 sequences, respectively, each of length 10. Next, we constructed a CRF based on an HMM model similar to that shown in Figure 2a in which potentials were included for the initial node y1, between each yi and yi+1, and between yi and each xj i (including both the observed features and the noise features). We then performed gradient-based hyperparameter learning using three different parameter-tying schemes: (a) all hyperparameters constrained to be equal, (b) separate hyperparameter groups for each parameter of the model, and (c) transitions, observed features, and noise features each grouped together. Figure 2b shows the performance of the CRF for each of the three parameter-tying gradient-based optimization schemes, as well as the performance of scheme (a) when using the standard grid-search strategy of trying regularization matrices CI for C ∈  . . . , 2−2, 2−1, 20, 21, 22, . . . . As seen in Figures 2b and 2c, the gradient-based procedure performed either as well as or better than a grid search for single hyperparameter models. Using either a single hyperparameter or all separate hyperparameters generally gave similar results, with a slight tendency for the separate 1In practice, roughly 50-100 iterations of CG were sufficient to obtain hyperparameter gradients, meaning that the cost of running Algorithm 1 was approximately the same as the cost of solving OPT1 for a single fixed setting of the hyperparameters. Roughly 3-5 line searches were sufficient to identify good hyperparameter settings; assuming that each line search takes 2-4 times the cost of solving OPT1, the overall hyperparameter learning procedure takes approximately 20 times the cost of solving OPT1 once. 2For our HMM, we set initial state probabilities to 0.5 each, and used self-transition probabilities of 0.6. 3Specifically, we drew each xj i independently according to P(xj i = v | yi = v) = 0.6, v ∈{0, 1}. (a) (b) RNA sequence secondary structure uccguagaaggc 5’ 3’ 3’ 5’ .a.g.g | | | .u.c.c . . a g . . a u . . g a . 0.4 0.45 0.5 0.55 0.6 0.65 0.7 0.75 0.8 0.45 0.5 0.55 0.6 0.65 0.7 0.75 0.8 Mfold ViennaRNA PKNOTS ILM Pfold CONTRAfold (our algorithm) Specificity Sensitivity single (AUC=0.6169, logloss=5916) separate (AUC=0.6383, logloss=5763) grouped (AUC=0.6406, logloss=5531) (c) Regularization group exp(di) fold A fold B hairpin loop lengths 0.0832 0.456 helix closing base pairs 0.780 0.0947 symmetric internal loop lengths 6.32 0.0151 external loop lengths 0.338 0.401 bulge loop lengths 0.451 2.03 base pairings 2.01 7.95 internal loop asymmetry 4.24 6.90 explicit internal loop sizes 12.8 6.39 terminal mismatch interactions 132 50.2 single base pair stacking interactions 71.0 104 1 × 1 internal loop nucleotides 139 120. single base bulge nucleotides 136 130. internal loop lengths 1990 35.3 multi-branch loop lengths 359 2750 helix stacking interactions 12100 729 Figure 3: RNA secondary structure prediction. (a) An illustration of the secondary structure prediction task. (b) Grouped hyperparameters learned using our algorithm for each of the two folds. (c) Performance comparison with state-of-the-art methods when using either a single hyperparameter (the “original” CONTRAfold), separate hyperparameters, or grouped hyperparameters. hyperparameter model to overfit. Enforcing regularization groups, however, gave consistently lower error rates, achieving an absolute reduction in generalization error over the next-best model of 6.7%, corresponding to a relative reduction of 16.2%. RNA secondary structure prediction. We also applied our framework to the problem of RNA secondary structure prediction. Ribonucleic acid (RNA) molecules are long nucleic acid polymers present in the cells of all living organisms. For many types of RNA, three-dimensional (or tertiary) structure plays an important role in determining the RNA’s function. Here, we focus on the task of predicting RNA secondary structure, i.e., the pattern of nucleotide base pairings which form the two-dimensional scaffold upon which RNA tertiary structures assemble (see Figure 3a). As a starting point, we used CONTRAfold [7], a current state-of-the-art secondary structure prediction program based on CLLMs. In brief, the CONTRAfold program models RNA secondary structures using a variant of stochastic context-free grammars (SCFGs) which incorporates features chosen to closely match the energetic terms found in standard physics-based models of RNA structure. These features model the various types of loops that occur in RNAs (e.g., hairpin loops, bulge loops, interior loops, etc.). To control overfitting, CONTRAfold uses flat L2 regularization. Here, we modified the existing implementation to perform an “outer” optimization loop based on our algorithm, and chose regularization groups either by (a) enforcing a single hyperparameter group, (b) using separate groups for each parameter, or (c) grouping according to the type of each feature (e.g., all features for describing hairpin loop lengths were placed in a single regularization group). For testing, we collected 151 RNA sequences from the Rfam database [13] for which experimentally-determined secondary structures were already known. We divided this dataset into two folds (denoted A and B) and performed two-fold cross-validation. Despite the small size of the training set, the hyperparameters learned on each fold were nonetheless qualitatively similar, indicating the robustness of the procedure (see Figure 3b). As expected, features with small regularization hyperparameters correspond to properties of RNAs which are known to contribute strongly to the energetics of RNA secondary structure, whereas many of the features with larger regularization hyperparameters indicate structural properties whose presence/absence are either less correlated with RNA secondary structure or sufficiently noisy that their parameters are difficult to determine reliably from the training data. We then compared the cross-validated performance of algorithm with state-of-the-art methods (see Figure 3c).4 Using separate or grouped hyperparameters both gave increased sensitivity and increased specificity compared to the original model, which was learned using a single regularization hyperparameter. Overall, the testing logloss (summed over the two folds) decreased by roughly 6.5% when using grouped hyperparameters and 2.6% when using multiple separate hyperparameters, while the estimated testing ROC area increased by roughly 3.8% and 3.4%, respectively. 6 Discussion and related work In this work, we presented a gradient-based approach for hyperparameter learning based on minimizing logloss on a holdout set. While the use of cross-validation loss as a proxy for generalization error is fairly natural, in many other supervised learning methods besides log-linear models, other objective functions have been proposed for hyperparameter optimization. In SVMs, approaches based on optimizing generalization bounds [4], such as the radius/margin-bound [15] or maximal discrepancy criterion [2] have been proposed. Comparable generalization bounds are not generally known for CRFs; even in SVMs, however, generalization bound-based methods empirically do not outperform simpler methods based on optimizing five-fold cross-validation error [8]. A different method for dealing with hyperparameters, common in neural network modeling, is the Bayesian approach of treating hyperparameters themselves as parameters in the model to be estimated. In an ideal Bayesian scheme, one does not perform hyperparameter or parameter inference, but rather integrates over all possible hyperparameters and parameters in order to obtain a posterior distribution over predicted outputs given the training data. This integration can be performed using a hybrid Monte Carlo strategy [27, 38]. For the types of large-scale log-linear models we consider in this paper, however, the computational expense of sampling-based strategies can be extremely high due to slow convergence of MCMC techniques [26]. Empirical Bayesian (i.e., ML-II) strategies, such as Automatic Relevance Determination (ARD) [22], take the intermediate approach of integrating over parameters to obtain the marginal likelihood (known as the log evidence), which is then optimized with respect to the hyperparameters. Computing marginal likelihoods, however, can be quite costly, especially for log-linear models. One method for doing this involves approximating the parameter posterior distribution as a Gaussian centered at the posterior mode [22, 37]. In this strategy, however, the “Occam factor” used for hyperparameter optimization still requires a Hessian computation, which does not scale well for log-linear models. An alternate approach based on using a modification of expectation propagation (EP) [25] was applied in the context of Bayesian CRFs [32] and later extended to graph-based semi-supervised learning [14]. As described, however, inference in these models relies on non-traditional “probitstyle” potentials for efficiency reasons, and known algorithms for inference in Bayesian CRFs are limited to graphical models with fixed structure. In contrast, our approach works broadly for a variety of log-linear models, including the grammar-based models common in computational biology and natural language processing. Furthermore, our algorithm is simple and efficient, both conceptually and in practice: one iteratively optimizes the parameters of a log-linear model using a fixed setting of the hyperparameters, and then one changes the hyperparameters based on the holdout logloss gradient. The gradient computation relies primarily on a simple conjugate gradient solver for linear systems, coupled with the ability to compute Hessian-vector products (straightforward in any modern programming language that allows for operation overloading). As we demonstrated in the context of RNA secondary structure prediction, gradient-based hyperparameter learning is a practical and effective method for tuning hyperparameters when applied to large-scale log-linear models. Finally we note that for neural networks, [9] and [5] proposed techniques for simultaneous optimization of hyperparameters and parameters; these results suggest that similar procedures for faster hyperparameter learning that do not require a doubly-nested optimization may be possible. References [1] L. Andersen, J. Larsen, L. Hansen, and M. Hintz-Madsen. Adaptive regularization of neural classifiers. In NNSP, 1997. [2] D. Anguita, S. Ridella, F. Rivieccio, and R. Zunino. Hyperparameter design criteria for support vector classifiers. Neurocomputing, 55:109–134, 2003. 4Following [7], we used the maximum expected accuracy algorithm for decoding, which returns a set of candidates parses reflecting different trade-offs between sensitivity (proportion of true base-pairs called) and specificity (proportion of called base-pairs which are correct). [3] Y. Bengio. Gradient-based optimization of hyperparameters. Neural Computation, 12:1889–1900, 2000. [4] O. Chapelle, V. Vapnik, O. Bousquet, and S. Mukherjee. Choosing multiple parameters for support vector machines. Machine Learning, 46(1–3):131–159, 2002. [5] D. Chen and M. Hagan. Optimal use of regularization and cross-validation in neural network modeling. In IJCNN, 1999. [6] C. B. Do, S. S. Gross, and S. Batzoglou. CONTRAlign: discriminative training for protein sequence alignment. In RECOMB, pages 160–174, 2006. [7] C. B. Do, D. A. Woods, and S. Batzoglou. CONTRAfold: RNA secondary structure prediction without physics-based models. Bioinformatics, 22(14):e90–e98, 2006. [8] K. Duan, S. S. Keerthi, and A.N. Poo. Evaluation of simple performance measures for tuning SVM hyperparameters. Neurocomputing, 51(4):41–59, 2003. [9] R. Eigenmann and J. A. Nossek. Gradient based adaptive regularization. In NNSP, pages 87–94, 1999. [10] T. Glasmachers and C. Igel. Gradient-based adaptation of general Gaussian kernels. Neural Comp., 17(10):2099–2105, 2005. [11] A. Globerson, T. Y. Koo, X. Carreras, and M. Collins. Exponentiated gradient algorithms for log-linear structured prediction. In ICML, pages 305–312, 2007. [12] C. Goutte and J. Larsen. Adaptive regularization of neural networks using conjugate gradient. In ICASSP, 1998. [13] S. Griffiths-Jones, S. Moxon, M. Marshall, A. Khanna, S. R. Eddy, and A. Bateman. Rfam: annotating non-coding RNAs in complete genomes. Nucleic Acids Res, 33:D121–D124, 2005. [14] A. Kapoor, Y. Qi, H. Ahn, and R. W. Picard. Hyperparameter and kernel learning for graph based semisupervised classification. In NIPS, pages 627–634, 2006. [15] S. S. Keerthi. Efficient tuning of SVM hyperparameters using radius/margin bound and iterative algorithms. IEEE Transaction on Neural Networks, 13(5):1225–1229, 2002. [16] S. S. Keerthi, V. Sindhwani, and O. Chapelle. An efficient method for gradient-based adaptation of hyperparameters in SVM models. In NIPS, 2007. [17] K. Kobayashi, D. Kitakoshi, and R. Nakano. Yet faster method to optimize SVR hyperparameters based on minimizing cross-validation error. In IJCNN, volume 2, pages 871–876, 2005. [18] K. Kobayashi and R. Nakano. Faster optimization of SVR hyperparameters based on minimizing crossvalidation error. In IEEE Conference on Cybernetics and Intelligent Systems, 2004. [19] J. Lafferty, A. McCallum, and F. Pereira. Conditional random fields: probabilistic models for segmenting and labeling sequence data. In ICML 18, pages 282–289, 2001. [20] J. Larsen, L. K. Hansen, C. Svarer, and M. Ohlsson. Design and regularization of neural networks: the optimal use of a validation set. In NNSP, 1996. [21] J. Larsen, C. Svarer, L. N. Andersen, and L. K. Hansen. Adaptive regularization in neural network modeling. In Neural Networks: Tricks of the Trade, pages 113–132, 1996. [22] D. J. C. MacKay. Bayesian interpolation. Neural Computation, 4(3):415–447, 1992. [23] D. J. C. MacKay and R. Takeuchi. Interpolation models with multiple hyperparameters. Statistics and Computing, 8:15–23, 1998. [24] J. R. R. A. Martins, P. Sturdza, and J. J. Alonso. The complex-step derivative approximation. ACM Trans. Math. Softw., 29(3):245–262, 2003. [25] T. P. Minka. Expectation propagation for approximate Bayesian inference. In UAI, volume 17, pages 362–369, 2001. [26] I. Murray and Z. Ghahramani. Bayesian learning in undirected graphical models: approximate MCMC algorithms. In UAI, pages 392–399, 2004. [27] R. M. Neal. Bayesian Learning for Neural Networks. Springer, 1996. [28] A. Y. Ng. Preventing overfitting of cross-validation data. In ICML, pages 245–253, 1997. [29] A. Y. Ng. Feature selection, L1 vs. L2 regularization, and rotational invariance. In ICML, 2004. [30] J. Nocedal and S. J. Wright. Numerical Optimization. Springer, 1999. [31] B. A. Pearlmutter. Fast exact multiplication by the Hessian. Neural Comp, 6(1):147–160, 1994. [32] Y. Qi, M. Szummer, and T. P. Minka. Bayesian conditional random fields. In AISTATS, 2005. [33] M. Seeger. Cross-validation optimization for large scale hierarchical classification kernel methods. In NIPS, 2007. [34] F. Sha and F. Pereira. Shallow parsing with conditional random fields. In NAACL, pages 134–141, 2003. [35] S. Sundararajan and S. S. Keerthi. Predictive approaches for choosing hyperparameters in Gaussian processes. Neural Comp., 13(5):1103–1118, 2001. [36] S. V. N. Vishwanathan, N. N. Schraudolph, M. W. Schmidt, and K. P. Murphy. Accelerated training of conditional random fields with stochastic gradient methods. In ICML, pages 969–976, 2006. [37] M. Wellings and S. Parise. Bayesian random fields: the Bethe-Laplace approximation. In ICML, 2006. [38] C. K. I. Williams and D. Barber. Bayesian classification with Gaussian processes. IEEE Transactions on Pattern Analysis and Machine Intelligence, 20(12):1342–1351, 1998. [39] X. Zhang and W. S. Lee. Hyperparameter learning for graph based semi-supervised learning algorithms. In NIPS, 2007.
2007
103
3,130
Discovering Weakly-Interacting Factors in a Complex Stochastic Process Charlie Frogner School of Engineering and Applied Sciences Harvard University Cambridge, MA 02138 frogner@seas.harvard.edu Avi Pfeffer School of Engineering and Applied Sciences Harvard University Cambridge, MA 02138 avi@eecs.harvard.edu Abstract Dynamic Bayesian networks are structured representations of stochastic processes. Despite their structure, exact inference in DBNs is generally intractable. One approach to approximate inference involves grouping the variables in the process into smaller factors and keeping independent beliefs over these factors. In this paper we present several techniques for decomposing a dynamic Bayesian network automatically to enable factored inference. We examine a number of features of a DBN that capture different types of dependencies that will cause error in factored inference. An empirical comparison shows that the most useful of these is a heuristic that estimates the mutual information introduced between factors by one step of belief propagation. In addition to features computed over entire factors, for efficiency we explored scores computed over pairs of variables. We present search methods that use these features, pairwise and not, to find a factorization, and we compare their results on several datasets. Automatic factorization extends the applicability of factored inference to large, complex models that are undesirable to factor by hand. Moreover, tests on real DBNs show that automatic factorization can achieve significantly lower error in some cases. 1 Introduction Dynamic Bayesian networks (DBNs) are graphical model representations of discrete-time stochastic processes. DBNs generalize hidden Markov models and are used for modeling a wide range of dynamic processes, including gene expression [1] and speech recognition [2]. Although a DBN represents the process’s transition model in a structured way, all variables in the model might become jointly dependent over the course of the process and so exact inference in a DBN usually requires tracking the full joint probability distribution over all variables; it is generally intractable. Factored inference approximates this joint distribution over all variables as the product of smaller distributions over groups of variables (factors) and in this way enables tractable inference for large, complex models. Inference algorithms based on this idea include Boyen-Koller [3], the Factored Frontier [4] and Factored Particle Filtering [5]. Factored inference has generally been demonstrated for models that are factored by hand. In this paper we will show that it is possible algorithmically to select a good factorization, thus not only extending the applicability of factored inference to larger models, for which it might be undesireable manually to choose a factorization, but also allowing for better (and sometimes ’non-obvious’) factorizations. The quality of a factorization is defined by the amount of error incurred by repeatedly discarding the dependencies between factors and treating them as independent during inference. As such we formulate the goal of our algorithm as the minimization over factorizations of an objective that describes the error we expect due to this type of approximation. For this purpose we have examined a range of features that can be computed from the specification of the DBN, based both on 1 the underlying graph structure and on two essential conceptions of weak interaction between factors: the degree of separability [6] and mutual information. For each principle we investigated a number of heuristics. We find that the mutual information between factors that is introduced by one step of belief state propagation is especially well-suited to the problem of finding a good factorization. Complexity is an issue in searching for good factors, as the search space is large and the scoring heuristics themselves are computationally intensive. We compare several search methods for finding factors that allow for different tradeoffs between the efficiency and the quality of the factorization. The fastest is a graph partitioning algorithm in which we find a k-way partition of a weighted graph with edge-weights being pairwise scores between variables. Agglomerative clustering and local search methods use the higher-order scores computed between whole factors, and are hence slower while finding better factorizations. The more expensive of these methods are most useful when run offline, for example when the DBN is to be used for online inference and one cares about finding a good factorization ahead of time. We additionally give empirical results on two other real DBN models as well as randomly-generated models. Our results show that dynamic Bayesian networks can be decomposed efficiently and automatically, enabling wider applicability of factored inference. Furthermore, tests on real DBNs show that using automatically found factors can in some cases yield significantly lower error than using factors found by hand. 2 Background A dynamic Bayesian network (DBN), [7] [8], represents a dynamic system consisting of some set of variables that co-evolve in discrete timesteps. In this paper we are dealing with discrete variables. We denote the set of variables in the system by X, with the canonical variables being those that directly influence at least one variable in the next timestep. We call the probability distribution over the possible states of the system at a given timestep the belief state. The DBN gives us the probabilities of transitioning from any given system state at t to any other system state at time t + 1, and it does so in a factored way: the probability that a variable takes on a given state at t + 1 depends only on the states of a subset of the variables in the system at t. We can hence represent this transition model as a Bayesian network containing the variables in X at timestep t, denoted Xt, and the variables in X at timestep t + 1, say Xt+1 – this is called a 2-TBN (for two-timeslice Bayesian network). By inferring the belief state over Xt+1 from that over Xt, and conditioning on observations, we propagate the belief state through the system dynamics to the next timestep. The specification of a DBN also includes a prior belief state at time t = 0. Note that, although each variable at t + 1 may only depend on a small subset of the variables at t, its state might be correlated implicitly with the state of any variable in the system, as the influence of any variable might propagate through intervening variables over multiple timesteps. As a result, the whole belief state over X (at a given timestep) in general is not factored. Boyen and Koller, [3], find that, despite this fact, we can factor the system into components whose belief states are kept independently, and the error incurred by doing so remains bounded over the course of the process. The BK algorithm hence approximates the belief state at a given timestep as the product of the local belief states for the factors (their marginal distributions), and does exact inference to propagate this approximate belief state to the next timestep. Both the Factored Frontier, [4], and Factored Particle, [5], algorithms also rely on this idea of a factored belief state representation. In [9] and [6], Pfeffer introduced conditions under which a single variable’s (or factor’s) marginal distribution will be propagated accurately through belief state propagation, in the BK algorithm. The degree of separability is a property of a conditional probability distribution that describes the degree to which that distribution can be decomposed as the sum of simpler conditional distributions, each of which depends on only a subset of the conditioning variables. For example, let p(Z|XY ) give the probability distribution for Z given X and Y . If p(Z|XY ) is separable in terms of X and Y to a degree α, this means that we can write p(Z|XY ) = α[γpX(Z|X) + (1 −γ)pY (Z|Y )] + (1 −α)pXY (Z|XY ) (1) for some conditional probability distributions pX(Z|X), pX(Z|Y ), and pXY (Z|XY ) and some parameter γ. We will say that the degree of separability is the maximum α such that there exist pX(Z|X), pX(Z|Y ), and pXY (Z|XY ) and γ that satisfy (1). [9] and [6] have shown that if a system is highly separable then the BK algorithm produces low error in the components’ marginal distributions. 2 Previous work has explored bounds on the error encountered by the BK algorithm. [3] showed that the error over the course of a process is bounded with respect to the error incurred by repeatedly projecting the exact distribution onto the factors as well as the mixing rate of the system, which can be thought of as the rate at which the stochasticity of the system causes old errors to be forgotten. [10] analyzed the error introduced between the exact distribution and the factored distribution by just one step of belief propagation. The authors noted that this error can be decomposed as the sum of conditional mutual information terms between variables in different factors and showed that each such term is bounded with respect to the mixing rate of the subsystem comprising the variables in that term. Computing the value of this error decomposition, unfortunately, requires one to examine a distribution over all of the variables in the model, which can be intractable. Along with other heuristics, we examined two approaches to automatic factorization that seek directly to exploit the above results, labeled in-degree and out-degree in Table 1. 3 Automatic factorization with pairwise scores We first investigated a collection of features, computable from the specification of the DBN, that capture different types of pairwise dependencies between variables. These features are based both on the 2-TBN graph structure and on two conceptions of interaction: the degree of separability and mutual information. These methods allow us to factorize a DBN without computing expensive whole-factor scores. 3.1 Algorithm: Recursive min-cut We use the following algorithm to find a factorization using only scores between pairs of variables. We build an undirected graph over the canonical variables in the DBN, weighting each edge between two variables with their pairwise score. An obvious algorithm for finding a partition that minimizes pairwise interactions between variables in different factors would be to compute a k-way min-cut, taking, say, the best-scoring such partition in which all factors are below a size limit. Unfortunately, on larger models this approach underperforms, yielding many partitions of size one. Instead we find that a good factorization can be achieved by computing a recursive min-cut, recurring until all factors are smaller than the pre-defined maximum size. We begin with all variables in a single factor. As long as there exists a factor whose weight is larger than the maximum, we do the following. For each factor that is too large, we search over the number of smaller factors, k, into which to divide the large factor, for each k computing the k-way min-cut factorization of the variables in the large factor. In our experiments we use a spectral graph partitioning algorithm, [11], e.g. We choose the k that minimizes the overall sum of between-factor scores. This is repeated until all factors are of sizes less than the maximum. This min-cut approach is designed only to use scores computed between pairs of variables, and so it sacrifices optimality for significant speed gains. 3.2 Pairwise scores Graph structure As a baseline in terms of speed and simplicity, we first investigated three types of pairwise graph relationships between variables that are indicative of different types of dependency. • Children of common parents. Suppose that two variables at time t + 1, Xt+1 and Yt+1, depend on some common parents Zt. As X and Y share a common, direct influence, we might expect them to to become correlated over the course of the process. The score between X and Y is the number of parents they share in the 2-TBN. • Parents of common children. Suppose that Xt and Yt jointly influence common children Zt+1. Then we might care more about any correlations between X and Y , because they jointly influence Z. If X and Y are placed in separate factors, then the accuracy of Z’s marginal distribution will depend on how correlated X and Y were. Here the score between X and Y is the number of children they share in the 2-TBN. • Parent to child. If Yt+1 directly depends on Xt, or Xt+1 on Yt, then we expect them to be correlated. The score between X and Y is the number of edges between them in the 2-TBN. 3 Degree of separability The degree of separability for a given factor’s conditional distribution in terms of the other factors gives a measure of how accurately the belief state for that factor will be propagated via that conditional distribution to the next timestep, in BK inference. When a factor’s conditional distribution is highly separable in terms of the other factors, ignored dependencies between the other factors lead to relatively small errors in that factor’s marginal belief state after propagation. We can hence use the degree of separability as an objective to be maximized: we want to find the factorization that yields the highest degree of separability for each factor’s conditional distribution. Computing the degree of separability is a constrained optimization problem, and [12] gives an approximate method of solution. For distributions over many variables the degree of separability is quite expensive to compute, as the number of variables in the optimization grows exponentially with the number of discrete variables in the input conditional distribution. Computing the degree of separability for a small distribution is, however, reasonably efficient. In adapting the degree of separability to a pairwise score for the min-cut algorithm, we took two approaches. • Separability of the pair’s joint conditional distribution: We assign a score to the pair of canonical variables X and Y equal to the degree of separability for the joint conditional distribution p(Xt+1Yt+1|Parents(Xt+1) ∪Parents(Yt+1)). We want to maximize this value for variables that are joined in a factor, as a high degree of separability implies that the error of the factor marginal distribution after propagation in BK will be low. Note that the degree of separability is defined in terms of groups of parent variables. If we have, for example, p(Z|WXY ), then this distribution might be highly separable in terms of the groups XY and W, but not in terms of WX and Y . If, however, p(Z|WXY ) is highly separable in terms of W, X and Y grouped separately, then it is at least as separable in terms of any other groupings. We compute the degree of separability for the above joint conditional distribution in terms of the parents taken separately. • Non-separability between parents of a common child: If two parents are highly non-separable in a common child’s conditional distribution, then the child’s marginal distribution can be rendered inaccurate by placing these two parents in different components. For two variables X and Y , we refer to the shared children of Xt and Yt in timeslice t + 1 as Zt+1. The strength of interaction between X and Y is defined to be the average degree of non-separability for each variable in Zt+1 in terms of its parents taken separately. The degree of non-separability is one minus the degree of separability. Mutual information Whereas the degree of separability is a property of a single factor’s conditional distribution, the mutual information between two factors measures their joint dependencies. To compute it exactly requires, however, that we obtain a joint distribution over the two factors. All we are given is a DBN defining the conditional distribution over the next timeslice given the previous, and some initial distribution over the variables at time 1. In order to obtain a suitable joint distribution over the variables at t + 1 we must assume a prior distribution over the variables at time t. We therefore examine several features based on the mutual information that we can compute from the DBN in this way, to capture different types of dependencies. • Mutual information after one timestep: We assume a prior distribution over the variables at time t and do one step of propagation to get a marginal distribution over Xt+1 and Yt+1. We then use this marginal to compute the mutual information between X and Y , thus estimating the degree of dependency between X and Y that results from one step of the process. • Mutual information between timeslices t and t+1: We measure the dependencies resulting from X and Y directly influencing each other between timeslices: the more information Xt carries about Yt+1, the more we expect them to become correlated as the process evolves. Again, we assume a prior distribution at time t and use this to obtain the joint distribution p(Yt+1Xt)), from which we can calculate their mutual information. We sum the mutual information between Xt and Yt+1 and that between Yt and Xt+1 to get the score. • Mutual information from the joint over both timeslices: We take into account all possible direct influences between X and Y, by computing the mutual information between the sets of variables (Xt ∪Xt+1) and (Yt ∪Yt+1). As before, we assume a prior distribution at time t to compute a joint distribution p((Xt∪Xt+1)∪(Yt∪Yt+1)), from which we can get the mutual information. 4 There are many possibilities for a prior distribution at time t. We can assume a uniform distribution, in which case the resulting mutual information values are exactly those introduced by one step of inference, as all variables are independent at time t. More costly would be to generate samples from the DBN and to do inference, computing the average mutual information values observed over the steps of inference. We found that, on small examples, there was little practical benefit to doing the latter. For simplicity we use the uniform prior, although the effects of different prior assumptions deserves further inquiry. 3.3 Empirical comparison We compared the preceding pairwise scores by factoring randomly-generated DBNs, using the BK algorithm for belief state monitoring. We computed two error measures. The first is the joint belief state error, which is the relative entropy between the product of the factor marginal belief states and the exact joint belief state. The second is the average factor belief state error, which is the average over all factors of the relative entropy between each factor’s marginal distribution and the equivalent marginal distribution from the exact joint belief state. We were constrained in choosing datasets on which exact inference is tractable, which limited both the number of state variables and the number of parameters per variable. Note that in our tables the joint KL distance is always given in terms of 10−2, while the factor marginal KL distance is in terms of 10−4. For this comparison we used two datasets. The first is a large, relatively uncomplicated dataset that is intended to elucidate basic distinctions between the different heuristics. It consists of 400 DBNs, each of which contains 12 binary-valued state variables and 4 noisy observation variables. We tried to capture the tendency in real DBNs for variables to depend on a varying number of parents by drawing the number of parents for each variable from a gaussian distribution of mean 2 and standard deviation 1 (rounding the result and truncating at zero), and choosing parents uniformly from among the other variables. In real models variables usually, but not always, depend on themselves in the previous timeslice, and each variable in our networks also depended on itself with a probability of 0.75. Finally, the parameters for each variable were drawn randomly with a uniform prior. The second dataset is intended to capture more complicated structures commonly seen in real DBNs: determinisim and context-specific independence. It consists of 50 larger models, each with 20 binary state variables and 8 noisy observation variables. Parents and parameters were chosen as before, except that in this case we chose several variables to be deterministic, each computing a boolean function of its parents, and several other variables to have tree-structured context-specific independence. To generate context-specific independence, the variable’s parents were randomly permuted and between one half and all of the parents were chosen each to induce independence between the child variable and the parents lower in the tree, conditional upon one of its states. The results are shown in Table 1. For reference we have shown two additional methods that minimize the maximum out-degree and in-degree of factors. These are suggested by Boyen and Koller as a means of controlling the mixing rate of factored inference, which is used to bound the error. In all cases, the mutual-information based factorizations, and in particular the mutual information after one timestep, yielded lower error, both in the joint belief state and in the factor marginal belief states. The degree of separability is apparently not well-adapted to a pairwise score, given that it is naturally defined in terms of an entire factor. 4 Exploiting higher-order interactions The pairwise heuristics described above do not take into account higher-order properties of whole groups of variables: the mutual information between two factors is usually not exactly the sum of its constituent pairwise information relationships, and the degree of separability is naturally formulated in terms of a whole factor’s conditional distribution and not between arbitrary pairs of variables. Two search algorithms allow us to use scores computed for whole factors, and to find better factors while sacrificing speed. 4.1 Algorithms: Agglomerative clustering and local search Agglomerative clustering begins with all canonical variables in separate factors, and at each step chooses a pair of factors to merge such that the score of the factorization is minimized. If a merger leads to a factor of size greater than some given maximum, it is ignored. The algorithm stops when no advantageous merger is found. As the factors being scored are always of relatively small size, agglomerative clustering allows us to use full-factor scores. 5 Table 1: Random DBNs with pairwise scores 12 nodes 20 nodes/determinism/CSI Joint KL Factor KL Joint KL Factor KL ×10−4 ×10−2 ×10−4 ×10−2 Out-degree 2.50 1.25 16.0 10.0 In-degree 2.44 1.20 15.1 8.54 Children of common parents 2.61 1.87 15.5 10.0 Parents of common children 1.98 1.01 11.9 5.92 Parent to child 2.28 1.19 14.9 6.62 Separability between parents 2.69 1.09 15.3 14.0 Separability of pairs of variables 2.80 1.27 18.5 12.0 Mut. information after timestep 1.11 0.408 7.11 3.44 Mut. information between timeslices 1.62 0.664 9.73 4.96 Mut. information from both timeslices 1.65 0.575 10.5 5.15 Local search begins with some initial factorization and attempts to find a factorization of minimum score by iteratively modifying this factorization. More specifically, from any given factorization moves of the following three types are considered: create a new factor with a single node, move a single node from one factor into another, or swap a pair of nodes in different factor. At each iteration only those moves that do not yield a factor of size greater than some given maximum are considered. The move that yields the lowest score at that iteration is chosen. If there is no move that decreases the score (and so we have hit a local minimum), however, the factors are randomly re-initialized and the algorithm continues searching, terminating after a fixed number of iterations. The factorization with the lowest score of all that were examined is returned. As with agglomerative clustering, local search enables the use of full-factor scores. We have found that good results are achieved when the factors are initialized (and re-initialized) to be as large as possible. In addition, although the third type of move (swapping) is a composition of the other two, we have found that the sequence of moves leading to an advantageous swap is not always a path of strictly decreasing scores, and performance degrades without it. We note that all of the algorithms benefit greatly from caching the components of the scores that are computed. 4.2 Empirical comparison We verified that the results for the pairwise scores extend to whole-factor scores on a dataset of 120 randomly-generated DBNs, each of which contained 8 binary-valued state variables. We were significantly constrained in our choice of models by the complexity of computing the degree of separability for large distributions: even on these smaller models, doing agglomerative clustering with the degree of separability sometimes took over 2 hours and local search much longer. We have therefore confined our comparison to agglomerative clustering on 8-variable models. We divided the dataset into three groups to explore the effects of both extensive determinism and context-specific independence separately. The mutual information after one timestep again produced the lowest error in both in the factor marginal belief states and in the joint belief state. For the networks with large amounts of contextspecific independence, the degree of separability was always close to one, and this might have hampered its effectiveness for clustering. Interestingly, we see that agglomerative clustering can sometimes produce results that are worse than those for graph partitioning, although local search consistently outperforms the two. This may be due to the fact that agglomerative clustering tends to produce smaller clusters than the divisive approach. Finally, we note that, although determinism greatly increased error, the relative performance of the different heuristics and algorithms was unchanged. Local search consistently found lower-error factorizations. We further compared the different algorithms on the dataset with 12 state variables per DBN, from Section 3.3, using the mutual information after one timestep score. It is perhaps surprising that the graph min-cut algorithm can perform comparably with the others, given that it is restricted to pairwise scores. 6 Table 2: Random DBNs using pairwise and whole-factor scores Score type/Search algorithm 8 nodes 8 nodes/determ. 8 nodes/CSI Joint Factor Joint Factor Joint Factor Separability between parents: Min-cut 2.36 2.54 38.9 70 0.82 0.45 Separability b/t pairs of variables: Min-cut 2.42 2.12 27.2 139 0.56 0.31 Whole-factor separability: Agglomerative 2.19 1.23 31.1 61 0.99 0.46 Mut. info. after one timestep: Min-cut 1.20 1.00 18.1 44 0.25 0.11 Agglomerative 1.15 1.13 19.0 43 0.20 0.11 Local search 1.05 0.90 13.8 32 0.18 0.098 Mut. info. between timeslices: Min-cut 1.62 1.17 27.7 47 0.55 0.24 Agglomerative 1.60 1.45 27.6 61 0.53 0.32 Local search 1.40 1.20 23.8 44 0.52 0.32 Mut. info. both timeslices: Min-cut 1.88 1.51 22.9 45 0.64 0.36 Agglomerative 1.86 1.08 25.1 62 0.66 0.34 Local search 1.70 0.95 23.1 26 0.58 0.29 5 Factoring real models Boyen and Koller, [3], demonstrated factored inference on two models that were factored by hand: the Bayesian Automated Taxi network and the water network. Table 3 shows the performance of automatic factorization on these two DBNs. In both cases automatic factorization recovered reasonable factorizations that performed better than those found manually. The Bayesian Automated Taxi (BAT) network, [13], is intended to monitor highway traffic and car state for an automated driving system. The DBN contains 10 persistent state variables and 10 observation variables. Local search with factors of 5 or fewer variables yielded exactly the 5+5 clustering given in the paper. When allowing 4 or fewer variables per factor, local search and agglomerative search both recovered the factorization ([LeftClr], [RightClr], [LatAct+Xdot+InLane], [FwdAct+Ydot+Stopped+EngStatus], [FrontBackStatus]), while graph min-cut found ([EngStatus], [FrontBackStatus], [InLane], [Ydot], [FwdAct+Ydot+Stopped+EngStatus], [LatAct+LeftClr]). The manual factorization from [3] is ([LeftClr+RightClr+LatAct], [Xdot+InLane], [FwdAct+Ydot+Stopped+EngStatus], [FrontBackStatus]). The error results are shown in Table 3. Local search took about 300 seconds to complete, while agglomerative clustering took 138 seconds and graph min-cut 12 seconds. The water network is used for monitoring the biological processes of a water purification plant. It has 8 state variables and 4 observation variables (labeled A through H), and all variables are discrete with 3 or 4 states. The agglomerative and local search algorithms yielded the same result ([A+B+C+E], [D+F+G+H]) and graph min-cut was only slightly different ([A+C+E], [D+F+G+H], [B]). The manual factorization from [3] is ([A+B],[C+D+E+F],[G+H]). The results in terms of KL distance are shown in Figure 3. The automatically recovered factorizations were on average at least an order of magnitude better. Local search took about one minute to complete, while agglomerative clustering took 30 seconds and graph min-cut 3 seconds. 6 Conclusion We compared several heuristics and search algorithms for automatically factorizing a dynamic Bayesian network. These techniques attempt to minimize an objective score that captures the extent to which dependencies that are ignored by the factored approximation will lead to error. The heuristics we examined are based both on the structure of the 2-TBN and on the concepts of degree of separability and mutual information. The mutual information after one step of belief propaga7 Table 3: Algorithm performance 12-var. random BAT Water Jnt. Fact. Jnt. Fact. Jnt. Fact. Min-cut 1.08 0.433 14.7 0.723 0.430 1.32 Agglomerative 1.10 0.55 0.390 0.0485 0.0702 0.566 Local search 1.06 0.52 0.390 0.0485 0.0702 0.566 Manual 5.62 0.0754 3.12 2.12 tion has generally been greatly more effective than the others as an objective for factorization. We presented three search methods that allow for tradeoffs between computational complexity and the quality of the factorizations they produce. Recursive min-cut efficiently uses scores between pairs of variables, while agglomerative clustering and local search both use scores computed between whole factors – the latter two are slower, while achieving better results. Automatic factorization can extend the applicability of factored inference to larger models for which it is undesireable to find factors manually. In addition, tests run on real DBNs show that automatically factorized DBNs can achieve significantly lower error than hand-factored models. Future work might explore extensions to overlapping factors, which have been found to yield lower error in some cases. Acknowledgments This work was funded by an ONR project, with special thanks to Dr. Wendy Martinez. References [1] Sun Yong Kim, Seiya Imot, and Satoru Miyano. Inferring gene networks from time series microarray data using dynamic Bayesian networks. Briefings in Bioinformatics, 2003. [2] Geoffrey Zweig and Stuart Russell. Dynamic Bayesian networks for speech recognition. In National Conference on Artificial Intelligence (AAAI), 1998. [3] Xavier Boyen and Daphne Koller. Tractable inference for complex stochastic processes. In Neural Information Processing Systems, 1998. [4] Kevin Murphy and Yair Weiss. The factored frontier algorithm for approximate inference in DBNs. In Uncertainty in Artificial Intelligence, 2001. [5] Brenda Ng, Leonid Peshkin, and Avi Pfeffer. Factored particles for scalable monitoring. In Uncertainty in Artificial Intelligence, 2002. [6] Avi Pfeffer. Approximate separability for weak interaction in dynamic systems. In Uncertainty in Artificial Intelligence, 2006. [7] Thomas Dean and Keiji Kanazawa. A model for reasoning about persistence and causation. Computational Intelligence, 1989. [8] Kevin Murphy. Dynamic Bayesian networks: representation, inference and learning. PhD thesis, U.C. Berkeley, Computer Science Division, 2002. [9] Avi Pfeffer. Sufficiency, separability and temporal probabilistic models. In Uncertainty in Artificial Intelligence, 2001. [10] Xavier Boyen and Daphne Koller. Exploiting the architecture of dynamic systems. In Proceedings AAAI-99, 1999. [11] Andrew Ng, Michael Jordan, and Yair Weiss. On spectral clustering: analysis and an algorithm. In Neural Information Processing Systems, 2001. [12] Charlie Frogner and Avi Pfeffer. Heuristics for automatically decomposing a dynamic Bayesian network for factored inference. Technical Report TR-04-07, Harvard University, 2007. [13] Jeff Forbes, Tim Huang, Keiji Kanazawa, and Stuart Russell. The BATmobile: towards a Bayesian automatic taxi. In International Joint Conference on Artificial Intelligence, 1995. 8
2007
104
3,131
Stability Bounds for Non-i.i.d. Processes Mehryar Mohri Courant Institute of Mathematical Sciences and Google Research 251 Mercer Street New York, NY 10012 mohri@cims.nyu.edu Afshin Rostamizadeh Department of Computer Science Courant Institute of Mathematical Sciences 251 Mercer Street New York, NY 10012 rostami@cs.nyu.edu Abstract The notion of algorithmic stability has been used effectively in the past to derive tight generalization bounds. A key advantage of these bounds is that they are designed for specific learning algorithms, exploiting their particular properties. But, as in much of learning theory, existing stability analyses and bounds apply only in the scenario where the samples are independently and identically distributed (i.i.d.). In many machine learning applications, however, this assumption does not hold. The observations received by the learning algorithm often have some inherent temporal dependence, which is clear in system diagnosis or time series prediction problems. This paper studies the scenario where the observations are drawn from a stationary mixing sequence, which implies a dependence between observations that weaken over time. It proves novel stability-based generalization bounds that hold even with this more general setting. These bounds strictly generalize the bounds given in the i.i.d. case. It also illustrates their application in the case of several general classes of learning algorithms, including Support Vector Regression and Kernel Ridge Regression. 1 Introduction The notion of algorithmic stability has been used effectively in the past to derive tight generalization bounds [2–4,6]. A learning algorithm is stable when the hypotheses it outputs differ in a limited way when small changes are made to the training set. A key advantage of stability bounds is that they are tailored to specific learning algorithms, exploiting their particular properties. They do not depend on complexity measures such as the VC-dimension, covering numbers, or Rademacher complexity, which characterize a class of hypotheses, independently of any algorithm. But, as in much of learning theory, existing stability analyses and bounds apply only in the scenario where the samples are independently and identically distributed (i.i.d.). Note that the i.i.d. assumption is typically not tested or derived from a data analysis. In many machine learning applications this assumption does not hold. The observations received by the learning algorithm often have some inherent temporal dependence, which is clear in system diagnosis or time series prediction problems. A typical example of time series data is stock pricing, where clearly prices of different stocks on the same day or of the same stock on different days may be dependent. This paper studies the scenario where the observations are drawn from a stationary mixing sequence, a widely adopted assumption in the study of non-i.i.d. processes that implies a dependence between observations that weakens over time [8, 10, 16, 17]. Our proofs are also based on the independent block technique commonly used in such contexts [17] and a generalized version of McDiarmid’s inequality [7]. We prove novel stability-based generalization bounds that hold even with this more general setting. These bounds strictly generalize the bounds given in the i.i.d. case and apply to all stable learning algorithms thereby extending the usefulness of stability-bounds to non-i.i.d. scenar1 ios. It also illustrates their application to general classes of learning algorithms, including Support Vector Regression (SVR) [15] and Kernel Ridge Regression [13]. Algorithms such as support vector regression (SVR) [14,15] have been used in the context of time series prediction in which the i.i.d. assumption does not hold, some with good experimental results [9, 12]. To our knowledge, the use of these algorithms in non-i.i.d. scenarios has not been supported by any theoretical analysis. The stability bounds we give for SVR and many other kernel regularization-based algorithms can thus be viewed as the first theoretical basis for their use in such scenarios. In Section 2, we will introduce the definitions for the non-i.i.d. problems we are considering and discuss the learning scenarios. Section 3 gives our main generalization bounds based on stability, including the full proof and analysis. In Section 4, we apply these bounds to general kernel regularization-based algorithms, including Support Vector Regression and Kernel Ridge Regression. 2 Preliminaries We first introduce some standard definitions for dependent observations in mixing theory [5] and then briefly discuss the learning scenarios in the non-i.i.d. case. 2.1 Non-i.i.d. Definitions Definition 1. A sequence of random variables Z = {Zt}∞ t=−∞is said to be stationary if for any t and non-negative integers m and k, the random vectors (Zt, . . . , Zt+m) and (Zt+k, . . . , Zt+m+k) have the same distribution. Thus, the index t or time, does not affect the distribution of a variable Zt in a stationary sequence. This does not imply independence however. In particular, for i < j < k, Pr[Zj | Zi] may not equal Pr[Zk | Zi]. The following is a standard definition giving a measure of the dependence of the random variables Zt within a stationary sequence. There are several equivalent definitions of this quantity, we are adopting here that of [17]. Definition 2. Let Z = {Zt}∞ t=−∞be a stationary sequence of random variables. For any i, j ∈ Z ∪{−∞, +∞}, let σj i denote the σ-algebra generated by the random variables Zk, i ≤k ≤j. Then, for any positive integer k, the β-mixing and ϕ-mixing coefficients of the stochastic process Z are defined as β(k) = sup n E B∈σn −∞ h sup A∈σ∞ n+k Pr[A | B] −Pr[A] i ϕ(k) = sup n A∈σ∞ n+k B∈σn −∞ Pr[A | B] −Pr[A] . (1) Z is said to be β-mixing (ϕ-mixing) if β(k) →0 (resp. ϕ(k) →0) as k →∞. It is said to be algebraically β-mixing (algebraically ϕ-mixing) if there exist real numbers β0 > 0 (resp. ϕ0 > 0) and r > 0 such that β(k) ≤β0/kr (resp. ϕ(k) ≤ϕ0/kr) for all k, exponentially mixing if there exist real numbers β0 (resp. ϕ0 > 0) and β1 (resp. ϕ1 > 0) such that β(k) ≤β0 exp(−β1kr) (resp. ϕ(k) ≤ϕ0 exp(−ϕ1kr)) for all k. Both β(k) and ϕ(k) measure the dependence of the events on those that occurred more than k units of time in the past. β-mixing is a weaker assumption than φ-mixing. We will be using a concentration inequality that leads to simple bounds but that applies to φ-mixing processes only. However, the main proofs presented in this paper are given in the more general case of β-mixing sequences. This is a standard assumption adopted in previous studies of learning in the presence of dependent observations [8, 10, 16, 17]. As pointed out in [16], β-mixing seems to be “just the right” assumption for carrying over several PAC-learning results to the case of weakly-dependent sample points. Several results have also been obtained in the more general context of α-mixing but they seem to require the stronger condition of exponential mixing [11]. Mixing assumptions can be checked in some cases such as with Gaussian or Markov processes [10]. The mixing parameters can also be estimated in such cases. 2 Most previous studies use a technique originally introduced by [1] based on independent blocks of equal size [8,10,17]. This technique is particularly relevant when dealing with stationary β-mixing. We will need a related but somewhat different technique since the blocks we consider may not have the same size. The following lemma is a special case of Corollary 2.7 from [17]. Lemma 1 (Yu [17], Corollary 2.7). Let µ ≥1 and suppose that h is measurable function, with absolute value bounded by M, on a product probability space Qµ j=1 Ωj, Qµ i=1 σsi ri  where ri ≤ si ≤ri+1 for all i. Let Q be a probability measure on the product space with marginal measures Qi on (Ωi, σsi ri), and let Qi+1 be the marginal measure of Q on Qi+1 j=1 Ωj, Qi+1 j=1 σsj rj  , i = 1, . . . , µ−1. Let β(Q) = sup1≤i≤µ−1 β(ki), where ki = ri+1 −si, and P = Qµ i=1 Qi. Then, | E Q[h] −E P[h]| ≤(µ −1)Mβ(Q). (2) The lemma gives a measure of the difference between the distribution of µ blocks where the blocks are independent in one case and dependent in the other case. The distribution within each block is assumed to be the same in both cases. For a monotonically decreasing function β, we have β(Q) = β(k∗), where k∗= mini(ki) is the smallest gap between blocks. 2.2 Learning Scenarios We consider the familiar supervised learning setting where the learning algorithm receives a sample of m labeled points S = (z1, . . . , zm) = ((x1, y1), . . . , (xm, ym)) ∈(X × Y )m, where X is the input space and Y the set of labels (Y = R in the regression case), both assumed to be measurable. For a fixed learning algorithm, we denote by hS the hypothesis it returns when trained on the sample S. The error of a hypothesis on a pair z ∈X×Y is measured in terms of a cost function c : Y ×Y → R+. Thus, c(h(x), y) measures the error of a hypothesis h on a pair (x, y), c(h(x), y) = (h(x)−y)2 in the standard regression cases. We will use the shorthand c(h, z) := c(h(x), y) for a hypothesis h and z = (x, y) ∈X × Y and will assume that c is upper bounded by a constant M > 0. We denote by bR(h) the empirical error of a hypothesis h for a training sample S = (z1, . . . , zm): bR(h) = 1 m m X i=1 c(h, zi). (3) In the standard machine learning scenario, the sample pairs z1, . . . , zm are assumed to be i.i.d., a restrictive assumption that does not always hold in practice. We will consider here the more general case of dependent samples drawn from a stationary mixing sequence Z over X × Y . As in the i.i.d. case, the objective of the learning algorithm is to select a hypothesis with small error over future samples. But, here, we must distinguish two versions of this problem. In the most general version, future samples depend on the training sample S and thus the generalization error or true error of the hypothesis hS trained on S must be measured by its expected error conditioned on the sample S: R(hS) = E z [c(hS, z) | S]. (4) This is the most realistic setting in this context, which matches time series prediction problems. A somewhat less realistic version is one where the samples are dependent, but the test points are assumed to be independent of the training sample S. The generalization error of the hypothesis hS trained on S is then: R(hS) = E z [c(hS, z) | S] = E z [c(hS, z)]. (5) This setting seems less natural since if samples are dependent, then future test points must also depend on the training points, even if that dependence is relatively weak due to the time interval after which test points are drawn. Nevertheless, it is this somewhat less realistic setting that has been studied by all previous machine learning studies that we are aware of [8,10,16,17], even when examining specifically a time series prediction problem [10]. Thus, the bounds derived in these studies cannot be applied to the more general setting. We will consider instead the most general setting with the definition of the generalization error based on Eq. 4. Clearly, our analysis applies to the less general setting just discussed as well. 3 3 Non-i.i.d. Stability Bounds This section gives generalization bounds for ˆβ-stable algorithms over a mixing stationary distribution.1 The first two sections present our main proofs which hold for β-mixing stationary distributions. In the third section, we will be using a concentration inequality that applies to φ-mixing processes only. The condition of ˆβ-stability is an algorithm-dependent property first introduced in [4] and [6]. It has been later used successfully by [2,3] to show algorithm-specific stability bounds for i.i.d. samples. Roughly speaking, a learning algorithm is said to be stable if small changes to the training set do not produce large deviations in its output. The following gives the precise technical definition. Definition 3. A learning algorithm is said to be (uniformly) ˆβ-stable if the hypotheses it returns for any two training samples S and S′ that differ by a single point satisfy ∀z ∈X × Y, |c(hS, z) −c(hS′, z)| ≤ˆβ. (6) Many generalization error bounds rely on McDiarmid’s inequality. But this inequality requires the random variables to be i.i.d. and thus is not directly applicable in our scenario. Instead, we will use a theorem that extends McDiarmid’s inequality to general mixing distributions (Theorem 1, Section 3.3). To obtain a stability-based generalization bound, we will apply this theorem to Φ(S) = R(hS) − bR(hS). To do so, we need to show, as with the standard McDiarmid’s inequality, that Φ is a Lipschitz function and, to make it useful, bound E[Φ]. The next two sections describe how we achieve both of these in this non-i.i.d. scenario. 3.1 Lipschitz Condition As discussed in Section 2.2, in the most general scenario, test points depend on the training sample. We first present a lemma that relates the expected value of the generalization error in that scenario and the same expectation in the scenario where the test point is independent of the training sample. We denote by R(hS) = Ez[c(hS, z)|S] the expectation in the dependent case and by eR(hSb) = Eez[c(hSb, ez)] that expectation when the test points are assumed independent of the training, with Sb denoting a sequence similar to S but with the last b points removed. Figure 1(a) illustrates that sequence. The block Sb is assumed to have exactly the same distribution as the corresponding block of the same size in S. Lemma 2. Assume that the learning algorithm is ˆβ-stable and that the cost function c is bounded by M. Then, for any sample S of size m drawn from a β-mixing stationary distribution and for any b ∈{0, . . . , m}, the following holds: | E S[R(hS)] −E S[ eR(hSb)]| ≤bˆβ + β(b)M. (7) Proof. The ˆβ-stability of the learning algorithm implies that E S[R(hS)] = E S,z[c(hS, z)] ≤E S,z[c(hSb, z)] + bˆβ. (8) The application of Lemma 1 yields E S[R(hS)] ≤E S,ez[c(hSb, ez)] + bˆβ + β(b)M = eES[R(hSb)] + bˆβ + β(b)M. (9) The other side of the inequality of the lemma can be shown following the same steps. We can now prove a Lipschitz bound for the function Φ. 1The standard variable used for the stability coefficient is β. To avoid the confusion with the β-mixing coefficient, we will use ˆβ instead. 4 Sb b z b b zi Si z b b b Si,b zi z b b b Si i,b z (a) (b) (c) (d) Figure 1: Illustration of the sequences derived from S that are considered in the proofs. Lemma 3. Let S = (z1, z2, . . . , zm) and Si = (z′ 1, z′ 2, . . . , z′ m) be two sequences drawn from a β-mixing stationary process that differ only in point i ∈[1, m], and let hS and hSi be the hypotheses returned by a ˆβ-stable algorithm when trained on each of these samples. Then, for any i ∈[1, m], the following inequality holds: |Φ(S) −Φ(Si)| ≤(b + 1)2ˆβ + 2β(b)M + M m . (10) Proof. To prove this inequality, we first bound the difference of the empirical errors as in [3], then the difference of the true errors. Bounding the difference of costs on agreeing points with ˆβ and the one that disagrees with M yields | bR(hS) −bR(hSi)| = 1 m m X j=1 |c(hS, zj) −c(hSi, z′ j)| (11) = 1 m X j̸=i |c(hS, zj) −c(hSi, z′ j)| + 1 m|c(hS, zi) −c(hSi, z′ i)| ≤ˆβ + M m . Now, applying Lemma 2 to both generalization error terms and using ˆβ-stability result in |R(hS) −R(hSi)| ≤ | eR(hSb) −eR(hSi b)| + 2bˆβ + 2β(b) (12) = E ez [c(hSb, ez) −c(hSi b, ez)] + 2bˆβ + 2β(b)M ≤ˆβ + 2bˆβ + 2β(b)M. The lemma’s statement is obtained by combining inequalities 11 and 12. 3.2 Bound on E[Φ] As mentioned earlier, to make the bound useful, we also need to bound ES[Φ(S)]. This is done by analyzing independent blocks using Lemma 1. Lemma 4. Let hS be the hypothesis returned by a ˆβ-stable algorithm trained on a sample S drawn from a stationary β-mixing distribution. Then, for all b ∈[1, m], the following inequality holds: E S[|Φ(S)|] ≤(6b + 1)ˆβ + 3β(b)M. (13) Proof. We first analyze the term ES[ bR(hS)]. Let Si be the sequence S with the b points before and after point zi removed. Figure 1(b) illustrates this definition. Si is thus made of three blocks. Let eSi denote a similar set of three blocks each with the same distribution as the corresponding block in Si, but such that the three blocks are independent. In particular, the middle block reduced to one point ezi is independent of the two others. By the ˆβ-stability of the algorithm, E S[ bR(hS)] = E S " 1 m m X i=1 c(hS, zi) # ≤E Si " 1 m m X i=1 c(hSi, zi) # + 2bˆβ. (14) Applying Lemma 1 to the first term of the right-hand side yields E S[ bR(hS)] ≤E e Si " 1 m m X i=1 c(h e Si, ezi) # + 2bˆβ + 2β(b)M. (15) 5 Combining the independent block sequences associated to bR(hS) and R(hS) will help us prove the lemma in a way similar to the i.i.d. case treated in [3]. Let Sb be defined as in the proof of Lemma 2. To deal with independent block sequences defined with respect to the same hypothesis, we will consider the sequence Si,b = Si ∩Sb, which is illustrated by Figure 1(c). This can result in as many as four blocks. As before, we will consider a sequence eSi,b with a similar set of blocks each with the same distribution as the corresponding blocks in Si,b, but such that the blocks are independent. Since three blocks of at most b points are removed from each hypothesis, by the ˆβ-stability of the learning algorithm, the following holds: E S[Φ(S)] = E S[ bR(hS) −R(hS)] = E S,z " 1 m m X i=1 c(hS, zi) −c(hS, z) # (16) ≤ E Si,b,z " 1 m m X i=1 c(hSi,b, zi) −c(hSi,b, z) # + 6bˆβ. (17) Now, the application of Lemma 1 to the difference of two cost functions also bounded by M as in the right-hand side leads to E S[Φ(S)] ≤ E e Si,b,ez " 1 m m X i=1 c(h e Si,b, ezi) −c(h e Si,b, ez) # + 6bˆβ + 3β(b)M. (18) Since ez and ezi are independent and the distribution is stationary, they have the same distribution and we can replace ezi with ez in the empirical cost and write E S[Φ(S)] ≤ E e Si,b,ez " 1 m m X i=1 c(h e Si i,b, ez) −c(h e Si,b, ez) # + 6bˆβ + 3β(b)M ≤ˆβ + 6bˆβ + 3β(b)M, (19) where eSi i,b is the sequence derived from eSi,b by replacing ezi with ez. The last inequality holds by ˆβ-stability of the learning algorithm. The other side of the inequality in the statement of the lemma can be shown following the same steps. 3.3 Main Results This section presents several theorems that constitute the main results of this paper. We will use the following theorem which extends McDiarmid’s inequality to ϕ-mixing distributions. Theorem 1 (Kontorovich and Ramanan [7], Thm. 1.1). Let Φ : Zm →R be a function defined over a countable space Z. If Φ is l-Lipschitz with respect to the Hamming metric for some l > 0, then the following holds for all ǫ > 0: Pr Z [|Φ(Z) −E[Φ(Z)]| > ǫ] ≤2 exp  −ǫ2 2ml2||∆m||2∞  , (20) where ||∆m||∞≤1 + 2 m X k=1 ϕ(k). Theorem 2 (General Non-i.i.d. Stability Bound). Let hS denote the hypothesis returned by a ˆβstable algorithm trained on a sample S drawn from a ϕ-mixing stationary distribution and let c be a measurable non-negative cost function upper bounded by M > 0, then for any b ∈[0, m] and any ǫ > 0, the following generalization bound holds Pr S h˛˛˛R(hS) −bR(hS) ˛˛˛ > ǫ + (6b + 1)ˆβ + 6Mϕ(b) i ≤2 exp −ǫ2(1 + 2 Pm i=1 ϕ(i))−2 2m((b + 1)2ˆβ + 2Mϕ(b) + M/m)2 ! . Proof. The theorem follows directly the application of Lemma 3 and Lemma 4 to Theorem 1. The theorem gives a general stability bound for ϕ-mixing stationary sequences. If we further assume that the sequence is algebraically ϕ-mixing, that is for all k, ϕ(k) = ϕ0k−r for some r > 1, then we can solve for the value of b to optimize the bound. 6 Theorem 3 (Non-i.i.d. Stability Bound for Algebraically Mixing Sequences). Let hS denote the hypothesis returned by a ˆβ-stable algorithm trained on a sample S drawn from an algebraically ϕ-mixing stationary distribution, ϕ(k) = ϕ0k−r with r > 1 and let c be a measurable non-negative cost function upper bounded by M > 0, then for any ǫ > 0, the following generalization bound holds Pr S h˛˛˛R(hS) −bR(hS) ˛˛˛ > ǫ + ˆβ + (r + 1)6Mϕ(b) i ≤2 exp −ǫ2(4 + 2/(r −1))−2 2m(2ˆβ + (r + 1)2Mϕ(b) + M/m)2 ! , where ϕ(b) = ϕ0  ˆβ rϕ0M r/(r+1) . Proof. For an algebraically mixing sequence, the value of b minimizing the bound of Theorem 2 satisfies ˆβb = rMϕ(b), which gives b =  ˆβ rϕ0M −1/(r+1) and ϕ(b) = ϕ0  ˆβ rϕ0M r/(r+1) . The following term can be bounded as 1 + 2 m X i=1 ϕ(i) = 1 + 2 m X i=1 i−r ≤1 + 2  1 + Z m 1 i−rdi  = 1 + 2  1 + m1−r −1 1 −r  . (21) For r > 1, the exponent of m is negative, and so we can bound this last term by 3 + 2/(r −1). Plugging in this value and the minimizing value of b in the bound of Theorem 2 yields the statement of the theorem. In the case of a zero mixing coefficient (ϕ = 0 and b = 0), the bounds of Theorem 2 and Theorem 3 coincide with the i.i.d. stability bound of [3]. In order for the right-hand side of these bounds to converge, we must have ˆβ = o(1/√m) and ϕ(b) = o(1/√m). For several general classes of algorithms, ˆβ ≤O(1/m) [3]. In the case of algebraically mixing sequences with r > 1 assumed in Theorem 3, ˆβ ≤O(1/m) implies ϕ(b) = ϕ0(ˆβ/(rϕ0M))(r/(r+1)) < O(1/√m). The next section illustrates the application of Theorem 3 to several general classes of algorithms. 4 Application We now present the application of our stability bounds to several algorithms in the case of an algebraically mixing sequence. Our bound applies to all algorithms based on the minimization of a regularized objective function based on the norm ∥·∥K in a reproducing kernel Hilbert space, where K is a positive definite symmetric kernel: argmin h∈H 1 m m X i=1 c(h, zi) + λ∥h∥2 K, (22) under some general conditions, since these algorithms are stable with ˆβ ≤O(1/m) [3]. Two specific instances of these algorithms are SVR, for which the cost function is based on the ǫ-insensitive cost: c(h, z) = |h(x) −y|ǫ = 0 if |h(x) −y| ≤ǫ, |h(x) −y| −ǫ otherwise, (23) and Kernel Ridge Regression [13], for which c(h, z) = (h(z) −y)2. Corollary 1. Assume a bounded output Y = [0, B], for some B > 0, and assume that K(x, x) ≤κ for all x for some κ > 0. Let hS denote the hypothesis returned by the algorithm when trained on a sample S drawn from an algebraically ϕ-mixing stationary distribution. Then, with probability at least 1 −δ, the following generalization bounds hold for a. Support vector regression (SVR): R(hS) ≤bR(hS) + 13κ2 2λm + 5 3κ2 λ + κ r B λ ! r 2 ln(1/δ) m ; (24) b. Kernel Ridge Regression (KRR): R(hS) ≤bR(hS) + 26κ2B2 λm + 5 12κ2B2 λ + κ r B λ ! r 2 ln(1/δ) m . (25) 7 Proof. It has been shown in [3] that for SVR ˆβ ≤κ2/(2λm) and that M < κ p B/λ and for KRR, ˆβ ≤2κ2B2/(λm) and M < κ p B/λ. Plugging in these values in the bound of Theorem 3 and using the lower bound on r, r > 1, yield the statement of the corollary. These bounds give, to the best of our knowledge, the first stability-based generalization bounds for SVR and KRR in a non-i.i.d. scenario. Similar bounds can be obtained for other families of algorithms such as maximum entropy discrimination, which can be shown to have comparable stability properties [3]. Our bounds have the same convergence behavior as those derived by [3] in the i.i.d. case. In fact, they differ only by some constants. As in the i.i.d. case, they are non-trivial when the condition λ ≫1/√m on the regularization parameter holds for all large values of m. It would be interesting to give a quantitative comparison of our bounds and the generalization bounds of [10] based on covering numbers for mixing stationary distributions, in the scenario where test points are independent of the training sample. In general, because the bounds of [10] are not algorithmdependent, one can expect tighter bounds using stability, provided that a tight bound is given on the stability coefficient. The comparison also depends on how fast the covering number grows with the sample size and trade-off parameters such as λ. For a fixed λ, the asymptotic behavior of our stability bounds for SVR and KRR is tight. 5 Conclusion Our stability bounds for mixing stationary sequences apply to large classes of algorithms, including SVR and KRR, extending to weakly dependent observations existing bounds in the i.i.d. case. Since they are algorithm-specific, these bounds can often be tighter than other generalization bounds. Weaker notions of stability might help further improve or refine them. References [1] S. N. Bernstein. Sur l’extension du th´eor`eme limite du calcul des probabilit´es aux sommes de quantit´es d´ependantes. Math. Ann., 97:1–59, 1927. [2] O. Bousquet and A. Elisseeff. Algorithmic stability and generalization performance. In NIPS 2000, 2001. [3] O. Bousquet and A. Elisseeff. Stability and generalization. JMLR, 2:499–526, 2002. [4] L. Devroye and T. Wagner. Distribution-free performance bounds for potential function rules. In Information Theory, IEEE Transactions on, volume 25, pages 601–604, 1979. [5] P. Doukhan. Mixing: Properties and Examples. Springer-Verlag, 1994. [6] M. Kearns and D. Ron. Algorithmic stability and sanity-check bounds for leave-one-out cross-validation. In Computational Learing Theory, pages 152–162, 1997. [7] L. Kontorovich and K. Ramanan. Concentration inequalities for dependent random variables via the martingale method, 2006. [8] A. Lozano, S. Kulkarni, and R. Schapire. Convergence and consistency of regularized boosting algorithms with stationary β-mixing observations. In NIPS, 2006. [9] D. Mattera and S. Haykin. Support vector machines for dynamic reconstruction of a chaotic system. In Advances in kernel methods: support vector learning, pages 211–241. MIT Press, Cambridge, MA, 1999. [10] R. Meir. Nonparametric time series prediction through adaptive model selection. Machine Learning, 39(1):5–34, 2000. [11] D. Modha and E. Masry. On the consistency in nonparametric estimation under mixing assumptions. IEEE Transactions of Information Theory, 44:117–133, 1998. [12] K.-R. M¨uller, A. Smola, G. R¨atsch, B. Sch¨olkopf, J. K., and V. Vapnik. Predicting time series with support vector machines. In Proceedings of ICANN’97, LNCS, pages 999–1004. Springer, 1997. [13] C. Saunders, A. Gammerman, and V. Vovk. Ridge Regression Learning Algorithm in Dual Variables. In Proceedings of the ICML ’98, pages 515–521. Morgan Kaufmann Publishers Inc., 1998. [14] B. Sch¨olkopf and A. Smola. Learning with Kernels. MIT Press: Cambridge, MA, 2002. [15] V. N. Vapnik. Statistical Learning Theory. Wiley-Interscience, New York, 1998. [16] M. Vidyasagar. Learning and Generalization: With Applications to Neural Networks. Springer, 2003. [17] B. Yu. Rates of convergence for empirical processes of stationary mixing sequences. The Annals of Probability, 22(1):94–116, Jan. 1994. 8
2007
105
3,132
Evaluating Search Engines by Modeling the Relationship Between Relevance and Clicks Ben Carterette∗ Center for Intelligent Information Retrieval University of Massachusetts Amherst Amherst, MA 01003 carteret@cs.umass.edu Rosie Jones Yahoo! Research 3333 Empire Ave Burbank, CA 91504 jonesr@yahoo-inc.com Abstract We propose a model that leverages the millions of clicks received by web search engines to predict document relevance. This allows the comparison of ranking functions when clicks are available but complete relevance judgments are not. After an initial training phase using a set of relevance judgments paired with click data, we show that our model can predict the relevance score of documents that have not been judged. These predictions can be used to evaluate the performance of a search engine, using our novel formalization of the confidence of the standard evaluation metric discounted cumulative gain (DCG), so comparisons can be made across time and datasets. This contrasts with previous methods which can provide only pair-wise relevance judgments between results shown for the same query. When no relevance judgments are available, we can identify the better of two ranked lists up to 82% of the time, and with only two relevance judgments for each query, we can identify the better ranking up to 94% of the time. While our experiments are on sponsored search results, which is the financial backbone of web search, our method is general enough to be applicable to algorithmic web search results as well. Furthermore, we give an algorithm to guide the selection of additional documents to judge to improve confidence. 1 Introduction Web search engine evaluation is an expensive process: it requires relevance judgments that indicate the degree of relevance of each document retrieved for each query in a testing set. In addition, reusing old relevance judgements to evaluate an updated ranking function can be problematic, since documents disappear or become obsolete, and the distribution of queries entered changes [15]. Click data from web searchers, used in aggregate, can provide valuable evidence about the relevance of each document. The general problem with using clicks as relevance judgments is that clicks are biased. They are biased to the top of the ranking [12], to trusted sites, to attractive abstracts; they are also biased by the type of query and by other things shown on the results page. To cope with this, we introduce a family of models relating clicks to relevance. By conditioning on clicks, we can predict the relevance of a document or a set of documents. Joachims et al. [12] used eye-tracking devices to track what documents users looked at before clicking. They found that users tend to look at results ranked higher than the one they click on more often than they look at results ranked lower, and this information can in principle be used to train a search engine using these “preference judgments”[10]. The problem with using preference judgments inferred from clicks for learning is that they will tend to learn to reverse the list. A click at the lowest rank is preferred to everything else, while a click at the highest rank is preferred to nothing ∗Work done while author was at Yahoo! 1 else. Radlinski and Joachims [13] suggest an antidote to this: randomly swapping adjacent pairs of documents. This ensures that users will not prefer document i to document i + 1 solely because of rank. However, we may not wish to show a suboptimal document ordering in order acquire data. Our approach instead will be to use discounted cumulative gain (DCG [9]), an evaluation metric commonly used in search engine evaluation. Using click data, we can estimate the confidence that a difference in DCG exists between two rankings without having any relevance judgments for the documents ranked. We will show how a comparison of ranking functions can be performed when clicks are available but complete relevance judgments are not. After an initial training phase with a few relevance judgments, the relevance of unjudged documents can be predicted from clickthrough rates. The confidence in the evaluation can be estimated with the knowledge of which documents are most frequently clicked. Confidence can be dramatically increased with only a few more judiciously chosen relevance judgments. Our contributions are (1) a formalization of the information retrieval metric DCG as a random variable (2) analysis of the sign of the difference between two DCGs as an indication that one ranking is better than another (3) empirical demonstration that combining click-through rates over all results on the page is better at predicting the relevance of the document at position i than just the click-through rate at position i (4) empirically modeling relevance of documents using clicks, and using this model to estimate DCG (5) empirical evaluation of comparison of different rankings using DCG derived from clicks (6) an algorithm for selection of minimal numbers of documents for manual relevance judgement to improve the confidence in DCG over the estimate derived from clicks alone. Section 2 covers previous work on using clickthrough rates and on estimating evaluation metrics. Section 3 describes the evaluation of web retrieval systems using the metric discounted cumulative gain (DCG) and shows how to estimate the confidence that a difference exists when relevance judgments are missing. Our model for predicting relevance from clicks is described in Section 4. We discuss our data in Section 5 and in Section 6 we return to the task of estimating relevance for the evaluation of search engines. Our experiments are conducted in the context of sponsored search, but the methods we use are general enough to translate to general web search engines. 2 Previous Work There has been a great deal of work on low-cost evaluation in TREC-type settings ([20, 6, 16, 5] are a few), but we are aware of little for the web. As discussed above, Joachims [10, 12] and Radlinski and Joachims [13] conducted seminal work on using clicks to infer user preferences between documents. Agichtein et al.[2, 1] used and applied models of user interaction to predict preference relationships and to improve ranking functions. They use many features beyond clickthrough rate, and show that they can learn preference relationships using these features. Our work is superficially similar, but we explicitly model dependencies among clicks for results at different ranks with the purpose of learning probabilistic relevance judgments. These relevance judgments are a stronger result than preference ordering, since preference ordering can be derived from them. In addition, given a strong probabilistic model of relevance from clicks, better combined models can be built. Dupret et al. [7] give a theoretical model for the rank-position effects of click-through rate, and build theoretical models for search engine quality using them. They do not evaluate estimates of document quality, while we empirically compare relevance estimated from clicks to manual relevance judgments. Joachims [11] investigated the use of clickthrough rates for evaluation, showing that relative differences in performance could be measured by interleaving results from two ranking functions, then observing which function produced results that are more frequently clicked. As we will show, interleaving results can change user behavior, and not necessarily in a way that will lead to the user clicking more relevant documents. Soboroff [15] proposed methods for maintaining the relevance judgments in a corpus that is constantly changing. Aslam et al. [3] investigated minimum variance unbiased estimators of system performance, and Carterette et al. [5] introduced the idea of treating an evaluation measure as a random variable with a distribution over all possible relevance judgments. This can be used to create an optimal sampling strategy to obtain judgments, and to estimate the confidence in an evaluation measure. We extend their methods to DCG. 2 3 Evaluating Search Engines Search results are typically evaluated using Discounted Cumulative Gain (DCG) [9]. DCG is defined as the sum of the “gain” of presenting a particular document times a “discount” of presenting it at a particular rank, up to some maximum rank ℓ: DCGℓ= Pℓ i=1 gainidiscounti. For web search, “gain” is typically a relevance score determined from a human labeling, and “discount” is the reciprocal of the log of the rank, so that putting a document with a high relevance score at a low rank results in a much lower discounted gain than putting the same document at a high rank. DCGℓ= rel1 + ℓ X i=2 reli log2 i The constants reli are the relevance scores. Human assessors typically judge documents on an ordinal scale, with labels such as “Perfect”, “Excellent”, “Good”, “Fair”, and “Bad”. These are then mapped to a numeric scale for use in DCG computation. We will denote five levels of relevance aj, with a1 > a2 > a3 > a4 > a5. In this section we will show that we can compare ranking functions without having labeled all the documents. 3.1 Estimating DCG from Incomplete Information DCG requires that the ranked documents have been judged with respect to a query. If the index has recently been updated, or a new algorithm is retrieving new results, we have documents that have not been judged. Rather than ask a human assessor for a judgment, we may be able to infer something about DCG based on the judgments we already have. Let Xi be a random variable representing the relevance of document i. Since relevance is ordinal, the distribution of Xi is multinomial. We will define pij = p(Xi = aj) for 1 ≤j ≤5 with P5 j=1 pij = 1. The expectation of Xi is E[Xi] = P5 j=1 pijaj, and its variance is V ar[Xi] = P5 j=1 pija2 j −E[Xi]2. We can then express DCG as a random variable: DCGℓ= X1 + ℓ X i=2 Xi log2 i Its expectation and variance are: E[DCGℓ] = E[X1] + ℓ X i=2 E[Xi] log2 i (1) V ar[DCGℓ] = V ar[X1] + ℓ X i=2 V ar[Xi] (log2 i)2 + 2 ℓ X i=1 Cov(X1, Xi) log2 i + 2 X 1<i<j Cov(Xi, Xj) log2 i · log2 j −E[DCGℓ]2 (2) If the relevance of documents i and j are independent, the covariance Cov(Xi, Xj) is zero. When some relevance judgments are not available, Eq. (1) and (2) can be used to estimate confidence intervals for DCG. Thus we can compare ranking functions without having judged all the documents. 3.2 Comparative Evaluation If we only care about whether one index or ranking function outperforms another, the actual values of DCG matter less than the sign of their difference. We now turn our attention to estimating the sign of the difference with high confidence. We redefine DCG in terms of an arbitrary indexing of documents, instead of the indexing by rank we used in the previous section. Let rj(i) be the rank at which document i was retrieved by system j. We define the discounted gain gij of document i to the DCG of system j as gij = reli if rj(i) = 1, gij = reli log2 rj(i) if 1 < rj(i) ≤ℓ, and gij = 0 if 3 document i was not ranked by system j. Then we can write the difference in DCG for systems 1 and 2 as ∆DCGℓ= DCGℓ1 −DCGℓ2 = N X i=1 gi1 −gi2 (3) where N is the number of documents in the entire collection. In practice we need only consider those documents returned in the top ℓby either of the two systems. We can define a random variable Gij by replacing reli with Xi in gij; we can then compute the expectation of ∆DCG: E[∆DCGℓ] = N X i=1 E[Gi1] −E[Gi2] We can compute its variance as well, which is omitted here due to space constraints. 3.3 Confidence in a Difference in DCG Following Carterette et al. [5], we define the confidence in a difference in DCG as the probability that ∆DCG = DCG1 −DCG2 is less than zero. If P(∆DCG < 0) ≥0.95, we say that we have 95% confidence that system 1 is worse than system 2: over all possible judgments that could be made to the unjudged documents, 95% of them will result in ∆DCG < 0. To compute this probability, we must consider the distribution of ∆DCG. For web search, we are typically most interested in performance in the top 10 retrieved. Ten documents is too few for any convergence results, so instead we will estimate the confidence using Monte Carlo simulation. We simply draw relevance scores for the unjudged documents according to the multinomial distribution p(Xi) and calculate ∆DCG using those scores. After T trials, the probability that ∆DCG is less than 0 is simply the number of times ∆DCG was computed to be less than 0 divided by T. How can we estimate the distribution p(Xi)? In the absence of any other information, we may assume it to be uniform over all five relevance labels. Relevance labels that have been made in the past provide a useful prior distribution. As we shall see below, clicks are a useful source of information that we can leverage to estimate this distribution. 3.4 Selecting Documents to Judge If confidence estimates are low, we may want to obtain more relevance judgments to improve it. In order to do as little work as necessary, we should select the documents that are likely to tell us a lot about ∆DCG and therefore tell us a lot about confidence. The most informative document is the one that would have the greatest effect on ∆DCG. Since ∆DCG is linear, it is quite easy to determine which document should be judged next. Eq. (3) tells us to simply choose the document i that is unjudged and has maximum |E[Gi1]−E[Gi2]|. Algorithm 1 shows how relevance judgments would be acquired iteratively until confidence is sufficiently high. This algorithm is provably optimal in the sense that after k judgments, we know more about the difference in DCG than we would with any other k judgments. Algorithm 1 Iteratively select documents to judge until we have high confidence in ∆DCG. 1: while 1 −α ≤P(∆DCG < 0) ≤α do 2: i∗←maxi |E[Gi1] −E[Gi2]| for all unjudged documents i 3: judge document i∗ (human annotator provides reli∗) 4: P(Xi∗= reli∗) ←1 5: P(Xi∗̸= reli∗) ←0 6: estimate P(∆DCG) using Monte Carlo simulation 7: end while 4 Modeling Clicks and Relevance Our goal is to model the relationship between clicks and relevance in a way that will allow us to estimate a distribution of relevance p(Xi) from the clicks on document i and on surrounding 4 documents. We first introduce a joint probability distribution including the query q, the relevance Xi of each document retrieved (where i indicates the rank), and their respective clickthrough rates ci: p(q, X1, X2, ..., Xℓ, c1, c2, ..., cℓ) = P(q, X, c) (4) Boldface X and c indicate vectors of length ℓ. Suppose we have a query for which we have few or no relevance judgments (perhaps because it has only recently begun to appear in the logs, or because it reflects a trend for which new documents are rapidly being indexed). We can nevertheless obtain click-through data. We are therefore interested in the conditional probability p(X|q, c). Note that X = {X1, X2, · · · } is a vector of discrete ordinal variables; doing inference in this model is not easy. To simplify, we make the assumption that the relevance of document i and document j are conditionally independent given the query and the clickthrough rates: p(X|q, c) = ℓ Y i=1 p(Xi|q, c) (5) This gives us a separate model for each rank, while still conditioning the relevance at rank i on the clickthrough rates at all of the ranks. We do not lose the dependence between relevance at each rank and clickthrough rates on other ranks. We will see the importance of this empirically in section 6. The independence assumption allows us to model p(Xi) using ordinal regression. Ordinal regression is a generalization of logistic regression to a variable with two or more outcomes that are ranked by preference. The proportional odds model for our ordinal response variable is log p(X > aj|q, c) p(X ≤aj|q, c) = αj + βq + ℓ X i=1 βici + ℓ X i<k βikcick where aj is one of the five relevance levels. The sums are over all ranks in the list; this models the dependence of the relevance of the document to the clickthrough rates of everything else that was retrieved, as well as any multiplicative dependence between the clickthrough rates at any two ranks. After the model is trained, we can obtain p(X ≤aj|q, c) using the inverse logit function. Then p(X = aj|q, c) = p(X ≤aj|q, c) −p(X ≤aj−1|q, c). A generalization to the proportional odds model is the vector generalized additive model (VGAM) described by Yee and Wild [19]. VGAM has the same relationship to ordinal regression that GAM [8] has to logistic regression. It is useful in our case because clicks do not necessarily have linear relationships to relevance. VGAM is implemented in the R library VGAM. Once the model is trained, we have p(X = aj) using the same arithmetic as for the proportional odds model. 5 Data We obtained data from Yahoo! sponsored search logs for April 2006. Although we limited our data to advertisements, there is no reason in principle our method should not be applicable to general web search, since we see the same effects of bias towards the top of search results, to trusted sites and so on. We have a total of 28,961 relevance judgments for 2,021 queries. The queries are a random sample of all queries entered in late 2005 and early 2006. Relevance judgments are based on details of the advertisement, such as title, summary, and URL. We filtered out queries for which we had no relevance judgments. We then aggregated records into distinct lists of advertisements for a query as follows: Each record L consisted of a query, a search identification string, a set of advertisement ids, and for each advertisement id, the rank the advertisement appeared at and the number of times it was clicked. Different sets of results for a query, or results shown in a different order, were treated as distinct lists. We aggregated distinct lists of results to obtain a clickthrough rate at each rank for a given list of results for a given query. The clickthrough rate on each ad is simply the number of times it was clicked when served as part of list L divided by the impressions, the number of times L was shown to any user. We did not adjust for impression bias. 5 5.1 Dependence of Clicks on Entire Result List Bad Fair GoodExcellentPerfect relevance at rank 2 relative clickthrough rate at rank 1 0.0 0.2 0.4 0.6 0.8 1.0 Our model takes into account the clicks at all ranks to estimate the relevance of the document at position i. As the figure to the right shows, when there is an “Excellent” document at rank 1, its clickthrough rate varies depending on the relevance of the document at rank 2. For example, a “Perfect” document at rank 2 may decrease the likelihood of a click on the “Excellent” document at rank 1, while a “Fair” document at rank 2 may increase the clickthrough rate for rank 1. Clickthrough rate at rank 1 more than doubles as the relevance of the document at rank 2 drops from “Perfect” to “Fair”. 6 Experiments 6.1 Fit of Document Relevance Model We first want to test our proposed model (Eq. (5)) for predicting relevance from clicks. If the model fits well, the distributions of relevance it produces should compare favorably to the actual relevance of the documents. We will compare it to a simpler model that does not take into account the click dependence. The two models are contrasted below: dependence model: p(X|q, c) = Y p(Xi|q, c) independence model: p(X|q, c) = Y p(Xi|q, ci) The latter models the relevance being conditional only on the query and its own clickthrough rate, ignoring the clickthrough rates of the other items on the page. Essentially, it discretizes clicks into relevance label bins at each rank using the query as an aid. We removed all instances for which we had fewer than 500 impressions, then performed 10-fold cross-validation. For simplicity, the query q is modeled as the aggregate clickthrough rate over all results ever returned for that query. Both models produce a multinomial distribution for the probability of relevance of a document p(Xi). Predicted relevance is the expected value of this distribution: E[Xi] = P5 j=1 p(Xi = aj)aj. The correlation between predicted relevance and actual relevance starts from 0.754 at rank 1 and trends downward as we move down the list; by rank 5 it has fallen to 0.527. Lower ranks are clicked less often; there are fewer clicks to provide evidence for relevance. Correlations for the independence model are significantly lower at each point. Figure 1 depicts boxplots for each value of relevance for both models. Each box represents the distribution of predictions for the true value on the x axis. The center line is the median prediction; the edges are the 25% and 75% quantiles. The whiskers are roughly a 95% confidence interval, with the points outside being outliers. When dependence is modeled (Figure 1(a)), the distributions are much more clearly separated from each other, as shown by the fact that there is little overlap in the boxes. The correlation between predicted and acutal relevance is 18% higher, a statistically significant difference. 6.2 Estimating DCG Since our model works fairly well, we now turn our attention to using relevance predictions to estimate DCG for the evaluation of search engines. Recall that we are interested in comparative evaluation—determining the sign of the difference in DCG rather than its magnitude. Our confidence in the sign is P(∆DCG < 0), which is estimated using the simulation procedure described in Section 3.3. The simulation samples from the multinomial distributions p(Xi). Methodology: To be able to calculate the exact DCG to evaluate our models, we need all ads in a list to have a relevance judgment. Therefore our test set will consist of all of the lists for which we have complete relevance judgments and at least 500 impressions. The remainder will be used for training. The size of the test set is 1720 distinct lists. The training sets will include all lists for which we have at least 200 impressions, over 5000 lists. After training the model, we 6 Bad Fair Good Excellent Perfect 0.0 0.5 1.0 1.5 2.0 2.5 3.0 expected relevance (a) Dependence model; ρ = 0.754 Bad Fair Good Excellent Perfect 0.0 0.5 1.0 1.5 2.0 2.5 expected relevance (b) No dependence modeled; ρ = 0.638 Figure 1: Predicted vs. actual relevance for rank 1. Correlation increases 18% when dependence of relevance of the document at rank 1 on clickthrough at all ranks is modeled. Confidence 0.5 −0.6 0.6 −0.7 0.7 −0.8 0.8 −0.9 0.9 −0.95 0.95 −1.0 Accuracy clicks-only 0.522 0.617 0.734 0.818 – – Accuracy 2 judgments 0.572 0.678 0.697 0.890 0.918 0.940 Table 1: Confidence vs. accuracy of predicting the better ranking for pairs of ranked lists using the relevance predictions of our model based on clicks alone, and with two additional judgments for each pair of lists. Confidence estimates are good predictions of accuracy. predict relevance for the ads in the test set. We then use these expected relevances to calculate the expectation E[DCG]. We will compare these expectations to the true DCG calculated using the actual relevance judgments. As a baseline for automatic evaluation, we will compare to the average clickthrough rate on the list E[CTR] = 1 k P ci, the naive approach described in our introduction. We then estimate the confidence P(∆DCG < 0) for pairs of ranked lists for the same query and compare it to the actual percentage of pairs that had ∆DCG < 0. Confidence should be less than or equal to this percentage; if it is, we can “trust” it in some sense. Results: We first looked at the ability of E[DCG] to predict DCG, as well as the ability of the average clickthrough rate E[CTR] to predict DCG. The correlation between the latter two is 0.622, while the correlation between the former two is 0.876. This means we can approximate DCG better using our model than just using the mean clickthrough rate as a predictor. Bad Fair Good Excellent Perfect 0.0 0.5 1.0 1.5 2.0 2.5 3.0 predicted relevance The figure to the right shows actual vs. predicted relevance for ads in the test set. (This is slightly different from Figure 1: the earlier figure shows predicted results for all data from cross-validation while this one only shows predicted results on our test data.) The separation of the boxes shows that our model is doing quite well on the testing data, at least for rank 1. Performance degrades quite a bit as rank increases (not shown), but it is important to note that the upper ranks have the greatest effect on DCG—so getting those right is most important. In Table 1, we have binned pairs of ranked lists by their estimated confidence. We computed the accuracy of our predictions (the percent of pairs for which the difference in DCG was correctly identified) for each bin. The first line shows results when evaluating with no additional relevance judgments beyond those used for training the model: although confidence estimates tend to be low, they are accurate in the sense that a confidence estimate predicts how well we were able to distinguish between the two lists. This means that the confidence estimates provide a guide for identifying which evaluations require “hole-filling” (additional judgments). The second line shows how results improve when only two judgments are made. Confidence estimates increase a great deal (to a mean of over 0.8 from a mean of 0.6), and the accuracy of the confidence estimates is not affected. 7 In general, performance is very good: using only the predictions of our model based on clicks, we have a very good sense of the confidence we should have in our evaluation. Judging only two more documents dramatically improves our confidence: there are many more pairs in high-confidence bins after two judgments. 7 Conclusion We have shown how to compare ranking functions using expected DCG. After a single initial training phase, ranking functions can be compared by predicting relevance from clickthrough rates. Estimates of confidence can be computed; the confidence gives a lower bound on how accurately we have predicted that a difference exists. With just a few additional relevance judgments chosen cleverly, we significantly increase our success at predicting whether a difference exists. Using our method, the cost of acquiring relevance judgments for web search evaluation is dramatically reduced, when we have access to click data. References [1] E. Agichtein, E. Brill, and S. T. Dumais. Improving web search ranking by incorporating user behavior information. In Proceedings SIGIR, pages 19–26, 2006. [2] E. Agichtein, E. Brill, S. T. Dumais, and R. Ragno. Learning user interaction models for predicting web search result preferences. In Proceedings SIGIR, pages 3–10, 2006. [3] J. A. Aslam, V. Pavlu, and E. Yilmaz. A sampling technique for efficiently estimating measures of query retrieval performance using incomplete judgments. In Proceedings of the 22nd ICML Workshop on Learning with Partially Classified Training Data, pages 57–66, 2005. [4] A. Broder. A taxonomy of web search. SIGIR Forum, 36(2):3–10, 2002. [5] B. Carterette, J. Allan, and R. K. Sitaraman. Minimal test collections for retrieval evaluation. In Proceedings of SIGIR, pages 268–275, 2006. [6] G. V. Cormack, C. R. Palmer, and C. L. Clarke. Efficient Construction of Large Test Collections. In Proceedings of SIGIR, pages 282–289, 1998. [7] G. Dupret, B. Piwowarski, C. Hurtado, and M. Mendoza. A statistical model of query log generation. In SPIRE, LNCS 4209, pages 217–228. Springer, 2006. [8] T. Hastie and R. Tibshirani. Generalized additive models. Statistical Science, 1:297–318, 1986. [9] K. Jarvelin and J. Kekalainen. Cumulated gain-based evaluation of ir techniques. ACM Trans. Inf. Syst., 20(4):422–446, 2002. [10] T. Joachims. Optimizing search engines using clickthrough data. In Proceedings of KDD, pages 133–142, 2002. [11] T. Joachims. Evaluating retrieval performance using clickthrough data. In Text Mining, pages 79–96. 2003. [12] T. Joachims, L. A. Granka, B. Pan, H. Hembrooke, and G. Gay. Accurately interpreting clickthrough data as implicit feedback. In Proceedings of SIGIR, pages 154–161, 2005. [13] F. Radlinski and T. Joachims. Minimally invasive randomization fro collecting unbiased preferences from clickthrough logs. In Proceedings of AAAI, 2006. [14] M. Richardson, E. Dominowska, and R. Ragno. Predicting clicks: Estimating the click-through rate for new ads. In Proceedings of WWW 2007, 2007. [15] I. Soboroff. Dynamic test collections: measuring search effectiveness on the live web. In Proceedings of SIGIR, pages 276–283, 2006. [16] I. Soboroff, C. Nicholas, and P. Cahan. Ranking Retrieval Systems without Relevance Judgments. In Proceedings of SIGIR, pages 66–73, 2001. [17] L. Wasserman. All of Nonparametric Statistics. Springer, 2006. [18] S. N. Wood. Thin plate regression splines. Journal of the Royal Statistical Society: Series B (Statistical Methodology), 65(1):95–114, 2003. [19] T. W. Yee and C. J. Wild. Vector generalized additive models. Journal of the Royal Statistical Society, Series B (Methodological), 58(3):481–493, 1996. [20] J. Zobel. How Reliable are the Results of Large-Scale Information Retrieval Experiments? In Proceedings of SIGIR, pages 307–314, 1998. 8
2007
106
3,133
Adaptive Bayesian Inference Umut A. Acar∗ Toyota Tech. Inst. Chicago, IL umut@tti-c.org Alexander T. Ihler U.C. Irvine Irvine, CA ihler@ics.uci.edu Ramgopal R. Mettu† Univ. of Massachusetts Amherst, MA mettu@ecs.umass.edu ¨Ozg¨ur S¨umer Uni. of Chicago Chicago, IL osumer@cs.uchicago.edu Abstract Motivated by stochastic systems in which observed evidence and conditional dependencies between states of the network change over time, and certain quantities of interest (marginal distributions, likelihood estimates etc.) must be updated, we study the problem of adaptive inference in tree-structured Bayesian networks. We describe an algorithm for adaptive inference that handles a broad range of changes to the network and is able to maintain marginal distributions, MAP estimates, and data likelihoods in all expected logarithmic time. We give an implementation of our algorithm and provide experiments that show that the algorithm can yield up to two orders of magnitude speedups on answering queries and responding to dynamic changes over the sum-product algorithm. 1 Introduction Graphical models [14, 8] are a powerful tool for probabilistic reasoning over sets of random variables. Problems of inference, including marginalization and MAP estimation, form the basis of statistical approaches to machine learning. In many applications, we need to perform inference under dynamically changing conditions, such as the acquisition of new evidence or an alteration of the conditional relationships which make up the model. Such changes arise naturally in the experimental setting, where the model quantities are empirically estimated and may change as more data are collected, or in which the goal is to assess the effects of a large number of possible interventions. Motivated by such applications, Delcher et al. [6] identify dynamic Bayesian inference as the problem of performing Bayesian inference on a dynamically changing graphical model. Dynamic changes to the graphical model may include changes to the observed evidence, to the structure of the graph itself (such as edge or node insertions/deletions), and changes to the conditional relationships among variables. To see why adapting to dynamic changes is difficult, consider the simple problem of Bayesian inference in a Markov chain with n variables. Suppose that all marginal distributions have been computed in O(n) time using the sum-product algorithm, and that some conditional distribution at a node u is subsequently updated. One way to update the marginals would be to recompute the messages computed by sum-product from u to other nodes in the network. This can take Ω(n) time because regardless of where u is in the network, there always is another node v at distance Ω(n) from u. A similar argument holds for general tree-structured networks. Thus, simply updating sum-product messages can be costly in applications where marginals must be adaptively updated after changes to the model (see Sec. 5 for further discussion). In this paper, we present a technique for efficient adaptive inference on graphical models. For a treestructured graphical model with n nodes, our approach supports the computation of any marginal, updates to conditional probability distributions (including observed evidence) and edge insertions ∗U. A. Acar is supported by a gift from Intel. †R. R. Mettu is supported by a National Science Foundation CAREER Award (IIS-0643768). 1 and deletions in expected O(log n) time. As an example of where adaptive inference can be effective, consider a computational biology application that requires computing the state of the active site in a protein as the user modifies the protein (e.g., mutagenesis). In this application, we can represent the protein with a graphical model and use marginal computations to determine the state of the active site. We reflect the modifications to the protein by updating the graphical model representation and performing marginal queries to obtain the state of the active site. We show in Sec. 5 that our approach can achieve a speedup of one to two orders of magnitude over the sum-product algorithm in such applications. Our approach achieves logarithmic update and query times by mapping an arbitrary tree-structued graphical model into a balanced representation that we call a cluster tree (Sec. 3–4). We perform an O(n)-time preprocessing step to compute the cluster tree using a technique known as tree contraction [13]. We ensure that for an input network with n nodes, the cluster tree has an expected depth of O(log n) and expected size O(n). We show that the nodes in the cluster tree can be tagged with partial computations (corresponding to marginalizations of subtrees of the input network) in way that allows marginal computations and changes to the network to be performed in O(log n) expected time. We give simulation results (Sec. 5) that show that our algorithm can achieve a speedup of one to two orders of magnitude over the sum-product algorithm. Although we focus primarily on the problem of answering marginal queries, it is straightforward to generalize our algorithms to other, similar inference goals, such as MAP estimation and evaluating the likelihood of evidence. We note that although tree-structured graphs provide a relatively restrictive class of models, junction trees [14] can be used to extend some of our results to more general graphs. In particular, we can still support changes to the parameters of the distribution (evidence and conditional relationships), although changes to the underlying graph structure become more difficult. Additionally, a number of more sophisticated graphical models require efficient inference over trees at their core, including learning mixtures of trees [12] and tree-reparameterized max-product [15]. Both these methods involve repeatedly performing a message passing algorithm over a set of trees with changing parameters or evidence, making efficient updates and recomputations a significant issue. Related Work. It is important to contrast our notion of adapting to dynamic updates to the graphical model (due to changes in the evidence, or alterations of the structure and distribution) with the potentially more general definition of dynamic Bayes’ nets (DBNs) [14]. Specifically, a DBN typically refers to a Bayes’ net in which the variables have an explicit notion of time, and past observations have some influence on estimates about the present and future. Marginalizing over unobserved variables at time t−1 typically produces increased complexity in the the model of variables at time t. However, in both [6] and this work, the emphasis is on performing inference with current information only, and efficiency is obtained by leveraging the similarity between the previous and newly updated models. Our work builds on previous work by Delcher, Grove, Kasif and Pearl [6]; they give an algorithm to update Bayesian networks dynamically as the observed variables in the network change and compute belief queries of hidden variables in logarithmic time. The key difference between their work and ours is that their algorithm only supports updates to observed evidence, and does not support dynamic changes to the graph structure (i.e., insertion/deletion of edges) or to conditional probabilities. In many applications it is important to consider the effect of changes to conditional relationships between variables; for example, to study protein structure (see Sec. 5 for further discussion). In fact, Delcher et al. cite structural updates to the given network as an open problem. Another difference includes the use of tree contraction: they use tree contractions to answer queries and perform updates. We use tree contractions to construct a cluster tree, which we then use to perform queries and all other updates (except for insertions/deletions). We provide an implementation and show that this approach yields significant speedups. Our approach to clustering factor graphs using tree contractions is based on previous results that show that tree contractions can be updated in expected logarithmic time under certain dynamic changes by using a general-purpose change-propagation algorithm [2]. The approach has also been applied to a number of basic problems on trees [3] but has not been considered in the context of statistical inference. The change-propagation approach used in this work has also been extended to provide a general-purpose technique for updating computations under changes to their data and applied to a number of applications (e.g. [1]). 2 2 Background Graphical models provide a convenient formalism for describing the structure of a function g defined over a set of variables x1, . . . , xn (most commonly a joint probability distribution over the xi). Graphical models use this structure to organize computations and create efficient algorithms for many inference tasks over g, such as finding a maximum a-posteriori (MAP) configuration, marginalization, or computing data likelihood. For the purposes of this paper, we assume that each variable xi takes on values from some finite set, denoted Ai. We write the operation of marginalizing over xi as P xi, and let Xj represent an index-ordered subset of variables and f(Xj) a function defined over those variables, so that for example if Xj = {x2, x3, x5}, then the function f(Xj) = f(x2, x3, x5). We use X to indicate the index-ordered set of all {x1, . . . , xn}. Factor Graphs. A factor graph [10] is one type of graphical model, similar to a Bayes’ net [14] or Markov random field [5] used to represent the factorization structure of a function g(x1, . . . , xn). In particular, suppose that g decomposes into a product of simpler functions, g(X) = Q j fj(Xj), for some collection of real-valued functions fj, called factors, whose arguments are (index-ordered) sets Xj ⊆X. A factor graph consists of a graph-theoretic abstraction of g’s factorization, with vertices of the graph representing variables xi and factors fj. Because of the close correspondence between these quantities, we abuse notation slightly and use xi to indicate both the variable and its associated vertex, and fj to indicate both the factor and its vertex. Definition 2.1. A factor graph is a bipartite graph G = (X + F, E) where X = {x1, x2, . . . , xn} is a set of variables, F = {f1, f2, . . . , fm} is a set of factors and E ⊆X × F. A factor tree is a factor graph G where G is a tree. The neighbor set N(v) of a vertex v is the (index-ordered) set of vertices adjacent to vertex v. The graph G represents the function g(X) = Q j fj(Xj) if, for each factor fj, the arguments of fj are its neighbors in G, i.e., N(fj) = Xj. Other types of graphical models, such as Bayes’ nets [14], can be easily converted into a factor graph representation. When the Bayes’ net is a polytree (singly connected directed acyclic graph), the resulting factor graph is a factor tree. The Sum-Product Algorithm. The factorization of g(X) and its structure as represented by the graph G can be used to organize various computations about g(X) efficiently. For example, the marginals of g(X), defined for each i by gi(xi) = P X\{xi} g(X) can be computed using the sum–product algorithm. Sum-product is best described in terms of messages sent between each pair of adjacent vertices in the factor graph. For every pair of neighboring vertices (xi, fj) ∈E, the vertex xi sends a message µxi→fj as soon as it receives the messages from all of its neighbors except for fj, and similarly for the message from fj to xi. The messages between these vertices take the form of a real-valued function of the variable xi; for discrete-valued xi this can be represented as a vector of length |Ai|. The message µxi→fj sent from a variable vertex xi to a neighboring factor vertex fj, and the message µfj→xi from factor fj to variable xi are given by µxi→fj(xi) = Y f∈N(xi)\fj µf→xi(xi) µfj→xi(xi) = X Xj\xi fj(Xj) Y x∈Xj\xi µx→fj(x) Once all the messages (2 |E| in total) are sent, we can calculate the marginal gi(xi) by simply multiplying all the incoming messages, i.e., gi(xi) = Q f∈N(xi) µf→xi(xi). Sum–product can be thought of as selecting an efficient elimination ordering of variables (leaf to root) and marginalizing in that order. Other Inferences. Although in this paper we focus on marginal computations using sum–product, similar message passing operations can be generalized to other tasks. For example, the operations of sum–product can be used to compute the data likelihood of any observed evidence; such computations are an inherent part of learning and model comparisons (e.g., [12]). More generally, similar algorithms can be defined to compute functions over any semi–ring possessing the distributive property [11]. Most commonly, the max operation produces a dynamic programming algorithm (“max–product”) to compute joint MAP configurations [15]. 3 (Round 1)        ¯f2 x3 f4 f3 x4 x1 x2 f5 f2 f1 ¯f1 ¯f4 ¯f5 (Round 2)    ¯f4 x3 x4 f3 x1 x2 ¯x4 ¯x1 ¯f1 ¯f2 ¯x2 ¯f5 (Round 3)  ¯x2 f3 x3 ¯x1 ¯f3 ¯x4 (Round 4) x3 ¯f3 ¯x4 Figure 1: Clustering a factor graph with rake, compress, finalize operations. 3 Constructing the Cluster Tree In this section, we describe an algorithm for constructing a balanced representation of the input graphical model, that we call a cluster tree. Given the input graphical model, we first apply a clustering algorithm that hierarchically clusters the graphical model, and then apply a labeling algorithm that labels the clusters with cluster functions that can be used to compute marginal queries. Clustering Algorithm. Given a factor graph as input, we first tag each node v with a unary cluster that consists of v and each edge (u, v) with a binary cluster that consists of the edge (u, v). We then cluster the tree hierarchically by applying the rake, compress, and finalize operations. When applied to a leaf node v with neighbor u, the rake operation deletes the v and the edge (u, v), and forms unary cluster by combining the clusters which tag either v or (u, v); u is tagged with the resulting cluster. When applied to a degree-two node v with neighbors u and w, a compress operation deletes v and the edges (u, v) and (v, w), inserts the edge (u, w), and forms a binary cluster by combining the clusters which tag the deleted node and edges; (u, w) is then tagged with the resulting cluster. A finalize operation is applied when the tree consists of a single node (when no edges remain); it constructs a final cluster that consists of all the clusters with which the final node is tagged. ¯f5 ¯x1 f2 x2f2 x3 f3 ¯x2 x3f3 x4 x4f4 f4 x3f4 x2f3 x2 ¯f2 x4f5 f5 x1f3 x1 ¯f1 x1f1 f1 ¯f3 ¯x3 ¯x4 ¯f4 = x3x4 Figure 2: A cluster tree. We cluster a tree T by applying rake and compress operations in rounds. Each round consists of the following two steps until no more edges remain: (1) Apply the rake operation to each leaf; (2) Apply the compress operation to an independent set of degree-two nodes. We choose a random independent set: we flip a coin for each node in each round and apply compress to a degree-two node only if it flips heads and its two neighbors flips tails. This ensures that no two adjacent nodes apply compress simultaneously. When all edges are deleted, we complete the clustering by applying the finalize operation. Fig. 1 shows a four-round clustering of a factor graph and Fig. 2 shows the corresponding cluster tree. In round 1, nodes f1, f2, f5 are raked and f4 is compressed. In round 2, x1, x2, x4 are raked. In round 3, f3 is raked. A finalize operation is applied in round 4 to produce the final cluster. The leaves of the cluster tree correspond to the nodes and the edges of the factor graph. Each internal node ¯v corresponds a unary or a binary cluster formed by deleting v. The children of an internal node are the edges and the nodes deleted during the operation that forms the cluster. For example, the cluster ¯f1 is formed by the rake operation applied to f1 in round 1. The children of ¯f1 are node f1 and edge (f1, x1), which are deleted during that operation. 4 Labeling Algorithm. After building the cluster tree, we compute cluster functions along with a notion of orientation for neighboring clusters in a second pass, which we call labeling.1 The cluster function at a node ¯v in the tree is computed recursively using the cluster functions at ¯v’s child clusters, which we denote S¯v = {¯v1, . . . , ¯vk}. Intuitively, each cluster function corresponds to a partial marginalization of the factors contained in cluster ¯v. Since each cluster function is defined over a subset of the variables in the original graph, we require some additional notation to represent these sets. Specifically, for a cluster ¯v, let A(¯v) be the arguments of its cluster function, and let V(¯v) be the set of all arguments of its children, V(¯v) = S i A(¯vi). In a slight abuse of notation, we let A(v) be the arguments of the node v in the original graph, so that if v is a variable node A(v) = v and if v is a factor node A(v) = N(v). The cluster functions c¯v(·) and their arguments are then defined recursively, as follows. For the base case, the leaf nodes of the cluster tree correspond to nodes v in the original graph, and we define cv using the original variables and factors. If v is a factor node fj, we take cv(A(v)) = fj(Xj), and if v is a variable node xi, A(v) = xi and cv = 1. For nodes of the cluster tree corresponding to edges (u, v) of the original graph, we simply take A(u, v) = ∅and cu,v = 1. The cluster function at an internal node of the cluster tree is then given by combining the cluster functions of its children and marginalizing over as many variables as possible. Let ¯v be the internal node corresponding to the removal of v in the original graph. If ¯v is a binary cluster (u, w), that is, at v’s removal it had two neighbors u and w, then c¯v is given by c¯v(A(¯v)) = X V(¯v)\A(¯v) Y ¯vi∈S¯v c¯vi(A(¯vi)) where the arguments A(¯v) = V(¯v) ∩(A(u) ∪A(w)). For unary cluster ¯v, where v had a single neighbor u at its removal, c¯v(·) is calculated in the same way with A(w) = ∅. We also compute an orientation for each cluster’s neighbors based on their proximity to the cluster tree’s root. This is also calculated recursively using the orientations of each node’s ancestors. For a unary cluster ¯v with parent ¯u in the cluster tree, we define in(¯v) = ¯u. For a binary cluster ¯v with neighbors u, w at v’s removal, define in(¯v) = ¯w and out(¯v) = ¯u if ¯w = in(¯u); otherwise in(¯v) = ¯u and out(¯v) = ¯w. We now describe the efficiency of our clustering and labeling algorithms and show that the resulting cluster tree is linear in the size of the input factor graph. Theorem 1 (Hierarchical Clustering). A factor tree of n nodes with maximum degree of k can be clustered and labeled in expected O(dk+2n) time where d is the domain size of each variable in the factor tree. The resulting cluster tree has exactly 2n −1 leaves and n internal clusters (nodes) and expected O(log n) depth where the expectation is taken over internal randomization (over the coin flips). Furthermore, the cluster tree has the following properties: (1) each cluster has at most k + 1 children, and (2) if ¯v = (u, w) is a binary cluster, then ¯u and ¯w are ancestors of ¯v, and one of them is the parent of ¯v. Proof. Consider first the construction of the cluster tree. The time and the depth bound follow from previous work [2]. The bound on the number of nodes holds because the leaves of the cluster tree correspond to the n −1 edges and n nodes of the factor graph. To see that each cluster has at most k + 1 children, note that the a rake or compress operation deletes one node and the at most k edges incident on that node. Every edge appearing in any level of the tree contraction algorithm is represented as a binary cluster ¯v = (u, w) in the cluster tree. Whenever an edge is removed, one of the nodes incident to that edge, say u is also removed, making ¯u the parent of ¯v. The fact that ¯w is also an ancestor of ¯v follows from an induction argument on the levels. Consider the labeling step. By inspection of the labeling algorithm, the computation of the arguments A(·) and V(·) requires O(k) time. To bound the time for computing a cluster function, observe that A(¯v) is always a singleton set if ¯v is a unary cluster, and A(¯v) has at most two variables if ¯v is a binary cluster. Therefore, |V(¯v)| ≤k + 2. The number of operations required to compute 1Although presented here as a separate labeling operation, the cluster functions can alternatively be computed at the time of the rake or compress operation, as they depend only on the children of ¯v, and the orientations can be computed during the query operation, since they depend only on the ancestors of ¯v. 5 the cluster function at ¯v is bounded by O(|S¯v| d|V(¯v)|), where S¯v are the children of ¯v. Since each cluster can appear only once as a child, P |S¯v| is O(n) and thus the labeling step takes O(dk+2n) time. Although the running time may appear large, note that the representation of the factor graph takes O(dkn) space if functions associated with factors are given explicitly. 4 Queries and Dynamic Changes We give algorithms for computing marginal queries on the cluster trees and restructuring the cluster tree with respect to changes in the underlying graphical model. For all of these operations, our algorithms require expected logarithmic time in the size of the graphical model. Queries. We answer marginal queries at a vertex v of the graphical node by using the cluster tree. At a high level, the idea is to find the leaf of the cluster tree corresponding to v and compute the messages along the path from the root of the cluster tree to v. Using the orientations computed during the tagging pass, for each cluster ¯v we define the following messages: m¯u→¯v =    P V(¯u)\A(¯v)  min(¯u)→¯u Q ¯ui∈S¯u\{¯v} c¯ui(A(¯ui))  , if ¯u = in(¯v) P V(¯u)\A(¯v)  mout(¯u)→¯u Q ¯ui∈S¯u\{¯v} c¯ui(A(¯ui))  , if ¯u = out(¯v), where S¯u is the set of the children of ¯u. Note that for unary clusters, out(·) is undefined; we define the message in this case to be 1. Theorem 2 (Query). Given a factor tree with n nodes, maximum degree k, domain size d, and its cluster tree, the marginal at any xi can be computed with the following formula gi(xi) = X V(¯xi)\{xi} mout(xi)→xi min(xi)→xi Y ¯vi∈S¯xi c¯vi(A(¯vi)), where S¯xi is the set of children of ¯xi, in O(kdk+2 log n) time. Messages are computed only at the ancestors of the query node xi and downward along the path to xi; there are at most O(log n) nodes in this path by Theorem 1. Computing each message requires at most O(kdk+2) time, and any marginal query takes O(kdk+2 log n) time. Dynamic Updates. Given a factor graph and its cluster tree, we can change the function of a factor and update the cluster tree by starting at the leaf of the cluster tree that corresponds to the factor and relabeling all the clusters on the path to the root. Updating these labels suffices, because the label of a cluster is a function of its children only. Since relabeling a cluster takes O(kdk+2) time and the cluster tree has expected O(log n) depth, any update requires O(kdk+2 log n) time. To allow changes to the factor graph itself by insertion/deletion of edges, we maintain a forest of factor trees and the corresponding cluster trees (obtained by clustering the trees one by one). We also maintain the sequence of operations used to construct each cluster tree, i.e., a data structure which represents the state of the clustering at each round. Note that this structure is also size O(n), since at each round a constant fraction of nodes are removed (raked or compressed) in expectation. Suppose now that the user inserts an edge that connects two trees, or deletes an edge connecting two subtrees. It turns out that both operations have only a limited effect on the sequence of clustering operations performed during construction, affecting only a constant number of nodes at each round of the process. Using a general-purpose change propagation technique (detailed in previous work [2, 1]) the necessary alterations can be made to the cluster tree in expected O(log n) time. Change propagation gives us a new cluster tree that corresponds to the cluster tree that we would have obtained by re-clustering from scratch, conditioned on the same internal randomization process. In addition to changing the structure of the cluster tree via change propagation, we must also change the labeling information (cluster functions and orientation) of the affected nodes, which can be done using the same process described in Sec. 3. It is a property of the tree contraction process that all such affected clusters form a subtree of the cluster tree that includes the root. Since change propagation affects an expected O(log n) clusters, and since each cluster can be labeled in O(kdk+2) time, the new labels can be computed in O(kdk+2 log n) time. For dynamic updates, we thus have the following theorem. 6 Theorem 3 (Dynamic Updates). For a factor forest F of n vertices with maximum degree k, and domain size d, the forest of cluster trees can be updated in expected O(kdk+2 log n) time under edge insertions/deletions, and changes to factors. 5 Implementation and Experimental Results We have implemented our algorithm in Matlab2 and compared its performance against the standard two-pass sum-product algorithm (used to recompute marginals after dynamic changes). Fig. 3 shows the results of a simulation experiment in which we considered randomly generated factor trees between 100 and 1000 nodes, with each variable having 51, 52, or 53 states, so that each factor has size between 52 and 56. These factor tree correspond roughly to the junction trees of models with between 200 and 6000 nodes, where each node has up to 5 states. Our results show that the time required to build the cluster tree is comparable to one run of sum-product. Furthermore, the query and update operations in the cluster tree incur relatively small constant factors in their asymptotic running time, and are between one to two orders of magnitude faster than recomputing from scratch. A particularly compelling application area, and one of the original motivations for developing our algorithm, is in the analysis of protein structure. Graphical models constructed from protein structures have recently been used to successfully predict structural properties [17] as well as free energy [9]. These models are typically constructed by taking each node as an amino acid whose states represent their most common conformations, known as rotamers [7], and basing conditional probabilities on proximity, and a physical energy function (e.g., [16]) and/or empirical data [4]. Our algorithm is a natural choice for problems where various aspects of protein structure are allowed to change. One such application is computational mutagenesis, in which functional amino acids in a protein structure are identified by examining systematic amino acid mutations in the protein structure (i.e., to characterize when a protein “loses” function). In this setting, performing updates to the model (i.e., mutations) and queries (i.e., the free energy or maximum likelihood set of rotameric states) to determine the effect of updates would be likely be far more efficient than standard methods. Thus, our algorithm has the potential to substantially speed up computational studies that examine each of a large number local changes to protein structure, such as in the study of protein flexibility and dynamics. Interestingly, [6] actually give a sample application in computational biology, although their model is a simple sequence-based HMM in which they consider the effect of changing observed sequence on secondary structure only. The simulation results given in Fig. 3 validate the use of our algorithm for these applications, since protein-structure based graphical models have similar complexity to the inputs we consider: proteins range in size from hundreds to thousands of amino acids, and each amino acid typically has relatively few rotameric states and local interactions. As in prior work [17], our simulation considers a small number of rotamers per amino acid, but the one to two order-of-magnitude speedups obtained by our algorithm indicate that it maybe be possible also to handle higher-resolution models (e.g., with more rotamer states, or degrees of freedom in the protein backbone). 6 Conclusion We give an algorithm for adaptive inference in dynamically changing tree-structured Bayesian networks. Given n nodes in the network, our algorithm can support updates to the observed evidence, conditional probability distributions, as well as updates to the network structure (as long as they keep the network tree-structured) with O(n) preprocessing time and O(log n) time for queries on any marginal distribution. Our algorithm can easily be modified to maintain MAP estimates as well as compute data likelihoods dynamically, with the same time bounds. We implement the algorithm and show that it can speed up Bayesian inference by orders of magnitude after small updates to the network. Applying our algorithm on the junction tree representation of a graph yields an inference algorithm that can handle updates on conditional distributions and observed evidence in general Bayesian networks (e.g., with cycles); an interesting open question is whether updates to the network structure (i.e., edge insertions/deletions) can also be supported. 2Available for download at http://www.ics.uci.edu/∼ihler/code/. 7 10 2 10 3 10 −3 10 −2 10 −1 # of nodes Time (sec) Naive sum−product Build Query Update Restructure Figure 3: Log-log plot of run time for naive sum-product, building the cluster tree, computing queries, updating factors, and restructuring (adding and deleting edges). Although building the cluster tree is slightly more expensive than sum-product, each subsequent update and query is between 10 and 100 times more efficient than recomputing from scratch. References [1] Umut A. Acar, Guy E. Blelloch, Matthias Blume, and Kanat Tangwongsan. An experimental analysis of self-adjusting computation. In Proceedings of the ACM SIGPLAN Conference on Programming Language Design and Implementation (PLDI), 2006. [2] Umut A. Acar, Guy E. Blelloch, Robert Harper, Jorge L. Vittes, and Maverick Woo. Dynamizing static algorithms with applications to dynamic trees and history independence. In ACM-SIAM Symposium on Discrete Algorithms (SODA), 2004. [3] Umut A. Acar, Guy E. Blelloch, and Jorge L. Vittes. An experimental analysis of change propagation in dynamic trees. In Workshop on Algorithm Engineering and Experimentation (ALENEX), 2005. [4] H. M. Berman, J. Westbrook, Z. Feng, G. Gilliland, T. N. Bhat, H. Weissig, I. N. Shindyalov, and P. E. Bourne. The protein data bank. Nucl. Acids Res., 28:235–242, 2000. [5] P. Clifford. Markov random fields in statistics. In G. R. Grimmett and D. J. A. Welsh, editors, Disorder in Physical Systems, pages 19–32. Oxford University Press, Oxford, 1990. [6] A. L. Delcher, A. J. Grove, S. Kasif, and J. Pearl. Logarithmic-time updates and queries in probabilistic networks. Journal of Artificial Intelligence Research, 4:37–59, 1995. [7] R. L. Dunbrack Jr. Rotamer libraries in the 21st century. Curr Opin Struct Biol, 12(4):431–440, 2002. [8] M. I. Jordan. Graphical models. Statistical Science, 19:140–155, 2004. [9] H. Kamisetty, E. P Xing, and C. J. Langmead. Free energy estimates of all-atom protein structures using generalized belief propagation. In Proceedings of the 11th Annual International Conference on Research in Computational Molecular Biology, 2007. To appear. [10] F. Kschischang, B. Frey, and H.-A. Loeliger. Factor graphs and the sum-product algorithm. IEEE Transactions on Information Theory, 47:498–519, 2001. [11] R. McEliece and S. M. Aji. The generalized distributive law. IEEE Transactions on Information Theory, 46(2):325–343, March 2000. [12] Marina Meil˘a and Michael I. Jordan. Learning with mixtures of trees. Journal of Machine Learning Research, 1(1):1–48, October 2000. [13] Gary L. Miller and John H. Reif. Parallel tree contraction and its application. In Proceedings of the 26th Annual IEEE Symposium on Foundations of Computer Science, pages 487–489, 1985. [14] J. Pearl. Probabilistic Reasoning in Intelligent Systems: Networks of Plausible Inference. Morgan Kaufmann, San Francisco, 1988. [15] M. J. Wainwright, T. Jaakkola, and A. S. Willsky. Tree consistency and bounds on the performance of the max-product algorithm and its generalizations. Statistics and Computing, 14:143–166, April 2004. [16] S. J. Weiner, P.A. Kollman, D.A. Case, U.C. Singh, G. Alagona, S. Profeta Jr., and P. Weiner. A new force field for the molecular mechanical simulation of nucleic acids and proteins. J. Am. Chem. Soc., 106:765–784, 1984. [17] C. Yanover and Y. Weiss. Approximate inference and protein folding. In Proceedings of Neural Information Processing Systems Conference, pages 84–86, 2002. 8
2007
107
3,134
Markov Chain Monte Carlo with People Adam N. Sanborn Psychological and Brain Sciences Indiana University Bloomington, IN 47045 asanborn@indiana.edu Thomas L. Griffiths Department of Psychology University of California Berkeley, CA 94720 tom griffiths@berkeley.edu Abstract Many formal models of cognition implicitly use subjective probability distributions to capture the assumptions of human learners. Most applications of these models determine these distributions indirectly. We propose a method for directly determining the assumptions of human learners by sampling from subjective probability distributions. Using a correspondence between a model of human choice and Markov chain Monte Carlo (MCMC), we describe a method for sampling from the distributions over objects that people associate with different categories. In our task, subjects choose whether to accept or reject a proposed change to an object. The task is constructed so that these decisions follow an MCMC acceptance rule, defining a Markov chain for which the stationary distribution is the category distribution. We test this procedure for both artificial categories acquired in the laboratory, and natural categories acquired from experience. 1 Introduction Determining the assumptions that guide human learning and inference is one of the central goals of cognitive science. Subjective probability distributions are used to model the degrees of belief that learners assign to hypotheses in many domains, including categorization, decision making, and memory [1, 2, 3, 4]. If the knowledge of learners can be modeled in this way, then exploring this knowledge becomes a matter of asking questions about the nature of their associated probability distributions. A common way to learn about a probability distribution is to draw samples from it. In the machine learning and statistics literature, drawing samples from probability distributions is a major area of research, and is often done using Markov chain Monte Carlo (MCMC) algorithms. In this paper, we describe a method for directly obtaining information about subjective probability distributions, by having people act as elements of an MCMC algorithm. Our approach is to design a task that will allow us to sample from a particular subjective probability distribution. Much research has been devoted to relating the magnitude of psychological responses to choice probabilities, resulting in mathematical models of these tasks. We point out an equivalence between a model of human choice behavior and an MCMC acceptance function, and use this equivalence to develop a method for obtaining samples from a subjective distribution. In this way we can use the power of MCMC algorithms to explore the knowledge of human learners. The plan of the paper is as follows. In Section 2, we describe MCMC in general and the Metropolis method and Barker acceptance function in particular. Section 3 describes the experimental task we use to connect human judgments to MCMC. In Section 4, we present an experiment showing that this method can be used to recover trained category distributions from human judgments. Section 5 gives a demonstration of our MCMC method applied to recovering natural categories of animal shape. Section 6 summarizes the results and discusses some implications. 1 2 Markov chain Monte Carlo Models of physical phenomena used by scientists are often expressed in terms of complex probability distributions over different events. Generating samples from these distributions can be an efficient way to determine their properties, indicating which events are assigned high probabilities and providing a way to approximate various statistics of interest. Often, the distributions used in these models are difficult to sample from, being defined over large state spaces or having unknown normalization constants. Consequently, a great deal of research has been devoted to developing sophisticated Monte Carlo algorithms that can be used to generate samples from complex probability distributions. One of the most successful methods of this kind is Markov chain Monte Carlo. An MCMC algorithm constructs a Markov chain that has the target distribution, from which we want to sample, as its stationary distribution. This Markov chain can be initialized with any state, being guaranteed to converge to its stationary distribution after many iterations of stochastic transitions between states. After convergence, the states visited by the Markov chain can be used similarly to samples from the target distribution (see [5] for details). The canonical MCMC algorithm is the Metropolis method [6], in which transitions between states have two parts: a proposal distribution and an acceptance function. Based on the current state, a candidate for the next state is sampled from the proposal distribution. The acceptance function gives the probability of accepting this proposal. If the proposal is rejected, then the current state is taken as the next state. A variety of acceptance functions guarantee that the stationary distribution of the resulting Markov chain is the target distribution [7]. If we assume that the proposal distribution is symmetric, with the probability of proposing a new state x∗from the current state x being the same as the probability of proposing x from x∗, we can use the Barker acceptance function [8], giving A(x∗; x) = π(x∗) π(x∗) + π(x) (1) for the acceptance probability, where π(x) is the probability of x under the target distribution. 3 An acceptance function from human behavior While our approach can be applied to any subjective probability distribution, our experiments focused on sampling from the distributions over objects associated with different categories. Categories are central to cognition, reflecting our knowledge of the structure of the world, supporting inferences, and serving as the basic units of thought. The way people group objects into categories has been studied extensively, producing a number of formal models of human categorization [3, 4, 9, 10, 11], almost all of which can be interpreted as defining a category as a probability distribution over objects [4]. In this section, we consider how to lead people to choose between two objects in a way that would correspond to a valid acceptance function for an MCMC algorithm with the distribution over objects associated with a category as its target distribution. 3.1 A Bayesian analysis of a choice task Consider the following task. You are shown two objects, x1 and x2, and told that one of those objects comes from a particular category, c. You have to choose which object you think comes from that category. How should you make this decision? We can analyze this choice task from the perspective of a rational Bayesian learner. The choice between the objects is a choice between two hypotheses: The first hypothesis, h1, is that x1 is drawn from the category distribution p(x|c) and x2 is drawn from g(x), an alternative distribution that governs the probability of other objects appearing on the screen. The second hypothesis, h2, is that x1 is from the alternative distribution and x2 is from the category distribution. The posterior probability of the first hypothesis given the data is determined via Bayes’ rule, p(h1|x1, x2) = p(x1, x2|h1)p(h1) p(x1, x2|h1)p(h1) + p(x1, x2|h2)p(h2) = p(x1|c)g(x2)p(h1) p(x1|c)g(x2)p(h1) + p(x2|c)g(x1)p(h2) (2) 2 where we use the category distribution p(x|c) and its alternative g(x) to calculate p(x1, x2|h). We will now make two assumptions. The first assumption is that the prior probabilities of the hypotheses are the same. Since there is no a priori reason to favor one of the objects over the other, this assumption seems reasonable. The second assumption is that the probabilities of the two stimuli under the alternative distribution are approximately equal, with g(x1) ≈g(x2). If people assume that the alternative distribution is uniform, then the probabilities of the two stimuli will be exactly equal. However, the probabilities will still be roughly equal under the weaker assumption that the alternative distribution is fairly smooth and x1 and x2 differ by only a small amount relative to the support of that distribution. With these assumptions Equation 2 becomes p(h1|x1, x2) ≈ p(x1|c) p(x1|c) + p(x2|c) (3) with the posterior probability of h1 being set by the probabilities of x1 and x2 in that category. 3.2 From a task to an acceptance function The Bayesian analysis of the task described above results in a posterior probability of h1 (Equation 3) which has a similar form to the Barker acceptance function (Equation 1). If we return to the context of MCMC, and assume that x1 is the proposal x∗and x2 the current state x, and that people choose x1 with probability equal to the posterior probability of h1, then x∗is chosen with probability A(x∗; x) = p(x∗|c) p(x∗|c) + p(x|c) (4) being the Barker acceptance function for the target distribution π(x) = p(x|c). This equation has a long history as a model of human choice probabilities, where it is known as the Luce choice rule or the ratio rule [12, 13]. This rule has been shown to provide a good fit to human data when people choose between two stimuli based on a particular property [14, 15, 16]. It corresponds to a situation in which people choose alternatives based on their relative probabilities, a common behavior known as probability matching [17]. The Luce choice rule has also been used to convert psychological response magnitudes into response probabilities in many models of cognition [11, 18, 19, 20, 21]. 3.3 A more flexible response rule Probability matching can be a good description of the data, but subjects have been shown to produce behavior that is more deterministic [17]. Several models of categorization have been extended in order to account for this behavior [22] by using an exponentiated version of Equation 4 to map category probabilities onto response probabilities, A(x∗; x) = p(x∗|c)γ p(x∗|c)γ + p(x|c)γ (5) where γ raises each term on the right side of Equation 4 to a constant. This response rule can be derived by applying a soft threshold to the log odds of the two hypotheses (a sigmoid function with a gain of γ). As γ increases the hypothesis with higher posterior probability will be chosen more often. By equivalence to the Barker acceptance function, this response rule defines a Markov chain with stationary distribution π(x) ∝p(x|c)γ. (6) Thus, using the weaker assumptions of Equation 5 as a model of human behavior, we can estimate the category distribution p(x|c) up to a constant exponent. This estimate will have the same modes and ordering of variances on the variables, but the actual values of the variances will differ. 3.4 Summary Based on the results in this section, we can define a simple method for drawing samples from a category distribution using MCMC. On each trial, a proposal is drawn from a symmetric distribution. A person chooses between the current state and the proposal to select the new state. Assuming that people’s choice behavior follows the Luce choice rule, the stationary distribution of the Markov chain is the category distribution. The states of the chain are samples from the category distribution, which provide information about the mental representation of that category. 3 4 Testing the MCMC algorithm with known categories To test whether the procedure outlined in the previous section will produce samples that accurately reflect people’s mental representations, we trained people on a variety of category distributions and attempted to recover those distributions using MCMC. A simple one-dimensional categorization task was used, with the height of schematic fish (see Figure 1) being the dimension along which category distributions were defined. Subjects were trained on two categories of fish height – a uniform distribution and a Gaussian distribution – being told that they were learning to judge whether a fish came from the ocean (the uniform distribution) or a fish farm (the Gaussian distribution). Four between-subject conditions tested different means and variances for the Gaussian distributions. Once subjects were trained, we collected MCMC samples for the Gaussian distributions by asking subjects to judge which of two fish came from the fish farm. 4.1 Method Fifty subjects were recruited from the university community via a newspaper advertisement. Data from one subject was discarded for not finishing the experiment, data from another was discarded because the chains reached a boundary, and the data of eight others were discarded because their chains did not cross (more detail below). There were ten observers in each between-subject condition. Each subject was paid $4 for a 35 minute session. The experiment was presented on a Apple iMac G5 controlled by a script running in Matlab using PsychToolbox extensions [23, 24]. Observers were seated approximately 44 cm away from the display. Each subject was trained to discriminate between two categories of fish: ocean fish and fish farm fish. Subjects were instructed, “Fish from the ocean have to fend for themselves and as a result they have an equal probability of being any size. In contrast, fish from the fish farm are all fed the same amount of food, so their sizes are similar and only determined by genetics.” These instructions were meant to suggest that the ocean fish were drawn from a uniform distribution and the fish farm fish were drawn from a Gaussian distribution. The mean and the standard deviation of the Gaussian were varied in four between-subject conditions, resulting from crossing two levels of the mean, µ = 3.66 cm and µ = 4.72 cm, with two levels of the standard deviation, σ = 3.1 mm and σ = 1.3 mm. The uniform distribution was the same across training distributions and was bounded at 2.63 cm and 5.76 cm. The stimuli were a modified version of the fish used in [25]. The fish were constructed from three ovals, two gray and one black, and a circle on a black background. Fish were all 9.1 cm long with heights drawn from the Gaussian and uniform distributions in training. Examples of the smallest and largest fish are shown in Figure 1. During the the MCMC trials, the range of possible fish heights was expanded to be from 0.3 mm to 8.35 cm. Subjects saw two types of trials. In a training trial, either the uniform or Gaussian distribution was selected with equal probability, and a single sample was drawn from the selected distribution. The sampled fish was shown to the subject, who chose which distribution produced the fish. Feedback was then provided on the accuracy of this choice. In an MCMC trial, two fish were presented on the screen. Subjects chose which of the two fish came from the Gaussian distribution. Neither fish had been sampled from the Gaussian distribution. Instead, one fish was the state of a Markov chain and the other fish was the proposal. The state and proposal were unlabeled and they were randomly assigned to either the left or right side of the screen. Three MCMC chains were interleaved during the MCMC trials. The start states of the chains were chosen to be 2.63 cm, 4.20 cm, and 5.76 cm. Relative to the training distributions, the start states were overdispersed, facilitating assessment of Figure 1: Examples of the largest and smallest fish stimuli presented to subjects during training. The relative size of the fish stimuli are shown here; true display sizes are given in the text. 4 3 4 5 Subject 44 3 4 5 Subject 30 3 4 5 Subject 37 Fish Width (cm) 10 20 30 40 50 60 70 80 3 4 5 Subject 19 Trial Number Training Kernel Density Gaussian Fit Figure 2: The four rows are subjects from each of the between-subject conditions. The panels in the first column show the behavior of the three Markov chains per subject. The black lines represent the states of the Markov chains, the dashed line is the mean of the Gaussian training distribution, and the dot-dashed lines are two standard deviations from the mean. The second column shows the densities of the training distributions. These training densities can be compared to the MCMC samples, which are described by their kernel density estimates and Gaussian fits in the last two columns. convergence. The proposal was chosen from a symmetric discretized pseudo-Gaussian distribution with a mean equal to the current state. The probability of proposing the current state was set to zero. The experiment was broken up into blocks of training and MCMC trials, beginning with 120 training trials, followed by alternating blocks of 60 MCMC trials and 60 training trials. Training and MCMC trials were interleaved to keep subjects from forgetting the training distributions. A block of 60 test trials, identical to the training trials but without feedback, ended the experiment. 4.2 Results Subjects were excluded if their chains did not converge to the stationary distribution or if the state of any chain reached the edge of the parameter range. We used a heuristic for determining convergence: every chain had to cross another chain.1 Figure 2 shows the chains from four subjects, one from each of the between-subject conditions. Most subjects took approximately 20 trials to produce the first crossing in their chains, so these trials were discarded and the remaining 60 trials from each chain were pooled and used in further analyses. The distributions on the right hand side of Figure 2 show the training distribution, best fit Gaussian to the MCMC samples, and kernel density estimate based on the MCMC samples. The distributions estimated for the subjects shown in this figure match well with the training distribution. The mean, µ, and standard deviation, σ, were computed from the MCMC samples produced by each subject. The average of these estimates for each condition is shown in Figure 3. As predicted, µ was higher for subjects trained on Gaussians with higher means, and σ was higher for subjects trained on Gaussians with higher standard deviations. These differences were statistically significant, with a one-tailed Student’s t-test for independent samples giving t(38) = 7.36, p < 0.001 and t(38) = 2.01, p < 0.05 for µ and σ respectively. The figure also shows that the means of the MCMC samples corresponded well with the actual means of the training distributions. The standard deviations of the samples tended to be higher than the training distributions, which could be a consequence of either perceptual 1Many heuristics have been proposed for assessing convergence. The heuristic we used is simple to apply in a one-dimensional state space. It is a necessary, but not sufficient, condition for convergence. 5 0 1 2 3 4 5 6 µ µ = 3.66, σ = 0.13 µ = 3.66, σ = 0.31 µ = 4.72, σ = 0.13 µ = 4.72, σ = 0.31 Trained Gaussian (cm) 0 0.2 0.4 0.6 σ Mean of Estimates from MCMC Samples (cm) Figure 3: The bar plots show the mean of µ and σ across the MCMC samples produced by subjects in all four training conditions. Error bars are one standard error. The black dot indicates the actual value of µ and σ for each condition. noise (increasing the effective variation in stimuli associated with a category) or choices being made in a way consistent with the exponentiated choice rule with γ < 1. 5 Investigating the structure of natural categories The previous experiment provided evidence that the assumptions underlying the MCMC method are approximately correct, as the samples recovered by the method matched the training distribution. Now we will demonstrate this method in a much more interesting case: sampling from subjective probability distributions that have been built up from real-world experience. The natural categories of the shapes of giraffes, horses, cats, and dogs were explored in a nine-dimensional stick figure space [26]. The responses of a single subject are shown in Figure 4. For each animal, three Markov chains were started from different states. The three starting states were the same between animal conditions. Figure 4B shows the chains converging for the giraffe condition. The different animal conditions converged to different areas of the parameter space (Figure 4C) and the means across samples produced stick figures that correspond well to the tested categories (Figure 4D). 6 Summary and conclusion We have developed a Markov chain Monte Carlo method for sampling from a subjective probability distribution. This method allows a person to act as an element of an MCMC algorithm by constructing a task for which choice probabilities follow a valid acceptance function. By choosing between the current state and a proposal, people produce a Markov chain with a stationary distribution matching their mental representation of a category. The results of our experiment indicate that this method accurately uncovers differences in mental representations that result from training people on categories with different structures. In addition, we explored the subjective probability distributions of natural animal shapes in a multidimensional parameter space. This method is a complement to established methods such as classification images [27]. Our method estimates the subjective probability distribution, while classification images estimate the decision boundary between two classes. Both methods can contribute to the complete picture of how people make categorization decisions. The MCMC method corresponds most closely to procedures for gathering typicality ratings in categorization research. Typicality ratings are used to determine which objects are better examples of a category than other objects. Our MCMC method yields the same information, but provides a way to efficiently do so when the category distribution is concentrated in a small region of a large parameter space. Testing a random subset of objects from this type of space will result in many uninformative trials. MCMC’s use of previous responses to select new test trials is theoretically more efficient, but future work is needed to empirically validate this claim. Our MCMC method provides a way to explore the subjective probability distributions that people associate with categories. Similar tasks could be used to investigate subjective probability distributions in other settings, providing a valuable tool for testing probabilistic models of cognition. The general principle of identifying connections between models of human performance and machine learning algorithms can teach us a great deal about cognition. For instance, Gibbs sampling could 6 Figure 4: Task and results for an experiment exploring natural categories of animals using stick figure stimuli. (A) Screen capture from the experiment, where people make a choice between the current state of the Markov chain and a proposed state. (B) States of the Markov chain for the subject when estimating the distribution for giraffes. The nine-dimensional space characterizing the stick figures is projected onto the two dimensions that best discriminate the different animal distributions using linear discriminant analysis. Each chain is a different color and the start states of the chains are indicated by the filled circle. The dotted lines are samples that were discarded to ensure that the Markov chains had converged, and the solid lines are the samples that were retained. (C) Samples from distributions associated with all four animals for the subject, projected onto the same plane used in B. Two samples from each distribution are displayed in the bubbles. The samples capture the similarities and differences between the four categories of animals, and reveal the variation in the members of those categories.(D) Mean of the samples for each animal condition. 7 be used to generate samples from a distribution, if a clever method for inducing people to sample from conditional distributions could be found. Using people as the elements of a machine learning algorithm is a virtually unexplored area that should be exploited in order to more efficiently test hypotheses about the knowledge that guides human learning and inference. References [1] M. Oaksford and N. Chater, editors. Rational models of cognition. Oxford University Press, 1998. [2] N. Chater, J. B. Tenenbaum, and A. Yuille. Special issue on “Probabilistic models of cognition”. Trends in Cognitive Sciences, 10(7), 2006. [3] J. R. Anderson. The adaptive character of thought. Erlbaum, Hillsdale, NJ, 1990. [4] F. G. Ashby and L. A. Alfonso-Reese. Categorization as probability density estimation. Journal of Mathematical Psychology, 39:216–233, 1995. [5] W.R. Gilks, S. Richardson, and D. J. Spiegelhalter, editors. Markov Chain Monte Carlo in Practice. Chapman and Hall, Suffolk, 1996. [6] A. W. Metropolis, A. W. Rosenbluth, M. N. Rosenbluth, A. H. Teller, and E. Teller. Equations of state calculations by fast computing machines. Journal of Chemical Physics, 21:1087–1092, 1953. [7] W. K. Hastings. Monte Carlo sampling methods using Markov chains and their applications. Biometrika, 57:97–109, 1970. [8] A. A. Barker. Monte Carlo calculations of the radial distribution functions for a proton-electron plasma. Australian Journal of Physics, 18:119–133, 1965. [9] S. K. Reed. Pattern recognition and categorization. Cognitive Psychology, 3:393–407, 1972. [10] D. L. Medin and M. M. Schaffer. Context theory of classification learning. Psychological Review, 85:207– 238, 1978. [11] R. M. Nosofsky. Attention, similarity, and the identification-categorization relationship. Journal of Experimental Psychology: General, 115:39–57, 1986. [12] R. D. Luce. Detection and recognition. In R. D. Luce, R. R. Bush, and E. Galanter, editors, Handbook of Mathematical Psychology, Volume 1, pages 103–190. John Wiley and Sons, Inc., New York and London, 1963. [13] R. N. Shepard. Stimulus and response generalization: A stochastic model relating generalization to distance in psychological space. Psychometrika, 22:325–345, 1957. [14] R. A. Bradley. Incomplete block rank analysis: On the appropriateness of the model of a method of paired comparisons. Biometrics, 10:375–390, 1954. [15] F. R. Clarke. Constant-ratio rule for confusion matrices in speech communication. The Journal of the Acoustical Society of America, 29:715–720, 1957. [16] J. W. Hopkins. Incomplete block rank analysis: Some taste test results. Biometrics, 10:391–399, 1954. [17] N. Vulkan. An economist’s perspective on probability matching. Journal of Economic Surveys, 14:101– 118, 2000. [18] F. G. Ashby. Multidimensional models of perception and cognition. Erlbaum, Hillsdale, NJ, 1992. [19] R. M. Nosofsky. Attention and learning processes in the identification and categorization of integral stimuli. Journal of Experimental Psychology: Learning, Memory, and Cognition, 13:87–108, 1987. [20] G. C. Oden and D. W. Massaro. Integration of featural information in speech perception. Psychological Review, 85:172–191, 1978. [21] J. L. McClelland and J. L. Elman. The TRACE model of speech perception. Cognitive Psychology, 18:1–86, 1986. [22] F. G. Ashby and W. T. Maddox. Relations between prototype, exemplar, and decision bound models of categorization. Journal of Mathematical Psychology, 37:372–400, 1993. [23] D. H. Brainard. The psychophysics toolbox. Spatial Vision, 10:433–436, 1997. [24] D. G. Pelli. The VideoToolbox software for visual psychophysics: Transforming numbers into movies. Spatial Vision, 10:437–442, 1997. [25] J. Huttenlocher, L. V. Hedges, and J. L. Vevea. Why do categories affect stimulus judgment? Journal of Experimental Psychology: General, 129:220–241, 2000. [26] C. Olman and D. Kersten. Classification objects, ideal observers, and generative models. Cognitive Science, 28:227–239, 2004. [27] A. J. Ahumada and J. Lovell. Stimulus features in signal detection. Journal of the Acoustical Society of America, 49:1751–1756, 1971. 8
2007
108
3,135
Abstract The peak location in a population of phase-tuned neurons has been shown to be a more reliable estimator for disparity than the peak location in a population of position-tuned neurons. Unfortunately, the disparity range covered by a phasetuned population is limited by phase wraparound. Thus, a single population cannot cover the large range of disparities encountered in natural scenes unless the scale of the receptive fields is chosen to be very large, which results in very low resolution depth estimates. Here we describe a biologically plausible measure of the confidence that the stimulus disparity is inside the range covered by a population of phase-tuned neurons. Based upon this confidence measure, we propose an algorithm for disparity estimation that uses many populations of high-resolution phase-tuned neurons that are biased to different disparity ranges via position shifts between the left and right eye receptive fields. The population with the highest confidence is used to estimate the stimulus disparity. We show that this algorithm outperforms a previously proposed coarse-to-fine algorithm for disparity estimation, which uses disparity estimates from coarse scales to select the populations used at finer scales and can effectively detect occlusions. 1 Introduction Binocular disparity, the displacement between the image locations of an object between two eyes or cameras, is an important depth cue. Mammalian brains appear to represent the stimulus disparity using populations of disparity-tuned neurons in the visual cortex [1][2]. The binocular energy model is a first order model that explains the responses of individual disparity-tuned neurons [3]. In this model, the preferred disparity tuning of the neurons is determined by the phase and position shifts between the left and right monocular receptive fields (RFs). Peak picking is a common disparity estimation strategy for these neurons([4]-[6]). In this strategy, the disparity estimates are computed by the preferred disparity of the neuron with the largest response among the neural population. Chen and Qian [4] have suggested that the peak location in a population of phase-tuned disparity energy neurons is a more reliable estimate than the peak location in a population of position-tuned neurons. It is difficult to estimate disparity from a single phase-tuned neuron population because its range of preferred disparities is limited. Figure 1 shows the population response of phase-tuned neurons (vertical cross section) for different stimulus disparities. If the stimulus disparity is confined to the range of preferred disparities of this population, the peak location changes linearly with the stimulus disparity. Thus, we can estimate the disparity from the peak. However, in natural viewing condition, the stimulus disparity ranges over ten times larger than the range of the preferred disparities of the population [7]. The peak location no longer indicates the stimulus disparity, since the peaks still occur even when the stimulus disparity is outside the range of neurons’ preferred disparities. The false peaks arise from two sources: the phase wrap-around due to the sinusoidal modulation in the Estimating disparity with confidence from energy neurons Eric K. C. Tsang Dept. of Electronic and Computer Engr. Hong Kong Univ. of Sci. and Tech. Kowloon, HONG KONG SAR eeeric@ee.ust.hk Bertram E. Shi Dept. of Electronic and Computer Engr. Hong Kong Univ. of Sci. and Tech. Kowloon, HONG KONG SAR eebert@ee.ust.hk Gabor function modelling neuron’s receptive field (RF) profile, or unmatching edges entering the neuron's RF [5]. Although a single population can cover a large disparity range, the large size of the required receptive fields results in very low resolution depth estimates. To address this problem, Chen and Qian [4] proposed a coarse-to-fine algorithm which refines the estimates computed from coarse scales using populations tuned to finer scales. Here we present an alternative way to estimate the stimulus disparity using a biologically plausible confidence measure that indicates whether the stimulus disparity lies inside or outside the range of preferred disparities in a population of phase tuned neurons. We motivate this measure by examining the empirical statistics of the model neuron responses on natural images. Finally, we demonstrate the efficacy of using this measure to estimate the stimulus disparity. Our model generates better estimates than the coarse-to-fine approach [4], and can detect occlusions. 2 Features of the phase-tuned disparity population In this section, we define different features of a population of phase-tuned neurons. These features will be used to define the confidence measure. Figure 2a illustrates the binocular disparity energy model of a phase-tuned neuron [3]. For simplicity, we assume 1D processing, which is equivalent to considering one orientation in the 2D case. The response of a binocular simple cell is modelled by summing of the outputs of linear monocular Gabor filters applied to both left and right images, followed by a positive or negative half squaring nonlinearity. The response of a binocular complex cell is the sum of the four simple cell responses. Formally, we define the left and right retinal images by and , where denotes the distance from the RF center. The disparity is the difference between the locations of corresponding points in the left and right images, i.e., an object that appears at point in the left image appears at point in the right image. Pairs of monocular responses are generated by integrating image intensities weighted by pairs of phase quadrature RF profiles, which are the real and imaginary parts of a complex-valued Gabor function ( ): (1) where and are the spatial frequency and the phase of the left and right monocular RFs, and is a zero mean Gaussian with standard deviation , which is inversely proportional to the spatial frequency bandwidth. The spatial frequency and the standard deviation of the left and right RFs are identical, but the phases may differ ( and ). We can compactly express the pairs of left and right monocular responses as the real and imaginary parts of and , where with a slight abuse of notation, we define and (2) Fig. 1: Sample population responses of the phase-tuned disparity neurons for different disparities. This was generated by presenting the left image of the “Cones” stereogram shown in Figure 5a to both eyes but varying the disparity by keeping the left image fixed and shifting the right image. At each point, the image intensity represents the response of a disparity neuron tuned to a fixed preferred disparity (vertical axis) in response to a fixed stimulus disparity (horizontal axis). The dashed vertical lines indicate the stimulus disparities that fall within the range of preferred disparities of the population ( pixels). -40 -30 -20 -10 0 10 20 30 40 -5 0 5 stimulus disparity (pixels) Dpref 8 ± Ul x( ) Ur x( ) x d x d + x j 1 – = h x ψ , ( ) g x( )ej Ωx ψ + ( ) g x( ) Ωx ψ + ( ) cos jg x( ) Ωx ψ + ( ) sin + = = Ω ψ g x( ) σ ψl ψr Vl ψl ( ) Vlejψl = Vr ψr ( ) Vrejψr = Vl g x( )ejΩxUl x( ) x d ∫ = Vr g x( )ejΩxUr x( ) x d ∫ = The response of the binocular complex cell (the disparity energy) is the squared modulus of the sum of the monocular responses: (3) where the * superscript indicates the complex conjugation. The phase-shift between the right and left neurons controls the preferred disparity of the binocular complex cell [6]. If we fix the stimulus and allow to vary between , the function in (3) describes the population response of phase-tuned neurons whose preferred disparities range between and . The population response can be completely specified by three features , and [4][5]. (4) where (5) Figure 2b shows the graphical interpretation of these features. The feature is the average response across the population. The feature is the difference between the peak and average responses. Note that , since . The feature is the peak location of the population response. Peak picking algorithms compute the estimates from the peak location, i.e. [6]. 3 Feature Analysis In this section, we suggest a simple confidence measure that can be used to differentiate between two classes of stimulus disparities: DIN and DOUT corresponding to stimulus disparities inside ( ) and outside ( ) the range of preferred disparities in the population. We find this confidence measure by analyzing the empirical joint densities of and the ratio conditioned on the two disparity classes. Considering and is equivalent to considering and . We ignore . Intuitively, the peak location will be less effective in distinFig. 2: (a) Binocular disparity energy model of a disparity neuron in the phase-shift mechanism. The phase-shift between the left and right monocular RFs determines the preferred disparity of the neuron. The neuron shown is tuned to a negative disparity of . (b) The population response of the phase-tuned neurons centered at a retinal location with the phase-shifts can be characterized by three features and . ψl 0 = Ed Δψ ( ) Half Squaring Binocular Simple Cells Binocular Complex Cell ψr π 2--= Ul x( ) Ur x( ) h x ψl , ( ) h x ψr , ( ) Re. Im. Re. Im. Ed Δψ ( ) Δψ π π – P ΔΦ S (a) (b) Σ Σ Σ ψr ψl – π 2Ω ( ) ⁄ – Ed Δψ ( ) Δψ π – π , [ ] ∈ S P , ΔΦ Ed Δψ ( ) Vlejψl Vrejψr + 2 Vl 2 VlVr *e j – Δψ Vl *VrejΔψ Vr 2 + + + = = Δψ ψr ψl – = Dpref Δψ ( ) Δψ Ω ⁄ – ≈ Δψ π ± Ed Δψ ( ) π Ω ⁄ – π Ω ⁄ S P ΔΦ Ed Δψ ( ) S P ΔΦ Δψ – ( ) cos + = S Vl 2 Vr 2 + = P 2 Vl Vr 2 VlVr * = = ΔΦ Φl Φr – VlVr * ( ) arg = = S P S P ≥ S P – Vl Vr – ( )2 0 > = ΔΦ dest ΔΦ Ω ⁄ – = d π Ω ⁄ ≤ d π Ω ⁄ > S R P S ⁄ = S R S P ΔΦ ΔΦ guishing between DIN and DOUT, since Figure 1 shows that the phase ranges between and for both disparity classes. The ratio is bounded between and , since . Because of the uncertainties in the natural scenes, the features and are random variables. In making a decision based on random features, Bayesian classifiers minimize the classification error. Bayesian classifiers compare the conditional probabilities of the two disparity classes (DIN and DOUT) given the observed feature values. The decision can be specified by thresholding the Bayes factor. (6) where the threshold controls the location of the decision boundary in the feature space and depends upon the prior class probabilities and . The function is the conditional density of the features given the class . To find the optimal decision boundary for the features and , we estimated the joint class likelihood from data obtained using the “Cones” and the “Teddy” stereograms from Middlebury College [8][9], shown in Figure 5a. The stereograms are rectified, so that the correspondences are located in the same horizontal scan-lines. Each image has 1500 x 1800 pixels. We constructed a population of phase-tuned neurons at each pixel. The disparity neurons had the same spatial frequency and standard deviation, and were selective to vertical orientations. The spatial frequency was radians per pixel and the standard deviation in the horizontal direction was pixels, corresponding to a spatial bandwidth of 1.8 octaves. The standard deviation in the vertical direction was . The range of the preferred disparities (DIN) of the population is between pixels. To reduce the variability in the classification, we also applied Gaussian spatial pooling with the standard deviation to the population [4][5]. The features and computed from population were separated into two classes (DIN and DOUT) according to the ground truth in Figure 5b. Figure 3a-b show the empirically estimated joint conditional densities for the two disparity classes. They were computed by binning the features and with the bin sizes of 0.25 for and 0.01 for . Given the disparity within the range of preferred disparities (DIN), the joint density concentrates at small and large . For the out-of-range disparities (DOUT), the joint density shifts to both large and small . Intuitively, a horizontal hyperplane, illustrated by the red dotted line in Figure 3a-b, is an appropriate decision boundary to separate the DIN and DOUT data. This indicates that the feature can be an indicator to distinguish between the in-range and out-of-range disparities. Mathematically, we can compute the optimal decision boundaries by applying different thresholds to the Bayes factor in (6). Figure 3c shows the boundaries. They are basically flat except at small . We also demonstrate the efficacy of thresholding instead of using the optimal decision boundaries to distinguish between in-range and out-of-range disparities. Given the prior class probability Fig. 3: The empirical joint density of and given (a) DIN and (b) DOUT. Red indicates large values. Blue indicates small values. (c) The optimal decision boundaries derived from the Bayes factor. (d) The change in total probability of error between using a flat boundary (thresholding ) versus the optimal boundary. 0.1 0.2 0.3 0.4 0.5 0 2 4 6 8 x 10 -3 5 10 15 20 0 0.2 0.4 0.6 0.8 1 5 10 15 20 0 0.2 0.4 0.6 0.8 1 5 10 15 20 0.5 0.6 0.7 0.8 0.9 S S S R R R (a) (c) (d) Pe Δ (b) P DIN [ ] S R Pe Δ R π – π R 0 1 S P ≥ S R BS R , fS R , C s r , DIN ( ) fS R , C s r , DOUT ( ) ---------------------------------------------= DIN <> DOUT TS R , TS R , S R , { } P DIN [ ] P DOUT [ ] fS R , C s r , c ( ) c DIN DOUT , { } ∈ S R fS R , C s r , c ( ) Ω 2π 16 ⁄ = σ 6.78 = 2σ 8 ± 0.5σ S R S R S R S R S R R S R , we compute a threshold that minimizes the total probability of classification error: (7) We then compare this total probability of error with the one computed using the optimal decision boundaries derived in (6). Figure 3d shows the deviation in the total probability of error between the two approaches versus . The deviation is small (on the order of ) suggesting that thresholding results in similar performance as using the optimal decision boundaries. Thus, can be used as a confidence measure for distinguishing DIN and DOUT. Moreover, this measure can be computed by normalization, which is a common component in models for V1 neurons [11]. 4 Hybrid position-phase model for disparity estimation with validation Our analysis above shows that is a simple indicator to distinguish between in-range and out-ofrange disparities. In this section, we describe a model that uses this feature to estimate the stimulus disparity with validation. Figure 4 shows the proposed model, which consists of populations of hybrid tuned disparity neurons tuned to different phase-shifts and position-shifts . For each population tuned to the same position-shift but different phase-shifts (phase-tuned population), we compute the ratio . The average activation can be computed by pooling the responses of the entire phase-tuned neurons. The feature can be computed by subtracting the peak response of the phase tuned population with the average activation . The features at different position-shifts are compared through a winner-take-all network to select the position-shift with the maximum . The disparity estimate is further refined by the peak location by (8) In additional to estimate the stimulus disparity, we also validate the estimates by comparing with a threshold . Instead of choosing a fixed threshold, we vary the threshold to show that the feature can be an occlusion detector. 4.1 Disparity estimation with confidence We applied the proposed model to estimate the disparity of the “Cones” and the “Teddy” stereograms, shown in Figure 5a. The spatial frequency and the spatial standard deviation of the neurons Fig. 4: Proposed disparity estimator with the validation of disparity estimates. Ed Δψ ( ) DIN Ed Δψ ( ) Ed Δψ ( ) R TR > Ul x( ) Ur x( ) Δc 0 = Δc 128 = Δc 128 – = phase tuned population R128 ΔΦ128 , dest /DOUT Winner take all RΔc* ΔΦΔc* P DIN [ ] c 0 1 , [ ] ∈ Pe P DIN [ ] fS R , C s r , DIN ( ) R c <∫ 1 P DIN [ ] – ( ) fS R , C s r , DOUT ( ) R c >∫ + = P DIN [ ] 10 2 – R R R Δψ Δc RΔc PΔc SΔc ⁄ = SΔc PΔc SΔc PΔc + SΔc RΔc Δc* RΔc ΔΦΔc* dest Δc* ΔΦΔc* Ω ----------------– = RΔc* TR RΔc were kept the same as the previous analysis. We also performed spatial pooling and orientation pooling to improve the estimation. For spatial pooling, we applied a circularly symmetric Gaussian function with standard deviation . For orientation pooling, we pooled the responses over five orientations ranging from 30 to 150 degrees. The range of the position-shifts for the populations was set to the largest disparity range, pixels, according to the ground truth. We also implemented the coarse-to-fine model as described in [4] for comparison. In this model, an initial disparity estimate computed from a population of phase-tuned neurons at the coarsest scale is successively refined by the populations of phase-tuned neurons at the finer scales. By choosing the coarsest scale large enough, the disparity range covered by this method can be arbitrarily large. The coarsest and the finest scales had the Gabor periods of 512 and 16 pixels. The Gabor periods of the successive scales differed by a factor of . Neurons at the finest scale had the same RF parameters as our model. Same spatial pooling and orientation pooling were applied on each scale. Figure 5d-e show the estimated disparity maps and the error maps of the two approaches. The error maps show the regions where the disparity estimates exceed 1 pixel of error in the disparity. Both models correctly recover the stimulus disparity at most locations with gradual disparity changes, but tend to make errors at the depth boundaries. However, the proposed model generates more accurate estimates. In the coarse-to-fine model, the percentage of pixels being incorrectly estimated is 36.3%, while our proposed model is only 27.8%. Fig. 5: (a) The two natural stereograms used to evaluate the model performance. (b) The ground truth disparity maps with respect to the left images, obtained by the structured light method. (c) The ground truth occlusion maps. (d) The disparity maps and the error maps computed by the coarse-tofine approach. (e) The disparity maps and the error maps computed by the proposed model. The detected invalid estimates are labelled in black in the disparity maps. Teddy Cones -100 0 100 left right (a) (b) (d) (c) (e) error estimate error estimate σ 128 ± 2 The coarse-to-fine model tends to make errors around the depth boundaries. This arises because the assumption that the stimulus disparity is constant over the RF of the neuron is unlikely at very large scales. At boundaries, the coarse-to-fine model generates poor initial estimates, which cannot be corrected at the finer scales, because the actual stimulus disparities are outside the range considered at the finer scales. On the other hand, the proposed model can not only estimate the stimulus disparity, but also can validate the estimates. In general, the responses of neurons selective to different position disparities are not comparable, since they depend upon image contrast which varies at different spatial locations. However, the feature , which is computed by normalizing the response peak by the average response, eliminates such dependency. Moreover, the invalid regions detected (the black regions on the disparity maps) are in excellent agreement with the error labels. 4.2 Occlusion detection In addition to validating the disparity estimates, the feature can also be used to detect occlusion. Occlusion is one of the challenging problems in stereo vision. Occlusion occurs near the depth discontinuities where there is no correspondence between the left and right images. The disparity in the occlusion regions is undefined. The occlusion regions for these stereograms are shown in Figure 5c. There are three possibilities for image pixels that are labelled as out of range (DOUT). They are occluded pixels, pixels with valid disparities that are incorrectly estimated, and pixels with valid disparity that are correctly estimated. Figure 6a shows the percentages of DOUT pixels that fall into each possibility as the threshold applied to varies, e.g., (9) These percentages sum to unity for any thresholds . For small thresholds, the detector mainly identifies the occlusion regions. As the threshold increases, the detector also begins to detect incorrect disparity estimates. Figure 6b shows the percentages of pixels in each possibility that are classified as DOUT as a function of , e.g., (10) For a large threshold ( close to unity), all estimates are labelled as DOUT, so the three percentages approach 100%. The proposed detector is effective in identifying occlusion. At the threshold , it identifies ~70% of the occluded pixels, ~20% of the pixels with incorrect estimates with only ~10% misclassification. Fig. 6: The percentages of occluded pixels (thick), pixels with incorrect disparity estimates (thin) and pixels with correct estimates (dotted) identified as DOUT. (a) Percentages as a fraction of total number of DOUT pixels. (b) Percentages as a fraction of number of pixels of each type. R R TR R P1 occluded ( ) # of occluded pixels in DOUT total # of pixels in DOUT -----------------------------------------------------------------------100% × = TR TR P2 occluded ( ) # of occluded pixels in DOUT # of occluded pixels in image -----------------------------------------------------------------------100% × = TR TR 0.3 = 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 TR TR (a) (b) P1 (x100%) P2 (x100%) 5 Discussion In this paper, we have proposed an algorithm to estimate stimulus disparities based on a confidence measure computed from population of hybrid tuned disparity neurons. Although there have been previously proposed models that estimate the stimulus disparity from populations of hybrid tuned neurons [4][10], our model is the first that also provides a confidence measure for these estimates. Our analysis suggests that pixels with low confidence are likely to be in occluded regions. The detection of occlusion, an important problem in stereo vision, was not addressed in these previous approaches. The confidence measure used in the proposed algorithm can be computed using normalization, which has been used to model the responses of V1 neurons [11]. Previous work has emphasized the role of normalization in reducing the effect of image contrast or in ensuring that the neural responses tuned to different stimulus dimensions are comparable [12]. Our results show that, in addition to these roles, normalization also serves to make the magnitude of the neural responses more representative of the confidence in validating the hypothesis that the input disparity is close to the neurons preferred disparity. The classification performance using this normalized feature is close to that using the statistical optimal boundaries. Aggregating the neural responses over locations, orientations and scales is a common technique to improve the estimation performance. For the consistency with the coarse-to-fine approach, our algorithm also applies spatial and orientation pooling before computing the confidence. An interesting question, which we are now investigating, is whether individual confidence measures computed from different locations or orientations can be combined systematically. Acknowledgements This work was supported in part by the Hong Kong Research Grants Council under Grant 619205. References [1] H. B. Barlow, C. Blakemore, and J. D. Pettigrew. The neural mechanism of binocular depth discrimination. Journal of Neurophysiology, vol. 193(2), 327-342, 1967. [2] G. F. Poggio, B. C. Motter, S. Squatrito, and Y. Trotter. Responses of neurons in visual cortex (V1 and V2) of the alert macaque to dynamic random-dot stereograms. Vision Research, vol. 25, 397-406, 1985. [3] I. Ohzawa, G. C. Deangelis, and R. D. Freeman. Stereoscopic depth discrimination in the visual cortex: neurons ideally suited as disparity detectors. Science, vol. 249, 1037-1041, 1990. [4] Y. Chen and N. Qian. A Coarse-to-Fine Disparity Energy Model with Both Phase-Shift and PositionShift Receptive Field Mechanisms. Neural Computation, vol. 16, 1545-1577, 2004. [5] D. J. Fleet, H. Wagner and D. J. Heeger. Neural encoding of binocular disparity: energy models, position shifts and phase shifts. Vision Research, 1996, vol. 36, 1839-1857. [6] N. Qian, and Y. Zhu. Physiological computation of binocular disparity. Vision Research, vol. 37, 18111827, 1997. [7] S. J. D. Prince, B. G. Cumming, and A. J. Parker. Range and Mechanism of Encoding of Horizontal Disparity in Macaque V1. Journal of Neurophysiology, vol. 87, 209-221, 2002. [8] D. Scharstein and R. Szeliski. A Taxonomy and Evaluation of Dense Two-Frame Stereo Correspondence Algorithms. International Journal of Computer Vision, vol. 47(1/2/3), 7-42, 2002. [9] D. Scharstein and R. Szeliski. High-accuracy stereo depth maps using structured light. IEEE Conference on Computer Vision and Pattern Recognition, vol. 1, 195-202, 2003. [10] J. C. A. Read and B. G. Cumming. Sensors for impossible stimuli may solve the stereo correspondence problem. Nature Neuroscience, vol. 10, 1322-1328, 2007. [11] D. J. Heeger. Normalization of cell responses in cat striate cortex. Visual Neuroscience, vol. 9, 181198, 1992. [12] S. R. Lehky and T. J. Sejnowski. Neural model of stereoacuity and depth interpolation based on a distributed representation of stereo disparity. Journal of Neuroscience, vol. 10, 2281-2299, 1990.
2007
109
3,136
Regret Minimization in Games with Incomplete Information Martin Zinkevich maz@cs.ualberta.ca Michael Johanson johanson@cs.ualberta.ca Michael Bowling Computing Science Department University of Alberta Edmonton, AB Canada T6G2E8 bowling@cs.ualberta.ca Carmelo Piccione Computing Science Department University of Alberta Edmonton, AB Canada T6G2E8 carm@cs.ualberta.ca Abstract Extensive games are a powerful model of multiagent decision-making scenarios with incomplete information. Finding a Nash equilibrium for very large instances of these games has received a great deal of recent attention. In this paper, we describe a new technique for solving large games based on regret minimization. In particular, we introduce the notion of counterfactual regret, which exploits the degree of incomplete information in an extensive game. We show how minimizing counterfactual regret minimizes overall regret, and therefore in self-play can be used to compute a Nash equilibrium. We demonstrate this technique in the domain of poker, showing we can solve abstractions of limit Texas Hold’em with as many as 1012 states, two orders of magnitude larger than previous methods. 1 Introduction Extensive games are a natural model for sequential decision-making in the presence of other decision-makers, particularly in situations of imperfect information, where the decision-makers have differing information about the state of the game. As with other models (e.g., MDPs and POMDPs), its usefulness depends on the ability of solution techniques to scale well in the size of the model. Solution techniques for very large extensive games have received considerable attention recently, with poker becoming a common measuring stick for performance. Poker games can be modeled very naturally as an extensive game, with even small variants, such as two-player, limit Texas Hold’em, being impractically large with just under 1018 game states. State of the art in solving extensive games has traditionally made use of linear programming using a realization plan representation [1]. The representation is linear in the number of game states, rather than exponential, but considerable additional technology is still needed to handle games the size of poker. Abstraction, both hand-chosen [2] and automated [3], is commonly employed to reduce the game from 1018 to a tractable number of game states (e.g., 107), while still producing strong poker programs. In addition, dividing the game into multiple subgames each solved independently or in real-time has also been explored [2, 4]. Solving larger abstractions yields better approximate Nash equilibria in the original game, making techniques for solving larger games the focus of research in this area. Recent iterative techniques have been proposed as an alternative to the traditional linear programming methods. These techniques have been shown capable of finding approximate solutions to abstractions with as many as 1010 game states [5, 6, 7], resulting in the first significant improvement in poker programs in the past four years. 1 In this paper we describe a new technique for finding approximate solutions to large extensive games. The technique is based on regret minimization, using a new concept called counterfactual regret. We show that minimizing counterfactual regret minimizes overall regret, and therefore can be used to compute a Nash equilibrium. We then present an algorithm for minimizing counterfactual regret in poker. We use the algorithm to solve poker abstractions with as many as 1012 game states, two orders of magnitude larger than previous methods. We also show that this translates directly into an improvement in the strength of the resulting poker playing programs. We begin with a formal description of extensive games followed by an overview of regret minimization and its connections to Nash equilibria. 2 Extensive Games, Nash Equilibria, and Regret Extensive games provide a general yet compact model of multiagent interaction, which explicitly represents the often sequential nature of these interactions. Before presenting the formal definition, we first give some intuitions. The core of an extensive game is a game tree just as in perfect information games (e.g., Chess or Go). Each non-terminal game state has an associated player choosing actions and every terminal state has associated payoffs for each of the players. The key difference is the additional constraint of information sets, which are sets of game states that the controlling player cannot distinguish and so must choose actions for all such states with the same distribution. In poker, for example, the first player to act does not know which cards the other players were dealt, and so all game states immediately following the deal where the first player holds the same cards would be in the same information set. We now describe the formal model as well as notation that will be useful later. Definition 1 [8, p. 200] a finite extensive game with imperfect information has the following components: • A finite set N of players. • A finite set H of sequences, the possible histories of actions, such that the empty sequence is in H and every prefix of a sequence in H is also in H. Z ⊆H are the terminal histories (those which are not a prefix of any other sequences). A(h) = {a : (h, a) ∈H} are the actions available after a nonterminal history h ∈H, • A function P that assigns to each nonterminal history (each member of H\Z) a member of N ∪{c}. P is the player function. P(h) is the player who takes an action after the history h. If P(h) = c then chance determines the action taken after history h. • A function fc that associates with every history h for which P(h) = c a probability measure fc(·|h) on A(h) (fc(a|h) is the probability that a occurs given h), where each such probability measure is independent of every other such measure. • For each player i ∈N a partition Ii of {h ∈H : P(h) = i} with the property that A(h) = A(h′) whenever h and h′ are in the same member of the partition. For Ii ∈Ii we denote by A(Ii) the set A(h) and by P(Ii) the player P(h) for any h ∈Ii. Ii is the information partition of player i; a set Ii ∈Ii is an information set of player i. • For each player i ∈N a utility function ui from the terminal states Z to the reals R. If N = {1, 2} and u1 = −u2, it is a zero-sum extensive game. Define ∆u,i = maxz ui(z) − minz ui(z) to be the range of utilities to player i. Note that the partitions of information as described can result in some odd and unrealistic situations where a player is forced to forget her own past decisions. If all players can recall their previous actions and the corresponding information sets, the game is said to be one of perfect recall. This work will focus on finite, zero-sum extensive games with perfect recall. 2.1 Strategies A strategy of player i σi in an extensive game is a function that assigns a distribution over A(Ii) to each Ii ∈Ii, and Σi is the set of strategies for player i. A strategy profile σ consists of a strategy for each player, σ1, σ2, . . ., with σ−i referring to all the strategies in σ except σi. 2 Let πσ(h) be the probability of history h occurring if players choose actions according to σ. We can decompose πσ = Πi∈N∪{c}πσ i (h) into each player’s contribution to this probability. Hence, πσ i (h) is the probability that if player i plays according to σ then for all histories h′ that are a proper prefix of h with P(h′) = i, player i takes the corresponding action in h. Let πσ −i(h) be the product of all players’ contribution (including chance) except player i. For I ⊆H, define πσ(I) = P h∈I πσ(h), as the probability of reaching a particular information set given σ, with πσ i (I) and πσ −i(I) defined similarly. The overall value to player i of a strategy profile is then the expected payoff of the resulting terminal node, ui(σ) = P h∈Z ui(h)πσ(h). 2.2 Nash Equilibrium The traditional solution concept of a two-player extensive game is that of a Nash equilibrium. A Nash equilibrium is a strategy profile σ where u1(σ) ≥max σ′ 1∈Σ1 u1(σ′ 1, σ2) u2(σ) ≥max σ′ 2∈Σ2 u2(σ1, σ′ 2). (1) An approximation of a Nash equilibrium or ϵ-Nash equilibrium is a strategy profile σ where u1(σ) + ϵ ≥max σ′ 1∈Σ1 u1(σ′ 1, σ2) u2(σ) + ϵ ≥max σ′ 2∈Σ2 u2(σ1, σ′ 2). (2) 2.3 Regret Minimization Regret is an online learning concept that has triggered a family of powerful learning algorithms. To define this concept, first consider repeatedly playing an extensive game. Let σt i be the strategy used by player i on round t. The average overall regret of player i at time T is: RT i = 1 T max σ∗ i ∈Σi T X t=1 ui(σ∗ i , σt −i) −ui(σt)  (3) Moreover, define ¯σt i to be the average strategy for player i from time 1 to T. In particular, for each information set I ∈Ii, for each a ∈A(I), define: ¯σt i(I)(a) = PT t=1 πσt i (I)σt(I)(a) PT t=1 πσt i (I) . (4) There is a well-known connection between regret and the Nash equilibrium solution concept. Theorem 2 In a zero-sum game at time T, if both player’s average overall regret is less than ϵ, then ¯σT is a 2ϵ equilibrium. An algorithm for selecting σt i for player i is regret minimizing if player i’s average overall regret (regardless of the sequence σt −i) goes to zero as t goes to infinity. As a result, regret minimizing algorithms in self-play can be used as a technique for computing an approximate Nash equilibrium. Moreover, an algorithm’s bounds on the average overall regret bounds the rate of convergence of the approximation. Traditionally, regret minimization has focused on bandit problems more akin to normal-form games. Although it is conceptually possible to convert any finite extensive game to an equivalent normalform game, the exponential increase in the size of the representation makes the use of regret algorithms on the resulting game impractical. Recently, Gordon has introduced the Lagrangian Hedging (LH) family of algorithms, which can be used to minimize regret in extensive games by working with the realization plan representation [5]. We also propose a regret minimization procedure that exploits the compactness of the extensive game. However, our technique doesn’t require the costly quadratic programming optimization needed with LH allowing it to scale more easily, while achieving even tighter regret bounds. 3 3 Counterfactual Regret The fundamental idea of our approach is to decompose overall regret into a set of additive regret terms, which can be minimized independently. In particular, we introduce a new regret concept for extensive games called counterfactual regret, which is defined on an individual information set. We show that overall regret is bounded by the sum of counterfactual regret, and also show how counterfactual regret can be minimized at each information set independently. We begin by considering one particular information set I ∈Ii and player i’s choices made in that information set. Define ui(σ, h) to be the expected utility given that the history h is reached and then all players play using strategy σ. Define counterfactual utility ui(σ, I) to be the expected utility given that information set I is reached and all players play using strategy σ except that player i plays to reach I, formally if πσ(h, h′) is the probability of going from history h to history h′, then: ui(σ, I) = P h∈I,h′∈Z πσ −i(h)πσ(h, h′)ui(h′) πσ −i(I) (5) Finally, for all a ∈A(I), define σ|I→a to be a strategy profile identical to σ except that player i always chooses action a when in information set I. The immediate counterfactual regret is: RT i,imm(I) = 1 T max a∈A(I) T X t=1 πσt −i(I) ui(σt|I→a, I) −ui(σt, I)  (6) Intuitively, this is the player’s regret in its decisions at information set I in terms of counterfactual utility, with an additional weighting term for the counterfactual probability that I would be reached on that round if the player had tried to do so. As we will often be most concerned about regret when it is positive, let RT,+ i,imm(I) = max(RT i,imm(I), 0) be the positive portion of immediate counterfactual regret. We can now state our first key result. Theorem 3 RT i ≤P I∈Ii RT,+ i,imm(I) The proof is in the full version. Since minimizing immediate counterfactual regret minimizes the overall regret, it enables us to find an approximate Nash equilibrium if we can only minimize the immediate counterfactual regret. The key feature of immediate counterfactual regret is that it can be minimized by controlling only σi(I). To this end, we can use Blackwell’s algorithm for approachability to minimize this regret independently on each information set. In particular, we maintain for all I ∈Ii, for all a ∈A(I): RT i (I, a) = 1 T T X t=1 πσt −i(I) ui(σt|I→a, I) −ui(σt, I)  (7) Define RT,+ i (I, a) = max(RT i (I, a), 0), then the strategy for time T + 1 is: σT +1 i (I)(a) =    RT,+ i (I,a) P a∈A(I) RT,+ i (I,a) if P a∈A(I) RT,+ i (I, a) > 0 1 |A(I)| otherwise. (8) In other words, actions are selected in proportion to the amount of positive counterfactual regret for not playing that action. If no actions have any positive counterfactual regret, then the action is selected randomly. This leads us to our second key result. Theorem 4 If player i selects actions according to Equation 8 then RT i,imm(I) ≤∆u,i p |Ai|/ √ T and consequently RT i ≤∆u,i|Ii| p |Ai|/ √ T where |Ai| = maxh:P (h)=i |A(h)|. The proof is in the full version. This result establishes that the strategy in Equation 8 can be used in self-play to compute a Nash equilibrium. In addition, the bound on the average overall regret is linear in the number of information sets. These are similar bounds to what’s achievable by Gordon’s Lagrangian Hedging algorithms. Meanwhile, minimizing counterfactual regret does not require a costly quadratic program projection on each iteration. In the next section we demonstrate our technique in the domain of poker. 4 4 Application To Poker We now describe how we use counterfactual regret minimization to compute a near equilibrium solution in the domain of poker. The poker variant we focus on is heads-up limit Texas Hold’em, as it is used in the AAAI Computer Poker Competition [9]. The game consists of two players (zero-sum), four rounds of cards being dealt, and four rounds of betting, and has just under 1018 game states [2]. As with all previous work on this domain, we will first abstract the game and find an equilibrium of the abstracted game. In the terminology of extensive games, we will merge information sets; in the terminology of poker, we will bucket card sequences. The quality of the resulting near equilibrium solution depends on the coarseness of the abstraction. In general, the less abstraction used, the higher the quality of the resulting strategy. Hence, the ability to solve a larger game means less abstraction is required, translating into a stronger poker playing program. 4.1 Abstraction The goal of abstraction is to reduce the number of information sets for each player to a tractable size such that the abstract game can be solved. Early poker abstractions [2, 4] involved limiting the possible sequences of bets, e.g., only allowing three bets per round, or replacing all first-round decisions with a fixed policy. More recently, abstractions involving full four round games with the full four bets per round have proven to be a significant improvement [7, 6]. We also will keep the full game’s betting structure and focus abstraction on the dealt cards. Our abstraction groups together observed card sequences based on a metric called hand strength squared. Hand strength is the expected probability of winning1 given only the cards a player has seen. This was used a great deal in previous work on abstraction [2, 4]. Hand strength squared is the expected square of the hand strength after the last card is revealed, given only the cards a player has seen. Intuitively, hand strength squared is similar to hand strength but gives a bonus to card sequences whose eventual hand strength has higher variance. Higher variance is preferred as it means the player eventually will be more certain about their ultimate chances of winning prior to a showdown. More importantly, we will show in Section 5 that this metric for abstraction results in stronger poker strategies. The final abstraction is generated by partitioning card sequences based on the hand strength squared metric. First, all round-one card sequences (i.e., all private card holdings) are partitioned into ten equally sized buckets based upon the metric. Then, all round-two card sequences that shared a round-one bucket are partitioned into ten equally sized buckets based on the metric now applied at round two. Thus, a partition of card sequences in round two is a pair of numbers: its bucket in the previous round and its bucket in the current round given its bucket in the previous round. This is repeated after reach round, continuing to partition card sequences that agreed on the previous rounds’ buckets into ten equally sized buckets based on the metric applied in that round. Thus, card sequences are partitioned into bucket sequences: a bucket from {1, . . . 10} for each round. The resulting abstract game has approximately 1.65 × 1012 game states, and 5.73 × 107 information sets. In the full game of poker, there are approximately 9.17 × 1017 game states and 3.19 × 1014 information sets. So although this represents a significant abstraction on the original game it is two orders of magnitude larger than previously solved abstractions. 4.2 Minimizing Counterfactual Regret Now that we have specified an abstraction, we can use counterfactual regret minimization to compute an approximate equilibrium for this game. The basic procedure involves having two players repeatedly play the game using the counterfactual regret minimizing strategy from Equation 8. After T repetitions of the game, or simply iterations, we return (¯σT 1 , ¯σT 2 ) as the resulting approximate equilibrium. Repeated play requires storing Rt i(I, a) for every information set I and action a, and updating it after each iteration.2 1Where a tie is considered “half a win” 2The bound from Theorem 4 for the basic procedure can actually be made significantly tighter in the specific case of poker. In the full version, we show that the bound for poker is actually independent of the size of the card abstraction. 5 For our experiments, we actually use a variation of this basic procedure, which exploits the fact that our abstraction has a small number of information sets relative to the number of game states. Although each information set is crucial, many consist of a hundred or more individual histories. This fact suggests it may be possible to get a good idea of the correct behavior for an information set by only sampling a fraction of the associated game states. In particular, for each iteration, we sample deterministic actions for the chance player. Thus, σt c is set to be a deterministic strategy, but chosen according to the distribution specified by fc. For our abstraction this amounts to choosing a joint bucket sequence for the two players. Once the joint bucket sequence is specified, there are only 18,496 reachable states and 6,378 reachable information sets. Since πσt −i(I) is zero for all other information sets, no updates need to be made for these information sets.3 This sampling variant allows approximately 750 iterations of the algorithm to be completed in a single second on a single core of a 2.4Ghz Dual Core AMD Opteron 280 processor. In addition, a straightforward parallelization is possible and was used when noted in the experiments. Since betting is public information, the flop-onward information sets for a particular preflop betting sequence can be computed independently. With four processors we were able to complete approximately 1700 iterations in one second. The complete algorithmic details with pseudocode can be found in the full version. 5 Experimental Results Before discussing the results, it is useful to consider how one evaluates the strength of a near equilibrium poker strategy. One natural method is to measure the strategy’s exploitability, or its performance against its worst-case opponent. In a symmetric, zero-sum game like heads-up poker4, a perfect equilibrium has zero exploitability, while an ϵ-Nash equilibrium has exploitability ϵ. A convenient measure of exploitability is millibets-per-hand (mb/h), where a millibet is one thousandth of a small-bet, the fixed magnitude of bets used in the first two rounds of betting. To provide some intuition for these numbers, a player that always folds will lose 750 mb/h while a player that is 10 mb/h stronger than another would require over one million hands to be 95% certain to have won overall. In general, it is intractable to compute a strategy’s exploitability within the full game. For strategies in a reasonably sized abstraction it is possible to compute their exploitability within their own abstract game. Such a measure is a useful evaluation of the equilibrium computation technique that was used to generate the strategy. However, it does not imply the technique cannot be exploited by a strategy outside of its abstraction. It is therefore common to compare the performance of the strategy in the full game against a battery of known strong poker playing programs. Although positive expected value against an opponent is not transitive, winning against a large and diverse range of opponents suggests a strong program. We used the sampled counterfactual regret minimization procedure to find an approximate equilibrium for our abstract game as described in the previous section. The algorithm was run for 2 billion iterations (T = 2 × 109), or less than 14 days of computation when parallelized across four CPUs. The resulting strategy’s exploitability within its own abstract game is 2.2 mb/h. After only 200 million iterations, or less than 2 days of computation, the strategy was already exploitable by less than 13 mb/h. Notice that the algorithm visits only 18,496 game states per iteration. After 200 million iterations each game state has been visited less than 2.5 times on average, yet the algorithm has already computed a relatively accurate solution. 5.1 Scaling the Abstraction In addition to finding an approximate equilibrium for our large abstraction, we also found approximate equilibria for a number of smaller abstractions. These abstractions used fewer buckets per round to partition the card sequences. In addition to ten buckets, we also solved eight, six, and five 3A regret analysis of this variant in poker is included in the full version. We show that the quadratic decrease in the cost per iteration only causes in a linear increase in the required number of iterations. The experimental results in the next section coincides with this analysis. 4A single hand of poker is not a symmetric game as the order of betting is strategically significant. However a pair of hands where the betting order is reversed is symmetric. 6 Abs Size Iterations Time Exp (×109) (×106) (h) (mb/h) 5 6.45 100 33 3.4 6 27.7 200 75 3.1 8 276 750 261 2.7 10 1646 2000 326† 2.2 †: parallel implementation with 4 CPUs (a) 0 5 10 15 20 25 0 2 4 6 8 10 12 14 16 18 Exploitability (mb/h) Iterations in thousands, divided by the number of information sets CFR5 CFR8 CFR10 (b) Figure 1: (a) Number of game states, number of iterations, computation time, and exploitability (in its own abstract game) of the resulting strategy for different sized abstractions. (b) Convergence rates for three different sized abstractions. The x-axis shows the number of iterations divided by the number of information sets in the abstraction. bucket variants. As these abstractions are smaller, they require fewer iterations to compute a similarly accurate equilibrium. For example, the program computed with the five bucket approximation (CFR5) is about 250 times smaller with just under 1010 game states. After 100 million iterations, or 33 hours of computation without any parallelization, the final strategy is exploitable by 3.4 mb/h. This is approximately the same size of game solved by recent state-of-the-art algorithms [6, 7] with many days of computation. Figure 1b shows a graph of the convergence rates for the five, eight, and ten partition abstractions. The y-axis is exploitability while the x-axis is the number of iterations normalized by the number of information sets in the particular abstraction being plotted. The rates of convergence almost exactly coincide showing that, in practice, the number of iterations needed is growing linearly with the number of information sets. Due to the use of sampled bucket sequences, the time per iteration is nearly independent of the size of the abstraction. This suggests that, in practice, the overall computational complexity is only linear in the size of the chosen card abstraction. 5.2 Performance in Full Texas Hold’em We have noted that the ability to solve larger games means less abstraction is necessary, resulting in an overall stronger poker playing program. We have played our four near equilibrium bots with various abstraction sizes against each other and two other known strong programs: PsOpti4 and S2298. PsOpti4 is a variant of the equilibrium strategy described in [2]. It was the stronger half of Hyperborean, the AAAI 2006 Computer Poker Competition’s winning program. It is available under the name SparBot in the entertainment program Poker Academy, published by BioTools. We have calculated strategies that exploit it at 175 mb/h. S2298 is the equilibrium strategy described in [6]. We have calculated strategies that exploit it at 52.5 mb/h. In terms of the size of the abstract game PsOpti4 is the smallest consisting of a small number of merged three round games. S2298 restricts the number of bets per round to 3 and uses a five bucket per round card abstraction based on hand-strength, resulting an abstraction slightly smaller than CFR5. Table 1 shows a cross table with the results of these matches. Strategies from larger abstractions consistently, and significantly, outperform their smaller counterparts. The larger abstractions also consistently exploit weaker bots by a larger margin (e.g., CFR10 wins 19mb/h more from S2298 than CFR5). Finally, we also played CFR8 against the four bots that competed in the bankroll portion of the 2006 AAAI Computer Poker Competition, which are available on the competition’s benchmark server [9]. The results are shown in Table 2, along with S2298’s previously published performance against the 7 PsOpti4 S2298 CFR5 CFR6 CFR8 CFR10 Average PsOpti4 0 -28 -36 -40 -52 -55 -35 S2298 28 0 -17 -24 -30 -36 -13 CFR5 36 17 0 -5 -13 -20 2 CFR6 40 24 5 0 -9 -14 7 CFR8 52 30 13 9 0 -6 16 CFR10 55 36 20 14 6 0 22 Max 55 36 20 14 6 0 Table 1: Winnings in mb/h for the row player in full Texas Hold’em. Matches with Opti4 used 10 duplicate matches of 10,000 hands each and are significant to 20 mb/h. Other matches used 10 duplicate matches of 500,000 hands each are are significant to 2 mb/h. Hyperborean BluffBot Monash Teddy Average S2298 61 113 695 474 336 CFR8 106 170 746 517 385 Table 2: Winnings in mb/h for the row player in full Texas Hold’em. same bots [6]. The program not only beats all of the bots from the competition but does so by a larger margin than S2298. 6 Conclusion We introduced a new regret concept for extensive games called counterfactual regret. We showed that minimizing counterfactual regret minimizes overall regret and presented a general and pokerspecific algorithm for efficiently minimizing counterfactual regret. We demonstrated the technique in the domain of poker, showing that the technique can compute an approximate equilibrium for abstractions with as many as 1012 states, two orders of magnitude larger than previous methods. We also showed that the resulting poker playing program outperforms other strong programs, including all of the competitors from the bankroll portion of the 2006 AAAI Computer Poker Competition. References [1] D. Koller and N. Megiddo. The complexity of two-person zero-sum games in extensive form. Games and Economic Behavior, pages 528–552, 1992. [2] D. Billings, N. Burch, A. Davidson, R. Holte, J. Schaeffer, T. Schauenberg, and D. Szafron. Approximating game-theoretic optimal strategies for full-scale poker. In International Joint Conference on Artificial Intelligence, pages 661–668, 2003. [3] A. Gilpin and T. Sandholm. Finding equilibria in large sequential games of imperfect information. In ACM Conference on Electronic Commerce, 2006. [4] A. Gilpin and T. Sandholm. A competitive texas hold’em poker player via automated abstraction and real-time equilibrium computation. In National Conference on Artificial Intelligence, 2006. [5] G. Gordon. No-regret algorithms for online convex programs. In Neural Information Processing Systems 19, 2007. [6] M. Zinkevich, M. Bowling, and N. Burch. A new algorithm for generating strong strategies in massive zero-sum games. In Proceedings of the Twenty-Seventh Conference on Artificial Intelligence (AAAI), 2007. To Appear. [7] A. Gilpin, S. Hoda, J. Pena, and T. Sandholm. Gradient-based algorithms for finding nash equilibria in extensive form games. In Proceedings of the Eighteenth International Conference on Game Theory, 2007. [8] M. Osborne and A. Rubenstein. A Course in Game Theory. The MIT Press, Cambridge, Massachusetts, 1994. [9] M. Zinkevich and M. Littman. The AAAI computer poker competition. Journal of the International Computer Games Association, 29, 2006. News item. 8
2007
11
3,137
Locality and low-dimensions in the prediction of natural experience from fMRI Franc¸ois G. Meyer Center for the Study of Brain, Mind and Behavior, Program in Applied and Computational Mathematics Princeton University fmeyer@colorado.edu Greg J. Stephens Center for the Study of Brain, Mind and Behavior, Department of Physics Princeton University gstephen@princeton.edu Both authors contributed equally to this work. Abstract Functional Magnetic Resonance Imaging (fMRI) provides dynamical access into the complex functioning of the human brain, detailing the hemodynamic activity of thousands of voxels during hundreds of sequential time points. One approach towards illuminating the connection between fMRI and cognitive function is through decoding; how do the time series of voxel activities combine to provide information about internal and external experience? Here we seek models of fMRI decoding which are balanced between the simplicity of their interpretation and the effectiveness of their prediction. We use signals from a subject immersed in virtual reality to compare global and local methods of prediction applying both linear and nonlinear techniques of dimensionality reduction. We find that the prediction of complex stimuli is remarkably low-dimensional, saturating with less than 100 features. In particular, we build effective models based on the decorrelated components of cognitive activity in the classically-defined Brodmann areas. For some of the stimuli, the top predictive areas were surprisingly transparent, including Wernicke’s area for verbal instructions, visual cortex for facial and body features, and visual-temporal regions for velocity. Direct sensory experience resulted in the most robust predictions, with the highest correlation (c ∼0.8) between the predicted and experienced time series of verbal instructions. Techniques based on non-linear dimensionality reduction (Laplacian eigenmaps) performed similarly. The interpretability and relative simplicity of our approach provides a conceptual basis upon which to build more sophisticated techniques for fMRI decoding and offers a window into cognitive function during dynamic, natural experience. 1 Introduction Functional Magnetic Resonance Imaging (fMRI) is a non-invasive imaging technique that can quantify changes in cerebral venous oxygen concentration. Changes in the fMRI signal that occur during brain activation are very small (1-5%) and are often contaminated by noise (created by the imaging system hardware or physiological processes). Statistical techniques that handle the stochastic nature of the data are commonly used for the detection of activated voxels. Traditional methods of analysis – which are designed to test the hypothesis that a simple cognitive or sensory stimulus creates changes in a specific brain area – are unable to analyze fMRI datasets collected in “natural stimuli” where the subjects are bombarded with a multitude of uncontrolled stimuli that cannot always be quantified [1, 2]. The Experience Based Cognition competition (EBC) [3] offers an opportunity to study complex responses to natural environments, and to test new ideas and new methods for the analysis of fMRI collected in natural environments. The EBC competition provides fMRI data of three human subjects in three 20-minute segments (704 scanned samples in each segment) in an urban virtual reality environment along with quantitative time series of natural stimuli or features (25 in total) ranging from objective features such as the presence of faces to self-reported, subjective cognitive states such as the experience of fear. During each session, subjects were audibly instructed to complete three search tasks in the environment: looking for weapons (but not tools) taking pictures of people with piercings (but not others), or picking up fruits (but not vegetables). The data was collected with a 3T EPI scanner and typically consists of the activity of 35000 volume elements (voxels) within the head. The feature time series was provided for only the first two segments (1408 time samples) and competitive entries are judged on their ability to predict the feature on the third segment (704 time samples, see Fig. 1). At a microscopic level, a large number of internal variables associated ? t j T t t j t i 0t Tl kf(t) t i t 0 Figure 1: We study the variation of the set of features fk(t), k = 1, · · · , K as a function of the dynamical changes in the fMRI signal X(t) = [x1(t), · · · , xN(t)] during natural experience. The features represent both external stimuli such as the presence of faces and internal emotional states encountered during the exploration of a virtual urban environment (left and right images). We predict the feature functions fk for t = Tl+1, · · · T, from the knowledge of the entire fMRI dataset X, and the partial knowledge of fk(t) for t = 1, · · · , Tl. The “toy” activation patterns (middle diagram) illustrate the changes in “brain states” occurring as a function of time. with various physical and physiological phenomena contribute to the dynamic changes in the fMRI signal. Because the fMRI signal is a large scale (as compared to the scale of neurons) measurement of neuronal activity, we expect that many of these variables will be coupled resulting in a low dimensional set for all possible configurations of the activated fMRI signal. In this work we seek a low dimensional representation of the entire fMRI dataset that provides a new set of ‘voxel-free” coordinates to study cognitive and sensory features. We denote a three-dimensional volumes of fMRI composed of a total of N voxels by X(t) = [x1(t), · · · , xN(t)]. We have access to T such volumes. We can stack the spatio-temporal fMRI dataset into a N × T matrix, X =   x1(1) · · · x1(T) ... ... ... xN(1) · · · xN(T)  , (1) where each row n represents a time series xn generated from voxel n and each column j represents a scan acquired at time tj. We call the set of features to be predicted fk, k = 1, , · · · , K. We are interested in studying the variation of the set of features fk(t), k = 1, · · · , K describing the subject experience as a function of the dynamical changes of the brain, as measured by X(t). Formally, we need to build predictions of fk(t) for t = Tl+1, · · · T, from the knowledge of the entire fMRI dataset X, and the partial knowledge of fk(t) for the training time samples t = 1, · · · , Tl (see Fig. 1). D t t t φ j 0t φ i Figure 2: Low-dimensional parametrization of the set of “brain states”. The parametrization is constructed from the samples provided by the fMRI data at different times, and in different states. 2 A voxel-free parametrization of brain states We use here the global information provided by the dynamical evolution of X(t) over time, both during the training times and the test times. We would like to effectively replace each fMRI dataset X(t) by a small set of features that facilitates the identification of the brain states, and make the prediction of the features easier. Formally, our goal is to construct a map φ from the voxel space to low dimensional space. φ : RN 7→D ⊂RL (2) X(t) = [x1(t), · · · , xN(t)]T 7→(y1(t), · · · , yL(t)), (3) where L ≪N. As t varies over the training and the test sets, we hope that we explore most of the possible brain configurations that are useful for predicting the features. The map φ provides a parametrization of the brain states. Figure 2 provides a pictorial rendition of the map φ. The range D, represented in Fig. 2 as a smooth surface, is the set of parameters y1, · · · , yL that characterize the brain dynamics. Different values of the parameters produce different “brain states”, associated with different patterns of activation. Note that time does not play any role on D, and neighboring points on D correspond to similar brain states. Equipped with this re-parametrization of the dataset X, the goal is to learn the evolution of the feature time series as a function of the new coordinates [y1(t), · · · , yL(t)]T . Each feature function is an implicit function of the brain state measured by [y1(t), · · · , yL(t)]. For a given feature fk, the training data provide us with samples of fk at certain locations in D. The map φ is build by globally computing a new parametrization of the set {X(1), · · · , X(T)}. This parametrization is built into two stages. First, we construct a graph that is a proxy for the entire set of fMRI data {X(1), · · · , X(T)}. Second, we compute some eigenfunctions φk defined on the graph. Each eigenfunctions provides one specific coordinate for each node of the graph. 2.1 The graph of brain states We represent the fMRI dataset for the training times and test times by a graph. Each vertex i corresponds to a time sample ti, and we compute the distance between two vertices i and j by measuring a distance between X(ti) and X(tj). Global changes in the signal due to residual head motion, or global blood flow changes were removed by computing a a principal components analysis (PCA) of the dataset X and removing a small number components. We then used the l2 distance between the fMRI volumes (unrolled as N ×1 vectors). This distance compares all the voxels (white and gray matter, as well as CSF) inside the brain. 2.2 Embedding of the dataset Once the network of connected brain states is created, we need a distance to distinguish between strongly connected states (the two fMRI data are in the same cognitive state) and weakly connected states (the fMRI data are similar, but do not correspond to the same brain states). The Euclidean distance used to construct the graph is only useful locally: we can use it to compare brain states that are very similar, but is unfortunately very sensitive to short-circuits created by the noise in the data. A standard alternative to the geodesic (shortest distance) is provided by the average commute time, κ(i, j), that quantifies the expected path length between i and j for a random walk started at i. Formally, κ(i, j) = H(j, i) + H(i, j), where H(i, j) is the hitting time, H(i, j) = Ei[Tj] with Tj = min{n ≥0; Zn = j}, for a random walk Zn on the graph with transition probability P, defined by Pi,j = wi,j/di, and di = Di,i = P j wi,j is the degree of the vertex i. The commute time can be conveniently computed from the eigenfunctions φ1, · · · , φN of N = D 1 2 PD−1 2 , with the eigenvalues −1 ≤λN · · · ≤λ2 < λ1 = 1. Indeed, we have κ(i, j) = N X k=2 1 1 −λk φk(i) √di −φk(j) p dj !2 . As proposed in [4, 5, 6], we define an embedding i 7→Ik(i) = 1 1 −λk φk(i) √di , k = 2, · · · , N (4) Because −1 ≤λN · · · ≤λ2 < λ1 = 1, we have 1 √1−λ2 > 1 √1−λ3 > · · · 1 √1−λN . We can therefore neglect φk(j) √1−λk for large k, and reduce the dimensionality of the embedding by using only the first K coordinates in (4). The spectral gap measures the difference between the first two eigenvalues, λ1 −λ2 = 1 −λ2. A large spectral gap indicates that the low dimensional will provide a good approximation. The algorithm for the construction of the embedding is summarized in Fig. 3. Algorithm 1: Construction of the embedding Input: – X(t), t = 1, · · · , T, K: number of eigenfunctions. Algorithm: 1. construct the graph defined by the nn nearest neighbors 2. find the first K eigenfunctions, φk, of N • Output: For ti = 1 : T – new co-ordinates of X(ti): yk(ti) = 1 √πi φk(i) √1−λk k = 2, · · · , K + 1 Figure 3: Construction of the embedding A parameter of the embedding (Fig. 3) is K, the number of coordinates. K can be optimized by minimizing the prediction error. We expect that for small values of K the embedding will not describe the data with enough precision, and the prediction will be inaccurate. If K is too large, some of the new coordinates will be describing the noise in the dataset, and the algorithm will overfit the training data. Fig. 4-(a) illustrates the effect of K on the performance of the nonlinear dimension reduction. The quality of the prediction for the features: faces, instruction and velocity is plotted against K. Instructions elicits a strong response in the auditory cortex that can be decoded with as few as 20 coordinates. Faces requires more (about 50) dimensions to become optimal. As expected the performance eventually drops when additional coordinates are used to describe variability that is not related to the features to be decoded. This confirms our hypothesis that we can replace about 15,000 voxels with 50 appropriately chosen coordinates. 2.3 Semi-supervised learning of the features The problem of predicting a feature fk at an unknown time tu is formulated as kernel ridge regression problem. The training set {fk(t) for t = 1, · · · , Tl} is used to estimate the optimal choice of weights in the following model, ˆf(tu) = Tl X t=1 ˆα(t)K(y(tu), y(t)), where K is a kernel and tu is a time point where we need to predict. 2.4 Results We compared the nonlinear embedding approach (referred to as global Laplacian) to dimension reduction obtained with a PCA of X. Here the principal components are principal volumes, and for each time t we can expand X(t) onto the principal components. The 1408 training data were divided into two subsets of 704 time samples. We use fk(t) in a subset to predict fk(t) in the other subset. In order to quantify the stability of the prediction we randomly selected 85 % of the training set (first subset), and predicted 85 % of the testing set (other subset). The role, training or testing, of each subset of 704 time samples was also chosen randomly. We generated 20 experiments for each value of K, the number of predictors. The performance was quantified with the normalized correlation between the model prediction and the real value of fk, r = ⟨δf est k (t), δfk(t)⟩/ q ⟨δ(f est k )2⟩⟨δf 2 k⟩, (5) where δfk = fk(t)−⟨fk⟩. Finally, r was averaged over the 20 experiments. Fig. 4-(a) and (b) show the performance of the nonlinear method and linear method as a function of K. The approach based on the nonlinear embedding yields very stable results, with low variance. For both global methods the optimal performance is reached with less than 50 coordinates. Fig. 5 shows the correlation coefficients for 11 features, using K = 33 coordinates. For most features, the nonlinear embedding performed better than global PCA. 3 From global to local While models based on global features leverage predictive components from across the brain, cognitive function is often localized within specific regions. Here we explore whether simple models based on classical Brodmann regions provide an effective decoder of natural experience. The Brodmann areas were defined almost a century ago (see e.g [7]) and divide the cortex into approximately 50 regions, based on the structure and arrangement of neurons within each region. While the areas are characterized structurally many also have distinct functional roles and we use these roles to provide useful interpretations of our predictive models. Though the partitioning of cortical regions remains an open and challenging problem, the Brodmann areas represent a transparent compromise between dimensionality, function and structure. Using data supplied by the competition, we warp each brain into standard Talairach coordinates and locate the Brodmann area corresponding to each voxel. Within each Brodmann region, differing in size from tens to thousands of elements, we build the covariance matrix of voxel time series using all three virtual reality episodes. We then project the voxel time series onto the eigenvectors of the covariance matrix (principal components) and build a simple, linear stimulus decoding model using the top n modes ranked by their eigenvalues, f est k (t) = n X i=1 wk i mk i (t). (6) where k indexes the different Brodmann areas, {wk i } are the linear weights and {mk i (t)} are the mode time series in each region. The weights are chosen to minimize the RMS error on the training set and have a particularly simple form here as the modes are decorrelated, wk i = ⟨S(t)mk i (t)⟩. Performance is measured as the normalized correlation r (Eq. 5) between the model prediction and 1 60 1 200 local eigenmodes global eigenmodes 〈r〉 0.9 0 Best Area (faces) (c) (b) 0 0.9 30 100 faces instructions velocity Brodmann37 Brodmann19 Brodmann21 (d) 〈r〉 local eigenmodes 1 60 30 1 48 faces instructions velocity 1 200 100 0 〈r〉 0.9 (a) global Laplacian faces instructions velocity Figure 4: Performance of the prediction of natural experience for three features, faces, instructions and velocity as a function of the model dimension. (a) nonlinear embedding, (b) global principal components, (c) local (Brodmann area) principal components. In all cases we find that the prediction is remarkably low-dimensional, saturating with less than 100 features. (d) stability and interpretability of the optimal Brodmann areas used for decoding the presence of faces. All three areas are functionally associated with visual processing. Brodmann area 22 (Wernicke’s area) is the best predictor of instructions (not shown). The connections between anatomy, function and prediction add an important measure of interpretability to our decoding models. the real stimulus averaged over the two virtual reality episodes and we use the region with the lowest training error to make the prediction. In principle, we could use a large number of modes to make a prediction with n limited only by the number of training samples. In practice the predictive power of our linear model saturates for a remarkably low number of modes in each region. In Fig 4(c) we demonstrate the performance of the model on the number of local modes for three stimuli that are predicted rather well (faces, instructions and velocity). For many of the well-predicted stimuli, the best Brodmann areas were also stable across subjects and episodes offering important interpretability. For example, in the prediction of instructions (which the subjects received through headphones), the top region was Brodmann Area 22, Wernicke’s area, which has long been associated with the processing of human language. For the prediction of the face stimulus the best region was usually visual cortex (Brodmann Areas 17 and 19) and for the prediction of velocity it was Brodmann Area 7, known to be important for the coordination of visual and motor activity. Using modes derived from Laplacian eigenmaps we were also able to predict an emotional state, the self-reporting of fear and anxiety. Interestingly, in this case the best predictions came from higher cognitive areas in frontal cortex, Brodmann Area 11. While the above discussion highlights the usefulness of classical anatomical location, many aspects of cognitive experience are not likely to be so simple. Given the reasonable results above it’s natural arousal body dog interior/ exterior faces fearful/ anxious fruits/ veggie hits instructions weapons/ tools velocity 0.9 0 〈r〉 global eigenbrain global laplacian local eigenbrain Figure 5: Performance of the prediction of natural experience for eleven features, using three different methods. Local decoders do well on stimuli related to objects while nonlinear global methods better capture stimuli related to emotion. to look for ways of combining the intuition derived from single classical location with more global methods that are likely to do better in prediction. As a step in this direction, we modify our model to include multiple Brodmann areas f est k (t) = X l∈A n X i=1 wl iml i(t), (7) where A represents a collection of areas. To make a prediction using the modified model we find the top three Brodmann areas as before (ranked by their training correlation with the stimulus) and then incorporate all of the modes in these areas (nA in total) in the linear model of Eq 7. The weights {wl i} are chosen to minimize RMS error on the training data. The combined model leverages both the interpretive power of single areas and also some of the interactions between them. The results of this combined predictor are shown in Fig. 5 (black) and are generally significantly better than the single region predictions. For ease of comparison, we also show the best global results (both nonlinear Laplacian and global principal components). For many (but not all) of the stimuli, the local, low-dimensional linear model is significantly better than both linear and nonlinear global methods. 4 Discussion Incorporating the knowledge of functional, cortical regions, we used fMRI to build low-dimensional models of natural experience that performed surprisingly well at predicting many of the complex stimuli in the EBC competition. In addition, the regional basis of our models allows for transparent cognitive interpretation, such as the emergence of Wernicke’s area for the prediction of auditory instructions in the virtual environment. Other well-predicted experiences include the presence of body parts and faces, both of which were decoded by areas in visual cortex. In future work, it will be interesting to examine whether there is a well-defined cognitive difference between stimuli that can be decoded with local brain function and those that appear to require more global techniques. We also learned in this work that nonlinear methods for embedding datasets, inspired by manifold learning methods [4, 5, 6], outperform linear techniques in their ability to capture the complex dynamics of fMRI. Finally, our particular use of Brodmann areas and linear methods represent only a first step towards combining prior knowledge of broad regional brain function with the construction of models for the decoding of natural experience. Despite the relative simplicity, an entry based on this approach scored within the top 5 of the EBC2007 competition [3]. Acknowledgments GJS was supported in part by National Institutes of Health Grant T32 MH065214 and by the Swartz Foundation. FGM was partially supported by the Center for the Study of Brain, Mind and Behavior, Princeton University. The authors are very grateful to all the members of the center for their support and insightful discussions. References [1] Y. Golland, S. Bentin, H. Gelbard, Y. Benjamini, R. Heller, and Y. Nir et al. Extrinsic and intrinsic systems in the posterior cortex of the human brain revealed during natural sensory stimulation. Cerebral Cortex, 17:766–777, 2007. [2] S. Malinen, Y. Hlushchuk, and R. Hari. Towards natural stimulation in fMRI–issues of data analysis. NeuroImage, 35:131–139, 2007. [3] http://www.ebc.pitt.edu. [4] M. Belkin and P. Niyogi. Laplacian eigenmaps for dimensionality reduction and data representation. Neural Computations, 15:1373–1396, 2003. [5] P. B´erard, G. Besson, and S. Gallot. Embeddings Riemannian manifolds by their heat kernel. Geometric and Functional Analysis, 4(4):373–398, 1994. [6] R.R. Coifman and S. Lafon. Diffusion maps. Applied and Computational Harmonic Analysis, 21:5–30, 2006. [7] E.R. Kandel, J.H. Schwartz, and T.M. Jessell. Principles of Neural Science. McGraw-Hill, New York, 2000.
2007
110
3,138
Configuration Estimates Improve Pedestrian Finding Duan Tran∗ U.Illinois at Urbana-Champaign Urbana, IL 61801 USA ddtran2@uiuc.edu D.A. Forsyth U.Illinois at Urbana-Champaign Urbana, IL 61801 USA daf@uiuc.edu Abstract Fair discriminative pedestrian finders are now available. In fact, these pedestrian finders make most errors on pedestrians in configurations that are uncommon in the training data, for example, mounting a bicycle. This is undesirable. However, the human configuration can itself be estimated discriminatively using structure learning. We demonstrate a pedestrian finder which first finds the most likely human pose in the window using a discriminative procedure trained with structure learning on a small dataset. We then present features (local histogram of oriented gradient and local PCA of gradient) based on that configuration to an SVM classifier. We show, using the INRIA Person dataset, that estimates of configuration significantly improve the accuracy of a discriminative pedestrian finder. 1 Introduction Very accurate pedestrian detectors are an important technical goal; approximately half-a-million pedestrians are killed by cars each year (1997 figures, in [1]). At relatively low resolution, pedestrians tend to have a characteristic appearance. Generally, one must cope with lateral or frontal views of a walk. In these cases, one will see either a “lollipop” shape — the torso is wider than the legs, which are together in the stance phase of the walk — or a “scissor” shape — where the legs are swinging in the walk. This encourages the use of template matching. Early template matchers include: support vector machines applied to a wavelet expansion ([2], and variants described in [3]); a neural network applied to stereoscopic reconstructions [4]; chamfer matching to a hierachy of contour templates [5]; a likelihood threshold applied to a random field model [6]; an SVM applied to spatial wavelets stacked over four frames to give dynamical cues [3]; a cascade architecture applied to spatial averages of temporal differences [7]; and a temporal version of chamfer matching to a hierachy of contour templates [8]. By far one of the most successful static template matcher is due to Dalal and Triggs [9]. Their method is based on a comprehensive study of features and their effects on performance for the pedestrian detection problem. The method that performs best involves a histogram of oriented gradient responses (a HOG descriptor). This is a variant of Lowe’s SIFT feature [10]. Each window is decomposed into overlapping blocks (large spatial domains) of cells (smaller spatial domains).In each block, a histogram of gradient directions (or edge orientations) is computed for each cell with a measure of histogram “energy”. These cell histograms are concatenated into block histograms followed by normalization which obtains a modicum of illumination invariance. The detection window is tiled with an overlapping grid. Within each block HOG descriptors are computed, and the ∗We would like to thank Alexander Sorokin for his providing the annotation software and Pietro Perona for insightful comments. This work was supported by Vietname Education Foundation as well as in part by the National Science Foundation under IIS - 0534837 and in part by the Office of Naval Research under N00014-01-1-0890 as part of the MURI program. Any opinions, findings and conclusions or recommendations expressed in this material are those of the author(s) and do not necessarily reflect those of the National Science Foundation or the Office of Naval Research. resulting feature vector is presented to an SVM. Dalal and Triggs show this method produces no errors on the 709 image MIT dataset of [2]; they describe an expanded dataset of 1805 images. Furthermore, they compare HOG descriptors with the original method of Papageorgiou and Poggio [2]; with an extended version of the Haar wavelets of Mohan et al. [11]; with the PCA-Sift of Ke and Sukthankar ([12]; see also [13]); and with the shape contexts of Belongie et al. [14]. The HOG descriptors outperform all other methods. Recently, Sabzmeydani and Mori [15] reported improved results by using AdaBoost to select shapelet features (triplets of location, direction and strength of local average gradient responses in different directions). A key difficulty with pedestrian detection is that detectors must work on human configurations not often seen in datasets. For systems to be useful, they cannot fail even on configurations that are very uncommon — it is not acceptable to run people over when they stand on their hands. There is some evidence (figure 1) that less common configurations present real difficulties for very good current pedestrian detectors (our reimplementation of Dalal and Triggs’ work [9]). Figure 1. Configuration estimates result in our method producing fewer false negatives than our implementation of Dalal and Triggs does. The figure shows typical images which are incorrectly classified by our implementation of Dalal and Triggs, but correctly classified when a configuration estimate is attached. We conjecture that a configuration estimate can avoid problems with occlusion or contrast failure because the configuration estimate reduces noise and the detector can use lower detection thresholds. 1.1 Configuration and Parts Detecting pedestrians with templates most likely works because pedestrians appear in a relatively limited range of configurations and views (e.g. “Our HOG detectors cue mainly on silhouette contours (especially the head, shoulders and feet)” [9], p.893). It appears certain that using the architecture of constructing features for whole image windows and then throwing the result into a classifier could be used to build a person-finder for arbitrary configurations and arbitrary views only with a major engineering effort. The set of examples required would be spectacularly large, for example. This is unattractive, because this set of examples implicitly encodes a set of facts that are relatively easy to make explicit. In particular, people are made of body segments which individually have a quite simple structure, and these segments are connected into a kinematic structure which is quite well understood. All this suggests finding people by finding the parts and then reasoning about their layout — essentially, building templates with complex internal kinematics. The core idea is very old (see the review in [16]) but the details are hard to get right and important novel formulations are a regular feature of the current research literature. Simply identifying the body parts can be hard. Discriminative approaches use classifiers to detect parts, then reason about configuration [11]. Generative approaches compare predictions of part appearance with the image; one can use a tree structured configuration model [17], or an arbitrary graph [18]. If one has a video sequence, part appearance can itself be learned [19, 20]; more recently, Ramanan has shown knowledge of articulation properties gives an appearance model in a single image [21]. Mixed approaches use a discriminative model to identify parts, then a generative model to construct and evaluate assemblies [22, 23, 24]. Codebook approaches avoid explicitly modelling body segments, and instead use unsupervised methods to find part decompositions that are good for recognition (rather than disarticulation) [25]. Our pedestrian detection strategy consists of two steps: first, for each window, we estimate the configuration of the best person available in that window; second, we extract features for that window conditioned on the configuration estimate, and pass these features to a support vector machine classifier, which makes the final decision on the window. Figure 2. This figure is best viewed in color. Our model of human layout is parametrized by seven vertices, shown on an example on the far left. The root is at the hip; the arrows give the direction of conditional dependence. Given a set of features, the extremal model can be identified by dynamic programming on point locations. We compute segment features by placing a box around some vertices (as in the head), or pairs of vertices (as in the torso and leg). Histogram features are then computed for base points referred to the box coordinate frame; the histogram is shifted by the orientation of the box axis (section 3) within the rectified box. On the far right, a window showing the color key for our structure learning points; dark green is a foot, green a knee, dark purple the other foot, purple the other knee, etc. Note that structure learning is capable of finding distinction of left legs (green points) and right legs (pink points). On the center right, examples of configurations estimated by our configuration estimator after 20 rounds of structure learning to estimate W. 2 Configuration Estimation and Structure Learning We are presented with a window within which may lie a pedestrian. We would like to be able to estimate the most likely configuration for any pedestrian present. Our research hypothesis is that this estimate will improve pedestrian detector perfomance by reducing the amount of noise the final detector must cope with — essentially, the segmentation of the pedestrian is improved from a window to a (rectified) figure. We follow convention (established by [26]) and model the configuration of a person as a tree model of segments (figure 2), with a score of segment quality and a score of segment-segment configuration. We ignore arms because they are small and difficult to localize. Our configuration estimation procedure will use dynamic programming to extract the best configuration estimate from a set of scores depending on the location of vertices on the body model. However, we do not know which features are most effective at estimating segment location; this is a well established difficulty in the literature [16]. Structure learning is a method that uses a series of correct examples to estimate appropriate weightings of features relative to one another to produce a score that is effective at estimating configuration [27, 28]. We will write the image as I; coordinates in the image as x; the coordinates of an estimated configuration as y (which is a stack of 7 point coordinates); the score for this configuration as WT f(I, x; y) (which is a linear combination of a collection of scores, each of which depends on the configuration and the image). For a given image I0 and known W and f, the best configuration estimate is arg max y∈y(I0) WT f(I0, x; y) and this can be found with dynamic programming for appropriate choice of f and y(I0). There is a variety of sensible choices of features for identifying body segments, but there is little evidence that a particular choice of features is best; different choices of W may lead to quite different behaviours. In particular, we will collect a wide range of features likely to identify segments well in f, and wish to learn a choice of W that will give good configuration estimates. We choose a loss function L(yt, yp) that gives the cost of predicting yp when the correct answer is yt. Write the set of n examples as E, and yp,i as the prediction for the i’th example. Structure learning must now estimate a W to minimize the hinge loss as in [29] 1 2 ||W || 2 + 1 n X i∈examples βiξi subject to the constraints ∀i ∈E, WT f(Ii, x; yt,i) + ξi ≥ max yp,i∈y(Ii)(WT (Ii, x; yp,i) + L(yt,i, yp,i)) At the minimum, the slack variables ξi happen at the equality of the constraints. Therefore, we can move the constraints to the objective function, which is: 1 2 ||W || 2 + 1 n X i∈examples βi( max yp,i∈y(Ii)(WT (Ii, x; yp,i) + L(yt,i, yp,i)) −WT f(Ii, x; yt,i)) Notice that this function is convex, but not differentiable. We follow Ratliff et al. [29], and use the subgradient method (see [30]) to minimize. In this case, the derivative of the cost function at an extremal yp,i is a subgradient (but not a gradient, because the cost function is not differentiable everywhere). 3 Features There are two sets of features: first, those used for estimating configuration of a person from a window; and second, those used to determine whether a person is present conditioned on the best estimate of configuration. 3.1 Features for Estimating Configuration We use a tree structured model, given in figure 2. The tree is given by the position of seven points, and encodes the head, torso and legs; arms are excluded because they are small and difficult to identify, and pedestrians can be identified without localizing arms. The tree is rooted at hips, and the arrows give the direction of conditional dependence. We assume that torso, leftleg, rightleg are conditionally independent given the root (at the hip). The feature vector f(I, x; y) contains two types of feature: appearance features encode the appearance of putative segments; and geometric features encode relative and absolute configuration of the body segments. Each geometric feature depends on at most three point positions. We use three types of feature. First, the length of a segment, represented as a 15-dimensional binary vector whose elements encode whether the segment is longer than each of a set of test segments. Second, the cosine of the angle between a segment and the vertical axis. Third, the cosine of the angle between pairs of adjoining segments (except at the lower torso, for complexity reasons); this allows the structure learning method to prefer straight backs, and reasonable knees. Appearance features are computed for rectangles constructed from pairs of points adjacent in the tree. For each rectangle, we compute Histogram of Oriented Gradient (HOG) features, after [9]. These features have a strong record in pedestrian detection, because they can detect the patterns of orientation associated with characteristic segment outlines (typically, strong vertical orientations in the frame of the segment for torso and legs; strong horizontal orientations at the shoulders and head). However, histograms involve spatial pooling; this means that one can have many strong vertical orientations that do not join up to form a segment boundary. This effect means that HOG features alone are not particularly effective at estimating configuration. To counter this effect, we use the local gradient features described by Ke and Sukthankar [12]. To form these features, we concatenate the horizontal and vertical gradients of the patches in the segment coordinate frame, then normalize and apply PCA to reduce the number of dimensions. Since we want to model the appearance, we do not align the orientation to a canonical orientation as in PCA-SIFT. This feature reveals whether the pattern of a body part appears at that location. The PCA space for each body part is constructed from 500 annotated positive examples. 3.2 Features for Detection Once the best configuration has been obtained for a window, we must determine whether a person is present or not. We do this with a support vector machine. Generally, the features that determine configuration should also be good for determining whether a person is present or not. However, a set of HOG features for the whole image window has been shown to be good at pedestrian detection [9]. The support vector machine should be able to distinguish between good and bad features, so it is natural to concatenate the configuration features described above with a set of HOG features. We find it helpful to reduce the dimension of the set of HOG features to 500, using principal components. We find that these whole window features help recover from incorrect structure predictions. These combined features are used in training the SVM classifier and in detection as well. 4 Results Dataset: We use INRIA Person, consisting of 2416 pedestrian images (1208 images with their leftright reflections) and 1218 background images for training. For testing, there are 1126 pedestrian images (563 images with their left-right reflections) and 453 background images. Training structure learning: we manually annotate 500 selected pedestrian images in the training set examples. We use all 500 annotated examples to build the PCA spaces for each body segment. In training, each example is learned to update the weight vector. The order of selecting examples in each round is randomly drawn based on the differences of their scores on the predictions and their scores on the true targets. For each round, we choose 300 examples drawn (since structure learning is expensive). We have trained the structure learning on 10 rounds and 20 rounds for comparisons. Quality of configuration estimates: Configuration estimates look good (figure 2). A persistent nuisance associated with pictorial structure models of people is the tendency of such models to place legs on top of one another. This occurs if one uses only appearance and relative geometric features. However, our results suggest that if one uses absolute configuration features as well as different appearance features for left and right legs (implicit in the structure learning procedure), the left and right legs are identified correctly. The conditional independence assumption (which means we cannot use the angle between the legs as a feature) does not appear to cause problems, perhaps because absolute configuration features are sufficient. Bootstrapping the SVM: The final SVM is bootstrapped, as in [9]. We use 2146 pedestrian images with 2756 window images extracted from 1218 background images. We apply the learned structure model to generate on these 2416 positive examples and 2756 negative examples to train the initial SVM classifier. We then use this classifier to scan over 1218 background images with step side of 32 pixels and find hard examples (including false positives and true negatives of low confidence by using LibSVM [31] with probability option). These negatives yield a bootstrap training set for the final SVM classifier. This bootstrap learning helps to reduce the false alarm significantly. Testing: We test on 1126 positive images and scan 64x128 image windows over 453 negative test images, stepping by 16 pixels, a total of 182, 934 negative windows. Scanning rate and comparison: Pedestrian detection systems work by scanning image windows, and presenting each window to a detector. Dalal and Triggs established a methodology for evaluating pedestrian detectors, which is now quite widely used. Their dataset offers a set of positive windows (where pedestrians are centered), and a set of negative images. The negative images produce a pool of negative windows, and the detector is evaluated on detect rate on the positive windows and the false positive per window (FPPW) rate on the negative windows. This strategy — which evaluates the detector, rather than the combination of detection and scanning — is appropriate for comparing systems that scan image windows at approximately the same high rate. Current systems do so, because the detectors require nearly centered pedestrians. However, the important practical parameter for evaluating a system is the false positive per image (FPPI) rate. If one has a detector that does not require a pedestrian to be centered in the image window, then one can obtain the same detect rate while scanning fewer image windows. In turn, the FPPI rate will go down even if the FPPW rate is fixed. To date, this issue has not arisen, because pedestrian detectors have required pedestrians to be centered. Figure 3. Left: a comparison of our method with the best detector of Dalal and Triggs, and the detector of Sabzmaydani and Mori, on the basis of FPPW rate. This comparison ignores the fact that we can look at fewer image windows without loss of system sensitivity. We show ROC’s for a configuration estimator trained on 10 (blue) and 20 (red) rounds of structure learning. With 20 rounds of structure learning, our detector easily outperforms that of Dalal and Triggs. Note that at high specificity, our detector is slightly more sensitive than that of Sabzmaydani and Mori, too. Right: a comparison of our method with the best detector of Dalal and Triggs, and the detector of Sabzmaydani and Mori, on the basis of FPPI rate. This comparison takes into account the fact that we can look at fewer image windows (by a factor of four). However, scanning by larger steps might cause a loss of sensitivity. We test this with a procedure of replicating positive examples, described in the text, and show the results of four runs. The low variance in the detect rate under this procedure shows that our detector is highly insensitive to the configuration of the pedestrian within a window. If one evaluates on the basis of false positives per image — which is likely the most important practical parameter — our system easily outperforms the state of the art. 4.1 The Effect of Configuration Estimates Figure 3 compares our detector with that of Dalal and Triggs, and of Sabzmeydani and Mori on the basis of detect and FPPW rates. We plot detect rate against FPPW rate for the three detectors. For this plot, note that at low FPPW rate our method is somewhat more sensitive than that of Sabzmeydani and Mori, but has no advantage at higher FPPW rates. However, this does not tell the whole story. We scan images at steps of 16 pixels (rather than 8 pixels for Dalal and Triggs and Sabzmeydani and Mori). This means that we scan four times fewer windows than they do. If we can establish that the detect rate is not significantly affected by big offsets in pedestrian position, then we expect a large advantage in FPPI rate. We evaluate the effect on the detect rate of scanning by large steps by a process of sampling. Each positive example is replaced by a total of 256 replicates, obtained by offsetting the image window by steps in the range -7 to 8 in x and y (figure 4). We now conduct multiple evaluation runs. For each, we select one replicate of each positive example uniformly at random. For each run, we evaluate the detect rate. A tendency of the detector to require centered pedestrians would appear as variance in the reported detect rate. The FPPI rate of the detector is not affected by this procedure, which evaluates only the spatial tuning of the detector. Figure 4. In color, original positive examples from the INRIA test set; next to each, are three of the replicates we use to determine the effect on our detection system of scanning relatively few windows, or, equivalently, the effect on our detector of not having a pedestrian centered in the window. See section 4.1, and figure 3. Figure 3 compares system performance, combining detect and scanning rates, by plotting detect rate against FPPI rate. We show four evaluation runs for our system; there is no evidence of substantial variance in detect rate. Our system shows a very substantial increase in detect rate at fixed FPPI rate. 5 Discussion There is a difficulty with the evaluation methodology for pedestrian detection established by Dalal and Triggs (and widely followed). A pedestrian detector that tests windows cannot find more pedestrians than there are windows. This does not usually affect the interpretation of precision and recall statistics because the windows are closely packed. However, in our method, because a pedestrian need not be centered in the window to be detected, the windows need not be closely packed, and there is a possibility of undercounting pedestrians who stand too close together. We believe that this does not occur in our current method, because our window spacing is narrow relative to the width of a pedestrian. Part representations appear to be a natural approach to identifying people. However, to our knowledge, there is no clear evidence to date that shows compelling advantages to using such an approach (e.g. the review in [16]). We believe our method does so. Configuration estimates appear to have two important advantages. First, they result in a detector that is relatively insensitive to the placement of a pedestrian in an image window, meaning one can look at fewer image windows to obtain the same detect rate, with consequent advantages to the rate at which the system produces false positives. This is probably the dominant advantage. Second, configuration estimates appear to be a significant help at high specificity settings (notice that our method beats all others on the FPPW criterion at very low FPPW rates). This is most likely because the process of estimating configurations focuses the detector on important image features (rather than pooling information over space). The result would be that, when there is low contrast or a strange body configuration, the detector can use a somewhat lower detection threshold for the same FPPW rate. Figure 1 shows human configurations detected by our method but not by our implementation of Dalal and Triggs; notice the predominance of either strange body configurations or low contrast. Structure learning is an attractive method to determine which features are discriminative in configuration estimation, and it produces good configuration estimates in complex images. Future work will include: tying W components for legs; evaluating arm detection; and formulating strategies to employ structure learning for detecting other objects. References [1] D.M. Gavrila. Sensor-based pedestrian protection. Intelligent Transportation Systems, pages 77–81, 2001. [2] C. Papageorgiou and T. Poggio. A trainable system for object detection. Int. J. Computer Vision, 38(1):15– 33, June 2000. [3] C.P. Papageorgiou and T. Poggio. A pattern classification approach to dynamical object detection. In Int. Conf. on Computer Vision, pages 1223–1228, 1999. [4] L. Zhao and C.E. Thorpe. Stereo- and neural network-based pedestrian detection. Intelligent Transportation Systems, 1(3):148–154, September 2000. [5] D. Gavrila. Pedestrian detection from a moving vehicle. In European Conference on Computer Vision, pages II: 37–49, 2000. [6] Y. Wu, T. Yu, and G. Hua. A statistical field model for pedestrian detection. In IEEE Conf. on Computer Vision and Pattern Recognition, pages I: 1023–1030, 2005. [7] P. Viola, M.J. Jones, and D. Snow. Detecting pedestrians using patterns of motion and appearance. Int. J. Computer Vision, 63(2):153–161, July 2005. [8] M. Dimitrijevic, V. Lepetit, and P. Fua. Human body pose recognition using spatio-temporal templates. In ICCV workshop on Modeling People and Human Interaction, 2005. [9] N. Dalal and B. Triggs. Histograms of oriented gradients for human detection. In IEEE Conf. on Computer Vision and Pattern Recognition, pages I: 886–893, 2005. [10] D.G. Lowe. Distinctive image features from scale-invariant keypoints. Int. J. Computer Vision, 60(2):91– 110, November 2004. [11] A. Mohan, C.P. Papageorgiou, and T. Poggio. Example-based object detection in images by components. IEEE T. Pattern Analysis and Machine Intelligence, 23(4):349–361, April 2001. [12] Y. Ke and R. Sukthankar. Pca-sift: a more distinctive representation for local image descriptors. In IEEE Conf. on Computer Vision and Pattern Recognition, pages II: 506–513, 2004. [13] K. Mikolajczyk and C. Schmid. A performance evaluation of local descriptors. IEEE T. Pattern Analysis and Machine Intelligence, 2004. accepted. [14] Serge Belongie, Jitendra Malik, and Jan Puzicha. Shape matching and object recognition using shape contexts. IEEE T. Pattern Analysis and Machine Intelligence, 24(4):509–522, 2002. [15] P. Sabzmeydani and G. Mori. Detecting pedestrians by learning shapelet features. In CVPR, 2007. [16] D.A. Forsyth, O.Arikan, L. Ikemoto, J. O’Brien, and D. Ramanan. Computational studies in human motion 1: Tracking and animation. Foundations and Trends in Computer Vision, 2006. In press. [17] P.F. Felzenszwalb and D.P. Huttenlocher. Pictorial structures for object recognition. Int. J. Computer Vision, 61(1):55–79, January 2005. [18] M. P. Kumar, P. H. S. Torr, and A. Zisserman. Extending pictorial structures for object recognition. In Proceedings of the British Machine Vision Conference, 2004. [19] Deva Ramanan, D.A. Forsyth, and A. Zisserman. Strike a pose: Tracking people by finding stylized poses. In IEEE Conf. on Computer Vision and Pattern Recognition, 2005. [20] D. Ramanan and D.A. Forsyth. Using temporal coherence to build models of animals. In Proc. ICCV, 2003. [21] D. Ramanan. Learning to parse images of articulated objects. In Proc. NIPS, 2006. [22] R. Ronfard, C. Schmid, and B. Triggs. Learning to parse pictures of people. In European Conference on Computer Vision, page IV: 700 ff., 2002. [23] K. Mikolajczyk, C. Schmid, and A. Zisserman. Human detection based on a probabilistic assembly of robust part detectors. In European Conference on Computer Vision, pages Vol I: 69–82, 2004. [24] A. Micilotta, E. Ong, and R. Bowden. Detection and tracking of humans by probabilistic body part assembly. In British Machine Vision Conference, volume 1, pages 429–438, 2005. [25] B. Leibe, E. Seemann, and B. Schiele. Pedestrian detection in crowded scenes. In IEEE Conf. on Computer Vision and Pattern Recognition, pages I: 878–885, 2005. [26] Pedro F. Felzenszwalb and Daniel P. Huttenlocher. Efficient matching of pictorial structures. In IEEE Conf. on Computer Vision and Pattern Recognition, 2000. [27] B. Taskar. Learning Structured Prediction Models: A Large Margin Approach. PhD thesis, Stanford University, 2004. [28] B. Taskar, S. Lacoste-Julien, and M. Jordan. Structured prediction via the extragradient method. In Neural Information Processing Systems Conference, 2005. [29] N. Ratliff, J. A. Bagnell, and M. Zinkevich. Subgradient methods for maximum margin structured learning. In ICML 2006 Workshop on Learning in Structured Output Spaces, 2006. [30] N.Z. Shor. Minimization Methods for Non-Differentiable Functions and Applications. 1985. [31] Chih-Chung Chang and Chih-Jen Lin. LIBSVM: a library for support vector machines, 2001.
2007
111
3,139
A General Boosting Method and its Application to Learning Ranking Functions for Web Search Zhaohui Zheng† Hongyuan Zha⋆Tong Zhang† Olivier Chapelle† Keke Chen† Gordon Sun† †Yahoo! Inc. 701 First Avene Sunnyvale, CA 94089 {zhaohui,tzhang,chap,kchen,gzsun}@yahoo-inc.com ⋆College of Computing Georgia Institute of Technology Atlanta, GA 30032 zha@cc.gatech.edu Abstract We present a general boosting method extending functional gradient boosting to optimize complex loss functions that are encountered in many machine learning problems. Our approach is based on optimization of quadratic upper bounds of the loss functions which allows us to present a rigorous convergence analysis of the algorithm. More importantly, this general framework enables us to use a standard regression base learner such as single regression tree for £tting any loss function. We illustrate an application of the proposed method in learning ranking functions for Web search by combining both preference data and labeled data for training. We present experimental results for Web search using data from a commercial search engine that show signi£cant improvements of our proposed methods over some existing methods. 1 Introduction There has been much interest in developing machine learning methods involving complex loss functions beyond those used in regression and classi£cation problems [13]. Many methods have been proposed dealing with a wide range of problems including ranking problems, learning conditional random £elds and other structured learning problems [1, 3, 4, 5, 6, 7, 11, 13]. In this paper we propose a boosting framework that can handle a wide variety of complex loss functions. The proposed method uses a regression black box to optimize a general loss function based on quadratic upper bounds, and it also allows us to present a rigorous convergence analysis of the method. Our approach extends the gradient boosting approach proposed in [8] but can handle substantially more complex loss functions arising from a variety of machine learning problems. As an interesting and important application of the general boosting framework we apply it to the problem of learning ranking functions for Web search. Speci£cally, we want to rank a set of documents according to their relevance to a given query. We adopt the following framework: we extract a set of features x for each query-document pair, and learn a function h(x) so that we can rank the documents using the values h(x), say x with larger h(x) values are ranked higher. We call such a function h(x) a ranking function. In Web search, we can identify two types of training data for learning a ranking function: 1) preference data indicating a document is more relevant than another with respect to a query [11, 12]; and 2) labeled data where documents are assigned ordinal labels representing degree of relevancy. In general, we will have both preference data and labeled data for 1 training a ranking function for Web search, leading to a complex loss function that can be handled by our proposed general boosting method which we now describe. 2 A General Boosting Method We consider the following general optimization problem: ˆh = arg min h∈H R(h), (1) where h denotes a prediction function which we are interested in learning from the data, H is a prechosen function class, and R(h) is a risk functional with respect to h. We consider the following form of the risk functional R: R(h) = 1 n n X i=1 φi(h(xi,1), · · · , h(xi,mi), yi), (2) where φi(h1, . . . , hmi, y) is a loss function with respect to the £rst mi arguments h1, . . . , hmi. For example, each function φi can be a single variable function (mi = 1) such as in regression: φi(h, y) = (h −y)2; or a two-variable function (mi = 2), such as those in ranking based on pairwise comparisons: φi(h1, h2, y) = max(0, 1−y(h1 −h2))2, where y ∈{±1} indicates whether h1 is preferred to h2 or not; or it can be a multi-variable function as used in some structured prediction problems: φi(h1, . . . , hmi, y) = supz δ(y, z) + ψ(h, z) −ψ(h, y), where δ is a loss function [13]. Assume we do not have a general solver for the optimization problem (1), but we have a learning algorithm A which we refer to as regression weak learner. Given any set of data points X = [x1, . . . , xk], with corresponding target values R = [r1, . . . , rk], weights W = [w1, . . . , wk], and tolerance ϵ > 0, the regression weak learner A produces a function ˆg = A(W, X, R, ϵ) ∈C such that k X j=1 wj(ˆg(xj) −rj)2 ≤min g∈C k X j=1 wj(g(xj) −rj)2 + ϵ. (3) Our goal is to use this weak learner A to solve the original optimization problem (1). Here H = span(C), i.e., h ∈H can be expressed as h(x) = P j ajhj(x) with hj ∈C. Friedman [8] proposed a solution when the loss function in (2) can be expressed as R(h) = n X i=1 φi(h(xi)), (4) which he named as gradient boosting. The idea is to estimate the gradient ∇φi(h(xi)) using regression at each step with uniform weighting, and update. However, there is no convergence proof. Following his work, we consider an extension that is more principly motivated, for which a convergence analysis can be obtained. We £rst rewrite (2) in the more general form: R(h) = R(h(x1), . . . , h(xN)), (5) where N ≤P mi.1 Note that R depends on h only through the function values h(xi) and from now on we identify the function h with the vector [h(xi)]. Also the function R is considered to be a function of N variables. Our main observation is that for twice differentiable risk functional R, at each tentative solution hk, we can expand R(h) around hk using Taylor expansion as R(hk + g) = R(hk) + ∇R(hk)T g + 1 2gT ∇2R(h′)g, where h′ lies between hk and hk + g. The right hand side is almost quadratic, and we can then replace it by a quadratic upper-bound R(hk + g) ≤Rk(g) = R(hk) + ∇R(hk)T g + 1 2gT Wg, (6) 1We consider that all xi are different, but some of the xi,mi in (2) might have been identical, hence the inequality. 2 where W is a diagonal matrix upper bounding the Hessian between hk and hk + g. If we de£ne rj = −[∇R(hk)]j/wj, then ∀g ∈C, P j wj(g(xj) −rj)2 is equal to the above quadratic form (up to a constant). So g can be found by calling the regression weak learner A. Since at each step we try to minimize an upper bound Rk of R, if we let the minimum be gk, it is clear that R(hk + gk) ≤Rk(gk) ≤R(hk). This means that by optimizing with respect to the problem Rk that can be handled by A, we also make progress with respect to optimizing R. The algorithm based on this idea is listed in Algorithm 1 for the loss function in (5). Convergence analysis of this algorithm can be established using the idea summarized above; see details in appendix. However, in partice, instead of the quadratic upper bound (which has a theoretical garantee easier to derive), one may also consider minimizing an approximation to the Taylor expansion, which would be closer to a Newton type method. Algorithm 1 Greedy Algorithm with Quadratic Approximation Input: X = [xℓ]ℓ=1,...,N let h0 = 0 for k = 0, 1, 2, . . . let W = [wℓ]ℓ=1,...,N, with either wℓ= ∂2R/∂hk(xℓ)2 or % Newton-type method with diagonal Hessian W global diagonal upper bound on the Hessian % Upper-bound minimization let R = [rℓ]ℓ=1,...,N, where rℓ= w−1 ℓ∂R/∂hk(xℓ) pick ϵk ≥0 let gk = A(W, X, R, ϵk) pick step-size sk ≥0, typically by line search on R let hk+1 = hk + skgk end The main conceptual difference between our view and that of Friedman is that he views regression as a “reasonable” approximation to the £rst order gradient ∇R, while our work views it as a natural consequence of second order approximation of the objective function (in which the quadratic term serve as an upper bound of the Hessian either locally or globally). This leads to algorithmic difference. In our approach, a good choice of the second order upper bound (leading to tighter bound) may require non-uniform weights W. This is inline with earlier boosting work in which samplereweighting was a central idea. In our framework, the reweighting naturally occurs when we choose a tight second order approximation. Different reweighting can affect the rate of convergence in our analysis. The other main difference with Friedman is that he only considered objective functions of the form (4); we propose a natural extension to the ones of the form (5). 3 Learning Ranking Functions We now apply Algorithm 1 to the problem of learning ranking functions. We use preference data as well as labeled data for training the ranking function. For preference data, we use x ≻y to mean that x is preferred over y or x should be ranked higher than y, where x and y are the feature vectors for corresponding items to be ranked. We denote the set of available preferences as S = {xi ≻ yi, i = 1, . . . , N}. In addition to the preference data, there are also labeled data, L = {(zi, li), i = 1, . . . , n}, where zi is the feature of an item and li is the corresponding numerically coded label.2 We formulate the ranking problem as computing a ranking function h ∈H, such that h satis£es as much as possible the set of preferences, i.e., h(xi) ≥h(yi), if xi ≻yi, i = 1, . . . , N, while at the same time h(zi) matches the label li in a sense to be detailed below. 2Some may argue that, absolute relevance judgments can also be converted to relative relevance judgments. For example, for a query, suppose we have three documents d1, d2 and d3 labeled as perfect, good, and bad, respectively. We can obtain the following relative relevance judgments: d1 is preferred over d2, d1 is preferred over d3 and d2 is preferred over d3. However, it is often the case in Web search that for many queries there only exist documents with a single label and for such kind of queries, no preference data can be constructed. 3 THE OBJECTIVE FUNCTION. We use the following objective function to measure the empirical risk of a ranking function h, R(h) = w 2 N X i=1 (max{0, h(yi) −h(xi) + τ})2 + 1 −w 2 n X i=1 (li −h(zi))2. The objective function consists of two parts: 1) for the preference data part, we introduce a margin parameter τ and would like to enforce that h(xi) ≥h(yi) + τ; if not, the difference is quadratically penalized; and 2) for the labeled data part, we simply minimize the squared errors. The parameter w is the relative weight for the preference data and could typically be found by cross-validation. The optimization problem we seek to solve is h∗= argmin h∈H R(h), where H is some given function class. Note that R depends only on the values h(xi), h(yi), h(zi) and we can optimize it using the general boosting framework discussed in section 2. QUADRATIC APPROXIMATION. To this end consider the quadratic approximation (6) for R(h). For simplicity let us assume that each feature vector xi, yi and zi only appears in S and L once, otherwise we need to compute appropriately formed averages. We consider h(xi), h(yi), i = 1, . . . , N, h(zi), i = 1, . . . , n as the unknowns, and compute the gradient of R(h) with respect to those unknowns. The components of the negative gradient corresponding to h(zi) is just li −h(zi). The components of the negative gradient corresponding to h(xi) and h(yi), respectively, are max{0, h(yi) −h(xi) + τ}, −max{0, h(yi) −h(xi) + τ}. Both of the above equal to zero when h(xi)−h(yi) ≥τ. For the second-order term, it can be readily veri£ed that the Hessian of R(h) is block-diagonal with 2-by-2 blocks corresponding to h(xi) and h(yi) and 1-by-1 blocks for h(zi). In particular, if we evaluate the Hessian at h, the 2-by-2 block equals to · 1 −1 −1 1 ¸ , · 0 0 0 0 ¸ , for xi ≻yi with h(xi) −h(yi) < τ and h(xi) −h(yi) ≥τ, respectively. We can upper bound the £rst matrix by the diagonal matrix diag(2, 2) leading to a quadratic upper bound. We summarize the above derivations in the following algorithm. Algorithm 2 Boosted Ranking using Successive Quadratic Approximation (QBRank) Start with an initial guess h0, for m = 1, 2, . . . , 1) we construct a training set for £tting gm(x) by adding the following for each ⟨xi, yi⟩∈S, (xi, max{0, hm−1(yi) −hm−1(xi) + τ}), (yi, −max{0, hm−1(yi) −hm−1(xi) + τ}), and {(zi, li −hm−1(zi)), i = 1, . . . , n}. The £tting of gm(x) is done by using a base regressor with the above training set; We weigh the above preference data by w and the labeled data by 1 −w respectively. 2) forming hm = hm−1 + ηsmgm(x), where sm is found by line search to minimize the objective function. η is a shrinkage factor. The shrinkage factor η by default is 1, but Friedman [8] reported better results (coming from better regularization) by taking η < 1. In general, we choose η and w by cross-validation. τ could be the degree of preference if that information is available, e.g., the absolute grade difference between each prefernce if it is converted from labeled data. Otherwise, we simply set it to be 1.0. When there is no preference data and the weak regression learner produces a regression tree, QBrank is identical to Gradient Boosting Trees (GBT) as proposed in [8]. REMARK. An xi can appear multiple times in Step 1), in this case we use the average gradient values as the target value for each distinct xi. 4 4 Experiment Results We carried out several experiments illustrating the properties and effectiveness of QBrank using combined preference data and labeled data in the context of learning ranking functions for Web search [3]. We also compared its performance with QBrank using preference data only and several existing algorithms such as Gradient Boosting Trees [8] and RankSVM [11, 12]. RankSVM is a preference learning method which learns pair-wise preferences based on SVM approach. DATA COLLECTION. We £rst describe how the data used in the experiments are collected. For each query-document pair we extracted a set of features to form a feature vector. which consists of three parts, x = [xQ, xD, xQD], where 1) the query-feature vector xQ comprises features dependent on the query q only and have constant values across all the documents d in the document set, for example, the number of terms in the query, whether or not the query is a person name, etc.; 2) the document-feature vector xD comprises features dependent on the document d only and have constant values across all the queries q in the query set, for example, the number of inbound links pointing to the document, the amount of anchor-texts in bytes for the document, and the language identity of the document, etc.; and 3) the query-document feature vector xQD which comprises features dependent on the relation of the query q with respect to the document d, for example, the number of times each term in the query q appears in the document d, the number of times each term in the query q appears in the anchor-texts of the document d, etc. We sampled a set of queries from the query logs of a commercial search engine and generated a certain number of query-document pairs for each of the queries. A £ve-level numerical grade (0, 1, 2, 3, 4) is assigned to each query-document pair based on the degree of relevance. In total we have 4,898 queries and 105,243 query-document pairs. We split the data into three subsets as follows: 1) we extract all the queries which have documents with a single label. The set of feature vectors and the corresponding labels form training set L1, which contains around 2000 queries giving rise to 20,000 query-document pairs. (Some single-labeled data are from editorial database, where each query has a few ideal results with the same label. Other are bad ranking cases submitted internally and all the documents for a query are labeled as bad. As we will see those type of singlelabeled data are very useful for learning ranking functions); and 2) we then randomly split the remaining data by queries, and construct a training set L2 containing about 1300 queries and 40,000 query-document pairs and a test set L3 with about 1400 queries and 44,000 query-document pairs. We use L2 or L3 to generate a set of preference data as follows: given a query q and two documents dx and dy. Let the feature vectors for (q, dx) and (q, dy) be x and y, respectively. If dx has a higher grade than dy, we include the preference x ≻y while if dy has a higher grade than dx, we include the preference y ≻x. For each query, we consider all pairs of documents within the search results for that query except those with equal grades. This way, we generate around 500,000 preference pairs in total. We denote the preference data as P2 and P3 corresponding to L2 and L3, respectively. EVALUATION METRICS. The output of QBrank is a ranking function h which is used to rank the documents x according to h(x). Therefore, document x is ranked higher than y by the ranking function h if h(x) > h(y), and we call this the predicted preference. We propose the following two metrics to evaluate the performance of a ranking function with respect to a given set of preferences which we considered as the true preferences. 1) Precision at K%: for two documents x and y (with respect to the same query), it is reasonable to assume that it is easy to compare x and y if |h(x) −h(y)| is large, and x and y should have about the same rank if h(x) is close to h(y). Base on this, we sort all the document pairs ⟨x, y⟩according to |h(x) −h(y)|. We call precision at K%, the fraction of non-contradicting pairs in the top K% of the sorted list. Precision at 100% can be considered as an overall performance measure of a ranking function. 2) Discounted Cumulative Gain (DCG): DCG has been widely used to assess relevance in the context of search engines [10]. For a ranked list of N documents (N is set to be 5 in our experiments), we use the following variation of DCG, DCGN = PN i=1 Gi/ log2 (i + 1), where Gi represents the weights assigned to the label of the document at position i. Higher degree of relevance corresponds to higher value of the weight. PARAMETERS. There are three parameters in QBrank: τ, η, and w. In our experiments, τ is the absolute grade difference between each pair ⟨xi, yi⟩. We set η to be 0.05, and w to be 0.5 in our 5 Table 1: Precision at K% for QBrank, GBT, and RankSVM %K QBrank GBT RankSVM 10% 0.9446 0.9328 0.8524 20% 0.903 0.8939 0.8152 30% 0.8611 0.8557 0.7839 40% 0.8246 0.8199 0.7578 50% 0.7938 0.7899 0.7357 60% 0.7673 0.7637 0.7151 70% 0.7435 0.7399 0.6957 80% 0.7218 0.7176 0.6779 90% 0.7015 0.6977 0.6615 100% 0.6834 0.6803 0.6465 experiments. For a fair comparsion, we used single regression tree with 20 leaf nodes as the base regressor of both GBT and QBrank in our experiments. η and number of leaf nodes were tuned for GBT through cross validation. We did not retune them for QBrank. EXPERIMENTS AND RESULTS. We are interested in the following questions: 1) How does GBT using labeled data L2 compare with QBrank or RankSVM using the preference data extracted from the same labeled data: P2? and 2) Is it useful to include single-labeled data L1 in GBT and QBrank? To this end, we considered the following six experiments for comparison: 1) GBT using L1, 2) GBT using L2, 3) GBT using L1 ∪L2, 4) RankSVM using P2, 5) QBrank using P2, and 6) QBrank using P2 ∪L1. Table 1 presents the precision at K% on data P3 for the ranking function learned from GBT with labeled training data L2, and QBrank and RankSVM with the corresponding preference data P2. This shows that QBrank outperforms both GBT and RankSVM with respect to the precision at K% metric. The DCG-5 for RankSVM using P2 is 6.181 while that for the other £ve methods are shown in Figure 1, from which we can see it is useful to include single-labeled data in GBT training. In case of preference learning, no preference pairs could be extracted from single labeled data. Therefore, existing methods such as RankSVM, RankNet and RankBoost that are formulated for preference data only can not take advantage of such data. The QBrank framework can combine preference data and labeled data in a natural way. From Figure 1, we can see QBrank using combined preference data and labeled data outperforms both QBrank and RankSVM using preference data only, which indicates that singled labeled data are also useful to QBrank training. Another observation is that GBT using labeled data is signi£cantly worse than QBrank using preference data extracted from the same labeled data3. The clear convergence trend of QBrank is also demonstrated in Figure 1. Notice that, we excluded all tied data (pairs of documents with the same grades) when converting preference data from the absolute relevance judgments, which can be signi£cant information loss, for example of x1 > x2, and x3 > x4. If we know x2 ties with x3, then we can have the whole ranking x1 > {x2, x3} > x4. Including tied data could further improve performance of both GBrank and QBrank. 5 Conclusions and Future Work We proposed a general boosting method for optimizing complex loss functions. We also applied the general framework to the problem of learning ranking functions. Experimental results using a commercial search engine data show that our approach leads to signi£cant improvements. In future work, 1) we will add regularization to the preference part in the objective function; 2) we plan to apply our general boosting method to other structured learning problems; and 3) we will also explore other applications where both preference and labeled data are available for training ranking functions. 3a 1% dcg gain is considered sign£cant on this data set for commercial search engines. 6 DCG-5 v. Iterations 6.6 6.65 6.7 6.75 6.8 6.85 6.9 50 100 150 200 250 300 350 400 Iterations (Number of trees) DCG-5 GBT using L2 GBT using L1 GBT using L1+L2 QBrank using P2 QBrank using P2+L1 Figure 1: DCG v. Iterations. Notice that DCG for RankSVM using P2 is 6.181. Appendix: Convergence results We introduce a few de£nitions. De£nition 1 C is scale-invariant if ∀g ∈C and α ∈R, αg ∈C. De£nition 2 ∥g∥W,X = q 1 n P ℓwℓg(xℓ)2. De£nition 3 Let h ∈span(C), then ∥h∥W,X = inf nP j |αj| : h = P j αjgj/∥gj∥W,X; gj ∈C o . De£nition 4 Let R(h) be a function of h, an global upper bound M of its Hessian with respect to [W, X] satisfy: ∀h, β and g: R(h + βg) ≤R(h) + β∇R(h)T g + β2 2 M∥g∥2 W,X. Although we only consider global upper bounds, it is easy to see that results with respect to local upper bounds can also be established. Theorem 1 Consider Algorithm 1, where R is a convex function of h. Let M be an upper bound of the Hessian of R. Assume that C is scale-invariant. Let ¯h ∈span(C). Let ¯sk = sk∥gk∥W,X be the normalized step-size, aj = Pj i=0 ¯si, and bj = P i≥j(¯si √2ϵi + M¯s2 i /2), then R(hk+1) ≤R(¯h)+ ∥¯h∥W,X ∥¯h∥W,X + ak max(0, R(0)−R(¯h))+inf j · (b0 −bj+1) ∥¯h∥W,X + aj ∥¯h∥W,X + ak + (bj+1 −bk+1) ¸ . If we choose ¯sk ≥0 such that P k ¯sk = ∞and P k(¯s2 k + ¯sk√ϵk) < ∞, then limk→∞R(hk) = inf¯h∈span(C) R(¯h), and the rate of convergence compared to any target ¯h ∈span(C) only depends on ∥¯h∥W,X, and the sequences {aj} and {bj}. The proof is a systematic application of the idea outlined earlier and will be detailed in a separate publication. In practice, one often set the step size to be a small constant. In particular, for for some £xed s > 0, we can choose √2ϵi ≤Ms2/2, and sk∥gk∥W,X = s2 when R(hk + ¯sk˜gk) ≤R(hk) (¯sk = 0 otherwise). Theorem 1 gives the following bound when k ≥ q ∥¯h∥W,X max(0, R(0) −R(¯h))/Ms−3, R(hk+1) ≤R(¯h) + 2s q max(0, R(0) −R(¯h))∥¯h∥W,XM + Ms4. 7 The convergence results show that in order to have a risk not much worse than any target function ¯h ∈span(C), the approximation function hk does not need to be very complex when the complexity is measured by its 1-norm. It is also important to see that quantities appearing in the generalization analysis do not depend on the number of samples. These results imply that statistically, Algorithm 1 (with small step-size) has an implicit regularization effect that prevents the procedure from over£ting the data. Standard empirical process techniques can then be applied to obtain generalization bounds for Algorithm 1. References [1] BALCAN N., BEYGELZIMER A., LANGFORD J., AND SORKIN G. Robust Reductions from Ranking to Classi£cation, manuscript, 2007. [2] BERTSEKAS D. Nonlinear programming. Athena Scienti£c, second edition, 1999. [3] BURGES, C., SHAKED, T., RENSHAW, E., LAZIER, A., DEEDS, M., HAMILTON, N., AND HULLENDER, G. Learning to rank using gradient descent. Proc. of Intl. Conf. on Machine Learning (ICML) (2005). [4] DIETTERICH, T. G., ASHENFELTER, A., BULATOV, Y. Training Conditional Random Fields via Gradient Tree Boosting Proc. of Intl. Conf. on Machine Learning (ICML) (2004). [5] CLEMENCON S., LUGOSI G., AND VAYATIS N. Ranking and scoring using empirical risk minimization. Proc. of COLT (2005). [6] COHEN, W. W., SCHAPIRE, R. E., AND SINGER, Y. Learning to order things. Journal of Arti£cial Intelligence Research, Neural Computation, 13, 14431472 (1999). [7] FREUND, Y., IYER, R., SCHAPIRE, R. E., AND SINGER, Y. An ef£cient boosting algorithm for combining preferences. Journal of Machine Learning Research 4 (2003), 933–969. [8] FRIEDMAN, J. H. Greedy function approximation: A gradient boosting machine. Annals of Statistics 29, 5 (2001), 1189–1232. [9] HERBRICH, R., GRAEPEL, T., AND OBERMAYER, K. Large margin rank boundaries for ordinal regression. 115–132. [10] JARVELIN, K., AND KEKALAINEN, J. Ir evaluation methods for retrieving highly relevant documents. Proc. of ACM SIGIR Conference (2000). [11] JOACHIMS, T. Optimizing search engines using clickthrough data. Proc. of ACM SIGKDD Conference (2002). [12] JOACHIMS, T., GRANKA, L., PAN, B., AND GAY, G. Accurately interpreting clickthough data as implicit feedback. Proc. of ACM SIGIR Conference (2005). [13] TSOCHANTARIDIS, I., JOACHIMS, T., HOFMANN, T., AND ALTUN, Y. Large margin methods for structured and interdependent output variables. Journal of Machine Learning Research, 6:1453–1484, 2005. 8
2007
112
3,140
Fixing Max-Product: Convergent Message Passing Algorithms for MAP LP-Relaxations Amir Globerson Tommi Jaakkola Computer Science and Artificial Intelligence Laboratory Massachusetts Institute of Technology Cambridge, MA 02139 gamir,tommi@csail.mit.edu Abstract We present a novel message passing algorithm for approximating the MAP problem in graphical models. The algorithm is similar in structure to max-product but unlike max-product it always converges, and can be proven to find the exact MAP solution in various settings. The algorithm is derived via block coordinate descent in a dual of the LP relaxation of MAP, but does not require any tunable parameters such as step size or tree weights. We also describe a generalization of the method to cluster based potentials. The new method is tested on synthetic and real-world problems, and compares favorably with previous approaches. Graphical models are an effective approach for modeling complex objects via local interactions. In such models, a distribution over a set of variables is assumed to factor according to cliques of a graph with potentials assigned to each clique. Finding the assignment with highest probability in these models is key to using them in practice, and is often referred to as the MAP (maximum aposteriori) assignment problem. In the general case the problem is NP hard, with complexity exponential in the tree-width of the underlying graph. Linear programming (LP) relaxations have proven very useful in approximating the MAP problem, and often yield satisfactory empirical results. These approaches relax the constraint that the solution is integral, and generally yield non-integral solutions. However, when the LP solution is integral, it is guaranteed to be the exact MAP. For some classes of problems the LP relaxation is provably correct. These include the minimum cut problem and maximum weight matching in bi-partite graphs [8]. Although LP relaxations can be solved using standard LP solvers, this may be computationally intensive for large problems [13]. The key problem with generic LP solvers is that they do not use the graph structure explicitly and thus may be sub-optimal in terms of computational efficiency. The max-product method [7] is a message passing algorithm that is often used to approximate the MAP problem. In contrast to generic LP solvers, it makes direct use of the graph structure in constructing and passing messages, and is also very simple to implement. The relation between max-product and the LP relaxation has remained largely elusive, although there are some notable exceptions: For tree-structured graphs, max-product and LP both yield the exact MAP. A recent result [1] showed that for maximum weight matching on bi-partite graphs max-product and LP also yield the exact MAP [1]. Finally, Tree-Reweighted max-product (TRMP) algorithms [5, 10] were shown to converge to the LP solution for binary xi variables, as shown in [6]. In this work, we propose the Max Product Linear Programming algorithm (MPLP) - a very simple variation on max-product that is guaranteed to converge, and has several advantageous properties. MPLP is derived from the dual of the LP relaxation, and is equivalent to block coordinate descent in the dual. Although this results in monotone improvement of the dual objective, global convergence is not always guaranteed since coordinate descent may get stuck in suboptimal points. This can be remedied using various approaches, but in practice we have found MPLP to converge to the LP 1 solution in a majority of the cases we studied. To derive MPLP we use a special form of the dual LP, which involves the introduction of redundant primal variables and constraints. We show how the dual variables corresponding to these constraints turn out to be the messages in the algorithm. We evaluate the method on Potts models and protein design problems, and show that it compares favorably with max-product (which often does not converge for these problems) and TRMP. 1 The Max-Product and MPLP Algorithms The max-product algorithm [7] is one of the most often used methods for solving MAP problems. Although it is neither guaranteed to converge to the correct solution, or in fact converge at all, it provides satisfactory results in some cases. Here we present two algorithms: EMPLP (edge based MPLP) and NMPLP (node based MPLP), which are structurally very similar to max-product, but have several key advantages: • After each iteration, the messages yield an upper bound on the MAP value, and the sequence of bounds is monotone decreasing and convergent. The messages also have a limit point that is a fixed point of the update rule. • No additional parameters (e.g., tree weights as in [6]) are required. • If the fixed point beliefs have a unique maximizer then they correspond to the exact MAP. • For binary variables, MPLP can be used to obtain the solution to an LP relaxation of the MAP problem. Thus, when this LP relaxation is exact and variables are binary, MPLP will find the MAP solution. Moreover, for any variable whose beliefs are not tied, the MAP assignment can be found (i.e., the solution is partially decodable). Pseudo code for the algorithms (and for max-product) is given in Fig. 1. As we show in the next sections, MPLP is essentially a block coordinate descent algorithm in the dual of a MAP LP relaxation. Every update of the MPLP messages corresponds to exact minimization of a set of dual variables. For EMPLP minimization is over the set of variables corresponding to an edge, and for NMPLP it is over the set of variables corresponding to all the edges a given node appears in (i.e., a star). The properties of MPLP result from its relation to the LP dual. In what follows we describe the derivation of the MPLP algorithms and prove their properties. 2 The MAP Problem and its LP Relaxation We consider functions over n variables x = {x1, . . . , xn} defined as follows. Given a graph G = (V, E) with n vertices, and potentials θij(xi, xj) for all edges ij ∈E, define the function1 f(x; θ) = X ij∈E θij(xi, xj) . (1) The MAP problem is defined as finding an assignment xM that maximizes the function f(x; θ). Below we describe the standard LP relaxation for this problem. Denote by {µij(xi, xj)}ij∈E distributions over variables corresponding to edges ij ∈E and {µi(xi)}i∈V distributions corresponding to nodes i ∈V . We will use µ to denote a given set of distributions over all edges and nodes. The set ML(G) is defined as the set of µ where pairwise and singleton distributions are consistent ML(G) =  µ ≥0 P ˆxi µij(ˆxi, xj) = µj(xj) , P ˆxj µij(xi, ˆxj) = µi(xi) ∀ij ∈E, xi, xj P xi µi(xi) = 1 ∀i ∈V  Now consider the following linear program: MAPLPR : µL∗= arg max µ∈ML(G) µ · θ . (2) where µ·θ is shorthand for µ·θ = P ij∈E P xi,xj θij(xi, xj)µij(xi, xj). It is easy to show (see e.g., [10]) that the optimum of MAPLPR yields an upper bound on the MAP value, i.e. µL∗·θ ≥f(xM). Furthermore, when the optimal µi(xi) have only integral values, the assignment that maximizes µi(xi) yields the correct MAP assignment. In what follows we show how the MPLP algorithms can be derived from the dual of MAPLPR. 1We note that some authors also add a term P i∈V θi(xi) to f(x; θ). However, these terms can be included in the pairwise functions θij(xi, xj), so we ignore them for simplicity. 2 3 The LP Relaxation Dual Since MAPLPR is an LP, it has an equivalent convex dual. In App. A we derive a special dual of MAPLPR using a different representation of ML(G) with redundant variables. The advantage of this dual is that it allows the derivation of simple message passing algorithms. The dual is described in the following proposition. Proposition 1 The following optimization problem is a convex dual of MAPLPR DMAPLPR : min P i max xi P k∈N(i) max xk βki(xk, xi) s.t. βji(xj, xi) + βij(xi, xj) = θij(xi, xj) , (3) where the dual variables are βij(xi, xj) for all ij, ji ∈E and values of xi and xj. The dual has an intuitive interpretation in terms of re-parameterizations. Consider the star shaped graph Gi consisting of node i and all its neighbors N(i). Assume the potential on edge ki (for k ∈N(i)) is βki(xk, xi). The value of the MAP assignment for this model is max xi P k∈N(i) max xk βki(xk, xi). This is exactly the term in the objective of DMAPLPR. Thus the dual corresponds to individually decoding star graphs around all nodes i ∈V where the potentials on the graph edges should sum to the original potential. It is easy to see that this will always result in an upper bound on the MAP value. The somewhat surprising result of the duality is that there exists a β assignment such that star decoding yields the optimal value of MAPLPR. 4 Block Coordinate Descent in the Dual To obtain a convergent algorithm we use a simple block coordinate descent strategy. At every iteration, fix all variables except a subset, and optimize over this subset. It turns out that this can be done in closed form for the cases we consider. We begin by deriving the EMPLP algorithm. Consider fixing all the β variables except those corresponding to some edge ij ∈E (i.e., βij and βji), and minimizing DMAPLPR over the non-fixed variables. Only two terms in the DMAPLPR objective depend on βij and βji. We can write those as f(βij, βji) = max xi  λ−j i (xi) + max xj βji(xj, xi)  + max xi  λ−i j (xj) + max xi βij(xi, xj)  (4) where we defined λ−j i (xi) = P k∈N(i)\j λki(xi) and λki(xi) = maxxk βki(xk, xi) as in App. A. Note that the function f(βij, βji) depends on the other β values only through λ−i j (xj) and λ−j i (xi). This implies that the optimization can be done solely in terms of λij(xj) and there is no need to store the β values explicitly. The optimal βij, βji are obtained by minimizing f(βij, βji) subject to the re-parameterization constraint βji(xj, xi) + βij(xi, xj) = θij(xi, xj). The following proposition characterizes the minimum of f(βij, βji). In fact, as mentioned above, we do not need to characterize the optimal βij(xi, xj) itself, but only the new λ values. Proposition 2 Maximizing the function f(βij, βji) yields the following λji(xi) (and the equivalent expression for λij(xj)) λji(xi) = −1 2λ−j i (xi) + 1 2 max xj  λ−i j (xj) + θij(xi, xj)  The proposition is proved in App. B. The λ updates above result in the EMPLP algorithm, described in Fig. 1. Note that since the β optimization affects both λji(xi) and λij(xj), both these messages need to be updated simultaneously. We proceed to derive the NMPLP algorithm. For a given node i ∈V , we consider all its neighbors j ∈N(i), and wish to optimize over the variables βji(xj, xi) for ji, ij ∈E (i.e., all the edges in a star centered on i), while the other variables are fixed. One way of doing so is to use the EMPLP algorithm for the edges in the star, and iterate it until convergence. We now show that the result of 3 Inputs: A graph G = (V, E), potential functions θij(xi, xj) for each edge ij ∈E. Initialization: Initialize messages to any value. Algorithm: • Iterate until a stopping criterion is satisfied: – Max-product: Iterate over messages and update (cji shifts the max to zero) mji(xi)←max xj h m−i j (xj) + θij(xi, xj) i −cji – EMPLP: For each ij ∈E, update λji(xi) and λij(xj) simultaneously (the update for λij(xj) is the same with i and j exchanged) λji(xi)←−1 2λ−j i (xi) + 1 2 max xj h λ−i j (xj) + θij(xi, xj) i – NMPLP: Iterate over nodes i ∈V and update all γij(xj) where j ∈N(i) γij(xj)←max xi 2 4θij(xi, xj) −γji(xi) + 2 |N(i)| + 1 X k∈N(i) γki(xi) 3 5 • Calculate node “beliefs”: Set bi(xi) to be the sum of incoming messages into node i ∈V (e.g., for NMPLP set bi(xi) = P k∈N(i) γki(xi)). Output: Return assignment x defined as xi = arg maxˆxi b(ˆxi). Figure 1: The max-product, EMPLP and NMPLP algorithms. Max-product, EMPLP and NMPLP use messages mij, λij and γij respectively. We use the notation m−i j (xj) = P k∈N(j)\i mkj(xj). this optimization can be found in closed form. The assumption about β being fixed outside the star implies that λ−i j (xj) is fixed. Define: γji(xi) = maxxj  θij(xi, xj) + λ−i j (xj)  . Simple algebra yields the following relation between λ−j i (xi) and γki(xi) for k ∈N(i) λ−j i (xi) = −γji(xi) + 2 |N(i)| + 1 X k∈N(i) γki(xi) (5) Plugging this into the definition of γji(xi) we obtain the NMPLP update in Fig. 1. The messages for both algorithms can be initialized to any value since it can be shown that after one iteration they will correspond to valid β values. 5 Convergence Properties The MPLP algorithm decreases the dual objective (i.e., an upper bound on the MAP value) at every iteration, and thus its dual objective values form a convergent sequence. Using arguments similar to [5] it can be shown that MPLP has a limit point that is a fixed point of its updates. This in itself does not guarantee convergence to the dual optimum since coordinate descent algorithms may get stuck at a point that is not a global optimum. There are ways of overcoming this difficulty, for example by smoothing the objective [4] or using techniques as in [2] (see p. 636). We leave such extensions for further work. In this section we provide several results about the properties of the MPLP fixed points and their relation to the corresponding LP. First, we claim that if all beliefs have unique maxima then the exact MAP assignment is obtained. Proposition 3 If the fixed point of MPLP has bi(xi) such that for all i the function bi(xi) has a unique maximizer x∗ i , then x∗is the solution to the MAP problem and the LP relaxation is exact. Since the dual objective is always greater than or equal to the MAP value, it suffices to show that there exists a dual feasible point whose objective value is f(x∗). Denote by β∗, λ∗the value of the corresponding dual parameters at the fixed point of MPLP. Then the dual objective satisfies X i max xi X k∈N(i) λ∗ ki(xi) = X i X k∈N(i) max xk β∗ ki(xk, x∗ i ) = X i X k∈N(i) β∗ ki(x∗ k, x∗ i ) = f(x∗) 4 To see why the second equality holds, note that bi(x∗ i ) = maxxi,xj λ−j i (xi) + βji(xj, xi) and bj(x∗ j) = maxxi,xj λ−i j (xj) + βij(xi, xj). By the equalization property in Eq. 9 the arguments of the two max operations are equal. From the unique maximum assumption it follows that x∗ i , x∗ j are the unique maximizers of the above. It follows that βji, βij are also maximized by x∗ i , x∗ j. In the general case, the MPLP fixed point may not correspond to a primal optimum because of the local optima problem with coordinate descent. However, when the variables are binary, fixed points do correspond to primal solutions, as the following proposition states. Proposition 4 When xi are binary, the MPLP fixed point can be used to obtain the primal optimum. The claim can be shown by constructing a primal optimal solution µ∗. For tied bi, set µ∗ i (xi) to 0.5 and for untied bi, set µ∗ i (x∗ i ) to 1. If bi, bj are not tied we set µ∗ ij(x∗ i , x∗ j) = 1. If bi is not tied but bj is, we set µ∗ ij(x∗ i , xj) = 0.5. If bi, bj are tied then βji, βij can be shown to be maximized at either x∗ i , x∗ j = (0, 0), (1, 1) or x∗ i , x∗ j = (0, 1), (1, 0). We then set µ∗ ij to be 0.5 at one of these assignment pairs. The resulting µ∗is clearly primal feasible. Setting δ∗ i = b∗ i we obtain that the dual variables (δ∗, λ∗, β∗) and primal µ∗satisfy complementary slackness for the LP in Eq. 7 and therefore µ∗is primal optimal. The binary optimality result implies partial decodability, since [6] shows that the LP is partially decodable for binary variables. 6 Beyond pairwise potentials: Generalized MPLP In the previous sections we considered maximizing functions which factor according to the edges of the graph. A more general setting considers clusters c1, . . . , ck ⊂{1, . . . , n} (the set of clusters is denoted by C), and a function f(x; θ) = P c θc(xc) defined via potentials over clusters θc(xc). The MAP problem in this case also has an LP relaxation (see e.g. [11]). To define the LP we introduce the following definitions: S = {c∩ˆc : c, ˆc ∈C, c∩ˆc ̸= ∅} is the set of intersection between clusters and S(c) = {s ∈S : s ⊆c} is the set of overlap sets for cluster c.We now consider marginals over the variables in c ∈C and s ∈S and require that cluster marginals agree on their overlap. Denote this set by ML(C). The LP relaxation is then to maximize µ · θ subject to µ ∈ML(C). As in Sec. 4, we can derive message passing updates that result in monotone decrease of the dual LP of the above relaxation. The derivation is similar and we omit the details. The key observation is that one needs to introduce |S(c)| copies of each marginal µc(xc) (instead of the two copies in the pairwise case). Next, as in the EMPLP derivation we assume all β are fixed except those corresponding to some cluster c. The resulting messages are λc→s(xs) from a cluster c to all of its intersection sets s ∈S(c). The update on these messages turns out to be: λc→s(xs) = −  1 − 1 |S(c)|  λ−c s (xs) + 1 |S(c)| max xc\s   X ˆs∈S(c)\s λ−c ˆs (xˆs) + θc(xc)   where for a given c ∈C all λc→s should be updated simultaneously for s ∈S(c), and λ−c s (xs) is defined as the sum of messages into s that are not from c. We refer to this algorithm as Generalized EMPLP (GEMPLP). It is possible to derive an algorithm similar to NMPLP that updates several clusters simultaneously, but its structure is more involved and we do not address it here. 7 Related Work Weiss et al. [11] recently studied the fixed points of a class of max-product like algorithms. Their analysis focused on properties of fixed points rather than convergence guarantees. Specifically, they showed that if the counting numbers used in a generalized max-product algorithm satisfy certain properties, then its fixed points will be the exact MAP if the beliefs have unique maxima, and for binary variables the solution can be partially decodable. Both these properties are obtained for the MPLP fixed points, and in fact we can show that MPLP satisfies the conditions in [11], so that we obtain these properties as corollaries of [11]. We stress however, that [11] does not address convergence of algorithms, but rather properties of their fixed points, if they converge. MPLP is similar in some aspects to Kolmogorov’s TRW-S algorithm [5]. TRW-S is also a monotone coordinate descent method in a dual of the LP relaxation and its fixed points also have similar 5 guarantees to those of MPLP [6]. Furthermore, convergence to a local optimum may occur, as it does for MPLP. One advantage of MPLP lies in the simplicity of its updates and the fact that it is parameter free. The other is its simple generalization to potentials over clusters of nodes (Sec. 6). Recently, several new dual LP algorithms have been introduced, which are more closely related to our formalism. Werner [12] presented a class of algorithms which also improve the dual LP at every iteration. The simplest of those is the max-sum-diffusion algorithm, which is similar to our EMPLP algorithm, although the updates are different from ours. Independently, Johnson et al. [4] presented a class of algorithms that improve duals of the MAP-LP using coordinate descent. They decompose the model into tractable parts by replicating variables and enforce replication constraints within the Lagrangian dual. Our basic formulation in Eq. 3 could be derived from their perspective. However, the updates in the algorithm and the analysis differ. Johnson et al. also presented a method for overcoming the local optimum problem, by smoothing the objective so that it is strictly convex. Such an approach could also be used within our algorithms. Vontobel and Koetter [9] recently introduced a coordinate descent algorithm for decoding LDPC codes. Their method is specifically tailored for this case, and uses updates that are similar to our edge based updates. Finally, the concept of dual coordinate descent may be used in approximating marginals as well. In [3] we use such an approach to optimize a variational bound on the partition function. The derivation uses some of the ideas used in the MPLP dual, but importantly does not find the minimum for each coordinate. Instead, a gradient like step is taken at every iteration to decrease the dual objective. 8 Experiments We compared NMPLP to three other message passing algorithms:2 Tree-Reweighted max-product (TRMP) [10],3 standard max-product (MP), and GEMPLP. For MP and TRMP we used the standard approach of damping messages using a factor of α = 0.5. We ran all algorithms for a maximum of 2000 iterations, and used the hit-time measure to compare their speed of convergence. This measure is defined as follows: At every iteration the beliefs can be used to obtain an assignment x with value f(x). We define the hit-time as the first iteration at which the maximum value of f(x) is achieved.4 We first experimented with a 10 × 10 grid graph, with 5 values per state. The function f(x) was a Potts model: f(x) = P ij∈E θijI(xi = xj) + P i∈V θi(xi).5 The values for θij and θi(xi) were randomly drawn from [−cI, cI] and [−cF , cF ] respectively, and we used values of cI and cF in the range range [0.1, 2.35] (with intervals of 0.25), resulting in 100 different models. The clusters for GEMPLP were the faces of the graph [14]. To see if NMPLP converges to the LP solution we also used an LP solver to solve the LP relaxation. We found that the the normalized difference between NMPLP and LP objective was at most 10−3 (median 10−7), suggesting that NMPLP typically converged to the LP solution. Fig. 2 (top row) shows the results for the three algorithms. It can be seen that while all non-cluster based algorithms obtain similar f(x) values, NMPLP has better hit-time (in the median) than TRMP and MP, and MP does not converge in many cases (see caption). GEMPLP converges more slowly than NMPLP, but obtains much better f(x) values. In fact, in 99% of the cases the normalized difference between the GEMPLP objective and the f(x) value was less than 10−5, suggesting that the exact MAP solution was found. We next applied the algorithms to the real world problems of protein design. In [13], Yanover et al. show how these problems can be formalized in terms of finding a MAP in an appropriately constructed graphical model.6 We used all algorithms except GNMPLP (since there is no natural choice for clusters in this case) to approximate the MAP solution on the 97 models used in [13]. In these models the number of states per variable is 2 −158, and there are up to 180 variables per model. Fig. 2 (bottom) shows results for all the design problems. In this case only 11% of the MP runs converged, and NMPLP was better than TRMP in terms of hit-time and comparable in f(x) value. The performance of MP was good on the runs where it converged. 2As expected, NMPLP was faster than EMPLP so only NMPLP results are given. 3The edge weights for TRMP corresponded to a uniform distribution over all spanning trees. 4This is clearly a post-hoc measure since it can only be obtained after the algorithm has exceeded its maximum number of iterations. However, it is a reasonable algorithm-independent measure of convergence. 5The potential θi(xi) may be folded into the pairwise potential to yield a model as in Eq. 1. 6Data available from http://jmlr.csail.mit.edu/papers/volume7/yanover06a/Rosetta Design Dataset.tgz 6 (a) (b) (c) (d) MP TRMP GMPLP −100 −50 0 50 100 ∆(Hit Time) MP TRMP GMPLP −0.06 −0.04 −0.02 0 0.02 0.04 ∆(Value) MP TRMP −1000 0 1000 2000 ∆(Hit Time) MP TRMP −0.4 −0.2 0 0.2 0.4 0.6 ∆(Value) Figure 2: Evaluation of message passing algorithms on Potts models and protein design problems. (a,c): Convergence time results for the Potts models (a) and protein design problems (c). The box-plots (horiz. red line indicates median) show the difference between the hit-time for the other algorithms and NMPLP. (b,d): Value of integer solutions for the Potts models (b) and protein design problems (d). The box-plots show the normalized difference between the value of f(x) for NMPLP and the other algorithms. All figures are such that better MPLP performance yields positive Y axis values. Max-product converged on 58% of the cases for the Potts models, and on 11% of the protein problems. Only convergent max-product runs are shown. 9 Conclusion We have presented a convergent algorithm for MAP approximation that is based on block coordinate descent of the MAP-LP relaxation dual. The algorithm can also be extended to cluster based functions, which result empirically in improved MAP estimates. This is in line with the observations in [14] that generalized belief propagation algorithms can result in significant performance improvements. However generalized max-product algorithms [14] are not guaranteed to converge whereas GMPLP is. Furthermore, the GMPLP algorithm does not require a region graph and only involves intersection between pairs of clusters. In conclusion, MPLP has the advantage of resolving the convergence problems of max-product while retaining its simplicity, and offering the theoretical guarantees of LP relaxations. We thus believe it should be useful in a wide array of applications. A Derivation of the dual Before deriving the dual, we first express the constraint set ML(G) in a slightly different way. The definition of ML(G) in Sec. 2 uses a single distribution µij(xi, xj) for every ij ∈E. In what follows, we use two copies of this pairwise distribution for every edge, which we denote ¯µij(xi, xj) and ¯µji(xj, xi), and we add the constraint that these two copies both equal the original µij(xi, xj). For this extended set of pairwise marginals, we consider the following set of constraints which is clearly equivalent to ML(G). On the rightmost column we give the dual variables that will correspond to each constraint (we omit non-negativity constraints). ¯µij(xi, xj) = µij(xi, xj) ∀ij ∈E, xi, xj βij(xi, xj) ¯µji(xj, xi) = µij(xi, xj) ∀ij ∈E, xi, xj βji(xj, xi) P ˆxi ¯µij(ˆxi, xj) = µj(xj) ∀ij ∈E, xj λij(xj) P ˆxj ¯µji(ˆxj, xi) = µi(xi) ∀ji ∈E, xi λji(xi) P xi µi(xi) = 1 ∀i ∈V δi (6) We denote the set of (µ, ¯µ) satisfying these constraints by ¯ ML(G). We can now state an LP that is equivalent to MAPLPR, only with an extended set of variables and constraints. The equivalent problem is to maximize µ · θ subject to (µ, ¯µ) ∈¯ ML(G) (note that the objective uses the original µ copy). LP duality transformation of the extended problem yields the following LP min P i δi s.t. λij(xj) −βij(xi, xj) ≥0 ∀ij, ji ∈E, xi, xj βij(xi, xj) + βji(xj, xi) = θij(xi, xj) ∀ij ∈E, xi, xj −P k∈N(i) λki(xi) + δi ≥0 ∀i ∈V, xi (7) We next simplify the above LP by eliminating some of its constraints and variables. Since each variable δi appears in only one constraint, and the objective minimizes δi it follows that δi = maxxi P k∈N(i) λki(xi) and the constraints with δi can be discarded. Similarly, since λij(xj) appears in a single constraint, we have that for all ij ∈E, ji ∈E, xi, xj λij(xj) = maxxi βij(xi, xj) and the constraints with λij(xj), λji(xi) can also be discarded. Using the eliminated δi and λji(xi) 7 variables, we obtain that the LP in Eq. 7 is equivalent to that in Eq. 3. Note that the objective in Eq. 3 is convex since it is a sum of point-wise maxima of convex functions. B Proof of Proposition 2 We wish to minimize f in Eq. 4 subject to the constraint that βij + βji = θij. Rewrite f as f(βij, βji) = max xi,xj h λ−j i (xi) + βji(xj, xi) i + max xi,xj  λ−i j (xj) + βij(xi, xj)  (8) The sum of the two arguments in the max is λ−j i (xi) + λ−i j (xj) + θij(xi, xj) (because of the constraints on β). Thus the minimum must be greater than 1 2 maxxi,xj h λ−j i (xi) + λ−i j (xj) + θij(xi, xj) i . One assignment to β that achieves this minimum is obtained by requiring an equalization condition:7 λ−i j (xj) + βij(xi, xj) = λ−j i (xi) + βji(xj, xi) = 1 2  θij(xi, xj) + λ−j i (xi) + λ−i j (xj)  (9) which implies βij(xi, xj) = 1 2  θij(xi, xj) + λ−j i (xi) −λ−i j (xj)  and a similar expression for βji. The resulting λij(xj) = maxxi βij(xi, xj) are then the ones in Prop. 2. Acknowledgments The authors acknowledge support from the Defense Advanced Research Projects Agency (Transfer Learning program). Amir Globerson was also supported by the Rothschild Yad-Hanadiv fellowship. References [1] M. Bayati, D. Shah, and M. Sharma. Maximum weight matching via max-product belief propagation. IEEE Trans. on Information Theory (to appear), 2007. [2] D. P. Bertsekas, editor. Nonlinear Programming. Athena Scientific, Belmont, MA, 1995. [3] A. Globerson and T. Jaakkola. Convergent propagation algorithms via oriented trees. In UAI. 2007. [4] J.K. Johnson, D.M. Malioutov, and A.S. Willsky. Lagrangian relaxation for map estimation in graphical models. In Allerton Conf. Communication, Control and Computing, 2007. [5] V. Kolmogorov. Convergent tree-reweighted message passing for energy minimization. IEEE Transactions on Pattern Analysis and Machine Intelligence, 28(10):1568–1583, 2006. [6] V. Kolmogorov and M. Wainwright. On the optimality of tree-reweighted max-product message passing. In 21st Conference on Uncertainty in Artificial Intelligence (UAI). 2005. [7] J. Pearl. Probabilistic Reasoning in Intelligent Systems. Morgan Kaufmann, 1988. [8] B. Taskar, S. Lacoste-Julien, and M. Jordan. Structured prediction, dual extragradient and bregman projections. Journal of Machine Learning Research, pages 1627–1653, 2006. [9] P.O. Vontobel and R. Koetter. Towards low-complexity linear-programming decoding. In Proc. 4th Int. Symposium on Turbo Codes and Related Topics, 2006. [10] M. J. Wainwright, T. Jaakkola, and A. S. Willsky. Map estimation via agreement on trees: messagepassing and linear programming. IEEE Trans. on Information Theory, 51(11):1120–1146, 2005. [11] Y. Weiss, C. Yanover, and T. Meltzer. Map estimation, linear programming and belief propagation with convex free energies. In UAI. 2007. [12] T. Werner. A linear programming approach to max-sum, a review. IEEE Trans. on PAMI, 2007. [13] C. Yanover, T. Meltzer, and Y. Weiss. Linear programming relaxations and belief propagation – an empirical study. Jourmal of Machine Learning Research, 7:1887–1907, 2006. [14] J.S. Yedidia, W.T. W.T. Freeman, and Y. Weiss. Constructing free-energy approximations and generalized belief propagation algorithms. IEEE Trans. on Information Theory, 51(7):2282–2312, 2005. 7Other solutions are possible but may not yield some of the properties of MPLP. 8
2007
113
3,141
GRIFT: A graphical model for inferring visual classification features from human data Michael G. Ross Department of Brain and Cognitive Sciences Massachusetts Institute of Technology Cambridge, MA 02139 mgross@mit.edu Andrew L. Cohen Psychology Department University of Massachusetts Amherst Amherst, MA 01003 acohen@psych.umass.edu Abstract This paper describes a new model for human visual classification that enables the recovery of image features that explain human subjects’ performance on different visual classification tasks. Unlike previous methods, this algorithm does not model their performance with a single linear classifier operating on raw image pixels. Instead, it represents classification as the combination of multiple feature detectors. This approach extracts more information about human visual classification than previous methods and provides a foundation for further exploration. 1 Introduction Although a great deal is known about the low-level features computed by the human visual system, determining the information used to make high-level visual classifications is an active area of research. When a person distinguishes between two faces, for example, what image regions are most salient? Since the early 1970s, one of the most important research tools for answering such questions has been the classification image (or reverse correlation) algorithm, which assumes a linear classification model [1]. This paper describes a new approach, GRIFT (GRaphical models for Inferring Feature Templates). Instead of representing human visual discrimination as a single linear classifier, GRIFT models it as the non-linear combination of multiple independently detected features. This allows GRIFT to extract more detailed information about human classification. This paper describes GRIFT and the algorithms for fitting it to data, demonstrates the model’s efficacy on simulated and human data, and concludes with a discussion of future research directions. 2 Related work Ahumada’s classification image algorithm [1] models an observer’s classifications of visual stimuli with a noisy linear classifier — a fixed set of weights and a normally distributed threshold. The random threshold accounts for the fact that multiple presentations of the same stimulus are often classified inconsistently. In a typical classification image experiment, participants are presented with hundreds or thousands of noise-corrupted examples from two categories and asked to classify each one. The noise ensures that the samples cover a large volume of the sample space in order to allow recovery of a unique linear classifier that best explains the data. Although classification images are useful in many cases, it is well established that there are domains in which recognition and classification are the result of combining the detection of parts or features, rather than applying a single linear template. For example, Pelli et al. [10], have convincingly demonstrated that humans recognize noisy word images by parts, even when whole-word templates would perform better. Similarly, Gold et al. [7] verified that subjects employed feature-based clas1 N S Fi C ωi λi βi λ0 four square faces light-dark targets samples targets targets samples samples class 1 class 2 class 1 class 2 class 1 class 2 Figure 1: Left: The GRIFT model is a Bayes net that describes classification as the result of combining N feature detectors. Right: Targets and sample stimuli from the three experiments. sification strategies for some simple artificial image classes. GRIFT takes the next step and infers features which predict human performance directly from classification data. Most work on modeling non-linear, feature-based classification in humans has focused on verifying the use of a predefined set of features. Recent work by Cohen et al. [4] demonstrates that Gaussian mixture models can be used to recover features from human classification data without specifying a fixed set of possible features. The GRIFT model, described in the remainder of this paper, has the same goals as the previous work, but removes several limitations of the Gaussian mixture model approach, including the need to only use stimuli the subjects classified with high confidence and the bias that the signals can exert on the recovered features. GRIFT achieves these and other improvements by generatively modeling the entire classification process with a graphical model. Furthermore, the similarity between single-feature GRIFT models and the classification image process, described in more detail below, make GRIFT a natural successor to the traditional approach. 3 GRIFT model GRIFT models classification as the result of combining N conditionally independent feature detectors, F = {F1, F2, . . . , FN}. Each feature detector is binary valued (1 indicates detection), as is the classification, C (1 indicates one class and 2 the other). The stimulus, S, is an array of continuously valued pixels representing the input image. The stimulus only influences C through the feature detectors, therefore the joint probability of a stimulus and classification pair is P(C, S) = X F P(C|F)P(S) N Y i P(Fi|S) ! . Figure 1 represents the causal relationship between these variables (C, F, and S) with a Bayesian network. The network also includes nodes representing model parameters (ω, β, and λ), whose role will be described below. The boxed region in the figure indicates the parts of the model that are replicated when N > 1 — each feature detector is represented by an independent copy of those variables and parameters. The distribution of the stimulus, P(S), is under the control of the experimenter. The algorithm for fitting the model to data only assumes that the stimuli are independent and identically distributed across trials. The conditional distribution of each feature detector’s value, P(Fi|S), is modeled with a logistic regression function on the pixel values of S. Logistic regression is desirable because it is a probabilistic linear classifier. Humans can successfully classify images in the presence of extremely high additive noise, which suggests the use of averaging and contrast, linear computations which 2 are known to play important roles in human visual perception [9]. Just as the classification image used a random threshold to represent uncertainty in the output of its single linear classifier, logistic regression also allows GRIFT to represent uncertainty in the output of each of its feature detectors. The conditional distribution of C is represented by logistic regression on the feature outputs. Each Fi’s distribution has two parameters, a weight vector ωi and a threshold βi, such that P(Fi = 1|S, ωi, βi) = (1 + exp(βi + |S| X j=1 ωijSj))−1, where |S| is the number of pixels in a stimulus. Similarly, the conditional distribution of C is determined by λ = {λ0, λ1, . . . , λN} where P(C = 1|F, λ) = (1 + exp(λ0 + N X i=1 λiFi))−1. Detecting a feature with negative λi increases the probability that the subject will respond “class 1,” those with positive λi are associated with “class 2” responses. A GRIFT model with N features applied to the classification of images each containing |S| pixels has N(|S| + 2) + 1 parameters. This large number of parameters, coupled with the fact that the F variables are unobservable, makes fitting the model to data very challenging. Therefore, GRIFT defines prior distributions on its parameters. These priors reflect reasonable assumptions about the parameter values and, if they are wrong, can be overturned if enough contrary data is available. The prior on each of the λi parameters for which i > 0 is a mixture of two normal distributions, P(λi) = 1 2 √ 2π (exp(−(λi + 2)2 2 ) + exp(−(λi −2)2 2 )). This prior reflects the assumption that each feature detector should have a significant impact on the classification, but no single detector should make it deterministic — a single-feature model with λ0 = 0 and λ1 = −2 has an 88% chance of choosing class 1 if the feature is active. The λ0 parameter has an improper non-informative prior, P(λ0) = 1, indicating no preference for any particular value [5] because the best λ0 is largely determined by the other λis and the distributions of F and S. For analogous reasons, P(βi) = 1. The ωi parameters, which each have dimensionality equal to the stimulus, present the biggest inferential challenge. As mentioned previously, human visual processing is sensitive to contrasts between image regions. If one image region is assigned positive ωijs and another is assigned negative ωijs, the feature detector will be sensitive to the contrast between them. This contrast between regions requires all the pixels within each region to share similar ωij values. To encourage this local structure, the ωi parameters have Markov random field prior distributions: P(ωi) ∝  Y j (exp(−(ωij + 1)2 2 ) + exp(−(ωij −1)2 2 ))    Y (j,k)∈A exp(−(ωij −ωik)2 2 )  , where A is the set of neighboring pixel locations. The first factor encourages weight values to be near the -1 to 1 range, while the second encourages the assignment of similar weights to neighboring pixels. Fitting the model to data does not require the normalization of this distribution. The Bayesian joint probability distribution of all the parameters and variables is P(C, F, S, ω, β, λ) = P(C|F, λ)P(S)P(λ0) N Y i=1 P(Fi|S, ωi, βi)P(ωi)P(βi)P(λi). (1) 4 GRIFT algorithm The goal of the algorithm is to find the parameters that satisfy the prior distributions and best account for the (S, C) samples gathered from a human subject. Mathematically, this goal corresponds to finding the mode of P(ω, β, λ|S, C), where S and C refer to all of the observed samples. The 3 algorithm is derived using the expectation-maximization (EM) method [3], a widely used optimization technique for dealing with unobserved variables, in this case F, the feature detector outputs for all the trials. In order to determine the most probable parameter assignments, the algorithm chooses random initial parameters θ∗= (ω∗, β∗, λ∗) and then finds the θ that maximizes Q(θ|θ∗) = X F P(F|S, C, θ∗) log P(C, F, S|θ) + log P(θ). Q(θ|θ∗) is the expected log posterior probability of the parameters computed by using the current θ∗ to estimate the distribution of F, the unobserved feature detector activations. The θ that maximizes Q then becomes θ∗for the next iteration, and the process is repeated until convergence. The presence of both the P(C, F, S|θ) and P(θ) terms encourages the algorithm to find parameters that explain the data and match the assumptions encoded in the parameter prior distributions. As the amount of available data increases, the influence of the priors decreases, so it is possible to discover features that are contrary to prior belief given enough evidence. Using the conditional independences from the Bayes net: Q(θ|θ∗) ∝ X F P(F|S, C, θ∗) log P(C|F, λ) + N X i=1 log P(Fi|S, ωi, βi) ! + N X i=1 (log P(ωi) + log P(λi)) , dropping the log P(S) term, which is independent of the parameters, and the log P(λ0) and log P(βi) terms, which are 0. As mentioned before, the normalization terms for the log P(ωi) elements can be ignored during optimization — the log makes them additive constants to Q. The functional form of every additive term is described in Section 3, and P(F|S, C, θ∗) can be calculated using the model’s joint probability function (Equation 1). Each iteration of EM requires maximizing Q, but it is not possible to compute the maximizing θ in closed form. Fortunately, it is relatively easy to search for the best θ. Because Q is separable into many additive components, it is possible to efficiently compute its gradient with respect to each of the elements of θ and use this information to find a locally maximum θ assignment using the scaled conjugate gradient algorithm [2]. Even a locally maximum value of θ usually provides good EM results — P(ω, β, λ|S, C) is still guaranteed to improve after every iteration. The result of any EM procedure is only guaranteed to be a locally optimal answer, and finding the globally optimal θ is made more challenging by the large number of parameters. GRIFT adopts the standard solution of running EM many times, each instance starting with a random θ∗, and then accepting the θ from the run which produced the most probable parameters. For this model and the data presented in the following sections, 20-30 random restarts were sufficient. 5 Experiments The GRIFT model was fit to data from 3 experiments. In each experiment, human participants classified stimuli into two classes. Each class contained one or more target stimuli. In each trial, the participant saw a stimulus (a sample from S) that consisted of a randomly chosen target with high levels of independent identically distributed noise added to each pixel. The noise samples were drawn from a truncated normal distribution to ensure that the stimulus pixel values remained within the display’s output range. Figure 1 shows the classes and targets from each experiment and a sample stimulus from each class. In the four-square experiment four participants were asked to distinguish between two artificial stimulus classes, one in which there were bright squares in the upper-left or upper-right corners and one in which there were bright squares in the lower-left or lower-right corners. In the light-dark experiment three participants were asked to distinguish between three strips that each had two light blobs and three strips that each had only one light blob. Finally, in the faces experiment three participants were asked to distinguish between two faces. The four-square data were collected by [7] and were also analyzed in [4]. The other data are newly gathered. Each data set consists of approximately 4000 trials from each subject. To maintain their interest in the task, participants were given auditory feedback after each trial that indicated success or failure. 4 1 2 3 4 5 0.05 0.1 0.15 0.2 simulations 1 2 3 4 0.05 0.1 0.15 0.2 0.25 humans N=1 N=2 N=3 N=4 four square: most probable ωi values humans simulations + N mutual information JG 2 3 4 a b c d RS 2 3 4 a b c d corners 3 4 5 6 7 8 9 10 z top v. bottom 2 3 4 a b c d EA 3 4 5 6 7 8 9 10 z 2 3 4 a b c d AC Figure 2: The most probable ω parameters found for the four-square experiments for different values of N and the mutual information between these feature detectors and the observed classifications. Fitting GRIFT models is not especially sensitive to the random initialization procedure used to start each EM instance. The λ∗parameters were initialized by normal random samples and then half were negated so the features would tend to start evenly assigned to the two classes, except for λ∗ 0, which was initialized to 0. In the four-square experiments, the ω∗parameters were initialized by a mixture of normal distributions and in the light-dark experiments they were initialized from a uniform distribution. In the faces experiments the ω∗were initialized by adding normal noise to the optimal linear classifier separating the two targets. Because of the large number of pixels in the faces stimuli, the other initialization procedures frequently produced initial assignments with extremely low probabilities, which led to numerical precision problems. In the four-square experiments, the β∗were initialized randomly. In the other experiments, the intent was to set them to the optimal threshold for distinguishing the classes using the initial ω∗as a linear classifier, but a programming error set them to the negation of that value. In most cases, the results were insensitive to the choice of initialization method. In the four-square experiment, the noise levels were continually adjusted to keep the participants’ performance at approximately 71% using the stair-casing algorithm [8]. This performance level is high enough to keep the participants engaged in the task, but allows for sufficient noise to explore their responses in a large volume of the stimulus space. After an initial adaptation period, the noise level remains relatively constant across trials, so the inter-trial dependence introduced by the stair-casing can be safely ignored. Two simulated observers were created to validate GRIFT on the four-square task. Each used a GRIFT model with pre-specified parameters to probabilistically classify four-square data at a fixed noise level, which was chosen to produce approximately 70% correct performance. The corners observer used four feature detectors, one for each bright corner, whereas the top-v.-bottom observer contrasted the brightness of the top and bottom pixels. The result of using GRIFT to recover the feature detectors are displayed in Figure 2. Only the ω parameters are displayed because they are the most informative. Dark pixels indicate negative weights and bright pixels correspond to positive weights. The presence of dark and light regions in a feature detector indicates the computation of contrasts between those areas. The sign of the weights is not significant — given a fixed number of features, there are typically several equivalent sets of feature detectors that only differ from each other in the signs of their ω terms and in the associated λ and β values. Because the optimal number of features for human subjects is unknown, GRIFT models with 1–4 features were fit to the data from each subject. The correct number of features could be determined by holding out a test set or by performing cross-validation. Simulation demonstrated that a reliable test set would need to contain nearly all of the gathered samples, and computational expense made cross-validation impractical with our current MATLAB implementation. Instead, after recovering the parameters, we estimated the mutual information between the unobserved F variables and the observed classifications C. Mutual information measures how well the feature detector outputs can 5 predict the subject’s classification decision. Unlike the log likelihood of the observations, which is dependent on the choice to model C with a logistic regression function, mutual information does not assume a particular relationship between F and C and does not necessarily increase with N. Plotting the mutual information as N increases can indicate if new detectors are making a substantial contribution or are overfitting the data. On the simulated observers’ data, for which the true values of N were known, mutual information was a more accurate model selection indicator than traditional statistics such as the Bayesian or Akaike information criteria [3]. Fitting GRIFT to the simulated observers demonstrated that if the model is accurate, the correct features can be recovered reliably. The top-v.-bottom observer showed no substantial increase in mutual information as the number of features increased from 1 to 4. Each set of recovered feature detectors included a top-bottom contrast detector and other detectors with noisy ωis that did not contribute much to predicting C. Although the observer truly used two detectors, one top-brighter detector and one bottom-brighter detector, the recovery of only one top-bottom contrast detector is a success because one contrast detector plus a suitable λ0 term is logically equivalent to the original two-feature model. The corners observer showed a substantial increase in mutual information as N increased from 1 to 4 and the ω values clearly indicate four corner-sensitive feature detectors. The corners data was also tested with a five-feature GRIFT model (ω not shown) which produced four corner detectors and one feature with noisy ωi. Its gain in mutual information was smaller than that observed on any of the previous steps. Note the corner areas in the ωis recovered from the corners data are sometimes black and sometimes white. Recall that these are not image pixel values that the detectors are attempting to match, but positive and negative weights indicating that the brightness in the corner region is being contrasted to the brightness of the rest of the image. Even though targets consisted of four bright-corner stimuli, recovering the parameters from the topv.-bottom observer never produced ω values indicating corner-specific feature detectors. An important advantages of GRIFT over previous methods such as [4] is that targets will not “contaminate” the recovered detectors. The simulations demonstrate that the recovered detectors are determined by the classification strategy, not by the structure of the targets and classes. The data of the four human participants revealed some interesting differences. Participants EA and RS were naive, while AC and JG were not. The largest disparity was between EA and JG. EA’s data indicated no consistent pattern of mutual information increase after two features, and the twofeature model appears to contain two top-bottom contrast detectors. Therefore, it is reasonable to conclude that EA was not explicitly detecting the corners. At the other extreme is participant JG, whose data shows four very clear corner detectors and a steady increase in mutual information up to four features. Therefore, it seems very likely that this participant was matching corners and probably should be tested with a five-feature model to gain additional insight. AC and RS’s data suggest three corner detectors and a top-bottom contrast detector. GRIFT’s output indicates qualitative differences in the classification strategies used by the four human participants. Across all participants, the best one-feature model was based on the contrast between the top of the image and the bottom. This is extremely similar to the result produced by a classification image of the data, reinforcing the strong similarity between one-feature GRIFT and that approach. In the light-dark and faces experiments, stair-casing was used the adjust the noise level to the 71% performance level at the beginning of each session and then the noise level was fixed for the remaining trials to improve the independence of the samples. Participants were paid and promised a $10 reward for achieving the highest score on the task. Participants P1, P2, and P3 classified the light-dark stimuli. P1 and P2 achieved at or above the expected performance level (82% and 73% accuracy), while P3’s performance was near chance (55%). Because the noise levels were fixed after the first 101 trials, a participant with good luck at the end of that period could experience very high noise levels for the remainder of the experiment, leading to poor performance. All three participants appear to have used different classification methods, providing a very informative contrast. The results of fitting the GRIFT model are in Figure 3. The flat mutual information graph and the presence of a feature detector thresholding the overall brightness for each value of N indicate that P1 pursued a one-feature, linear-classifier strategy. P2, on the other hand, clearly employed a multi-feature, non-linear strategy. For N = 1 and N = 2, the most interpretable feature detector is an overall brightness detector, which disappears when N = 3 and the best fit model consists of three detectors looking for specific patterns, one for each position a 6 light-dark: most probable ωi values N=1 N=2 N=3 N=4 N=5 + P2 2 3 4 a b c d P3 1 2 3 4 5 6 7 8 9 10 0 1 2 3 4 5 6 7 8 9 1 z P1 2 3 4 a b c d N=1 N=2 N=3 faces: most probable ωi values P5 1 2 3 4 0.05 0.1 0.15 0.2 0.25 a b c d P6 1 2 3 4 5 6 7 8 9 10 0 0.1 0.2 0.3 0.4 0.5 0.6 0.7 0.8 0.9 1 z P4 1 2 3 4 0.05 0.1 0.15 0.2 0.25 a b c d + 1 2 3 4 5 0 0.05 0.1 0.15 0.2 mutual information N light-dark 1 2 3 0 0.01 0.02 0.03 0.04 mutual information N faces Figure 3: The most probable ω parameters found for the light-dark and faces experiments for different N and the mutual information between these feature detectors and the observed classifications. bright or dark spot can appear. Then when N = 4 the overall brightness detector reappears, added to the three spot detectors. Apparently the spot detectors are only effective if they are all present. With only three available detectors, the overall brightness detector is excluded, but the optimal assignment includes all four detectors. This is the best-fit model because increasing to N = 5 keeps the mutual information constant and adds a detector that is active for every stimulus. Always active detectors function as constant additions to λ0, therefore this is equivalent to the N = 4 solution. The GRIFT models of participant P3 do not show a substantial increase in mutual information as the number of features rises. This lack of increase leads to the conclusion that the one-feature model is probably the best fit, and since performance was extremely low, it can be assumed that the subject was reduced to near random guessing much of the time. The clear distinction between the results for all three subjects demonstrates the effectiveness of GRIFT and the mutual information measure in distinguishing between classification strategies. The faces presented the largest computational challenges. The targets were two unfiltered faces from Gold et al.’s data set [6], down-sampled to 128x128. After the experiment, the stimuli were down-sampled further to 32x32 and the background surrounding the faces was removed by cropping, reducing the stimuli to 26x17. These steps made the algorithm computationally feasible, and reduced the number of parameters so they would be sufficiently constrained by the samples. The results for three participants (P4, P5, and P6) are in Figure 3. Participants P4 and P5’s data were clearly best fit by one-feature GRIFT models. Increasing the number of features simply caused the algorithm to add features that were never or always active. Never active features cannot affect the classification, and, as explained previously, always active features are also superfluous. P4’s onefeature model clearly places significant weight near the eyebrows, nose, and other facial features. P5’s one-feature weights are much noisier and harder to interpret. This might be related to P5’s poor performance on the task — only 53% accuracy compared to P4’s 72% accuracy. Perhaps the noise level was too high and P5 was guessing rather than using image information much of the time. Participant P6’s data did produce a two-feature GRIFT model, albeit one that is difficult to interpret and which only caused a small rise in mutual information. Instead of recovering independent part detectors, such as a nose detector and an eye detector, GRIFT extracted two subtly different holistic feature detectors. Given P6’s poor performance (58% accuracy) these features may, like P5’s results, be indicative of a guessing strategy that was not strongly influenced by the image information. The results on faces support the hypothesis that face classification is holistic and configural, rather than the result of part classifications, especially when individual feature detection is difficult [11]. 7 Across these experiments, the data collected were compatible with the original classification image method. In fact, the four-square human data were originally analyzed using that algorithm. One of the advantages of GRIFT is that it can reanalyze old data to reveal new information. In the onefeature case, GRIFT enables the use of prior probabilities on the parameters, which may improve performance when data is too scarce for the classification image approach. Most importantly, fitting multi-feature GRIFT models can reveal previously hidden non-linear classification strategies. 6 Conclusion This paper has described the GRIFT model for determining the features used in human image classification. GRIFT is an advance over previous methods that assume a single linear classifier on pixels because it describes classification as the combination of multiple independently detected features. It provides a probabilistic model of human visual classification that accounts for data and incorporates prior beliefs about the features. The feature detectors it finds are associated with the classification strategy employed by the observer and are not the result of structure in the classes’ target images. GRIFT’s value has been demonstrated by modeling the performance of humans on the four-square, light-dark, and faces classification tasks and by successfully recovering the parameters of computer simulated observers in the four-square task. Its inability to find multiple local features when analyzing human performance on the faces task agrees with previous results. One of the strengths of the graphical model approach is that it allows easy replacement of model components. An expert can easily change the prior distributions on the parameters to reflect knowledge gained in previous experiments. For example, it might be desirable to encourage the formation of edge detectors. New resolution-independent feature parameterizations can be introduced, as can transformation parameters to make the features translationally and rotationally invariant. If the features have explicitly parameterized locations and orientations, the model could be extended to model their joint relative positions, which might provide more information about domains such as face classification. The success of this version of GRIFT provides a firm foundation for these improvements. Acknowledgments This research was supported by NSF Grant SES-0631602 and NIMH grant MH16745. The authors thank the reviewers, Tom Griffiths, Erik Learned-Miller, and Adam Sanborn for their suggestions. References [1] A.J. Ahumada, Jr. Classification image weights and internal noise level estimation. Journal of Vision, 2(1), 2002. [2] C.M. Bishop. Neural Networks for Pattern Recognition. Oxford University Press, 1995. [3] C.M. Bishop. Pattern Recognition and Machine Learning. Springer, 2006. [4] A.L. Cohen, R.M. Shiffrin, J.M. Gold, D.A. Ross, and M.G. Ross. Inducing features from visual noise. Journal of Vision, 7(8), 2007. [5] A. Gelman, J.B. Carlin, H.S. Stern, and D.B. Rubin. Bayesian Data Analysis. Chapman & Hall/CRC, 2003. [6] J.M. Gold, P.J. Bennett, and A.B. Sekuler. Identification of band-pass filtered letters and faces by human and ideal observers. Vision Research, 39, 1999. [7] J.M. Gold, A.L. Cohen, and R. Shiffrin. Visual noise reveals category representations. Psychonomics Bulletin & Review, 15(4), 2006. [8] N.A. Macmillan and C.D. Creelman. Detection Theory: A User’s Guide. Lawrence Erlbaum Associates, 2005. [9] S.E. Palmer. Vision Science: Photons to Phenomenology. The MIT Press, 1999. [10] D.G. Pelli, B. Farell, and D.C. Moore. The remarkable inefficiency of word recognition. Nature, 425, 2003. [11] J. Sergent. An investigation into component and configural processes underlying face perception. British Journal of Psychology, 75, 1984. 8
2007
114
3,142
An in-silico Neural Model of Dynamic Routing through Neuronal Coherence Devarajan Sridharan∗†, Brian Percival∗‡, John Arthur♮and Kwabena Boahen♮ † Program in Neurosciences, ‡ Department of Electrical Engineering and ♮Department of Bioengineering Stanford University ∗These authors contributed equally {dsridhar, bperci, jarthur, boahen}@stanford.edu Abstract We describe a neurobiologically plausible model to implement dynamic routing using the concept of neuronal communication through neuronal coherence. The model has a three-tier architecture: a raw input tier, a routing control tier, and an invariant output tier. The correct mapping between input and output tiers is realized by an appropriate alignment of the phases of their respective background oscillations by the routing control units. We present an example architecture, implemented on a neuromorphic chip, that is able to achieve circular-shift invariance. A simple extension to our model can accomplish circular-shift dynamic routing with only O(N) connections, compared to O(N 2) connections required by traditional models. 1 Dynamic Routing Circuit Models for Circular-Shift Invariance Dynamic routing circuit models are among the most prominent neural models for invariant recognition [1] (also see [2] for review). These models implement shift invariance by dynamically changing spatial connectivity to transform an object to a standard position or orientation. The connectivity between the raw input and invariant output layers is controlled by routing units, which turn certain subsets of connections on or off (Figure 1A). An important feature of this model is the explicit representation of what and where information in the main network and the routing units, respectively; the routing units use the where information to create invariant representations. Traditional solutions for shift invariance are neurobiologically implausible for at least two reasons. First, there are too many synaptic connections: for N input neurons, N output neurons and N possible input-output mappings, the network requires O(N2) connections in the routing layer— between each of the N routing units and each set of N connections that that routing unit gates (Figure 1A). Second, these connections must be extremely precise: each routing unit must activate an inputoutput mapping (N individual connections) corresponding to the desired shift (as highlighted in Figure 1A). Other approaches that have been proposed, including invariant feature networks [3,4], also suffer from significant drawbacks, such as the inability to explicitly represent where information [2]. It remains an open question how biology could achieve shift invariance without profligate and precise connections. In this article, we propose a simple solution for shift invariance for quantities that are circular or periodic in nature—circular-shift invariance (CSI)—orientation invariance in vision and key invariance in music. The visual system may create orientation-invariant representations to aid recognition under conditions of object rotation or head-tilt [5,6]; a similar mechanism could be employed by the auditory system to create key-invariant representations under conditions where the same melody 1 Figure 1: Dynamic routing. A In traditional dynamic routing, connections from the (raw) input layer to the (invariant) output layer are gated by routing units. For instance, the mapping from A to 5, B to 6, . . ., F to 4 is achieved by turning on the highlighted routing unit. B In time-division multiplexing (TDM), the encoder samples input channels periodically (using a rotating switch) while the decoder sends each sample to the appropriate output channel (based on its time bin). TDM can be extended to achieve a circular-shift transformation by altering the angle between encoder and decoder switches (θ), thereby creating a rotated mapping between input and output channels (adapted from [7]). is played in different keys. Similar to orientation, which is a periodic quantity, musical notes one octave apart sound alike, a phenomenon known as octave equivalence [8]. Thus, the problems of key invariance and orientation invariance admit similar solutions. Deriving inspiration from time-division multiplexing (TDM), we propose a neural network for CSI that uses phase to encode and decode information. We modulate the temporal window of communication between (raw) input and (invariant) output neurons to achieve the appropriate input–output mapping. Extending TDM, any particular circular-shift transformation can be accomplished by changing the relative angle, θ, between the rotating switches of the encoder (that encodes the raw input in time) and decoder (that decodes the invariant output in time) (Figure 1B). This obviates the need to hardwire routing control units that specifically modulate the strength of each possible inputoutput connection, thereby significantly reducing the complexity inherent in the traditional dynamic routing solution. Similarly, a remapping between the input and output neurons can be achieved by introducing a relative phase-shift in their background oscillations. 2 Dynamic Routing through Neuronal Coherence To modulate the temporal window of communication, the model uses a ring of neurons (the oscillation ring) to select the pool of neurons (in the projection ring) that encode or decode information at a particular time (Figure 2A). Each projection pool encodes a specific value of the feature (for example, one of twelve musical notes). Upon activation by external input, each pool is active only when background inhibition generated by the oscillation ring (outer ring of neurons) is at a minimum. In addition to exciting 12 inhibitory interneurons in the projection ring, each oscillation ring neuron excites its nearest 18 neighbors in the clockwise direction around the oscillation ring. As a result, a wave of inhibition travels around the projection ring that allows only one pool to be excitable at any point in time. These neurons become excitable at roughly the same time (numbered sectors, inner ring) by virtue of recurrent excitatory intra-pool connections. Decoding is accomplished by a second tier of rings (Figure 2B). The projection ring of the first (input) tier connects all-to-all to the projection ring of the second (output) tier. The two oscillation rings create a window of excitability for the pools of neurons in their respective projection rings. Hence, the most effective communication occurs between input and output pools that become excitable at the same time (i.e. are oscillating in phase with one another [9]). The CSI problem is solved by introducing a phase-shift between the input and output tiers. If they are exactly in phase, then an input pool is simply mapped to the output pool directly above it. If their 2 Figure 2: Double-Ring Network for Encoding and Decoding. A The projection (inner) ring is divided into (numbered) pools. The oscillation (outer) ring modulates sub-threshold activity (waveforms) of the projection ring by exciting (black distribution) inhibitory neurons that inhibit neighboring projection neurons. A wave of activity travels around the oscillation ring due to asymmetric excitatory connections, creating a corresponding wave of inhibitory activity in the projection ring, such that only one pool of projection neurons is excitable (spikes) at a given time. B Two instances of the double-ring structure from A. The input projection ring connects all-to-all to the output projection ring (dashed lines). Because each input pool will spike only during a distinct time bin, and each output pool is excitable only in a certain time bin, communication occurs between input and output pools that are oscillating in phase with each other. Appropriate phase offset between input and output oscillation rings realizes the desired circular shift (input pool H to output pool 1, solid arrow). C Interactions among pools highlighted in B. phases are different, the input is dynamically routed to an appropriate circularly shifted position in the output tier. Such changes in phase are analogous to adjusting the angle of the rotating switch at either the encoder or the decoder in TDM (see Figure 1B). There is some evidence that neural systems could employ phase relationships of subthreshold oscillations to selectively target neural populations [9-11]. 3 Implementation in Silicon We implemented this solution to CSI on a neuromorphic silicon chip [12]. The neuromorphic chip has neurons whose properties resemble that of biological neurons; these neurons even have intrinsic differences, thereby mimicking heterogeneity in real neurobiological systems. The chip uses a conductance-based spiking model for both inhibitory and excitatory neurons. Inhibitory neurons project to nearby excitatory and inhibitory neurons via a diffusor network that determines the spread of inhibition. A lookup table of excitatory synaptic connectivity is stored in a separate randomaccess memory (RAM) chip. Spikes occurring on-chip are converted to a neuron address, mapped to synapses (if any) via the lookup table, and routed to the targeted on-chip synapse. A universal serial bus (USB) interface chip communicates spikes to and from a computer, for external input and 3 Figure 3: Traveling-wave activity in the oscillation ring. A Population activity (5ms bins) of a pool of eighteen (adjacent) oscillation neurons. B Increasing the strength of feedforward excitation led to increasing frequencies of periodic firing in the θ and α range (1-10 Hz). Strength of excitation is the amplitude change in post-synaptic conductance due to a single pre-synaptic spike (measured relative to minimum amplitude used). data analysis, respectively. Simulations on the chip occur in real-time, making it an attractive option for implementing the model. We configured the following parameters: • Magnitude of a potassium M-current: increasing this current’s magnitude increased the post-spike repolarization time of the membrane potential, thereby constraining spiking to a single time bin per cycle. • The strength of excitatory and inhibitory synapses: a correct balance had to be established between excitation and inhibition to make only a small subset of neurons in the projection rings fire at a time—too much excitation led to widespread firing and too much inhibition led to neurons that were entirely silent or fired sporadically. • The space constant of inhibitory spread: increasing the spread was effective in preventing runaway excitation, which could occur due to the recurrent excitatory connections. We were able to create a stable traveling wave of background activity within the oscillation ring. We transiently stimulated a small subset of the neurons, which initiated a wave of activity that propagated in a stable manner around the ring after the transient external stimulation had ceased (Figure 3A). The network frequency determined from a Fourier transform of the network activity smoothed with a non-causal Gaussian kernel (FDHM = 80ms) was 7.4Hz. The frequency varied with the strength of the neurons’ excitatory connections (Figure 3B), measured as the amplitude of the step increase in membrane conductivity due to the arrival of a pre-synaptic spike. Over much of the range of the synaptic strengths tested, we observed stable oscillations in the θ and α bands (1-10Hz); the frequency appeared to increase logarithmically with synaptic strength. 4 Phase-based Encoding and Decoding In order to assess the best-case performance of the model, the background activity in the input and output projection rings was derived from the input oscillation ring. Their spikes were delivered to the appropriately circularly-shifted output oscillation neurons. The asymmetric feedforward connections were disabled in the output oscillation ring. For instance, in order to achieve a circular shift by k pools (i.e. mapping input projection pool 1 to output projection pool k + 1, input pool 2 to output pool k + 2, and so on), activity from the input oscillation neurons closest to input pool 1 was fed into the output oscillation neurons closest to output pool k. By providing the appropriate phase difference between input and output oscillation, we were able to assess the performance of the model under ideal conditions. In the Discussion section, we discuss a biologically plausible mechanism to control the relative phases. 4 Figure 4: Phase-based encoding. Rasters indicating activity of projection pools in 1ms bins, and mean phase of firing (×’s) for each pool (relative to arbitrary zero time). The abscissa shows firing time normalized by the period of oscillation (which may be converted to firing phase by multiplication by 2π). Under constant input to the input projection ring, the input pools fire approximately in sequence. Two cycles of pool activity normalized by maximum firing rate for each pool are shown in left inset (for clarity, pools 1-6 are shown in the top panel and pools 7-12 are shown separately in the bottom panel); phase of background inhibition of pool 4 is shown (below) for reference. Phase-aligned average1 of activity (right inset) showed that the firing times were relatively tight and uniform across pools: a standard deviation of 0.0945 periods, or equivalently, a spread of 1.135 pools at any instant of time. We verified that the input projection pools fired in a phase-shifted fashion relative to one another, a property critical for accurate encoding (see Figure 2). We stimulated all pools in the input projection ring simultaneously while the input oscillation ring provided a periodic wave of background inhibition. The mean phase of firing for each pool (relative to arbitrary zero time) increased nearly linearly with pool number, thereby providing evidence for accurate, phase-based encoding (Figure 4). The firing times of all pools are shown for two cycles of background oscillatory activity (Figure 4 left inset). A phase-aligned average1 showed that the timing was relatively tight (standard deviation 1.135 pools) and uniform across pools of neurons (Figure 4 right inset). We then characterized the system’s ability to correctly decode this encoding under a given circular shift. The shift was set to seven pools, mapping input pool 1 to output pool 8, and so on. Each input pool was stimulated in turn. We expected to see only the appropriately shifted output pool become highly active. In fact, not only was this pool active, but other pools around it were also active, though to a lesser extent (Figure 5A). Thus, the phase-encoded input was decoded successfully, and circularly shifted, except that the output units were broadly tuned. To quantify the overall precision of encoding and decoding, we constructed an input-locked average of the tuning curves (Figure 5B): the curves were circularly shifted to the left by an amount corresponding to the stimulated input pool number, and the raw pool firing rates were averaged. If the phase-based encoding and decoding were perfect, the peak should occur at a shift of 7 pools. 1The phase-aligned average was constructed by shifting the pool-activity curves by the (# of the pool) × ( 1 12 of the period) to align activity across pools, which was then averaged. 5 Figure 5: Decoding phase-encoded input. A In order to assess decoding performance under a given circular shift (here 7 pools) each input pool was stimulated in turn and activity in each output pool was recorded and averaged over 500ms. The pool’s response, normalized by its maximum firing rate, is plotted for each stimulated input pool (arrows pointing to curves, color code as in Figure 4). Each input pool stimulation trial consistently resulted in peak activity in the appropriate output pool; however, adjacent pools were also active, but to a lesser extent, resulting in a broad tuning curve. B The best-fit Gaussian (dot-dashed grey curve, σ = 2.30 pools) to the input-locked average of the raw pool firing rates (see text for details) revealed a maximum between a shift of 7 and 8 pools (inverted grey triangle; expected peak at a shift of 7 pools). Indeed, the highest (average) firing rate corresponded to a shift of 7 pools. However, the activity corresponding to a shift of 8 pools was nearly equal to that of 7 pools, and the best fitting Gaussian curve to the activity histogram (grey dot-dashed line) peaked at a point between pools 7 and 8 (inverted grey triangle). The standard deviation (σ) was 2.30 pools, versus the expected ideal σ of 1.60, which corresponds to the encoding distribution (σ = 1.135 pools) convolved with itself. 5 Discussion We have demonstrated a biologically plausible mechanism for the dynamic routing of information in time that obviates the need for precise gating of connections. This mechanism requires that a wave of activity propagate around pools of neurons arranged in a ring. While previous work has described traveling waves in a ring of neurons [13], and a double ring architecture (for determining head-direction) [14], our work combines these two features (twin rings with phase-shifted traveling waves) to achieve dynamic routing. These features of the model are found in the cortex: Bonhoeffer and Grinwald [15] describe iso-orientation columns in the cat visual cortex that are arranged in ring-like pinwheel patterns, with orientation tuning changing gradually around the pinwheel center. Moreover, Rubino et al. [16] have shown that coherent oscillations can propagate as waves across the cortical surface in the motor cortex of awake, behaving monkeys performing a delayed reaching task. Our solution for CSI is also applicable to music perception. In the Western twelve-tone, equaltemperament tuning system (12-tone scale), each octave is divided into twelve logarithmicallyspaced notes. Human observers are known to construct mental representations for raw notes that are invariant of the (perceived) key of the music: a note of C heard in the key of C-Major is perceptually equivalent to the note C# heard in the key of C#-Major [8,17]. In previous dynamic routing models of key invariance, the tonic—the first note of the key (e.g., C is the tonic of C-Major)— supplies the equivalent where information used by routing units that gate precise connections to map the raw note into a key-invariant output representation [17]. To achieve key invariance in our model, the bottom tier encodes raw note information while the top tier decodes key-invariant notes (Figure 6). The middle tier receives the tonic information and aligns the phase of the first output pool (whose invariant representation corresponds to the tonic) with the appropriate input pool (whose raw note representation corresponds to the tonic of the perceived key). 6 Figure 6: Phase-based dynamic routing to achieve key-invariance. The input (bottom) tier encodes raw note information, and the output (top) tier decodes key-invariant information. The routing (middle) tier sets the phase of the background wave activity in the input and output oscillation rings (dashed arrows) such that the first output pool is in phase with the input pool representing the note corresponding to the tonic. On the left, where G is the tonic, input pool G, output pool 1, and the routing tier are in phase with one another (black clocks), while input pool C and output pool 6 are in phase with one another (grey clocks). Thus, the raw note input, G, activates the invariant output 1, which corresponds to the perceived tonic invariant representation (heavy solid arrows). On the right, the same raw input note, G, is active, but the key is different and A is now the active tonic; thus the raw input, G, is now mapped to output pool 11. The tonic information is supplied to a specific pool in the routing ring according to the perceived key. This pool projects directly down to the input pool corresponding to the tonic. This ensures that the current tonic’s input pool is excitable in the same time bin as the first output pool. Each of the remaining raw input notes of the octave is mapped by time binning to the corresponding key-invariant representation in the output tier, as the phases of input pools are all shifted by the same amount. Supporting evidence for phase-based encoding of note information comes from MEG recordings in humans: the phase of the MEG signal (predominantly over right hemispheric sensor locations) tracks the note of the heard note sequence with surprising accuracy [18]. The input and output tiers’ periods must be kept in lock-step, which can be accomplished through more plausible means than employed in the current implementation of this model. Here, we maintained a fixed phase shift between the input and output oscillation rings by feeding activity from the input oscillation ring to the appropriately shifted pool in the output oscillation ring. This approach allowed us to avoid difficulties achieving coherent oscillations at identical frequencies in the input and output oscillation rings. Alternatively, entrainment could be achieved even when the frequencies are not identical—a more biologically plausible scenario—if the routing ring resets the phase of the input and output rings on a cycle-by-cycle basis. Lakatos et al. [19] have shown that somatosensory inputs can reset the phase of ongoing neuronal oscillations in the primary auditory cortex (A1), which helps in the generation of a unified auditory-tactile percept (the so-called “Hearing-Hands Effect”). A simple extension to our model can reduce the number of connections below the requirements of traditional dynamic routing models. Instead of having all-to-all connections between the input and output layers, a relay layer of very few (M ≪N) neurons could be used to transmit the spikes form the input neurons to the output neurons (analogous to the single wire connecting encoder and decoder in Figure 1B). A small number of (or ideally even one) relay neurons suffices because encoding and decoding occur in time. Hence, the connections between each input pool and the relay neurons require O(MN) ≈O(N) connections (as long as M does not scale with N) and those between the relay neurons and each output pool require O(MN) ≈O(N) connections as well. Thus, by removing all-to-all connectivity between the input and output units (a standard feature in traditional dynamic routing models), the number of required connections is reduced from O(N2) 7 to O(N). Further, by replacing the strict pool boundaries with nearest neighbor connectivity in the projection rings, the proposed model can accommodate a continuum of rotation angles. In summary, we propose that the mechanism of dynamic routing through neuronal coherence could be a general mechanism that could be used by multiple sensory and motor modalities in the neocortex: it is particularly suitable for placing raw information in an appropriate context (defined by the routing tier). Acknowledgments DS was supported by a Stanford Graduate Fellowship and BP was supported under a National Science Foundation Graduate Research Fellowship. References [1] Olshausen B.A., Anderson C.H. & Van Essen D.C. (1993). A neurobiological model of visual attention and invariant pattern recognition based on dynamic routing of information. Journal of Neuroscience 13(11):47004719. [2] Wiskott L. (2004). How does our visual system achieve shift and size invariance? In J.L. van Hemmen & T.J. Sejnowski (Eds.), 23 Problems in Systems Neuroscience, Oxford University Press. [3] Fukushima K., Miyake S. & Ito T. (1983). A neural network model for a mechanism of visual pattern recognition. IEEE Transactions on Systems, Man and Cybernetics 13:826-834. [4] Mel B.W., Ruderman D.L & Archie K.A. (1998). Translation invariant orientation tuning in visual “complex” cells could derive from intradendritic computations. Journal of Neuroscience 18(11):4325-4334. [5] McKone, E. & Grenfell, T. (1999). Orientation invariance in naming rotated objects: Individual differences and repetition priming. Perception and Psychophysics, 61:1590-1603. [6] Harris IM & Dux PE. (2005). Orientation-invariant object recognition: evidence from repetition blindness. Cognition, 95(1):73-93. [7] Naval Electrical Engineering Training Series (NEETS). Module 17, Radio-Frequency Communication Principles, Chapter 3, pp.32. Published online at http://www.tpub.com/content/neets/14189 (Integrated Publishing). [8] Krumhansl C.L. (1990). Cognitive foundations of musical pitch. Oxford University Press, 1990. [9] Fries P. (2005). A mechanism for cognitive dynamics: neuronal communication through neuronal coherence. Trends in Cognitive Sciences 9(10):474-480. [10] Buzsaki G. & Draguhn A. (2004). Neuronal Oscillations in Cortical Networks. Science 304(5679):19261929. [11] Sejnowski T.J. & Paulsen O. (2006). Network oscillations: Emerging computational principles. Journal of Neuroscience 26(6):1673-1676. [12] Arthur J.A. & Boahen K. (2005). Learning in Silicon: Timing is Everything. Advances in Neural Information Processing Systems 17, B Sholkopf and Y Weiss, Eds, MIT Press, 2006. [13] Hahnloser R.H.R., Sarpeshkar R., Mahowald M.A., Douglas R.J., & Seung H.S. (2000). Digital selection and analogue amplification coexist in a cortex-inspired silicon circuit. Nature 405:947-951. [14] Xie X., Hahnloser R.H.R., & Seung H.S (2002). Double-ring network modeling of the head-direction system. Phys. Rev. E66 041902:1-9. [15] Bonhoeffer K. & Grinwald A. (1991). Iso-orientation domains in cat visual cortex are arranged in pinwheel-like patterns. Nature 353:426-437. [16] Rubino D., Robbins K.A. & Hastopoulos N.G. (2006). Propagating waves mediate information transfer in the motor cortex. Nature Neuroscience 9:1549-1557. [17] Bharucha J.J. (1999). Neural nets, temporal composites and tonality. In D. Deutsch (Ed.), The Psychology of Music (2d Ed.) Academic Press, New York. [18] Patel A.D. & Balaban E. (2000). Temporal patterns of human cortical activity reflect tone sequence structure. Nature 404:80-84. [19] Lakatos P., Chen C., O’Connell M., Mills A. & Schroeder C. (2007). Neuronal oscillations and multisensory interaction in primary auditory cortex. Neuron 53(2):279-292. 8
2007
115
3,143
A general agnostic active learning algorithm Sanjoy Dasgupta UC San Diego dasgupta@cs.ucsd.edu Daniel Hsu UC San Diego djhsu@cs.ucsd.edu Claire Monteleoni UC San Diego cmontel@cs.ucsd.edu Abstract We present an agnostic active learning algorithm for any hypothesis class of bounded VC dimension under arbitrary data distributions. Most previous work on active learning either makes strong distributional assumptions, or else is computationally prohibitive. Our algorithm extends the simple scheme of Cohn, Atlas, and Ladner [1] to the agnostic setting, using reductions to supervised learning that harness generalization bounds in a simple but subtle manner. We provide a fall-back guarantee that bounds the algorithm’s label complexity by the agnostic PAC sample complexity. Our analysis yields asymptotic label complexity improvements for certain hypothesis classes and distributions. We also demonstrate improvements experimentally. 1 Introduction Active learning addresses the issue that, in many applications, labeled data typically comes at a higher cost (e.g. in time, effort) than unlabeled data. An active learner is given unlabeled data and must pay to view any label. The hope is that significantly fewer labeled examples are used than in the supervised (non-active) learning model. Active learning applies to a range of data-rich problems such as genomic sequence annotation and speech recognition. In this paper we formalize, extend, and provide label complexity guarantees for one of the earliest and simplest approaches to active learning—one due to Cohn, Atlas, and Ladner [1]. The scheme of [1] examines data one by one in a stream and requests the label of any data point about which it is currently unsure. For example, suppose the hypothesis class consists of linear separators in the plane, and assume that the data is linearly separable. Let the first six data be labeled as follows.      The learner does not need to request the label of the seventh point (indicated by the arrow) because it is not unsure about the label: any straight line with the ⊕s and ⊖s on opposite sides has the seventh point with the ⊖s. Put another way, the point is not in the region of uncertainty [1], the portion of the data space for which there is disagreement among hypotheses consistent with the present labeled data. Although very elegant and intuitive, this approach to active learning faces two problems: 1. Explicitly maintaining the region of uncertainty can be computationally cumbersome. 2. Data is usually not perfectly separable. 1 Our main contribution is to address these problems. We provide a simple generalization of the selective sampling scheme of [1] that tolerates adversarial noise and never requests many more labels than a standard agnostic supervised learner would to learn a hypothesis with the same error. In the previous example, an agnostic active learner (one that does not assume a perfect separator exists) is actually still uncertain about the label of the seventh point, because all six of the previous labels could be inconsistent with the best separator. Therefore, it should still request the label. On the other hand, after enough points have been labeled, if an unlabeled point occurs at the position shown below, chances are its label is not needed.                      To extend the notion of uncertainty to the agnostic setting, we divide the sampled data into two groups, S and T: S contains the data for which we have determined the label ourselves (we explain below how to ensure that they are consistent with the best separator in the class) and T contains the data for which we have explicitly requested a label. Now, somewhat counter-intuitively, the labels in S are completely reliable, whereas the labels in T could be inconsistent with the best separator. To decide if we are uncertain about the label of a new point x, we reduce to a supervised learning task: for each possible label ˆy ∈{±1}, we learn a hypothesis hˆy consistent with the labels in S ∪{(x, ˆy)} and with minimal empirical error on T. If, say, the error of the hypothesis h+1 is much larger than that of h−1, we can safely infer that the best separator must also label x with −1 without requesting a label; if the error difference is only modest, we explicitly request a label. Standard generalization bounds for an i.i.d. sample let us perform this test by comparing empirical errors on S ∪T. The last claim may sound awfully suspicious, because S ∪T is not i.i.d.! Indeed, this is in a sense the core sampling problem that has always plagued active learning: the labeled sample T might not be i.i.d. (due to the filtering of examples based on an adaptive criterion), while S only contains unlabeled examples (with made-up labels). Nevertheless, we prove that in our case, it is in fact correct to effectively pretend S ∪T is an i.i.d. sample. A direct consequence is that the label complexity of our algorithm (the number of labels requested before achieving a desired error) is never much more than the usual sample complexity of supervised learning (and in some cases, is significantly less). An important algorithmic detail is the specific choice of generalization bound we use in deciding whether to request a label or not. The usual additive bounds with rate n−1/2 are too loose, e.g. we know in the zero-error case the rate should be n−1. Our algorithm magnifies this small polynomial difference in the bound into an exponential difference in label complexity, so it is crucial for us to use a good bound. We use a normalized bound that takes into account the empirical error (computed on S∪T) of the hypothesis in question. In this paper, we present and analyze a simple agnostic active learning algorithm for general hypothesis classes of bounded VC dimension. It extends the selective sampling scheme of Cohn et al. [1] to the agnostic setting, using normalized generalization bounds, which we apply in a simple but subtle manner. For certain hypothesis classes and distributions, our analysis yields improved label complexity guarantees over the standard sample complexity of supervised learning. We also demonstrate such improvements experimentally. 1.1 Related work Our algorithm extends the selective sampling scheme of Cohn et al. [1] (described above) to the agnostic setting. Most previous work on active learning either makes strong distributional assumptions (e.g. separability, uniform input distribution) [1–8], or is generally computationally prohibitive [2,4,9]. See [10] for a discussion of these results. A natural way to formulate active learning in the agnostic setting is to ask the learner to return a hypothesis with error at most ν + ε (where ν is the error of the best hypothesis in 2 the specified class) using as few labels as possible. A basic constraint on the label complexity was pointed out by K¨a¨ari¨ainen [11], who showed that for any ν ∈(0, 1/2), there are data distributions that force any active learner that achieves error at most ν + ε to request Ω((ν/ε)2) labels. The first rigorously-analyzed agnostic active learning algorithm, called A2, was developed recently by Balcan, Beygelzimer, and Langford [9]. Like Cohn-AtlasLadner [1], this algorithm uses a region of uncertainty, although the lack of separability complicates matters and A2 ends up explicitly maintaining an ε-net of the hypothesis space. Subsequently, Hanneke [12] characterized the label complexity of the A2 algorithm in terms of a parameter called the disagreement coefficient. Our work was inspired by both [1] and [9], and we have built heavily upon their insights. Our algorithm overcomes their complications by employing reductions to supervised learning.1 We bound the label complexity of our method in terms of the same parameter as used for A2 [12], and get a somewhat better dependence (linear rather than quadratic). 2 Preliminaries 2.1 Learning framework and uniform convergence Let X be the input space, D a distribution over X × {±1} and H a class of hypotheses h : X →{±1} with VC dimension vcdim(H) = d < ∞(the finiteness ensures the nth shatter coefficient S(H, n) is at most O(nd) by Sauer’s lemma). We denote by DX the marginal of D over X. In our active learning model, the learner receives unlabeled data sampled from DX ; for any sampled point x, it can optionally request the label y sampled from the conditional distribution at x. This process can be viewed as sampling (x, y) from D and revealing only x to the learner, keeping the label y hidden unless the learner explicitly requests it. The error of a hypothesis h under D is errD(h) = Pr(x,y)∼D[h(x) ̸= y], and on a finite sample Z ⊂X ×{±1}, the empirical error of h is err(h, Z) = P (x,y)∈Z 1l[h(x) ̸= y]/|Z|, where 1l[·] is the 0-1 indicator function. We assume for simplicity that the minimal error ν = inf{errD(h) : h ∈H} is achieved by a hypothesis h∗∈H. Our algorithm uses the following normalized uniform convergence bound [14, p. 200]. Lemma 1 (Vapnik and Chervonenkis [15]). Let F be a family of measurable functions f : Z →{0, 1} over a space Z. Denote by EZf the empirical average of f over a subset Z ⊂Z. Let αn = p (4/n) ln(8S(F, 2n)/δ). If Z is an i.i.d. sample of size n from a fixed distribution over Z, then, with probability at least 1 −δ, for all f ∈F: −min  αn p EZf, α2 n + αn p Ef  ≤Ef −EZf ≤min  α2 n + αn p EZf, αn p Ef  . 2.2 Disagreement coefficient We will bound the label complexity of our algorithm in terms of (a slight variation of) the disagreement coefficient θ introduced in [12] for analyzing the label complexity of A2. Definition 1. The disagreement metric ρ on H is defined by ρ(h, h′) = Prx∼DX [h(x) ̸= h′(x)]. The disagreement coefficient θ = θ(D, H, ε) > 0 is θ = sup Prx∼DX [∃h ∈B(h∗, r) s.t. h(x) ̸= h∗(x)] r : r ≥ε + ν  where B(h, r) = {h′ ∈H : ρ(h, h′) < r}, h∗= arg infh∈H errD(h), and ν = errD(h∗). The quantity θ bounds the rate at which the disagreement mass of the ball B(h∗, r) – the probability mass of points on which hypotheses in B(h∗, r) disagree with h∗– grows as a function of the radius r. Clearly, θ ≤1/(ε + ν); furthermore, it is a constant bounded 1It has been noted that the Cohn-Atlas-Ladner scheme can easily be made tractable using a reduction to supervised learning in the separable case [13, p. 68]. Although our algorithm is most naturally seen as an extension of Cohn-Atlas-Ladner, a similar reduction to supervised learning (in the agnostic setting) can be used for A2 [10]. 3 Algorithm 1 Input: stream (x1, x2, . . . , xm) i.i.d. from DX Initially, S0 ←∅and T0 ←∅. For n = 1, 2, . . . , m: 1. For each ˆy ∈{±1}, let hˆy ←LEARNH(Sn−1 ∪{(xn, ˆy)}, Tn−1). 2. If err(h−ˆy, Sn−1 ∪Tn−1) −err(hˆy, Sn−1 ∪Tn−1) > ∆n−1 for some ˆy ∈{±1} (or if no such h−ˆy is found) then Sn ←Sn−1 ∪{(xn, ˆy)} and Tn ←Tn−1. 3. Else request yn; Sn ←Sn−1 and Tn ←Tn−1 ∪{(xn, yn)}. Return hf = LEARNH(Sm, Tm). Figure 1: The agnostic selective sampling algorithm. See (1) for how to set ∆n. independently of 1/(ε + ν) in several cases previously considered in the literature [12]. For example, if H is homogeneous linear separators and DX is the uniform distribution over the unit sphere in Rd, then θ = Θ( √ d). 3 Agnostic selective sampling Here we state and analyze our general algorithm for agnostic active learning. The main techniques employed by the algorithm are reductions to a supervised learning task and generalization bounds applied to differences of empirical errors. 3.1 A general algorithm for agnostic active learning Figure 1 states our algorithm in full generality. The input is a stream of m unlabeled examples drawn i.i.d from DX ; for the time being, m can be thought of as ˜O((d/ε)(1+ν/ε)) where ε is the accuracy parameter.2 For S, T ⊂X × {±1}, let LEARNH(S, T) denote a supervised learner that returns a hypothesis h ∈H consistent with S, and with minimum error on T. Algorithm 1 maintains two sets of labeled examples, S and T, each of which is initially empty. Upon receiving xn, it learns two hypotheses, hˆy = LEARNH(S ∪{(xn, ˆy)}, T) for ˆy ∈{±1}, and then compares their empirical errors on S ∪T. If the difference is large enough3, it is possible to infer how h∗labels xn (as we show in Lemma 3). In this case, the algorithm adds xn, with this inferred label, to S. Otherwise, the algorithm requests the label yn and adds (xn, yn) to T. Thus, S contains examples with inferred labels consistent with h∗, and T contains examples with their requested labels. Because h∗might err on some examples in T, we just insist that LEARNH find a hypothesis with minimal error on T. Meanwhile, by construction, h∗ is consistent with S, so we require LEARNH to only consider hypotheses consistent with S. 3.2 Bounds for error differences We still need to specify ∆n, the threshold value for error differences that determines whether the algorithm requests a label or not. Intuitively, ∆n should reflect how closely empirical errors on a sample approximate true errors on the distribution D. The setting of ∆n can only depend on observable quantities, so we first clarify the distinction between empirical errors on Sn ∪Tn and those with respect to the true (hidden) labels. Definition 2. Let Sn and Tn be as defined in Algorithm 1. Let S! n be the set of labeled examples identical to those in Sn, except with the true hidden labels swapped in. Thus, for example, S! n ∪Tn is an i.i.d. sample from D of size n. Finally, let err! n(h) = err(h, S! n ∪Tn) and errn(h) = err(h, Sn ∪Tn). 2The ˜O notation suppresses log 1/δ and terms polylogarithmic in those that appear. 3If LEARNH cannot find a hypothesis consistent with S ∪{(xn, y)} for some y, then it is clear that h∗(x) = −y. In this case, we simply add (xn, −y) to S, regardless of ∆n−1. 4 It is straightforward to apply Lemma 1 to empirical errors on S! n ∪Tn, i.e. to err! n(h), but we cannot use such bounds algorithmically: we do not request the true labels for points in Sn and thus cannot reliably compute err! n(h). What we can compute are error differences err! n(h)−err! n(h′) for pairs of hypotheses (h, h′) that agree on (and make the same mistakes on) Sn, since for such pairs, we have err! n(h) −err! n(h′) = errn(h) −errn(h′). Definition 3. For a pair (h, h′) ∈H × H, define g+ h,h′(x, y) = 1l[h(x) ̸= y ∧h′(x) = y] and g− h,h′(x, y) = 1l[h(x) = y ∧h′(x) ̸= y]. With this notation, we have err(h, Z) −err(h′, Z) = EZ[g+ h,h′] −EZ[g− h,h′] for any Z ⊂X × {±1}. Now, applying Lemma 1 to G = {g+ h,h′ : (h, h′) ∈H × H} = {g− h,h′ : (h, h′) ∈H × H}, and noting that S(G, n) ≤S(H, n)2, gives the following lemma. Lemma 2. Let αn = p (4/n) ln(8S(H, 2n)2/δ). With probability at least 1 −δ over an i.i.d. sample Z of size n from D, we have for all (h, h′) ∈H × H, err(h, Z) −err(h′, Z) ≤errD(h) −errD(h′) + α2 n + αn q EZ[g+ h,h′] + q EZ[g− h,h′]  . Corollary 1. Let βn = p (4/n) ln(8(n2 + n)S(H, 2n)2/δ). Then, with probability at least 1 −δ, for all n ≥1 and all (h, h′) ∈H × H consistent with Sn, we have errn(h) −errn(h′) ≤errD(h) −errD(h′) + β2 n + βn( p errn(h) + p errn(h′)). Proof. Applying Lemma 2 to each S! n ∪Tn (replacing δ with δ/(n2 + n)) and a union bound implies, with probability at least 1 −δ, the bounds in Lemma 2 hold simultaneously for all n ≥1 and all (h, h′) ∈H2 with S! n ∪Tn in place of Z. The corollary follows because err! n(h) −err! n(h′) = errn(h) −errn(h′); and because g+ h,h′(x, y) ≤1l[h(x) ̸= y] and g− h,h′(x, y) ≤1l[h′(x) ̸= y] for (h, h′) consistent with Sn, so ES! n∪Tn[g+ h,h′] ≤errn(h) and ES! n∪Tn[g− h,h′] ≤errn(h′). Corollary 1 implies that we can effectively apply the normalized uniform convergence bounds from Lemma 1 to empirical error differences on Sn ∪Tn, even though Sn ∪Tn is not an i.i.d. sample from D. In light of this, we use the following setting of ∆n: ∆n := β2 n + βn p errn(h+1) + p errn(h−1)  (1) where βn = p (4/n) ln(8(n2 + n)S(H, 2n)2/δ) = ˜O( p d log n/n) as per Corollary 1. 3.3 Correctness and fall-back analysis We now justify our setting of ∆n with a correctness proof and fall-back guarantee. Lemma 3. With probability at least 1 −δ, the hypothesis h∗= arg infh∈H errD(h) is consistent with Sn for all n ≥0 in Algorithm 1. Proof. Apply the bounds in Corollary 1 and proceed by induction on n. The base case is trivial since S0 = ∅. Now assume h∗is consistent with Sn. Suppose upon receiving xn+1, we discover errn(h+1) −errn(h−1) > ∆n. We will show that h∗(xn+1) = −1 (assume both h+1 and h−1 exist, since it is clear h∗(xn+1) = −1 if h+1 does not exist). Suppose for the sake of contradiction that h∗(xn+1) = +1. We know the that errn(h∗) ≥errn(h+1) (by inductive hypothesis) and errn(h+1) −errn(h−1) > β2 n + βn( p errn(h+1) + p errn(h−1)). In particular, errn(h+1) > β2 n. Therefore, errn(h∗) −errn(h−1) = (errn(h∗) −errn(h+1)) + (errn(h+1) −errn(h−1)) > p errn(h+1)( p errn(h∗) − p errn(h+1)) + β2 n + βn( p errn(h+1) + p errn(h−1)) > βn( p errn(h∗) − p errn(h+1)) + β2 n + βn( p errn(h+1) + p errn(h−1)) = β2 n + βn( p errn(h∗) + p errn(h−1)). Now Corollary 1 implies that errD(h∗) > errD(h−1), a contradiction. 5 Theorem 1. Let ν = infh∈H errD(h) and d = vcdim(H). There exists a constant c > 0 such that the following holds. If Algorithm 1 is given a stream of m unlabeled examples, then with probability at least 1 −δ, the algorithm returns a hypothesis with error at most ν + c · ((1/m)(d log m + log(1/δ)) + p (ν/m)(d log m + log(1/δ))). Proof. Lemma 3 implies that h∗is consistent with Sm with probability at least 1−δ. Using the same bounds from Corollary 1 (already applied in Lemma 3) on h∗and hf together with the fact errm(hf) ≤errm(h∗), we have errD(hf) ≤ν + β2 m + βm √ν + βm p errD(hf), which in turn implies errD(hf) ≤ν + 3β2 m + 2βm √ν. So, Algorithm 1 returns a hypothesis with error at most ν + ε when m = ˜O((d/ε)(1 + ν/ε)); this is (asymptotically) the usual sample complexity of supervised learning. Since the algorithm requests at most m labels, its label complexity is always at most ˜O((d/ε)(1+ν/ε)). 3.4 Label complexity analysis We can also bound the label complexity of our algorithm in terms of the disagreement coefficient θ. This yields tighter bounds when θ is bounded independently of 1/(ε+ν). The key to deriving our label complexity bounds based on θ is noting that the probability of requesting the (n + 1)th label is intimately related to θ and ∆n (see [10] for the complete proof). Lemma 4. There exists a constant c > 0 such that, with probability at least 1 −2δ, for all n ≥1, the following holds. Let h∗(xn+1) = ˆy where h∗= arg infh∈H errD(h). Then, the probability that Algorithm 1 requests the label yn+1 is Prxn+1∼DX [Request yn+1] ≤c · θ · (ν + β2 n), where θ = θ(D, H, 3β2 m + 2βm √ν) is the disagreement coefficient, ν = errD(h∗), and βn = ˜O( p d log n/n) is as defined in Corollary 1. Now we give our main label complexity bound for agnostic active learning. Theorem 2. Let m be the number of unlabeled data given to Algorithm 1, d = vcdim(H), ν = infh∈H errD(h), βm as defined in Corollary 1, and θ = θ(D, H, 3β2 m + 2βm √ν). There exists a constant c1 > 0 such that for any c2 ≥1, with probability at least 1 −2δ: 1. If ν ≤(c2 −1)β2 m, Algorithm 1 returns a hypothesis with error as bounded in Theorem 1 and the expected number of labels requested is at most 1 + c1c2θ ·  d log2 m + log 1 δ log m  . 2. Else, the same holds except the expected number of labels requested is at most 1 + c1θ ·  νm + d log2 m + log 1 δ log m  . Furthermore, if L is the expected number of labels requested as per above, then with probability at least 1 −δ′, the algorithm requests no more than L + p 3L log(1/δ′) labels. Proof. Follows from Lemma 4 and a Chernoffbound for the Poisson trials 1l[Request yn]. With the substitution ε = 3β2 m + 2βm √ν as per Theorem 1, Theorem 2 entails that for any hypothesis class and data distribution for which the disagreement coefficient θ = θ(D, H, ε) is bounded independently of 1/(ε + ν) (see [12] for some examples), Algorithm 1 only needs ˜O(θd log2(1/ε)) labels to achieve error ε ≈ν and ˜O(θd(log2(1/ε)+(ν/ε)2)) labels to achieve error ε ≪ν. The latter matches the dependence on ν/ε in the Ω((ν/ε)2) lower bound [11]. The linear dependence on θ improves on the quadratic dependence required by A2 [12]4. For an illustrative consequence of this, suppose DX is the uniform distribution on the sphere 4It may be possible to reduce A2’s quadratic dependence to a linear dependence by using normalized bounds, as we do here. 6 0 5000 10000 0 500 1000 1500 2000 2500 3000 3500 4000 0 5000 10000 0 500 1000 1500 2000 2500 3000 3500 (a) (b) (c) (d) Figure 2: (a & b) Labeling rate plots. The plots show the number of labels requested (vertical axis) versus the total number of points seen (labeled + unlabeled, horizontal axis) using Algorithm 1. (a) H = thresholds: under random misclassification noise with ν = 0 (solid), 0.1 (dashed), 0.2 (dot-dashed); under the boundary noise model with ν = 0.1 (lower dotted), 0.2 (upper dotted). (b) H = intervals: under random misclassification with (p+, ν) = (0.2, 0.0) (solid), (0.1, 0.0) (dashed), (0.2, 0.1) (dot-dashed), (0.1, 0.1) (dotted). (c & d) Locations of label requests. (c) H = intervals, h∗= [0.4, 0.6]. The top histogram shows the locations of first 400 label requests (the x-axis is the unit interval); the bottom histogram is for all (2141) label requests. (d) H = boxes, h∗= [0.15, 0.85]2. The first 200 requests occurred at the ×s, the next 200 at the ▽s, and the final 109 at the ⃝s. in Rd and H is homogeneous linear separators; in this case, θ = Θ( √ d). Then the label complexity of A2 depends at least quadratically on the dimension, whereas the corresponding dependence for our algorithm is d3/2. 4 Experiments We implemented Algorithm 1 in a few simple cases to experimentally demonstrate the label complexity improvements. In each case, the data distribution DX was uniform over [0, 1]; the stream length was m = 10000, and each experiment was repeated 20 times with different random seeds. Our first experiment studied linear thresholds on the line. The target hypothesis was fixed to be h∗(x) = sign(x −0.5). For this hypothesis class, we used two different noise models, each of which ensured infh∈H errD(h) = errD(h∗) = ν for a prespecified ν ∈[0, 1]. The first model was random misclassification: for each point x ∼DX , we independently labeled it h∗(x) with probability 1 −ν and −h∗(x) with probability ν. In the second model (also used in [7]), for each point x ∼DX , we independently labeled it +1 with probability (x−0.5)/(4ν)+0.5 and −1 otherwise, thus concentrating the noise near the boundary. Our second experiment studied intervals on the line. Here, we only used random misclassification, but we varied the target interval length p+ = Prx∼DX [h∗(x) = +1]. The results show that the number of labels requested by Algorithm 1 was exponentially smaller than the total number of data seen (m) under the first noise model, and was polynomially smaller under the second noise model (see Figure 2 (a & b); we verified the polynomial vs. exponential distinction on separate log-log scale plots). In the case of intervals, we observe an initial phase (of duration roughly ∝1/p+) in which every label is requested, followed by a more efficient phase, confirming the known active-learnability of this class [4,12]. These improvements show that our algorithm needed significantly fewer labels to achieve the same error as a standard supervised algorithm that uses labels for all points seen. As a sanity check, we examined the locations of data for which Algorithm 1 requested a label. We looked at two particular runs of the algorithm: the first was with H = intervals, p+ = 0.2, m = 10000, and ν = 0.1; the second was with H = boxes (d = 2), p+ = 0.49, m = 1000, and ν = 0.01. In each case, the data distribution was uniform over [0, 1]d, and the noise model was random misclassification. Figure 2 (c & d) shows that, early on, labels were requested everywhere. But as the algorithm progressed, label requests concentrated near the boundary of the target hypothesis. 7 5 Conclusion and future work We have presented a simple and natural approach to agnostic active learning. Our extension of the selective sampling scheme of Cohn, et al. [1] 1. simplifies the maintenance of the region of uncertainty with a reduction to supervised learning, and 2. guards against noise with a subtle algorithmic application of generalization bounds. Our algorithm relies on a threshold parameter ∆n for comparing empirical errors. We prescribe a very simple and natural choice for ∆n – a normalized generalization bound from supervised learning – but one could hope for a more clever or aggressive choice, akin to those in [6] for linear separators. Finding consistent hypotheses when data is separable is often a simple task. In such cases, reduction-based active learning algorithms can be relatively efficient (answering some questions posed in [16]). On the other hand, agnostic learning suffers from severe computational intractability for many hypothesis classes (e.g. [17]), and of course, agnostic active learning is at least as hard in the worst case. Our reduction is relatively benign in that the learning problems created are only over samples from the original distribution, so we do not create pathologically hard instances (like those arising from hardness reductions) unless they are inherent in the data. Nevertheless, an important research direction is to develop algorithms that only require solving tractable (e.g. convex) optimization problems. A similar reduction-based scheme may be possible. References [1] D. Cohn, L. Atlas, and R. Ladner. Improving generalization with active learning. Machine Learning, 15(2):201–221, 1994. [2] Y. Freund, H. Seung, E. Shamir, and N. Tishby. Selective sampling using the query by committee algorithm. Machine Learning, 28(2):133–168, 1997. [3] S. Dasgupta, A. Kalai, and C. Monteleoni. Analysis of perceptron-based active learning. In COLT, 2005. [4] S. Dasgupta. Coarse sample complexity bounds for active learning. In NIPS, 2005. [5] S. Hanneke. Teaching dimension and the complexity of active learning. In COLT, 2007. [6] M.-F. Balcan, A. Broder, and T. Zhang. Margin based active learning. In COLT, 2007. [7] R. Castro and R. Nowak. Upper and lower bounds for active learning. In Allerton Conference on Communication, Control and Computing, 2006. [8] R. Castro and R. Nowak. Minimax bounds for active learning. In COLT, 2007. [9] M.-F. Balcan, A. Beygelzimer, and J. Langford. Agnostic active learning. In ICML, 2006. [10] S. Dasgupta, D. Hsu, and C. Monteleoni. A general agnostic active learning algorithm. UCSD Technical Report CS2007-0898, http://www.cse.ucsd.edu/∼djhsu/papers/cal.pdf, 2007. [11] M. K¨a¨ari¨ainen. Active learning in the non-realizable case. In ALT, 2006. [12] S. Hanneke. A bound on the label complexity of agnostic active learning. In ICML, 2007. [13] C. Monteleoni. Learning with online constraints: shifting concepts and active learning. PhD Thesis, MIT Computer Science and Artificial Intelligence Laboratory, 2006. [14] O. Bousquet, S. Boucheron, and G. Lugosi. Introduction to statistical learning theory. Lecture Notes in Artificial Intelligence, 3176:169–207, 2004. [15] V. 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. [16] C. Monteleoni. Efficient algorithms for general active learning. In COLT. Open problem, 2006. [17] V. Guruswami and P. Raghavendra. Hardness of learning halfspaces with noise. In FOCS, 2006. 8
2007
116
3,144
Simplified Rules and Theoretical Analysis for Information Bottleneck Optimization and PCA with Spiking Neurons Lars Buesing, Wolfgang Maass Institute for Theoretical Computer Science Graz University of Technology A-8010 Graz, Austria {lars,maass}@igi.tu-graz.at Abstract We show that under suitable assumptions (primarily linearization) a simple and perspicuous online learning rule for Information Bottleneck optimization with spiking neurons can be derived. This rule performs on common benchmark tasks as well as a rather complex rule that has previously been proposed [1]. Furthermore, the transparency of this new learning rule makes a theoretical analysis of its convergence properties feasible. A variation of this learning rule (with sign changes) provides a theoretically founded method for performing Principal Component Analysis (PCA) with spiking neurons. By applying this rule to an ensemble of neurons, different principal components of the input can be extracted. In addition, it is possible to preferentially extract those principal components from incoming signals X that are related or are not related to some additional target signal YT . In a biological interpretation, this target signal YT (also called relevance variable) could represent proprioceptive feedback, input from other sensory modalities, or top-down signals. 1 Introduction The Information Bottleneck (IB) approach [2] allows the investigation of learning algorithms for unsupervised and semi-supervised learning on the basis of clear optimality principles from information theory. Two types of time-varying inputs X and YT are considered. The learning goal is to learn a transformation from X into another signal Y that extracts only those components from X that are related to the relevance signal YT . In a more global biological interpretation X might represent for example some sensory input, and Y the output of the first processing stage for X in the cortex. In this article Y will simply be the spike output of a neuron that receives the spike trains X as inputs. The starting point for our analysis is the first learning rule for IB optimization in for this setup, which has recently been proposed in [1], [3]. Unfortunately, this learning rule is complicated, restricted to discrete time and no theoretical analysis of its behavior is feasible. Any online learning rule for IB optimization has to make a number of simplifying assumptions, since true IB optimization can only be carried out in an offline setting. We show here, that with a slightly different set of assumptions than those made in [1] and [3], one arrives at a drastically simpler and intuitively perspicuous online learning rule for IB optimization with spiking neurons. The learning rule in [1] was derived by maximizing the objective function1 L0: L0 = −I(X, Y ) + βI(Y, YT ) −γDKL(P(Y )∥P( ˜Y )), (1) 1The term DKL(P(Y )∥P( ˜Y )) denotes the Kullback-Leibler divergence between the distribution P(Y ) and a target distribution P( ˜Y ). This term ensures that the weights remain bounded, it is shortly discussed in [4]. 1 where I(., .) denotes the mutual information between its arguments and β is a positive trade-off factor. The target signal YT was assumed to be given by a spike train. The learning rule from [1] (see [3] for a detailed interpretation) is quite involved and requires numerous auxiliary definitions (hence we cannot repeat it in this abstract). Furthermore, it can only be formulated in discrete time (steps size ∆t) for reasons we want to outline briefly: In the limit ∆t →0 the essential contribution to the learning rule, which stems from maximizing the mutual information I(Y, YT ) between output and target signal, vanishes. This difficulty is rooted in a rather technical assumption, made in appendix A.4 in [3], concerning the expectation value ρ k at time step k of the neural firing probability ρ , given the information about the postsynaptic spikes and the target signal spikes up to the preceding time step k −1 (see our detailed discussion in [4])2. The restriction to discrete time prevents the application of powerful analytical methods like the Fokker-Planck equation, which requires continuous time, for analyzing the dynamics of the learning rule. In section 2 of this paper, we propose a much simpler learning rule for IB optimization with spiking neurons, which can also be formulated in continuous time. In contrast to [3], we approximate the critical term ρ k with a linear estimator, under the assumption that X and YT are positively correlated. Further simplifications in comparison to [3] are achieved by considering a simpler neuron model (the linear Poisson neuron, see [5]). However we show through computer simulation in [4] that the resulting simple learning rule performs equally well for the more complex neuron model with refractoriness from [1] - [5]. The learning rule presented here can be analyzed by the means of the drift function of the corresponding Fokker-Planck equation. The theoretical results are outlined in section 3, followed by the consideration of a concrete IB optimization task in section 4. A link between the presented learning rule and Principal Component Analysis (PCA) is established in section 5. A more detailed comparison of the learning rule presented here and the one of [3] as well as results of extensive computer tests on common benchmark tasks can be found in [4]. 2 Neuron model and learning rule for IB optimization We consider a linear Poisson neuron with N synapses of weights w = (w1, . . . , wN) . It is driven by the input X, consisting of N spike trains Xj(t) = P i δ(t −ti j), j ∈{1, . . . , N}, where ti j denotes the time of the i’th spike at synapse j. The membrane potential u(t) of the neuron at time t is given by the weighted sum of the presynaptic activities ν(t) = (ν1(t), . . . , νN(t)): u(t) = N X j=1 wjνj(t) (2) νj(t) = Z t −∞ ǫ(t −s)Xj(s)ds. The kernel ǫ(.) models the EPSP of a single spike (in simulations ǫ(t) was chosen to be a decaying exponential with a time constant of τm = 10 ms). The postsynaptic neuron spikes at time t with the probability density g(t): g(t) = u(t) u0 , with u0 being a normalization constant. The postsynaptic spike train is denoted as Y (t) = P i δ(t− ti f), with the firing times ti f. We now consider the IB task described in general in [2], which consists of maximizing the objective function LIB, in the context of spiking neurons. As in [6], we introduce a further term L3 into the the objective function that reflects the higher metabolic costs for the neuron to maintain strong synapses, a natural, simple choice being L3 = −λ P w2 j. Thus the complete objective function L to maximize is: L = LIB + L3 = −I(X, Y ) + βI(YT , Y ) −λ N X j=1 w2 j. (3) 2The remedy, proposed in section 3.1 in [3], of replacing the mutual information I(Y, YT ) in L0 by an information rate I(Y, YT )/∆t does not solve this problem, as the term I(Y, YT )/∆t diverges in the continuous time limit. 2 The objective function L differs slightly from L0 given in (1), which was optimized in [3]; this change turned out to be advantageous for the PCA learning rule given in section 5, without significantly changing the characteristics of the IB learning rule. The online learning rule governing the change of the weights wj(t) at time t is obtained by a gradient ascent of the objective function L: d dtwj(t) = α ∂L ∂wj . For small learning rates α and under the assumption that the presynaptic input X and the target signal YT are stationary processes, the following learning rule can be derived: d dtwj(t) = αY (t)νj(t) u(t)u(t)  −(u(t) −u(t)) + β  F[YT ](t) −F[YT ](t)  −αλwj(t), (4) where the operator (.) denotes the low-pass filter with a time constant τC (in simulations τC = 3s), i. e. for a function f: f(t) = 1 τC Z t −∞ exp  −t −s τC  f(s)ds. (5) The operator F[YT ](t) appearing in (4) is equal to the expectation value of the membrane potential ⟨u(t)⟩X|YT = E[u(t)|YT ], given the observations (YT (τ)|τ ∈R) of the relevance signal; F is thus closely linked to estimation and filtering theory. For a known joint distribution of the processes X and YT , the operator F could in principal be calculated exactly, but it is not clear how this quantity can be estimated in an online process; thus we look for a simple approximation to F. Under the above assumptions, F is time invariant and can be approximated by a Volterra series (for details see [4]): ⟨u(t)⟩X|YT = F[YT ](t) = ∞ X n=0 Z R · · · Z R κn(t −t1, . . . , t −tn) n Y i=1 YT (ti)dti. (6) In this article, we concentrate on the situation, where F can be well approximated by its linearization F1[YT ](t), corresponding to a linear estimator of ⟨u(t)⟩X|YT . For F1[YT ](t) we make the following ansatz: F[YT ](t) ≈F1[YT ](t) = c · uT (t) = c Z R κ1(t −t1)YT (t1)dt1. (7) According to (7), F is approximated by a convolution uT (t) of the relevance signal YT and a suitable prefactor c. Assuming positively correlated X and YT , κ1(t) is chosen to be a non-anticipating decaying exponential exp(−t/τ0)Θ(t) with a time constant τ0 (in simulations τ0 = 100 ms), where Θ(t) is the Heaviside step function. This choice is motivated by the standard models for the impact of neuromodulators (see [7]), thus such a kernel may be implemented in a realistic biological mechanism. It turned out that the choice of τ0 was not critical, it could be varied over a decade ranging from 10 ms to 100 ms. The prefactor c appearing in (7) can be determined from the fact that F1 is the optimal linear estimator of the form given in (7), leading to: c = ⟨uT (t), u(t)⟩ ⟨uT (t), uT (t)⟩. The quantity c can be estimated online in the following way: d dtc(t) = (uT (t) −uT (t)) [(u(t) −u(t)) −c(t)(uT (t) −uT (t))] . Using the above definitions, the resulting learning rule is given by (in vector notation): d dtw(t) = αY (t)ν(t) u(t)u(t) [−(u(t) −u(t)) + c(t)β(uT (t) −uT (t))] −αλw(t). (8) Equation (8) will be called the spike-based learning rule, as the postsynaptic spike train Y (t) explicitly appears. An accompanying rate-base learning rule can also be derived: d dtw(t) = α ν(t) u0u(t) [−(u(t) −u(t)) + c(t)β(uT (t) −uT (t))] −αλw(t). (9) 3 3 Analytical results The learning rules (8) and (9) are stochastic differential equations for the weights wj driven by the processes Y (.), νj(.) and uT (.), of which the last two are assumed to be stationary with the means ⟨νj(t)⟩= ν0 and ⟨uT (t)⟩= uT,0 respectively. The evolution of the solutions w(t) to (8) and (9) may be studied via a Master equation for the probability distribution of the weights p(w, t) (see [8]). For small learning rates α, the stationary distribution p(w) sharply peaks3 at the roots of the drift function A(w) of the corresponding Fokker-Planck equation (the detailed derivation is given in [4]). Thus, for α ≪1, the temporal evolution of the learning rules (8) and (9) may be studied via the deterministic differential equation: d dt ˆw = A( ˆw) = α 1 ν0u0z −C0 + βC1 ˆw −αλ ˆw (10) z = N X j=1 ˆwj, (11) where z is the total weight. The matrix C = −C0 + βC1 (with the elements Cij) has two contributions. C0 is the covariance matrix of the input and the matrix C1 quantifies the covariance between the activities νj and the trace uT : C0 ij = ⟨νi(t), νj(t)⟩ C1 ij = ⟨νi(t), uT (t)⟩⟨uT (t), νj(t)⟩ ⟨uT (t), uT (t)⟩ . Now the critical points w∗of dynamics of (10) are investigated. These critical points, if asymptotically stable, determine the peaks of the stationary distribution p(w) of the weights w; we therefore expect the solutions of the stochastic equations to fluctuate around these fixed points w∗. If β and λ are much larger than one, the term containing the matrix C0 can be neglected and equation (10) has a unique stable fixed point w∗: w∗ ∝ CT CT i = ⟨νi(t), uT (t)⟩. Under this assumption the maximal mutual information between the target signal YT (t) and the output of the neuron Y (t) is obtained by a weight vector w = w∗that is parallel to the covariance vector CT . In general, the critical points of equation (10) depend on the eigenvalue spectrum of the symmetric matrix C: If all eigenvalues are negative, the weight vector ˆw decays to the lower hard bound 0. In case of at least one positive eigenvalue (which exists if β is chosen large enough), there is a unique stable fixed point w∗: w∗ = µ λu0ν0bb (12) b := N X i=1 bi. The vector b appearing in (12) is the eigenvector of C corresponding to the largest eigenvalue µ. Thus, a stationary unimodal4 distribution p(w) of the weights w is predicted, which is centered around the value w∗. 4 A concrete example for IB optimization A special scenario of interest, that often appears in the literature (see for example [1], [9] and [10]), is the following: The synapses, and subsequently the input spike trains, form M different subgroups 3It can be shown that the diffusion term in the FP equation scales like O(α), i. e. for small learning rates α, fluctuations tend to zero and the dynamics can be approximated by the differential equation (10) . 4Note that p(w) denotes the distribution of the weight vector, not the distribution of a single weight p(wj). 4 A B X (t) X (t) X (t) 1 2 N Relevance Output Y(t) Signal Y (t) T C D Figure 1: A The basic setup for the Information Bottleneck optimization. B-D Numerical and analytical results for the IB optimization task described in section 4. The temporal evolution of the average weights ˜wl = 1/M P j∈Gl wj of the four different synaptic subgroups Gl are shown. B The performance of the spike-based rule (8). The highest trajectory corresponds to ˜w1; it stays close to its analytical predicted fixed point value obtained from (12), which is visualized by the upper dashed line. The trajectory just below belongs to ˜w3, for which the fixed point value is also plotted as dashed line. The other two trajectories ˜w2 and ˜w4 decay and eventually fluctuate above the predicted value of zero. C The performance of the rate-based rule (9); results are analogous to the ones of the spike-based rule. D Simulation of the deterministic equation (10). Gl, l ∈{1, . . . , N/M} of the same size N/M ∈N. The spike trains Xj and Xk, j ̸= k, are statistically independent if they belong to different subgroups; within a subgroup there is a homogeneous covariance term C0 jk = cl, j ̸= k for j, k ∈Gl, which can be due either to spike-spike correlations or correlations in rate modulations. The covariance between the target signal YT and the spike trains Xj is homogeneous among a subgroup. As a numerical example, we consider in figure 1 a modification of the IB task presented in figure 2 of [1]. The N = 100 synapses form M = 4 subgroups Gl = {25(l −1)+1, . . . , 25l}, l ∈{1, . . . , 4}. Synapses in G1 receive Poisson spike trains of constant rate ν0 = 20 Hz, which are mutually spikespike correlated with a correlation-coefficient5 of 0.5. The same holds for the spike trains of G2. Spike trains for G3 and G4 are uncorrelated Poisson trains with a common rate modulation, which is equal to low pass filtered white noise (cut-off frequency 5 Hz) with mean ν0 and standard deviation (SD) σ = ν0/2. The rate modulations for G3 and G4 are however independent (though identically distributed). Two spike trains for different synapse subgroups are statistically independent. The target signal YT was chosen to be the sum of two Poisson trains. The first is of constant rate ν0 and has spike-spike correlations with G1 of coefficient 0.5; the second is a Poisson spike train with the same rate modulation as the spike trains of G3 superimposed by additional white noise of SD 2 Hz. Furthermore, the target signal was turned off during random intervals6. The resulting evolution of the weights is shown in figure 1, illustrating the performance of the spike-based rule (8) as well as of the rate-based rule (9). As expected, the weights of G1 and G3 are potentiated as YT has mutual information with the corresponding part of the input. The synapses of G2 and G4 are depressed. The analytical result for the stable fixed point w∗obtained from (12) is shown as dashed lines and is in good agreement with the numerical results. Furthermore the trajectory of the solution ˆw(t) to 5Spike-spike correlated Poisson spike trains were generated according to the method outlined in [9]. 6These intervals of silence were modeled as random telegraph noise with a time constant of 200 ms and a overall probability of silence of 0.5. 5 the deterministic equation (10) is plotted. The presented concrete IB task was slightly changed from the one presented in [1], because for the setting used here, the largest eigenvalue µ of C and its corresponding eigenvector b can be calculated analytically. The simulation results for the original setting in [1] can also be reproduced with the simpler rules (8) and (9) (not shown). 5 Relevance-modulated PCA with spiking neurons The presented learning rules (8) and (9) exhibit a close relation to Principal Component Analysis (PCA). A learning rule which enables the linear Poisson neuron to extract principal components from the input X(.) can be derived by maximizing the following objective function: LPCA = −LIB −λ N X j=1 w2 j = +I(X, Y ) −βI(YT , Y ) −λ N X j=1 w2 j, (13) which just differs from (3) by a change of sign in front of LIB. The resulting learning rule is in close analogy to (8): d dtw(t) = αY (t)ν(t) u(t)u(t) [(u(t) −u(t)) −c(t)β(uT (t) −uT (t))] −αλw(t). (14) The corresponding rate-based version can also be derived. Without the trace uT (.) of the target signal, it can be seen that the solution ˆw(t) of deterministic equation corresponding to (14) (which is of the same form as (10) with the obvious sign changes) converges to an eigenvector of the covariance matrix C0. Thus, for β = 0 we expect the learning rule (14) to perform PCA for small learning rates α. The rule (14) without the relevance signal is comparable to other PCA rules, e. g. the covariance rule (see [11]) for non-spiking neurons. The side information given by the relevance signal YT (.) can be used to extract specific principal components from the input, thus we call this paradigm relevance-modulated PCA. Before we consider a concrete example for relevance-modulated PCA, we want to point out a further application of the learning rule (14). The target signal YT can also be used to extract different components from the input with different neurons (see figure 2). Consider m neurons receiving the same input X. These neurons have the outputs Y1(.), . . . , Ym(t), target signals Y 1 T (.), . . . , Y m T (t) and weight vectors w1(t), . . . , wm(t), the latter evolving according to (14). In order to prevent all weight vectors from converging towards the same eigenvector of C0 (the principal component), the target signal Y i T for neuron i is chosen to be the sum of all output spike trains except Yi: Y i T (t) = N X j=1, j̸=i Yj(t). (15) If one weight vector wi(t) is already close to the eigenvector ek of C0, than by means of (15), the basins of attraction of ek for the other weight vectors wj(t), j ̸= i are reduced (or even vanish, depending on the value of β). It is therefore less likely (or impossible) that they also converge to ek. In practice, this setup is sufficiently robust, if only a small number (≤4) of different components is to be extracted and if the differences between the eigenvalues λi of these principal components are not too big7. For the PCA learning rule, the time constant τ0 of the kernel κ1 (see (7)) had to be chosen smaller than for the IB tasks in order to obtain good performance; we used τ0 = 10 ms in simulations. This is in the range of time constants for IPSPs. Hence, the signals Y i T could probably be implemented via lateral inhibition. The learning rule considered in [3] displayed a close relation to Independent Component Analysis (ICA). Because of the linear neuron model used here and the linearization of further terms in the derivation, the resulting learning rule (14) performs PCA instead of ICA. The results of a numerical example are shown in figure 2. The m = 3 for the regular PCA experiment neurons receive the same input X and their weights change according to (14). The weights and input spike trains are grouped into four subgroups G1, . . . , G4, as for the IB optimization discussed 7Note that the input X may well exhibit a much larger number of principal components. However it is only possible to extract a limited number of them by different neurons at the same time. 6 A B neuron 1 C neuron 2 X (t) X (t) 1 2 N X (t) Output Y (t) Output Y (t) 1 m D neuron 1 E neuron 2 F neuron 3 Figure 2: A The basic setup for the PCA task: The m different neurons receive the same input X and are expected to extract different principal components of it. B-F The temporal evolution of the average subgroup weights ˜wl = 1/25 P j∈Gl wj for the groups G1 (black solid line), G2 (light gray solid line) and G3 (dotted line). B-C Results for the relevance-modulated PCA task: neuron 1 (fig. B) specializes on G2 and neuron 2 (fig. C) on subgroup G3. D-F Results for the regular PCA task: neuron 1 (fig. D) specialize on G1, neuron 2 (fig. E) on G2 and neuron 3 (fig. F) on G3 . in section 4. The only difference is that all groups (except for G4) receive spike-spike correlated Poisson spike trains with a correlation coefficient for the groups G1, G2, G3 of 0.5, 0.45, 0.4 respectively. Group G4 receives uncorrelated Poisson spike trains. As can be seen in figure 2 D to F, the different neurons specialize on different principal components corresponding to potentiated synaptic subgroups G1, G2 and G3 respectively. Without the relevance signals Y i T (.), all neurons tend to specialize on the principal component corresponding to G1 (not shown). As a concrete example for relevance-modulated PCA, we consider the above setup with slight modifications: Now we want m = 2 neurons to extract the components G2 and G3 from the input X, and not the principal component G1. This is achieved with an additional relevance signal Y 0 T , which is the same for both neurons and has spike-spike correlations with G2 and G3 of 0.45 and 0.4. We add the term γI(Y, Y 0 T ) to the objective function (13), where γ is a positive trade-off factor. The resulting learning rule has exactly the same structure as (14), with an additional term due to Y 0 T . The numerical results are presented in figure 2 B and C, showing that it is possible in this setup to explicitly select the principle components that are extracted (or not extracted) by the neurons. 6 Discussion We have introduced and analyzed a simple and perspicuous rule that enables spiking neurons to perform IB optimization in an online manner. Our simulations show that this rule works as well as the substantially more complex learning rule that had previously been proposed in [3]. It also performs well for more realistic neuron models as indicated in [4]. We have shown that the convergence properties of our simplified IB rule can be analyzed with the help of the Fokker-Planck equation (alternatively one may also use the theoretical framework described in A.2 in [12] for its analysis). The investigation of the weight vectors to which this rule converges reveals interesting relationships to PCA. Apparently, very little is known about learning rules that enable spiking neurons to extract multiple principal components from an input stream (a discussion of a basic learning rule performing PCA is given in chapter 11.2.4 of [5]). We have demonstrated both analytically and through simulations that a slight variation of our new learning rule performs PCA. Our derivation of this rule within the IB framework opens the door to new variations of PCA where preferentially those components are extracted from a high dimensional input stream that are –or are not– related to some external relevance variable. We expect that a further investigation of such methods will shed light on the unknown principles of unsupervised and semi-supervised learning that might shape and constantly retune the output of lower cortical areas to intermediate and higher cortical areas. The learning rule that we have proposed might in principle be able to extract from high-dimensional 7 sensory input streams X those components that are related to other sensory modalities or to internal expectations and goals. Quantitative biological data on the precise way in which relevance signals YT (such as for example dopamin) might reach neurons in the cortex and modulate their synaptic plasticity are still missing. But it is fair to assume that these signals reach the synapse in a low-pass filtered form of the type uT that we have assumed for our learning rules. From that perspective one can view the learning rules that we have derived (in contrast to the rules proposed in [3]) as local learning rules. Acknowledgments Written under partial support by the Austrian Science Fund FWF, project # P17229, project # S9102 and project # FP6-015879 (FACETS) of the European Union. References [1] S. Klampfl, R. A. Legenstein, and W. Maass. Information bottleneck optimization and independent component extraction with spiking neurons. In Proc. of NIPS 2006, Advances in Neural Information Processing Systems, volume 19. MIT Press, 2007. [2] N. Tishby, F. C. Pereira, and W. Bialek. The information bottleneck method. In Proceedings of the 37-th Annual Allerton Conference on Communication, Control and Computing, pages 368–377, 1999. [3] S. Klampfl, R. Legenstein, and W. Maass. Spiking neurons can learn to solve information bottleneck problems and to extract independent components. Neural Computation, 2007. in press. [4] L. Buesing and W. Maass. journal version. 2007. in preparation. [5] W. Gerstner and W. M. Kistler. Spiking Neuron Models. Cambridge University Press, Cambridge, 2002. [6] Taro Toyoizumi, Jean-Pascal Pfister, Kazuyuki Aihara, and Wulfram Gerstner. Optimality Model of Unsupervised Spike-Timing Dependent Plasticity: Synaptic Memory and Weight Distribution. Neural Computation, 19(3):639–671, 2007. [7] Eugene M. Izhikevich. Solving the Distal Reward Problem through Linkage of STDP and Dopamine Signaling. Cereb. Cortex, page bhl152, 2007. [8] H. Risken. The Fokker-Planck Equation. Springer, 3rd edition, 1996. [9] R. G¨utig, R. Aharonov, S. Rotter, and H. Sompolinsky. Learning input correlations through non-linear temporally asymmetric hebbian plasticity. Journal of Neurosci., 23:3697–3714, 2003. [10] H. Meffin, J. Besson, A. N. Burkitt, and D. B. Grayden. Learning the structure of correlated synaptic subgroups using stable and competitive spike-timing-dependent plasticity. Physical Review E, 73, 2006. [11] T. J. Sejnowski and G. Tesauro. The hebb rule for synaptic plasticity: algorithms and implementations. In J. H. Byrne and W. O. Berry, editors, Neural Models of Plasticity, pages 94–103. Academic Press, 1989. [12] N. Intrator and L. N. Cooper. Objective function formulation of the BCM theory of visual cortical plasticity: statistical connections, stability conditions. Neural Networks, 5:3–17, 1992. 8
2007
117
3,145
Hidden Common Cause Relations in Relational Learning Ricardo Silva∗ Gatsby Computational Neuroscience Unit UCL, London, UK WC1N 3AR rbas@gatsby.ucl.ac.uk Wei Chu Center for Computational Learning Systems Columbia University, New York, NY 10115 chuwei@cs.columbia.edu Zoubin Ghahramani Department of Engineering University of Cambridge, UK CB2 1PZ zoubin@eng.cam.ac.uk Abstract When predicting class labels for objects within a relational database, it is often helpful to consider a model for relationships: this allows for information between class labels to be shared and to improve prediction performance. However, there are different ways by which objects can be related within a relational database. One traditional way corresponds to a Markov network structure: each existing relation is represented by an undirected edge. This encodes that, conditioned on input features, each object label is independent of other object labels given its neighbors in the graph. However, there is no reason why Markov networks should be the only representation of choice for symmetric dependence structures. Here we discuss the case when relationships are postulated to exist due to hidden common causes. We discuss how the resulting graphical model differs from Markov networks, and how it describes different types of real-world relational processes. A Bayesian nonparametric classification model is built upon this graphical representation and evaluated with several empirical studies. 1 Contribution Prediction problems, such as classification, can be easier when class labels share a sort of relational dependency that is not accounted by the input features [10]. If the variables to be predicted are attributes of objects in a relational database, such dependencies are often postulated from the relations that exist in the database. This paper proposes and evaluates a new method for building classifiers that uses information concerning the relational structure of the problem. Consider the following standard example, adapted from [3]. There are different webpages, each one labeled according to some class (e.g., “student page” or “not a student page”). Features such as the word distribution within the body of each page can be used to predict each webpage’s class. However, webpages do not exist in isolation: there are links connecting them. Two pages having a common set of links is evidence for similarity between such pages. For instance, if W1 and W3 both link to W2, this is commonly considered to be evidence for W1 and W3 having the same class. One way of expressing this dependency is through the following Markov network [5]: ∗Now at the Statistical Laboratory, University of Cambridge. E-mail: silva@statslab.cam.ac.uk 1 C1 C2 F2 C3 F3 F Here Fi are the features of page Wi, and Ci is its respective page label. Other edges linking F variables to C variables (e.g., F1−C2) can be added without affecting the main arguments presented in this section. The semantics of the graph, for a fixed input feature set {F1, F2, F3}, are as follows: C1 is marginally dependent on C3, but conditionally independent given C2. Depending on the domain, this might be either a suitable or unsuitable representation of relations. For instance, in some domains it could be the case that the most sensible model would state that C1 is only informative about C3 once we know what C2 is: that is, C1 and C3 are marginally independent, but dependent given C2. This can happen if the existence of a relation (Ci, Cj) corresponds to the existence of hidden common causes generating this pair of random variables. Consider the following example, loosely based on a problem described by [12]. We have three objects, Microsoft (M), Sony (S) and Philips (P). The task is a regression task where we want to predict the stock market price of each company given its profitability from last year. The given relationships are that M and S are direct competitors (due to the videogame console market), as well S and P (due to the TV set market). M.Profit M.Stock S.Profit S.Stock P.Profit P.Stock M.Profit M.Stock S.Profit S.Stock P.Profit P.Stock εs εm εp M.Profit M.Stock S.Profit S.Stock P.Profit P.Stock εs εm εp (a) (b) (c) Figure 1: (a) Assumptions that relate Microsoft, Sony and Philips stock prices through hidden common cause mechanisms, depicted as unlabeled gray vertices; (b) A graphical representation for generic hidden common causes relationships by using bi-directed edges; (c) A depiction of the same relationship skeleton by a Markov network model, which has different probabilistic semantics. It is expected that several market factors that affect stock prices are unaccounted by the predictor variable Past Year Profit. For example, a shortage of Microsoft consoles is a hidden common factor for both Microsoft’s and Sony’s stock. Another hidden common cause would be a high price for Sony’s consoles. Assume here that these factors have no effect on Philips’ stock value. A depiction of several hidden common causes that correpond to the relations Competitor(M, S) and Competitor(S, P) is given in Figure 1(a) as unlabeled gray vertices. Consider a linear regression model for this setup. We assume that for each object Oi ∈{M, S, P}, the stock price Oi.Stock, centered at the mean, is given by Oi.Stock = β × Oi.Profit + ϵi (1) where each ϵi is a Gaussian random variable. The fact that there are several hidden common causes between M and S can be modeled by the covariance of ϵm and ϵs, σms. That is, unlike in standard directed Gaussian models, σms is allowed to be non-zero. The same holds for σsp. Covariances of error terms of unrelated objects should be zero (σmp = 0). This setup is very closely related to the classic seemingly unrelated regression model popular in economics [12]. A graphical representation for this type of model is the directed mixed graph (DMG) [9, 11], with bi-directed edges representing the relationship of having hidden common causes between a pair of vertices. This is shown in Figure 1(b). Contrast this to the Markov network representation in Figure 1(c). The undirected representation encodes that ϵm and ϵp are marginally dependent, which does not correspond to our assumptions1. Moreover, the model in Figure 1(b) states that once we observe Sony’s stock price, Philip’s stocks (and profit) should have a non-zero association with Microsoft’s profit: this follows from a extension of d-separation to DMGs [9]. This is expected from the assumptions (Philip’s stocks should tell us something about Microsoft’s once we know Sony’s, but not before it), but does not hold in the graphical model in Figure 1(c). While it is tempting to use Markov networks to represent relational models (free of concerns raised by cyclic directed representations), it is clear that there are problems for which they are not a sensible choice. This is not to say that Markov networks are not the best representation for large classes of relational problems. Conditional random fields [4] are well-motivated Markov network models for sequence learning. The temporal relationship is closed under marginalization: if we do not measure some steps in the sequence, we will still link the corresponding remaining vertices accordingly, as illustrated in Figure 2. Directed mixed graphs are not a good representation for this sequence structure. 5 1 1 2 3 4 5 X Y Y Y Y Y X X2 X3 4 X 5 1 1 2 3 4 5 X Y Y Y Y Y X X2 X3 4 X X 3 Y X3 5 Y X5 1 1 Y (a) (b) (c) Figure 2: (a) A conditional random field (CRF) graph for sequence data; (b) A hypothetical scenario where two of the time slices are not measured, as indicated by dashed boxes; (c) The resulting CRF graph for the remaining variables, which corresponds to the same criteria for construction of (a). To summarize, the decision between using a Markov network or a DMG reduces to the following modeling issue: if two unlinked object labels yi, yj are statistically associated when some chain of relationships exists between yi and yj, then the Markov network semantics should apply (as in the case for temporal relationships). However, if the association arises only given the values of the other objects in the chain, then this is accounted by the dependence semantics of the directed mixed graph representation. The DMG representation propagates training data information through other training points. The Markov network representation propagates training data information through test points. Propagation through training points is relevant in real problems. For instance, in a webpage domain where each webpage has links to pages of several kinds (e.g., [3]), a chain of intermediated points between two classes labels yi and yj is likely to be more informative if we know the values of the labels in this chain. The respective Markov network would ignore all training points in this chain besides the endpoints. In this paper, we introduce a non-parametric classification model for relational data that factorizes according to a directed mixed graph. Sections 2 and 3 describes the model and contrasts it to a closely related approach which bears a strong analogy to the Markov network formulation. Experiments in text classification are described in Section 4. 2 Model Chu et al. [2] describe an approach for Gaussian process classification using relational information, which we review and compare to our proposed model. Previous approach: relational Gaussian processes through indicators −For each point x in the input space X, there is a corresponding function value fx. Given observed input points x1, x2, . . . , xn, a Gaussian process prior over f = [f1, f2, . . . , fn]T has the shape P(f) = 1 (2π)n/2|Σ|1/2 exp  −1 2f T Σ−1f  (2) 1For Gaussian models, the absence of an edge in the undirected representation (i.e., Gaussian Markov random fields) corresponds to a zero entry in the inverse covariance matrix, where in the DMG it corresponds to a zero in the covariance matrix [9]. ξ 12 ξ 23 f2 Y2 X2 f1 Y1 X1 f3 X3 ε1 ε2 3ε Y3 Y2 X2 Y1 X1 X3 ε1 ε2 3ε f2 f1 f3 Y3 X2 Y1 X1 X3 f2 f3 f1 Y3 ε1 ε2 3ε Y2 1 2 3 ζ ζ ζ (a) (b) (c) Figure 3: (a) A prediction problem where y3 is unknown and the training set is composed of other two datapoints. Dependencies between f1, f2 and f3 are given by a Gaussian process prior and not represented in the picture. Indicators ξij are known and set to 1; (b) The extra associations that arise by conditioning on ξ = 1 can be factorized as the Markov network model here depicted, in the spirit of [9]; (c) Our proposed model, which ties the error terms and has origins in known statistical models such as seemingly unrelated regression and structural equation models [11]. where the ijth entry of Σ is given by a Mercer kernel function K(xi, xj) [8]. The idea is to start from a standard Gaussian process prior, and add relational information by conditioning on relational indicators. Let ξij be an indicator that assumes different values, e.g., 1 or 0. The indicator values are observed for each pair of data points (xi, xj): they are an encoding of the given relational structure. A model for P(ξij = 1|fi, fj) is defined. This evidence is incorporated into the Gaussian process by conditioning on all indicators ξij that are positive. Essentially, the idea boils down to using P(f|ξ = 1) as the prior for a Gaussian process classifier. Figure 3(a) illustrates a problem with datapoints {(x1, y1), (x2, y2), (x3, y3)}. Gray vertices represent unobserved variables. Each yi is a binary random variable, with conditional probability given by P(yi = 1|fi) = Φ(fi/σ) (3) where Φ(·) is the standard normal cumulative function and σ is a hyperparameter. This can be interpreted as the cumulative distribution of fi + ϵi, where fi is given and ϵi is a normal random variable with zero mean and variance σ2. In the example of Figure 3(a), one has two relations: (x1, x2), (x2, x3). This information is incorporated by conditioning on the evidence (ξ12 = 1, ξ23 = 1). Observed points (x1, y1), (x2, y2) form the training set. The prediction task is to estimate y3. Notice that ξ12 is not used to predict y3: the Markov blanket for f3 includes (f1, f2, ξ23, y3, ϵ3) and the input features. Essentially, conditioning on ξ = 1 corresponds to a pairwise Markov network structure, as depicted in Figure 3(b) [9]2. Our approach: mixed graph relational model −Figure 3(c) illustrates our proposed setup. For reasons that will become clear in the sequel, we parameterize the conditional probability of yi as P(yi = 1|gi, vi) = Φ(gi/√vi) (4) where gi = fi + ζi. As before, Equation (4) can be interpreted as the cumulative distribution of gi + ϵ⋆ i , with ϵ⋆ i as a normal random variable with zero mean and variance vi = σ2 −σ2 ζi, the last term being the variance of ζi. That is, we break the original error term as ϵi = ζi + ϵ⋆ i , where ϵ⋆ i and ϵ⋆ j are independent for all i ̸= j. Random vector ζ is a multivariate normal with zero mean and covariance matrix Σζ. The key aspect in our model is that the covariance of ζi and ζj is non-zero only if objects i and j are related (that is, bi-directed edge yi ↔yj is in the relational graph). Parameterizing Σζ for relational problems is non-trivial and discussed in the next section. In the example of Figure 3, one noticeable difference of our model 3(c) to a standard Markov network models 3(b) is that now the Markov blanket for f3 includes error terms for all variables (both ϵ and ζ terms), following the motivation presented in Section 1. 2In the figure, we are not representing explicitly that f1, f2 and f3 are not independent (the prior covariance matrix Σ is complete). The figure is meant as a representation of the extra associations that arise when conditioning on ξ = 1, and the way such associations factorize. As before, the prior for f in our setup is the Gaussian process prior (2). This means that g has the following Gaussian process prior (implicitly conditioned on x): P(g) = 1 (2π)n/2|R|1/2 exp  −1 2g⊤R−1g  (5) where R = K + Σζ is the covariance matrix of g = f + ζ, with Kij = K(xi, xj). 3 Parametrizing a mixed graph model for relational classification For simplicity, in this paper we will consider only relationships that induce positive associations between labels. Ideally, the parameterization of Σζ has to fulfill two desiderata: (i). it should respect the marginal independence constraints as encoded by the graphical model (i.e., zero covariance for vertices that are not adjacent), and be positive definite; (ii). it has to be parsimonious in order to facilitate hyperparameter selection, both computationally and statistically. Unlike the multivariate analysis problems in [11], the size of our covariance matrix grows with the number of data points. As shown by [11], exact inference in models with covariance matrices with zero-entry constraints is computationally demanding. We provide two alternative parameterizations that are not as flexible, but which lead to covariance matrices that are simple to compute and easy to implement. We will work under the transductive scenario, where training and all test points are given in advance. The corresponding graph thus contain unobserved and observed label nodes. 3.1 Method I The first method is an automated method to relax some of the independence constraints, while guaranteeing positive-definiteness, and a parameterization that depends on a single scalar ρ. This allows for more efficient inference and is done as follows: 1. Let Gζ be the corresponding bi-directed subgraph of our original mixed graph, and let U0 be a matrix with n × n entries, n being the number of nodes in Gζ 2. Set U0 ij to be the number of cliques in Gζ where yi and yj appear together; 3. Set U0 ii to be the number of cliques containing yi, plus a small constant ∆; 4. Set U to be the correspondingcorrelation matrix obtained by intepreting U0 as a covariance matrix and rescaling it; Finally, set Σζ = ρU, where ρ ∈[0, 1] is a given hyperparameter. Matrix U is always guaranteed to be positive definite: it is equivalent to obtaining the covariance matrix of y from a linear latent variable model, where there is an independent standard Gaussian latent variable as a common parent to every clique, and every observed node yi is given by the sum of its parents plus an independent error term of variance ∆. Marginal independencies are respected, since independent random variables will never be in a same clique in Gζ. In practice, this method cannot be used as is since the number of cliques will in general grow at an exponential rate as a function of n. Instead, we first triangulate the graph: in this case, extracting cliques can be done in polynomial time. This is a relaxation of the original goal, since some of the original marginal independence constraints will not be enforced due to the triangulation3. 3.2 Method II The method suggested in the previous section is appealing under the assumption that vertices that appear in many common cliques are more likely to have more hidden common causes, and hence should have stronger associations. However, sometimes the triangulation introduces bad artifacts, with lots of marginal independence constraints being violated. In this case, this will often result in a poor prediction performance. A cheap alternative approach is not generating cliques, and instead 3The need for an approximation is not a shortcoming only of the DMG approach. Notice that the relational Gaussian process of [2] also requires an approximation of its relational kernel. 10 20 30 40 50 60 70 80 90 100 10 20 30 40 50 60 70 80 90 100 10 20 30 40 50 60 70 80 90 100 10 20 30 40 50 60 70 80 90 100 10 20 30 40 50 60 70 80 90 100 10 20 30 40 50 60 70 80 90 100 (a) (b) (c) Figure 4: (a) The link matrix for the political books dataset. (b) The relational kernel matrix obtained with the approximated Method I. (c) The kernel matrix obtained with Method II, which tends to produce much weaker associations but does not introduce spurious relations. getting a marginal covariance matrix from a different latent variable model. In this model, we create an independent standard Gaussian variable for each edge yi ↔yj instead of each clique. No triangulation will be necessary, and all marginal independence constraints will be respected. This, however, has shortcomings of its own: for all pairs (yi, yj) connected by an edge, it will be the case that U0 ij = 1, while U0 ii can be as large as n. This means that the resulting correlation in Uij can be close to zero even if yi and yj are always in the same cliques. In Section 4, we will choose between Methods I and II according to the marginal likelihood of the model. 3.3 Algorithm Recall that our model is a Gaussian process classifier with error terms ϵi of variance σ such that ϵi = ζi + ϵ⋆ i . Without loss of generality, we will assume that σ = 1. This results in the following parameterization of the full error covariance matrix: Σϵ = (1 −ρ)I + ρU (6) where I is an n × n identity matrix. Matrix (1 −ρ)I corresponds to the covariance matrix Σϵ⋆. The usefulness of separating ϵ as ϵ⋆and ζ becomes evident when we use an expectation-propagation (EP) algorithm [7] to perform inference in our relational classifier. Instead of approximating the posterior of f, we approximate the posterior density P(g|D), D = {(x1, y1), . . . , (xn, yn)} being the given training data. The approximate posterior has the form Q(g) ∝P(g) Q i ˜ti(gi) where P(g) is the Gaussian process prior with kernel matrix R = K + Σζ as defined in the previous section. Since the covariance matrix Σϵ⋆is diagonal, the true likelihood of y given g factorizes over each datapoint: P(y|g) = Qn i=1 P(yi|gi), and standard EP algorithms for Gaussian process classification can be used [8] (with the variance given by Σϵ⋆instead of Σϵ, and kernel matrix R instead of K). The final algorithm defines a whole new class of relational models, depends on a single hyperparameter ρ which can be optimized by grid search in [0, 1], and requires virtually no modification of code written for EP-based Gaussian process classifiers4. 4 Results We now compare three different methods in relational classification tasks. We will compare a standard Gaussian process classifier (GPC), the relational Gaussian process (RGP) of [2] and our method, the mixed graph Gaussian process (XGP). A linear kernel K(x, z) = x · z is used, as described by [2]. We set ∆= 10−4 and the hyperparameter ρ is found by a grid search in the space {0.1, 0.2, 0.3, . . ., 1.0} maximizing the approximate EP marginal likelihood5. 4We provide MATLAB/Octave code for our method in http://www.statslab.cam.ac.uk/∼silva. 5For triangulation, we used the MATLAB implementation of the Reverse Cuthill McKee vertex ordering available at http://people.scs.fsu.edu/∼burkardt/m src/rcm/rcm.html Table 1: The averaged AUC scores of citation prediction on test cases of the Cora database are recorded along with standard deviation over 100 trials. “n” denotes the number of papers in one class. “Citations” denotes the citation count within the two paper classes. Group n Citations GPC GPC with Citations XGP 5vs1 346/488 2466 0.905 ± 0.031 0.891 ± 0.022 0.945 ± 0.053 5vs2 346/619 3417 0.900 ± 0.032 0.905 ± 0.044 0.933 ± 0.059 5vs3 346/1376 3905 0.863 ± 0.040 0.893 ± 0.017 0.883 ± 0.013 5vs4 346/646 2858 0.916 ± 0.030 0.887 ± 0.018 0.951 ± 0.042 5vs6 346/281 1968 0.887 ± 0.054 0.843 ± 0.076 0.955 ± 0.041 5vs7 346/529 2948 0.869 ± 0.045 0.867 ± 0.041 0.926 ± 0.076 4.1 Political books We consider first a simple classification problem where the goal is to classify whether a particular book is of liberal political inclination or not. The features of each book are given by the words in the Amazon.com front page for that particular book. The choice of books, labels, and relationships are given in the data collected by Valdis Krebs and available at http://www-personal.umich.edu/ mejn/netdata. The data containing book features can be found at http://www.statslab.cam.ac.uk/∼silva. There are 105 books, 43 of which are labeled as liberal books. The relationships are pairs of books which are frequently purchased together by a same customer. Notice this is an easy problem, where labels are strongly associated if they share a relationship. We performed evaluation by sampling 100 times from the original pool of books, assigning half of them as trainining data. The evaluation criterion was the area under the curve (AUC) for this binary problem. This is a problem where Method I is suboptimal. Figure 4(a) shows the original binary link matrix. Figure 4(b) depicts the corresponding U0 matrix obtained with Method I, where entries closer to red correspond to stronger correlations. Method II gives a better performance here (Method I was better in the next two experiments). The AUC result for GPC was of 0.92, while both RGP and XGP achieved 0.98 (the difference between XGP and GPC having a std. deviation of 0.02). 4.2 Cora The Cora collection [6] contains over 50,000 computer science research papers including bibliographic citations. We used a subset in our experiment. The subset consists of 4,285 machine learning papers categorized into 7 classes. The second column of Table 1 shows the class sizes. Each paper was preprocessed as a bag-of-words, a vector of “term frequency” components scaled by “inverse document frequency”, and then normalized to unity length. This follows the pre-processing used in [2]. There is a total of 20,082 features. For each class, we randomly selected 1% of the labelled samples for training and tested on the remainder. The partition was repeated 100 times. We used the fact that the database is composed of fairly specialized papers as an illustration of when XGP might not be as optimal as RGP (whose AUC curves are very close to 1), since the population of links tends to be better separated between different classes (but this is also means that the task is fairly easy, and differences disappear very rapidly with increasing sample sizes). The fact there is very little training data also favors RGP, since XGP propagates information through training points. Still, XGP does better than the non-relational GPC. Notice that adding the citation adjacency matrix as a binary input feature for each paper does not improve the performance of the GPC, as shown in Table 1. Results for other classes are of similar qualitative nature and not displayed here. 4.3 WebKB The WebKB dataset consists of homepages from 4 different universities: Cornell, Texas, Washington and Wisconsin [3]. Each webpage belongs to one out of 7 categories: student, professor, course, project, staff, department and “other”. The relations come from actual links in the webpages. There is relatively high heterogeneity of types of links in each page: in terms of mixed graph modeling, this linkage mechanism is explained by a hidden common cause (e.g., a student and a course page are associated because that person’s interest in enrolling as a student also creates demand for a course). The heterogeneity also suggests that two unlinked pages should not, on average, have an association if they link to a common page W. However, observing the type of page W might create Table 2: Comparison of the three algorithms on the task “other” vs. “not-other” in the WebKB domain. Results for GPC and RGP taken from [2]. The same partitions for training and test are used to generate the results for XGP. Mean and standard deviation of AUC results are reported. University Numbers Other or Not Other All Link GPC RGP XGP Cornell 617 865 13177 0.708 ± 0.021 0.884 ± 0.025 0.917 ± 0.022 Texas 571 827 16090 0.799 ± 0.021 0.906 ± 0.026 0.949 ± 0.015 Washington 939 1205 15388 0.782 ± 0.023 0.877 ± 0.024 0.923 ± 0.016 Wisconsin 942 1263 21594 0.839 ± 0.014 0.899 ± 0.015 0.941 ± 0.018 the association. We compare how the three algorithms perform when trying to predict if a webpage is of class “other” or not (the other classifications are easier, with smaller differences. Results are omitted for space purposes). The proportion of “other” to non-“other” is about 4:1, which makes the area under the curve (AUC) a more suitable measure of success. We used the same 100 subsamples from [2], where 10% of the whole data is sampled from the pool for a specific university, and the remaining is used for test. We also used the same features as in [2], pre-processed as described in the previous section. The results are shown in Table 2. Both relational Gaussian processes are far better than the non-relational GPC. XGP gives significant improvements over RGP in all four universities. 5 Conclusion We introduced a new family of relational classifiers by extending a classical statistical model [12] to non-parametric relational classification. This is inspired by recent advances in relational Gaussian processes [2] and Bayesian inference for mixed graph models [11]. We showed empirically that modeling the type of latent phenomena that our approach postulates can sometimes improve prediction performance in problems traditionally approached by Markov network structures. Several interesting problems can be treated in the future. It is clear that there are many different ways by which the relational covariance matrix can be parameterized. Intermediate solutions between Methods I and II, approximations through matrix factorizations and graph cuts are only a few among many alternatives that can be explored. Moreover, there is a relationship between our model and multiple kernel learning [1], where one of the kernels comes from error covariances. This might provide alternative ways of learning our models, including multiple types of relationships. Acknowledgements: We thank Vikas Sindhwani for the preprocessed Cora database. References [1] F. Bach, G. Lanckriet, and M. Jordan. Multiple kernel learning, conic duality, and the SMO algorithm. 21st International Conference on Machine Learning, 2004. [2] W. Chu, V. Sindhwani, Z. Ghahramani, and S. Keerthi. Relational learning with Gaussian processes. Neural Information Processing Systems, 2006. [3] M. Craven, D. DiPasquo, D. Freitag, A. McCallum, T. Mitchell, K. Nigam, and S. Slattery. Learning to extract symbolic knowledge from the World Wide Web. Proceedings of AAAI’98, pages 509–516, 1998. [4] J. Lafferty, A. McCallum, and F. Pereira. Conditional random fields: Probabilistic models for segmenting and labeling sequence data. 18th International Conference on Machine Learning, 2001. [5] S. Lauritzen. Graphical Models. Oxford University Press, 1996. [6] A. McCallum, K. Nigam, J. Rennie, and K. Seymore. Automating the construction of Internet portals with machine learning. Information Retrieval Journal, 3:127–163, 2000. [7] T. Minka. A family of algorithms for approximate Bayesian inference. PhD Thesis, MIT, 2001. [8] C. Rasmussen and C. Williams. Gaussian Processes for Machine Learning. MIT Press, 2006. [9] T. Richardson and P. Spirtes. Ancestral graph Markov models. Annals of Statistics, 30:962–1030, 2002. [10] P. Sen and L. Getoor. Link-based classification. Report CS-TR-4858, University of Maryland, 2007. [11] R. Silva and Z. Ghahramani. Bayesian inference for Gaussian mixed graph models. UAI, 2006. [12] A. Zellner. An efficient method of estimating seemingly unrelated regression equations and tests for aggregation bias. Journal of the American Statistical Association, 1962.
2007
118
3,146
Modeling image patches with a directed hierarchy of Markov random fields Simon Osindero and Geoffrey Hinton Department of Computer Science, University of Toronto 6, King’s College Road, M5S 3G4, Canada osindero,hinton@cs.toronto.edu Abstract We describe an efficient learning procedure for multilayer generative models that combine the best aspects of Markov random fields and deep, directed belief nets. The generative models can be learned one layer at a time and when learning is complete they have a very fast inference procedure for computing a good approximation to the posterior distribution in all of the hidden layers. Each hidden layer has its own MRF whose energy function is modulated by the top-down directed connections from the layer above. To generate from the model, each layer in turn must settle to equilibrium given its top-down input. We show that this type of model is good at capturing the statistics of patches of natural images. 1 Introduction The soldiers on a parade ground form a neat rectangle by interacting with their neighbors. An officer decides where the rectangle should be, but he would be ill-advised to try to tell each individual soldier exactly where to stand. By allowing constraints to be enforced by local interactions, the officer enormously reduces the bandwidth of top-down communication required to generate a familiar pattern. Instead of micro-managing the soldiers, the officer specifies an objective function and leaves it to the soldiers to optimise that function. This example of pattern generation suggests that a multilayer, directed belief net may not be the most effective way to generate patterns. Instead of using shared ancestors to create correlations between the variables within a layer, it may be more efficient for each layer to have its own energy function that is modulated by directed, top-down input from the layer above. Given the top-down input, each layer can then use lateral interactions to settle on a good configuration and this configuration can then provide the top-down input for the next layer down. When generating an image of a face, for example, the approximate locations of the mouth and nose might be specified by a higher level and the local interactions would then ensure that the accuracy of their vertical alignment was far greater than the accuracy with which their locations were specified top-down. In this paper, we show that recently developed techniques for learning deep belief nets (DBN’s) can be generalized to solve the apparently more difficult problem of learning a directed hierarchy of Markov Random Fields (MRF’s). The method we describe can learn models that have many hidden layers, each with its own MRF whose energy function is conditional on the values of the variables in the layer above. It does not require detailed prior knowledge about the data to be modeled, though it obviously works better if the architecture and the types of latent variable are well matched to the task. 1 2 Learning deep belief nets: An overview The learning procedure for deep belief nets has now been described in several places (Hinton et al., 2006; Hinton and Salakhutdinov, 2006; Bengio et al., 2007) and will only be sketched here. It relies on a basic module, called a restricted Boltzmann machine (RBM) that can be trained efficiently using a method called “contrastive divergence” (Hinton, 2002). 2.1 Restricted Boltzmann Machines An RBM consists of a layer of binary stochastic “visible” units connected to a layer of binary, stochastic “hidden” units via symmetrically weighted connections. A joint configuration, (v, h) of the visible and hidden units has an energy given by: E(v, h) = − X i∈visibles bivi − X j∈hiddens bjhj − X i,j vihjwij (1) where vi, hj are the binary states of visible unit i and hidden unit j, bi, bj are their biases and wij is the symmetric weight between them. The network assigns a probability to every possible image via this energy function and the probability of a training image can be raised by adjusting the weights and biases to lower the energy of that image and to raise the energy of similar, reconstructed images that the network would prefer to the real data. Given a training vector, v, the binary state, hj, of each feature detector, j, is set to 1 with probability σ(bj + P i viwij), where σ(x) is the logistic function 1/(1 + exp(−x)), bj is the bias of j, vi is the state of visible unit i, and wij is the weight between i and j. Once binary states have been chosen for the hidden units, a reconstruction is produced by setting each vi to 1 with probability σ(bi + P j hjwij). The states of the hidden units are then updated once more so that they represent features of the reconstruction. The change in a weight is given by ∆wij = ǫ(⟨vihj⟩data −⟨vihj⟩recon) (2) where ǫ is a learning rate, ⟨vihj⟩data is the fraction of times that visible unit i and hidden units j are on together when the hidden units are being driven by data and ⟨vihj⟩recon is the corresponding fraction for reconstructions. A simplified version of the same learning rule is used for the biases. The learning works well even though it is not exactly following the gradient of the log probability of the training data (Hinton, 2002). 2.2 Compositions of experts A single layer of binary features is usually not the best way to capture the structure in the data. We now show how RBM’S can be composed to create much more powerful, multilayer models. After using an RBM to learn the first layer of hidden features we have an undirected model that defines p(v, h) via the energy function in Eq. 1. We can also think of the model as defining p(v, h) by defining a consistent pair of conditional probabilities, p(h|v) and p(v|h) which can be used to sample from the model distribution. A different way to express what has been learned is p(v|h) and p(h). Unlike a standard directed model, this p(h) does not have its own separate parameters. It is a complicated, non-factorial prior on h that is defined implicitly by the weights. This peculiar decomposition into p(h) and p(v|h) suggests a recursive algorithm: keep the learned p(v|h) but replace p(h) by a better prior over h, i.e. a prior that is closer to the average, over all the data vectors, of the conditional posterior over h. We can sample from this average conditional posterior by simply applying p(h|v) to the training data. The sampled h vectors are then the “data” that is used for training a higher-level RBM that learns the next layer of features. We could initialize the higher-level RBM model by using the same parameters as the lower-level RBM but with the roles of the hidden and visible units reversed. This ensures that p(v) for the higher-level RBM starts out being exactly the same as p(h) for the lowerlevel one. Provided the number of features per layer does not decrease, Hinton et al. (2006) show that each extra layer increases a variational lower bound on the log probability of the data. The directed connections from the first hidden layer to the visible units in the final, composite graphical model are a consequence of the the fact that we keep the p(v|h) but throw away the p(h) defined by the first level RBM. In the final composite model, the only undirected connections are 2 between the top two layers, because we do not throw away the p(h) for the highest-level RBM. To suppress noise in the learning signal, we use the real-valued activation probabilities for the visible units of all the higher-level RBM’s, but to prevent hidden units from transmitting more than one bit of information from the data to its reconstruction, we always use stochastic binary values for the hidden units. 3 Semi-restricted Boltzmann machines For contrastive divergence learning to work well, it is important for the hidden units to be sampled from their conditional distribution given the data or the reconstructions. It not necessary, however, for the reconstructions to be sampled from their conditional distribution given the hidden states. All that is required is that the reconstructions have lower free energy than the data. So it is possible to include lateral connections between the visible units and to create reconstructions by taking a small step towards the conditional equilibrium distribution given the hidden states. If we are using meanfield activities for the reconstructions, we can move towards the equilibrium distribution by using a few damped mean-field updates (Welling and Hinton, 2002). We call this a semi-restricted Boltzmann machine (SRBM). The visible units form a conditional MRF with the biases of the visible units being determined by the hidden states. The learning procedure for the visible to hidden connections is unaffected and the same learning procedure applies to the lateral connections. Explicitly, the energy function for a SRBM is given by E(v, h) = − X i∈visibles bivi − X j∈hiddens bjhj − X i,j vihjwij − X i<i′ vivi′Lii′ (3) and the update rule for the lateral connections is ∆Lii′ = ǫ(⟨vivi′⟩data −⟨vivi′⟩recon) (4) Semi-restricted Boltzmann machines can be learned greedily and composed to form a directed hierarchy of conditional MRF’s. To generate from the composite model we first get an equilbrium sample from the top level SRBM and then we get an equilibrium sample from each lower level MRF in turn, given the top-down input from the sample in the layer above. The settling at each intermediate level does not need to explore a highly multi-modal energy landscape because the top-down input has already selected a good region of the space. The role of the settling is simply to sharpen the somewhat vague top-down specification and to ensure that the resulting configuration repects learned constraints. Each intermediate level fills in the details given the larger picture defined by the level above. 4 Inference in a directed hierarchy of MRF’s In a deep belief network, inference is very simple and very fast because of the way in which the network is learned. Rather than first deciding how to represent the data and then worrying about inference afterwards, deep belief nets restrict themselves to learning representations for which accurate variational inference can be done in a single bottom-up pass. Each layer computes an approximate sample from its posterior distribution given the activities in the layer below. This can be done with a single matrix multiply using the bottom-up “recognition” connections that were originally learned by an RBM but are no longer part of the generative model. The recognition connections compute an approximation to the product of a data-dependent likelihood term coming from the layer below and a data-independent prior term that depends on the learned parameters of all the higher layers. Each of these two terms can contain strong correlations, but the way in which the model is learned ensures that these correlations cancel each other out so that the true posterior distribution in each layer is very close to factorial and very simple to compute from the activities in the layer below. The inference process is unaltered by adding an MRF at each hidden layer. The role of the MRF’s is to allow the generative process to mimic the constraints that are obeyed by the variables within a layer when the network is being driven bottom-up by data. During inference, these constraints are enforced by the data. From a biological perspective, it is very important for perceptual inference to be fast and accurate, so it is very good that it does not involve any kind of iterative settling or belief propagation. The MRF’s are vital for imposing constraints during generation and for whitening the 3 learning signal so that weak higher-order structure is not masked by strong pairwise correlations. During perceptual inference, however, the MRF’s are mere spectators. 5 Whitening without waiting Data is often whitened to prevent strong pairwise correlations from masking weaker but more interesting structure. An alternative to whitening the data is to modify the learning procedure so that it acts as if the data were whitened and ignores strong pairwise correlations when learning the next level of features. This has the advantage that perceptual inference is not slowed down by an explicit whitening stage. If the lateral connections ensure that a pairwise correlation in the distribution of the reconstructions is the same as in the data distribution, that correlation will be ignored by contrastive divergence since the learning is driven by the differences between the two distributions. This also explains why different hidden units learn different features even when they have the same connectivity: once one feature has made one aspect of the reconstructions match the data, there is no longer any learning signal for another hidden unit to learn that same aspect. Figure 1 shows how the features learned by the hidden units are affected by the presence of lateral connections between the visible units. Hidden units are no longer required for modeling the strong pairwise correlations between nearby pixels so they are free to discover more interesting features than the simple on-center off-surround fetaures that are prevalent when there are no connections between visible units. (A) (B) Figure 1: (A) A random sample of the filters learned by an RBM trained on 60,000 images of handwritten digits from the MNIST database (see Hinton et al. (2006) for details). (B) A random sample of the filters learned by an SRBM trained on the same data. To produce each reconstruction, the SRBM used 5 damped mean-field iterations with the top-down input from the hidden states fixed. Adding lateral connections between the visible units changes the types of hidden features that are learned. For simplicity each visible unit in the SRBM was connected to all 783 other visible units, but only the local connections developed large weights and the lateral connections to each pixel formed a small on-center off-surround field centered on the pixel. Pixels close to the edge of the image that were only active one or two times in the whole training set behaved very differently: They learned to predict the whole of the particular digit that caused them to be active. 6 Modeling patches of natural images To illustrate the advantages of adding lateral connections to the hidden layers of a DBN we use the well-studied task of modelling the statistical structure of images of natural scenes (Bell and Sejnowski, 1997; Olshausen and Field, 1996; Karklin and Lewicki, 2005; Osindero et al., 2006; Lyu and Simoncelli, 2006). Using DBN’s, it is easy to build overcomplete and hierchical generative models of image patches. These are able to capture much richer types of statistical dependency than traditional generative models such as ICA. They also have the potential to go well beyond the types of dependencies that can be captured by other, more sophisticated, multi-stage approaches such as (Karklin and Lewicki, 2005; Osindero et al., 2006; Lyu and Simoncelli, 2006). 6.1 Adapting Restricted Boltzmann machines to real-valued data Hinton and Salakhutdinov (2006) show how the visible units of an RBM can be modified to allow it to model real-valued data using linear visible variables with Gaussian noise, but retaining the binary stochastic hidden units. The learning procedure is essentially unchanged especially if we use the mean-field approximation for the visible units which is what we do. 4 Two generative DBN models, one with and one without lateral connectivity, were trained using the updates from equations 2 and 4. The training data used consisted of 150,000 20 × 20 patches extracted from images of natural scenes taken from the collection of Van Hateren1. The raw image intensities were pre-processed using a standard set of operations — namely an initial logtransformation, and then a normalisation step such that each pixel had zero-mean across the training set. The patches were then whitened using a Zero-Phase Components analysis (ZCA) filter-bank. The set of whitening filters is obtained by rotating the data into a co-ordinate system aligned with the eigenvectors of the covariance matrix, then rescaling each component by the inverse square-root of the correspoding eigenvalue, then rotating back into the original pixel co-ordinate system. Using ZCA has a similar effect to learning lateral connections between pixels (Welling and Hinton, 2002). We used ZCA whitened data for both models to make it clear that the advantage of lateral connections is not just caused by their ability to whiten the input data. Because the data was whitened we did not include lateral connections in the bottom layer of the lateral DBN. The results presented in the figures that follow are all shown in “unwhitened pixel-space”, i.e. the effects of the whitening filter are undone for display purposes. The models each had 2000 units in the first hidden layer, 500 in the second hidden layer and 1000 units in the third hidden layer. The generative abilities of both models are very robust against variations in the number of hidden units in each layer, though it seems to be important for the top layer to be quite large. In the case where lateral connections were used, the first and second hidden layers of the final, composite model were fully laterally connected. Data was taken in mini-batches of size 100, and training was performed for 50 epochs for the first layer and 30 epochs for the remaining layers. A learning rate of 10−3 was used for the interlayer connections, and half that rate for the lateral connections. Multiplicative weight decay of 10−2 multiplied by the learning rate was used, and a momentum factor of 0.9 was employed. When training the higher-level SRBM’s in the model with lateral connectivity, 30 parallel mean field updates were used to produce the reconstructions with the top-down input from the hidden states held constant. Each mean field update set the new activity of every “visible” unit to be 0.2 times the previous activity plus 0.8 times the value computed by applying the logistic function to the total input received from the hidden units and the previous states of the visible units. Learned filters Figure 2 shows a random sample of the filters learned using an RBM with Gaussian visible units. These filters are the same for both models. This representation is 5× overcomplete. Figure 2: Filters from the first hidden layer. The results are generally similar to previous work on learning representations of natural image patches. The majority of the filters are tuned in location, orientation, and spatial frequency. The joint space of location and orientation is approximately evenly tiled and the spatial frequency responses span a range of about four octaves. 6.1.1 Generating samples from the model The same issue that necessitates the use of approximations when learning deep-networks – namely the unknown value of the partition function – also makes it difficult to objectively assess how well they fit the data in the absence of predictive tasks such as classification. Since our main aim is to demonstrate the improvement in data modelling ability that lateral connections bring to DBN’s, we simply present samples from similarly structured models, with and without lateral connections, and compare these samples with real data. 1http://hlab.phys.rug.nl/imlib/index.html 5 Ten-thousand data samples were generated by randomly initialising the top-level (S)RBM states and then running 300 iterations of a Gibbs sampling scheme between the top two layers. For models without lateral connections, each iteration of the scheme consisted of a full parallel-update of the top-most layer followed by a full parallel-update of the penultimate layer. In models with lateral connections, each iteration consisted of a full parallel-update of the top-most layer followed by 50 rounds of sequential stochastic updates of each unit in the penultimate layer, under the influence of the previously sampled top-layer states. (A different random ordering of units was drawn in each update-round.) After running this Markov Chain we then performed an ancestral generative pass down to the data layer. In the case of models with no lateral connections, this simply involved sampling from the factorial conditional distribution at each layer. In the case of models with lateral connections we performed 50 rounds of randomly-ordered, sequential stochastic updates under the influence of the top-down inputs from the layer above. In both cases, on the final hidden layer update before generating the pixel values, mean-field updates were used so that the data was generated using the real-valued probabilities in the first hidden layer rather than stochastic-binary states. (A) (B) (C) (D) Figure 3: (A) Samples from a model without lateral connections. (B) Samples from a model with lateral connections. (C) Examples of actual data, drawn at random. (D) Examples of actual data, chosen to have closest cosine distance to samples from panel (B). Figure 3 shows that adding undirected lateral interactions within each intermediate hidden layer of a deep belief net greatly improves the model’s ability to generate image patches that look realistic. It is evident from the figure that the samples from the model with lateral connections are much more similar to the real data and contain much more coherent, long-range structure. Belief networks with only directed connections have difficulty capturing spatial constraints between the parts of an image because, in a directed network, the only way to enforce constraints is by using observed descendants. Unobserved ancestors can only be used to model shared sources of variation. 6.1.2 Marginal and pairwise statistics In addition to the largely subjective comparisons from the previous section, if we perform some simple aggregate analyses of the synthesized data we see that the samples from the model with lateral connections are objectively well matched to those from true natural images. In the right-hand column of figure 4 we show histograms of pixel inensities for real data and for data generated by the 6 two models. The kurtosis is 8.3 for real data, 7.3 for the model with lateral connections, and 3.4 for the model with no lateral connections. If we make a histogram of the outputs of all of the filters in the first hidden layer of the model, we discover that the kurtosis is 10.5 on real data, 10.3 on image patches generated by the model with lateral connections, and 3.8 on patches generated by the other model. Columns one through five of figure 4 show the distributions of the response of one filter conditional on the response of a second filter. Again, for image patches generated with lateral connections the statistics are similar to the data and without lateral connections they are quite different. Figure 4: Each row shows statistics computed from a different set of 10,000 images. The first row is for real data. The second row is for image patches generated by the model with lateral interactions. The third row is for patches generated without lateral interactions. Column six shows histograms of pixel intensities. Columns 1-5 show conditional filter responses, in the style suggested in (Wainwright and Simoncelli, 2000), for two different gabor filters applied to the sampled images. In columns 1-3 the filters are 2, 4, or 8 pixels apart. In column 4 they are at the same location but orthogonal orientations. In column 5 they are at the same location and orientation but one octave apart in spatial frequency. 7 Discussion Our results demonstrate the advantages of using semi-restricted Boltzmann machines as the building blocks when building deep belief nets. The model with lateral connections is very good at capturing the statistical structure of natural image patches. In future work we hope to exploit this in a number of image processing tasks that require a good prior over image patches. The models presented in this paper had complete lateral connectivity — largely for simplicity in MATLAB. Such a strategy would not be feasible were we to significantly scale up our networks. Fortunately, there is an obvious solution to this — we can simply restrict the majority of lateral interactions to a local neighbourhood and concomittently have the hidden units focus their attention on spatially localised regions of the image. A topographic ordering would then exist throughout the various layers of the hierarchy. This would greatly reduce the computational load and it corresponds to a sensible prior over image structures, especially if the local regions get larger as we move up the hierarchy. Furthermore, it would probably make the process of settling within a layer much faster. One limitation of the model we have described is that the top-down effects can only change the effective biases of the units in the Markov random field at each level. The model becomes much 7 more powerful if top-down effects can modulate the interactions. For example, an “edge” can be viewed as a breakdown in the local correlational structure of the image: pixel intensities cannot be predicted from neighbors on the other side of an object boundary. A hidden unit that can modulate the pairwise interactions rather than just the biases can form a far more abstract representation of an edge that is not tied to any particular contrast or intensity (Geman and Geman, 1984). Extending our model to this type of top-down modulation is fairly straightforward. Instead of using weights wij that contribute energies −vivjwij we use weights wijk that contribute energies −vivjhkwijk. This allows the binary state of hk to gate the effective weight between visible units i and j. Memisevic and Hinton (2007) show that the same learning methods can be applied with a single hidden layer and there is no reason why such higher-order semi-restricted Boltzmann machines cannot be composed into deep belief nets. Although we have focussed on the challenging task of modeling patches of natural images, we believe the ideas presented here are of much more general applicability. DBN’s without lateral connections have produced state of the art results in a number of domains including document retrieval (Hinton and Salakhutdinov, 2006), character recognition (Hinton et al., 2006), lossy image compression (Hinton and Salakhutdinov, 2006), and the generation of human motion (Taylor et al., 2007). Lateral connections may help in all of these domains. Acknowledgments We are grateful to the members of the machine learning group at the University of Toronto for helpful discussions. This work was supported by NSERC, CFI and CIFAR. GEH is a fellow of CIFAR and holds a CRC chair. References Bell, A. J. and Sejnowski, T. J. (1997). The ”independent components” of natural scenes are edge filters. Vision Research, 37(23):3327–3338. Bengio, Y., Lamblin, P., Popovici, D., and Larochelle, H. (2007). Greedy layer-wise training of deep networks. In B., S., Platt, J., and Hoffman, T., editors, Advances in Neural Information Processing Systems 19. MIT Press, Cambridge, MA. Geman, S. and Geman, D. (1984). Stochastic relaxation, gibbs distributions and the bayesian restoration of images. IEEE Trans. Pattern Anal. Mach. Intell, 6. Hinton, G. E. (2002). Training products of experts by minimizing contrastive divergence. Neural Computation, 14(8):1711–1800. Hinton, G. E., Osindero, S., and Teh, Y. W. (2006). A fast learning algorithm for deep belief nets. Neural Computation, 18. Hinton, G. E. and Salakhutdinov, R. (2006). Reducing the dimensionality of data with neural networks. Science, 313. Karklin, Y. and Lewicki, M. (2005). A hierarchical bayesian model for learning nonlinear statistical regularities in nonstationary natural signals. Neural Computation, 17(2). Lyu, S. and Simoncelli, E. (2006). Statistical modeling of images with fields of gaussian scale mixtures. In Advances Neural Information Processing Systems, volume 19. Memisevic, R. F. and Hinton, G. E. (2007). Unsupervised learning of image transformations. In Computer Vision and Pattern Recognition. IEEE Computer Society. Olshausen, B. A. and Field, D. J. (1996). Emergence of simple-cell receptive field properties by learning a sparse code for natural images. Nature, 381(6583):607–609. JUN 13 NATURE. Osindero, S., Welling, M., and Hinton, G. E. (2006). Topographic product models applied to natural scene statistics. Neural Computation, 18(2). Taylor, G. W., Hinton, G. E., and Roweis, S. (2007). Modeling human motion using binary latent variables. In B., S., Platt, J., and Hoffman, T., editors, Advances in Neural Information Processing Systems 19. MIT Press, Cambridge, MA. Wainwright, M. and Simoncelli, E. (2000). Scale mixtures of Gaussians and the statistics of natural images. In Advances Neural Information Processing Systems, volume 12, pages 855–861. Welling, M. and Hinton, G. E. (2002). A new learning algorithm for mean field boltzmann machines. In International Joint Conference on Neural Networks, Madrid. 8
2007
119
3,147
A Bayesian Model of Conditioned Perception Alan A. Stocker∗and Eero P. Simoncelli Howard Hughes Medical Institute, Center for Neural Science, and Courant Institute of Mathematical Sciences New York University New York, NY-10003, U.S.A. We argue that in many circumstances, human observers evaluate sensory evidence simultaneously under multiple hypotheses regarding the physical process that has generated the sensory information. In such situations, inference can be optimal if an observer combines the evaluation results under each hypothesis according to the probability that the associated hypothesis is correct. However, a number of experimental results reveal suboptimal behavior and may be explained by assuming that once an observer has committed to a particular hypothesis, subsequent evaluation is based on that hypothesis alone. That is, observers sacrifice optimality in order to ensure self-consistency. We formulate this behavior using a conditional Bayesian observer model, and demonstrate that it can account for psychophysical data from a recently reported perceptual experiment in which strong biases in perceptual estimates arise as a consequence of a preceding decision. Not only does the model provide quantitative predictions of subjective responses in variants of the original experiment, but it also appears to be consistent with human responses to cognitive dissonance. 1 Motivation Is the glass half full or half empty? In different situations, the very same perceptual evidence (e.g. the perceived level of liquid in a glass) can be interpreted very differently. Our perception is conditioned on the context within which we judge the evidence. Perhaps we witnessed the process of the glass being filled, and thus would more naturally think of it as half full. Maybe it is the only glass on the table that has liquid remaining, and thus its precious content would be regarded as half full. Or maybe we simply like the content so much that we cannot have enough, in which case we may view it as being half empty. Contextual influences in low-level human perception are the norm rather than the exception, and have been widely reported. Perceptual illusions, for example, often exhibit particularly strong contextual effects, either in terms of perceptual space (e.g. spatial context affects perceived brightness; see [1] for impressive examples) or time (prolonged exposure to an adaptor stimulus will affect subsequent perception, see e.g. the motion after-effect [2]). Data of recent psychophysical experiments suggest that an observer’s previous perceptual decisions provide additional form of context that can substantially influence subsequent perception [3, 4]. In particular, the outcome of a categorical decision task can strongly bias a subsequent estimation task that is based on the same stimulus presentation. Contextual influences are typically strongest when the sensory evidence is most ambiguous in terms of its interpretation, as in the example of the half-full (or half-empty) glass. Bayesian estimators have proven successful in modeling human behavior in a wide variety of lowlevel perceptual tasks (for example: cue-integration (see e.g. [5]), color perception (e.g. [6]), visual motion estimation (e.g. [7, 8])). But they generally do not incorporate contextual dependencies ∗corresponding author. beyond a prior distribution (reflecting past experience) over the variable of interest. Contextual dependencies may be incorporated in a Bayesian framework by assuming that human observers, when performing a perceptual task, test different hypotheses about the underlying structure of the sensory evidence, and arrive at an estimate by weighting the estimates under each hypothesis according to the strength of their belief in that hypothesis. This approach is known as optimal model evaluation [9], or Bayesian model averaging [10] and has been previously suggested to account for cognitive reasoning [11]. It further has been suggested that the brain could use different neuromodulators to keep track of the probabilities of individual hypotheses [12]. Contextual effects are reflected in the observer’s selection and evaluation of these hypotheses, and thus vary with experimental conditions. For the particular case of cue-integration, Bayesian model averaging has been proposed and tested against data [13, 14], suggesting that some of the observed non-linearities in cue integration are the result of the human perceptual system taking into account multiple potential contextual dependencies. In contrast to these studies, however, we propose that model averaging behavior is abandoned once the observer has committed to a particular hypothesis. Specifically, subsequent perception is conditioned only on the chosen hypothesis, thus sacrificing optimality in order to achieve self-consistency. We examine this hypothesis in the context of a recent experiment in which subjects were asked to estimate the direction of motion of random dot patterns after being forced to make a categorical decision about whether the direction of motion fell on one side or the other of a reference mark [4]. Depending on the different levels of motion coherence, responses on the estimation task were heavily biased by the categorical decision. We demonstrate that a self-consistent conditional Bayesian model can account for mean behavior, as well as behavior on individual trials [8]. The model has essentially no free parameters, and in addition is able to make precise predictions under a wide variety of alternative experimental arrangements. We provide two such example predictions. 2 Observer Model We define perception as a statistical estimation problem in which an observer tries to infer the value of some environmental variable s based on sensory evidence m (see Fig. 1). Typically, there are sources of uncertainty associated with m, including both sensor noise and uncertainty about the relationship between the sensory evidence and the variable s. We refer to the latter as structural uncertainty which represents the degree of ambiguity in the observer’s interpretation of the physical world. In cases where the structural possibilities are discrete, we denote them as a set of hypotheses H = {h1, ..., hN}. Perceptual inference requires two steps. First, the observer computes their belief prior knowledge s world observer estimate m property measurement noise! s(m) ^ ... hypotheses h h 1 n p(H|m) p(s|m) Figure 1: Perception as conditioned inference problem. Based on noisy sensory measurements m the observer generates different hypotheses for the generative structure that relates m to the stimulus variable s. Perception is a two-fold inference problem: Given the measurement and prior knowledge, the observer generates and evaluates different structural hypotheses h i. Conditioned on this evaluation, they then infer an estimate ˆs(m) from the measurement m. in each hypothesis for given sensory evidence m. Using Bayes’ identity, the belief is expressed as the posterior p(H|m) = p(m|H)p(H) p(m) . (1) Second, for each hypothesis, a conditional posterior is formulated as p(s|m, H = h i), and the full (non-conditional) posterior is computed by integrating the evidence over all hypotheses, weighted by the belief in each hypothesis hi: p(s|m) = N  i=1 p(s|m, H = hi)p(H = hi|m) . (2) Finally, the observer selects an estimate ˆs that minimizes the expected value (under the posterior) of an appropriate loss function 1. 2.1 Decision leads to conditional estimation In situations where the observer has already made a decision (either explicit or implicit) to select one hypothesis as being correct, we postulate that subsequent inference will be based on that hypothesis alone, rather than averaging over the full set of hypotheses. For example, suppose the observer selects the maximum a posteriori hypothesis hMAP, the hypothesis that is most probable given the sensory evidence and the prior distribution. We assume that this decision then causes the observer to reset the posterior probabilities over the hypotheses to p(H|m) = 1, if H = hMAP (3) = 0, otherwise. That is, the decision making process forces the observer to consider the selected hypothesis as correct, with all other hypotheses rendered impossible. Changing the beliefs over the hypotheses will obviously affect the estimate ˆs in our model. Applying the new posterior probabilities Eq. (3) simplifies the inference problem Eq. (2) to p(s|m) = p(s|m, H = hMAP) . (4) We argue that this simplification by decision is essential for complex perceptual tasks (see Discussion). By making a decision, the observer frees resources, eliminating the need to continuously represent probabilities about other hypotheses, and also simplifies the inference problem. The price to pay is that the subsequent estimate is typically biased and sub-optimal. 3 Example: Conditioned Perception of Visual Motion We tested our observer model by simulating a recently reported psychophysical experiment [4]. Subjects in this experiment were asked on each trial to decide whether the overall motion direction of a random dot pattern was to the right or to the left of a reference mark (as seen from the fixation point). Low levels of motion coherence made the decision task difficult for motion directions close to the reference mark. In a subset of randomly selected trials subjects were also asked to estimate the precise angle of motion direction (see Fig. 2). The decision task was always preceding the estimation task, but at the time of the decision, subjects were unaware whether they would had to perform the estimation task or not. 3.1 Formulating the observer model We denote θ as the direction of coherent motion of the random dot pattern, and m the noisy sensory measurement. Suppose that on a given trial the measurement m indicates a direction of motion to the right of the reference mark. The observer can consider two hypotheses H = {h 1, h2} about the actual physical motion of the random dot pattern: Either the true motion is actually to the right and thus in agreement with the measurement, or it is to the left but noise has disturbed the measurement 1For the purpose of this paper, we assume a standard squared error loss function, in which case the observer should choose the mean of the posterior distribution. a reference decision ? ? b trials ?? reference estimation ? Figure 2: Decision-estimation experiment. (a) Jazayeri and Movshon presented moving random dot patterns to subjects and asked them to decide if the overall motion direction was either to the right or the left of a reference mark [4]. Random dot patterns could exhibit three different levels of motion coherence (3, 6, and 12%) and the single coherent motion direction was randomly selected from a uniform distribution over a symmetric range of angles [−α, α] around the reference mark. (b) In randomly selected 30% of trials, subjects were also asked, after making the directional decision, to estimate the exact angle of motion direction by adjusting an arrow to point in the direction of perceived motion. In a second version of the experiment, motion was either toward the direction of the reference mark or in the opposite direction. such that it indicates motion to the right. The observer’s belief in each of the two hypotheses based on their measurement is given by the posterior distribution according to Eq. (1), and the likelihood p(m|H) =  π −π p(m|θ, H)p(θ|H)dθ . (5) The optimal decision is to select the hypothesis hMAP that maximizes the posterior given by Eq. (1). 3.2 Model observer vs. human observer The subsequent conditioned estimate of motion direction then follows from Eq. (4) which can be rewritten as p(θ|m) = p(m|θ, H = hMAP)p(θ|H = hMAP) p(m|H = hMAP) . (6) The model is completely characterized by three quantities: The likelihood functions p(m|θ, H), the prior distributions p(θ|H) of the direction of motion given each hypothesis, and the prior on the hypotheses p(H) itself (shown in Fig. 3). In the given experimental setup, both prior distributions were uniform but the width parameter of the motion direction α was not explicitly available to the subjects and had to be individually learned from training trials. In general, subjects seem to over-estimate this parameter (up to a factor of two), and adjusting its value in the model accounts for most of the variability between subjects. The likelihood functions p(m|θ, H) is given by the uncertainty about the motion direction due to the low motion coherence levels in the stimuli and the sensory noise characteristics of the observer. We assumed it to be Gaussian with a width that varies inversely with the coherence level. Values were estimated from the data plots in [4]. Figure 4 compares the prediction of the observer model with human data. Trial data of the model were generated by first sampling a hypothesis h′ according to p(H), then drawing a stimulus direction from p(θ|H = h′). then picking a sensory measurement sample m according to the conditional probability p(m|θ, H = h′), and finally performing inference according to Eqs. (1) and (6). The model captures the characteristics of human behavior in both the decision and the subsequent estimation task. Note the strong influence of the decision task on the subsequent estimation of the motion direction, effectively pushing the estimates away from the decision boundary. We also compared the model with a second version of the experiment, in which the decision task was to discriminate between motion toward and away from the reference [4]. Coherent motion of the random dot pattern was uniformly sampled from a range around the reference and from a range −α α 0.5 0.5 p(H) p(θ|H) p(m|θ, H) 12 % 6 % 3 % −α α θ Figure 3: Ingredients of the conditional observer model. The sensory signal is assumed to be corrupted by additive Gaussian noise, with width that varies inversely with the level of motion coherence. Actual widths were approximated from those reported in [4]. The prior distribution over the hypotheses p(H) is uniform. The two prior distributions over motion direction given each hypothesis, p(θ|H = h1,2), are again determined by the experimental setup, and are uniform over the range [0, ±α]. around the direction opposite to the reference, as illustrated by the prior distributions shown in Fig. 5. Again, note that these distributions are given by the experiment and thus, assuming the same noise characteristics as in the first experiment, the model has no free parameters. 3.3 Predictions The model framework also allows us to make quantitative predictions of human perceptual behavior under conditions not yet tested. Figure 6 shows the model observer’s behavior under two modifications of the original experiment. The first is identical to the experiment shown in Fig. 4 but with unequal prior probability on the two hypotheses. The model predicts that a human subject would respond to this change by more frequently choosing the more likely hypothesis. However, this hypothesis would also be more likely to be correct, and thus the estimates under this hypothesis would exhibit less bias than in the original experiment. The second modification is to add a second reference and ask the subject to decide between three different classes of motion direction (e.g. left, central, right). Again, the model predicts that in such a case, a human subject’s estimate in the central direction should be biased away from both decision boundaries, thus leading to an almost constant direction estimate. Estimates following a decision in favor of the two outer classes show the same repulsive bias as seen in the original experiment. 4 Discussion We have presented a normative model for human perception that captures the conditioning effects of decisions on an observer’s subsequent evaluation of sensory evidence. The model is based on the premise that observers aim for optimal inference (taking into account all sensory evidence and prior information), but that they exhibit decision-induced biases because they also aim to be selfconsistent, eliminating alternatives that have been decided against. We’ve demonstrated that this model can account for the experimental results of [4]. Although this strategy is suboptimal (in that it does not minimize expected loss), it provides two fundamental advantages. First, self-consistency would seem an important requirement for a stable interpretation of the environment, and adhering to it might outweigh the disadvantages of perceptual misjudgments. Second, framing perception in terms of optimal statistical estimation implies that the more information an observer evaluates, the more accurately they should be able to solve a perceptual task. But this assumes that the observer can construct and retain full probability distributions and perform optimal inference calculations on these. Presumably, accumulating more probabilistic evidence of more complex conditional dependencies has a cost, both in terms of storage, and in terms of the computational load of performing subsequent inference. Thus, discarding information after making a decision can help to keep this storage and the computational complexity at a manageable level, freeing computational resources to perform other tasks. -20 -10 0 10 20 -20 -10 0 10 20 -20 -10 0 10 20 -20 -10 0 10 20 3 % 6 % 12 % coherence level -20 -10 0 10 20 1 0.5 0 data model true direction [deg] estimated direction [deg] fraction motion right of reference true direction [deg] data model -20 0 20 -10 10 -20 0 20 -10 10 -20 0 20 40 -40 -20 0 20 40 -40 -20 0 20 40 -40 estimated direction [deg] 3 % 3 % 6 % 6 % 12 % 12 % Figure 4: Comparison of model predictions with data for a single subject. Upper left: The two panels show the percentage of observed motion to the right as a function of the true pattern direction, for the three coherence levels tested. The model accurately predicts the subject’s behavior, which exhibits a decrease in the number of false decisions with decreasing noise levels and increasing distance to the reference. Lower left: Mean estimates of the direction of motion after performing the decision task. Clearly, the decision has a substantial impact on the subsequent estimate, producing a strong bias away from the reference. The model response exhibits biases similar to those of the human subjects, with lower coherence levels producing stronger repulsive effects. Right: Grayscale images show distributions of estimates across trials for both the human subject and the model observer, for all three coherence levels. All trials are included (correct and incorrect). White dashed lines represent veridical estimates. Model observer performed 40 trials at each motion direction (in 1.5 degrees increments). Human data are replotted from [4]. An interesting avenue for exploration is the implementation of such an algorithm in neural substrate. Recent studies propose a means by which population of neurons can represent and multiply probability distributions [15]. It would be worthwhile to consider how the model presented here could be implemented with such a neural mechanism. In particular, one might expect that the sudden change in posterior probabilities over the hypotheses associated with the decision task would be reflected in sudden changes in response pattern in such populations [16]. Questions remain. For the experiment we have modeled, the hypotheses were specified by the two alternatives of the decision task, and the subjects were forced to choose one of them. What happens in more general situations? First, do humans always decompose perceptual inference tasks into a set of inference problems, each conditioned on a different hypothesis? Data from other, cue-combination experiments suggest that subjects indeed seem to perform such probabilistic decomposition [13, 14]. If so, then how do observers generate these hypotheses? In the absence of explicit instructions, humans may automatically perform implicit comparisons relative to reference features that are unconsciously selected from the environment. Second, if humans do consider different hypotheses, do they always select a single one on which subsequent percepts are conditioned, even if not explicitly asked to do so? For example, simply displaying the reference mark in the experiment of [4] (without asking the observer to report any decision) might be sufficient to trigger an implicit decision that would result in behaviors similar to those shown in the explicit case. Finally, although we have only tested it on data of a particular psychophysical experiment, we believe that our model may have implications beyond low-level sensory perception. For instance, a data model −α α 0.5 0.5 p(H) p(θ|H) true direction [deg] -20 0 20 -10 10 -20 0 20 -10 10 -20 0 20 40 -40 -20 0 20 40 -40 -20 0 20 40 -40 estimated direction [deg] 3 % 3 % 6 % 6 % 12 % 12 % θ Figure 5: Comparison of model predictions with data for second experiment. Left: Prior distributions for second experiment in [4]. Right: Grayscale images show the trial distributions of the human subject and the model observer for all three coherence levels. White dashed lines represent veridical estimates. Note that the human subject does not show any significant bias in their estimate. The trial variance appears to increase with decreasing levels of coherence. Both characteristics are well predicted by the model. Human data replotted from [4] (supplementary material). well-studied human attribute is known as cognitive dissonance [17], which causes people to adjust their opinions and beliefs to be consistent with their previous statements or behaviors. 2 Thus, self-consistency may be a principle that governs computations throughout the brain. Acknowledgments We thank J. Tenenbaum for referring us to the cognitive dissonance literature, and J. Pillow, N. Daw, D. Heeger, A. Movshon, and M. Jazayeri for interesting discussions. References [1] E.H. Adelson. Perceptual organization and the judgment of brightness. Science, 262:2042–2044, December 1993. [2] S.P. Thompson. Optical illusions of motion. Brain, 3:289–298, 1880. [3] S. Baldassi, N. Megna, and D.C. Burr. Visual clutter causes high-magnitude errors. PLoS Biology, 4(3):387ff, March 2006. [4] M. Jazayeri and J.A. Movshon. A new perceptual illusion reveals mechanisms of sensory decoding. Nature, 446:912ff, April 2007. [5] M.O. Ernst and M.S. Banks. Humans integrate visual and haptic information in a statistically optimal fashion. Nature, 415:429ff, January 2002. [6] D. Brainard and W. Freeman. Bayesian color constancy. Journal of Optical Society of America A, 14(7):1393–1411, July 1997. 2An example that is directly analogous to the perceptual experiment in [4] is documented in [18]: Subjects initially rated kitchen appliances for attractiveness, and then were allowed to select one as a gift from amongst two that they had rated equally. They were subsequently asked to rate the appliances again. The data show a repulsive bias of the post-decision ratings compared with the pre-decision ratings, such that the rating of the selected appliance increased, and the rating of the rejected appliance decreased. 0.2 0.8 −α α 1/3 1/3 1/3 −β β −α α −β β -40 -20 0 20 40 A B trial mean -20 0 20 40 -40 -20 0 20 -10 10 -20 0 20 -10 10 -20 0 20 40 -40 -20 0 20 40 -40 true direction [deg] estimated direction [deg] p(H) p(θ|H) θ θ Figure 6: Model predictions for two modifications of the original experiment. A: We change the prior probability p(H) to be asymmetric (0.8 vs. 0.2). However, we keep the prior distribution of motion directions given a particular side p(θ|H) constant within the range [0, ±α]. The model makes two predictions (trials shown for an intermediate coherence level): First, although tested with an equal number of trials for each motion direction, there is a strong bias induced by the asymmetric prior. And second, the direction estimates on the left are more veridical than on the right. B: We present two reference marks instead of one, asking the subjects to make a choice between three equally likely regions of motion direction. Again, we assume uniform prior distributions of motion directions within each area. The model predicts bilateral repulsion of the estimates in the central area, leading to a strong bias that is almost independent of coherence level. [7] Y. Weiss, E. Simoncelli, and E. Adelson. Motion illusions as optimal percept. Nature Neuroscience, 5(6):598–604, June 2002. [8] A.A. Stocker and E.P. Simoncelli. Noise characteristics and prior expectations in human visual speed perception. Nature Neuroscience, pages 578–585, April 2006. [9] D. Draper. Assessment and propagation of model uncertainty. Journal of the Royal Statistical Society B, 57:45–97, 1995. [10] J.A. Hoeting, D. Madigan, A.E. Raftery, and C.T. Volinsky. Bayesian model averaging: A tutorial. Statistical Science, 14(4):382–417, 1999. [11] T.L. Griffiths, C. Kemp, and J. Tenenbaum. Handbook of Computational Cognitive Modeling, chapter Bayesian models of cognition. Cambridge University Press, to appear. [12] J.A. Yu and P. Dayan. Uncertainty, neuromodulation, and attention. Neuron, 46:681ff, May 2005. [13] D. Knill. Robust cue integration: A Bayesian model and evidence from cue-conflict studies with stereoscopic and figure cues to slant. Journal of Vision, 7(7):1–24, May 2007. [14] K. K¨ording and J. Tenenbaum. Causal inference in sensorimotor integration. In B. Sch¨olkopf, J. Platt, and T. Hoffman, editors, Advances in Neural Information Processing Systems 19. MIT Press, 2007. [15] W.J. Ma, J.M. Beck, P.E. Latham, and A. Pouget. Bayesian inference with probabilistic population codes. Nature Neuroscience, 9:1432ff, November 2006. [16] Roitman J. D. Ditterich J. Mazurek, M. E. and M. N. Shadlen. A role for neural integrators in perceptual decision-making. Cerebral Cortex, 13:1257–1269, 2003. [17] L. Festinger. Theory of Cognitive Dissonance. Stanford University Press, Stanford, CA, 1957. [18] J.W. Brehm. Post-decision changes in the desirability of alternatives. Journal of Abnormal and Social Psychology, 52(3):384ff., 1956.
2007
12
3,148
The Generalized FITC Approximation Andrew Naish-Guzman & Sean Holden Computer Laboratory University of Cambridge Cambridge, CB3 0FD. United Kingdom {agpn2,sbh11}@cl.cam.ac.uk Abstract We present an efficient generalization of the sparse pseudo-input Gaussian process (SPGP) model developed by Snelson and Ghahramani [1], applying it to binary classification problems. By taking advantage of the SPGP prior covariance structure, we derive a numerically stable algorithm with O(NM 2) training complexity—asymptotically the same as related sparse methods such as the informative vector machine [2], but which more faithfully represents the posterior. We present experimental results for several benchmark problems showing that in many cases this allows an exceptional degree of sparsity without compromising accuracy. Following [1], we locate pseudo-inputs by gradient ascent on the marginal likelihood, but exhibit occasions when this is likely to fail, for which we suggest alternative solutions. 1 Introduction Gaussian processes are a flexible and popular approach to non-parametric modelling. Their conceptually simple architecture is allied with a sound Bayesian foundation, so that not only does their predictive power rival state-of-the-art discriminative methods such as the support vector machine, but they also have the additional benefit of providing an estimate of variance, giving an error bar for their prediction. However, there is a computational price to pay for this robust framework: the time for training scales as N 3 for N data points, and the cost of prediction is O(N 2) per test case. Recently, there has been great interest in finding sparse approximations to the full Gaussian process (GP) in order to accelerate training and prediction times respectively to O(NM 2) and O(M 2), where M ≪N is the size of an auxiliary set, often a subset of the training data, termed variously the inducing inputs, pseudo-inputs or the active set [3, 4, 5, 2, 6, 7, 1]; in this paper, we use the terms interchangeably. Qui˜nonero-Candela and Rasmussen [8] demonstrated how many of these schemes are related through different approximations to the joint prior over training and test points. In this paper we consider the “fully independent training conditional” or FITC approximation, which appeared originally in Snelson and Ghahramani [1] as the sparse pseudo-input GP (SPGP). Restricted to a Gaussian noise model, the FITC approximation is entirely tractable; however, for many problems, the Gaussian assumption is inappropriate. In this paper, we describe an extension for non-Gaussian likelihoods, considering as an example probit noise for binary classification. This is not only a common problem, but our results bear out the intuition that sparse methods are wellsuited: many data sets enjoy the property that class label does not fluctuate rapidly in the input space, often allowing large regions to be summarized with very few inducing inputs. Contrast this with regression problems, where higher frequency components in the latent signal demand the pseudoinputs appear in much higher density. The informative vector machine (IVM) of Lawrence et al. [2] is another sparse GP method that has been extended to non-Gaussian noise models. It is a subset of data method in which the active set 1 is grown incrementally from the training data using a fast information gain heuristic to find at each stage the optimal inclusion. When a threshold number of points have been added, the algorithm terminates: only data accumulated into the active set are relevant for prediction; remaining points influence the model only in the weak sense of guiding previous steps of the algorithm. Our method is an improvement in three regards: firstly, the FITC approximation makes use of all the data, yielding for the same active set a closer approximation to the posterior distribution. Secondly, unlike the standard IVM approach, we fit a stable posterior at each iteration, providing more accurate marginal likelihood estimates, and derivatives thereof, to allow more reliable model selection. Finally, we argue with experimental justification that the ability to locate inducing inputs independently of the training data, as compared with the greedy approach that drives the IVM, can be a great advantage in finding the sparsest solutions. We discuss these points and other related work in greater detail in section 6. The structure of this paper is as follows: in section 2 we describe the FITC approximation; this is followed in section 3 by a detailed description of its representation for a non-Gaussian noise model; section 4 provides a brief account of the procedure for model selection; experimental results appear in section 5, which we discuss in section 6; our concluding remarks are in section 7. 2 The FITC approximation Given a domain X and covariance function K(·, ·) ∈X × X →R, a Gaussian process (GP) over the space of real-valued functions of X specifies the joint distribution at any finite set X ⊂X: p(f|X) = N(f ; 0 , Kff) , where the f = {fn}N n=1 are (latent) values associated with each xn ∈X, and Kffis the Gram matrix, the evaluation of the covariance function at all pairs (xi, xj). We apply Bayes’ rule to obtain the posterior distribution over the f, given the observed X and y, which with the assumption of i.i.d. Gaussian corrupted observations is also normally distributed. Predictions at X⋆are made by marginalizing over f in the (Gaussian) joint p(f, f⋆|X, y, X⋆). See [9] for a thorough introduction. In order to derive the FITC approximation, we follow [8] and introduce a set of M inducing inputs ¯X = {¯x1, ¯x2, . . . , ¯xM} with associated latent values u. By the consistency of GPs, we have p(f, f⋆|X, X⋆, ¯X) = Z p(f, f⋆|u, X, X⋆)p(u| ¯X)du ≈ Z q(f|u, X)q(f⋆|u, ¯X)p(u| ¯X)du, where p(u| ¯X) = N(u ; 0 , Kuu). In the final expression we make the critical approximation by imposing a conditional independence assumption on the joint prior over training and test cases: communication between them must pass through the bottleneck of the inducing inputs. The FITC approximation follows by letting q(f|u, X) = N f ; KfuK−1 uuu , diag (Kff−Qff)  , (1) q(f⋆|u, X⋆) = N f⋆; K⋆uK−1 uuu , diag (K⋆⋆−Q⋆⋆)  , (2) where Qab .= KauK−1 uuKub. Of interest for predictions is the posterior distribution over the inducing inputs; this is most efficiently obtained via Bayes’ rule after inferring the distribution over f.1 Using (1) and marginalizing over the exact prior on u we obtain the approximate prior on f q(f|X) = Z N f ; KfuK−1 uuu , diag (Kff−Qff)  N(u ; 0 , Kuu) du = N(f ; 0 , Qff+ diag (Kff−Qff)) . (3) In the original paper, Snelson and Ghahramani placed the pseudo-inputs randomly and learned their locations by non-linear optimization of the marginal likelihood. We have adopted the idea in this paper, but as emphasized in [8], the FITC approximation is applicable regardless of how the inducing 1We could also infer the posterior over u directly, rather than marginalizing over the inducing inputs as here. Running EP in this setting, each site maintains a belief about the full M ×M covariance, and we obtain a slower O(NM 3) algorithm. Furthermore, calculations to evaluate the derivatives of the log marginal likelihood with respect to inducing inputs ¯xm are significantly complicated by their presence in both prior and likelihood. 2 inputs are obtained, and other schemes for their initialization could equally well be married with our algorithm. In the case of classification, a sigmoidal function assigns class labels yn ∈{±1} with a probability that increases monotonically with the latent fn. We use the probit with bias β, p(yn|fn, β) = σ(yn(fn + β)) .= Z yn(fn+β) −∞ N(z ; 0 , 1) dz. (4) The posterior distribution p(f|X, y) is only tractable for Gaussian likelihoods, hence we must resort to a further approximation, either by generating Monte Carlo samples from it or fitting deterministically a Gaussian approximation. Of the latter methods, expectation propagation is possibly the most accurate (at least for GP classification; see [10]), and it is the approach we follow below. 3 Inference We begin with a very brief account of expectation propagation (EP); for more details, see [11, 12]. Suppose we have an intractable distribution over f whose unnormalized form factorizes into a product of terms, such as a dense Gaussian prior t0(f) and a series of independent likelihoods {tn(yn|fn)}N n=1. EP constructs the approximate posterior as a product of scaled site functions ˜tn. For computational tractability, these sites are usually chosen from an exponential family with natural parameters θ, since in this case their product retains the same functional form as its components. The Gaussian (µ, Σ) has a natural parameterization (b, Π) = (Σ−1µ, −1 2Σ−1). If the prior is of this form, its site function is exact: p(f|y) = 1 Z t0(f) N Y n=1 tn(yn|fn) ≈q(f; θ) = t0(f) N Y n=1 zn˜tn(fn; θn), (5) where Z is the marginal likelihood and zn are the scale parameters. Ideally, we would choose θ at the global minimum of some divergence measure d(p∥q), but the necessary optimization is usually intractable. EP is an iterative procedure that finds a minimizer of KL p(f|y)∥q(f; θ)  on a pointwise basis: at each iteration, we select a new site n, and from the product of the cavity distribution formed by the current marginal with the omission of that site, and the true likelihood term tn, we obtain the so-called tilted distribution qn(fn; θ\n). A simpler optimization minθn KL qn(fn; θ\n)∥q(fn; θ)  then fits only the parameters θn: this is equivalent to moment matching between the two distributions, with scale zn chosen to match the zeroth-order moments. After each site update, the moments at the remaining sites are liable to change, and several iterations may be required before convergence. In the discussion below we omit the moment calculations for the probit model, since they correspond to those of traditional GP classification (for more details, consult [9]). Of greater interest is how the mean and covariance structure of the approximate posterior is preserved. Examining the form of the prior (3), we see the covariance consists of a diagonal component D0 and a rank-M term P0M0PT 0 , where P0 = Kfu and M0 = K−1 uu (zero subscripts refer to these initial values; the matrices are updated during the course of the EP iterations). Since the observations yn are generated i.i.d., we can expect this decomposition to persist in the posterior. EP requires efficient operations for marginalization to obtain p(fn), and for updating the posterior distribution after refining a site, as well as for refreshing the posterior to avoid loss of numerical precision. Decomposing M = RT R into its Cholesky factor,2 we represent the posterior covariance A and mean h by A = D + PRT RPT , h = ν + Pγ, 2Care must be taken that the factors share the correct orientation. When our environment offers only upper Cholesky factors RT R, the initialization of R0 = chol ` K−1 uu ´ can be achieved without computing the explicit inverse via the following matrix rotations: R0 := rot180 “ chol ` rot180 (Kuu) ´T \ I ” . 3 where D is diagonal, ν is N × 1 and γ is M × 1. Writing pT n = P(n,·) and dn = Dnn, Ann = dn + ∥Rpn∥ hn = νn + pT nγ, obtaining marginals in O(M 2). Now consider a change in the precision at site n by πn. Define the vector e of length N such that en = 1 and all other elements are zero. The new covariance Anew is obtained by inverting the sum of the old precision matrix and the change in precision. If we let E = D−1 + πneeT, so that E−1 = D − πnd2 n 1 + πndn eeT and (DED)−1 = D−1 − πn 1 + πndn eeT , then from the matrix inversion lemma, A−1 = D−1−D−1PRT (RPT D−1PRT +I)−1RPT D−1, and incorporating the update to site n, Anew = E−1 −E−1D−1PRT  RPT (DED)−1PRT −I −RPT D−1PRT −1 RPT D−1E−1 = Dnew + PnewRT newRnewPT new, where we expand the inversion to obtain a rank-1 downdate to the Cholesky factor R;3 in summary Dnew = D − πnd2 n 1 + πndn eeT O(1) update, Pnew = P − πndn 1 + πndn epT n O(M) update, Rnew = chol↓  RT  I −Rpn πn 1 + πnAnn pT nRT  R  O(M 2) update. If the second site parameter, corresponding to precision times mean, is changed by bn, then A−1 newhnew = A−1h + bne =⇒hnew = Anew A−1 new −πneeT  h + Anewbne = νnew + Pnewγnew, where νnew = ν + (bn + πnνn)dn 1 + πndn e (O(1)), γnew = γ + bn −πnhn 1 + πndn RT newRnewpn O(M 2)  . It is necessary to refresh the covariance and mean every complete EP cycle to avoid loss of precision. Dnew = (I + D0Π)−1 D0 (O(N)), Pnew = (I + D0Π)−1 P0 (O(NM)), Rnew = rot180  chol  rot180 I + R0PT 0 Π (I + D0Π)−1 P0RT 0 T  / R0 O(NM 2)  , where Rnew is obtained being careful to ensure the orientations of the factorizations are not mixed. Finally, the mean is refreshed using νnew = Dnewb in O(N), γnew = RT newRnewPT newb in O(NM), where we have assumed h0 = 0. Reviewing the algorithm above, we see that EP costs are dominated by the O(M 2) Cholesky downdate at each site inclusion. After visiting each of the N sites, we are advised to perform a full refresh, which is O(NM 2), together leading to asymptotic complexity of O(NM 2). 3.1 Predictions To make predictions, we marginalize out u from (2). Initially, Bayes’ theorem is used to find the posterior distribution over u from the inferred posterior over f: p(u|f) ∝p(f|u)p(u) = N(u | R−1 0 c, R−1 0 CR−T 0 ), where c = CR0PT 0 D−1 0 f and C−1 = I + R0PT 0 D−1 0 P0RT 0 . 3If the factor πn 1+πnAnn is negative, we make a rank-1 update, guaranteed to preserve the positive definite property. Note that on rare occasions, loss of precision can cause a downdate to result in a non-positive definite covariance matrix. If this occurs, we should abort the update and refresh the posterior from scratch. In any case, to improve conditioning, it is recommended to add a small multiple of the identity to the prior M0. 4 Let our posterior approximation be q(f|y) = N(f ; h , A). Hence p(u|y) ≈ Z p(u|f)q(f|y)df = N(u | R−1 0 µ, R−1 0 ΣR−T 0 ), where µ = CR0PT 0 D−1 0 h and Σ = C + CR0PT 0 D−1 0 AD−1 0 P0RT 0 C. Obtaining these terms is O(NM 2) if we take advantage of the structure of A; the most stable method is via the Cholesky factorization of C−1, rather than forming the explicit inverse. At x⋆, p(f⋆|x⋆, y) = Z p(f⋆|u)p(u|y)du = N(f⋆| µ⋆, σ2 ⋆); after precomputations, µ⋆= kT ⋆RT 0 µ is O(M), and σ2 ⋆= k⋆⋆+ kT ⋆RT 0 (Σ −I) R0k⋆is O(M 2). In the classification domain, we will usually be interested in p(y⋆|x⋆, y) = Z p(y⋆|f⋆)p(f⋆|x⋆, y)df⋆= σ y⋆µ⋆ p 1 + σ2⋆ ! . 4 Model selection EP provides an estimate of the log evidence by matching the 0th-order moments zn at each inclusion. When our posterior approximation is exponential family, Seeger [12] shows the estimate to be L = N X n=1 log Cn + Φ(θpost) −Φ(θprior), where log Cn = log zn −Φ(θpost) + Φ(θ\n), where Φ(·) denotes the log partition function and θ are again the natural parameters, with superscripts indicating prior, posterior and cavity. Of interest for model selection are derivatives of the marginal likelihood with respect to hyperparameters {ξ, ¯X, β}, respectively the kernel parameters, pseudo-input locations, and noise model parameters. When the EP fixed point conditions hold (that is, the moments of the tilted distributions match the marginals up to second order for all sites), ∇θpriorL = ηpost −ηprior and ∇βnL = log zn, where η denotes the moment parameters of the exponential family (for the Gaussian, these are (µ, Σ + µµT )) and βn is a parameter of site n (and does not feature in the prior). Finally, we need derivatives ∇ξθprior and ∇¯Xθprior. The long-winded details are omitted, but by careful consideration of the covariance structure, it is again possible to limit the complexity to O(NM 2). Since we run EP until convergence, our estimates for the marginal likelihood and its derivatives are accurate, allowing us reliablty to fit a model that maximizes the evidence. This is in contrast to the IVM, in which sites excluded from the active set have parameters clamped to zero, and where those included are not iterated to convergence, such that the necessary fixed point conditions do not hold. A particular problem, suffered also by the similar algorithm in [13], is that derivative calculations must be interleaved with site inclusions, and the latter operation tends to disrupt gradient information gained from the previous step. These complications are all sidestepped in our SPGP implementation. 5 Experiments We conducted tests on a variety of data, including two small sets from [14]4 and the benchmark suite of R¨atsch.5 The dimensionality of these classification problems ranges from two to sixty, and the size of the training sets is of the order of 400 to 1000. Results are presented in table 1. For crabs and the R¨atsch sets, we average over ten folds of the data; for the synth problem, Ripley has already divided the data into training and test partitions. Comparisons are made with the full GP classifier, and the SVM, a widely-used discriminative model which in practice is found to yield relatively sparse solutions; we consider also the IVM, a popular framework for building sparse 4Available from http://www.stats.ox.ac.uk/pub/PRNN/. 5Available from http://ida.first.fhg.de/projects/bench/benchmarks.htm. 5 Table 1: Test errors and predictive accuracy (smaller is better) for the GP classifier, the support vector machine, the informative vector machine, and the sparse pseudo-input GP classifier. Data set GPC SVM IVM SPGPC name train:test dim err nlp err #sv err nlp M err nlp M synth 250:1000 2 0.097 0.227 0.098 98 0.096 0.235 150 0.087 0.234 4 crabs 80:120 5 0.039 0.096 0.168 67 0.066 0.134 60 0.043 0.105 10 banana 400:4900 2 0.105 0.237 0.106 151 0.105 0.242 200 0.107 0.261 20 breast-cancer 200:77 9 0.288 0.558 0.277 122 0.307 0.691 120 0.281 0.557 2 diabetes 468:300 8 0.231 0.475 0.226 271 0.230 0.486 400 0.230 0.485 2 flare-solar 666:400 9 0.346 0.570 0.331 556 0.340 0.628 550 0.338 0.569 3 german 700:300 20 0.230 0.482 0.247 461 0.290 0.658 450 0.236 0.491 4 heart 170:100 13 0.178 0.423 0.166 92 0.203 0.455 120 0.172 0.414 2 image 1300:1010 18 0.027 0.078 0.040 462 0.028 0.082 400 0.031 0.087 200 ringnorm 400:7000 20 0.016 0.071 0.016 157 0.016 0.101 100 0.014 0.089 2 splice 1000:2175 60 0.115 0.281 0.102 698 0.225 0.403 700 0.126 0.306 200 thyroid 140:75 5 0.043 0.093 0.056 61 0.041 0.120 40 0.037 0.128 6 titanic 150:2051 3 0.221 0.514 0.223 118 0.242 0.578 100 0.231 0.520 2 twonorm 400:7000 20 0.031 0.085 0.027 220 0.031 0.085 300 0.026 0.086 2 waveform 400:4600 21 0.100 0.229 0.107 148 0.100 0.232 250 0.099 0.228 10 linear models. In all cases, we employed the isotropic squared exponential kernel, avoiding here the anisotropic version primarily to allow comparison with the SVM: lacking a probabilistic foundation, its kernel parameters and regularization constant must be set by cross-validation. For the IVM, hyperparameter optimization is interleaved with active set selection as described in [2], while for the other GP models, we fit hyperparameters by gradient ascent on the estimated marginal likelihood, limiting the process to twenty conjugate gradient iterations; we retained for testing that of three to five randomly initialized models which the evidence most favoured. Results on the R¨atsch data for the semi-parametric radial basis function network are omitted for lack of space, but available at the site given in footnote 5. In comparison with that model, SPGP tends to give sparser and more accurate results (with the benefit of a sound Bayesian framework). Identical tests were run for a range of active set sizes on the IVM and SPGP classifier, and we have attempted to present the large body of results in its most comprehensible form: we list only the sparsest competitive solution obtained. This means that using M smaller than shown tends to cause a deterioriation in performance, but not that there is no advantage in increasing the value. After all, as M →N we expect error rates to match those of the full model (at least for the IVM, which uses a subset of the training data).6 However, we believe that in exploring the behaviour of a sparse model, the essential question is: what is the greatest sparsity we can achieve without compromising performance? (since if sparsity were not an issue, we would simply revert to the original GP). Small values of M for the FITC approximation were found to give remarkably low error rates, and incremented singly would often give an improved approximation. In contrast, the IVM predictions were no better than random guesses for even moderate M—it usually failed if the active set was smaller than a threshold around N/3, where it was simply discarding too much information—and greater step sizes were required for noticeable improvements in performance. With a few exceptions then, for FITC we explored small M, while for the IVM we used larger values, more widely spread. More challenging is the task of discriminating 4s from non-4s in the USPS digit database: the data are 256-dimensional, and there are 7291 training and 2007 test points. With 200 pseudo-inputs (and 51,200 parameters for optimization), error rates for SPGPC are 1.94%, with an average negative log probability of 0.051 nats. These figures improve when the allocation is raised to 400 pseudo-inputs, to 1.79% and 0.048 nats. When provided with only 200 points, the IVM figures are 9.97% and 0.421 nats—this can be regarded as a failure to generalize, since it corresponds to labelling all test inputs as “not 4”—but given an active set of 400 it reaches error rates of 1.54% and NLP of 0.085 nats. 6Note that the evidence is a poor metric for choosing M since it tends to increase monotonically as the explicative power of the full GP is restored. 6 6 Discussion A sparse approximation closely related to FITC is the “deterministic training conditional” (DTC), whose covariance consists solely of the low-rank term LMLT ; it has appeared elsewhere under the name projected latent variables [13]. In generative terms, DTC first obtains a posterior process by conditioning on the inducing inputs; observations y are then drawn as noisy samples of the mean of this process. FITC is similar, but the draws are noisy samples from the posterior process itself—hence, while the noise component for DTC is a constant corruption σ2, for FITC it grows away from the inducing inputs to Knn+σ2. In comparing their SPGP model with DTC, Snelson and Ghahramani [1] suggest that it is for this reason (i.e. due to the diagonal component in the covariance in FITC) that the optimization of pseudo-inputs by gradient ascent on the marginal likelihood can succeed: without the noise reduction afforded locally by relocating pseudo-inputs, DTC does not provide a sufficiently large gradient for them to move, and the optimization gets stuck. We believe the same mechanism operates in general for non-Gaussian noise. This difficulty would not be significant if alternative heuristics for building the active set greedily were effective. We hypothesize however that the most informative vectors in the greedy sense of the IVM tend to be those which lie close to the decision boundary. Such points will have a relatively strong influence on its shape since the effect of the kernel falls off exponentially in distance squared. A preferable solution may be that empirically found to occur with Tipping’s relevance vector machine (RVM) [15], a degenerate GP where a particular prior on weights means only a few basis functions survive an evidence maximization procedure to form the model;7 there, the classifier was often parameterized by points distant from the decision boundary, suggested to be more “representative” of the data. We illustrate with a simple example that, provided the optimization is feasible, very sparse solutions may more easily be found if the inducing inputs can be positioned independently of the data. This allows the size of the active set to grow with the complexity of the problem, rather than with N, the number of training points. We drew samples from a two-dimensional “xor” problem, consisting of four unit-variance Gaussian clusters at (±1.5, ±1.5) with a small overlap, giving an optimal error rate of around 13% and in loose terms a complexity which requires an active set of size four. By increasing the size of the training set N in increments from 40 to 400, we obtained the learning curves of figure 1 for the IVM and FITC models: plotted against N is the size of active set required for the error rate to fall below 15%. Whereas the FITC model requires a constant four points to explain the data, the demands of the IVM appear to increase almost linearly with N. Evidently, the FITC model is able to capture salient details more readily than the IVM, but we may object that it is also a richer likelihood. We therefore show learning curves for the FITC approximation run using the IVM active set and, generously, optimal kernel parameters. With a relatively simple and low-dimensional problem, the benefit of the adaptable active set that FITC offers is clearly less significant than that of the improved approximation itself—although there is a factor of 2 difference, and we believe the effects will be more pronounced for more complex data. However, a sensible compromise where optimization of all pseudo-inputs is computationally infeasible is to run the IVM to obtain an initial active set, but then switch to the FITC approximation and optimize only kernel parameters, or just a small selection of the pseudo-inputs. Another option, explored by Snelson and Ghaharamani [17] for this model in the case of regression, is to learn a low dimensional projection of the data—advantageous, since in this setting the pseudo-inputs only operate under projection and can be treated as low-dimensional, potentially reducing significantly the scale of the optimization problem. We report results of this extension in future work. 7 Conclusions We have presented an efficient and numerically stable way of implementing the sparse FITC model in Gaussian processes. By way of example we considered binary classification in which extra data points are introduced to form a continuously adaptable active set. We have demonstrated that the locations of these pseudo-inputs can be fit synchronously with parameters of the kernel, and that 7We have not compared our model with the RVM since that approximation suffers from nonsensical variance estimates away from the data. Rasmussen and Qui˜nonero-Candela [16] show how it can be “healed” through augmentation, but the resulting model is no longer sparse in the sense of providing O(M 2) predictions. 7 Size of training set N Size of active set M FITC IVM IVM/FITC 40 200 360 048 50 100 150 -2 0 2 -2 0 2 Figure 1: Left: learning curves for the toy problem described in the text. Right: contours of posterior probability for FITC in ten CG iterations from a random initialization of pseudo-inputs (black dots). this procedure allows for very sparse solutions. Certain data sets, particularly those of very high dimensionality, are not amenable to this approach since the number of hyperparameters is unfeasibly large for non-linear optimization. In this case, we suggest resorting to a greedy approach, using a fast heuristic like the IVM to build the active set, but adopting the FITC approximation thereafter. An alternative which deserves investigation is to attempt an initial round of k-means clustering. References [1] Edward Snelson and Zoubin Ghahramani. Sparse Gaussian processes using pseudo-inputs. In Advances in Neural Information Processing Systems 18. MIT Press, 2005. [2] Neil Lawrence, Matthias Seeger, and Ralf Herbrich. Fast sparse Gaussian process methods: the informative vector machine. In Advances in Neural Information Processing Systems 15. MIT Press, 2003. [3] Manfred Opper and Ole Winther. Gaussian processes for classification: mean field methods. Neural Computation, 12(11):2655–2684, 2000. [4] Volker Tresp. A Bayesian committee machine. Neural Computation, 12(11):2719–2741, 2000. [5] Alex Smola and Peter Bartlett. Sparse greedy Gaussian process regression. In Advances in Neural Information Processing Systems 13. MIT Press, 2001. [6] Lehel Csat´o. Gaussian processes: iterative sparse approximations. PhD thesis, Aston University, 2002. [7] Matthias Seeger. Bayesian Gaussian process models: PAC-Bayesian generalisation error bounds and sparse approximations. PhD thesis, University of Edinburgh, 2003. [8] Joaquin Qui˜nonero-Candela and Carl Edward Rasmussen. A unifying view of sparse approximate Gaussian process regression. Journal of Machine Learning Research, 6(12):1939–1959, 2005. [9] Carl Rasmussen and Christopher Williams. Gaussian processes for machine learning. MIT Press, 2006. [10] Malte Kuss and Carl Edward Rasmussen. Assessing approximations for Gaussian process classification. In Advances in Neural Information Processing Systems 18. MIT Press, 2005. [11] Thomas Minka. A family of algorithms for approximate Bayesian inference. PhD thesis, Massachusetts Institute of Technology, 2001. [12] Matthias Seeger. Expectation propagation for exponential families, 2005. Available from http://www.cs.berkeley.edu/˜mseeger/papers/epexpfam.ps.gz. [13] Matthias Seeger, Christopher Williams, and Neil Lawrence. Fast forward selection to speed up sparse Gaussian process regression. In Proceedings of the 9th International Workshop on AI Stats. Society for Artificial Intelligence and Statistics, 2003. [14] Brian Ripley. Pattern recognition and neural networks. Cambridge University Press, 1996. [15] Michael E. Tipping. Sparse Bayesian learning and the relevance vector machine. Journal of Machine Learning Research, 1:211–244, 2001. [16] Carl Edward Rasmussen and Joaquin Qui˜nonero-Candela. Healing the relevance vector machine through augmentation. In Proceedings of 22nd ICML. ACM Press, 2005. [17] Edward Snelson and Zoubin Ghahramani. Variable noise and dimensionality reduction for sparse Gaussian processes. In Proceedings of the 22nd Annual Conference on Uncertainty in AI. AUAI Press, 2006. 8
2007
120
3,149
Cooled and Relaxed Survey Propagation for MRFs Hai Leong Chieu1,2, Wee Sun Lee2 1Singapore MIT Alliance 2Department of Computer Science National University of Singapore haileong@nus.edu.sg,leews@comp.nus.edu.sg Yee-Whye Teh Gatsby Computational Neuroscience Unit University College London ywteh@gatsby.ucl.ac.uk Abstract We describe a new algorithm, Relaxed Survey Propagation (RSP), for finding MAP configurations in Markov random fields. We compare its performance with state-of-the-art algorithms including the max-product belief propagation, its sequential tree-reweighted variant, residual (sum-product) belief propagation, and tree-structured expectation propagation. We show that it outperforms all approaches for Ising models with mixed couplings, as well as on a web person disambiguation task formulated as a supervised clustering problem. 1 Introduction Energy minimization is the problem of finding a maximum a posteriori (MAP) configuration in a Markov random field (MRF). A MAP configuration is an assignment of values to variables that maximizes the probability (or minimizes the energy) in the MRF. Energy minimization has many applications; for example, in computer vision it is used for applications such as stereo matching [11]. As energy minimization in general MRFs is computationally intractable, approximate inference algorithms based on belief propagation are often necessary in practice. Such algorithms are split into two classes: max-product and variants address the problem by trying to find a MAP configuration directly, while sum-product and variants return approximate marginal distributions which can be used to estimate a MAP configuration. It has been shown that the max-product algorithm converges to neighborhood optimums [18], while the sum-product algorithm converges to local minima of the Bethe approximation [20]. Convergence of these algorithms are important for good approximations. Recent work (e.g. [16, 8]) on sufficient conditions for convergence of sum-product algorithms suggests that they converge better on MRFs containing potentials with small strengths. In this paper, we propose a novel algorithm, called Relaxed Survey Propagation (RSP), based on performing the sum-product algorithm on a relaxed MRF. In the relaxed MRF, there is a parameter vector y that can be optimized for convergence. By optimizing y to reduce the strengths of potentials, we show empirically that RSP converges on MRFs where other algorithms fail to converge. The relaxed MRF is built in two steps, by first (i) converting the energy minimization problem into its weighted MAX-SAT equivalent [17], and then (ii) constructing a relaxed version of the survey propagation MRF proposed in [14]. We prove that the relaxed MRF has approximately equal joint distribution (and hence the same MAP and marginals) as the original MRF, independent (to a large extent) of the parameter vector y. Empirically, we show that RSP, when run at low temperatures (“cooled”), performs well for the application of energy minimization. For max-product algorithms, we compare against the max-product algorithm and its sequential tree-reweighted variant, which is guaranteed to converge [11]. For sum-product algorithms, we compare against residual belief propagation [6] as a state-of-the-art asynchronous belief propagation algorithm, as well as the treestructured expectation propagation [15], which has been shown to be a special case of generalized belief propagation [19]. We show that RSP outperforms all approaches for Ising models with mixed couplings, as well as in a supervised clustering application for web person disambigation. a 1 2 b c : factors : variables (a) G = (V, F) σ(1,1) σ(1,2) β(1) σ(2,1) σ(2,2) β(2) α1 α4 α3 α2 γ3 γ1 γ2 γ4 α σ α σ σ is a negative literal in α σ is a positive literal in α Legend: (b) W = (B, C) Figure 1: The variables x1, x2 in (a) are binary, resulting in 4 variables in (b). The clauses α1 to α4 in (b) are entries in the factor a in (a), γ1 and γ2 (resp. γ3 and γ4) are from b (resp. c). β(1) and β(2) are the positivity clauses. The relaxed MRF for RSP has a similar form to the graph in (b). 2 Preliminaries A MRF, G = (V, F), is defined by a set of variables V , and a set of factors F = {Φa}, where each Φa is a non-negative function depending on Xa ⊆V . We assume for simplicity that variables in V have the same cardinality q, taking values in Q = {1, .., q}. For Xi ∈V and Xa ⊆V , we denote by xi the event that Xi = xi, and by xa the event Xa = xa. To simplify notation, we will sometimes write i ∈V for Xi ∈V , or a ∈F for Φa ∈F. The joint distribution over configurations is defined by P(x) = 1 Z Q a Φa(xa) where Z is the normalization factor. When each Φa is a positive function, the joint distribution can be written as P(x) = 1 Z exp(−E(x)/T) where E(x) = P a −log Φa(xa) is the energy function, and the temperature T is set to 1. A factor graph [13] is a graphical representation of a MRF, in the form of a bipartite graph with two types of nodes, the variables and the factors. Each factor Φa is connected to the variables in Xa, and each variable Xi is connected to the set of factors, N(i), that depends on it. See Figure 1(a) for a simple example. Weighted MAX-SAT conversion [17]: Before describing RSP, we describe the weighted MAXSAT (WMS) conversion of the energy minimization problem for a MRF. The WMS problem is a generalization of the satisfiability problem (SAT). In SAT, a set of boolean variables are constrained by a boolean function in conjunctive normal form, which can be treated as a set of clauses. Each clause is a set of literals (a variable or its negation), and is satisfied if one of its literals evaluates to 1. The SAT problem consist of finding a configuration that satisfies all the clauses. In WMS, each clause has a weight, and the WMS problem consists of finding a configuration with maximum total weight of satisfied clauses (called the weight of the configuration). We describe the conversion [17] of a MRF G = (V, F) into a WMS problem W = (B, C), where B is the set of boolean variables and C the set of weighted clauses. Without lost of generality, we normalize factors in F to take values in (0, 1]. For each Xi ∈V , introduce the variables σ(i,xi) ∈B as the predicate that Xi = xi. For convenience, we index variables in B either by k or by (i, xi), denote factors in F with Roman alphabet (e.g. a, b, c) and clauses in C with Greek alphabet (e.g. α, β, γ). For a clause α ∈C, we denote by C(α) as the set of variables in α. There are two types of clauses in C: interaction and positivity clauses. Definition 1. Interaction clauses: For each entry Φa(xa) in Φa ∈F, introduce the clause α = ∨xi∈xaσ(i,xi) with the weight wα = −log(Φa(xa)). We write α ⊏a to show that the clause α comes from the factor Φa ∈F, and we denote a = src(α) to be the factor Φa ∈F for which α ⊏a. The violation of an interaction clause corresponding to Φa(xa) entails that σ(i,xi) = 1 for all xi ∈ xa. This correspond to the event that Xi = xi for Xi ∈Xa. Definition 2. Positivity clauses: for Xi ∈V , introduce the clause β(i) = ∨xi∈Qσ(i,xi) with weights wβ(i) = 2 ∗P α∈Ci wα, where Ci is the set of interaction clauses containing any variable in {σ(i,xi)}xi∈Q. For Xi ∈V , we denote β(i) as the corresponding positivity clause in C, and for a positivity clause β ∈C, we denote src(β) for the corresponding variable in V . Positivity clauses have large weights to ensure that for each Xi ∈V , at least one predicate in {σ(i,xi)}xi∈Q equals 1. To map σ back to a configuration in the original MRF, exactly one variable in each set of {σ(i,xi)}xi∈Q can take the value 1. We call such configurations valid configurations: Definition 3. A configuration is valid if ∀Xi ∈V , exactly one of the indicators {σi,xi}xi∈Q equals 1. There are two types of invalid configurations: MTO configurations where more than one variable in the set {σi,xi}xi∈Q equals 1, and AZ configurations where all variables in the set equals zero . For valid configurations σ, let x(σ) be the corresponding configuration of σ in V . For valid configurations σ, and for each a ∈F, exactly one interaction clause in {α}α⊏a is violated: when α corresponding to Φa(xa) is violated, we have Xa = xa in x(σ). Valid configurations have locally maximal weights [17]: MTO configurations have low weights since in all interaction clauses, variables appear as negative literals. AZ configurations have low weights because they violate the positivity clauses. See Figure 1 for an example of a WMS equivalent of a simple factor graph. 3 Relaxed Survey Propagation In this section, we transform the WMS problem W = (B, C) into another MRF, Gs = (Vs, Fs), based on the construction of the MRF for survey propagation [14]. We show (in Section 3.1) that under this framework, we are able to remove MTO configurations, and AZ configurations have negligible probability. In survey propagation, in addition to the values {0, 1}, variables can take a third value, * (“joker” state), signifying that the variable is free to take either 0 or 1, without violating any clause. In this section, we assume that variables σk take values in {0, 1, ∗}. Definition 4. [14] A variable σk is constrained by the clause α ∈C if it is the unique satisfying variable for clause α (all other variables violate α). Define CONk,α(σC(α)) = δ(σk is constrained by α), where δ(P) equals 1 if the predicate P is true, and 0 otherwise. We introduce the parameters {ya}a∈F and {yi}i∈V by modifying the definition of VAL in [14]: Definition 5. An assignment σ is invalid for clause α if and only if all variables are unsatisfying except for exactly one for which σk = ∗. (In this case, σk cannot take * as it is constrained). Define VALα(σC(α)) =    exp(wα) if σC(a) satisfies α exp(−ysrc(α)) if σC(a) violates α 0 if σC(a) is invalid (1) The term exp(−ysrc(α)) is the penalty for violating clauses, with src(α) ∈V ∪F defined in Definitions 1 and 2. For interaction clauses, we index ya by a ∈F because among valid configurations, exactly one clause in the group {α}α⊏a is violated, and exp(−ya) becomes a constant factor. Positivity clauses are always satisfied and the penalty factor will not appear for valid configurations. Definition 6. [14] Define the parent set Pi of a variable σk to be the set of clauses for which σk is the unique satisfying variable, (i.e. the set of clauses constraining σk). We now construct the MRF Gs = (Vs, Fs) where variables λk ∈Vs are of the form λk = (σk, Pk), with σk variables in the WMS problem W = (B, C). (See Figure 1). We define single-variable compatibilities (Ψk) and clause compatibilities (Ψα) as in [14]: Ψk(λk = {σk, Pk}) = ( ω0 if Pk = ∅, σk ̸= ∗ ω∗if Pk = ∅, σk = ∗ 1 for any other valid (σk, Pk) , where ω0 + ω∗= 1 (2) Ψα(λα = {σk, Pk}k∈C(α)) = VALα(σC(α)) × Y k∈C(α) δ((α ∈Pk) = CONα,k(σC(α))), (3) where δ is defined in Definition 4. The single-variable compatibilities Ψk(λk) are defined so that when σk is unconstrained (i.e. Pk = ∅), Ψk(λk) takes the values ω∗or ω0 depending on whether σk equals *. The clause compatibilities introduce the clause weights and penalties into the joint distribution. The factor graph has the following underlying distribution: P({σk, Pk}k) ∝ ωn0 0 ωn∗ ∗ Y α∈SAT(σ) exp (wα) Y α∈UNSAT(σ) exp(−ysrc(α)), (4) where n0 is the number of unconstrained variables in σ, and n∗the number of variables taking ∗. Comparing RSP with SP-ρ in [14], we see that Theorem 1. In the limit where all ya, yi →∞, RSP is equivalent to SP-ρ [14], with ρ = ω∗. Taking y to infinity correspond to disallowing violated constraints, and SP-ρ was formulated for satisfiable SAT problems, where violated constraints are forbidden. In this case, all clauses must be satisfied and the term Q α∈C exp(wα) in Equation 4 is a constant, and P(σ) ∝ωn0 0 ωn∗ ∗. 3.1 Main result In the following, we assume the following settings: (1) ω∗= 1 and ω0 = 0 ; (2) for positivity clauses β(i), let yi = 0 ; and (3) in the original MRF G = (V, F), single-variable factors are defined on all variables (we can always define uniform factors). Under these settings, we will prove the main result that the joint distribution on the relaxed MRF is approximately equal to that on the original MRF, and that RSP estimates marginals on the original MRF. First, we prove the following lemma: Lemma 1. The joint probability over valid configurations on Gs is proportional to the joint probability of the corresponding configurations on the original MRF, G = (V, F). Proof. For valid configurations, all positivity clauses are satisfied, and for each a ∈F, all valid configurations have one violated constraint in the set of interaction clauses {α}α⊏a. Hence the penalty term for violated constraints Q a∈F exp(ya) is a constant factor. Let W = P α∈C wα be the sum of all weights. For a valid configuration σ, P(σ) ∝ exp( X γ∈SAT(σ) wγ) = exp(W − X γ∈UNSAT(σ) wγ) ∝ Y a∈F Φa(x(σ)) Lemma 2. All configurations containing * have zero probability in the MRF Gs, and there is a one-to-one mapping between configurations λ = {σk, Pk}k∈Vs and configurations σ = {σk}k∈B Proof. Single-variable factors on G translate into single-literal clauses in the WMS formulation, which in turn becomes single-variable factors in Gs. For a variable λk = (σk, Pk) with a singlevariable factor, Ψα, we have VALα(σk = ∗) = 0. This implies Ψα(λk = (∗, Pk)) = 0. Lemma 3. MTO configurations have n0 ̸= 0 and since ω0 = 0, they have zero probability. Proof. In MTO configurations, ∃(i, xi, x′ i), σi,xi = σi,x′ i = 1. The positivity clause β(i) is hence non-constraining for these variables, and since all other clauses connected to them are interaction clauses and contain them as negative literals, both variables are unconstrained. Hence n0 ̸= 0, and from Equation 4, for ω0 = 0, they have zero probability. The above lemma lead to the following theorem: Theorem 2. Assuming that exp(wβ(i)) ≫1 for all Xi ∈V , the joint distribution over the relaxed MRF Gs = (Vs, Fs) is approximately equal to the joint distribution over the original MRF, G = (V, F). Moreover, RSP estimates the marginals on the original MRF, and at the fixed points, the beliefs at each node, B(σ(i,xi) = 1), is an estimate of P(Xi = xi), and P xi∈Q B(σ(i,xi) = 1) ≈1. We can understand the above theorem as follows: if we assume that the probability of AZ invalid configurations is negligible (equivalent to assuming that the probability of violating positivity clauses are negligible, i.e. exp(wi) ≫exp(−ysrc(β(i))) = 1), then we have only valid configurations left. MTO invalid configurations are ruled out by Lemma 3. Since the positivity clauses have large weights, exp(wi) ≫1 are usually satisfied. Hence RSP, as the sum-product algorithm on the relaxed MRF, returns estimations of the marginals P(Xi = xi) as B(σ(i,xi) = 1). 3.2 Choosing y Valid configurations have a joint probability with the factor Q a∈F exp(−ya) while AZ configurations do not. However, Theorem 2 states that, if exp(wi) ≫1, AZ configurations have negligible probability. Empirically, we observe that for a large range of values of {ya}a∈F , RSP returns marginals satisfying P xi B(σ(i,xi) = 1) ≈1, indicating that AZ configurations do indeed have negligible probability. We can hence select the values of {ya}a∈F for better convergence properties. We describe heuristics based on the sufficient conditions for convergence of sum-product algorithms in [16]. To simplify notations, we write the conditions for a MRF with pairwise factors Φa, maxXj∈V,b∈N(j) P a∈N(j)\b N(Φa) < 1 where N(Φa) = supxi̸=x′ i supxj̸=x′ j tanh  1 4 log  Φa(xi,xj) Φa(x′ i,xj) Φa(x′ i,x′ j) Φa(xi,x′ j)  (5) Mooij and Kappen [16] have also derived another condition based on the spectral radius of a matrix having N(Φa) as entries. These conditions lead us to believe that the sum-product algorithm converges better on MRFs with small N(Φa) (or the “strengths” of potentials in [8]). To calculate N(Ψα) for the interaction clause α, we characterize these factors as follows: Ψα((σk, Pk), (σl, Pl)) =  exp(−ysrc(α)) if clause α is violated, i.e. (σk, σl) = (0, 0) exp(wα) otherwise (6) As ya are shared among α ⊏a, we choose ya to minimize P α⊏a N(Ψα) = P α⊏a tanh 1 4|wα+ya|. A good approximation for ya would be the median of {−wα}α⊏a. For our experiments, we divide the search range for ya into 10 bins, and use fminsearch in Matlab to find a local minimum. 3.3 Update equations and efficiency While each message in RSP has large cardinality, we show in the supplementary material that, under the settings of Section 3.1, the update equations can be simplified such that each factor passes a single number to each variable. The interaction clause α sends a number να→(i,v) to each (i, x) ∈ C(α), and the positivity clauses β(i) sends a number µβ(i)→(i,x) to (i, x) for each x ∈Q. The update equations are as follows: (proofs in the supplementary material): µβ→(i,x) = X x′̸=x Y α∈N(i,x′)\β(i) να→(i,x′) + exp(−wi) (7) να→(i,x) = µβ(j)→(j,x′) + exp(−ysrc(α) −wα) Q γ∈N(j,x′)\{β(j),α} νγ→(j,x′) µβ(j)→(j,x′) + Q γ∈N(j,x′)\{β(j),α} νγ→(j,x′) (8) B(σ(i,x) = 0) ∝µβ(i)→(i,x) ; B(σ(i,x) = 1) ∝ Y α∈N(i,x)\β(i) να→(i,x) ; B(σ(i,x) = ∗) = 0 (9) We found empirically that the schedule of message updates affect convergence to a large extent. A good schedule is to update all the ν-messages first (by updating the groups of ν-messages belonging to each factor a ∈F together), and then updating the µ-messages together. This seems to work better than the schedule defined by residual belief propagation [6] on the relaxed MRF. In terms of efficiency, for a MRF with N pairwise factors, the sum-product algorithm has 2Nq real numbers in the factor to variable messages, and RSP has 2Nq+q. Empirically, we observe that RSP on the relaxed MRF runs as fast as the simple sum-product algorithm on the original MRF, with an overhead for determining the values of y. 4 Experimental Results While Ising models with attractive couplings are exactly solvable by graph-cut algorithms, general Ising models with mixed couplings on complete graphs are NP-hard [4], and graph cut algorithms are not applicable to graphs with mixed couplings [12]. In this section, we perform three sets of experiments to show that RSP outperforms other approaches: the first set compares RSP and the residual belief propagation on a simple graph, the second set compares the performance of various methods on randomly generated graphs with mixed couplings, and the third set applies RSP to the application of the web person disambiguation task. A simple example: we use a 4-node complete graph of binary variables, with the two sets of factors defined in Figure 2(a), for ϵ = +1 and -1. The case ϵ = −1 was used in [8] to illustrate how the strengths of potentials affect convergence of the sum-product algorithm. We also show the case of ϵ = +1 (an attractive network) as a case where the sum-product algorithm converges well. Both sets of graphs (ϵ = +1 or −1) have uniform marginals, and 2 MAP configurations (modes). In Figure Ψi,j(xi, xj)= ! exp(Ωi,j/4) if xi = xj exp(−Ωi,j/4) if xi ̸= xj Ω = ω   0 1 ϵ ϵ 1 0 1 ϵ ϵ 1 0 ϵ ϵ ϵ ϵ 0   (a) 4-node (binary) complete graph (b) ϵ = +1 (c) ϵ = −1 Figure 2: In Figure (a), we define factors under the two settings: ϵ = ±1. Figure (b) and (c) show the L2 distance between the returned marginals and the nearest mode of the graph. Circles on the lines mean failure to converge, where we take the marginals at the last iteration. 2(b) and 2(c), we show experimental results for ϵ = +1 and −1. In each case, we vary ω from 0 to 12, and for each ω, run residual belief propagation (RBP) damped at 0.5 and RSP (undamped) on the corresponding graph. Both methods are randomly initialized. We plot the L2 distance between the returned marginals and the nearest mode marginals (marginals with probability one on the modes). The correct marginals are uniform, where the L2 distance is √ 0.5 ≈0.7. For small ω, both methods converge to the correct marginals. As ω is increased, for ϵ = +1 in Figure 2(b), both approaches converge to marginals with probability 1 on one of the modes. For ϵ = −1, however, RSP converges again to marginals indicating a mode, while RBP faces convergence problems for ω ≥8. Increasing ω corresponds to increasing N(Ψi,j), and the sum-product algorithm fails to converge for large ω when ϵ = −1. When the algorithms converge for large ω, they converge not to the correct marginals, but to a MAP configuration. Increasing ω has the same effect as decreasing the temperature of a network: the behavior of sum-product algorithm approaches that of the max-product algorithm, i.e. the max-product algorithm is the sum-product algorithm at the zero temperature limit. Ising models with mixed couplings: we conduct experiments on complete graphs of size 20 with different percentage of attractive couplings, using the Ising model with the energy function: H(s) = −P i,j θi,jsisj −P i θisi,where si∈{−1, 1}. We draw θi from U[0, 0.1]. To control the percentage of attractive couplings, we draw θi,j from U[0, α], and randomly assign negative signs to the θi,j with probability (1 −ρ), where ρ is the percentage of attractive couplings required. We vary α from 1 to 3. In Figure 3, we plot the difference between the optimal energy (obtained with a brute force search) and the energy returned by each of the following approaches: RSP, max-product belief propagation (MBP), the convergent tree reweighted max product belief propagation (TRW-S) [11], residual sum-product belief propagation (RBP) [6], and tree-structured expecation propagation (TEP) [15]. Each point on the graph is the average over 30 randomly generated networks. In Table 1, we compare RSP against these methods. When an algorithm does not converge, we take its result at the last iteration. We damp RBP and TEP with a 0.5 damping factor. For RSP, MBP, TRW-S and RBP, we randomly initialize the initial messages, and take the best result after 5 restarts. For TEP, we use five different trees consisting of a maximal spanning tree and four random stars [19]. For RSP, RBP and TEP, which are variants of the sum product algorithm, we lower the temperature by a factor of 2 each time the method converges and stop when the method fails to converge or if the results are not improved over the last temperature. We observe that MBP outperforms TRW-S constantly: this agrees with [11] that MBP outperforms TRW-S for graphs with mixed couplings. While the performance of TRW-S remains constant from 25% to 75%, the sum-product based algorithms (RBP and TEP) improve as the percentage of attractive potentials is increased. In all three cases, RSP is one of the best performing methods, beaten only by TEP at 2 points on the 50% graph. TEP, being of the class of generalized belief propagation [19], runs significantly slower than RSP. Supervised clustering: Finley and Joachims [7] formulated SV M cluster, which learns an itempair similarity measure, Sim(i, j), to minimize a correlation clustering objective on a training set. In training SV M cluster, they have to minimize E(x) = P i,j Sim(i, j)δ(xi, xj) where xi ∈{1, .., U} are cluster-ids of item i, and U an upper-bound on the number of clusters. They tried a greedy and a linear programming approach, and concluded that the two approaches are comparable. Due to time constraints, we did not implement SV M cluster: instead we test our inference algorithms on the pairwise classification clustering (PCC) baseline in [7]. The PCC baseline trains svmlight [9] on training item-pairs, and run the classifier through all test pairs. For each test pair (i, j), we apply softmax to the classifier outputs to obtain the probability pi,j that the pair is in the same cluster. (a) 75% (b) 50% (c) 25% Figure 3: Experiments on the complete graph Ising model with mixed couplings (legend in (a)), with different percentage of attractive couplings. The y-axis shows, in log scale, the average energy difference between the configuration found by the algorithm and the optimal solution. 75% attractive 50% attractive 25% attractive α 1 1.5 2 2.5 3 1 1.5 2 2.5 3 1 1.5 2 2.5 3 mbp 2/0 2/0 0/0 1/0 1/0 7/6 11/5 14/0 10/2 9/6 20/2 13/3 16/0 13/3 15/2 trw-s 26/0 24/0 22/0 25/0 25/0 28/0 29/0 29/0 27/0 28/1 29/0 27/0 30/0 28/1 27/0 rbp 1/0 0/0 0/0 2/0 0/0 22/0 14/2 12/0 9/1 13/5 22/0 16/6 15/2 21/0 17/0 tep 2/0 2/0 0/0 2/0 0/0 14/3 9/3 11/2 6/2 6/5 23/1 15/4 10/2 16/2 15/2 opt 0/0 0/0 0/0 0/1 0/0 0/7 0/8 0/2 0/2 0/7 0/6 0/10 0/4 0/4 0/2 Table 1: Number of trials (out of 30) where RSP does better/worse than various methods. In particular, the last row (opt) shows the number of times that RSP does worse than the optimal solution. Defining Sim(i, j) = log(pi,j/(1 −pi,j)), we minimize E(x) to cluster the test set. We found that the various inference algorithms perform poorly on the MRF for large U, even when they converge (probably due to a large number of minima in the approximation). We are able to obtain lower energy configurations by the recursive 2-way partitioning procedure in [5] used for graph cuts. (Graph cuts do not apply here as weights can be negative). This procedure involves recursively running, for e.g. RSP, on the MRF for E(x) with U = 2, and applying the Kernighan-Lin algorithm [10] for local refinements among current partitions. Each time RSP returns a configuration that partitions the data, we run RSP on each of the two partitions. We terminate the recursion when RSP assigns a same value to all variables, placing all remaining items in one cluster. We use the web person disambiguation task defined in SemEval-2007 [1] as the test application. Training data consists of 49 sets of web pages (we use 29 sets with more than 50 documents), where each set (or domain) are results from a search query on a person name. The test data contains another 30 domains. Each domain is manually annotated into clusters, with each cluster containing pages referring to a single individual. We use a simple feature filtering approach to select features that are useful across many domains in the training data. Candidate features include (i) words occurring in only one document of the document-pair, (ii) words co-ocurring in both documents, (iii) named entity matches between the documents, and (iv) topic correlation features. For comparison, we replace RSP with MBP and TRW-S as inference algorithms (we did not run RBP and TEP as they are very slow on these problems because they often fail to converge). We also implemented the greedy algorithm (Greedy) in [7]. We tried using the linear programming approach but free off-theshelf solvers seem unable to scale to these problems. Results comparing RSP with Greedy, MBP and TRW-S are shown in Table 2. The F-measure attained by RSP for this SemEval task [1] is equal to the systems ranked second and third out of 16 participants (official results yet unpublished). We found that although TRW-S is guaranteed to converge, it performs poorly. RSP converges far better than MBP, but due to the Kernighan-Lin corrections that we run at each iteration, results can sometimes be corrected to a large extent by the local refinements. Method RSP MBP TRW-S Greedy Number of test domains where RSP attains lower/higher energy E(x) than Method 0/0 9/6 16/7 22/5 Percentage of convergence over all runs 91% 74% 100% * F-measure of purity and inverse purity [1] 75.08% 74.97% 74.61% 74.78% Table 2: Results for the web person disambiguation task. (*: TRW-S is guaranteed to converge) 5 Related work and conclusion In this paper, we formulated RSP, generalizing the formulation of SP-ρ in [14]. SP-ρ is the sumproduct interpretation for the survey propagation (SP) algorithm [3]. SP has been shown to work well for hard instances of 3-SAT, near the phase transition where local search algorithms fail. However, its application has been limited to constraint satisfaction problems [3]. In RSP, we took inspiration from the SP-y algorithm [2] in adding a penalty term for violated clauses. SP-y works on MAXSAT problems and SP can be considered as SP-y with y taken to ∞, hence disallowing violated constraints. This is analogous to the relation between RSP and SP-ρ [14] (See Theorem 1). RSP is however different from SP-y since we address weighted MAX-SAT problems. Even if all weights are equal, RSP is still different from SP-y, which, so far, does not have a sum-product formulation on an alternative MRF. We show that while RSP is the sum-product algorithm on a relaxed MRF, it can be used for solving the energy minimization problem. By tuning the strengths of the factors (based on convergence criteria in [16]) while keeping the underlying distribution approximately correct, RSP converges well even at low temperatures. This enables it to return low-energy configurations on MRFs where other methods fail. As far as we know, this is the first application of convergence criteria to aid convergence of belief propagation algorithms, and this mechanism can be used to exploit future work on sufficient conditions for the convergence of belief propagation algorithms. Acknowledgments We would like to thank Yee Fan Tan for his help on the web person disambiguation task, and Tomas Lozano-Perez and Leslie Pack Kaelbling for valuable comments on the paper. The research is partially supported by ARF grant R-252-000-240-112. References [1] “Web person disambiguation task at SemEval,” 2007. [Online]. Available: http://nlp.uned.es/weps/taskdescription-2.html [2] D. Battaglia, M. Kolar, and R. Zecchina, “Minimizing energy below the glass thresholds,” Physical Review E, vol. 70, 2004. [3] A. Braunstein, M. Mezard, and R. Zecchina, “Survey propagation: An algorithm for satisfiability,” Random Struct. Algorithms, vol. 27, no. 2, 2005. [4] B. A. Cipra, “The Ising model is NP-complete,” SIAM News, vol. 33, no. 6, 2000. [5] C. Ding, “Spectral clustering,” ICML ’04 Tutorial, 2004. [6] G. Elidan, I. McGraw, and D. Koller, “Residual belief propagation: Informed scheduling for asynchronous message passing,” in UAI, 2006. [7] T. Finley and T. Joachims, “Supervised clustering with support vector machines,” in ICML, 2005. [8] T. Heskes, “On the uniqueness of loopy belief propagation fixed points,” Neural Computation, vol. 16, 2004. [9] T. Joachims, Learning to Classify Text Using Support Vector Machines: Methods, Theory and Algorithms. Norwell, MA, USA: Kluwer Academic Publishers, 2002. [10] B. Kernighan and S. Lin, “An efficient heuristic procedure for partitioning graphs,” Bell Systems Technical Report, 1970. [11] V. Kolmogorov, “Convergent tree-reweighted message passing for energy minimization,” IEEE Transactions on Pattern Analysis and Machine Intelligence, vol. 28, no. 10, 2006. [12] V. Kolmogorov and R. Zabih, “What energy functions can be minimized via graph cuts?” IEEE Transactions on Pattern Analysis and Machine Intelligence, vol. 26, no. 2, 2004. [13] F. Kschischang, B. Frey, and H. Loeliger, “Factor graphs and the sum-product algorithm,” IEEE Transactions on Information Theory, vol. 47, no. 2, 2001. [14] E. Maneva, E. Mossel, and M. Wainwright, “A new look at survey propagation and its generalizations,” 2004. [Online]. Available: http://arxiv.org/abs/cs.CC/0409012 [15] T. Minka and Y. Qi, “Tree-structured approximations by expectation propagation,” in NIPS, 2004. [16] J. M. Mooij and H. J. Kappen, “Sufficient conditions for convergence of loopy belief propagation,” in UAI, 2005. [17] J. D. Park, “Using weighted MAX-SAT engines to solve MPE,” in AAAI, 2002. [18] Y. Weiss and W. T. Freeman, “On the optimality of solutions of the max-product belief-propagation algorithm in arbitrary graphs,” IEEE Transactions on Information Theory, vol. 47, no. 2, 2001. [19] M. Welling, T. Minka, and Y. W. Teh, “Structured region graphs: Morphing EP into GBP,” in UAI, 2005. [20] J. S. Yedidia, W. T. Freeman, and Y. Weiss, “Constructing free-energy approximations and generalized belief propagation algorithms,” IEEE Transactions on Information Theory, vol. 51, no. 7, 2005.
2007
121
3,150
A Spectral Regularization Framework for Multi-Task Structure Learning Andreas Argyriou Department of Computer Science University College London Gower Street, London WC1E 6BT, UK a.argyriou@cs.ucl.ac.uk Charles A. Micchelli Department of Mathematics and Statistics SUNY Albany 1400 Washington Avenue Albany, NY, 12222, USA Massimiliano Pontil Department of Computer Science University College London Gower Street, London WC1E 6BT, UK m.pontil@cs.ucl.ac.uk Yiming Ying Department of Engineering Mathematics University of Bristol University Walk, Bristol, BS8 1TR, UK enxyy@bristol.ac.uk Abstract Learning the common structure shared by a set of supervised tasks is an important practical and theoretical problem. Knowledge of this structure may lead to better generalization performance on the tasks and may also facilitate learning new tasks. We propose a framework for solving this problem, which is based on regularization with spectral functions of matrices. This class of regularization problems exhibits appealing computational properties and can be optimized efficiently by an alternating minimization algorithm. In addition, we provide a necessary and sufficient condition for convexity of the regularizer. We analyze concrete examples of the framework, which are equivalent to regularization with Lp matrix norms. Experiments on two real data sets indicate that the algorithm scales well with the number of tasks and improves on state of the art statistical performance. 1 Introduction Recently, there has been renewed interest in the problem of multi-task learning, see [2, 4, 5, 14, 16, 19] and references therein. This problem is important in a variety of applications, ranging from conjoint analysis [12], to object detection in computer vision [18], to multiple microarray data set integration in computational biology [8] – to mention just a few. A key objective in many multitask learning algorithms is to implement mechanisms for learning the possible structure underlying the tasks. Finding this common structure is important because it allows pooling information across the tasks, a property which is particularly appealing when there are many tasks but only few data per task. Moreover, knowledge of the common structure may facilitate learning new tasks (transfer learning), see [6] and references therein. In this paper, we extend the formulation of [4], where the structure shared by the tasks is described by a positive definite matrix. In Section 2, we propose a framework in which the task parameters and the structure matrix are jointly computed by minimizing a regularization function. This function has the following appealing property. When the structure matrix is fixed, the function decomposes across the tasks, which can hence be learned independently with standard methods such as SVMs. When the task parameters are fixed, the optimal structure matrix is a spectral function of the covariance of the tasks and can often be explicitly computed. As we shall see, spectral functions are of particular interest in this context because they lead to an efficient alternating minimization algorithm. 1 The contribution of this paper is threefold. First, in Section 3 we provide a necessary and sufficient condition for convexity of the optimization problem. Second, in Section 4 we characterize the spectral functions which relate to Schatten Lp regularization and present the alternating minimization algorithm. Third, in Section 5 we discuss the connection between our framework and the convex optimization method for learning the kernel [11, 15], which leads to a much simpler proof of the convexity in the kernel than the one given in [15]. Finally, in Section 6 we present experiments on two real data sets. The experiments indicate that the alternating algorithm runs significantly faster than gradient descent and that our method improves on state of the art statistical performance on these data sets. They also highlight that our approach can be used for transfer learning. 2 Modelling Tasks’ Structure In this section, we introduce our multi-task learning framework. We denote by Sd the set of d × d symmetric matrices, by Sd + (Sd ++) the subset of positive semidefinite (definite) ones and by Od the set of d × d orthogonal matrices. For every positive integer n, we define INn = {1, . . . , n}. We let T be the number of tasks which we want to simultaneously learn. We assume for simplicity that each task t ∈INT is well described by a linear function defined, for every x ∈IRd, as w⊤ t x, where wt is a fixed vector of coefficients. For each task t ∈INT , there are m data examples {(xtj, ytj) : j ∈INm} ⊂IRd × IR available. In practice, the number of examples per task may vary but we have kept it constant for simplicity of notation. Our goal is to learn the vectors w1, . . . , wT , as well as the common structure underlying the tasks, from the data examples. In this paper we follow the formulation in [4], where the tasks’ structure is summarized by a positive definite matrix D which is linked to the covariance matrix between the tasks, WW ⊤. Here, W denotes the d × T matrix whose t-th column is given by the vector wt (we have assumed for simplicity that the mean task is zero). Specifically, we learn W and D by minimizing the function Reg(W, D) := Err(W) + γ Penalty(W, D), (2.1) where γ is a positive parameter which balances the importance between the error and the penalty. The former may be any bounded from below and convex function evaluated at the values w⊤ t xtj, t ∈INT , j ∈INm. Typically, it will be the average error on the tasks, namely, Err(W) = P t∈INT Lt(wt), where Lt(wt) = P j∈INm ℓ(ytj, w⊤ t xtj) and ℓ: IR × IR →[0, ∞) is a prescribed loss function (e.g. quadratic, SVM, logistic etc.). We shall assume that the loss ℓis convex in its second argument, which ensures that the function Err is also convex. The latter term favors the tasks sharing some common structure and is given by Penalty(W, D) = tr(F(D)WW ⊤) = T X t=1 w ⊤ t F(D)wt, (2.2) where F : Sd ++ →Sd ++ is a prescribed spectral matrix function. This is to say that F is induced by applying a function f : (0, ∞) →(0, ∞) to the eigenvalues of its argument. That is, for every D ∈Sd ++ we write D = UΛU ⊤, where U ∈Od, Λ = Diag(λ1, . . . , λd), and define F(D) = UF(Λ)U ⊤, F(Λ) = Diag(f(λ1), . . . , f(λd)). (2.3) In the rest of the paper, we will always use F to denote a spectral matrix function and f to denote the associated real function, as above. Minimization of the function Reg allows us to learn the tasks and at the same time a good representation for them which is summarized by the eigenvectors and eigenvalues of the matrix D. Different choices of the function f reflect different properties which we would like the tasks to share. In the special case that f is a constant, the tasks are totally independent and the regularizer (2.2) is a sum of T independent L2 regularizers. In the case f(λ) = λ−1, which is considered in [4], the regularizer favors a sparse representation in the sense that the tasks share a small common set of features. More generally, functions of the form f(λ) = λ−α, α ≥0, allow for combining shared features and task-specific features to some degree tuned by the exponent α. Moreover, the regularizer (2.2) ensures that the optimal representation (optimal D) is a function of the tasks’ covariance WW ⊤. Thus, we propose to solve the minimization problem inf n Reg(W, D) : W ∈IRd×T , D ∈Sd ++, tr D ≤1 o (2.4) 2 for functions f belonging to an appropriate class. As we shall see in Section 4, the upper bound on the trace of D in (2.4) prevents the infimum from being zero, which would lead to overfitting. Moreover, even though the infimum above is not attained in general, the problem in W resulting after partial minimization over D admits a minimizer. Since the first term in (2.1) is independent of D, we can first optimize the second term with respect to D. That is, we can compute the infimum Ωf(W) := inf  tr(F(D)WW ⊤) : D ∈Sd ++, tr D ≤1 . (2.5) In this way we could end up with an optimization problem in W only. However, in general this would be a complex matrix optimization problem. It may require sophisticated optimization tools such as semidefinite programming, which may not scale well with the size of W. Fortunately, as we shall show, problem (2.4) can be efficiently solved by alternately minimizing over D and W. In particular, in Section 4 we shall show that Ωf is a function of the singular values of W only. Hence, the only matrix operation required by alternate minimization is singular value decomposition and the rest are merely vector problems. Finally, we note that the ideas above may be extended naturally to a reproducing kernel Hilbert space setting [3]. 3 Joint Convexity via Matrix Concave Functions In this section, we address the issue of convexity of the regularization function (2.1). Our main result characterizes the class of spectral functions F for which the term w⊤F(D)w is jointly convex in (w, D), which in turn implies that (2.4) is a convex optimization problem. To illustrate our result, we require the matrix analytic concept of concavity, see, for example, [7]. We say that the real-valued function g : (0, ∞) →IR is matrix concave of order d if λG(A) + (1 −λ)G(B) ⪯G(λA + (1 −λ)B) ∀A, B ∈Sd ++ and λ ∈[0, 1] , where G is defined as in (2.3). The notation ⪯denotes the Loewner partial order on Sd: C ⪯D if and only if D −C is positive semidefinite. If g is a matrix concave function of order d for any d ∈IN, we simply say that g is matrix concave. We also say that g is matrix convex (of order d) if −g is matrix concave (of order d). Clearly, matrix concavity implies matrix concavity of smaller orders (and hence standard concavity). Theorem 3.1. Let F : Sd ++→Sd ++ be a spectral function. Then the function ρ : IRd×Sd ++→[0, ∞) defined as ρ(w, D) = w⊤F(D)w is jointly convex if and only if 1 f is matrix concave of order d. Proof. By definition, ρ is convex if and only if, for any w1, w2 ∈IRd, D1, D2 ∈Sd ++ and λ ∈ (0, 1), it holds that ρ(λw1 + (1 −λ)w2, λD1 + (1 −λ)D2) ≤λρ(w1, D1) + (1 −λ)ρ(w2, D2). Let C := F(λD1 + (1 −λ)D2), A := F(D1)/λ, B := F(D2)/(1 −λ), w := λw1 + (1 −λ)w2 and z := λw1. Using this notation, the above inequality can be rewritten as w ⊤Cw ≤z ⊤Az + (w −z) ⊤B(w −z) ∀w, z ∈IRd. (3.1) The right hand side in (3.1) is minimized for z = (A + B)−1Bw and hence (3.1) is equivalent to w ⊤Cw ≤w ⊤ B(A + B)−1A(A + B)−1B + I −(A + B)−1B ⊤B I −(A + B)−1B  w , ∀w ∈IRd, or to C ⪯B(A + B)−1A(A + B)−1B + I −(A + B)−1B ⊤B I −(A + B)−1B  = B(A + B)−1A(A + B)−1B + B −2B(A + B)−1B + B(A + B)−1B(A + B)−1B = B −B(A + B)−1B = (A−1 + B−1)−1 , where the last equality follows from the matrix inversion lemma [10, Sec. 0.7]. The above inequality is identical to (see e.g. [10, Sec. 7.7]) A−1 + B−1 ⪯C−1 , 3 or, using the initial notation, λ F(D1) −1 + (1 −λ) F(D2) −1 ⪯ F(λD1 + (1 −λ)D2) −1 . By definition, this inequality holds for any D1, D2 ∈Sd ++, λ ∈(0, 1) if and only if 1 f is matrix concave of order d. Examples of matrix concave functions on (0, ∞) are log(x + 1) and the function xs for s ∈[0, 1] – see [7] for other examples and theoretical results. We conclude with the remark that, whenever 1 f is matrix concave of order d, function Ωf in (2.5) is convex, because it is the partial infimum of a jointly convex function [9, Sec. IV.2.4]. 4 Regularization with Schatten Lp Prenorms 4.1 Partial Minimization of the Penalty Term In this section, we focus on the family of negative power functions f and obtain that function Ωf in (2.5) relates to the Schatten Lp prenorms. We start by showing that problem (2.5) reduces to a minimization problem in IRd, by application of a useful matrix inequality. In the following, we let B take the place of WW ⊤for brevity. Lemma 4.1. Let F : Sd →Sd be a spectral function, B ∈Sd and βi, i ∈INd, the eigenvalues of B. Then, inf{tr(F(D)B) : D ∈Sd ++, tr D ≤1} = inf ( X i∈INd f(δi)βi : δi > 0, i ∈INd, X i∈INd δi ≤1 ) . Moreover, for the infimum on the left to be attained, F(D) has to share a set of eigenvectors with B so that the corresponding eigenvalues are in the reverse order as the βi. Proof. We use an inequality of Von Neumann [13, Sec. H.1.h] to obtain, for all X, Y ∈Sd, that tr(XY ) ≥ X i∈INd λiµi where λi and µi are the eigenvalues of X and Y in nonincreasing and nondecreasing order, respectively. The equality is attained whenever X = UDiag(λ)U ⊤, Y = UDiag(µ)U ⊤for some U ∈Od. Applying this inequality for X = F(D), Y = B and denoting f(δi) = λi, i ∈INd, the result follows. Using this lemma, we can now derive the solution of problem (2.5) in the case that f is a negative power function. Proposition 4.2. Let B ∈Sd + and s ∈(0, 1]. Then we have that (tr Bs) 1 s = inf n tr(D s−1 s B) : D ∈Sd ++, tr D ≤1 o . Moreover, if B ∈Sd ++ the infimum is attained and the minimizer is given by D = Bs tr Bs . Proof. By Lemma 4.1, it suffices to show the analogous statement for vectors, namely that X i∈INd βs i ! 1 s = inf ( X i∈INd δ s−1 s i βi : δi > 0, i ∈INd, X i∈INd δi ≤1 ) where βi ≥0, i ∈INd. To this end, we apply H¨older’s inequality with p = 1 s and q = 1 1−s : X i∈INd βs i = X i∈INd  δ s−1 s i βi s δ1−s i ≤ X i∈INd δ s−1 s i βi !s X i∈INd δi !1−s ≤ X i∈INd δ s−1 s i βi !s . When βi > 0, i ∈INd, the equality is attained for δi = βs i P j∈INd βs j , i ∈INd. To show that the inequality is sharp in all other cases, we replace βi by βi,ε := βi + ε, i ∈INd, ε > 0, define δi,ε = βs i,ε/(P j βs j,ε) and take the limits as ε →0. 4 The above result implies that the regularization problem (2.4) is conceptually equivalent to regularization with a Schatten Lp prenorm of W, when the coupling function f takes the form f(x) = x1−2 p with p ∈(0, 2], p = 2s. The Schatten Lp prenorm is the Lp prenorm of the singular values of a matrix. In particular, trace norm regularization (see [1, 17]) corresponds to the case p = 1. We also note that generalization error bounds for Schatten Lp norm regularization can be derived along the lines of [14]. 4.2 Learning Algorithm Lemma 4.1 demonstrates that optimization problems such as (2.4) with spectral regularizers of the form (2.2) are computationally appealing, since they decompose to vector problems in d variables along with singular value decomposition of the matrix W. In particular, for the Schatten Lp prenorm with p ∈(0, 2], the proof of Proposition 4.2 suggests a way to solve problem (2.4). We modify the penalty term (2.2) as Penaltyε(W, D) = tr F(D)(WW ⊤+ εI)  , (4.1) where ε > 0 and let Regε(W, D) = Err(W) + γ Penaltyε(W, D) be the corresponding regularization function. By Proposition 4.2, for a fixed W ∈IRd×T there is a unique minimizer of Penaltyε (under the constraints in (2.5)), given by the formula Dε(W) = (WW ⊤+ εI) p 2 tr(WW ⊤+ εI) p 2 . (4.2) Moreover, there exists a minimizer of problem (2.4), which is unique if p ∈(1, 2]. Therefore, we can solve problem (2.4) using an alternating minimization algorithm, which is an extension of the one presented in [4] for the special case F(D) = D−1. Each iteration of the algorithm consists of two steps. In the first step, we keep D fixed and minimize over W. This consists in solving the problem min ( X t∈INT Lt(wt) + γ X t∈INT w ⊤ t F(D)wt : W ∈IRd×T ) . This minimization can be carried out independently for each task since the regularizer decouples when D is fixed. Specifically, introducing new variables for (F(D)) 1 2 wt yields a standard L2 regularization problem for each task with the same kernel K(x, z) = x⊤(F(D))−1z, x, z ∈IRd. In other words, we simply learn the parameters wt – the columns of matrix W – independently by a regularization method, for example by an SVM or ridge regression method, for which there are well developed tool boxes. In the second step, we keep matrix W fixed and minimize over D using equation (4.2). Space limitations prevent us from providing a convergence proof of the algorithm. We only note that following the proof detailed in [3] for the case p = 1, one can show that the sequence produced by the algorithm converges to the unique minimizer of Regε if p ∈[1, 2], or to a local minimizer if p ∈(0, 1). Moreover, by [3, Thm. 3] as ε goes to zero the algorithm converges to a solution of problem (2.4), if p ∈[1, 2]. In theory, an algorithm without ε-perturbation does not converge to a minimizer, since the columns of W and D always remain in the initial column space. In practice, however, we have observed that even such an algorithm converges to an optimal solution, because of round-off effects. 5 Relation to Learning the Kernel In this section, we discuss the connection between the multi-task framework (2.1)-(2.4) and the framework for learning the kernel, see [11, 15] and references therein. To this end, we define the kernel Kf(D)(x, z) = x⊤(F(D))−1z, x, z ∈IRd, the set of kernels Kf = {Kf(D) : D ∈ Sd ++, tr D ≤1} and, for every kernel K, the task kernel matrix Kt = (K(xti, xtj) : i, j ∈INm), t ∈INT . It is easy to prove, using Weyl’s monotonicity theorem [10, Sec. 4.3] and [7, Thm. V.2.5], that the set Kf is convex if and only if 1 f is matrix concave. By the well-known representer theorem (see e.g. [11]), problem (2.4) is equivalent to minimizing the function X t∈INT X i∈INm ℓ(yti, (Ktct)i) + γ c ⊤ t Ktct ! (5.1) 5 over ct ∈IRm (for t ∈INT ) and K ∈Kf. It is apparent that the function (5.1) is not jointly convex in ct and K. However, minimizing each term over the vector ct gives a convex function of K. Proposition 5.1. Let K be the set of all reproducing kernels on IRd. If ℓ(y, ·) is convex for any y ∈IR then the function Et : K →[0, ∞) defined for every K ∈K as Et(K) = min ( X i∈INm ℓ(yti, (Ktc)i) + γ c ⊤Ktc : c ∈IRm ) is convex. Proof. Without loss of generality, we can assume as in [15] that Kt are invertible for all t ∈INT . For every a ∈IRm and K ∈K , we define the function Gt(a, K) = P i∈INm ℓ(yti, ai)+γ a⊤K−1 t a, which is jointly convex by Theorem 3.1. Clearly, Et(K) = min{Gt(a, K) : a ∈IRm}. Recalling that the partial minimum of a jointly convex function is convex [9, Sec. IV.2.4], we obtain the convexity of Et. The fact that the function Et is convex has already been proved in [15], using minimax theorems and Fenchel duality. Here, we were able to simplify the proof of this result by appealing to the joint convexity property stated in Theorem 3.1. 6 Experiments In this section, we first report a comparison of the computational cost between the alternating minimization algorithm and the gradient descent algorithm. We then study how performance varies for different Lp regularizers, compare our approach with other multi-task learning methods and report experiments on transfer learning. We used two data sets in our experiments. The first one is the computer survey data from [12]. It was taken from a survey of 180 persons who rated the likelihood of purchasing one of 20 different personal computers. Here the persons correspond to tasks and the computer models to examples. The input represents 13 different computer characteristics (price, CPU, RAM etc.) while the output is an integer rating on the scale 0 −10. Following [12], we used the first 8 examples per task as the training data and the last 4 examples per task as the test data. We measured the root mean square error of the predicted from the actual ratings for the test data, averaged across people. The second data set is the school data set from the Inner London Education Authority (see http://www.cmm.bristol.ac.uk/learning-training/multilevel-m-support/datasets.shtml). It consists of examination scores of 15362 students from 139 secondary schools in London. Thus, there are 139 tasks, corresponding to predicting student performance in each school. The input consists of the year of the examination, 4 school-specific and 3 student-specific attributes. Following [5], we replaced categorical attributes with binary ones, to obtain 27 attributes in total. We generated the training and test sets by 10 random splits of the data, so that 75% of the examples from each school (task) belong to the training set and 25% to the test set. Here, in order to compare our results with those in [5], we used the measure of percentage explained variance, which is defined as one minus the mean squared test error over the variance of the test data and indicates the percentage of variance explained by the prediction model. Finally, we note that in both data sets we used the square loss, tuned the regularization parameter γ with 5-fold cross-validation and added an additional input component accounting for the bias term. In the first experiment, we study the computational cost of the alternating minimization algorithm against the gradient descent algorithm, both implemented in Matlab, for the Schatten L1.5 norm. The left plot in Figure 1 shows the value of the objective function (2.1) versus the number of iterations, on the computer survey data. The curves for different learning rates η are shown, whereas for rates greater than 0.05 gradient descent diverges. The alternating algorithm curve for ε = 10−16 is also shown. We further note that for both data sets our algorithm typically needed less than 30 iterations to converge. The right plot depicts the CPU time (in seconds) needed to reach a value of the objective function which is less than 10−5 away from the minimum, versus the number of tasks. It is clear that our algorithm is at least an order of magnitude faster than gradient descent with the optimal learning rate and scales better with the number of tasks. We note that the computational cost of our method is mainly due to the T ridge regressions in the supervised step (learning W) and the singular 6 value decomposition in the unsupervised step (learning D). A singular value decomposition is also needed in gradient descent, for computing the gradient of the Schatten Lp norm. We have observed that the cost per iteration is smaller for gradient descent but the number of iterations is at least an order of magnitude larger, leading to the large difference in time cost. 0 20 40 60 80 100 24.5 25 25.5 26 26.5 27 27.5 28 28.5 iterations Reg η = 0.05 η = 0.03 η = 0.01 Alternating 50 100 150 200 0 1 2 3 4 5 6 tasks seconds Alternating η = 0.05 Figure 1: Comparison between the alternating algorithm and the gradient descent algorithm. 0.2 0.4 0.6 0.8 1 1.2 1.4 1.6 1.8 1.5 2 2.5 3 3.5 4 p RMSE 0.4 0.6 0.8 1 1.2 1.4 1.6 1.8 2 0.235 0.24 0.245 0.25 0.255 0.26 0.265 0.27 p expl. variance Figure 2: Performance versus p for the computer survey data (left) and the school data (right). Table 1: Comparison of different methods on the computer survey data (left) and school data (right). Method RMSE p = 2 3.88 p = 1 1.93 p = 0.7 1.86 Hierarchical Bayes [12] 1.90 Method Explained variance p = 2 23.5 ± 2.0% p = 1 26.7 ± 2.0% Hierarchical Bayes [5] 29.5 ± 0.4% In the second experiment we study the statistical performance of our method as the spectral function changes. Specifically, we choose functions giving rise to Schatten Lp prenorms, as discussed in Section 4. The results, shown in Figure 2, indicate that the trace norm is the best norm on these data sets. However, on the computer survey data a value of p less than one gives the best result overall. From this we speculate that our method can even approximate well the solutions of certain non-convex problems. In contrast, on the school data the trace norm gives almost the best result. Next, in Table 1, we compare our algorithm with the hierarchical Bayes (HB) method described in [5, 12]. This method also learns a matrix D using Bayesian inference. Our method improves on the HB method on the computer survey data and is competitive on the school data (even though our regularizer is simpler than HB and the data splits of [5] are not available). Finally, we present preliminary results on transfer learning. On the computer survey data, we trained our method with p = 1 on 150 randomly selected tasks and then used the learned structure matrix D for training 30 ridge regressions on the remaining tasks. We obtained an RMSE of 1.98 on these 30 “new” tasks, which is not much worse than an RMSE of 1.88 on the 150 tasks. In comparison, when 7 using the raw data (D = I d) on the 30 tasks we obtained an RMSE of 3.83. A similar experiment was performed on the school data, first training on a random subset of 110 schools and then transferring D to the remaining 29 schools. We obtained an explained variance of 19.2% on the new tasks. This was worse than the explained variance of 24.8% on the 110 tasks but still better than the explained variance of 13.9% with the raw representation. 7 Conclusion We have presented a spectral regularization framework for learning the structure shared by many supervised tasks. This structure is summarized by a positive definite matrix which is a spectral function of the tasks’ covariance matrix. The framework is appealing both theoretically and practically. Theoretically, it brings to bear the rich class of spectral functions which is well-studied in matrix analysis. Practically, we have argued via the concrete example of negative power spectral functions, that the tasks’ parameters and the structure matrix can be efficiently computed using an alternating minimization algorithm, improving upon state of the art statistical performance on two real data sets. A natural question is to which extent the framework can be generalized to allow for more complex task sharing mechanisms, in which the structure parameters depend on higher order statistical properties of the tasks. Acknowledgements This work was supported by EPSRC Grant EP/D052807/1, NSF Grant DMS 0712827 and by the IST Programme of the European Commission, PASCAL Network of Excellence IST-2002-506778. References [1] J. Abernethy, F. Bach, T. Evgeniou, and J-P. Vert. Low-rank matrix factorization with attributes. Technical Report N24/06/MM, Ecole des Mines de Paris, 2006. [2] 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. [3] A. Argyriou, T. Evgeniou, and M. Pontil. Convex multi-task feature learning. Machine Learning, 2007. In press. [4] A. Argyriou, T. Evgeniou, and M. Pontil. Multi-task feature learning. In Advances in Neural Information Processing Systems 19, pages 41–48. 2007. [5] B. Bakker and T. Heskes. Task clustering and gating for bayesian multi–task learning. Journal of Machine Learning Research, 4:83–99, 2003. [6] J. Baxter. A model for inductive bias learning. J. of Artificial Intelligence Research, 12:149–198, 2000. [7] R. Bhatia. Matrix Analysis. Graduate texts in Mathematics. Springer, 1997. [8] R. Chari, W.W. Lockwood, and B.P. Coe et al. Sigma: a system for integrative genomic microarray analysis of cancer genomes. BMC Genomics, 7:324, 2006. [9] J.-B. Hiriart-Urruty and C. Lemar´echal. Convex Analysis and Minimization Algorithms. Springer, 1996. [10] R. A. Horn and C. R. Johnson. Matrix Analysis. Cambridge University Press, 1985. [11] G.R.G. Lanckriet, N. Cristianini, P. Bartlett, L. El Ghaoui, and M.I. Jordan. Learning the kernel matrix with semidefinite programming. Journal of Machine Learning Research, 5:27–72, 2005. [12] P. J. Lenk, W. S. DeSarbo, P. E. Green, and M. R. Young. Hierarchical Bayes conjoint analysis: recovery of partworth heterogeneity from reduced experimental designs. Marketing Science, 15(2):173–191, 1996. [13] A. W. Marshall and I. Olkin. Inequalities: Theory of Majorization and its Applications. Academic Press, 1979. [14] A. Maurer. Bounds for linear multi-task learning. J. of Machine Learning Research, 7:117–139, 2006. [15] C.A. Micchelli and M. Pontil. Learning the kernel function via regularization. Journal of Machine Learning Research, 6:1099–1125, 2005. [16] R. Raina, A. Y. Ng, and D. Koller. Constructing informative priors using transfer learning. In Proceedings of the 23rd International Conference on Machine Learning, 2006. [17] N. Srebro, J. D. M. Rennie, and T. S. Jaakkola. Maximum-margin matrix factorization. In Advances in Neural Information Processing Systems 17, pages 1329–1336. 2005. [18] A. Torralba, K. P. Murphy, and W. T. Freeman. Sharing features: efficient boosting procedures for multiclass object detection. In Proc. of Conf. on Computer Vision and Pattern Recognition. 2:762-769, 2004. [19] J. Zhang, Z. Ghahramani, and Y. Yang. Learning multiple related tasks using latent independent component analysis. In Advances in Neural Information Processing Systems 18, pages 1585–1592. 2006. 8
2007
122
3,151
CPR for CSPs: A Probabilistic Relaxation of Constraint Propagation Luis E. Ortiz ECE Dept, Univ. of Puerto Rico, Mayag¨uez, PR 00681-9042 leortiz@ece.uprm.edu Abstract This paper proposes constraint propagation relaxation (CPR), a probabilistic approach to classical constraint propagation that provides another view on the whole parametric family of survey propagation algorithms SP(ρ). More importantly, the approach elucidates the implicit, but fundamental assumptions underlying SP(ρ), thus shedding some light on its effectiveness and leading to applications beyond k-SAT. 1 Introduction Survey propagation (SP) is an algorithm for solving k-SAT recently developed in the physics community [1, 2] that exhibits excellent empirical performance on “hard” instances. To understand the behavior of SP and its effectiveness, recent work (see Maneva et al. [3] and the references therein) has concentrated on establishing connections to belief propagation (BP) [4], a well-known approximation method for computing posterior probabilities in probabilistic graphical models. Instead, this paper argues that it is perhaps more natural to establish connections to constraint propagation (CP), another message-passing algorithm tailored to constraint satisfaction problems (CSPs) that is wellknown in the AI community. The ideas behind CP were first proposed by Waltz [5] 1 Yet, CP has received considerably less attention than BP lately. This paper reconnects BP to CP in the context of CSPs by proposing a probabilistic relaxation of CP that generalizes it. Through the approach, it is easy to see the exact, implicit underlying assumptions behind the entire family of survey propagation algorithms SP(ρ). (Here, the approach is presented in the context of k-SAT; it will be described in full generality in a separate document.) In short, the main point of this paper is that survey propagation algorithms are instances of a natural generalization of constraint propagation and have simple interpretations in that context. 2 Constraint Networks and Propagation This section presents a brief introduction to the graphical representation of CSPs and CP, and concentrates on the aspects that are relevant to this paper. 2 A constraint network (CN) is the graphical model for CSPs used in the AI community. Of interest here is the CN based on the hidden transformation. (See Bacchus et al. [9] for more information on the different transformations and their properties.) It has a bipartite graph where every variable and constraint is each represented by a node or vertex in the graph and there is an edge between a variable i and a constraint a if and only if a is a function of i (see figure 1). From now on, a CN with a tree graph is referred to as a tree CN, and a CN with an arbitrary graph as an arbitrary CN. 1See also Pearl [4], section 4.1.1, and the first paragraph of section 4.1.2. 2Please refer to Russell and Norvig [6] for a general introduction, Kumar [7] for a tutorial and Dechter [8] for a more comprehensive treatment of these topics and additional references. 1 4 a b clauses variables 2 1 3 Figure 1: The graph of the constraint network corresponding to the 3-SAT formula f(x) = (x1 ∨ x2 ∨x3) ∧(x2 ∨¯x3 ∨x4), which has four variables and two clauses; the first and second clause are denoted in the figure by a and b, respectively. Following the convention of the SP community, clause and variable nodes are drawn as boxes and circles, respectively; also, if a variable appears as a negative literal in a clause (e.g., variable 3 in clause b), the edge between them is drawn as a dashed line. Constraint propagation is typically used as part of a depth-first search algorithm for solving CSPs. The search algorithm works by extending partial assignments, usually one variable at a time, during the search. The algorithm is called backtracking search because one can backtrack and change the value of a previously assigned variable when the search reaches an illegal assignment. CP is often applied either as a preprocessing step or after an assignment to a variable is made. The objective is to reduce the domains of the variables by making them locally consistent with the current partial assignment. The propagation process starts with the belief that for every value assignment vi in the domain of each variable i there exists a solution with vi assigned to i. The process then attempts to correct this a priori belief by locally propagating constraint information. It is well-known that CP, unlike BP, always converges, regardless of the structure of the CN graph. This is because no possible solution is ignored at the start and none ever removed during the process. In the end, CP produces potentially reduced variable domains that are in fact locally consistent. In turn, the resulting search space is at worst no larger than the original but potentially smaller while still containing all possible solutions. The computational efficiency and effectiveness of CP in practice has made it a popular algorithm in the CSP community. 3 Terminology and Notation clauses variables 2 3 4 fb b 1 fb→2 a Figure 2: The graph inside the continuous curve is the CN graph for the formula fb that results from removing clause b from f. The graph inside the dashed curve is the CN graph for fb→2, which corresponds to the formula for the connected component of the CN graph for fb that contains variable 2. Let V (a) be the set of variables that appear in constraint a and C(i) the set of constraints in which variable i appears. Let also Vi(a) ≡ V (a) −{i} and Ca(i) ≡C(i) −{a}. In kSAT, the constraints are the clauses, each variable is binary, with domain {0, 1}, and a solution corresponds to a satisfying assignment. If i ∈V (a), denote by sa,i the value assignment to variable i that guarantees the satisfiability of clause a; and denote the other possible assignment to i by ua,i. Finally, let Cs a(i) and Cu a (i) be the set of clauses in Ca(i) where variable i appears in the same and different literal form as it does in clause a, respectively. The k-SAT formula under consideration is denoted by f. It is convenient to introduce notation for formulae associated to the CN that results from removing variables or constraints from f. Let fa be the function that results from removing clause a from f (see figure 2), and similarly, abusing notation, let fi be the function that results from removing variable i from f. Let fa→i be the function that corresponds to the connected component of the CN graph for fa that contains variable i ∈V (a), and let fi→a be the function that corresponds to the connected component of the CN graph for fi that contains a ∈C(i). (Naturally, if node a is not a separator of the CN graph for f, fa has a single connected component, which leads to fa→i = fa; similarly for fi.) 2 It is convenient to use a simple, if perhaps unusual, representation of sets in order to track the domains of the variables during the propagation process. Each subset A of a set S of size m is represented as a bit array of m elements where component k in the array is set to 1 if k is in A and to 0 otherwise. For instance, if S = {0, 1}, then the array [00] represents ∅, and similarly, [01], [10] and [11] represent {0}, {1} and {0, 1}, respectively. It is also useful to introduce the concept of (globally) consistent domains of variables and SAT functions. Let Sf = {x|x satisfies f} be the set of assignments that satisfy f. Given a complete assignment x, denote by x−i the assignments to all the variables except i; thus, x = (x1, . . . , xn) = (xi, x−i). Let the set Wi be the consistent domain of variable i in f if Wi = {xi|x = (xi, x−i) ∈ Sf for some x−i}; that is, Wi contains the set of all possible values that variable i can take in an assignment that satisfies f. Let the set W be the consistent domain of f if W = ×n i=1Wi and, for all i, Wi is the consistent domain of variable i in f. Finally, some additional terminology classifies variables of a SAT function given a satisfying assignment. Given a function f and a satisfying assignment x, let variable i be fixed if changing only its assignment xi in x does not produce another satisfying assignment for f; and be free otherwise. 4 Propagation Algorithms for Satisfiability Constraint Propagation. In CP for k-SAT, the message Ma→i that clause a sends to variable i is an array of binary values indexed by the elements of the domain of i; similarly, for the message Mi→a that variable i sends to clause a. Intuitively, for all xi ∈{0, 1}, Mi→a(xi) = 1 if and only if assigning value xi to variable i is “ok” with all clauses other than a. Formally, Mi→a(xi) = 1 if and only if fa→i has a satisfying assignment with xi assigned to variable i (or in other words, xi is in the consistent domain of i in fa→i). Similarly, Ma→i(xi) = 1 if and only if clause a is “ok” with assigning value xi to variable i; or formally, Ma→i(xi) = 1 if and only if fi→a has a satisfying assignment with xi assigned to variable i, or assigning xi to variable i by itself satisfies a. It is convenient to denote Mi→a(xi) and Mi→a(xi) by M xi a→i and M xi a→i, respectively. In addition, M sa,i i→a, M ua,i i→a, M sa,i a→i and M ua,i a→i are simply denoted by M s i→a, M u i→a, M s a→i and M u a→i, respectively. In summary, we can write CP for k-SAT as follows. • Messages that clause a sends to variable i: M xi a→i = 1 if and only if xi = sa,i or, there exists j ∈Vi(a), s.t. M s j→a = 1. (1) • Messages that variable i sends to clause a: M xi i→a = 1 if and only if for all b ∈Ca(i), M xi b→i = 1. (2) It is convenient to express CP mathematically as follows. • Messages that clause a sends to variable i: M xi a→i =  1, if xi = sa,i, 1 −Q j∈Vi(a)(1 −M s j→a), if xi = ua,i. • Messages that variable i sends to clause a: M xi i→a = Q b∈Ca(i) M xi b→i. In order to guarantee convergence, the message values in CP are initialized as M s i→a = 1, M u i→a = 1, M u a→i = 1, and naturally, M s a→i = 1. This initialization encodes the a priori belief that every assignment is a solution. CP attempts to “correct” or update this belief through the local propagation of constraint information. In fact, the expressions in CP force the messages to be locally consistent. By being initially conservative about the consistent domains, no satisfying assignment is discarded during the propagation process. Once CP converges, for each variable i, its locally-consistent domain becomes {xi| Q a∈C(i) M xi a→i = 1} = {xi| Q a∈C(i):xi=ua,i M u a→i = 1} ∈2{0,1}. For general CSPs, CP is usually very effective because it can significantly reduce the original domain of the variables, 3 leading to a smaller search space of possible assignments. It should be noted that in the particular case of k-SAT with arbitrary CNs, CP is usually only effective after some variables have already being assigned during the search, because those (partial) assignments can lead to “boundary conditions.” Without such boundary conditions, however, CP never reduces the domain of the variables in k-SAT, as can be easily seen from the expressions above. On the other hand, when CP is applied to tree CNs, it exhibits additional special properties. For example, convergence is actually guaranteed regardless of how the messages are initialized, because of the boundary conditions imposed by the leaves of the tree. Also, the final messages are in fact globally consistent (i.e., all the messages are consistent with their definition). Therefore, the locallyconsistent domains are in fact the consistent domains. Whether the formula is satisfiable, or not, can be determined immediately after applying CP. If the formula is not satisfiable, the consistent domains will be empty sets. If the formula is in fact satisfiable, applying depth-first search always finds a satisfying assignment without the need to backtrack. We can express CP in a way that looks closer to SP and BP. Using the reparametrization Γa→i = 1 −M u a→i, we get the following expression of CP. • Message that clause a sends to variable i: Γa→i = Q j∈Vi(a)(1 −M s j→a). • Message that variable i sends to clause a: M s i→a = Q b∈Cu a (i)(1 −Γb→i). Survey Propagation. Survey propagation has become a very popular propagation algorithm for k-SAT. It was developed in the physics community by M´ezard et al. [2]. The excitement around SP comes from its excellent empirical performance on hard satisfiability problems; that is, k-SAT formulae with a ratio α of the number of clauses to the number of variables near the so called satisfiability threshold αc. The following is a description of an SP-inspired family of message-passing procedures, parametrized by ρ ∈[0, 1]. It is often denoted by SP(ρ), and contains BP (ρ = 0) and (pure) SP (ρ = 1). • Message that clause a sends to variable i: ηa→i = Q j∈Vi(a) Πu j→a Πu j→a+Πs j→a+Π∗ j→a • Messages that variable i sends to clause a: Πu i→a =  1 −ρ Q b∈Cu a (i)(1 −ηb→i)  Q b∈Cs a(i)(1 −ηb→i) Πs i→a = Q b∈Cu a (i)(1 −ηb→i)  1 −Q b∈Cs a(i)(1 −ηb→i)  Π∗ i→a = Q b∈Cu a (i)(1 −ηb→i) Q b∈Cs a(i)(1 −ηb→i) = Q b∈Ca(i)(1 −ηb→i) SP was originally derived via arguments and concepts from physics. A simple derivation based on a probabilistic interpretation of CP is given in the next section of the paper. The derivation presented here elucidates the assumptions that SP algorithms make about the satisfiability properties and structure of k-SAT formulae. However, it is easy to establish strong equivalence relations between the different propagation algorithms even at the basic level, before introducing the probabilistic interpretation (details omitted). 5 A Probabilistic Relaxation of Constraint Propagation for Satisfiability The main idea behind constraint propagation relaxation (CPR) is to introduce a probabilistic model for the k-SAT formula and view the messages as random variables in that model. If the formula f has n variables, the sample space Ω= (2{0,1})n is the set of the n-tuple whose components are subsets of the set of possible values that each variable i can take (i.e., subsets of {0, 1}). The “true probability law” Pf of a SAT formula f that corresponds to CP is defined in terms of the consistent domain of f: for all W ∈Ω, Pf(W) =  1, if W is the consistent domain of f, 0, otherwise. 4 Clearly, if we could compute the consistent domains of the remaining variables after each variable assignment during the search, there would be no need to backtrack. But, while it is easy to compute consistent domains for tree CNs, it is actually hard in general for arbitrary CNs. Thus, it is generally hard to compute Pf. (CNs with graphs of bounded tree-width are a notable exception.) However, the probabilistic interpretation will allow us to introduce “bias” on Ω, which leads to a heuristic for dynamically ordering both the variables and their values during search. As shown in this section, it turns out that for arbitrary CNs, survey propagation algorithms attempt to compute different “approximations” or “relaxations” of Pf by making different assumptions about its “probabilistic structure.” Let us now view each message M s a→i, M u a→i, M s i→a, and M u i→a for each variable i and clause a as a (Bernoulli) random variable in some probabilistic model with sample space Ωand a, now arbitrary, probability law P. 3 Formally, for each clause a, variable i and possible assignment value xi ∈{0, 1}, we define M xi a→i ∼Bernoulli(pxi a→i) and M xi i→a ∼Bernoulli(pxi i→a) where pxi a→i = P(M xi a→i = 1) and pxi i→a = P(M xi i→a = 1). This is a distribution over all possible subsets (i.e., the power set) of the domain of each variable, not just over the variable’s domain itself. Also, clearly we do not need to worry about ps a→i because it is always 1, by the definition of M s a→i. The following is a description of how we can use those probabilities during search. In the SP community, the resulting heuristic search is called “decimation” [1, 2]. If we believe that P “closely approximates” Pf, and know the probability pxi i ≡P(M xi a→i = 1 for all a ∈C(i)) that xi is in the consistent domain for variable i of f, for every variable i, clause a and possible assignment xi, we can use them to dynamically order both the variables and the values they can take during search. Specifically, we first compute p1 i = P(M u a→i = 1 for all a ∈C−(i)) and p0 i = P(M u a→i = 1 for all a ∈C+(i)) for each variable i, where C+(i) and C−(i) are the sets of clauses where variable i appears as a positive and a negative literal, respectively. Using those probability values, we then compute what the SP community calls the “bias” of i: |p1 i −p0 i |. The variable to assign next is the one with the largest bias. 4 We would set that variable to the value of largest probability; for instance, if variable i has the largest bias, then we set i next, to 1 if p1 i > p0 i , and to 0 if p1 i < p0 i . The objective is then to compute or estimate those probabilities. The following are (independence) assumptions about the random variables (i.e., messages) used in this section. The assumptions hold for tree CNs and, as formally shown below, are inherent to the survey propagation process. Assumption 1. For each clause a and variable i, the random variables M s j→a for all j ∈Vi(a) are independent. Assumption 2. For each clause a and variable i, the random variables M u b→i for all clauses b ∈ Cu a (i) are independent. Assumption 3. For each clause a and variable i, the random variables M u b→i for all clauses b ∈ Cs a(i) are independent. Without any further assumptions, we can derive the following, by applying assumption 1 and the expression for M u a→i that results from 1: pu a→i = P(M u a→i = 1) = 1 −Q j∈Vi(a) P(M s j→a = 0) = 1 −Q j∈Vi(a)(1 −ps j→a). Similarly, by assumption 2 and the expression for M s i→a that results from 2, we derive ps i→a = P(M s i→a = 1) = Q b∈Cu a (i) P(M u b→i = 1) = Q b∈Cu a (i) pu b→i. Using the reparametrization ηa→i = P(M u a→i = 0) = 1 −pu a→i, we obtain the following messagepassing procedure. 3Given clause a and variable i of SAT formula f, let Dj a→i be the (globally) consistent domain of fa→i for variable j. The random variables corresponding to the messages from variable i to clause a are defined as M xi i→a(W) = 1 iff Wj ⊂Dj a→i for every variable j of fa→i; and xi ∈Di a→i. The other random variables are then defined as M s a→i(W) = 1 and M u a→i(W) = 1 −Q j∈Vi(a)(1 −M s j→a(W)) for all W. 4For both variable and value ordering, we can break ties uniformly at random. Also, the description of SP(ρ) used often, sets a fraction β of the variables that remained unset during search. While clearly this speeds up the process of getting a full assignment, the effect that heuristic might have on the completeness of the search procedure is unclear, even in practice. 5 • Message that clause a sends to variable i: ηa→i = Q j∈Vi(a)(1 −ps i→a) • Message that variable i sends to clause a: ps i→a = Q b∈Cu a (i)(1 −ηb→i) We can then use assumption 3 to estimate pu i→a as Q b∈Cs a(i)(1 −ηb→i). Note that this message-passing procedure is exactly “classical” CP if we initialize ηa→i = 0 and ps i→a = 1 for all variables i and clause a. However, the version here allows the messages to be in [0, 1]. At the same time, for tree CNs, this algorithm is the same as classical CP (i.e., produces the same result), regardless of how the messages ηa→i and ps i→a are initialized. In fact, in the tree case, the final messages uniquely identify P = Pf. Making Assumptions about Satisfiability. Let us make the following assumption about the “probabilistic satisfiability structure” of the k-SAT formula. Assumption 4. For some ρ ∈[0, 1], for each clause a and variable i, P(M s i→a = 0, M u i→a = 0) = (1 −ρ)P(M s i→a = 1, M u i→a = 1). For ρ = 1, the last assumption essentially says that fa→i has a satisfying assignment; i.e., P(M s i→a = 0, M u i→a = 0) = 0. For ρ = 0, it essentially says that the likelihood that fa→i does not have a satisfying assignment is the same as the likelihood that fa→i has a satisfying assignment where variable i is free. Formally, in this case, we have P(M s i→a = 0, M u i→a = 0) = P(M s i→a = 1, M u i→a = 1), which, interestingly, is equivalent to the condition P(M s i→a = 1) + P(M u i→a = 1) = 1. Let us introduce a final assumption about the random variables associated to the messages from variables to clauses. Assumption 5. For each clause a and variable i, the random variables M s i→a and M u i→a are independent. Note that assumptions 2, 3 and 5 hold (simultaneously) if and only if for each clause a and variable i, the random variables M u b→i for all clauses b ∈Ca(i) are independent. The following theorem is the main result of this paper. Theorem 1. (Sufficient Assumptions) Let assumptions 1, 2 and 3 hold. The message-passing procedure that results from CPR as presented above is 1. belief propagation (i.e., SP(0)), if assumption 4, with ρ = 0, holds, and 2. a member of the family of survey propagation algorithms SP(ρ), with 0 < ρ ≤1, if assumption 4, with the given ρ, and assumption 5 hold. These assumptions are also necessary in a strong sense (details omitted), Assumptions 1, 2, 3, and even 5 might be obvious to some readers, but assumption 4 might not be, and it is essential. Proof. As in the last subsection, assumption 1 leads to pu a→i = 1 −Q j∈Vi(a)(1 −ps j→a), while assumptions 2 and 3 lead to ps i→a = Q b∈Cu a (i) pu b→i and pu i→a = Q b∈Cs a(i) pu b→i. Note also that assumption 4 is equivalent to ps i→a + pu i→a −ρ P(M s i→a = 1, M u i→a = 1) = 1. This allows us to express P(M s i→a = 1) = ps i→a = ps i→a ps i→a + pu i→a −ρ P(M s i→a = 1, M u i→a = 1), which implies P(M s i→a = 0) = pu i→a −ρ P(M s i→a = 1, M u i→a = 1) pu i→a −ρ P(M s i→a = 1, M u i→a = 1) + ps i→a . If ρ = 0, then the last expression simplifies to P(M s i→a = 0) = pu i→a pu i→a + ps i→a . 6 Using the reparametrization ηa→i ≡P(M u a→i = 0) = 1 −pu a→i, Πu i→a ≡P(M u i→a = 1) = pu i→a and Πs i→a + Π∗ i→a ≡P(M s i→a = 1) = ps i→a, leads to BP (i.e., SP(0)). Otherwise, if 0 < ρ ≤1, then using the reparametrization ηa→i ≡P(M u a→i = 0), Πu i→a ≡ P(M u i→a = 1) −ρ P(M s i→a = 1, M u i→a = 1) = P(M s i→a = 0, M u i→a = 1) + (1 −ρ)P(M s i→a = 1, M u i→a = 1), Πs i→a ≡ P(M s i→a = 1, M u i→a = 0), and Π∗ i→a ≡ P(M s i→a = 1, M u i→a = 1), and applying assumption 5 leads to SP(ρ). The following are some remarks that can be easily derived using CPR. On the Relationship Between SP and BP. SP essentially assumes that every sub-formula fa→i has a satisfying assignment, while BP assumes that for every clause a and variable i ∈V (a), variable i is equally likely not to have a satisfying assignment or being free in fa→i, as it is easy to see from assumption 4. The parameter ρ just modulates the relative scaling of those two likelihoods. While the same statement about pure SP is not novel, the statement about BP, and more generally, the class SP(ρ) for 0 ≤ρ < 1, seems to be. On the Solutions of SAT formula f. Note that Pf may not satisfy all or any of the assumptions. Yet, satisfying an assumption imposes constraints on what Pf actually is and thus on the solution space of f. For example, if Pf satisfies assumption 4 for any ρ < 1, which includes BP when ρ = 0, and for all clauses a and variables i, then Pf(M s i→a = 0, M u i→a = 0) = Pf(M s i→a = 1, M u i→a = 1) = 0 and therefore either Pf(M s i→a = 1, M u i→a = 0) = 1 or Pf(M s i→a = 0, M u i→a = 1) = 1 holds, but not both of course. That implies f must have a unique solution! On SP. This result provides additional support to previous informal conjectures as to why SP is so effective near the satisfiability threshold: SP concentrates all its efforts on finding a satisfying assignment when they are scarce and “scattered” across the space of possible assignments. Thus, SP assumes that the set of satisfying assignments has in fact special structure. To see that, note that assumptions 4, with ρ = 1, and 5 imply that P(M s i→a = 1, M u i→a = 0) = 0 or P(M s i→a = 0, M u i→a = 1) = 0 must hold. This says that in every assignment that satisfies fa→i, variable i is either free or always has the same value assignment. This observation is relevant because it has been argued that as we approach the satisfiability threshold, the set of satisfying assignments decomposes into many “local” or disconnected subsets. It follows easily from the discussion here that SP assumes such a structure, therefore potentially making it most effective under those conditions (see Maneva et al. [3] for more information). Similarly, it has also been empirically observed that SP is more effective for ρ close to, but strictly less than 1. The CPR approach suggests that such behavior might be because, with respect to any P that satisfies assumption 4, unlike pure SP, for such values of ρ < 1, SP(ρ) guards against the possibility that fa→i is not satisfiable, while still being somewhat optimistic by giving more weight to the event that variable i is free in fa→i. Naturally, BP, which is the case of ρ = 0, might be too pessimistic in this sense. On BP. For BP (ρ = 0), making the additional assumption that the formula fa→i is satisfiable (i.e., P(M s i→a = 0, M u i→a = 0) = 0) implies that there are no assignments with free variables (i.e., P(M s i→a = 1, M u i→a = 1) = 0). Therefore, the only possible consistent domain is the singleton {sa,i} or {ua,i} (i.e., P(M s i→a = 1, M u i→a = 0) + P(M s i→a = 0, M u i→a = 1) = 1). Thus, either 0 or 1 can possibly be a consistent value assignment, but not both. This suggests that BP is concentrating its efforts on finding satisfying assignments without free variables. On Variable and Value Ordering. To complete the picture of the derivation of SP(ρ) via CPR, we need to compute p0 i and p1 i for all variables i to use for variable and value ordering during search. We can use the following, slightly stronger versions of assumptions 2 and 3 for that. Assumption 6. For each variable i, the random variables M u a→i for all clauses a ∈C−(i) are independent. 7 Assumption 7. For each variable i, the random variables M u a→i for all clauses a ∈C+(i) are independent. Using assumptions 6 and 7, we can easily derive that p1 i = Q a∈C−(i)(1 −ηa→i) and p0 i = Q a∈C+(i)(1 −ηa→i), respectively. On Generalizations. The approach provides a general, simple and principled way to introduce possibly uncertain domain knowledge into the problem by making assumptions about the structure of the set of satisfying assignments and incorporating them through P. That can lead to more effective propagation algorithms for specific contexts. Related Work. Dechter and Mateescu [10] also connect BP to CP but in the context of the inference problem of assessing zero posterior probabilities. Hsu and McIlraith [11] give an intuitive explanation of the behavior of SP and BP from the perspective of traditional local search methods. They provide a probabilistic interpretation, but the distribution used there is over the biases. Braunstein and Zecchina [12] showed that pure SP is equivalent to BP on a particular MRF over an extended domain on the variables of the SAT formula, which adds a so called “joker” state. Maneva et al. [3] generalized that result by showing that SP(ρ) is only one of many families of algorithms that are equivalent to performing BP on a particular MRF. In both cases, one can easily interpret those MRFs as ultimately imposing a distribution over Ω, as defined here, where the joker state corresponds to the domain {0, 1}. Here, the only particular distribution explicitly defined is Pf, the “optimal” distribution. This paper does not make any explicit statements about any specific distribution P for which applying CPR leads to SP(ρ). 6 Conclusion This paper strongly connects survey and constraint propagation. In fact, the paper shows how survey propagation algorithms are instances of CPR, the probabilistic generalization of classical constraint propagation proposed here. The general approach presented not only provides a new view on survey propagation algorithms, which can lead to a better understanding of them, but can also be used to easily develop potentially better algorithms tailored to specific classes of CSPs. References [1] A. Braunstein, M. M´ezard, and R. Zecchina. Survey propagation: An algorithm for satisfiability. Random Structures and Algorithms, 27:201, 2005. [2] M. M´ezard, G. Parisi, and R. Zecchina. Analytic and Algorithmic Solution of Random Satisfiability Problems. Science, 297(5582):812–815, 2002. [3] E. Maneva, E. Mossel, and M. J. Wainwright. A new look at survey propagation and its generalizations. ACM, 54(4):2–41, July 2007. [4] J. Pearl. Probabilistic Reasoning in Intelligent Systems. Networks of Plausible Inference. Morgan Kaufmann, 1988. [5] D. L. Waltz. Generating semantic descriptions from drawings of scenes with shadows. Technical Report 271, MIT AI Lab, Nov. 1972. PhD Thesis. [6] S. Russell and P. Norvig. Artificial Intelligence: A Modern Approach, chapter 5, pages 137–160. Prentice Hall, second edition, 1995. [7] V. Kumar. Algorithms for constraint-satisfaction problems: A survey. AI Magazine, 13(1):32–44, 1992. [8] R. Dechter. Constraint Processing. Morgan Kaufmann, 2003. [9] F. Bacchus, X. Chen, P. van Beek, and T. Walsh. Binary vs. non-binary constraints. AI, 140(1-2):1–37, Sept. 2002. [10] R. Dechter and R. Mateescu. A simple insight into iterative belief propagation’s success. In UAI, 2003. [11] E. I. Hsu and S. A. McIlraith. Characterizing propagation methods for boolean satisfiability. In SAT, 2006. [12] A. Braunstein and R. Zecchina. Survey propagation as local equilibrium equations. JSTAT, 2004. 8
2007
123
3,152
Theoretical Analysis of Learning with Reward-Modulated Spike-Timing-Dependent Plasticity Robert Legenstein, Dejan Pecevski, Wolfgang Maass Institute for Theoretical Computer Science Graz University of Technology A-8010 Graz, Austria {legi,dejan,maass}@igi.tugraz.at Abstract Reward-modulated spike-timing-dependent plasticity (STDP) has recently emerged as a candidate for a learning rule that could explain how local learning rules at single synapses support behaviorally relevant adaptive changes in complex networks of spiking neurons. However the potential and limitations of this learning rule could so far only be tested through computer simulations. This article provides tools for an analytic treatment of reward-modulated STDP, which allow us to predict under which conditions reward-modulated STDP will be able to achieve a desired learning effect. In particular, we can produce in this way a theoretical explanation and a computer model for a fundamental experimental finding on biofeedback in monkeys (reported in [1]). 1 Introduction A major puzzle for understanding learning in biological organisms is the relationship between experimentally well-established learning rules for synapses (such as STDP) on the microscopic level and adaptive changes of the behavior of biological organisms on the macroscopic level. Neuromodulatory systems which send diffuse signals related to reinforcements (rewards) and behavioral state to several large networks of neurons in the brain, have been identified as likely intermediaries that relate these two levels of learning. It is well-known that the consolidation of changes of synaptic weights in response to pre- and postsynaptic neuronal activity requires the presence of such third signals [2]. Corresponding spike-based learning rules of the form dwji(t) dt = cji(t)d(t), (1) have been proposed in [3], where wji is the weight of a synapse from neuron i to neuron j, cji(t) is an eligibility trace of this synapse which collects proposed weight changes resulting from a learning rule such as STDP, and d(t) = h(t)−¯h is a neuromodulatory signal with mean ¯h (where h(t) might for example represent reward prediction errors, encoded through the concentration of dopamine in the extra-cellular fluid). We will consider in this article only cases where the reward prediction error is equal to the current reward. We will refer to d(t) simply as the reward signal. Obviously such learning scheme (1) faces a large credit-assignment problem, since not only those synapses for which weight changes would increase the chances of future reward receive the top-down signal d(t), but billions of other synapses too. Nevertheless the brain is able to solve this credit-assignment problem, as has been shown in one of the earliest (but still among the most amazing) demonstrations of biofeedback in monkeys [1]. The spiking activity of single neurons (in area 4 of the precentral gyrus) was recorded, the current firing rate of this neuron was made visible to the monkey in the form of an illuminated meter, and the monkey received food rewards for increases (or in alternating trials for decreases) of the firing rate of this neuron from its average level. The monkeys learnt quite reliably (on the time scale of 10’s of minutes) to change the firing rate of this neuron in the currently rewarded direction1. Obviously the existence of learning mechanisms in the brain which are able to solve this difficult credit assignment problem is fundamental for understanding and modeling many other learning features of the brain. We present in section 3 and 4 of this abstract a learning theory for (1), where the eligibility trace cij(t) results from standard forms of STDP, which is able to explain the success of the experiment in [1]. This theoretical model is confirmed by computer simulations (see section 4.1). In section 5 we leave this concrete learning experiment and investigate under what conditions neurons can learn through trial and error (via reward-modulated STDP) associations of specific firing patterns to specific patterns of input spikes. The resulting theory leads to predictions of specific parameter ranges for STDP that support this general form of learning. These were tested through computer experiments, see 5.1. Other interesting results of computer simulations of reward-modulatedSTDP in the context of neural circuits were recently reported in [3] and [4] (we also refer to these articles for reviews of preceding work by Seung and others). 2 Models for neurons and synaptic plasticity The spike train of a neuron i which fires action potentials at times t(1) i , t(2) i , t(3) i , . . . is formalized by a sum of Dirac delta functions Si(t) = P t(n) i δ(t −t(n) i ). We assume that positive and negative weight changes suggested by STDP for all pairs of pre- and postsynaptic spikes (according to the two integrals in (2)) are collected in an eligibility trace cji(t), where the impact of a spike pairing with the second spike at time t −s on the eligibility trace at time t is given by some function fc(s) for s ≥0: cji(t) = Z ∞ 0 dsfc(s) Z ∞ 0 dr W(r)Spost j (t −s)Spre i (t −s −r) + Z ∞ 0 dr W(−r)Spost j (t −s −r)Spre i (t −s)  . (2) In our simulations, fc(s) is a function of the form fc(s) = s τe e−s τe if s ≥0 and 0 otherwise, with time constant τe = 0.5s. W(r) denotes the standard exponential STDP learning window W(r) =  A+e−r/τ+ , if r ≥0 −A−er/τ− , if r < 0 , (3) where the positive constants A+ and A−scale the strength of potentiation and depression, τ+ and τ−are positive time constants defining the width of the positive and negative learning window, and Spre i , Spost j are the spike trains of the presynaptic and postsynaptic neuron respectively. The actual weight change is the product of the eligibility trace with the reward signal as defined by equation (1). We assume that weights are clipped at the lower boundary value 0 and an upper boundary wmax. We use a linear Poisson neuron model whose output spike train Spost j (t) is a realization of a Poisson process with the underlying instantaneous firing rate Rj(t). The effect of a spike of presynaptic neuron i at time t′ on the membrane potential of neuron j is modeled by an increase in the instantaneous firing rate by an amount wji(t′)ǫ(t −t′), where ǫ is a response kernel which models the time course of a postsynaptic potential (PSP) elicited by an input spike. Since STDP according to [3] has been experimentally confirmed only for excitatory synapses, we will consider plasticity only for excitatory connections and assume that wji ≥0 for all i and ǫ(s) ≥0 for all s. Because the synaptic response is scaled by the synaptic weights, we can assume without loss of generality that the response kernel is normalized to R ∞ 0 ds ǫ(s) = 1. In this linear model, the contributions of all inputs are summed up linearly: Rj(t) = n X i=1 Z ∞ 0 ds wji(t −s) ǫ(s) Si(t −s) , (4) 1Adjacent neurons tended to change their firing rate in the same direction, but also differential changes of directions of firing rates of pairs of neurons are reported in [1] (when these differential changes were rewarded). where S1, . . . , Sn are the n presynaptic spike trains. 3 Theoretical analysis of the resulting weight changes We are interested in the expected weight change over some time interval T (see [5]), where the expectation is over realizations of the stochastic input- and output spike trains as well as a stochastic realization of the reward signal, denoted by the ensemble average ⟨·⟩E ⟨wji(t + T ) −wji(t)⟩E T = 1 T *Z t+T t d dtwji(t′)dt′ + E =  d dtwji(t)  T  E , (5) where we used the abbreviation ⟨f(t)⟩T = T −1 R t+T t f(t′) dt′. Using equation (1), this yields ⟨wji(t + T ) −wji(t)⟩E T = Z ∞ 0 dr W(r) Z ∞ 0 ds fc(s) ⟨Dji(t, s, r) νji(t −s, r)⟩T + Z 0 −∞ dr W(r) Z ∞ |r| ds fc(s + r) ⟨Dji(t, s, r) νji(t −s, r)⟩T ,(6) where Dji(t, s, r) = ⟨d(t)| Neuron j spikes at t −s, and neuron i spikes at t −s −r⟩E is the average reward at time t given a presynaptic spike at time t −s −r and a postsynaptic spike at time t −s, and νji(t, r) = ⟨Sj(t)Si(t −r)⟩E describes correlations between pre- and postsynaptic spike timings (see [6] for the derivation). We see that the expected weight change depends on how the correlations between the pre- and postsynaptic neurons correlate with the reward signal. If these correlations are varying slowly with time, we can exploit the self-averaging property of the weight vector. Analogously to [5], we can drop the ensemble average on the left hand side and obtain: d dt ⟨wji(t)⟩T = Z ∞ 0 dr W(r) Z ∞ 0 ds fc(s) ⟨Dji(t, s, r) νji(t −s, r)⟩T + Z 0 −∞ dr W(r) Z ∞ |r| ds fc(s + r) ⟨Dji(t, s, r) νji(t −s, r)⟩T . (7) In the following, we will always use the smooth time-averaged vector ⟨wji(t)⟩T , but for brevity, we will drop the angular brackets. If one assumes for simplicity that the impact of a pre-post spike pair on the eligibility trace is always triggered by the postsynaptic spike, one gets (see [6] for details): dwji(t) dt = Z ∞ 0 ds fc(s) Z ∞ −∞ dr W(r) ⟨Dji(t, s, r) νji(t −s, r)⟩T . (8) This assumption (which is common in STDP analysis) will introduce a small error for post-before pre spike pairs, since if a reward signal arrives at some time dr after the pairing, the weight update will be proportional to fc(dr) instead of fc(dr + r). For the analyses presented in this article, the simplified equation (8) is a good approximation for the learning dynamics (see [6]). Equation (8) shows that if the reward signal does not depend on pre- and postsynaptic spike statistics, the weight will change according to standard STDP scaled by a constant proportional to the mean reward. 4 Application to biofeedback experiments We now apply our theoretical approach to the biofeedback experiments by Fetz and Baker [1] that we have sketched in the introduction. The authors showed that it is possible to increase and decrease the firing rate of a randomly chosen neuron by rewarding the monkey for its high (respectively low) firing rates. We assume in our model that a reward is delivered to all neurons in the simulated recurrent network with some delay dr every time a specific neuron k in the network produces an action potential d(t) = Z ∞ 0 dr Spost k (t −dr −r)ǫr(r). (9) where ǫr(r) is the shape of the reward pulse corresponding to one postsynaptic spike of the reinforced neuron. We assume that the reward kernel ǫr has zero mass, i.e., ¯ǫr = R ∞ 0 dr ǫr(r) = 0. In our simulations, this reward kernel will have a positive bump in the first few hundred milliseconds, and a long tailed negative bump afterwards. With the linear Poisson neuron model (see Section 2), the correlation of the reward with pre-post spike pairs of the reinforced neuron is (see [6]) Dki(t, s, r) = wki Z ∞ 0 dr′ ǫr(r′)ǫ(s + r −dr −r′) + ǫr(s −dr) ≈ǫr(s −dr). (10) The last approximation holds if the impact of a single input spike on the membrane potential is small. The correlation of the reward with pre-post spike pairs of non-reinforced neurons is Dji(t, s, r) = Z ∞ 0 dr′ ǫr(r′)νkj(t −dr −r′, s −dr −r′) + wkiwjiǫ(s + r −dr −r′)ǫ(r) νj(t −s) + wjiǫ(r) . (11) If the contribution of a single postsynaptic potential to the membrane potential is small, we can neglect the impact of the presynaptic spike and write Dji(t, s, r) ≈ Z ∞ 0 dr′ ǫr(r′)νkj(t −dr −r′, s −dr −r′) νj(t −s) . (12) Hence, the reward-spike correlation of a non-reinforced neuron depends on the correlation of this neuron with the reinforced neuron. The mean weight change for weights to the reinforced neuron is given by d dtwki(t) = Z ∞ 0 ds fc(s + dr)ǫr(s) Z ∞ −∞ dr W(r) ⟨νki(t −dr −s, r)⟩T . (13) This equation basically describes STDP with a learning rate that is proportional to the eligibility function in the time around the reward-delay. The mean weight change of neurons j ̸= k is given by d dtwji(t) = Z ∞ 0 ds fc(s) Z ∞ −∞ dr W(r) Z ∞ 0 dr′ǫr(r′) νkj(t −dr −r′, s −dr −r′) νj(t −s) νji(t −s, r)  T (14) If the output of neurons j and k are uncorrelated, this evaluates to approximately zero (see [6]). The result can be summarized as follows. The reinforced neuron is trained by STDP. Other neurons are trained by STDP with a learning rate proportional to their correlation with the reinforced neuron. If a neuron is uncorrelated with the reinforced neuron, the learning rate is approximately zero. 4.1 Computer simulations In order to test the theoretical predictions for the experiment described in the previous section, we have performed a computer simulation with a generic neural microcircuit receiving a global reward signal. This global reward signal increases its value every time a specific neuron (the reinforced neuron) in the circuit fires. The circuit consists of 1000 leaky integrate-and-fire (LIF) neurons (80% excitatory and 20% inhibitory), which are interconnected by conductance based synapses. The short term dynamics of synapses was modeled in accordance with experimental data (see [6]). Neurons within the recurrent circuit were randomly connected with probabilities pee = 0.08, pei = 0.08, pie = 0.096 and pii = 0.064 where the ee, ei, ie, ii indices designate the type of the presynaptic and postsynaptic neurons (excitatory or inhibitory). To reproduce the synaptic background activity of neocortical neurons in vivo, an Ornstein-Uhlenbeck (OU) conductance noise process modeled according to ([7]) was injected in the neurons, which also elicited spontaneous firing of the neurons in the circuit with an average rate of 4Hz. In half of the neurons part of the noise was substituted with random synaptic connections from the circuit, in order to observe how the learning mechanisms work when most of the input conductance in the neuron comes from a larger number of input synapses which are plastic, instead of a static noise process. The function fc(t) from equation (2) had the form fc(t) = t τe e−t τe if t ≥0 and 0 otherwise, with time constant τe = 0.5s. The reward signal during the simulation was computed according to eq. (9), with the following shape for ǫr(t) ǫr(t) = A+ r t τ + r e − t τ+ r −A− r t τ − r e − t τ− r . (15) The parameter values for ǫr(t) were chosen such as to produce a positive reward pulse with a peak delayed 0.5s from the spike that caused it, and a long tailed negative bump so that R ∞ 0 dt ǫr(t) = 0. 5 10 15 20 time [min] 3 4 5 6 7 8 9 10 11 rate [Hz] A 0 5 10 15 20 time [min] 0.45 0.50 0.55 0.60 0.65 0.70 avg. weights x a m ) w / w ( B 0 1 2 3 4 5 6 7 8 time [sec] C before learning after learning Figure 1: Computer simulation of the experiment by Fetz and Baker [1]. A) The firing rate of the reinforced neuron (solid line) increases while the average firing rate of 20 other randomly chosen neurons in the circuit (dashed line) remains unchanged. B) Evolution of the average synaptic weight of excitatory synapses connecting to the reinforced neuron (solid line) and to other neurons (dashed line). C) Spike trains of the reinforced neuron at the beginning and at the end of the simulation. For values of other model parameters see [6]. The learning rule (1) was applied to all synapses in the circuit which have excitatory presynaptic and postsynaptic neurons. The simulation was performed for 20 min simulated biological time with a simulation time step of 0.1ms. Fig. 1 shows that the firing rate and synaptic weights of the reinforced neuron increase within a few minutes of simulated biological time, while those of the other neurons remain largely unchanged. Note that this reinforcement learning task is more difficult than that of the first computer experiment of [3], where postsynaptic firing within 10 ms after presynaptic firing of a randomly chosen synapse was rewarded, since the relationship between synaptic activity (and hence with STDP) is less direct in this setup. Whereas a very low spontaneous firing rate of 1 Hz was required in [3], this simulation shows that reinforcement learning is also feasible at rate levels which correspond to those reported in [1]. 5 Rewarding spike-timings In order to explore the limits of reward-modulated STDP, we have also investigated a substantially more demanding reinforcement learning scenario. The reward signal d(t) was given in dependence on how well the output spike train Spost j of the neuron j matched some rather arbitrary spike train S∗ that was produced by some neuron that received the same n input spike trains as the trained neuron with arbitrary weights w∗= (w∗ 1, . . . , w∗ n)T , w∗ i ∈{0, wmax}, but in addition n′ −n further spike trains Sn+1, . . . , Sn′ with weights w∗ i = wmax. This setup provides a generic reinforcement learning scenario, when a quite arbitrary (and not perfectly realizable) spike output is reinforced, but simultaneously the performance of the learner can be evaluated quite clearly according to how well its weights w1, . . . , wn match those of the target neuron for those n input spike trains which both of them receive. The reward d(t) at time t is given by d(t) = Z ∞ −∞ dr κ(r)Spost j (t −dr)S∗(t −dr −r), (16) where the function κ(r) with ¯κ = R ∞ −∞ds κ(s) > 0 describes how the reward signal depends on the time difference between a postsynaptic spike and a target spike and dr > 0 is the delay of the reward. Our theoretical analysis below suggests that this reinforcement learning task can in principle be solved by reward-modulated STDP if some constraints are fulfilled. The analysis also reveals which reward kernels κ are suitable for this learning setup. The reward correlation for synapse i is (see [6]) Dji(t, s, r) = Z ∞ −∞ dr′κ(r′)  νpost j (t −dr) + δ(s −dr) + wji(s + r −dr)ǫ(s + r −dr)  [ν∗(t −dr −r′) + w∗ i ǫ(s + r −dr −r′)] , (17) where νpost j (t) = ⟨Spost j (t)⟩E denotes the mean rate of the trained neuron at time t, and ν∗(t) = ⟨S∗(t)⟩E denotes the mean rate of the target spike train at time t. Since weights are changing very slowly, we have wji(t −s −r) = wji(t). In the following, we will drop the dependence of wji on t for brevity. For simplicity, we assume that input rates are stationary and uncorrelated. In this case (since the weights are changing slowly), also the correlations between inputs and outputs can be assumed stationary, νji(t, r) = νji(r). We assume that the eligibility function fc(dr) ≈fc(dr + r) if |r| is on a time scale of a PSP, the learning window, or the reward kernel, and that dr is large compared to these time scales. Then, for uncorrelated Poisson input spike trains of rate νpre i and the linear Poisson neuron model, the weight change at synapse ji is given by dwji(t) dt ≈ ¯κ ¯fcν∗νpre i νpost j  νpost j ¯ W + wji ¯Wǫ  +¯κfc(dr)νpre i  νpost j ¯W + wji ¯ Wǫ   ν∗+ ν∗wji + w∗ i νpost j  +fc(dr)w∗ i νpre i  νpost j Z ∞ −∞ dr W(r)ǫκ(r) + wji Z ∞ −∞ dr W(r)ǫ(r)ǫκ(r)  +fc(dr)w∗ i wjiνpre i  νpost j ¯W + wji ¯ Wǫ  Z ∞ 0 dr ǫ(r)ǫκ(r), (18) where ¯fc = R ∞ 0 dr fc(r), ¯ W = R ∞ −∞dr W(r), ǫκ(r) = R ∞ −∞dr′ κ(r′)ǫ(r −r′) is the convolution of the reward kernel with the PSP is the integral over the STDP learning window, and ¯Wǫ = R ∞ −∞dr ǫ(r)W(r). We will now bound the expected weight change for synapses ji with w∗ i = wmax and for synapses jk with w∗ jk = 0. In this way we can derive conditions for which the expected weight change for the former synapses is positive, and that for the latter type is negative. First, we assume that the integral over the reward kernel is positive. In this case, the weight change is negative for synapses i with w∗ i = 0 if and only if νpre i > 0, and −νpost j ¯W > wji ¯Wǫ. In the worst case, wji is wmax and νpost j is small. We have to guarantee some minimal output rate νpost min such that even if wji = wmax, this inequality is fulfilled. This could be guaranteed by some noise current. For synapses i with w∗ i = wmax, we obtain two more conditions (see [6] for a derivation). The conditions are summarized in inequalities (19)-(21). If these inequalities are fulfilled and input rates are positive, then the weight vector converges on average from any initial weight vector to w∗. −νpost min ¯W > wmax ¯Wǫ (19) Z ∞ −∞ dr W(r)ǫ(r)ǫκ(r) ≥ −νpost max ¯W Z ∞ 0 dr ǫ(r)ǫκ(r) (20) Z ∞ −∞ dr W(r)ǫκ(r) > −¯W ¯κ ν∗νpost max wmax ¯fc fc(dr) + ν∗ wmax + ν∗+ νpost max  , (21) where νpost max is the maximal output rate. The second condition is less severe, and should be easily fulfilled in most setups. If this is the case, the first condition (19) ensures that weights with w∗= 0 are depressed while the third condition (21) ensures that weights with w∗= wmax are potentiated. Optimal reward kernels: From condition (21), we can deduce optimal reward kernels κ. The kernel should be such that the integral R ∞ −∞dr W(r)ǫκ(r) is large, while the integral over κ is small (but positive). Hence, ǫκ(r) should be positive for r > 0 and negative for r < 0. In the following experiments, we use a simple kernel which satisfies the aforementioned constraints: κ(r) = ( Aκ +(e −t−tκ τκ 1 −e −t−tκ τκ 2 ) , if t −tκ ≥0 −Aκ −(e t−tκ τκ 1 −e t−tκ τκ 2 ) , otherwise where Aκ + and Aκ −are positive scaling constants, τ κ 1 and τ κ 2 define the shape of the two doubleexponential functions the kernel is composed of, and tκ defines the offset of the zero-crossing from the origin. The optimal offset from the origin is negative and in the order of tens of milliseconds for usual PSP-shapes ǫ. Hence, reward is positive if the neuron spikes around the target spike or somewhat later, and negative if the neuron spikes much too early. 5.1 Computer simulations In the computer simulations we explored the learning rule in a more biologically realistic setting, where we used a leaky integrate-and-fire (LIF) neuron with input synaptic connections coming from 0 30 60 90 120 time [min] 0.0 0.2 0.4 0.6 0.8 1.0 A average weights x a m ) w / w ( 0 1 2 3 4 time [sec] B before learning target (= rewarded spike times) ∗ S realizable part of target ∗ S after learning Figure 2: Reinforcement learning of spike times. A) Synaptic weight changes of the trained LIF neuron, for 5 different runs of the experiment. The curves show the average of the synaptic weights that should converge to w∗ i = 0 (dashed lines), and the average of the synaptic weights that should converge to w∗ i = wmax (solid lines) with a different shading for each simulation run. B) Comparison of the output of the trained neuron before (upper trace) and after learning (lower trace; the same input spike trains and the same noise inputs were used before and after training for 2 hours). The second trace from above shows those spike times which are rewarded, the third trace shows the target spike train without the additional noise inputs. -0.5 0.0 0.5 1.0 x a m ) w = ∗ w ( w ∆ A -1.0 -0.5 0.0 0.5 ) 0 = ∗ w ( w ∆ 1 2 3 4 5 6 Exp.No. B Figure 3: Predicted average weight change (black bars) calculated from equation (18), and the estimated average weight change (gray bars) from simulations, presented for 6 different experiments with different parameter settings (see Table 1).2 A) Weight change values for synapses with w∗ i = wmax. B) Weight change values for synapses with w∗ i = 0. Cases where the constraints are not fulfilled are shaded with gray color. a generic neural microcircuit composed of 1000 LIF neurons. The synapses were conductance based exhibiting short term facilitation and depression. The trained neuron and the arbitrarily given neuron which produced the target spike train S∗(“target neuron”) both were connected to the same randomly chosen, 100 excitatory and 10 inhibitory neurons from the circuit. The target neuron had 10 additional excitatory input connections (these weights were set to wmax), not accessible to the trained neuron. Only the synapses of the trained neuron connecting from excitatory neurons were set to be plastic. The target neuron had a weight vector with w∗ i = 0 for 0 ≤i < 50 and w∗ i = wmax for 50 ≤i < 110. The generic neural microcircuit from which the trained and the target neurons receive the input had 80% excitatory and 20% inhibitory neurons interconnected randomly with a probability of 0.1. The neurons received background synaptic noise as modeled in [7], which caused spontaneous activity of the neurons with an average firing rate of 6.9Hz. During the simulations, we observed a firing rate of 10.6Hz for the trained, and 19Hz for the target neuron. The reward was delayed by 0.5s, and we used the same eligibility trace function fc(t) as in the simulations for the biofeedback experiment (see [6] for details). The simulations were run for two hours simulated biological time, with a simulation time step of 0.1ms. We performed 5 repetitions of the experiment, each time with different randomly generated circuits and different initial weight values for the trained neuron. In each of the 5 runs, the average synaptic weights of synapses with w∗ i = wmax and w∗ i = 0 approach their target values, as shown in Fig. 2A. In order to test how 2The values in the figure are calculated as ∆w = w(tsim)−w(0) wmax/2 for the simulations, and with ∆w = ⟨dw/dt⟩tsim wmax/2 for the predicted value. w(t) is the average weight over synapses with the same value of w∗. Ex. τǫ[ms] wmax νpost min [Hz] A+106 A− A+ τ+,τ κ 2 [ms] Aκ + tsim [h] 1 10 0.012 10 16.62 1.05 20,20 3.34 5 2 7 0.020 5 11.08 1.02 15,16 4.58 10 3 20 0.010 6 5.54 1.10 25,40 1.46 16 4 7 0.020 5 11.08 1.07 25,16 4.67 13 5 10 0.015 6 20.77 1.10 25,20 3.75 3 6 25 0.005 3 13.85 1.01 25,20 3.34 13 Table 1: Parameter values used for the simulations in Figure 3. Both cases where the constraints are satisfied and not satisfied were covered. PSPs were modeled as ǫ(s) = e(−s/τǫ)/τǫ. closely the learning neuron reproduces the target spike train S∗after learning, we have performed additional simulations where the same spiking input SI is applied to the learning neuron before and after we conducted the learning experiment (results are reported in Fig. 2B). The equations in section 5 define a parameter space for which the trained neuron can learn the target synapse pattern w∗. We have chosen 6 different parameter values encompassing cases with satisfied and non-satisfied constraints, and performed experiments where we compare the predicted average weight change from equation (18) with the actual average weight change produced by simulations. Figure 3 summarizes the results. In all 6 experiments, the sufficient conditions (19)-(21) were correct. In those cases where these conditions were not met, the weight moved in the opposite direction, suggesting that the theoretically sufficient conditions (19)-(21) might also be necessary. 6 Discussion We have developed in this paper a theory of reward-modulated STDP. This theory predicts that reinforcement learning through reward-modulated STDP is also possible at biologically more realistic spontaneous firing rates than the average rate of 1 Hz that was used (and argued to be needed) in the extensive computer experiments of [3]. We have also shown both analytically and through computer experiments that the result of the fundamental biofeedback experiment in monkeys from [1] can be explained on the basis of reward-modulated STDP. The resulting theory of reward-modulated STDP makes concrete predictions regarding the shape of various functions (e.g. reward functions) that would optimally support the speed of reward-modulated learning for the generic (but rather difficult) learning tasks where a neuron is supposed to respond to input spikes with specific patterns of output spikes, and only spikes at the right times are rewarded. Further work (see [6]) shows that reward-modulated STDP can in some cases replace supervised training of readout neurons from generic cortical microcircuit models. Acknowledgment: We would like to thank Gordon Pipa and Matthias Munk for helpful discussions. Written under partial support by the Austrian Science Fund FWF, project # P17229, project # S9102 and project # FP6-015879 (FACETS) of the European Union. References [1] E. E. Fetz and M. A. Baker. Operantly conditioned patterns of precentral unit activity and correlated responses in adjacent cells and contralateral muscles. J Neurophysiol, 36(2):179–204, Mar 1973. [2] C. H. Bailey, M. Giustetto, Y.-Y. Huang, R. D. Hawkins, and E. R. Kandel. Is heterosynaptic modulation essential for stabilizing Hebbian plasticity and memory? Nature Reviews Neuroscience, 1:11–20, 2000. [3] E. M. Izhikevich. Solving the distal reward problem through linkage of STDP and dopamine signaling. Cerebral Cortex Advance Access, January 13:1–10, 2007. [4] R. V. Florian. Reinforcement learning through modulation of spike-timing-dependent synaptic plasticity. Neural Computation, 6:1468–1502, 2007. [5] W. Gerstner and W. M. Kistler. Spiking Neuron Models. Cambridge University Press, Cambridge, 2002. [6] R. Legenstein, D. Pecevski, and W. Maass. Theory and applications of reward-modulated spike-timingdependent plasticity. in preparation, 2007. [7] J.M. Fellous A. Destexhe, M. Rudolph and T.J. Sejnowski. Fluctuating synaptic conductances recreate in vivo-like activity in neocortical neurons. Neuroscience, 107(1):13–24, 2001.
2007
124
3,153
A New View of Automatic Relevance Determination David Wipf and Srikantan Nagarajan, ∗ Biomagnetic Imaging Lab, UC San Francisco {david.wipf, sri}@mrsc.ucsf.edu Abstract Automatic relevance determination (ARD) and the closely-related sparse Bayesian learning (SBL) framework are effective tools for pruning large numbers of irrelevant features leading to a sparse explanatory subset. However, popular update rules used for ARD are either difficult to extend to more general problems of interest or are characterized by non-ideal convergence properties. Moreover, it remains unclear exactly how ARD relates to more traditional MAP estimation-based methods for learning sparse representations (e.g., the Lasso). This paper furnishes an alternative means of expressing the ARD cost function using auxiliary functions that naturally addresses both of these issues. First, the proposed reformulation of ARD can naturally be optimized by solving a series of re-weighted ℓ1 problems. The result is an efficient, extensible algorithm that can be implemented using standard convex programming toolboxes and is guaranteed to converge to a local minimum (or saddle point). Secondly, the analysis reveals that ARD is exactly equivalent to performing standard MAP estimation in weight space using a particular feature- and noise-dependent, non-factorial weight prior. We then demonstrate that this implicit prior maintains several desirable advantages over conventional priors with respect to feature selection. Overall these results suggest alternative cost functions and update procedures for selecting features and promoting sparse solutions in a variety of general situations. In particular, the methodology readily extends to handle problems such as non-negative sparse coding and covariance component estimation. 1 Introduction Here we will be concerned with the generative model y = Φx + ϵ, (1) where Φ ∈Rn×m is a dictionary of features, x ∈Rm is a vector of unknown weights, y is an observation vector, and ϵ is uncorrelated noise distributed as N(ϵ; 0, λI). When large numbers of features are present relative to the signal dimension, the estimation problem is fundamentally ill-posed. Automatic relevance determination (ARD) addresses this problem by regularizing the solution space using a parameterized, data-dependent prior distribution that effectively prunes away redundant or superfluous features [10]. Here we will describe a special case of ARD called sparse Bayesian learning (SBL) that has been very successful in a variety of applications [15]. Later in Section 4 we will address extensions to more general models. The basic ARD prior incorporated by SBL is p(x; γ) = N(x; 0, diag[γ]), where γ ∈Rm + is a vector of m non-negative hyperperparameters governing the prior variance of each unknown coefficient. These hyperparameters are estimated from the data by first marginalizing over the coefficients x and then performing what is commonly referred to as evidence maximization or type-II maximum likelihood [7, 10, 15]. Mathematically, this is equivalent to minimizing L(γ) ≜ −log Z p(y|x)p(x; γ)dx = −log p(y; γ) ≡ log |Σy| + yT Σ−1 y y, (2) ∗This research was supported by NIH grants R01DC04855 and R01DC006435. where a flat hyperprior on γ is assumed, Σy ≜λI + ΦΓΦT , and Γ ≜diag[γ]. Once some γ∗= arg minγ L(γ) is computed, an estimate of the unknown coefficients can be obtained by setting xARD to the posterior mean computed using γ∗: xARD = E[x|y; γ∗] = Γ∗ΦT Σ−1 y∗y. (3) Note that if any γ∗,i = 0, as often occurs during the learning process, then xARD,i = 0 and the corresponding feature is effectively pruned from the model. The resulting weight vector xARD is therefore sparse, with nonzero elements corresponding with the ‘relevant’ features. There are (at least) two outstanding issues related to this model which we consider to be significant. First, while several methods exist for optimizing (2), limitations remain in each case. For example, an EM version operates by treating the unknown x as hidden data, leading to the E-step Σ ≜Cov[x|y; γ] = Γ −ΓΦT Σ−1 y ΦΓ, µ ≜E[x|y; γ] = ΓΦT Σ−1 y y, (4) and the M-step γi →µ2 i + Σii, ∀i = 1, . . . , m. (5) While convenient to implement, the convergence can be prohibitively slow in practice. In contrast, the MacKay update rules are considerably faster to converge [15]. The idea here is to form the gradient of (2), equate to zero, and then form the fixed-point update γi → µ2 i 1 −γ−1 i Σii , ∀i = 1, . . . , m. (6) However, neither the EM nor MacKay updates are guaranteed to converge to a local minimum or even a saddle point of L(γ); both have fixed points whenever a γi = 0, whether at a minimizing solution or not. Finally, a third algorithm has recently been proposed that optimally updates a single hyperparameter γi at a time, which can be done very efficiently in closed form [16]. While extremely fast to implement, as a greedy-like method it can sometimes be more prone to becoming trapped in local minima when the number of features is large, e.g., m > n (results will be presented in a forthcoming publication). Additionally, none of these methods are easily extended to more general problems such as non-negative sparse coding, covariance component estimation, and classification without introducing additional approximations. A second issue pertaining to the ARD model involves its connection with more traditional maximum a posteriori (MAP) estimation methods for extracting sparse, relevant features using fixed, sparsity promoting prior distributions (i.e., heavy-tailed and peaked). Presently, it is unclear how ARD, which invokes a parameterized prior and transfers the estimation problem to hyperparameter space, relates to MAP approaches which operate directly in x space. Nor is it intuitively clear why ARD often works better in selecting optimal feature sets. This paper introduces an alternative formulation of the ARD cost function using auxiliary functions that naturally addresses the above issues. In Section 2, the proposed reformulation of ARD is conveniently optimized by solving a series of re-weighted ℓ1 problems. The result is an efficient algorithm that can be implemented using standard convex programming methods and is guaranteed to converge to a local minimum (or saddle point) of L(γ). Section 3 then demonstrates that ARD is exactly equivalent to performing standard MAP estimation in weight space using a particular featureand noise-dependent, non-factorial weight prior. We then show that this implicit prior maintains several desirable advantages over conventional priors with respect to feature selection. Additionally, these results suggest modifications of ARD for selecting relevant features and promoting sparse solutions in a variety of general situations. In particular, the methodology readily extends to handle problems involving non-negative sparse coding, covariance component estimation, and classification as discussed in Section 4. 2 ARD/SBL Optimization via Iterative Re-Weighted Minimum ℓ1 In this section we re-express L(γ) using auxiliary functions which leads to an alternative update procedure that circumvents the limitations of current approaches. In fact, a wide variety of alternative update rules can be derived by decoupling L(γ) using upper bounding functions that are more conveniently optimized. Here we focus on a particular instantiation of this idea that leads to an iterative minimum ℓ1 procedure. The utility of this selection being that many powerful convex programming toolboxes have already been developed for solving these types of problems, especially when structured dictionaries Φ are being used. 2.1 Algorithm Derivation To start we note that the log-determinant term of L(γ) is concave in γ (see Section 3.1.5 of [1]), and so can be expressed as a minimum over upper-bounding hyperplanes via log |Σy| = min z zT γ −g∗(z), (7) where g∗(z) is the concave conjugate of log |Σy| that is defined by the duality relationship [1] g∗(z) = min γ zT γ −log |Σy| , (8) although for our purposes we will never actually compute g∗(z). This leads to the following upperbounding auxiliary cost function L(γ, z) ≜ zT γ −g∗(z) + yT Σ−1 y y ≥ L(γ). (9) For any fixed γ, the optimal (tightest) bound can be obtained by minimizing over z. The optimal value of z equals the slope at the current γ of log |Σy|. Therefore, we have zopt = ▽γ log |Σy| = diag  ΦT Σ−1 y Φ  . (10) This formulation naturally admits the following optimization scheme: Step 1: Initialize each zi, e.g., zi = 1, ∀i. Step 2: Solve the minimization problem γ →arg min γ Lz(γ) ≜zT γ + yT Σ−1 y y. (11) Step 3: Compute the optimal z using (10). Step 4: Iterate Steps 2 and 3 until convergence to some γ∗. Step 5: Compute xARD = E[x|y; γ∗] = Γ∗ΦT Σ−1 y∗y. Lemma 1. The objective function in (11) is convex. This can be shown using Example 3.4 and Section 3.2.2 in [1]. Lemma 1 implies that many standard optimization procedures can be used for the minimization required by Step 2. For example, one attractive option is to convert the problem to an equivalent least absolute shrinkage and selector operator or ‘Lasso’ [14] optimization problem according to the following: Lemma 2. The objective function in (11) can be minimized by solving the weighted convex ℓ1regularized cost function x∗= arg min x ∥y −Φx∥2 2 + 2λ X i z1/2 i |xi| (12) and then setting γi →z−1/2 i |x∗,i| for all i (note that each zi will always be positive). The proof of Lemma 2 can be briefly summarized using a re-expression of the data dependent term in (11) using yT Σ−1 y y = min x 1 λ ∥y −Φx∥2 2 + X i x2 i γi . (13) This leads to an upper-bounding auxiliary function for Lz(γ) given by Lz(γ, x) ≜ X i  ziγi + x2 i γi  + 1 λ ∥y −Φx∥2 2 ≥Lz(γ), (14) which is jointly convex in x and γ (see Example 3.4 in [1]) and can be globally minimized by solving over γ and then x. For any x, γi = z−1/2 i |xi| minimizes Lz(γ, x). When substituted into (14) we obtain (12). When solved for x, the global minimum of (14) yields the global minimum of (11) via the stated transformation. In summary then, by iterating the above algorithm using Lemma 2 to implement Step 2, a convenient optimization method is obtained. Moreover, we do not even need to globally solve for x (or equivalently γ) at each iteration as long as we strictly reduce (11) at each iteration. This is readily achievable using a variety of simple strategies. Additionally, if z is initialized to a vector of ones, then the starting point (assuming Step 2 is computed in full) is the exact Lasso estimator. The algorithm then refines this estimate through the specified re-weighting procedure. 2.2 Global Convergence Analysis Let A(·) denote a mapping that assigns to every point in Rm + the subset of Rm + which satisfies Steps 2 and 3 of the proposed algorithm. Such a mapping can be implemented via the methodology described above. We allow A(·) to be a point-to-set mapping to handle the case where the global minimum of (11) is not unique, which could occur, for example, if two columns of Φ are identical. Theorem 1. From any initialization point γ(0) ∈Rm + the sequence of hyperparameter estimates {γ(k)} generated via γ(k+1) ∈A(γ(k+1)) is guaranteed to converge monotonically to a local minimum (or saddle point) of (2). The proof is relatively straightforward and stems directly from the Global Convergence Theorem (see for example [6]). A sketch is as follows: First, it must be shown that the the mapping A(·) is compact. This condition is satisfied because if any element of γ is unbounded, L(γ) diverges to infinity. If fact, for any fixed y, Φ and λ, there will always exist a radius r such that for any ∥γ(0)∥≤ r, ∥γ(k)∥≤r for all k. Second, we must show that for any non-minimizing point of L(γ) denoted γ′, L(γ′′) < L(γ′) for all γ′′ ∈A(γ′). At any non-minimizing γ′ the auxiliary cost function Lz′(γ) obtained from Step 3 will be strictly tangent to L(γ) at γ′. It will therefore necessarily have a minimum elsewhere since the slope at γ′ is nonzero by definition. Moreover, because the log | · | function is strictly concave, at this minimum the actual cost function will be reduced still further. Consequently, the proposed updates represent a valid descent function. Finally, it must be shown that A(·) is closed at all non-stationary points. This follows from related arguments. The algorithm could of course theoretically converge to a saddle point, but this is rare and any minimal perturbation leads to escape. Both EM and MacKay updates provably fail to satisfy one or more of the above criteria and so global convergence cannot be guaranteed. With EM, the failure occurs because the associated updates do not always strictly reduce L(γ). Rather, they only ensure that L(γ′′) ≤L(γ′) at all points. In contrast, the MacKay updates do not even guarantee cost function decrease. Consequently, both methods can become trapped at a solution such as γ = 0; a fixed point of the updates but not a stationary point or local minimum of L(γ). However, in practice this seems to be more of an issue with the MacKay updates. Related shortcomings of EM in this regard can be found in [19]. Finally, the fast Tipping updates could potentially satisfy the conditions for global convergence, although this matter is not discussed in [16]. 3 Relating ARD to MAP Estimation In hierarchical models such as ARD and SBL there has been considerable debate over how to best perform estimation and inference [8]. Do we add a hyperprior and then integrate out γ and perform MAP estimation directly on x? Or is it better to marginalize over the coefficients x and optimize the hyperparameters γ as we have described in this paper? In specific cases, arguments have been made for the merits of one over the other based on intuition or heuristic arguments [8, 15]. But we would argue that this distinction is somewhat tenuous because, as we will now show using ideas from the previous section, the weights obtained from the ARD type-II ML procedure can equivalently be viewed as arising from an explicit MAP estimate in x space. This notion is made precise as follows: Theorem 2. Let x2 ≜[x2 1, . . . , x2 m]T and γ−1 ≜[γ−1 1 , . . . , γ−1 m ]T . Then the ARD coefficients from (3) solve the MAP problem xARD = arg min x ∥y −Φx∥2 2 + λh∗(x2), (15) where h∗(x2) is the concave conjugate of h(γ−1) ≜−log |Σy| and is a concave, non-decreasing function of x. This result can be established using much of the same analysis used in previous sections. Omitting some details for the sake of brevity, using (13) we can create a strict upper bounding auxiliary function on L(γ): L(γ, x) = 1 λ∥y −Φx∥2 2 + X i x2 i γi + log |Σy|. (16) If we optimize first over γ instead of x (allowable), the last two terms form the stated concave conjugate function h∗(x2). In turn, the minimizing x, which solves (15), is identical to that obtained by ARD. The concavity of h∗(x2) with respect each |xi| follows from similar ideas. Corollary 1. The regularization term in (15), and hence the implicit prior distribution on x given by p(x) ∝exp[−1 2h∗(x2)], is not generally factorable, meaning p(x) ̸= Q i pi(xi). Additionally, unlike traditional MAP procedures (e.g., Lasso, ridge regression, etc.), this prior is explicitly dependent on both the dictionary Φ and the regularization term λ. This result stems directly from the fact that h(γ−1) is non-factorable and is dependent on Φ and λ. The only exception occurs when ΦT Φ = I; here h∗(x2) factors and can be expressed in closed form independently of Φ, although λ dependency remains. 3.1 Properties of the implicit ARD prior To begin at the most superficial level, the Φ dependency of the ARD prior leads to scale invariant solutions, meaning the value of xARD is not affected if we rescale Φ, i.e., Φ →ΦD, where D is a diagonal matrix. Rather, any rescaling D only affects the implicit initialization of the algorithm, not the shape of the cost function. More significantly, the ARD prior is particularly well-designed for finding sparse solutions. We should note that concave, non-decreasing regularization functions are well-known to encourage sparse representations. Since h∗(x2) is such a function, it should therefore not be surprising that it promotes sparsity to some degree. However, when selecting highly sparse subsets of features, the factorial ℓ0 quasi-norm is often invoked as the ideal regularization term given unlimited computational resources. It is expressed via ∥x∥0 ≜P i I[xi ̸= 0], where I[·] denotes the indicator function, and so represents a count of the number of nonzero coefficients (and therefore features). By applying a exp[−1/2(·)] transformation, we obtain the implicit (improper) prior distribution. The associated MAP estimation problem (assuming the same standard Gaussian likelihood) involves solving min x ∥y −Φx∥2 2 + λ∥x∥0. (17) The difficulty here is that (17) is nearly impossible to solve in general; it is NP-hard owing to a combinatorial number of local minima and so the traditional idea is to replace ∥· ∥0 with a tractable approximation. For this purpose, the ℓ1 norm is the optimal or tightest convex relaxation of the ℓ0 quasi-norm, and therefore it is commonly used leading to the Lasso algorithm [14]. However, the ℓ1 norm need not be the best relaxation in general. In Sections 3.2 and 3.3 we demonstrate that the non-factorable, λ-dependent h∗(x2) provides a tighter, albeit non-convex, approximation that promotes greater sparsity than ∥x∥1 while conveniently producing many fewer local minima than using ∥x∥0 directly. We also show that, in certain settings, no λ-independent, factorial regularization term can achieve similar results. Consequently, the widely used family of ℓp quasi-norms, i.e., ∥x∥p ≜P i |xi|p, p < 1 [2], or the Gaussian entropy measure P i log |xi| based on the Jeffreys prior [4] provably fail in this regard. 3.2 Benefits of λ dependency To explore the properties of h∗(x2) regarding λ dependency alone, we adopt the simplifying assumption ΦT Φ = I. (Later we investigate the benefits of a non-factorial prior.) In this special case, h∗(x2) is factorable and can be expressed in closed form via h∗(x2) = X i h∗(x2 i ) ∝ X i 2|xi| |xi| + p x2 i + 4λ + log  2λ + x2 i + |xi| q x2 i + 4λ  , (18) which is independent of Φ. A plot of h∗(x2 i ) is shown in Figure 1 (left) below. The λ dependency is retained however and contributes two very desirable properties: (i) As a strictly concave function of each |xi|, h∗(x2) more closely approximates the ℓ0 quasi-norm than the ℓ1 norm while, (ii) The associated cost function (15) is unimodal unlike when λ-independent approximations, e.g., the ℓp quasi-norm, are used. This can be explained as follows. When λ is small, the Gaussian likelihood is highly restrictive, constraining most of its relative mass to a very localized region of x space. Therefore, a tighter prior more closely resembling the ℓ0 quasi-norm can be used without the risk of local minima, which occur when the spines of a sparse prior overlap non-negligible portions of the likelihood (see Figure 6 in [15] for a good 2D visual of a sparse prior with characteristic spines running alone the coordinate axis). In the limit as λ →0, h∗(x2) converges to a scaled version of the ℓ0 quasi-norm, yet no local minimum exist because the likelihood in this case only permits a single feasible solution with x = ΦT y. In contrast, when λ is large, the likelihood is less constrained and a looser prior is required to avoid local minima troubles, which will arise whenever the now relatively diffuse likelihood intersects the sharp spines of a highly sparse prior. In this situation h∗(x2) more closely resembles a scaled version of the ℓ1 norm. The implicit ARD prior naturally handles this transition becoming sparser as λ decreases and vice versa. Hence the following property, which is easy to show [18]: Lemma 3. When ΦT Φ = I, (15) has no local minima whereas (17) has 2M local minima. Use of the ℓ1 norm in place of h∗(x2) also yields no local minima; however, it is a much looser approximation of ℓ0 and penalizes coefficients linearly unlike h∗(x2). The benefits of λ dependency in this regard can be formalized and will be presented in a subsequent paper. As a final point of comparison, the actual weight estimate obtained from solving (15) when ΦT Φ = I is equivalent to the non-negative garrote estimator that has been advocated for wavelet shrinkage [5, 18]. −2 −1.5 −1 −0.5 0 0.5 1 1.5 2 0 0.4 0.8 1.2 1.6 2 1.2 1.4 1.6 1.8 2 PSfrag replacements xi −log p(xi) I[xi ̸= 0] |xi| ARD −log p(x) (normalized) α ARD P i |xi|0.01 −8 −6 −4 −2 0 2 4 6 8 0 0.1 0.2 0.3 0.4 0.5 0.6 0.7 0.8 0.9 1 maximally sparse solution PSfrag replacements xi −log p(xi) I[xi ̸= 0] |xi| ARD −log p(x) (normalized) α ARD P i |xi|0.01 Figure 1: Left: 1D example of the implicit ARD prior. The ℓ1 and ℓ0 norms are included for comparison. Right: Plot of the ARD prior across the feasible region as parameterized by α. A factorial prior given by −log p(x) ∝P i |xi|0.01 ≈∥x∥0 is included for comparison. Both approximations to the ℓ0 norm retain the correct global minimum, but only ARD smooths out local minima. 3.3 Benefits of a non-factorial prior In contrast, the benefits the typically non-factorial nature of h∗(x2) are most pronounced when m > n, meaning there are more features than the signal dimension y. In a noiseless setting (with λ →0), we can explicitly quantify the potential of this property of the implicit ARD prior. In this limiting situation, the canonical sparse MAP estimation problem (17) reduces to finding x0 ≜arg min x ∥x∥0 s.t. y = Φx. (19) By simple extension of results in [18], the global minimum of (15) in the limit as λ →0 will equal x0, assuming the latter is unique. The real distinction then is regarding the number of local minimum. In this capacity the ARD MAP problem is superior to any possible factorial variant: Theorem 3. In the limit as λ → 0 and assuming m > n, no factorial prior p(x) = Q i exp[−1/2fi(xi)] exists such that the corresponding MAP problem minx ∥y −Φx∥2 2 + λ P i fi(xi) is: (i) Always globally minimized by a maximally sparse solution x0 and, (ii) Has fewer local minima than when solving (15). A sketch of the proof is as follows. First, for any factorial prior and associated regularization term P i fi(xi), the only way to satisfy (i) is if ∂fi(xi)/∂xi →∞as xi →0. Otherwise, it will always be possible to have a Φ and y such that x0 is not the global minimum. It is then straightforward to show that any fi(xi) with this property will necessarily have between m−1 n  + 1, m n  local minimum. Using results from [18], this is provably an upper bound on the number of local minimum to (15). Moreover, with the exception of very contrived situations, the number of ARD local minima will be considerably less. In general, this result speaks directly to the potential limitations of restricting oneself to factorial priors when maximal feature pruning is paramount. While generally difficult to visualize, in restricted situations it is possible to explicitly illustrate the type of smoothing over local minima that is possible using non-factorial priors. For example, consider the case where m = n + 1 and Rank(Φ) = n, implying that Φ has a null-space dimension of one. Consequently, any feasible solution to y = Φx can be expressed as x = x′ + αv, where v ∈Null(Φ), α is any real-valued scalar, and x′ is any fixed, feasible solution (e.g., the minimum norm solution). We can now plot any prior distribution p(x), or equivalently −log p(x), over the 1D feasible region of x space as a function of α to view the local minima profile. To demonstrate this idea, we chose n = 10, m = 11 and generated a Φ matrix using iid N(0, 1) entries. We then computed y = Φx0, where ∥x0∥0 = 9 and nonzero entries are also iid unit Gaussian. Figure 1 (right) displays the plots of two example priors in the feasible region of y = Φx: (i) the non-factorial implicit ARD prior, and (ii) the prior p(x) ∝exp(−1 2 P i |xi|p), p = 0.01. The later is a factorial prior which converges to the ideal sparsity penalty when p →0. From the figure, we observe that, while both priors peak at the x0, the ARD prior has substantially smoothed away local minima. While the implicit Lasso prior (which is equivalent to the assumption p = 1) also smooths out local minima, the global minimum may be biased away from the maximally sparse solution in many situations, unlike the ARD prior which provides a non-convex approximation with its global minimum anchored at x0. 4 Extensions Thus far we have restricted attention to one particularly useful ARD-based model. But much of the analysis can be extended to handle a variety of alternative data likelihoods and priors. A particularly useful adaptation relevant to compressed sensing [17], manifold learning [13], and neuroimaging [12, 18] is as follows. First, the data y can be replaced with a n × t observation matrix Y which is generated via an unknown coefficient matrix X. The assumed likelihood model and prior are p(Y |X) ∝exp  −1 2λ∥Y −ΦX∥2 F  , p(X) ∝exp  −1 2trace  XT Σ−1 x X  , Σx ≜ dγ X i=1 γiCi. (20) Here each of the dγ matrices Ci’s are known covariance components of which the irrelevant ones are pruned by minimizing the analogous type-II likelihood function L(γ) = log |λI + ΦΣxΦT | + trace 1 t XXT λI + ΦΣxΦT −1 . (21) With minimal effort, this extension can be solved using the methodology described herein. The primary difference is that Step 2 becomes a second-order cone (SOC) optimization problem for which a variety of techniques exist for its minimization [2, 9]. Another very useful adaptation involves adding a non-negativity constraint on the coefficients x, e.g., non-negative sparse coding. This is easily incorporated into the MAP cost function (15) and optimization problem (12); performance is often significantly better than the non-negative Lasso. Results will be presented in a subsequent paper. It may also be possible to develop an effective variant for handling classification problems that avoids additional approximations such as those introduced in [15]. 5 Discussion While ARD-based approaches have enjoyed remarkable success in a number of disparate fields, they remain hampered to some degree by implementational limitations and a lack of clarity regarding the nature of the cost function and existing update rules. This paper addresses these issues by presenting a principled alternative algorithm based on auxiliary functions and a dual representation of the ARD objective. The resulting algorithm is initialized at the well-known Lasso solution and then iterates via a globally convergent re-weighted ℓ1 procedure that in many ways approximates ideal subset selection using the ℓ0 norm. Preliminary results using this methodology on toy problems as well as large neuroimaging simulations with m ≈100, 000 are very promising (and will be reported in future papers). A good (highly sparse) solution is produced at every iteration and so early stopping is always feasible if desired. This produces a highly efficient, global competition among features that is potentially superior to the sequential (greedy) updates of [16] in terms of local minima avoidance in certain cases when Φ is highly overcomplete (i.e., m ≫n). Moreover, it is also easily extended to handle additional constraints (e.g., non-negativity) or model complexity as occurs with general covariance component estimation. A related optimization strategy has also been reported in [3]. The analysis used in deriving this algorithm reveals that ARD is exactly equivalent to performing MAP estimation in x space using a principled, sparsity-inducing prior that is non-factorable and dependent on both the feature set and noise parameter. We have shown that these qualities allow it to promote maximally sparse solutions at the global minimum while relenting drastically fewer local minima than competing priors. This might possibly explain the superior performance of ARD/SBL over Lasso in a variety of disparate disciplines where sparsity is crucial [11, 12, 18]. These ideas raise a key question: If we do not limit ourselves to factorable, Φ- and λ-independent regularization terms/priors as is commonly done, then what is the optimal prior p(x) in the context of feature selection? Perhaps there is a better choice that does not neatly fit into current frameworks linked to empirical priors based on the Gaussian distribution. Note that the ℓ1 re-weighting scheme for optimization can be applied to a broad family of non-factorial, sparsity-inducing priors. References [1] S. Boyd and L. Vandenberghe, Convex Optimization, Cambridge University Press, 2004. [2] S.F. Cotter, B.D. Rao, K. Engan, and K. Kreutz-Delgado, “Sparse solutions to linear inverse problems with multiple measurement vectors,” IEEE Trans. Signal Processing, vol. 53, no. 7, pp. 2477–2488, April 2005. [3] M. Fazel, H. Hindi, and S. Boyd “Log-Det Heuristic for Matrix Rank Minimization with Applications to Hankel and Euclidean Distance Matrices,” Proc. American Control Conf., vol. 3, pp. 2156–2162, June 2003. [4] M.A.T. Figueiredo, “Adaptive sparseness using Jeffreys prior,” Advances in Neural Information Processing Systems 14, pp. 697–704, 2002. [5] H. Gao, “Wavelet shrinkage denoising using the nonnegative garrote,” Journal of Computational and Graphical Statistics, vol. 7, no. 4, pp. 469–488, 1998. [6] D.G. Luenberger, Linear and Nonlinear Programming, Addison–Wesley, Reading, Massachusetts, 2nd ed., 1984. [7] D.J.C. MacKay, “Bayesian interpolation,” Neural Comp., vol. 4, no. 3, pp. 415–447, 1992. [8] D.J.C. MacKay, “Comparison of approximate methods for handling hyperparameters,” Neural Comp., vol. 11, no. 5, pp. 1035–1068, 1999. [9] D.M. Malioutov, M. C¸ etin, and A.S. Willsky, “Sparse signal reconstruction perspective for source localization with sensor arrays,” IEEE Trans. Signal Processing, vol. 53, no. 8, pp. 3010–3022, August 2005. [10] R.M. Neal, Bayesian Learning for Neural Networks, Springer-Verlag, New York, 1996. [11] R. Pique-Regi, E.S. Tsau, A. Ortega, R.C. Seeger, and S. Asgharzadeh, “Wavelet footprints and sparse Bayesian learning for DNA copy number change analysis,” Int. Conf. Acoustics Speech and Signal Processing, April 2007. [12] R.R. Ram´ırez, Neuromagnetic Source Imaging of Spontaneous and Evoked Human Brain Dynamics, PhD Thesis, New York University, 2005. [13] J.G. Silva, J.S. Marques, and J.M. Lemos, “Selecting landmark points for sparse manifold learning,” Advances in Neural Information Processing Systems 18, pp. 1241–1248, 2006. [14] R. Tibshirani, “Regression shrinkage and selection via the Lasso,” Journal of the Royal Statistical Society, vol. 58, no. 1, pp. 267–288, 1996. [15] M.E. Tipping, “Sparse Bayesian learning and the relevance vector machine,” Journal of Machine Learning Research, vol. 1, pp. 211–244, 2001. [16] M.E. Tipping and A.C. Faul, “Fast marginal likelihood maximisation for sparse Bayesian models,” Ninth Int. Workshop Artificial Intelligence and Statistics, Jan. 2003. [17] M.B. Wakin, M.F. Duarte, S. Sarvotham, D. Baron, and R.G. Baraniuk, “Recovery of jointly sparse signals from a few random projections,” Advances in Neural Information Processing Systems 18, pp. 1433–1440, 2006. [18] D.P. Wipf, “Bayesian Methods for Finding Sparse Representations,” PhD Thesis, UC San Diego, 2006. [19] C.F. Wu, “On the convergence properties of the EM algorithm,” The Annals of Statistics, vol. 11, pp. 95–103, 1983.
2007
125
3,154
Sequential Hypothesis Testing under Stochastic Deadlines Peter I. Frazier ORFE Princeton University Princeton, NJ 08544 pfrazier@princeton.edu Angela J. Yu CSBMB Princeton University Princeton, NJ 08544 ajyu@princeton.edu Abstract Most models of decision-making in neuroscience assume an infinite horizon, which yields an optimal solution that integrates evidence up to a fixed decision threshold; however, under most experimental as well as naturalistic behavioral settings, the decision has to be made before some finite deadline, which is often experienced as a stochastic quantity, either due to variable external constraints or internal timing uncertainty. In this work, we formulate this problem as sequential hypothesis testing under a stochastic horizon. We use dynamic programming tools to show that, for a large class of deadline distributions, the Bayes-optimal solution requires integrating evidence up to a threshold that declines monotonically over time. We use numerical simulations to illustrate the optimal policy in the special cases of a fixed deadline and one that is drawn from a gamma distribution. 1 Introduction Major strides have been made in understanding the detailed dynamics of decision making in simple two-alternative forced choice (2AFC) tasks, at both the behavioral and neural levels. Using a combination of probabilistic and dynamic programming tools, it has been shown that when the decision horizon is infinite (i.e. no deadline), the optimal policy is to accumulate sensory evidence for one alternative versus the other until a fixed threshold, and report the corresponding hypothesis [1]. Under similar experimental conditions, it appears that humans and animals accumulate information and make perceptual decisions in a manner close to this optimal strategy [2–4], and that neurons in the posterior parietal cortex exhibit response dynamics similar to that prescribed by the optimal algorithm [6]. However, in most 2AFC experiments, as well as in more natural behavior, the decision has to be made before some finite deadline. This corresponds to a finite-horizon sequential decision problem. Moreover, there is variability associated with that deadline either due to external variability associated with the deadline imposition itself, or due to internal timing uncertainty about how much total time is allowed and how much time has already elapsed. In either case, with respect to the observer’s internal timer, the deadline can be viewed as a stochastic quantity. In this work, we analyze the optimal strategy and its dynamics for decision-making under the pressure of a stochastic deadline. We show through analytical and numerical analysis that the optimal policy is a monotonically declining decision threshold over time. A similar result for deterministic deadlines was shown in [5]. Declining decision thresholds have been used in [7] to model the speed vs. accuracy tradeoff, and also in the context of sequential hypothesis testing ( [8]). We first present a formal model of the problem, as well as the main theoretical results (Sec. 2). We then use numerical simulations to examine the optimal policy in some specific examples (Sec. 3). 2 Decision-making under a Stochastic Deadline We assume that on each trial, a sequence of i.i.d inputs are observed: x1, x2, x3, . . .. With probability p0, all the inputs for the trial are generated from a probability density f1, and, with probability 1 1 −p0, they are generated from an alternate probability density f0. Let θ be index of the generating distribution. The objective is to decide whether θ is 0 or 1 quickly and accurately, while also under the pressure of a stochastic decision deadline. We define xt ≜(x1, x2, . . . , xt) to be the vector of observations made by time t. This vector of observations gives information about the generating density θ. Defining pt ≜P{θ = 1 | xt}, we observe that pt+1 may be obtained iteratively from pt via Bayes’ rule, pt+1 = P{θ=1 | xt+1} = ptf1(xt+1) ptf1(xt+1) + (1 −pt)f0(xt+1). (1) Let D be a deadline drawn from a known distribution that is independent of the observations xt. We will assume that the deadline D is observed immediately and effectively terminates the trial. Let c > 0 be the cost associated with each unit time of decision delay, and d ≥.5 be the cost associated with exceeding the deadline, where both c and d are normalized against the (unit) cost of making an incorrect decision. We choose d ≥.5 so that d is never smaller than the expected penalty for guessing at θ. This avoids situations in which we prefer to exceed the deadline. A decision-policy π is a sequence of mappings, one for each time t, from the observations so far to the set of possible actions: stop and choose θ = 0; stop and choose θ = 1; or continue sampling. We define τπ to be the time when the decision is made to stop sampling under decision-policy π, and δπ to be the hypothesis chosen at this time – both are random variables dependent on the sequence of observations. More formally, π ≜π0, π1, . . ., where πt(xt) 7→{0, 1, continue}, and τπ ≜min(D, inf{t ∈N : πt(xt) ∈{0, 1}}), δπ ≜πτπ(xτπ). We may also define σπ ≜inf{t ∈N : πt(xt) ∈{0, 1}} to be the time when the policy would choose to stop sampling if the deadline were to fail to occur. Then τπ = min(D, σπ). Our loss function is defined to be l(τ, δ; θ, D) = 1{δ̸=θ}1{τ<D} + cτ + d1{τ≥D}. The goal is to find a decision-policy π which minimizes the total expected loss Lπ ≜⟨l(τπ, δπ; θ, D)⟩θ,D,x = P(δπ ̸= θ, τπ < D) + c⟨τπ⟩+ d P(D ≤τπ). (2) 2.1 Dynamic Programming A decision policy is characterized by how τ and δ are generated as a function of the data observed so far. Thus, finding the optimal decision-policy is equivalent to finding the random variables τ and δ that minimize ⟨l(τ, δ; θ, D)⟩. The optimal policy decides whether or not to stop based on whether pt is inside a set Ct ⊆[0, 1] or not. Our goal is to show that Ct is a continuous interval, that Ct+1 ⊆Ct, and that for large enough t, Ct is empty. That is, the optimal policy is to iteratively compute pt based on incoming data, and to decide for the respective hypothesis as soon as it hits either a high (δ = 1) or low (δ = 0) threshold. Furthermore, the two thresholds decay toward each other over time and eventually meet. We will use tools from dynamic programming to analyze this problem. Our approach is illustrated in Fig. 2.1. The red line denotes the cost of stopping at time t as a function of the current belief pt = p. The blue line denotes the cost of continuing at least one more time step, as a function of pt. The black line denotes the cost of continuing at least two more time steps, as a function of pt. Because the cost of continuing is concave in pt (Lemma 1), and larger than stopping for pt ∈{0, 1} (Lemma 4), the continuation region is an interval delimited by where the costs of continuing and stopping intersect (blue dashed lines). Moreover, because the cost of continuing two more timesteps is always larger than that of continuing one more for a given amount of belief (Lemmas 2 and 3), that “window” of continuation narrows over time (Main Theorem). This method of proof parallels that of optimality for the classic sequential probability ratio test in [10]. Before proving the lemmas and the theorem, we first introduce some additional definitions. The value function V : N × [0, 1] 7→R+ specifies the minimal cost (incurred by the optimal policy) at time t, given that the deadline has not yet occurred, that xt have been observed, and that the current cumulative evidence for θ = 1 is pt: V (t, pt) ≜infτ≥t,δ⟨l(τ, δ; θ, D) | D > t, pt⟩θ,D,x. The cost associated with continuing at time t, known as the Q-factor for continuing and denoted by Q, takes the form Q(t, pt) ≜ inf τ≥t+1,δ⟨l(τ, δ; θ, D) | D > t, pt⟩θ,D,x. (3) 2 0 0.5 1 0 0.1 0.2 0.3 0.4 0.5 Q(t + 1, p) −c Q(t, p) ¯Q(t, p) Continuing vs. Stopping Cost pt = p Figure 1: Comparison of the cost Q(t, p) of stopping at time t (red); the cost Q(t, p) of continuing at time t (blue solid line); and Q(t + 1, p) −c (black solid line), which is the cost of continuing at time t+1 minus an adjustment Q(t+1, p)−Q(t, p) = c. The continuation region Ct is the interval between the intersections of the solid blue and red lines, marked by the blue dotted lines, and the continuation region Ct+1 is the interval between the intersections of the solid black and red lines, marked by the black dotted lines. Note that Q(t + 1, p) −c ≥Q(t, p), so Ct contains Ct+1. Note that, in general, both V (t, pt) and Q(t, pt) may be difficult to compute due to the need to optimize over infinitely many decision policies. Conversely, the cost associated with stopping at time t, known as the Q-factor for stopping and denoted by Q, is easily computed as Q(t, pt) = inf δ=0,1⟨l(t, δ; θ, D) | D > t, pt⟩θ,D,x = min{pt, 1 −pt} + ct, (4) where the infimum is obtained by choosing δ=0 if pt ≤.5 and choosing δ=1 otherwise. An optimal stopping rule is to stop the first time the expected cost of continuing exceeds that of stopping, and to choose δ = 0 or δ = 1 to minimize the probability of error given the accumulated evidence (see [10]). That is, τ ∗= inf{t ≥0 : Q(t, pt) ≤Q(t, pt)} and δ∗= 1{pτ∗≥1/2}. We define the continuation region at time t by Ct ≜  pt ∈[0, 1] : Q(t, pt) > Q(t, pt) so that τ ∗= inf{t ≥0 : pt /∈Ct}. Although we have obtained an expression for the optimal policy in terms of Q(t, p) and Q(t, p), computing Q(t, p) is difficult in general. Lemma 1. The function p 7→Q(t, pt) is concave with respect to pt for each t ∈N. Proof. We may restrict the infimum in Eq. 3 to be over only those τ and δ depeding on D and the future observations xt+1 ≜{xt+1, xt+2, . . .}. This is due to two facts. First, the expectation is conditioned on pt, which contains all the information about θ available in the past observations xt, and makes it unnecessary for the optimal policy to depend on xt except through pt. Second, dependence on pt in the optimal policy may be made implicit by allowing the infimum to be attained by different τ and δ for different values of pt but removing explicit dependence on pt from the individual policies over which the infimum is taken. With τ and δ chosen from this restricted set of policies, we note that the distribution of the future observations xt+1 is entirely determined by θ and so we have ⟨l(τ, δ; θ, D) | θ, pt⟩D,xt+1 = ⟨l(τ, δ; θ, D) | θ⟩D,xt+1. Summing over the possible values of θ, we may then write: ⟨l(τ, δ; θ, D) | pt⟩θ,D,xt+1 = X k∈{0,1} ⟨l(τ, δ; θ, D) | θ = k⟩D,xt+1P{θ = k | pt} = ⟨l(τ, δ; θ, D) | θ=0⟩D,xt+1(1 −pt) + ⟨l(τ, δ; θ, D) | θ=1⟩D,xt+1pt. Eq. (3) can then be rewritten as: Q(t, pt) = inf τ≥t+1,δ⟨l(τ, δ; θ, D) | θ=0⟩D,xt+1(1 −pt) + ⟨l(τ, δ; θ, D) | θ=1⟩D,xt+1pt, where this infimum is again understood to be taken over this set of policies depending only upon observations after time t. Since neither ⟨l(τ, δ; θ, D) | θ = 0⟩nor ⟨l(τ, δ; θ, D) | θ = 1⟩depend on pt, this is the infimum of a collection of linear functions in pt, and hence is concave in pt ( [9]). 3 We now need a lemma describing how expected cost depends on the distribution of the deadline. Let D′ be a deadline whose distribution is different than that of D. Let π∗be the policy that is optimal given that the deadline has distribution D, and denote σπ∗by σ∗. Then define V ′(t, pt) ≜⟨min(pσ∗, 1 −pσ∗)1{σ∗<D′} + c min(σ∗, D′) + d1{σ∗≥D′} | pt, D′ > t⟩θ,D,x so that V ′ gives the expected cost of taking the stopping time σ∗which is optimal for deadline D and applying it to the situation with deadline D′. Similarly, let Q′(t, pt) and Q ′(t, pt) denote the corresponding expected costs under σ∗and D′ given that we continue or stop, respectively, at time t given pt and D′ > t. Note that Q ′(t, pt) = Q(t, pt) = min(pt, 1 −pt) + ct. These definitions are the basis for the following lemma, which essentially shows that replacing the deadline D which a less urgent deadline D′ lowers cost. This lemma is needed for Lemma 3 below. Lemma 2 If D′ is such that P{D′ > t+1 | D′ > t} ≥P{D > t+1 | D > t} for all t, then V ′(t, p) ≤V (t, p) and Q′(t, p) ≤Q(t, p) for all t and p. Proof. First let us show that if we have V ′(t + 1, p′) ≤V (t + 1, p′) for some fixed t and all p′, then we also have Q′(t, p) ≤Q(t, p) for that same t and all p. This is the case because, if we fix t, then Q(t, pt) = (d + c(t + 1)) P{D=t+1 | D>t} + ⟨V (t + 1, pt+1) | pt⟩xt+1P{D>t+1 | D>t} = d + c(t + 1) + ⟨V (t + 1, pt+1) −(d + c(t + 1)) | pt⟩xt+1P{D>t+1 | D>t} ≥d + c(t + 1) + ⟨V (t + 1, pt+1) −(d + c(t + 1)) | pt⟩xt+1P{D′ >t+1 | D′ >t} ≥d + c(t + 1) + ⟨V ′(t + 1, pt+1) −(d + c(t + 1)) | pt⟩xt+1P{D′ >t+1 | D′ >t} = Q′(t, p). In the first inequality we have used two facts: that V (t + 1, pt+1) ≤Q(t + 1, pt+1) = min(pt+1, 1 −pt+1) + c(t + 1) ≤d + c(t + 1) (which is true because d ≥.5); and that P{D > t+1 | D > t} ≤P{D′ > t+1 | D′ > t}. In the second inequality we have used our assumption that V ′(t + 1, p′) ≤V (t + 1, p′) for all p′. Now consider a finite horizon version of the problem where σ∗is only optimal among stopping times bounded above by a finite integer T . We will show the lemma for this case, and the lemma for the infinite horizon version of the problem follows by taking the limit as T →∞. We induct backwards on t. Since σ∗is required to stop at T , we have V (T, pT ) = Q(T, pT ) = Q ′(T, pT ) = V ′(T, pT ). Now for the induction step. Fix p and t < T . If σ∗chooses to stop at t when pt = p, then V (t, p) = Q(t, p) = Q ′(t, p) = V ′(t, p). If σ∗continues instead, then V (t, p) = Q(t, p) ≥Q′(t, p) = V ′(t, p) by the induction hypothesis. Note the requirement that d ≥1/2 in the previous lemma. If this requirement is not met, then if pt is such that d < min(pt, 1 −pt) then we may prefer to get timed out rather than choose δ = 0 or δ = 1 and suffer the expected penalty of min(pt, 1 −pt) for choosing incorrectly. In this situation, since the conditional probability P{D = t+1 | D > t} that we will time out in the next time period grows as time moves forward, the continuation region may expand with time rather than contract. Under most circumstances, however, it seems reasonable to assume the deadline cost to be at least as large as that of making an error. We now state Lemma 3, which shows that the cost of delaying by one time period is as least as large as the continuation cost c, but may be larger because the delay causes the deadline to approach more rapidly. Lemma 3. For each t ∈N and p ∈(0, 1), Q(t −1, pt−1 =p) ≤Q(t, pt =p) −c. Proof. Fix t. Let σ∗≜inf{s ≥t + 1 : ps /∈Cs} so that min(σ∗, D) attains the infimum for Q(t, pt). Also define σ′ ≜inf{s ≥t : ps /∈Cs+1} and τ ′ ≜min(D, σ′). Since τ ′ is within the set over which the infimum defining Q(t −1, p) is taken, Q(t −1, p) ≤⟨min(pτ ′, 1 −pτ ′)1{τ ′<D} + cτ ′ + d1{τ ′≥D} | D > t −1, pt−1 = p⟩D,xt = ⟨min(pσ′, 1 −pσ′)1{σ′<D} + c min(D, σ′) + d1{σ′≥D} | D > t −1, pt−1 = p⟩D,xt = ⟨min(pσ∗, 1−pσ∗)1{σ∗−1<D} + c min(D, σ∗−1) + d1{σ∗−1≥D} | D>t−1, pt = p⟩D,xt+1, where the last step is justified by the stationarity of the observation process, which implies that the joint distribution of (ps)s≥t, pσ∗, and σ∗conditioned on pt = p is the same as the joint distribution 4 of (ps−1)s≥t, pσ′, and σ′ + 1 conditioned on pt−1 = p. Let D′ = D + 1 and we have Q′(t, p) = ⟨min(pσ∗, 1−pσ∗)1{σ∗<D′} + c min(D′, σ∗) + d1{σ∗≥D′} | D′ >t, pt = p⟩D′,xt+1, so Q(t −1, p) ≤Q′(t, p) −c. Finally, as D′ satisfies the requirements of Lemma 2, Q′(t, p) ≤ Q(t, p). Lemma 4. For t ∈N, Q(t, 0) = Q(t, 1) = c(t + 1) + dP{D = t + 1 | D > t}. Proof. On the event pt =0, we have that P{θ=0} = 1 and the policy attaining the infimum in (3) is τ ∗=t+1, δ∗=0. Thus, Q(t, 0) becomes Q(t, 0) = ⟨l(τ ∗, δ∗; θ, D) | D > t, pt =0⟩D,xt+1 = ⟨l(τ ∗, δ∗; θ, D) | D > t, θ=0⟩D,xt+1 = ⟨d1{t+1≥D} + c(t + 1) | D > t, θ=0⟩D,xt+1 = c(t+1) + dP{D=t+1 | D > t}. Similarly, on the event pt =1, we have that P{θ=1} = 1 and the policy attaining the infimum in (3) is τ ∗=t+1, δ∗=1. Thus, Q(t, 1) = c(t+1) + dP{D≤t + 1 | D > t}. We are now ready for the main theorem, which shows that Ct is either empty or an interval, and that Ct+1 ⊆Ct. To illustrate our proof technique, we plot Q(t, p), Q(t, p), and Q(t + 1, p) −c as functions of p in Figure 2.1. As noted, the continuation region Ct is the set of p such that Q(t, p) ≤ Q(t, p), To show that Ct is either empty or an interval, we note that Q(t, p) is a concave function in p (Lemma 1) whose value at the endpoints p = 0, 1 are greater than the corresponding values of Q(t, p) (Lemma 4). Such a concave function may only intersect Q(t, p), which is a constant plus min(p, 1 −p), either twice or not at all. When it intersects twice, we have the situation pictured in Figure 2.1, in which Ct is a non-empty interval, and when it does not intersect Ct is empty. To show that Ct+1 ⊆Ct we note that the difference between Q(t + 1, p) and Q(t, p) is the constant c. Thus, to show that Ct, the set where Q(t, p) contains Q(t, p), is larger than Ct+1, the set where Q(t + 1, p) is larger than Q(t + 1, p), it is enough to show that the difference between Q(t + 1, p) and Q(t, p) is at least as large as the adjustment c, which we have done in Lemma 3. Theorem. At each time t ∈N, the optimal continuation region Ct is either empty or a closed interval, and Ct+1 ⊆Ct. Proof. Fix t ∈N. We begin by showing that Ct+1 ⊆Ct. If Ct+1 is empty then the statement follows trivially, so consider the case when Ct+1 ̸= ∅. Choose p ∈Ct+1. Then Q(t, p) ≤Q(t + 1, p) −c ≤Q(t + 1, p) −c = min{p, 1 −p} + ct = Q(t, p). Thus, p ∈Ct, implying Ct+1 ⊆Ct. Now suppose that Ct is non-empty and we will show it must be a closed interval. Let at ≜inf Ct and bt ≜sup Ct. Since Ct is a non-empty subset of [0, 1], we have at, bt ∈[0, 1]. Furthermore, at > 0 because Q(t, p) ≥c(t + 1) + dP{D = t + 1 | D > t} > ct = Q(t, 0) for all p, and the continuity of Q(t, ·) implies that Q(t, p) > Q(t, p) > 0 for p in some open interval around 0. Similarly, bt < 1. Thus, at, bt ∈(0, 1). We will show first that [at, 1/2] ⊆Ct. If at > 1/2 then this is trivially true, so consider the case that at ≤1/2. Since Q(t, ·) is concave on the open interval (0, 1), it must also be continuous there. This and the continuity of Q imply that Q(t, at) = Q(t, at). Also, Q(t, 0) > Q(t, 0) by Lemma 4. Thus at > 0 and we may take a left-derivative at at. For any ε ∈(0, at), at −ε /∈Ct so Q(at −ε) > Q(at −ε). This implies together with Q(t, at) = Q(t, at) that ∂− ∂p Q(t, at) = lim ε→0+ Q(t, at) −Q(t, at −ε) ε ≤lim ε→0+ Q(t, at) −Q(t, at −ε) ε = ∂− ∂p Q(t, at). Since Q(t, ·) is concave by Lemma 1 and Q(t, ·) is linear on [0, 1/2], we have for any p′ ∈[at, 1/2], ∂− ∂p Q(t, p′) ≤∂− ∂p Q(t, at) ≤∂− ∂p Q(t, at) = ∂− ∂p Q(t, p′). Since Q(t, ·) is concave, it is differentiable except at countably many points, so for any p ∈[at, 1/2], Q(t, p) = Q(t, at) + Z p at ∂− ∂p Q(t, p′) dp′ ≤Q(t, at) + Z p at ∂− ∂p Q(t, p′) dp′ = Q(t, p). 5 Therefore p ∈Ct, and, more generally, [at, 1/2] ⊆Ct. By a similar argument, [1/2, bt] ⊆Ct. Finally, Ct ⊆[at, bt] ⊆[at, 1/2] ∪[1/2, bt] ⊆Ct and we must have Ct = [at, bt]. We also include the following proposition, which shows that if D is finite with probability 1 then the continuation region must eventually narrow to nothing. Proposition. If P{D < ∞} = 1 then there exists a T < ∞such that CT = ∅. Proof. First consider the case when D is bounded, so P{D ≤T + 1} = 1 for some time T < ∞. Then, Q(T, pT ) = d + c(T + 1), while Q(T, pT) = cT + min(pT , 1 −pT ) ≤cT + 1/2. Thus Q(T, pT) −Q(T, pT) ≥d + c −1/2 > 0, and CT = ∅. Now consider the case when P{D > t} > 0 for every t. By neglecting the error probability and including only continuation and deadline costs, we obtain Q(t, pt) ≥d P{D=t+1|D>t}+c(t+1). Bounding the error probability by 1/2 we obtain Q(t, pt) ≤ct + 1/2. Thus, Q(t, pt) −Q(t, pt) ≥ c + d P{D = t + 1 | D > t} −1/2. Since P{D < ∞} = 1, limt→∞c + d P{D = t+1 | D > t} −1/2 = c + d −1/2 > 0, and there exists a T such that c + d P{D=t+1 | D>t} −1/2 > 0 for every t ≥T . This implies that, for t ≥T and pt ∈[0, 1], Q(t, pt) −Q(t, pt) > 0 and Ct = ∅. 3 Computational simulations We conducted a series of simulations in which we computed the continuation region and distributions of response time and accuracy for the optimal policy for several choices of the parameters c and d, and for the distribution of the deadline D. We chose the observation xt to be a Bernoulli random variable under both f0 and f1 for every t = 1, 2, . . . with different values for qθ ≜P{xi =1 | θ}. In our simulations we chose q0 =.45 and q1 =.55. We computed optimal policies for two different forms of deadline distribution: first for a deterministic deadline fixed to some known constant; and second for a gamma distributed deadline. The gamma distribution with parameters k > 0 and β > 0 has density (βk/Γ(k))xk−1e−βx for x > 0, where Γ(·) is the gamma function. The parameters k and β, called the shape and rate parameters respectively, are completely determined by choosing the mean and the standard deviation of the distribution since the gamma distribution has mean k/β and variance k/β2. A fixed deadline T may actually be seen as a limiting case of a gamma-distributed deadline by taking both k and β to infinity such that k/β = T is fixed. We used the table-look-up form of the backward dynamic programming algorithm (see, e.g., [11]) to compute the optimal Q-factors. We obtained approximations of the value function and Q-factors at a finite set of equally spaced discrete points {0, 1/N, . . ., (N −1)/N, 1} in the interval [0, 1]. In our simulations we chose N =999. We establish a final time T that is large enough that P{D ≤T } is nearly 1, and thus P{τ ∗≤T } is also nearly 1. In our simulations we chose T = 60. We approximated the value function V (T, pT ) at this final time by Q(T, pT ). Then we calculated value functions and Q-factors for previous times recursively according to Bellman’s equation: Q(t, p) = ⟨V (t + 1, pt+1) | pt = p⟩pt+1; V (t, p) = min(Q(t, p), Q(t, p)). This expectation relating Q(t, ·) to V (t + 1, ·) may be written explicitly using our hypotheses and Eq. 1 to define a function g so that pt+1 = g(pt, xt+1). In our case this function is defined by g(pt, 1) ≜(ptq1)/(ptq1 + (1 −pt)q0) and g(pt, 0) ≜(pt(1 −q1))/(pt(1 −q1) + (1 −pt)(1 −q0)). Then we note that P{xt+1 = 1 | pt} = P{xt+1 = 1 | θ = 1}pt + P{xt+1 = 1 | θ = 0}(1 −pt) = ptq1 + (1 −pt)q0, and similarly P{xt+1 = 0 | pt} = pt(1 −q1) + (1 −pt)(1 −q0). Then Q(t, pt) = (c(t+1)+d)P{D≤t+1 | D>t} + P{D > t+1 | D>t} [ V t+1, g(pt, 1)  ptq1+(1 −pt)q0  +V t+1, g(pt, 0)  pt(1 −q1)+(1 −pt)(1 −q0)  . We computed continuation regions Ct from these Q-factors, and then used Monte Carlo simulation with 106 samples for each problem setting to estimate P{δ = θ | τ = t} and P{τ = t} as functions of t. The results of these computational simulations are shown in Figure 3. We see in Fig. 3A that the decision boundaries for a fixed deadline (solid blue) are smoothly narrowing toward the midline. Clearly, at the last opportunity for responding before the deadline, the optimal policy would always generate a response (and therefore the thresholds merge), since we assumed that the cost of penalty 6 0 10 20 30 40 0 0.2 0.4 0.6 0.8 1 <D>=40 <D>=30 <D>=25 0 10 20 30 40 0 0.2 0.4 0.6 0.8 1 c=0.001 c=0.002 c=0.004 0 10 20 30 40 0 0.2 0.4 0.6 0.8 1 d=0.5 d=2 d=1000 A B C D Varying std(D) Varying mean(D) Varying c Varying d Probability Probability Probability Probability Time Time Figure 2: Plots of the continuation region Ct (blue), and the probability of a correct response P{δ= θ | τ = t} (red). The default settings were c = .001, d = 2, mean(D) = 40, std(D) = 1, and q0 =1−q1=.45. In each plot we varied one of them while keeping the others fixed. In (A) we varied the standard deviation of D, in (B) the mean of D, in (C) the value of c, and in (D) the value of d. is greater than the expected cost of making an error: d ≥.5 (since the optimal policy is to choose the hypothesis with probability ≥.5, the expected probability of error is always ≤.5). At the time step before, the optimal policy would only continue if one more data point is going to improve the belief state enough to offset the extra time cost c. Therefore, the optimal policy only continues for a small “window” around .5 even though it has the opportunity to observe one more data point. At earlier times, the window “widens” following similar logic. When uncertainty about the deadline increases (larger std(D); shown in dashed and dash-dotted blue lines), the optimal thresholds are squeezed toward each other and to the left, the intuition being that the threat of encountering the deadline spreads earlier and earlier into the trial. The red lines denote the average accuracy for different stopping times obtained from a million Monte Carlo simulations of the observation-decisionprocess. They closely follow the decision thresholds (since the threshold is on the posterior probability pτ), but are slightly larger, because pτ must exceed the threshold, and pt moves in discrete increments due to the discrete Bernoulli process. The effect of decreasing the mean deadline is to shift the decision boundaries left-ward, as shown in Fig. 3B. The effect of increasing the cost of time c is to squeeze the boundaries toward the midline (Fig. 3C – this result is analogous to that seen in the classical sequential probability ratio test for the infinite-horizon case. The effect of increasing d is to squeeze the thresholds to the left (Fig. 3D), and the rate of shifting is on the order of log(d) because the tail of the gamma distribution is falling off nearly exponentially. 4 Discussion In this work, we formalized the problem of sequential hypothesis testing (of two alternatives) under the pressure of a stochastically sampled deadline, and characterized the optimal policy. For a large class of deadline distributions (including gamma, normal, exponential, delta), we showed that the optimal policy is to report a hypothesis as soon as the posterior belief hits one of a pair of monotonically declining thresholds (toward the midline). This generalizes the classical infinite horizon case in the limit when the deadline goes to infinity, and the optimal policy reverts to a pair of fixed thresholds as in the sequential probability ratio test [1]. We showed that the decision policy becomes more conservative (thresholds pushed outward and to the right) when there’s less uncertainty about 7 the deadline, when the mean of the deadline is larger, when the linear temporal cost is larger, and when the deadline cost is smaller. In the theoretical analysis, we assumed that D has the property that P{D > t+u | D > t} is nonincreasing in t for each u≥0 over the set of t such that P{D>t} > 0. This assumption implies that, if the deadline has not occurred already, then the likelihood that it will happen soon grows larger and larger, as time passes. The assumption is violated by multi-modal distributions, for which there is a large probability the deadline will occur at some early point in time, but if the deadline does not occur by that point in time then will not occur until some much later time. This assumption is met by a fixed deadline (std(D)→0), and also includes the classical infinite-horizon case (D →∞) as a special case (and the optimal policy reverts to the sequential probability ratio test). This assumption is also met by any distribution with a log-concave density because log P{D > t+u | D > t} = log P{D >t+u} −log P{D >t} = F(t+u) −F(t), where F(t)≜log P{D >t}. If the density of D is log-concave, then F is concave ( [9]), and the increment F(t+u)−F(t) is non-increasing in t. Many common distributions have log-concave densities, including the exponential distribution, the gamma distribution, the normal distribution, and the uniform distribution on an interval. We used gamma distributions for the deadline in the numerical stimulations. There are several empirical properties about timing uncertainty in humans and animals that make the gamma distribution particularly suitable. First, realizations from the gamma distribution are always non-negative, which is consistent with the assumption that a subject never thinks a deadline has passed before the experiment has started. Second, if we fix the rate parameter β and vary the shape k, then we obtain a collection of deadline distributions with different means whose variance and mean are in a fixed ratio, which is consistent with experimental observations [12]. Third, for large values of k the gamma distribution is approximately normal, which is also consistent with experimental observations [12]. Finally, a gamma distributed random variable with mean µ may be written as the sum of k = µβ independent exponential random variables with mean 1/β, so if the brain were able to construct an exponential-distributed timer whose mean 1/β were on the order of milliseconds, then it could construct a very accurate gamma-distributed timer for intervals of several seconds by resetting this exponential timer k times and responding after the kth alarm. This has interesting ramifications for how sophisticated timers for relatively long intervals can be constructed from neurons that exhibit dynamics on the order of milliseconds. This work makes several interesting empirical predictions. Subjects who have more internal uncertainty, and therefore larger variance in their perceived deadline stochasticity, should respond to stimuli earlier and with lower accuracy. Similarly, the model makes quantitative predictions about the subject’s performance when the experimenter explicitly manipulates the mean deadline, and the relative costs of error, time, and deadline. Acknowledgments We thank Jonathan Cohen, Savas Dayanik, Philip Holmes, and Warren Powell for helpful discussions. The first author was supported in part by the Air Force Office of Scientific Research under grant AFOSR-FA9550-05-1-0121. References [1] Wald, A & Wolfowitz, J (1948). Ann. Math. Statisti. 19: 326-39. [2] Luce, R D (1986). Response Times: Their Role in Inferring Elementary Mental Org. Oxford Univ. Press. [3] Ratcliff, R & Rouder, J N (1998). Psychol. Sci. 9: 347-56. [4] Bogacz, R et al (2006). Pyschol. Rev. 113: 700-65. [5] Bertsekas, D P (1995). Dynamic Programming and Optimal Control. Athena Scientific. [6] Gold, J I & Shadlen, M N (2002). Neuron 36: 299-308. [7] Mozer et al (2004). Proc. Twenty Sixth Annual Conference of the Cognitive Science Society. 981-86. [8] Siegmund, D (1985). Sequential Analysis. Springer. [9] Boyd, S & Vandenberghe, L (2004) Convex Optimization. Cambridge Univ. Press. [10] Poor, H V (1994). An Introduction to Signal Detection and Estimation. Springer-Verlag. [11] Powell, W B (2007) Approximate Dynamic Programming: Solving the curses of dimensionality. Wiley. [12] Rakitin, et al (1998). J. Exp. Psychol. Anim. Behav. Process. 24: 15-33. 8
2007
126
3,155
Discriminative Log-Linear Grammars with Latent Variables Slav Petrov and Dan Klein Computer Science Department, EECS Division University of California at Berkeley, Berkeley, CA, 94720 {petrov, klein}@cs.berkeley.edu Abstract We demonstrate that log-linear grammars with latent variables can be practically trained using discriminative methods. Central to efficient discriminative training is a hierarchical pruning procedure which allows feature expectations to be efficiently approximated in a gradient-based procedure. We compare L1 and L2 regularization and show that L1 regularization is superior, requiring fewer iterations to converge, and yielding sparser solutions. On full-scale treebank parsing experiments, the discriminative latent models outperform both the comparable generative latent models as well as the discriminative non-latent baselines. 1 Introduction In recent years, latent annotation of PCFG has been shown to perform as well as or better than standard lexicalized methods for treebank parsing [1, 2]. In the latent annotation scenario, we imagine that the observed treebank is a coarse trace of a finer, unobserved grammar. For example, the single treebank category NP (noun phrase) may be better modeled by several finer categories representing subject NPs, object NPs, and so on. At the same time, discriminative methods have consistently provided advantages over their generative counterparts, including less restriction on features and greater accuracy [3, 4, 5]. In this work, we therefore investigate discriminative learning of latent PCFGs, hoping to gain the best from both lines of work. Discriminative methods for parsing are not new. However, most discriminative methods, at least those which globally trade off feature weights, require repeated parsing of the training set, which is generally impractical. Previous work on end-to-end discriminative parsing has therefore resorted to “toy setups,” considering only sentences of length 15 [6, 7, 8] or extremely small corpora [9]. To get the benefits of discriminative methods, it has therefore become common practice to extract n-best candidate lists from a generative parser and then use a discriminative component to rerank this list. In such an approach, repeated parsing of the training set can be avoided because the discriminative component only needs to select the best tree from a fixed candidate list. While most state-of-the-art parsing systems apply this hybrid approach [10, 11, 12], it has the limitation that the candidate list often does not contain the correct parse tree. For example 41% of the correct parses were not in the candidate pool of ≈30-best parses in [10]. In this paper we present a hierarchical pruning procedure that exploits the structure of the model and allows feature expectations to be efficiently approximated, making discriminative training of full-scale grammars practical. We present a gradient-based procedure for training a discriminative grammar on the entire WSJ section of the Penn Treebank (roughly 40,000 sentences containing 1 million words). We then compare L1 and L2 regularization and show that L1 regularization is superior, requiring fewer iterations to converge and yielding sparser solutions. Independent of the regularization, discriminative grammars significantly outperform their generative counterparts in our experiments. 1 FRAG RB Not NP DT this NN year . . (a) ROOT FRAG FRAG RB Not NP DT this NN year . . (b) ROOT FRAG-x FRAG-x RB-x Not NP-x DT-x this NN-x year .-x . (c) Figure 1: (a) The original tree. (b) The (binarized) X-bar tree. (c) The annotated tree. 2 Grammars with latent annotations Context-free grammars (CFGs) underlie most high-performance parsers in one way or another [13, 12, 14]. However, a CFG which simply takes the empirical productions and probabilities off of a treebank does not perform well. This naive grammar is a poor one because its context-freedom assumptions are too strong in some places and too weak in others. Therefore, a variety of techniques have been developed to both enrich and generalize the naive grammar. Recently an automatic statesplitting approach was shown to produce state-of-the art performance [2, 14]. We extend this line of work by investigating discriminative estimation techniques for automatically refined grammars. We consider grammars that are automatically derived from a raw treebank. Our experiments are based on a completely unsplit X-bar grammar, obtained directly from the Penn Treebank by the binarization procedure shown in Figure 1. For each local tree rooted at an evaluation category X, we introduce a cascade of new nodes labeled X so that each has two children in a right branching fashion. Each node is then refined with a latent variable, splitting each observed category into k unobserved subcategories. We refer to trees over unsplit categories as parse trees and trees over split categories as derivations. Our log-linear grammars are parametrized by a vector θ which is indexed by productions X →γ. The conditional probability of a derivation tree t given a sentence w can be written as: Pθ(t|w) = 1 Z(θ, w) Y X→γ∈t eθX→γ = 1 Z(θ, w)eθTf(t) (1) where Z(θ, w) is the partition function and f(t) is a vector indicating how many times each production occurs in the derivation t. The inside/outside algorithm [15] gives us an efficient way of summing over an exponential number of derivations. Given a sentence w spanning the words w1, w2, . . . , wn = w1:n, the inside and outside scores of a (split) category A spanning (i, j) are computed by summing over all possible children B and C spanning (i, k) and (k, j) respectively:1 SIN(A, i, j) = X A→BC X i<k<j φA→BC × SIN(B, i, k) × SIN(C, k, j) SOUT(A, i, j) = X B→CA X 1≤k<i φB→CA × SOUT(B, k, j) × SIN(C, k, i) + X B→AC X j<k≤n φB→AC × SOUT(B, i, k) × SIN(C, j, k), (2) where we use φA→BC = eθA→BC. In the generative case these scores correspond to the inside and outside probabilities SIN(A, i, j) = PIN(A, i, j) def = P(wi:j|A) and SOUT(A, i, j) = POUT(A, i, j) def = P(w1:iAwj:n) [15]. The scores lack this probabilistic interpretation in the discriminative case, but they can nonetheless be normalized in the same way as probabilities to produce the expected counts of productions needed at training time. The posterior probability of a production A →BC spanning (i, j) with split point k in a sentence is easily expressed as: ⟨A →BC, i, j, k⟩ ∝ SOUT(A, i, j) × φA→BC × SIN(B, i, k) × SIN(C, k, j) (3) To obtain a grammar from the training trees, we want to learn a set of grammar parameters θ on latent annotations despite the fact that the original trees lack the latent annotations. We will consider 1Although we show only the binary component, of course both binary and unary productions are included. 2 generative grammars, where the parameters θ are set to maximize the joint likelihood of the training sentences and their parse trees, and discriminative grammars, where the parameters θ are set to maximize the likelihood of the correct parse tree (vs. all possible trees) given a sentence. Previous work on automatic grammar refinement has focused on different estimation techniques for learning generative grammars with latent labels (training with basic EM [1], an EM-based split and merge approach [2], a non-parametric variational approach [16]). In the following, we review how generative grammars are learned and present an algorithm for estimating discriminative grammars with latent variables. 2.1 Generative Grammars Generative grammars with latent variables can be seen as tree structured hidden Markov models. A simple EM algorithm [1] allows us to learn parameters for generative grammars which maximize the log joint likelihood of the training sentences w and parse trees T : Ljoint(θ) = log Y i Pθ(wi, Ti) = log Y i X t:Ti Pθ(wi, t), (4) where t are derivations (over split categories) corresponding to the observed parse tree (over unsplit categories). In the E-Step we compute inside/outside scores over the set of derivations corresponding to the observed gold tree by restricting the sums in Eqn. 2 to produce only such derivations. 2 We then use Eqn. 3 to compute expectations which are normalized in the M-Step to update the production probabilities φX→γ = eθX→γ to their maximum likelihood estimates: φX→γ = P T Eθ[fX→γ(t)|T ] P γ′ P T Eθ[fX→γ′(t)|T ] (5) Here, Eθ [fX→γ(t)|T ] denotes the expected count of the production (or feature) X →γ with respect to Pθ in the set of derivations t, which are consistent with the observed parse tree T . Similarly, we will write Eθ [fX→γ(t)|w] for the expectation over all derivations of the sentence w. Our generative grammars with latent variables are probabilistic context-free grammars (CFGs), where P γ′ φX→γ′ = 1 and Z(θ) = 1. Note, however, that this normalization constraint poses no restriction on the model class, as probabilistic and weighted CFGs are equivalent [18]. 2.2 Discriminative Grammars Discriminative grammars with latent variables can be seen as conditional random fields [4] over trees. For discriminative grammars, we maximize the log conditional likelihood: Lcond(θ) = log Y i Pθ(Ti|wi) = log Y i X t:Ti eθTf(t) Z(θ, wi) (6) We directly optimize this non-convex objective function using a numerical gradient based method (LBFGS [19] in our implementation).3 Fitting the log-linear model involves the following derivatives: ∂Lcond(θ) ∂θX→γ = X i  Eθ [fX→γ(t)|Ti] −Eθ[fX→γ(t)|wi]  , (7) where the first term is the expected count of a production in derivations corresponding to the correct parse tree and the second term is the expected count of the production in all parses. The challenge in estimating discriminative grammars is that the computation of some quantities requires repeatedly taking expectations over all parses of all sentences in the training set. We will discuss ways to make their computation on large data sets practical in the next section. 2Since the tree structure is observed this can be done in linear time [17]. 3Alternatively, maximum conditional likelihood estimation can also be seen as a special case of maximum likelihood estimation, where P(w) is assumed to be the empirical one and not learned. The conditional likelihood optimization can therefore be addressed by an EM algorithm which is similar to the generative case. However, while the E-Step remains the same, the M-Step involves fitting a log-linear model, which requires optimization, unlike the joint case, which can be done analytically using relative frequency estimators. This EM algorithm typically converges to a comparable local maximum as direct optimization of the objective function but requires 3-4 times more iterations. 3 3 Efficient Discriminative Estimation Computing the partition function in Eqn. 6 requires parsing of the entire training corpus. Even with recent advances in parsing efficiency and fast CPUs, parsing the entire corpus repeatedly remains prohibitive. Fast parsers like [12, 14] can parse several sentences per second, but parsing the 40,000 training sentences still requires more than 5 hours on a fast machine. Even in a parallel implementation, parsing the training corpus several hundred times, as necessary for discriminative training, would and, in fact, did in the case of maximum margin training [6], require weeks. Generally speaking, there are two ways of speeding up the training process: reducing the total number of training iterations and reducing the time required per iteration. 3.1 Hierarchical Estimation The number of training iterations can be reduced by training models of increasing complexity in a hierarchical fashion. For example in mixture modeling [20] and machine translation [21], a sequence of increasingly more complex models is constructed and each model is initialized with its (simpler) predecessor. In our case, we begin with the unsplit X-Bar grammar and iteratively split each category in two and re-train the grammar. In each iteration, we initialize with the results of the smaller grammar, splitting each annotation category in two and adding a small amount of randomness to break symmetry. In addition to reducing the number of training iterations, hierarchical training has been shown to lead to better parameter estimates [2]. However, even with hierarchical training, large-scale discriminative training will remain impractical, unless we can reduce the time required to parse the training corpus. 3.2 Feature-Count Approximation High-performance parsers have employed coarse-to-fine pruning schemes, where the sentence is rapidly pre-parsed with increasingly more complex grammars [22, 14]. Any constituent with sufficiently low posterior probability triggers the pruning of its refined variants in subsequent passes. While this method has no theoretical guarantees, it has been empirically shown to lead to a 100-fold speed-up without producing search errors [14]. Instead of parsing each sentence exhaustively with the most complex grammar in each iteration, we can approximate the expected feature counts by parsing in a hierarchical coarse-to-fine scheme. We start by parsing exhaustively with the X-Bar grammar and then prune constituents with low posterior probability (e−10 in our experiments).4 We then continue to parse with the next more refined grammar, skipping over constituents whose less refined predecessor has been pruned. After parsing with the most refined grammar, we extract expected counts from the final (sparse) chart. The expected counts will be approximations because many small counts have been set to zero by the pruning procedure. Even though this procedure speeds-up each training iteration tremendously, training remains prohibitively slow. We can make repeated parsing of the same sentences significantly more efficient by caching the pruning history from one training iteration to the next. Instead of computing each stage in the coarse-to-fine scheme for every pass, we can compute it once when we start training a grammar and update only the final, most refined scores in every iteration. Cached pruning has the positive side effect of constraining subcategories to refine their predecessors, so that we do not need to worry about issues like subcategory drift and projections [14]. As only extremely unlikely items are removed from the chart, pruning has virtually no effect on the conditional likelihood. Pruning more aggressively leads to a training procedure reminiscent of contrastive estimation [23], where the denominator is restricted to a neighborhood of the correct parse tree (rather than containing all possible parse trees). In our experiments, pruning more aggressively did not hurt performance for grammars with few subcategories, but limited the performance of grammars with many subcategories. 4Even a tighter threshold produced no search errors on a held out set in [14]. We enforce that the gold parse is always reachable. 4 0 5000 10000 15000 20000 16 8 4 2 1 Constructed constituents per sentence Number of latent subcategories No pruning Coarse-to-fine pruning Precomputed pruning PARSING TIME coarse-to-fine cached pruning 1 subcategory 350 min 30 min 2 subcategories 390 min 40 min 4 subcategories 434 min 44 min 8 subcategories 481 min 47 min 16 subcategories 533 min 52 min (a) (b) Figure 2: Average number of constructed constituents per sentence (a) and time to parse the training corpus for different pruning regimes and grammar sizes (b). 4 Results We ran our experiments on the Wall Street Journal (WSJ) portion of the English Penn Treebank using the standard setup: we trained on sections 2 to 21. Section 22 was used as development set for intermediate results. All of section 23 was reserved for the final test. We used the EVALB parseval reference implementation for scoring. We will report F1-scores5 and exact match percentages. For the final test, we selected the grammar that performed best on the development set. For our lexicon, we used a simple approach where rare words (seen five times or less during training) are replaced by one of 50 unknown word tokens based on a small number of word-form features. To parse new sentences with a grammar, we compute the posterior distribution over productions at each span and extract the tree with the maximum expected number of correct productions [14]. 4.1 Efficiency The average number of constituents that are constructed while parsing a sentence is a good indicator for the efficiency of our cached pruning scheme.6 Figure 2(a) shows the average number of chart items that are constructed per sentence. Coarse-to-fine pruning refers to hierarchical pruning without caching [14] and while it is better than no-pruning, it still constructs a large number of constituents for heavily refined grammars. In contrast, with cached pruning the number of constructed chart items stays roughly constant (or even decreases) when the number of subcategories increases. The reduced number of constructed constituents results in a 10-fold reduction of parsing time, see Figure 2(b), and makes discriminative training on a large scale corpus computationally feasible. We found that roughly 100-150 training iterations were needed for LBFGS to converge after each split. Distributing the training over several machines is straightforward as each sentence can be parsed independently of all other sentences. Starting from an unsplit X-Bar grammar we were able to hierarchically train a 16 substate grammar in three days using eight CPUs in parallel.7 It should be also noted that we can expedite training further by training in an interleaved mode, where after splitting a grammar we first run generative training for some time (which is very fast) and then use the resulting grammar to initialize the discriminative training. In such a training regime, we only needed around 50 iterations of discriminative training until convergence, significantly speeding up the training, while maintaining the same final performance. 4.2 Regularization Regularization is often necessary to prevent discriminative models from overfitting on the training set. Surprisingly enough, we found that no regularization was necessary when training on the entire training set, even in the presence of an abundance of features. During development we trained on subsets of the training corpus and found that regularization was crucial for preventing overfit5The harmonic mean of precision P and recall R: 2P R P +R. 6The other main factor determining the parsing time is the grammar size. 7Memory limitations prevent us from learning grammars with more subcategories, a problem that could be alleviated by merging back the least usefull splits as in [2]. 5 EXACT MATCH F1-SCORE generative discriminative generative discriminative 1 subcategory 7.6 7.8 64.8 67.3 2 subcategories 14.6 20.1 76.4 80.8 4 subcategories 24.6 31.3 83.7 85.6 8 subcategories 31.4 37.0 86.6 87.8 16 subcategories 35.8 39.4 88.7 89.3 Table 1: Discriminative training is superior to generative training for exact match and for F1-score. L1 regularization L2 regularization F1-score Exact # Feat. # Iter. F1-score Exact # Feat. # Iter. 1 subcategory 67.3 7.8 23 K 44 67.4 7.9 35 K 67 2 subcategories 80.8 20.1 74 K 108 80.3 19.5 123 K 132 4 subcategories 85.6 31.3 147 K 99 85.7 31.5 547 K 148 8 subcategories 87.8 37.0 318 K 82 87.6 36.9 2,983 K 111 16 subcategories 89.3 39.4 698 K 75 89.1 38.7 11,489 K 102 Table 2: L1 regularization produces sparser solutions and requires fewer training iterations than L2 regularization. ting. This result is in accordance with [16] where a variational Bayesian approach was found to be beneficial for small training sets but performed on par with EM for large amounts of training data. Regularization is achieved by adding a penalty term to the conditional log likelihood function Lcond(θ). This penalty term is often a weighted norm of the parameter vector and thereby penalizes large parameter values. We investigated L1 and L2 regularization: L′ cond(θ) = Lcond(θ) −1 2 X X→γ |θX→γ| σ L′′ cond(θ) = Lcond(θ) − X X→γ θX→γ σ 2 (8) where the regularization parameter σ is tuned on a held out set. In the L2 case, the penalty term is a convex and differentiable function of the parameters and hence can be easily intergrated into our training procedure. In the L1 case, however, the penalty term is discontinuous whenever some parameter equals zero. To handle the discontinuinty of the gradient, we used the orthant-wise limitedmemory quasi-Newton algorithm of [24]. Table 2 shows that while there is no significant performance difference in models trained with L1 or L2 regularization, there is significant difference in the number of training iterations and the sparsity of the parameter vector. L1 regularization leads to extremely sparse parameter vectors (96% of the parameters are zero in the 16 subcategory case), while no parameter value becomes exactly zero with L2 regularization. It remains to be seen how this sparsity can be exploited, as these zeros become ones when exponentiated in order to be used in the computation of inside and outside scores. 4.3 Final Test Set Results Table 1 shows a comparison of generative and discriminative grammars for different numbers of subcategories. Discriminative training is superior to generative training for exact match as well as for F1-score for all numbers of subcategories. For our largest grammars, we see absolute improvements of 3.63% and 0.61% in exact match and F1 score respectively. The better performance is due to better parameter estimates, as the model classes defined by the generative and discriminative model (probabilistic vs. weighted CFGs) are equivalent [18] and the same feature sets were used in all experiments. Our final test set parsing F1-score of 88.8/88.3 (40 word sentences/all sentences) is better than most other systems, including basic generative latent variable grammars [1] (F1-score of 86.7/86.1) and even fully lexicalized systems [13] (F1-score of 88.6/88.2), but falls short of the very best systems [12, 14], which achieve accuracies above 90%. However, many of the techniques used in [12, 14] are orthogonal to what was presented here (additional non-local/overlapping features, merging of unnecessary splits) and could be incorporated into the discriminative model. 6 -1.6 -1.4 -1.2 -1 -0.8 -0.6 -0.4 -0.2 0 0.2 0 0.1 0.2 0.3 0.4 0.5 0.6 0.7 0.8 0.9 1 Loss in F1 score Merging Percentage generative discriminative 80% MERGING Grammar Lexicon only in NNP, NNS, generative CD, WP$ common S, S, SBAR, DT, CC, IN, NP, NP, VBD, VB, VBZ, VP, VP NN, RB, JJ only in ADJP, SINV VBG discriminative (a) (b) Figure 3: (a) Loss in F1 score for different amounts of merging. (b) Categories with two subcategories after merging 80% of the subcategories according to the merging criterion in [2]. 4.4 Analysis Generatively trained grammars with latent variables have been shown to exhibit many linguistically interpretable phenomena [2]. Space does not permit a thorough exposition, and post hoc analysis of learned structures is prone to seeing what one expects, but nonetheless it can be helpful to illustrate the broad patterns that are learned. Not surprisingly, many comparable trends can be observed in generatively and discriminatively trained grammars. For example, the same subdivisions of the determiner category (DT) into definite (the), indefinite (a), demonstrative (this) and quantificational (some) elements emerge under both training regimes. Another example is the preposition category (IN) where subcategories for subordinating conjunctions like (that) and different types of proper prepositions are learned. Typically the divisions in the discriminative grammars are much more pronounced, putting the majority of the weight on a few dominant words. While many similarities can be found, it is especially interesting to examine how generative and discriminative grammars differ. The nominal categories in generative grammars exhibit many clusters of semantic nature (e.g. subcategories for dates, monetary units, capitalized words, etc.). For example, the following two subcategories of the proper noun (NNP) category {New, San, Wall} and {York, Francisco, Street} (here represented by the three most likely words) are learned by the generative grammars. These subcategories are very useful for modeling correlations when generating words and many clusters with such semantic patterns appear in the generative grammars. However, these clusters do not interact strongly with disambiguation and are therefore not learned by the discriminative grammars. Similar observations hold for plural proper nouns (NNPS), superlative adjectives (JJS), and cardinal numbers (CD), which are heavily split into semantic subcategories in the generative grammars but are split very little or not at all in the discriminative grammars. Examining the phrasal splits is much more intricate. We therefore give just one example from grammars with two subcategories, which illustrates the main difference between generative and discriminative grammars. Simple declarative clauses (S) are the most common sentences in the Penn Treebank, and in the generative case the most likely expansion of the ROOT category is ROOT→S1, being chosen 91% of the time. In the discriminative case this production is only the third likeliest with a weight of 13.2. The highest weighted expansion of the ROOT in the discriminative grammar is ROOT→SBARQ1, with a weight of 46.5, a production that has a probability of 0.3% in the generative grammar. While generative grammars model the empirical distributions of productions in the training set, discriminative grammars maximize the discriminative power of the model. This can for example result in putting the majority of the weight on underrepresented productions. We applied the merging criterion suggested in [2] to two grammars with two subcategories in order to quantitatively examine how many subcategories are learned. This criterion approximates the loss in joint likelihood incurred from merging two subcategories and we extended it to approximate the loss in conditional likelihood from merging two subcategories at a given node. Figure 3(a) shows the loss in F1-score when the least useful fraction of the subcategories are merged. Our observation that the discriminative grammars learn far fewer clusters are confirmed, as one can merge back 80% of the subcategories at almost no loss in F1 (while one can merge only 50% in the generative case). This suggest that one can learn discriminative grammars which are significantly more compact and accurate than their generative counterparts. Figure 3(b) shows which categories remain split when 80% of the splits are merged. While there is a substantial overlap between the learned splits, one can see that joint likelihood can be better maximized by refining the lexicon, while conditional likelihood is better maximized by refining the grammar. 7 5 Conclusions and Future Work We have presented a hierarchical pruning procedure that allows efficient discriminative training of log-linear grammars with latent variables. We avoid repeated computation of similar quantities by caching information between training iterations and approximating feature expectations. We presented a direct gradient-based procedure for optimizing the conditional likelihood function which in our experiments on full-scale treebank parsing lead to discriminative latent models which outperform both the comparable generative latent models, as well as the discriminative non-latent baselines. We furthemore investigated different regularization penalties and showed that L1 regularization leads to extremely sparse solutions While our results are encouraging, this is merely a first investigation into large-scale discriminative training of latent variable grammars and opens the door for many future experiments: discriminative grammars allow the seamless integration of non-local and overlapping features and it will be interesting to see how proven features from reranking systems [10, 11, 12] and other orthogonal improvements like merging and smoothing [2] will perform in an end-to-end discriminative system. References [1] T. Matsuzaki, Y. Miyao, and J. Tsujii. Probabilistic CFG with latent annotations. In ACL ’05, 2005. [2] S. Petrov, L. Barrett, R. Thibaux, and D. Klein. Learning accurate, compact, and interpretable tree annotation. In ACL ’06, 2006. [3] A. Y. Ng and M. I. Jordan. On discriminative vs. generative classifiers: A comparison of logistic regression and naive Bayes. In NIPS ’02, 2002. [4] J. Lafferty, A. McCallum, and F. Pereira. Conditional Random Fields: Probabilistic models for segmenting and labeling sequence data. In ICML ’01, 2001. [5] D. Klein and C. Manning. Conditional structure vs conditional estimation in NLP models. In EMNLP ’02, 2002. [6] B. Taskar, D. Klein, M. Collins, D. Koller, and C. Manning. Max-margin parsing. In EMNLP ’04, 2004. [7] J. Henderson. Discriminative training of a neural network statistical parser. In ACL ’04, 2004. [8] J. Turian, B. Wellington, and I. D. Melamed. Scalable discriminative learning for natural language parsing and translation. In NIPS ’07, 2007. [9] M. Johnson. Joint and conditional estimation of tagging and parsing models. In ACL ’01, 2001. [10] M. Collins. Discriminative reranking for natural language parsing. In ICML ’00, 2000. [11] T. Koo and M. Collins. Hidden-variable models for discriminative reranking. In EMNLP ’05, 2005. [12] E. Charniak and M. Johnson. Coarse-to-Fine N-Best Parsing and MaxEnt Discriminative Reranking. In ACL’05, 2005. [13] M. Collins. Head-Driven Statistical Models for Natural Language Parsing. PhD thesis, UPenn., 1999. [14] S. Petrov and D. Klein. Improved inference for unlexicalized parsing. In HLT-NAACL ’07, 2007. [15] K. Lari and S. Young. The estimation of stochastic context-free grammars using the inside-outside algorithm. Computer Speech and Language, 1990. [16] P. Liang, S. Petrov, M. I. Jordan, and D. Klein. The infinite PCFG using hierarchical Dirichlet processes. In EMNLP ’07, 2007. [17] F. Pereira and Y. Schabes. Inside-outside reestimation from partially bracketed corpora. In ACL, 1992. [18] N. A. Smith and M. Johnson. Weighted and probabilistic context-free grammars are equally expressive. To appear in Computational Lingusitics, 2007. [19] J. Nocedal and S. J. Wright. Numerical Optimization. Springer, 1999. [20] N. Ueda, R. Nakano, Z. Ghahramani, and G. E. Hinton. Split and merge EM algorithm for mixture models. Neural Computation, 12(9):2109–2128, 2000. [21] P. F. Brown, S. A. D. Pietra, V. J. D. Pietra, and R. L. Mercer. The mathematics of statistical machine translation. Computational Lingusitics, 19(2), 1993. [22] E. Charniak, M. Johnson, D. McClosky, et al. Multi-level coarse-to-fine PCFG Parsing. In HLT-NAACL ’06, 2006. [23] N. A. Smith and J. Eisner. Contrastive estimation: Training log-linear models on unlabeled data. In ACL ’05, 2005. [24] G. Andrew and J. Gao. Scalable training of L1-regularized log-linear models. In ICML ’07, 2007. 8
2007
127
3,156
HM-BiTAM: Bilingual Topic Exploration, Word Alignment, and Translation Bing Zhao IBM T. J. Watson Research zhaob@us.ibm.com Eric P. Xing Carnegie Mellon University epxing@cs.cmu.edu Abstract We present a novel paradigm for statistical machine translation (SMT), based on a joint modeling of word alignment and the topical aspects underlying bilingual document-pairs, via a hidden Markov Bilingual Topic AdMixture (HM-BiTAM). In this paradigm, parallel sentence-pairs from a parallel document-pair are coupled via a certain semantic-flow, to ensure coherence of topical context in the alignment of mapping words between languages, likelihood-based training of topic-dependent translational lexicons, as well as in the inference of topic representations in each language. The learned HM-BiTAM can not only display topic patterns like methods such as LDA [1], but now for bilingual corpora; it also offers a principled way of inferring optimal translation using document context. Our method integrates the conventional model of HMM — a key component for most of the state-of-the-art SMT systems, with the recently proposed BiTAM model [10]; we report an extensive empirical analysis (in many ways complementary to the description-oriented [10]) of our method in three aspects: bilingual topic representation, word alignment, and translation. 1 Introduction Most contemporary SMT systems view parallel data as independent sentence-pairs whether or not they are from the same document-pair. Consequently, translation models are learned only at sentence-pair level, and document contexts – essential factors for translating documents – are generally overlooked. Indeed, translating documents differs considerably from translating a group of unrelated sentences. A sentence, when taken out of the context from the document, is generally more ambiguous and less informative for translation. One should avoid destroying a coherent document by simply translating it into a group of sentences which are indifferent to each other and detached from the context. Developments in statistics, genetics, and machine learning have shown that latent semantic aspects of complex data can often be captured by a model known as the statistical admixture (or mixed membership model [4]). Statistically, an object is said to be derived from an admixture if it consists of a bag of elements, each sampled independently or coupled in a certain way, from a mixture model. In the context of SMT, each parallel document-pair is treated as one such object. Depending on the chosen modeling granularity, all sentence-pairs or word-pairs in a document-pair correspond to the basic elements constituting the object, and the mixture from which the elements are sampled can correspond to a collection of translation lexicons and monolingual word frequencies based on different topics (e.g., economics, politics, sports, etc.). Variants of admixture models have appeared in population genetics [6] and text modeling [1, 4]. Recently, a Bilingual Topic-AdMixture (BiTAM) model was proposed to capture the topical aspects of SMT [10]; word-pairs from a parallel document-pair follow the same weighted mixtures of translation lexicons, inferred for the given document-context. The BiTAMs generalize over IBM Model1; they are efficient to learn and scalable for large training data. However, they do not capture locality 1 constraints of word alignment, i.e., words “close-in-source” are usually aligned to words “close-intarget”, under document-specific topical assignment. To incorporate such constituents, we integrate the strengths of both HMM and BiTAM, and propose a Hidden Markov Bilingual Topic-AdMixture model, or HM-BiTAM, for word alignment to leverage both locality constraints and topical context underlying parallel document-pairs. In the HM-BiTAM framework, one can estimate topic-specific word-to-word translation lexicons (lexical mappings), as well as the monolingual topic-specific word-frequencies for both languages, based on parallel document-pairs. The resulting model offers a principled way of inferring optimal translation from a given source language in a context-dependent fashion. We report an extensive empirical analysis of HM-BiTAM, in comparison with related methods. We show our model’s effectiveness on the word-alignment task; we also demonstrate two application aspects which were untouched in [10]: the utility of HM-BiTAM for bilingual topic exploration, and its application for improving translation qualities. 2 Revisit HMM for SMT An SMT system can be formulated as a noisy-channel model [2]: e∗= arg max e P(e|f) = arg max e P(f|e)P(e), (1) where a translation corresponds to searching for the target sentence e∗which explains the source sentence f best. The key component is P(f|e), the translation model; P(e) is monolingual language model. In this paper, we generalize P(f|e) with topic-admixture models. An HMM implements the “proximity-bias” assumption — that words “close-in-source” are aligned to words “close-in-target”, which is effective for improving word alignment accuracies, especially for linguistically close language-pairs [8]. Following [8], to model word-to-word translation, we introduce the mapping j →aj, which assigns a French word fj in position j to an English word ei in position i = aj denoted as eaj. Each (ordered) French word fj is an observation, and it is generated by an HMM state defined as [eaj, aj], where the alignment indicator aj for position j is considered to have a dependency on the previous alignment aj−1. Thus a first-order HMM for an alignment between e ≡e1:I and f ≡f1:J is defined as: p(f1:J|e1:I) = X a1:J J Y j=1 p(fj|eaj)p(aj|aj−1), (2) where p(aj|aj−1) is the state transition probability; J and I are sentence lengths of the French and English sentences, respectively. The transition model enforces the proximity-bias. An additional pseudo word ”NULL” is used at the beginning of English sentences for HMM to start with. The HMM implemented in GIZA++ [5] is used as our baseline, which includes refinements such as special treatment of a jump to a NULL word. A graphical model representation for such an HMM is illustrated in Figure 1 (a). Ti,i′ fm,3 fm,2 fm,1 fJm,n M am,3 am,2 am,1 aJm,n em,i Im,n B = p(f|e) Nm α zm,n θm fm,3 fm,2 fm,1 Bk fJm,n Nm M am,3 am,2 am,1 em,i Im,n Ti,i′ βk K K aJm,n (a) HMM for Word Alignment (b) HM-BiTAM Figure 1: The graphical model representations of (a) HMM, and (b) HM-BiTAM, for parallel corpora. Circles represent random variables, hexagons denote parameters, and observed variables are shaded. 2 3 Hidden Markov Bilingual Topic-AdMixture We assume that in training corpora of bilingual documents, the document-pair boundaries are known, and indeed they serve as the key information for defining document-specific topic weights underlying aligned sentence-pairs or word-pairs. To simplify the outline, the topics here are sampled at sentence-pair level; topics sampled at word-pair level can be easily derived following the outlined algorithms, in the same spirit of [10]. Given a document-pair (F, E) containing N parallel sentence-pairs (en, fn), HM-BiTAM implements the following generative scheme. 3.1 Generative Scheme of HM-BiTAM Given a conjugate prior Dirichlet(α), the topic-weight vector (hereafter, TWV), θm for each document-pair (Fm, Em), is sampled independently. Let the non-underscripted θ denote the TWV of a typical document-pair (F, E), a collection of topic-specific translation lexicons be B ≡{Bk}, where Bi,j,k=P(f=fj|e=ei, z=k) is the conditional probability of translating e into f under a given topic indexed by z; the topic-specific monolingual model β ≡{βk}, which can be the usual LDA-style monolingual unigrams. The sentence-pairs {fn, en} are drawn independently from a mixture of topics. Specifically (as illustrated also in Fig. 1 (b)): 1. θ ∼Dirichlet(α) 2. For each sentence-pair (fn, en), (a) zn ∼Multinomial(θ) sample the topic (b) en,1:In|zn ∼P(en|zn; β) sample all English words from a monolingual topic model (e.g., an unigram model), (c) For each position jn = 1, . . . , Jn in fn, i. ajn ∼P(ajn|ajn−1;T ) sample an alignment link ajn from a first-order Markov process, ii. fjn ∼P(fjn|en, ajn, zn; B) sample a foreign word fjn according to a topic specific translation lexicon. Under an HM-BiTAM model, each sentence-pair consists of a mixture of latent bilingual topics; each topic is associated with a distribution over bilingual word-pairs. Each word f is generated by two hidden factors: a latent topic z drawn from a document-specific distribution over K topics, and the English word e identified by the hidden alignment variable a. 3.2 Extracting Bilingual Topics from HM-BiTAM Because of the parallel nature of the data, the topics of English and the foreign language will share similar semantic meanings. This assumption is captured in our model. Shown in Figure 1(b), both the English and foreign topics are sampled from the same distribution θ, which is a documentspecific topic-weight vector. Although there is an inherent asymmetry in the bilingual topic representation in HM-BiTAM (that the monolingual topic representations β are only defined for English, and the foreign topic representations are implicit via the topical translation models), it is not difficult to retrieve the monolingual topic representations of the foreign language via a marginalization over hidden word alignment. For example, the frequency (i.e., unigram) of foreign word fw under topic k can be computed by P(fw|k) = X e P(fw|e, Bk)P(e|βk). (3) As a result, HM-BiTAM can actually be used as a bilingual topic explorer in the LDA-style and beyond. Given paired documents, it can extract the representations of each topic in both languages in a consistent fashion (which is not guaranteed if topics are extracted separately from each language using, e.g., LDA), as well as the lexical mappings under each topics, based on a maximal likelihood or Bayesian principle. In Section 5.2, we demonstrate outcomes of this application. We expect that, under the HM-BiTAM model, because bilingual statistics from word alignment a are shared effectively across different topics, a word will have much less translation candidates due to constraints by the hidden topics; therefore the topic specific translation lexicons are much smaller and sharper, which give rise to a more parsimonious and unambiguous translation model. 3 4 Learning and Inference We sketch a generalized mean-field approximation scheme for inferring latent variables in HMBiTAM, and a variational EM algorithm for estimating model parameters. 4.1 Variational Inference Under HM-BiTAM, the complete likelihood of a document-pair (F, E) can be expressed as follows: p(F, E, θ,⃗z,⃗a|α, β, T, B)=p(θ|α)P(⃗z|θ)P(⃗a|T )P(F|⃗a,⃗z, E, B)P(E|⃗z, β), (4) where P(⃗a|T )= QN n=1 QJn j=1 P(ajn|ajn−1; T ) represents the probability of a sequence of alignment jumps; P(F|⃗a,⃗z, E, B)= QN n=1 QJn j=1 P(fjn|ajn, en, zn, B) is the document-level translation probability; and P(E|⃗z, β) is the topic-conditional likelihood of the English document based on a topic-dependent unigram as used in LDA. Apparently, exact inference under this model is infeasible as noted in earlier models related to, but simpler than, this one [10]. To approximate the posterior p(⃗a, θ,⃗z|F, E), we employ a generalized mean field approach and adopt the following factored approximation to the true posterior: q(θ,⃗z,⃗a) = q(θ|⃗γ)q(⃗z|⃗φ)q(⃗a|⃗λ), where q(θ|⃗γ), q(⃗z|⃗φ), and q(⃗a|⃗λ) are re-parameterized Dirichlet, multinomial, and HMM, respectively, determined by some variational parameters that correspond to the expected sufficient statistics of the dependent variables of each factor [9]. As well known in the variational inference literature, solutions to the above variational parameters can be obtained by minimizing the Kullback-Leibler divergence between q(θ,⃗z,⃗a) and p(θ,⃗z,⃗a|F, E), or equivalently, by optimizing the lower-bound of the expected (over q()) loglikelihood defined by Eq.(4), via a fixed-point iteration. Due to space limit, we forego a detailed derivation, and directly give the fixed-point equations below: ˆγk = αk + N X n=1 φn,k, (5) ˆφn,k ∝exp “ Ψ(γk) −Ψ( K X k=1 γk) ” · exp “ In X i=1 Jn X j=1 λn,j,i log βk,ein ” × exp “Jn,In X j,i=1 X f∈VF X e∈VE 1(fjn, f)1(ein, e)λn,j,ilog Bf,e,k ” , (6) ˆλn,j,i ∝exp “ In X i′=1 λn,j−1,i′ log Ti,i′ ” × exp “ In X i”=1 λn,j+1,i” log Ti”,i ” × exp “X f∈VF X e∈VE 1(fjn,f)1(ein,e) K X k=1 φn,k log Bf,e,k ” × exp “ K X k=1 φn,k log βk,ein ” , (7) where 1(·, ·) denotes an indicator function, and Ψ(·) represents the digamma function. The vector ˆφn ≡(ˆφn,1, . . . , ˆφn,K) given by Eq. (6) represents the approximate posterior of the topic weights for each sentence-pair (fn, en). The topical information for updating ˆφn is collected from three aspects: aligned word-pairs weighted by the corresponding topic-specific translation lexicon probabilities, topical distributions of monolingual English language model, and the smoothing factors from the topic prior. Equation (7) gives the approximate posterior probability for alignment between the j-th word in fn and the i-th word in en, in the form of an exponential model. Intuitively, the first two terms represent the messages corresponding to the forward and the backward passes in HMM; The third term represents the emission probabilities, and it can be viewed as a geometric interpolation of the strengths of individual topic-specific lexicons; and the last term provides further smoothing from monolingual topic-specific aspects. Inference of optimum word-alignment One of the translation model’s goals is to infer the optimum word alignment: a∗= arg maxa P(a|F, E). The variational inference scheme described above leads to an approximate alignment posterior q(⃗a|⃗λ), which is in fact a reparameterized HMM. Thus, extracting the optimum alignment amounts to applying an Viterbi algorithm on q(⃗a|⃗λ). 4 4.2 Variational EM for parameter estimation To estimate the HM-BiTAM parameters, which include the Dirichlet hyperparameter α, the transition matrix T , the topic-specific monolingual English unigram {⃗βk}, and the topic-specific translation lexicon {Bk}, we employ an variational EM algorithm which iterates between computing variational distribution of the hidden variables (the E-step) as described in the previous subsection, and optimizing the parameters with respect to the variational likelihood (the M-step). Here are the update equations for the M-step: ˆTi”,i′ ∝ N X n=1 Jn X j=1 λn,j,i”λn,j−1,i′, (8) Bf,e,k ∝ N X n=1 Jn X j=1 In X i=1 K X k=1 1(fjn, f)1(ein, e)λn,j,iφn,k, (9) βk,e ∝ N X n=1 In X i=1 Jn X j=1 1ei,eλnjiφn,k. (10) For updating Dirichlet hyperparameter α, which is a corpora-level parameter, we resort to gradient accent as in [7]. The overall computation complexity of the model is linear to the number of topics. 5 Experiments In this section, we investigate three main aspects of the HM-BiTAM model, including word alignment, bilingual topic exploration, and machine translation. Train #Doc. #Sent. #Tokens English Chinese TreeBank 316 4172 133,598 105,331 Sinorama04 6367 282176 10,321,061 10,027,095 Sinorama02 2373 103252 3,810,664 3,146,014 Chnews.2005 1001 10317 326,347 270,274 FBIS.BEIJING 6111 99396 4,199,030 3,527,786 XinHua.NewsStory 17260 98444 3,807,884 3,915,267 ALL 33,428 597,757 22,598,584 20,991,767 Table 1: Training data statistics. The training data is a collection of parallel document-pairs, with document boundaries explicitly given. As shown in Table 1, our training corpora are general newswire, covering topics mainly about economics, politics, educations and sports. For word-alignment evaluation, our test set consists of 95 document-pairs, with 627 manually-aligned sentence-pairs and 14,769 alignment-links in total, from TIDES’01 dryrun data. Word segmentations and tokenizations were fixed manually for optimal word-alignment decisions. This test set contains relatively long sentence-pairs, with an average sentence length of 40.67 words. The long sentences introduce more ambiguities for alignment tasks. For testing translation quality, TIDES’02 MT evaluation data is used as development data, and ten documents from TIDES’04 MT-evaluation are used as the unseen test data. BLEU scores are reported to evaluate translation quality with HM-BiTAM models. 5.1 Empirical Validation Word Alignment Accuracy We trained HM-BiATMs with ten topics using parallel corpora of sizes ranging from 6M to 22.6M words; we used the F-measure, the harmonic mean of precision and recall, to evaluate word-alignment accuracy. Following the same logics for all BiTAMs in [10], we choose HM-BiTAM in which topics are sampled at word-pair level over sentence-pair level. The baseline IBM models were trained using a 18h543 scheme 2. Refined alignments are obtained from both directions of baseline models in the same way as described in [5]. Figure 2 shows the alignment accuracies of HM-BiTAM, in comparison with that of the baselineHMM, the baseline BiTAM, and the IBM Model-4. Overall, HM-BiTAM gives significantly better F-measures over HMM, with absolute margins of 7.56%, 5.72% and 6.91% on training sizes of 2Eight iterations for IBM Model-1, five iterations for HMM, and three iterations for IBM Model-4 (with deficient EM: normalization factor is computed using sampled alignment neighborhood in E-step) 5 50 52 54 56 58 60 62 64 66 6M 11M 22.6M HMM BiTAM IBM-4 HM-BiTAM Figure 2: Alignment accuracy (F-measure) of different models trained on corpora of different sizes. 500 1000 1500 2000 2500 3000 3500 4000 4500 5000 1000 2000 3000 4000 5000 Negative log−likehood: HM−BiTAM (y−axis) vs IBM Model−4 (x−axis) & HMM (x−axis) IBM Model−4 (with deficient EM) HM−BiTAM: −log(likelihood) per doc 500 1000 1500 2000 2500 3000 3500 4000 4500 5000 1000 2000 3000 4000 5000 HM−BiTAM: −log(likelihood) per doc HMM (with forward−backward EM) Figure 3: Comparison of likelihoods of data under different models. Top: HM-BiTAM v.s. IBM Model4; bottom: HM-BiTAM v.s. HMM. 6 M, 11 M and 22.6M words, respectively. In HM-BiTAM, two factors contribute to narrowing down the word-alignment decisions: the position and the lexical mapping. The position part is the same as the baseline-HMM, implementing the “proximity-bias”. Whereas the emission lexical probability is different, each state is a mixture of topic-specific translation lexicons, of which the weights are inferred using document contexts. The topic-specific translation lexicons are sharper and smaller than the global one used in HMM. Thus the improvements of HM-BiTAM over HMM essentially resulted from the extended topic-admixture lexicons. Not surprisingly, HM-BiTAM also outperforms the baseline-BiTAM significantly, because BiTAM captures only the topical aspects and ignores the proximity bias. Notably, HM-BiTAM also outperforms IBM Model-4 by a margin of 3.43%, 3.64% and 2.73%,respectively. Overall, with 22.6M words, HM-BiTAM outperforms HMM, BiTAM, IBM-4 significantly, p=0.0031, 0.0079, 0.0121, respectively. IBM Model-4 already integrates the fertility and distortion submodels on top of HMM, which further narrows the word-alignment choices. However, IBM Model-4 does not have a scheme to adjust its lexicon probabilities specific to document topicalcontext as in HM-BiTAM. In a way, HM-BiTAM wins over IBM-4 by leveraging topic models that capture the document context. Likelihood on Training and Unseen Documents Figure 3 shows comparisons of the likelihoods of document-pairs in the training set under HM-BiTAM with those under IBM Model-4 or HMM. Each point in the figure represents one document-pair; the y-coordinate corresponds to the negative log-likelihood under HM-BiTAM, and the x-coordinate gives the counterparts under IBM Model-4 or HMM. Overall the likelihoods under HM-BiTAM are significantly better than those under HMM and IBM Model-4, revealing the better modeling power of HM-BiTAM. We also applied HM-BiTAM to ten document-pairs selected from MT04, which were not included in the training. These document-pairs contain long sentences and diverse topics. As shown in Table 2, the likelihoods of HM-BiTAM on these unseen data dominates significantly over that of HMM, BiTAM, and IBM Models in every case, confirming that HM-BiTAM indeed offers a better fit and generalizability for the bilingual document-pairs. Publishers Genre IBM-1 HMM IBM-4 BiTAM HM-BiTAM AgenceFrance(AFP) news -3752.94 -3388.72 -3448.28 -3602.28 -3188.90 AgenceFrance(AFP) news -3341.69 -2899.93 -3005.80 -3139.95 -2595.72 AgenceFrance(AFP) news -2527.32 -2124.75 -2161.31 -2323.11 -2063.69 ForeignMinistryPRC speech -2313.28 -1913.29 -1963.24 -2144.12 -1669.22 HongKongNews speech -2198.13 -1822.25 -1890.81 -2035 -1423.84 People’s Daily editorial -2485.08 -2094.90 -2184.23 -2377.1 -1867.13 United Nation speech -2134.34 -1755.11 -1821.29 -1949.39 -1431.16 XinHua News news -2425.09 -2030.57 -2114.39 -2192.9 -1991.31 XinHua News news -2684.85 -2326.39 -2352.62 -2527.78 -2317.47 ZaoBao News editorial -2376.12 -2047.55 -2116.42 -2235.79 -1943.25 Avg. Perplexity 123.83 60.54 68.41 107.57 43.71 Table 2: Likelihoods of unseen documents under HM-BiTAMs, in comparison with competing models. 5.2 Application 1: Bilingual Topic Extraction Monolingual topics: HM-BiTAM facilitates inference of the latent LDA-style representations of topics [1] in both English and the foreign language (i.e., Chinese) from a given bilingual corpora. The English topics (represented by the topic-specific word frequencies) can be directly read-off from HM-BiTAM parameters β. As discussed in § 3.2, even though the topic-specific distributions 6 of words in the Chinese corpora are not directly encoded in HM-BiTAM, one can marginalize over alignments of the parallel data to synthesize them based on the monolingual English topics and the topic-specific lexical mapping from English to Chinese. Figure 4 shows five topics, in both English and Chinese, learned via HM-BiTAM. The top-ranked frequent words in each topic exhibit coherent semantic meanings; and there are also consistencies between the word semantics under the same topic indexes across languages. Under HM-BiTAM, the two respective monolingual word-distributions for the same topic are statistically coupled due to sharing of the same topic for each sentence-pair in the two languages. Whereas if one merely apply LDA to the corpora in each language separately, such coupling can not be exploited. This coupling enforces consistency between the topics across languages. However, like general clustering algorithms, topics in HM-BiTAM, are not necessarily to present obvious semantic labels. Ҏ(people) ⅟⮒(handicapped) ԧ㚆(sports) џϮ(career) ∈(water) Ϫ⬠(world) ऎ(region) ᮄढ⼒(Xinhua) 䯳ਬ(team member) 䆄㗙(reporter) ⏅ഇ(shenzhen) ⏅(shen zhen) ᮄ(Singarpore) ܗ(Yuan) 㙵(stock) 佭␃(Hongkong) ೑᳝(state-owned) ໪䌘(foreign investiment) ᮄढ⼒(Xinhua) 㵡䌘(refinancing) ೑ᆊ(countries) 䞡ᑚ(ChongQing) ॖ(Factory) ໽⋹(TianJin) ᬓᑰ(Government) 乍Ⳃ(project) ೑᳝(national) ⏅ഇ(Shenzhen) ݐᑊ(take over) ᬊ䌁(buy) ݀ৌ(company) ໽✊⇨(gas) ϸ(two) ೑(countries) 㕢೑(U.S.) 䆄㗙(reporters) ݇㋏(relations) ֘(Russian) ⊩(France) 䞡ᑚ(ChongQing) “housing” ԣ᠓(house) ᠓(house) б∳ (JiuJiang) ᓎ䆒(construction) ▇䮼(macao) ܗ(Yuan) 㘠Ꮉ(workers) Ⳃࠡ(current) ೑ᆊ(national) ⳕ(province) “energy” “takeover” “stocks” “sports” Figure 4: Monolingual topics of both languages learned from parallel data. It appears that the English topics (on the left panel) are highly parallel to the Chinese ones (annotated with English gloss, on the right panel). Topic-Specific Lexicon Mapping: Table 3 shows two examples of topic-specific lexicon mapping learned by HM-BiTAM. Given a topic assignment, a word usually has much less translation candidates, and the topic-specific translation lexicons are generally much smaller and sharper. Different topic-specific lexicons emphasize different aspects of translating the same source words, which can not be captured by the IBM models or HMM. This effect can be observed from Table 3. Topics “meet” “power” TopCand Meaning Probability TopCand Meaning Probability Topic-1 $Ĭ sports meeting 0.508544 >å electric power 0.565666 Topic-2 ÷v to satisfy 0.160218 >‚ electricity factory 0.656 Topic-3 ·A to adapt 0.921168 9 to be relevant 0.985341 Topic-4 N to adjust 0.996929 åþ strength 0.410503 Topic-5 ¬„ to see someone 0.693673 åþ strength 0.997586 Topic-6 Topic-7 ÷v to satisfy 0.467555  Electric watt 0.613711 Topic-8 $Ĭ sports meeting 0.487728 ¢å power 1.0 Topic-9 Ñ to generate 0.50457 Topic-10 ¬„ to see someone 0.551466 åþ strength 1.0 IBM Model-1 $Ĭ sports meeting 0.590271 >‚ power plant 0.314349 HMM $Ĭ sports meeting 0.72204 åþ strength 0.51491 IBM Model-4 $Ĭ sports meeting 0.608391 åþ strength 0.506258 Table 3: Topic-specific translation lexicons learned by HM-BiTAM. We show the top candidate (TopCand) lexicon mappings of “meet” and “power” under ten topics. (The symbol “-” means inexistence of significant lexicon mapping under that topic.) Also shown are the semantic meanings of the mapped Chinese words, and the mapping probability p(f|e, k). 5.3 Application 2: Machine Translation The parallelism of topic-assignment between languages modeled by HM-BiTAM, as shown in § 3.2 and exemplified in Fig. 4, enables a natural way of improving translation by exploiting semantic consistency and contextual coherency more explicitly and aggressively. Under HM-BiTAM, given a source document DF , the predictive probability distribution of candidate translations of every source word, P(e|f, DF ), must be computed by mixing multiple topic-specific translation lexicons according to the topic weights p(z|DF ) determined from monolingual context in DF . That is: P(e|f, DF ) ∝P(f|e, DF )P(e|DF )= K X k=1 P(f|e, z = k)P(e|z = k)P(z = k|DF ). (11) We used p(e|f, DF) to score the bilingual phrase-pairs in a state-of-the-art GALE translation system trained with 250 M words. We kept all other parameters the same as those used in the baseline. Then decoding of the unseen ten MT04 documents in Table 2 was carried out. 7 Systems 1-gram 2-gram 3-gram 4-gram BLEUr4n4 Hiero Sys. 73.92 40.57 23.21 13.84 30.70 Gale Sys. 75.63 42.71 25.00 14.30 32.78 HM-BiTAM 76.77 42.99 25.42 14.56 33.19 Ground Truth 76.10 43.85 26.70 15.73 34.17 Table 4: Decoding MT04 10-documents. Experiments using the topic assignments inferred from ground truth and the ones inferred via HM-BITAM; ngram precisions together with final BLEUr4n4 scores are evaluated. Table 4 shows the performance of our in-house Hiero system (following [3]), the state-of-the-art Gale-baseline (with a better BLEU score), and our HM-BiTAM model, on the NIST MT04 test set. If we know the ground truth of translation to infer the topic-weights, improvement is from 32.78 to 34.17 BLEU points. With topical inference from HM-BiTAM using monolingual source document, improved N-gram precisions in the translation were observed from 1-gram to 4-gram. The largest improved precision is for unigram: from 75.63% to 76.77%. Intuitively, unigrams have potentially more ambiguities for translations than the higher order ngrams, because the later ones encode already contextual information. The overall BLEU score improvement of HM-BiTAM over other systems, including the state-of-the-art, is from 32.78 to 33.19, an slight improvement with p = 0.043. 6 Discussion and Conclusion We presented a novel framework, HM-BiTAM, for exploring bilingual topics, and generalizing over traditional HMM for improved word-alignment accuracies and translation quality. A variational inference and learning procedure was developed for efficient training and application in translation. We demonstrated significant improvement of word-alignment accuracy over a number of existing systems, and the interesting capability of HM-BiTAM to simultaneously extract coherent monolingual topics from both languages. We also report encouraging improvement of translation quality over current benchmarks; although the margin is modest, it is noteworthy that the current version of HM-BiTAM remains a purely autonomously trained system. Future work also includes extensions with more structures for word-alignment such as noun phrase chunking. References [1] David Blei, Andrew NG, and Michael I. Jordon. Latent dirichlet allocation. In Journal of Machine Learning Research, volume 3, pages 1107–1135, 2003. [2] Peter F. Brown, Stephen A. Della Pietra, Vincent. J. Della Pietra, and Robert L. Mercer. The mathematics of statistical machine translation: Parameter estimation. In Computational Linguistics, volume 19(2), pages 263–331, 1993. [3] David Chiang. A hierarchical phrase-based model for statistical machine translation. In Proceedings of the 43rd Annual Meeting of the Association for Computational Linguistics (ACL’05), pages 263–270, Ann Arbor, Michigan, June 2005. Association for Computational Linguistics. [4] Elena Erosheva, Steve Fienberg, and John Lafferty. Mixed membership models of scientific publications. In Proceedings of the National Academy of Sciences, volume 101 of Suppl. 1, April 6 2004. [5] Franz J. Och and Hermann Ney. The alignment template approach to statistical machine translation. In Computational Linguistics, volume 30, pages 417–449, 2004. [6] J. Pritchard, M. Stephens, and P. Donnell. Inference of population structure using multilocus genotype data. In Genetics, volume 155, pages 945–959, 2000. [7] K. Sj¨olander, K. Karplus, M. Brown, R. Hughey, A. Krogh, I.S. Mian, and D. Haussler. Dirichlet mixtures: A method for improving detection of weak but significant protein sequence homology. Computer Applications in the Biosciences, 12, 1996. [8] Stephan. Vogel, Hermann Ney, and Christoph Tillmann. HMM based word alignment in statistical machine translation. In Proc. The 16th Int. Conf. on Computational Lingustics, (Coling’96), pages 836–841, Copenhagen, Denmark, 1996. [9] Eric P. Xing, M.I. Jordan, and S. Russell. A generalized mean field algorithm for variational inference in exponential families. In Meek and Kjaelff, editors, Uncertainty in Artificial Intelligence (UAI2003), pages 583–591. Morgan Kaufmann Publishers, 2003. [10] Bing Zhao and Eric P. Xing. Bitam: Bilingual topic admixture models for word alignment. In Proceedings of the 44th Annual Meeting of the Association for Computational Linguistics (ACL’06), 2006. 8
2007
128
3,157
Optimistic Linear Programming gives Logarithmic Regret for Irreducible MDPs Ambuj Tewari Computer Science Division Univeristy of California, Berkeley Berkeley, CA 94720, USA ambuj@cs.berkeley.edu Peter L. Bartlett Computer Science Division and Department of Statistics University of California, Berkeley Berkeley, CA 94720, USA bartlett@cs.berkeley.edu Abstract We present an algorithm called Optimistic Linear Programming (OLP) for learning to optimize average reward in an irreducible but otherwise unknown Markov decision process (MDP). OLP uses its experience so far to estimate the MDP. It chooses actions by optimistically maximizing estimated future rewards over a set of next-state transition probabilities that are close to the estimates, a computation that corresponds to solving linear programs. We show that the total expected reward obtained by OLP up to time T is within C(P) log T of the reward obtained by the optimal policy, where C(P) is an explicit, MDP-dependent constant. OLP is closely related to an algorithm proposed by Burnetas and Katehakis with four key differences: OLP is simpler, it does not require knowledge of the supports of transition probabilities, the proof of the regret bound is simpler, but our regret bound is a constant factor larger than the regret of their algorithm. OLP is also similar in flavor to an algorithm recently proposed by Auer and Ortner. But OLP is simpler and its regret bound has a better dependence on the size of the MDP. 1 Introduction Decision making under uncertainty is one of the principal concerns of Artificial Intelligence and Machine Learning. Assuming that the decision maker or agent is able to perfectly observe its own state, uncertain systems are often modeled as Markov decision processes (MDPs). Given complete knowledge of the parameters of an MDP, there are standard algorithms to compute optimal policies, i.e., rules of behavior such that some performance criterion is maximized. A frequent criticism of these algorithms is that they assume an explicit description of the MDP which is seldom available. The parameters constituting the description are themselves estimated by simulation or experiment and are thus not known with complete reliability. Taking this into account brings us to the well known exploration vs. exploitation trade-off. On one hand, we would like to explore the system as well as we can to obtain reliable knowledge about the system parameters. On the other hand, if we keep exploring and never exploit the knowledge accumulated, we will not behave optimally. Given a policy π, how do we measure its ability to handle this trade-off? Suppose the agent gets a numerical reward at each time step and we measure performance by the accumulated reward over time. Then, a meaningful quantity to evaluate the policy π is its regret over time. To understand what regret means, consider an omniscient agent who knows all parameters of the MDP accurately and behaves optimally. Let VT be the expected reward obtained by this agent up to time T. Let V π T denote the corresponding quantity for π. Then the regret Rπ T = VT −V π T measures how much π is hurt due to its incomplete knowledge of the MDP up to time T. If we can show that the regret Rπ T grows slowly with time T, for all MDPs in a sufficiently big class, then we can safely conclude that π is making a judicious trade-off between exploration and exploitation. It is rather remarkable that 1 for this notion of regret, logarithmic bounds have been proved in the literature [1,2]. This means that there are policies π with Rπ T = O(log T). Thus the per-step regret Rπ T /T goes to zero very quickly. Burnetas and Katehakis [1] proved that for any policy π (satisfying certain reasonable assumptions) Rπ T ≥CB(P) log T where they identified the constant CB(P). This constant depends on the transition function P of the MDP1. They also gave an algorithm (we call it BKA) that achieves this rate and is therefore optimal in a very strong sense. However, besides assuming that the MDP is irreducible (see Assumption 1 below) they assumed that the support sets of the transition distributions pi(a) are known for all state-action pairs. In this paper, we not only get rid of this assumption but our optimistic linear programming (OLP) algorithm is also computationally simpler. At each step, OLP considers certain parameters in the vicinity of the estimates. Like BKA, OLP makes optimistic choices among these. But now, making these choices only involves solving linear programs (LPs) to maximize linear functions over L1 balls. BKA instead required solving non-linear (though convex) programs due to the use of KL-divergence. Another benefit of using the L1 distance is that it greatly simplifies a significant part of the proof. The price we pay for these advantages is that the regret of OLP is C(P) log T asymptotically, for a constant C(P) ≥CB(P). We should note here that a number of algorithms in the literature have been inspired by the “optimism in the face of uncertainty” principle [3]–[7]. The algorithm of Auer and Ortner (we refer to it as AOA) is another logarithmic regret algorithm for irreducible2 MDPs. AOA does not solve an optimization problem at every time step but only when a confidence interval is halved. But then the optimization problem they solve is more complicated because they find a policy to use in the next few time steps by optimizing over a set of MDPs. The regret of AOA is CA(P) log T where CA(P) = c|S|5|A|Tw(P)κ(P)2 ∆∗(P)2 , (1) for some universal constant c. Here |S|, |A| denote the state and action space size, Tw(P) is the worst case hitting time over deterministic policies (see Eqn. (12)) and ∆∗(P) is the difference between the long term average return of the best policy and that of the next best policy. The constant κ(P) is also defined in terms of hitting times. Under Auer and Ortner’s assumption of bounded rewards, we can show that the constant for OLP satisfies C(P) ≤2|S||A|T(P)2 Φ∗(P) . (2) Here T(P) is the hitting time of an optimal policy is therefore necessarily smaller than Tw(P). We get rid of the dependence on κ(P) while replacing Tw(P) with T(P)2. Most importantly, we significantly improve the dependence on the state space size. The constant Φ∗(P) can roughly be thought of as the minimum (over states) difference between the quality of the best and the second best action (see Eqn. (9)). The constants ∆∗(P) and Φ∗(P) are similar though not directly comparable. Nevertheless, note that C(P) depends inversely on Φ∗(P) not Φ∗(P)2. 2 Preliminaries Consider an MDP (S, A, R, P) where S is the set of states, A = ∪i∈SA(i) is the set of actions (A(i) being the actions available in state i), R = {r(i, a)}i∈S,a∈A(i) are the rewards and P = {pi,j(a)}i,j∈S,a∈A(i) are the transition probabilities. For simplicity of analysis, we assume that the rewards are known to us beforehand. We do not assume that we know the support sets of the distributions pi(a). The history σt up to time t is a sequence i0, k0, . . . , it−1, kt−1, it such that ks ∈A(is) for all s < t. A policy π is a sequence {πt} of probability distributions on A given σt such that πt(A(st)|σt) = 1 where st denotes the random variable representing the state at time t. The set of all policies is denoted by Π. A deterministic policy is simply a function µ : S →A such that µ(i) ∈A(i). Denote the set of deterministic policies by ΠD. If D is a subset of A, let Π(D) denote the set of 1Notation for MDP parameters is defined in Section 2 below. 2Auer & Ortner prove claims for unichain MDPs but their usage seems non-standard. The MDPs they call unichain are called irreducible in standard textbooks (for example, see [9, p. 348]) 2 policies that take actions in D. Probability and expectation under a policy π, transition function P and starting state i0 will be denoted by Pπ,P i0 and Eπ,P i0 respectively. Given history σt, let Nt(i), Nt(i, a) and Nt(i, a, j) denote the number of occurrences of the state i, the pair (i, a) and the triplet (i, a, j) respectively in σt. We make the following irreducibility assumption regarding the MDP. Assumption 1. For all µ ∈ΠD, the transition matrix P µ = (pi,j(µ(i)))i,j∈S is irreducible (i.e. it is possible to reach any state from any other state). Consider the rewards accumulated by the policy π before time T, V π T (i0, P) := Eπ,P i0 [ T −1 X t=0 r(st, at)] , where at is the random variable representing the action taken by π at time t. Let VT (i0, P) be the maximum possible sum of expected rewards before time T, VT (i0, P) := sup π∈Π V π T (i0, P) . The regret of a policy π at time T is a measure of how well the expected rewards of π compare with the above quantity, Rπ T (i0, P) := VT (i0, P) −V π T (i0, P) . Define the long term average reward of a policy π as λπ(i0, P) := lim inf T →∞ V π T (i0, P) T . Under assumption 1, the above limit exists and is independent of the starting state i0. Given a restricted set D ⊆A of actions, the gain or the best long term average performance is λ(P, D) := sup π∈Π(D) λπ(i0, P) . As a shorthand, define λ∗(P) := λ(P, A). 2.1 Optimality Equations A restricted problem (P, D) is obtained from the original MDP by choosing subsets D(i) ⊆A(i) and setting D = ∪i∈SD(i). The transition and reward functions of the restricted problems are simply the restrictions of P and r to D. Assumption 1 implies that there is a bias vector h(P, D) = {h(i; P, D)}i∈S such that the gain λ(P, D) and bias h(P, D) are the unique solutions to the average reward optimality equations: ∀i ∈S, λ(P, D) + h(i; P, D) = max a∈D(i)[r(i, a) + ⟨pi(a), h(P, D)⟩] . (3) We will use h∗(P) to denote h(P, A). Also, denote the infinity norm ∥h∗(P)∥∞by H∗(P). Note that if h∗(P) is a solution to the optimality equations and e is the vector of ones, then h∗(P) + ce is also a solution for any scalar c. We can therefore assume ∃i∗∈S, h∗(i∗; P) = 0 without any loss of generality. It will be convenient to have a way to denote the quantity inside the ‘max’ that appears in the optimality equations. Accordingly, define L(i, a, p, h) := r(i, a) + ⟨p, h⟩, L∗(i; P, D) := max a∈D(i) L(i, a, pi(a), h(P, D)) . To measure the degree of suboptimality of actions available at a state, define φ∗(i, a; P) = L∗(i; P, A) −L(i, a, pi(a), h∗(P)) . Note that the optimal actions are precisely those for which the above quantity is zero. O(i; P, D) := {a ∈D(i) : φ∗(i, a; P) = 0} , O(P, D) := Πi∈SO(i; P, D) . Any policy in O(P, D) is an optimal policy, i.e., ∀µ ∈O(P, D), λµ(P) = λ(P, D) . 3 2.2 Critical pairs From now on, ∆+ will denote the probability simplex of dimension determined by context. For a suboptimal action a /∈O(i; P, A), the following set contains probability distributions q such that if pi(a) is changed to q, the quality of action a comes within ϵ of an optimal action. Thus, q makes a look almost optimal: MakeOpt(i, a; P, ϵ) := {q ∈∆+ : L(i, a, q, h∗(P)) ≥L∗(i; P, A) −ϵ} . (4) Those suboptimal state-action pairs for which MakeOpt is never empty, no matter how small ϵ is, play a crucial role in determining the regret. We call these critical state-action pairs, Crit(P) := {(i, a) : a /∈O(i; P, A) ∧(∀ϵ > 0, MakeOpt(i, a; P, ϵ) ̸= ∅)} . (5) Define the function, Ji,a(p; P, ϵ) := inf{∥p −q∥2 1 : q ∈MakeOpt(i, a; P, ϵ)} . (6) To make sense of this definition, consider p = pi(a). The above infimum is then the least distance (in the L1 sense) one has to move away from pi(a) to make the suboptimal action a look ϵ-optimal. Taking the limit of this as ϵ decreases gives us a quantity that also plays a crucial role in determining the regret, K(i, a; P) := lim ϵ→0 Ji,a(pi(a); P, ϵ) . (7) Intuitively, if K(i, a; P) is small, it is easy to confuse a suboptimal action with an optimal one and so it should be difficult to achieve small regret. The constant that multiplies log T in the regret bound of our algorithm OLP (see Algorithm 1 and Theorem 4 below) is the following: C(P) := X (i,a)∈Crit(P ) 2φ∗(i, a; P) K(i, a; P) . (8) This definition might look a bit hard to interpret, so we give an upper bound on C(P) just in terms of the infinity norm H∗(P) of the bias and Φ∗(P). This latter quantity is defined below to be the minimum degree of suboptimality of a critical action. Proposition 2. Suppose A(i) = A for all i ∈S. Define Φ∗(P) := min (i,a)∈Crit(P ) φ∗(i, a; P) . (9) Then, for any P, C(P) ≤2|S||A|H∗(P)2 Φ∗(P) . See the appendix for a proof. 2.3 Hitting times It turns out that we can bound the infinity norm of the bias in terms of the hitting time of an optimal policy. For any policy µ define its hitting time to be the worst case expected time to reach one state from another: Tµ(P) := max i̸=j Eµ,P j [min{t > 0 : st = i}] . (10) The following constant is the minimum hitting time among optimal policies: T(P) := min µ∈O(P,D) Tµ(P) . (11) The following constant is defined just for comparison with results in [2]. It is the worst case hitting time over all policies: Tw(P) := max µ∈ΠD Tµ(P) . (12) We can now bound C(P) just in terms of the hitting time T(P) and φ∗(P). Proposition 3. Suppose A(i) = A for all i ∈S and that r(i, a) ∈[0, 1] for all i ∈S, a ∈A. Then for any P, C(P) ≤2|S||A|T(P)2 Φ∗(P) . See the appendix for a proof. 4 3 The optimistic LP algorithm and its regret bound Algorithm 1 Optimistic Linear Programming 1: for t = 0, 1, 2, . . . do 2: st ←current state 3: 4: ▷Compute solution for “empirical MDP” excluding “undersampled” actions 5: ∀i, j ∈S, a ∈A(i), ˆpt i,j(a) ← 1+Nt(i,a,j) |A(i)|+Nt(i,a) 6: ∀i ∈S, Dt(i) ←{a ∈A(i) : Nt(i, a) ≥log2 Nt(i)} 7: ˆht, ˆλt ←solution of the optimality equations (3) with P = ˆP t, D = Dt 8: 9: ▷Compute indices of all actions for the current state 10: ∀a ∈A(st), Ut(st, a) ←supq∈∆+{r(st, a) + ⟨q, ˆht⟩: ∥ˆpt st(a) −q∥1 ≤ q 2 log t Nt(st,a)} 11: 12: ▷Optimal actions (for the current problem) that are about to become “undersampled” 13: Γ1 t ←{a ∈O(st; ˆP t, Dt) : Nt(st, a) < log2(Nt(st) + 1)} 14: 15: ▷The index maximizing actions 16: Γ2 t ←arg maxa∈A(st) Ut(st, a) 17: 18: if Γ1 t = O(st; ˆP t, Dt) then 19: at ←any action in Γ1 t 20: else 21: at ←any action in Γ2 t 22: end if 23: end for Algorithm 1 is the Optimistic Linear Programming algorithm. It is inspired by the algorithm of Burnetas and Katehakis [1] but uses L1 distance instead of KL-divergence. At each time step t, the algorithm computes the empirical estimates for transition probabilities. It then forms a restricted problem ignoring relatively undersampled actions. An action a ∈A(i) is considered “undersampled” if Nt(i, a) < log2 Nt(i). The solutions ˆht, ˆλt might be misleading due to estimation errors. To avoid being misled by empirical samples we compute optimistic “indices” Ut(st, a) for all legal actions a ∈A(st) where st is the current state. The index for action a is computed by looking at an L1-ball around the empirical estimate ˆpt st(a) and choosing a probability distribution q that maximizes L(i, a, q, ˆht). Note that if the estimates were perfect, we would take an action maximizing L(i, a, ˆpt st(a), ˆht). Instead, we take an action that maximizes the index. There is one case where we are forced not to take an index-maximizing action. It is when all the optimal actions of the current problem are about to become undersampled at the next time step. In that case, we take one of these actions (steps 18–22). Note that both steps 7 and 10 can be done by solving LPs. The LP for solving optimality equations can be found in several textbooks (see, for example, [9, p. 391]). The LP in step 10 is even simpler: the L1 ball has only 2|S| vertices and so we can maximize over them efficiently. Like the original Burnetas-Katehakis algorithm, the modified one also satisfies a logarithmic regret bound as stated in the following theorem. Unlike the original algorithm, OLP does not need to know the support sets of the transition distributions. Theorem 4. Let β denote the policy implemented by Algorithm 1. Then we have, for all i0 ∈S and for all P satisfying Assumption 1, lim sup T →∞ Rβ T (i0, P) log T ≤C(P) , where C(P) is the MDP-dependent constant defined in (8). Proof. From Proposition 1 in [1], it follows that Rβ T (i0, P) = X i∈S X a/∈O(i;P,A) Eβ,P i0 [NT (i, a)]φ∗(i, a; P) + O(1) . (13) 5 Define the event At := {∥ˆht −h∗(P)∥∞≤ϵ ∧O( ˆP t, Dt) ⊆O(P)} . (14) Define, N 1 T (i, a; ϵ) := T −1 X t=0 1 [(st, at) = (i, a) ∧At ∧Ut(i, a) ≥L∗(i; P, A) −2ϵ] , N 2 T (i, a; ϵ) := T −1 X t=0 1 [(st, at) = (i, a) ∧At ∧Ut(i, a) < L∗(i; P, A) −2ϵ] , N 3 T (ϵ) := T −1 X t=0 1  ¯ At  , where ¯ At denotes the complement of At. For all ϵ > 0, NT (i, a) ≤N 1 T (i, a; ϵ) + N 2 T (i, a; ϵ) + N 3 T (ϵ) . (15) The result then follows by combining (13) and (15) with the following three propositions and then letting ϵ →0 sufficiently slowly. Proposition 5. For all P and i0 ∈S, we have lim ϵ→0 lim sup T →∞ X i∈S X a/∈O(i;P,A) Eβ,P i0 [N 1 T (i, a; ϵ)] log T φ∗(i, a; P) ≤C(P) . Proposition 6. For all P, i0, i ∈S, a /∈O(i; P, A) and ϵ sufficiently small, we have Eβ,P i0 [N 2 T (i, a; ϵ)] = o(log T) . Proposition 7. For all P satisfying Assumption 1, i0 ∈S and ϵ > 0, we have Eβ,P i0 [N 3 T (ϵ)] = o(log T) . 4 Proofs of auxiliary propositions We prove Propositions 5 and 6. The proof of Proposition 7 is almost the same as that of Proposition 5 in [1] and therefore omitted (for details, see Chapter 6 in the first author’s thesis [8]). The proof of Proposition 6 is considerably simpler (because of the use of L1 distance rather than KL-divergence) than the analogous Proposition 4 in [1]. Proof of Proposition 5. There are two cases depending on whether (i, a) ∈Crit(P) or not. If (i, a) /∈Crit(P), there is an ϵ0 > 0 such that MakeOpt(i, a; P, ϵ0) = ∅. On the event At (recall the definition given in (14)), we have |⟨q, ˆht⟩−⟨q, h∗(P)⟩| ≤ϵ for any q ∈∆+. Therefore, Ut(i, a) ≤sup q∈∆+{r(i, a) + ⟨q, ˆht⟩} ≤sup q∈∆+{r(i, a) + ⟨q, h∗(P)⟩} + ϵ < L∗(i; P, A) −ϵ0 + ϵ [∵MakeOpt(i, a; P, ϵ0) = ∅] < L∗(i; P, A) −2ϵ provided that 3ϵ < ϵ0 Therefore for ϵ < ϵ0/3, N 1 T (i, a; ϵ) = 0. Now suppose (i, a) ∈Crit(P). The event Ut(i, a) ≥L∗(i; P, A) −2ϵ is equivalent to ∃q ∈∆+ s.t.  ∥ˆpt i(a) −q∥2 1 ≤2 log t Nt(i, a)  ∧  r(i, a) + ⟨q, ˆht⟩≥L∗(i; P, A) −2ϵ  . On the event At, we have |⟨q, ˆht⟩−⟨q, h∗(P)⟩| ≤ϵ and thus the above implies ∃q ∈∆+ s.t.  ∥ˆpt i(a) −q∥2 1 ≤2 log t Nt(i, a)  ∧(r(i, a) + ⟨q, h∗(P)⟩≥L∗(i; P, A) −3ϵ) . 6 Recalling the definition (6) of Ji,a(p; P, ϵ), we see that this implies Ji,a(ˆpt i(a); P, 3ϵ) ≤2 log t Nt(i, a) . We therefore have, N 1 T (i, a; ϵ) ≤ T −1 X t=0 1  (st, at) = (i, a) ∧Ji,a(ˆpt i(a); P, 3ϵ) ≤2 log t Nt(i, a)  ≤ T −1 X t=0 1  (st, at) = (i, a) ∧Ji,a(pi(a); P, 3ϵ) ≤2 log t Nt(i, a) + δ  (16) + T −1 X t=0 1  (st, at) = (i, a) ∧Ji,a(pi(a); P, 3ϵ) > Ji,a(ˆpt i(a); P, 3ϵ) + δ  where δ > 0 is arbitrary. Each time the pair (i, a) occurs Nt(i, a) increases by 1, so the first count is no more than 2 log T Ji,a(pi(a); P, 3ϵ) −δ . (17) To control the expectation of the second sum, note that continuity of Ji,a in its first argument implies that there is a function f such that f(δ) > 0 for δ > 0, f(δ) →0 as δ →0 and Ji,a(pi(a); P, 3ϵ) > Ji,a(ˆpt i(a); P, 3ϵ) + δ implies that ∥pi(a) −ˆpt i(a)∥1 > f(δ). By a Chernoff-type bound, we have, for some constant C1, Pβ,P i0 [∥pi(a) −ˆpt i(a)∥1 > f(δ) | Nt(i, a) = m] ≤C1 exp(−mf(δ)2) . and so the expectation of the second sum is no more than Eβ,P i0 [ T −1 X t=0 C1 exp(−Nt(i, a)f(δ)2)] ≤ ∞ X m=1 C1 exp(−mf(δ)2) = C1 1 −exp(−f(δ)2) . (18) Combining the bounds (17) and (18) and plugging them into (16), we get Eβ,P i0 [N 1 T (i, a; ϵ)] ≤ 2 log T Ji,a(pi(a); P, 3ϵ) −δ + C1 1 −exp(−f(δ)2) . Letting δ →0 sufficiently slowly, we get that for all ϵ > 0, Eβ,P i0 [N 1 T (i, a; ϵ)] ≤ 2 log T Ji,a(pi(a); P, 3ϵ) + o(log T) . Therefore, lim ϵ→0 lim sup T →∞ Eβ,P i0 [N 1 T (i, a; ϵ)] log T ≤lim ϵ→0 2 Ji,a(pi(a); P, 3ϵ) = 2 K(i, a; P) , where the last equality follows from the definition (7) of K(i, a; P). The result now follows by summing over (i, a) pairs in Crit(P). Proof of Proposition 6. Define the event A′ t(i, a; ϵ) := {(st, at) = (i, a) ∧At ∧Ut(i, a) < L∗(i; P, A) −2ϵ} , so that we can write N 2 T (i, a; ϵ) = T −1 X t=0 1 [A′ t(i, a; ϵ)] . (19) Note that on A′ t(i, a; ϵ), we have Γ1 t ⊆O(i; ˆP t, Dt) ⊆O(i; P, A). So, a /∈O(i; P, A). But a was taken at time t, so it must have been in Γ2 t which means it maximized the index. Therefore, for all optimal actions a∗∈O(i; P, A), we have, on the event A′ t(i, a; ϵ), Ut(i, a∗) ≤Ut(i, a) < L∗(i; P, A) −2ϵ . 7 Since L∗(i; P, A) = r(i, a∗) + ⟨pi(a∗), h∗(P)⟩, this implies ∀q ∈∆+, ∥q −ˆpt i(a∗)∥1 ≤ s 2 log t Nt(i, a∗) ⇒⟨q, ˆht⟩< ⟨pi(a∗), h∗(P)⟩−2ϵ . Moreover, on the event At, |⟨q, ˆht⟩−⟨q, h∗(P)⟩| ≤ϵ. We therefore have, for any a∗∈O(i; P, A), A′ t(i, a; ϵ) ⊆ ( ∀q ∈∆+, ∥q −ˆpt i(a)∥1 ≤ s 2 log t Nt(i, a) ⇒⟨q, h∗(P)⟩< ⟨pi(a), h∗(P)⟩−ϵ ) ⊆ ( ∀q ∈∆+, ∥q −ˆpt i(a)∥1 ≤ s 2 log t Nt(i, a) ⇒∥q −pi(a)∥1 > ϵ ∥h∗(P)∥∞ ) ⊆ ( ∥ˆpt i(a) −pi(a)∥1 > ϵ h∗(P) + s 2 log t Nt(i, a) ) ⊆ t[ m=1 ( Nt(i, a) = m ∧∥ˆpt i(a) −pi(a)∥1 > ϵ ∥h∗(P)∥∞ + s 2 log t Nt(i, a) ) Using a Chernoff-type bound, we have, for some constant C1, Pβ,P i0 [∥ˆpt i(a) −pi(a)∥1 > δ | Nt(i, a) = m] ≤C1 exp(−mδ2/2) . Using a union bound, we therefore have, Pβ,P i0 [A′ t(i, a; ϵ)] ≤ t X m=1 C1 exp  −m 2 ϵ ∥h∗(P)∥∞ + r 2 log t m !2  ≤C1 t ∞ X m=1 exp  − mϵ2 2∥h∗(P)∥2∞ −ϵ√2m log t ∥h∗(P)∥∞  = o 1 t  . Combining this with (19) proves the result. References [1] Burnetas, A.N. & Katehakis, M.N. (1997) Optimal adaptive policies for Markov decision processes. Mathematics of Operations Research 22(1):222–255 [2] Auer, P. & Ortner, R. (2007) Logarithmic online regret bounds for undiscounted reinforcement learning. Advances in Neural Information Processing Systems 19. Cambridge, MA: MIT Press. [3] Lai, T.L. & Robbins, H. (1985) Asymptotically efficient adaptive allocation rules. Advances in Applied Mathematics 6(1):4–22. [4] Brafman, R.I. & Tennenholtz, M. (2002) R-MAX - a general polynomial time algorithm for near-optimal reinforcement learning. Journal of Machine Learning Research 3:213–231. [5] Auer, P. (2002) Using confidence bounds for exploitation-exploration trade-offs. Journal of Machine Learning Research 3:397–422. [6] Auer, P., Cesa-Bianchi, N. & and Fischer, P. (2002) Finite-time analysis of the multiarmed bandit problem. Machine Learning 47(2-3):235-256. [7] Strehl, A.L. & Littman, M. (2005) A theoretical analysis of model-based interval estimation. In Proceedings of the Twenty-Second International Conference on Machine Learning, pp. 857-864. ACM Press. [8] Tewari, A. (2007) Reinforcement Learning in Large or Unknown MDPs. PhD thesis, Department of Electrical Engineering and Computer Sciences, University of California at Berkeley. [9] Puterman, M.L. (1994) Markov Decision Processes: Discrete Stochastic Dynamic Programming. New York: John Wiley and Sons. 8
2007
129
3,158
Scan Strategies for Adaptive Meteorological Radars Victoria Manfredi, Jim Kurose Department of Computer Science University of Massachusetts Amherst, MA USA {vmanfred,kurose}@cs.umass.edu Abstract We address the problem of adaptive sensor control in dynamic resourceconstrained sensor networks. We focus on a meteorological sensing network comprising radars that can perform sector scanning rather than always scanning 360◦. We compare three sector scanning strategies. The sit-and-spin strategy always scans 360◦. The limited lookahead strategy additionally uses the expected environmental state K decision epochs in the future, as predicted from Kalman filters, in its decision-making. The full lookahead strategy uses all expected future states by casting the problem as a Markov decision process and using reinforcement learning to estimate the optimal scan strategy. We show that the main benefits of using a lookahead strategy are when there are multiple meteorological phenomena in the environment, and when the maximum radius of any phenomenon is sufficiently smaller than the radius of the radars. We also show that there is a trade-off between the average quality with which a phenomenon is scanned and the number of decision epochs before which a phenomenon is rescanned. 1 Introduction Traditionally, meteorological radars, such as the National Weather Service NEXRAD system, are tasked to always scan 360 degrees. In contrast, the Collaborative Adaptive Sensing of the Atmosphere (CASA) Engineering Research Center [5] is developing a new generation of small, low-power but agile radars that can perform sector scanning, targeting sensing when and where the user needs are greatest. Since all meteorological phenomena cannot be now all observed all of the time with the highest degree of fidelity, the radars must decide how best to perform scanning. While we focus on the problem of how to perform sector scanning in such an adaptive meteorological sensing network, it is an instance of the larger class of problems of adaptive sensor control in dynamic resource-constrained sensor networks. Given the ability of a network of radars to perform sector scanning, how should scanning be adapted at each decision epoch? Any scan strategy must consider, for each scan action, both the expected quality with which phenomena would be observed, and the expected number of decision epochs before which phenomena would be first observed (for new phenomena) or rescanned, since not all regions are scanned every epoch under sectored scanning. Another consideration is whether to optimize myopically only over current and possibly past environmental state, or whether to additionally optimize over expected future states. In this work we examine three methods for adapting the radar scan strategy. The methods differ in the information they use to select a scan configuration at a particular decision epoch. The sit-and-spin strategy of always scanning 360 degrees is independent of any external information. The limited lookahead strategies additionally use the expected environmental state K decision epochs in the future in its decision-making. Finally, the full lookahead strategy has an infinite horizon: it uses all expected future states by casting the problem as a Markov decision process and using reinforcement learning to estimate the optimal scan strategy. All strategies, excluding sit-and-spin, work by optimizing the overall “quality” (a term we will define 1 precisely shortly) of the sensed information about phenomena in the environment, while restricting or penalizing long inter-scan intervals. Our contributions are two-fold. We first introduce the meteorological radar control problem and show how to constrain the problem so that it is amenable to reinforcement learning methods. We then identify conditions under which the computational cost of an infinite horizon radar scan strategy such as reinforcement learning is necessary. With respect to the radar meteorological application, we show that the main benefits of considering expected future states are when there are multiple meteorological phenomena in the environment, and when the maximum radius of any phenomenon is sufficiently smaller than the radius of the radars. We also show that there is a trade-off between the average quality with which a phenomenon is scanned and the number of decision epochs before which a phenomenon is rescanned. Finally, we show that for some environments, a limited lookahead strategy is sufficient. In contrast to other work on radar control (see Section 5), we focus on tracking meteorological phenomena and the time frame over which to evaluate control decisions. The rest of this paper is organized as follows. Section 2 defines the radar control problem. Section 3 describes the scan strategies we consider. Section 4 describes our evaluation framework and presents results. Section 5 reviews related work on control and resource allocation in radar and sensor networks. Finally, Section 6 summarizes this work and outlines future work. 2 Meteorological Radar Control Problem Meteorological radar sensing characteristics are such that the smaller the sector that a radar scans (until a minimum sector size is reached), the higher the quality of the data collected, and thus, the more likely it is that phenomena located within the sector are correctly identified [2]. The multiradar meteorological control problem is then as follows. We have a set of radars, with fixed locations and possibly overlapping footprints. Each radar has a set of scan actions from which it chooses. In the simplest case, a radar scan action determines the size of the sector to scan, the start angle, the end angle, and the angle of elevation. We will not consider elevation angles here. Our goal is to determine which scan actions to use and when to use them. An effective scanning strategy must balance scanning small sectors (thus implicitly not scanning other sectors), to ensure that phenomena are correctly identified, with scanning a variety of sectors, to ensure that no phenomena are missed. We will evaluate the performance of different scan strategies based on inter-scan time, quality, and cost. Inter-scan time is the number of decision epochs before a phenomenon is either first observed or rescanned; we would like this value to be below some threshold. Quality measures how well a phenomenon is observed, with quality depending on the amount of time a radar spends sampling a voxel in space, the degree to which a meteorological phenomena is scanned in its (spatial) entirety, and the number of radars observing a phenomenon; higher quality scans are better. Cost is a meta-metric that combines inter-scan time and quality, and that additionally considers whether a phenomenon was never scanned. The radar control problem is that of dynamically choosing the scan strategy of the radars over time to maximize quality while minimizing inter-scan time. 3 Scan Strategies We define a radar configuration to be the start and end angles of the sector to be scanned by an individual radar for a fixed interval of time. We define a scan action to be a set of radar configurations (one configuration for each radar in the meteorological sensing network). We define a scan strategy to be an algorithm for choosing scan actions. In Section 3.1 we define the quality function associated with different radar configurations and in Section 3.2 we define the quality functions associated with different scan strategies. 3.1 Quality Function The quality function associated with a given scan action was proposed by radar meteorologists in [5] and has two components. There is a quality component Up associated with scanning a particular phenomenon p. There is also a quality component Us associated with scanning a sector, which is independent of any phenomena in that sector. Let sr be the radar configuration for a single radar r and let Sr be the scan action under consideration. From [5], we compute the quality Up(p, Sr) of 2 0 0.2 0.4 0.6 0.8 1 0 0.2 0.4 0.6 0.8 1 Fc c Fc Function 0 0.2 0.4 0.6 0.8 1 0 0.2 0.4 0.6 0.8 1 Fw w/360 Fw Function 0 0.2 0.4 0.6 0.8 1 0 0.2 0.4 0.6 0.8 1 1.2 Fd d Fd Function Figure 1: Step functions used by the Up and Us quality functions, from [9] scanning a phenomenon p using scan action Sr with the following equations, Up(p, sr) = Fc (c(p, sr)) ×  βFd (d(r, p)) + (1 −β)Fw w(sr) 360   Up(p, Sr) = maxsr∈Sr [Up(p, sr)] (1) where w(sr) = size of sector sr scanned by r a(r, p) = minimal angle that would allow r to cover p c(p, sr) = w(sr) a(r, p) = coverage of p by r scanning sr h(r, p) = distance from r to geometric center of p hmax(r) = range of radar r d(r, p) = h(r, p) hmax(r) = normalized distance from r to p β = tunable parameter Up(p, Sr) is the maximum quality obtained for scanning phenomenon p over all possible radars and their associated radar configurations sr. Up(p, sr) is the quality obtained for scanning phenomenon p using a specific radar r and radar configuration sr. The functions Fc(·), Fw(·), and Fd(·) from [5] are plotted in Figure 1. Fc captures the effect on quality due to the percentage of the phenomenon covered; to usefully scan a phenomenon, at least 95% of the phenomenon must be scanned. Fw captures the effect of radar rotation speed on quality; as rotation speed is reduced, quality increases. Fd captures the effects of the distance from the radar to the geometrical center of the phenomenon on quality; the further away the radar center is from the phenomenon being scanned, the more degraded will be the scan quality due to attenuation. Due to the Fw function, the quality function Up(p, sr) outputs the same quality for scan angles of 181◦to 360◦. The quality Us(ri, sr) for scanning a subsector i of radar r scanned using configuration sr is, Us(ri, sr) = Fw w(sr) 360  (2) Intuitively, a sector scanning strategy is only preferable when the quality function is such that the quality gained for scanning a sector is greater than the quality lost for not scanning another sector. 3.2 Scan Strategies We compare the performance of the following three scan strategies. The strategies differ in whether they optimize quality over only current or also future expected states. For example, suppose a storm cell is about to move into a high-quality multi-doppler region (i.e., the area where multiple radar footprints overlap). By considering future expected states, a lookahead strategy can anticipate this event and have all radars focused on the storm cell when it enters the multi-doppler region, rather than expending resources (with little “reward”) to scan the storm cell just before it enters this region. (i) Sit-and-spin strategy. All radars always scan 360◦. (ii) Limited “lookahead” strategy. We examine both a 1-step and a 2-step look-ahead scan strategy. Although we do not have an exact model of the dynamics of different phenomena, to perform the 3 look-ahead we estimate the future attributes of each phenomenon using a separate Kalman filter. For each filter, the true state x is a vector comprising the (x, y) location and velocity of the phenomenon, and the measurement y is a vector comprising only the (x, y) location. The Kalman filter assumes that the state at time t is a linear function of the state at time t −1 plus some Gaussian noise, and that the measurement at time t is a linear function of the state at time t plus some Gaussian noise. In particular, xt = Axt−1 + N[0, Q] and yt = Bxt + N[0, R]. Following work by [8], we initialize each Kalman filter as follows. The A matrix reflects that storm cells typically move to the north-east. The B matrix, which when multiplied with xt returns xt, assumes that the observed state yt is directly the true state xt plus some Gaussian noise. The Q matrix assumes that there is little noise in the true state dynamics. Finally, the measurement error covariance matrix R is a function of the quality Up with which phenomenon p was scanned at time t. We discuss how to compute the σt’s in Section 4. We use the first location measurement of a storm cell y0, augmented with the observed velocity, as the the initial state x0. We assume that our estimate of x0 has little noise and use .0001 ∗I for the initial covariance P0. A = " 1 0 1 0 0 1 0 1 0 0 1 0 0 0 0 1 # , B = h 1 0 0 0 0 1 0 0 i , Q = " .0001 0 0 0 0 .0001 0 0 0 0 .0001 0 0 0 0 .0001 # , R = h σt 0 0 σt i We compute the k-step look-ahead quality for different sets of radar configurations Sr with, UK(Sr,1|Tr) = K X k=1 φk−1 Np X i=1 Up(pi,k, Sr,k|Tr) where Np is the number of phenomena in the environment in the current decision epoch, pi,0 is the current set of observed attributes for phenomenon i, pi,k is the k-step set of predicted attributes for phenomenon i, Sr,k is the set of radar configurations for the kth decision epoch in the future, and φ is a tunable discount factor between 0 and 1. The optimal set of radar configurations is then S∗ r,1 = argmaxSr,1UK(Sr,1|Tr). To account for the decay of quality for unscanned sectors and phenomena, and to consider the possibility of new phenomena appearing, we restrict Sr to be those scan actions that ensure that every sector has been scanned at least once in the last Tr decision epochs. Tr is a tunable parameter whose purpose is to satisfy the meteorological dictate found in [5], that all sectors be scanned, for instance by a 360◦scan, at most every 5 minutes. (iii) Full “lookahead” strategy. We formulate the radar control problem as a Markov decision process (MDP) and use reinforcement learning to obtain a lookahead scan strategy as follows. While a POMDP (partially observable MDP) could be used to model the environmental uncertainty, due to the cost of solving a POMDP with a large state space [9], we choose to formulate the radar control problem as an MDP with quality (or uncertainty) variables as in an augmented MDP [6]. S is the observed state of the environment. The state is a function of the observed number of storms, the observed x, y velocity of each storm, and the observed dimensions of each storm cell given by x, y center of mass and radius. To model the uncertainty in the environment, we additionally define as part of the state quality variables up and us based on the Up and Us quality functions defined in Equations (1) and (2) in Section 3.1. up is the quality Up(·) with which each storm cell was observed, and us is the current quality Us(·) of each 90◦subsector, starting at 0, 90, 180, or 270◦. A is the set of actions available to the radars. This is the set of radar configurations for a given decision epoch. We restrict each radar to scanning subsectors that are a multiple of 90◦, starting at 0, 90, 180, or 270◦. Thus, with N radars there are 13N possible actions at each decision epoch. The transition function T(S ×A×S) →[0, 1] encodes the observed environment dynamics: specifically the appearance, disappearance, and movement of storm cells and their associated attributes. For meteorological radar control, the next state really is a function of not just the current state but also the action executed in the current state. For instance, if a radar scans 180 degrees rather than 360 degrees, then any new storm cells that appear in the unscanned areas will not be observed. Thus, the new storm cells that will be observed will depend on the scanning action of the radar. The cost function C(S, A, S) →R encodes the goals of the radar sensing network. C is a function of the error between the true state and the observed state, whether all storms have been observed, 4 and a penalty term for not rescanning a storm within Tr decision epochs. More precisely, C = No p X i=1 Nd X j=1 |do ij −dij| + (Np −N o p)Pm + Np X i=1 I(ti)Pr (3) where N o p is the observed number of storms, Nd is the number of attributes per storm, do ij is the observed value of attribute j of storm i, dij is the true value of attribute j of storm i, Np is the true number of storms, Pm is the penalty for missing a storm, ti is the number of decision epochs since storm i was last scanned, Pr is the penalty for not scanning a storm at least once within Tr decision epochs, and I(ti) is an indicator function that equals 1 when ti ≥Tr. The quality with which a storm is observed determines the difference between the observed and true values of its attributes. We use linear Sarsa(λ) [15] as the reinforcement learning algorithm to solve the MDP for the radar control problem. To obtain the basis functions, we use tile coding [13, 14]. Rather than defining tilings over the entire state space, we define a separate set of tilings for each of the state variables. 4 Evaluation 4.1 Simulation Environment We consider radars with both 10 and 30km radii as in [5, 17]. Two overlapping radars are placed in a 90km × 60km rectangle, one at (30km, 30km) and one at (60km, 30km). A new storm cell can appear anywhere within the rectangle and a maximum number of cells can be present on any decision epoch. When the (x, y) center of a storm cell is no longer within range of any radar, the cell is removed from the environment. Following [5], we use a 30-second decision epoch. We derive the maximum storm cell radius from [11], which uses 2.83km as “the radius from the cell center within which the intensity is greater than e−1 of the cell center intensity.” We then permit a storm cell’s radius to range from 1 to 4 km. To determine the range of storm cell velocities, we use 39 real storm cell tracks obtained from meteorologists. Each track is a series of (latitude, longitude) coordinates. We first compute the differences in latitude and longitude, and in time, between successive pairs of points. We then fit the differences using Gaussian distributions. We obtain, in units of km/hour, that the latitude (or x) velocity has mean 9.1 km/hr and std. dev. of 35.6 km/hr and that the longitude (or y) velocity has mean 16.7 km/hr and std. dev. of 28.8 km/hr. To obtain a storm cell’s (x, y) velocity, we then sample the appropriate Gaussian distribution. To simulate the environment transitions we use a stochastic model of rainfall in which storm cell arrivals are modeled using a spatio-temporal Poisson process, see [11, 1]. To determine the number of new storm cells to add during a decision epoch, we sample a Poisson random variable with rate ληδaδt with λ = 0.075 storm cells/km2 and η = 0.006 storm cells/minute from [11]. From the radar setup we have δa = 90 · 60 km2, and from the 30-second decision epoch we have δt = 0.5 minutes. New storm cells are uniformly randomly distributed in the 90km × 60km region and we uniformly randomly choose new storm cell attributes from their range of values. This simulates the true state of the environment over time. The following simplified radar model determines how well the radars observe the true environmental state under a given set of radar configurations. If a storm cell p is scanned using a set of radar configurations Sr, the location, velocity, and radius attributes are observed as a function of the Up(p, Sr) quality defined in Section 3.1. Up(p, Sr) returns a value u between zero and one. Then the observed value of the attribute is the true value of the attribute plus some Gaussian noise distributed with mean zero and standard deviation (1 −u)V max/ρ where V max is the largest positive value the attribute can take and ρ is a scaling term that will allow us to adjust the noise variability. Since u depends on the decision epoch t, for the k-step look-ahead scan strategy we also use σt = (1 −ut)V max/ρ to compute the measurement error covariance matrix, R, in our Kalman filter. We parameterize the MDP cost function as follows. We assume that any unobserved storm cell has been observed with quality 0, hence u = 0. Summing over (1 −u)V max/ρ for all attributes with σ = 0 gives the value Pm = 15.5667, and thus a penalty of 15.5667 is received for each unobserved storm cell. If a storm cell is not seen within Tr = 4 decision epochs a penalty of Pr = 200 is given. Using the value 200 ensures that if a storm cell has not been rescanned within the appropriate amount of time, this part of the cost function will dominate. 5 We distinguish the true environmental state known only to the simulator from the observed environmental state used by the scan strategies for several reasons. Although radars provide measurements about meteorological phenomena, the true attributes of the phenomena are unknown. Poor overlap in a dual-Doppler area, scanning a subsector too quickly or slowly, or being unable to obtain a sufficient number of elevation scans will degrade the quality of the measurements. Consequently, models of previously existing phenomena may contain estimation errors such as incorrect velocity, propagating error into the future predicted locations of the phenomena. Additionally, when a radar scans a subsector, it obtains more accurate estimates of the phenomena in that subsector than if it had scanned a full 360◦, but less accurate estimates of the phenomena outside the subsector. 4.2 Results In this section we present experimental results obtained using the simulation model of the previous section and the scan strategies described in Section 3. For the limited lookahead strategy we use β = 0.5, κp = 0.25, κs = 0.25, and φ = 0.75. For Sarsa(λ), we use a learning rate α = 0.0005, exploration rate ϵ = 0.01, discount factor γ = 0.9, and eligibility decay λ = 0.3. Additionally, we use a single tiling for each state variable. For the (x, y) location and radius tilings, we use a granularity of 1.0; for the (x, y) velocity, phenomenon confidence, and radar sector confidence tilings, we use a granularity of 0.1. When there are a maximum of four storms, we restrict Sarsa(λ) to scanning only 180 or 360 degree sectors to reduce the time needed for convergence. Finally, all strategies are always compared over the same true environmental state. Figure 2(a) shows an example convergence profile of Sarsa(λ) when there are at most four storms in the environment. Figure 2(b) shows the average difference in scan quality between the learned Sarsa(λ) strategy and sit-and-spin and 2-step strategies. When 1/ρ = 0.001 (i.e., little measurement noise) Sarsa(λ) has the same or higher relative quality than does sit-and-spin, but significantly lower relative quality (0.05 to 0.15) than does the 2-step. This in part reflects the difficulty of learning to perform as well as or better than Kalman filtering. Examining the learned strategy showed that when there was at most one storm with observation noise 1/ρ = 0.001, Sarsa(λ) learned to simply sit-and-spin, since sector scanning conferred little benefit. As the observation noise increases, the relative difference increases for sit-and-spin, and decreases for the 2-step. Figure 2(c) shows the average difference in cost between the learned Sarsa(λ) scan strategy and the sit-and-spin and 2-step strategies for a 30 km radar radius. Sarsa(λ) has the lowest average cost. Looking at the Sarsa(λ) inter-scan times, Figure 2 (d) shows that, as a consequence of the penalty for not scanning a storm within Tr = 4 time-steps, while Sarsa(λ) may rescan fewer storm cells within 1, 2, or 3 decision epochs than do the other scan strategies, it scans almost all storm cells within 4 epochs. Note that for the sit-and-spin CDF, P[X ≤1] is not 1; due to noise, for example, the measured location of a storm cell may be (expected) outside any radar footprint and consequently the storm cell will not be observed. Thus the 2-step has more inter-scan times greater than Tr = 4 than does Sarsa(λ). Together with Figure 2(b) and (c), this implies that there is a trade-off between inter-scan time and scan quality. We hypothesize that this trade-off occurs because increasing the size of the scan sectors ensures that inter-scan time is minimized, but decreases the scan quality. Other results (not shown, see [7]) examine the average difference in quality between the 1-step and 2step strategies for 10 km and 30 km radar radii. With a 10 km radius, the 1-step quality is essentially the same as the 2-step quality. We hypothesize that this is a consequence of the maximum storm cell radius, 4 km, relative to the 10 km radar radius. With a 30 km radius and at most eight storm cells, the 2-step quality is about 0.005 better than the 1-step and about 0.07 better than sit-and-spin (recall that quality is a value between 0 and 1). Now recall that Figure 2(b) shows that with a 30 km radius and at most four storm cells, the 2-step quality is as much as 0.12 than sit-and-spin. This indicates that there may be some maximum number of storms above which it is best to sit-and-spin. Overall, depending on the environment in which the radars are deployed, there are decreasing marginal returns for considering more than 1 or 2 future expected states. Instead, the primary value of reinforcement learning for the radar control problem is balancing multiple conflicting goals, i.e., maximizing scan quality while minimizing inter-scan time. Implementing the learned reinforcement learning scan strategy in a real meteorological radar network requires addressing the differences between the offline environment in which the learned strategy is trained, and the online environment in which the strategy is deployed. Given the slow convergence time for Sarsa(λ) (on the order of 6 0 1 2 3 4 5 6 x 10 4 14 16 18 20 22 24 26 Episode Average Cost Per Episode of 1000 Steps Radar Radius = 30km, Max 4 Storms sit−and−spin sarsa (a) 0 0.01 0.02 0.03 0.04 0.05 0.06 0.07 0.08 0.09 0.1 −0.2 −0.15 −0.1 −0.05 0 0.05 0.1 0.15 1/ρ Average Difference in Scan Quality (250,000 steps) Radar Radius = 30km 2step − sarsa, max 1 storm 2step − sarsa, max 4 storms sitandspin− sarsa, max 1 storm sitandspin − sarsa, max 4 storms (b) 0 0.01 0.02 0.03 0.04 0.05 0.06 0.07 0.08 0.09 0.1 −0.5 0 0.5 1 1.5 2 2.5 3 3.5 4 4.5 1/ρ Average Difference in Cost (250,000 steps) Radar Radius = 30km 2step − sarsa, max 1 storm 2step − sarsa, max 4 storms sitandspin− sarsa, max 1 storm sitandspin − sarsa, max 4 storms (c) 0 1 2 3 4 5 6 7 8 9 10 0.8 0.82 0.84 0.86 0.88 0.9 0.92 0.94 0.96 0.98 1 x = # of decision epochs between storm scans P[X <= x] Max # of Storms = 4, Radar Radius = 30km sit−and−spin, 1/σ=0.1 1step, 1/σ=0.1 2step, 1/σ=0.1 sarsa, 1/σ=0.1 (d) Figure 2: Comparing the scan strategies based on quality, cost, and inter-scan time. Recall that ρ is a scaling term used to determine measurement noise, see Section 4.1. days), training solely online is likely infeasible, although the time complexity could be mitigated by using hierarchical reinforcement learning methods and semi-Markov decision process. Some online training could be achieved by treating 360◦scans as the true environment state. Then when unknown states are entered, learning could be performed, alternating between 360◦scans to gauge the true state of the environment and exploratory scans by the reinforcement learning algorithm. 5 Related Work Other reinforcement learning applications in large state spaces include robot soccer [12] and helicopter control [10]. With respect to radar control, [4] examines the problem of using agile radars on airplanes to detect and track ground targets. They show that lookahead scan strategies for radar tracking of a ground target outperform myopic strategies. In comparison, we consider the problem of tracking meteorological phenomena using ground radars. [4] uses an information theoretic measure to define the reward metric and proposes both an approximate solution to solving the MDP Bellman equations as well as a Q-learning reinforcement learning-based solution. [16] examines where to target radar beams and which waveform to use for electronically steered phased array radars. They maintain a set of error covariance matrices and dynamical models for existing targets, as well as 7 track existence probability density functions to model the probability that targets appear. They then choose the scan mode for each target that has both the longest revisit time for scanning a target and error covariance below a threshold. They do this for control 1-step and 2-steps ahead and show that considering the environment two decision epochs ahead outperforms a 1-step look-ahead for tracking of multiple targets. 6 Conclusions and Future Work In this work we compared the performance of myopic and lookahead scan strategies in the context of the meteorological radar control problem. We showed that the main benefits of using a lookahead strategy are when there are multiple meteorological phenomena in the environment, and when the maximum radius of any phenomenon is sufficiently smaller than the radius of the radars. We also showed that there is a trade-off between the average quality with which a phenomenon is scanned and the number of decision epochs before which a phenomenon is rescanned. Overall, considering only scan quality, a simple lookahead strategy is sufficient. To additionally consider inter-scan time (or optimize over multiple metrics of interest), a reinforcement learning strategy is useful. For future work, rather than identifying a policy that chooses the best action to execute in a state for a single decision epoch, it may be useful to consider actions that cover multiple epochs, as in semi-Markov decision processes or to use controllers from robotics [3]. We would also like to incorporate more radar and meteorological information into the transition, measurement, and cost functions. Acknowledgments The authors thank Don Towsley for his input. This work was supported in part by the National Science Foundation under the Engineering Research Centers Program, award number EEC-0313747. Any opinions, findings and conclusions or recommendations expressed in this material are those of the author(s) and do not necessarily reflect those of the National Science Foundation. References [1] D. Cox and V. Isham. A simple spatial-temporal model of rainfall. Proceedings of the Royal Society of London. Series A, Mathematical and Physical Sciences, 415:1849:317–328, 1988. [2] B. Donovan and D. J. McLaughlin. Improved radar sensitivity through limited sector scanning: The DCAS approach. In Proceedings of AMS Radar Meteorology, 2005. [3] M. Huber and R. Grupen. A feedback control structure for on-line learning tasks. Robotics and Autonomous Systems, 22(3-4):303–315, 1997. [4] C. Kreucher and A. O. H. III. Non-myopic approaches to scheduling agile sensors for multistage detection, tracking and identification. In Proceedings of ICASSP, pages 885–888, 2005. [5] J. Kurose, E. Lyons, D. McLaughlin, D. Pepyne, B. Phillips, D. Westbrook, and M. Zink. An end-user-responsive sensor network architecture for hazardous weather detection, prediction and response. AINTEC, 2006. [6] C. Kwok and D. Fox. Reinforcement learning for sensing strategies. In IROS, 2004. [7] V. Manfredi and J. Kurose. Comparison of myopic and lookahead scan strategies for meteorological radars. Technical Report U of Massachusetts Amherst, 2006-62, 2006. [8] V. Manfredi, S. Mahadevan, and J. Kurose. Switching kalman filters for prediction and tracking in an adaptive meteorological sensing network. In IEEE SECON, 2005. [9] K. Murphy. A survey of POMDP solution techniques. Technical Report U.C. Berkeley, 2000. [10] A. Ng, A. Coates, M. Diel, V. Ganapathi, J. Schulte, B. Tse, E. Berger, and E. Liang. Inverted autonomous helicopter flight via reinforcement learning. In International Symposium on Experimental Robotics, 2004. [11] I. Rodrigues-Iturbe and P. Eagleson. Mathematical models of rainstorm events in space and time. Water Resources Research, 23:1:181– 190, 1987. [12] P. Stone, R. Sutton, and G. Kuhlmann. Reinforcement learning for robocup-soccer keepaway. Adaptive Behavior, 3, 2005. [13] R. Sutton. Tile coding software. http://rlai.cs.ualberta.ca/RLAI/RLtoolkit/tiles.html. [14] R. Sutton. Generalization in reinforcement learning: Successful examples using sparse coarse coding. In NIPS, 1996. [15] R. Sutton and A. Barto. Reinforcement Learning: An Introduction. MIT Press, Cambridge, Massachusetts, 1998. [16] S. Suvorova, D. Musicki, B. Moran, S. Howard, and B. L. Scala. Multi step ahead beam and waveform scheduling for tracking of manoeuvering targets in clutter. In Proceedings of ICASSP, 2005. [17] J. M. Trabal, B. C. Donovan, M. Vega, V. Marrero, D. J. McLaughlin, and J. G. Colom. Puerto Rico student test bed applications and system requirements document development. In Proceedings of the 9th International Conference on Engineering Education, 2006. 8
2007
13
3,159
TrueSkill Through Time: Revisiting the History of Chess Pierre Dangauthier INRIA Rhone Alpes Grenoble, France pierre.dangauthier@imag.fr Ralf Herbrich Microsoft Research Ltd. Cambridge, UK rherb@microsoft.com Tom Minka Microsoft Research Ltd. Cambridge, UK minka@microsoft.com Thore Graepel Microsoft Research Ltd. Cambridge, UK thoreg@microsoft.com Abstract We extend the Bayesian skill rating system TrueSkill to infer entire time series of skills of players by smoothing through time instead of filtering. The skill of each participating player, say, every year is represented by a latent skill variable which is affected by the relevant game outcomes that year, and coupled with the skill variables of the previous and subsequent year. Inference in the resulting factor graph is carried out by approximate message passing (EP) along the time series of skills. As before the system tracks the uncertainty about player skills, explicitly models draws, can deal with any number of competing entities and can infer individual skills from team results. We extend the system to estimate player-specific draw margins. Based on these models we present an analysis of the skill curves of important players in the history of chess over the past 150 years. Results include plots of players’ lifetime skill development as well as the ability to compare the skills of different players across time. Our results indicate that a) the overall playing strength has increased over the past 150 years, and b) that modelling a player’s ability to force a draw provides significantly better predictive power. 1 Introduction Competitive games and sports can benefit from statistical skill ratings for use in matchmaking as well as for providing criteria for the admission to tournaments. From a historical perspective, skill ratings also provide information about the general development of skill within the discipline or for a particular group of interest. Also, they can give a fascinating narrative about the key players in a given discipline, allowing a glimpse at their rise and fall or their struggle against their contemporaries. In order to provide good estimates of the current skill level of players skill rating systems have traditionally been designed as filters that combine a new game outcome with knowledge about a player’s skill from the past to obtain a new estimate. In contrast, when taking a historical view we would like to infer the skill of a player at a given point in the past when both their past as well as their future achievements are known. The best known such skill filter based rating system is the Elo system [3] developed by Arpad Elo in 1959 and adopted by the World Chess Federation FIDE in 1970 [4]. Elo models the 1 probability of the game outcome as P (1 wins over 2|s1, s2) := Φ  s1−s2 √ 2β  where s1 and s2 are the skill ratings of each player, Φ denotes the cumulative density of a zero-mean unitvariance Gaussian and β is the assumed variability of performance around skill. Denote the game outcomes by y = +1 if player 1 wins, y = −1 if player 2 wins and y = 0 if a draw occurs. Then the resulting (linearised) Elo update is given by s1 ←s1 + y∆, s2 ←s2 −y∆ and ∆= αβ√π | {z } K−Factor y + 1 2 −P (1 wins over 2|s1, s2)  , where 0 < α < 1 determines how much the filter weighs the new evidence versus the old estimate. The TrueSkill rating system [6] improves on the Elo system in a number of ways. TrueSkill’s current belief about a player’s skill is represented by a Gaussian distribution with mean µ and variance σ2. As a consequence, TrueSkill does not require a provisional rating period and converges to the true skills of players very quickly. Also, in contrast to Elo, TrueSkill explicitly models the probability of draws. Crucially for its application in the Xbox Live online gaming system (see [6] for details) it can also infer skills from games with more than two participating entities and infers individual players’ skills from the outcomes of team games. As a skill rating and matchmaking system TrueSkill operates as a filter as discussed above. However, due to its fully probabilistic formulation it is possible to extend Trueskill to perform smoothing on a time series of player skills. In this paper we extend TrueSkill to provide accurate estimates of the past skill levels of players at any point in time taking into account both their past and their future achievements. We carry out a large-scale analysis of about 3.5 million games of chess played over the last 150 years. The paper is structured as follows. In Section 2 we review previous work on historical chess ratings. In Section 3 we present two models for historical ratings through time, one assuming a fixed draw margin and one estimating the draw margin per player per year. We indicate how large scale approximate message passing (EP) can be used to efficiently perform inference in these huge models. In Section 4 we present experimental results on a huge data set from ChessBase with over 3.5 million games and gain some fascinating chess specific insights from the data. 2 Previous Work on Historical Chess Ratings Estimating players’ skills in retrospective allows one to take into account more information and hence can be expected to lead to more precise estimates. The pioneer in this field was Arpad Elo himself, when he encountered the necessity of initializing the skill values of the Elo system when it was first deployed. To that end he fitted a smooth curve to skill estimates from five-year periods; however little is known about the details of his method [3]. Probably best known in the chess community is the Chessmetrics system [8], which aims at improving the Elo scores by attempting to obtain a better fit with the observed data. Although constructed in a very thoughtful manner, Chessmetrics is not a statistically wellfounded method and is a filtering algorithm that disregards information from future games. The first approach to the historical rating problem with a solid statistical foundation was developed by Mark Glickman, chairman of the USCF Rating Committee. Glicko 1 & 2 [5] are Bayesian rating systems that address a number of drawbacks of the Elo system while still being based on the Bradley-Terry paired-comparison method [1] used by modern Elo. Glickman models skills as Gaussian variables whose variances indicate the reliability of the skill estimate, an idea later adopted in the TrueSkill model as well. Glicko 2 adds volatility measures, indicating the degree of expected fluctuation in a player’s rating. After an initial estimate past estimations are smoothed by propagating information back in time. The second statistically well founded approach are Rod Edwards’s Edo Historical Chess Ratings [2], which are also based on the Bradley-Terry model but have been applied only to historical games from the 19th century. In order to model skill dynamics Edwards considers 2 the same player at different times as several distinct players, whose skills are linked together by a set of virtual games which are assumed to end in draws. While Edo incorporates a dynamics model via virtual games and returns uncertainty measures in terms of the estimator’s variance it is not a full Bayesian model and provides neither posterior distributions over skills, nor does it explicitly model draws. In light of the above previous work on historical chess ratings the goal of this paper is to introduce a fully probabilistic model of chess ratings through time which explicitly accounts for draws and provides posterior distributions of skills that reflect the reliability of the estimate at every point in time. 3 Models for Ranking through Time This paper strongly builds on the original TrueSkill paper [6]. Although TrueSkill is applicable to the case of multiple team games, we will only consider the two player case for this application to chess. It should be clear, however, that the methods presented can equally well be used for games with any number of teams competing. Consider a game such as chess in which a number of, say, N players {1, . . . , N} are competing over a period of T time steps, say, years. Denote the series of game outcomes between two players i and j in year t by yt ij (k) ∈{+1, −1, 0} where k ∈  1, . . . , Kt ij denotes the number of game outcomes available for that pair of players in that year. Furthermore, let y = +1 if player i wins, y = −1 if player j wins and y = 0 in case of a draw. 3.1 Vanilla TrueSkill In the Vanilla TrueSkill system, each player i is assumed to have an unknown skill st i ∈R at time t. We assume that a game outcome yt ij (k) is generated as follows. For each of the two players i and j performances pt ij (k) and pt ji (k) are drawn according to p pt ij (k) |st i  = N pt ij (k) ; st i, β2 . The outcome yt ij (k) of the game between players i and j is then determined as yt ij (k) :=    +1 if pt ij (k) > pt ji (k) + ε −1 if pt ij (k) > pt ij (k) + ε 0 if pt ij (k) −pt ji (k) ≤ε , where the parameter ε > 0 is the draw margin. In order to infer the unknown skills st i the TrueSkill model assumes a factorising Gaussian prior p s0 i  = N s0 i ; µ0, σ2 0  over skills and a Gaussian drift of skills between time steps given by p st i|st−1 i  = N st; st−1, τ 2 . The model can be well described as a factor graph (see Figure 1, left) which clarifies the factorisation assumptions of the model and allows to develop efficient (approximate) inference algorithms based on message passing (for details see [6]) In the Vanilla TrueSkill algorithm denoting the winning player by W and the losing player by L and dropping the time index for now, approximate Bayesian inference (Gaussian density filtering [7]) leads to the following update equations for µW , µL, σW and σL. µW ←µW + σ2 W cij · v µW −µL cij , ε cij  and σW ←σW s 1 −σ2 W c2 ij · w µW −µL cij , ε cij  µL ←µL −σ2 L cij · v µW −µL cij , ε cij  and σL ←σL s 1 −σ2 L c2 ij · w µW −µL cij , ε cij  . The overall variance is c2 ij = 2β2 + σ2 W + σ2 L and the two functions v and w are given by v (t, α) :=N (t −α; 0, 1) Φ (t −α) and w (t, α) := v (t, α) · (v (t, α) + (t −α)) . For the case of a draw we have the following update equations: µi ←µi + σ2 i cij · ˜v µi −µi cij , ε cij  and σi ←σi s 1 −σ2 i c2 ij · ˜w µi −µi cij , ε cij  , 3 and similarly for player j. Defining d := α −t and s := α + t then ˜v and ˜w are given by ˜v (t, α) :=N (−s; 0, 1) −N (d; 0, 1) Φ (d) −Φ (−s) and ˜w (t, α) := ˜v2 (t, α) + (d) N (d; 0, 1) −(s) N (s; 0, 1) Φ (d) −Φ (−s) . In order to approximate the skill parameters µt i and σt i for all players i ∈{1, . . . , N} at all times t ∈{0, . . . , T} the Vanilla TrueSkill algorithm initialises each skill belief with µ0 i ←µ0 and σ0 i ←σ0. It then proceeds through the years t ∈{1 . . . T} in order, goes through the game outcomes yt ij (k) in random order and updates the skill beliefs according to the equations above. 3.2 TrueSkill through Time (TTT) The Vanilla TrueSkill algorithm suffers from two major disadvantages: 1. Inference within a given year t depends on the random order chosen for the updates. Since no knowledge is assumed about game outcomes within a given year, the results of inference should be independent of the order of games within a year. 2. Information across years is only propagated forward in time. More concretely, if player A beats player B and player B later turns out to be very strong (i.e., as evidenced by him beating very strong player C repeatedly), then Vanilla TrueSkill cannot propagate that information backwards in time to correct player A’s skill estimate upwards. Both problems can be addressed by extending the Gaussian density filtering to running full expectation propagation (EP) until convergence [7]. The basic idea is to update repeatedly on the same game outcomes but making sure that the effect of the previous update on that game outcome is removed before the new effect is added. This way, the model remains the same but the inferences are less approximate. More specifically, we go through the game outcomes yt ij within a year t several times until convergence. The update for a game outcome yt ij (k) is performed in the same way as before but saving the upward messages mf(pt ij(k),st i)→st i (st i) which describe the effect of the updated performance pt ij (k) on the underlying skill st i. When game outcome yt ij (k) comes up for update again, the new downward message mf(pt ij(k),st i)→pt ij(k) pt ij (k)  can be calculated by mf(pt ij(k),st i)→pt ij(k) pt ij (k)  = Z ∞ −∞ f pt ij (k) , st i  p (st i) mf(pt ij(k),st i)→st i (st i)dst i , thus effectively dividing out the earlier upward message to avoid double counting. The integral above is easily evaluated since the messages as well as the marginals p (st i) have been assumed Gaussian. The new downward message serves as the effective prior belief on the performance pt i (k). At convergence, the dependency of the inferred skills on the order of game outcomes vanishes. The second problem is addressed by performing inference for TrueSkill through time (TTT), i.e. by repeatedly smoothing forward and backward in time. The first forward pass of TTT is identical to the inference pass of Vanilla TrueSkill except that the forward messages mf(st−1 i ,st i)→st i(st i) are stored. They represent the influence of skill estimate st−1 i at time t −1 on skill estimate st i at time t. In the backward pass, these messages are then used to calculate the new backward messages mf(st−1 i ,st i)→st−1 i st−1 i  , which effectively serve as the new prior for time step t −1, mf(st−1 i ,st i)→st−1 i st−1 i  = Z ∞ −∞ f st−1 i , st i  p (st i) mf(st−1 i ,st i)→st i (st i)dst i . This procedure is repeated forward and backward along the time series of skills until convergence. The backward passes make it possible to propagate information from the future into the past. 4 st−1 W τ≈ st W β≈ pW st−1 L τ≈ st L β≈ pL − d >0 st−1 W τ≈ st W β≈ pW st−1 L τ≈ st L β≈ pL εt−1 L ς≈ εt L >0 + uL − d >0 εt−1 i ς≈ εt i >0 st−1 i τ≈ st i β≈ pi st−1 j τ≈ st j β≈ pj εt−1 j ς≈ εt j >0 + uj − dj <0 + ui − di >0 Figure 1: Factor graphs of single game outcomes for TTT (left) and TTT-D. In the left graph there are three types of variables: skills s, performances p, performance differences d. In the TTT-D graphs there are two additional types: draw margins ε and winning thresholds u. The graphs only require three different types of factors: factor τ≈takes the form N ·; ·, τ 2 , factor > 0 takes the form I (· > 0) and factor ± takes the form I (· ± · = ·). 3.3 TTT with Individual Draw Margins (TTT-D) From exploring the data it is known that the probability of draw not only increases markedly through the history of chess, but is also positively correlated with playing skill and even varies considerably across individual players. We would thus like to extend the TrueSkill model to incorporate another player-specific parameter which indicates a player’s ability to force a draw. Suppose each player i at every time-step t is characterised by an unknown skill st i ∈R and a player-specific draw margin εt i > 0. Again, performances pt ij (k) and pt ji (k) are drawn according to p pt ij (k) |st i  = N pt ij (k) ; st i, β2 . In this model a game outcome yt ij (k) between players i and j at time t is generated as follows: yt ij (k) =    +1 if pt ij (k) > pt ji (k) + εt j −1 if pt ji (k) > pt ij (k) + εt i 0 if −εt i ≤pt ij (k) −pt ji (k) ≤εt j . In addition to the Gaussian assumption about player skills as in the Vanilla TrueSkill model of Section 3.1 we assume a factorising Gaussian distribution for the player-specific draw margins p ε0 i  = N ε0 i ; ν0, ς2 0  and a Gaussian drift of draw margins between time steps given by p εt i|εt−1 i  = N εt; εt−1, ς2 . The factor graph for the case of win/loss is shown in Figure 1 (centre) and for the case of a draw in Figure 1 (right). Note, that the positivity of the player-specific draw margins at each time step t is enforced by a factor > 0 . Inference in the TTT-D model is again performed by expectation propagation, both within a given year t as well as across years in a forward backward manner. Note that in this model the current belief about the skill of a player is represented by four numbers: µt i and σt i for the skill and νt i and ςt i for the player-specific draw margin. Players with a high value of νt i can be thought of as having the ability to achieve a draw against strong players, while players with a high value of µt i have the ability to achieve a win. 5 1850 1872 1894 1916 1938 1960 1982 2004 0 0.5 1 1.5 2 2.5 x 10 5 Year Frequency Figure 2: (Left) Distribution over number of recorded match outcomes played per year in the ChessBase database. (Right) The log-evidence P(y|β, τ) for the TTT model as a function of the variation of player performance, β, and skill dynamics, τ. The maximizing parameter settings are indicated by a black dot. 4 Experiments and Results Our experiments are based on a data-set of chess match outcomes collected by ChessBase1. This database is the largest top-class annotated database in the world and covers more than 3.5 million chess games from 1560 to 2006 played between ≈200,000 unique players. From this database, we selected all the matches between 1850 (the birth of modern Chess) and 2006. This results in 3,505,366 games between 206,059 unique players. Note that a large proportion of games was collected between 1987 and 2006 (see Figure 2 (left)). Our implementation of the TrueSkill through Time algorithms was done in F#2 and builds a factor graph with approximately 11,700,000 variables and 15,200,000 factors (TTT) or 18,500,000 variables and 27,600,000 factors (TTT-D). The whole schedule allocates no more than 6 GB (TTT) or 11 GB (TTT-D) and converges in less than 10 minutes (TTT)/20 minutes (TTT-D) of CPU time on a standard Pentium 4 machine. The code for this analysis will be made publicly available. In the first experiment, we built the TTT model for the above mentioned collection of Chess games. The draw margin was chosen such that the a-priori probability of draw between two equally skilled players matches the overall draw probability of 30.3%. Moreover, the model has a translational invariance in the skills and a scale invariance in β/σ0 and τ/σ0. Thus, we fixed µ0 = 1200, σ0 = 400 and computed the log-evidence L := P(y|β, τ) for varying values of β and τ (see Figure 2 (right)). The plots show that the model is very robust to setting these two parameters except if β is chosen too small. Interestingly, the log-evidence is neither largest for τ ≫0 (complete de-coupling) nor for τ →0 (constant skill over life-time) indicating that it is important to model the dynamics of Chess players. Note that the logevidence is LTTT = −3, 953, 997, larger than that of the naive model (Lnaive = −4, 228, 005) which always predicts 30.3% for a draw and correspondingly for win/loss3. In a second experiment, we picked the optimal values (β∗, τ ∗) = (480, 60) for TTT and optimised the remaining prior and dynamics parameters of TTT-D to arrive at a model with a log-evidence of LTTT−D = −3, 661, 813. In Figure 3 we have plotted the skill evolution for some well–known players of the last 150 years when fitting the TTT model (µt, σt are shown). In Figure 4 the skill evolution of the same players is plotted when fitting the TTT-D model; the dashed lines show µt + εt 1For more information, see http://www.bcmchess.co.uk/softdatafrcb.html. 2For more details, see http://research.microsoft.com/fsharp/fsharp.aspx. 3Leakage due to approximate inference. 6 Figure 3: Skill evolution of top Chess players with TTT; see text for details. whereas the solid lines display µt; for comparisons we added the µt of the TTT model as dotted lines. As a first observation, the uncertainties always grow towards the beginning and end of a career since they are not constrained by past/future years. In fact, for Bobby Fischer the uncertainty grows very large in his 20 years of inactivity (1972–1992). Moreover, there seems to be a noticeable increase in overall skill since the 1980’s. Looking at Figure 4 we see that players have different abilities to force a draw; the strongest player to do so is Boris Spassky (1937–). This ability got stronger after 1975 which explains why the model with a fixed draw margin estimates Spassky’s skill larger. Looking at individual players we see that Paul Morphy (1837–1884), “The Pride and Sorrow of Chess”, is particularly strong when comparing his skill to those of his contemporaries in the next 80 years. He is considered to have been the greatest chess master of his time, and this is well supported by our analysis. “Bobby” Fischer (1943–) tied with Boris Spassky at the age of 17 and later defeated Spassky in the “Match of the Century” in 1972. Again, this is well supported by our model. Note how the uncertainty grows during the 20 years of inactivity (1972–1992) but starts to shrink again in light of the (future) re-match of Spassky and Fischer in 1992 (which Fischer won). Also, Fischer is the only one of these players whose εt decreased over time—when he was active, he was known for the large margin by which he won! Finally, Garry Kasparov (1963–) is considered the strongest Chess player of all time. This is well supported by our analysis. In fact, based on our analysis Kasparov is still considerably stronger than Vladimir Kramnik (1975–) but a contender for the crown of strongest player in the world is Viswanathan Anand (1969–), a former FIDE world champion. 5 Conclusion We have extended the Bayesian rating system TrueSkill to provide player ratings through time on a unified scale. In addition, we introduced a new model that tracks player-specific draw margins and thus models the game outcomes even more precisely. The resulting factor graph model for our large ChessBase database of game outcomes has 18.5 million nodes and 27.6 million factors, thus constituting one of the largest non-trivial Bayesian models ever 7 1850 1858 1866 1875 1883 1891 1899 1907 1916 1924 1932 1940 1949 1957 1965 1973 1981 1990 1998 2006 1500 2000 2500 3000 3500 Anand; Viswanathan Anderssen; Adolf Botvinnik; Mikhail Capablanca; Jose Raul Eichborn; Louis Fischer; Robert James Karpov; Anatoly Kasparov; Garry Kramnik; Vladimir Lasker; Emanuel Morphy; Paul Spassky; Boris V Steinitz; William Year Skill estimate Skill (Variable Draw Margin) Skill + Draw Margin Skill (Fixed Draw Margin) Figure 4: Skill evolution of top Chess players with TTT-D; see text for details. tackled. Full approximate inference takes a mere 20 minutes in our F# implementation and thus demonstrates the efficiency of EP in appropriately structured factor graphs. One of the key questions provoked by this work concerns the comparability of skill estimates across different eras of chess history. Can we directly compare Fischer’s rating in 1972 with Kasparov’s in 1991? Edwards [2] points out that we would not be able to detect any skill improvement if two players of equal skill were to learn about a skill-improving breakthrough in chess theory at the same time but would only play against each other. However, this argument does not rule out the possibility that with more players and chess knowledge flowing less perfectly the improvement may be detectable. After all, we do see a marked improvement in the average skill of the top players. In future work, we would like to address the issue of skill calibration across years further, e.g., by introducing a latent variable for each year that serves as the prior for new players joining the pool. Also, it would be interesting to model the effect of playing white rather than black. References [1] H. A. David. The method of paired comparisons. Oxford University Press, New York, 1988. [2] R. Edwards. Edo historical chess ratings. http://members.shaw.ca/edo1/. [3] A. E. Elo. The rating of chess players: Past and present. Arco Publishing, New York, 1978. [4] M. E. Glickman. A comprehensive guide to chess ratings. Amer. Chess Journal, 3:59–102, 1995. [5] M. E. Glickman. Parameter estimation in large dynamic paired comparison experiments. Applied Statistics, 48:377–394, 1999. [6] R. Herbrich, T. Minka, and T. Graepel. TrueSkill(TM): A Bayesian skill rating system. In Advances in Neural Information Processing Systems 20, 2007. [7] T. Minka. A family of algorithms for approximate Bayesian inference. PhD thesis, MIT, 2001. [8] J. Sonas. Chessmetrics. http://db.chessmetrics.com/. 8
2007
130
3,160
Topmoumoute online natural gradient algorithm Nicolas Le Roux University of Montreal nicolas.le.roux@umontreal.ca Pierre-Antoine Manzagol University of Montreal manzagop@iro.umontreal.ca Yoshua Bengio University of Montreal yoshua.bengio@umontreal.ca Abstract Guided by the goal of obtaining an optimization algorithm that is both fast and yields good generalization, we study the descent direction maximizing the decrease in generalization error or the probability of not increasing generalization error. The surprising result is that from both the Bayesian and frequentist perspectives this can yield the natural gradient direction. Although that direction can be very expensive to compute we develop an efficient, general, online approximation to the natural gradient descent which is suited to large scale problems. We report experimental results showing much faster convergence in computation time and in number of iterations with TONGA (Topmoumoute Online natural Gradient Algorithm) than with stochastic gradient descent, even on very large datasets. Introduction An efficient optimization algorithm is one that quickly finds a good minimum for a given cost function. An efficient learning algorithm must do the same, with the additional constraint that the function is only known through a proxy. This work aims to improve the ability to generalize through more efficient learning algorithms. Consider the optimization of a cost on a training set with access to a validation set. As the end objective is a good solution with respect to generalization, one often uses early stopping: optimizing the training error while monitoring the validation error to fight overfitting. This approach makes the underlying assumption that overfitting happens at the later stages. A better perspective is that overfitting happens all through the learning, but starts being detrimental only at the point it overtakes the “true” learning. In terms of gradients, the gradient of the cost on the training set is never collinear with the true gradient, and the dot product between the two actually eventually becomes negative. Early stopping is designed to determine when that happens. One can thus wonder: can one limit overfitting before that point? Would this actually postpone that point? From this standpoint, we discover new justifications behind the natural gradient [1]. Depending on certain assumptions, it corresponds either to the direction minimizing the probability of increasing generalization error, or to the direction in which the generalization error is expected to decrease the fastest. Unfortunately, natural gradient algorithms suffer from poor scaling properties, both with respect to computation time and memory, when the number of parameters becomes large. To address this issue, we propose a generally applicable online approximation of natural gradient that scales linearly with the number of parameters (and requires computation time comparable to stochastic gradient descent). Experiments show that it can bring significant faster convergence and improved generalization. 1 1 Natural gradient Let eL be a cost defined as eL(θ) = Z L(x, θ)p(x)dx where L is a loss function over some parameters θ and over the random variable x with distribution p(x). The problem of minimizing eL over θ is often encountered and can be quite difficult. There exist various techniques to tackle it, their efficiency depending on L and p. In the case of non-convex optimization, gradient descent is a successful technique. The approach consists in progressively updating θ using the gradient eg = d e L dθ . [1] showed that the parameter space is a Riemannian space of metric eC (the covariance of the gradients), and introduced the natural gradient as the direction of steepest descent in this space. The natural gradient direction is therefore given by eC−1eg. The Riemannian space is known to correspond to the space of functions represented by the parameters (instead of the space of the parameters themselves). The natural gradient somewhat resembles the Newton method. [6] showed that, in the case of a mean squared cost function, the Hessian is equal to the sum of the covariance matrix of the gradients and of an additional term that vanishes to 0 as the training error goes down. Indeed, when the data are generated from the model, the Hessian and the covariance matrix are equal. There are two important differences: the covariance matrix eC is positive-definite, which makes the technique more stable, but contains no explicit second order information. The Hessian allows to account for variations in the parameters. The covariance matrix accounts for slight variations in the set of training samples. It also means that, if the gradients highly disagree in one direction, one should not go in that direction, even if the mean suggests otherwise. In that sense, it is a conservative gradient. 2 A new justification for natural gradient Until now, we supposed we had access to the true distribution p. However, this is usually not the case and, in general, the distribution p is only known through the samples of the training set. These samples define a cost L (resp. a gradient g) that, although close to the true cost (resp. gradient), is not equal to it. We shall refer to L as the training error and to eL as the generalization error. The danger is then to overfit the parameters θ to the training set, yielding parameters that are not optimal with respect to the generalization error. A simple way to fight overfitting consists in determining the point when the continuation of the optimization on L will be detrimental to eL. This can be done by setting aside some samples to form a validation set that will provide an independent estimate of eL. Once the error starts increasing on the validation set, the optimization should be stopped. We propose a different perspective on overfitting. Instead of only monitoring the validation error, we consider using as descent direction an estimate of the direction that maximizes the probability of reducing the generalization error. The goal is to limit overfitting at every stage, with the hope that the optimal point with respect to the validation should have lower generalization error. Consider a descent direction v. We know that if vT eg is negative then the generalization error drops (for a reasonably small step) when stepping in the direction of v. Likewise, if vT g is negative then the training error drops. Since the learning objective is to minimize generalization error, we would like vT eg as small as possible, or at least always negative. By definition, the gradient on the training set is g = 1 n n X i=1 gi where gi = ∂L(xi, θ) ∂θ and n is the number of training samples. With a rough approximation, one can consider the gis as draws from the true gradient distribution and assume all the gradients are independent and identically distributed. The central limit theorem then gives g ∼N eg, eC n ! (1) where eC is the true covariance matrix of ∂L(x,θ) ∂θ wrt p(x). 2 We will now show that, both in the Bayesian setting (with a Gaussian prior) and in the frequentist setting (with some restrictions over the type of gradient considered), the natural gradient is optimal in some sense. 2.1 Bayesian setting In the Bayesian setting, eg is a random variable. We would thus like to define a posterior over eg given the samples gi in order to have a posterior distribution over vT eg for any given direction v. The prior over eg will be a Gaussian centered in 0 of variance σ2I. Thus, using eq. 1, the posterior over eg given the gis (assuming the only information over eg given by the gis is through g and C) is eg|g, eC ∼N   I + eC nσ2 !−1 g,  I σ2 + n eC−1 −1   (2) Denoting eCσ = I + e C nσ2 , we therefore have vT eg|g, eC ∼N vT eC−1 σ g, vT eC−1 σ eCv n ! (3) Using this result, one can choose between several strategies, among which two are of particular interest: • choosing the direction v such that the expected value of vT eg is the lowest possible (to maximize the immediate gain). In this setting, the direction v to choose is v ∝−eC−1 σ g. (4) If σ < ∞, this is the regularized natural gradient. In the case of σ = ∞, eCσ = I and this is the batch gradient descent. • choosing the direction v to minimize the probability of vT eg to be positive. This is equivalent to finding argminv vT eC−1 σ g p vT eC−1 σ eCv (we dropped n for the sake of clarity, since it does not change the result). If we square this quantity and take the derivative with respect to v, we find 2 eC−1 σ g(vT eC−1 σ g)(vT eC−1 σ eCv) − 2 eC−1 σ eCv(vT eC−1 σ g)2 at the numerator. The first term is in the span of eC−1 σ g and the second one is in the span of eC−1 σ eCv. Hence, for the derivative to be zero, we must have g ∝eCv (since eC and eCσ are invertible), i.e. v ∝−eC−1g. (5) This direction is the natural gradient and does not depend on the value of σ. 2.2 Frequentist setting In the frequentist setting, eg is a fixed unknown quantity. For the sake of simplicity, we will only consider (as all second-order methods do) the directions v of the form v = M T g (i.e. we are only allowed to go in a direction which is a linear function of g). Since g ∼N  eg, e C n  , we have vT eg = gT Mg ∼N egT Meg, egT M T eCMeg n ! (6) The matrix M ∗which minimizes the probability of vT eg to be positive satisfies M ∗= argminM egTMeg egT M T CMeg (7) 3 The numerator of the derivative of this quantity is egegT M T eCMegegT −2 eCMegegT MegegT . The first term is in the span of eg and the second one is in the span of eCMeg. Thus, for this derivative to be 0 for all eg, one must have M ∝eC−1 and we obtain the same result as in the Bayesian case: the natural gradient represents the direction minimizing the probability of increasing the generalization error. 3 Online natural gradient The previous sections provided a number of justifications for using the natural gradient. However, the technique has a prohibitive computational cost, rendering it impractical for large scale problems. Indeed, considering p as the number of parameters and n as the number of examples, a direct batch implementation of the natural gradient is O(p2) in space and O(np2 + p3) in time, associated respectively with the gradients’ covariance storage, computation and inversion. This section reviews existing low complexity implementations of the natural gradient, before proposing TONGA, a new low complexity, online and generally applicable implementation suited to large scale problems. In the previous sections we assumed the true covariance matrix eC to be known. In a practical algorithm we of course use an empirical estimate, and here this estimate is furthermore based on a low-rank approximation denoted C (actually a sequence of estimates Ct). 3.1 Low complexity natural gradient implementations [9] proposes a method specific to the case of multilayer perceptrons. By operating on blocks of the covariance matrix, this approach attains a lower computational complexity1. However, the technique is quite involved, specific to multilayer perceptrons and requires two assumptions: Gaussian distributed inputs and a number of hidden units much inferior to that of input units. [2] offers a more general approach based on the Sherman-Morrison formula used in Kalman filters: the technique maintains an empirical estimate of the inversed covariance matrix that can be updated in O(p2). Yet the memory requirement remains O(p2). It is however not necessary to compute the inverse of the gradients’ covariance, since one only needs its product with the gradient. [10] offers two approaches to exploit this. The first uses conjugate gradient descent to solve Cv = g. The second revisits [9] thereby achieving a lower complexity. [8] also proposes an iterative technique based on the minimization of a different cost. This technique is used in the minibatch setting, where Cv can be computed cheaply through two matrix vector products. However, estimating the gradient covariance only from a small number of examples in one minibatch yields unstable estimation. 3.2 TONGA Existing techniques fail to provide an implementation of the natural gradient adequate for the large scale setting. Their main failings are with respect to computational complexity or stability. TONGA was designed to address these issues, which it does this by maintaining a low rank approximation of the covariance and by casting both problems of finding the low rank approximationand of computing the natural gradient in a lower dimensional space, thereby attaining a much lower complexity. What we exploit here is that although a covariance matrix needs many gradients to be estimated, we can take advantage of an observed property that it generally varies smoothly as training proceeds and moves in parameter space. 3.2.1 Computing the natural gradient direction between two eigendecompositions Even though our motivation for the use of natural gradient implied the covariance matrix of the empirical gradients, we will use the second moment (i.e. the uncentered covariance matrix) throughout the paper (and so did Amari in his work). The main reason is numerical stability. Indeed, in the batch setting, we have (assuming C is the centered covariance matrix and g the mean) v = C −1g, thus Cv = g. But then, (C + ggT)v = g + ggT v = g(1 + gTv) and (C + ggT)−1g = v 1 + gT v = ¯v (8) 1Though the technique allows for a compact representation of the covariance matrix, the working memory requirement remains the same. 4 Even though the direction is the same, the scale changes and the norm of the direction is bounded by 1 ∥g∥cos(g,v). Since TONGA operates using a low rank estimate of the gradients’ non-centered covariance, we must be able to update cheaply. When presented with a new gradient, we integrate its information using the following update formula2: Ct = γ ˆCt−1 + gtgT t (9) where C0 = 0 and ˆCt−1 is the low rank approximation at time step t −1. Ct is now likely of greater rank, and the problem resides in computing its low rank approximation ˆCt. Writing ˆCt−1 = Xt−1XT t−1, Ct = XtXT t with Xt = [√γXt−1 gt] With such covariance matrices, computing the (regularized) natural direction vt is equal to vt = (Ct + λI)−1gt = (XtXT t + λI)−1gt (10) vt = (XtXT t + λI)−1Xtyt with yt = [0, . . . 0, 1]T. (11) Using the Woodbury identity with positive definite matrices [7], we have vt = Xt(XT t Xt + λI)−1yt (12) If Xt is of size p × r (with r < p, thus yielding a covariance matrix of rank r), the cost of this computation is O(pr2 + r3). However, since the Gram matrix Gt = XT t Xt can be rewritten as Gt =  γXT t−1Xt−1 √γXT t−1gt √γgT t Xt−1 gT t gt  =  γGt−1 √γXT t−1gt √γgT t Xt−1 gT t gt  , (13) the cost of computing Gt using Gt−1 reduces to O(pr + r3). This stresses the need to keep r small. 3.2.2 Updating the low-rank estimate of Ct To keep a low-rank estimate of Ct = XtXT t , we can compute its eigendecomposition and keep only the first k eigenvectors. This can be made at low cost using its relation to that of Gt: Gt = V DV T Ct = (XtV D−1 2 )D(XtV D−1 2 )T (14) The cost of such an eigendecomposition is O(kr2 + pkr) (for the computation of the eigendecomposition of the Gram matrix and the computation of the eigenvectors, respectively). Since the cost of computing the natural direction is O(pr + r3), it is computationally more efficient to let the rank of Xt grow for several steps (using formula 12 in between) and then compute the eigendecomposition using Ct+b = Xt+bXT t+b with Xt+b = h γUt, γ b−1 2 gt+1, . . . γ 1 2 gt+b−1, γ t+b 2 gt+b] i with Ut the unnormalized eigenvectors computed during the previous eigendecomposition. 3.2.3 Computational complexity The computational complexity of TONGA depends on the complexity of updating the low rank approximation and on the complexity of computing the natural gradient. The cost of updating the approximation is in O(k(k + b)2 + p(k + b)k) (as above, using r = k + b). The cost of computing the natural gradient vt is in O(p(k + b) + (k + b)3) (again, as above, using r = k + b). Assuming k +b ≪ p (p) and k ≤b, TONGA’s total computational cost per each natural gradient computation is then O(pb). Furthermore, by operating on minibatch gradients of size b′, we end up with a cost per example of O( bp b′ ). Choosing b = b′, yields O(p) per example, the same as stochastic gradient descent. Empirical comparison of cpu time also shows comparable CPU time per example, but faster convergence. In our experiments, p was in the tens of thousands, k was less than 5 and b was less than 50. The result is an approximate natural gradient with low complexity, general applicability and flexibility over the tradoff between computations and the quality of the estimate. 2The second term is not weighted by 1−γ so that the influence of gt in Ct is the same for all t, even t = 0.To keep the magnitude of the matrix constant, one must use a normalization constant equal to 1 + γ + . . . + γt. 5 4 Block-diagonal online natural gradient for neural networks One might wonder if there are better approximations of the covariance matrix C than computing its first k eigenvectors. One possibility is a block-diagonal approximation from which to retain only the first k eigenvectors of every block (the value of k can be different for each block). Indeed, [4] showed that the Hessian of a neural network with one hidden layer trained with the cross-entropy cost converges to a block diagonal matrix during optimization. These blocks are composed of the weights linking all the hidden units to one output unit and all the input units to one hidden unit. Given the close relationship between the Hessian and the covariance matrices, we can assume they have a similar shape during the optimization. Figure 1 shows the correlation between the standard stochastic gradients of the parameters of a 16 −50 −26 neural network. The first blocks represent the weights going from the input units to each hidden unit (thus 50 blocks of size 17, bias included) and the following represent the weights going from the hidden units to each output unit (26 blocks of size 51). One can see that the blockdiagonal approximation is reasonable. Thus, instead of selecting only k eigenvectors to represent the full covariance matrix, we can select k eigenvectors for every block, yielding the same total cost. However, the rank of the approximation goes from k to k×number of blocks. In the matrices shown in figure 1, which are of size 2176, a value of k = 5 yields an approximation of rank 380. (a) Stochastic gradient (b) TONGA (c) TONGA - zoom Figure 1: Absolute correlation between the standard stochastic gradients after one epoch in a neural network with 16 input units, 50 hidden units and 26 output units when following stochastic gradient directions (left) and natural gradient directions (center and right). Figure 2 shows the ratio of Frobenius norms ∥C−¯ C∥2 F ∥C∥2 F for different types of approximations ¯C (full or block-diagonal). We can first notice that approximating only the blocks yields a ratio of .35 (in comparison, taking only the diagonal of C yields a ratio of .80), even though we considered only 82076 out of the 4734976 elements of the matrix (1.73% of the total). This ratio is almost obtained with k = 6. We can also notice that, for k < 30, the block-diagonal approximation is much better (in terms of the Frobenius norm) than the full approximation. The block diagonal approximation is therefore very cost effective. 200 400 600 800 1000 1200 1400 1600 1800 2000 0 0.1 0.2 0.3 0.4 0.5 0.6 0.7 0.8 0.9 1 Number k of eigenvectors kept Ratio of the squared Frobenius norms Full matrix approximation Block diagonal approximation (a) Full view 5 10 15 20 25 30 35 40 0.1 0.2 0.3 0.4 0.5 0.6 0.7 0.8 0.9 1 Number k of eigenvectors kept Ratio of the squared Frobenius norms Full matrix approximation Block diagonal approximation (b) Zoom Figure 2: Quality of the approximation ¯C of the covariance C depending on the number of eigenvectors kept (k), in terms of the ratio of Frobenius norms ∥C−¯ C∥2 F ∥C∥2 F , for different types of approximation ¯C (full matrix or block diagonal) 6 This shows the block diagonal approximation constitutes a powerful and cheap approximation of the covariance matrix in the case of neural networks. Yet this approximation also readily applies to any mixture algorithm where we can assume independence between the components. 5 Experiments We performed a small number of experiments with TONGA approximating the full covariance matrix, keeping the overhead of the natural gradient small (ie, limiting the rank of the approximation). Regrettably, TONGA performed only as well as stochastic gradient descent, while being rather sensitive to the hyperparameter values. The following experiments, on the other hand, use TONGA with the block diagonal approximation and yield impressive results. We believe this is a reflection of the phenomenon illustrated in figure 2: the block diagonal approximation makes for a very cost effective approximation of the covariance matrix. All the experiments have been made optimizing hyperparameters on a validation set (not shown here) and selecting the best set of hyperparameters for testing, trying to keep small the overhead due to natural gradient calculations. One could worry about the number of hyperparameters of TONGA. However, default values of k = 5, b = 50 and γ = .995 yielded good results in every experiment. When λ goes to infinity, TONGA becomes the standard stochastic gradient algorithm. Therefore, a simple heuristic for λ is to progressively tune it down. In our experiments, we only tried powers of ten. 5.1 MNIST dataset The MNIST digits dataset consists of 50000 training samples, 10000 validation samples and 10000 test samples, each one composed of 784 pixels. There are 10 different classes (one for every digit). 0 500 1000 1500 2000 2500 3000 3500 4000 4500 0 0.01 0.02 0.03 0.04 0.05 0.06 CPU time (in seconds) Classification error Block diagonal TONGA Stochastic batchsize=1 Stochastic batchsize=400 Stochastic batchsize=1000 Stochastic batchsize=2000 (a) Train class error 0 500 1000 1500 2000 2500 3000 3500 4000 4500 0.015 0.02 0.025 0.03 0.035 0.04 0.045 0.05 0.055 0.06 CPU time (in seconds) Classification error Block diagonal TONGA Stochastic batchsize=1 Stochastic batchsize=400 Stochastic batchsize=1000 Stochastic batchsize=2000 (b) Test class error 0 500 1000 1500 2000 2500 3000 3500 4000 4500 0 0.02 0.04 0.06 0.08 0.1 0.12 0.14 0.16 0.18 0.2 CPU time (in seconds) Negative log−likelihood Block diagonal TONGA Stochastic batchsize=1 Stochastic batchsize=400 Stochastic batchsize=1000 Stochastic batchsize=2000 (c) Train NLL 0 500 1000 1500 2000 2500 3000 3500 4000 4500 0.05 0.1 0.15 0.2 CPU time (in seconds) Negative log−likelihood Block diagonal TONGA Stochastic batchsize=1 Stochastic batchsize=400 Stochastic batchsize=1000 Stochastic batchsize=2000 (d) Test NLL Figure 3: Comparison between stochastic gradient and TONGA on the MNIST dataset (50000 training examples), in terms of training and test classification error and Negative Log-Likelihood (NLL). The mean and standard error have been computed using 9 different initializations. Figure 3 shows that in terms of training CPU time (which includes the overhead due to TONGA), TONGA allows much faster convergence in training NLL, as well as in testing classification error and testing NLL than ordinary stochastic and minibatch gradient descent on this task. One can also note that minibatch stochastic gradient is able to profit from matrix-matrix multiplications, but this advantage is mainly seen in training classification error. 5.2 Rectangles problem The Rectangles-images task has been proposed in [5] to compare deep belief networks and support vector machines. It is a two-class problem and the inputs are 28×28 grey-level images of rectangles located in varying locations and of different dimensions. The inside of the rectangle and the background are extracted from different real images. We used 900,000 training examples and 10,000 validation examples (no early stopping was performed, we show the whole training/validation curves). All the experiments are performed with a multi-layer network with a 784-200-200-100-2 architecture (previously found to work well on this dataset). Figure 4 shows that in terms of training CPU time, TONGA allows much faster convergence than ordinary stochastic gradient descent on this task, as well as lower classification error. 7 0 0.5 1 1.5 2 2.5 3 3.5 x 10 4 0.2 0.25 0.3 0.35 0.4 0.45 0.5 0.55 CPU time (in seconds) Negative log−likelihood on the training set Stochastic gradient Block diagonal TONGA (a) Train NLL error 0 0.5 1 1.5 2 2.5 3 3.5 x 10 4 0.06 0.08 0.1 0.12 0.14 0.16 0.18 0.2 CPU time (in seconds) Negative log−likelihood on the test set Stochastic gradient Block diagonal TONGA (b) Test NLL error 0 0.5 1 1.5 2 2.5 3 3.5 x 10 4 0.2 0.25 0.3 0.35 0.4 0.45 0.5 CPU time (in seconds) Classification error on the training set Stochastic gradient Block diagonal TONGA (c) Train class error 0 0.5 1 1.5 2 2.5 3 3.5 x 10 4 0.06 0.08 0.1 0.12 0.14 0.16 0.18 0.2 CPU time (in seconds) Classification error on the test set Stochastic gradient Block diagonal TONGA (d) Test class error Figure 4: Comparison between stochastic gradient descent and TONGA w.r.t. NLL and classification error, on training and validation sets for the rectangles problem (900,000 training examples). 6 Discussion [3] reviews the different gradient descent techniques in the online setting and discusses their respective properties. Particularly, he states that a second order online algorithm (i.e., with a search direction of is v = Mg with g the gradient and M a positive semidefinite matrix) is optimal (in terms of convergence speed) when M converges to H −1. Furthermore, the speed of convergence depends (amongst other things) on the rank of the matrix M. Given the aforementioned relationship between the covariance and the Hessian matrices, the natural gradient is close to optimal in the sense defined above, provided the model has enough capacity. On mixture models where the block-diagonal approximation is appropriate, it allows us to maintain an approximation of much higher rank than a standard low-rank approximation of the full covariance matrix. Conclusion and future work We bring two main contributions in this paper. First, by looking for the descent direction with either the greatest probability of not increasing generalization error or the direction with the largest expected increase in generalization error, we obtain new justifications for the natural gradient descent direction. Second, we present an online low-rank approximation of natural gradient descent with computational complexity and CPU time similar to stochastic gradientr descent. In a number of experimental comparisons we find this optimization technique to beat stochastic gradient in terms of speed and generalization (or in generalization for a given amount of training time). Even though default values for the hyperparameters yield good results, it would be interesting to have an automatic procedure to select the best set of hyperparameters. References [1] S. Amari. Natural gradient works efficiently in learning. Neural Computation, 10(2):251–276, 1998. [2] S. Amari, H. Park, and K. Fukumizu. Adaptive method of realizing natural gradient learning for multilayer perceptrons. Neural Computation, 12(6):1399–1409, 2000. [3] L. Bottou. Stochastic learning. In O. Bousquet and U. von Luxburg, editors, Advanced Lectures on Machine Learning, number LNAI 3176 in Lecture Notes in Artificial Intelligence, pages 146–168. Springer Verlag, Berlin, 2004. [4] R. Collobert. Large Scale Machine Learning. PhD thesis, Universit´e de Paris VI, LIP6, 2004. [5] 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 Twenty-fourth International Conference on Machine Learning (ICML’2007), 2007. [6] Y. LeCun, L. Bottou, G. Orr, and K.-R. M¨uller. Efficient backprop. In G. Orr and K.-R. M¨uller, editors, Neural Networks: Tricks of the Trade, pages 9–50. Springer, 1998. [7] K. B. Petersen and M. S. Pedersen. The matrix cookbook, feb 2006. Version 20051003. [8] N. N. Schraudolph. Fast curvature matrix-vector products for second-order gradient descent. Neural Computation, 14(7):1723–1738, 2002. [9] H. H. Yang and S. Amari. Natural gradient descent for training multi-layer perceptrons. Submitted to IEEE Tr. on Neural Networks, 1997. [10] H. H. Yang and S. Amari. Complexity issues in natural gradient descent method for training multi-layer perceptrons. Neural Computation, 10(8):2137–2157, 1998. 8
2007
131
3,161
Learning the structure of manifolds using random projections Yoav Freund ∗ UC San Diego Sanjoy Dasgupta † UC San Diego Mayank Kabra UC San Diego Nakul Verma UC San Diego Abstract We present a simple variant of the k-d tree which automatically adapts to intrinsic low dimensional structure in data. 1 Introduction The curse of dimensionality has traditionally been the bane of nonparametric statistics, as reflected for instance in convergence rates that are exponentially slow in dimension. An exciting way out of this impasse is the recent realization by the machine learning and statistics communities that in many real world problems the high dimensionality of the data is only superficial and does not represent the true complexity of the problem. In such cases data of low intrinsic dimension is embedded in a space of high extrinsic dimension. For example, consider the representation of human motion generated by a motion capture system. Such systems typically track marks located on a tight-fitting body suit. The number of markers, say N, is set sufficiently large in order to get dense coverage of the body. A posture is represented by a (3N)-dimensional vector that gives the 3D location of each of the N marks. However, despite this seeming high dimensionality, the number of degrees of freedom is relatively small, corresponding to the dozen-or-so joint angles in the body. The marker positions are more or less deterministic functions of these joint angles. Thus the data lie in R3N, but on (or very close to) a manifold [4] of small dimension. In the last few years, there has been an explosion of research investigating methods for learning in the context of low-dimensional manifolds. Some of this work (for instance, [2]) exploits the low intrinsic dimension to improve the convergence rate of supervised learning algorithms. Other work (for instance, [12, 11, 1]) attempts to find an embedding of the data into a low-dimensional space, thus finding an explicit mapping that reduces the dimensionality. In this paper, we describe a new way of modeling data that resides in RD but has lower intrinsic dimension d < D. Unlike many manifold learning algorithms, we do not attempt to find a single unified mapping from RD to Rd. Instead, we hierarchically partition RD into pieces in a manner that is provably sensitive to low-dimensional structure. We call this spatial data structure a random projection tree (RP tree). It can be thought of as a variant of the k-d tree that is provably manifoldadaptive. k-d trees, RP trees, and vector quantization Recall that a k-d tree [3] partitions RD into hyperrectangular cells. It is built in a recursive manner, splitting along one coordinate direction at a time. The succession of splits corresponds to a binary tree whose leaves contain the individual cells in RD. These trees are among the most widely-used methods for spatial partitioning in machine learning and computer vision. ∗Corresponding author: yfreund@cs.ucsd.edu. †Dasgupta and Verma acknowledge the support of NSF, under grants IIS-0347646 and IIS-0713540. 1 Figure 1: Left: A spatial partitioning of R2 induced by a k-d tree with three levels. The dots are data vectors; each circle represents the mean of the vectors in one cell. Right: Partitioning induced by an RP tree. On the left part of Figure 1 we illustrate a k-d tree for a set of vectors in R2. The leaves of the tree partition RD into cells; given a query point q, the cell containing q is identified by traversing down the k-d tree. Each cell can be thought of as having a representative vector: its mean, depicted in the figure by a circle. The partitioning together with these mean vectors define a vector quantization (VQ) of R2: a mapping from R2 to a finite set of representative vectors (called a “codebook” in the context of lossy compression methods). A good property of this tree-structured vector quantization is that a vector can be mapped efficiently to its representative. The design goal of VQ is to minimize the error introduced by replacing vectors with their representative. We quantify the VQ error by the average squared Euclidean distance between a vector in the set and the representative vector to which it is mapped. This error is closely related (in fact, proportional) to the average diameter of cells, that is, the average squared distance between pairs of points in a cell.1 As the depth of the k-d tree increases the diameter of the cells decreases and so does the VQ error. However, in high dimension, the rate of decrease of the average diameter can be very slow. In fact, as we show in the supplementary material, there are data sets in RD for which a k-d tree requires D levels in order to halve the diameter. This slow rate of decrease of cell diameter is fine if D = 2 as in Figure 1, but it is disastrous if D = 1000. Constructing 1000 levels of the tree requires 21000 data points! This problem is a real one that has been observed empirically: k-d trees are prone to a curse of dimensionality. What if the data have low intrinsic dimension? In general, k-d trees will not be able to benefit from this; in fact the bad example mentioned above has intrinsic dimension d = 1. But we show that a simple variant of the k-d tree does indeed decrease cell diameters much more quickly. Instead of splitting along coordinate directions, we use randomly chosen unit vectors, and instead of splitting data exactly at the median, we use a more carefully chosen split point. We call the resulting data structure a random projection tree (Figure 1, right) and we show that it admits the following theoretical guarantee (formal statement is in the next section). Pick any cell C in the RP tree, and suppose the data in C have intrinsic dimension d. Pick a descendant cell ≥d levels below; then with constant probability, this descendant has average diameter at most half that of C.2 There is no dependence at all on the extrinsic dimensionality (D) of the data. We thus have a vector quantization construction method for which the diameter of the cells depends on the intrinsic dimension, rather than the extrinsic dimension of the data. A large part of the benefit of RP trees comes from the use of random unit directions, which is rather like running k-d trees with a preprocessing step in which the data are projected into a random 1This is in contrast to the max diameter, the maximum distance between two vectors in a cell. 2Here the probability is taken over the randomness in constructing the tree. 2 low-dimensional subspace. In fact, a recent experimental study of nearest neighbor algorithms [8] observes that a similar pre-processing step improves the performance of nearest neighbor schemes based on spatial data structures. Our work provides a theoretical explanation for this improvement and shows both theoretically and experimentally that this improvement is significant. The explanation we provide is based on the assumption that the data has low intrinsic dimension. Another spatial data structure based on random projections is the locality sensitive hashing scheme [6]. Manifold learning and near neighbor search The fast rate of diameter decrease in random projection trees has many consequences beyond the quality of vector quantization. In particular, the statistical theory of tree-based statistical estimators — whether used for classification or regression — is centered around the rate of diameter decrease; for details, see for instance Chapter 20 of [7]. Thus RP trees generically exhibit faster convergence in all these contexts. Another case of interest is nearest neighbor classification. If the diameter of cells is small, then it is reasonable to classify a query point according to the majority label in its cell. It is not necessary to find the nearest neighbor; after all, the only thing special about this point is that it happens to be close to the query. The classical work of Cover and Hart [5] on the Bayes risk of nearest neighbor methods applies equally to the majority vote in a small enough cell. Figure 2: Distributions with low intrinsic dimension. The purple areas in these figures indicate regions in which the density of the data is significant, while the complementary white areas indicate areas where data density is very low. The left figure depicts data concentrated near a one-dimensional manifold. The ellipses represent mean+PCA approximations to subsets of the data. Our goal is to partition data into small diameter regions so that the data in each region is well-approximated by its mean+PCA. The right figure depicts a situation where the dimension of the data is variable. Some of the data lies close to a one-dimensional manifold, some of the data spans two dimensions, and some of the data (represented by the red dot) is concentrated around a single point (a zero-dimensional manifold). Finally, we return to our original motivation: modeling data which lie close to a low-dimensional manifold. In the literature, the most common way to capture this manifold structure is to create a graph in which nodes represent data points and edges connect pairs of nearby points. While this is a natural representation, it does not scale well to very large datasets because the computation time of closest neighbors grows like the square of the size of the data set. Our approach is fundamentally different. Instead of a bottom-up strategy that starts with individual data points and links them together to form a graph, we use a top-down strategy that starts with the whole data set and partitions it, in a hierarchical manner, into regions of smaller and smaller diameter. Once these individual cells are small enough, the data in them can be well-approximated by an affine subspace, for instance that given by principal component analysis. In Figure 2 we show how data in two dimensions can be approximated by such a set of local ellipses. 2 The RP tree algorithm 2.1 Spatial data structures In what follows, we assume the data lie in RD, and we consider spatial data structures built by recursive binary splits. They differ only in the nature of the split, which we define in a subroutine 3 called CHOOSERULE. The core tree-building algorithm is called MAKETREE, and takes as input a data set S ⊂RD. procedure MAKETREE(S) if |S| < MinSize then return (Leaf) else      Rule ←CHOOSERULE(S) LeftTree ←MAKETREE({x ∈S : Rule(x) = true}) RightTree ←MAKETREE({x ∈S : Rule(x) = false}) return ([Rule, LeftTree, RightTree]) A natural way to try building a manifold-adaptive spatial data structure is to split each cell along its principal component direction (for instance, see [9]). procedure CHOOSERULE(S) comment: PCA tree version let u be the principal eigenvector of the covariance of S Rule(x) := x · u ≤median({z · u : z ∈S}) return (Rule) This method will do a good job of adapting to low intrinsic dimension (details omitted). However, it has two significant drawbacks in practice. First, estimating the principal eigenvector requires a significant amount of data; recall that only about 1/2k fraction of the data winds up at a cell at level k of the tree. Second, when the extrinsic dimension is high, the amount of memory and computation required to compute the dot product between the data vectors and the eigenvectors becomes the dominant part of the computation. As each node in the tree is likely to have a different eigenvector this severely limits the feasible tree depth. We now show that using random projections overcomes these problems while maintaining the adaptivity to low intrinsic dimension. 2.2 Random projection trees We shall see that the key benefits of PCA-based splits can be realized much more simply, by picking random directions. To see this pictorially, consider data that is concentrated on a subspace, as in the following figure. PCA will of course correctly identify this subspace, and a split along the principal eigenvector u will do a good job of reducing the diameter of the data. But a random direction v will also have some component in the direction of u, and splitting along the median of v will not be all that different from splitting along u. Figure 3: Intuition: a random direction is almost as good as the principal eigenvector. Now only medians need to be estimated, not principal eigenvectors; this significantly reduces the data requirements. Also, we can use the same random projection in different places in the tree; all we need is to choose a large enough set of projections that, with high probability, there is be a good projection direction for each node in the tree. In our experience setting the number of projections equal to the depth of the tree is sufficient. Thus, for a tree of depth k, we use only k projection vectors v, as opposed to 2k with a PCA tree. When preparing data to train a tree we can compute the k projection values before building the tree. This also reduces the memory requirements for the training set, as we can replace each high dimensional data point with its k projection values (typically we use 10 ≤k ≤20). We now define RP trees formally. For a cell containing points S, let ∆(S) be the diameter of S (the distance between the two furthest points in the set), and ∆A(S) the average diameter, that is, the 4 average distance between points of S: ∆2 A(S) = 1 |S|2 X x,y∈S ∥x −y∥2 = 2 |S| X x∈S ∥x −mean(S)∥2. We use two different types of splits: if ∆2(S) is less than c∆2 A(S) (for some constant c) then we use the hyperplane split discussed above. Otherwise, we split S into two groups based on distance from the mean. procedure CHOOSERULE(S) comment: RP tree version if ∆2(S) ≤c · ∆2 A(S) then                    choose a random unit direction v sort projection values: a(x) = v · x ∀x ∈S, generating the list a1 ≤a2 ≤· · · ≤an for i = 1, . . . , n −1 compute ( µ1 = 1 i Pi j=1 aj, µ2 = 1 n−i Pn j=i+1 aj ci = Pi j=1(aj −µ1)2 + Pn j=i+1(aj −µ2)2 find i that minimizes ci and set θ = (ai + ai+1)/2 Rule(x) := v · x ≤θ else {Rule(x) := ∥x −mean(S)∥≤median{∥z −mean(S)∥: z ∈S} return (Rule) In the first type of split, the data in a cell are projected onto a random direction and an appropriate split point is chosen. This point is not necessarily the median (as in k-d trees), but rather the position that maximally decreases average squared interpoint distance. In Figure 4.4, for instance, splitting the bottom cell at the median would lead to a messy partition, whereas the RP tree split produces two clean, connected clusters. Figure 4: An illustration of the RP-Tree algorithm. 1: The full data set and the PCA ellipse that approximates it. 2: The first level split. 3: The two PCA ellipses corresponding to the two cells after the first split. 4: The two splits in the second level. 5: The four PCA ellipses for the cells at the third level. 6: The four splits at the third level. As the cells get smaller, their individual PCAs reveal 1D manifold structure. Note: the ellipses are for comparison only; the RP tree algorithm does not look at them. The second type of split, based on distance from the mean of the cell, is needed to deal with cases in which the cell contains data at very different scales. In Figure 2, for instance, suppose that the vast majority of data is concentrated at the singleton “0-dimensional” point. If only splits by projection were allowed, then a large number of splits would be devoted to uselessly subdividing this point mass. The second type of split separates it from the rest of the data in one go. For a more concrete example, suppose that the data are image patches. A large fraction of them might be “empty” background patches, in which case they’d fall near the center of the cell in a very tight cluster. The 5 remaining image patches will be spread out over a much larger space. The effect of the split is then to separate out these two clusters. 2.3 Theoretical foundations In analyzing RP trees, we consider a statistical notion of dimension: we say set S has local covariance dimension (d, ϵ) if (1−ϵ) fraction of the variance is concentrated in a d-dimensional subspace. To make this precise, start by letting σ2 1 ≥σ2 2 ≥· · · ≥σ2 D denote the eigenvalues of the covariance matrix; these are the variances in each of the eigenvector directions. Definition 1 S ⊂RD has local covariance dimension (d, ϵ) if the largest d eigenvalues of its covariance matrix satisfy σ2 1 + · · · + σ2 d ≥(1 −ϵ) · (σ2 1 + · · · + σ2 D). (Note that σ2 1 + · · · + σ2 D = (1/2)∆2 A(S).) Now, suppose an RP tree is built from a data set X ⊂RD, not necessarily finite. Recall that there are two different types of splits; let’s call them splits by distance and splits by projection. Theorem 2 There are constants 0 < c1, c2, c3 < 1 with the following property. Suppose an RP tree is built using data set X ⊂RD. Consider any cell C for which X ∩C has local covariance dimension (d, ϵ), where ϵ < c1. Pick a point x ∈S ∩C at random, and let C′ be the cell that contains it at the next level down. • If C is split by distance then E [∆(S ∩C′)] ≤c2∆(S ∩C). • If C is split by projection, then E  ∆2 A(S ∩C′)  ≤  1 −c3 d  ∆2 A(S ∩C). In both cases, the expectation is over the randomization in splitting C and the choice of x ∈S ∩C. As a consequence, the expected average diameter of cells is halved every O(d) levels. The proof of this theorem is in the supplementary material, along with even stronger results for different notions of dimension. 3 Experimental Results 3.1 A streaming version of the algorithm The version of the RP algorithm we use in practice differs from the one above in three ways. First of all, both splits operate on the projected data; for the second type of split (split by distance), data that fall in an interval around the median are separated from data outside that interval. Second, the tree is built in a streaming manner: that is, the data arrive one at a time, and are processed (to update the tree) and immediately discarded. This is managed by maintaining simple statistics at each internal node of the tree and updating them appropriately as the data streams by (more details in the supplementary matter). The resulting efficiency is crucial to the large-scale applications we have in mind. Finally, instead of choosing a new random projection in each cell, a dictionary of a few random projections is chosen at the outset. In each cell, every one of these projections is tried out and the best one (that gives the largest decrease in ∆2 A(S)) is retained. This last step has the effect of boosting the probability of a good split. 3.2 Synthetic datasets We start by considering two synthetic datasets that illustrate the shortcomings of k-d trees. We will see that RP trees adapt well to such cases. For the first dataset, points x1, . . . , xn ∈RD are generated by the following process: for each point xi, 6 1 2 3 4 5 950 1000 1050 1100 1150 1200 1250 1300 1350 Levels Avg VQ Error k−d Tree (random coord) k−d Tree (max var coord) RP Tree PCA Tree 1 2 3 4 5 1000 1200 1400 1600 1800 2000 Levels Avg VQ Error k−d Tree (random coord) k−d Tree (max var coord) RP Tree PCA Tree Figure 5: Performance of RP trees with k-d trees on first synthetic dataset (left) and the second synthetic dataset (right) • choose pi uniformly at random from [0, 1], and • select each coordinate xij independently from N(pi, 1). For the second dataset, we choose n points from two D-dimensional Gaussians (with equal probability) with means at (−1, −1, . . . , −1) and (1, 1, . . . , 1), and identity covariances. We compare the performance of different trees according to the average VQ error they incur at various levels. We consider four types of trees: (1) k-d trees in which the coordinate for a split is chosen at random; (2) k-d trees in which at each split, the best coordinate is chosen (the one that most improves VQ error); (3) RP trees; and (4) for reference, PCA trees. Figure 5 shows the results for the two datasets (D = 1,000 and n = 10,000) averaged over 15 runs. In both cases, RP trees outperform both k-d tree variants and are close to the performance of PCA trees without having to explicitly compute any principal components. 3.3 MNIST dataset We next demonstrate RP trees on the all-familiar MNIST dataset of handwritten digits. This dataset consists of 28 × 28 grayscale images of the digits zero through nine, and is believed to have low intrinsic dimension (for instance, see [10]). We restrict our attention to digit 1 for this discussion. Figure 6 (top) shows the first few levels of the RP tree for the images of digit 1. Each node is represented by the mean of the datapoints falling into that cell. Hence, the topmost node shows the mean of the entire dataset; its left and the right children show the means of the points belonging to their respective partitions, and so on. The bar underneath each node shows the fraction of points going to the left and to the right, to give a sense of how balanced each split is. Alongside each mean, we also show a histogram of the 20 largest eigenvalues of the covariance matrix, which reveal how closely the data in the cell is concentrated near a low-dimensional subspace. The last bar in the histogram is the variance unaccounted for. Notice that most of the variance lies in a small number of directions, as might be expected. And this rapidly becomes more pronounced as we go further down in the tree. Hence, very quickly, the cell means become good representatives of the dataset: an experimental corroboration that RP trees adapt to the low intrinsic dimension of the data. This is also brought out in Figure 6 (bottom), where the images are shown projected onto the plane defined by their top two principal components. (The outer ring of images correspond to the linear combinations of the two eigenvectors at those locations in the plane.) The left image shows how the data was split at the topmost level (dark versus light). Observe that this random cut is actually quite close to what the PCA split would have been, corroborating our earlier intuition (recall Figure 3). The right image shows the same thing, but for the first two levels of the tree: data is shown in four colors corresponding to the four different cells. 7 Figure 6: Top: Three levels of the RP tree for MNIST digit 1. Bottom: Images projected onto the first two principal components. Colors represent different cells in the RP tree, after just one split (left) or after two levels of the tree (right). References [1] M. Belkin and P. Niyogi. Laplacian eigenmaps for dimensionality reduction and data representation. Neural Computation, 15(6):1373–1396, 2003. [2] M. Belkin, P. Niyogi, and V. Sindhwani. On manifold regularization. Conference on AI and Statistics, 2005. [3] J. Bentley. Multidimensional binary search trees used for associative searching. Communications of the ACM, 18(9):509–517, 1975. [4] W. Boothby. An Introduction to Differentiable Manifolds and Riemannian Geometry. Academic Press, 2003. [5] T. M. Cover and P. E. Hart. Nearest neighbor pattern classifications. IEEE Transactions on Information Theory, 13(1):21–27, 1967. [6] M. Datar, N. Immorlica, P. Indyk, and V. Mirrokni. Locality sensitive hashing scheme based on p-stable distributions. Symposium on Computational Geometry, 2004. [7] L. Devroye, L. Gyorfi, and G. Lugosi. A Probabilistic Theory of Pattern Recognition. Springer, 1996. [8] T. Liu, A. Moore, A. Gray, and K. Yang. An investigation of practical approximate nearest neighbor algorithms. Advances in Neural Information Processing Systems, 2004. [9] J. McNames. A fast nearest neighbor algorithm based on a principal axis search tree. IEEE Transactions on Pattern Analysis and Machine Intelligence, 23(9):964–976, 2001. [10] M. Raginsky and S. Lazebnik. Estimation of intrinsic dimensionality using high-rate vector quantization. Advances in Neural Information Processing Systems, 18, 2006. [11] S. Roweis and L. Saul. Nonlinear dimensionality reduction by locally linear embedding. Science, 290:2323–2326, 2000. [12] J. Tenenbaum, V. de Silva, and J. Langford. A global geometric framework for nonlinear dimensionality reduction. Science, 290(5500):2319–2323, 2000. 8
2007
132
3,162
Learning Monotonic Transformations for Classification Andrew G. Howard Department of Computer Science Columbia University New York, NY 10027 ahoward@cs.columbia.edu Tony Jebara Department of Computer Science Columbia University New York, NY 10027 jebara@cs.columbia.edu Abstract A discriminative method is proposed for learning monotonic transformations of the training data while jointly estimating a large-margin classifier. In many domains such as document classification, image histogram classification and gene microarray experiments, fixed monotonic transformations can be useful as a preprocessing step. However, most classifiers only explore these transformations through manual trial and error or via prior domain knowledge. The proposed method learns monotonic transformations automatically while training a large-margin classifier without any prior knowledge of the domain. A monotonic piecewise linear function is learned which transforms data for subsequent processing by a linear hyperplane classifier. Two algorithmic implementations of the method are formalized. The first solves a convergent alternating sequence of quadratic and linear programs until it obtains a locally optimal solution. An improved algorithm is then derived using a convex semidefinite relaxation that overcomes initialization issues in the greedy optimization problem. The effectiveness of these learned transformations on synthetic problems, text data and image data is demonstrated. 1 Introduction Many fields have developed heuristic methods for preprocessing data to improve performance. This often takes the form of applying a monotonic transformation prior to using a classification algorithm. For example, when the bag of words representation is used in document classification, it is common to take the square root of the term frequency [6, 5]. Monotonic transforms are also used when classifying image histograms. In [3], transformations of the form xa where 0 ≤a ≤1 are demonstrated to improve performance. When classifying genes from various microarray experiments it is common to take the logarithm of the gene expression ratio [2]. Monotonic transformations can also capture crucial properties of the data such as threshold and saturation effects. In this paper, we propose to simultaneously learn a hyperplane classifier and a monotonic transformation. The solution produced by our algorithm is a piecewise linear monotonic function and a maximum margin hyperplane classifier similar to a support vector machine (SVM) [4]. By allowing for a richer class of transforms learned at training time (as opposed to a rule of thumb applied during preprocessing), we improve classification accuracy. The learned transform is specifically tuned to the classification task. The main contributions of this paper include, a novel framework for estimating a monotonic transformation and a hyperplane classifier simultaneously at training time, an efficient method for finding a ,1 nx ,2 nx , n D x ny b 1 w 2 w D w Figure 1: Monotonic transform applied to each dimension followed by a hyperplane classifier. locally optimal solution to the problem, and a convex relaxation to find a globally optimal approximate solution. The paper is organized as follows. In section 2, we present our formulation for learning a piecewise linear monotonic function and a hyperplane. We show how to learn this combined model through an iterative coordinate ascent optimization using interleaved quadratic and linear programs to find a local minimum. In section 3, we derive a convex relaxation based on Lasserre’s method [8]. In section 4 synthetic experiments as well as document and image classification problems demonstrate the diverse utility of our method. We conclude with a discussion and future work. 2 Learning Monotonic Transformations For an unknown distribution P(⃗x, y) over inputs ⃗x ∈ℜd and labels y ∈{−1, 1}, we assume that there is an unknown nuisance monotonic transformation Φ(x) and unknown hyperplane parameterized by ⃗w and b such that predicting with f(x) = sign(⃗wT Φ(⃗x) + b) yields a low expected test error R = R 1 2|y −f(x)|dP(⃗x, y). We would like to recover Φ(⃗x), ⃗w, b from a labeled training set S = {(⃗x1, y1), . . . , (⃗xN, yN)} which is sampled i.i.d. from P(⃗x, y). The transformation acts elementwise as can be seen in Figure 1. We propose to learn both a maximum margin hyperplane and the unknown transform Φ(x) simultaneously. In our formulation, Φ(x) is a piecewise linear function that we parameterize with a set of K knots {z1, . . . , zK} and associated positive weights {m1, . . . , mK} where zj ∈ℜand mj ∈ℜ+. The transformation can be written as Φ(x) = PK j=1 mjφj(x) where φj(x) are truncated ramp functions acting on vectors and matrices elementwise as follows: φj(x) =    0 x ≤zj x−zj zj+1−zj zj < x < zj+1 1 zj+1 ≤x (1) This is a less common way to parameterize piecewise linear functions. The positivity constraints enforce monotonicity on Φ(x) for all x. A more common method is to parameterize the function value Φ(z) at each knot z and apply order constraints between subsequent knots to enforce monotonicity. Values in between knots are found through linear interpolation. This is the method used in isotonic regression [10], but in practice, these are equivalent formulations. Using truncated ramp functions is preferable for numerous reasons. They can be easily precomputed and are sparse. Once precomputed, most calculations can be done via sparse matrix multiplications. The positivity constraints on the weights ⃗m will also yield a simpler formulation than order constraints and interpolation which becomes important in subsequent relaxation steps. Figure 2a shows the truncated ramp function associated with knot z1. Figure 2b shows a conic combination of truncated ramps that builds a piecewise linear monotonic function. Combining this with the support vector machine formulation leads us to the following learning problem: z1 z2 0 0.2 0.4 0.6 0.8 1 z1 z2 z3 z4 z5 m1 m1+m2 m1+m2+m3 m1+m2+m3+m4 m1+m2+m3+m4+m5 a) Truncated ramp function φ1(x). b) Φ(x) = P5 j=1 mjφj(x). Figure 2: Building blocks for piecewise linear functions. min ⃗w,⃗ξ,b,⃗m ∥⃗w∥2 2 + C N X i=1 ξi (2) subject to yi   * ⃗w, K X j=1 mjφj(⃗xi) + + b  ≥1 −ξi ∀i ξi ≥0, mj ≥0, X j mj ≤1 ∀i, j where ⃗ξ are the standard SVM slack variables, ⃗w and b are the maximum margin solution for the training set that has been transformed via Φ(x) with learned weights ⃗m. Before training, the knot locations are chosen at the empirical quantiles so that they are evenly spaced in the data. This problem is nonconvex due to the quadratic term involving ⃗w and ⃗m in the classification constraints. Although it is difficult to find a globally optimal solution, the structure of the problem suggests a simple method for finding a locally optimal solution. We can divide the problem into two convex subproblems. This amounts to solving a support vector machine for ⃗w and b with a fixed Φ(x) and alternatively solving for Φ(x) as a linear program with the SVM solution fixed. In both subproblems, we optimize over ⃗ξ as it is part of the hinge loss. This yields an efficient convergent optimization method. However, this method can get stuck in local minima. In practice, we initialize it with a linear Φ(x) and iterate from there. Alternative initializations do not yield much help. This leads us to look for a method to efficiently find global solutions. 3 Convex Relaxation When faced with a nonconvex quadratic problem, an increasingly popular technique is to relax it into a convex one. Lasserre [8] proposed a sequence of convex relaxations for these types of nonconvex quadratic programs. This method replaces all quadratic terms in the original optimization problem with entries in a matrix. In its simplest form this matrix corresponds to the outer product of the the original variables with rank one and semidefinite constraints. The relaxation comes from dropping the rank one constraint on the outer product matrix. Lasserre proposed more elaborate relaxations using higher order moments of the variables. However, we mainly use the first moment relaxation along with a few of the second order moment constraints that do not require any additional variables beyond the outer product matrix. A convex relaxation could be derived directly from the primal formulation of our problem. Both ⃗w and ⃗m would be relaxed as they interact in the nonconvex quadratic terms. Unfortunately, this yields a semidefinite constraint that scales with both the number of knots and the dimensionality of the data. This is troublesome because we wish to work with high dimensional data such as a bag of words representation for text. However, if we first find the dual formulation for ⃗w, b, and ⃗ξ, we only have to relax ⃗m which yields both a tighter relaxation and a less computationally intensive problem. Finding the dual leaves us with the following min max saddle point problem that will be subsequently relaxed and transformed into a semidefinite program: min ⃗m max ⃗α 2⃗αT⃗1 −⃗αT  Y  X i,j mimjφi(X)T φj(X)  Y  ⃗α (3) 0 ≤αi ≤C, ⃗αT ⃗y = 0, mj ≥0, X j mj ≤1 ∀i, j where ⃗1 is a vector of ones, ⃗y is a vector of the labels, Y = diag(⃗y) is a matrix with the labels on its diagonal with zeros elsewhere, and X is a matrix with ⃗xi in the ith column. We introduce the relaxation via the substitution M = ¯m ¯mT and constraint M ⪰0 where ¯m is constructed by concatenating 1 with ⃗m. We can then transform the relaxed min max problem into a semidefinite program similar to the multiple kernel learning framework [7] by finding the dual with respect to ⃗α and using the Schur complement lemma to generate a linear matrix inequality [1]: min M,t,λ,⃗ν,⃗δ t (4) subject to Y P i,j Mi,jφi(X)T φj(X)Y ⃗1 + ⃗ν −⃗δ + λ⃗y (⃗1 + ⃗ν −⃗δ + λ⃗y)T t −2C⃗δT⃗1 ! ⪰0 M ⪰0, M ≥0, M¯1 ≤⃗0, M0,0 = 1,⃗ν ≥⃗0,⃗δ ≥⃗0 where ⃗0 is a vector of zeros and ¯1 is a vector with −1 in the first dimension and ones in the rest. The variables λ, ⃗ν, ⃗δ arise from the dual transformation. This relaxation is exact if M is a rank one matrix. The above can be seen as a generalization of the multiple kernel learning framework. Instead of learning a kernel from a combination of kernels, we are learning a combination of inner products of different functions applied to our data. In our case, these are truncated ramp functions. The terms φi(X)T φj(X) are not Mercer kernels except when i = j. This more general combination requires the stricter constraints that the mixing weights M form a positive semidefinite matrix, a constraint which is introduced via the relaxation. This is a sufficient condition for the resulting matrix P i,j Mi,jφi(X)T φj(X) to also be positive semidefinite. When using this relaxation, we can recover the monotonic transform by using the first column (row) as the mixing weights, ⃗m, of the truncated ramp functions. In practice, however, we use the learned kernel in our predictions k(⃗x, ⃗x′) = P i,j Mi,jφi(⃗x)T φj(⃗x′). 4 Experiments 4.1 Synthetic Experiment In this experiment we will demonstrate our method’s ability to recover a monotonic transformation from data. We sampled data near a linear decision boundary and generated labels based on this boundary. We then applied a strictly monotonic function to this sampled data. The training set is made up of the transformed points and the original labels. A linear algorithm will have difficulty because the mapped data is not linearly separable. However, 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 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 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 a) b) c) 0 0.1 0.2 0.3 0.4 0.5 0.6 0.7 0.8 0.9 1 0 0.1 0.2 0.3 0.4 0.5 0.6 0.7 0.8 0.9 1 0 0.1 0.2 0.3 0.4 0.5 0.6 0.7 0.8 0.9 1 0 0.1 0.2 0.3 0.4 0.5 0.6 0.7 0.8 0.9 1 0 0.1 0.2 0.3 0.4 0.5 0.6 0.7 0.8 0.9 1 0 0.1 0.2 0.3 0.4 0.5 0.6 0.7 0.8 0.9 1 d) e) f) 0 0.1 0.2 0.3 0.4 0.5 0.6 0.7 0.8 0.9 1 0 0.1 0.2 0.3 0.4 0.5 0.6 0.7 0.8 0.9 1 0 0.1 0.2 0.3 0.4 0.5 0.6 0.7 0.8 0.9 1 0 0.1 0.2 0.3 0.4 0.5 0.6 0.7 0.8 0.9 1 0 0.1 0.2 0.3 0.4 0.5 0.6 0.7 0.8 0.9 1 0 0.1 0.2 0.3 0.4 0.5 0.6 0.7 0.8 0.9 1 g) h) i) Figure 3: a) Original data. b) Data transformed by a logarithm. c) Data transformed by a quadratic function. d-f) The transformation functions learned using the nonconvex algorithm. g-i) The transformation functions learned using the convex algorithm. if we could recover the inverse monotonic function, then a linear decision boundary would perform well. Figure 3a shows the original data and decision boundary. Figure 3b shows the data and hyperplane transformed with a normalized logarithm. Figure 3c depicts a quadratic transform. 600 data points were sampled, and then transformed. 200 were used for training, 200 for cross validation and 200 for testing. We compared our locally optimal method (L mono), our convex relaxation (C mono) and a linear SVM (linear). The linear SVM struggled on all of the transformed data while the other methods performed well as reported in Figure 4. The learned transforms for L mono are plotted in Figure 3(d-f). The solid blue line is the mean over 10 experiments, and the dashed blue is the standard deviation. The black line is the true target function. The learned functions for C mono are in Figure 3(g-i). Both algorithms performed quite well on the task of classification and recover nearly the exact monotonic transform. The local method outperformed the relaxation slightly because this was an easy problem with few local minima. 4.2 Document Classification In this experiment we used the four universities WebKB dataset. The data is made up of web pages from four universities plus an additional larger set from miscellaneous universities. linear exponential square root total Linear 0.0005 0.0375 0.0685 0.0355 L Mono 0.0020 0.0005 0.0020 0.0015 C Mono 0.0025 0.0075 0.0025 0.0042 Figure 4: Testing error rates for the synthetic experiments. 1 vs 2 1 vs 3 1 vs 4 2 vs 3 2 vs 4 3 vs 4 total Linear 0.0509 0.0879 0.1381 0.0653 0.1755 0.0941 0.1025 TFIDF 0.0428 0.0891 0.1623 0.0486 0.1910 0.1096 0.1059 Sqrt 0.0363 0.0667 0.0996 0.0456 0.1153 0.0674 0.0711 Poly 0.0499 0.0861 0.1389 0.0599 0.1750 0.0950 0.1009 RBF 0.0514 0.0836 0.1356 0.0641 0.1755 0.0981 0.1024 L Mono 0.0338 0.0739 0.0854 0.0511 0.1060 0.0602 0.0683 C Mono 0.0322 0.0776 0.0812 0.0501 0.0973 0.0584 0.0657 Figure 5: Testing error rates for WebKB. These web pages are then categorized. We will be working with the largest four categories: student, faculty, course, and project. The task is to solve all six pairwise classification problems. In [6, 5] preprocessing the data with a square root was demonstrated to yield good results. We will compare our nonconvex method (L mono), and our convex relaxation (C mono) to a linear SVM with and without the square root, with TFIDF features and also a kernelized SVM with both the polynomial kernel and the RBF kernel. We will follow the setup of [6] by training on three universities and the miscellaneous university set and testing on web pages from the fourth university. We repeated this four fold experiment five times. For each fold, we use a subset of 200 points for training, 200 to cross validate the parameter settings, and all of the fourth university’s points for testing. Our two methods outperform the competition on average as reported in Figure 5. The convex relaxation chooses a step function nearly every time. This outputs a 1 if a word is in the training vector and 0 if it is absent. The nonconvex greedy algorithm does not end up recovering this solution as reliably and seems to get stuck in local minima. This leads to slightly worse performance than the convex version. 4.3 Image Histogram Classification In this experiment, we used the Corel image dataset. In [3], it was shown that monotonic transforms of the form xa for 0 ≤a ≤1 worked well. The Corel image dataset is made up of various categories, each containing 100 images. We chose four categories of animals: 1) eagles, 2) elephants, 3) horses, and 4) tigers. Images were transformed into RGB histograms following the binning strategy of [3, 5]. We ran a series of six pairwise experiments where the data was randomly split into 80 percent training, 10 percent cross validation, and 10 percent testing. These six experiments were repeated 10 times. We compared our two methods to a linear support vector machine, as well as an SVM with RBF and polynomial kernels. We also compared to the set of transforms xa for 0 ≤a ≤1 where we cross validated over a = {0, .125, .25, .5, .625, .75, .875, 1}. This set includes linear a = 1 at one end, a binary threshold a = 0 at the other (choosing 00 = 0), and the square root transform in the middle. The convex relaxation performed best or tied for best on 4 out 6 of the experiments and was the best overall as reported in Figure 6. The nonconvex version also performed well but ended up with a lower accuracy than the cross validated family of xa transforms. The key to this dataset is that most of the data is very close to zero due to few pixels being in a given bin. Cross validation over xa most often chose low nonzero a values. Our method had many knots in these extremely low values because that was where the data support was. Plots of our learned functions on these small values can be found in Figure 7(a-f). Solid blue is the mean for the nonconvex algorithm and dashed blue is the standard deviation. Similarly, the convex relaxation is in red. 1 vs 2 1 vs 3 1 vs 4 2 vs 3 2 vs 4 3 vs 4 total Linear 0.08 0.10 0.28 0.11 0.14 0.26 0.1617 Sqrt 0.03 0.05 0.09 0.12 0.08 0.20 0.0950 Poly 0.07 0.10 0.28 0.11 0.15 0.23 0.1567 RBF 0.06 0.08 0.22 0.10 0.13 0.23 0.1367 xa 0.08 0.04 0.03 0.03 0.09 0.06 0.0550 L Mono 0.05 0.06 0.04 0.05 0.13 0.05 0.0633 C Mono 0.04 0.03 0.03 0.04 0.06 0.05 0.0417 Figure 6: Testing error rates on Corel dataset. 0 0.5 1 1.5 2 x 10 −3 −0.2 0 0.2 0.4 0.6 0.8 1 0 0.5 1 1.5 2 x 10 −3 −0.2 0 0.2 0.4 0.6 0.8 1 0 0.5 1 1.5 2 x 10 −3 −0.2 0 0.2 0.4 0.6 0.8 1 0 0.5 1 1.5 2 x 10 −3 −0.2 0 0.2 0.4 0.6 0.8 1 0 0.5 1 1.5 2 x 10 −3 −0.2 0 0.2 0.4 0.6 0.8 1 0 0.5 1 1.5 2 x 10 −3 −0.2 0 0.2 0.4 0.6 0.8 1 Figure 7: The learned transformation functions for 6 Corel problems. 4.4 Gender classification In this experiment we try to differentiate between images of males and females. We have 1755 labelled images from the FERET dataset processed as in [9]. Each processed image is a 21 by 12 pixel 256 color gray scale image that is rastorized to form training vectors. There are 1044 male images and 711 female images. We randomly split the data into 80 percent training, 10 percent cross validation, and and 10 percent testing. We then compare a linear SVM to our two methods on 5 random splits of the data. The learned monotonic function from L Mono and C Mono are similar to a sigmoid function which indicates that useful saturation and threshold effects where uncovered by our methods. Figure 8a shows examples of training images before and after they have been transformed by our learned function. Figure 8b summarizes the results. Our learned transformation outperforms the linear SVM with the convex relaxation performing best. 5 Discussion A data driven framework was presented for jointly learning monotonic transformations of input data and a discriminative linear classifier. The joint optimization improves classification accuracy and produces interesting transformations that otherwise would require a priori domain knowledge. Two implementations were discussed. The first is a fast greedy algorithm for finding a locally optimal solution. Subsequently, a semidefinite relaxation of the original problem was presented which does not suffer from local minima. The greedy algorithm has similar scaling properties as a support vector machine yet has local minima to contend with. The semidefinite relaxation is more computationally intensive yet ensures a reliable global solution. Nevertheless, both implementations were helpful in synthetic and real experiments including text and image classification and improved over standard support vector machine tools. Algorithm Error Linear .0909 L Mono .0818 C Mono .0648 a) b) Figure 8: a) Original and transformed gender images. b) Error rates for gender classification. A natural next step is to explore faster (convex) algorithms that take advantage of the specific structure of the problem. These faster algorithms will help us explore extensions such as learning transformations across multiple tasks. We also hope to explore applications to other domains such as gene expression data to refine the current logarithmic transforms necessary to compensate for well-known saturation effects in expression level measurements. We are also interested in looking at fMRI and audio data where monotonic transformations are useful. 6 Acknowledgements This work was supported in part by NSF Award IIS-0347499 and ONR Award N000140710507. References [1] S. Boyd and L. Vandenberghe. Convex Optimization. Cambridge University Press, 2004. [2] M. Brown, W. Grundy, D. Lin, N. Christianini, C. Sugnet, M. Jr, and D. Haussler. Support vector machine classification of microarray gene expression data, 1999. [3] O. Chapelle, P. Hafner, and V.N. Vapnik. Support vector machines for histogram-based classification. Neural Networks, IEEE Transactions on, 10:1055–1064, 1999. [4] C. Cortes and V. Vapnik. Support-vector networks. Machine Learning, 20(3):273–297, 1995. [5] M. Hein and O. Bousquet. Hilbertian metrics and positive definite kernels on probability measures. In Proceedings of Artificial Intelligence and Statistics, 2005. [6] T. Jebara, R. Kondor, and A. Howard. Probability product kernels. Journal of Machine Learning Research, 5:819–844, 2004. [7] G. Lanckriet, N. Cristianini, P. Bartlett, L. El Ghaoui, and M. I. Jordan. Learning the kernel matrix with semidefinite programming. Journal of Machine Learning Research, 5:27–72, 2004. [8] J.B. Lasserre. Convergent LMI relaxations for nonconvex quadratic programs. In Proceedings of 39th IEEE Conference on Decision and Control, 2000. [9] B. Moghaddam and M.H. Yang. Sex with support vector machines. In Todd K. Leen, Thomas G. Dietterich, and Volker Tresp, editors, Advances in Neural Information Processing 13, pages 960–966. MIT Press, 2000. [10] T. Robertson, F.T. Wright, and R.L. Dykstra. Order Restricted Statistical Inference. Wiley, 1988.
2007
133
3,163
Combined discriminative and generative articulated pose and non-rigid shape estimation Leonid Sigal Alexandru Balan Michael J. Black Department of Computer Science Brown University Providence, RI 02912 {ls, alb, black}@cs.brown.edu Abstract Estimation of three-dimensional articulated human pose and motion from images is a central problem in computer vision. Much of the previous work has been limited by the use of crude generative models of humans represented as articulated collections of simple parts such as cylinders. Automatic initialization of such models has proved difficult and most approaches assume that the size and shape of the body parts are known a priori. In this paper we propose a method for automatically recovering a detailed parametric model of non-rigid body shape and pose from monocular imagery. Specifically, we represent the body using a parameterized triangulated mesh model that is learned from a database of human range scans. We demonstrate a discriminative method to directly recover the model parameters from monocular images using a conditional mixture of kernel regressors. This predicted pose and shape are used to initialize a generative model for more detailed pose and shape estimation. The resulting approach allows fully automatic pose and shape recovery from monocular and multi-camera imagery. Experimental results show that our method is capable of robustly recovering articulated pose, shape and biometric measurements (e.g. height, weight, etc.) in both calibrated and uncalibrated camera environments. 1 Introduction We address the problem of marker-less articulated pose and shape estimation of the human body from images using a detailed parametric body model [3]. Most prior work on marker-less pose estimation and tracking has concentrated on the use of generative Baysian methods [8, 15] that exploit crude models of body shape (e.g. cylinders [8, 15], superquadrics, voxels [7]). We argue that a richer representation of shape is needed to make future strides in building better generative models. Discriminative methods [1, 2, 10, 13, 16, 17], more recently introduced specifically for the pose estimation task, do not address estimation of the body shape; in fact, they are specifically designed to be invariant to body shape variations. Any real-world system must be able to estimate both body shape and pose simultaneously. Discriminative approaches to pose estimation attempt to learn a direct mapping from image features to 3D pose from either a single image [1, 14, 17] or multiple approximately calibrated views [9]. These approaches tend to use silhouettes [1, 9, 14] and sometimes edges [16, 17] as image features and learn a probabilistic mapping in the form of Nearest Neighbor (NN) search, regression [1], mixture of regressors [2], mixture of Baysian experts [17], or specialized mappings [14]. While effective and fast, they are inherently limited by the amount and the quality of the training data. More importantly they currently do not address estimation of the body shape itself. Body shape estimation (independent of the pose) has many applications in biometric authentication and consumer application domains. 1 Simplified models of body shape have a long history in computer vision and provide a relatively low dimensional description of the human form. More detailed triangulated mesh models obtained from laser range scans have been viewed as too high dimensional for vision applications. Moreover, mesh models of individuals lack a convenient, low-dimensional, parameterization to allow fitting to new subjects. In this paper we use the SCAPE model (Shape Completion and Animation of PEople) [3] which provides a low-dimensional parameterized mesh that is learned from a database of 3D range scans of different people. The SCAPE model captures correlated body shape deformations of the body due to the identity of the person and their non-rigid muscle deformation due to articulation. This model has been shown to allow tractable estimation of parameters from multi-view silhouette image features [5, 11] and from monocular images in scenes with point lights and cast shadows [4]. In [5] the SCAPE model is projected into multiple calibrated images and an iterative importance sampling method is used for inference of the pose and shape that best explain the observed silhouettes. Alternatively, in [11] visual hulls are constructed from many silhouette images and the Iterative Closest Point (ICP) algorithm is used to extract the pose by registering the volumetric features with SCAPE. Both [5] and [11], however, require manual initialization to bootstrap estimation. In this paper we substitute discriminative articulated pose and shape estimation in place of manual initialization. In doing so, we extend the current models for discriminative pose estimation to deal with the estimation of shape, and couple the discriminative and generative methods for more robust combined estimation. Few combined discriminative and generative pose estimation methods that exist [16], typically require temporal image data and do not address shape estimation problem. For discriminative pose and shape estimation we use a Mixture of Experts model, with kernel linear regression as experts, to learn a direct probabilistic mapping between monocular silhouette contour features and the SCAPE parameters. To our knowledge this is the first work that has attempted to recover the 3D shape of the human body from monocular image directly. While the results are typically noisy, they are appropriate as initialization for the more precise generative refinement process. For generative optimization we make use of the method proposed in [5] where the silhouettes are predicted in multiple views given the pose and shape parameters of the SCAPE model and are compared to the observed silhouettes using a Chamfer distance measure. For training data we use the SCAPE model to generate pairs of 3D body shapes and projected image silhouettes. Evaluation is performed on sequences of two subjects performing free-style motion. We are able to predict pose, shape, and simple biometric measurements for the subjects from images captured by 4 synchronized cameras. We also show results for 3D shape estimation from monocular images. The contributions of this paper are two fold: (1) we formulate a discriminative model for estimating the pose and shape directly from monocular image features, and (2) we couple this discriminative method with a generative stochastic optimization for detailed estimation of pose and the shape. 2 SCAPE Body Model In this section we briefly introduce the SCAPE body model; for details the reader is referred to [3]. A low-dimensional mesh model is learned using principal component analysis applied to a registered database of range scans. The SCAPE model is defined by a set of parameterized deformations that are applied to a reference mesh that consists of T triangles {∆xt|t ∈[1, ..., T]} (here T = 25, 000). Each of the triangles in the reference mesh is defined by three vertices in 3D space, (vt,1, vt,2, vt,3), and has a corresponding associated body part index pt ∈[1, ..., P] (we work with the model that has P = 15 body parts corresponding to torso, pelvis, head, and 3 segments for each of the upper and lower extremities). For convenience, the triangles of the mesh are parameterized by the edges, ∆xt = (vt,2 −vt,1, vt,3 −vt,1), instead of the vertices themselves. Estimating the shape and articulated pose of the body amounts to estimating parameters, Y, of the deformations required to produce the mesh {∆yt|t ∈[1, ..., T]}, the projection of which matches the image evidence. The state-space of the model can be expressed by a vector Y = {τ, θ, ν}, where τ ∈R3 is the global 3D position for the body, θ ∈R37 is the joint-angle parameterization of the articulation with respect to the skeleton (encoded using Euler angles), and ν ∈R9 is the shape parameters encoding the identity-specific shape of the person. Given a set of estimated parameters Y a new mesh {∆yt} can be produced using: ∆yt = Rpt(θ)S(ν)Q(Rpt(θ))∆xt (1) 2 pc pn 1 2 3 4 5 6 7 8 9 10 11 12 θ bins (in degrees) Radial bins 15 45 75 105 135 165 195 225 255 285 315 345 1 2 3 4 5 (a) (b) Figure 1: Silhouette contour descriptors. Radial Distance Function (RDF) encoding of the silhouette contour is illustrated in (a); Shape Context (SC) encoding of a contour sample point in (b). where Rpt(θ) is the rigid 3 × 3 rotation matrix for a part pt and is a function of the joint angles θ; S(ν) is the linear 3×3 transformation matrix modeling subject-specific shape variation as a function of the shape-space parameters ν; Q(Rpt(θ)) is a 3 × 3 residual transformation corresponding to the non-rigid articulation-induced deformations (e.g. bulging of muscles). Notice, that Q() is simply a learned linear function of the rigid rotation and has no independent parameters. To learn Q() we minimize the residual in the least-squared sense between the set of 70 registered scans of one person under different (but known) articulations. It is also worth mentioning that body shape linear deformation sub-space, S(ν) = Usν + µs, is learned from a set of 10 meshes of different people in full correspondence using PCA; hence ν can be interpreted as a vector of linear coefficients corresponding to eigen-directions of the shape-space that characterize a given body shape. 3 Features In this work we make use of silhouette features for both discriminative and generative estimation of pose and shape. Silhouettes are commonly used for human pose estimation [1, 2, 13, 15, 17]; while limited in their representational power, they are easy to estimate from images and fast to synthesize from a mesh model. The framework introduced here, however, is general and can easily be extended to incorporate richer features (e.g. edges [15], dense region descriptors [16] such as SIFT or HOG, or hierarchical descriptors [10] like HMAX, Hyperfeatures, Spatial Pyramid). The use of such richer feature representations will likely improve both discriminative and generative estimation. Histograms of shape context. Shape contexts (SC) [6] are rich descriptors based on the local shape-based histograms of the contour points sampled from the external boundary of the silhouette. At every sampled boundary point the shape context descriptor is parameterized by the number of orientation bins, φ, number of radial-distance bins, r, and the minimum and maximum radial distances denoted by rin and rout respectively. As in [1] we achieve scale invariance by making rout a function of the overall silhouette height and normalizing the individual shape context histogram by the sum over all histogram bins. Assuming that N contour points are chosen, at random, to encode the silhouette, the full feature vector can be represented using φrN bin histogram. Even for moderate values of N this produces high dimensional feature vectors that are hard to deal with. To reduce the silhouette representation to a more manageable size, a secondary histogramming was introduced by Agarwal and Triggs in [1]. In this, bag-of-words style model, the shape context space is vector quantized into a set of K clusters (a.k.a. codewords). The K = 100 center codebook is learned by running k-means clustering on the combined set of shape context vectors obtained from the large set of training silhouettes. Once the codebook is learned, the quantized K-dimensional histograms are obtained by voting into the histogram bins corresponding to codebook entries. Soft voting has been shown [1] to reduce effects of spatial quantization. The final descriptor Xsc ∈RK is normalized to unit length, to ensure that silhouettes that contain different number of contour points can be compared. The resulting codebook shape context representation is translation and scale invariant by definition. Following the prior work [1, 13] we let φ = 12, r = 5, rin = 3, and rout = κh where h is the height of the silhouette and κ is typically 1 4 ensuring integration of contour points over regions roughly similar to the limb size [1]. For shape estimation, we found that combining features across multiple spatial scales (e.g. κ = { 1 4, 1 2, ...}) to be more effective. 3 Radial distance function. The Radial Distance Function (RDF) features are defined by a feature vector Xrdf = {pc, ||p1−pc||, ||p2−pc||, ..., ||pN −pc||}, where pc ∈R2 is the centroid of the image silhouette, and pi is the point on the silhouette outer contour; hence ||pi −pc|| ∈R measures the maximal object extent in the particular direction denoted by i from the centroid. For all experiments, we use N = 100 points, resulting in the Xrdf ∈R102. We explicitly ensure that the dimensionality of the RDF descriptor is comparable to that of shape context introduced above. Unlike the shape context descriptor, the RDF feature vector is neither scale nor translation invariant. Hence, RDF features are only suited for applications where camera calibration is known and fixed. 4 Discriminative estimation of pose and shape To produce initial estimates for the body pose and/or shape in 3D from image features, we need to model the conditional distribution p(Y|X) of the 3D body state Y given the set of 2D features X. Intuitively this conditional mapping should be related to the inverse of the camera projection matrix and, as with many inverse problems, is highly ambiguous. To model this non-linear relationship we use a Mixtures of Experts (MoE) model to represent the conditionals [2, 17]. The parameters of the MoE model are learned by maximizing the log-likelihood of the training data set D = {(x(1), y(1)), ..., (x(N), y(N))} consisting of N input-output pairs (x(i), y(i)). We use an iterative Expectation Maximization (EM) algorithm, based on type-II maximum likelihood, to learn parameters of the MoE. Our model for the conditional can be written as: p(Y|X) ∝ M X k=1 pe,k(Y|X, Θe,k)pg,k(k|X, Θg,k) (2) where pe,k is the probability of choosing pose Y given the input X according to the k-th expert, and pg,k is the probability of that input being assigned to the k-th expert using an input sensitive gating network; in both cases Θ represents the parameters of the mixture and gate distributions respectively. For simplicity and to reduce complexity of the experts we choose kernel linear regression with constant offset, Y = βX + α, as our expert model, which allows us to solve for the parameters Θe,k = {βk, αk, Λk} analytically using the weighted linear regression, where pe,k(Y|X, Θe,k) = 1 √ (2π)n|Λk| exp−1 2 ∆T k Λ−1 k ∆k, and ∆k = Y −βkX −αk. Pose estimation is a high dimensional and ill-conditioned problem, so simple least squares estimation of the linear regression matrix parameters typically produces severe over-fitting and poor generalization. To reduce this, we add smoothness constraints on the learned mapping. We use a damped regularization term R(β) = λ||β||2 that penalizes large values in the coefficient matrix β, where λ is a regularization parameter. Larger values of λ will result in overdamping, where the solution will be underestimated, small values of λ will result in overfitting and possibly ill-conditioning. Since the solution of the ridge regressors is not symmetric under the scaling of the inputs, we normalize the inputs {x(1), x(2), ..., x(N)} by the standard deviation in each dimension respectively before solving. Weighted ridge regression solution for the parameters βk and αk can be written in matrix notation as follows,  βk αk T =  DT X diag(Zk) DX + diag(λ) Zk ZT k ZT k Zk −1  DT X ZT k  diag(Zk) DY, (3) where Zk = [z(1) k , z(2) k , ..., z(N) k ]T is the vector of ownership weights described later in the section and diag(Zk) is diagonal matrix with Zk on the diagonal; DX = [x(1), x(2), ..., x(N)] and DY = [y(1), y(2), ..., y(N)] are vectors of inputs and outputs from the training data D. Maximization for the gate parameters can be done analytically as well. Given the gate model, pg,k(k|X, Θg,k) = 1 √ (2π)n|Σk| exp−1 2 (X−µk)T Σ−1 k (X−µk) maximization of the gate parameters Θg,k = {Σk, µk} becomes similar to the mixture of Gaussians estimation, where µk = PN n=1 z(n) k x(n)/ PN n=1 z(n) k , Σk = 1 PN n=1 z(n) k PN n=1 z(n) k [x(n) −µk][x(n) −µk]T and zn k is the 4 estimated ownership weight of the example n by the expert k estimated by expectation z(n) k = pe,k(y(n)|x(n), Θe,k)pg,k(k|x(n), Θg,k) PM j=1 pe,j(y(n)|x(n), Θe,j)pg,j(j|x(n), Θg,j) . (4) The above outlines the full EM procedure for the MoE model. We learn three separate models for shape, p(ν|X), articulated pose, p(θ|X) and global position, p(τ|X). Similar to [2] we initialize the EM learning by clustering the output 3D poses using the K-means procedure. Implementation details. For articulated pose and shape we experimented with using both RDF and SC features (global position requires RDF features since SC is location and scale invariant). SC features tend to work better for pose estimation where as RDF features perform better for shape estimation. Hence, we learn p(ν|Xrdf), p(θ|Xsc) and p(τ|Xrdf). In cases where calibration is unavailable, we estimate the shape using p(ν|Xsc) which tends to produce reasonable results but cannot estimate the overall height. We estimate the number of mixture components, M, and regularization parameter, λ, by learning a number of models and cross validating on the withheld dataset. 5 Generative stochastic optimization of pose and shape Generative stochastic state estimation, as in [5], is handled within an iterative importance sampling framework [8]. To this end, we represent the posterior distribution over the state (that includes both pose and shape), p(Y|I) ∝p(I|Y)p(Y), using a set of N weighted samples {yi, πi}N i=1, where yi ∼q(Y) is a sample drawn from the importance function q(Y) and πi ∝ p(I|yi)p(yi) q(yi) is an associated normalized weight. As in [5] we make no rigorous probabilistic claims about the generative model, but rather use it as effective means of performing stochastic search. As required by the annealing framework, we define a set of importance functions qk(Y) from which we draw samples at each respective iteration k. We define importance functions recursively using a smoothed version of posterior from the previous iteration qk+1(Y) = PN i=1 π(k) i N(y(k) i , Σ(k)), encoded using a kernel Gaussian density with iteration dependent bandwidth parameter Σ(k). To avoid effects of local optima, the likelihood is annealed as follows: pk(I|Y) = [p(I|Y)]Tk at every iteration, where Tk is the temperature parameter. As a result, effects of peaks in the likelihood are introduced slowly. To initiate the stochastic search an initial distribution is needed. The high dimensionality of the state space requires this initial distribution to be relatively close to the solution in order to reach convergence. Here we make use of the discriminative pose and shape estimate from Section 4 to give us the initial distribution for the posterior. In particular, given the discriminative model for the shape, p(ν|X), position, p(τ|X), and articulated pose, p(θ|X), of the body, we can let (with slight abuse of notation) y(0) i ∼[p(τ|X), p(θ|X), p(ν|X)] and π(0) i = 1/N for i ∈[1, ..., N]. The outlined stochastic optimization framework also requires an image likelihood function, p(I|Y), that measures how well our model under a given state Y matches the image evidence, I, obtained from one or multiple synchronized cameras. We adopt the likelihood function introduced in [5] that measures the similarity between observed and hypothesized silhouettes. For a given camera view, a foreground silhouette is computed using a shadow-suppressing background subtraction procedure and is compared to the silhouette obtained by projecting the SCAPE model subject to the hypothesized state into the image plane (given calibration parameters of the camera). Pixels in the non-overlapping regions are penalized by the distance to the closest contour point of the silhouette. This is made efficient by the use of Chamfer distance map precomputed for both silhouettes. 6 Experiments Datasets. In this paper we make use of 3 different datasets. The training dataset, used to learn discriminative MoE models and codeword dictionary for SC, was generated by synthesizing 3000 silhouette images obtained by projecting corresponding SCAPE body models into an image plane using calibration parameters of the camera. SCAPE body models, in turn, were generated by randomly sampling the pose from a database of motion capture data (consisting of generally non-cyclic random motions) and the body shape coefficient from a uniform distribution centered at the mean shape. Similar synthetic test dataset was constructed consisting of 597 silhouette-SCAPE body 5 (a) (b) (c) Figure 2: Discriminative estimation of weight loss. Two images of a subject before and after weight loss are shown in (a) on the left and right respectively. The images were downloaded from the web (Google) and manually segmented (b). The estimated shape and pose obtained by our discriminative estimation procedure is shown in (c). In bottom row, we manually rotated the model 90 degrees for better visibility of the shape variation. Since camera calibration is unavailable, we use p(ν|Xsc) and normalize the before and after shapes to the same reference height. Our method estimated that the person illustrated in the top row lost 22 lb and the one illustrated in the bottom row – 32 lb; web-reported weight loss for the two subjects was 24 lb and 64 lb respectively. Notice that the neutral posture assumed in images was not present in our training data set, causing visible artifacts with estimation of the arm pose. Also, the bottom example pushes the limits of our current shape model which was trained using only 10 scans of people, none close to the desired body shape. model pairs. In addition, we collected a real dataset consisting of hardware-synchronized motion capture and video collected using 4 cameras. Two subjects were captured performing roughly the same class of motions as in the training dataset. Discriminative estimation of shape. Results of using the MoE model, similar to the one introduced here, for pose estimation have previously been reported in [2] and [17]. Our experience with the articulated pose estimation was similar and we omit supporting experiments due to lack of space. For discriminative estimation of shape we quantitatively compared SC and RDF features, by training two MoE models p(ν|Xsc) and p(ν|Xrdf), and found the latter to perform better when camera calibration is available (on the average we achieve a 19.3 % performance increase over simply using the mean shape). We attribute the superior performance of RDF features to their sensitivity to the silhouette position and scale, that allows for better estimation of overall height of the body. Given the shape we can also estimate the volume of the body and assuming constant density of water, compute the weight of the person. To illustrate this we estimate approximate weight loss of a person from monocular uncalibrated images (see Figure 2). Please note that this application is a proof of concept and not a rigorous experiment1. In principle, the SCAPE model is not ideal for weight calculations, since non-rigid deformations caused by articulations of the body will result in (unnatural) variations in weight. In practice, however, we found such variations produce relatively minor artifacts. The weight calculations are, on the other hand, very sensitive to the body shape. Combining discriminative and generative estimation. Lastly we tested the performance of the combined discriminative and generative framework by estimating articulated pose, shape and biometric measurements for people in our real dataset. Results of biometric measurement estimates can be seen in Figure 3; corresponding visual illustration of results is shown in Figure 4. Analysis of errors. Rarely our system does produce poor pose and/or shape estimates. Typically these cases can be classified into two categories: (1) minor errors that only effect the pose and are artifacts of local optima or (2) more significant errors that effect the shape and result from poor initial distribution over the state produced by the discriminative method. The latter arise as a result of 180– degree view ambiguity and/or pose configuration ambiguities, due to symmetry, in the silhouettes. 1The “ground truth” weight change here is self reported and gathered from the Internet. 6 Discriminative Disc. + Generative GT + Generative Biometric Feature Actual Mean Std Mean Std Mean Std A (34) Height (mm) 1780 1716.1 41.9 1776.2 43.8 1796.9 22.9 Arm Span (mm) 1597 1553.6 39.7 1597.3 58.0 1607.7 30.7 Weight (kg) 88 83.62 8.94 83.37 8.01 85.83 3.73 B (30) Height (mm) 1825 1703.8 88.8 1751.0 95.2 1844.1 63.8 Arm Span (mm) 1668 1537.7 69.2 1547.5 91.4 1659.0 29.1 Weight (kg) 63 80.63 18.53 64.98 9.27 66.33 4.69 Figure 3: Estimating basic biometric measurements. Figure illustrates basic biometric measurements (height, arm span3and weight) recovered for two subjects A and B. Mean and standard deviation reported over 34 and 30 frames for subject A and B respectively. Every 25-th frame from two sequence obtained using 4 synchronized cameras was chosen for estimation. The actual measured values for the two subjects are shown in the left column. Estimates obtained using discriminative only and discriminative followed by generative shape estimation methods are reported in the next two columns. Discriminative method used only one view for estimation, where as generative method used all 4 views to obtain a better fit. Last column reports estimates obtained using ground truth pose and mean shape as initialization for the generative fit (this is the algorithm proposed in [5]). Notice that generative estimation significantly refines the discriminative estimates. In addition, our approach, that unlike [5] does not require manual initialization, performs comparably (and sometimes marginally better than [5]) in terms of mean performance (but has roughly twice the variance). 7 Discussion and Conclusions We have presented a method for automatic estimation of articulated pose and shape of people from images. Our approach goes beyond prior work in that it is able to estimate a detailed parametric model (SCAPE) directly from images without requiring manual intervention or initialization. We found that the discriminative model produced an effective initialization for generative optimization procedure and that biometric measurements from the recovered shape were comparable to those produced by prior approaches that required manual initialization [5]. We also introduced and addressed the problem of discriminative estimation of shape from monocular calibrated and un-calibrated images. More accurate shape estimates from monocular data will require richer image descriptors. A number of straightforward extensions to our model will likely yeld immediate improvement in performance. Among such, is the use of temporal consistency in the discriminative pose (and perhaps shape) estimation [17] and dense image descriptors [10]. In addition, in this work we estimated the shape space of the SCAPE model from only 10 body scans, as a result the learned shape space is rather limited in its expressive power. We belive some of the artifacts of this can be observed in Figure 2 where the weight of the heavier woman is underestimated. Acknowledgments. This work was supported by NSF grants IIS-0534858 and IIS-0535075 and a gift from Intel Corp. We also thank James Davis and Dragomir Anguelov for discussions and data. References [1] A. Agarwal and B. Triggs. Recovering 3D human pose from monocular images, IEEE Transactions on Pattern Analysis and Machine Intelligence, Vol. 28, No. 1, pp. 44–58, 2006. [2] A. Agarwal and B. Triggs. Monocular human motion capture with a mixture of regressors, IEEE Workshop on Vision for Human-Computer Interaction, 2005. [3] D. Anguelov, P. Srinivasan, D. Koller, S. Thrun, J. Rodgers and J.Davis. SCAPE: Shape Completion and Animation of PEople, ACM Transactions on Graphics (SIGGRAPH), Vol. 24(3), pp. 408–416, 2005. [4] A. Balan, M. J. Black, H. Haussecker and L. Sigal. Shining a light on human pose: On shadows, shading and the estimation of pose and shape, International Conference on Computer Vision (ICCV), 2007. [5] A. Balan, L. Sigal, M. Black, J. Davis and H. Haussecker. Detailed human shape and pose from images, IEEE Conference on Computer Vision and Pattern Recognition (CVPR), 2007. [6] S. Belongie, J. Malik and J. Puzicha. Matching shapes, ICCV, pp. 454–461, 2001. 3Arm span is defined as the distance between knuckles of left and right arm fully extended in ‘T’-pose [5]. 7 Subject A Subject B Figure 4: Visualizing pose and shape estimation. Examples of simultaneous pose and shape estimation for subjects A and B are shown on top and bottom respectively. Results are obtained by discriminatively estimating the distribution over the initial state and then refining this distribution via generative local stochastic search. Left column illustrates projection of the estimated model into all 4 views. Middle column shows the projection of the model onto image silhouettes, where light blue denotes image silhouette, dark red projection of the model and orange non-silhouette regions that overlap with the projection. On the right are the two views of the estimated 3D model. [7] K. M. Cheung, S. Baker and T. Kanade. Shape-from-silhouette of articulated objects and its use for human body kinematics estimation and motion capture, CVPR, Vol. 1, pp. 77–84, 2003. [8] J. Deutscher, A. Blake and I. Reid. Articulated body motion capture by annealed particle filtering, IEEE Conference on Computer Vision and Pattern Recognition (CVPR), Vol. 2, pp. 126–133, 2000. [9] K. Grauman, G. Shakhnarovich, T. Darrell. Inferring 3D structure with a statistical image-based shape model, IEEE International Conference on Computer Vision (ICCV), pp. 641–648, 2003. [10] A. Kanaujia, C. Sminchisescu and D. Metaxas. Semi-supervised Hierarchical Models for 3D Human Pose Reconstruction, IEEE Conference on Computer Vision and Pattern Recognition (CVPR), 2007. [11] L. Muendermann, S. Corazza and T. Andriacchi. Accurately measuring human movement using articulated ICP with soft-joint constraints and a repository of articulated models, CVPR, 2007. [12] R. Plankers and P. Fua. Articulated soft objects for video-based body modeling, ICCV, 2001. [13] R. W. Poppe and M. Poel. Comparison of silhouette shape descriptors for example-based human pose recovery, IEEE Conference on Automatic Face and Gesture Recognition (FG 2006), pp. 541–546, 2006. [14] R. Rosales and S. Sclaroff. Learning Body Pose Via Specialized Maps, NIPS, 2002. [15] L. Sigal, S. Bhatia, S. Roth, M. J. Black and M. Isard Tracking Loose-limbed People, IEEE Conference on Computer Vision and Pattern Recognition (CVPR), Vol. 1, pp. 421–428, 2004. [16] C. Sminchisescu, A. Kanajujia and D. Metaxas. Learning Joint Top-Down and Bottom-up Processes for 3D Visual Inference, CVPR, Vol. 2, pp. 1743–1752, 2006. [17] C. Sminchisescu, A. Kanaujia, Z. Li and D. Metaxas. Discriminative density propagation for 3D human motion estimation, CVPR, Vol. 1, pp. 390–397, 2005. 8
2007
134
3,164
Multiple-Instance Active Learning Burr Settles Mark Craven University of Wisconsin Madison, WI 5713 USA {bsettles@cs,craven@biostat}.wisc.edu Soumya Ray Oregon State University Corvallis, OR 97331 USA sray@eecs.oregonstate.edu Abstract We present a framework for active learning in the multiple-instance (MI) setting. In an MI learning problem, instances are naturally organized into bags and it is the bags, instead of individual instances, that are labeled for training. MI learners assume that every instance in a bag labeled negative is actually negative, whereas at least one instance in a bag labeled positive is actually positive. We consider the particular case in which an MI learner is allowed to selectively query unlabeled instances from positive bags. This approach is well motivated in domains in which it is inexpensive to acquire bag labels and possible, but expensive, to acquire instance labels. We describe a method for learning from labels at mixed levels of granularity, and introduce two active query selection strategies motivated by the MI setting. Our experiments show that learning from instance labels can significantly improve performance of a basic MI learning algorithm in two multiple-instance domains: content-based image retrieval and text classification. 1 Introduction A limitation of supervised learning is that it requires a set of instance labels which are often difficult or expensive to obtain. The multiple-instance (MI) learning framework [3] can, in some cases, address this handicap by relaxing the granularity at which labels are given. In the MI setting, instances are grouped into bags (i.e., multi-sets) which may contain any number of instances. A bag is labeled negative if and only if it contains all negative instances. A bag is labeled positive, however, if at least one of its instances is positive. Note that positive bags may also contain negative instances. The MI setting was formalized by Dietterich et al. in the context of drug activity prediction [3], and has since been applied to a wide variety of tasks including content-based image retrieval [1, 6, 8], text classification [1, 9], stock prediction [6], and protein family modeling [10]. Figure 1 illustrates how the MI representation can be applied to (a) content-based image retrieval (CBIR) and (b) text classification tasks. For the CBIR task, images are represented as bags and instances correspond to segmented regions of the image. A bag representing a given image is labeled positive if the image contains some object of interest. The multiple-instance paradigm is well suited to this task because only a few regions of an image may represent the object of interest, such as the gold medal in Figure 1(a). An advantage of the MI representation here is that it is significantly easier to label an entire image than it is to label each segment. For text classification, documents are represented as bags and instances correspond to short passages (e.g., paragraphs) in the documents. This formulation is useful in classification tasks for which document labels are freely available or cheaply obtained, but the target concept is represented by only a few passages. For example, consider the task of classifying articles according whether or not they contain information about the sub-cellular location of proteins. The article in Figure 1(b) is labeled by the Mouse Genome Database [4] as a citation for the protein catalase that specifies its sub-cellular location. However, the text that states this is only a short passage on the second page of the article. The MI approach is therefore compelling because document labels can be cheaply obtained (say from the Mouse Genome Database), but the labeling is not readily available at the most appropriate level of granularity (passages). bag: image = { instances: segments } The catalase-containing structures represent peroxisomes as concluded from the co-localization with the peroxisomal membrane marker, PMP70. (a) (b) bag: document = { instances: passages } Figure 1: Motivating examples for multiple-instance active learning. (a) In content-based image retrieval, images are represented as bags and instances correspond to segmented image regions. An active MI learner may query which segments belong to the object of interest, such as the gold medal shown in this image. (b) In text classification, documents are bags and the instances represent passages of text. In MI active learning, the learner may query specific passages to determine if they are representative of the positive class at hand. The main challenge of multiple-instance learning is that, to induce an accurate model of the target concept, the learner must determine which instances in positive bags are actually positive, even though the ratio of negatives to positives in these bags can be arbitrarily high. For many MI problems, such as the tasks illustrated in Figure 1, it is possible to obtain labels both at the bag level and directly at the instance level. Fully labeling all instances, however, is expensive. As mentioned above, the rationale for formulating the learning task as an MI problem is that it allows us to take advantage of coarse labelings that may be available at low cost, or even for free. The approach that we consider here is one that involves selectively obtaining the labels of certain instances in the context of MI learning. In particular, we consider obtaining labels for selected instances in positive bags, since the labels for instances in negative bags are known. In active learning [2], the learner is allowed to ask queries about unlabeled instances. In this way, the oracle (or human annotator) is required to label only instances that are assumed to be most valuable for training. In the standard supervised setting, pool-based active learning typically begins with an initial learner trained with a small set of labeled instances. Then the learner can query instances from a large pool of unlabeled instances, re-train, and repeat. The goal is to reduce the total amount of labeling effort required for the learner to achieve a certain level of accuracy. We argue that whereas multiple-instance learning reduces the burden of labeling data by getting labels at a coarse level of granularity, we may also benefit from selectively labeling some part of the training data at a finer level of granularity. Hence, we explore the approach of multiple-instance active learning as a way to efficiently overcome the ambiguity of the MI framework while keeping labeling costs low. There are several MI active learning scenarios we might consider. The first, which is analogous to standard supervised active learning, is simply to allow the learner to query for the labels of unlabeled bags. A second scenario is one in which all bags in the training set are labeled and the learner is allowed to query for the labels of selected instances from positive bags. For example, the learner might query on particular image segments or passages of text in the CBIR and text classification domains, respectively. If an instance-query result is positive, the learner now has direct evidence for the positive class. If the query result is negative, the learner knows to focus its attention to other instances from that bag, also reducing ambiguity. A third scenario involves querying selected positive bags rather than instances, and obtaining labels for any (or all) instances in such bags. For example, the learner might query a positive image in the CBIR domain, and ask the oracle to label as many segments as desired. A final scenario would assume that some bags are labeled and some are not, and the learner would be able to query on (i) unlabeled bags, (ii) unlabeled instances in positive bags, or (iii) some combination thereof. In the present work, we focus on the second formulation above, where the learner queries selected unlabeled instances from labeled, positive bags. The rest of this paper is organized as follows. First, we describe the algorithms we use to train MI classifiers and select instance queries for active learning. Then, we describe our experiments to evaluate these approaches on two data sets in the CBIR and text classification domains. Finally, we discuss the results of our experiments and offer some concluding remarks. 2 Algorithms MI Logistic Regression. We train probabilistic models for multiple-instance tasks using a generalization of the Diverse Density framework [6]. For MI classification, we seek the conditional probability that the label yi is positive for bag Bi given n constituent instances: P(yi = 1|Bi = {Bi1, Bi2, . . . , Bin}). If a classifier can provide an equivalent probability P(yij = 1|Bij) for instance Bij, we can use a combining function (such as softmax or noisy-or) to combine posterior probabilities of all the instances in a bag and estimate its posterior probability P(yi = 1|Bi). The combining function here explicitly encodes the MI assumption. If the model finds an instance likely to be positive, the output of the combining function should find its corresponding bag likely to be positive as well. In our work, we train classifiers using multiple-instance logistic regression (MILR) which has been shown to be a state-of-the-art MI learning algorithm, and appears to be a competitive method for text classification and CBIR tasks [9]. MILR uses logistic regression with parameters θ = (w, b) to estimate conditional probabilities for each instance: oij = P(yij = 1|Bij) = 1 1 + e−(w·Bij+b) . Here Bij represents a vector of feature values representing the jth instance in the ith bag, and w is a vector of weights associated with the features. In order to combine these class probabilities for instances into a class probability for a bag, MILR uses the softmax function: oi = P(yi = 1|Bi) = softmaxα(oi1, . . . , oin) = Pn j=1 oijeαoij Pn j=1 eαoij , where α is a constant that determines the extent to which softmax approximates a hard max function. In the general MI setting we do not know the labels of instances in positive bags. Because the equations above represent smooth functions of the model parameters θ, however, we can learn parameter values using a gradient-based optimization method and an appropriate objective function. In the present work, we minimize squared error over the bags E(θ) = 1 2 P i(yi −oi)2, where yi ∈{0, 1} is the known label of bag Bi. While we describe our MI active learning methods below in terms of this formulation of MILR, it is important to note that they generalize to any classifier that outputs instance-level probabilities used with differentiable combining and objective functions. Diverse Density [6], for example, couples a Gaussian instance model with a noisy-or combining function. Learning from Labels at Mixed Granularities. Suppose our active MI learner queries instance Bij and the corresponding instance label yij is provided by the oracle. We would like to include a direct training signal for this instance in the optimization procedure above. However, E(θ) is defined in terms of bag-level error, not instance-level error. Consider, though, that in MI learning a labeled instance is effectively the same as a labeled bag that contains only that instance. So when the label for instance Bij is known, we transform the training set for each query by adding a new training tuple ⟨{Bij}, yij⟩, where {Bij} is a new singleton bag containing only a copy of the queried instance, and yij is the corresponding label. A copy of the query instance Bij also remains in the original bag Bi, enabling the learner to compute the remaining instance gradients as described below. Since the objective function will guide the learner toward classifying the singleton query instance Bij in the positive tuple ⟨{Bij}, 1⟩as positive, it will tend to classify the original bag Bi positive as well. Conversely, if we add the negative tuple ⟨{Bij}, 0⟩, the learner will tend to classify the instance negative in the original bag, which will affect the other instance gradients via the combining function and guides the learner to focus on other potentially positive instances in that bag. It may seem that this effect on the original bag could be achieved by clamping the instance output oij to yij during training, but this has the undesirable property of eliminating the training signal for the bag and the instance. If yij = 1, the combining function output would be extremely high, making bag error nearly zero, thus minimizing the objective function without any actual parameter updates. If yij = 0, the instance would output nothing to the combining function, thus the learner would get no training signal for this instance (though in this case the learner can still focus on other instances in the bag). It is possible to combine clamped instance outputs with our singleton bag approach to overcome this problem, but our experiments indicate that this has no practical advantage over adding singleton bags alone. Also note that simply adding singleton bags will alter the objective function by adding weight, albeit indirectly, to bags that have been queried more often. To control this effect, we uniformly weight each bag and all its queried singleton bags to sum to 1 when computing the value and gradient for the objective function during training. For example, an unqueried bag has weight 1, a bag with one instance query and its derived singleton bag each have weight 0.5, and so on. Uncertainty Sampling. Now we turn our attention to strategies for selecting query instances for labeling. A common approach to active learning in the standard supervised setting is uncertainty sampling [5]. For probabilistic classifiers, this involves applying the classifier to each unlabeled instance and querying those with most uncertainty about the class label. Recall that the learned model estimates oij = P(yij = 1|Bij), the probability that instance Bij is positive. We represent the uncertainty U(Bij) by the Gini measure: U(Bij) = 2oij(1 −oij). Note that the particular measure we use here is not critical; the important properties are that its minima are at zero and one, its maximum is at 0.5, and it is symmetric about 0.5. MI Uncertainty (MIU). We argue that when doing active learning in a multiple-instance setting, the selection criterion should take into account not just uncertainty about a given instance’s class label, but also the extent to which the learner can adequately “explain” the bag to which the instance belongs. For example, the instance that the learner finds most uncertain may belong to the same bag as the instance it finds most positive. In this case, the learned model will have a high value of P(yi = 1|Bi) for the bag because the value computed by the combining function will be dominated by the output of the positive-looking instance. We propose an uncertainty-based query strategy that weights the uncertainty of Bij in terms of how much it contributes to the classification of bag Bi. As such, we define the MI Uncertainty (MIU) of an instance to be the derivative of bag output with respect to instance output (i.e., the derivative of the softmax combining function) times instance uncertainty: MIU(Bij) = ∂oi ∂oij U(Bij). Expected Gradient Length (EGL). Another query strategy we consider is to identify the instance that would impart the greatest change to the current model if we knew its label. Since we train MILR with gradient descent, this involves querying the instance which, if ⟨{Bij}, yij⟩is added to the training set, would create the greatest change in the gradient of the objective function (i.e., the largest gradient vector used to re-estimate values for θ). Let ∇E(θ) be the gradient of E with respect to θ, which is a vector whose components are the partial derivatives of E with respect to each model parameter: ∇E(θ) = [ ∂E ∂θ1 , ∂E ∂θ2 , . . . , ∂E ∂θm ]. Now let ∇E+ ij(θ) be the new gradient obtained by adding the positive tuple ⟨{Bij}, 1⟩to the training set, and likewise let ∇E− ij(θ) be the new gradient if a query results in the negative tuple ⟨{Bij}, 0⟩ being added. Since we do not know which label the oracle will provide in advance, we instead calculate the expected length of the gradient based on the learner’s current belief oij in each outcome. More precisely, we define the Expected Gradient Length (EGL) to be: EGL(Bij) = oij∥∇E+ ij(θ)∥+ (1 −oij)∥∇E− ij(θ)∥. Note that this selection strategy does not explicitly encode the MI bias. Instead, it employs class probabilities to determine the expected label for candidate queries, with the goal of maximizing parameter changes to what happens to be an MI learning algorithm. This strategy can be generalized to query for other properties in non-MI active learning as well. For example, Zhu et al. [11] use a related approach to determine the expected label of candidate query instances when combining active learning with graph-based semi-supervised learning. Rather than trying to maximize the expected change in the learning model, however, they select for the expected reduction in estimated error over unlabeled instances. 3 Data and Experiments Since no MI data sets with instance-level labels previously existed, we augmented an existing MI data set by manually adding instance labels. SIVAL1 is a collection for content-based image retrieval that includes 1500 images, each labeled with one of 25 class labels. The images contain complex objects photographed in a variety of positions, orientations, locations, and lighting conditions. The images (bags) have been transformed and segmented into approximately 30 segments (instances) each. Each segment is represented by a 30-dimensional feature vector describing color and texture attributes of the segment and its neighbors. For more details, see Rahmani & Goldman [8]. We modified the collection by manually annotating the instance segments that belong to the labeled object for each image using a graphical interface we developed. We also created a semi-synthetic MI data set for text classification, using the 20 Newsgroups2 corpus as a base. This corpus was chosen because it is an established benchmark for text classification, and because the source texts—newsnet posts from the early 1990s—are relatively short (in the MI setting, instances are usually paragraphs or short passages [1, 9]). For each of the 20 news categories, we generate artificial bags of approximately 50 posts (instances) each by randomly sampling from the target class (i.e., newsgroup category) at a rate of 3% for positive bags, with remaining instances (and all instances for negative bags) drawn uniformly from the other classes. The texts are processed with stemming, stop-word removal, and information-gain ranked feature selection. The TFIDF values of the top 200 features are used to represent the instance texts. We construct a data set of 100 bags (50 positives and 50 negatives) for each class. We compare our MI Uncertainty (MIU) and Expected Gradient Length (EGL) selection strategies from Section 2 against two baselines: Uncertainty (using only the instance-model’s uncertainty), and instances chosen uniformly at Random from positive bags (to evaluate the advantage of “passively” labeling instances). The MILR model uses α = 2.5 for the softmax function and is trained by minimizing squared loss via L-BFGS [7]. The instance-labeled MI data sets and MI learning source code used in these experiments are available online3. We evaluate our methods by constructing learning curves that plot the area under the ROC curve (AUROC) as a function of instances queried for each data set and selection strategy. The initial point in all experiments is the AUROC for a model trained on labeled bags from the training set without any instance queries. Following previous work on the CBIR problem [8], we average results for SIVAL over 20 independent runs for each image class, where the learner begins with 20 randomly drawn positive bags (from which instances may be queried) and 20 random negative bags. The model is then evaluated on the remainder of the unlabeled bags, and labeled query instances are added to the training set in batches of size q = 2. For 20 Newsgroups, we average results using 10-fold cross-validation for each newsgroup category, using a query batch size of q = 5. Due to lack of space, we cannot show learning curves for every task. Figure 2 shows three representative learning curves for each of the two data sets. In Table 1 we summarize all curves by reporting the average improvement made by each query selection strategy over the initial MILR model (before any instance queries) for various points along the learning curve. Table 2 presents a more detailed comparison of the initial model against each query selection method at a fixed point early on in active learning (10 query batches). 1http://www.cs.wustl.edu/accio/ 2http://people.csail.mit.edu/jrennie/20Newsgroups/ 3http://pages.cs.wisc.edu/˜bsettles/amil/ 0.5 0.6 0.7 0.8 0.9 1 0 20 40 60 80 100 120 140 AUROC Number of Instance Queries MIU EGL Uncertainty Random 0.5 0.6 0.7 0.8 0.9 1 0 20 40 60 80 100 120 140 Number of Instance Queries MIU EGL Uncertainty Random 0.5 0.6 0.7 0.8 0.9 1 0 20 40 60 80 100 120 140 Number of Instance Queries MIU EGL Uncertainty Random rec.autos sci.crypt talk.politics.misc 0.5 0.6 0.7 0.8 0.9 1 0 10 20 30 40 50 AUROC MIU EGL Uncertainty Random wd40can 0.5 0.6 0.7 0.8 0.9 1 0 10 20 30 40 50 MIU EGL Uncertainty Random translucentbowl 0.5 0.6 0.7 0.8 0.9 1 0 10 20 30 40 50 MIU EGL Uncertainty Random spritecan Figure 2: Sample learning curves from SIVAL (top row) and 20 Newsgroups (bottom row) tasks. Table 1: Summary of learning curves. The average AUROC improvement over the initial MI model (before any instance queries) is reported for each selection strategy. Numbers are averaged across all tasks in each data set at various points during active learning. The winning algorithm at each point is indicated with a box. Instance SIVAL Tasks 20 Newsgroups Tasks Queries Random Uncert. EGL MIU Random Uncert. EGL MIU 10 +0.023 +0.043 +0.039 +0.050 -0.001 +0.002 +0.002 +0.009 20 +0.033 +0.065 +0.063 +0.070 -0.002 +0.015 +0.015 +0.029 50 +0.057 +0.084 +0.085 +0.087 +0.002 +0.046 +0.045 +0.051 80 +0.065 +0.088 +0.093 +0.090 +0.003 +0.052 +0.056 +0.056 100 +0.068 +0.092 +0.095 +0.090 +0.008 +0.055 +0.055 +0.058 4 Discussion of Results We can draw several interesting conclusions from these results. First and most germane to MI active learning is that MI learners benefit from instance-level labels. With the exception of random selection on 20 Newsgroups data, instance-level labels almost always improve the accuracy of the learner, often with statistical significance after only a few queries. Second, we see that active query strategies (e.g., Uncertainty, EGL, and MIU) perform better than passive (random) instance labeling. On SIVAL tasks, random querying steadily improves accuracy, but very slowly. As Table 1 shows, random selection at 100 queries fails to be competitive with the three active query strategies after half as many queries. On 20 Newsgroups tasks, random selection has a slight negative effect (if any) early on, possibly because it lacks a focused search for positive instances (of which there are only one or two per bag). All three active selection methods, on the other hand, show significant gains fairly quickly on both data sets. Finally, MIU appears to be a well-suited query strategy for this formulation of MI active learning. On both data sets, it consistently improves the initial MI learner, usually with statistical significance, and often approaches the asymptotic level of accuracy with fewer labeled instances than the other two active methods. Uncertainty and EGL seem to perform quite comparably, with EGL performing slightly better between the two. MIU’s gains over these other query strategies are not usually statistically significant, however, and in the long run it is generally matched or slightly surpassed by them. MIU shows the greatest advantage early in the active instance-querying process, perhaps because it is the only method we tested that explicitly encodes the MI assumption by taking advantage of the combining function in its estimation of value to the learner. Table 2: Detailed comparison of the initial MI learner against various query strategies after 10 query batches (20 instances for SIVAL, 50 instances for 20 Newsgroups). Average AUROC values are shown for each algorithm on each task. Statistically significant gains over the initial learner (using a two-tailed t-test at 95%) are shown in bold. The winning algorithm for each task is indicated with a box, and a tally of wins for each algorithm is reported below each column. Task Initial Random Uncert. EGL MIU ajaxorange 0.547 0.564 0.633 0.638 0.627 apple 0.431 0.418 0.469 0.455 0.459 banana 0.440 0.463 0.514 0.511 0.507 bluescrunge 0.410 0.426 0.508 0.470 0.491 candlewithholder 0.623 0.662 0.646 0.656 0.677 cardboardbox 0.430 0.437 0.451 0.442 0.454 checkeredscarf 0.662 0.749 0.765 0.772 0.765 cokecan 0.668 0.727 0.693 0.713 0.736 dataminingbook 0.445 0.480 0.505 0.522 0.519 dirtyrunningshoe 0.620 0.701 0.703 0.697 0.708 dirtyworkgloves 0.455 0.497 0.491 0.496 0.497 fabricsoftenerbox 0.417 0.534 0.617 0.594 0.634 feltflowerrug 0.743 0.754 0.794 0.799 0.792 glazedwoodpot 0.444 0.464 0.528 0.515 0.526 goldmedal 0.496 0.544 0.622 0.602 0.605 greenteabox 0.563 0.595 0.614 0.619 0.639 juliespot 0.479 0.490 0.571 0.580 0.564 largespoon 0.436 0.403 0.406 0.394 0.408 rapbook 0.478 0.455 0.463 0.454 0.457 smileyfacedoll 0.556 0.612 0.675 0.640 0.655 spritecan 0.670 0.711 0.749 0.746 0.750 stripednotebook 0.477 0.478 0.486 0.519 0.489 translucentbowl 0.548 0.614 0.678 0.665 0.702 wd40can 0.599 0.658 0.687 0.700 0.707 woodrollingpin 0.416 0.435 0.420 0.426 0.429 alt.atheism 0.812 0.836 0.863 0.839 0.877 comp.graphics 0.720 0.690 0.789 0.783 0.819 comp.os.ms-windows.misc 0.772 0.768 0.764 0.742 0.714 comp.sys.ibm.pc.hardware 0.716 0.690 0.687 0.694 0.707 comp.sys.mac.hardware 0.716 0.728 0.861 0.855 0.878 comp.windows.x 0.835 0.827 0.888 0.894 0.882 misc.forsale 0.769 0.748 0.758 0.777 0.771 rec.autos 0.768 0.785 0.872 0.872 0.860 rec.motorcycles 0.844 0.844 0.871 0.879 0.883 rec.sport.baseball 0.838 0.846 0.871 0.869 0.899 rec.sport.hockey 0.918 0.918 0.966 0.962 0.964 sci.crypt 0.770 0.770 0.887 0.893 0.913 sci.electronics 0.719 0.751 0.731 0.733 0.725 sci.med 0.827 0.819 0.837 0.845 0.862 sci.space 0.822 0.824 0.901 0.905 0.893 soc.religion.christian 0.768 0.780 0.769 0.771 0.789 talk.politics.guns 0.847 0.855 0.860 0.870 0.858 talk.politics.mideast 0.791 0.793 0.874 0.880 0.876 talk.politics.misc 0.789 0.797 0.878 0.866 0.856 talk.religion.misc 0.759 0.773 0.785 0.773 0.793 TOTAL NUMBER OF WINS 4 3 9 12 19 It is also interesting to note that in an earlier version of our learning algorithm, we did not normalize weights for bags and instance-query singleton bags when learning with labels at mixed granularities. Instead, all such bags were weighted equally and the objective function was slightly altered. In those experiments, MIU’s accuracy was roughly equivalent to the figures reported here, although the improvement for all other query strategies (especially random selection) were lower. 5 Conclusion We have presented multiple-instance active learning, a novel framework for reducing the labeling burden by obtaining labels at a coarse granularity, and then selectively labeling at finer levels. This approach is useful when bag labels are easily acquired, and instance labels can be obtained but are expensive. In the present work, we explored the case where an MI learner may query unlabeled instances from positively labeled bags in order reduce the inherent ambiguity of the MI representation, while keeping label costs low. We also described a simple method for learning from labels at both the bag-level and instance-level, and showed that querying instance-level labels through active learning is beneficial in content-based image retrieval and text categorization problems. In addition, we introduced two active query selection strategies motivated by this work, MI Uncertainty and Expected Gradient Length, and demonstrated that they are well-suited to MI active learning. In future work, we plan to investigate the other MI active learning scenarios mentioned in Section 1. Of particular interest is the setting where, initially, some bags are labeled and others are not, and the learner is allowed to query on (i) unlabeled bags, (ii) unlabeled instances from positively labeled bags, or (iii) some combination thereof. We also plan to investigate other selection methods for different query formats, such as “label any or all positive instances in this bag,” which may be more natural for some MI learning problems. Acknowledgments This research was supported by NSF grant IIS-0093016 and NIH grants T15-LM07359 and R01LM07050-05. References [1] S. Andrews, I. Tsochantaridis, and T. Hofmann. Support vector machines for multiple-instance learning. In Advances in Neural Information Processing Systems (NIPS), pages 561–568. MIT Press, 2003. [2] D. Cohn, L. Atlas, and R. Ladner. Improving generalization with active learning. Machine Learning, 15(2):201–221, 1994. [3] T. Dietterich, R. Lathrop, and T. Lozano-Perez. Solving the multiple-instance problem with axis-parallel rectangles. Artificial Intelligence, 89:31–71, 1997. [4] J.T. Eppig, C.J. Bult, J.A. Kadin, J.E. Richardson, J.A. Blake, and the members of the Mouse Genome Database Group. The Mouse Genome Database (MGD): from genes to mice–a community resource for mouse biology. Nucleic Acids Research, 33:D471–D475, 2005. http://www.informatics.jax.org. [5] D. Lewis and J. Catlett. Heterogeneous uncertainty sampling for supervised learning. In Proceedings of the International Conference on Machine Learning (ICML), pages 148–156. Morgan Kaufmann, 1994. [6] O. Maron and T. Lozano-Perez. A framework for multiple-instance learning. In Advances in Neural Information Processing Systems (NIPS), pages 570–576. MIT Press, 1998. [7] J. Nocedal and S.J. Wright. Numerical Optimization. Springer, 1999. [8] R. Rahmani and S.A. Goldman. MISSL: Multiple-instance semi-supervised learning. In Proceedings of the International Conference on Machine Learning (ICML), pages 705–712. ACM Press, 2006. [9] S. Ray and M. Craven. Supervised versus multiple instance learning: An empirical comparison. In Proceedings of the International Conference on Machine Learning (ICML), pages 697–704. ACM Press, 2005. [10] Q. Tao, S.D. Scott, and N.V. Vinodchandran. SVM-based generalized multiple-instance learning via approximate box counting. In Proceedings of the International Conference on Machine Learning (ICML), pages 779–806. Morgan Kaufmann, 2004. [11] X. Zhu, J. Lafferty, and Z. Ghahramani. Combining active learning and semi-supervised learning using gaussian fields and harmonic functions. In Proceedings of the ICML Workshop on the Continuum from Labeled to Unlabeled Data, pages 58–65, 2003.
2007
135
3,165
Semi-Supervised Multitask Learning Qiuhua Liu, Xuejun Liao, and Lawrence Carin Department of Electrical and Computer Engineering Duke University Durham, NC 27708-0291, USA Abstract A semi-supervised multitask learning (MTL) framework is presented, in which M parameterized semi-supervised classifiers, each associated with one of M partially labeled data manifolds, are learned jointly under the constraint of a softsharing prior imposed over the parameters of the classifiers. The unlabeled data are utilized by basing classifier learning on neighborhoods, induced by a Markov random walk over a graph representation of each manifold. Experimental results on real data sets demonstrate that semi-supervised MTL yields significant improvements in generalization performance over either semi-supervised single-task learning (STL) or supervised MTL. 1 Introduction Supervised learning has proven an effective technique for learning a classifier when the quantity of labeled data is large enough to represent a sufficient sample from the true labeling function. Unfortunately, a generous provision of labeled data is often not available since acquiring the label of a datum is expensive in many applications. A classifier supervised by a limited amount of labeled data is known to generalize poorly even if it produces zero training errors. There has been much recent work on improving the generalization of classifiers based on using information sources beyond the labeled data. These studies fall into two major categories: (i) semi-supervised learning [9, 12, 15, 10] and (ii) multitask learning (MTL) [3, 1, 13]. The former employs the information from the data manifold, in which the manifold information provided by the usually abundant unlabeled data is exploited, while the latter leverages information from related tasks. In this paper we attempt to integrate the benefits offered by semi-supervised learning and MTL, by proposing semi-supervised multitask learning. The semi-supervised MTL framework consists of M semi-supervised classifiers coupled by a joint prior distribution over the parameters of all classifiers. Each classifier provides the solution for a partially labeled data classification task. The solutions for the M tasks are obtained simultaneously under the unified framework. Existing semi-supervised algorithms are often not directly amenable to MTL extensions. Transductive algorithms directly operate on labels. Since the label is a local property of the associated data point, information sharing must be performed at the level of data locations, instead of at the task level. The inductive algorithm in [10] employs a data-dependent prior to encode manifold information. Since the information transferred from related tasks is also often represented by a prior, the two priors will compete and need be balanced; moreover, this precludes a Dirichlet process [6] or its variants to represent the sharing prior across tasks, because the base distribution of a Dirichlet process cannot be dependent on any particular manifold. We develop a new semi-supervised formulation, which enjoys several nice properties that make the formulation immediately amenable to an MTL extension. First, the formulation has a parametric classifier built for each task, thus multitask learning can be performed efficiently at the task level, using the parameters of the classifiers. Second, the formulation encodes the manifold information of each task inside the associated likelihood function, sparing the prior for exclusive use by the information from related tasks. Third, the formulation lends itself to a Dirichlet process, allowing the tasks to share information in a complex manner. The new semi-supervised formulation is used as a key component of our semi-supervised MTL framework. In the MTL setting, we have M partially labeled data manifolds, each defining a classification task and involving design of a semi-supervised classifier. The M classifiers are designed simultaneously within a unified sharing structure. The key component of the sharing structure is a soft variant of the Dirichlet process (DP), which implements a soft-sharing prior over the parameters of all classifiers. The soft-DP retains the clustering property of DP and yet does not require exact sharing of parameters, which increases flexibility and promotes robustness in information sharing. 2 Parameterized Neighborhood-Based Classification The new semi-supervised formulation, termed parameterized neighborhood-based classification (PNBC), represents the class probability of a data point by mixing over all data points in the neighborhood, which is formed via Markov random walk over a graph representation of the manifold. 2.1 Neighborhoods Induced by Markov Random Walk Let G = (X, W) be a weighted graph such that X = {x1, x2, · · ·, xn} is a set of vertices that coincide with the data points in a finite data manifold, and W = [wij]n×n is the affinity matrix with the (i, j)-th element wij indicating the immediate affinity between data points xi and xj. We follow [12, 15] to define wij = exp(−0.5 ∥xi −xj∥2/σ2 i ), where ∥· ∥is the Euclidean norm and σij > 0. A Markov random walk on graph G = (X, W) is characterized by a matrix of one-step transition probabilities A = [aij]n×n, where aij is the probability of transiting from xi to xj via a single step and is given by aij = wij Pn k=1 wik [4]. Let B = [bij]n×n = At. Then (i, j)-th element bij represents the probability of transiting from xi to xj in t steps. Data point xj is said to be a t-step neighbor of xi if bij > 0. The t-step neighborhood of xi, denoted as Nt(xi), is defined by all t-step neighbors of xi along with the associated t-step transition probabilities, i.e., Nt(xi) = {(xj, bij) : bij > 0, xj ∈X}. The appropriateness of a t-step neighborhood depends on the right choice of t. A rule of choosing t is given in [12], based on maximizing the margin of the associated classifier on both labeled and unlabeled data points. The σi in specifying wij represents the step-size (distance traversed in a single step) for xi to reach its immediate neighbor, and we have used a distinct σ for each data point. Location-dependent step-sizes allow one to account for possible heterogeneities in the data manifold — at locations with dense data distributions a small step-size is suitable, while at locations with sparse data distributions a large step-size is appropriate. A simple choice of heterogeneous σ is to let σi be related to the distance between xi and close-by data points, where closeness is measured by Euclidean distance. Such a choice ensures each data point is immediately connected to some neighbors. 2.2 Formulation of the PNBC Classifier Let p∗(yi|xi, θ) be a base classifier parameterized by θ, which gives the probability of class label yi of data point xi, given xi alone (which is a zero-step neighborhood of xi). The base classifier can be implemented by any parameterized probabilistic classifier. For binary classification with y ∈{−1, 1}, the base classifier can be chosen as logistic regression with parameters θ, which expresses the conditional class probability as p∗(yi|xi, θ) = [1 + exp(−yiθT xi)]−1 (1) where a constant element 1 is assumed to be prefixed to each x (the prefixed x is still denoted as x for notational simplicity), and thus the first element in θ is a bias term. Let p(yi|Nt(xi), θ) denote a neighborhood-based classifier parameterized by θ, representing the probability of class label yi for xi, given the neighborhood of xi. The PNBC classifier is defined as a mixture p(yi|Nt(xi), θ) = Pn j=1bij p∗(yi|xj, θ) (2) where the j-th component is the base classifier applied to (xj, yi) and the associated mixing proportion is defined by the probability of transiting from xi to xj in t steps. Since the magnitude of bij automatically determines the contribution of xj to the mixture, we let index j run over the entire X for notational simplicity. The utility of unlabeled data in (2) is conspicuous — in order for xi to be labeled yi, each neighbor xj must be labeled consistently with yi, with the strength of consistency proportional to bij; in such a manner, yi implicitly propagates over the neighborhood of xi. By taking neighborhoods into account, it is possible to obtain an accurate estimate of θ, based on a small amount of labeled data. The over-fitting problem associated with limited labeled data is ameliorated in the PNBC formulation, through enforcing consistent labeling over each neighborhood. Let L ⊆{1, 2, · · · , n} denote the index set of labeled data in X. Assuming the labels are conditionally independent, we write the neighborhood-conditioned likelihood function p ¡ {yi, i ∈L}|{Nt(xi) : i ∈L}, θ ¢ = Q i∈L p(yi|Nt(xi), θ) = Q i∈L Pn j=1 bij p∗(yi|xj, θ) (3) 3 The Semi-Supervised MTL Framework 3.1 The sharing prior Suppose we are given M tasks, defined by M partially labeled data sets Dm = {xm i : i = 1, 2, · · · , nm} ∪{ym i : i ∈Lm} for m = 1, · · · , M, where ym i is the class label of xm i and Lm ⊂{1, 2, · · · , nm} is the index set of labeled data in task m. We consider M PNBC classifiers, parameterized by θm, m = 1, · · · , M, with θm responsible for task m. The M classifiers are not independent but coupled by a prior joint distribution over their parameters p(θ1, · · · , θM) = QM m=1 p(θm|θ1, · · · , θm−1) (4) with the conditional distributions in the product defined by p(θm|θ1, · · · , θm−1) = 1 α+m−1 £ αp(θm|Υ) + Pm−1 l=1 N(θm; θl, η2I) ¤ (5) where α > 0, p(θm|Υ) is a base distribution parameterized by Υ, N( · ; θl, η2I) is a normal distribution with mean θl and covariance matrix η2I. As discussed below, the prior in (4) is linked to Dirichlet processes and thus is more general than a parametric prior, as used, for example, in [5]. Each normal distribution represents the prior transferred from a previous task; it is the metaknowledge indicating how the present task should be learned, based on the experience with a previous task. It is through these normal distributions that information sharing between tasks is enforced. Taking into account the data likelihood, unrelated tasks cannot share since they have dissimilar solutions and forcing them to share the same solution will decrease their respective likelihood; whereas, related tasks have close solutions and sharing information helps them to find their solutions and improve their data likelihoods. The base distribution represents the baseline prior, which is exclusively used when there are no previous tasks available, as is seen from (5) by setting m = 1. When there are m −1 previous tasks, one uses the baseline prior with probability α α+m−1, and uses the prior transferred from each of the m −1 previous tasks with probability 1 α+m−1. The α balances the baseline prior and the priors imposed by previous tasks. The role of baseline prior decreases as m increases, which is in agreement with our intuition, since the information from previous tasks increase with m. The formulation in (5) is suggestive of the polya urn representation of a Dirichlet process (DP) [2]. The difference here is that we have used a normal distribution to replace Dirac delta in Dirichlet processes. Since N(θm|θl, η2I) approaches Dirac delta δ(θm −θl) as η2 →0, we recover the Dirichlet process in the limit case when limit case when η2 →0. The motivation behind the formulation in (5) is twofold. First, a normal distribution can be regarded as a soft version of the Dirac delta. While the Dirac delta requires two tasks to have exactly the same θ when sharing occurs, the soft delta only requires sharing tasks to have similar θ’s. The soft sharing may therefore be more consistent with situations in practical applications. Second, the normal distribution is analytically more appealing than the Dirac delta and allows simple maximum a posteriori (MAP) solutions. This is an attractive property considering that most classifiers do not have conjugate priors for their parameters and Bayesian learning cannot be performed exactly. Under the sharing prior in (4), the current task is equally influenced by each previous task but is influenced unevenly by future tasks — a distant future task has less influence than a near future task. The ordering of the tasks imposed by (4) may in principle affect performance, although we have not found this to be an issue in the experimental results. Alternatively, one may obtain a sharing prior that does not depend on task ordering, by modifying (5) as p(θm|θ−m) = 1 α+M−1 £ αp(θm|Υ) + P l̸=mN(θm; θl, η2I) ¤ (6) where θ−m = {θ1, · · · , θM} \ {θm}. The prior joint distribution of {θ1, · · · , θM} associated with the full conditionals in (6) is not analytically available, nether is the corresponding posterior joint distribution, which causes technical difficulties in performing MAP estimation. 3.2 Maximum A Posteriori (MAP) Estimation Assuming that, given {θ1, · · · , θM}, the class labels of different tasks are conditionally independent, the joint likelihood function over all tasks can be written as p ¡ {ym i , i ∈Lm}M m=1|{Nt(xm i ) : i ∈Lm}M m=1, {θm}M m=1 ¢ = QM m=1 Q i∈Lm Pnm j=1 bm ij p∗(ym i |xm j , θm) (7) where the m-th term in the product is taken from (3), with the superscript m indicating the task index. Note that the neighborhoods are built for each task independently of other tasks, thus a random walk is always restricted to the same task (the one where the starting data point belongs) and can never traverse multiple tasks. From (4), (5), and (7), one can write the logarithm of the joint posterior of {θ1, · · · , θM}, up to a constant translation that does not depend on {θ1, · · · , θM}, ℓMAP(θ1, · · · , θM) = ln p ¡ {θm}M m=1|{ym i , i ∈Lm}M m=1, {Nt(xm i ) : i ∈Lm}M m=1 ¢ = PM m=1 © ln £ αp(θm|Υ) + Pm−1 l=1 N(θm; θl, η2I) ¤ + P i∈LmlnPnm j=1 bm ijp∗(ym i |xm j , θm) ª (8) We seek the parameters {θ1, · · · , θM} that maximize the log-posterior, which is equivalent to simultaneously maximizing the prior in (4) and the likelihood function in (7). As seen from (5), the prior tends to have similar θ’s across tasks (similar θ’s increase the prior); however sharing between unrelated tasks is discouraged, since each task requires a distinct θ to make its likelihood large. As a result, to make the prior and the likelihood large at the same time, one must let related tasks have similar θ’s. Although any optimization techniques can be applied to maximize the objective function (8), expectation maximization (EM) is particularly suitable, since the objective function involves summations under the logarithmic operation. To conserve space the algorithmic details are omitted here. Utilization of the manifold information and the information from related tasks has greatly reduced the hypothesis space. Therefore, point MAP estimation in semi-supervised MTL will not suffer as much from overfitting as in supervised STL. This argument will be supported by the experimental results in Section 4.2, where semi-supervised MTL outperforms both supervised MTL and supervised STL, although the former is based on MAP and the latter two are based on Bayesian learning. With MAP estimation, one obtains the parameters of the base classifier in (1) for each task, which can be employed to predict the class label of any data point in the associated task, regardless of whether the data point has been seen during training. In the special case when predictions are desired only for the unlabeled data points seen during training (transductive learning), one can alternatively employ the PNBC classifier in (2) to perform the predictions. 4 Experimental Results First we consider semi-supervised learning on a single task and establish the competitive performance of the PNBC in comparison with existing semi-supervised algorithms. Then we demonstrate the performance improvements achieved by semi-supervised MTL, relative to semi-supervised STL and supervised MTL. Throughout this section, the base classifier in (1) is logistic regression. 4.1 Performance of the PNBC on a Single Task 20 40 60 80 0.62 0.64 0.66 0.68 0.7 0.72 0.74 Number of labeled data Accuracy on unlabeled data PIMA PNBC Szummer & Jaakkola Logistic GRF GRF Transductive SVM 20 40 60 80 0.86 0.88 0.9 0.92 0.94 0.96 Number of labeled data Accuracy on unlabeled data WDBC PNBC Szummer & Jaakkola Logistic GRF GRF Transductive SVM 20 40 60 80 0.65 0.7 0.75 0.8 0.85 0.9 Number of Labeled Data Accuracy on unlabeled data Ionosphere PNBC Szummer & Jaakkola Logistic GRF GRF Transductive SVM PNBC−II Figure 1: Transductive results of the PNBC. The horizontal axis is the size of XL. 0 20 40 60 80 100 120 0.5 0.6 0.7 0.8 0.9 Number of Unlabeled Samples Accuracy on separated test data 10 labeled samples PNBC Logistic GRF 0 20 40 60 80 100 120 0.5 0.6 0.7 0.8 0.9 Number of Unlabeled Samples Accuracy on separated test data 20 labeled samples PNBC Logistic GRF 0 20 40 60 80 100 120 0.5 0.6 0.7 0.8 0.9 Number of Unlabeled Samples Accuracy on separated test data 30 labeled samples PNBC Logistic GRF 0 20 40 60 80 100 120 0.5 0.6 0.7 0.8 0.9 Number of Unlabeled Samples Accuracy on separated test data 40 labeled samples PNBC Logistic GRF Figure 2: Inductive results of the PNBC on Ionosphere. The horizontal axis is the size of XU. The PNBC is evaluated on three benchmark data sets – Pima Indians Diabetes Database (PIMA), Wisconsin Diagnostic Breast Cancer (WDBC) data, and Johns Hopkins University Ionosphere database (Ionosphere), which are taken from the UCI machine learning repository [11]. The evaluation is performed in comparison to four existing semi-supervised learning algorithms, namely, the transductive SVM [9], the algorithm of Szummer & Jaakkola [12], GRF [15], and Logistic GRF [10]. The performance is evaluated in terms of classification accuracy, defined as the ratio of the number of correctly classified data over the total number of data being tested. We consider two testing modes: transductive and inductive. In the transductive mode, the test data are the unlabeled data that are used in training the semi-supervised algorithms; in the inductive mode, the test data are a set of holdout data unseen during training. We follow the same procedures as used in [10] to perform the experiments. Denote by X any of the three benchmark data sets and Y the associated set of class labels. In the transductive mode, we randomly sample XL ⊂X and assume the associated class labels YL are available; the semi-supervised algorithms are trained by X ∪YL and tested on X \ XL. In the inductive mode, we randomly sample two disjoint data subsets XL ⊂X and XU ⊂X, and assume the class labels YL associated with XL are available; the semisupervised algorithms are trained by XL ∪YL ∪XU and tested on 200 data randomly sampled from X \ (XL ∪XU). The comparison results are summarized in Figures 1 and 2, where the results of the PNBC and the algorithm of Szummer & Jaakkola are calculated by us, and the results of remaining algorithms are cited from [10]. The algorithm of Szummer & Jaakkola [12] and the PNBC use σi = minj ∥xi − xj∥/3 and t = 100; learning of the PNBC is based on MAP estimation. Each curve in the figures is a result averaged from T independent trials, with T = 20 for the transductive results and T = 50 for the inductive results. In the inductive case, the comparison is between the proposed algorithm and the Logistic GRF, as the others are transductive algorithms. For the PNBC, we can either use the base classifier in (1) or the PNBC classifier in (2) to predict the labels of unlabeled data seen in training (the transductive mode). In the inductive mode, however, the {bij} are not available for the test data (unseen in training) since they are not in the graph representation, therefore we can only employ the base classifier. In the legends of Figures 1 and 2, a suffix “II” to PNBC indicates that the PNBC classifier in (2) is employed in testing; when no suffix is attached, the base classifier is employed in testing. Figures 1 and 2 show that the PNBC outperforms all the competing algorithms in general, regardless of the number of labeled data points. The improvements are particularly significant on PIMA and Ionosphere. As indicated in Figure 1(c), employing manifold information in testing by using (2) can improve classification accuracy in the transductive learning case. The margin of improvements achieved by the PNBC in the inductive learning case is striking and encouraging — as indicated by the error bars in Figure 2, the PNBC significantly outperforms Logistic GRF in almost all individual trials. Figure 2 also shows that the advantage of the PNBC becomes more conspicuous with decreasing amount of labeled data considered during training. 4.2 Performance of the Semi-Supervised MTL Algorithm We compare the proposed semi-supervised MTL against: (a) semi-supervised single-task learning (STL), (b) supervised MTL, (c) supervised STL, (d) supervised pooling; STL refers to designing M classifiers independently, each for the corresponding task, and pooling refers to designing a single classifier based on the data of all tasks. Since we have evaluated the PNBC in Section 4.1 and established its effectiveness, we will not repeat the evaluation here and employ PNBC as a representative semi-supervised learning algorithm in semi-supervised STL. To replicate the experiments in [13], we employ AUC as the performance measure, where AUC stands for area under the receiver operation characteristic (ROC) curve [7]. The basic setup of the semi-supervised MTL algorithm is as follows. The tasks are ordered as they are when the data are provided to the experimenter (we have randomly permuted the tasks and found the performance does not change much). A separate t-neighborhood is employed to represent the manifold information (consisting of labeled and unlabeled data points) for each task, where the step-size at each data point is one third of the shortest distance to the remaining points and t is set to half the number of data points. The base prior p(θm|Υ) = N(θm; 0, υ2I) and the soft delta is N(θm; θl, η2I), where υ = η = 1. The α balancing the base prior and the soft delta’s is 0.3. These settings represent the basic intuition of the experimenter; they have not been tuned in any way and therefore do not necessarily represent the best settings for the semi-supervised MTL algorithm. 20 40 60 80 100 120 140 0.55 0.6 0.65 0.7 0.75 0.8 Number of Labeled Data in Each Task Average AUC on 19 tasks Supervised STL Supervised Pooling Supervised MTL Semi−Supervised STL Semi−Supervised MTL (a) 2 4 6 8 10 12 14 16 18 2 4 6 8 10 12 14 16 18 Index of Landmine Field Index of Landmine Field (b) Figure 3: (a) Performance of the semi-supervised MTL algorithm on landmine detection, in comparison to the remaining five algorithms. (b) The Hinton diagram of between-task similarity when there are 140 labeled data in each task. Landmine Detection First we consider the remote sensing problem considered in [13], based on data collected from real landmines. In this problem, there are a total of 29 sets of data, collected from various landmine fields. Each data point is represented by a 9-dimensional feature vector extracted from radar images. The class label is binary (mine or false mine). The data are available at http://www.ee.duke.edu/∼lcarin/LandmineData.zip. Each of the 29 data sets defines a task, in which we aim to find landmines with a minimum number of false alarms. To make the results comparable to those in [13], we follow the authors there and take data sets 1-10 and 16-24 to form 19 tasks. Of the 19 selected data sets, 1-10 are collected at foliated regions and 11-19 are collected at regions that are bare earth or desert. Therefore we expect two dominant clusters of tasks, corresponding to the two different types of ground surface conditions. To replicate the experiments in [13], we perform 100 independent trials, in each of which we randomly select a subset of data for which labels are assumed available, train the semi-supervised MTL and semi-supervised STL classifiers, and test the classifiers on the remaining data. The AUC averaged over the 19 tasks is presented in Figure 3(a), as a function of the number of labeled data, where each curve represents the mean calculated from the 100 independent trials and the error bars represent the corresponding standard deviations. The results of supervised STL, supervised MTL, and supervised pooling are cited from [13]. Semi-supervised MTL clearly yields the best results up to 80 labeled data points; after that supervised MTL catches up but semi-supervised MTL still outperforms the remaining three algorithms by significant margins. In this example semi-supervised MTL seems relatively insensitive to the amount of labeled data; this may be attributed to the doubly enhanced information provided by the data manifold plus the related tasks, which significantly augment the information available in the limited labeled data. The superiority of supervised pooling over supervised STL on this dataset suggests that there are significant benefits offered by sharing across the tasks, which partially explains why supervised MTL eventually catches up with semi-supervised MTL. We plot in Figure 3(b) the Hinton diagram [8] of the between-task sharing matrix (an average over the 100 trials) found by the semi-supervised MTL when there are 140 labeled data in each task. The (m, l)-th element of similarity matrix is equal to exp(−∥θm−θl∥2 2 ) (normalized such that the maximum element is one), which is represented by a square in the Hinton diagram, with a larger square indicating a larger value of the corresponding element. As seen from Figure 3(b), there is a dominant sharing among tasks 1-10 and another dominant sharing among tasks 11-19. Recall from the beginning of the section that data sets 1-10 are from foliated regions and data sets 11-19 are from regions that are bare earth or desert. Therefore, the sharing is in agreement with the similarity between tasks. Art Images Retrieval We now consider the problem of art image retrieval [14, 13], in which we have a library of 642 art images and want to retrieve the images based on a user’s preference. The preference of each user is available on a subset of images, therefore the objective is to learn the preference of each user based on a subset of training examples. Each image is represented by a vector of features and a user’s rating is represented by a binary label (like or dislike). The users’ preferences are collected in a web-based survey, which can be found at http://honolulu.dbs.informatik.unimuenchen.de:8080/paintings/index.jsp. We consider the same 69 users as considered in [13], who each rated more than 100 images. The preference prediction for each user is treated as a task, with the associated set of ground truth data defined by the images rated by the user. These 69 tasks are used in our experiment to evaluate the performance of semi-supervised MTL. Since two users may give different ratings to exactly the same image, pooling the tasks together can lead to multiple labels for the same data point. For this reason, we exclude supervised pooling and semi-supervised pooling in the performance comparison. 5 10 15 20 25 30 35 40 45 50 55 0.52 0.53 0.54 0.55 0.56 0.57 0.58 0.59 0.6 0.61 0.62 Number of Labeled Data for Each Task Average AUC on 68 tasks Supervised STL Supervised MTL Semi−supervised STL Semi−supervised MTL Figure 4: Performance of the semi-supervised MTL algorithm on art image retrieval, in comparison to the remaining three algorithms. Following [13], we perform 50 independent trials, in each of which we randomly select a subset of images rated by each user, train the semi-supervised MTL and semi-supervised STL classifiers, and test the classifiers on the remaining images. The AUC averaged over the 69 tasks is presented in Figure 4, as a function of the number of labeled data (rated images), where each curve represents the mean calculated from the 50 independent trials and the error bars represent the corresponding standard deviations. The results of supervised STL and supervised MTL are cited from [13]. Semi-supervised MTL performs very well, improving upon results of the three other algorithms by significant margins in almost all individual trials (as seen from the error bars). It is noteworthy that the performance improvement achieved by semi-supervised MTL over semi-supervised STL is larger than corresponding improvement achieved by supervised MTL over supervised STL. The greater improvement demonstrates that unlabeled data can be more valuable when used along with multitask learning. The additional utility of unlabeled data can be attributed to its role in helping to find the appropriate sharing between tasks. 5 Conclusions A framework has been proposed for performing semi-supervised multitask learning (MTL). Recognizing that existing semi-supervised algorithms are not conveniently extended to an MTL setting, we have introduced a new semi-supervised formulation to allow a direct MTL extension. We have proposed a soft sharing prior, which allows each task to robustly borrow information from related tasks and is amenable to simple point estimation based on maximum a posteriori. Experimental results have demonstrated the superiority of the new semi-supervised formulation as well as the additional performance improvement offered by semi-supervised MTL. The superior performance of semi-supervised MTL on art image retrieval and landmine detection show that manifold information and the information from related tasks could play positive and complementary roles in real applications, suggesting that significant benefits can be offered in practice by semi-supervised MTL. References [1] B. Bakker and T. Heskes. Task clustering and gating for Bayesian multitask learning. Journal of Machine Learning Research, pages 83–99, 2003. [2] D. Blackwell and J. MacQueen. Ferguson distributions via polya urn schemes. Annals of Statistics, 1: 353–355, 1973. [3] R. Caruana. Multitask learning. Machine Learning, 28:41–75, 1997. [4] F. R. K. Chung. Spectral Graph Theory. American Mathematical Society, 1997. [5] T. Evgeniou and M. Pontil. Regularized multi-task learning. In Proc. 17th SIGKDD Conf. on Knowledge Discovery and Data Mining, 2004. [6] T. Ferguson. A Bayesian analysis of some nonparametric problems. Annals of Statistics, 1:209–230, 1973. [7] J. Hanley and B. McNeil. The meaning and use of the area under a receiver operating characteristic (ROC) curve. Radiology, 143:29–36, 1982. [8] G. E. Hinton and T. J. Sejnowski. Learning and relearning in boltzmann machines. In J. L. McClelland, D. E. Rumelhart, and the PDP Research Group, editors, Parallel Distributed Processing: Explorations in the Microstructure of Cognition, volume 1, pages 282–317. MIT Press, Cambridge, MA, 1986. [9] T. Joachims. Transductive inference for text classification using support vector machines. In Proc. 16th International Conf. on Machine Learning (ICML), pages 200–209. Morgan Kaufmann, San Francisco, CA, 1999. [10] B. Krishnapuram, D. Williams, Y. Xue, A. Hartemink, L. Carin, and M. Figueiredo. On semi-supervised classification. In Advances in Neural Information Processing Systems (NIPS), 2005. [11] D.J. Newman, S. Hettich, C.L. Blake, and C.J. Merz. UCI repository of machine learning databases. http://www.ics.uci.edu/∼mlearn/MLRepository.html, 1998. [12] M. Szummer and T. Jaakkola. Partially labeled classification with markov random walks. In Advances in Neural Information Processing Systems (NIPS), 2002. [13] Y. Xue, X. Liao, L. Carin, and B. Krishnapuram. Multi-task learning for classification with dirichlet process priors. Journal of Machine Learning Research (JMLR), 8:35–63, 2007. [14] K. Yu, A. Schwaighofer, V. Tresp, W.-Y. Ma, and H.J. Zhang. Collaborative ensemble learning: Combining collaborative and content-based information filtering via hierarchical bayes. In Proceedings of the 19th International Conference on Uncertainty in Artificial Intelligence (UAI 2003), 2003. [15] X. Zhu, Z. Ghahramani, and J. Lafferty. Semi-supervised learning using gaussian fields and harmonic functions. In The Twentieth International Conference on Machine Learning (ICML), 2003.
2007
136
3,166
Contraction Properties of VLSI Cooperative Competitive Neural Networks of Spiking Neurons Emre Neftci1, Elisabetta Chicca1, Giacomo Indiveri1, Jean-Jacques Slotine2, Rodney Douglas1 1Institute of Neuroinformatics, UNI|ETH, Zurich 2Nonlinear Systems Laboratory, MIT, Cambridge, Massachusetts, 02139 emre@ini.phys.ethz.ch Abstract A non–linear dynamic system is called contracting if initial conditions are forgotten exponentially fast, so that all trajectories converge to a single trajectory. We use contraction theory to derive an upper bound for the strength of recurrent connections that guarantees contraction for complex neural networks. Specifically, we apply this theory to a special class of recurrent networks, often called Cooperative Competitive Networks (CCNs), which are an abstract representation of the cooperative-competitive connectivity observed in cortex. This specific type of network is believed to play a major role in shaping cortical responses and selecting the relevant signal among distractors and noise. In this paper, we analyze contraction of combined CCNs of linear threshold units and verify the results of our analysis in a hybrid analog/digital VLSI CCN comprising spiking neurons and dynamic synapses. 1 Introduction Cortical neural networks are characterized by a large degree of recurrent excitatory connectivity, and local inhibitory connections. This type of connectivity among neurons is remarkably similar, across all areas in the cortex [1]. It has been argued that a good candidate model for a canonical micro-circuit, potentially used as a general purpose cortical computational unit in the cortices, is the soft Winner-Take-All (WTA) circuit [1], or the more general class of Cooperative Competitive Networks [2] (CCN). A CCN is a set of interacting neurons, in which cooperation is achieved by local recurrent excitatory connections and competition is achieved via a group of inhibitory neurons, driven by the excitatory neurons and inhibiting them (see Figure 1). As a result, CCNs perform both common linear operations as well as complex non–linear operations. The linear operations include analog gain (linear amplification of the feed–forward input, mediated by the recurrent excitation and/or common mode input), and locus invariance [3]. The non–linear operations include non–linear selection or soft winner–take–all (WTA) behavior [2, 4, 5], signal restoration [4, 6], and multi–stability [2, 5]. CCN networks can be modeled using linear threshold units, as well as recurrent networks of spiking neurons. The latter can be efficiently implemented in silicon using Integrate–and–Fire (I&F) neurons and dynamic synapses [7]. In this work we use a prototype VLSI CCN device, comprising 128 low power I&F neurons [8] and 4096 dynamic synapses [9] that operate in real-time, in a massively parallel fashion. The main goal of this paper is to address the open question of how to determine network parameters, such as the strength of recurrent excitatory couplings or global inhibitory couplings, to create well–behaving complex networks composed of combinations of neural computational modules (such as CCNs) as depicted in Figure 1. The theoretical foundations used to address these problems are based on contraction theory [10]. By applying this theory to CCN models of linear threshold units and to combinations of them we find upper bounds to contraction conditions. We then test the theoretical results on the VLSI CCN of spiking neurons, and on a combination of two mutually coupled CCNs. We show how the experimental data presented are consistent with the theoretical predictions. 1 Figure 1: CCNs and combinations of CCNs. (a) A CCN consisting of a population of nearest neighbor connected excitatory neurons (blue) receiving external input and an inhibitory neuron which receives input from all the excitatory neurons and inhibits them back (red). (b) Photo of the VLSI CCN Chip comprising I&F neurons. (c) Three coupled CCNs, showing examples of connectivity patterns between them. 2 CCN of linear threshold units Neural network models of linear threshold units (LTUs) ignore many of the non–linear processes that occur at the synaptic level and contain, by definition, no information about spike timing. However networks of LTUs can functionally behave as networks of I&F neurons in a wide variety of cases [11]. Similarly boundary conditions found for LTU networks can be often applied also to their I&F neuron network counterparts. For this reason, we start by analyzing a network of LTUs whose structure is analogous to the one of the VLSI CCN of I&F neurons, and derive sufficient boundary conditions for contraction. If we consider a CCN of recurrently connected LTUs according to a weight matrix W, as shown on Figure 1, we can express the network dynamics as: τi d dt xi = −xi +g((Wx)i +bi) ∀i = 1,...,N (1) Where N is the total number of neurons in the system, the function g(x) = max(x,0) is a half–wave rectification non–linearity to ensure that x ≡(x1,...,xN)⊤remains positive, bi are the external inputs applied to the neurons and τi are the time constants of the neurons. We assume that neurons of each type (i.e. excitatory or inhibitory) have identical dynamics: we denote the time constant of excitatory neurons with τex and the one of inhibitory neurons with τih. Throughout the paper, we will use the following notation for the weights: ws for self excitation, we1, we2 for 1st and 2nd nearest neighbor excitation respectively, and wie,wei for inhibitory to excitatory neuron and vice versa. The W matrix has the following shape: W =     wsel f w1 w2 0 w2 w1 −wei ... ... w1 w2 0 w2 w1 wsel f −wei wie wie wie wie wie wie 0     (2) A CCN can be used to implement a WTA computation. Depending on the strength of the connections, a CCN can implement a Hard (HWTA) or Soft (SWTA) WTA. A HWTA implements a max operation or selection mechanism: only the neuron receiving the strongest input can be active and all other neurons are suppressed by global inhibition. A SWTA implements more complex operation such as non–linear selection, signal restoration, and multi–stability: one or several groups of neurons can be active at the same time, neurons belonging to the same group cooperate through local excitation, different groups compete through global inhibition. The activity of the ‘winning’ group of neurons can be amplified while other groups are suppressed. Depending on the strength of inhibitory and excitatory couplings different regimes are observed. Specifically, in Sec. 4 we compare a weakly coupled configuration, which guarantees contraction, with a strongly coupled configuration in which the output of the network depends on the input and the history, showing hysteretic (non–contracting) behaviors in which the selected ‘winning’ group has advantages over other group of neurons because of the recurrent excitation. 2 3 Contraction theory applied to CCNs of linear threshold units 3.1 Contraction of a single network A formal analysis of contraction theory applied to non–linear systems has been described in [10,12]. Here we present an overview of the theory applied to the system of Eq. (1). In a contracting system, all the trajectories converge to a single trajectory exponentially fast independent of the initial conditions. In particular, if the system has a steady state solution then, by definition, the state will contract and converge to that solution exponentially fast. Formally, the system is contracting if d dt ∥δx ∥is uniformally negative (i.e. negative in the entire state space) where δx corresponds to the distance between two neighboring trajectories at a given time. In fact, by path integration, we have d dt R P1 P2 ∥δx ∥< 0 where P1 and P2 are two points of state space (non-necessarily neighboring). This leads to the following theorem: Consider a system whose dynamics is given by the differential equations d dtx = f(x,t). The system is said to be contracting if all its trajectories converge exponentially to a single trajectory. A sufficient condition is that the symmetric part of the Jacobian J = ∂ ∂xf is uniformly negative definite. This condition can be written more explicitly as ∃β > 0, ∀x, ∀t ≥0 Js ≡ 1 2(J+J⊤) ≤−βI where I is the identity matrix and Js is the symmetric part of J It is equivalent to Js having all its eigenvalues uniformly negative [13]. We can define more generally a local coordinate transformation δz=Θδx, where Θ(x,t) is a square matrix, such that M(x,t) = ΘTΘ is a uniformly positive definite, symmetric and continuously differentiable metric. Note that the coordinate system z(x,t) does not need to exist, and will not in the general case, but δz and δz⊤δz can always be defined [14]. Then, in this metric one can compute the generalized Jacobian F = ( d dt Θ + ΘJ)Θ−1. If the symmetric part of the generalized Jacobian, Fs, is negative definite then the system is contracting. In a suitable metric it has been shown that this condition becomes sufficient and necessary [10]. In particular, if Θ is constant, Fs is negative definite if and only if (MF)s is negative definite. In fact, as Fs = (Θ−1)T(MJ)sΘ−1, then the condition vTFsv < 0 ∀v ∈RN (negative definite matrix) is equivalent to (vT(Θ−1)T)(MJ)s(Θ−1v) < 0 ∀Θ−1v ∈RN. Consequently, we can always choose a constant M to simplify our equations. Let us now see under which conditions the system defined by Eq. (1) is contracting. Except for the rectification non–linearity, the full system is a linear time–invariant (LTI) system, and it has a fixed point [15]. A common alternative to the half-wave rectification function is the sigmoid, in which case the Jacobian becomes differentiable. If we define fi(x,t) as fi(x,t) ≡d dt xi = −1 τi xi + 1 τi g((Wx)i +bi) (3) then the Jacobian matrix is given by Ji j = ∂ ∂x j fi(x,t) = −1 τi δi j + 1 τi g′(yi)wi j, where yi = (Wx)i +b and τi is the time constant of neuron i, with τi = τex for the excitatory neurons and τi = τih for the inhibitory ones. We assume that the wei and wie weights are not zero so we can use the constant metric: M =    τex 0 0 ... ... ... 0 ... wei wie τih    (4) which is positive definite. With this metric, MJ can be written MJ = −I + DK, where Di j = g′(yi)δi j , and K is similar to W but with wei in place of wie. Since g is sigmoidal (and thus it and its derivative are both bounded), we can then use the method proposed in [16] to determine a sufficient condition for contraction. This leads to a condition of the form λmax < 0, where λmax = 2we1 +2we2 +ws −1 (5) A graphical representation of the boundaries defined by this contraction condition is provided in Figure 2. The term |λmax| is called the contraction rate with respect to metric M. It is of particular interest because it is a lower bound for the rate at which the system converges to its solution in that metric. 3 Figure 2: Qualitative phase diagram for a single CCN of LTUs. We show here the possible regimes of the given in Eq. (1) as a function of excitation and inhibition. In the region D the rates would grow without bounds if there were no refractory period for the neurons. We see that a system which is unstable without inhibition cannot be in region A (i.e. within the boundaries of Eq. (5)). Note, however, that we do not quantitatively know the boundaries between B and C and between C and D 3.2 Contraction of feed–back combined CCNs One of the powerful features of contraction theory is the following: if a complex system is composed of coupled (feed–forward and feed–back) subsystems that are individually contracting, then it is possible to find a sufficient condition for contraction without computing the system’s full Jacobian. In addition it is possible to compute a lower bound for the full system’s contraction rate. Let Fs be the symmetric part of the Jacobian of two bi–directionally coupled subsystems, with symmetric feed–back couplings. Then Fs can be written with four blocks of matrices: Fs =  F1s G G⊤ F2s  (6) where F1s and F2s refer to the Jacobian of the individual, decoupled subsystems, while G and G⊤are the feed–back coupling components. If we assume both subsystems are contracting, then a sufficient condition for contraction of the overall system is given by [17]: |λmax(F1s)||λmax(F2s)| > σ2(G) ∀t > 0, uniformly (7) where |λmax(·)| is the contraction rate with respect to the used metric and σ(G) is the largest eigenvalue of G⊤G. By the eigenvalue interlacing theorem [13] we have that the contraction rate of the combined system is given by λmax(Fs) ≤mini λ(Fis) i = 1,2. For the specific example of a combined system comprising two identical subsystems coupled by a uniform coupling matrix G =wfb ·I we have σ2(G) = w2 fb. The combined system is contracting if: |wfb| < λmax (8) The results obtained with this analysis can be generalized to more than two combined subsystems, and with different types of coupling matrices [17]. Note that in a feed–forward or a negative– feedback case (i.e. at least one of the ‘G–blocks’ in the non–symmetric form is negative semidefinite), the system is automatically contracting provided that both subsystems are contracting. Given this, the condition for contraction of the combined system described by Eq. (8) becomes: wfb < λmax. Note that the contraction rate is an observable quantity, therefore one can build a contracting system consisting of an arbitrary number of CCNs as follows: 1. Determine the contraction rate of two CCNs by using Eq. (5) or by measuring it. 2. Use Eq. (7) to set the weight of the relation. Compute the upper bound to the contraction rate of the combined system as explained above. 3. Repeat the procedure for a new CCN and the combined one. 4 Contraction in a VLSI CCN of spiking neurons The VLSI device used in this work implements a CCN of spiking neurons using an array of low– power I&F neurons with dynamic synapses [8, 18]. The chip has been fabricated using a standard AMS 0.35µm CMOS process, and covers an area of about 10mm2. It contains 124 excitatory neurons with self, 1st, 2nd, 3rd nearest–neighbor recurrent excitatory connections and 4 inhibitory neurons (all–to–all bi–directionally connected to the excitatory neurons). Each neuron receives input currents from a row of 32 afferent plastic synapses that use the Address Event Representation (AER) to receive spikes. The spiking activity of the neurons is also encoded using the AER. In this representation input and output spikes are real–time asynchronous digital events that carry analog information in their temporal structure. We can interface the chip to a workstation, for prototyping 4 0 5 20 40 60 80 100 120 Neuron Time [s] 0 50 100 0 20 40 Frequency [Hz] (a) Single trial input stimulus 0 5 20 40 60 80 100 120 Neuron Time [s] 0 50 100 0 20 40 Frequency [Hz] (b) Single trial CCN response 0 50 100 128 0 10 20 30 40 Neuron Rate [Hz] (c) Multiple trials mean response Figure 3: Contraction of a single VLSI CCN. (a) A raster plot of the input stimulus(left) and the mean firing rates(right): the membrane potential of the I&F neurons are set to a random initial state by stimulating them with uncorrelated Poisson spike trains of constant mean frequency (up to the dashed line). Then the network is stimulated with 2 Gaussian bumps of different amplitude centered at Neuron 30 and Neuron 80, while, all the neurons received a constant level of uncorrelated input during the whole trial. (b) The response of the CCN to the stimulus presented in (a). (c) Mean responses of 100 trials, calculated after the red dashed line with error bars. The shaded area represents the mean input stimulus presented throughout the experiment. The system selects the largest input and suppresses the noise and the smaller bump, irrespective of initial conditions and noise. Neurons 124 to 128 are inhibitory neurons and do not receive external input. experiments using a dedicated PCI–AER board [19]. This board allows us to stimulate the synapses on the chip (e.g. with synthetic trains of spikes), monitor the activity of the I&F neurons, and map events from one neuron to a synapse belonging to a neuron on the same chip and/or on a different chip. An analysis of the dynamics of our VLSI I&F neurons can be found in [20] and although the leakage term in our implemented neurons is constant, it has been shown that such neurons exhibit responses qualitatively similar to standard linear I&F neurons [20]. A steady state solution is easily computable for a network of linear threshold units [5, 21]: it is a fixed point in state space, i.e. a set of activities for the neurons. In a VLSI network of I&F neurons the steady state will be modified by mismatch and the activities will fluctuate due to external and microscopic perturbations (but remain in its vicinity if the system is contracting). To prove contraction experimentally in these types of networks, one would have to apply an input and test with all possible initial conditions. This is clearly not possible, but we can verify under which conditions the system is compatible with contraction by repeating the same experiment with different initial conditions (see Sec. 4.1) and under which conditions the system is not compatible with contraction by observing if system settles to different solutions when stimulated with different initial conditions (see Sec. 4.3). 4.1 Convergence to a steady state with a static stimulus The VLSI CCN is stimulated by uncorrelated Poisson spike trains whose mean rates form two Gaussian–shaped bumps along the array of neurons, one with a smaller amplitude than the other superimposed to background noise (see Figure 3a). In a SWTA configuration, our CCNs should select and amplify the largest bump while suppressing the smaller one and the noise. We set the neurons into random initial conditions by stimulating them with uncorrelated Poisson spike trains with a spatially uniform and constant mean rate, before applying the real input stimulus (before the dashed line in Figure 3a ). Figure 3b shows the response of the CCN to this spike train, and Figure 3c is the response averaged over 100 trials. This experiment shows that regardless of the initial conditions, the final response of the CCN in an SWTA configuration is always the same (see the small error bars on Figure 3c), as we would expect from a contracting system. 4.2 Convergence with non–static stimulus and contraction rate As the condition for contraction does not depend on the external input, it will also hold for time– varying inputs. For example an interesting input stimulus is a bump of activity moving along the array of neurons at a constant speed. In this case, the firing rates produced by the chip carry informa5 2 4 6 20 40 60 80 100 120 Time [s] Neuron 0 20 40 60 80 (a) Single trial weak CCN 2 4 6 20 40 60 80 100 120 Time [s] Neuron 0 20 40 60 80 (b) Single trial strong CCN 3.4 3.6 3.8 4 4.2 4.4 0 0.2 0.4 0.6 0.8 1 Time [s] Rate (Normlized to max.) Sequencer Weak CCN Strong CCN (c) Activity of neuron #25 Figure 4: Contraction rate in VLSI CCNs using non–static stimulation. The input changed from an initial stage, where all the neurons were randomly stimulated with constant mean frequencies (up to 3 s), to a second stage in which the moving stimulus (freshly generated from trial to trial) is applied. This stimulus consists of a bump of activity that is shifted from one neuron to the next. Panels (a) and (b) show trials for two different configurations (weak and strong) and the colors indicate the firing rates calculated with a 300 ms sliding time window. The panel (c) compares the mean rates of neuron #25 in the weakly coupled CCN (green), the strong CCN (blue) and the input (red), all normalized to their peak of activity and calculated over 50 trials. We see how the blue line is delayed compared to the red and green line: the stronger recurrent couplings reduces the contraction rate. tion about the system’s contraction rate. We measured the response of the chip to such a stimulus, for both strong and weak recurrent couplings (see Figure 4). The strong coupling case produces slower responses to the input than the weak coupling case, as expected from a system having a lower contraction rate (see Figure 4c). The system’s condition for contraction does not depend on the individual neuron’s time constants, although the contraction rate in the original metric does. This also applies to the non–static input case, where the system will converge to the expected solution, independently of the neurons time constants. Local mismatch effects in the VLSI chip lead to an effective weight matrix whose elements wsel f ,w1,w2,wie are not identical throughout the array. This combined with the high gain of the strong coupling, and the variance produced by the input Poisson spike trains during the initial phase, explains the emergence of “pseudo-random” winners around neuron 30,60 and 80 in Figure 4b. 4.3 A non–contracting example We expect a CCN to be non–contracting when the coupling is strong: in this condition the CCN exhibits a hysteretic behavior [22], so the position of the winner strongly depends on the network’s initial conditions. Figure 5 illustrates this behavior with a CCN with very strong recurrent weights. 4.4 Contraction of combined systems By using a multi-chip AER communication infrastructure [19] we can connect multiple chips together with arbitrary connectivity matrices (e.g. G in Sec. 3.2), and repeat experiments analogous to the ones of Sec. 4.1. Figure 6 shows the response of two CCNs, combined via a connectivity matrix as shown in Figure 6b, to three input bumps of activity in a contracting configuration. 5 Conclusion We applied contraction theory to combined Cooperative Competitive Networks (CCN) of Linear Threshold Units (LTU) and determined sufficient conditions for contraction. We then tested the theoretical predictions on neuromorphic VLSI implementations of CCNs, by measuring their response to different types of stimuli with different random initial conditions. We used these results to determine parameter settings of single and combined networks of spiking neurons which make the system behave as a contracting one. Similarly, we verified experimentally that CCNs with strong recurrent couplings are not contracting as predicted by the theory. 6 0 5 20 40 60 80 100 120 Neuron Time [s] 0 50 100 0 10 20 Frequency [Hz] (a) Initial Cond. I 0 5 10 20 40 60 80 100 120 Neuron Time [s] 0 50 100 0 20 40 Frequency [Hz] (b) Weak CCN, contracting 0 5 10 20 40 60 80 100 120 Neuron Time [s] 0 50 100 0 50 100 Frequency [Hz] (c) Strong CCN, non-contracting 0 5 10 20 40 60 80 100 120 Neuron Time [s] 0 50 100 0 10 20 Frequency [Hz] (d) Initial cond. II 0 5 10 20 40 60 80 100 120 Neuron Time [s] 0 50 100 0 20 40 Frequency [Hz] (e) Weak CCN, contracting 0 5 10 20 40 60 80 100 120 Neuron Time [s] 0 50 100 0 200 400 Frequency [Hz] (f) Strong CCN, non-contracting Figure 5: VLSI CCN in a non-contracting configuration. We compare the CCN with very strong lateral recurrent excitation and low inhibition to a weakly coupled CCN. The figures present the raster plot and mean rates of the CCNs response (calculated after the dashed line) to the same stimuli starting from two different initial conditions. Panels (b) and (e) show the response of a contracting CCN, whereas panels (c) and (f) show that the system response depends on the initial conditions of (a) and (d). Therefore the the "Strong CCN" is non–contracting. 2 4 6 8 20 40 60 80 100 120 Time [s] Neuron 0 10 20 30 (a) CCN1 response 20 40 60 80 100 120 20 40 60 80 100 120 Neuron CCN2 Neuron CCN1 (b) Connectivity matrix 2 4 6 8 20 40 60 80 100 120 Time [s] Neuron 0 10 20 30 (c) CCN1 response 2 4 6 8 20 40 60 80 100 120 Time [s] Neuron 0 10 20 30 (d) Trial CCN2 0 50 100 0 10 20 30 Neuron Rate [Hz] (e) Mean response of CCNs Figure 6: Contraction in combined CCNs. (a) and (d) Single trial responses of CCN1 and CCN2 to the input stimulus shown in (c); (b) Connectivity matrix that couples the two CCNs (inverted identity matrix); (e) Mean response of CCNs, averaged over 20 trials (data points) superimposed to average input frequencies (shaded area). The response of the coupled CCNs converged to the same mean solution, consistent with the hypothesis that the combined system is contracting. 7 Acknowledgments This work was supported by the DAISY (FP6-2005-015803) EU grant, and by the Swiss National Science Foundation under Grant PMPD2-110298/1. We thank P. Del Giudice and V. Dante (ISS), for original design of the PCI-AER board and A. Whatley for help with the software of the PCI-AER board. References [1] R.J. Douglas and K.A.C. Martin. Neural circuits of the neocortex. Annual Review of Neuroscience, 27:419–51, 2004. [2] S. Amari and M. A. Arbib. Competition and cooperation in neural nets. In J. Metzler, editor, Systems Neuroscience, pages 119–65. Academic Press, 1977. [3] D. Hansel and H. Somplinsky. Methods in Neuronal Modeling, chapter Modeling Feature Selectivity in Local Cortical Circuits, pages 499–567. MIT Press, Cambridge, Massachusetts, 1998. [4] P. Dayan and L.F. Abbott. Theoretical Neuroscience: Computational and Mathematical Modeling of Neural Systems. MIT Press, 2001. [5] R. Hahnloser, R. Sarpeshkar, M.A. Mahowald, R.J. Douglas, and S. Seung. Digital selection and analog amplification co-exist in an electronic circuit inspired by neocortex. Nature, 405(6789):947–951, 2000. [6] R.J. Douglas, M.A. Mahowald, and K.A.C. Martin. Hybrid analog-digital architectures for neuromorphic systems. In Proc. IEEE World Congress on Computational Intelligence, volume 3, pages 1848–1853. IEEE, 1994. [7] G. Indiveri. Synaptic plasticity and spike-based computation in VLSI networks of integrate-and-fire neurons. Neural Information Processing - Letters and Reviews, 2007. (In press). [8] G. Indiveri, E. Chicca, and R. Douglas. A VLSI array of low-power spiking neurons and bistable synapses with spike–timing dependent plasticity. IEEE Transactions on Neural Networks, 17(1):211–221, Jan 2006. [9] C. Bartolozzi and G. Indiveri. Synaptic dynamics in analog VLSI. Neural Computation, 19:2581–2603, Oct 2007. [10] Winfried Lohmiller and Jean-Jacques E. Slotine. On contraction analysis for non-linear systems. Automatica, 34(6):683–696, 1998. [11] B. Ermentrout. Reduction of conductance-based models with slow synapses to neural nets. Neural Computation, 6:679–695, 1994. [12] Jean-Jacques E. Slotine. Modular stability tools for distributed computation and control. International J. of Adaptive Control and Signal Processing, 17(6):397–416, 2003. [13] Roger A. Horn and Charles R. Johnson. Matrix Analysis. Cambridge University Press, 1985. [14] Winfried Lohmiller and Jean-Jacques E. Soltine. Nonlinear process control using contraction theory. A.I.Ch.E. Journal, March 2000. [15] S. H. Strogatz. Nonlinear Dynamics and Chaos. Perseus Books, 1994. [16] O. Faugeras and J.-J. Slotine. Synchronization in neural fields. 2007. [17] Wei Wang and Jean-Jacques E. Slotine. On partial contraction analysis for coupled nonlinear oscillators. Biological Cybernetics, 92(1):38–53, 2005. [18] C. Bartolozzi, S. Mitra, and G. Indiveri. An ultra low power current–mode filter for neuromorphic systems and biomedical signal processing. In IEEE Proceedings on Biomedical Circuits and Systems (BioCAS06), pages 130–133, 2006. [19] E. Chicca, G. Indiveri, and R.J. Douglas. Context dependent amplification of both rate and eventcorrelation in a VLSI network of spiking neurons. In B. Schölkopf, J.C. Platt, and T. Hofmann, editors, Advances in Neural Information Processing Systems 19, Cambridge, MA, Dec 2007. Neural Information Processing Systems Foundation, MIT Press. (In press). [20] S. Fusi and M. Mattia. Collective behavior of networks with linear (VLSI) integrate and fire neurons. Neural Computation, 11:633–52, 1999. [21] H. Sebastion Seung Richard H. R. Hahnloser and Jean-Jacques Slotine. Permitted and forbidden sets in symmetric threshold-linear networks. Neural Computation, 15:621–638, 2003. [22] E. Chicca. A Neuromorphic VLSI System for Modeling Spike–Based Cooperative Competitive Neural Networks. PhD thesis, ETH Zürich, Zürich, Switzerland, April 2006. 8
2007
137
3,167
Mining Internet-Scale Software Repositories Erik Linstead, Paul Rigor, Sushil Bajracharya, Cristina Lopes and Pierre Baldi Donald Bren School of Information and Computer Science University of California, Irvine Irvine, CA 92697-3435 {elinstea,prigor,sbajrach,lopes,pfbaldi}@ics.uci.edu Abstract Large repositories of source code create new challenges and opportunities for statistical machine learning. Here we first develop Sourcerer, an infrastructure for the automated crawling, parsing, and database storage of open source software. Sourcerer allows us to gather Internet-scale source code. For instance, in one experiment, we gather 4,632 java projects from SourceForge and Apache totaling over 38 million lines of code from 9,250 developers. Simple statistical analyses of the data first reveal robust power-law behavior for package, SLOC, and lexical containment distributions. We then develop and apply unsupervised author-topic, probabilistic models to automatically discover the topics embedded in the code and extract topic-word and author-topic distributions. In addition to serving as a convenient summary for program function and developer activities, these and other related distributions provide a statistical and information-theoretic basis for quantifying and analyzing developer similarity and competence, topic scattering, and document tangling, with direct applications to software engineering. Finally, by combining software textual content with structural information captured by our CodeRank approach, we are able to significantly improve software retrieval performance, increasing the AUC metric to 0.84– roughly 10-30% better than previous approaches based on text alone. Supplementary material may be found at: http://sourcerer.ics.uci.edu/nips2007/nips07.html. 1 Introduction Large repositories of private or public software source code, such as the open source projects available on the Internet, create considerable new opportunities and challenges for statistical machine learning, information retrieval, and software engineering. Mining such repositories is important, for instance, to understand software structure, function, complexity, and evolution, as well as to improve software information retrieval systems and identify relationships between humans and the software they produce. Tools to mine source code for functionality, structural organization, team structure, and developer contributions are also of interest to private industry, where these tools can be applied to such problems as in-house code reuse and project staffing. While some progress has been made in the application of statistics and machine learning techniques to mine software corpora, empirical studies have typically been limited to small collections of projects, often on the order of one hundred projects or less, several orders of magnitude smaller than publicly available repositories(eg. [1]). Mining large software repositories requires leveraging both the textual and structural aspects of software data, as well as any relevant meta data. Here we develop Sourcerer, a large-scale infrastructure to explore such aspects. We first identify a number of robust power-law behaviors by simple statistical analyses. We then develop and apply unsupervised author-topic probabilistic models to discover the topics embedded in the code and extract topic-word and author-topic distributions. Finally, we leverage the dual textual and graphical nature of software to improve code search and retrieval. 2 Infrastructure and Data To allow for the Internet-scale analysis of source code we have built Sourcerer, an extensive infrastructure designed for the automated crawling, downloading, parsing, organization, and storage of large software repositories in a relational database. A highly configurable crawler allows us to specify the number and types of projects desired, as well as the host databases that should be targeted, and to proceed with incremental updates in an automated fashion. Once target projects are downloaded, a depackaging module uncompresses archive files while saving useful metadata (project name, version, etc). While the infrastructure is general, we apply it here to a sample of projects in Java. Specifically, for the results reported, we download 12,151 projects from Sourceforge and Apache and filter out distributions packaged without source code (binaries only). The end result is a repository consisting of 4,632 projects, containing 244,342 source files, with 38.7 million lines of code, written by 9,250 developers. For the software author-topic modeling approach we also employ the Eclipse 3.0 source code as a baseline. Though only a single project, Eclipse is a large, active open source effort that has been widely studied. In this case, we consider 2,119 source files, associated with about 700,000 lines of code, a vocabulary of 15,391 words, and 59 programmers. Methods for extracting and assigning words and programmers to documents are described in the next sections. A complete list of all the projects contained in our repository is available from the supplementary materials web pages. 3 Statistical Analysis During the parsing process our system performs a static analysis on project source code files to extract code entities and their relationships, storing them in a relational database. For java these entities consist of packages, classes, interfaces, methods, and fields, as well as more specific constructs such as constructors and static initializers. Relations capture method calls, inheritance, and encapsulation, to name a few. The populated database represents a substantial foundation on which to base statistical analysis of source code. Parsing the multi-project repository described above yields a repository of over 5 million entities organized into 48 thousand packages, 560 thousand classes, and 3.2 million methods, participating in over 23.4 million relations. By leveraging the query capabilities of the underlying database we can investigate other interesting statistics. For example, table 1 contains the frequencies of Java keywords across all 4,632 projects. Upon examining this data we can see that the ’default’ keyword occurs about 6 percent less frequently than the ’switch’ keyword, despite the fact that best practice typically mandates all switch statements contain a default block. Moreover, the ’for’ loop is about twice as pervasive as the ’while’ loop, suggesting that the bound on the number of iterations is more likely to be known or based on the size of a known data structure. Table 1: Frequency of java keyword occurrence Keyword Percentage Keyword Percentage Keyword Percentage Keyword Percentage public 12.53 boolean 2.12 this 0.89 switch 0.19 if 8.44 false 1.69 break 0.85 interface 0.17 new 8.39 case 1.60 while 0.63 continue 0.15 return 7.69 true 1.60 super 0.57 finally 0.14 import 6.89 class 1.36 instanceof 0.56 default 0.13 int 6.54 protected 1.33 double 0.55 native 0.08 null 5.52 catch 1.33 long 0.54 transient 0.06 void 4.94 for 1.22 implements 0.43 do 0.05 private 3.66 try 1.22 char 0.30 assert 0.03 static 3.16 throw 1.16 float 0.28 enum 0.02 final 3.01 package 0.96 abstract 0.25 volatile 0.04 else 2.33 byte 0.93 synchronized 0.25 strictfp 2.49E-06 throws 2.16 extends 0.89 short 0.20 Finally, statistical analyses of distributions also identify several power-law distributions. We have observed power-law distributions governing package, SLOC, and inside relation (lexical containment) counts. For instance, Figure 1 shows the log-log plots for the number of packages across projects. Similar graphs for other distributions are available from the supplemental materials page. 10 0 10 1 10 2 10 3 10 4 10 0 10 1 10 2 10 3 Number of Packages Rank Distribution of Packages over Projects Figure 1: Approximate power-law distribution for packages over projects 4 Topic and Author-Topic Probabilistic Modeling of Source Code Automated topic and author-topic modeling have been successfully used in text mining and information retrieval where they have been applied, for instance, to the problem of summarizing large text corpora. Recent techniques include Latent Dirichlet Allocation (LDA), which probabilistically models text documents as mixtures of latent topics, where topics correspond to key concepts presented in the corpus [2] (see also [3]). Author-Topic (AT) modeling is an extension of topic modeling that captures the relationship of authors to topics in addition to extracting the topics themselves. An extension of LDA to probabilistic AT modeling has been developed in [4]. In the literature [5], these more recent approaches have been found to produce better results than more traditional methods such as latent semantic analysis (LSA) [6]. Despite previous work in classifying code based on concepts [1], applications of LDA and AT models have been limited to traditional text corpora such as academic publications, news reports, corporate emails, and historical documents [7, 8]. At the most basic level, however, a code repository can be viewed as a text corpus, where source files are analogous to documents and developers to authors. Though vocabulary, syntax, and conventions differentiate a programming language from a natural language, the tokens present in a source file are still indicative of its function (ie. its topics). Thus here we develop and apply probabilistic AT models to software data. In AT models for text, the data consists of a set of documents. The authors of each documents are known and each document is treated as a bag of words. We let A be the total number of authors, W the total number of distinct words (vocabulary size), and T the total number of topics present in the documents. While non-parametric Bayesian [9] and other [10] methods exist to try to infer T from the data, here we assume that T is fixed (e.g. T = 100), though we explore different values. As in [7], our model assumes that each topic t is associated with a multinomial distribution φ•t over words w, and each author a is associated with a multinomial distribution θ•a over topics. More precisely, the parameters are given by two matrices: a T × A matrix Θ = (θta) of author-topic distributions, and a W × T matrix Φ = (φwt) of topic-word distributions. Given a document d containing Nd words with known authors, in generative mode each word is assigned to one of the authors a of the document uniformly, then the corresponding θ•a is sampled to derive a topic t, and finally the corresponding φ•t is sampled to derive a word w. A fully Bayesian model is derived by putting symmetric Dirichlet priors with hyperparameters α and β over the distributions θ•a and φ•t. So for instance the prior on θ•a is given by Dα(θ•a) = Γ(Tα) (Γ(α))T T Y t=1 θα−1 ta and similarly for φ•t. If A is the set of authors of the corpus and document d has Ad authors, it is easy to see that under these assumptions the likelihood of a document is given by: P(d|Θ, Φ, A) = Nd Y i=1 1 Ad X a T X t=1 φwitθta which can be integrated over φ and θ and their Dirichlet distributions to get P(d|α, β, A). The posterior can be sampled efficiently using Markov Chain Monte Carlo Methods (Gibbs sampling) and, for instance, the Θ and Φ parameter matrices can be estimated by MAP or MPE methods. Once the data is obtained, applying this basic AT model to software requires the development of several tools to facilitate the processing and modeling of source code. In addition to the crawling infrastructure described above, the primary functions of the remaining tools are to extract and resolve author names from source code, as well as convert the source code to the bag-of-words format. 4.1 Information Extraction from Source Code Author-Document: The author-document matrix is produced from the output of our author extraction tool. It is a binary matrix where entry [i,j]=1 if author i contributed to document j, and 0 otherwise. Extracting author information is ultimately a matter of tokenizing the code and associating developer names with file (document) names when this information is available. This process is further simplified for java software due to the prevalence of javadoc tags which present this metadata in the form of attribute-value pairs. Exploratory analysis of the Eclipse 3.0 code base, however, shows that most source files are credited to “The IBM Corporation” rather than specific developers. Thus, to generate a list of authors for specific source files, we parsed the Eclipse bug data available in [11]. After pruning files not associated with any author, this input dataset consists of 2,119 Java source files, comprising 700,000 lines of code, from a total of 59 developers. While leveraging bug data is convenient (and necessary) to generate the developer list for Eclipse 3.0, it is also desirable to develop a more flexible approach that uses only the source code itself, and not other data sources. Thus to extract author names from source code we also develop a lightweight parser that examines the code for javadoc ’@author’ tags, as well as free form labels such as ’author’ and ’developer.’ Occurrences of these labels are used to isolate and identify developer names. Ultimately author identifiers may come in the form of full names, email addresses, url’s, or CVS account names. This multitude of formats, combined with the fact that author names are typically labeled in the code header, is key to our decision to extract developer names using our own parsing utilities, rather than part-of-speech taggers [12] leveraged in other text mining projects. A further complication for author name extraction is the fact that the same developer may write his name in several different ways. For example, “John Q. Developer” alternates between “John Developer,” “J. Q. Developer,” or simply “Developer.” To account for this effect, we implement also a two-tiered approach to name resolution using the q-gram algorithm [13]. When an individual project is parsed, a list of contributing developers (and the files they modified) is created. A pairwise comparison of author-names is then performed using q-gram similarity, and pairs of names whose similarity is greater than a threshold t1 are merged. This process continues until all pairwise similarities are below the threshold, and the project list is then added to a global list of authors. When parsing is complete for all projects, the global author list is resolved using the same process, but with a new threshold, t2, such that t2 > t1. This approach effectively implements more conservative name resolution across projects in light of the observation that the scope of most developer activities is limited to a relatively small number (1 in many cases) of open source efforts. In practice, we set t1 = .65 and t2 = .75. Running our parser on the multi-project repository yields 9,250 distinct authors respectively. Word-Document: To produce the word-document matrix for our input data we have developed a comprehensive tokenization tool tuned to the Java programming language. This tokenizer includes language-specific heuristics that follow the commonly practiced naming conventions. For example, the Java class name “QuickSort” will generate the words “quick” and “sort”. All punctuation is ignored. As an important step in processing source files our tool removes commonly occurring stop words. We augment a standard list of stop words used for the English language (e.g. and, the, but, etc) to include the names of all classes from the Java SDK (eg. ArrayList, HashMap, etc). This is done to specifically avoid extracting common topics relating to the Java collections framework.We run the LDA-based AT algorithm on the input matrices and set the total number of topics (100) and the number of iterations by experimentation. For instance, the number of iterations, i, to run the algorithm is determined empirically by analyzing results for i ranging from 500 to several thousands. The results presented in the next section are derived using 3,000 iterations, which were found to produce interpretable topics in a reasonable amount of time (a week or so). Because the algorithm contains a stochastic component we also verified the stability of the results across multiple runs. 4.2 Topic and Author-Topic Modeling Results A representative subset of 6 topics extracted via Author-Topic modeling on the selected 2,119 source files from Eclipse 3.0 is given in Table 2. Each topic is described by several words associated with the topic concept. To the right of each topic is a list of the most likely authors for each topic with their probabilities. Examining the topic column of the table it is clear that various functions of the Eclipse framework are represented. For example, topic 1 clearly corresponds to unit testing, topic 2 to debugging, topic 4 to building projects, and topic 6 to automated code completion. Remaining topics range from package browsing to compiler options. Table 2: Representative topics and authors from Eclipse 3.0 # Topic Author Probabilities # Topic Author Probabilities junit egamma 0.97065 nls-1 darins 0.99572 run wmelhem 0.01057 ant dmegert 0.00044 listener darin 0.00373 manager nick 0.00044 1 item krbarnes 0.00144 4 listener kkolosow 0.00036 suite kkolosow 0.00129 classpath maeschli 0.00031 target jaburns 0.96894 type kjohnson 0.59508 source darin 0.02101 length jlanneluc 0.32046 debug lbourlier 0.00168 names darin 0.02286 2 breakpoint darins 0.00113 5 match johna 0.00932 location jburns 0.00106 methods pmulet 0.00918 ast maeschli 0.99161 token daudel 0.99014 button mkeller 0.00097 completion teicher 0.00308 cplist othomann 0.00055 current jlanneluc 0.00155 3 entries tmaeder 0.00055 6 identifier twatson 0.00084 astnode teicher 0.00046 assist dmegert 0.00046 Table 3 presents 6 representative author-topic assignments from the multi-project repository. This dataset yields a substantial increase in topic diversity. Topics representing major sub-domains of software development are clearly represented, with the first topic corresponding to web applications, the second to databases, the third to network applications, and the fourth to file processing. Topics 5 and 6 are especially interesting, as they correspond to common examples of crosscutting concerns from aspect-oriented programming [14], namely security and logging. Topic 5 is also demonstrative of the inherent difficulty of resolving author names, and the shortcomings of the qgram algorithm, as the developer “gert van ham” and the developer “hamgert” are most likely the same person documenting their name in different ways. Several trends reveal themselves when all results are considered. Though the majority of topics can be intuitively mapped to their corresponding domains, some topics are too noisy to be able to associate any functional description to them. For example, one topic extracted from our repository consists of Spanish words unrelated to software engineering which seem to represent the subset of source files with comments in Spanish. Other topics appear to be very project specific, and while they may indeed describe a function of code, they are not easily understood by those who are only casually familiar with the software artifacts in the codebase. This is especially true with Eclipse, which is limited in both the number and diversity of source files. In general noise appears to diminish as repository size grows. Noise can be controlled to some degree with tuning the number of topics to be extracted, but of course can not be eliminated completely. Examining the author assignments (and probabilities) for the various topics provides a simple means by which to discover developer contributions and infer their competencies. It should come as no surprise that the most probable developer assigned to the JUnit framework topic is “egamma”, or Erich Gamma. In this case, there is a 97% chance that any source file in our dataset assigned to this topic will have him as a contributor. Based on this rather high probability, we can also infer that he is likely to have extensive knowledge of this topic. This is of course a particularly Table 3: Representative topics and authors from the multi-project repository # Topic Author Probabilities # Topic Author Probabilities servlet craig r mcclanahan 0.19147 file adam murdoch 0.02466 session remy maucherat 0.08301 path peter donald 0.02056 1 response peter rossbach 0.04760 4 dir ludovic claude 0.01496 request greg wilkins 0.04251 directory matthew hawthorne 0.01170 http amy roh 0.03100 stream lk 0.01106 sql mark matthews 0.33265 token werner dittmann 0.09409 column ames 0.02640 key apache software foundation 0.06117 2 jdbc mike bowler 0.02033 5 security gert van ham 0.05153 type manuel laflamme 0.02027 param hamgert 0.05144 result gavin king 0.01813 cert jcetaglib.sourceforge.net 0.05133 packet brian weaver 0.14015 service wayne m osse 0.44638 type apache directory project 0.10066 str dirk mascher 0.07339 3 session opennms 0.08667 6 log david irwin 0.04928 snmpwalkmv matt whitlock 0.06508 config linke 0.02823 address trustin lee 0.04752 result jason 0.01505 attractive example because Erich Gamma is widely known for being a founder of the JUnit project, a fact which lends credibility to the ability of the topic modeling algorithm to assign developers to reasonable topics. One can interpret the remaining author-topic assignments along similar lines. For example, developer “daudel” is assigned to the topic corresponding to automatic code completion with probability .99. Referring back to the Eclipse bug data it is clear that the overwhelming majority of bug fixes for the codeassist framework were made by this developer. One can infer that this is likely to be an area of expertise of the developer. In addition to determining developer contributions, one may also be curious to know the scope of a developer’s involvement. Does a developer work across application areas, or are his contributions highly focused? How does the breadth of one developer compare to another? These are natural questions that arise in the software development process. To answer these questions within the framework of author-topic models, we can measure the breadth of an author a by the entropy H(a) = −P t θta log θta of the corresponding distribution over topics. Applying the measure to our multi-project dataset, we find that the average measure is 2.47 bits. The developer with the lowest entropy is “thierry danard,” with .00076 bits. The developer with the highest entropy is “wdi” with 4.68 bits, with 6.64 bits being the maximum possible score for 100 topics. While the entropy egamma jeromel kjohnson dmegert kmaetzel cwong ptff lbourlier jfogell prapicau dwilson jburns maeschlimann kkolosow bbaumgart akiezun daudel mkeller mrennie jaburns darins othomann mfaraj sfranklin johna jeem dejan tmaeder aweinand mvanmeek tod bbokowski twatson khorne dpollock oliviert bbiggs darin jeff dbirsan krbarnes ffusier ikhelifi sxenos pmulet jdesrivieres wmelhem schan rchaves maeschli dj cmarti sarsenau kent teicher jlanneluc twidmer dbaeumer nick Figure 2: All 59 Eclipse 3.0 authors clustered by KL divergence of the distribution of an author over topics measures the author’s breadth, the similarity between two authors can be measured by comparing their respective distributions over topics. Several metrics are possible for this purpose, but one of the most natural measures is provided by the symmetrized Kullback-Leibler (KL) divergence. Multidimensional scaling (MDS) is employed to further visualize author similarities, resulting in Figure 2 for the Eclipse project. The boxes represent individual developers, and are arranged such that developers with similar topic distributions are nearest one another. A similar figure, displaying only a subset of the 4,500 SourceForge and Apache authors due to space and legibility constraints, is available in the supplementary materials. This information is especially useful when considering how to form a development team, choosing suitable programmers to perform code updates, or deciding to whom to direct technical questions. Two other important distributions that can be retrieved from the AT modeling approach are the distribution of topics across documents, and the distribution of documents across topics (not shown). The corresponding entropies provide an automated and novel way to precisely formalize and measure topic scattering and document tangling, two fundamental concepts of software design [14], which are important to software architects when performing activities such as code refactoring. 5 Code Search and Retrieval Sourcerer relies on a deep analysis of code to extract pertinent textual and structural features that can be used to improve the quality and performance of source code search, as well as augment the ways in which code can be searched. By combining standard text information retrieval techniques with source-specific heuristics and a relational representation of code, we have available a comprehensive platform for searching software components. While there has been progress in developing sourcecode-specific search engines in recent years (e.g. Koders, Krugle, and Google’s CodeSearch), these systems continue to focus strictly on text information retrieval, and do not appear to leverage the copious relations that can be extracted and analyzed from code. Programs are best modeled as graphs, with code entities comprising the nodes and various relations the edges. As such, it is worth exploring possible ranking methods that leverage the underlying graphs. A natural starting point is Google’s PageRank [15], which considers hyperlinks to formulate a notion of popularity among web pages. This can be applied to source as well, as it is likely that a code entity referenced by many other entities are more robust than those with few references. We used Google’s PageRank [15] almost verbatim. The Code Rank of a code entity (package, class, or method) A is given by: CR(A) = (1 −d) + d(CR(T1)/C(T1) + ... + CR(Tn)/C(Tn)) where T1...Tn are the code entities referring to A, C(A) is the number of outgoing links of A, and d is a damping factor. Using the CodeRank algorithm as a basis it is possible to devise many ranking schemes by building graphs from the many entities and relations stored in our database, or subsets thereof. For example, one may consider the graph of only method call relationships, package dependencies, or inheritance hierarchies. Moreover, graph-based techniques can be combined with a variety of heuristics to further improve code search. For example, keyword hits to the right of the fully-qualified name can be boosted, hits in comments can be discounted, and terms indicative of test articles can be ignored. We are conducting detailed experiments to assess the effectiveness of graph-based algorithms in conjunction with standard IR techniques to search source code. Current evidence strongly indicates that best results are ultimately obtained by combining term-based ranking with source-specific heuristics and coderank. After defining a set of 25 control queries with known ”best” hits, we compared performances using standard information retrieval metrics, such as area under curve (AUC). Queries were formulated to represent users searching for specific algorithms, such as ’depth first search,’ as well as users looking to reuse complete components, such as ’database connection manager.’ Best hits were determined manually with a team of 3 software engineers serving as human judges of result quality, modularity, and ease of reuse. Results clearly indicate that the general Google search engine is ineffective for locating relevant source code, with a mean AUC of .31 across the queries. By restricting its corpus to code alone, Google’s code search engine yields substantial improvement with an AUC of approximately .66. Despite this improvement this system essentially relies only on regular expression matching of code keywords. Using a Java-specific keyword and comment parser our infrastructure yields an immediate improvement with an AUC of .736. By augmenting this further with the heuristics above and CodeRank (consisting of class and method relations), the mean AUC climbs to .841. At this time we have conducted extensive experiments for 12 ranking schemes corresponding to various combinations of graph-based and term-based heuristics, and have observed similar improvements. While space does not allow their inclusion, additional results are available from our supplementary materials page. 6 Conclusion Here we have leveraged a comprehensive code processing infrastructure to facilitate the mining of large-scale software repositories. We conduct a statistical analysis of source code on a previously unreported scale, identifying robust power-law behavior among several code entities. The development and application of author-topic probabilistic modeling to source code allows for the unsupervised extraction of program organization, functionality, developer contributions, and developer similarities, thus providing a new direction for research in this area of software engineering. The methods developed are applicable at multiple scales, from single projects to Internet-scale repositories. Results indicate that the algorithm produces reasonable and interpretable automated topics and author-topic assignments. The probabilistic relationships between author, topics, and documents that emerge from the models naturally provide an information-theoretic basis to define and compare developer and program similarity, topic scattering, and document tangling with potential applications in software engineering ranging from bug fix assignments and staffing to software refactoring. Finally, by combining term-based information retrieval techniques with graphical information derived from program structure, we are able to significantly improve software search and retrieval performance. Acknowledgments: Work in part supported by NSF MRI grant EIA-0321390 and a Microsoft Faculty Research Award to PB, as well as NSF grant CCF-0725370 to CL and PB. References [1] S. Ugurel, R. Krovetz, and C. L. Giles. What’s the code?: automatic classification of source code archives. In KDD ’02: Proceedings of the eighth ACM SIGKDD international conference on Knowledge discovery and data mining, pages 632–638, New York, NY, USA, 2002. ACM Press. [2] D.M. Blei, A.Y. Ng, and M.I. Jordan. Latent dirichlet allocation. Journal of Machine Learning Research, 3:993–1022, January 2003. [3] W. Buntine. Open source search: a data mining platform. SIGIR Forum, 39(1):4–10, 2005. [4] M. Steyvers, P. Smyth, M. Rosen-Zvi, and T. Griffiths. Probabilistic author-topic models for information discovery. In KDD ’04: Proceedings of the tenth ACM SIGKDD international conference on Knowledge discovery and data mining, pages 306–315, New York, NY, USA, 2004. ACM Press. [5] D. Newman, C. Chemudugunta, P. Smyth, and M. Steyvers. Analyzing entities and topics in news articles using statistical topic models. In ISI, pages 93–104, 2006. [6] S. Deerwester, S. Dumais, T. Landauer, G. Furnas, and R. Harshman. Indexing by latent semantic analysis. Journal of the American Society of Information Science, 41(6):391–407, 1990. [7] Michal Rosen-Zvi, Thomas Griffiths, Mark Steyvers, and Padhraic Smyth. The author-topic model for authors and documents. In UAI ’04: Proceedings of the 20th conference on Uncertainty in artificial intelligence, pages 487–494, Arlington, Virginia, United States, 2004. AUAI Press. [8] D. Newman and S. Block. Probabilistic topic decomposition of an eighteenth-century american newspaper. J. Am. Soc. Inf. Sci. Technol., 57(6):753–767, 2006. [9] 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. [10] T. L. Griffiths and M. Steyvers. Finding scientific topics. Proc Natl Acad Sci U S A, 101 Suppl 1:5228– 5235, April 2004. [11] A. Schr¨oter, T. Zimmermann, R. Premraj, and A. Zeller. If your bug database could talk.... In Proceedings of the 5th International Symposium on Empirical Software Engineering, Volume II: Short Papers and Posters, pages 18–20, September 2006. [12] E. Brill. Some advances in transformation-based part of speech tagging. In National Conference on Artificial Intelligence, pages 722–727, 1994. [13] E. Ukkonen. Approximate string-matching with q-grams and maximal matches. Theor. Comput. Sci., 92(1):191–211, 1992. [14] G. Kiczales, J. Lamping, A. Menhdhekar, C. Maeda, C. Lopes, J. Loingtier, and J. Irwin. Aspect-oriented programming. In Mehmet Aks¸it and Satoshi Matsuoka, editors, Proceedings European Conference on Object-Oriented Programming, volume 1241, pages 220–242. Springer-Verlag, Berlin, Heidelberg, and New York, 1997. [15] R. Motwani L. Page, S. Brin and T. Winograd. The pagerank citation ranking: Bringing order to the web. Stanford Digital Library working paper SIDL-WP-1999-0120 of 11/11/1999 (see: http://dbpubs.stanford.edu/pub/1999-66).
2007
138
3,168
Optimal models of sound localization by barn owls Brian J. Fischer Division of Biology California Institute of Technology Pasadena, CA fischerb@caltech.edu Abstract Sound localization by barn owls is commonly modeled as a matching procedure where localization cues derived from auditory inputs are compared to stored templates. While the matching models can explain properties of neural responses, no model explains how the owl resolves spatial ambiguity in the localization cues to produce accurate localization for sources near the center of gaze. Here, I examine two models for the barn owl’s sound localization behavior. First, I consider a maximum likelihood estimator in order to further evaluate the cue matching model. Second, I consider a maximum a posteriori estimator to test whether a Bayesian model with a prior that emphasizes directions near the center of gaze can reproduce the owl’s localization behavior. I show that the maximum likelihood estimator can not reproduce the owl’s behavior, while the maximum a posteriori estimator is able to match the behavior. This result suggests that the standard cue matching model will not be sufficient to explain sound localization behavior in the barn owl. The Bayesian model provides a new framework for analyzing sound localization in the barn owl and leads to predictions about the owl’s localization behavior. 1 Introduction Barn owls, the champions of sound localization, show systematic errors when localizing sounds. Owls localize broadband noise signals with great accuracy for source directions near the center of gaze [1]. However, localization errors increase as source directions move to the periphery, consistent with an underestimate of the source direction [1]. Behavioral experiments show that the barn owl uses the interaural time difference (ITD) for localization in the horizontal dimension and the interaural level difference (ILD) for localization in the vertical dimension [2]. Direct measurements of the sounds received at the ears for sources at different locations in space show that disparate directions are associated with very similar localization cues. Specifically, there is a similarity between ILD and ITD cues for directions near the center of gaze and directions with eccentric elevations on the vertical plane. How does the owl resolve this ambiguity in the localization cues to produce accurate localization for sound sources near the center of gaze? Theories regarding the use of localization cues by the barn owl are drawn from the extensive knowledge of processing in the barn owl’s auditory system. Neurophysiological and anatomical studies show that the barn owl’s auditory system contains specialized circuitry that is devoted to extracting spectral ILD and ITD cues and processing them to derive source direction information [2]. It has been suggested that a spectral matching operation between ILD and ITD cues computed from auditory inputs and preferred ILD and ITD spectra associated with spatially selective auditory neurons underlies the derivation of spatial information from the auditory cues [3–6]. The spectral matching models reproduce aspects of neural responses, but none reproduces the sound localization behavior of the barn owl. In particular, the spectral matching models do not describe how the owl resolves ambiguities in the localization cues. In addition to spectral matching of localization cues, it is possible 1 that the owl incorporates prior experience or beliefs into the process of deriving direction estimates from the auditory input signals. These two approaches to sound localization can be formalized using the language of estimation theory as maximum likelihood (ML) and Bayesian solutions, respectively. Here, I examine two models for the barn owl’s sound localization behavior in order to further evaluate the spectral matching model and to test whether a Bayesian model with a prior that emphasizes directions near the center of gaze can reproduce the owl’s localization behavior. I begin by viewing the sound localization problem as a statistical estimation problem. Maximum likelihood and maximum a posteriori (MAP) solutions to the estimation problem are compared with the localization behavior of a barn owl in a head turning task. 2 Observation model To define the localization problem, we must specify an observation model that describes the information the owl uses to produce a direction estimate. Neurophysiologicaland behavioral experiments suggest that the barn owl derives direction estimates from ILD and ITD cues that are computed at an array of frequencies [2,7,8]. Note that when computed as a function of frequency, the ITD is given by an interaural phase difference (IPD). Here I consider a model where the observation made by the owl is given by the ILD and IPD spectra derived from barn owl head-related transfer functions (HRTFs) after corruption with additive noise. For a source direction (θ, φ), the observation vector r is expressed mathematically as r =  rILD rIPD  =  ILDθ,φ IPDθ,φ  +  ηILD ηIPD  (1) where the ILD spectrum ILDθ,φ = [ILDθ,φ(ω1), ILDθ,φ(ω2), . . . , ILDθ,φ(ωNf )] and the IPD spectrum IPDθ,φ = [IPDθ,φ(ω1), IPDθ,φ(ω2), . . . , IPDθ,φ(ωNf )] are specified at a finite number of frequencies. The ILD and IPD cues are computed directly from the HRTFs as ILDθ,φ(ω) = 20 log10 |ˆhR(θ,φ)(ω)| |ˆhL(θ,φ)(ω)| (2) and IPDθ,φ(ω) = ϕR(θ,φ)(ω) −ϕL(θ,φ)(ω), (3) where the left and right HRTFs are written as ˆhL(θ,φ)(ω) = |ˆhL(θ,φ)(ω)|eiϕL(θ,φ)(ω) and ˆhR(θ,φ)(ω) = |ˆhR(θ,φ)(ω)|eiϕR(θ,φ)(ω), respectively. The noise corrupting the ILD spectrum is modeled as a Gaussian random vector with independent and identically distributed (i.i.d.) components, ηILD(ωj) ∼N(0, σ). The IPD spectrum noise vector is assumed to have i.i.d. components where each element has a von Mises distribution with parameter κ. The von Mises distribution can be viewed as a 2π-periodic Gaussian distribution for large κ and is a uniform distribution for κ = 0 [9]. I assume that the ILD and IPD noise terms are mutually independent. With this noise model, the likelihood function has the form pr|Θ,Φ(r|θ, φ) = prILD|Θ,Φ(rILD|θ, φ)prIPD|Θ,Φ(rIPD|θ, φ) (4) where the ILD likelihood function is given by prILD|Θ,Φ(rILD|θ, φ) = 1 (2πσ2)Nf /2 exp[−1 2σ2 Nf X j=1 (rILD(ωj) −ILDθ,φ(ωj))2] (5) and the IPD likelihood function is given by prIPD|Θ,Φ(rIPD|θ, φ) = 1 (2πI0(κ))Nf exp[κ Nf X j=1 cos(rIPD(ωj) −IPDθ,φ(ωj))] (6) where I0(κ) is a modified Bessel function of the first kind of order 0. The likelihood function will have peaks at directions where the expected spectral cues ILDθ,φ and IPDθ,φ are near the observed values rILD and rIPD. 2 3 Model performance measure I evaluate maximum likelihood and maximum a posteriori methods for estimating the source direction from the observed ILD and IPD cues by computing an expected localization error and comparing the results to an owl’s behavior. The performance of each estimation procedure at a given source direction is quantified by the expected absolute angular error E[|ˆθ(r) −θ| + |ˆφ(r) −φ| | θ, φ]. This measure of estimation error is directly compared to the behavioral performance of a barn owl in a head turning localization task [1]. The expected absolute angular error is approximated through Monte Carlo simulation as E[|ˆθ(r) −θ| + |ˆφ(r) −φ| | θ, φ] ≈µ({|ˆθ(ri) −θ|}N i=1) + µ({|ˆφ(ri) −φ|}N i=1) (7) where the ri are drawn from pr|Θ,Φ(r|θ, φ) and µ({θi}N i=1) is the circular mean of the angles {θi}N i=1. The error is computed using HRTFs for two barn owls [10] and is calculated for directions in the frontal hemisphere with 5◦increments in azimuth and elevation, as defined using double polar coordinates. 4 Maximum likelihood estimate The maximum likelihood direction estimate is derived from the observed noisy ILD and IPD cues by finding the source direction that maximizes the likelihood function, yielding (ˆθML(r), ˆφML(r)) = arg max (θ,φ) pr|Θ,Φ(r|θ, φ). (8) This procedure amounts to a spectral cue matching operation. Each direction in space is associated with a particular ILD and IPD spectrum, as derived from the HRTFs. The direction with associated cues that are closest to the observed cues is designated as the estimate. This estimator is of particular interest because of the claim that salience in the neural map of auditory space in the barn owl can be described by a spectral cue matching operation [3,4,6]. The maximum likelihood estimator was unable to reproduce the owl’s localization behavior. The performance of the maximum likelihood estimator depends on the two likelihood function parameters σ and κ, which determine the ILD and IPD noise variances, respectively. For noise variances large enough that the error increased at peripheral directions, in accordance with the barn owl’s behavior, the error also increased significantly for directions near the center of the interaural coordinate system (Figure 1). This pattern of error as a function of eccentricity, with a large central peak, is not consistent with the performance of the barn owl in the head turning task [1]. Additionally, directions near the center of gaze were often confused with directions in the periphery leading to a high variability in the direction estimates, which is not seen in the owl’s behavior. 5 Maximum a posteriori estimate In the Bayesian framework, the direction estimate depends on both the likelihood function and the prior distribution over source directions through the posterior distribution. Using Bayes’ rule, the posterior density is proportional to the product of the likelihood function and the prior, pΘ,Φ|r(θ, φ|r) ∝pr|Θ,Φ(r|θ, φ)pΘ,Φ(θ, φ). (9) The prior distribution is used to summarize the owl’s belief about the most likely source directions before an observation of ILD and IPD cues is made. Based on the barn owl’s tendency to underestimate source directions [1], I use a prior that emphasizes directions near the center of gaze. The prior is given by a product of two one-dimensional von Mises distributions, yielding the probability density function pΘ,Φ(θ, φ) = exp[κ1 cos(θ) + κ2 cos(φ)] (2π)2I0(κ1)I0(κ2) (10) where I0(κ) is a modified Bessel function of the first kind of order 0. The maximum a posteriori source direction estimate is computed for a given observation by finding the source direction that maximizes the posterior density, yielding (ˆθMAP(r), ˆφMAP(r)) = arg max (θ,φ) pΘ,Φ|r(θ, φ|r). (11) 3 Figure 1: Estimation error in the model for the maximum likelihood (ML) and maximum a posteriori (MAP) estimates. HRTFs were used from owls 884 (top) and 880 (bottom). Left column: Estimation error at 685 locations in the frontal hemisphere plotted in double polar coordinates. Center column: Estimation error on the horizontal plane along with the estimation error of a barn owl in a head turning task [1]. Right column: Estimation error on the vertical plane along with the estimation error of a barn owl in a head turning task. Note that each plot uses a unique scale. 4 Figure 2: Estimates for the MAP estimator on the horizontal plane (left) and the vertical plane (right) using HRTFs from owl 880. The box extends from the lower quartile to the upper quartile of the sample. The solid line is the identity line. Like the owl, the MAP estimator underestimates the source direction. In the MAP case, the estimate depends on spectral matching of observations with expected cues for each direction, but with a penalty on the selection of peripheral directions. It was possible to find a MAP estimator that was consistent with the owl’s localization behavior (Figures 1,2). For the example MAP estimators shown in Figures 1 and 2, the error was smallest in the central region of space and increased at the periphery. The largest errors occurred at the vertical extremes. This pattern of error qualitatively matches the pattern of error displayed by the owl in a head turning localization task [1]. The parameters that produced a behaviorally consistent MAP estimator correspond to a likelihood and prior with large variances. For the estimators shown in Figure 1, the likelihood function parameters were given by σ = 11.5 dB and κ = 0.75 for owl 880 and σ = 10.75 dB and κ = 0.8 for owl 884. For comparison, the range of ILD values normally experienced by the barn owl falls between ± 30 dB [10]. The prior parameters correspond to an azimuthal width parameter κ1 of 0.25 for owl 880 and 0.2 for owl 884 and an elevational width parameter κ2 of 0.25 for owl 880 and 0.18 for owl 884. The implication of this model for implementation in the owl’s auditory system is that the spectral localization cues ILD and IPD do not need to be computed with great accuracy and the emphasis on central directions does not need to be large in order to produce the barn owl’s behavior. 6 Discussion 6.1 A new approach to modeling sound localization in the barn owl The simulation results show that the maximum likelihood model considered here can not reproduce the owl’s behavior, while the maximum a posteriori solution is able to match the behavior. This result suggests that the standard spectral matching model will not be sufficient to explain sound localization behavior in the barn owl. Previously, suggestions have been made that sound localization by the barn owl can be described using the Bayesian framework [11, 12], but no specific models have been proposed. This paper demonstrates that a Bayesian model can qualitatively match the owl’s localization behavior. The Bayesian approach described here provides a new framework for analyzing sound localization in the owl. 6.2 Failure of the maximum likelihood model The maximum likelihood model fails because of the nature of spatial ambiguity in the ILD and IPD cues. The existence of spatial ambiguity has been noted in previous descriptions of barn owl HRTFs [3, 10, 13]. As expected, directions near each other have similar cues. In addition to sim5 ilarity of cues between proximal directions, distant directions can have similar ILD and IPD cues. Most significantly, there is a similarity between the ILD and IPD cues at the center of gaze and at peripheral directions on the vertical plane. The consequence of such ambiguity between distant directions is that noise in measuring localization cues can lead to large errors in direction estimation, as seen in the ML estimate. The results of the simulations suggest that a behaviorally accurate solution to the sound localization problem must include a mechanism that chooses between disparate directions which are associated with similar localization cues in such a way as to limit errors for source directions near the center of gaze. This work shows that a possible mechanism for choosing between such directions is to incorporate a bias towards directions at the center of gaze through a prior distribution and utilize the Bayesian estimation framework. The use of a prior that emphasizes directions near the center of gaze is similar to the use of central weighting functions in models of human lateralization [14]. 6.3 Predictions of the Bayesian model The MAP estimator predicts the underestimation of peripheral source directions on the horizontal and vertical planes (Figure 2). The pattern of error displayed by the MAP estimator qualitatively matches the owl’s behavioral performance by showing increasing error as a function of eccentricity. Our evaluation of the model performance is limited, however, because there is little behavioral data for directions outside ± 70 deg [15,16]. For the owl whose performance is displayed in Figure 1, the largest errors on the vertical and horizontal planes were less than 20 deg and 11 deg, respectively. The model produces much larger errors for directions beyond 70 deg, especially on the vertical plane. The large errors in elevation result from the ambiguity in the localization cues on the vertical plane and the shape of the prior distribution. As discussed above, for broadband noise stimuli, there is a similarity between the ILD and IPD cues for central and peripheral directions on the vertical plane [3, 10, 13]. The presence of a prior distribution that emphasizes central directions causes direction estimates for both central and peripheral directions to be concentrated near zero deg. Therefore, estimation errors are minimal for sources at the center of gaze, but approach the magnitude of the source direction for peripheral source directions. Behavioral data shows that localization accuracy is the greatest near the center of gaze [1], but there is no data for localization performance at the most eccentric directions on the vertical plane. Further behavioral experiments must be performed to determine if the owl’s error increases greatly at the most peripheral directions. There is a significant spatial ambiguity in the localization cues when target sounds are narrowband. It is well known that spatial ambiguity arises from the way that interaural time differences are processed at each frequency [17–19]. The owl measures the interaural time difference for each frequency of the input sound as an interaural phase difference. Therefore, multiple directions in space that differ in their associated interaural time difference by the period of a tone at that frequency are consistent with the same interaural phase difference and can not be distinguished. Behavioral experiments show that the owl may localize a phantom source in the horizontal dimension when the signal is a tone [20]. Based on the presence of a prior that emphasizes directions near the center of gaze, I predict that for low frequency tones where phase equivalent directions lie near the center of gaze and at directions greater than 80 deg, confusion will always lead to an estimate of a source direction near zero degrees. This prediction can not be evaluated from available data because localization of tonal signals has only been systematically studied using 5 kHz tones with target directions at ± 20 deg [19]. Because the prior is broad, the target direction of ± 20 deg and the phantom direction of ± 50 deg may both be considered central. The ILD cue also displays a significant ambiguity at high frequencies. At frequencies above 7 kHz, the ILD is non-monotonically related to the vertical position of a sound source [3, 10] (Figure 3). Therefore, for narrowband sounds, the owl can not uniquely determine the direction of a sound source from the ITD and ILD cues. I predict that for tonal signals above 7 kHz, there will be multiple directions on the vertical plane that are confused with directions near zero deg. I predict that confusion between source directions near zero deg and eccentric directions will always lead to estimates of directions near zero deg. There is no available data to evaluate this prediction. 6 Figure 3: Model predictions for localization of tones on the vertical plane. (A) ILD as a function of elevation at 8 kHz, computed from HRTFs of owl 880 recorded by Keller et al. (1998). (B) Given an ILD of 0 dB, a likelihood function (dots) based on matching cues to expected values would be multimodal with three equal peaks. If the target is at any of the three directions, there will be large localization errors because of confusion with the other directions. If a prior emphasizing frontal space (dashed) is included, a posterior density equal to the product of the likelihood and the prior would have a main peak at 0 deg elevation. Using a maximum a posteriori estimate, large errors would be made if the target is above or below. However, few errors would be observed when the target is near 0 deg. 6.4 Testing the Bayesian model Further head turning localization experiments with barn owls must be performed to test predictions generated by the Bayesian hypothesis and to provide constraints on a model of sound localization. Experiments should test the localization accuracy of the owl for broadband noise sources and tonal signals at directions covering the frontal hemisphere. The Bayesian model will be supported if, first, localization accuracy is high for both tonal and broadband noise sources near the center of gaze and, second, peripherally located sources are confused for targets near the center of gaze, leading to large localization errors. Additionally, a Bayesian model should be fit to the data, including points away from the horizontal and vertical planes, using a nonparametric prior [21,22]. While the model presented here, using a von Mises prior, qualitatively matches the performance of the owl, the performance of the Bayesian model may be improved by removing assumptions about the structure of the prior distribution. 6.5 Implications for neural processing The analysis presented here does not directly address the neural implementation of the solution to the localization problem. However, our abstract analysis of the sound localization problem has implications for neural processing. Several models exist that reproduce the basic properties of ILD, ITD, and space selectivity in ICx and OT neurons using a spectral matching procedure [3, 5, 6]. These results suggest that a Bayesian model is not necessary to describe the responses of individual ICx and OT neurons. It may be necessary to look in the brainstem motor targets of the optic tectum to find neurons that resolve the ambiguity present in sound stimuli and show responses that reflect the MAP solution. This implies that the prior distribution is not employed until the final stage of processing. The prior may correspond to the distribution of best directions of space-specific neurons in ICx and OT, which emphasizes directions near the center of gaze [23]. 6.6 Conclusion This analysis supports the Bayesian model of the barn owl’s solution to the localization problem over the maximum likelihood model. This result suggests that the standard spectral matching model will not be sufficient to explain sound localization behavior in the barn owl. The Bayesian model 7 provides a new framework for analyzing sound localization in the owl. The simulation results using the MAP estimator lead to testable predictions that can be used to evaluate the Bayesian model of sound localization in the barn owl. Acknowledgments I thank Kip Keller, Klaus Hartung, and Terry Takahashi for providing the head-related transfer functions and Mark Konishi and Jos´e Luis Pe˜na for comments and support. References [1] E.I. Knudsen, G.G. Blasdel, and M. Konishi. Sound localization by the barn owl (Tyto alba) measured with the search coil technique. J. Comp. Physiol., 133:1–11, 1979. [2] M. Konishi. Coding of auditory space. Annu. Rev. Neurosci., 26:31–55, 2003. [3] M.S. Brainard, E.I. Knudsen, and S.D. Esterly. Neural derivation of sound source location: Resolution of spatial ambiguities in binaural cues. J. Acoust. Soc. Am., 91(2):1015–1027, 1992. [4] B.J. Arthur. Neural computations leading to space-specific auditory responses in the barn owl. Ph.D. thesis, Caltech, 2001. [5] B.J. Fischer. A model of the computations leading to a representation of auditory space in the midbrain of the barn owl. D.Sc. thesis, Washington University in St. Louis, 2005. [6] C.H. Keller and T.T. Takahashi. Localization and identification of concurrent sounds in the owl’s auditory space map. J. Neurosci., 25:10446–10461, 2005. [7] I. Poganiatz and H. Wagner. Sound-localization experiments with barn owls in virtual space: influence of broadband interaural level difference on head-turning behavior. J. Comp. Physiol. A, 187:225–233, 2001. [8] D.R. Euston and T.T. Takahashi. From spectrum to space: The contribution of level difference cues to spatial receptive fields in the barn owl inferior colliculus. J. Neurosci., 22(1):284–293, Jan. 2002. [9] Evans M., Hastings N., and Peacock B. von Mises Distribution. In Statistical Distributions, 3rd ed., pages 189–191. Wiley, New York, 2000. [10] C.H. Keller, K. Hartung, and T.T. Takahashi. Head-related transfer functions of the barn owl: measurement and neural responses. Hearing Research, 118:13–34, 1998. [11] R.O. Duda. Elevation dependence of the interaural transfer function, chapter 3 in Binaural and Spatial Hearing in Real and Virtual Environments, pages 49–75. New Jersey: Lawrence Erlbaum Associates, 1997. [12] Witten I.B. and Knudsen E.I. Why seeing is believing: Merging auditory and visual worlds. Neuron, 48:489–496, 2005. [13] J.F Olsen, E.I. Knudsen, and S.D. Esterly. Neural maps of interaural time and intensity differences in the optic tectum of the barn owl. J. Neurosci., 9:2591–2605, 1989. [14] R.M. Stern and H.S. Colburn. Theory of binaural interaction based on auditory-nerve data. IV. A model for subjective lateral position. J. Acoust. Soc. Am., 64:127–140, 1978. [15] H. Wagner. Sound-localization deficits induced by lesions in the barn owl’s auditory space map. J. Neurosci., 13:371–386, 1993. [16] I. Poganiatz, I. Nelken, and H. Wagner. Sound-localization experiments with barn owls in virtual space: influence of interaural time difference on head-turning behavior. J. Ass. Res. Otolarnyg., 2:1–21, 2001. [17] T. Takahashi and M. Konishi. Selectivity for interaural time difference in the owl’s midbrain. J. Neurosci., 6(12):3413–3422, 1986. [18] J.A. Mazer. How the owl resolves auditory coding ambiguity. Proc. Natl. Acad. Sci. USA, 95:10932– 10937, 1998. [19] K. Saberi, Y. Takahashi, H. Farahbod, and M. Konishi. Neural bases of an auditory illusion and its elimination in owls. Nature Neurosci., 2(7):656–659, 1999. [20] E.I. Knudsen and M. Konishi. Mechanisms of sound localization in the barn owl (Tyto alba) measured with the search coil technique. J. Comp. Phys. A, (133):13–21, 1979. [21] Liam Paninski. Nonparametric inference of prior probabilities from Bayes-optimal behavior. In Y. Weiss, B. Sch¨olkopf, and J. Platt, editors, Advances in Neural Information Processing Systems 18, pages 1067– 1074. MIT Press, Cambridge, MA, 2006. [22] Stocker A.A. and Simoncelli E.P. Noise characteristics and prior expectations in human visual speed perception. Nature Neurosci., 9(4):578–585, 2006. [23] E.I. Knudsen and M. Konishi. A neural map of auditory space in the owl. Science, 200:795–797, 1978. 8
2007
139
3,169
The Tradeoffs of Large Scale Learning L´eon Bottou NEC laboratories of America Princeton, NJ 08540, USA leon@bottou.org Olivier Bousquet Google Z¨urich 8002 Zurich, Switzerland olivier.bousquet@m4x.org Abstract This contribution develops a theoretical framework that takes into account the effect of approximate optimization on learning algorithms. The analysis shows distinct tradeoffs for the case of small-scale and large-scale learning problems. Small-scale learning problems are subject to the usual approximation–estimation tradeoff. Large-scale learning problems are subject to a qualitatively different tradeoff involving the computational complexity of the underlying optimization algorithms in non-trivial ways. 1 Motivation The computational complexity of learning algorithms has seldom been taken into account by the learning theory. Valiant [1] states that a problem is “learnable” when there exists a probably approximatively correct learning algorithm with polynomial complexity. Whereas much progress has been made on the statistical aspect (e.g., [2, 3, 4]), very little has been told about the complexity side of this proposal (e.g., [5].) Computational complexity becomes the limiting factor when one envisions large amounts of training data. Two important examples come to mind: • Data mining exists because competitive advantages can be achieved by analyzing the masses of data that describe the life of our computerized society. Since virtually every computer generates data, the data volume is proportional to the available computing power. Therefore one needs learning algorithms that scale roughly linearly with the total volume of data. • Artificial intelligence attempts to emulate the cognitive capabilities of human beings. Our biological brains can learn quite efficiently from the continuous streams of perceptual data generated by our six senses, using limited amounts of sugar as a source of power. This observation suggests that there are learning algorithms whose computing time requirements scale roughly linearly with the total volume of data. This contribution finds its source in the idea that approximate optimization algorithms might be sufficient for learning purposes. The first part proposes new decomposition of the test error where an additional term represents the impact of approximate optimization. In the case of small-scale learning problems, this decomposition reduces to the well known tradeoff between approximation error and estimation error. In the case of large-scale learning problems, the tradeoff is more complex because it involves the computational complexity of the learning algorithm. The second part explores the asymptotic properties of the large-scale learning tradeoff for various prototypical learning algorithms under various assumptions regarding the statistical estimation rates associated with the chosen objective functions. This part clearly shows that the best optimization algorithms are not necessarily the best learning algorithms. Maybe more surprisingly, certain algorithms perform well regardless of the assumed rate for the statistical estimation error. 2 Approximate Optimization 2.1 Setup Following [6, 2], we consider a space of input-output pairs (x, y) ∈X × Y endowed with a probability distribution P(x, y). The conditional distribution P(y|x) represents the unknown relationship between inputs and outputs. The discrepancy between the predicted output ˆy and the real output y is measured with a loss function ℓ(ˆy, y). Our benchmark is the function f ∗that minimizes the expected risk E(f) = Z ℓ(f(x), y) dP(x, y) = E [ℓ(f(x), y)], that is, f ∗(x) = arg min ˆy E [ℓ(ˆy, y)| x]. Although the distribution P(x, y) is unknown, we are given a sample S of n independently drawn training examples (xi, yi), i = 1 . . . n. We define the empirical risk En(f) = 1 n n X i=1 ℓ(f(xi), yi) = En[ℓ(f(x), y)]. Our first learning principle consists in choosing a family F of candidate prediction functions and finding the function fn = arg minf∈F En(f) that minimizes the empirical risk. Well known combinatorial results (e.g., [2]) support this approach provided that the chosen family F is sufficiently restrictive. Since the optimal function f ∗is unlikely to belong to the family F, we also define f ∗ F = arg minf∈F E(f). For simplicity, we assume that f ∗, f ∗ F and fn are well defined and unique. We can then decompose the excess error as E [E(fn) −E(f ∗)] = E [E(f ∗ F) −E(f ∗)] + E [E(fn) −E(f ∗ F)] = Eapp + Eest , (1) where the expectation is taken with respect to the random choice of training set. The approximation error Eapp measures how closely functions in F can approximate the optimal solution f ∗. The estimation error Eest measures the effect of minimizing the empirical risk En(f) instead of the expected risk E(f). The estimation error is determined by the number of training examples and by the capacity of the family of functions [2]. Large families1 of functions have smaller approximation errors but lead to higher estimation errors. This tradeoff has been extensively discussed in the literature [2, 3] and lead to excess error that scale between the inverse and the inverse square root of the number of examples [7, 8]. 2.2 Optimization Error Finding fn by minimizing the empirical risk En(f) is often a computationally expensive operation. Since the empirical risk En(f) is already an approximation of the expected risk E(f), it should not be necessary to carry out this minimization with great accuracy. For instance, we could stop an iterative optimization algorithm long before its convergence. Let us assume that our minimization algorithm returns an approximate solution ˜fn such that En( ˜fn) < En(fn) + ρ where ρ ≥0 is a predefined tolerance. An additional term Eopt = E  E( ˜fn) −E(fn)  then appears in the decomposition of the excess error E = E  E( ˜fn) −E(f ∗)  : E = E [E(f ∗ F) −E(f ∗)] + E [E(fn) −E(f ∗ F)] + E  E( ˜fn) −E(fn)  = Eapp + Eest + Eopt. (2) We call this additional term optimization error. It reflects the impact of the approximate optimization on the generalization performance. Its magnitude is comparable to ρ (see section 3.1.) 1We often consider nested families of functions of the form Fc = {f ∈H, Ω(f) ≤c}. Then, for each value of c, function fn is obtained by minimizing the regularized empirical risk En(f) + λΩ(f) for a suitable choice of the Lagrange coefficient λ. We can then control the estimation-approximation tradeoff by choosing λ instead of c. 2.3 The Approximation–Estimation–Optimization Tradeoff This decomposition leads to a more complicated compromise. It involves three variables and two constraints. The constraints are the maximal number of available training example and the maximal computation time. The variables are the size of the family of functions F, the optimization accuracy ρ, and the number of examples n. This is formalized by the following optimization problem. min F,ρ,n E = Eapp + Eest + Eopt subject to  n ≤ nmax T(F, ρ, n) ≤ Tmax (3) The number n of training examples is a variable because we could choose to use only a subset of the available training examples in order to complete the optimization within the alloted time. This happens often in practice. Table 1 summarizes the typical evolution of the quantities of interest with the three variables F, n, and ρ increase. Table 1: Typical variations when F, n, and ρ increase. F n ρ Eapp (approximation error) ց Eest (estimation error) ր ց Eopt (optimization error) · · · · · · ր T (computation time) ր ր ց The solution of the optimization program (3) depends critically of which budget constraint is active: constraint n < nmax on the number of examples, or constraint T < Tmax on the training time. • We speak of small-scale learning problem when (3) is constrained by the maximal number of examples nmax. Since the computing time is not limited, we can reduce the optimization error Eopt to insignificant levels by choosing ρ arbitrarily small. The excess error is then dominated by the approximation and estimation errors, Eapp and Eest. Taking n = nmax, we recover the approximation-estimation tradeoff that is the object of abundant literature. • We speak of large-scale learning problem when (3) is constrained by the maximal computing time Tmax. Approximate optimization, that is choosing ρ > 0, possibly can achieve better generalization because more training examples can be processed during the allowed time. The specifics depend on the computational properties of the chosen optimization algorithm through the expression of the computing time T(F, ρ, n). 3 The Asymptotics of Large-scale Learning In the previous section, we have extended the classical approximation-estimation tradeoff by taking into account the optimization error. We have given an objective criterion to distiguish small-scale and large-scale learning problems. In the small-scale case, we recover the classical tradeoff between approximation and estimation. The large-scale case is substantially different because it involves the computational complexity of the learning algorithm. In order to clarify the large-scale learning tradeoff with sufficient generality, this section makes several simplifications: • We are studying upper bounds of the approximation, estimation, and optimization errors (2). It is often accepted that these upper bounds give a realistic idea of the actual convergence rates [9, 10, 11, 12]. Another way to find comfort in this approach is to say that we study guaranteed convergence rates instead of the possibly pathological special cases. • We are studying the asymptotic properties of the tradeoff when the problem size increases. Instead of carefully balancing the three terms, we write E = O(Eapp)+O(Eest)+O(Eopt) and only need to ensure that the three terms decrease with the same asymptotic rate. • We are considering a fixed family of functions F and therefore avoid taking into account the approximation error Eapp. This part of the tradeoff covers a wide spectrum of practical realities such as choosing models and choosing features. In the context of this work, we do not believe we can meaningfully address this without discussing, for instance, the thorny issue of feature selection. Instead we focus on the choice of optimization algorithm. • Finally, in order to keep this paper short, we consider that the family of functions F is linearly parametrized by a vector w ∈Rd. We also assume that x, y and w are bounded, ensuring that there is a constant B such that 0 ≤ℓ(fw(x), y) ≤B and ℓ(·, y) is Lipschitz. We first explain how the uniform convergence bounds provide convergence rates that take the optimization error into account. Then we discuss and compare the asymptotic learning properties of several optimization algorithms. 3.1 Convergence of the Estimation and Optimization Errors The optimization error Eopt depends directly on the optimization accuracy ρ. However, the accuracy ρ involves the empirical quantity En( ˜fn) −En(fn), whereas the optimization error Eopt involves its expected counterpart E( ˜fn) −E(fn). This section discusses the impact on the optimization error Eopt and of the optimization accuracy ρ on generalization bounds that leverage the uniform convergence concepts pioneered by Vapnik and Chervonenkis (e.g., [2].) In this discussion, we use the letter c to refer to any positive constant. Multiple occurences of the letter c do not necessarily imply that the constants have identical values. 3.1.1 Simple Uniform Convergence Bounds Recall that we assume that F is linearly parametrized by w ∈Rd. Elementary uniform convergence results then state that E » sup f∈F |E(f) −En(f)| – ≤c r d n , where the expectation is taken with respect to the random choice of the training set.2 This result immediately provides a bound on the estimation error: Eest = E ˆ ` E(fn) −En(fn) ´ + ` En(fn) −En(f ∗ F) ´ + ` En(f ∗ F) −E(f ∗ F) ´ ˜ ≤ 2 E » sup f∈F |E(f) −En(f)| – ≤c r d n. This same result also provides a combined bound for the estimation and optimization errors: Eest + Eopt = E ˆ E( ˜fn) −En( ˜fn) ˜ + E ˆ En( ˜fn) −En(fn) ˜ + E [En(fn) −En(f ∗ F)] + E [En(f ∗ F) −E(f ∗ F)] ≤ c r d n + ρ + 0 + c r d n = c ρ + r d n ! . Unfortunately, this convergence rate is known to be pessimistic in many important cases. More sophisticated bounds are required. 3.1.2 Faster Rates in the Realizable Case When the loss functions ℓ(ˆy, y) is positive, with probability 1 −e−τ for any τ > 0, relative uniform convergence bounds state that sup f∈F E(f) −En(f) p E(f) ≤c r d n log n d + τ n . This result is very useful because it provides faster convergence rates O(log n/n) in the realizable case, that is when ℓ(fn(xi), yi) = 0 for all training examples (xi, yi). We have then En(fn) = 0, En( ˜fn) ≤ρ, and we can write E( ˜fn) −ρ ≤c q E( ˜fn) r d n log n d + τ n . 2Although the original Vapnik-Chervonenkis bounds have the form c q d n log n d , the logarithmic term can be eliminated using the “chaining” technique (e.g., [10].) Viewing this as a second degree polynomial inequality in variable q E( ˜fn), we obtain E( ˜fn) ≤c „ ρ + d n log n d + τ n « . Integrating this inequality using a standard technique (see, e.g., [13]), we obtain a better convergence rate of the combined estimation and optimization error: Eest + Eopt = E h E( ˜fn) −E(f ∗ F) i ≤E h E( ˜fn) i = c „ ρ + d n log n d « . 3.1.3 Fast Rate Bounds Many authors (e.g., [10, 4, 12]) obtain fast statistical estimation rates in more general conditions. These bounds have the general form Eapp + Eest ≤c  Eapp +  d n log n d α  for 1 2 ≤α ≤1 . (4) This result holds when one can establish the following variance condition: ∀f ∈F E hℓ(f(X), Y ) −ℓ(f ∗ F(X), Y ) 2i ≤c  E(f) −E(f ∗ F) 2−1 α . (5) The convergence rate of (4) is described by the exponent α which is determined by the quality of the variance bound (5). Works on fast statistical estimation identify two main ways to establish such a variance condition. • Exploiting the strict convexity of certain loss functions [12, theorem 12]. For instance, Lee et al. [14] establish a O(log n/n) rate using the squared loss ℓ(ˆy, y) = (ˆy −y)2. • Making assumptions on the data distribution. In the case of pattern recognition problems, for instance, the “Tsybakov condition” indicates how cleanly the posterior distributions P(y|x) cross near the optimal decision boundary [11, 12]. The realizable case discussed in section 3.1.2 can be viewed as an extreme case of this. Despite their much greater complexity, fast rate estimation results can accomodate the optimization accuracy ρ using essentially the methods illustrated in sections 3.1.1 and 3.1.2. We then obtain a bound of the form E = Eapp + Eest + Eopt = E h E( ˜fn) −E(f ∗) i ≤c  Eapp +  d n log n d α + ρ  . (6) For instance, a general result with α = 1 is provided by Massart [13, theorem 4.2]. Combining this result with standard bounds on the complexity of classes of linear functions (e.g., [10]) yields the following result: E = Eapp + Eest + Eopt = E h E( ˜fn) −E(f ∗) i ≤c  Eapp + d n log n d + ρ  . (7) See also [15, 4] for more bounds taking into account the optimization accuracy. 3.2 Gradient Optimization Algorithms We now discuss and compare the asymptotic learning properties of four gradient optimization algorithms. Recall that the family of function F is linearly parametrized by w ∈Rd. Let w∗ F and wn correspond to the functions f ∗ F and fn defined in section 2.1. In this section, we assume that the functions w 7→ℓ(fw(x), y) are convex and twice differentiable with continuous second derivatives. Convexity ensures that the empirical const function C(w) = En(fw) has a single minimum. Two matrices play an important role in the analysis: the Hessian matrix H and the gradient covariance matrix G, both measured at the empirical optimum wn. H = ∂2C ∂w2 (wn) = En ∂2ℓ(fwn(x), y) ∂w2  , (8) G = En "∂ℓ(fwn(x), y) ∂w  ∂ℓ(fwn(x), y) ∂w ′ # . (9) The relation between these two matrices depends on the chosen loss function. In order to summarize them, we assume that there are constants λmax ≥λmin > 0 and ν > 0 such that, for any η > 0, we can choose the number of examples n large enough to ensure that the following assertion is true with probability greater than 1 −η : tr(G H−1) ≤ν and EigenSpectrum(H) ⊂[ λmin , λmax ] (10) The condition number κ = λmax/λmin is a good indicator of the difficulty of the optimization [16]. The condition λmin > 0 avoids complications with stochastic gradient algorithms. Note that this condition only implies strict convexity around the optimum. For instance, consider the loss function ℓis obtained by smoothing the well known hinge loss ℓ(z, y) = max{0, 1 −yz} in a small neighborhood of its non-differentiable points. Function C(w) is then piecewise linear with smoothed edges and vertices. It is not strictly convex. However its minimum is likely to be on a smoothed vertex with a non singular Hessian. When we have strict convexity, the argument of [12, theorem 12] yields fast estimation rates α ≈1 in (4) and (6). This is not necessarily the case here. The four algorithm considered in this paper use information about the gradient of the cost function to iteratively update their current estimate w(t) of the parameter vector. • Gradient Descent (GD) iterates w(t + 1) = w(t) −η ∂C ∂w (w(t)) = w(t) −η 1 n n X i=1 ∂ ∂wℓ fw(t)(xi), yi  where η > 0 is a small enough gain. GD is an algorithm with linear convergence [16]. When η = 1/λmax, this algorithm requires O(κ log(1/ρ)) iterations to reach accuracy ρ. The exact number of iterations depends on the choice of the initial parameter vector. • Second Order Gradient Descent (2GD) iterates w(t + 1) = w(t) −H−1 ∂C ∂w (w(t)) = w(t) −1 nH−1 n X i=1 ∂ ∂wℓ fw(t)(xi), yi  where matrix H−1 is the inverse of the Hessian matrix (8). This is more favorable than Newton’s algorithm because we do not evaluate the local Hessian at each iteration but simply assume that we know in advance the Hessian at the optimum. 2GD is a superlinear optimization algorithm with quadratic convergence [16]. When the cost is quadratic, a single iteration is sufficient. In the general case, O(log log(1/ρ)) iterations are required to reach accuracy ρ. • Stochastic Gradient Descent (SGD) picks a random training example (xt, yt) at each iteration and updates the parameter w on the basis of this example only, w(t + 1) = w(t) −η t ∂ ∂wℓ fw(t)(xt), yt  . Murata [17, section 2.2], characterizes the mean ES[w(t)] and variance VarS[w(t)] with respect to the distribution implied by the random examples drawn from the training set S at each iteration. Applying this result to the discrete training set distribution for η = 1/λmin, we have δw(t)2 = O(1/t) where δw(t) is a shorthand notation for w(t) −wn. We can then write ES[ C(w(t)) −inf C ] = ES ˆ tr ` H δw(t) δw(t)′´˜ + o ` 1 t ´ = tr ` H ES[δw(t)] ES[δw(t)]′ + H VarS[w(t)] ´ + o ` 1 t ´ ≤ tr(GH) t + o ` 1 t ´ ≤ νκ2 t + o ` 1 t ´ . (11) Therefore the SGD algorithm reaches accuracy ρ after less than νκ2/ρ + o(1/ρ) iterations on average. The SGD convergence is essentially limited by the stochastic noise induced by the random choice of one example at each iteration. Neither the initial value of the parameter vector w nor the total number of examples n appear in the dominant term of this bound! When the training set is large, one could reach the desired accuracy ρ measured on the whole training set without even visiting all the training examples. This is in fact a kind of generalization bound. Table 2: Asymptotic results for gradient algorithms (with probability 1). Compare the second last column (time to optimize) with the last column (time to reach the excess test error ǫ). Legend: n number of examples; d parameter dimension; κ, ν see equation (10). Algorithm Cost of one Iterations Time to reach Time to reach iteration to reach ρ accuracy ρ E ≤c (Eapp + ε) GD O(nd) O  κ log 1 ρ  O  ndκ log 1 ρ  O  d2 κ ε1/α log2 1 ε  2GD O d2 + nd  O  log log 1 ρ  O d2 + nd  log log 1 ρ  O  d2 ε1/α log 1 ε log log 1 ε  SGD O(d) νκ2 ρ + o  1 ρ  O  dνκ2 ρ  O  d ν κ2 ε  2SGD O d2 ν ρ + o  1 ρ  O  d2ν ρ  O  d2 ν ε  • Second Order Stochastic Gradient Descent (2SGD) replaces the gain η by the inverse of the Hessian matrix H: w(t + 1) = w(t) −1 t H−1 ∂ ∂wℓ fw(t)(xt), yt  . Unlike standard gradient algorithms, using the second order information does not change the influence of ρ on the convergence rate but improves the constants. Using again [17, theorem 4], accuracy ρ is reached after ν/ρ + o(1/ρ) iterations. For each of the four gradient algorithms, the first three columns of table 2 report the time for a single iteration, the number of iterations needed to reach a predefined accuracy ρ, and their product, the time needed to reach accuracy ρ. These asymptotic results are valid with probability 1, since the probability of their complement is smaller than η for any η > 0. The fourth column bounds the time necessary to reduce the excess error E below c (Eapp+ε) where c is the constant from (6). This is computed by observing that choosing ρ ∼ ` d n log n d ´α in (6) achieves the fastest rate for ε, with minimal computation time. We can then use the asymptotic equivalences ρ ∼ε and n ∼ d ε1/α log 1 ε . Setting the fourth column expressions to Tmax and solving for ǫ yields the best excess error achieved by each algorithm within the limited time Tmax . This provides the asymptotic solution of the Estimation–Optimization tradeoff (3) for large scale problems satisfying our assumptions. These results clearly show that the generalization performance of large-scale learning systems depends on both the statistical properties of the estimation procedure and the computational properties of the chosen optimization algorithm. Their combination leads to surprising consequences: • The SGD and 2SGD results do not depend on the estimation rate α. When the estimation rate is poor, there is less need to optimize accurately. That leaves time to process more examples. A potentially more useful interpretation leverages the fact that (11) is already a kind of generalization bound: its fast rate trumps the slower rate assumed for the estimation error. • Second order algorithms bring little asymptotical improvements in ε. Although the superlinear 2GD algorithm improves the logarithmic term, all four algorithms are dominated by the polynomial term in (1/ε). However, there are important variations in the influence of the constants d, κ and ν. These constants are very important in practice. • Stochastic algorithms (SGD, 2SGD) yield the best generalization performance despite being the worst optimization algorithms. This had been described before [18] and observed in experiments. In contrast, since the optimization error Eopt of small-scale learning systems can be reduced to insignificant levels, their generalization performance is solely determined by the statistical properties of their estimation procedure. 4 Conclusion Taking in account budget constraints on both the number of examples and the computation time, we find qualitative differences between the generalization performance of small-scale learning systems and large-scale learning systems. The generalization properties of large-scale learning systems depend on both the statistical properties of the estimation procedure and the computational properties of the optimization algorithm. We illustrate this fact with some asymptotic results on gradient algorithms. Considerable refinements of this framework can be expected. Extending the analysis to regularized risk formulations would make results on the complexity of primal and dual optimization algorithms [19, 20] directly exploitable. The choice of surrogate loss function [7, 12] could also have a non-trivial impact in the large-scale case. Acknowledgments Part of this work was funded by NSF grant CCR-0325463. References [1] Leslie G. Valiant. A theory of learnable. Proc. of the 1984 STOC, pages 436–445, 1984. [2] Vladimir N. Vapnik. Estimation of Dependences Based on Empirical Data. Springer Series in Statistics. Springer-Verlag, Berlin, 1982. [3] St´ephane Boucheron, Olivier Bousquet, and G´abor Lugosi. Theory of classification: a survey of recent advances. ESAIM: Probability and Statistics, 9:323–375, 2005. [4] Peter L. Bartlett and Shahar Mendelson. Empirical minimization. Probability Theory and Related Fields, 135(3):311–334, 2006. [5] J. Stephen Judd. On the complexity of loading shallow neural networks. Journal of Complexity, 4(3):177– 192, 1988. [6] Richard O. Duda and Peter E. Hart. Pattern Classification And Scene Analysis. Wiley and Son, 1973. [7] Tong Zhang. Statistical behavior and consistency of classification methods based on convex risk minimization. The Annals of Statistics, 32:56–85, 2004. [8] Clint Scovel and Ingo Steinwart. Fast rates for support vector machines. In Peter Auer and Ron Meir, editors, Proceedings of the 18th Conference on Learning Theory (COLT 2005), volume 3559 of Lecture Notes in Computer Science, pages 279–294, Bertinoro, Italy, June 2005. Springer-Verlag. [9] Vladimir N. Vapnik, Esther Levin, and Yann LeCun. Measuring the VC-dimension of a learning machine. Neural Computation, 6(5):851–876, 1994. [10] Olivier Bousquet. Concentration Inequalities and Empirical Processes Theory Applied to the Analysis of Learning Algorithms. PhD thesis, Ecole Polytechnique, 2002. [11] Alexandre B. Tsybakov. Optimal aggregation of classifiers in statistical learning. Annals of Statististics, 32(1), 2004. [12] Peter L. Bartlett, Michael I. Jordan, and Jon D. McAuliffe. Convexity, classification and risk bounds. Journal of the American Statistical Association, 101(473):138–156, March 2006. [13] Pascal Massart. Some applications of concentration inequalities to statistics. Annales de la Facult´e des Sciences de Toulouse, series 6, 9(2):245–303, 2000. [14] Wee S. Lee, Peter L. Bartlett, and Robert C. Williamson. The importance of convexity in learning with squared loss. IEEE Transactions on Information Theory, 44(5):1974–1980, 1998. [15] Shahar Mendelson. A few notes on statistical learning theory. In Shahar Mendelson and Alexander J. Smola, editors, Advanced Lectures in Machine Learning, volume 2600 of Lecture Notes in Computer Science, pages 1–40. Springer-Verlag, Berlin, 2003. [16] John E. Dennis, Jr. and Robert B. Schnabel. Numerical Methods For Unconstrained Optimization and Nonlinear Equations. Prentice-Hall, Inc., Englewood Cliffs, New Jersey, 1983. [17] Noboru Murata. A statistical study of on-line learning. In David Saad, editor, Online Learning and Neural Networks. Cambridge University Press, Cambridge, UK, 1998. [18] L´eon Bottou and Yann Le Cun. Large scale online learning. In Sebastian Thrun, Lawrence K. Saul, and Bernhard Sch¨olkopf, editors, Advances in Neural Information Processing Systems 16. MIT Press, Cambridge, MA, 2004. [19] Thorsten Joachims. Training linear SVMs in linear time. In Proceedings of KDD’06, Philadelphia, PA, USA, August 20-23 2006. ACM. [20] Don Hush, Patrick Kelly, Clint Scovel, and Ingo Steinwart. QP algorithms with guaranteed accuracy and run time for support vector machines. Journal of Machine Learning Research, 7:733–769, 2006.
2007
14
3,170
Discriminative K-means for Clustering Jieping Ye Arizona State University Tempe, AZ 85287 jieping.ye@asu.edu Zheng Zhao Arizona State University Tempe, AZ 85287 zhaozheng@asu.edu Mingrui Wu MPI for Biological Cybernetics T¨ubingen, Germany mingrui.wu@tuebingen.mpg.de Abstract We present a theoretical study on the discriminative clustering framework, recently proposed for simultaneous subspace selection via linear discriminant analysis (LDA) and clustering. Empirical results have shown its favorable performance in comparison with several other popular clustering algorithms. However, the inherent relationship between subspace selection and clustering in this framework is not well understood, due to the iterative nature of the algorithm. We show in this paper that this iterative subspace selection and clustering is equivalent to kernel K-means with a specific kernel Gram matrix. This provides significant and new insights into the nature of this subspace selection procedure. Based on this equivalence relationship, we propose the Discriminative K-means (DisKmeans) algorithm for simultaneous LDA subspace selection and clustering, as well as an automatic parameter estimation procedure. We also present the nonlinear extension of DisKmeans using kernels. We show that the learning of the kernel matrix over a convex set of pre-specified kernel matrices can be incorporated into the clustering formulation. The connection between DisKmeans and several other clustering algorithms is also analyzed. The presented theories and algorithms are evaluated through experiments on a collection of benchmark data sets. 1 Introduction Applications in various domains such as text/web mining and bioinformatics often lead to very highdimensional data. Clustering such high-dimensional data sets is a contemporary challenge, due to the curse of dimensionality. A common practice is to project the data onto a low-dimensional subspace through unsupervised dimensionality reduction such as Principal Component Analysis (PCA) [9] and various manifold learning algorithms [1, 13] before the clustering. However, the projection may not necessarily improve the separability of the data for clustering, due to the inherent separation between subspace selection (via dimensionality reduction) and clustering. One natural way to overcome this limitation is to integrate dimensionality reduction and clustering in a joint framework. Several recent work [5, 10, 16] incorporate supervised dimensionality reduction such as Linear Discriminant Analysis (LDA) [7] into the clustering framework, which performs clustering and LDA dimensionality reduction simultaneously. The algorithm, called Discriminative Clustering (DisCluster) in the following discussion, works in an iterative fashion, alternating between LDA subspace selection and clustering. In this framework, clustering generates the class labels for LDA, while LDA provides the subspace for clustering. Empirical results have shown the benefits of clustering in a low dimensional discriminative space rather than in the principal component space (generative). However, the integration between subspace selection and clustering in DisCluster is not well understood, due to the intertwined and iterative nature of the algorithm. In this paper, we analyze this discriminative clustering framework by studying several fundamental and important issues: (1) What do we really gain by performing clustering in a low dimensional discriminative space? (2) What is the nature of its iterative process alternating between subspace 1 selection and clustering? (3) Can this iterative process be simplified and improved? (4) How to estimate the parameter involved in the algorithm? The main contributions of this paper are summarized as follows: (1) We show that the LDA projection can be factored out from the integrated LDA subspace selection and clustering formulation. This results in a simple trace maximization problem associated with a regularized Gram matrix of the data, which is controlled by a regularization parameter λ; (2) The solution to this trace maximization problem leads to the Discriminative K-means (DisKmeans) algorithm for simultaneous LDA subspace selection and clustering. DisKmeans is shown to be equivalent to kernel K-means, where discriminative subspace selection essentially constructs a kernel Gram matrix for clustering. This provides new insights into the nature of this subspace selection procedure; (3) The DisKmeans algorithm is dependent on the value of the regularization parameter λ. We propose an automatic parameter tuning process (model selection) for the estimation of λ; (4) We propose the nonlinear extension of DisKmeans using the kernels. We show that the learning of the kernel matrix over a convex set of pre-specified kernel matrices can be incorporated into the clustering formulation, resulting in a semidefinite programming (SDP) [15]. We evaluate the presented theories and algorithms through experiments on a collection of benchmark data sets. 2 Linear Discriminant Analysis and Discriminative Clustering Consider a data set consisting of n data points {xi}n i=1 ∈Rm. For simplicity, we assume the data is centered, that is, Pn i=1 xi/n = 0. Denote X = [x1, · · · , xn] as the data matrix whose i-th column is given by xi. In clustering, we aim to group the data {xi}n i=1 into k clusters {Cj}k j=1. Let F ∈Rn×k be the cluster indicator matrix defined as follows: F = {fi,j}n×k, where fi,j = 1, iff xi ∈Cj. (1) We can define the weighted cluster indicator matrix as follows [4]: L = [L1, L2, · · · , Lk] = F(F T F)−1 2 . (2) It follows that the j-th column of L is given by Lj = (0, . . . , 0, nj z }| { 1, . . . , 1, 0, . . . , 0)T /n 1 2 j , (3) where nj is the sample size of the j-th cluster Cj. Denote µj = P x∈Cj x/nj as the mean of the j-th cluster Cj. The within-cluster scatter, between-cluster scatter, and total scatter matrices are defined as follows [7]: Sw = k X j=1 X xi∈Cj (xi −µj)(xi −µj)T , Sb = k X j=1 njµjµT j = XLLT XT , St = XXT . (4) It follows that trace(Sw) captures the intra-cluster distance, and trace(Sb) captures the inter-cluster distance. It can be shown that St = Sw + Sb. Given the cluster indicator matrix F (or L), Linear Discriminant Analysis (LDA) aims to compute a linear transformation (projection) P ∈Rm×d that maps each xi in the m-dimensional space to a vector ˆxi in the d-dimensional space (d < m) as follows: xi ∈IRm →ˆxi = P T xi ∈IRd, such that the following objective function is maximized [7]: trace ¡ (P T SwP)−1P T SbP ¢ . Since St = Sw + Sb, the optimal transformation matrix P is also given by maximizing the following objective function: trace ¡ (P T StP)−1P T SbP ¢ . (5) For high-dimensional data, the estimation of the total scatter (covariance) matrix is often not reliable. The regularization technique [6] is commonly applied to improve the estimation as follows: ˜St = St + λIm = XXT + λIm, (6) where Im is the identity matrix of size m and λ > 0 is a regularization parameter. In Discriminant Clustering (DisCluster) [5, 10, 16], the transformation matrix P and the weighted cluster indicator matrix L are computed by maximizing the following objective function: f(L, P) ≡ trace ³ (P T ˜StP)−1P T SbP ´ = trace ¡ (P T (XXT + λIm)P)−1P T XLLT XT P ¢ . (7) 2 The algorithm works in an intertwined and iterative fashion, alternating between the computation of L for a given P and the computation of P for a given L. More specifically, for a given L, P is given by the standard LDA procedure. Since trace(AB) = trace(BA) for any two matrices [8], for a given P, the objective function f(L, P) can be expressed as: f(L, P) = trace ¡ LT XT P(P T (XXT + λIm)P)−1P T XL ¢ . (8) Note that L is not an arbitrary matrix, but a weighted cluster indicator matrix, as defined in Eq. (3). The optimal L can be computed by applying the gradient descent strategy [10] or by solving a kernel K-means problem [5, 16] with XT P(P T (XXT + λIm)P)−1P T X as the kernel Gram matrix [4]. The algorithm is guaranteed to converge in terms of the value of the objective function f(L, P), as the value of f(L, P) monotonically increases and is bounded from above. Experiments [5, 10, 16] have shown the effectiveness of DisCluster in comparison with several other popular clustering algorithms. However, the inherent relationship between subspace selection via LDA and clustering is not well understood, and there is need for further investigation. We show in the next section that the iterative subspace selection and clustering in DisCluster is equivalent to kernel K-means with a specific kernel Gram matrix. Based on this equivalence relationship, we propose the Discriminative K-means (DisKmeans) algorithm for simultaneous LDA subspace selection and clustering. 3 DisKmeans: Discriminative K-means with a Fixed λ Assume that λ is a fixed positive constant. Let’s consider the maximization of the function in Eq. (7): f(L, P) = trace ¡ (P T (XXT + λIm)P)−1P T XLLT XT P ¢ . (9) Here, P is a transformation matrix and L is a weighted cluster indicator matrix as in Eq. (3). It follows from the Representer Theorem [14] that the optimal transformation matrix P ∈IRm×d can be expressed as P = XH, for some matrix H ∈IRn×d. Denote G = XT X as the Gram matrix, which is symmetric and positive semidefinite. It follows that f(L, P) = trace ³¡ HT (GG + λG) H ¢−1 HT GLLT GH ´ . (10) We show that the matrix H can be factored out from the objective function in Eq. (10), thus dramatically simplifying the optimization problem in the original DisCluster algorithm. The main result is summarized in the following theorem: Theorem 3.1. Let G be the Gram matrix defined as above and λ > 0 be the regularization parameter. Let L∗and P ∗be the optimal solution to the maximization of the objective function f(L, P) in Eq. (7). Then L∗solves the following maximization problem: L∗= arg max L trace µ LT µ In −(In + 1 λG)−1 ¶ L ¶ . (11) Proof. Let G = UΣU T be the Singular Value Decomposition (SVD) [8] of G, where U ∈IRn×n is orthogonal, Σ = diag (σ1, · · · , σt, 0, · · · , 0) ∈IRn×n is diagonal, and t = rank(G). Let U1 ∈ IRn×t consist of the first t columns of U and Σt = diag (σ1, · · · , σt) ∈IRt×t . Then G = UΣU T = U1ΣtU T 1 . (12) Denote R = (Σ2 t + λΣt)−1 2 ΣtU T 1 L and let R = MΣRN T be the SVD of R, where M and N are orthogonal and ΣR is diagonal with rank(ΣR) = rank(R) = q. Define the matrix Z as Z = Udiag ³ (Σ2 t + λΣt)−1 2 M, In−t ´ , where diag(A, B) is a block diagonal matrix. It follows that ZT ¡ GLLT G ¢ Z = µ ˜Σ 0 0 0 ¶ , ZT (GG + λG) Z = µ It 0 0 0 ¶ , (13) where ˜Σ = (ΣR)2 is diagonal with non-increasing diagonal entries. It can be verified that f(L, P) ≤ trace ³ ˜Σ ´ = trace ³ (GG + λG)+ GLLT G ´ = trace ³ LT G (GG + λG)+ GL ´ = trace µ LT µ In −(In + 1 λG)−1 ¶ L ¶ , (14) where the equality holds when P = XH and H consists of the first q columns of Z. 3 3.1 Computing the Weighted Cluster Matrix L The weighted cluster indicator matrix L solving the maximization problem in Eq. (11) can be computed by solving a kernel K-means problem [5] with the kernel Gram matrix given by ˜G = In − µ In + 1 λG ¶−1 . (15) Thus, DisCluster is equivalent to a kernel K-means problem. We call the algorithm Discriminative K-means (DisKmeans). 3.2 Constructing the Kernel Gram Matrix via Subspace Selection The kernel Gram matrix in Eq. (15) can be expressed as ˜G = U diag (σ1/(λ + σ1), σ2/(λ + σ2), · · · , σn/(λ + σn)) U T . (16) Recall that the original DisCluster algorithm involves alternating LDA subspace selection and clustering. The analysis above shows that the LDA subspace selection in DisCluster essentially constructs a kernel Gram matrix for clustering. More specifically, all the eigenvectors in G is kept unchanged, while the following transformation is applied to the eigenvalues: Φ(σ) = σ/(λ + σ). This elucidates the nature of the subspace selection procedure in DisCluster. The clustering algorithm is dramatically simplified by removing the iterative subspace selection. We thus address issues (1)–(3) in Section 1. The last issue will be addressed in Section 4 below. 3.3 Connection with Other Clustering Approaches Consider the limiting case when λ →∞. It follows from Eq. (16) that ˜G →G/λ. The optimal L is thus given by solving the following maximization problem: arg max L trace ¡ LT GL ¢ . The solution is given by the standard K-means clustering [4, 5]. Consider the other extreme case when λ →0. It follows from Eq. (16) that ˜G →U T 1 U1. Note that the columns of U1 form the full set of (normalized) principal components [9]. Thus, the algorithm is equivalent to clustering in the (full) principal component space. 4 DisKmeansλ: Discriminative K-means with Automatically Tuned λ Our experiments show that the value of the regularization parameter λ has a significant impact on the performance of DisKmeans. In this section, we show how to incorporate the automatic tuning of λ into the optimization framework, thus addressing issue (4) in Section 1. The maximization problem in Eq. (11) is equivalent to the minimization of the following function: trace à LT µ In + 1 λG ¶−1 L ! . (17) It is clear that a small value of λ leads to a small value of the objective function in Eq. (17). To overcome this problem, we include an additional penalty term to control the eigenvalues of the matrix In + 1 λG. This leads to the following optimization problem: min L,λ g(L, λ) ≡trace à LT µ In + 1 λG ¶−1 L ! + log det µ In + 1 λG ¶ . (18) Note that the objective function in Eq. (18) is closely related to the negative log marginal likelihood function in Gaussian Process [12] with In + 1 λG as the covariance matrix. We have the following main result for this section: Theorem 4.1. Let G be the Gram matrix defined above and let L be a given weighted cluster indicator matrix. Let G = UΣU T = U1ΣtU T 1 be the SVD of G with Σt = diag (σ1, · · · , σt) as in Eq. (12), and ai be the i-th diagonal entry of the matrix U T 1 LLT U1. Then for a fixed L, 4 the optimal λ∗solving the optimization problem in Eq. (18) is given by minimizing the following objective function: t X i=1 λai λ + σi + log ³ 1 + σi λ ´ . (19) Proof. Let U = [U1, U2], that is, U2 is the orthogonal complement of U1. It follows that log det µ In + 1 λG ¶ = log det µ It + 1 λΣ1 ¶ = t X i=1 log (1 + σi/λ) . (20) trace à LT µ In + 1 λG ¶−1 L ! = trace à LT U1 µ It + 1 λΣt ¶−1 U T 1 L ! + trace ¡ LT U2U T 2 L ¢ = t X i=1 (1 + σi/λ)−1ai + trace ¡ LT U2U T 2 L ¢ , (21) The result follows as the second term in Eq. (21), trace ¡ LT U2U T 2 L ¢ , is a constant. We can thus solve the optimization problem in Eq. (18) iteratively as follows: For a fixed λ, we update L by maximizing the objective function in Eq. (17), which is equivalent to the DisKmeans algorithm; for a fixed L, we update λ by minimizing the objective function in Eq. (19), which is a single-variable optimization and can be solved efficiently using the line search method. We call the algorithm DisKmeansλ, whose solution depends on the initial value of λ. 5 Kernel DisKmeans: Nonlinear Discriminative K-means using the kernels The DisKmeans algorithm can be easily extended to deal with nonlinear data using the kernel trick. Kernel methods [14] work by mapping the data into a high-dimensional feature space F equipped with an inner product through a nonlinear mapping φ : IRm →F. The nonlinear mapping can be implicitly specified by a symmetric kernel function K, which computes the inner product of the images of each data pair in the feature space. For a given training data set {xi}n i=1, the kernel Gram matrix GK is defined as follows: GK(i, j) = (φ(xi), φ(xj)). For a given GK, the weighted cluster matrix L = [L1, · · · , Lk] in kernel DisKmeans is given by minimizing the following objective function: trace à LT µ In + 1 λGK ¶−1 L ! = k X j=1 LT j µ In + 1 λGK ¶−1 Lj. (22) The performance of kernel DisKmeans is dependent on the choice of the kernel Gram matrix. Following [11], we assume that GK is restricted to be a convex combination of a given set of kernel Gram matrices {Gi}ℓ i=1 as GK = Pℓ i=1 θiGi, where the coefficients {θi}ℓ i=1 satisfy Pℓ i=1 θitrace(Gi) = 1 and θi ≥0 ∀i. If L is given, the optimal coefficients {θi}ℓ i=1 may be computed by solving a Semidefinite programming (SDP) problem as follows: Theorem 5.1. Let GK be constrained to be a convex combination of a given set of kernel matrices {Gi}ℓ i=1 as GK = Pℓ i=1 θiGi satisfying the constraints defined above. Then the optimal GK minimizing the objective function in Eq. (22) is given by solving the following SDP problem: min t1,··· ,tk,θ k X j=1 tj s.t. µ In + 1 λ Pℓ i=1 θi ˜Gi Lj LT j tj ¶ ⪰0, for j = 1, · · · , k, θi ≥0 ∀i, ℓ X i=1 θi trace(Gi) = 1. (23) Proof. It follows as LT j ¡ In + 1 λGK ¢−1 Lj ≤ti is equivalent to µ I + 1 λ Pℓ i=1 θi ˜Gi Lj LT j tj ¶ ⪰0. 5 This leads to an iterative algorithm alternating between the computation of the kernel Gram matrix GK and the computation of the cluster indicator matrix L. The parameter λ can also be incorporated into the SDP formulation by treating the identity matrix In as one of the kernel Gram matrix as in [11]. The algorithm is named Kernel DisKmeansλ. Note that unlike the kernel learning in [11], the class label information is not available in our formulation. 6 Empirical Study In this section, we empirically study the properties of DisKmeans and its variants, and evaluate the performance of the proposed algorithms in comparison with several other representative algorithms, including Locally Linear Embedding (LLE) [13] and Laplacian Eigenmap (Leigs) [1]. Table 1: Summary of benchmark data sets Data Set # DIM # INST # CL (m) (n) (k) banding 29 238 2 soybean 35 562 15 segment 19 2309 7 pendigits 16 10992 10 satimage 36 6435 6 leukemia 7129 72 2 ORL 10304 100 10 USPS 256 9298 10 Experiment Setup: All algorithms were implemented using Matlab and experiments were conducted on a PENTIUM IV 2.4G PC with 1.5GB RAM. We test these algorithms on eight benchmark data sets. They are five UCI data sets [2]: banding, soybean, segment, satimage, pendigits; one biological data set: leukemia (http://www. upo.es/eps/aguilar/datasets.html) and two image data sets: ORL (http://www.uk.research.att.com/ facedatabase.html, sub-sampled to a size of 100*100 = 10000 from 10 persons) and USPS (ftp://ftp.kyb.tuebingen.mpg.de/pub/bs/ data/). See Table 1 for more details. To make the results of different algorithms comparable, we first run K-means and the clustering result of K-means is used to construct the set of k initial centroids, for all experiments. This process is repeated for 50 times with different sub-samples from the original data sets. We use two standard measurements: the accuracy (ACC) and the normalized mutual information (NMI) to measure the performance. 10 −6 10 −4 10 −2 10 0 10 2 10 4 10 6 0.762 0.763 0.764 0.765 0.766 0.767 0.768 0.769 0.77 0.771 0.772 Banding ACC λ K−means DisCluster DisKmeans 10 −6 10 −4 10 −2 10 0 10 2 10 4 10 6 0.624 0.626 0.628 0.63 0.632 0.634 0.636 0.638 0.64 0.642 0.644 soybean ACC λ K−means DisCluster DisKmeans 10 −6 10 −4 10 −2 10 0 10 2 10 4 10 6 0.63 0.64 0.65 0.66 0.67 0.68 0.69 segment ACC λ K−means DisCluster DisKmeans 10 −6 10 −4 10 −2 10 0 10 2 10 4 10 6 0.68 0.685 0.69 0.695 0.7 pendigits ACC λ K−means DisCluster DisKmeans 10 −6 10 −4 10 −2 10 0 10 2 10 4 10 6 0.61 0.62 0.63 0.64 0.65 0.66 0.67 0.68 0.69 0.7 0.71 satimage ACC λ K−means DisCluster DisKmeans 10 −6 10 −4 10 −2 10 0 10 2 10 4 10 6 0.735 0.74 0.745 0.75 0.755 0.76 0.765 0.77 0.775 0.78 leukemia ACC λ K−means DisCluster DisKmeans 10 −5 10 0 10 5 10 10 0.735 0.736 0.737 0.738 0.739 0.74 0.741 0.742 0.743 0.744 0.745 ORL ACC λ K−means DisCluster DisKmeans 10 −6 10 −4 10 −2 10 0 10 2 10 4 10 6 0.54 0.56 0.58 0.6 0.62 0.64 0.66 0.68 0.7 0.72 USPS ACC λ K−means DisCluster DisKmeans Figure 1: The effect of the regularization parameter λ on DisKmeans and Discluster. Effect of the regularization parameter λ: Figure 1 shows the accuracy (y-axis) of DisKmeans and DisCluster for different λ values (x-axis). We can observe that λ has a significant impact on the performance of DisKmeans. This justifies the development of an automatic parameter tuning process in Section 4. We can also observe from the figure that when λ →∞, the performance of DisKmeans approaches to that of K-means on all eight benchmark data sets. This is consistent with our theoretical analysis in Section 3.3. It is clear that in many cases, λ = 0 is not the best choice. Effect of parameter tuning in DisKmeansλ: Figure 2 shows the accuracy of DisKmeansλ using 4 data sets. In the figure, the x-axis denotes the different λ values used as the starting point for DisKmeansλ. The result of DisKmeans (without parameter tuning) is also presented for comparison. We can observe from the figure that in many cases the tuning process is able to significantly improve the performance. We observe similar trends on other four data sets and the results are omitted. 6 10 −6 10 −4 10 −2 10 0 10 2 10 4 10 6 0.6 0.62 0.64 0.66 0.68 0.7 0.72 satimage ACC λ DisKmeans DisKmeansλ 10 −6 10 −4 10 −2 10 0 10 2 10 4 10 6 0.68 0.682 0.684 0.686 0.688 0.69 0.692 0.694 0.696 0.698 0.7 pendigits ACC λ DisKmeans DisKmeansλ 10 −5 10 0 10 5 10 10 0.73 0.732 0.734 0.736 0.738 0.74 0.742 0.744 0.746 0.748 0.75 ORL ACC λ DisKmeans DisKmeanλ 10 −6 10 −4 10 −2 10 0 10 2 10 4 10 6 0.54 0.56 0.58 0.6 0.62 0.64 0.66 0.68 0.7 0.72 USPS ACC λ DisKmeans DisKmeansλ Figure 2: The effect of the parameter tuning in DisKmeansλ using 4 data sets. The x-axis denotes the different λ values used as the starting point for DisKmeansλ. Figure 2 also shows that the tuning process is dependent on the initial value of λ due to its nonconvex optimization, and when λ →∞, the effect of the tuning process become less pronounced. Our results show that a value of λ, which is neither too large nor too small works well. 1 2 3 4 5 6 7 8 0.084 0.086 0.088 0.09 0.092 0.094 0.096 0.098 satimage TRACE λ DisCluster DisKmeans 1 2 3 4 5 0.341 0.342 0.343 0.344 0.345 0.346 0.347 pendigits TRACE λ DisCluster DisKmeans 1 2 3 4 5 6 7 0.214 0.216 0.218 0.22 0.222 0.224 0.226 0.228 0.23 segment TRACE λ DisCluster DisKmeans 1 1.5 2 2.5 3 3.5 4 4.5 5 0.025 0.0255 0.026 0.0265 0.027 0.0275 USPS TRACE λ DisCluster DisKmeans Figure 3: Comparison of the trace value achieved by DisKmean and DisCluster. The x-axis denotes the number of iterations in Discluster. The trace value of DisCluster is bounded from above by that of DisKmean. DisKmean versus DisCluster: Figure 3 compares the trace value achieved by DisKmean and the trace value achieved in each iteration of DisCluster on 4 data sets for a fixed λ. It is clear that the trace value of DisCluster increases in each iteration but is bounded from above by that of DisKmean. We observe a similar trend on the other four data sets and the results are omitted. This is consistent with our analysis in Section 3 that both algorithms optimize the same objective function, and DisKmean is a direct approach for the trace maximization without the iterative process. Clustering evaluation: Table 2 presents the accuracy (ACC) and normalized mutual information (NMI) results of various algorithms on all eight data sets. In the table, DisKmeans (or DisCluster) with “max” and “ave” stands for the maximal and average performance achieved by DisKmeans and DisCluster using λ from a wide range between 10−6 and 106. We can observe that DisKmeansλ is competitive with other algorithms. It is clear that the average performance of DisKmeansλ is robust against different initial values of λ. We can also observe that the average performance of DisKmeans and DisCluster is quite similar, while DisCluster is less sensitive to the value of λ. 7 Conclusion In this paper, we analyze the discriminative clustering (DisCluster) framework, which integrates subspace selection and clustering. We show that the iterative subspace selection and clustering in DisCluster is equivalent to kernel K-means with a specific kernel Gram matrix. We then propose the DisKmeans algorithm for simultaneous LDA subspace selection and clustering, as well as an automatic parameter tuning procedure. The connection between DisKmeans and several other clustering algorithms is also studied. The presented analysis and algorithms are verified through experiments on a collection of benchmark data sets. We present the nonlinear extension of DisKmeans in Section 5. Our preliminary studies have shown the effectiveness of Kernel DisKmeansλ in learning the kernel Gram matrix. However, the SDP formulation is limited to small-sized problems. We plan to explore efficient optimization techniques for this problem. Partial label information may be incorporated into the proposed formulations. This leads to semi-supervised clustering [3]. We plan to examine various semi-learning techniques within the proposed framework and their effectiveness for clustering from both labeled and unlabeled data. 7 Table 2: Accuracy (ACC) and Normalized Mutual Information (NMI) results on 8 data sets. “max” and “ave” stand for the maximal and average performance achieved by DisKmeans and DisCluster using λ from a wide range of values between 10−6 and 106. We present the result of DisKmeansλ with different initial λ values. LLE stands for Local Linear Embedding and LEI for Laplacian Eigenmap. “AVE” stands for the mean of ACC or NMI on 8 data sets for each algorithm. Data Sets DisKmeans DisCluster DisKmeansλ LLE LEI max ave max ave 10−2 10−1 100 101 ACC banding 0.771 0.768 0.771 0.767 0.771 0.771 0.771 0.771 0.648 0.764 soybean 0.641 0.634 0.633 0.632 0.639 0.639 0.638 0.637 0.630 0.649 segment 0.687 0.664 0.676 0.672 0.664 0.659 0.671 0.680 0.594 0.663 pendigits 0.699 0.690 0.696 0.690 0.700 0.696 0.696 0.697 0.599 0.697 satimage 0.701 0.651 0.654 0.642 0.696 0.712 0.696 0.683 0.627 0.663 leukemia 0.775 0.763 0.738 0.738 0.738 0.753 0.738 0.738 0.714 0.686 ORL 0.744 0.738 0.739 0.738 0.749 0.743 0.748 0.748 0.733 0.317 USPS 0.712 0.628 0.692 0.683 0.684 0.702 0.680 0.684 0.631 0.700 AVE 0.716 0.692 0.700 0.695 0.705 0.709 0.705 0.705 0.647 0.642 NMI banding 0.225 0.221 0.225 0.219 0.225 0.225 0.225 0.225 0.093 0.213 soybean 0.707 0.701 0.698 0.696 0.706 0.707 0.704 0.704 0.691 0.709 segment 0.632 0.612 0.615 0.608 0.629 0.625 0.628 0.632 0.539 0.618 pendigits 0.669 0.656 0.660 0.654 0.661 0.658 0.658 0.660 0.577 0.645 satimage 0.593 0.537 0.551 0.541 0.597 0.608 0.596 0.586 0.493 0.548 leukemia 0.218 0.199 0.163 0.163 0.163 0.185 0.163 0.163 0.140 0.043 ORL 0.794 0.789 0.789 0.788 0.800 0.795 0.801 0.800 0.784 0.327 USPS 0.647 0.544 0.629 0.613 0.612 0.637 0.609 0.612 0.569 0.640 AVE 0.561 0.532 0.541 0.535 0.549 0.555 0.548 0.548 0.486 0.468 Acknowledgments This research is sponsored by the National Science Foundation Grant IIS-0612069. References [1] M. Belkin and P. Niyogi. Laplacian eigenmaps for dimensionality reduction and data representation. In NIPS, 2003. [2] C.L. Blake and C.J. Merz. UCI repository of machine learning databases, 1998. [3] O. Chapelle, B. Sch¨olkopf, and A. Zien. Semi-Supervised Learning. The MIT Press, 2006. [4] I. S. Dhillon, Y. Guan, and B. Kulis. A unified view of kernel k-means, spectral clustering and graph partitioning. Technical report, Department of Computer Sciences, University of Texas at Austin, 2005. [5] C. Ding and T. Li. Adaptive dimension reduction using discriminant analysis and k-means clustering. In ICML, 2007. [6] J. H. Friedman. Regularized discriminant analysis. JASA, 84(405):165–175, 1989. [7] K. Fukunaga. Introduction to Statistical Pattern Classification. Academic Press. [8] G. H. Golub and C. F. Van Loan. Matrix Computations. The Johns Hopkins Univ. Press, 1996. [9] I.T. Jolliffe. Principal Component Analysis. Springer; 2nd edition, 2002. [10] F. De la Torre Frade and T. Kanade. Discriminative cluster analysis. In ICML, pages 241–248, 2006. [11] G.R.G. Lanckriet, N. Cristianini, P. Bartlett, L. E. Ghaoui, and M. I. Jordan. Learning the kernel matrix with semidefinite programming. JMLR, 5:27–72, 2004. [12] C.E. Rasmussen and C.K.I. Williams. Gaussian Processes for Machine Learning. The MIT Press, 2006. [13] S. T. Roweis and L. K. Saul. Nonlinear dimensionality reduction by locally linear embedding. Science, 290:2323–2326, 2000. [14] B. Sch¨olkopf and A. Smola. Learning with Kernels: Support Vector Machines, Regularization, Optimization and Beyond. MIT Press, 2002. [15] L. Vandenberghe and S. Boyd. Semidefinite programming. SIAM Review, 38:49–95, 1996. [16] J. Ye, Z. Zhao, and H. Liu. Adaptive distance metric learning for clustering. In CVPR, 2007. 8
2007
140
3,171
Heterogeneous Component Analysis Shigeyuki Oba1, Motoaki Kawanabe2, Klaus Robert M¨uller3,2, and Shin Ishii4,1 1. Graduate School of Information Science, Nara Institute of Science and Technology, Japan 2. Fraunhofer FIRST.IDA, Germany 3. Department of Computer Science, Technical University Berlin, Germany 4. Graduate School of Informatics, Kyoto University, Japan shige-o@is.naist.jp Abstract In bioinformatics it is often desirable to combine data from various measurement sources and thus structured feature vectors are to be analyzed that possess different intrinsic blocking characteristics (e.g., different patterns of missing values, observation noise levels, effective intrinsic dimensionalities). We propose a new machine learning tool, heterogeneous component analysis (HCA), for feature extraction in order to better understand the factors that underlie such complex structured heterogeneous data. HCA is a linear block-wise sparse Bayesian PCA based not only on a probabilistic model with block-wise residual variance terms but also on a Bayesian treatment of a block-wise sparse factor-loading matrix. We study various algorithms that implement our HCA concept extracting sparse heterogeneous structure by obtaining common components for the blocks and specific components within each block. Simulations on toy and bioinformatics data underline the usefulness of the proposed structured matrix factorization concept. 1 Introduction Microarray and other high-throughput measurement devices have been applied to examine specimens such as cancer tissues of biological and/or clinical interest. The next step is to go towards combinatorial studies in which tissues measured by two or more of such devices are simultaneously analyzed. However, such combinatorial studies inevitably suffer from differences in experimental conditions, or, even more complex, from different measurement technologies. Also, when concatenating a data set from different measurement sources, we often observe systematic missing parts in a dataset (e.g., Fig 3A). Moreover, the noise levels may vary among different experiments. All these induce a heterogeneous structure in data, that needs to be treated appropriately. Our work will contribute exactly to this topic, by proposing a Bayesian method for feature subspace extraction, called heterogeneous component analysis (HCA, sections 2 and 3). HCA performs a linear feature extraction based on matrix factorization in order to obtain a sparse and structured representation. After relating to previous methods (section 4), HCA is applied to toy data and more interestingly to neuroblastoma data from different measurement techniques (section 5). We obtain interesting factors that may be a first step towards better biological model building. 2 Formulation of the HCA problem Let a matrix Y = {yij}i=1:M,j=1:N denote a set of N observations of M-dimensional feature vectors, where yij ∈R is the j-th observation of the i-th feature. In a heterogeneous situation, we assume the M-dimensional feature vector is decomposed into L disjoint blocks. Let I(l) denote a set of feature indices included in the l-th block, so that I(1) ∪· · · ∪I(L) = I and I(l) ∩I(l′) = ∅for l ̸= l′. Figure 1: An illustration of a typical dataset and the result by the HCA. The observation matrix Y consists of multiple samples j = 1, . . . , N with high-dimensional features i ∈I. The features consist of multiple blocks, in this case I(1) ∪I(2) ∪I(3) = I. There are many missing observations whose distribution is highly structural depending on each block. HCA optimally factorizes the matrix Y so that the factor-loading matrix U has structural sparseness; it includes some regions of zero elements according to the block structure of the observed data. Each factor may or may not affect all the features within a block, but each block does not necessarily affect all the factors. Therefore, the rank of each factor-loading sub-matrix for each block (or any set of blocks) can be different from the others. The resulting block-wise sparse matrix reflects a characteristic heterogeneity of features over blocks. We assume that the matrix Y ∈RM×N is a noisy observation of a matrix of true values X ∈RM×N whose rank is K(< min(M, N)) and has a factorized form: Y = X + E, X = UV T, (1) where E ∈RM×N, U ∈RM×K, and V ∈RN×K are matrices of residuals, factor-loadings, and factors, respectively. The superscript T denotes the matrix transpose. There may be missing or unmeasured observations denoted by a matrix W ∈{0, 1}M×N, which indicates observation yij is missing if wij = 0 or exists otherwise (wij = 1). Figure 1 illustrates the concept of HCA. In this example, the observed data matrix (left panel) is made up by three blocks of features. They have block-wise variation in effective dimensionalities, missing rates, observation noise levels, and so on, which we overall call heterogeneity. Such heterogeneity affects the effective rank of the observation sub-matrix corresponding to each block, and hence leads naturally to different ranks of factor-loading sub-matrix between blocks. In addition, there can exist block-wise patterns of missing values (shadowed rectangular regions in the left panel); such a situation would occur, for example in bioinformatics, when some particular genes have been measured in one assay (constituting a block) but not in another assay (constituting another block). To better understand the objective data based on the feature extraction by matrix factorization, we assume a block-wise sparse factor-loading matrix U (right panel in Fig.1). Namely, the effective rank of an observation sub-matrix corresponding to a block is reflected by the number of non-zero components in the corresponding rows of U. Assuming such a block-wise sparse structure can decrease the model’s effective complexity, and will describe the data better and therefore lead to better generalization ability, e.g., for missing value prediction. 3 A probabilistic model for HCA Model For each element of the residual matrix, eij ≡yij −PK k=1 uikvjk, we assume a Gaussian distribution with a common variance σ2 l for every feature i in the same block I(l): ln p(eij|σ2 l(i)) = −1 2σ−2 l(i)e2 ij −1 2 ln σ2 l(i) −1 2 ln 2π, (2) where l(i) denotes the pre-determined block index to which the i-th feature belongs. For a factor matrix V , we assume a Gaussian prior: ln p(V ) = N X j=1 K X k=1  −1 2v2 jk −ln 2π  . (3) The above two assumptions are exactly the same as those for probabilistic PCA that is a special case of HCA with a single active block. Another special case where each block contains only one active feature is probabilistic factor analysis (FA). Namely, maximum likelihood (ML) estimation based on the following log-likelihood includes both the PCA and the FA as special settings of the blocks. ln p(Y , V |U, σ2) =1 2 X ij wij  −σ−2 l(i)e2 ij −ln σ2 l(i) −ln 2π  + 1 2 X jk −v2 jk −ln 2π  . (4) σ2 = (σ2 l )l=1,...,L is a vector of variances of all blocks. Since wij = 0 iff yij is missing, the summation P ij is actually taken for all observed values in Y . Another character of the HCA model is the block-wise sparse factor-loading matrix, which is implemented by a prior for U, given by ln p(U|T ) = X ik tik  −1 2u2 ik −1 2 ln 2π  , (5) where T = {tik} is a block-wise mask matrix which defines the block-wise-sparse structure; if tik = 0, then uik = 0 with probability 1. Each column vector of the mask matrix takes one of the possible block-wise mask patterns; a binary pattern vector whose dimensionality is the same as the factor-loading vector, and whose values are consistent, either 0 or 1, within each block. When there are L blocks, each column vector of T can take one of 2L possible patterns including the zero vector, and hence, the matrix T with K columns can take one of 2LK possible patterns. Parameter estimation We estimated the model parameters U and V by maximum a posteriori (MAP) estimation, and σ by ML estimation; that is, the log-joint: L def = log P(Y , U, V |σ, T ) was maximized w.r.t. U, V and σ. Maximization of the log-joint L w.r.t U, V , and σ was performed by the conjugate gradient algorithm that was available in the NETLAB toolbox [1]. The stationary condition w.r.t. the variance, ∂L ∂(σ2) = 0, was solved as a closed form of U and V : ˜σ2 l (U, V ) def = mean(i,j|l)[e2 ij], (6) where mean(i,j|l)[.] is the average over all pairs (i, j) not missing in the l-th block. By redefining the objective function with the closed form solution plugged in: ˜L(U, V ) def = L(U, V , ˜σ2(U, V )), (7) the conjugate gradient of ˜L w.r.t. U and V led to faster and more stable optimization than the naive maximization of L w.r.t. U, V , and σ2. Model selection The mask matrix T was determined by maximization of the log-marginal likelihood R LdUdV which was calculated by Laplace approximation around the MAP estimator: E(T ) def = L −1 2lndetH, (8) where H def = ∂2 ∂θ∂θT L is the Hessian of log-joint w.r.t. all elements (θ) in the parameters U and V . The log Hessian term, lndetH, which works as a penalty term for maintaining non-zero elements in the factor-loading matrix, was simplified in order for tractable calculation. Namely, independence in the log-joint was assumed: ∂2L ∂uikvjk′ ≈0, ∂2L ∂uikuik′ ≈0, and ∂2L ∂vjkvjk′ ≈0, (9) which enabled a similar tractable computation to variational Bayes (VB) and was expected to produce satisfactory results. To avoid searching through an exponentially large number of possibilities, we implemented a greedy search that optimizes each of the column vectors in a step-wise manner, called HCA-greedy algorithm. In each step of the HCA-greedy algorithm, factor-loading and factor vectors are estimated based on 2L possible settings of block-wise mask vectors, and we accept the one achieving the maximum log-marginal. It terminated if zero vector is accepted as the best mask vector. HCA with ARD The greedy search still searches 2L possibilities per a factor, whose computation increases exponentially as the number of blocks L increases. The automatic relevance determination (ARD) is a hierarchical Bayesian approach for selecting relevant bases, which has been applied to component analyzers since its first introduction to Bayesian PCA (BPCA) [2]. The prior for U is given by ln p(U|α) = 1 2 L X l=1 K X k=1 (X i∈Il −αlku2 ik + ln αlk −ln 2π  ) , (10) where αlk is an ARD hyper-parameter for the l-th block of the k-th column of U. α is a vector of all elements of αlk, l = 1, . . . , L, k = 1, . . . , K. With this prior, the log-joint probability density function becomes ln p(Y , U, V |σ2, α) =1 2 X ij wij  −σ−2 l(i)e2 ij −ln σ2 l(i) −ln 2π  + 1 2 X jk −v2 jk −ln 2π  + 1 2 X ik −αl(i)ku2 ik + ln αl(i)k −ln 2π  . (11) According to this ARD approach, α is updated by the conjugate gradient-based optimization simultaneously with U and V . In each step of the optimization, α was updated until the stationary condition of log-marginal w.r.t. α approximately held. In HCA with ARD, called HCA-ARD, the initial values of U and V were obtained by SVD. We also examined an ARD-based procedure with another initial value setting, i.e., starting from the result obtained by HCA-greedy, which is signified by HCA-g+ARD. 4 Related work In this work, the ideas from both probabilistic modeling of linear component analyzers and sparse matrix factorization frameworks are combined into an analytical tool for data with underlying heterogeneous structures. The weighted low-rank matrix factorization (WLRMF) [3] has been proposed as a minimization problem of the weighted error: min U,V = X i,j wij(yij − X k uikvjk)2, (12) where wij is a weight for the element yij of the observation matrix Y . The weight value is set as wij = 0 if the corresponding yij is missing or wij > 0 otherwise. This objective function is equivalent to the (negative) log-likelihood of a probabilistic generative model based on an assumption that each element of the residual matrix obeys a Gaussian distribution with variance 1/wij. The WLRMF objective function is equivalent to our log-likelihood function (4) if the weight is set at estimated inverse noise variance for each (i, j)-th element. Although the prior term, ln p(V ) = −1 2 P jk v2 jk +const., has been added to eq. (4), it just imposes a constraint on the linear indeterminacy between U and V , and hence the resultant low-rank matrix UV T is identical to that by WLRMF. Bayesian PCA [2] is also a matrix factorization procedure, which includes a characteristic prior density of factor-loading vectors, ln p(U|α) = −1 2 P ik αku2 ik +const.. It is an equivalent prior for Missing pattern 50 100 50 100 150 True factor loading 2 4 6 8 50 100 150 SVD 10 20 50 100 150 HCA-greedy 10 20 50 100 150 HCA-ARD 2 4 6 8 50 100 150 HCA-g+ARD 50 100 150 2 4 6 8 0 5 10 15 20 0.5 0.6 0.7 0.8 0.9 1 NRMSE K SVD HCA-greedy HCA-ARD BPCA WLRMF HCA-g+ARD (A) (B) (C) (I) (F) (E) (D) (G) (H) BPCA 2 4 6 8 50 100 150 WLRMF 2 4 6 8 50 100 150 Figure 2: Experimental results when applied to an artificial data matrix. (A) Missing pattern of the observation matrix. Vertical and horizontal axes correspond to row (typically, genes) and column (typically, samples) of the matrix (typically, gene expression matrix). Red cells signify missing elements. (B) True factor-loading matrix. Horizontal axis denotes factors. Color and its intensity denote element values and white cells denote zero elements. Panels from (C) to (H) show the factor-loading matrices estimated by SVD, WLRMF, BPCA, HCA-greedy, HCA-ARD, and HCAg+ARD, respectively. The vertical line in panel (F) denotes the automatically determined number of components. Panel (I) shows missing value prediction performance obtained by the three HCA algorithms and other methods. The vertical and horizontal axes denote normalized root mean square of test errors and dimensionalities of factors, respectively. HCA-ARD (eq. (10)) if we assume only a single block. Although this prior term obviously a simple L2 norm in the WLRMF, it also includes hyper parameter α which constitute different regularization term and it leads to automatic model (intrinsic dimensionality) selection when α is determined by evidence criterion. Component analyzers with sparse factor-loadings have recently been investigated as sparse PCA (SPCA). In a well established context of SPCA studies (e.g. [4]), the tradeoff problem is solved between the understandability (sparsity of factor-loadings) and the reproducibility of the covariance matrix from the sparsified factor-loadings. In our HCA, the block-wise sparse factor-loading matrix is useful not only for understandability but also for generalization ability. The latter merit comes from the assumption that the observation includes uncertainty due to a small sample size, large noises, and missing observations, which have not been considered sufficiently in SPCA. 5 Experiments Experiment 1: an artificial dataset We prepared an artificial data set with an underlying block structure. For this we generated a 170 × 9 factor-loading matrix U that included a pre-determined block structure (white vs. colored in Fig. 2(B)), and a 100 × 9 factor matrix V by applying orthogonalization to the factors sampled from a standard Gaussian distribution. The observation matrix Y was produced by UV T + E, where each element of E was generated from a standard Gaussian. Then, missing values were artificially introduced according to the pre-determined block structure (Fig. 2(A)). • Block 1 consisted of 20 features with randomly selected 10 % missing entries. • Block 2 consisted of 50 features whose 50% columns were completely missing and the remaining columns contained randomly selected 50% missing entries. • Block 3 consisted of 100 features whose 20% columns were completely missing and the remaining columns contained randomly selected 20% missing entries. We applied three HCA algorithms: HCA-greedy, HCA-ARD, and HCA-g+ARD, and three existing matrix factorization algorithms: SVD, WLRMF and BPCA. SVD SVD calculated for a matrix whose missing values are imputed to zeros. WLRMF[3] The weights were set 1 for the value-existing entries or 0 for the missing entries. BPCA WLRMF with an ARD prior, called here BPCA, which is equivalent to HCA-ARD except that all features are in a single active block (i.e., colored in Fig. 2(B)). We confirmed this method exhibited almost the same performance as VB-EM-based algorithm [5]. The generalization ability was evaluated on the basis of the estimation performance for artificially introduced missing values. The estimated factor-loading matrices and missing value estimation accuracies are shown in Figure 2. Factor-loading matrices based on WLRMF and BPCA were obviously almost the same with that by SVD, because these three methods did not assume any sparsity in the factor-loading matrix. The HCA-greedy algorithm terminated at K = 10. The factor-loading matrix estimated by HCAgreedy showed an identical sparse structure to the one consisting of the top five factors in the true factor-loadings. The sixth factor in the second block was not extracted, possibly because the second block lacked information due to the large rate of missing values. This algorithm also happened to extract one factor not included in the original factor-loadings, as the tenth one in the first block. Although the HCA-ARD and HCA-g+ARD algorithms extracted good ones as the top three and four factors, respectively, they failed to completely reconstruct the sparsity structure in other factors. As shown in panel (I), however, such a poorly extracted structure did not increase the generalization error, implying that the essential structure underlying the data was extracted well by the three HCAbased algorithms. Reconstruction of missing values was evaluated by normalized root mean square errors: NRMSE def = p mean[(y −˜y)2]/var[y], where y and ˜y denote true and estimated values, respectively, the mean is the average over all the missing entries and the variance is for all entries of the matrix. Figure 2(I) shows the generalization ability of missing value predictions. SVD and WLRMF, which incurred no penalty on extracting a large number of factors, exhibited the best results around K = 9, but got worse with the increase in the number of K due to over-fitting. HCA-g+ARD showed the best performance at K = 9, which was better than that obtained by all the other methods. HCAgreedy, HCA-ARD, and BPCA exhibited comparative performance at K = 9. At K = 2, . . . , 8, the HCA algorithms performed better than BPCA. Namely, the sparse structure in the factor-loadings tended to achieve better performance. HCA-ARD performed less effectively than the other two HCA algorithms at K > 13, because of convergence to local solutions. This reason is supported by the fact that HCA-g+ARD employing good initialization by HCA-greedy exhibited the best performance among all the HCA algorithms. Accordingly, HCA showed a better generalization ability with a smaller number of effective parameters than the existing methods. Factor loading (HCA-greedy) Factor loading (WLRMF) 5 10 15 20 1000 2000 2448 Missing entries 100 200 300 Factors 5 10 15 20 1000 2000 2448 Factors (A) Samples (B) (C) array CGH Microarray 1 Microarray 2 Figure 3: Analysis of an NBL dataset. Vertical axes denote high-dimensional features. Features measured by array CGH technology are sorted in the chromosomal order. Microarray features are sorted by correlations to sample’s prognosis, dead or alive at the end of clinical followup. (A) Missing pattern in the NBL dataset. White and red colors denote observed and missing entries in the data matrix, respectively. (B) and (C) Factor-loading matrices estimated by the HCA-greedy and WLRMF algorithms, respectively. Experiment 2: a cross-analysis of neuroblastoma data We next applied our HCA to a neuroblastoma (NBL) dataset consisting of three data blocks taken by three kinds of high-throughput genomic measurement technologies. Array CGH Chromosomal changes of 2340 DNA segments (using 2340 probes) were measured for each of 230 NBL tumors, by using the array comparative genomic hybridization (array CGH) technology. Data for 1000 probes were arbitrarily selected from the whole dataset. Microarray 1 Expression levels of 5340 genes were measured for 136 tumors from NBL patients. We selected 1000 genes showing the largest variance over the 136 tumors. Microarray 2 Gene expression levels in 25 out of 136 tumors were also measured by a small-sized microarray technology harboring 448 probes. The dataset Microarray 1 was the same one as used in the previous study [6], and the other two datasets, array CGH and Microarray 2, were also provided by the same research group for this study. As seen in Figure 3(A), the set of measured samples was quite different in the three experiments, leading to apparent block-wise missing observations. We normalized the data matrix so that the block-wise variances become unity. We further added 10% missing entries randomly into the observed entries in order to evaluate missing value prediction performance. When HCA-greedy was applied to this dataset, it terminated at K = 23, but we continued to obtain further factors until K = 80. Figure 3(B) shows the factor-loading matrix from K = 0 to 23. HCA-greedy extracted one factor showing the relationship between the three measurement devices and three factors between aCGH and Microarray 1. The other factors accounted for either of aCGH or Microarray 1. The first factor was strongly correlated with patient’s prognosis as clearly shown by the color code in the parts of Microarrays 1 and 2. Note that the features in these two datasets are aligned by correlations to the prognosis. This suggests that the dataset Microarray 2 did not include factors other than the first one as those strongly related to the prognosis. On the other hand, WLRMF extracted the identical first factor to HCA-greedy, but extracted much more factors concerning Microarray 2, all of which may not be trustworthy because the number of samples observed in Microarray 2 was as small as 25. 0 0.5 1 1.5 2 x 10 5 0.5 0.6 0.7 0.8 0.9 Test NRMSE Num.NonZeroElements 0 20 40 60 80 0.5 0.6 0.7 0.8 0.9 Test NRMSE K 0 20 40 60 80 0.1 0.2 0.3 0.4 0.5 0.6 0.7 0.8 0.9 Training NRMSE K SVD HCA-greedy HCA-ARD BPCA WLRMF HCA-g+ARD (A) (B) (C) Figure 4: Missing value prediction performance by the six algorithms. Vertical axis denotes normalized root mean square of training errors (A) or test errors (B and C). Horizontal axis denotes the number of factors (A and B) or the number of non-zero elements in the factor-loading matrices (C). Each curve corresponds to one of the six algorithms. We also applied SVD, WLRMF, BPCA and other two HCA algorithms to the NBL dataset. For WLRMF, BPCA, HCA-ARD, and HCA-g+ARD, the initial numbers of factors were set at K = 5, 10, 20, . . . , 70, and 80. Missing value prediction performance in terms of NRMSE was obtained as a measurement value of generalization performance. Note that the original data matrix included many missing values, but we evaluated the performance by using artificially introduced missing values. Figure 4 shows the results. Training errors almost monotonically decreased as the number of factors increased (Fig. 4A), indicating the stability of the algorithms. The only exception was HCA-ARD whose error increased from K = 30 to K = 40; this was due to local solution, because HCA-g+ARD employing the same algorithm but starting from different initialization showed consistent improvements in its performance. Test errors did not show monotonic profiles except that HCA-greedy exhibited monotonically better results for larger K values (Fig. 4B and C). SVD and WLRMF exhibited the best performance at K = 22 and K = 60, respectively, and got worse as the number of factors increased due to over-fitting. Overall, the variants of our new HCA concept have shown good generalization performance as measured on missing values, much similar to existing methods like WLRMF. We would like to emphasize, however, that HCA yields a clearer factor structure that is easier interpretable from the biological point of view. 6 Conclusion Complex structured data are ubiquitous in practice. For instance, when we should integrate data derived from different measurement devices, it becomes critically important to combine the information in each single source optimally — otherwise no gain can be achieved beyond the individual analyses. Our Bayesian HCA model allows to take into account such structured feature vectors that possess different intrinsic blocking characteristics. The new probabilistic structured matrix factorization framework was applied to toy data and to neuroblastoma data collected by multiple high-throughput measurement devices which had block-wise missing structures due to different experimental designs. HCA achieved a block-wise sparse factor-loading matrix, representing the information amount contained in each block of the dataset simultaneously. While HCA provided a better or similar missing value prediction performance than existing methods such as BPCA or WLRMF, the heterogeneous structure underlying the problem was clearly captured much better. Furthermore the HCA factors derived are an interesting representation that may ultimately lead to a better modeling of the neuroblastoma data (see section 5). In the current HCA implementation, block structures were assumed to be known, as for the neuroblastoma data. Future work will go into a fully automatic estimate of structure from measured multi-modal data and the respective model selection techniques to achieve this goal. Clearly there is an increasing need for methods that are able to reliably extract factors from multimodal structured data with heterogeneous features. Our future effort will therefore strive towards applications beyond bioinformatics and to design novel structured spatio-temporal decomposition methods in applications like electroencephalography (EEG), image and audio analyses. Acknowledgement This work was supported by a Grant-in-Aid for Young Scientists (B) No. 19710172 from MEXT Japan. References [1] I. Nabney and Christopher Bishop. Netlab: Netlab neural network software. http://www.ncrg.aston.ac.uk/netlab/, 1995. [2] C.M. Bishop. Bayesian PCA. In Proceedings of 11th conference on Advances in neural information processing systems, pages 382–388. MIT Press Cambridge, MA, USA, 1999. [3] N. Srebro and T. Jaakkola. Weighted low rank matrix approximations. In Proceedings of 20th International Conference on Machine Learning, pages 720–727, 2003. [4] A. d’Aspremont, F. R. Bach, and L. El Ghaoui. Full regularization path for sparse principal component analysis. In Proceedings of the 24th International Conference on Machine Learning, 2007. [5] S. Oba, M. Sato, I. Takemasa, M. Monden, K. Matsubara, and S. Ishii. A Bayesian missing value estimation method for gene expression profile data. Bioinformatics, 19(16):2088–2096, 2003. [6] M. Ohira, S. Oba, Y. Nakamura, E. Isogai, S. Kaneko, A. Nakagawa, T. Hirata, H. Kubo, T. Goto, S. Yamada, Y. Yoshida, M. Fuchioka, S. Ishii, and A. Nakagawara. Expression profiling using a tumor-specific cDNA microarray predicts the prognosis of intermediate risk neuroblastomas. Cancer Cell, 7(4):337–350, Apr 2005.
2007
141
3,172
An Analysis of Inference with the Universum Fabian H. Sinz Max Planck Institute for biological Cybernetics Spemannstrasse 41, 72076, T¨ubingen, Germany fabee@tuebingen.mpg.de Olivier Chapelle Yahoo! Research Santa Clara, California chap@yahoo-inc.com Alekh Agarwal University of California Berkeley 387 Soda Hall Berkeley, CA 94720-1776 alekh@eecs.berkeley.edu Bernhard Sch¨olkopf Max Planck Institute for biological Cybernetics Spemannstrasse 38, 72076, T¨ubingen, Germany bs@tuebingen.mpg.de Abstract We study a pattern classification algorithm which has recently been proposed by Vapnik and coworkers. It builds on a new inductive principle which assumes that in addition to positive and negative data, a third class of data is available, termed the Universum. We assay the behavior of the algorithm by establishing links with Fisher discriminant analysis and oriented PCA, as well as with an SVM in a projected subspace (or, equivalently, with a data-dependent reduced kernel). We also provide experimental results. 1 Introduction Learning algorithms need to make assumptions about the problem domain in order to generalise well. These assumptions are usually encoded in the regulariser or the prior. A generic learning algorithm usually makes rather weak assumptions about the regularities underlying the data. An example of this is smoothness. More elaborate prior knowledge, often needed for a good performance, can be hard to encode in a regulariser or a prior that is computationally efficient too. Interesting hybrids between both extremes are regularisers that depend on an additional set of data available to the learning algorithm. A prominent example of data-dependent regularisation is semisupervised learning [1], where an additional set of unlabelled data, assumed to follow the same distribution as the training inputs, is tied to the regulariser using the so-called cluster assumption. A novel form of data-dependent regularisation was recently proposed by [11]. The additional dataset for this approach is explicitly not from the same distribution as the labelled data, but represents a third — neither — class. This kind of dataset was first proposed by Vapnik [10] under the name Universum, owing its name to the intuition that the Universum captures a general backdrop against which a problem at hand is solved. According to Vapnik, a suitable set for this purpose can be thought of as a set of examples that belong to the same problem framework, but about which the resulting decision function should not make a strong statement. Although initially proposed for transductive inference, the authors of [11] proposed an inductive classifier where the decision surface is chosen such that the Universum examples are located close to it. Implementing this idea into an SVM, different choices of Universa proved to be helpful in various classification tasks. Although the authors showed that different choices of Universa and loss functions lead to certain known regularisers as special cases of their implementation, there are still a few unanswered questions. On the one hand it is not clear whether the good performance of their algorithm is due to the underlying original idea, or just a consequence of the employed algorithmic 1 relaxation. On the other hand, except in special cases, the influence of the Universum data on the resulting decision hyperplane and therefore criteria for a good choice of a Universum is not known. In the present paper we would like to address the second question by analysing the influence of the Universum data on the resulting function in the implementation of [11] as well as in a least squares version of it which we derive in section 2. Clarifying the regularising influence of the Universum on the solution of the SVM can give valuable insight into which set of data points might be a helpful Universum and how to obtain it. The paper is structured as follows. After briefly deriving the algorithms in section 2 we show in section 3 that the algorithm of [11] pushes the normal of the hyperplane into the orthogonal complement of the subspace spanned by the principal directions of the Universum set. Furthermore, we demonstrate that the least squares version of the Universum algorithm is equivalent to a hybrid between kernel Fisher Discriminant Analysis and kernel Oriented Principal Component Analysis. In section 4, we validate our analysis on toy experiments and give an example how to use the geometric and algorithmic intuition gained from the analysis to construct a Universum set for a real world problem. 2 The Universum Algorithms 2.1 The Hinge Loss U-SVM We start with a brief review of the implementation proposed in [11]. Let L = {(x1, y1), ..., (xm, ym)} be the set of labelled examples and let U = {z1, ..., zq} denote the set of Universum examples. Using the hinge loss Ha[t] = max{0, a −t} and fw,b(x) = ⟨w, x⟩+ b, a standard SVM can compactly be formulated as min w,b 1 2||w||2 + CL m X i=1 H1[yifw,b(xi)]. In the implementation of [11] the goal of bringing the Universum examples close to the separating hyperplane is realised by also minimising the cumulative ε-insensitive loss Iε[t] = max{0, |t| −ε} on the Universum points min w,b 1 2||w||2 + CL m X i=1 H1[yifw,b(x)] + CU q X j=1 Iε[ |fw,b(zj)| ]. (1) Noting that Iε[t] = H−ε[t] + H−ε[−t], one can use the simple trick of adding the Universum examples twice with opposite labels and obtain an SVM like formulation which can be solved with a standard SVM optimiser. 2.2 The Least Squares U-SVM The derivation of the least squares U-SVM starts with the same general regularised error minimisation problem min w,b 1 2||w||2 + CL 2 m X i=1 Qyi[fw,b(x)] + CU 2 q X j=1 Q0[fw,b(zj)]. (2) Instead of using the hinge loss, we employ the quadratic loss Qa[t] = ||t −a||2 2 which is used in the least squares versions of SVMs [9]. Expanding (2) in terms of slack variables ξ and ϑ yields min w,b 1 2||w||2 + CL 2 m X i=1 ξ2 i + CU 2 q X j=1 ϑ2 j (3) s.t. ⟨w, xi⟩+ b = yi −ξi for i = 1, ..., m ⟨w, zj⟩+ b = 0 −ϑj for j = 1, ..., q. Minimising the Lagrangian of (3) with respect to the primal variables w, b, ξ and ϑ, and substituting their optimal values back into (3) yields a dual maximisation problem in terms of the Lagrange 2 multipliers α. Since this dual problem is still convex, we can set its derivative to zero and thereby obtain the following linear system  0 1⊤ 1 K + C   b α  =  0 y 0  , Here, K =  KL,L KL,U K⊤ L,U KU,U  denotes the kernel matrix between the input points in the sets L and U, and C =  1 CL I 0 0 1 CU I  an identity matrix of appropriate size scaled with 1 CL in dimensions associated with labelled examples and 1 CU for dimensions corresponding to Universum examples. The solution (α, b) can then be obtained by a simple matrix inversion. In the remaining part of this paper we denote the least squares SVM by Uls-SVM. 2.3 Related Ideas Although [11] proposed the first algorithm that explicitly refers to Vapnik’s Universum idea, there exist related approaches that we shall mention briefly. The authors of [12] describe an algorithm for the one-vs-one strategy in multiclass learning that additionally minimises the distance of the separating hyperplane to the examples that are in neither of the classes. Although this is algorithmically equivalent to the U-SVM formulation above, their motivation is merely to sharpen the contrast between the different binary classifiers. In particular, they do not consider using a Universum for binary classification problems. There are also two Bayesian algorithms that refer to non-examples or neither class in the binary classification setting. [8] gives a probabilistic interpretation for a standard hinge loss SVM by establishing the connection between the MAP estimate of a Gaussian process with a Gaussian prior using a covariance function k and a hinge loss based noise model. In order to deal with the problem that the proposed likelihood does not integrate to one the author introduces a third — the neither— class, A similar idea is used by [4], introducing a third class to tackle the problem that unlabelled examples used in semi-supervised learning do not contribute to discriminative models PY|X(yi|xi) since the parameters of the label distribution are independent of input points with unknown, i.e., marginalised value of the label. To circumvent this problem, the authors of [4] introduce an additional — neither — class to introduce a stochastic dependence between the parameter and the unobserved label in the discriminative model. However, neither of the Bayesian approaches actually assigns an observed example to the introduced third class. 3 Analysis of the Algorithm The following two sections analyse the geometrical relation of the decision hyperplane learnt with one of the Universum SVMs to the Universum set. It will turn out that in both cases the optimal solutions tend to make the normal vector orthogonal to the principal directions of the Universum. The extreme case where w is completely orthogonal to U, makes the decision function defined by w invariant to transformations that act on the subspace spanned by the elements of U. Therefore, the Universum should contain directions the resulting function should be invariant against. In order to increase the readability we state all results for the linear case. However, our results generalise to the case where the xi and zj live in an RKHS spanned by some kernel. 3.1 U-SVM and Projection Kernel For this section we start by considering a U-SVM with hard margin on the elements of U. Furthermore, we use ε = 0 for the ε-insensitive loss. After showing the equivalence to using a standard SVM trained on the orthogonal complement of the subspace spanned by the zj, we extend the result to the cases with soft margin on U. Lemma A U-SVM with CU = ∞, ε = 0 is equivalent to training a standard SVM with the training points projected onto the orthogonal complement of span{zj −z0, zj ∈U}, where z0 is an arbitrary element of U. 3 Proof: Since CU = ∞and ε = 0, any w yielding a finite value of (1) must fulfil ⟨w, zj⟩+b = 0 for all j = 1, ..., q. So ⟨w, zj −z0⟩= 0 and w is orthogonal to span{zj −z0, zj ∈U}. Let PU⊥denote the projection operator onto the orthogonal complement of that set. From the previous argument, we can replace ⟨w, xi⟩by ⟨PU⊥w, xi⟩in the solution of (1) without changing it. Indeed, the optimal w in (1) will satisfy w = PU⊥w. Since PU⊥is an orthogonal projection we have that PU⊥= P ⊤ U⊥ and hence ⟨PU⊥w, xi⟩= ⟨w, P ⊤ U⊥xi⟩= ⟨w, PU⊥xi⟩. Therefore, the optimisation problem in (1) is the same as a standard SVM where the xi have been replaced by PU⊥xi. □ The special case the lemma refers to, clarifies the role of the Universum in the U-SVM. Since the resulting w is orthogonal to an affine space spanned by the Universum points, it is invariant against features implicitly specified by directions of large variance in that affine space. Picturing the ⟨·, zj⟩ as filters that extract certain features from given labelled or test examples x, using the Universum algorithms means suppressing the features specified by the zj. Finally, we generalise the result of the lemma by dropping the hard constraint assumption on the Universum examples, i.e. we consider the case CU < ∞. Let w∗and b∗the optimal solution of (1). We have that CU q X j=1 |⟨w∗, zj⟩+ b∗| ≥CU min b q X j=1 |⟨w∗, zj⟩+ b|. The right hand side can be interpreted as an ”L1 variance”. So the algorithm tries to find a direction w∗such that the variance of the projection of the Universum points on that direction is small. As CU approaches infinity this variance approaches 0 and we recover the result of the above lemma. 3.2 Uls-SVM, Fisher Discriminant Analysis and Principal Component Analysis In this section we present the relation of the Uls-SVM to two classic learning algorithms: (kernel) oriented Principal Component Analysis (koPCA) and (kernel) Fisher discriminant analysis (kFDA) [5]. As it will turn out, the Uls-SVM is equivalent to a hybrid between both up to a linear equality constraint. Since koPCA and kFDA can both be written as maximisation of a Rayleigh Quotient we start with the Rayleigh quotient of the hybrid max w w⊤ from FDA z }| { (c+ −c−)(c+ −c−)⊤w w⊤(CL X k=± X i∈Ik (xi −ck)(xi −ck)⊤ | {z } from FDA +CU q X j=1 (zj −˜c)(zj −˜c)⊤ | {z } from oPCA )w . Here, c± denote the class means of the labelled examples and ˜c = 1 2(c+ +c−) is the point between them. As indicated in the equation, the numerator is exactly the same as in kFDA, i.e. the interclass variance, while the denominator is a linear combination of the denominators from kFDA and koPCA, i.e. the inner class variances from kFDA and the noise variance from koPCA. As noted in [6] the numerator is just a rank one matrix. For optimising the quotient it can be fixed to an arbitrary value while the denominator is minimised. Since the denominator might not have full rank it needs to be regularised [6]. Choosing the regulariser to be ||w||2, the problem can be rephrased as min w ||w||2 + w⊤“ CL P k=± P i∈Ik(xi −ck)(xi −ck)⊤+ CU Pq j=1(zj −˜c)(zj −˜c)⊤” w (4) s.t. w⊤(c+ −c−) = 2 As we will see below this problem can further be transformed into a quadratic program min w,b ||w||2 + CL||ξ||2 + CU||ϑ||2 (5) s.t. ⟨w, xi⟩+ b = yi + ξi for all i = 1, ..., m ⟨w, zj⟩+ b = ϑj for all j = 1, ..., q ξ⊤1k = 0 for k = ±. Ignoring the constraint ξ⊤1k = 0, this program is equivalent to the quadratic program (3) of the Uls-SVM. The following lemma establishes the relation of the Uls-SVM to kFDA and koPCA. 4 Lemma For given CL and CU the optimisation problems (4) and (5) are equivalent. Proof: Let w, b, ξ and ϑ the optimal solution of (5). Combining the first and last constraint, we get w⊤c± +b∓1 = 0. This gives us w⊤(c+ −c−) = 2 as well as b = −w⊤˜c. Plugging ξ and ϑ in (5) and using this value of b, we obtain the objective function (4). So we have proved that the minimum value of (4) is not larger than the one of (5). Conversely, let w be the optimal solution of (4). Let us choose b = −w⊤˜c, ξi = w⊤xi +b−yi and ϑj = w⊤zj+b. Again both objective functions are equal. We just have to check that P i: yi=±1 ξi = 0. But because w⊤(c+ −c−) = 2, we have 1 m± X i: yi=±1 ξi = w⊤c± + b ∓1 = w⊤c± −w⊤(c+ + c−) 2 ∓1 = w⊤(c± −c∓) 2 ∓1 = 0.□ The above lemma establishes a relation of the Uls-SVM to two classic learning algorithms. This further clarifies the role of the Universum set in the algorithmic implementation of Vapnik’s idea as proposed by [11]. Since the noise covariance matrix of koPCA is given by the covariance of the Universum points centered on the average of the labelled class means, the role of the Universum as a data-dependent specification of principal directions of invariance is affirmed. The koPCA term also shows that both the position and covariance structure are crucial to a good Universum. To see this, we rewrite Pq j=1(zj −˜c)(zj −˜c)⊤as Pq j=1(zj −˜z)(zj −˜z)⊤+ q(˜z − ˜c)(˜z −˜c)⊤, where ˜z = 1 q Pq j=1 zj is the Universum mean. The additive relationship between covariance of Universum about its mean, and the distance between Universum and training sample means projected onto w shows that either quantity can dominate depending on the data at hand. In the next section, we demonstrate the theoretical results of this section on toy problems and give an example how to use the insight gained from this section to construct an appropriate Universum. 4 Experiments 4.1 Toy Experiments The theoretical results of section 3 show that the covariance structure of the Universum as well as its absolute position influence the result of the learning process. To validate this insight on toy data, we sample ten labelled sets of size 20, 50, 100 and 500 from two fifty-dimensional Gaussians. Both Gaussians have a diagonal covariance that has low standard deviation (σ1,2 = 0.08) in the first two dimensions and high standard deviation (σ3,...,50 = 10) in the remaining 48. The two Gaussians are displaced such that the mean of µ± i = ±0.3 exceeds the standard deviation by a factor of 3.75 in the first two dimensions but was 125 times smaller in the remaining ones. The values are chosen such that the Bayes risk is approx. 5%. Note, that by construction the first two dimensions are most discriminative. We construct two kinds of Universa for this toy problem. For the first kind we use a mean zero Gaussian with the same covariance structure as the Gaussians for the labelled data (σ3,...,50 = 10), but with varied degree of anisotropy in the first two dimensions (σ1,2 = 0.1, 1.0, 10). According to the results of section 3 the Universa should be more helpful for larger anisotropy. For the second kind of Universa we use the same covariance as the labelled classes but shifted them along the line between the means of the labelled Gaussians. This kind of Universa should have a positive effect on the accuracy for small displacements but that effect should vanish with increasing amount of translation. Figure 1 shows the performance of a linear U-SVMs for different amounts of training and Universum data. In the top row, the degree of isotropy increases from left to right, whereas σ = 10 refers to the complete isotropic case. In the bottom row, the amount of translation increases from left to right. As expected, performance converges to the performance of an SVM for high isotropy σ and large translations t. Note, that large translations do not affect the accuracy as much as a high isotropy. However, this might be due to the fact the variance along the principal components of the Universum is much larger in magnitude than the applied shift. We obtained similar results for the Uls-SVM. Also, the effect remains when employing an RBF kernel. 5 0 100 200 300 400 500 0 0.1 0.2 0.3 0.4 0.5 m mean error σ = 0.1 0 100 200 300 400 500 0 0.1 0.2 0.3 0.4 0.5 m mean error σ = 1.0 0 100 200 300 400 500 0 0.1 0.2 0.3 0.4 0.5 m mean error σ = 10.0 0 100 200 300 400 500 0 0.1 0.2 0.3 0.4 0.5 m mean error t = 0.1 0 100 200 300 400 500 0 0.1 0.2 0.3 0.4 0.5 m mean error t = 0.5 0 100 200 300 400 500 0 0.1 0.2 0.3 0.4 0.5 m mean error t = 0.9 SVM (q=0) q = 100 q = 500 SVM (q=0) q = 100 q = 500 SVM (q=0) q = 100 q = 500 SVM (q=0) q = 100 q = 1000 SVM (q=0) q = 100 q = 1000 SVM (q=0) q = 100 q = 1000 Figure 1: Learning curves of linear U-SVMs for different degrees of isotropy σ and different amounts of translation z 7→z + t 2 · (c+ −c−). With increasing isotropy and translation the performance of the U-SVMs converges to the performance of a normal SVM. Universum 0 1 2 3 4 6 7 9 Test error 1.234 1.313 1.399 1.051 1.246 1.111 1.338 1.226 Mean output 0.406 -0.708 -0.539 -0.031 -0.256 0.063 -0.165 -0.360 Angle 81.99 85.57 79.49 69.74 79.75 81.02 82.72 77.98 Table 1: See text for details. Without Universum, test error is 1.419%. The correlation between the test error and the absolute value of the mean output (resp. angle) is 0.71 (resp 0.64); the p-value (i.e the probability of observing such a correlation by chance) is 3% (resp 5.5%). Note that for instance that digits 3 and 6 are the best Universum and they are also the closest to the decision boundary. 4.2 Results on MNIST Following the experimental work from [11], we took up the task of distinguishing between the digits 5 and 8 on MNIST data. Training sets of size 1000 were used, and other digits served as Universum data. Using different digits as universa, we recorded the test error (in percentage) of U-SVM. We also computed the mean output (i.e. ⟨w, x⟩+ b) of a normal SVM trained for binary classification between the digits 5 and 8, measured on the points from the Universum class. Another quantity of interest measured was the angle between covariance matrices of training and Universum data in the feature space. Note that for two covariance matrices CX and CY corresponding to matrices X and Y (centered about their means), the cosine of the angle is defined as trace(CXCY )/ p trace(C2 X)trace(C2 Y ). This quantity can be computed in feature space as trace(KXY K⊤ XY )/ p trace(K2 XX)trace(K2 Y Y ), with KXY the kernel matrix between the sets X and Y . These quantities have been documented in Table 1. All the results reported are averaged over 10-folds of cross-validation, with C = CU = 100, and ε = 0.01. 4.3 Classification of Imagined Movements in Brain Computer Interfaces Brain computer interfaces (BCI) are devices that allow a user to control a computer by merely using his brain activity [3]. The user indicates different states to a computer system by deliberately changing his state of mind according to different experimental paradigms. These states are to be detected by a classifier. In our experiments, we used data from electroencephalographic recordings (EEG) with a imagined-movement paradigm. In this paradigm the patient imagines the movement of his left or right hand for indicating the respective state. In order to reverse the spatial blurring of the brain activity by the intermediate tissue of the skull, the signals from all sensors are demixed via 6 DATA I Algorithm U FS JH JL SVM ∅ 40.00 ± 7.70 40.00 ± 11.32 30.00 ± 15.54 U-SVM UC3 41.33 ± 7.06 (0.63) 34.58 ± 9.22 (0.07) 30.56 ± 17.22 (1.00) Unm 39.67 ± 8.23 (1.00) 37.08 ± 11.69 (0.73) 30.00 ± 16.40 (1.00) LS-SVM ∅ 41.00 ± 7.04 40.42 ± 11.96 30.56 ± 15.77 Uls-SVM UC3 40.67 ± 7.04 (1.00) 37.08 ± 7.20 (0.18) 31.11 ± 17.01 (1.00) Unm 40.67 ± 6.81 (1.00) 37.92 ± 12.65 (1.00) 30.00 ± 15.54 (1.00) DATA II S1 S2 S3 SVM ∅ 12.35 ± 6.82 35.29 ± 13.30 35.26 ± 14.05 U-SVM UC3 13.53 ± 6.83 (0.63) 32.94 ± 11.83 (0.63) 35.26 ± 14.05 (1.00) Unm 12.35 ± 7.04 (1.00) 27.65 ± 14.15 (0.13) 36.84 ± 13.81 (1.00) LS-SVM ∅ 13.53 ± 8.34 33.53 ± 13.60 34.21 ± 12.47 Uls-SVM UC3 12.94 ± 6.68 (1.00) 32.35 ± 10.83 (0.38) 35.79 ± 15.25 (1.00) Unm 16.47 ± 7.74 (0.50) 31.18 ± 13.02 (0.69) 35.79 ± 15.25 (1.00) Table 2: Mean zero-one test error scores for the BCI experiments. The mean was taken over ten single error scores. The p-value for a two-sided sign test against the SVM error scores are given in brackets. an independent component analysis (ICA) applied to the concatenated lowpass filtered time series of all recording channels [2]. In the experiments below we used two BCI datasets. For the first set (DATA I) we recorded the EEG activity from three healthy subjects for an imagined movement paradigm as described by [3]. The second set (DATA II) contains EEG signals from a similar paradigm [7]. We constructed two kind of Universa. The first Universum, UC3 consists of recordings from a third condition in the experiments that is not related to imagined movements. Since variations in signals from this condition should not carry any useful information about imagined movement task, the classifier should be invariant against them. The second Universum Unm is physiologically motivated. In the case of the imagined-movement paradigm the relevant signal is known to be in the so called α-band from approximately 10 −12Hz and spatially located over the motor cortices. Unfortunately, signals in the α-band are also related to visual activity and independent components can be found that have a strong influence from sensors over the visual cortex. However, since ICA is unsupervised, those independent components could still contain discriminative information. In order to make the learning algorithm prefer the signals from the motor cortex, we construct a Universum Unm by projecting the labelled data onto the independent components that have a strong influence from the visual cortex. The machine learning experiments were carried out in two nested cross validation loops, where the inner loop was used for model selection and the outer for testing. We exclusively used a linear kernel. Table 2 shows the mean zero-one loss for DATA I and DATA II and the constructed Universa. On the DATA I dataset, there is no improvement in the error rates for the subjects FS and JL compared to an SVM without Universum. Therefore, we must assume that the employed Universa did not provide helpful information in those cases. For subject JH, UC3 and Unm yield an improvement for both Universum algorithms. However, the differences to the SVM error scores are not significantly better according to a two-sided sign test. The Uls-SVM performs worse than the U-SVM in almost all cases. On the DATA II dataset, there was an improvement only for subject S2 using the U-SVM with the Unm and UC3 Universum (8% and 3% improvement respectively). However, also those differences are not significant. As already observed for the DATA I dataset, the Uls-SVM performs constantly worse than its hinge loss counterpart. The better performance of the Unm Universum on the subjects JH and S2 indicates that additional information about the usefulness of features might in fact help to increase the accuracy of the classifier. The regularisation constant CU for the Universum points was chosen C = CU = 0.1 in both cases. This means that the non-orthogonality of w on the Universum points was only weakly 7 penalised, but had equal priority to classifying the labelled examples correctly. This could indicate that the spatial filtering by the ICA is not perfect and discriminative information might be spread over several independent components, even over those that are mainly non-discriminative. Using the Unm Universum and therefore gently penalising the use of these non-discriminative features can help to improve the classification accuracy, although the factual usefulness seems to vary with the subject. 5 Conclusion In this paper we analysed two algorithms for inference with a Universum as proposed by Vapnik [10]. We demonstrated that the U-SVM as implemented in [11] is equivalent to searching for a hyperplane which has its normal lying in the orthogonal complement of the space spanned by Universum examples. We also showed that the corresponding least squares Uls-SVM can be seen as a hybrid between the two well known learning algorithms kFDA and koPCA where the Universum points, centered between the means of the labelled classes, play the role of the noise covariance in koPCA. Ideally the covariance matrix of the Universum should thus contain some important invariant directions for the problem at hand. The position of the Universum set plays also an important role and both our theoretical and experimental analysis show that the behaviour of the algorithm depends on the difference between the means of the labelled set and of the Universum set. The question of whether the main influence of the Universum comes from the position or the covariance does not have a clear answer and is probably problem dependent. From a practical point, the main contribution of this paper is to suggest how to select a good Universum set: it should be such that it contains invariant directions and is positioned “in between” the two classes. Therefore, as can be partly seen from the BCI experiments, a good Universum dataset needs to be carefully chosen and cannot be an arbitrary backdrop as the name might suggest. References [1] O. Chapelle, B. Sch¨olkopf, and A. Zien, editors. Semi-Supervised Learning. MIT Press, Cambridge, MA, 2006. [2] N. J. Hill, T. N. Lal, M. Schr¨oder, T. Hinterberger, B. Wilhelm, F. Nijboer, U. Mochty, G. Widman, C. E. Elger, B. Sch¨olkopf, A. K¨ubler, and N. Birbaumer. Classifying EEG and ECoG signals without subject training for fast bci implementation: Comparison of non-paralysed and completely paralysed subjects. IEEE Transactions on Neural Systems and Rehabilitation Engineering, 14(2):183–186, 06 2006. [3] T. N. Lal. Machine Learning Methods for Brain-Computer Interdaces. PhD thesis, University Darmstadt, 09 2005. Logos Verlag Berlin MPI Series in Biological Cybernetics, Bd. 12 ISBN 3-8325-1048-6. [4] Neil D. Lawrence and Michael I. Jordan. Gaussian processes and the null-category noise model. In A. Zien O. Chapelle, Bernhard Sch¨olkopf, editor, Semi-Supervised Learning, chapter 8, pages 137–150. MIT University Press, 2006. [5] S. Mika, G. R¨atsch, J. Weston, B. Sch¨olkopf, A. Smola, and K. M¨uller. Invariant feature extraction and classification in kernel spaces. In Advances in Neural Information Processing Systems 12, pages 526–532, 2000. [6] Sebastian Mika, Gunnar R¨atsch, and Klaus-Robert M¨uller. A mathematical programming approach to the kernel fisher algorithm. In Advances in Neural Information Processing Systems, NIPS, 2000. [7] J. del R. Mill´an. On the need for on-line learning in brain-computer interfaces. IDIAP-RR 30, IDIAP, Martigny, Switzerland, 2003. Published in “Proc. of the Int. Joint Conf. on Neural Networks”, 2004. [8] P. Sollich. Probabilistic methods for support vector machines. In Advances in Neural Information Processing Systems, 1999. [9] J. A. K. Suykens and J. Vandewalle. Least squares support vector machine classifiers. Neural Processing Letters, 9(3):293–300, 1999. [10] V. Vapnik. Transductive Inference and Semi-Supervised Learning. In O. Chapelle, B. Sch¨olkopf, and A. Zien, editors, Semi-Supervised Learning, chapter 24, pages 454–472. MIT press, 2006. [11] J. Weston, R. Collobert, F. Sinz, L. Bottou, and V. Vapnik. Inference with the universum. In Proceedings of the 23rd International Conference on Machine Learning, page 127, 06/25/ 2006. [12] P. Zhong and M. Fukushima. A new support vector algorithm. Optimization Methods and Software, 21:359–372, 2006. 8
2007
142
3,173
Exponential Family Predictive Representations of State David Wingate Computer Science and Engineering University of Michigan wingated@umich.edu Satinder Singh Computer Science and Engineering University of Michigan baveja@umich.edu Abstract In order to represent state in controlled, partially observable, stochastic dynamical systems, some sort of sufficient statistic for history is necessary. Predictive representations of state (PSRs) capture state as statistics of the future. We introduce a new model of such systems called the “Exponential family PSR,” which defines as state the time-varying parameters of an exponential family distribution which models n sequential observations in the future. This choice of state representation explicitly connects PSRs to state-of-the-art probabilistic modeling, which allows us to take advantage of current efforts in high-dimensional density estimation, and in particular, graphical models and maximum entropy models. We present a parameter learning algorithm based on maximum likelihood, and we show how a variety of current approximate inference methods apply. We evaluate the quality of our model with reinforcement learning by directly evaluating the control performance of the model. 1 Introduction One of the basic problems in modeling controlled, partially observable, stochastic dynamical systems is representing and tracking state. In a reinforcement learning context, the state of the system is important because it can be used to make predictions about the future, or to control the system optimally. Often, state is viewed as an unobservable, latent variable, but models with predictive representations of state [4] propose an alternative: PSRs represent state as statistics about the future. The original PSR models used the probability of specific, detailed futures called tests as the statistics of interest. Recent work has introduced the more general notion of using parameters that model the distribution of length n futures as the statistics of interest [8]. To clarify this, consider an agent interacting with the system. It observes a series of observations o1...ot, which we call a history ht (where subscripts denote time). Given any history, there is some distribution over the next n observations: p(Ot+1...Ot+n|ht) ≡p(F n|ht) (where Ot+i is the random variable representing an observation i steps in the future, and F n is a mnemonic for future). We emphasize that this distribution directly models observable quantities in the system. Instead of capturing state with tests, the more general idea is to capture state by directly modeling the distribution p(F n|ht). Our central assumption is that the parameters describing p(F n|ht) are sufficient for history, and therefore constitute state (as the agent interacts with the system, p(F n|ht) changes because ht changes; therefore the parameters and hence state change). As an example of this, the Predictive Linear-Gaussian (PLG) model [8] assumes that p(F n|ht) is jointly Gaussian; state therefore becomes its mean and covariance. Nothing is lost by defining state in terms of observable quantities: Rudary et al [8] proved that the PLG is formally equivalent to the latent-variable approach in linear dynamical systems. In fact, because the parameters are grounded, statistically consistent parameter estimators are available for PLGs. 1 Thus, as part of capturing state in a dynamical system in our method, p(F n|ht) must be estimated. This is a density estimation problem. In systems with rich observations (say, camera images), p(F n|ht) may have high dimensionality. As in all high-dimensional density estimation problems, structure must be exploited. It is therefore natural to connect to the large body of recent research dealing with high-dimensional density estimation, and in particular, graphical models. In this paper, we introduce the Exponential Family PSR (EFPSR) which assumes that p(F n|ht) is a standard exponential family distribution. By selecting the sufficient statistics of the distribution carefully, we can impose graphical structure on p(F n|ht), and therefore make explicit connections to graphical models, maximum entropy modeling, and Boltzmann machines. The EFPSR inherits both the advantages and disadvantages of graphical exponential family models: inference and parameter learning in the model is generally hard, but all existing research on exponential family distributions is applicable (in particular, work on approximate inference). Selecting the form of p(F n|ht) and estimating its parameters to capture state is only half of the problem. We must also model the dynamical component, which describes the way that the parameters vary over time (that is, how the parameters of p(F n|ht) and p(F n|ht+1) are related). We describe a method called “extend-and-condition,” which generalizes many state update mechanisms in PSRs. Importantly, the EFPSR has no hidden variables, but can still capture state, which sets it apart from other graphical models of sequential data. It is not directly comparable to latent-variable models such as HMMs, CRFs [3], or Maximum-entropy Markov Models (MEMMs) [5], for example. In particular, EM-based procedures used in the latent-variable models for parameter learning are unnecessary, and indeed, impossible. This is a consequence of the fact that the model is fully observed: all statistics of interest are directly related to observable quantities. We refer the reader to [11] for an extended version of this paper. 2 The Exponential Family PSR We now present the Exponential Family PSR (EFPSR) model. The next sections discuss the specifics of the central parts of the model: the state representation, and how we maintain that state. 2.1 Standard Exponential Family Distributions We first discuss exponential family distributions, which we use because of their close connections to maximum entropy modeling and graphical models. We refer the reader to Jaynes [2] for detailed justification, but briefly, he states that the maximum entropy distribution “agrees with everything that is known, but carefully avoids assuming anything that is not known,” which “is the fundamental property which justifies its use for inference.” The standard exponential family distribution is the form of the maximum entropy distribution under certain constraints. For a random variable X, a standard exponential family distribution has the form p(X = x; s) = exp{sT φ(x)−Z(s)}, where s is the canonical (or natural) vector of parameters and φ(x) is a vector of features of variable x. The vector φ(x) also forms the sufficient statistics of the distribution. The term Z(s) is known as the log-partition function, and is a normalizing constant which ensures that p(X; s) defines a valid distribution: Z(s) = log R exp{sT φ(x)}dx. By carefully selecting the features φ(x), graphical structure may be imposed on the distribution. 2.2 State Representation and Dynamics State. The EFPSR defines state as the parameters of an exponential family distribution modeling p(F n|ht). To emphasize that these parameters represent state, we will refer to them as st: p(F n = f n|ht; st) = exp  s⊤ t φ(f n) −log Z(st) , (1) with both { φ(f n), st } ∈Rl×1. We emphasize that st changes with history, but φ(f n) does not. Maintaining State. In addition to selecting the form of p(F n|ht), there is a dynamical component: given the parameters of p(F n|ht), how can we incorporate a new observation to find the parameters of p(F n|ht, ot+1)? Our strategy is to extend and condition, as we now explain. 2 Extend. We assume that we have the parameters of p(F n|ht), denoted st. We extend the distribution of F n|ht to include Ot+n+1, which forms a new variable F n+1|ht, and we assume it has the distribution p(F n, Ot+n+1|ht) = p(F n+1|ht). This is a temporary distribution with (n + 1)d random variables. In order to add the new variable Ot+n+1, we must add new features which describe Ot+n+1 and its relationship to F n. We capture this with a new feature vector φ+(f n+1) ∈Rk×1, and define the vector s+ t ∈Rk×1 to be the parameters associated with this feature vector. We thus have the following form for the extended distribution: p(F n+1 = f n+1|ht; s+ t ) = exp  s+⊤ t φ+(f n+) −log Z(s+ t ) . To define the dynamics, we define a function which maps the current state vector to the parameters of the extended distribution. We call this the extension function: s+ t = extend(st; θ), where θ is a vector of parameters controlling the extension function (and hence, the overall dynamics). The extension function helps govern the kinds of dynamics that the model can capture. For example, in the PLG family of work, a linear extension allows the model to capture linear dynamics [8], while a non-linear extension allows the model to capture non-linear dynamics [11]. Condition. Once we have extended the distribution to model the n + 1’st observation in the future, we then condition on the actual observation ot+1, which results in the parameters of a distribution over observations from t + 1 through t + n + 1: st+1 = condition(s+ t , ot+1), which are precisely the statistics representing p(F n|ht+1), which is our state at time t + 1. By extending and conditioning, we can maintain state for arbitrarily long periods. Furthermore, for many choices of features and extension function, the overall extend-and-condition operation does not involve any inference, mean that tracking state is computationally efficient. There is only one restriction on the extension function: we must ensure that after extending and conditioning the distribution, the resulting distribution can be expressed as: p(F n = f n|ht+1; st+1) = exp{s⊤ t+1φ(f n) −log Z(st+1)}. This looks like exactly like Eq. 1, which is the point: the feature vector φ did not change between timesteps, which means the form of the distribution does not change. For example, if p(F n|ht) is a Gaussian, then p(F n|ht+1) will also be a Gaussian. 2.3 Representational Capacity The EFPSR model is quite general. It has been shown that a number of popular models can be unified under the umbrella of the general EFPSR: for example, every PSR can be represented as an EFPSR (implying that every POMDP, MDP, and k-th order Markov model can also be represented as an EFPSR); and every linear dynamical system (Kalman filter) and some nonlinear dynamical systems can also be represented by an EFPSR. These different models are obtained with different choices of the features φ and the extension function, and are possible because many popular distributions (such as multinomials and Gaussians) are exponential family distributions [11]. 3 The Linear-Linear EFPSR We now choose specific features and extension function to generate an example model designed to be analytically tractable. We select a linear extension function, and we carefully choose features so that conditioning is always a linear operation. We restrict the model to domains in which the observations are vectors of binary random variables. The result is named the Linear-Linear EFPSR. Features. Recall that the features φ() and φ+() do not depend on time. This is equivalent to saying that the form of the distribution does not vary over time. If the features impose graphical structure on the distribution, it is also equivalent to saying that the form of the graph does not change over time. Because of this, we will now discuss how we can use a graph whose form is independent of time to help define structure on our distributions. We construct the feature vectors φ() and φ+() as follows. Let each Ot ∈{0, 1}d; therefore, each F n|ht ∈{0, 1}nd. Let (F n)i be the i’th random variable in F n|ht. We assume that we have an undirected graph G which we will use to create the features in the vector φ(), and that we have another graph G+ which we will use to define the features in the vector φ+(). Define G = (V, E) where V = {1, ..., nd} are the nodes in the graph (one for each F n|ht i), and (i, j) ∈E are the 3 G G+ G t+2 t+n t+1 t+2 t+n+1 t+n t+1 Observation features t+2 t+n t+n+1 t+1 Extended distribution Conditioned distribution Distribution of next n observations p(F n|ht) p(F n, Ot+n+1|ht) p(F n|ht, ot+1) Figure 1: An illustration of extending and conditioning the distribution. edges. Similarly, we define G+ = (V +, E+) where V + = {1, ..., (n + 1)d} are the nodes in the graph (one for each (F n+1|ht) i), and (i, j) ∈E+ are the edges. Neither graph depends on time. To use the graph to define our distribution, we will let entries in φ be conjunctions of atomic observation variables (like the standard Ising model): for i ∈V , there will be some feature k in the vector such that φ(ft)k = f i t. We also create one feature for each edge: if (i, j) ∈E, then there will be some feature k in the vector such that φ(ft)k = f i tf j t . Similarly, we use G+ to define φ+(). As discussed previously, neither G nor G+ (equivalently, φ and φ+) can be arbitrary. We must ensure that after conditioning G+, we recover G. To accomplish this, we ensure that both temporally shifted copies and conditioned versions of each feature exist in the graphs (seen pictorially in Fig. 1). Because all features are either atomic variables or conjunctions of variables, conditioning the distribution can be done with an operation which is linear in the state (this is true even if the random variables are discrete or real-valued). We therefore define the linear conditioning operator G(ot+1) to be a matrix which transforms s+ t into st+1: st+1 = G(ot+1)s+ t . See [11] for details. Linear extension. In general, the function extend can take any form. We choose a linear extension: s+ t = Ast + B where A ∈Rk×l and B ∈Rk×1 are our model parameters. The combination of a linear extension and a linear conditioning operator can be rolled together into a single operation. Without loss of generality, we can permute the indices in our state vector such that st+1 = G(ot+1) (Ast + B). Note that although this is linear in the state, it is nonlinear in the observation. 4 Model Learning We have defined our concept of state, as well as our method for tracking that state. We now address the question of learning the model from data. There are two things which can be learned in our model: the structure of the graph, and the parameters governing the state update. We briefly address each in the next two subsections. We assume we are given a sequence of T observations, [o1 · · · oT ], which we stack to create a sequence of samples from the F n|ht’s: ft|ht = [ot+1 · · · ot+n|ht]. 4.1 Structure Learning To learn the graph structure, we make the approximation of ignoring the dynamical component of the model. That is, we treat each ft as an observation, and try to estimate the density of the resulting unordered set, ignoring the t subscripts (we appeal to density estimation because many good algorithms have been developed for structure induction). We therefore ignore temporal relationships across samples, but we preserve temporal relationships within samples. For example, if observation a is always followed by observation b, this fact will be captured within the ft’s. The problem therefore becomes one of inducing graphical structure for a non-sequential data set, which is a problem that has already received considerable attention. In all of our experiments, we used the method of Della Pietra et. al [7]. Their method iteratively evaluates a set of candidate features and adds the one with highest expected gain in log-likelihood. To enforce the temporal 4 invariance property, whenever we add a feature, we also add all of the temporally shifted copies of that feature, as well as the conditioned versions of that feature. 4.2 Maximum Likelihood Parameter Estimation With the structure of the graph in place, we are left to learn the parameters A and B of the state extension. It is now useful that our state is defined in terms of observable quantities, for two reasons: first, because everything in our model is observed, EM-style procedures for estimating the parameters of our model are not needed, simply because there are no unobserved variables over which to take expectations. Second, when trying to learn a sequence of states (st’s) given a long trajectory of futures (ft’s), each ft is a sample of information directly from the distribution we’re trying to model. Given a parameter estimate, an initial state s0, and a sequence of observations, the sequence of st’s is completely determined. This will be a key element to our proposed maximum-likelihood learning algorithm. Although the sequence of state vectors st are the parameters defining the distributions p(F n|ht), they are not the model parameters – that is, we cannot freely select them. Instead, the model parameters are the parameters θ which govern the extension function. This is a significant difference from standard maximum entropy models, and stems from the fact that our overall problem is that of modeling a dynamical system, rather than just density estimation. The likelihood of the training data is p(o1, o2...oT ) = QT t=1 p(ot|ht). We will find it more convenient to measure the likelihood of the corresponding ft’s: p(o1, o2...oT ) ≈n QT t=1 p(ft|ht) (the likelihoods are not the same because the likelihood of the ft’s counts a single observation n times; the approximate equality is because the first n and last n are counted fewer than n times). The expected log-likelihood of the training ft’s under the model defined in Eq. 1 is LL = 1 T T X t=1 −s⊤ t φ(ft) −log Z(st) ! (2) Our goal is to maximize this quantity. Any optimization method can be used to maximize the loglikelihood. Two popular choices are gradient ascent and quasi-Newton methods, such as (L-)BFGS. We use both, for different problems (as discussed later). However, both methods require the gradient of the likelihood with respect to the parameters, which we will now compute. Using the chain rule of derivatives, we can compute the derivative with respect to the parameters A: ∂LL ∂A = T X t=1 ∂LL ∂st ⊤∂st ∂A (3) First, we compute the derivative of the log-likelihood with respect to each state: ∂LL ∂st = ∂ ∂st  −s⊤ t φ(ft) −log Z(st)  = Est[φ(F n|ht)] −φ(ft) ≡δt (4) where Est[φ(F n|ht)] ∈Rl×1 is the vector of expected sufficient statistics at time t. Computing this is a standard inference problem in exponential family models, as discussed in Section 5. This gradient tells us that we wish to adjust each state to make the expected features of the next n observations closer to the observed features however, we cannot adjust st directly; instead, we must adjust it implicitly by adjusting the transition parameters A and B. We now compute the gradients of the state with respect to each parameter: ∂st ∂A = ∂ ∂AG(ot+1) (Ast−1 + B) = G(ot+1)  A∂st−1 ∂A + s⊤ t−1 ⊗I  . where ⊗is the Kronecker product, and I is an identity matrix the same size as A. The gradients of the state with respect to B are given by ∂st ∂B = ∂ ∂B G(ot+1) (Ast−1 + B) = G(ot+1)  A∂st−1 ∂B + I  These gradients are temporally recursive – they implicitly depend on gradients from all previous timesteps. It might seem prohibitive to compute them: must an algorithm examine all past t1 · · · tt−1 data points to compute the gradient at time t? Fortunately, the answer is no: the necessary statistics can be computed in a recursive fashion as the algorithm walks through the data. 5 0 10 20 0 10 20 −2.08 −2.07 0 10 20 Iterations of optimization Training LL Testing LL True LL Naive LL 0 10 20 −2 −1.8 −1.6 −1.4 Log−likelihood A B p q 1−p 1−q (a) (b) Figure 2: Results on two-state POMDPs. The right shows the generic model used. By varying the transition and observation probabilities, three different POMDPs were generated. The left shows learning performance on the three models. Likelihoods for naive predictions are shown as a dotted line near the bottom; likelihoods for optimal predictions are shown as a dash-dot line near the top. # of # of # of Naive True Training set Test set Problem states obs. actions LL LL LL % LL % Paint 16 2 4 6.24 4.66 4.67 99.7 4.66 99.9 Network 7 2 4 6.24 4.49 4.50 99.5 4.52 98.0 Tiger 2 2 3 6.24 5.23 5.24 92.4 5.25 86.0 Figure 3: Results on standard POMDPs. See text for explanation. 5 Inference In order to compute the gradients needed for model learning, the expected sufficient statistics E[φ(F n|ht)] at each timestep must be computed (see Eq. 4): E [φ(F n|ht)] = Z φ(ft)p(F n|ht)dft = ∇Z(s). This quantity, also known as the mean parameters, is of central interest in standard exponential families, and has several interesting properties. For example, each possible set of canonical parameters s induces one set of mean parameters; assuming that the features are linearly independent, each set of valid mean parameters is uniquely determined by one set of canonical parameters [9]. Computing these marginals is an inference problem. This is repeated T times (the number of samples) in order to get one gradient, which is then used in an outer optimization loop; because inference must be repeatedly performed in our model, computational efficiency is a more stringent requirement than accuracy. In terms of inference, our model inherits all of the properties of graphical models, for better and for worse. Exact inference in our model is generally intractable, except in the case of fully factorized or tree-structured graphs. However, many approximate algorithms exist: there are variational methods such as naive mean-field, tree-reweighted belief propagation, and log-determinant relaxations [10]; other methods include Bethe-Kikuchi approximations, expectation propagation, (loopy) belief propagation, MCMC methods, and contrastive divergence [1]. 6 Experiments and Results Two sets of experiments were conducted to evaluate the quality of our model and learning algorithm. The first set tested whether the model could capture exact state, given the correct features and exact inference. We evaluated the learned model using exact inference to compute the exact likelihood of the data, and compared to the true likelihood. The second set tested larger models, for which exact inference is not possible. For the second set, bounds can be provided for the likelihoods, but may be so loose as to be uninformative. How can we assess the quality of the final model? One objective gauge is control performance: if the model has a reward signal, reinforcement learning can be used to determine an optimal policy. Evaluating the reward achieved becomes an objective measure of model quality, even though approximate likelihood is the learning signal. 6 1 2 3 4 5 6 0 0.05 0.1 0.15 0.2 Steps of optimization Average Reward EFPSR/VMF EFPSR/LBP EFPSR/LDR POMDP Reactive Random 1 2 3 4 5 6 0 0.05 0.1 0.15 Steps of optimization Average Reward Figure 4: Results on Cheesemaze (left) and Maze 4x3 (right) for different inference methods. First set. We tested on three two-state problems, as well as three small, standard POMDPs. For each problem, training and test sets were generated (using a uniformly random policy for controlled systems). We used 10,000 samples, set n = 3 and used structure learning as explained in Section 4.1. We used exact inference to compute the E[φ(F n|ht)] term needed for the gradients. We optimized the likelihood using BFGS. For each dataset, we computed the log-likelihood of the data under the true model, as well as the log-likelihood of a “naive” model, which assigns uniform probability to every possible observation. We then learned the best model possible, and compared the final log-likelihood under the learned and true models. Figure 2 (a) shows results for three two-state POMDPs with binary observations. The left panel of Fig. 2 (a) shows results for a two-state MDP. The likelihood of the learned model closely approaches the likelihood of the true model (although it does not quite reach it; this is because the model has trouble modeling deterministic observations, because the weights in the exponential need to be infinitely large [or small] to generate a probability of one [or zero]). The middle panel shows results for a moderately noisy POMDP; again, the learned model is almost perfect. The third panel shows results for a very noisy POMDP, in which the naive and true LLs are very close; this indicates that prediction is difficult, even with a perfect model. Figure 3 shows results for three standard POMDPs, named Paint, Network and Tiger1. The table conveys similar information to the graphs: naive and true log-likelihoods, as well as the loglikelihood of the learned models (on both training and test sets). To help interpret the results, we also report a percentage (highlighted in bold), which indicates the amount of the likelihood gap (between the naive and true models) that was captured by the learned model. Higher is better; again we see that the learned models are quite accurate, and generalize well. Second set. We also tested on a two more complicated POMDPs called Cheesemaze and Maze 4x31. For both problems, exact inference is intractable, and so we used approximate inference. We experimented with loopy belief propagation (LBP) [12], naive mean field (or variational mean field, VMF), and log-determinant relaxations (LDR) [10]. Since the VMF and LDR bounds on the loglikelihood were so loose (and LBP provides no bound), it was impossible to assess our model by an appeal to likelihood. Instead, we opted to evaluate the models based on control performance. We used the Natural Actor Critic (or NAC) algorithm [6] to test our model (see [11] for further experiments). The NAC algorithm requires two things: a stochastic, parameterized policy which operates as a function of state, and the gradients of the log probability of that policy. We used a softmax function of a linear projection of the state: the probability of taking action ai from state st given the policy parameters θ is: p(ai; st, θ) = exp  s⊤ t θi / P|A| j=1 exp  s⊤ t θj . The parameters θ are to be determined. For comparison, we also ran the NAC planner with the POMDP belief state: we used the same stochastic policy and the same gradients, but we used the belief state of the true POMDP in place of the EFPSR’s state (st). We also tested NAC with the first-order Markov assumption (or reactive policy) and a totally random policy. Results. Figure 4 shows the results for Cheesemaze. The left panel shows the best control performance obtained (average reward per timestep) as a function of steps of optimization. The “POMDP” line shows the best reward obtained using the true belief state as computed under the true model, the “Random” line shows the reward obtained with a random policy, and the “Reactive” line shows the best reward obtained by using the observation as input to the NAC algorithm. The lines “VMF,” “LBP,” and “LDR” correspond to the different inference methods. 1From Tony Cassandra’s POMDP repository at http://www.cs.brown.edu/research/ai/pomdp/index.html 7 The EFPSR models all start out with performance equivalent to the random policy (average reward of 0.01), and quickly hop to of 0.176. This is close to the average reward of using the true POMDP state at 0.187. The EFPSR policy closes about 94% of the gap between a random policy and the policy obtained with the true model. Surprisingly, only a few iterations of optimization were necessary to generate a usable state representation. Similar results hold for the Maze 4x3 domain, although the improvement over the first order Markov model is not as strong: the EFPSR closes about 77.8% of the gap between a random policy and the optimal policy. We conclude that the EFPSR has learned a model which successfully incorporates information from history into the state representation, and that it is this information which the NAC algorithm uses to obtain better-than-reactive performance. This implies that the model and learning algorithm are useful even with approximate inference methods, and even in cases where we cannot compare to the exact likelihood. 7 Conclusions We have presented the Exponential Family PSR, a new model of controlled, stochastic dynamical systems which provably unifies other models with predictively defined state. We have also discussed a specific member of the EFPSR family, the Linear-Linear EFPSR, and a maximum likelihood learning algorithm. We were able to learn almost perfect models of several small POMDP systems, both from a likelihood perspective and from a control perspective. The biggest drawback is computational: the repeated inference calls make the learning process very slow. Improving the learning algorithm is an important direction for future research. While slow, the learning algorithm generates models which can be accurate in terms of likelihood and useful in terms of control performance. Acknowledgments David Wingate was supported under a National Science Foundation Graduate Research Fellowship. Satinder Singh was supported by NSF grant IIS-0413004. Any opinions, findings, and conclusions or recommendations expressed in this material are those of the authors and do not necessarily reflect the views of the NSF. References [1] G. E. Hinton. Training products of experts by minimizing contrastive divergence. Neural Computation, 14(8):1771–1800, 2002. [2] E. T. Jaynes. Notes on present status and future prospects. In W. Grandy and L. Schick, editors, Maximum Entropy and Bayesian Methods, pages 1–13, 1991. [3] J. Lafferty, A. McCallum, and F. Pereira. Conditional random fields: Probabilistic models for segmenting and labeling sequence data. In International Conference on Machine Learning (ICML), 2001. [4] M. L. Littman, R. S. Sutton, and S. Singh. Predictive representations of state. In Neural Information Processing Systems (NIPS), pages 1555–1561, 2002. [5] A. McCallum, D. Freitag, and F. Pereira. Maximum entropy Markov models for information extraction and segmentation. In International Conference on Machine Learning (ICML), pages 591–598, 2000. [6] J. Peters, S. Vijayakumar, and S. Schaal. Natural actor-critic. In European Conference on Machine Learning (ECML), pages 280–291, 2005. [7] S. D. Pietra, V. D. Pietra, and J. Lafferty. Inducing features of random fields. IEEE Transactions on Pattern Analysis and Machine Intelligence, 19(4):380–393, 1997. [8] M. Rudary, S. Singh, and D. Wingate. Predictive linear-Gaussian models of stochastic dynamical systems. In Uncertainty in Artificial Intelligence (UAI), pages 501–508, 2005. [9] M. J. Wainwright and M. I. Jordan. Graphical models, exponential families, and variational inference. Technical Report 649, UC Berkeley, 2003. [10] M. J. Wainwright and M. I. Jordan. Log-determinant relaxation for approximate inference in discrete Markov random fields. IEEE Transactions on Signal Processing, 54(6):2099–2109, 2006. [11] D. Wingate. Exponential Family Predictive Representations of State. PhD thesis, University of Michigan, 2008. [12] J. S. Yedida, W. T. Freeman, and Y. Weiss. Understanding belief propagation and its generalizations. Technical Report TR-2001-22, Mitsubishi Electric Research Laboratories, 2001. 8
2007
143
3,174
One-Pass Boosting Zafer Barutcuoglu zbarutcu@cs.princeton.edu Philip M. Long plong@google.com Rocco A. Servedio rocco@cs.columbia.edu Abstract This paper studies boosting algorithms that make a single pass over a set of base classifiers. We first analyze a one-pass algorithm in the setting of boosting with diverse base classifiers. Our guarantee is the same as the best proved for any boosting algorithm, but our one-pass algorithm is much faster than previous approaches. We next exhibit a random source of examples for which a “picky” variant of AdaBoost that skips poor base classifiers can outperform the standard AdaBoost algorithm, which uses every base classifier, by an exponential factor. Experiments with Reuters and synthetic data show that one-pass boosting can substantially improve on the accuracy of Naive Bayes, and that picky boosting can sometimes lead to a further improvement in accuracy. 1 Introduction Boosting algorithms use simple “base classifiers” to build more complex, but more accurate, aggregate classifiers. The aggregate classifier typically makes its class predictions using a weighted vote over the predictions made by the base classifiers, which are usually chosen one at a time in rounds. When boosting is applied in practice, the base classifier at each round is usually optimized: typically, each example is assigned a weight that depends on how well it is handled by the previously chosen base classifiers, and the new base classifier is chosen to minimize the weighted training error. But sometimes this is not feasible; there may be a huge number of base classifiers with insufficient apparent structure among them to avoid simply trying all of them out to find out which is best. For example, there may be a base classifier for each word or k-mer. (Note that, due to named entities, the number of “words” in some analyses can far exceed the number of words in any natural language.) In such situations, optimizing at each round may be prohibitively expensive. The analysis of AdaBoost, however, suggests that there could be hope in such cases. Recall that if AdaBoost is run with a sequence of base classifiers b1, . . . , bn that achieve weighted error 1 2 −γ1, . . . , 1 2 −γn, then the training error of AdaBoost’s final output hypothesis is at most exp(−2 Pn t=1 γ2 t ). One could imagine applying AdaBoost without performing optimization: (a) fixing an order b1, ..., bn of the base classifiers without looking at the data, (b) committing to use base classifier bt in round t, and (c) setting the weight with which bt votes as a function of its weighted training error using AdaBoost. (In a one-pass scenario, it seems sensible to use AdaBoost since, as indicated by the above bound, it can capitalize on the advantage over random guessing of every hypothesis.) The resulting algorithm uses essentially the same computational resources as Naive Bayes [2, 7], but benefits from taking some account of the dependence among base classifiers. Thus motivated, in this paper we study the performance of different boosting algorithms in a one-pass setting. Contributions. We begin by providing theoretical support for one-pass boosting using the “diverse base classifiers” framework previously studied in [1, 6]. In this scenario there are n base classifiers. For an unknown subset G of k of the base classifiers, the events that the classifiers in G are correct on a random item are mutually independent. This formalizes the notion that these k base classifiers are not redundant. Each of these k classifiers is assumed to have error 1 2 −γ under the initial distribution, and no assumption is made about the other n −k base classifiers. In [1] it is shown that if Boost-by-Majority is applied with a weak learner that does optimization (i.e. always uses the “best” of the n candidate base classifiers at each of Θ(k) stages of boosting), the error rate of the combined hypothesis with respect to the underlying distribution is (roughly) at most exp(−Ω(γ2k)). In Section 2 we show that a one-pass variant of Boost-by-Majority achieves a similar bound with a single pass through the n base classifiers, reducing the computation time required by an Ω(k) factor. We next show in Section 3 that when running AdaBoost using one pass, it can sometimes be advantageous to abstain from using base classifiers that are too weak. Intuitively, this is because using many weak base classifiers early on can cause the boosting algorithm to reweight the data in a way that obscures the value of a strong base classifier that comes later. (Note that the quadratic dependence on γt in the exponent of the exp(−2 Pn t=1 γ2 t ) means that one good base classifier is more valuable than many poor ones.) In a bit more detail, suppose that base classifiers are considered in the order b1, . . . , bn, where each of b1, . . . , bn−1 has a “small” advantage over random guessing under the initial distribution D and bn has a “large” advantage under D. Using b1, . . . , bn−1 for the first n −1 stages of AdaBoost can cause the distributions D2, D3, . . . to change from the initial D1 in such a way that when bn is finally considered, its advantage under Dn is markedly smaller than its advantage under D0, causing AdaBoost to assign bn a small voting weight. In contrast, a “picky” version of AdaBoost would pass up the opportunity to use b1, . . . , bn−1 (since their advantages are too small) and thus be able to reap the full benefit of using bn under distribution D0 (since when bn is finally considered the distribution D is still D0, since no earlier base classifiers have been used). Finally, Section 4 gives experimental results on Reuters and synthetic data. These show that one-pass boosting can lead to substantial improvement in accuracy over Naive Bayes while using a similar amount of computation, and that picky one-pass boosting can sometimes further improve accuracy. 2 Faster learning with diverse base classifiers We consider the framework of boosting in the presence of diverse base classifiers studied in [1]. Definition 1 (Diverse γ-good) Let D be a distribution over X × {−1, 1}. We say that a set G of classifiers is diverse and γ-good with respect to D if (i) each classifier in G has advantage at least γ (i.e., error at most 1 2 −γ) with respect to D, and (ii) the events that the classifiers in G are correct are mutually independent under D. We will analyze the Picky-One-Pass Boost-by-Majority (POPBM) algorithm, which we define as follows. It uses three parameters, α, T and ϵ. 1. Choose a random ordering b1, ..., bn of the base classifiers in H, and set i1 = 1. 2. For as many rounds t as it ≤min{T, n}: (a) Define Dt as follows: for each example (x, y), i. Let rt(x, y) be the the number of previously chosen base classifiers h1, . . . , ht−1 that are correct on (x, y); ii. Let wt(x, y) = T −t−1 ⌊T 2 ⌋−rt(x,y)  ( 1 2 + α)⌊T 2 ⌋−rt(x,y)( 1 2 −α)⌈T 2 ⌉−t−1+rt(x,y), let Zt = E(x,y)∼D (wt(x, y)), and let Dt(x, y) = wt(x,y)D(x,y) Zt . (b) Compare Zt to ϵ/T , and i. If Zt ≥ϵ/T , then try bit, bit+1, ... until you encounter a hypothesis bj with advantage at least α with respect to Dt (and if you run out of base classifiers before this happens, then go to step 3). Set ht to be bj (i.e. return bj to the boosting algorithm) and set it+1 to j + 1 (i.e. the index of the next base classifier in the list). ii. If Zt < ϵ/T , then set ht to be the constant-1 hypothesis (i.e. return this constant hypothesis to the boosting algorithm) and set it+1 = it. 3. If t < T +1 (i.e. the algorithm ran out of base classifiers before selecting T of them), abort. Otherwise, output the final classifier f(x) = Maj(h1(x), . . . , hT (x)). The idea behind step 2.b.ii is that if Zt is small, then Lemma 4 will show that it doesn’t much matter how good this weak hypothesis is, so we simply use a constant hypothesis. To simplify the exposition, we have assumed that POPBM can exactly determine quantities such as Zt and the accuracies of the weak hypotheses. This would provably be the case if D were concentrated on a moderate number of examples, e.g. uniform over a training set. With slight complications, a similar analysis can be performed when these quantities must be estimated. The following lemma from [1] shows that if the filtered distribution is not too different from the original distribution, then there is a good weak hypothesis relative to the original distribution. Lemma 2 ([1]) Suppose a set G of classifiers of size k is diverse and γ-good with respect to D. For any probability distribution Q such that Q(x, y) ≤γ 3eγ2k/2D(x, y) for all (x, y) ∈X × {−1, 1}, there is a g ∈G such that Pr(x,y)∼Q(g(x) = y) ≥1 2 + γ 4. (1) The following simple extension of Lemma 2 shows that, given a stronger constraint on the filtered distribution, there are many good weak hypotheses available. Lemma 3 Suppose a set G of classifiers of size k is diverse and γ-good with respect to D. Fix any ℓ< k. For any probability distribution Q such that Q(x, y) ≤γ 3 eγ2ℓ/2D(x, y) (2) for all (x, y) ∈X × {−1, 1}, there are at least k −ℓ+ 1 members g of G such that (1) holds. Proof: Fix any distribution Q satisfying (2). Let g1, ..., gℓbe an arbitrary collection of ℓelements of G. Since the {g1, ..., gℓ} and Q satisfy the requirements of Lemma 2 with k set to ℓ, one of g1, . . . , gℓmust satisfy (1); so any set of ℓelements drawn from G contains an element that satisfies (1). This yields the lemma. We will use another lemma, implicit in Freund’s analysis [3], formulated as stated here in [1]. It formalizes two ideas: (a) if the weak learners perform well, then so will the strong learner; and (b) the performance of the weak learner is not important in rounds for which Zt is small. Lemma 4 Suppose that Boost-by-Majority is run with parameters α and T , and generates classifiers h1, ..., hT for which D1(h1(x) = y) = 1 2 + γ1, . . . , DT (hT (x) = y) = 1 2 + γT . Then, for a random element of D, a majority vote over h1, ..., hT is incorrect with probability at most e−2α2T + PT t=1(α −γt)Zt. Now we give our analysis. Theorem 5 Suppose the set H of base classifiers used by POPBM contains a subset G of k elements that is diverse and γ-good with respect to the initial distribution D, where γ is a constant (say 1/4). Then there is a setting of the parameters of POPBM so that, with probability 1 −2−Ω(k), it outputs a classifier with accuracy exp(−Ω(γ2k)) with respect to the original distribution D. Proof: We prove that α = γ/4, T = k/64, and ϵ = 3k 8γ e−γ2k/16 is a setting of parameters as required. We will establish the following claim: Claim 6 For the above parameter settings we have Pr[POPBM aborts in Step 3] = 2−Ω(k). Suppose for now that the claim holds, so that with high probability POPBM outputs a classifier. In case it does, let f be this output. Then since POPBM runs for a full T rounds, we may apply Lemma 4 which bounds the error rate of the Boost-by-Majority final classifier. The lemma gives us that D(f(x) ̸= y) is at most e−2α2T + TP t=1 (α −γt)Zt = e−γ2T/8 + P t:Zt< ϵ T (α −γt)Zt + P t:Zt≥ϵ T (α −γt)Zt ≤ e−Ω(γ2k) + T (ϵ/T ) + 0 = e−Ω(γ2k). (Theorem 5) The final inequality holds since α −γt ≤0 if Zt ≥ϵ/T and α −γt ≤1 if Zt < ϵ/T. Proof of Claim 6: In order for POPBM to abort, it must be the case that as the k base classifiers in G are encountered in sequence as the algorithm proceeds through h1, . . . , hn, more than 63k/64 of them are skipped in Step 2.b.i. We show this occurs with probability at most 2−Ω(k). For each j ∈{1, ..., k}, let Xj be an indicator variable for the event that the jth member of G in the ordering b1, . . . , bn is encountered during the boosting process and skipped, and for each ℓ∈{1, ..., k}, let Sℓ= min{(Pℓ j=1 Xj) −(3/4)ℓ, k/8}. We claim that S1, ..., Sk/8 is a supermartingale, i.e. that E[Sℓ+1|S1, . . . , Sℓ] ≤Sℓfor all ℓ< k/8. If Sℓ= k/8 or if the boosting process has terminated by the ℓth member of G, this is obvious. Suppose that Sℓ< k/8 and that the algorithm has not terminated yet. Let t be the round of boosting in which the ℓth member of G is encountered. The value wt(x, y) can be interpreted as a probability, and so we have that wt(x, y) ≤1. Consequently, we have that Dt(x, y) ≤D(x, y) Zt ≤D(x, y) · T ϵ = D(x, y) · γ 24eγ2k/16 < D(x, y) · γ 3 eγ2k/8. Now Lemma 3 implies that at least half of the classifiers in G have advantage at least α w.r.t. Dt. Since ℓ< k/4, it follows that at least k/4 of the remaining (at most k) classifiers in G that have not yet been seen have advantage at least α w.r.t. Dt. Since the base classifiers were ordered randomly, any order over the remaining hypotheses is equally likely, and so also is any order over the remaining hypotheses from G. Thus, the probability that the next member of G to be encountered has advantage at least α is at least 1/4, so the probability that it is skipped is at most 3/4. This completes the proof that S1, ..., Sk/8 is a supermartingale. Since |Sℓ−Sℓ−1| ≤1, Azuma’s inequality for supermartingales implies that Pr(Sk/8 > k/64) ≤ e−Ω(k). This means that the probability that at least k/64 good elements were not skipped is at least 1 −e−O(k), which completes the proof. 3 For one-pass boosting, PickyAdaBoost can outperform AdaBoost AdaBoost is the most popular boosting algorithm. It is most often applied in conjunction with a weak learner that performs optimization, but it can be used with any weak learner. The analysis of AdaBoost might lead to the hope that it can profitably be applied for one-pass boosting. In this section, we compare AdaBoost and its picky variant on an artificial source especially designed to illustrate why the picky variant may be needed. AdaBoost. We briefly recall some basic facts about AdaBoost (see Figure 1). If we run AdaBoost for T stages with weak hypotheses h1, . . . , hT , it constructs a final hypothesis H(x) = sgn(f(x)) where f(x) = TP t=1 αtht(x) (3) with αt = 1 2 ln 1−ϵt ϵt . Here ϵt = Pr(x,y)∼Dt[ht(x) ̸= y] where Dt is the t-th distribution constructed by the algorithm (the first distribution D1 is just D, the initial distribution). We write γt to denote 1 2 −ϵt, the advantage of the t-th weak hypothesis under distribution Dt. Freund and Schapire [5] proved that if AdaBoost is run with an initial distribution D over a set of labeled examples, then the error rate of the final combined classifier H is at most exp(−2 PT i=1 γ2 t ) under D: Pr(x,y)∼D[H(x) ̸= y] ≤exp  −2 TP i=1 γ2 t  . (4) (We note that AdaBoost is usually described in the case in which D is uniform over a training set, but the algorithm and most of its analyses, including (4), go through in the greater generality presented here. The fact that the definition of αt depends indirectly on an expectation evaluated according to D makes the case in which D is uniform over a sample most directly relevant to practice. However, it is easiest to describe our construction using this more general formulation of AdaBoost.) PickyAdaBoost. Now we define a “picky” version of AdaBoost, which we call PickyAdaBoost. The PickyAdaBoost algorithm is initialized with a parameter γ > 0. Given a value γ, the PickyAdaBoost algorithm works like AdaBoost but with the following difference. Suppose that PickyAdaBoost is performing round t of boosting, the current distribution is some D′, and the current Given a source D of random examples. • Initialize D1 = D. • For each round t from 1 to T : – Present Dt to a weak learner, and receive base classifier ht; – Calculate error ϵt = Pr(x,y)∼Dt[ht(x) ̸= y] and set αt = 1 2 ln 1−ϵt ϵt ; – Update the distribution: Define Dt+1 by setting D′ t+1(x, y) = exp(−αtyht(x))Dt(x, y) and normalizing D′ t+1 to get the probability distribution Dt+1 = D′ t+1/Zt+1; • Return the final classification rule H(x) = sgn (P t αtht(x)) . Figure 1: Pseudo-code for AdaBoost (from [4]). base classifier ht being considered has advantage γ under D′, where |γ| < γ. If this is the case then PickyAdaBoost abstains in that round and does not include ht into the combined hypothesis it is constructing. (Note that consequently the distribution for the next round of boosting will also be D′.) On the other hand, if the current base classifier has advantage γ where |γ| ≥γ, then PickyAdaBoost proceeds to use the weak hypothesis just like AdaBoost, i.e. it adds αtht to the function f described in (3) and adjusts D′ to obtain the next distribution. Note that we only require the magnitude of the advantage to be at least γ. Whether a given base classifier is used, or its negation is used, the effect that it has on the output of AdaBoost is the same (briefly, because ln 1−ϵ ϵ = −ln ϵ 1−ϵ). Consequently, the appropriate notion of a “picky” version of AdaBoost is to require the magnitude of the advantage to be large. 3.1 The construction We consider a sequence of n + 1 base classifiers b1, . . . , bn, bn+1. For simplicity we suppose that the domain X is {−1, 1}n+1 and that the value of the i-th base classifier on an instance x ∈{0, 1}n is simply bi(x) = xi. Now we define the distribution D over X ×{−1, 1}. A draw of (x, y) is obtained from D as follows: the bit y is chosen uniformly from {+1, −1}. Each bit x1, . . . , xn is chosen independently to equal y with probability 1 2 + γ, and the bit xn+1 is chosen to equal y if there exists an i, 1 ≤i ≤n, for which xi = y; if xi = −y for all 1 ≤i ≤n then xn+1 is set to −y. 3.2 Base classifiers in order b1, . . . , bn, bn+1 Throughout Section 3.2 we will only consider parameter settings of γ, γ, n for which γ < γ ≤ 1 2 −( 1 2 −γ)n. Note that the inequality γ < 1 2 −( 1 2 −γ)n is equivalent to ( 1 2 −γ)n < 1 2 −γ, which holds for all n ≥2. PickyAdaBoost. In the case where γ < γ ≤1 2 −( 1 2 −γ)n, it is easy to analyze the error rate of PickyAdaBoost(γ) after one pass through the base classifiers in the order b1, . . . , bn, bn+1. Since each of b1, . . . , bn has advantage exactly γ under D and bn+1 has advantage 1 2 −( 1 2 −γ)n under D, PickyAdaBoost(γ) will abstain in rounds 1, . . . , n and so its final hypothesis is sgn(bn+1(·)), which is the same as bn+1. It is clear that bn+1 is wrong only if each xi ̸= y for i = 1, . . . , n, which occurs with probability ( 1 2 −γ)n. We thus have: Lemma 7 For γ < γ ≤1 2 −( 1 2 −γ)n, PickyAdaBoost(γ) constructs a final hypothesis which has error rate precisely ( 1 2 −γ)n under D. AdaBoost. Now let us analyze the error rate of AdaBoost after one pass through the base classifiers in the order b1, . . . , bn+1. We write Dt to denote the distribution that AdaBoost uses at the t-th stage of boosting (so D = D1). Recall that γt is the advantage of bt under distribution Dt. The following claim is an easy consequence of the fact that given the value of y, the values of the base classifiers b1, . . . , bn are all mutually independent: Claim 8 For each 1 ≤t ≤n we have that γt = γ. It follows that the coefficients α1, . . . , αn of b1, . . . , bn are all equal to 1 2 ln 1/2+γ 1/2−γ = 1 2 ln 1+2γ 1−2γ . The next claim can be straightforwardly proved by induction on t: Claim 9 Let Dr denote the distribution constructed by AdaBoost after processing the base classifiers b1, . . . , br−1 in that order. A draw of (x, y) from Dr is distributed as follows: • The bit y is uniform random from {−1, +1}; • Each bit x1, . . . , xr−1 independently equals y with probability 1 2, and each bit xr, . . . , xn independently equals y with probability 1 2 + γ; • The bit xn+1 is set as described in Section 3.1, i.e. xn+1 = −y if and only if x1 = · · · = xn = −y. Claim 9 immediately gives ϵn+1 = Pr(x,y)∼Dn+1[bn+1(x) ̸= y] = 1/2n. It follows that αn+1 = 1 2 ln 1−ϵn+1 ϵn+1 = 1 2 ln(2n −1). Thus an explicit expression for the final hypothesis of AdaBoost after one pass over the n + 1 classifiers b1, . . . , bn+1 is H(x) = sgn(f(x)), where f(x) = 1 2  ln  1+2γ 1−2γ  (x1 + · · · + xn) + 1 2(ln(2n −1))xn+1. Using the fact that H(x) ̸= y if and only if yf(x) < 0, it is easy to establish the following: Claim 10 The classifier H(x) makes a mistake on (x, y) if and only if more than A of the variables x1, . . . , xn disagree with y, where A = n 2 + ln(2n−1) 2 ln 1+2γ 1−2γ . For (x, y) drawn from source D, we have that each of x1, . . . , xn independently agrees with y with probability 1 2 + γ. Thus we have established the following: Lemma 11 Let B(n, p) denote a binomial random variable with parameters n, p (i.e. a draw from B(n, p) is obtained by summing n i.i.d. 0/1 random variables each of which has expectation p). Then the AdaBoost final hypothesis error rate is Pr[B(n, 1 2 −γ) > A], which equals nP i=⌊A⌋+1 n i  (1/2 −γ)i(1/2 + γ)n−i. (5) In terms of Lemma 11, Lemma 7 states that the PickyAdaBoost(γ) final hypothesis has error Pr[B(n, 1 2 −γ) ≥n]. We thus have that if A < n −1 then AdaBoost’s final hypothesis has greater error than PickyAdaBoost. We now give a few concrete settings for γ, n with which PickyAdaBoost beats AdaBoost. First we observe that even in some simple cases the AdaBoost error rate (5) can be larger than the PickyAdaBoost error rate by a fairly large additive constant. Taking n = 3 and γ = 0.38, we find that the error rate of PickyAdaBoost(γ) is ( 1 2 −0.38)3 = 0.001728, whereas the AdaBoost error rate is ( 1 2 −0.38)3 + 3( 1 2 −0.38)2 · ( 1 2 + 0.38) = 0.03974. Next we observe that there can be a large multiplicative factor difference between the AdaBoost and PickyAdaBoost error rates. We have that Pr[B(n, 1/2 −γ) > A] equals Pn−⌊A⌋−1 i=0 n i  (1/2 − γ)n−i(1/2 + γ)i. This can be lower bounded by Pr[B(n, 1/2 −γ) > A] ≥(1/2 −γ)n n−⌊A⌋−1 P i=0 n i  ; (6) this bound is rough but good enough for our purposes. Viewing n as an asymptotic parameter and γ as a fixed constant, we have (6) ≥(1/2 −γ)n αn P i=0 n i  (7) where α = 1 2 − ln 2 2 ln 1+2γ 1−2γ −o(1). Using the bound Pαn i=0 n i  = 2n·(H(α)±o(1)), which holds for 0 < α < 1 2, we see that any setting of γ such that α is bounded above zero by a constant gives an exponential gap between the error rate of PickyAdaBoost (which is (1/2−γ)n) and the lower bound on AdaBoost’s error provided by (7). As it happens any γ ≥0.17 yields α > 0.01. We thus have Claim 12 For any fixed γ ∈(0.17, 0.5) and any γ < γ, the final error rate of AdaBoost on the source D is 2Ω(n) times that of PickyAdaBoost(γ). 3.3 Base classifiers in an arbitrary ordering The above results show that PickyAdaBoost can outperform AdaBoost if the base classifiers are considered in the particular order b1, . . . , bn+1. A more involved analysis (omitted because of space constraints) establishes a similar difference when the base classifiers are chosen in a random order: Proposition 13 Suppose that 0.3 < γ < γ < 0.5 and 0 < c < 1 are fixed constants independent of n that satisfy Z(γ) < c, where Z(γ) def = ln 4 (1−2γ)2 ln 1+2γ (1−2γ)3 . Suppose the base classifiers are listed in an order such that bn+1 occurs at position c·n. Then the error rate of AdaBoost at least 2n(1−c) −1 = 2Ω(n) times greater than the error of PickyAdaBoost(γ). For the case of randomly ordered base classifiers, we may view c as a real value that is uniformly distributed in [0, 1], and for any fixed constant 0.3 < γ < 0.5 there is a constant probability (at least 1 −Z(γ)) that AdaBoost has error rate 2Ω(n) times larger than PickyAdaBoost(γ). This probability can be fairly large, e.g. for γ = 0.45 it is greater than 1/5. 4 Experiments We used Reuters data and synthetic data to examine the behavior of three algorithms: (i) Naive Bayes; (ii) one-pass Adaboost; and (iii) PickyAdaBoost. The Reuters data was downloaded from www.daviddlewis.com. We used the ModApte splits into training and test sets. We only used the text of each article, and the text was converted into lower case before analysis. We compared the boosting algorithms with multinomial Naive Bayes [7]. We used boosting with confidence-rated base classifiers [8], with a base classifier for each stem of length at most 5; analogously to the multinomial Naive Bayes, the confidence of a base classifier was taken to be the number of times its stem appeared in the text. (Schapire and Singer [8, Section 3.2] suggested, when the confidence of base classifiers cannot be bounded a priori, to choose each voting weight αt in order to maximize the reduction in potential. We did this, using Newton’s method to do this optimization.) We averaged over 10 random permutations of the features. The results are compiled in Table 1. The one-pass boosting algorithms usually improve on the accuracy of Naive Bayes, while retaining similar simplicity and computational efficiency. PickyAdaBoost appears to usually improve somewhat on AdaBoost. Using a t-test at level 0.01, the W-L-T for PickyAdaBoost(0.1) against multinomial Naive Bayes is 5-1-4. We also experimented with synthetic data generated according to a distribution D defined as follows: to draw (x, y), begin by picking y ∈{−1, +1} uniformly at random. For each of the k features x1, . . . , xk in the diverse γ-good set G, set xi equal to y with probability 1/2 + γ (independently for each i). The remaining n −k variables are influenced by a hidden variable z which is set independently to be equal to y with probability 4/5. The features xk+1, . . . , xn are each set to be independently equal to z with probability p. So each such xj (j ≥k + 1) agrees with y with probability (4/5) · p + (1/5) · (1 −p). There were 10000 training examples and 10000 test examples. We tried n = 1000 and n = 10000. Results when n = 10000 are summarized in Table 2. The boosting algorithms predictably perform better than Naive Bayes, because Naive Bayes assigns too much weight to the correlated features. The picky boosting algorithm further ameliorates the effect of this correlation. Results for n = 1000 are omitted due to space constraints: these are qualitatively similar, with all algorithms performing better, and the differences between algorithms shrinking somewhat. Error rates Feature counts Data NB OPAB PickyAdaBoost NB OPAB PickyAdaBoost 0.001 0.01 0.1 0.001 0.01 0.1 earn 0.042 0.023 0.020 0.018 0.027 19288 19288 2871 542 52 acq 0.036 0.094 0.065 0.071 0.153 19288 19288 3041 508 41 money-fx 0.043 0.042 0.041 0.041 0.048 19288 19288 2288 576 62 crude 0.026 0.031 0.027 0.026 0.040 19288 19288 2865 697 58 grain 0.038 0.021 0.023 0.019 0.018 19288 19288 2622 650 64 trade 0.068 0.028 0.028 0.026 0.029 19288 19288 2579 641 61 interest 0.026 0.032 0.029 0.032 0.035 19288 19288 2002 501 58 wheat 0.022 0.014 0.013 0.013 0.017 19288 19288 2294 632 61 ship 0.013 0.018 0.018 0.017 0.016 19288 19288 2557 804 67 corn 0.027 0.014 0.014 0.014 0.013 19288 19288 2343 640 67 Table 1: Experimental results. On the left are error rates on the 3299 test examples for Reuters data sets. On the right are counts of the number of features used in the models. NB is the multinomial Naive Bayes, and OPAB is one-pass AdaBoost. Results are shown for three PickyAdaBoost thresholds: 0.001, 0.01 and 0.1. k p γ NB OPAB PickyAdaBoost 0.07 0.1 0.16 20 0.85 0.24 0.2 0.11 0.04 0.04 0.03 20 0.9 0.24 0.2 0.09 0.03 0.03 0.03 20 0.95 0.24 0.21 0.06 0.02 0.02 0.02 50 0.7 0.15 0.2 0.13 0.06 0.04 0.09 50 0.75 0.15 0.2 0.12 0.05 0.04 0.03 50 0.8 0.15 0.21 0.11 0.04 0.03 0.03 100 0.63 0.11 0.2 0.14 0.07 0.05 100 0.68 0.11 0.2 0.13 0.06 0.05 100 0.73 0.11 0.2 0.1 0.05 0.04 Table 2: Test-set error rate for synthetic data. Each value is an average over 100 independent runs (random permutations of features). Where a result is omitted, the corresponding picky algorithm did not pick any base classifiers. References [1] S. Dasgupta and P. M. Long. Boosting with diverse base classifiers. COLT, 2003. [2] R. O. Duda and P. E. Hart. Pattern Classification and Scene Analysis. Wiley, 1973. [3] Y. Freund. Boosting a weak learning algorithm by majority. Inf. and Comput., 121(2):256–285, 1995. [4] Y. Freund and R. Schapire. Experiments with a new boosting algorithm. In ICML, pages 148– 156, 1996. [5] Y. Freund and R. E. Schapire. A decision-theoretic generalization of on-line learning and an application to boosting. JCSS, 55(1):119–139, 1997. [6] N. Littlestone. Redundant noisy attributes, attribute errors, and linear-threshold learning using Winnow. In COLT, pages 147–156, 1991. [7] A. Mccallum and K. Nigam. A comparison of event models for naive bayes text classification. In AAAI-98 Workshop on Learning for Text Categorization, 1998. [8] R. Schapire and Y. Singer. Improved boosting algorithms using confidence-rated predictions. Machine Learning, 37:297–336, 1999.
2007
144
3,175
The Value of Labeled and Unlabeled Examples when the Model is Imperfect Kaushik Sinha Dept. of Computer Science and Engineering Ohio State University Columbus, OH 43210 sinhak@cse.ohio-state.edu Mikahil Belkin Dept. of Computer Science and Engineering Ohio State University Columbus, OH 43210 mbelkin@cse.ohio-state.edu Abstract Semi-supervised learning, i.e. learning from both labeled and unlabeled data has received significant attention in the machine learning literature in recent years. Still our understanding of the theoretical foundations of the usefulness of unlabeled data remains somewhat limited. The simplest and the best understood situation is when the data is described by an identifiable mixture model, and where each class comes from a pure component. This natural setup and its implications ware analyzed in [11, 5]. One important result was that in certain regimes, labeled data becomes exponentially more valuable than unlabeled data. However, in most realistic situations, one would not expect that the data comes from a parametric mixture distribution with identifiable components. There have been recent efforts to analyze the non-parametric situation, for example, “cluster” and “manifold” assumptions have been suggested as a basis for analysis. Still, a satisfactory and fairly complete theoretical understanding of the nonparametric problem, similar to that in [11, 5] has not yet been developed. In this paper we investigate an intermediate situation, when the data comes from a probability distribution, which can be modeled, but not perfectly, by an identifiable mixture distribution. This seems applicable to many situation, when, for example, a mixture of Gaussians is used to model the data. the contribution of this paper is an analysis of the role of labeled and unlabeled data depending on the amount of imperfection in the model. 1 Introduction In recent years semi-supervised learning, i.e. learning from labeled and unlabeled data, has drawn significant attention. The ubiquity and easy availability of unlabeled data together with the increased computational power of modern computers, make the paradigm attractive in various applications, while connections to natural learning make it also conceptually intriguing. See [15] for a survey on semi-supervised learning. From the theoretical point of view, semi-supervised learning is simple to describe. Suppose the data is sampled from the joint distribution p(x, y), where x is a feature and y is the label. The unlabeled data comes from the marginal distribution p(x). Thus the the usefulness of unlabeled data is tied to how much information about joint distribution can be extracted from the marginal distribution. Therefore, in order to make unlabeled data useful, an assumption on the connection between these distributions needs to be made. 1 In the non-parametric setting several such assumptions have been recently proposed, including the the cluster assumption and its refinement, the low-density separation assumption [7, 6], and the manifold assumption [3]. These assumptions relate the shape of the marginal probability distribution to class labels. The low-density separation assumption states that the class boundary passes through the low density regions, while the manifold assumption proposes that the proximity of the points should be measured along the data manifold. However, while these assumptions has motivated several algorithms and have been shown to hold empirically, few theoretical results on the value of unlabeled data in the non-parametric setting are available so far. We note the work of Balcan and Blum ([2]), which attempts to unify several frameworks by introducing a notion of compatibility between labeled and unlabeled data. In a slightly different setting some theoretical results are also available for co-training ([4, 8]). Far more complete results are available in the parametric setting. There one assumes that the distribution p(x, y) is a mixture of two parametric distribution p1 and p2, each corresponding to a different class. Such mixture is called identifiable, if parameters of each component can be uniquely determined from the marginal distribution p(x). The study of usefulness of unlabeled data under this assumption was undertaken by Castelli and Cover ([5]) and Ratsaby and Venkatesh ([11]). Among several important conclusions from their study was the fact under a certain range of conditions, labeled data is exponentially more important for approximating the Bayes optimal classifier than unlabeled data. Roughly speaking, unlabeled data may be used to identify the parameters of each mixture component, after which the class attribution can be established exponentially fast using only few labeled examples. While explicit mixture modeling is of great theoretical and practical importance, in many applications there is no reason to believe that the model provides a precise description of the phenomenon. Often it is more reasonable to think that our models provide a rough approximation to the underlying probability distribution, but do not necessarily represent it exactly. In this paper we investigate the limits of usefulness of unlabeled data as a function of how far the best fitting model strays from the underlying probability distribution. The rest of the paper is structured as follows: we start with an overview of the results available for identifiable mixture models together with some extensions of these results. We then describe how the relative value of labeled and unlabeled data changes when the true distribution is a perturbation of a parametric model. Finally we discuss various regimes of usability for labeled and unlabeled data and represent our findings in Fig 1. 2 Relative Value of Labeled and Unlabeled Examples Our analysis is conducted in the standard classification framework and studies the behavior Perror − PBayes, where Perror is probability of misclassification for a given classifier and PBayes is the classification error of the optimal classifier. The quantity Perror −PBayes is often referred to as the excess probability of error and expresses how far our classifier is from the best possible. In what follows, we review some theoretical results that describe behavior of the excess error probability as a function of the number of labeled and unlabeled examples. We will denote number of labeled examples by l and the number of unlabeled examples by u. We omit certain minor technical details to simplify the exposition. The classifier, for which Perror is computed is based on the underlying model. Theorem 2.1. (Ratsaby and Venkatesh [11]) In a two class identifiable mixture model, let the equiprobable class densities p1(x), p2(x) be d-dimensional Gaussians with unit covariance matrices. Then for sufficiently small ϵ > 0 and arbitrary δ > 0, given l = O log δ−1 labeled and u = O  d2 ϵ3δ(d log ϵ−1 + log δ−1)  unlabeled examples respectively, with confidence at least 1 −δ, probability of error Perror ≤PBayes(1 + cϵ) for some positive constant c. Since the mixture is identifiable, parameters can be estimated from unlabeled examples alone. Labeled examples are not required for this purpose. Therefore, unlabeled examples are used to estimate the mixture and hence the two decision regions. Once the decision regions are established, labeled examples are used to label them. An equivalent form of the above result in terms of labeled and unlabeled examples is Perror −PBayes = O d u1/3  + O (exp(−l)). For a fixed dimension d, this 2 indicates that labeled examples are exponentially more valuable than the unlabeled examples in reducing the excess probability of error, however, when d is not fixed, higher dimensions slower these rates. Independently, Cover and Castelli provided similar results in a different setting under Bayesian framework. Theorem 2.2. (Cover and Castelli [5]) In a two class mixture model, let p1(x), p2(x) be the parametric class densities and let h(η) be the prior over the unknown mixing parameter η. Then Perror −PBayes = O  1 u  + exp{−Dl + o(l)} where D = −log{2 p η(1 −η) R p p1(x)p2(x)dx} In their framework, Cover and Castelli [5] assumed that parameters of individual class densities are known, however the associated class labels and mixing parameter are unknown. Under such assumption their result shows that the above rate is obtained when l3+ϵu−1 →0 as l + u →∞. In particular this implies that, if ue−Dl →0 and l = o(u) the excess error is essentially determined by the number of unlabeled examples. On the other hand if u grows faster than eDl, then excess error is determined by the number of labeled examples. For detailed explanation of the above statements see pp-2103 [5]. The effect of dimensionality is not captured in their result. Both results indicate that if the parametric model assumptions are satisfied, labeled examples are exponentially more valuable than unlabeled examples in reducing the excess probability of error. In this paper we investigate the situation when the parametric model assumptions are only satisfied to a certain degree of precision, which seems to be a natural premise in a variety of practical settings. It is interesting to note that uncertainty can appear for different reasons. One source of uncertainty is a lack of examples, which we call Type-A. Imperfection of the model is another source of uncertainty, which we will refer to as Type-B. • Type-A uncertainty for perfect model with imperfect information: Individual class densities follow the assumed parametric model. Uncertainty results from finiteness of examples. Perturbation size specifies how well parameters of the individual class densities can be estimated from finite data. • Type-B uncertainty for imperfect model: Individual class densities does not follow the assumed parametric model. Perturbation size specifies how well the best fitting model can approximate the underlying density. Before proceeding further, we describe our model and notations. We take the instance space X ⊂Rd with labels {−1, 1}. True class densities are always represented by p1(x) and p2(x) respectively. In case of Type-A uncertainty they are simply p1(x|θ1) and p2(x|θ2). In case of Type-B uncertainty p1(x), p2(x) are perturbations of two d-dimensional densities from a parametric family F. We will denote the mixing parameter by t and the individual parametric class densities by f1(x|θ1), f2(x|θ2) respectively and the resulting mixture density as tf1(x|θ1) + (1 −t)f2(x|θ2). We will show some specific results when F consists of spherical Gaussian distributions with unit covariance matrix and t = 1 2. In such a case θ1, θ2 ∈Rd represent the means of the corresponding densities and the mixture density is indexed by a 2d dimensional vector θ = [θ1, θ2]. The class of such mixtures is identifiable and hence using unlabeled examples alone, θ can be estimated by ˆθ ∈R2d. By || · || we represent the standard Euclidean norm in Rd and by || · || d 2 ,2 the Sobolev norm. Note that for some ϵ > 0, || · || d 2 ,2 < ϵ implies || · ||1 < ϵ and || · ||∞< ϵ. We will frequently use the following term L(a, t, e) = log( a δ ) (t−Ae)(1−2√ (PBayes+Be)(1−PBayes−Be)) to represent the optimal number of labeled examples for correctly classifying estimated decision regions with high probability (as will be clear in the next section) where, t represents mixing parameter, e represents perturbation size and a is an integer variable and A, B are constants. 3 2.1 Type-A Uncertainty : Perfect Model Imperfect Information Due to finiteness of unlabeled examples, density parameters can not be estimated arbitrarily close to the true parameters in terms of Euclidean norm. Clearly, how close they can be estimated depends on the number of unlabeled examples used u, dimension d and confidence probability δ. Thus, Type-I uncertainty inherently gives rise to a perturbation size defined by ϵ1(u, d, δ) such that, a fixed u defines a perturbation size ϵ1(d, δ). Because of this perturbation, estimated decision regions differ from the true decision regions. From [11] it is clear that only very few labeled examples are good enough to label these two estimated decision regions reasonably well with high probability. Let such a number of labeled examples be l∗. But what happens if the number of labeled examples available is greater than l∗? Since the individual densities follow the parametric model exactly, these extra labeled examples can be used to estimate the density parameters and hence the decision regions. However, using a simple union bound it can be shown ([10]) that the asymptotic rate for convergence of such estimation procedure is O q d l log( d δ )  . Thus, provided we have u unlabeled examples if we want to represent the rate at which excess probability of error reduces as a function of the number of labeled examples, it is clear that initially the error reduces exponentially fast in number of labeled examples (following [11]) but then it reduces only at a rate O q d l log( d δ )  . Provided we use the following strategy, this extends the result of [11] as given in the Theorem below. We adopt the following strategy to utilize labeled and unlabeled examples in order to learn a classification rule. Strategy 1: 1. Given u unlabeled examples, and confidence probability δ > 0 use maximum likelihood estimation method to learn the parameters of the mixture model such that the estimates ˆθ1, ˆθ2 are only ϵ1(u, d, δ) = O∗d u1/3  close to the actual parameters with probability at least 1 −δ 4. 2. Use l∗labeled examples to label the estimated decision regions with probability of incorrect labeling no greater than δ 4. 3. If l > l∗examples are available use them to estimate the individual density parameters with probability at least 1 −δ 2. Theorem 2.3. Let the model be a mixture of two equiprobable d dimensional spherical Gaussians p1(x|θ1), p2(x|θ2) having unit covariance matrices and means θ1, θ2 ∈Rd. For any arbitrary 1 > δ > 0, if strategy 1 is used with u unlabeled examples then there exists a perturbation size ϵ1(u, d, δ) > 0 and positive constants A, B such that using l ≤l∗= L(24, 0.5, ϵ1) labeled examples, Perror −PBayes reduces exponentially fast in the number of labeled examples with probability at least (1 −δ 2). If more labeled examples l > l∗are provided then with probability at least (1 −δ 2), Perror −PBayes asymptotically converges to zero at a rate O q d l log( d δ )  as l →∞. If we represent the reduction rate of this excess error(Perror −PBayes) as a function of labeled examples Ree(l), then this can be compactly represented as, Ree(l) =    O (exp(−l)) if l ≤l∗ O q d l log( d δ )  if l > l∗ After using l∗labeled examples Perror = PBayes + O(ϵ1). 2.2 Type-B Uncertainty: Imperfect Model In this section we address the main question raised in this paper. Here the individual class densities do not follow the assumed parametric model exactly but are a perturbed version of the assumed model. The uncertainty in this case is specified by the perturbation size ϵ2 which roughly indicates by what extent the true class densities differ form that of the best fitting parametric model densities. 4 For any mixing parameter t ∈(0, 1) let us consider a two class mixture model with individual class densities p1(x), p2(x) respectively. Suppose the best knowledge available about this mixture model is that individual class densities approximately follow some parametric form from a class F. We assume that best approximations of p1, p2 within F are f1(x|θ1), f2(x|θ2) respectively, such that for i ∈{1, 2}, (fi −pi) are in Sobolev class H d 2 and there exists a perturbation size ϵ2 > 0 such that ||p1 −f1|| d 2 ,2 ≤ϵ2 and ||p2 −f2|| d 2 ,2 ≤ϵ2. Here, the Sobolev norm is used as a smoothness condition and implies that true densities are smooth and not “too different” from the best fitting parametric model densities and in particular, if ||fi −pi|| d 2 ,2 ≤ϵ2 then ||fi −pi||1 ≤ϵ2 and ||fi −pi||∞≤ϵ2. We first show that due to the presence of this perturbation size, even complete knowledge of the best fitting model parameters does not help in learning optimal classification rule in the following sense. In the absence of any perturbation, complete knowledge of model parameters implies that the decision boundary and hence two decision regions are explicitly known but not their labels. Thus, using only a very small number of labeled examples Perror reduces exponentially fast in the number of labeled examples to PBayes as number of labeled examples increases. However, due to the presence of perturbation size, Perror reduces exponentially fast in number of labeled examples only up to PBayes +O(ϵ2). Since beyond this, parametric model assumptions do not hold due to the presence of perturbation size, some non parametric technique must be used to estimate the actual decision boundary. For any such nonparametric technique Perror now reduces at a much slower rate. This trend is roughly what the following theorem says. Here f1, f2 are general parametric densities not necessarily Gaussians. In what follows we assume that p1, p2 ∈C∞and hence convergence rate for non parametric classification (see [14]) is O  1 √ l  . Slower rate results if infinite differentiability condition is not satisfied. Theorem 2.4. In a two class mixture model with individual class densities p1(x), p2(x) and mixing parameter t ∈(0, 1), let the mixture density of best fitting parametric model be tf1(x|θ1) + (1 − t)f2(x|θ2) where f1, f2 belongs to some parametric class F and true densities p1, p2 are perturbed version of f1, f2. For a perturbation size ϵ2 > 0, if ||f1 −p1|| d 2 ,2 ≤ϵ2, ||f2 −p2|| d 2 ,2 ≤ϵ2 and θ1, θ2 are known then for any 0 < δ < 1, there exists positive constants A, B such that for l ≤l∗= L(6, t, ϵ2) labeled example, Perror −PBayes reduces exponentially fast in the number of labeled examples with probability at least (1 −δ). If more labeled examples l > l∗are provided Perror −PBayes asymptotically converges to zero at a rate O  1 √ l  as l →∞. After using l∗labeled examples Perror = PBayes + O (ϵ2). Thus, from the above theorem it can be thought that as labeled examples are added, initially the excess error reduces at a very fast rate (exponentially in the number of labeled examples) until Perror −PBayes = O (ϵ2). After that the excess error reduces only polynomially fast in the number of labeled examples. In proving of the above theorem we used first order Taylor series approximation to get an crude upper bound for decision boundary movement. However, in case of a specific class of parametric densities such a crude approximation may not be necessary. In particular, as we show next, if the best fitting model is a mixture of spherical Gaussians where the boundary is linear hyperplane, explicit upper bound of boundary movement can be found. In the following, we assume the class F to be a class of d dimensional spherical Gaussians with identity covariance matrix. However, the true model is an equiprobable mixture of perturbed versions of these individual class densities. As before, given u unlabeled examples and l labeled examples we want a strategy to learn a classification rule and analyze the effect of these examples and also of perturbation size ϵ2 in reducing excess probability of error. One option to achieve this task is to use the unlabeled examples to estimate the true mixture density 1 2p1 + 1 2p2, however number of unlabeled examples required to estimate mixture density using non parametric kernel density estimation is exponential to the number of dimensions [10]. Thus, for high dimensional data this is not an attractive option and also such an estimate does not provide any clue as to where the decision boundary is. A better option will be to use the unlabeled examples to estimate the best fitting Gaussians within F. Number of unlabeled examples needed to estimate such a mixture of Gaussians is only polynomial in the number of dimensions [10] and it is easy to show that the distance between the Bayesian decision function and the decision function due to Gaussian approximation is at most ϵ2 away in ||.|| d 2 ,2 norm sense. 5 Now suppose we use the following strategy to use labeled and unlabeled examples. Strategy 2: 1. Assume the examples are distributed according to a mixture of equiprobable Gaussians with unit covariance matrices and apply maximum likelihood estimation method to find the best Gaussian approximation of the densities. 2. Use small number of labeled examples l∗to label the two approximate decision regions correctly with high probability. 3. If more (l > l∗) labeled examples are available, use them to learn a better decision function using some nonparametric technique. Theorem 2.5. In a two class mixture model with equiprobable class densities p1(x), p2(x), let the mixture density of the best fitting parametric model be 1 2f1(x|θ1) + 1 2f2(x|θ2) where f1, f2 are d dimensional spherical Gaussians with means θ1, θ2 ∈Rd and p1, p2 are perturbed version of f1, f2, such that for a perturbation size ϵ2 > 0, ||f1 −p1|| d 2 ,2 ≤ϵ2, ||f2 −p2|| d 2 ,2 ≤ϵ2. For any ϵ > 0 and 0 < δ < 1, there exists positive constants A, B such that if strategy 2 is used with u = O  d2 ϵ3δ(d log 1 ϵ + log 1 δ )  unlabeled and l∗= L (0.5, 12, (ϵ + ϵ2)) labeled examples then for l ≤l∗, Perror −PBayes reduces exponentially fast in the number of labeled examples with probability at least (1 −δ). If more labeled examples l > l∗are provided, Perror −PBayes asymptotically converges to zero at most at a rate O  1 √ l  as l →∞. If we represent the reduction rate of this excess error (Perror −PBayes) as a function of labeled examples as Ree(l), then this can compactly represented as, Ree(l) = ( O (exp(−l)) if l ≤l∗ O  1 √ l  if l > l∗ After using l∗labeled examples, Perror = PBayes + O(ϵ + ϵ2). Note that when number of unlabeled examples is infinite, parameters of the best fitting model can be estimated arbitrarily well, i.e., ϵ →0 and hence Perror −PBayes reduces exponentially fast in the number of labeled examples until Perror −PBayes = O(ϵ2). On the other hand if ϵ = O(ϵ2), Perror −PBayes still reduces exponentially fast in the number of labeled examples until Perror −PBayes = O(ϵ2). This implies that O(ϵ2) close estimate of parameters of the best fitting model is “good” enough. A more precise estimate of parameters of the best fitting model using more unlabeled examples does not help reducing Perror −PBayes at the same exponential rate beyond Perror −PBayes = O(ϵ2). The following Corollary states this important fact. Corollary 2.6. For a perturbation size ϵ2 > 0, let the best fitting model for a mixture of equiprobable densities be a mixture of equiprobable d dimensional spherical Gaussians with unit covariance matrices. If using u∗= O  d2 ϵ3 2δ(d log 1 ϵ2 + log 1 δ )  unlabeled examples parameters of the best fitting model can be estimated O(ϵ2) close in Euclidean norm sense, then any additional unlabeled examples u > u∗does not help in reducing the excess error. 3 Discussion on different rates of convergence In this section we discuss the effect of perturbation size ϵ2 on the behavior of Perror −PBayes and its effect on controlling the value of labeled and unlabeled examples. Different combinations of number of labeled and unlabeled examples give rise to four different regions where Perror −PBayes behaves differently as shown in Figure 1 where the x axis corresponds to the number of unlabeled examples and the y axis corresponds to the number of labeled examples. Let u∗be the number of unlabeled examples required to estimate the parameters of the best fitting model O(ϵ2) close in Euclidean norm sense. Using O∗notation to hide the log factors, according to Theorem 2.5, u∗= O∗ d3 ϵ3 2  . When u > u∗, unlabeled examples have no role to play in reducing Perror −PBayes as shown in region II and part of III in Figure 1. For u ≤u∗, unlabeled examples becomes useful only in region I and IV. When u∗unlabeled examples are available to estimate the parameters of the best fitting model O(ϵ2) close, let the number of labeled examples required to 6 label the estimated decision regions so that Perror −PBayes = O(ϵ2) be l∗. The figure is just for graphical representation of different regions where Perror −PBayes reduces at different rates. u u∗= O∗ d3 ϵ3 2  II : O(exp(−l)) I : O(exp(−l)) + O∗d u1/3  Non-parametric methods l∗ 1 l∗ l IV : O  1 √ l  III :  O∗“√ d l ” +O∗“ d u1/3 ” 2  Figure 1: The Big Picture. Behavior of Perror −PBayes for different labeled and unlabeled examples 3.1 Behavior of Perror −PBayes in Region-I In this region u ≤u∗unlabeled examples estimate the decision regions and l∗ u labeled examples, which depends on u, are required to correctly label these estimated regions. Perror−PBayes reduces at a rate O (exp(−l)) + O  d u 1 3  for u < u∗and l < l∗ u. This rate can be interpreted as the rate at which unlabeled examples estimate the parameters of the best fitting model and rate at which labeled examples correctly label these estimated decision regions. However, for small u estimation of the decision regions will be bad and and corresponding l∗ u > l∗. Instead of using these large number labeled examples to label poorly estimated decision regions, they can instead be used to estimate the parameters of the best fitting model and as will be seen next, this is precisely what happens in region III. Thus in region I, l is restricted to l < l∗and Perror −PBayes reduces at a rate exp (−O(l)) + O  d u 1 3  . 3.2 Behavior of Perror −PBayes in Region-II In this section l ≤l∗and u > u∗. As shown in Corollary 2.6, using u∗unlabeled examples parameters of the best fitting model can be estimated O(ϵ2) close in Euclidean norm sense and more precise estimate of the best fitting model parameters using more unlabeled examples u > u∗does not help reducing Perror −PBayes. Thus, unlabeled examples have no role to play in this region and for small number of labeled examples l ≤l∗, Perror −PBayes reduces at a rate O (exp(−l)). 3.3 Behavior of Perror −PBayes in Region-III In this region u ≤u∗and hence model parameters have not been estimated O(ϵ2) close to the parameters of the best fitting model. Thus, in some sense model assumptions are still valid and there is a scope for better estimation of the parameters. Number of labeled examples available in this region is greater than what is required for mere labeling the estimated decision regions using u unlabeled examples and hence these excess labeled examples can be used to estimate the model parameters. Note that once the parameters have been estimated O(ϵ2) close to the parameters of the best fitting model using labeled examples, parametric model assumptions are no longer valid. If l∗ 1 is the number of such labeled examples, then in this region l∗< l ≤l∗ 1. Also note that depending on number of unlabeled examples u ≤u∗, l∗, and l∗ 1 are not fixed numbers but will depend on u. In presence of labeled examples alone, using Theorem 2.3, Perror −PBayes reduces at a rate O∗ q d l  . Since parameters are being estimated both using labeled and unlabeled examples, the 7 effective rate at which Perror −PBayes reduces at this region can be thought of as the mean of the two. 3.4 Behavior of Perror −PBayes in Region-IV In this region when u > u∗, l > l∗and when u ≤u∗, l > l∗ 1. In either case, since the parameters of the best fitting model have been estimated O(ϵ2) close to the parameters of the best fitting model, parametric model assumptions are also no longer valid and excess labeled examples must be used in nonparametric way. For nonparametric classification technique either one of the two basic families of classifiers, plug-in classifiers or empirical risk minimization (ERM) classifiers can be used [13, 9]. A nice discussion on the rate and fast rate of convergence of both these types of classifiers can be found in [1, 12]. The general convergence rate i.e. the rate at which expected value of (Perror −PBayes) reduces is of the order O(l−β) as l →∞where β > 0 is some exponent and is typically β ≤0.5. Also it was shown in [14] that under general conditions this bound can not be improved in a minimax sense. In particular it was shown that if the true densities belong to C∞class then this rate is O( 1 √ l). However, if infinite differentiability condition is not satisfied then this rate is much slower. Acknowledgements This work was supported by NSF Grant No 0643916. References [1] J. Y. Audibert and A. Tsybakov. Fast convergence rate for plug-in estimators under margin conditions. In Unpublished manuscript, 2005. [2] M-F. Balcan and A. Blum. A PAC-style model for learning from labeled and unlabeled data. In 18th Annual Conference on Learning Theory, 2005. [3] M. Belkin and P. Niyogi. Semi-supervised learning on Riemannian manifolds. Machine Learning, 56, Invited, Special Issue on Clustering:209–239, 2004. [4] A. Blum and T. Mitchell. Combining labeled and unlabeled data with co-training. In 11th Annual Conference on Learning Theory, 1998. [5] V. Castelli and T. M. Cover. The relative values of labeled and unlabeld samples in pattern recognition with an unknown mixing parameters. IEEE Trans. Information Theory, 42((6):2102–2117, 1996. [6] O. Chapelle, J. Weston, and B. Scholkopf. Cluster kernels for semi-supervised learning. NIPS, 15, 2002. [7] O. Chapelle and A. Zien. Semi-supervised classification by low density separation. In 10th International Workshop on Artificial Intelligence and Statistics, 2005. [8] S. Dasgupta, M. L. Littman, and D. McAllester. PAC generalization bounds for co-training. NIPS, 14, 2001. [9] L. Devroye, L. Gyorfi, and G. Lugosi. A probabilistic theory of pattern recognition. Springer, New York, Berlin, Heidelberg, 1996. [10] J. Ratsaby. The complexity of learning from a mixture of labeled and unlabeled examples. In Phd Thesis, 1994. [11] J. Ratsaby and S. S. Venkatesh. Learning from a mixture of labeled and unlabeled examples with parametric side information. In 8th Annual Conference on Learning Theory, 1995. [12] A. B. Tsybakov. Optimal aggregation of classifiers in statistical learning. Ann. Statist., 32(1):135–166, 1996. [13] V. N. Vapnik. Statistical Learning Theory. Wiley, New York, 1998. [14] Y. Yang. Minimax nonparametric classification- part I: Rates of convergence, part II: Model selection for adaptation. IEEE Trans. Inf. Theory, 45:2271–2292, 1999. [15] X. Zhu. Semi-supervised literature survey. Technical Report 1530, Department of Computer Science, University of Wisconsin Madison, December 2006. 8
2007
145
3,176
On Higher-Order Perceptron Algorithms ∗ Cristian Brotto DICOM, Universit`a dell’Insubria cristian.brotto@gmail.com Claudio Gentile DICOM, Universit`a dell’Insubria claudio.gentile@uninsubria.it Fabio Vitale DICOM, Universit`a dell’Insubria fabiovdk@yahoo.com Abstract A new algorithm for on-line learning linear-threshold functions is proposed which efficiently combines second-order statistics about the data with the ”logarithmic behavior” of multiplicative/dual-norm algorithms. An initial theoretical analysis is provided suggesting that our algorithm might be viewed as a standard Perceptron algorithm operating on a transformed sequence of examples with improved margin properties. We also report on experiments carried out on datasets from diverse domains, with the goal of comparing to known Perceptron algorithms (first-order, second-order, additive, multiplicative). Our learning procedure seems to generalize quite well, and converges faster than the corresponding multiplicative baseline algorithms. 1 Introduction and preliminaries The problem of on-line learning linear-threshold functions from labeled data is one which have spurred a substantial amount of research in Machine Learning. The relevance of this task from both the theoretical and the practical point of view is widely recognized: On the one hand, linear functions combine flexiblity with analytical and computational tractability, on the other hand, online algorithms provide efficient methods for processing massive amounts of data. Moreover, the widespread use of kernel methods in Machine Learning (e.g., [24]) have greatly improved the scope of this learning technology, thereby increasing even further the general attention towards the specific task of incremental learning (generalized) linear functions. Many models/algorithms have been proposed in the literature (stochastic, adversarial, noisy, etc.) : Any list of references would not do justice of the existing work on this subject. In this paper, we are interested in the problem of online learning linear-threshold functions from adversarially generated examples. We introduce a new family of algorithms, collectively called the Higher-order Perceptron algorithm (where ”higher” means here ”higher than one”, i.e., ”higher than first-order” descent algorithms such as gradientdescent or standard Perceptron-like algorithms”). Contrary to other higher-order algorithms, such as the ridge regression-like algorithms considered in, e.g., [4, 7], Higher-order Perceptron has the ability to put together in a principled and flexible manner second-order statistics about the data with the ”logarithmic behavior” of multiplicative/dual-norm algorithms (e.g., [18, 19, 6, 13, 15, 20]). Our algorithm exploits a simplified form of the inverse data matrix, lending itself to be easily combined with the dual norms machinery introduced by [13] (see also [12, 23]). As we will see, this has also computational advantages, allowing us to formulate an efficient (subquadratic) implementation. Our contribution is twofold. First, we provide an initial theoretical analysis suggesting that our algorithm might be seen as a standard Perceptron algorithm [21] operating on a transformed sequence of examples with improved margin properties. The same analysis also suggests a simple (but principled) way of switching on the fly between higher-order and first-order updates. This is ∗The authors gratefully acknowledge partial support by the PASCAL Network of Excellence under EC grant n. 506778. This publication only reflects the authors’ views. especially convenient when we deal with kernel functions, a major concern being the sparsity of the computed solution. The second contribution of this paper is an experimental investigation of our algorithm on artificial and real-world datasets from various domains: We compared Higher-order Perceptron to baseline Perceptron algorithms, like the Second-order Perceptron algorithm defined in [7] and the standard (p-norm) Perceptron algorithm, as in [13, 12]. We found in our experiments that Higher-order Perceptron generalizes quite well. Among our experimental findings are the following: 1) Higher-order Perceptron is always outperforming the corresponding multiplicative (p-norm) baseline (thus the stored data matrix is always beneficial in terms of convergence speed); 2) When dealing with Euclidean norms (p = 2), the comparison to Second-order Perceptron is less clear and depends on the specific task at hand. Learning protocol and notation. Our algorithm works in the well-known mistake bound model of on-line learning, as introduced in [18, 2], and further investigated by many authors (e.g., [19, 6, 13, 15, 7, 20, 23] and references therein). Prediction proceeds in a sequence of trials. In each trial t = 1, 2, . . . the prediction algorithm is given an instance vector in Rn (for simplicity, all vectors are normalized, i.e., ||xt|| = 1, where || · || is the Euclidean norm unless otherwise specified), and then guesses the binary label yt ∈{−1, 1} associated with xt. We denote the algorithm’s prediction by byt ∈{−1, 1}. Then the true label yt is disclosed. In the case when byt ̸= yt we say that the algorithm has made a prediction mistake. We call an example a pair (xt, yt), and a sequence of examples S any sequence S = (x1, y1), (x2, y2), . . . , (xT , yT ). In this paper, we are competing against the class of linear-threshold predictors, parametrized by normal vectors u ∈{v ∈Rn : ||v|| = 1}. In this case, a common way of measuring the (relative) prediction performance of an algorithm A is to compare the total number of mistakes of A on S to some measure of the linear separability of S. One such measure (e.g., [24]) is the cumulative hinge-loss (or soft-margin) Dγ(u; S) of S w.r.t. a linear classifier u at a given margin value γ > 0: Dγ(u; S) = PT t=1 max{0, γ −ytu⊤xt} (observe that Dγ(u; S) vanishes if and only if u separates S with margin at least γ. A mistake-driven algorithm A is one which updates its internal state only upon mistakes. One can therefore associate with the run of A on S a subsequence M = M(S, A) ⊆{1, . . . , T} of mistaken trials. Now, the standard analysis of these algorithms allows us to restrict the behavior of the comparison class to mistaken trials only and, as a consequence, to refine Dγ(u; S) so as to include only trials in M: Dγ(u; S) = P t∈M max{0, γ −ytu⊤xt}. This gives bounds on A’s performance relative to the best u over a sequence of examples produced (or, actually, selected) by A during its on-line functioning. Our analysis in Section 3 goes one step further: the number of mistakes of A on S is contrasted to the cumulative hinge loss of the best u on a transformed sequence ˜S = ((˜xi1, yi1), (˜xi2, yi2), . . . , (˜xim, yim)), where each instance xik gets transformed into ˜xik through a mapping depending only on the past behavior of the algorithm (i.e., only on examples up to trial t = ik−1). As we will see in Section 3, this new sequence ˜S tends to be ”more separable” than the original sequence, in the sense that if S is linearly separable with some margin, then the transformed sequence ˜S is likely to be separable with a larger margin. 2 The Higher-order Perceptron algorithm The algorithm (described in Figure 1) takes as input a sequence of nonnegative parameters ρ1, ρ2, ..., and maintains a product matrix Bk (initialized to the identity matrix I) and a sum vector vk (initialized to 0). Both of them are indexed by k, a counter storing the current number of mistakes (plus one). Upon receiving the t-th normalized instance vector xt ∈Rn, the algorithm computes its binary prediction value byt as the sign of the inner product between vector Bk−1vk−1 and vector Bk−1xt. If byt ̸= yt then matrix Bk−1 is updates multiplicatively as Bk = Bk−1 (I −ρk xtx⊤ t ) while vector vk−1 is updated additively through the standard Perceptron rule vk = vk−1 + yt xt. The new matrix Bk and the new vector vk will be used in the next trial. If byt = yt no update is performed (hence the algorithm is mistake driven). Observe that ρk = 0 for any k makes this algorithm degenerate into the standard Perceptron algorithm [21]. Moreover, one can easily see that, in order to let this algorithm exploit the information collected in the matrix B (and let the algorithm’s behavior be substantially different from Perceptron’s) we need to ensure P∞ k=1 ρk = ∞. In the sequel, our standard choice will be ρk = c/k, with c ∈(0, 1). See Sections 3 and 4. Implementing Higher-Order Perceptron can be done in many ways. Below, we quickly describe three of them, each one having its own merits. 1) Primal version. We store and update an n×n matrix Ak = B⊤ k Bk and an n-dimensional column Parameters: ρ1, ρ2, ... ∈[0, 1). Initialization: B0 = I; v0 = 0; k = 1. Repeat for t = 1, 2, . . . , T : 1. Get instance xt ∈Rn, ||xt|| = 1; 2. Predict byt = SGN(w⊤ k−1xt) ∈{−1, +1}, where wk−1 = B⊤ k−1Bk−1vk−1; 3. Get label yt ∈{−1, +1}; 4. if byt ̸= yt then: vk = vk−1 + yt xt Bk = Bk−1 (I −ρk xtx⊤ t ) k ← k + 1. Figure 1: The Higher-order Perceptron algorithm (for p = 2). vector vk. Matrix Ak is updated as Ak = Ak−1 −ρAk−1xx⊤−ρxx⊤Ak−1 +ρ2(x⊤Ak−1x)xx⊤, taking O(n2) operations, while vk is updated as in Figure 1. Computing the algorithm’s margin v⊤Ax can then be carried out in time quadratic in the dimension n of the input space. 2) Dual version. This implementation allows us the use of kernel functions (e.g., [24]). Let us denote by Xk the n × k matrix whose columns are the n-dimensional instance vectors x1, ..., xk where a mistake occurred so far, and yk be the k-dimensional column vector of the corresponding labels. We store and update the k × k matrix Dk = [d(k) i,j ]k i,j=1, the k × k diagonal matrix Hk = DIAG{hk}, hk = (h(k) 1 , ..., h(k) k )⊤= X⊤ k Xk yk, and the k-dimensional column vector gk = yk + Dk Hk 1k, being 1k a vector of k ones. If we interpret the primal matrix Ak above as Ak = I + Pk i,j=1 d(k) i,j xix⊤ j , it is not hard to show that the margin value w⊤ k−1x is equal to g⊤ k−1X⊤ k−1x, and can be computed through O(k) extra inner products. Now, on the k-th mistake, vector g can be updated with O(k2) extra inner products by updating D and H in the following way. We let D0 and H0 be empty matrices. Then, given Dk−1 and Hk−1 = DIAG{hk−1}, we have1 Dk =  Dk−1 −ρk bk −ρk b⊤ k d(k) k,k  , where bk = Dk−1X⊤ k−1xk, and d(k) k,k = ρ2 k x⊤ k Xk−1bk −2ρk + ρ2 k. On the other hand, Hk = DIAG{hk−1 + yk X⊤ k−1xk , h(k) k }, with h(k) k = y⊤ k−1X⊤ k−1xk + yk. Observe that on trials when ρk = 0 matrix Dk−1 is padded with a zero row and a zero column. This amounts to say that matrix Ak = I + Pk i,j=1 d(k) i,j xix⊤ j , is not updated, i.e., Ak = Ak−1. A closer look at the above update mechanism allows us to conclude that the overall extra inner products needed to compute gk is actually quadratic only in the number of past mistaken trials having ρk > 0. This turns out to be especially important when using a sparse version of our algorithm which, on a mistaken trial, decides whether to update both B and v or just v (see Section 4). 3) Implicit primal version and the dual norms algorithm. This is based on the simple observation that for any vector z we can compute Bkz by unwrapping Bk as in Bkz = Bk−1(I −ρxx⊤)z = Bk−1z′, where vector z′ = (z −ρx x⊤z) can be calculated in time O(n). Thus computing the margin v⊤B⊤ k−1Bk−1x actually takes O(nk). Maintaining this implicit representation for the product matrix B can be convenient when an efficient dual version is likely to be unavailable, as is the case for the multiplicative (or, more generally, dual norms) extension of our algorithm. We recall that a multiplicative algorithm is useful when learning sparse target hyperplanes (e.g., [18, 15, 3, 12, 11, 20]). We obtain a dual norms algorithm by introducing a norm parameter p ≥2, and the associated gradient mapping2 g : θ ∈Rn →∇θ||θ||2 p / 2 ∈Rn. Then, in Figure 1, we normalize instance vectors xt w.r.t. the p-norm, we define wk−1 = B⊤ k−1g(Bk−1vk−1), and generalize the matrix update as Bk = Bk−1(I −ρkxtg(xt)⊤). As we will see, the resulting algorithm combines the multiplicative behavior of the p-norm algorithms with the ”second-order” information contained in the matrix Bk. One can easily see that the above-mentioned argument for computing the margin g(Bk−1vk−1)⊤Bk−1x in time O(nk) still holds. 1Observe that, by construction, Dk is a symmetric matrix. 2This mapping has also been used in [12, 11]. Recall that setting p = O(log n) yields an algorithm similar to Winnow [18]. Also, notice that p = 2 yields g = identity. 3 Analysis We express the performance of the Higher-order Perceptron algorithm in terms of the hinge-loss behavior of the best linear classifier over the transformed sequence ˜S = (B0xt(1), yt(1)), (B1xt(2), yt(2)), (B2xt(3), yt(3)), . . . , (1) being t(k) the trial where the k-th mistake occurs, and Bk the k-th matrix produced by the algorithm. Observe that each feature vector xt(k) gets transformed by a matrix Bk depending on past examples only. This is relevant to the argument that ˜S tends to have a larger margin than the original sequence (see the discussion at the end of this section). This neat ”on-line structure” does not seem to be shared by other competing higher-order algorithms, such as the ”ridge regression-like” algorithms considered, e.g., in [25, 4, 7, 23]. For the sake of simplicity, we state the theorem below only in the case p = 2. A more general statement holds when p ≥2. Theorem 1 Let the Higher-order Perceptron algorithm in Figure 1 be run on a sequence of examples S = (x1, y1), (x2, y2), . . . , (xT , yT ). Let the sequence of parameters ρk satisfy 0 ≤ρk ≤ 1−c 1+|v⊤ k−1xt|, where xt is the k-th mistaken instance vector, and c ∈(0, 1]. Then the total number m of mistakes satisfies3 m ≤α Dγ(u; ˜Sc)) γ + α2 2γ2 + α γ s α Dγ(u; ˜Sc)) γ + α2 4γ2 , (2) holding for any γ > 0 and any unit norm vector u ∈Rn, where α = α(c) = (2 −c)/c. Proof. The analysis deliberately mimics the standard Perceptron convergence analysis [21]. We fix an arbitrary sequence S = (x1, y1), (x2, y2), . . . , (xT , yT ) and let M ⊆{1, 2, . . . , T} be the set of trials where the algorithm in Figure 1 made a mistake. Let t = t(k) be the trial where the k-th mistake occurred. We study the evolution of ||Bkvk||2 over mistaken trials. Notice that the matrix B⊤ k Bk is positive semidefinite for any k. We can write ||Bkvk||2 = ||Bk−1 (I −ρk xtx⊤ t ) (vk−1 + yt xt) ||2 (from the update rule vk = vk−1 + yt xt and Bk = Bk−1 (I −ρk xtx⊤ t ) ) = ||Bk−1vk−1 + yt (1 −ρkytvk−1xt −ρk)Bk−1xt||2 (using ||xt|| = 1) = ||Bk−1vk−1||2 + 2 ytrk v⊤ k−1B⊤ k−1Bk−1xt + r2 k||Bk−1xt||2, where we set for brevity rk = 1 −ρkytvk−1xt −ρk. We proceed by upper and lower bounding the above chain of equalities. To this end, we need to ensure rk ≥0. Observe that ytvk−1xt ≥0 implies rk ≥0 if and only if ρk ≤1/(1+ytvk−1xt). On the other hand, if ytvk−1xt < 0 then, in order for rk to be nonnegative, it suffices to pick ρk ≤1. In both cases ρk ≤(1 −c)/(1 + |vk−1xt|) implies rk ≥c > 0, and also r2 k ≤(1+ρk|vk−1xt|−ρk)2 ≤(2−c)2. Now, using yt v⊤ k−1B⊤ k−1Bk−1xt ≤0 (combined with rk ≥0), we conclude that ||Bkvk||2 −||Bk−1vk−1||2 ≤(2 −c)2 ||Bk−1 xt||2 = (2 −c)2 x⊤ t Ak−1 xt, where we set Ak = B⊤ k Bk. A simple4 (and crude) upper bound on the last term follows by observing that ||xt|| = 1 implies x⊤ t Ak−1 xt ≤||Ak−1||, the spectral norm (largest eigenvalue) of Ak−1. Since a factor matrix of the form (I −ρ xx⊤) with ρ ≤1 and ||x|| = 1 has spectral norm one, we have x⊤ t Ak−1 xt ≤||Ak−1|| ≤Qk−1 i=1 ||I −ρi xt(i)x⊤ t(i)||2 ≤1. Therefore, summing over k = 1, . . . , m = |M| (or, equivalently, over t ∈M) and using v0 = 0 yields the upper bound ||Bmvm||2 ≤(2 −c)2 m. (3) To find a lower bound of the left-hand side of (3), we first pick any unit norm vector u ∈Rn, and apply the standard Cauchy-Schwartz inequality: ||Bmvm|| ≥u⊤Bmvm. Then, we observe that for a generic trial t = t(k) the update rule of our algorithm allows us to write u⊤Bkvk −u⊤Bk−1vk−1 = rk yt u⊤Bk−1xt ≥rk (γ −max{0, γ −yt u⊤Bk−1xt}), where the last inequality follows from rk ≥0 and holds for any margin value γ > 0. We sum 3The subscript c in ˜Sc emphasizes the dependence of the transformed sequence on the choice of c. Note that in the special case c = 1 we have ρk = 0 for any k and α = 1, thereby recovering the standard Perceptron bound for nonseparable sequences (see, e.g., [12]). 4A slightly more refined bound can be derived which depends on the trace of matrices I −Ak. Details will be given in the full version of this paper. the above over k = 1, . . . , m and exploit c ≤rk ≤2 −c after rearranging terms. This gets ||Bmvm|| ≥u⊤Bmvm ≥c γ m−(2−c)Dγ(u; ˜Sc). Combining with (3) and solving for m gives the claimed bound. □ From the above result one can see that our algorithm might be viewed as a standard Perceptron algorithm operating on the transformed sequence ˜Sc in (1). We now give a qualitative argument, which is suggestive of the improved margin properties of ˜Sc. Assume for simplicity that all examples (xt, yt) in the original sequence are correctly classified by hyperplane u with the same margin γ = yt u⊤xt > 0, where t = t(k). According to Theorem 1, the parameters ρ1, ρ2, . . . should be small positive numbers. Assume, again for simplicity, that all ρk are set to the same small enough value ρ > 0. Then, up to first order, matrix Bk = Qk i=1(I −ρ xt(i)x⊤ t(i)) can be approximated as Bk ≃I −ρ Pk i=1 xt(i)x⊤ t(i). Then, to the extent that the above approximation holds, we can write:5 yt u⊤Bk−1xt = yt u⊤I −ρ Pk−1 i=1 xt(i)x⊤ t(i)  xt = yt u⊤I −ρ Pk−1 i=1 yt(i)xt(i) yt(i)x⊤ t(i)  xt = yt u⊤xt −ρ yt Pk−1 i=1 yt(i) u⊤xt(i) yt(i)x⊤ t(i)  xt = γ −ρ γ yt v⊤ k−1xt. Now, yt v⊤ k−1xt is the margin of the (first-order) Perceptron vector vk−1 over a mistaken trial for the Higher-order Perceptron vector wk−1. Since the two vectors vk−1 and wk−1 are correlated (recall that v⊤ k−1wk−1 = v⊤ k−1B⊤ k−1Bk−1vk−1 = ||Bk−1vk−1||2 ≥0) the mistaken condition yt w⊤ k−1xt ≤0 is more likely to imply yt v⊤ k−1xt ≤0 than the opposite. This tends to yield a margin larger than the original margin γ. As we mentioned in Section 2, this is also advantageous from a computational standpoint, since in those cases the matrix update Bk−1 →Bk might be skipped (this is equivalent to setting ρk = 0), still Theorem 1 would hold. Though the above might be the starting point of a more thorough theoretical understanding of the margin properties of our algorithm, in this paper we prefer to stop early and leave any further investigation to collecting experimental evidence. 4 Experiments We tested the empirical performance of our algorithm by conducting a number of experiments on a collection of datasets, both artificial and real-world from diverse domains (Optical Character Recognition, text categorization, DNA microarrays). The main goal of these experiments was to compare Higher-order Perceptron (with both p = 2 and p > 2) to known Perceptron-like algorithms, such as first-order [21] and second-order Perceptron [7], in terms of training accuracy (i.e., convergence speed) and test set accuracy. The results are contained in Tables 1, 2, 3, and in Figure 2. Task 1: DNA microarrays and artificial data. The goal here was to test the convergence properties of our algorithms on sparse target learning tasks. We first tested on a couple of well-known DNA microarray datasets. For each dataset, we first generated a number of random training/test splits (our random splits also included random permutations of the training set). The reported results are averaged over these random splits. The two DNA datasets are: i. The ER+/ER−dataset from [14]. Here the task is to analyze expression profiles of breast cancer and classify breast tumors according to ER (Estrogen Receptor) status. This dataset (which we call the “Breast” dataset) contains 58 expression profiles concerning 3389 genes. We randomly split 1000 times into a training set of size 47 and a test set of size 11. ii. The “Lymphoma” dataset [1]. Here the goal is to separate cancerous and normal tissues in a large B-Cell lymphoma problem. The dataset contains 96 expression profiles concerning 4026 genes. We randomly split the dataset into a training set of size 60 and a test set of size 36. Again, the random split was performed 1000 times. On both datasets, the tested algorithms have been run by cycling 5 times over the current training set. No kernel functions have been used. We also artificially generated two (moderately) sparse learning problems with margin γ ≥0.005 at labeling noise levels η = 0.0 (linearly separable) and η = 0.1, respectively. The datasets have been generated at random by first generating two (normalized) target vectors u ∈{−1, 0, +1}500, where the first 50 components are selected independently at random in {−1, +1} and the remaining 450 5Again, a similar argument holds in the more general setting p ≥2. The reader should notice how important the dependence of Bk on the past is to this argument. components are 0. Then we set η = 0.0 for the first target and η = 0.1 for the second one and, corresponding to each of the two settings, we randomly generated 1000 training examples and 1000 test examples. The instance vectors are chosen at random from [−1, +1]500 and then normalized. If u · xt ≥γ then a +1 label is associated with xt. If u · xt ≤−γ then a −1 label is associated with xt. The labels so obtained are flipped with probability η. If |u · xt| < γ then xt is rejected and a new vector xt is drawn. We call the two datasets ”Artificial 0.0” and ”Artificial 0.1”. We tested our algorithms by training over an increasing number of epochs and checking the evolution of the corresponding test set accuracy. Again, no kernel functions have been used. Task 2: Text categorization. The text categorization datasets are derived from the first 20,000 newswire stories in the Reuters Corpus Volume 1 (RCV1, [22]). A standard TF-IDF bag-of-words encoding was used to transform each news story into a normalized vector of real attributes. We built four binary classification problems by “binarizing” consecutive news stories against the four target categories 70, 101, 4, and 59. These are the 2nd, 3rd, 4th, and 5th most frequent6 categories, respectively, within the first 20,000 news stories of RCV1. We call these datasets RCV1x, where x = 70, 101, 4, 59. Each dataset was split into a training set of size 10,000 and a test set of the same size. All algorithms have been trained for a single epoch. We initially tried polynomial kernels, then realized that kernel functions did not significantly alter our conclusions on this task. Thus the reported results refer to algorithms with no kernel functions. Task 3: Optical character recognition (OCR). We used two well-known OCR benchmarks: the USPS dataset and the MNIST dataset [16] and followed standard experimental setups, such as the one in [9], including the one-versus-rest scheme for reducing a multiclass problem to a set of binary tasks. We used for each algorithm the standard Gaussian and polynomial kernels, with parameters chosen via 5-fold cross validation on the training set across standard ranges. Again, all algorithms have been trained for a single epoch over the training set. The results in Table 3 only refer to the best parameter settings for each kernel. Algorithms. We implemented the standard Perceptron algorithm (with and without kernels), the Second-order Perceptron algorithm, as described in [7] (with and without kernels), and our Higherorder Perceptron algorithm. The implementation of the latter algorithm (for both p = 2 and p > 2) was ”implicit primal” when tested on the sparse learning tasks, and in dual variables for the other two tasks. When using Second-order Perceptron, we set its parameter a (see [7] for details) by testing on a generous range of values. For brevity, only the settings achieving the best results are reported. On the sparse learning tasks we tried Higher-order Perceptron with norm p = 2, 4, 7, 10, while on the other two tasks we set p = 2. In any case, for each value of p, we set7 ρk = c/k, with c = 0, 0.2, 0.4, 0.6, 0.8. Since c = 0 corresponds to a standard p-norm Perceptron algorithm [13, 12] we tried to emphasize the comparison c = 0 vs. c > 0. Finally, when using kernels on the OCR tasks, we also compared to a sparse dual version of Higher-order Perceptron. On a mistaken round t = t(k), this algorithm sets ρk = c/k if yt vk−1xt ≥0, and ρk = 0 otherwise (thus, when yt vk−1xt < 0 the matrix Bk−1 is not updated). For the sake of brevity, the standard Perceptron algorithm is called FO (”First Order”), the Second-order algorithm is denoted by SO (”Second Order”), while the Higher-order algorithm with norm parameter p and ρk = c/k is abbreviated as HOp(c). Thus, for instance, FO = HO2(0). Results and conclusions. Our Higher-order Perceptron algorithm seems to deliver interesting results. In all our experiments HOp(c) with c > 0 outperforms HOp(0). On the other hand, the comparison HOp(c) vs. SO depends on the specific task. On the DNA datasets, HOp(c) with c > 0 is clearly superior in Breast. On Lymphoma, HOp(c) gets worse as p increases. This is a good indication that, in general, a multiplicative algorithm is not suitable for this dataset. In any case, HO2 turns out to be only slightly worse than SO. On the artificial datasets HOp(c) with c > 0 is always better than the corresponding p-norm Perceptron algorithm. On the text categorization tasks, HO2 tends to perform better than SO. On USPS, HO2 is superior to the other competitors, while on MNIST it performs similarly when combined with Gaussian kernels (though it turns out to be relatively sparser), while it is slightly inferior to SO when using polynomial kernels. The sparse version of HO2 cuts the matrix updates roughly by half, still maintaining a good performance. In all cases HO2 (either sparse or not) significantly outperforms FO. In conclusion, the Higher-order Perceptron algorithm is an interesting tool for on-line binary clas6We did not use the most frequent category because of its significant overlap with the other ones. 7Notice that this setting fulfills the condition on ρk stated in Theorem 1. Table 1: Training and test error on the two datasets ”Breast” and ”Lymphoma”. Training error is the average total number of updates over 5 training epochs, while test error is the average fraction of misclassified patterns in the test set, The results refer to the same training/test splits. For each algorithm, only the best setting is shown (best training and best test setting coincided in these experiments). Thus, for instance, HO2 differs from FO because of the c parameter. We emphasized the comparison HO7(0) vs. HO7(c) with best c among the tested values. According to Wilcoxon signed rank test, an error difference of 0.5% or larger might be considered significant. In bold are the smallest figures achieved on each row of the table. FO HO2 HO4 HO7(0) HO7 HO10 SO BREAST TRAIN 45.2 21.7 24.5 47.4 24.5 32.4 29.6 TEST 23.4% 16.4% 13.3% 15.7% 12.0% 13.5 15.0% LYMPHOMA TRAIN 22.1 19.6 18.9 23.0 20.0 23.1 19.3 TEST 11.8% 10.0% 10.0% 11.5% 11.5% 11.9% 9.6% 15 10 20 5 3 2 1 # of training updates 600 800 500 400 300 Training updates vs training epochs on Artificial # of training epochs 0.0 700 HO (0.0) * SO (a = 0.2) 7 HO (0.4) 2 HO (0.4) 4 HO (0.4) 7 FO = HO (0.0) * * * * * * * 2 15 10 20 5 3 2 1 # of training updates 1600 2400 1200 800 400 Training updates vs training epochs on Artificial # of training epochs 0.1 2000 HO (0.0) * SO (a = 0.2) 7 HO (0.4) 2 HO (0.4) 4 HO (0.4) 7 FO = HO (0.0) * * * * * * * 2 15 10 20 5 3 2 1 Test error rates 18% 26% 14% 10% 6% Test error rates vs training epochs on Artificial # of training epochs 0.0 22% HO (0.0) * SO (a = 0.2) 7 HO (0.4) 2 HO (0.4) 4 HO (0.4) 7 FO = HO (0.0) * * 2 * * * * * 15 10 20 5 3 2 1 Test error rates (minus 10%) 18% 26% 14% 10% 6% Test error rates vs training epochs on Artificial # of training epochs 0.1 22% HO (0.0) * SO (a = 0.2) 7 HO (0.4) 2 HO (0.4) 4 HO (0.4) 7 FO = HO (0.0) * * 2 * * * * * Figure 2: Experiments on the two artificial datasets (Artificial0.0, on the left, and Artificial0.1, on the right). The plots give training and test behavior as a function of the number of training epochs. Notice that the test set in Artificial0.1 is affected by labelling noise of rate 10%. Hence, a visual comparison between the two plots at the bottom can only be made once we shift down the y-axis of the noisy plot by 10%. On the other hand, the two training plots (top) are not readily comparable. The reader might have difficulty telling apart the two kinds of algorithms HOp(0.0) and HOp(c) with c > 0. In practice, the latter turned out to be always slightly superior in performance to the former. sification, having the ability to combine multiplicative (or nonadditive) and second-order behavior into a single inference procedure. Like other algorithms, HOp can be extended (details omitted due to space limitations) in several ways through known worst-case learning technologies, such as large margin (e.g., [17, 11]), label-efficient/active learning (e.g., [5, 8]), and bounded memory (e.g., [10]). References [1] A. Alizadeh, et al. (2000). Distinct types of diffuse large b-cell lymphoma identified by gene expression profiling. Nature, 403, 503–511. [2] D. Angluin (1988). Queries and concept learning. Machine Learning, 2(4), 319–342. [3] P. Auer & M.K. Warmuth (1998). Tracking the best disjunction. Machine Learning, 32(2), 127–150. [4] K.S. Azoury & M.K. Warmuth (2001). Relative loss bounds for on-line density estimation with the exponential familiy of distributions. Machine Learning, 43(3), 211–246. [5] A. Bordes, S. Ertekin, J. Weston, & L. Bottou (2005). Fast kernel classifiers with on-line and active learning. JMLR, 6, 1579–1619. [6] N. Cesa-Bianchi, Y. Freund, D. Haussler, D.P. Helmbold, R.E. Schapire, & M.K. Warmuth (1997). How to use expert advice. J. ACM, 44(3), 427–485. Table 2: Experimental results on the four binary classification tasks derived from RCV1. ”Train” denotes the number of training corrections, while ”Test” gives the fraction of misclassified patterns in the test set. Only the results corresponding to the best test set accuracy are shown. In bold are the smallest figures achieved for each of the 8 combinations of dataset (RCV1x, x = 70, 101, 4, 59) and phase (training or test). FO HO2 SO TRAIN TEST TRAIN TEST TRAIN TEST RCV170 993 7.20% 941 6.83% 880 6.95% RCV1101 673 6.39% 665 5.81% 677 5.48% RCV14 803 6.14% 783 5.94% 819 6.05% RCV159 767 6.45% 762 6.04% 760 6.84% Table 3: Experimental results on the OCR tasks. ”Train” denotes the total number of training corrections, summed over the 10 categories, while ”Test” denotes the fraction of misclassified patterns in the test set. Only the results corresponding to the best test set accuracy are shown. For the sparse version of HO2 we also reported (in parentheses) the number of matrix updates during training. In bold are the smallest figures achieved for each of the 8 combinations of dataset (USPS or MNIST), kernel type (Gaussian or Polynomial), and phase (training or test). FO HO2 Sparse HO2 SO TRAIN TEST TRAIN TEST TRAIN TEST TRAIN TEST USPS GAUSS 1385 6.53% 945 4.76% 965 (440) 5.13% 1003 5.05% POLY 1609 7.37% 1090 5.71% 1081 (551) 5.52% 1054 5.53% MNIST GAUSS 5834 2.10% 5351 1.79% 5363 (2596) 1.81% 5684 1.82% POLY 8148 3.04% 6404 2.27% 6476 (3311) 2.28% 6440 2.03% [7] N. Cesa-Bianchi, A. Conconi & C. Gentile (2005). A second-order perceptron algorithm. SIAM Journal of Computing, 34(3), 640–668. [8] N. Cesa-Bianchi, C. Gentile, & L. Zaniboni (2006). Worst-case analysis of selective sampling for linearthreshold algorithms. JMLR, 7, 1205–1230. [9] C. Cortes & V. Vapnik (1995). Support-vector networks. Machine Learning, 20(3), 273–297. [10] O. Dekel, S. Shalev-Shwartz, & Y. Singer (2006). The Forgetron: a kernel-based Perceptron on a fixed budget. NIPS 18, MIT Press, pp. 259–266. [11] C. Gentile (2001). A new approximate maximal margin classification algorithm. JMLR, 2, 213–242. [12] C. Gentile (2003). The Robustness of the p-norm Algorithms. Machine Learning, 53(3), pp. 265–299. [13] A.J. Grove, N. Littlestone & D. Schuurmans (2001). General convergence results for linear discriminant updates. Machine Learning Journal, 43(3), 173–210. [14] S. Gruvberger, et al. (2001). Estrogen receptor status in breast cancer is associated with remarkably distinct gene expression patterns. Cancer Res., 61, 5979–5984. [15] J. Kivinen, M.K. Warmuth, & P. Auer (1997). The perceptron algorithm vs. winnow: linear vs. logarithmic mistake bounds when few input variables are relevant. Artificial Intelligence, 97, 325–343. [16] Y. Le Cun, et al. (1995). Comparison of learning algorithms for handwritten digit recognition. ICANN 1995, pp. 53–60. [17] Y. Li & P. Long (2002). The relaxed online maximum margin algorithm. Machine Learning, 46(1-3), 361–387. [18] N. Littlestone (1988). Learning quickly when irrelevant attributes abound: a new linear-threshold algorithm. Machine Learning, 2(4), 285–318. [19] N. Littlestone & M.K. Warmuth (1994). The weighted majority algorithm. Information and Computation, 108(2), 212–261. [20] P. Long & X. Wu (2004). Mistake bounds for maximum entropy discrimination. NIPS 2004. [21] A.B.J. Novikov (1962). On convergence proofs on perceptrons. Proc. of the Symposium on the Mathematical Theory of Automata, vol. XII, pp. 615–622. [22] Reuters: 2000. http://about.reuters.com/researchandstandards/corpus/. [23] S. Shalev-Shwartz & Y. Singer (2006). Online Learning Meets Optimization in the Dual. COLT 2006, pp. 423–437. [24] B. Schoelkopf & A. Smola (2002). Learning with kernels. MIT Press. [25] Vovk, V. (2001). Competitive on-line statistics. International Statistical Review, 69, 213-248.
2007
146
3,177
Adaptive Online Gradient Descent Peter L. Bartlett Division of Computer Science Department of Statistics UC Berkeley Berkeley, CA 94709 bartlett@cs.berkeley.edu Elad Hazan IBM Almaden Research Center 650 Harry Road San Jose, CA 95120 hazan@us.ibm.com Alexander Rakhlin ∗ Division of Computer Science UC Berkeley Berkeley, CA 94709 rakhlin@cs.berkeley.edu Abstract We study the rates of growth of the regret in online convex optimization. First, we show that a simple extension of the algorithm of Hazan et al eliminates the need for a priori knowledge of the lower bound on the second derivatives of the observed functions. We then provide an algorithm, Adaptive Online Gradient Descent, which interpolates between the results of Zinkevich for linear functions and of Hazan et al for strongly convex functions, achieving intermediate rates between √ T and log T. Furthermore, we show strong optimality of the algorithm. Finally, we provide an extension of our results to general norms. 1 Introduction The problem of online convex optimization can be formulated as a repeated game between a player and an adversary. At round t, the player chooses an action xt from some convex subset K of Rn, and then the adversary chooses a convex loss function ft. The player aims to ensure that the total loss, PT t=1 ft(xt), is not much larger than the smallest total loss PT t=1 ft(x) of any fixed action x. The difference between the total loss and its optimal value for a fixed action is known as the regret, which we denote RT = T X t=1 ft(xt) −min x∈K T X t=1 ft(x). Many problems of online prediction of individual sequences can be viewed as special cases of online convex optimization, including prediction with expert advice, sequential probability assignment, and sequential investment [1]. A central question in all these cases is how the regret grows with the number of rounds of the game. Zinkevich [2] considered the following gradient descent algorithm, with step size ηt = Θ(1/ √ t). (Here, ΠK(v) denotes the Euclidean projection of v on to the convex set K.) ∗Corresponding author. 1 Algorithm 1 Online Gradient Descent (OGD) 1: Initialize x1 arbitrarily. 2: for t = 1 to T do 3: Predict xt, observe ft. 4: Update xt+1 = ΠK(xt −ηt+1∇ft(xt)). 5: end for Zinkevich showed that the regret of this algorithm grows as √ T, where T is the number of rounds of the game. This rate cannot be improved in general for arbitrary convex loss functions. However, this is not the case if the loss functions are uniformly convex, for instance, if all ft have second derivative at least H > 0. Recently, Hazan et al [3] showed that in this case it is possible for the regret to grow only logarithmically with T, using the same algorithm but with the smaller step size ηt = 1/(Ht). Increasing convexity makes online convex optimization easier. The algorithm that achieves logarithmic regret must know in advance a lower bound on the convexity of the loss functions, since this bound is used to determine the step size. It is natural to ask if this is essential: is there an algorithm that can adapt to the convexity of the loss functions and achieve the same regret rates in both cases—O(log T) for uniformly convex functions and O( √ T) for arbitrary convex functions? In this paper, we present an adaptive algorithm of this kind. The key technique is regularization: We consider the online gradient descent (OGD) algorithm, but we add a uniformly convex function, the quadratic λt∥x∥2, to each loss function ft(x). This corresponds to shrinking the algorithm’s actions xt towards the origin. It leads to a regret bound of the form RT ≤c T X t=1 λt + p(λ1, . . . , λT ). The first term on the right hand side can be viewed as a bias term; it increases with λt because the presence of the regularization might lead the algorithm away from the optimum. The second term is a penalty for the flatness of the loss functions that becomes smaller as the regularization increases. We show that choosing the regularization coefficient λt so as to balance these two terms in the bound on the regret up to round t is nearly optimal in a strong sense. Not only does this choice give the √ T and log T regret rates in the linear and uniformly convex cases, it leads to a kind of oracle inequality: The regret is no more than a constant factor times the bound on regret that would have been suffered if an oracle had provided in advance the sequence of regularization coefficients λ1, . . . , λT that minimizes the final regret bound. To state this result precisely, we introduce the following definitions. Let K be a convex subset of Rn and suppose that supx∈K ∥x∥≤D. For simplicity, throughout the paper we assume that K is centered around 0, and, hence, 2D is the diameter of K. Define a shorthand ∇t = ∇ft(xt). Let Ht be the largest value such that for any x∗∈K, ft(x∗) ≥ft(xt) + ∇⊤ t (x∗−xt) + Ht 2 ∥x∗−xt∥2. (1) In particular, if ∇2ft −Ht · I ⪰0, then the above inequality is satisfied. Furthermore, suppose ∥∇t∥≤Gt. Define λ1:t := Pt s=1 λs and H1:t := Pt s=1 Hs. Let H1:0 = 0. Let us now state the Adaptive Online Gradient Descent algorithm as well as the theoretical guarantee for its performance. Algorithm 2 Adaptive Online Gradient Descent 1: Initialize x1 arbitrarily. 2: for t = 1 to T do 3: Predict xt, observe ft. 4: Compute λt = 1 2 q (H1:t + λ1:t−1)2 + 8G2 t/(3D2) −(H1:t + λ1:t−1)  . 5: Compute ηt+1 = (H1:t + λ1:t)−1. 6: Update xt+1 = ΠK(xt −ηt+1(∇ft(xt) + λtxt)). 7: end for 2 Theorem 1.1. The regret of Algorithm 2 is bounded by RT ≤3 inf λ∗ 1,...,λ∗ T D2λ∗ 1:T + T X t=1 (Gt + λ∗ t D)2 H1:t + λ∗ 1:t ! . While Algorithm 2 is stated with the squared Euclidean norm as a regularizer, we show that it is straightforward to generalize our technique to other regularization functions that are uniformly convex with respect to other norms. This leads to adaptive versions of the mirror descent algorithm analyzed recently in [4, 5]. 2 Preliminary results The following theorem gives a regret bound for the OGD algorithm with a particular choice of step size. The virtue of the theorem is that the step size can be set without knowledge of the uniform lower bound on Ht, which is required in the original algorithm of [3]. The proof is provided in Section 4 (Theorem 4.1), where the result is extended to arbitrary norms. Theorem 2.1. Suppose we set ηt+1 = 1 H1:t . Then the regret of OGD is bounded as RT ≤1 2 T X t=1 G2 t H1:t . In particular, loosening the bound, 2RT ≤ maxt G2 t mint 1 t Pt s=1 Hs log T. Note that nothing prevents Ht from being negative or zero, implying that the same algorithm gives logarithmic regret even when some of the functions are linear or concave, as long as the partial averages 1 t Pt s=1 Hs are positive and not too small. The above result already provides an important extension to the log-regret algorithm of [3]: no prior knowledge on the uniform convexity of the functions is needed, and the bound is in terms of the observed sequence {Ht}. Yet, there is still a problem with the algorithm. If H1 > 0 and Ht = 0 for all t > 1, then Pt s=1 Hs = H1, resulting in a linear regret bound. However, we know from [2] that a O( √ T) bound can be obtained. In the next section we provide an algorithm which interpolates between O(log T) and O( √ T) bound on the regret depending on the curvature of the observed functions. 3 Adaptive Regularization Suppose the environment plays a sequence of ft’s with curvature Ht ≥0. Instead of performing gradient descent on these functions, we step in the direction of the gradient of ˜ft(x) = ft(x) + 1 2λt∥x∥2, where the regularization parameter λt ≥0 is chosen appropriately at each step as a function of the curvature of the previous functions. We remind the reader that K is assumed to be centered around the origin, for otherwise we would instead use ∥x −x0∥2 to shrink the actions xt towards the origin x0. Applying Theorem 2.1, we obtain the following result. Theorem 3.1. If the Online Gradient Descent algorithm is performed on the functions ˜ft(x) = ft(x) + 1 2λt∥x∥2 with ηt+1 = 1 H1:t + λ1:t for any sequence of non-negative λ1, . . . , λT , then RT ≤1 2D2λ1:T + 1 2 T X t=1 (Gt + λtD)2 H1:t + λ1:t . 3 Proof. By Theorem 2.1 applied to functions ˜ft, T X t=1  ft(xt) + 1 2λt∥xt∥2  ≤min x T X t=1 ft(x) + 1 2λt∥x∥2 ! + 1 2 T X t=1 (Gt + λtD)2 H1:t + λ1:t . Indeed, it is easy to verify that condition (1) for ft implies the corresponding statement with ˜ Ht = Ht+λt for ˜ft. Furthermore, by linearity, the bound on the gradient of ˜ft is Gt+λt∥xt∥≤Gt+λtD. Define x∗= arg minx PT t=1 ft(x). Then, dropping the ∥xt∥2 terms and bounding ∥x∗∥2 ≤D2, T X t=1 ft(xt) ≤ T X t=1 ft(x∗) + 1 2D2λ1:T + 1 2 T X t=1 (Gt + λtD)2 H1:t + λ1:t , which proves the the theorem. The following inequality is important in the rest of the analysis, as it allows us to remove the dependence on λt from the numerator of the second sum at the expense of increased constants. We have 1 2 D2λ1:T + T X t=1 (Gt + λtD)2 H1:t + λ1:t ! ≤1 2D2λ1:T + 1 2 T X t=1  2G2 t H1:t + λ1:t + 2λ2 tD2 H1:t + λ1:t−1 + λt  ≤3 2D2λ1:T + T X t=1 G2 t H1:t + λ1:t , (2) where the first inequality holds because (a + b)2 ≤2a2 + 2b2 for any a, b ∈R. It turns out that for appropriate choices of {λt}, the above theorem recovers the O( √ T) bound on the regret for linear functions [2] and the O(log T) bound for strongly convex functions [3]. Moreover, under specific assumptions on the sequence {Ht}, we can define a sequence {λt} which produces intermediate rates between log T and √ T. These results are exhibited in corollaries at the end of this section. Of course, it would be nice to be able to choose {λt} adaptively without any restrictive assumptions on {Ht}. Somewhat surprisingly, such a choice can be made near-optimally by simple local balancing. Observe that the upper bound of Eq. (2) consists of two sums: D2 PT t=1 λt and PT t=1 G2 t H1:t+λ1:t . The first sum increases in any particular λt and the other decreases. While the influence of the regularization parameters λt on the first sum is trivial, the influence on the second sum is more involved as all terms for t ≥t′ depend on λt′. Nevertheless, it turns out that a simple choice of λt is optimal to within a multiplicative factor of 2. This is exhibited by the next lemma. Lemma 3.1. Define HT ({λt}) = HT (λ1 . . . λT ) = λ1:T + T X t=1 Ct H1:t + λ1:t , where Ct ≥0 does not depend on λt’s. If λt satisfies λt = Ct H1:t+λ1:t for t = 1, . . . , T, then HT ({λt}) ≤2 inf {λ∗ t }≥0 HT ({λ∗ t }). Proof. We prove this by induction. Let {λ∗ t } be the optimal sequence of non-negative regularization coefficients. The base of the induction is proved by considering two possibilities: either λ1 < λ∗ 1 or not. In the first case, λ1 + C1/(H1 + λ1) = 2λ1 ≤2λ∗ 1 ≤2(λ∗ 1 + C1/(H1 + λ∗ 1)). The other case is proved similarly. Now, suppose HT −1({λt}) ≤2HT −1({λ∗ t }). Consider two possibilities. If λ1:T < λ∗ 1:T , then HT ({λt}) = λ1:T + T X t=1 Ct H1:t + λ1:t = 2λ1:T ≤2λ∗ 1:T ≤2HT ({λ∗ t }). 4 If, on the other hand, λ1:T ≥λ∗ 1:T , then λT + Ct H1:T + λ1:T = 2 Ct H1:T + λ1:T ≤2 Ct H1:T + λ∗ 1:T ≤2  λ∗ T + Ct H1:T + λ∗ 1:T  . Using the inductive assumption, we obtain HT ({λt}) ≤2HT ({λ∗ t }). The lemma above is the key to the proof of the near-optimal bounds for Algorithm 2 1. Proof. (of Theorem 1.1) By Eq. 2 and Lemma 3.1, RT ≤3 2D2λ1:T + T X t=1 G2 t H1:t + λ1:t ≤ inf λ∗ 1,...,λ∗ T 3D2λ∗ 1:T + 2 T X t=1 G2 t H1:t + λ∗ 1:t ! ≤6 inf λ∗ 1,...,λ∗ T 1 2D2λ∗ 1:T + 1 2 T X t=1 (Gt + λ∗ t D)2 H1:t + λ∗ 1:t ! , provided the λt are chosen as solutions to 3 2D2λt = G2 t H1:t + λ1:t−1 + λt . (3) It is easy to verify that λt = 1 2 q (H1:t + λ1:t−1)2 + 8G2 t/(3D2) −(H1:t + λ1:t−1)  is the non-negative root of the above quadratic equation. We note that division by zero in Algorithm 2 occurs only if λ1 = H1 = G1 = 0. Without loss of generality, G1 ̸= 0, for otherwise x1 is minimizing f1(x) and regret is negative on that round. Hence, the algorithm has a bound on the performance which is 6 times the bound obtained by the best offline adaptive choice of regularization coefficients. While the constant 6 might not be optimal, it can be shown that a constant strictly larger than one is unavoidable (see previous footnote). We also remark that if the diameter D is unknown, the regularization coefficients λt can still be chosen by balancing as in Eq. (3), except without the D2 term. This choice of λt, however, increases the bound on the regret suffered by Algorithm 2 by a factor of O(D2). Let us now consider some special cases and show that Theorem 1.1 not only recovers the rate of increase of regret of [3] and [2], but also provides intermediate rates. For each of these special cases, we provide a sequence of {λt} which achieves the desired rates. Since Theorem 1.1 guarantees that Algorithm 2 is competitive with the best choice of the parameters, we conclude that Algorithm 2 achieves the same rates. Corollary 3.1. Suppose Gt ≤G for all 1 ≤t ≤T. Then for any sequence of convex functions {ft}, the bound on regret of Algorithm 2 is O( √ T). Proof. Let λ1 = √ T and λt = 0 for 1 < t ≤T. By Eq. 2, 1 2 D2λ1:T + T X t=1 (Gt + λtD)2 H1:t + λ1:t ! ≤3 2D2λ1:T + T X t=1 G2 t H1:t + λ1:t ≤3 2D2√ T + T X t=1 G2 √ T = 3 2D2 + G2  √ T. 1Lemma 3.1 effectively describes an algorithm for an online problem with competitive ratio of 2. In the full version of this paper we give a lower bound strictly larger than one on the competitive ratio achievable by any online algorithm for this problem. 5 Hence, the regret of Algorithm 2 can never increase faster than √ T. We now consider the assumptions of [3]. Corollary 3.2. Suppose Ht ≥H > 0 and G2 t < G for all 1 ≤t ≤T. Then the bound on regret of Algorithm 2 is O(log T). Proof. Set λt = 0 for all t. It holds that RT ≤1 2 PT t=1 G2 t H1:t ≤1 2 PT t=1 G tH ≤ G 2H (log T + 1). The above proof also recovers the result of Theorem 2.1. The following Corollary shows a spectrum of rates under assumptions on the curvature of functions. Corollary 3.3. Suppose Ht = t−α and Gt ≤G for all 1 ≤t ≤T. 1. If α = 0, then RT = O(log T). 2. If α > 1/2, then RT = O( √ T). 3. If 0 < α ≤1/2, then RT = O(T α). Proof. The first two cases follow immediately from Corollaries 3.1 and 3.2. For the third case, let λ1 = T α and λt = 0 for 1 < t ≤T. Note that Pt s=1 Hs ≥ R t−1 x=0(x + 1)−αdx = (1 −α)−1t1−α − (1 −α)−1. Hence, 1 2 D2λ1:T + T X t=1 (Gt + λtD)2 H1:t + λ1:t ! ≤3 2D2λ1:T + T X t=1 G2 t H1:t + λ1:t ≤2D2T α + G2(1 −α) T X t=1 1 t1−α −1 ≤2D2T α + 2G2 1 αT α + O(1) = O(T α). 4 Generalization to different norms The original online gradient descent (OGD) algorithm as analyzed by Zinkevich [2] used the Euclidean distance of the current point from the optimum as a potential function. The logarithmic regret bounds of [3] for strongly convex functions were also stated for the Euclidean norm, and such was the presentation above. However, as observed by Shalev-Shwartz and Singer in [5], the proof technique of [3] extends to arbitrary norms. As such, our results above for adaptive regularization carry on to the general setting, as we state below . Our notation follows that of Gentile and Warmuth [6]. Definition 4.1. A function g over a convex set K is called H-strongly convex with respect to a convex function h if ∀x, y ∈K . g(x) ≥g(y) + ∇g(y)⊤(x −y) + H 2 Bh(x, y). Here Bh(x, y) is the Bregman divergence with respect to the function h, defined as Bh(x, y) = h(x) −h(y) −∇h(y)⊤(x −y). This notion of strong convexity generalizes the Euclidean notion: the function g(x) = ∥x∥2 2 is strongly convex with respect to h(x) = ∥x∥2 2 (in this case Bh(x, y) = ∥x −y∥2 2). More generally, the Bregman divergence can be thought of as a squared norm, not necessarily Euclidean, i.e., Bh(x, y) = ∥x −y∥2. Henceforth we also refer to the dual norm of a given norm, defined by ∥y∥∗= sup∥x∥≤1{y⊤x}. For the case of ℓp norms, we have ∥y∥∗= ∥y∥q where q satisfies 1 p + 1 q = 1, and by H¨older’s inequality y⊤x ≤∥y∥∗∥x∥≤1 2∥y∥2 ∗+ 1 2∥x∥2 (this holds for norms other than ℓp as well). 6 For simplicity, the reader may think of the functions g, h as convex and differentiable2. The following algorithm is a generalization of the OGD algorithm to general strongly convex functions (see the derivation in [6]). In this extended abstract we state the update rule implicitly, leaving the issues of efficient computation for the full version (these issues are orthogonal to our discussion, and were addressed in [6] for a variety of functions h). Algorithm 3 General-Norm Online Gradient Descent 1: Input: convex function h 2: Initialize x1 arbitrarily. 3: for t = 1 to T do 4: Predict xt, observe ft. 5: Compute ηt+1 and let yt+1 be such that ∇h(yt+1) = ∇h(xt) −2ηt+1∇ft(xt). 6: Let xt+1 = arg minx∈K Bh(x, yt+1) be the projection of yt+1 onto K. 7: end for The methods of the previous sections can now be used to derive similar, dynamically optimal, bounds on the regret. As a first step, let us generalize the bound of [3], as well as Theorem 2.1, to general norms: Theorem 4.1. Suppose that, for each t, ft is a Ht-strongly convex function with respect to h, and let h be such that Bh(x, y) ≥∥x −y∥2 for some norm ∥· ∥. Let ∥∇ft(xt)∥∗≤Gt for all t. Applying the General-Norm Online Gradient Algorithm with ηt+1 = 1 H1:t , we have RT ≤1 2 T X t=1 G2 t H1:t . Proof. The proof follows [3], with the Bregman divergence replacing the Euclidean distance as a potential function. By assumption on the functions ft, for any x∗∈K, ft(xt) −ft(x∗) ≤∇ft(xt)⊤(xt −x∗) −Ht 2 Bh(x∗, xt). By a well-known property of Bregman divergences (see [6]), it holds that for any vectors x, y, z, (x −y)⊤(∇h(z) −∇h(y)) = Bh(x, y) −Bh(x, z) + Bh(y, z). Combining both observations, 2(ft(xt) −ft(x∗)) ≤2∇ft(xt)⊤(xt −x∗) −HtBh(x∗, xt) = 1 ηt+1 (∇h(yt+1) −∇h(xt))⊤(x∗−xt) −HtBh(x∗, xt) = 1 ηt+1 [Bh(x∗, xt) −Bh(x∗, yt+1) + Bh(xt, yt+1)] −HtBh(x∗, xt) ≤ 1 ηt+1 [Bh(x∗, xt) −Bh(x∗, xt+1) + Bh(xt, yt+1)] −HtBh(x∗, xt), where the last inequality follows from the Pythagorean Theorem for Bregman divergences [6], as xt+1 is the projection w.r.t the Bregman divergence of yt+1 and x∗∈K is in the convex set. Summing over all iterations and recalling that ηt+1 = 1 H1:t , 2RT ≤ T X t=2 Bh(x∗, xt)  1 ηt+1 −1 ηt −Ht  + Bh(x∗, x1)  1 η2 −H1  + T X t=1 1 ηt+1 Bh(xt, yt+1) = T X t=1 1 ηt+1 Bh(xt, yt+1). (4) 2Since the set of points of nondifferentiability of convex functions has measure zero, convexity is the only property that we require. Indeed, for nondifferentiable functions, the algorithm would choose a point ˜xt, which is xt with the addition of a small random perturbation. With probability one, the functions would be smooth at the perturbed point, and the perturbation could be made arbitrarily small so that the regret rate would not be affected. 7 We proceed to bound Bh(xt, yt+1). By definition of Bregman divergence, and the dual norm inequality stated before, Bh(xt, yt+1) + Bh(yt+1, xt) = (∇h(xt) −∇h(yt+1))⊤(xt −yt+1) = 2ηt+1∇ft(xt)⊤(xt −yt+1) ≤η2 t+1∥∇t∥2 ∗+ ∥xt −yt+1∥2. Thus, by our assumption Bh(x, y) ≥∥x −y∥2, we have Bh(xt, yt+1) ≤η2 t+1∥∇t∥2 ∗+ ∥xt −yt+1∥2 −Bh(yt+1, xt) ≤η2 t+1∥∇t∥2 ∗. Plugging back into Eq. (4) we get RT ≤1 2 T X t=1 ηt+1G2 t = 1 2 T X t=1 G2 t H1:t . The generalization of our technique is now straightforward. Let A2 = supx∈K g(x) and 2B = supx∈K ∥∇g(x)∥∗. The following algorithm is an analogue of Algorithm 2 and Theorem 4.2 is the analogue of Theorem 1.1 for general norms. Algorithm 4 Adaptive General-Norm Online Gradient Descent 1: Initialize x1 arbitrarily. Let g(x) be 1-strongly convex with respect to the convex function h. 2: for t = 1 to T do 3: Predict xt, observe ft 4: Compute λt = 1 2 q (H1:t + λ1:t−1)2 + 8G2 t/(A2 + 2B2) −(H1:t + λ1:t−1)  . 5: Compute ηt+1 = (H1:t + λ1:t)−1. 6: Let yt+1 be such that ∇h(yt+1) = ∇h(xt) −2ηt+1(∇ft(xt) + λt 2 ∇g(xt))). 7: Let xt+1 = arg minx∈K Bh(x, yt+1) be the projection of yt+1 onto K. 8: end for Theorem 4.2. Suppose that each ft is a Ht-strongly convex function with respect to h, and let g be a 1-strongly convex with respect h. Let h be such that Bh(x, y) ≥∥x −y∥2 for some norm ∥· ∥. Let ∥∇ft(xt)∥∗≤Gt. The regret of Algorithm 4 is bounded by RT ≤ inf λ∗ 1,...,λ∗ T (A2 + 2B2)λ∗ 1:T + T X t=1 (Gt + λ∗ t B)2 H1:t + λ∗ 1:t ! . If the norm in the above theorem is the Euclidean norm and g(x) = ∥x∥2, we find that D = supx∈K ∥x∥= A = B and recover the results of Theorem 1.1. References [1] Nicol`o Cesa-Bianchi and G´abor Lugosi. Prediction, Learning, and Games. Cambridge University Press, 2006. [2] Martin Zinkevich. Online convex programming and generalized infinitesimal gradient ascent. In ICML, pages 928–936, 2003. [3] Elad Hazan, Adam Kalai, Satyen Kale, and Amit Agarwal. Logarithmic regret algorithms for online convex optimization. In COLT, pages 499–513, 2006. [4] Shai Shalev-Shwartz and Yoram Singer. Convex repeated games and Fenchel duality. In B. Sch¨olkopf, J. Platt, and T. Hoffman, editors, Advances in Neural Information Processing Systems 19. MIT Press, Cambridge, MA, 2007. [5] Shai Shalev-Shwartz and Yoram Singer. Logarithmic regret algorithms for strongly convex repeated games. In Technical Report 2007-42. The Hebrew University, 2007. [6] C. Gentile and M. K. Warmuth. Proving relative loss bounds for on-line learning algorithms using Bregman divergences. In COLT. Tutorial, 2000. 8
2007
147
3,178
Fast Variational Inference for Large-scale Internet Diagnosis John C. Platt Emre Kıcıman Microsoft Research 1 Microsoft Way Redmond, WA 98052 {jplatt,emrek,dmaltz}@microsoft.com David A. Maltz Abstract Web servers on the Internet need to maintain high reliability, but the cause of intermittent failures of web transactions is non-obvious. We use approximate Bayesian inference to diagnose problems with web services. This diagnosis problem is far larger than any previously attempted: it requires inference of 104 possible faults from 105 observations. Further, such inference must be performed in less than a second. Inference can be done at this speed by combining a mean-field variational approximation and the use of stochastic gradient descent to optimize a variational cost function. We use this fast inference to diagnose a time series of anomalous HTTP requests taken from a real web service. The inference is fast enough to analyze network logs with billions of entries in a matter of hours. 1 Introduction Internet content providers, such as MSN, Google and Yahoo, all depend on the correct functioning of the wide-area Internet to communicate with their users and provide their services. When these content providers lose network connectivity with some of their users, it is critical that they quickly resolve the problem, even if the failure lies outside their own systems. 1 One challenge is that content providers have little direct visibility into the wide-area Internet infrastructure and the causes of user request failures. Requests may fail because of problems in the content provider’s systems or faults in the network infrastructure anywhere between the user and the content provider, including routers, proxies, firewalls, and DNS servers. Other failing requests may be due to denial of service attacks or bugs in the user’s software. To compound the diagnosis problem, these faults may be intermittent: we must use probabilistic inference to perform diagnosis, rather than using logic. A second challenge is the scale involved. Not only do popular Internet content providers receive billions of HTTP requests a week, but the number of potential causes of failure are numerous. Counting only the coarse-grained Autonomous Systems (ASes) through which users receive Internet connectivity, there are over 20k potential causes of failure. In this paper, we show that approximate Bayesian inference scales to handle this high rate of observations and accurately estimates the underlying failure rates of such a large number of potential causes of failure. To scale Bayesian inference to Internet-sized problems, we must make several simplifying approximations. First, we introduce a bipartite graphical model using overlapping noisyORs, to model the interactions between faults and observations. Second, we use mean1A loss of connectivity to users translates directly into lost revenue and a sullied reputation for content providers, even if the cause of the problem is a third-party network component. 1 field variational inference to map the diagnosis problem to a reasonably-sized optimization problem. Third, we further approximate the integral in the variational method. Fourth, we speed up the optimization problem using stochastic gradient descent. The paper is structured as follows: Section 1.1 discusses related work to this paper. We describe the graphical model in Section 2, and the approximate inference in that model in Section 2.1, including stochastic gradient descent (in Section 3). We present inference results on synthetic and real data in Section 4 and then draw conclusions. 1.1 Previous Work The original application of Bayesian diagnosis was medicine. One of the original diagnosis network was QMR-DT [14], a bipartite graphical model that used noisy-OR to model symptoms given diseases. Exact inference in such networks is intractable (exponential in the number of positive symptoms,[2]), so different approximation and sampling algorithms were proposed. Shwe and Cooper proposed likelihood-weighted sampling [13], while Jaakkola and Jordan proposed using a variational approximation to unlink each input to the network [3]. With only thousands of possible symptoms and hundreds of diseases, QMR-DT was considered very challenging. More recently, researchers have applied Bayesian techniques for the diagnosis of computers and networks [1][12][16]. This work has tended to avoid inference in large networks, due to speed constraints. In contrast, we attack the enormous inference problem directly. 2 Graphical model of diagnosis Noisy OR Beta Bernoulli Figure 1: The full graphical model for the diagnosis of Internet faults The initial graphical model for diagnosis is shown in Figure 1. Starting at the bottom, we observe a large number of binary random variables, each corresponding to the success/failure of a single HTTP request. The failure of an HTTP request can be modeled as a noisy-OR [11] of a set of Bernoulli-distributed binary variables, each of which models the underlying factors that can cause a request to fail: P(Vi = fail|Dij) = 1 −(1 −ri0) Y j (1 −rijdij), (1) where rij is the probability that the observation is a failure if a single underlying fault dij is present. The matrix rij is typically very sparse, because there are only a small number of possible causes for the failure of any request. The ri0 parameter models the probability of a spontaneous failure without any known cause. The rij are set by elicitation of probabilities from an expert. The noisy-OR models the causal structure in the network, and its connections are derivable from the metadata associated with the HTTP request. For example, a single request can fail 2 Figure 2: Graphical model after integrating out instantaneous faults: a bipartite noisy-OR network with Beta distributions as hidden variables because its server has failed, or because a misconfigured or overloaded router can cause an AS to lose connectivity to the content provider, or because the user agent is not compatible with the service. All of these underlying causes are modeled independently for each request, because possible faults in the system can be intermittent. Each of the Bernoulli variables Dij depends on an underlying continuous fault rate variable Fj ∈[0, 1]: P(Dij|Fj = µj) = µdij j (1 −µj)1−dij, (2) where µj is the probability of a fault manifesting at any time. We model the Fj as independent Beta distributions, one for each fault: p(Fj = µj) = 1 B(α0 j, β0 j )µ α0 j−1 j (1 −µj)β0 j −1, (3) where B is the beta function. The fan-out for each of these fault rates can be different: some of these fault rates are connected to many observations, while less common ones are connected to fewer. Our goal is to model the posterior distribution P(⃗F|⃗V ) in order to identify hidden faults and track them through time. The existence of the Dij random variable is a nuisance. We do not want to estimate P( ⃗D|⃗V ) for any Dij: the distribution of instantaneous problems is not interesting. Fortunately, we can exactly integrate out these nuisance variables, because they are connected to only one observation thru a noisy-OR. After integrating out the Dij, the graphical model is shown in Figure 2. The model is now completely analogous to the QMR-DT mode [14], but instead of the noisy-OR combining binary random variables, they combine rate variables: P(Vi = fail|Fj = µj) = 1 −(1 −ri0) Y j (1 −rijµj). (4) One can view (4) as a generalization of a noisy-OR to continuous [0, 1] variables. 2.1 Approximations to make inference tractable In order to scale inference up to 104 hidden variables, and 105 observations, we choose a simple, robust approximate inference algorithm: mean-field variational inference [4]. Meanfield variational inference approximates the posterior P(⃗F|⃗V ) with a factorized distribution. For inferring fault rates, we choose to approximate P with a product of beta distributions Q(⃗F|⃗V ) = Y j q(Fj|⃗V ) = Y j 1 B(αj, βj)µαj−1 j (1 −µj)βj−1. (5) 3 Mean-field variational inference maximizes a lower bound on the evidence of the model: max ⃗α,⃗β L = Z Q(⃗µ|⃗V ) log P(⃗V |⃗µ)p(⃗µ) Q(⃗µ|⃗V ) d⃗µ. (6) This integral can be broken into two terms: a cross-entropy between the approximate posterior and the prior, and an expected log-likelihood of the observations: max ⃗α,⃗β L = − Z Q(⃗µ|⃗V ) log Q(⃗µ|⃗V ) p(⃗µ) d⃗µ + D log P(⃗V |⃗F) E Q . (7) The first integral is the negative of a sum of cross-entropies between Beta distributions with a closed form: DKL(qj||pj) = log B(α0 j, β0 j ) B(αj, βj) ! + (αj −α0 j)ψ(αj) (8) +(βj −β0 j )ψ(βj) −(αj + βj −α0 j −β0 j )ψ(αj + βj), where ψ is the digamma function. However, the expected log likelihood of a noisy-OR integrated over a product of Beta distributions does not have an analytic form. Therefore, we employ the MF(0) approximation of Ng and Jordan [9], replacing the expectation of the log likelihood with the log likelihood of the expectation. The second term then becomes the sum of a set of log likelihoods, one per observation: L(Vi) = ( log  1 −(1 −ri0) Q j[1 −rijαj/(αj + βj)]  if Vi = 1 (failure); log(1 −ri0) + P j log[1 −rijαj/(αj + βj)] if Vi = 0 (success). (9) For the Internet diagnosis case, the MF(0) approximation is reasonable: we expect the posterior distribution to be concentrated around its mean, due to the large amount of data that is available. Ng and Jordan [9] have have proved accuracy bounds for MF(0) based on the number of parents that an observation has. The final cost function for a minimization routine then becomes min ⃗α,⃗β C = X j DKL(qj||pj) − X i L(Vi). (10) 3 Variational inference by stochastic gradient descent In order to apply unconstrained optimization algorithms to minimize (10), we need transform the variables: only positive αj and βj are valid, so we parameterize them by αj = eaj, βj = ebj. (11) and the gradient computation becomes ∂C ∂aj = αj  X j ∂DKL(qj||pj) ∂αj − X i ∂L(Vi) ∂αj  . (12) with a similar gradient for bj. Note that this gradient computation can be quite computationally expensive, given that i sums over all of the observations. For Internet diagnosis, we can decompose the observation stream into blocks, where the size of the block is determined by how quickly the underlying rates of faults change, and how finely we want to sample those rates. We typically use blocks of 100,000 observations, which can make the computation of the gradient expensive. Further, we repeat the inference over and over again, on thousands of blocks of data: we prefer a fast optimization procedure over a highly accurate one. Therefore, we investigated the use of stochastic gradient descent for optimizing the variational cost function. Stochastic gradient descent approximates the full gradient with a 4 Algorithm 1 Variational Gradient Descent Require: Noisy-OR parameters rij, priors α0 j, β0 j , observations Vi Initialize aj = log(α0 j), bj = log(β0 j ) Initialize yi, zj to 0 for k = 1 to number of epochs do for all Faults j do αj = exp(aj), βj = exp(bj) yj ←ξyj + (1 −ξ)∂DKL(qj||pj; αj, βj)/∂aj zj ←ξzj + (1 −ξ)∂DKL(qj||pj; αj, βj)/∂bj aj ←aj −ηyj bj ←bj −ηzj end for for all Observations i do for all Parent faults j of observation vi do αj = exp(aj), βj = exp(bj) end for for all Parent faults j of observation vi do yj ←ξyj −(1 −ξ)∂L(Vi; ⃗α, ⃗β)/∂aj zj ←ξzj −(1 −ξ)∂L(Vi; ⃗α, ⃗β)/∂bj aj ←aj −ηyj bj ←bj −ηzj end for end for end for single term from the gradient: the state of the optimization is updated using that single term [5]. This enables the system to converge quickly to an approximate answer. The details of stochastic gradient descent are shown in Algorithm 1. Estimating the sum in equation (12) with a single term adds a tremendous amount of noise to the estimates. For example, the sign of a single L(Vi) gradient term depends only on the sign of Vi. In order to reduce the noise in the estimate, we use momentum [15]: we exponentially smooth the gradient with a first-order filter before applying it to the state variables. This momentum modification is shown in Algorithm 1. We typically use a large step size (η = 0.1) and momentum term (ξ = 0.99), in order to both react quickly to changes in the fault rate and to smooth out noise. Stochastic gradient descent can be used as a purely on-line method (where each data point is seen only once), setting the “number of epochs” in Algorithm 1 to 1. Alternatively, it can get higher accuracy if it is allowed to sweep through the data multiple times. 3.1 Other possible approaches We considered and tested several other approaches to solving the approximate inference problem. Jaakkola and Jordan propose a variational inference method for bipartite noisy-OR networks [3], where one variational parameter is introduced to unlink one observation from the network. We typically have far more observations than possible faults: this previous approach would have forced us to solve very large optimization problems (with 100,000 parameters). Instead, we solve an optimization that has dimension equal to the number of faults. We originally optimized the variational cost function (10) with both BFGS and the trustregion algorithm in the Matlab optimization toolbox. This turned out to be far worse than stochastic gradient descent. We found that a C# implementation of L-BFGS, as described in Nocedal and Wright [10] sped up the exact optimization by orders of magnitude. We report on the L-BFGS performance, below: it is within 4x the speed of the stochastic gradient descent. 5 We experimented with Metropolis-Hastings to sample from the posterior, using a Gaussian random walk in (aj, bj). We found that the burn-in time was very long. Also, each update is slow, because the speed of a single update depends on the fan-out of each fault. In the Internet diagnosis network, the fan-out is quite high (because a single fault affects many observations). Thus, Metropolis-Hastings was far slower than variational inference. We did not try loopy belief propagation [8], nor expectation propagation [6]. Because the Beta distribution is not conjugate to the noisy OR, the messages passed by either algorithm do not have a closed form. Finally, we did not try the idea of learning to predict the posterior from the observations by sampling from the generative model and learning the reverse mapping [7]. For Internet diagnosis, we do not know the structure of graphical model for a block of data ahead of time: the structure depends on the metadata for the requests in the log. Thus, we cannot amortize the learning time of a predictive model. 4 Results We test the approximations and optimization methods used for Internet diagnosis on both synthetic and real data. 4.1 Synthetic data with known hidden state Testing the accuracy of approximate inference is very difficult, because, for large graphical models, the true posterior distribution is intractable. However, we can probe the reliability of the model on a synthetic data set. We start by generating fault rates from a prior (here, 2000 faults drawn from Beta(5e3,1)). We randomly generate connections from faults to observations, with probability 5 × 10−3. Each connection has a strength rij drawn randomly from [0, 1]. We generate 100,000 observations from the noisy-OR model (4). Given these observations, we predict an approximate posterior. Given that the number of observations is much larger than the number of faults, we expect that the posterior distribution should tightly cluster around the rate that generated the observations. Difference between the true rate and the mean of the approximate posterior should reflect inaccuracies in the estimation. -0.12 -0.1 -0.08 -0.06 -0.04 -0.02 0 0.02 0.04 0.06 0.08 0 0.1 0.2 0.3 0.4 0.5 0.6 0.7 0.8 0.9 Error of rate estimate Figure 3: The error in estimate of rate versus true underlying rate. Black dots are L-BFGS, Red dots are Stochastic Gradient Descent with 20 epochs. The results for a run is shown in Figure 3. The figure shows that the errors in the estimate are small enough to be very useful for understanding network errors. There is a slight systematic bias in the stochastic gradient descent, as compared to L-BFGS. However, the improvement in speed shown in Table 1 is worth the loss of accuracy: we need inference to 6 be as fast as possible to scale to billions of samples. The run times are for a uniprocessor Pentium 4, 3 GHz, with code in C#. Algorithm Accuracy Time (RMSE) (CPU sec) L-BFGS 0.0033 38 SGD, 1 epoch 0.0343 0.5 SGD, 20 epochs 0.0075 11.7 Table 1: Accuracy and speed on synthetic data set 4.2 Real data from web server logs We then tested the algorithm on real data from a major web service. Each observation consists of a success or failure of a single HTTP request. We selected 18848 possible faults that occur frequently in the dataset, including the web server that received the request, which autonomous system that originated the request, and which “user agent” (brower or robot) generated the request. We have been analyzing HTTP logs collected over several months with the stochastic gradient descent algorithm. In this paper, we present an analysis of a short 2.5 hour window containing an anomalously high rate of failures, in order to demonstrate that our algorithm can help us understand the cause of failures based on observations in a real-world environment. We broke the time series of observations into blocks of 100,000 observations, and inferred the hidden rates for each block. The initial state of the optimizer was set to be the state of the optimizer at convergence of the previous block. Thus, for stochastic gradient descent, the momentum variables were carried forward from block to block. 0 0.1 0.2 0.3 0.4 0.5 0.6 0.7 0.8 0.9 1 8:00 PM 8:29 PM 8:57 PM 9:26 PM 9:55 PM 10:24 PM 10:53 PM 11:21 PM Figure 4: The inferred fault rate for two Autonomous Systems, as a function of time. These are the only two faults with high rate. The results of this tracking experiment are shown in Figure 4. In this figure, we used stochastic gradient descent and a Beta(0.1,100) prior. The figure shows the only two faults whose probability went higher than 0.1 in this time interval: they correspond to two ASes in the same city, both causing failures at roughly the same time. This could be due to a router that is in common between them, or perhaps an denial of service attack that originated in that city. The speed of the analysis is much faster than real time. For a data set of 10 million samples, L-BFGS required 209 CPU seconds, while SGD (with 3 passes of data per block) only required 51 seconds. This allows us to go through logs containing billions of entries in a matter of hours. 7 5 Conclusions This paper presents high-speed variational inference to diagnose problems on the scale of the Internet. Given observations at a web server, the diagnosis can determine whether a web server needs rebooting, whether part of the Internet is broken, or whether the web server is compatible with a browser or user agent. In order to scale inference up to Internet-sized diagnosis problems, we make several approximations. First, we use mean-field variational inference to approximate the posterior distribution. The expected log likelihood inside of the variational cost function is approximated with the MF(0) approximation. Finally, we use stochastic gradient descent to perform the variational optimization. We are currently using variational stochastic gradient descent to analyze logs that contain billions of requests. We are not aware of any other applications of variational inference at this scale. Future publications will include conclusions of such analysis, and implications for web services and the Internet at large. References [1] M. Chen, A. X. Zheng, J. Lloyd, M. I. Jordan, and E. Brewer. Failure diagnosis using decision trees. In Proc. Int’l. Conf. Autonomic Computing, pages 36–43, 2004. [2] D. Heckerman. A tractable inference algorithm for diagnosing multiple diseases. In Proc. UAI, pages 163–172, 1989. [3] T. Jaakkola and M. Jordan. Variational probabilistic inference and the QMR-DT database. Journal of Artificial Intelligence Research, 10:291–322, 1999. [4] M. I. Jordan, Z. Ghahramani, T. S. Jaakkola, and L. K. Saul. An introduction to variational methods for graphical models. Machine Learning, 37:183–233, 1999. [5] H. J. Kushner and G. G. Yin. Stochastic Approximation and Recursive Algorithms and Applications. Springer-Verlag, 2003. [6] T. P. Minka. Expectation propagation for approximate bayesian inference. In Proc. UAI, pages 362–369, 2001. [7] Q. Morris. Recognition networks for approximate inference in BN20 networks. In Proc. UAI, pages 370–37, 2001. [8] K. P. Murphy, Y. Weiss, and M. I. Jordan. Loopy belief propagation for approximate inference: An empirical study. In Proc. UAI, pages 467–475, 1999. [9] A. Y. Ng and M. Jordan. Approximate inference algorithms for two-layer bayesian networks. In Proc. NIPS, pages 533–539, 1999. [10] J. Nocedal and S. J. Wright. Numerical Optimization. Springer, 2nd edition, 2006. [11] J. Pearl. Probabilistic Reasoning In Intelligent Systems: Networks of Plausible Inference. Morgan Kaufmann, 1988. [12] I. Rish, M. Brodie, and S. Ma. Accuracy vs. efficiency tradeoffs in probabilistic diagnosis. In Proc. AAAI, pages 560–566, 2001. [13] M. A. Shwe and G. F. Cooper. An empirical analysis of likelihood-weighting simulation on a large, multiply-connected medical belief network. Computers and Biomedical Research, 24(5):453–475, 1991. [14] M. A. Shwe, B. Middleton, D. E. Heckerman, M. Henrion, E. J. Horvitz, H. P. Lehmann, and G. F. Cooper. Probabilistic diagnosis using a reformulation of the INTERNIST1/QMR knowledge base. Methods of Information in Medicine, 30(4):241–255, 1991. [15] J. J. Shynk and S. Roy. The LMS algorithm with momentum updating. In Proc. Intl. Symp. Circuits and Systems, pages 2651–2654, 1988. [16] M. Steinder and A. Sethi. End-to-end service failure diagnosis using belief networks. In Proc. Network Operations and Management Symposium, pages 375–390, 2002. 8
2007
148
3,179
Learning and using relational theories Charles Kemp, Noah D. Goodman & Joshua B. Tenenbaum Department of Brain and Cognitive Sciences, MIT, Cambridge, MA 02139 {ckemp,ndg,jbt}@mit.edu Abstract Much of human knowledge is organized into sophisticated systems that are often called intuitive theories. We propose that intuitive theories are mentally represented in a logical language, and that the subjective complexity of a theory is determined by the length of its representation in this language. This complexity measure helps to explain how theories are learned from relational data, and how they support inductive inferences about unobserved relations. We describe two experiments that test our approach, and show that it provides a better account of human learning and reasoning than an approach developed by Goodman [1]. What is a theory, and what makes one theory better than another? Questions like these are of obvious interest to philosophers of science but are also discussed by psychologists, who have argued that everyday knowledge is organized into rich and complex systems that are similar in many respects to scientific theories. Even young children, for instance, have systematic beliefs about domains including folk physics, folk biology, and folk psychology [2]. Intuitive theories like these play many of the same roles as scientific theories: in particular, both kinds of theories are used to explain and encode observations of the world, and to predict future observations. This paper explores the nature, use and acquisition of simple theories. Consider, for instance, an anthropologist who has just begun to study the social structure of a remote tribe, and observes that certain words are used to indicate relationships between selected pairs of individuals. Suppose that term T1(·, ·) can be glossed as ancestor(·, ·), and that T2(·, ·) can be glossed as friend(·, ·). The anthropologist might discover that the first term is transitive, and that the second term is symmetric with a few exceptions. Suppose that term T3(·, ·) can be glossed as defers to(·, ·), and that the tribe divides into two castes such that members of the second caste defer to members of the first caste. In this case the anthropologist might discover two latent concepts (caste 1(·) and caste 2(·)) along with the relationship between these concepts. As these examples suggest, a theory can be defined as a system of laws and concepts that specify the relationships between the elements in some domain [2]. We will consider how these theories are learned, how they are used to encode relational data, and how they support predictions about unobserved relations. Our approach to all three problems relies on the notion of subjective complexity. We propose that theory learners prefer simple theories, that people remember relational data in terms of the simplest underlying theory, and that people extend a partially observed data set according to the simplest theory that is consistent with their observations. There is no guarantee that a single measure of subjective complexity can do all of the work that we require [3]. This paper, however, explores the strong hypothesis that a single measure will suffice. Our formal treatment of subjective complexity begins with the question of how theories are mentally represented. We suggest that theories are represented in some logical language, and propose a specific first-order language that serves as a hypothesis about the “language of thought.” We then pursue the idea that the subjective complexity of a theory corresponds to the length of its representation in this language. Our approach therefore builds on the work of Feldman [4], and is related to other psychological applications of the notion of Kolmogorov complexity [5]. The complexity measure we describe can be used to define a probability distribution over a space of theories, and we develop a model of theory acquisition by using this distribution as the prior for a Bayesian learner. We also 1 (a) Star (b) Bipartite (c) Exception (d) Symmetric (e) Transitive (f) Random 17 27 37 47 57 18 28 38 48 58 26 36 46 56 11 R(X, X). R(X, 1). R(X, Y) ←¯T(X), T(Y). T(6). T(7). T(8). T(6). T(7). T(8). R(X, Y) ←¯T(X), T(Y). R(1, 1). ¯R(1, 6). 16 26 36 46 56 15 25 35 45 14 24 34 13 23 12 61 26 63 46 56 51 52 35 54 14 24 34 13 32 21 R(5, X). R(X, 4). R(2, 1). R(1, 3). R(6, 1). R(3, 2). R(2, 6). R(3, 5). R(6, 3). R(4, 6). ¯R(X, X). ¯R(6, 4). ¯R(5, 3). 21 31 41 51 61 71 81 22 33 44 55 66 77 88 11 16 26 36 46 56 18 28 38 48 58 17 27 37 47 57 12 21 56 65 24 42 13 31 11 22 33 44 55 66 77 R(1, 2). R(1, 3). R(2, 4). R(5, 6). R(X, X). R(X, Y) ←R(Y, X). R(1, 2). R(2, 3). R(3, 4). R(4, 5). R(5, 6). R(X, Z) ←R(X, Y), R(Y, Z). Figure 1: Six possible extensions for a binary predicate R(·, ·). In each case, the objects in the domain are represented as digits, and a pair such as 16 indicates that R(1, 6) is true. Below each set of pairs, the simplest theory according to our complexity measure is shown. show how the same Bayesian approach helps to explain how theories support inductive generalization: given a set of observations, future observations (e.g. whether one individual defers to another) can be predicted using the posterior distribution over the space of theories. We test our approach by developing two experiments where people learn and make predictions about binary and ternary relations. As far as we know, the approach of Goodman [1] is the only other measure of theory complexity that has previously been tested as a psychological model [6]. We show that our experiments support our approach and raise challenges for this alternative model. 1 Theory complexity: a representation length approach Intuitive theories correspond to mental representations of some sort, and our first task is to characterize the elements used to build these representations. We explore the idea that a theory is a system of statements in a logical language, and six examples are shown in Fig. 1. The theory in Fig. 1b is related to the defers to(·, ·) example already described. Here we are interested in a domain including 9 elements, and a two place predicate R(·, ·) that is true of all and only the 15 pairs shown. R is defined using a unary predicate T which is true of only three elements: 6, 7, and 8. The theory includes a clause which states that R(X, Y) is true for all pairs XY such that T(X) is false and T(Y) is true. The theory in Fig. 1c is very similar, but includes an additional clause which specifies that R(1, 1) is true, and an exception which specifies that R(1, 6) is false. Formally, each theory we consider is a collection of function-free definite clauses. All variables are universally quantified: for instance, the clause R(X, Z) ←R(X, Y), R(Y, Z) is equivalent to the logical formula ∀x ∀y ∀z (R(x, z) ←R(x, y) ∧R(y, z)). For readability, the theories in Fig. 1 include parentheses and arrows, but note that these symbols are unnecessary and can be removed. Our proposed language includes only predicate symbols, variable symbols, constant symbols, and a period that indicates when one clause finishes and another begins. Each theory in Fig. 1 specifies the extension of one or more predicates. The extension of predicate P is defined in terms of predicate P+ (which captures the basic rules that lead to membership in P) and predicate P−(which captures exceptions to these rules). The resulting extension of P is defined 2 as P+ \ P−, or the set difference of P+ and P−.1 Once P has been defined, later clauses in the theory may refer to P or its negation ¯P. To ensure that our semantics is well-defined, the predicates in any valid theory must permit an ordering so that the definition of any predicate does not refer to predicates that follow it in the order. Formally, the definition of each predicate P+ or P−can refer only to itself (recursive definitions are allowed) and to any predicate M or ¯M where M < P. Once we have committed to a specific language, the subjective complexity of a theory is assumed to correspond to the number of symbols in its representation. We have chosen a language where there is one symbol for each position in a theory where a predicate, variable or constant appears, and one symbol to indicate when each clause ends. Given this language, the subjective complexity c(T) of theory T is equal to the sum of the number of clauses in the theory and the number of positions in the theory where a predicate, variable or constant appears: c(T) = #clauses(T) + #pred slots(T) + #var slots(T) + #const slots(T). (1) For instance, the clause R(X, Z) ←R(X, Y), R(Y, Z). contributes ten symbols towards the complexity of a theory (three predicate symbols, six variable symbols, and one period). Other languages might be considered: for instance, we could use a language which uses five symbols (e.g. five bits) to represent each predicate, variable and constant, and one symbol (e.g. one bit) to indicate the end of a clause. Our approach to subjective complexity depends critically on the representation language, but once a language has been chosen the complexity measure is uniquely specified. Although our approach is closely related to the notion of Kolmogorov complexity and to Minimum Message Length (MML) and Minimum Description Length (MDL) approaches, we refer to it as a Representation Length (RL) approach. A RL approach includes a commitment to a specific language that is proposed as a psychological hypothesis, but these other approaches aspire towards results that do not depend on the language chosen.2 It is sometimes suggested that the notion of Kolmogorov complexity provides a more suitable framework for psychological research than the RL approach, precisely because it allows for results that do not depend on a specific description language [8]. We subscribe to the opposite view. Mental representations presumably rely on some particular language, and identifying this language is a central challenge for psychological research. The language we described should be considered as a tentative approximation of the language of thought. Other languages can and should be explored, but our language has several appealing properties. Feldman [4] has argued that definite clauses are psychologically natural, and working with these representations allows our approach to account for several classic results from the concept learning literature. For instance, our language leads to the prediction that conjunctive concepts are easier to learn than disjunctive concepts [9].3 Working with definite clauses also ensures that each of our theories has a unique minimal model, which means that the extension of a theory can be defined in a particularly simple way. Finally, human learners deal gracefully with noise and exceptions, and our language provides a simple way to handle exceptions. Any concrete proposal about the language of thought should make predictions about memory, learning and reasoning. Suppose that data set D lists the extensions of one or more predicates, and that a theory is a “candidate theory” for D if it correctly defines the extensions of all predicates in D. Note that a candidate theory may well include latent predicates—predicates that do not appear in D, but are useful for defining the predicates that have been observed. We will assume that humans encode D in terms of the simplest candidate theory for D, and that the difficulty of memorizing D is determined by the subjective complexity of this theory. Our approach can and should be tested against classic results from the memory literature. Unlike some other approaches to complexity [10], for instance, our model predicts that a sequence of k items is about equally easy to remember regardless of whether the items are drawn from a set of size 2, a set of size 10, or a set of size 1000 [11]. 1The extension of P+ is the smallest set that satisfies all of the clauses that define P+, and the extension of P−is defined similarly. To simplify our notation, Fig. 1 uses P to refer to both P and P+, and ¯P to refer to ¯P and P−. Any instance of P that appears in a clause defining P is really an instance of P+, and any instance of ¯P that appears in a clause defining ¯P is really an instance of P−. 2MDL approaches also commit to a specific language, but this language is often intended to be as general as possible. See, for instance, the discussion of universal codes in Gr¨unwald et al. [7]. 3A conjunctive concept C(·) can be defined using a single clause: C(X) ←A(X), B(X). The shortest definition of a disjunctive concept requires two clauses: D(X) ←A(X). D(X) ←B(X). 3 To develop a model of inductive learning and reasoning, we take a Bayesian approach, and use our complexity measure to define a prior distribution over a hypothesis space of theories: P(T) ∝ 2−c(T ).4 Given this prior distribution, we can use Bayesian inference to make predictions about unobserved relations and to discover the theory T that best accounts for the observations in data set D [12, 13]. Suppose that we have a likelihood function P(D|T) which specifies how the examples in D were generated from some underlying theory T. The best explanation for the data D is the theory that maximizes the posterior distribution P(T|D) ∝P(D|T)P(T). If we need to predict whether ground term g is likely to be true, 5 we can sum over the space of theories: P(g|D) = X T P(g|T)P(T|D) = 1 P(D) X T :g∈T P(D|T)P(T) (2) where the final sum is over all theories T that make ground term g true. 1.1 Related work The theories we consider are closely related to logic programs, and methods for Inductive Logic Programming (ILP) explore how these programs can be learned from examples [14]. ILP algorithms are often inspired by the idea of searching for the shortest theory that accounts for the available data, and ILP is occasionally cast as the problem of minimizing an explicit MDL criterion [10]. Although ILP algorithms are rarely considered as cognitive models, the RL approach has a long psychological history, and is proposed by Chomsky [15] and Leeuwenberg [16] among others. Formal measures of complexity have been developed in many fields [17], and there is at least one other psychological account of theory complexity. Goodman [1] developed a complexity measure that was originally a philosophical proposal about scientific theories, but was later tested as a model of subjective complexity [6]. A detailed description of this measure is not possible here, but we attempt to give a flavor of the approach. Suppose that a basis is a set of predicates. The starting point for Goodman’s model is the intuition that basis B1 is at least as complex as basis B2 if B1 can be used to define B2. Goodman argues that this intuition is flawed, but his model is founded on a refinement of this intuition. For instance, since the binary predicate in Fig. 1b can be defined in terms of two unary predicates, Goodman’s approach requires that the complexity of the binary predicate is no more than the sum of the complexities of the two unary predicates. We will use Goodman’s model as a baseline for evaluating our own approach, and a comparison between these two models should be informed by both theoretical and empirical considerations. On the theoretical side, our approach relies on a simple principle for deciding which structural properties are relevant to the measurement of complexity: the relevant properties are those with short logical representations. Goodman’s approach incorporates no such principle, and he proposes somewhat arbitrarily that reflexivity and symmetry are among the relevant structural properties but that transitivity is not. A second reason for preferring our model is that it makes contact with a general principle—the idea that simplicity is related to representation length—that has found many applications across psychology, machine learning, and philosophy. 2 Experimental results We designed two experiments to explore settings where people learn, remember, and make inductive inferences about relational data. Although theories often consist of systems of many interlocking relations, we keep our experiments simple by asking subjects to learn and reason about a single relation at a time. Despite this restriction, our experiments still make contact with several issues raised by systems of relations. As the defers to(·, ·) example suggests, a single relation may be best explained as the observable tip of a system involving several latent predicates (e.g. caste 1(·) and caste 2(·)). 4To ensure that this distribution can be normalized, we assume that there is some upper bound on the number of predicate symbols, variable symbols, and constants, and on the length of the theories we will consider. There will therefore be a finite number of possible theories, and our prior will be a valid probability distribution. 5A ground term is a term such as R(8, 9) that does not include any variables. 4 0 100 200 300 Learning time star bprt excp sym trans rand 0 2 4 6 Complexity (Human) star bprt excp sym trans rand 0 20 40 Complexity (RL) star bprt excp sym trans rand 0 2 4 Complexity (Goodman) star bprt excp sym trans rand Figure 2: (a) Average time in seconds to learn the six sets in Fig. 1. (b) Average ratings of set complexity. (c) Complexity scores according to our representation length (RL) model. (d) Complexity scores according to Goodman’s model. 2.1 Experiment 1: memory and induction In our first experiment, we studied the subjective complexity of six binary relations that display a range of structural properties, including reflexivity, symmetry, and transitivity. Materials and Methods. 18 adults participated in this experiment. Subjects were required to learn the 6 sets shown in Fig. 1, and to make inductive inferences about each set. Although Fig. 1 shows pairs of digits, the experiment used letter pairs, and the letters for each condition and the order in which these conditions were presented were randomized across subjects. The pairs for each condition were initially laid out randomly on screen, and subjects could drag them around and organize them to help them understand the structure of the set. At any stage, subjects could enter a test phase where they were asked to list the 15 pairs belonging to the current set. Subjects who made an error on the test were returned to the learning phase. After 9 minutes had elapsed, subjects were allowed to pass the test regardless of how many errors they made. After passing the test, subjects were asked to rate the complexity of the set compared to other sets with 15 pairs. Ratings were provided on a 7 point scale. Subjects were then asked to imagine that a new letter (e.g. letter 9) had belonged to the current alphabet, and were given two inductive tasks. First they were asked to enter between 1 and 10 novel pairs that they might have expected to see (each novel pair was required to include the new letter). Next they were told about a novel pair that belonged to the set (e.g. pair 91), and were again asked to enter up to 10 additional pairs that they might have expected to see. Results. The average time needed to learn each set is shown in Fig. 2a, and ratings of set complexity are shown in Fig. 2b. It is encouraging that these measures yield converging results, but they may be confounded since subjects rated the complexity of a set immediately after learning it. The complexities plotted in Fig. 2c are the complexities of the theories shown in Fig. 1, which we believe to be the simplest theories according to our complexity measure. The final plot in Fig. 2 shows complexities according to Goodman’s model, which assigns each binary relation an integer between 0 and 4. There are several differences between these models: for instance, Goodman’s account incorrectly predicts that the exception case is the hardest of the six, but our model acknowledges that a simple theory remains simple if a handful of exceptions are added. Goodman’s account also predicts that transitivity is not an important structural regularity, but our model correctly predicts that the transitive set is simpler than the same set with some of the pairs reversed (the random set). Results for the inductive task are shown in Fig. 3. The first two columns show the number of subjects who listed each novel pair. The remaining two columns show the probability of set membership predicted by our model. To generate these predictions, we applied Equation 2 and summed over a set of theories created by systematically extending the theories shown in Fig. 1. Each extended theory includes up to one additional clause for each predicate in the base theory, and each additional clause includes at most two predicate slots. For instance, each extended theory for the bipartite case is created by choosing whether or not to add the clause T(9), and adding up to one clause for predicate R.6 For the first inductive task, the likelihood term P(D|T) (see Equation 2) is set to 0 for all theories that are not consistent with the pairs observed during training, and to a constant for all remaining theories. For the second task we assumed in addition that the novel pair observed is 6R(9, X), ¯R(2, 9), and R(X, 9) ←R(X, 2) are three possible additions. 5 0 9 18 91 99 19 89 star 0 9 18 91 99 19 89 bipart 0 9 18 91 99 19 89 excep 0 9 18 81 88 18 78 symm 0 9 18 71 77 17 67 trans 0 9 18 71 77 17 67 random Human (no examples) 0 9 18 91 99 19 89 0 9 18 91 99 19 89 0 9 18 91 99 19 89 0 9 18 81 88 18 78 0 9 18 71 77 17 67 0 9 18 71 77 17 67 Human (1 example) 0 0.5 1 91 99 19 89 r=0.99 0 0.5 1 91 99 19 89 r=0.96 0 0.5 1 91 99 19 89 r=0.98 0 0.5 1 81 88 18 78 r=0.88 0 0.5 1 71 77 17 67 r=0.62 0 0.5 1 71 77 17 67 RL (no examples) r=0.38 0 0.5 1 91 99 19 89 r=0.99 0 0.5 1 91 99 19 89 r=0.99 0 0.5 1 91 99 19 89 r=0.99 0 0.5 1 81 88 18 78 r=0.99 0 0.5 1 71 77 17 67 r=0.93 0 0.5 1 71 77 17 67 RL (one example) r=0.74 Figure 3: Data and model predictions for the induction task in Experiment 1. Columns 1 and 3 show predictions before any pairs involving the new letter are observed. Columns 2 and 4 show predictions after a single novel pair (marked with a gray bar) is observed to belong to the set. The model plots for each condition include correlations with the human data. sampled at random from all pairs involving the new letter.7 All model predictions were computed using Mace4 [18] to generate the extension of each theory considered. The supporting material includes predictions for a model based on the Goodman complexity measure and an exemplar model which assumes that the new letter will be just like one of the old letters.8 The exemplar model outperforms our model in the random condition, and makes accurate predictions about three other conditions. Overall, however, our model performs better than the two baselines. Here we focus on two important predictions that are not well handled by the exemplar model. In the symmetry condition, almost all subjects predict that 78 belongs to the set after learning that 87 belongs to the set, suggesting that they have learned an abstract rule. In the transitive condition, most subjects predict that pairs 72 through 76 belong to the set after learning that 71 belongs to the set. Our model accounts for this result, but the exemplar model has no basis for making predictions about letter 7, since this letter is now known to be unlike any of the others. 2.2 Experiment 2: learning from positive examples During the learning phase of our first experiment, subjects learned a theory based on positive examples (the theory included all pairs they had seen) and negative examples (the theory ruled out all pairs they had not seen). Often, however, humans learn theories based on positive examples alone. Suppose, for instance, that our anthropologist has spent only a few hours with a new tribe. She may have observed several pairs who are obviously friends, but should realize that many other pairs of friends have not yet interacted in her presence. 7For the second task, P(D|T) is set to 0 for theories that are inconsistent with the training pairs and theories which do not include the observed novel pair. For all remaining theories, P(D|T) is set to 1 n, where n is the total number of novel pairs that are consistent with T. 8Supporting material is available at www.charleskemp.com 6 1 7 777 771 778 789 237 Human 1 7 777 771 778 789 237 1 7 777 771 778 789 237 1 7 777 771 778 789 237 1 7 777 771 778 789 237 −20 −10 0 777 771 778 789 237 RL −20 −10 0 777 771 778 789 237 −10 −5 0 777 771 778 789 237 −0.2 −0.1 0 777 771 778 789 237 −20 −10 0 777 771 778 789 237 b) a) c) d) e) 441 551 221 331 552 663 221 443 615 344 231 456 235 236 231 234 333 444 111 222 R(X, X, 1). R(X, X, Y). R(X, Y, Z). R(2, 3, X). R(X, X, X). Figure 4: Data and model predictions for Experiment 2. The four triples observed for each set are shown at the top of the figure. The first row of plots shows average ratings on a scale from 1 (very unlikely to belong to the set) to 7 (very likely). Model predictions are plotted as log probabilities. Our framework can handle cases like these if we assume that the data D in Equation 2 are sampled from the ground terms that are true according to the underlying theory. We follow [10] and [13] and use a distribution P(D|T) which assumes that the examples in D are randomly sampled with replacement from the ground terms that are true. This sampling assumption encourages our model to identify the theory with the smallest extension that is compatible with all of the training examples. We tested this approach by designing an experiment where learners were given sets of examples that were compatible with several underlying theories. Materials and Methods. 15 adults participated in this experiment immediately after taking Experiment 1. In each of five conditions, subjects were told about a set of triples built from an alphabet of 9 letters. They were shown four triples that belonged to the set (Fig. 4), and told that the set might include triples that they had not seen. Subjects then gave ratings on a seven point scale to indicate whether five additional triples (see Fig. 4) were likely to belong to the set. Results. Average ratings and model predictions are shown in Fig. 4. Model predictions for each condition were computed using Equation 2 and summing over a space of theories that included the five theories shown at the top of Fig. 4, variants of these five theories which stated that certain pairs of slots could not be occupied by the same constant,9 and theories that included no variables but merely enumerated up to 5 triples.10 Although there are general theories like R(X, Y, Z) that are compatible with the triples observed in all five conditions, Fig. 4 shows that people were sensitive to different regularities in each case.11 We focus on one condition (Fig. 4b) that exposes the strengths and weaknesses of our model. According to our model, the two most probable theories given the triples for this condition are R(X, X, 1) and the closely related variant that rules out R(1, 1, 1). The next most probable theory is R(X, X, Y). These predictions are consistent with people’s judgments that 771 is very likely to belong to the set, and that 778 is the next most likely option. Unlike our model, however, people consider 777 to be substantially less likely than 778 to belong to the set. This result may suggest that the variant of R(X, X, Y) that rules out R(X, X, X) deserves a higher prior probability than our model recognizes. To better account for cases like this, it may be worth considering languages where any two variables that belong to the same clause but have different names must refer to different entities. 3 Discussion and Conclusion There are many psychological models of concept learning [4, 12, 13], but few that use representations rich enough to capture the content of intuitive theories. We suggested that intuitive theories are mentally represented in a first-order logical language, and proposed a specific hypothesis about 9One such theory includes two clauses: R(X, X, Y). ¯R(X, X, X). 10One such theory is the following list of clauses: R(2, 2, 1). R(3, 3, 1). R(4, 4, 1). R(5, 5, 1). R(7, 7, 7). 11Similar results have been found with 9-month old infants. Cases like Figs. 4b and 4c have been tested in an infant language-learning study where the stimuli were three-syllable strings [19]. 9-month old infants exposed to strings like the four in Fig. 4c generalized to other strings consistent with the theory R(X, X, Y), but infants in the condition corresponding to Fig. 4b generalized only to strings consistent with the theory R(X, X, 1). 7 this “language of thought.” We assumed that the subjective complexity of a theory depends on the length of its representation in this language, and described experiments which suggest that the resulting complexity measure helps to explain how theories are learned and used for inductive inference. Our experiments deliberately used stimuli that minimize the influence of prior knowledge. Theories, however, are cumulative, and the theory that seems simplest to a learner will often depend on her background knowledge. Our approach provides a natural place for background knowledge to be inserted. A learner can be supplied with a stock of background predicates, and the shortest representation for a data set will depend on which background predicates are available. Since different sets of predicates will lead to different predictions about subjective complexity, empirical results can help to determine the background knowledge that people bring to a given class of problems. Future work should aim to refine the representation language and complexity measure we proposed. We expect that something like our approach will be suitable for modeling a broad class of intuitive theories, but the specific framework presented here can almost certainly be improved. Future work should also consider different strategies for searching the space of theories. Some of the strategies developed in the ILP literature should be relevant [14], but a detailed investigation of search algorithms seems premature until our approach has held up to additional empirical tests. It is comparatively easy to establish whether the theories that are simple according to our approach are also considered simple by people, and our experiments have made a start in this direction. It is much harder to establish that our approach captures most of the theories that are subjectively simple, and more exhaustive experiments are needed before this conclusion can be drawn. Boolean concept learning has been studied for more than fifty years [4, 9], and many psychologists have made empirical and theoretical contributions to this field. An even greater effort will be needed to crack the problem of theory learning, since the space of intuitive theories is much richer than the space of Boolean concepts. The difficulty of this problem should not be underestimated, but computational approaches can contribute part of the solution. Acknowledgments Supported by the William Asbjornsen Albert memorial fellowship (CK), the James S. McDonnell Foundation Causal Learning Collaborative Initiative (NDG, JBT) and the Paul E. Newton chair (JBT). References [1] N. Goodman. The structure of appearance. 2nd edition, 1961. [2] S. Carey. Conceptual change in childhood. MIT Press, Cambridge, MA, 1985. [3] H. A. Simon. Complexity and the representation of patterned sequences of symbols. Psychological Review, 79:369–382, 1972. [4] J. Feldman. An algebra of human concept learning. JMP, 50:339–368, 2006. [5] N. Chater and P. Vitanyi. Simplicity: a unifying principle in cognitive science. TICS, 7:19–22, 2003. [6] J. T. Krueger. A theory of structural simplicity and its relevance to aspects of memory, perception, and conceptual naturalness. PhD thesis, University of Pennsylvania, 1979. [7] P. Gr¨unwald, I. J. Myung, and M. Pitt, editors. Advances in Minimum Description Length: Theory and Applications. 2005. [8] N. Chater. Reconciling simplicity and likelihood principles in perceptual organization. Psychological Review, 103:566–581, 1996. [9] J. A. Bruner, J. S. Goodnow, and G. J. Austin. A study of thinking. Wiley, 1956. [10] D. Conklin and I. H. Witten. Complexity-based induction. Machine Learning, 16(3):203–225, 1994. [11] G. A. Miller. The magical number seven, plus or minus two: Some limits on our capacity for processing information. Psychological Review, 63(1):81–97, 1956. [12] N. D. Goodman, T. L. Griffiths, J. Feldman, and J. B. Tenenbaum. A rational analysis of rule-based concept learning. In CogSci, 2007. [13] J. B. Tenenbaum and T. L. Griffiths. Generalization, similarity, and Bayesian inference. BBS, 24:629–641, 2001. [14] S. Muggleton and L. De Raedt. Inductive logic programming: theory and methods. Journal of Logic Programming, 19-20:629–679, 1994. [15] N. Chomsky. The logical structure of linguistic theory. University of Chicago Press, Chicago, 1975. [16] E. L. J. Leeuwenberg. A perceptual coding language for visual and auditory patterns. American Journal of Psychology, 84(3):307–349, 1971. [17] B. Edmonds. Syntactic measures of complexity. PhD thesis, University of Manchester, 1999. [18] W. McCune. Mace4 reference manual and guide. Technical Report ANL/MCS-TM-264, Argonne National Laboratory, 2003. [19] L. Gerken. Decisions, decisions: infant language learning when multiple generalizations are possible. Cognition, 98(3):67–74, 2006. 8
2007
149
3,180
Inferring Elapsed Time from Stochastic Neural Processes Misha B. Ahrens and Maneesh Sahani Gatsby Computational Neuroscience Unit, UCL Alexandra House, 17 Queen Square, London, WC1N 3AR {ahrens, maneesh}@gatsby.ucl.ac.uk Abstract Many perceptual processes and neural computations, such as speech recognition, motor control and learning, depend on the ability to measure and mark the passage of time. However, the processes that make such temporal judgements possible are unknown. A number of different hypothetical mechanisms have been advanced, all of which depend on the known, temporally predictable evolution of a neural or psychological state, possibly through oscillations or the gradual decay of a memory trace. Alternatively, judgements of elapsed time might be based on observations of temporally structured, but stochastic processes. Such processes need not be specific to the sense of time; typical neural and sensory processes contain at least some statistical structure across a range of time scales. Here, we investigate the statistical properties of an estimator of elapsed time which is based on a simple family of stochastic process. 1 Introduction The experience of the passage of time, as well as the timing of events and intervals, has long been of interest in psychology, and has more recently attracted attention in neuroscience as well. Timing information is crucial for the correct functioning of a large number of processes, such as accurate limb movement, speech and the perception of speech (for example, the difference between “ba” and “pa” lies only in the relative timing of voice onsets), and causal learning. Neuroscientific evidence that points to a specialized neural substrate for timing is very sparse, particularly when compared to the divergent set of specific mechanisms which have been theorized. One of the most influential proposals, the scalar expectancy theory (SET) of timing [1], suggests that interval timing is based on the accumulation of activity from an internal oscillatory process. Other proposals have included banks of oscillators which, when fine-tuned, produce an alignment of phases at a specified point in time that can be used to generate a neuronal spike [2]; models in which timing occurs via the characteristic and monotonic decay of memory traces [3] or reverberant activity [4]; and randomly-connected deterministic networks, which, given neuronal processes of appropriate timescales, can be shown to encode elapsed time implicitly [5]. Although this multitude of theories shows that there is little consensus on the mechanisms responsible for timing, it does point out an important fact: that timing information is present in a range of different processes, from oscillations to decaying memories and the dynamics of randomly connected neural networks. All of the theories above choose one specific such process, and suggest that observers rely on that one alone to judge time. An alternative, which we explore here, is to phrase time estimation as a statistical problem, in which the elapsed time ∆t is extracted from a collection of stochastic processes whose statistics are known. This is loosely analagous to accounts have appeared in the psychological literature in the form of number-of-events models [6], which suggest that the number of events in an interval influence the perception of its duration. Such models have 1 been related to recent psychological findings the show that the nature of the stimulus being timed affects judgments of duration [7]. Here, by contrast, we consider the properties of duration estimators that are based on more general stochastic processes. The particular stochastic processes we analyze are abstract. However, they may be seen as models both for internally-generated neural processes, such as (spontaneous) network activity and local field potentials, and for sensory processes, in the form of externally-driven neural activity, or (taking a functional view) in the form of the stimuli themselves. Both neural activity and sensory input from the environment follow well-defined temporal statistical patterns, but the exploitation of these statistics has thus far not been studied as a potential substrate for timing judgements, despite being potentially attractive. Such a basis for timing is consistent with recent studies that show that the statistics of external stimuli affect timing estimates [8, 7], a behavior not captured by the existing mechanistic models. In addition, there is evidence that timing mechanisms are distributed [9] but subject to local (e.g. retinotopic or spatiotopic) biases [10]. Using the distributed time-varying processes which are already present in the brain is implementationally efficient, and lends itself straightforwardly to a distributed implementation. At the same time, it suggests a possible origin for the modality-specificity and locality of the bias effects, as different sets of processes may be exploited for different timing purposes. Here, we show primarily that interval estimates based on such processes obey a Weber-like scaling law for accuracy under a wide range of assumptions, as well as scaling with process number that is consistent with experimental observation; and we use estimation theoretic analysis to find the reasons behind the robustness of these scaling laws. Neuronal spike trains exhibit internal dependencies on many time scales, ranging from milliseconds to tens of seconds [11, 12], so these — or, more likely, processes derived from spike trains, such as average network activity — are plausible candidates for the types of processes assumed in this paper. Likewise, sensory information too varies over a large range of temporal scales [13]. The particular stochastic processes we use here are Gaussian Processes, whose power spectra are chosen to be broad and roughly similar to those seen in natural stimuli. 2 The framework To illustrate how random processes contain timing information, consider a random walk starting at the origin, and suppose that we see a snapshot of the random walk at another, unknown, point in time. If the walk were to end up very far from the origin, and if some statistics of the random walk were known, we would expect that the time difference between the two observations, ∆t, must be reasonably long in comparison to the diffusion time of the process. If, however, the second point were still very close to the origin, we might assign a high probability to ∆t ≈0, but also some probability (associated with delayed return to the orgin) to |∆t| > 0. Access to more than one such random walk would lead to more accurate estimates (e.g. if two random walks had both moved very little between the two instances in time, our confidence that ∆t ≈0 would be greater). From such considerations it is evident that, on the basis of multiple stochastic processes, one can build up a probabilistic model for ∆t. To formalize these ideas, we model the random processes as a family of independent stationary Gaussian Processes (GPs, [14]). A GP is a stochastic process y(t) in which any subset of observations {y(t), y(t′), y(t′′), ...} is jointly Gaussian distributed, so that the probability distribution over observations is completely specified by a mean value (here set to zero) and a covariance structure (here assumed to remain constant in time). We denote the set of processes by {yi(t)}. Although this is not a necessity, we let each process evolve independently according to the same stochastic dynamics; thus the process values differ only due to the random effects. Mimicking the temporal statistics of natural scenes [15], we choose the dynamics to simultaneously contain multiple time scales — specifically, the power spectrum approximately follows a 1/f 2 power law, were f = frequency = 1/(time scale). Some instances of such processes are shown in Figure 1. Stationary Gaussian processes are fully described by the covariance function K(∆t): ⟨yi(t)yi(t + ∆t)⟩= K(∆t) so that the probability of observing a sequence of values [yi(t1), yi(t2), ..., yi(tn)] is Gaussian distributed, with zero mean and covariance matrix Σn,n′ = K(tn′ −tn). 2 time y −4 −2 0 2 4 −10 −5 0 log frequency log power Figure 1: Left: Two examples of the GPs used for inference of ∆t. Right: Their power spectrum. This is approximately a 1/f 2 spectrum, similar to the temporal power spectrum of visual scenes. To generate processes with multiple time scales, we approximate a 1/f 2 spectrum with a sum over Q squared exponential covariance functions: K(∆t) = Q X q=1 α2 q exp(−∆t2/2l2 q) + σ2 yI(∆t) Here σ2 yI(∆t) describes the instantaneous noise around the underlying covariance structure (I is the indicator function, which equals 1 when its argument is zero), and lq are the time scales of the component squared exponential functions. We take these to be linearly spaced, so that lq ∝q. To mimic a 1/f 2 spectrum, we choose the power of each component to be constant: α2 q = 1/Q. Figure 1 shows that this choice does indeed quite accurately reproduce a 1/f 2 power spectrum. To illustrate how elapsed time is implicitly encoded in such stochastic processes, we infer the duration of an interval [t, t + ∆t] from two instantaneous observations of the processes, namely {yi(t)} and {yi(t+∆t)}. For convenience, yi is used to denote the vector [yi(t), yi(t+∆t)]. The covariance matrix Σ(∆t) of yi, which is of size 2x2, gives rise to a likelihood of these observations, P ({yi(t)}, {yi(t + ∆t)}|∆t) ∝ Y i |Σ|−1/2 exp  −1 2yT i Σ−1yi  With the assumption of a weak prior1, this yields a posterior distribution over ∆t: Φ(∆t) = P(∆t|{yi}) ∝P(∆t) · Y i P(yi|∆t) ∝P(∆t) · exp −1 2 X i  log |Σ| + yT i Σ−1yi  ! This distribution gives a probabilistic description of the time difference between two snapshots of the random processes. As we will see below (see Figure 2), this distribution tends to be centred on the true value of ∆t, showing that such random processes may indeed be exploited to obtain timing information. In the following section, we explore the statistical properties of timing estimates based on Φ, and show that they correspond to several experimental findings. 1such as P(∆t) = β exp(−β∆t)Θ(∆t) with β ≪1 and Θ the Heaviside function, or P(∆t) = U[0, tmax]; the details of the weak prior do not affect the results. 3 0 5 10 15 0 5 10 15 20 25 ∆ t estimated ∆ t 0 5 10 15 0 1 2 3 4 ∆ t standard deviation Figure 2: Statistics of the inference of ∆t from snapshots of a group of GPs. The GPs have time scales in the interval [0.05, 50]. Left: The mean estimated times (blue) are clustered around the true times (dashed). Right: The Weber law of timing, σ ∝∆t, approximately holds true for this model. The error bars are standard errors derived via a Laplace approximation to the posterior. A straight line fit is shown with a dashed line. The Cramer-Rao bound (blue), which will be derived later in the text, predicts the empirical data well. 3 Scaling laws and behaviour 3.1 Empirical demonstration of Weber’s law Many behavioral studies have shown that the standard deviation of interval estimates is proportional to the interval being judged, σ ∝∆t, across a wide range of timescales and tasks (e.g. [1]). Here, we show that GP-based estimates share this property under broad conditions. To compare the behaviour of the model to experimental data, we must choose a mapping from the function Φ to a single scalar value, which will model the observer’s report. A simple choice is to assume that the reported ∆t is the maximum a-posteriori (MAP) estimator based on Φ, that is, c ∆tMAP = argmax∆t Φ(∆t). To compare the statistics of this estimator to the experimental observation, we took samples {yi(t)} and {yi(t + ∆t)} from 50 GPs with identical 1/f 2-like statistics containing time scales from 1 to 40 time units. 100 samples were generated for each ∆t (ranging from 1 to 16 time unis), leading to 100 estimates, c ∆tMAP. These estimates are plotted in Figure 2A. They are seen to follow the true ∆t. Their spread around the true value increases with increasing ∆t. The standard deviation of this spread is plotted in Figure 2B, and is a roughly linear function of ∆t. Thus, time estimation is possible using the stochastic process framework, and the Weber law of timing holds fairly accurately. 3.2 Fisher Information and Weber’s law A number of questions about this Weber-like result naturally arise: Does it still hold if one changes the power spectrum of the processes? What if one changes the scale of the instantaneous noise? We increased the noise scale σ2 y, and found that the Weber law was still approximately satisfied. When changing the power spectrum of the processes from a 1/f 2-type spectrum to a 1/f 3-type spectrum (by letting α2 i ∝li instead of α2 i ∝1), the Weber law was still approximately satisfied (Figure 3). This result may appear somewhat counter-intuitive, as one might expect that the accuracy of the estimator for ∆t would increase as the power in frequencies around 1/∆t increased; thus, changing the power spectrum to 1/f 3 might be expected to result in more accurate estimates of large ∆t (lower frequencies) as compared to estimates of small ∆t, but this was not the case. To find reasons for this behaviour, it would useful to have an analytical expression for the relationship between the variability of the estimated duration and the true duration. This is complex, but a simpler analytical approximation to this relation can be constructed through the Cramer-Rao bound. This is a lower bound on the asymptotic variance of an unbiased Maximum Likelihood estimator of ∆t and is given by the inverse Fisher Information: 4 time y 0 5 10 15 0 0.5 1 1.5 2 2.5 ∆ t standard deviation Figure 3: Left: Two examples of GPs with a different power spectrum (α2 i ∝li, for li ∝i, which approximates a 1/f 3 power spectrum, resulting in much smoother dynamics). Right: Inference of ∆t based on these altered processes. Note that the estimator c ∆tMAP is based on the true likelihood, i.e., the new 1/f 3 statistics. The Weber law still approximately holds, even though the dynamics is different from the initial case. The empirical standard deviation is again well predicted by the analytical Cramer-Rao bound (blue). Var(c ∆t) ≥1/IF (∆t) The Fisher Information, assuming that the elapsed time is estimated on the basis of N processes, each evolving according to covariance matrix Σ(∆t), is given by the expression IF (∆t) = −N D∂2 log P({yi}|∆t) ∂∆t2 E y = N 2 Tr  Σ−1 ∂Σ ∂∆tΣ−1 ∂Σ ∂∆t  (1) This bound is plotted in blue in Figure 2, and again in Figure 3, and can be seen to be a good approximation to the empirical behaviour of the model. What is the reason for the robust Weber-like behaviour? To answer this question, consider a different but related model, in which there are N Gaussian processes, again labeled i, but each now evolving according to different covariance matrix Ci(∆t). Previously, each process reflected structure at many timescales. In this new model, each process evolves with a single squared-exponential covariance kernel, and thus a single time-constant. This will allow us to see how each process contributes to the accuracy of the estimator. Thus, in this model, [Ci(∆t)]n,n′ = α2 i exp(−(tn′−tn)2/2l2 i )+σ2 yI(tn′−tn). (The power spectrum is then shaped as exp(−f 2l2 i /2).) The likelihood of observing the processes at two instances is now P ({yi(t)}, {yi(t + ∆t)}|∆t) ∝ Y i |Ci|−1/2 exp  −1 2yT i C−1 i yi  (2) This model shows very similar behaviour to the original model, but is somewhat less natural. Its advantage lies in the fact that the Fisher Information can now be decomposed as a sum over different time scales, IF (∆t) = X i IF,i = 1 2 X i Tr  C−1 i ∂Ci ∂∆tC−1 i ∂Ci ∂∆t  Using the Fisher Information to plot Cramer-Rao bounds for different types of processes {yi(t)} (Figure 4, dashed lines), we first note that the bounds are all relatively close to linear, even though the parameters governing the processes are very different. In particular, we tested both linear spacing of time scales (li ∝i) and quadratic spacing (li ∝i2), and we tested a constant power distribution 5 0 10 20 30 ∆ t IF and (IF)−1/2 l=6 l=11,... l=46 Cr.−Rao bound 0 10 20 30 ∆ t IF and (IF)−1/2 l=0.7 l=2.4,... l=42.3 Cr.−Rao bound 0 10 20 30 ∆ t IF and (IF)−1/2 l=0.7 l=2.4,... l=42.3 Cr.−Rao bound 0 10 20 30 ∆ t IF and (IF)−1/2 l=6 l=11,... l=46 Cr.−Rao bound lengthscales spaced linearly power = constant lengthscales spaced linearly power ~ time scale lengthscales spaced quadratically power ~ time scale lengthscales spaced quadratically power = constant Figure 4: Fisher Information and Cramer-Rao bounds for the model of equation 2. The Cramer-Rao bound is the square root of the inverse of the sum of all the Fisher Information curves (note that only a few Fisher Information curves are shown). The noise scale σ2 y = 0.1, and the time scales are either li = i, i = 1, 2, . . . , 50 (linear) or li = i2/50, i = 1, 2, . . . , 50 (quadratic). The power of each process is either α2 i = 1 (constant) or α2 i = li. The graphs show that each time scale contributes to the estimation of a wide range of ∆t, and that the Cramer-Rao bounds are all fairly linear, leading to a robust Weber-like behaviour of the estimator of elapsed time. (αi = 1) and a power distribution where slower processes have more power (α2 i ∝li). None of these manipulations caused the Cramer-Rao bound to deviate much from linearity. Next, we can evaluate the contribution of each time scale to the accuracy of estimates of ∆t, by inspecting the Fisher Information IF,i of a given process yi. Figure 4 shows that (contrary to the intuition that time scales close to ∆t contribute most to the estimation of ∆t) a process evolving at a certain time scale lj contributes to the estimation of elapsed time ∆t even if ∆t is much smaller than lj (indeed, the peak of IF,j does not lie at lj, but below it). This lies at the heart of the robust Weber-like behaviour: the details of the distribution of time scales do not matter much, because each time scale contributes to the estimation of a wide range of ∆t. For similar reasons, the distribution of power does not drastically affect the Cramer-Rao bound. From the graphs of IF,i, it is evident that the Weber law arises from an accumulation of high values of Fisher Information at low values of ∆t. Very small values of ∆t may be an exception, if the instantaneous noise dominates the subtle changes that the processes undergo during very short periods; for these ∆t, the standard deviation may rise. This is reflected by a subtle rise in some of the Cramer-Rao bounds at very low values of ∆t. However, it may be assumed that the shortest times that neural systems can evaluate are no shorter than the scale of the fastest process within the system, making these small ∆t’s irrelevant. 3.3 Dependence of timing variability on the number of processes Increasing the number of processes, say Nprocesses, will add more terms to the likelihood and make the estimated ∆t more accurate. The Fisher Information (equation 1) scales with Nprocesses, which suggests that the standard deviation of c ∆tMAP is proportional to 1/pNprocesses; this was confirmed empirically (data not shown). 6 Psychologically and neurally, increasing the number of processes would correspond to adding more perceptual processes, or expanding the size of the network that is being monitored for timing estimation. Although experimental data on this issue is sparse, in [9], it is shown that unimanual rhythm tapping results in a higher variability of tapping times than bimanual rhythm tapping, and that tapping with two hands and a foot results in even lower variability. This correlates well with the theoretical scaling behaviour of the estimator c ∆tMAP. Note that a similar scaling law is obtained from the Multiple Timer Model [16]. This is not a model for timing itself, but for the combination of timing estimates of multiple timers; the Multiple Timer Model combines these estimates by averaging, which is the ML estimate arising from independent draws of equal variance Gaussian random variables, also resulting in a 1/ √ N scaling law. Experimentally, a slower decrease in variability than a 1/ √ N law was observed. This can be accounted for by assuming that the processes governing the right and left hands are dependent, so that the number of effectively independent processes grows more slowly than the number of effectors. 4 Conclusion We have shown that timing information is present in random processes, and can be extracted probabilistically if certain statistics of the processes are known. A neural implementation of such a framework of time estimation could use both internally generated population activity as well as external stimuli to drive its processes. The timing estimators considered were based on the full probability distribution of the process values at times t and t′, but simpler estimators could also be constructed. There are two reasons for considering simpler estimators: First, simpler estimators might be more easily implemented in neural systems. Second, to calculate Φ(∆t), one needs all of {yi(t), yi(t′)}, so that (at least) {yi(t)} has to be stored in memory. One way to construct a simpler estimator might be to select a particular class (say, a linear function of {yi}) and optimize over its parameters. Alternatively, an estimator may be based on the posterior distribution over ∆t conditioned on a reduced set of parameters, with the neglected parameters integrated out. Another route might be to consider different stochatic processes, which have more compact sufficient statistics (e.g. Brownian motion, being translationally invariant, would require only {yi(t′)−yi(t)} instead of {yi(t), yi(t′)}; we have not considered such processes because they are unbounded and therefore hard to associate with sensory or neural processes). We have not addressed how a memory mechanism might be combined with the stochastic process framework; this will be explored in the future. The intention of this paper is not to offer a complete theory of neural and psychological timing, but to examine the statistical properties of a hitherto neglected substrate for timing — stochastic processes that take place in the brain or in the sensory world. It was demonstrated that estimators based on such processes replicate several important behaviors of humans and animals. Full models might be based on the same substrate, thereby naturally incorporating the same behaviors, but contain more completely specified relations to external input, memory mechanisms, adaptive mechanisms, neural implementation, and importantly, (supervised) learning of the estimator. The neural and sensory processes that we assume to form the basis of time estimation are, of course, not fully random. But when the deterministic structure behind a process is unknown, they can still be treated as stochastic under certain statistical rules, and thus lead to a valid timing estimator. Would the GP likelihood still apply to real neural processes or would the correct likelihood be completely different? This is unknown; however, the Multivariate Central Limit Theorem implies that sums of i.i.d. stochastic processes tend to Gaussian Processes — so that, when e.g. monitoring average neuronal activity, the correct estimator may well be based on a GP likelihood. An issue that deserves consideration is the mixing of internal (neural) and external (sensory) processes. Since timing information is present in both sensory processes (such as sound and movement of the natural world, and the motion of one’s body) and internal processes (such as fluctuations in network activity), and because stimulus statistics influence timing estimates, we propose that psychological and neural timing may make use of both types of processes. However, fluctuations in the external world do not always translate into neural fluctuations (e.g. there is evidence for a spatial 7 code for temporal frequency in V2 [17]), so that neural and stimulus fluctuations cannot always be treated on the same footing. We will address this issue in the future. The framework presented here has some similarities with the very interesting and more explicitly physiological model proposed by Buonomano and colleagues [5, 18], in which time is implicitly encoded in deterministic2 neural networks through slow neuronal time constants. However, temporal information in the network model is lost when there are stimulus-independent fluctuations in the network activity, and the network can only be used as a reliable timer when it starts from a fixed resting state, and if the stimulus is identical on every trial. The difference in our scheme is that here timing estimates are based on statistics, rather than deterministic structure, so that it is fundamentally robust to noise, internal fluctuations, and stimulus changes. The stochastic process framework is, however, more abstract and farther removed from physiology, and a neural implementation may well share some features of the network model of timing. Acknowledgements: We thank Jeff Beck for useful suggestions, and Peter Dayan and Carlos Brody for interesting discussions. References [1] J Gibbon. Scalar expectancy theory and Weber’s law in animal timing. Psychol Rev, 84:279–325, 1977. [2] R C Miall. The storage of time intervals using oscillating neurons. Neural Comp, 1:359–371, 1989. [3] J E R Staddon and J J Higa. Time and memory: towards a pacemaker-free theory of interval timing. J Exp Anal Behav, 71:215–251, 1999. [4] G Bugmann. Towards a neural model of timing. Biosystems, 48:11–19, 1998. [5] D V Buonomano and M M Merzenich. Temporal information transformed into a spatial code by a neural network with realistic properties. Science, 267:1028–1030, 1995. [6] D Poynter. Judging the duration of time intervals: A process of remembering segments of experience. In I Levin and D Zakay, editors, Time and human cognition: A life-span perspective, pages 305–331. Elsevier, 1989. [7] R Kanai, C L E Paffen, H Hogendoorn, and F A J Verstraten. Time dilation in dynamic visual display. J Vision, 6:1421–1430, 2006. [8] D M Eagleman, P U Tse, D V Buonomano, P Janssen, A C Nobre, and A O Holcombe. Time and the brain: How subjective time relates to neural time. J Neurosci, pages 10369–10371, 2005. [9] R B Ivry, T C Richardson, and L L Helmuth. Improved temporal stability in multi-effector movements. J Exp Psychol, 28:72–92, 2002. [10] D Burr, A Tozzi, and M C Morrone. Neural mechanisms for timing visual events are spatially selective in real-world coordinates. Nat Neurosci, 10:423–425, 2007. [11] M C Teich, C Heneghan, and S B Lowen. Fractal characted of the neural spike train in the visual system of the cat. J Opt Soc Am A, 14:529–546, 1997. [12] L C Osborne, W Bialek, and S G Lisberger. Time course of information about motion direction in visual area MT of macaque monkeys. J Neurosci, 24:3210–3222, 2004. [13] H Attias and C E Schreiner. Temporal low-order statistics of natural sounds. In Advances in Neural Information Processing Systems 9, pages 27–33, 1996. [14] C E Rasmussen and C K I Williams. Gaussian Processes for Machine Learning. MIT Press, Cambridge, MA, 2006. [15] D W Dong and J J Atick. Statistics of natural time-varying images. Network: Computation in Neural Systems, 6:345–358, 1995. [16] R B Ivry and T C Richardson. Temporal control and coordination: the multiple timer model. Brain and Cognition, 48:117–132, 2002. [17] K H Foster, J P Gaska, M Nagler, and D A Pollen. Spatial and temporal frequency selectivity of neurones in visual cortical areas v1 and v2 of the macaque monkey. J Physiol, 365:331–363, 1985. [18] U R Karmarkar and D V Buonomano. Timing in the absence of clocks: encoding time in neural network states. Neuron, 53:427–438, 2007. 2While this model and some other previous models might also contain neuronal noise, it is the deterministic (and known) element of their behaviour which encodes time. 8
2007
15
3,181
The Infinite Markov Model Daichi Mochihashi ∗ NTT Communication Science Laboratories Hikaridai 2-4, Keihanna Science City Kyoto, Japan 619-0237 daichi@cslab.kecl.ntt.co.jp Eiichiro Sumita ATR / NICT Hikaridai 2-2, Keihanna Science City Kyoto, Japan 619-0288 eiichiro.sumita@atr.jp Abstract We present a nonparametric Bayesian method of estimating variable order Markov processes up to a theoretically infinite order. By extending a stick-breaking prior, which is usually defined on a unit interval, “vertically” to the trees of infinite depth associated with a hierarchical Chinese restaurant process, our model directly infers the hidden orders of Markov dependencies from which each symbol originated. Experiments on character and word sequences in natural language showed that the model has a comparative performance with an exponentially large full-order model, while computationally much efficient in both time and space. We expect that this basic model will also extend to the variable order hierarchical clustering of general data. 1 Introduction Since the pioneering work of Shannon [1], Markov models have not only been taught in elementary information theory classes, but also served as indispensable tools and building blocks for sequence modeling in many fields, including natural language processing, bioinformatics [2], and compression [3]. In particular, (n−1)th order Markov models over words are called “n-gram” language models and play a key role in speech recognition and machine translation, as regards choosing the most natural sentence among candidate transcriptions [4]. Despite its mathematical simplicity, an inherent problem with a Markov model is that we must determine its order. Because higher-order Markov models have an exponentially large number of parameters, their orders have been restricted to a small, often fixed number. In fact, for “n-gram” models the assumed word dependency n is usually set at from three to five due to the high dimensionality of the lexicon. However, word dependencies will often have a span of greater than n for phrasal expressions or compound proper nouns, or a much shorter n will suffice for some grammatical relationships. Similarly, DNA or amino acid sequences might have originated from multiple temporal scales that are unknown to us. To alleviate this problem, many “variable-order” Markov models have been proposed [2, 5, 6, 7]. However, all stemming from [5] and [7], they are based on pruning a huge candidate suffix tree by employing such criteria as KL-divergences. This kind of “post-hoc” approach suffers from several important limitations: First, when we want to consider deeper dependences, the candidate tree to be pruned will be extremely large. This is especially prohibitive when the lexicon size is large as with language. Second, the criteria and threshold for pruning the tree are inherently exogeneous and must be set carefully so that they match the desired model and current data. Third, pruning by empirical counts in advance, which is often used to build “arbitrary order” candidate trees in these approaches, is shown to behave very badly [8] and has no theoretical standpoints. In contrast, in this paper we propose a complete generative model of variable-order Markov processes up to a theoretically infinite order. By extending a stick-breaking prior, which is usually ∗This research was conducted while the first author was affiliated with ATR/NICT. ”will” ”she will” ”he will” sing cry like sing like ”and” ”bread and” ǫ butter Depth 0 1 2 =customer =proxy customer ”of” ”states of” america (a) Suffix Tree representation of the hierarchical Chinese Restaurant process on a second-order Markov model. Each count is a customer in this suffix tree. ”will” ”she will” cry sing like ”and” ”bread and” ǫ butter Depth 0 1 2 = customer = proxy customer ”of” ”states of” ”united states of” ”the united states of” america ”order of” (b) Infinite suffix tree of the proposed model. Deploying customers at suitable depths, i.e. Markov orders, is our inference problem. Figure 1: Hierarchical Chinese restaurant processes over the finite and infinite suffix trees. defined on a unit interval, “vertically” to the trees of infinite depth associated with a hierarchical Chinese restaurant process, our model directly infers the hidden orders of Markov dependencies from which each symbol originated. We show this is possible with a small change to the inference of the hiearchical Pitman-Yor process in discrete cases, and actually makes it more efficient in both computational time and space. Furthermore, we extend the variable model by latent topics to show that we can induce the variable length “stochastic phrases” for topic by topic. 2 Suffix Trees on Hierarchical Chinese Restaurant Processes The main obstacle that has prevented consistent approaches to variable order Markov models is the lack of a hierarchical generative model of Markov processes that allows estimating increasingly sparse distributions as its order gets larger. However, now we have the hierarchical (Poisson-) Dirichlet process that can be used as a fixed order language model [9][10], it is natural for us to extend these models to variable orders also by using a nonparametric approach. While we concentrate here on discrete distributions, the same basic approach can be applied to a Markov process on continuous distributions, such as Gaussians that inherit their means from their parent distributions. For concreteness below we use a language model example, but the same model can be applied to any discrete sequences, such as characters, DNAs, or even binary streams for compression. Consider a trigram language model, which is a second-order Markov model over words often employed in speech recognition. Following [9], this Markov model can be represented by a suffix tree of depth two, as shown in Figure 1(a). When we predict a word “sing” after a context “she will”, we descend this suffix tree from the root (which corresponds to null string context), using the context backwards to follow a branch “will” and then “she will”.1 Now we arrive at the leaf node that represents the context, and we can predict “sing” by using the count distribution at this node. During the learning phase, we begin with a suffix tree that has no counts. For every time a three word sequence appears in the training data, such as “she will sing” mentioned above, we add a count of a final word (“sing”) given the context (“she will”) to the context node in the suffix tree. In fact this corresponds to a hierarchical Chinese restaurant process, where each context node is a restaurant and each count is a customer associated with a word. Here each node, i.e. restaurant, might not have customers for all the words in the lexicon. Therefore, when a customer arrives at a node and stochastically needs a new table to sit down, a copy of him, namely a proxy customer, is sent to its parent node. When a node has no customer to compute the probability of some word, it uses the distribution of customers at the parent node and appropriately interpolates it to sum to 1. Assume that the node “she will” does not have a customer of “like.” We can nevertheless compute the probability of “like” given “she will” if its sibling “he will” has a customer “like”. Because that sibling has sent a copy of the customer to the common parent “will”, the probability is computed by appropriately interpolating the trigram probability given “she will”, which is zero, with the bigram probability given “will”, which is not zero at the parent node. 1This is the leftmost path in Figure 1(a). When there is no corresponding branch, we will create it. j k i 1 −qi 1 −qj 1 −qk Figure 2: Probabilistic suffix tree of an infinite depth. (1−qi) is a “penetration probability” of a descending customer at each node i, defining a stick-breaking process over the infinite tree. Consequently, in the hierarchical Pitman-Yor language model (HPYLM), the predictive probability of a symbol s = st in context h = st−n · · · st−1 is recursively computed by p(s|h) = c(s|h)−d·ths θ+c(h) + θ+d·th· θ+c(h) p(s|h′), (1) where h′ = st−n+1 · · · st−1 is a shortened context with the farthest symbol dropped. c(s|h) is the count of s at node h, and c(h) = P s c(s|h) is the total count at node h. ths is the number of times symbol s is estimated to be generated from its parent distribution p(s|h′) rather than p(s|h) in the training data: th· = P s ths is its total. θ and d are the parameters of the Pitman-Yor process, and can be estimated through the distribution of customers on a suffix tree by Gamma and Beta posterior distributions, respectively. For details, see [9]. Although this Bayesian Markov model is very principled and attractive, we can see from Figure 1(a) that all the real customers (i.e., counts) are fixed at the depth (n−1) in the suffix tree. Because actual sequences will have heterogeneous Markov dependencies, we want a Markov model that deploys customers at different levels in the suffix tree according to the true Markov order from which each customer originated. But how can we model such a heterogeneous property of Markov sequences? 3 Infinite-order Hierarchical Chinese Restaurant Processes Intuitively, we know that suffix trees that are too deep are improbable and symbol dependencies decay largely exponentially with context lengths. However, some customers may reside in a very deep node (for example, “the united states of america”) and some in a shallow node (“shorter than”). Our model for deploying customers must be flexible enough to accommodate all these possibilities. 3.1 Introducing Suffix Tree Prior For this purpose, we assume that each node i in the suffix tree has a hidden probability qi of stopping at node i when following a path from the root of the tree to add a customer. In other words, (1 −qi) is the “penetration probability” when descending an infinite depth suffix tree from its root (Figure 2). We assume that each qi is generated from a prior Beta distribution independently as: qi ∼Be(α, β) i.i.d. (2) This choice is mainly for simplicity: however, later we will show that the final predictive performance does not significantly depend on α or β. When we want to generate a symbol st given a context h = s−∞· · · st−2st−1, we descend the suffix tree from the root following a path st−1 →st−2 →· · · , according to the probability of stopping at a level l given by p(n = l|h) = ql l−1 Y i=0 (1 −qi) . (l = 0, 1, · · · , ∞) (3) When we stop at level l, we generate a symbol st using the context st−l· · ·st−2st−1. Since qi differs from node to node, we may reach very deep nodes with high probability if the qi’s along the path are equally small (the “penetration” of this branch is high); or, we may stop at a very shallow node if the qi’s are very high (the “penetration” is low). In general, the probability to reach a node decays exponentially with levels according to (3), but the degrees are different to allow for long sequences of typical phrases. Note that even for the same context h, the context length that was used to generate the next symbol may differ stochastically for each appearance according to (3). 3.2 Inference Of course, we do not know the hidden probability qi possessed by each node. Then, how can we estimate it? Note that the generative model above amounts to introducing a vector of hidden variables, n = n1n2 · · · nT , that corresponds to each Markov order (n = 0 · · · ∞) from which each symbol st in s = s1s2 · · · sT originated. Therefore, we can write the probability of s as follows: p(s) = X n X z p(s, z, n) . (4) Here, z = z1z2 · · · zT is a vector that represents the hidden seatings of the proxy customers described in Section 2, where 0 ≤zt ≤nt means how recursively the st’s proxy customers are stochastically sent to parent nodes. To estimate these hidden variables n and z, we use a Gibbs sampler as in [9]. Since in the hierarchical (Poisson-)Dirichlet process the customers are exchangeable [9] and qi is i.i.d. as shown in (2), this process is also exchangeable and therefore we can always assume, by a suitable permutation, that the customer to resample is the final customer. In our case, we only explicitly resample nt given n−t (n excluding nt), as follows: nt ∼p(nt|s, z−t, n−t). (5) Notice here that when we sample nt, we already know the other depths n−t that other words have reached in the suffix tree. Therefore, when computing (5) using (3), the expectation of each qi is E[qi] = ai+α ai+bi+α+β , (6) where ai is the number of times node i was stopped at when generating other words, and bi is the number of times node i was passed by. Using this estimate, we decompose the conditional probability of (5) as p(nt|s, z−t, n−t) ∝p(st|s−t, z−t, n) p(nt|s−t, z−t, n−t) . (7) The first term is the probability of st under HPYLM when the Markov order is known to be nt, given by (1). The second term is the prior probability of reaching that node at depth nt. By using (6) and (3), this probability is given by p(nt = l|s−t, z−t, n−t) = al+α al+bl+α+β l−1 Y i=0 bi+β ai+bi+α+β . (8) Expression (7) is a tradeoff between these two terms: the prediction of st will be increasingly better when the context length nt becomes long, but we can select it only when the probability of reaching that level in the suffix tree is supported by the other counts in the training data. Using these probabilities, we can construct a Gibbs sampler, as shown in Figure 3, to iteratively resample n and z in order to estimate the parameter of the variable order hierarchical Pitman-Yor language model (VPYLM)2. In this sampler, we first remove the t’th customer who resides at a depth of order[t] in the suffix tree, and decrement ai or bi accordingly along the path. Sampling a new depth (i.e. Markov order) according to (7), we put the t’th customer back at the new depth recorded as order[t], and increment ai or bi accordingly along the new path. When we add a customer st, zt is implicitly sampled because st’s proxy customer is recursively sent to parent nodes in case a new table is needed to sit him down. 1: for j = 1 · · · N do 2: for t = randperm(1 · · · T) do 3: if j >1 then 4: remove customer (order[t], st, s1:t−1) 5: end if 6: order[t] = add customer (st, s1:t−1) . 7: end for 8: end for Figure 3: Gibbs Sampler of VPYLM. struct ngram { /* n-gram node */ ngram *parent; splay *children; /* = (ngram **) */ splay *symbols; /* = (restaurant **) */ int stop; /* ah */ int through; /* bh */ int ncounts; /* c(h) */ int ntables; /* th· */ int id; /* symbol id */ }; Figure 4: Data structure of a suffix tree node. Counts ah and bh are maintained at each node. We used Splay Trees for efficient insertion/deletion. 2This is a specific application of our model to the hierarchical Pitman-Yor processes for discrete data. ‘how queershaped little children drawling-desks, which would get through that dormouse!’ said alice; ‘let us all for anything the secondly, but it to have and another question, but i shalled out, ‘you are old,’ said the you’re trying to far out to sea. (a) Random walk generation from a character model. Character s a i d a l i c e ; ‘ l e t u s a l l f o r any t h i ng t he s e cond l y , · · · Markov order 56547106543714824465544556456777533459116489894447343 · · · (b) Markov orders used to generate each character above. Figure 5: Character-based infinite Markov model trained on “Alice in Wonderland.” This sampler is an extension of that reported in [9] using stochastically different orders n (n = 0 · · · ∞) for each customer. In practice, we can place some maximum order nmax on n and sample within it 3, or use a small threshold ǫ to stop the descent when the prior probability (8) of reaching that level is smaller than ǫ. In this case, we obtain an “infinite” order Markov model: now we can eliminate the order from Markov models by integrating it out. Because each node in the suffix tree may have a huge number of children, we used Splay Trees [11] for the efficient search as in [6]. Splay Trees are self-organizing binary search trees having amortized O(log n) order, that automatically put frequent items at shallower nodes. This is ideal for sequences with a power law property like natural languages. Figure 4 shows our data structure of a node in a suffix tree. 3.3 Prediction Since we do not usually know the Markov order of a context h = s−∞· · · s−2s−1 beforehand, when making predictions we consider n as a latent variable and average over it, as follows: p(s|h) = P∞ n=0 p(s, n|h) (9) = P∞ n=0 p(s|h, n)p(n|h) . (10) Here, p(s|n, h) is a HPYLM prediction of order n through (1), and p(n|h) is the probability distribution of latent Markov order n possessed by the context h, obtained through (8). In practice, we further average (10) over the configurations of n and s through N Gibbs iterations on training data s, as HPYLM does. Since p(n|h) has a product form as (3), we can also write the above expression recursively by introducing an auxiliary probability p(s|h, n+) as follows: p(s|h, n+) = qn · p(s|h, n) + (1 −qn) · p(s|h, (n+1)+) , (11) p(s|h) ≡p(s|h, 0+) . (12) This formula shows that qn in fact defines the stick-breaking process on an infinite tree, where breaking proportions will differ branch to branch as opposed to a single proportion on a unit interval used in ordinary Dirichlet processes. In practice, we can truncate the infinite recursion in (11) and rescale it to make p(n|h) a proper distribution. 3.4 “Stochastic Phrases” on Suffix Tree In the expression (9) above, p(s, n|h) is the probability that the symbol s is generated by a Markov process of order n on h, that is, using the last n symbols of h as a Markov state. This means that a subsequence s−n · · · s−1s forms a “phrase”: for example, when “Gaussians” was generated using a context “mixture of”, we can consider “mixture of Gaussians” as a phrase and assign a probability to this subsequence, which represents its cohesion strength irrespective of its length. In other words, instead of emitting a single symbol s at the root node of suffix tree, we can first stochastically descend the tree according to the probability to stop by (3). Finally, we emit s given the context s−n · · · s−1, which yields a phrase s−n · · · s−1s and its cohesion probability. Therefore, by traversing the suffix tree, we can compute p(s, n|h) for all the subsequences efficiently. For concrete examples, see Figure 8 and 10 in Section 4. 3Notice that by setting (α, β) = (0, ∞), we always obtain qi = 0: with some maximum order nmax, this is equivalent to always using the maximum depth, and thus to reducing the model to the original HPYLM. In this regard, VPYLM is a natural superset that includes HPYLM [9]. while key european consuming nations appear unfazed about the prospects of a producer cartel that will attempt to fix prices | the pact is likely to meet strong opposition from u.s. delegates this week EOS 0 1 2 3 4 5 6 7 8 9 n Figure 6: Estimated Markov order distributions from which each word has been generated. 4 Experiments To investigate the behavior of the infinite Markov model, we conducted experiments on character and word sequences in natural language. 4.1 Infinite character Markov model Character-based Markov model is widely employed in data compression and has important application in language processing, such as OCR and unknown word recognition. In this experiment, we used a 140,931 characters text of “Alice in Wonderland” and built an infinite Markov model using uniform Beta prior and truncation threshold ǫ = 0.0001 in Section 3.2. Max. order Perplexity n = 3 6.048 n = 5 3.803 n = 10 3.519 n = ∞ 3.502 Table 1: Perplexity results of Character models. Figure 5(a) is a random walk generation from this infinite model. To generate this, we begin with an infinite sequence of ‘beginning of sentence’ special symbols, and sample the next character according to the generative model given the already sampled sequence as the context. Figure 5(b) is the actual Markov orders used for generation by (8). Without any notion of “word”, we can see that our model correctly captures it and even higher dependencies between “words”. In fact, the model contained many nodes that correspond to valid words as well as the connective fragments between them. Table 1 shows predictive perplexity4 results on separate test data. Compared with truncations n = 3, 5 and 10, the infinite model performs the best in all the variable order options. 4.2 Bayesian ∞-gram Language Model Data For a word-based “n-gram” model of language, we used a random subset of the standard NAB Wall Street Journal language modeling corpus [12] 5, totalling 10,007,108 words (409,246 sentences) for training and 10,000 sentences for testing. Symbols that occurred fewer than 10 times in total and punctuation (commas, quotation marks etc.) are mapped to special characters, and all sentences are lowercased, yielding a lexicon of 26,497 words. As HPYLM is shown to converge very fast [9], according to preliminary experiments we used N = 200 Gibbs iterations for burn-in, and a further 50 iterations to evaluate the perplexity of the test data. Results Figure 6 shows the Hinton diagram of estimated Markov order distributions on part of the training data, computed according to (7). As for the perplexity, Table 2 shows the results compared with the fixed-order HPYLM with the number of nodes in each model. n means the fixed order for HPYLM, and the maximum order nmax in VPYLM. For the “infinite” model of n = ∞, we used a threshold ǫ=10−8 in Section 3.2 for descending the suffix tree. As empirically found by [12], perplexities will saturate when n becomes large, because only a small portion of words actually exhibit long-range dependencies. However, we can see that the VPYLM performance is comparable to that of HPYLM with much fewer nodes and restaurants up to n = 7 and 8, where vanilla HPYLM encounters memory overflow caused by a rapid increase in the number of parameters. In fact, the inference of VPYLM is about 20% faster than that of HPYLM of the 4Perplexity is a reciprocal of average predictive probabilities, thus smaller is better. 5We also conducted experiments on standard corpora of Chinese (character-wise) and Japanese, and obtained the same line of results presented in this paper. n HPYLM VPYLM Nodes(H) Nodes(V) 3 113.60 113.74 1,417K 1,344K 5 101.08 101.69 12,699K 7,466K 7 N/A 100.68 27,193K 10,182K 8 N/A 100.58 34,459K 10,434K ∞ — 100.36 — 10,629K Table 2: Perplexity Results of VPYLM and HPYLM on the NAB corpus with the number of nodes in each model. N/A means a memory overflow caused by the expected number of nodes shown in italic. 0.0×100 5.0×105 1.0×106 1.5×106 2.0×106 2.5×106 3.0×106 3.5×106 0 1 2 3 4 5 6 7 8 9 10 11 12 Occurrences n Figure 7: Global distribution of sampled Markov orders on the ∞-gram VPYLM over the NAB corpus. n = 0 is unigram, n = 1 is bigram,· · · . same order despite the additional cost of sampling n-gram orders, because it appropriately avoids the addition of unnecessarily deep nodes on the suffix tree. The perplexity at n = ∞is the lowest compared to all fixed truncations, and contains only necessary number of nodes in the model. Figure 7 shows a global n-gram order distribution from a single posterior sample of Gibbs iteration in ∞-gram VPYLM. Note that since we added an infinite number of dummy symbols to the sentence heads as usual, every word context has a maximum possible length of ∞. We can see from this figure that the context lengths that were actually used decay largely exponentially, as intuitively expected. Because of the tradeoff between using a longer, more predictive context and the penalty incurred when reaching a deeper node, interestingly a peak emerges around n = 3 ∼4 as a global phenomenon. With regard to the hyperparameter that defines the prior forms of suffix trees, we used a (4, 1)prior in this experiment. In fact, this hyperparameter can be optimized by the empirical Bayes method using each Beta posterior of qi in (6). By using the Newton-Raphson iteration of [13], this converged to (0.85, 0.57) on a 1 million word subset of the NAB corpus. However, we can see that the performance does not depend significantly on the prior. Figure 9 shows perplexity results for the same data, using (α, β) ∈(0.1∼10)×(0.1∼10). We can see from this figure that the performance is almost stable, except when β is significantly greater than α. Finally, we show in Figure 8 some “stochastic pharases” in Section 3.4 induced on the NAB corpus. 4.3 Variable Order Topic Model While previous approaches to latent topic modeling assumed a fixed order such as unigrams or bigrams, the order is generally not fixed and unknown to us. Therefore, we used a Gibbs sampler for the Markov chain LDA [14] and augmented it by sampling Markov orders at the same time. Because “topic-specific” sequences constitute only some part of the entire data, we assumed that the “generic” model generated the document according to probability λ, and the rest are generated by the LDA of VPYLM. We endow λ a uniform Beta prior and used the posterior estimate for sampling that will differ document to document. For the experiment, we used the NIPS papers dataset of 1739 documents. Among them, we used random 1500 documents for training and random 50 documents from the rest of 239 documents for testing, after the same preprocessing for the NAB corpus. We set a symmetric Dirichlet prior p(s, n) Stochastic phrases in the suffix tree 0.9784 primary new issues 0.9726 ˆ at the same time 0.9512 is a unit of 0.9026 from # % in # to # % 0.8896 in a number of 0.8831 in new york stock exchange composite trading 0.7566 mechanism of the european monetary 0.7134 increase as a result of 0.6617 tiffany & co. : Figure 8: “Stochastic phrases” induced by the 8-gram VPYLM trained on the NAB corpus. 122 124 126 128 130 132 134 10 5 2 1 0.5 0.1 10 5 2 1 0.5 0.1 136 134 132 130 128 126 124 PPL α β PPL Figure 9: Perplexity results using different hyperparameters on the 1M NAB corpus. p(n, s) Phrase 0.9904 in section # 0.9900 the number of 0.9856 in order to 0.9832 in table # 0.9752 dealing with 0.9693 with respect to (a) Topic 0 (“generic”) p(n, s) Phrase 0.9853 et al 0.9840 receptive field 0.9630 excitatory and inhibitory 0.9266 in order to 0.8939 primary visual cortex 0.8756 corresponds to (b) Topic 1 p(n, s) Phrase 0.9823 monte carlo 0.9524 associative memory 0.9081 as can be seen 0.8206 parzen windows 0.8044 in the previous section 0.7790 american institute of physics (c) Topic 4 Figure 10: Topic based stochastic pharases. γ = 0.1 and the number of topics M = 5, nmax = 5 and ran a N = 200 Gibbs iterations to obtain a single posterior set of models. Although in predictive perplexity the improvements are slight (VPYLDA=116.62, VPYLM=117.28), “stochastic pharases” computed on each topic VPYLM show interesting characteristics shown in Figure 10. Although we used a small number of latent topics in this experiment to avoid data sparsenesses, in future research we need a more flexible topic model where the number of latent topics will differ from node to node in the suffix tree. 5 Discussion and Conclusion In this paper, we presented a completely generative approach to estimating variable order Markov processes. By extending a stick-breaking process “vertically” over a suffix tree of hierarchical Chinese restaurant processes, we can make a posterior inference on the Markov orders from which each data originates. Although our architecture looks similar to Polya Trees [15], in Polya Trees their recursive partitions are independent while our stick-breakings are hierarchically organized according to the suffix tree. In addition to apparent application of our approach to hierarchical continuous distributions like Gaussians, we expect that the basic model can be used for the distribution of latent variables. Each data is assigned to a deeper level just when needed, and resides not only in leaf nodes but also in the intermediate nodes, by stochastically descending a clustering hierarchy from the root as described in this paper. References [1] C. E. Shannon. A mathematical theory of communication. Bell System Technical Journal, 27:379–423, 623–656, 1948. [2] Alberto Apostolico and Gill Bejerano. Optimal amnesic probabilistic automata, or, how to learn and classify proteins in linear time and space. Journal of Computational Biology, 7:381–393, 2000. [3] F.M.J. Willems, Y.M. Shtarkov, and T.J. Tjalkens. The Context-Tree Weighting Method: Basic Properties. IEEE Trans. on Information Theory, 41:653–664, 1995. [4] Frederick Jelinek. Statistical Methods for Speech Recognition. Language, Speech, and Communication Series. MIT Press, 1998. [5] Peter Buhlmann and Abraham J. Wyner. Variable Length Markov Chains. The Annals of Statistics, 27(2):480–513, 1999. [6] Fernando Pereira, Yoram Singer, and Naftali Tishby. Beyond Word N-grams. In Proc. of the Third Workshop on Very Large Corpora, pages 95–106, 1995. [7] Dana Ron, Yoram Singer, and Naftali Tishby. The Power of Amnesia. In Advances in Neural Information Processing Systems, volume 6, pages 176–183, 1994. [8] Andreas Stolcke. Entropy-based Pruning of Backoff Language Models. In Proc. of DARPA Broadcast News Transcription and Understanding Workshop, pages 270–274, 1998. [9] Yee Whye Teh. A Bayesian Interpretation of Interpolated Kneser-Ney. Technical Report TRA2/06, School of Computing, NUS, 2006. [10] Sharon Goldwater, Thomas L. Griffiths, and Mark Johnson. Interpolating Between Types and Tokens by Estimating Power-Law Generators. In NIPS 2005, 2005. [11] Daniel Sleator and Robert Tarjan. Self-Adjusting Binary Search Trees. JACM, 32(3):652–686, 1985. [12] Joshua T. Goodman. A Bit of Progress in Language Modeling, Extended Version. Technical Report MSR–TR–2001–72, Microsoft Research, 2001. [13] Thomas P. Minka. Estimating a Dirichlet distribution, 2000. http://research.microsoft.com/˜minka/papers/ dirichlet/. [14] Mark Girolami and Ata Kab´an. Simplicial Mixtures of Markov Chains: Distributed Modelling of Dynamic User Profiles. In NIPS 2003. 2003. [15] R. Daniel Mauldin, William D. Sudderth, and S. C. Williams. Polya Trees and Random Distributions. Annals of Statistics, 20(3):1203–1221, 1992.
2007
150
3,182
Retrieved context and the discovery of semantic structure Vinayak A. Rao, Marc W. Howard∗ Syracuse University Department of Psychology 430 Huntington Hall Syracuse, NY 13244 vrao@gatsby.ucl.ac.uk, marc@memory.syr.edu Abstract Semantic memory refers to our knowledge of facts and relationships between concepts. A successful semantic memory depends on inferring relationships between items that are not explicitly taught. Recent mathematical modeling of episodic memory argues that episodic recall relies on retrieval of a gradually-changing representation of temporal context. We show that retrieved context enables the development of a global memory space that reflects relationships between all items that have been previously learned. When newly-learned information is integrated into this structure, it is placed in some relationship to all other items, even if that relationship has not been explicitly learned. We demonstrate this effect for global semantic structures shaped topologically as a ring, and as a two-dimensional sheet. We also examined the utility of this learning algorithm for learning a more realistic semantic space by training it on a large pool of synonym pairs. Retrieved context enabled the model to “infer” relationships between synonym pairs that had not yet been presented. 1 Introduction Semantic memory refers to our ability to learn and retrieve facts and relationships about concepts without reference to a specific learning episode. For example, when answering a question such as “what is the capital of France?” it is not necessary to remember details about the event when this fact was first learned in order to correctly retrieve this information. An appropriate semantic memory for a set of stimuli as complex as, say, words in the English language, requires learning the relationships between tens of thousands of stimuli. Moreover, the relationships between these items may describe a network of non-trivial topology [16]. Given that we can only simultaneously perceive a very small number of these stimuli, in order to be able to place all stimuli in the proper relation to each other the combinatorics of the problem require us to be able to generalize beyond explicit instruction. Put another way, semantic memory needs to not only be able to retrieve information in the absence of a memory for the details of the learning event, but also retrieve information for which there is no learning event at all. Computational models for automatic extraction of semantic content from naturally-occurring text, such as latent semantic analysis [12], and probabilistic topic models [1, 7], exploit the temporal co-occurrence structure of naturally-occurring text to estimate a semantic representation of words. Their success relies to some degree on their ability to not only learn relationships between words that occur in the same context, but also to infer relationships between words that occur in similar ∗Vinayak Rao is now at the Gatsby Computational Neuroscience Unit, University College London. http://memory.syr.edu. 1 contexts. However, these models operate on an entire corpus of text, such that they do not describe the process of learning per se. Here we show that the temporal context model (TCM), developed as a quantitative model of human performance in episodic memory tasks, can provide an on-line learning algorithm that learns appropriate semantic relationships from incomplete information. The capacity for this model of episodic memory to also construct semantic knowledge spaces of multiple distinct topologies, suggests a relatively subtle relationship between episodic and semantic memory. 2 The temporal context model Episodic memory is defined as the vivid conscious recollection of information from a specific instance from one’s life [18]. Many authors describe episodic memory as the result of the recovery of some type of a contextual representation that is distinct from the items themselves. If a cue item can recover this “pointer” to an episode, this enables recovery of other items that were bound to the contextual representation without committing to lasting interitem connections between items whose occurrence may not be reliably correlated [17]. Laboratory episodic memory tasks can provide an important clue to the nature of the contextual representation that could underlie episodic memory. For instance, in the free recall task, subjects are presented with a series of words to be remembered and then instructed to recall all the words they can remember in any order they come to mind. If episodic recall of an item is a consequence of recovering a state of context, then the transitions between recalls may tell us something about the ability of a particular state of context to cue recall of other items. Episodic memory tasks show a contiguity effect—a tendency to make transitions to items presented close together in time, but not simultaneously, with the just-recalled word. The contiguity effect shows an apparently universal form across multiple episodic recall tasks, with a characteristic asymmetry favoring forward recall transitions [11] (see Figure 1a). The temporal contiguity effect observed in episodic recall can be simply reconciled with the hypothesis that episodic recall is the result of recovery of a contextual representation if one assumes that the contextual representation changes gradually over time. The temporal context model (TCM) describes a set of rules for a gradually-changing representation of temporal context and how items can be bound to and recover states of temporal context. TCM has been applied to a number of problems in episodic recall [9]. Here we describe the model, incorporating several changes that enable TCM to describe the learning of stable semantic relationships (detailed in Section 3).1 TCM builds on distributed memory models which have been developed to provide detailed descriptions of performance in human memory tasks [14]. In TCM, a gradually-changing state of temporal context mediates associations between items and is responsible for recency effects and contiguity effects. The state of the temporal context vector at time step i is denoted as ti and changes from moment-to-moment according to ti = ρiti−1 + βtIN i , (1) where β is a free parameter, tIN i is the input caused by the item presented at time step i, assumed to be of unit length, and ρi is chosen to ensure that ti is of unit length. Items, represented as unchanging orthonormal vectors f, are encoded in their study contexts by means of a simple outer-product matrix connecting the t layer to the f layer, MT F , which is updated according to: ∆MT F i = fit′ i−1, (2) where the prime denotes the transpose and the subscripts here reflect time steps. Items are probed for recall by multiplying MT F from the right with the current state of t as a cue. This means that when tj is presented as a cue, each item is activated to the extent that the probe context overlaps with its encoding contexts. The space over which t evolves is obviously determined by the tINs. We will decompose tIN into cIN, a component that does not change over the course of study of this paper, and hIN, a component 1Previous published treatments of TCM have focused on episodic tasks in which items were presented only once. Although the model described here differs from previously published versions in notation and its behavior over multiple item repetitions, it is identical to previously-published results described for single presentations of items. 2 a b c c f t h i i h -5 -4 -3 -2 -1 0 1 2 3 4 5 Lag 0 0.2 0.4 0.6 0.8 1 Cue strength Hippocampal Cortical Figure 1: Temporal recovery in episodic memory. a. Temporal contiguity effect in episodic recall. Given that an item from a series has just been recalled, the y-axis gives the probability that the next item recalled came from each serial position relative the just-recalled item. This figure is averaged across a dozen separate studies [11]. b. Visualization of the model. Temporal context vectors ti are hypothesized to reside in extra-hippocampal MTL regions. When an item fi is presented, it evokes two inputs to t—a slowly-changing direct cortical input cIN i and a more rapidly varying hippocampal input hIN i . When an item is repeated, the hippocampal component retrieves the context in which the item was presented. c. While the cortical component serves as a temporally-asymmetric cue when an item is repeated, the hippocampal component provides a symmetric cue. Combining these in the right proportion enables TCM to describe temporal contiguity effects. that changes rapidly to retrieve the contexts in which an item was presented. Denoting the time steps at which a particular item A was presented as Ai, we have tIN Ai+1 ∝γˆhIN Ai+1 + (1 −γ) cIN A . (3) where the proportionality reflects the fact that tIN is always normalized before being used to update ti as in Eq. 1 and the hat on the hIN term refers to the normalization of hIN. We assume that the cINs corresponding to the items presented in any particular experiment start and remain orthonormal to each other. In contrast, hIN starts as zero for each item and then changes according to: hIN Ai+1 = hIN Ai + tAi−1. (4) It has been hypothesized that ti reflects the pattern of activity at extra-hippocampal medial temporal lobe (MTL) regions, in particular the entorhinal cortex [8]. The notation cIN and hIN reflects the hypothesis that the consistent and rapidly-changing parts of tIN reflect inputs to the entorhinal cortex from cortical and hippocampal sources, respectively (Figure 1b). According to TCM, associations between items are not formed directly, but rather are mediated by the effect that items have on the state of context which is then used to probe for recall of other items. When an item is repeated as a probe, this induces a correlation between the tIN of the probe context and the study context of items that were neighbors of the probe item when it was initially presented. The consistent part of tIN is an effective cue for items that followed the initial presentation of the probe item (open symbols, Figure 1c). In contrast, recovery of the state of context that was present before the probe item was initially presented is a symmetric cue (filled symbols, Figure 1). Combining these two components in the proper proportions provides an excellent description of contiguity effects in episodic memory [8]. 3 Constructing global semantic information from local events In each of the following simulations, we specify a to-be-learned semantic structure by imagining items as the nodes of a graph with some topology. We generated training sequences by randomly sampling edges from the graph.2 Each edge only contains a limited amount of information about 2The pairs are chosen randomly, so that any across-pair learning would be uninformative with respect to the overall structure of the graph. To further ensure that learning across pairs from simple contiguity could not contribute to our results, we set β in Eq. 1 to one when the first member of each pair was presented. This means that the temporal context when the second item is presented is effectively isolated from the previous pair. 3 a b c d A B C D G H E F I J A B C D E F G H I J A B C D E F G H I J A B C D E F G H I J A B C D E F G H I J -2 -1.5 -1 -0.5 0 0.5 1 1.5 2 Dimension 1 -1.4 -1.2 -1 -0.8 -0.6 -0.4 -0.2 0 0.2 0.4 0.6 0.8 1 1.2 1.4 Dimension 2 Figure 2: Learning of a one-dimensional structure using contextual retrieval. a. The graph used to generate the training pairs. b-c. Associative strength between items after training (higher strength corresponds to darker cells). b. The model without contextual retrieval (γ = 0). c. The model with contextual retrieval (γ > 0). d. Two dimensional MDS solution for the log of the data in c. Lines connect points corresponding to nodes connected by an edge. the global structure. For the model is to learn the global structure of the graph, it must somehow integrate the learning events into a coherent whole. After training we evaluated the ability of the model to capture the topology of the graph by examining the cue strength between each item. The cue strength from item A to B is defined as f ′ BMT F tIN A . This reflects the overlap between the cIN and hIN components of A and the contexts in which B was presented.3 Because tIN i is caused by presentation of item i, we can think of the tINs as a representation of the set of items. Learning can be thought of as a mixing of the tINs according to the temporal structure of experience. Because the cINs are fixed, changes in the representation are solely due to changes in the hINs. Suppose that two items, A and B are presented in sequence. If context is retrieved, then after presentation of the pair A-B hIN B includes the tIN A that obtained when A was presented. This includes the current state of hIN A as well as the fixed state cIN A . If at some later time B is now presented as part of the sequence B-C , then because tIN B is similar to tIN A , item C is learned in a context that resembles tIN A , despite the fact that A and C were not actually presented close together in time. After learning A-B and B-C , tIN A and tIN C will resemble each other. This ability to rate as similar items that were not presented together in the same context, but that were presented in similar contexts, is a key property of latent models of semantic learning [12]. To isolate the importance of retrieved context for the ability to extract global structure, we will compare a version of the model with γ = 0 to one with γ > 0.4 With γ = 0, the model functions as a simple co-occurrence detector in that the cue strength between A and B is non-zero only if cIN A was part of the study contexts of B. In the absence of contextual retrieval, this requires that B was preceded by A during study. Ultimately, the tis and hIN i s can be expressed as a combination of the cIN vectors. We therefore treated these as orthonormal basis vectors in the simulations that follow. MT F and the hINs were initialized as a matrix and vectors of zeros, respectively. The parameter β for the second member of a pair was fixed at 0.6. 3.1 1-D: Rings For this simulation we sampled edges chosen from a ring of ten items (Fig. 2a). We treated the ring as an undirected graph, in that we sampled an edge A-B equally often as B-A . We presented the model with 300 pairs chosen randomly from the ring. For example, the training pairs might include the sub-sequence C-D , A-B , F-E , B-C . 3In this implementation of TCM, hIN A is identical to f ′ AMT F . This need not be the case in general, as one could alter the learning rate, or even the structure of Eqs. 2 and/or 4 without changing the basic idea of the model. 4In the simulations reported below, this value is set to 0.6. The precise value does not affect the qualitative results we report as long as it is not too close to one. 4 a b c A B F C G D H L E J K I M N O P Q R S T U V W X Y -6 -5 -4 -3 -2 -1 0 1 2 3 4 5 6 Dimension 1 -6 -5 -4 -3 -2 -1 0 1 2 3 4 5 6 Dimension 2 -5 -4 -3 -2 -1 0 1 2 3 4 5 Dimension 1 -5 -4 -3 -2 -1 0 1 2 3 4 5 Dimension 2 Figure 3: Reconstruction of a 2-dimensional spatial representation. a. The graph used to construct sequences. b. 2-dimensional MDS solution constructed from the temporal co-occurrence version of TCM γ = 0 using the log of the associative strength as the metric. Lines connect stimuli from adjacent edges. c. Same as b, but for TCM with retrieved context. The model accurately places the items in the correct topology. Figure 2b shows the cue strength between each pair of items as a grey-scale image after training the model without contextual retrieval (γ = 0). The diagonal is shaded reflecting the fact that an item’s cue strength to itself is high. In addition, one row on either side of the diagonal is shaded. This reflects the non-zero cue strength between items that were presented as part of the same training pair. That is, the model without contextual retrieval has correctly learned the relationships described by the edges of the graph. However, without contextual retrieval the model has learned nothing about the relationships between the items that were not presented as part of the same pair (e.g. the cue strength between A and C is zero). Figure 2c shows the cue strength between each pair of items for the model with contextual retrieval γ > 0. The effect of contextual retrieval is that pairs that were not presented together have non-zero cue strength and this cue strength falls off with the number of edges separating the items in the graph. This happens because contextual retrieval enables similarity to “spread” across the edges of the graph, reaching an equilibrium that reflects the global structure. Figure 2d shows a two-dimensional MDS (multi-dimensional scaling) solution conducted on the log of the cue strengths of the model with contextual retrieval. The model appears to have successfully captured the topology of the graph that generated the pairs. More precisely, with contextual retrieval, TCM can place the items in a space that captures the topology of the graph used to generate the training pairs. On the one hand, the relationships that result from contextual retrieval in this simulation seem intuitive and satisfying. Viewed from another perspective, however, this could be seen as undesirable behavior. Suppose that the training pairs accurately sample the entire set of relationships that are actually relevant. Moreover, suppose that one’s task were simply to remember the pairs, or alternatively, to predict the next item that would be presented after presenting the first member of a pair. Under these circumstances, the co-occurrence model performs better than the model equipped with contextual retrieval. It should be noted that people form associations across pairs (e.g. A-C ) after learning lists of paired associates with a linked temporal structure like the rings shown in Figure 2a [15]. In addition, rats can also generalize across pairs, but this ability depends on an intact hippocampus [2]. These finding suggest that the mechanism of contextual retrieval capture an important property of how we learn in similar circumstance. 3.2 2-D: Spatial navigation The ring illustrated in Figure 2 demonstrates the basic idea behind contextual retrieval’s ability to extract semantic spaces, but it is hard to imagine an application where such a simple space would need to be extracted. In this simulation will illustrate the ability of retrieved context to discover relationships between stimuli arranged in a two-dimensional sheet. The use of a two-dimensional sheet has an analog in spatial navigation. It has long been argued that the medial temporal lobe has a special role in our ability to store and retrieve information from a spatial map. Eichenbaum [5] has argued that the MTL’s role in spatial 5 navigation is merely a special case of more general role in organizing disjointed experiences into integrated representations. The present model can be seen as a computational mechanism that could implement this idea. In our typical experience, spatial information is highly correlated with temporal information. Because of our tendency to move in continuous paths through our environment, locations that are close together in space also tend to be experienced close together in time. However, insofar as we travel in more-or-less straight paths, the combinatorics of the problem place a premium on the ability to integrate landmarks experienced on different paths into a coherent whole. At the outset we should emphasize that our extremely simple simulation here does not capture many of the aspects of actual spatial navigation—the model is not provided with metric spatial information, nor gradually changing item inputs, nor do we discuss how the model could select an appropriate trajectory to reach a goal [3]. We constructed a graph arranged as a 5×5 grid with horizontal and vertical edges (Figure 3a). We presented the model with 600 edges from the graph in a randomly-selected order. One may think of the items as landmarks in a city with a rectangular street plan. The “traveler” takes trips of one block at a time (perhaps teleporting out of the city between journeys).5 The problem here is not only to integrate pairs into rows and columns as in the 1-dimensional case, but to place the rows and columns into the correct relationship to each other. Figure 3b shows the two-dimensional MDS solution calculated on the log of the cue strengths for the co-occurrence model. Without contextual retrieval the model places the items in a high-dimensional structure that reflects their co-occurrence. Figure 3c shows the same calculation for TCM with contextual retrieval. Contextual retrieval enables the model to place the items on a two-dimensional sheet that preserves the topology of the graph used to generate the pairs. It is not a map—there is no sense of North nor an accurate metric between the points—but it is a semantic representation that captures something intuitive about the organization that generated the pairs. This illustrates the ability of contextual retrieval to organize isolated experiences, or episodes, into a coherent whole based on the temporal structure of experience. 3.3 More realistic example: Synonyms The preceding simulations showed that retrieved context enables learning of simple topologies with a few items. It is possible that the utility of the model in discovering semantic relationships is limited to these toy examples. Perhaps it does not scale up well to spaces with large numbers of stimuli, or perhaps it will be fooled by more realistic and complex topologies. In this subsection we demonstrate that retrieved context can provide benefits in learning relationships among a large number of items with a more realistic semantic structure. We assembled a large list of English words (all unique strings in the TASA corpus) and used these as probes to generate a list of nearly 114,000 synonym pairs using WordNet. We selected 200 of these synonym pairs at random as a test list. The word pairs organize into a large number of connected graphs of varying sizes. The largest of these contained slightly more than 26,000 words; there were approximately 3,500 clusters with only two words. About 2/3 of the pairs reflect edges within the five largest clusters of words. We tested performance by comparing the cue strength of the cue word with its synonym to the associative strength to three lures that were synonyms of other cue words—if the correct answer had the highest cue strength, it was counted as correct.6 We averaged performance over ten shuffles of the training pairs. We preserved the order of the synonym pairs, so that this, unlike the previous two simulations, described a directed graph. Figure 4a shows performance on the training list as a function of learning. The lower curve shows “co-occurrence” TCM without contextual retrieval, γ = 0. The upper curve shows TCM with contextual retrieval, γ > 0. In the absence of contextual retrieval, the model learns linearly, performing perfectly on pairs that have been explicitly presented. However, contextual retrieval enables faster learning of the pairs, presumably due to the fact that it can “infer” relationships between words 5We also observed the same results when we presented the model with complete rows and columns of the sheet as a training set rather than simply pairs. 6In instances where the cue strength was zero for all the choices, as at the beginning of training, this was counted as 1/4 of a correct answer. 6 a b 0 20 40 60 80 100 Number of pairs presented (1k) 0 0.2 0.4 0.6 0.8 1 P(correct) TCM Co-occurrence 0 20 40 60 80 100 Number of pairs presented (1k) 0 0.2 0.4 0.6 0.8 1 P(correct) TCM Co-occurrence Figure 4: Retrieved context aids in learning synonyms that have not been presented. a. Performance on the synonym test. The curve labeled “TCM” denotes the performance of TCM with contextual retrieval. The curve labeled “Co-occurrence” is the performance of TCM without contextual retrieval. b. Same as a, except that the training pairs were shuffled to omit any of the test pairs from the middle region of the training sequence. that were never presented together. To confirm that this property holds, we constructed shuffles of the training pairs such that the test synonyms were not presented for an extended period (see Figure 4b). During this period, the model without contextual retrieval does not improve its performance on the test pairs because they are not presented. In contrast, TCM with contextual retrieval shows considerable improvement during that interval.7 4 Discussion We showed that retrieval of temporal context, an on-line learning method developed for quantitatively describing episodic recall data, can also integrate distinct learning events into a coherent and intuitive semantic representation. It would be incorrect to describe this representation as a semantic space—the cue strength between items is in general asymmetric (Figure 1c). The model thus has the potential to capture some effects of word order and asymmetry. However, one can also think of the set of tINs corresponding to the items as a semantic representation that is also a proper space. Existing models of semantic memory, such as LSA and LDA, differ from TCM in that they are offline learning algorithms. More specifically, these algorithms form semantic associations between words by batch-processing large collections of natural text (e.g., the TASA corpus). While it would be interesting to compare results generated by running TCM on such a corpus with these models, constraints of syntax and style complicate this task. Unlike the simple examples employed here, temporal proximity is not a perfect indicator of local similarity in real world text. The BEAGLE model [10] describes the semantic representation of a word as a superposition of the words that occurred with it in the same sentence. This enables BEAGLE to describe semantic relations beyond simple cooccurrence, but precludes the development of a representation that captures continuously-varying representations (e.g., Fig. 3). It may be possible to overcome this limitation of a straightforward application of TCM to naturally-occurring text by generating a predictive representation, as in the syntagmatic-paradigmatic model [4]. The present results suggest that retrieved temporal context—previously hypothesized to be essential for episodic memory—could also be important in developing coherent semantic representations. This could reflect similar computational mechanisms contribute to separate systems, or it could indicate a deep connection between episodic and semantic memory. A key finding is that adult-onset amnesics with impaired episodic memory retain the ability to express previously-learned semantic knowledge but are impaired at learning new semantic knowledge [19]. Previous connectionist models have argued that the hippocampus contributes to classical conditioning by learning compressed representations of stimuli, and that these representations are eventually transferred to entorhinal cor7To ensure that this property wasn’t simply a consequence of backward associations for the model with retrieved context, we re-ran the simulations presenting the pairs simultaneously rather than in sequence (so that the co-occurrence model would also learn backward associations) and obtained the same results. 7 tex [6]. This could be implemented in the context of the current model by allowing slow plasticity to change the cINs over long time scales [13]. Acknowledgments Supported by NIH award MH069938-01. Thanks to Mark Steyvers, Tom Landauer, Simon Dennis, and Shimon Edelman for constructive criticism of the ideas described here at various stages of development. Thanks to Hongliang Gai and Aditya Datey for software development and Jennifer Provyn for reading an earlier version of this paper. References [1] D. Blei, A. Ng, and M. Jordan. Latent Dirichlet allocation. Journal of Machine Learning Research, 3:993–1022, 2003. [2] M. Bunsey and H. B. Eichenbaum. Conservation of hippocampal memory function in rats and humans. Nature, 379(6562):255–257, 1996. [3] P. Byrne, S. Becker, and N. Burgess. Remembering the past and imagining the future: a neural model of spatial memory and imagery. Psychological Review, 114(2):340–75, 2007. [4] S. Dennis. A memory-based theory of verbal cognition. Cognitive Science, 29:145–193, 2005. [5] H. Eichenbaum. The hippocampus and declarative memory: cognitive mechanisms and neural codes. Behavioural Brain Research, 127(1-2):199–207, 2001. [6] M. A. Gluck, C. E. Myers, and M. Meeter. Cortico-hippocampal interaction and adaptive stimulus representation: A neurocomputational theory of associative learning and memory. Neural Networks, 18:1265–1279, 2005. [7] T. L. Griffiths, M. Steyvers, and J. B. Tenenbaum. Topics in semantic representation. Psychological Review, 114(2):211–44, 2007. [8] M. W. Howard, M. S. Fotedar, A. V. Datey, and M. E. Hasselmo. The temporal context model in spatial navigation and relational learning: Toward a common explanation of medial temporal lobe function across domains. Psychological Review, 112(1):75–116, 2005. [9] M. W. Howard and M. J. Kahana. A distributed representation of temporal context. Journal of Mathematical Psychology, 46(3):269–299, 2002. [10] M. N. Jones and D. J. K. Mewhort. Representing word meaning and order information composite holographic lexicon. Psychological Review, 114:1–32, 2007. [11] M. J. Kahana, M.W. Howard, and S.M. Polyn. Associative processes in episodic memory. In H. L. Roediger, editor, Learning and Memory - A Comprehensive Reference. Elsevier, in press. [12] T. K. Landauer and S. T. Dumais. Solution to Plato’s problem : The latent semantic analysis theory of acquisition, induction, and representation of knowledge. Psychological Review, 104:211–240, 1997. [13] J. L. McClelland, B. L. McNaughton, and R. C. O’Reilly. Why there are complementary learning systems in the hippocampus and neocortex: insights from the successes and failures of connectionist models of learning and memory. Psychological Review, 102(3):419–57, 1995. [14] B. B. Murdock. Context and mediators in a theory of distributed associative memory (TODAM2). Psychological Review, 1997:839–862, 1997. [15] N. J. Slamecka. An analysis of double-function lists. Memory & Cognition, 4:581–585, 1976. [16] M. Steyvers and J. Tenenbaum. The large scale structure of semantic networks: statistical analyses and a model of semantic growth. Cognitive Science, 29:41–78, 2005. [17] T. J. Teyler and P. DiScenna. The hippocampal memory indexing theory. Behavioral Neuroscience, 100(2):147–54, 1986. [18] E. Tulving. Elements of Episodic Memory. Oxford, New York, 1983. [19] R. Westmacott and M. Moscovitch. Names and words without meaning: incidental postmorbid semantic learning in a person with extensive bilateral medial temporal damage. Neuropsychology, 15(4):586–96, 2001. 8
2007
151
3,183
Active Preference Learning with Discrete Choice Data Eric Brochu, Nando de Freitas and Abhijeet Ghosh Department of Computer Science University of British Columbia Vancouver, BC, Canada {ebrochu, nando, ghosh}@cs.ubc.ca Abstract We propose an active learning algorithm that learns a continuous valuation model from discrete preferences. The algorithm automatically decides what items are best presented to an individual in order to find the item that they value highly in as few trials as possible, and exploits quirks of human psychology to minimize time and cognitive burden. To do this, our algorithm maximizes the expected improvement at each query without accurately modelling the entire valuation surface, which would be needlessly expensive. The problem is particularly difficult because the space of choices is infinite. We demonstrate the effectiveness of the new algorithm compared to related active learning methods. We also embed the algorithm within a decision making tool for assisting digital artists in rendering materials. The tool finds the best parameters while minimizing the number of queries. 1 Introduction A computer graphics artist sits down to use a simple renderer to find appropriate surfaces for a typical reflectance model. It has a series of parameters that must be set to control the simulation: “specularity”, “Fresnel reflectance coefficient”, and other, less-comprehensible ones. The parameters interact in ways difficult to discern. The artist knows in his mind’s eye what he wants, but he’s not a mathematician or a physicist — no course he took during his MFA covered Fresnel reflectance models. Even if it had, would it help? He moves the specularity slider and waits for the image to be generated. The surface is too shiny. He moves the slider back a bit and runs the simulation again. Better. The surface is now appropriately dull, but too dark. He moves a slider down. Now it’s the right colour, but the specularity doesn’t look quite right any more. He repeatedly bumps the specularity back up, rerunning the renderer at each attempt until it looks right. Good. Now, how to make it look metallic...? Problems in simulation, animation, rendering and other areas often take such a form, where the desired end result is identifiable by the user, but parameters must be tuned in a tedious trial-anderror process. This is particularly apparent in psychoperceptual models, where continual tuning is required to make something “look right”. Using the animation of character walking motion as an example, for decades, animators and scientists have tried to develop objective functions based on kinematics, dynamics and motion capture data [Cooper et al., 2007]. However, even when expensive mocap is available, we simply have to watch an animated film to be convinced of how far we still are from solving the gait animation problem. Unfortunately, it is not at all easy to find a mapping from parameterized animation to psychoperceptual plausibility. The perceptual objective function is simply unknown. Fortunately, however, it is fairly easy to judge the quality of a walk — in fact, it is trivial and almost instantaneous. The application of this principle to animation and other psychoperceptual tools is motivated by the observation that humans often seem to be forming a mental model of the objective function. This model enables them to exploit feasible regions of the parameter space where the valuation is predicted to be high and to explore regions of high uncertainty. It is our the1 regression model optimization model model true function Figure 1: An illustrative example of the difference between models learned for regression vesus optimization. The regression model fits the true function better overall, but doesn’t fit at the maximum better than anywhere else in the function. The optimization model is less accurate overall, but fits the area of the maximum very well. When resources are limited, such as an active learning environment, it is far more useful to fit the area of interest well, even at the cost of overall predictive performance. Getting a good fit for the maximum will require many more samples using conventional regression. sis that the process of tweaking parameters to find a result that looks “right” is akin to sampling a perceptual objective function, and that twiddling the parameters to find the best result is, in essence, optimization. Our objective function is the psycho-perceptual process underlying judgement — how well a realization fits what the user has in mind. Following the econometrics terminology, we refer to the objective as the valuation. In the case of a human being rating the suitability of a simulation, however, it is not possible to evaluate this function over the entire domain. In fact, it is in general impossible to even sample the function directly and get a consistent response! While it would theoretically be possible to ask the user to rate realizations with some numerical scale, such methods often have problems with validity and reliability. Patterns of use and other factors can result in a drift effect, where the scale varies over time [Siegel and Castellan, 1988]. However, human beings do excel at comparing options and expressing a preference for one over others [Kingsley, 2006]. This insight allows us to approach the optimization function in another way. By presenting two or more realizations to a user and requiring only that they indicate preference, we can get far more robust results with much less cognitive burden on the user [Kendall, 1975]. While this means we can’t get responses for a valuation function directly, we model the valuation as a latent function, inferred from the preferences, which permits an active learning approach [Cohn et al., 1996; Tong and Koller, 2000]. This motivates our second major insight — it is not necessary to accurately model the entire objective function. The problem is actually one of optimization, not regression (Figure 1). We can’t directly maximize the valuation function, so we propose to use an expected improvement function (EIF) [Jones et al., 1998; Sasena, 2002]. The EIF produces an estimate of the utility of knowing the valuation at any point in the space. The result is a principled way of trading off exploration (showing the user examples unlike any they have seen) and exploitation (trying to show the user improvements on examples they have indicated preference for). Of course, regression-based learning can produce an accurate model of the entire valuation function, which would also allow us to find the best valuation. However, this comes at the cost of asking the user to compare many, many examples that have no practical relation what she is looking for, as we demonstrate experimentally in Sections 3 and 4. Our method tries instead to make the most efficient possible use of the user’s time and cognitive effort. Our goal is to exploit the strengths of human psychology and perception to develop a novel framework of valuation optimization that uses active preference learning to find the point in a parameter space that approximately maximizes valuation with the least effort to the human user. Our goal is to offload the cognitive burden of estimating and exploring different sets of parameters, though we can incorporate “slider twiddling” into the framework easily. In Section 4, we present a simple, but practical application of our model in a material design gallery that allows artists to find particular appearance rendering effects. Furthermore, the valuation function can be any psychoperceptual process that lends itself to sliders and preferences: the model can support an animator looking for a particular “cartoon physics” effect, an artist trying to capture a particular mood in the lighting of a scene, or an electronic musician looking for a specific sound or rhythm. Though we use animation and rendering as motivating domains, our work has a broad scope of application in music and other arts, as well as psychology, marketing and econometrics, and human-computer interfaces. 2 1.1 Previous Work Probability models for learning from discrete choices have a long history in psychology and econometrics [Thurstone, 1927; Mosteller, 1951; Stern, 1990; McFadden, 2001]. They have been studied extensively for use in rating chess players, and the Elo system [´El˝o, 1978] was adopted by the World Chess Federation FIDE to model the probability of one player defeating another. Glickman and Jensen [2005] use Bayesian optimal design for adaptively finding pairs for tournaments. These methods all differ from our work in that they are intended to predict the probability of a preference outcome over a finite set of possible pairs, whereas we work with infinite sets and are only incidentally interested in modelling outcomes. In Section 4, we introduce a novel “preference gallery” application for designing simulated materials in graphics and animation to demonstrate the practical utility of our model. In the computer graphics field, the Design Gallery [Marks et al., 1997] for animation and the gallery navigation interface for Bidirectional Reflectance Distribution Functions (BRDFs) [Ngan et al., 2006] are artist-assistance tools most like ours. They both uses non-adaptive heuristics to find the set of input parameters to be used in the generation of the display. We depart from this heuristic treatment and instead present a principled probabilistic decision making approach to model the design process. Parts of our method are based on [Chu and Ghahramani, 2005b], which presents a preference learning method using probit models and Gaussian processes. They use a ThurstoneMosteller model, but with an innovative nonparametric model of the valuation function. [Chu and Ghahramani, 2005a] adds active learning to the model, though the method presented there differs from ours in that realizations are selected from a finite pool to maximize informativeness. More importantly, though, this work, like much other work in the field [Seo et al., 2000; Guestrin et al., 2005], is concerned with learning the entire latent function. As our experiments show in Section 3, this is too expensive an approach for our setting, leading us to develop the new active learning criteria presented here. 2 Active Preference Learning By querying the user with a paired comparison, one can estimate statistics of the valuation function at the query point, but only at considerable expense. Thus, we wish to make sure that the samples we do draw will generate the maximum possible improvement. Our method for achieving this goal iterates the following steps: 1. Present the user with a new pair and record the choice: Augment the training set of paired choices with the new user data. 2. Infer the valuation function: Here we use a Thurstone-Mosteller model with Gaussian processes. See Sections 2.1 and 2.2 for details. Note that we are not interested in predicting the value of the valuation function over the entire feasible domain, but rather in predicting it well near the optimum. 3. Formulate a statistical measure for exploration-exploitation: We refer to this measure as the expected improvement function (EIF). Its maximum indicates where to sample next. EI is a function of the Gaussian process predictions over the feasible domain. See Section 2.3. 4. Optimize the expected improvement function to obtain the next query point: Finding the maximum of the EI corresponds to a constrained nonlinear programming problem. See Section 2.3. 2.1 Preference Learning Model Assume we have shown the user M pairs of items. In each case, the user has chosen which item she likes best. The dataset therefore consists of the ranked pairs D = {rk ≻ck; k = 1, . . . , M}, where the symbol ≻indicates that the user prefers r to c. We use x1:N = {x1, x2, . . . , xN}, xi ∈X ⊆Rd, to denote the N elements in the training data. That is, rk and ck correspond to two elements of x1:N. Our goal is to compute the item x (not necessarily in the training data) with the highest user valuation in as few comparisons as possible. We model the valuation functions u(·) for r and c as follows: u(rk) = f(rk) + erk u(ck) = f(ck) + eck, (1) 3 where the noise terms are Gaussian: erk ∼N(0, σ2) and eck ∼N(0, σ2). Following [Chu and Ghahramani, 2005b], we assign a nonparametric Gaussian process prior to the unknown mean valuation: f(·) ∼GP(0, K(·, ·)). That is, at the N training points. p(f) = |2πK|−1 2 exp −1 2f T K−1f  , where f = {f(x1), f(x2), . . . , f(xN)} and the symmetric positive definite covariance K has entries (kernels) Kij = k(xi, xj). Initially we learned these parameters via maximum likelihood, but soon realized that this was unsound due to the scarcity of data. To remedy this, we elected to use subjective priors using simple heuristics, such as expected dataset spread. Although we use Gaussian processes as a principled method of modelling the valuation, other techniques, such as wavelets could also be adopted. Random utility models such as (1) have a long and influential history in psychology and the study of individual choice behaviour in economic markets. Daniel McFadden’s Nobel Prize speech [McFadden, 2001] provides a glimpse of this history. Many more comprehensive treatments appear in classical economics books on discrete choice theory. Under our Gaussian utility models, the probability that item r is preferred to item c is given by: P(rk ≻ck) = P(u(rk) > u(ck)) = P(eck −erk < f(rk) −f(ck)) = Φ f(rk) −f(ck) √ 2σ  , where Φ (dk) = 1 √ 2π R dk −∞exp −a2/2  da is the cumulative function of the standard Normal distribution. This model, relating binary observations to a continuous latent function, is known as the Thurstone-Mosteller law of comparative judgement [Thurstone, 1927; Mosteller, 1951]. In statistics it goes by the name of binomial-probit regression. Note that one could also easily adopt a logistic (sigmoidal) link function ϕ (dk) = (1 + exp (−dk))−1. In fact, such choice is known as the Bradley-Terry model [Stern, 1990]. If the user had more than two choices one could adopting a multinomial-probit model. This multi-category extension would, for example, enable the user to state no preference for any of the two items being presented. 2.2 Inference Our goal is to estimate the posterior distribution of the latent utility function given the discrete data. That is, we want to compute p(f|D) ∝p(f) QM k=1 p(dk|f), where dk = f(rk)−f(ck) √ 2σ . Although there exist sophisticated variational and Monte Carlo methods for approximating this distribution, we favor a simple strategy: Laplace approximation. Our motivation for doing this is the simplicity and computational efficiency of this technique. Moreover, given the amount of uncertainty in user valuations, we believe the choice of approximating technique plays a small role and hence we expect the simple Laplace approximation to perform reasonably in comparison to other techniques. The application of the Laplace approximation is fairly straightforward, and we refer the reader to [Chu and Ghahramani, 2005b] for details. Finally, given an arbitrary test pair, the predicted utility f ⋆and f are jointly Gaussian. Hence, one can obtain the conditional p(f ⋆|f) easily. Moreover, the predictive distribution p(f ⋆|D) follows by straightforward convolution of two Gaussians: p(f ⋆|D) = R p(f ⋆|f)p(f|D)df. One of the criticisms of Gaussian processes, the fact that they are slow with large data sets, is not a problem for us, since active learning is designed explicitly to minimize the number of training data. 2.3 The Expected Improvement Function Now that we are armed with an expression for the predictive distribution, we can use it to decide what the next query should be. In loose terms, the predictive distribution will enable us to balance the tradeoff of exploiting and exploring. When exploring, we should choose points where the predicted variance is large. When exploiting, we should choose points where the predicted mean is large (high valuation). Let x⋆be an arbitrary new instance. Its predictive distribution p(f ⋆(x⋆)|D) has sufficient statistics {µ(x⋆) = k⋆T K−1f MAP , s2(x⋆) = k⋆⋆−k⋆T (K + C−1 MAP )−1k⋆}, where, now, k⋆T = [k(x⋆, x1) · · · k(x⋆, xN)] and k⋆⋆= k(x⋆, x⋆). Also, let µmax denote the highest estimate of the predictive distribution thus far. That is, µmax is the highest valuation for the data provided by the individual. 4 0 0.2 0.4 0.6 0.8 1 0 0.2 0.4 0.6 0.8 1 0 0.5 1 1.5 2 2.5 3 0 0.2 0.4 0.6 0.8 1 0 0.2 0.4 0.6 0.8 1 −4 −2 0 2 4 6 8 x 10 −4 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 Figure 2: The 2D test function (left), and the estimate of the function based on the results of a typical run of 12 preference queries (right). The true function has eight local and one global maxima. The predictor identifies the region of the global maximum correctly and that of the local maxima less well, but requires far fewer queries than learning the entire function. The probability of improvement at a point x⋆is simply given by a tail probability: p(f ⋆(x⋆) ≤µmax) = Φ µmax −µ(x⋆) s(x⋆)  , where f ⋆(x⋆) ∼N(µ(x⋆), s2(x⋆)). This statistical measure of improvement has been widely used in the field of experimental design and goes back many decades [Kushner, 1964]. However, it is known to be sensitive to the value of µmax. To overcome this problem, [Jones et al., 1998] defined the improvement over the current best point as I(x⋆) = max{0, µ(x⋆) −µmax}, which resulted in an expected improvement of EI(x⋆) =  (µmax −µ(x⋆))Φ(d) + s(x⋆)φ(d) if s > 0 0 if s = 0 where d = µmax−µ(x⋆) s(x⋆) . To find the point at which to sample, we still need to maximize the constrained objective EI(x⋆) over x⋆. Unlike the original unknown cost function, EI(·) can be cheaply sampled. Furthermore, for the purposes of our application, it is not necessary to guarantee that we find the global maximum, merely that we can quickly locate a point that is likely to be as good as possible. The original EGO work used a branch-and-bound algorithm, but we found it was very difficult to get good bounds over large regions. Instead we use DIRECT [Jones et al., 1993], a fast, approximate, derivativefree optimization algorithm, though we conjecture that for larger dimensional spaces, sequential quadratic programming with interior point methods might be a better alternative. 3 Experiments The goal of our algorithm is to find a good approximation of the maximum of a latent function using preference queries. In order to measure our method’s effectiveness in achieving this goal, we create a function f for which the optimum is known. At each time step, a query is generated in which two points x1 and x2 are adaptively selected, and the preference is found, where f(x1) > f(x2) ⇔ x1 ≻x2. After each preference, we measure the error, defined as ϵ = fmax −f(argmaxx f ∗(x)), that is, the difference between the true maximum of f and the value of f at the point predicted to be the maximum. Note that by design, this does not penalize the algorithm for drawing samples from X that are far from argmaxx, or for predicting a latent function that differs from the true function. We are not trying to learn the entire valuation function, which would take many more queries – we seek only to maximize the valuation, which involves accurate modelling only in the areas of high valuation. We measured the performance of our method on three functions – 2D, 4D and 6D. By way of demonstration, Figure 2 shows the actual 2D functions and the typical prediction after several queries. The test functions are defined as: f2d = max{0, sin(x1) + x1/3 + sin(12x1) + sin(x2) + x2/3 + sin(12x2) −1} f4d,6d = d X i=1 sin(xi) + xi/3 + sin(12xi) 5 10 20 30 40 0.0 1.0 2.0 3.0 4.0 4D function ǫ 10 20 30 40 10 20 30 40 0.0 0.2 0.4 0.6 0.8 1.0 2D function 4.0 5.0 6.0 7.0 8.0 6D function preference queries Figure 3: The evolution of error for the estimate of the optimum on the test functions. The plot shows the error evolution ϵ against the number of queries. The solid line is our method; the dashed is a baseline comparison in which each query point is selected randomly. The performance is averaged over 20 runs, with the error bars showing the variance of ϵ. all defined over the range [0, 1]d. We selected these equations because they seem both general and difficult enough that we can safely assume that if our method works well on them, it should work on a large class of real-world problems — they have multiple local minima to get trapped in and varying landscapes and dimensionality. Unfortunately, there has been little work in the psychoperception literature to indicate what a good test function would be for our problem, so we have had to rely to an extent on our intuition to develop suitable test cases. The results of the experiments are shown in Figure 3. In all cases, we simulate 50 queries using our method (here called maxEI). As a baseline, we compare against 50 queries using the maximum variance of the model (maxs), which is a common criterion in active learning for regression [Seo et al., 2000; Chu and Ghahramani, 2005a]. We repeated each experiment 20 times and measured the mean and variance of the error evolution. We find that it takes far fewer queries to find a good result using maxEI in all cases. In the 2D case, for example, after 20 queries, maxEI already has better average performance than maxs achieves after 50, and in both the 2D and 4D scenarios, maxEI steadily improves until it find the optima, while maxs soon reaches a plateau, improving only slightly, if at all, while it tries to improve the global fit to the latent function. In the 6D scenario, neither algorithm succeeds well in finding the optimum, though maxEI clearly comes closer. We believe the problem is that in six dimensions, the space is too large to adequately explore with so few queries, and variance remains quite high throughout the space. We feels that requiring more than 50 user queries in a real application would be unacceptable, so we are instead currently investigating extensions that will allow the user to direct the search in higher dimensions. 4 Preference Gallery for Material Design Properly modeling the appearance of a material is a necessary component of realistic image synthesis. The appearance of a material is formalized by the notion of the Bidirectional Reflectance Distribution Function (BRDF). In computer graphics, BRDFs are most often specified using various analytical models observing the physical laws of reciprocity and energy conservation while also exhibiting shadowing, masking and Fresnel reflectance phenomenon. Realistic models are therefore fairly complex with many parameters that need to be adjusted by the designer. Unfortunately these parameters can interact in non-intuitive ways, and small adjustments to certain settings may result in non-uniform changes in appearance. This can make the material design process quite difficult for the end user, who cannot expected to be an expert in the field of appearance modeling. Our application is a solution to this problem, using a “preference gallery” approach, in which users are simply required to view two or more images rendered with different material properties and indicate which ones they prefer. To maximize the valuation, we use an implementation of the model described in Section 2. In practice, the first few examples will be points of high variance, since little of the space is explored (that is, the model of user valuation is very uncertain). Later samples tend to be in regions of high valuation, as a model of the user’s interest is learned. We use our active preference learning model on an example gallery application for helping users find a desired BRDF. For the purposes of this example, we limit ourselves to isotropic materials and ignore wavelength dependent effects in reflection. The gallery uses the Ashikhmin-Shirley Phong 6 Table 1: Results of the user study algorithm trials n (mean ± std) latin hypercubes 50 18.40 ± 7.87 maxs 50 17.87 ± 8.60 maxEI 50 8.56 ± 5.23 model [Ashikhmin and Shirley, 2000] for the BRDFs which was recently validated to be well suited for representing real materials [Ngan et al., 2005]. The BRDFs are rendered on a sphere under high frequency natural illumination as this has been shown to be the desired setting for human preception of reflectance [Fleming et al., 2001]. Our gallery demonstration presents the user with two BRDF images at a time. We start with four predetermined queries to “seed” the parameter space, and after that use the learned model to select gallery images. The GP model is updated after each preference is indicated. We use parameters of real measured materials from the MERL database [Ngan et al., 2005] for seeding the parameter space, but can draw arbitrary parameters after that. 4.1 User Study To evaluate the performance of our application, we have run a simple user study in which the generated images are restricted to a subset of 38 materials from the MERL database that we deemed to be representative of the appearance space of the measured materials. The user is given the task of finding a single randomly-selected image from that set by indicating preferences. Figure 4 shows a typical user run, where we ask the user to use the preference gallery to find a provided target image. At each step, the user need only indicate the image they think looks most like the target. This would, of course, be an unrealistic scenario if we were to be evaluating the application from an HCI stance, but here we limit our attention to the model, where we are interested here in demonstrating that with human users maximizing valuation is preferable to learning the entire latent function. Using five subjects, we compared 50 trials using the EIF to select the images for the gallery (maxEI), 50 trials using maximum variance (maxs, the same criterion as in the experiments of Section 3), and 50 trials using samples selected using a randomized Latin hypercube algorithm. In each case, one of the gallery images was the image with the highest predicted valuation and the other was selected by the algorithm. The algorithm type for each trial was randomly selected by the computer and neither the experimenter nor the subjects knew which of the three algorithms was selecting the images. The results are shown in Table 1. n is the number clicks required of the user to find the target image. Clearly maxEI dominates, with a mean n less than half that of the competing algorithms. Interestingly, selecting images using maximum variance does not perform much better than random. We suspect that this is because maxs has a tendency to select images from the corners of the parameter space, which adds limited information to the other images, whereas Latin hypercubes at least guarantees that the selected images fill the space. Active learning is clearly a powerful tool for situations where human input is required for learning. With this paper, we have shown that understanding the task — and exploiting the quirks of human cognition — is also essential if we are to deploy real-world active learning applications. As people come to expect their machines to act intelligently and deal with more complex environments, machine learning systems that can collaborate with users and take on the tedious parts of users’ cognitive burden has the potential to dramatically affect many creative fields, from business to the arts to science. References [Ashikhmin and Shirley, 2000] M. Ashikhmin and P. Shirley. An anisotropic phong BRDF model. J. Graph. Tools, 5(2):25–32, 2000. [Chu and Ghahramani, 2005a] W. Chu and Z. Ghahramani. Extensions of Gaussian processes for ranking: semi-supervised and active learning. In Learning to Rank workshop at NIPS-18, 2005. [Chu and Ghahramani, 2005b] W. Chu and Z. Ghahramani. Preference learning with Gaussian processes. In ICML, 2005. [Cohn et al., 1996] D. A. Cohn, Z. Ghahramani, and M. I. Jordan. Active learning with statistical models. Journal of Artificial Intelligence Research, 4:129–145, 1996. 7 Target 1. 2. 3. 4. Figure 4: A shorter-than-average but otherwise typical run of the preference gallery tool. At each (numbered) iteration, the user is provided with two images generated with parameter instances and indicates the one they think most resembles the target image (top-left) they are looking for. The boxed images are the user’s selections at each iteration. [Cooper et al., 2007] S. Cooper, A. Hertzmann, and Z. Popovi´c. Active learning for motion controllers. In SIGGRAPH, 2007. [´El˝o, 1978] ´A. ´El˝o. The Rating of Chess Players: Past and Present. Arco Publishing, New York, 1978. [Fleming et al., 2001] R. Fleming, R. Dror, and E. Adelson. How do humans determine reflectance properties under unknown illumination? In CVPR Workshop on Identifying Objects Across Variations in Lighting, 2001. [Glickman and Jensen, 2005] M. E. Glickman and S. T. Jensen. Adaptive paired comparison design. Journal of Statistical Planning and Inference, 127:279–293, 2005. [Guestrin et al., 2005] C. Guestrin, A. Krause, and A. P. Singh. Near-optimal sensor placements in Gaussian processes. In Proceedings of the 22nd International Conference on Machine Learning (ICML-05), 2005. [Jones et al., 1993] D. R. Jones, C. D. Perttunen, and B. E. Stuckman. Lipschitzian optimization without the Lipschitz constant. J. Optimization Theory and Apps, 79(1):157–181, 1993. [Jones et al., 1998] D. R. Jones, M. Schonlau, and W. J. Welch. Efficient global optimization of expensive black-box functions. J. Global Optimization, 13(4):455–492, 1998. [Kendall, 1975] M. Kendall. Rank Correlation Methods. Griffin Ltd, 1975. [Kingsley, 2006] D. C. Kingsley. Preference uncertainty, preference refinement and paired comparison choice experiments. Dept. of Economics, University of Colorado, 2006. [Kushner, 1964] H. J. Kushner. A new method of locating the maximum of an arbitrary multipeak curve in the presence of noise. Journal of Basic Engineering, 86:97–106, 1964. [Marks et al., 1997] J. Marks, B. Andalman, P. A. Beardsley, W. Freeman, S. Gibson, J. Hodgins, T. Kang, B. Mirtich, H. Pfister, W. Ruml, K. Ryall, J. Seims, and S. Shieber. Design galleries: A general approach to setting parameters for computer graphics and animation. Computer Graphics, 31, 1997. [McFadden, 2001] D. McFadden. Economic choices. The American Economic Review, 91:351–378, 2001. [Mosteller, 1951] F. Mosteller. Remarks on the method of paired comparisons: I. the least squares solution assuming equal standard deviations and equal correlations. Psychometrika, 16:3–9, 1951. [Ngan et al., 2005] A. Ngan, F. Durand, and W. Matusik. Experimental analysis of BRDF models. In Proceedings of the Eurographics Symposium on Rendering, pages 117–226, 2005. [Ngan et al., 2006] A. Ngan, F. Durand, and W. Matusik. Image-driven navigation of analytical BRDF models. In T. Akenine-M¨oller and W. Heidrich, editors, Eurographics Symposium on Rendering, 2006. [Sasena, 2002] M. J. Sasena. Flexibility and Efficiency Enhancement for Constrained Global Design Optimization with Kriging Approximations. PhD thesis, University of Michigan, 2002. [Seo et al., 2000] S. Seo, M. Wallat, T. Graepel, and K. Obermayer. Gaussian process regression: active data selection and test point rejection. In Proceedings of IJCNN 2000, 2000. [Siegel and Castellan, 1988] S. Siegel and N. J. Castellan. Nonparametric Statistics for the Behavioral Sciences. McGraw-Hill, 1988. [Stern, 1990] H. Stern. A continuum of paired comparison models. Biometrika, 77:265–273, 1990. [Thurstone, 1927] L. Thurstone. A law of comparative judgement. Psychological Review, 34:273–286, 1927. [Tong and Koller, 2000] S. Tong and D. Koller. Support vector machine active learning with applications to text classification. In Proc. ICML-00, 2000. 8
2007
152
3,184
Bayesian binning beats approximate alternatives: estimating peristimulus time histograms Dominik Endres, Mike Oram, Johannes Schindelin and Peter F¨oldi´ak School of Psychology University of St. Andrews KY16 9JP, UK {dme2,mwo,js108,pf2}@st-andrews.ac.uk Abstract The peristimulus time histogram (PSTH) and its more continuous cousin, the spike density function (SDF) are staples in the analytic toolkit of neurophysiologists. The former is usually obtained by binning spike trains, whereas the standard method for the latter is smoothing with a Gaussian kernel. Selection of a bin width or a kernel size is often done in an relatively arbitrary fashion, even though there have been recent attempts to remedy this situation [1, 2]. We develop an exact Bayesian, generative model approach to estimating PSTHs and demonstate its superiority to competing methods. Further advantages of our scheme include automatic complexity control and error bars on its predictions. 1 Introduction Plotting a peristimulus time histogram (PSTH), or a spike density function (SDF), from spiketrains evoked by and aligned to a stimulus onset is often one of the first steps in the analysis of neurophysiological data. It is an easy way of visualizing certain characteristics of the neural response, such as instantaneous firing rates (or firing probabilities), latencies and response offsets. These measures also implicitly represent a model of the neuron’s response as a function of time and are important parts of their functional description. Yet PSTHs are frequently constructed in an unsystematic manner, e.g. the choice of time bin size is driven by result expectations as much as by the data. Recently, there have been more principled approaches to the problem of determining the appropriate temporal resolution [1, 2]. We develop an exact Bayesian solution, apply it to real neural data and demonstrate its superiority to competing methods. Note that we do in no way claim that a PSTH is a complete generative description of spiking neurons. We are merely concerned with inferring that part of the generative process which can be described by a PSTH in a Bayes-optimal way. 2 The model Suppose we wanted to model a PSTH on [tmin, tmax], which we discretize into T contiguous intervals of duration ∆t = (tmax −tmin)/T (see fig.1, left). We select a discretization fine enough so that we will not observe more than one spike in a ∆t interval for any given spike train. This can be achieved easily by choosing a ∆t shorter than the absolute refractory period of the neuron under investigation. Spike train i can then be represented by a binary vector ⃗zi of dimensionality T. We model the PSTH by M +1 contiguous, non-overlapping bins having inclusive upper boundaries km, within which the firing probability P(spike|t ∈(tmin +∆t(km−1 +1), tmin +∆t(km +1)]) = fm is constant. M is the number of bin boundaries inside [tmin, tmax]. The probability of a spike train 1 P(spike|t) 0 k0 k1 k2 k3=T­1 t t tmin tmax k = [ 1 , 0 , 0 , 1 , 1 , 1 , 0 , 1 , 0 , 1 , 0 , 0 , 1 , 0 ] z i f1 f2 subEm­1[m­1] subEm­1[m] subEm­1[T­2] subEm[T­1] k m­1 m T­2 T­1 × getIEC(m,T­1,m) × getIEC(T­1,T­1,m) × getIEC(m+1,T­1,m) subEm­1[m­1] subEm­1[m] subEm[T­2] × getIEC(m,T­2,m) × getIEC(m+1,T­2,m) subEm[T­1] Figure 1: Left: Top: A spike train, recorded between times tmin and tmax is represented by a binary vector ⃗zi. Bottom: The time span between tmin and tmax is discretized into T intervals of duration ∆t = (tmax −tmin)/T, such that interval k lasts from k × ∆t + tmin to (k + 1) × ∆t + tmin. ∆t is chosen such that at most one spike is observed per ∆t interval for any given spike train. Then, we model the firing probabilities P(spike|t) by M +1 = 4 contiguous, non-overlapping bins (M is the number of bin boundaries inside the time span [tmin, tmax]), having inclusive upper boundaries km and P(spike|t ∈(tmin + ∆t(km−1 + 1), tmin + ∆t(km + 1)]) = fm. Right: The core iteration. To compute the evidence contribution subEm[T −1] of a model with a bin boundary at T −1 and m bin boundaries prior to T −1, we sum over all evidence contributions of models with a bin boundary at k and m −1 bin boundaries prior to k, where k ≥m −1, because m bin boundaries must occupy at least time intervals 0; . . . ; m −1. This takes O(T) operations. Repeat the procedure to obtain subEm[T −2]; . . . ; subEm[m]. Since we expect T ≫m, computing all subEm[k] given subEm−1[k] requires O(T 2) operations. For details, see text. ⃗zi of independent spikes/gaps is then P(⃗zi|{fm}, {km}, M) = M Y m=0 f s(⃗zi,m) m (1 −fm)g(⃗zi,m) (1) where s(⃗zi, m) is the number of spikes and g(⃗zi, m) is the number of non-spikes, or gaps in spiketrain ⃗zi in bin m, i.e. between intervals km−1 +1 and km (both inclusive). In other words, we model the spiketrains by an inhomogeneous Bernoulli process with piecewise constant probabilities. We also define k−1 = −1 and kM = T −1. Note that there is no binomial factor associated with the contribution of each bin, because we do not want to ignore the spike timing information within the bins, but rather, we try to build a simplified generative model of the spike train. Therefore, the probability of a (multi)set of spiketrains {⃗zi} = {z1, . . . , zN}, assuming independent generation, is P({⃗zi}|{fm}, {km}, M) = N Y i=1 M Y m=0 f s(⃗zi,m) m (1 −fm)g(⃗zi,m) = M Y m=0 f s({⃗zi},m) m (1 −fm)g({⃗zi},m) (2) where s({⃗zi}, m) = PN i=1 s(⃗zi, m) and g({⃗zi}, m) = PN i=1 g(⃗zi, m) 2.1 The priors We will make a non-informative prior assumption for p({fm}, {km}), namely p({fm}, {km}|M) = p({fm}|M)P({km}|M). (3) 2 i.e. we have no a priori preferences for the firing rates based on the bin boundary positions. Note that the prior of the fm, being continuous model parameters, is a density. Given the form of eqn.(1) and the constraint fm ∈[0, 1], it is natural to choose a conjugate prior p({fm}|M) = M Y m=0 B(fm; σm, γm). (4) The Beta density is defined in the usual way [3]: B(p; σ, γ) = Γ(σ + γ) Γ(σ)Γ(γ)pσ(1 −p)γ. (5) There are only finitely many configurations of the km. Assuming we have no preferences for any of them, the prior for the bin boundaries becomes P({km}|M) = 1  T −1 M . (6) where the denominator is just the number of possibilities in which M ordered bin boundaries can be distributed across T −1 places (bin boundary M always occupies position T −1, see fig.1,left , hence there are only T −1 positions left). 3 Computing the evidence P({⃗zi}|M) To calculate quantities of interest for a given M, e.g. predicted firing probabilities and their variances or expected bin boundary positions, we need to compute averages over the posterior p({fm}, {km}|M, {⃗zi}) = p({⃗zi}, {fm}, {km}|M) P({⃗zi}|M) (7) which requires the evaluation of the evidence, or marginal likelihood of a model with M bins: P({⃗zi}|M) = T −2 X kM−1=M−1 kM−1−1 X kM−2=M−2 . . . k1−1 X k0=0 P({⃗zi}|{km}, M)P({km}|M) (8) where the summation boundaries are chosen such that the bins are non-overlapping and contiguous and P({⃗zi}|{km}, M) = Z 1 0 df0 Z 1 0 df1 . . . Z 1 0 dfMP({⃗zi}|{fm}, {km}, M)p({fm}|M). (9) By virtue of eqn.(2) and eqn.(4), the integrals can be evaluated: P({⃗zi}|{km}, M) = M Y m=0 Γ(s({⃗zi}, m) + σm)Γ(g({⃗zi}, m) + γm) Γ(s({⃗zi}, m) + σm + g({⃗zi}, m) + γm) M Y m=0 Γ(σm + γm) Γ(σm)Γ(γm). (10) Computing the sums in eqn.(8) quickly is a little tricky. A na¨ıve approach would suggest that a computational effort of O(T M) is required. However, because eqn.(10) is a product with one factor per bin, and because each factor depends only on spike/gap counts and prior parameters in that bin, the process can be expedited. We will use an approach very similar to that described in [4, 5] in the context of density estimation and in [6, 7] for Bayesian function approximation: define the function getIEC(ks, ke, m) := Γ(s({⃗zi}, ks, ke) + σm)Γ(g({⃗zi}, ks, ke) + γm) Γ(s({⃗zi}, ks, ke) + σm + g({⃗zi}, ks, ke) + γm) (11) where s({⃗zi}, ks, ke) is the number of spikes and g({⃗zi}, ks, ke) is the number of gaps in {⃗zi} between the start interval ks and the end interval ke (both included). Furthermore, collect all contributions to eqn.(8) that do not depend on the data (i.e. {⃗zi}) and store them in the array pr[M]: pr[M] := QM m=0 Γ(σm+γm) Γ(σm)Γ(γm)  T −1 M  . (12) 3 Substituting eqn.(10) into eqn.(8) and using the definitions (11) and (12), we obtain P({⃗zi}|M) ∝ T −2 X kM−1=M−1 . . . k1−1 X k0=0 M Y m=1 getIEC(km−1 + 1, km, m)getIEC(0, k0, 0) (13) with kM = T −1 and the constant of proportionality being pr[M]. Since the factors on the r.h.s. depend only on two consecutive bin boundaries each, it is possible to apply dynamic programming [8]: rewrite the r.h.s. by ’pushing’ the sums as far to the right as possible: P({⃗zi}|M) ∝ T −2 X kM−1=M−1 getIEC(kM−1+1, T −1, M) kM−1−1 X kM−2=M−2 getIEC(kM−2+1, kM−1, M −1) × . . . k1−1 X k0=0 getIEC(k0 + 1, k1, 1)getIEC(0, k0, 0). (14) Evaluating the sum over k0 requires O(T) operations (assuming that T ≫M, which is likely to be the case in real-world applications). As the summands depend also on k1, we need to repeat this evaluation O(T) times, i.e. summing out k0 for all possible values of k1 requires O(T 2) operations. This procedure is then repeated for the remaining M −1 sums, yielding a total computational effort of O(MT 2). Thus, initialize the array subE0[k] := getIEC(0, k, 0), and iterate for all m = 1, . . . , M: subEm[k] := k−1 X r=m−1 getIEC(r + 1, k, m)subEm−1[r], (15) A close look at eqn.(14) reveals that while we sum over kM−1, we need subEM−1[k] for k = M −1; . . . ; T −2 to compute the evidence of a model with its latest boundary at T −1. We can, however, compute subEM−1[T −1] with little extra effort, which is, up to a factor pr[M −1], equal to P({⃗zi}|M −1), i.e. the evidence for a model with M −1 bin boundaries. Moreover, having computed subEm[k], we do not need subEm−1[k −1] anymore. Hence, the array subEm−1[k] can be reused to store subEm[k], if overwritten in reverse order. In pseudo-code (E[m] contains the evidence of a model with m bin boundaries inside [tmin, tmax] after termination): Table 1: Computing the evidences of models with up to M bin boundaries 1. for k := 0 . . . T −1 : subE[k] := getIEC(0, k, 0) 2. E[0] := subE[T −1] × pr[0] 3. for m := 1 . . . M : (a) if m = M then l := T −1 else l := m (b) for k := T −1 . . . l subE[k] := Pk−1 r:=m−1 subE[r] × getIEC(r + 1, k, m) (c) E[m] = subE[T −1] × pr[m] 4. return E[] 4 Predictive firing rates and variances We will now calculate the predictive firing rate P(spike|˜k, {⃗zi}, M). For a given configuration of {fm} and {km}, we can write P(spike|˜k, {fm}, {km}, M) = M X m=0 fm1(˜k ∈{km−1 + 1, km}) (16) where the indicator function 1(x) = 1 iff x is true and 0 otherwise. Note that the probability of a spike given {km} and {fm} does not depend on any observed data. Since the bins are nonoverlapping, ˜k ∈{km−1 + 1, km} is true for exactly one summand and P(spike|˜k, {⃗zi}, {km}) evaluates to the corresponding firing rate. 4 To finish we average eqn.(16) over the posterior eqn.(7). The denominator of eqn.(7) is independent of {fm}, {km} and is obtained by integrating/summing the numerator via the algorithm in table 1. Thus, we only need to multiply the integrand of eqn.(9) (i.e. the numerator of the posterior) with P(spike|˜k, {fm}, {km}, M), thereby replacing eqn.(11) with getIEC(ks, ke, m) := Γ(s({⃗zi}, ks, ke) + 1(˜k ∈{ks, ke}) + σm)Γ(g({⃗zi}, ks, ke) + γm) Γ(s({⃗zi}, ks, ke) + 1(˜k ∈{ks, ke}) + σm + g({⃗zi}, ks, ke) + γm) (17) i.e. we are adding an additional spike to the data at ˜k. Call the array returned by this modified algorithm E˜k[]. By virtue of eqn.(7) we then find P(spike|˜k, {⃗zi}, M) = E˜k[M] E[M] . To evaluate the variance, we need the posterior expectation of f 2 m. This can be computed by adding two spikes at ˜k. 5 Model selection vs. model averaging To choose the best M given {⃗zi}, or better, a probable range of Ms, we need to determine the model posterior P(M|{⃗zi}) = P({⃗zi}|M)P(M) P m P({⃗zi}|m)P(m) (18) where P(M) is the prior over M, which we assume to be uniform. The sum in the denominator runs over all values of m which we choose to include, at most 0 ≤m ≤T −1. Once P(M|{⃗zi}) is evaluated, we could use it to select the most probable M ′. However, making this decision means ’contriving’ information, namely that all of the posterior probability is concentrated at M ′. Thus we should rather average any predictions over all possible M, even if evaluating such an average has a computational cost of O(T 3), since M ≤T −1. If the structure of the data allow, it is possible, and useful given a large enough T, to reduce this cost by finding a range of M, such that the risk of excluding a model even though it provides a good description of the data is low. In analogy to the significance levels of orthodox statistics, we shall call this risk α. If the posterior of M is unimodal (which it has been in most observed cases, see fig.3, right, for an example), we can then choose the smallest interval of Ms around the maximum of P(M|{⃗zi}) such that P(Mmin ≤M ≤Mmax|{⃗zi}) ≤1 −α (19) and carry out the averages over this range of M after renormalizing the model posterior. 6 Examples and comparison to other methods 6.1 Data acquisition We obtained data through [9], where the experimental protocols have been described. Briefly, extracellular single-unit recordings were made using standard techniques from the upper and lower banks of the anterior part of the superior temporal sulcus (STSa) and the inferior temporal cortex (IT) of two monkeys (Macaca mulatta) performing a visual fixation task. Stimuli were presented for 333 ms followed by an 333 ms inter-stimulus interval in random order. The anterior-posterior extent of the recorded cells was from 7mm to 9mm anterior of the interaural plane consistent with previous studies showing visual responses to static images in this region [10, 11, 12, 13]. The recorded cells were located in the upper bank (TAa, TPO), lower bank (TEa, TEm) and fundus (PGa, IPa) of STS and in the anterior areas of TE (AIT of [14]). These areas are rostral to FST and we collectively call them the anterior STS (STSa), see [15] for further discussion. The recorded firing patters were turned into distinct samples, each of which contained the spikes from −300 ms before to 600 ms after the stimulus onset with a temporal resolution of 1 ms. 6.2 Inferring PSTHs To see the method in action, we used it to infer a PSTH from 32 spiketrains recorded from one of the available STSa neurons (see fig.2, A). Spikes times are relative to the stimulus onset. We discretized the interval from −100ms pre-stimulus to 500ms post-stimulus into ∆t = 1ms time intervals and 5 A B | | | || | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | || | | | | | | | | | | | | | | | | | | | | || || | | | | | | || | || | | | | ||| | | | | | | || | | | | | | | | | || | | | | | | | | | | | | | || | | | | | || | | | | | | | | | | | | || | | | || | || | | | | | | | || | || | | | | | | | | | | | | | | | | | | | | || | | | | | | | | | | || | | | | | | | | | | | | | | | | | | | | | || | || | | | | | | | | | | | | | | | | | | | | | | | | | | | | || | | | | | | | | | | | | | | | | | | | | | | || | || | | | | | | || | || | | | | | | | | | | | | | | | | | | | | | | | | || | | | | | | | | || | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | || | | | | | | | | | | | | | | | | | | | | | | | | | | | | || | | || | | | | | || | | | | | | | | | | | | | | | | | | | | | | | | | | || | || | | | | | | | | | | || | | || | | | | | | | | | || | | | | | | | | | | || | | | || | | | | | | | | | | | | | | | | | | || || | || | | | || | | | | | | | | | | | | | | | || | | | || ||| | ||| | | | | | | | || | | | | | | | | | | | | | | | || | | | | | | | || | | | | | | | | | | | | | | | | | | | | | || | | | || | | | | | | | | | | | | | | | | | | | | | | | | | | | || | || | | | | | | | | | | | | | | | || | || | | | | | | | || | | | | | | | | | | | | | | | | | | | | | || || | | | | | | | | | | | | | | | | | | | | | | || | | | | | | | || | | | | | | | | | | || || | | | | | | | | | | | | | | | | | | | | | | | | | || | | | | | | | | | | | | | | | | | | || | | | | | | | | | | | | | | | | | | | | | | | | ||| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | || | | | | | | | | | | | | | | | || | | | | | | | | | | | | | | | | | | | | || | | | | | | | | | | | | | | | | | | | | | | | | | | || | | | | | | | | | | | | | | | | | | | | | | | || | || | || | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | ||| | | | | | | | | | | | | | | | | | | | | 0 10 20 30 spiketrain number 0 0.05 0.1 P(spike) C D 0 0.05 0.1 P(spike) -100 0 100 200 300 400 500 600 time, ms after stimulus onset 0 0.05 0.1 P(spike) Figure 2: Predicting a PSTH/SDF with 3 different methods. A: the dataset used in this comparison consisted of 32 spiketrains recorded from a STSa neuron. Each tick mark represents a spike. B: PSTH inferred with our Bayesian binning method. The thick line represents the predictive firing rate (section 4), the thin lines show the predictive firing rate ±1 standard deviation. Models with 4 ≤M ≤13 were included on a risk level of α = 0.1 (see eqn.(19)). C: bar PSTH (solid lines), optimal binsize ≈26ms, and line PSTH (dashed lines), optimal binsize ≈78ms, computed by the methods described in [1, 2]. D: SDF obtained by smoothing the spike trains with a 10ms Gaussian kernel. computed the model posterior (eqn.(18)) (see fig.3, right). The prior parameters were equal for all bins and set to σm = 1 and γm = 32. This choice corresponds to a firing probability of ≈0.03 in each 1 ms time interval (30 spikes/s), which is typical for the neurons in this study1. Models with 4 ≤M ≤13 (expected bin sizes between ≈23ms-148ms) were included on an α = 0.1 risk level (eqn.(19)) in the subsequent calculation of the predictive firing rate (i.e. the expected firing rate, hence the continuous appearance) and standard deviation (fig.2, B). Fig.2, C, shows a bar PSTH and a line PSTH computed with the recently developed methods described in [1, 2]. Roughly speaking, 1Alternatively, one could search for the σm, γm which maximize of P({⃗zi}|σm, γm) = P M P({⃗zi}|M)P(M|σm, γm), where P({⃗zi}|M) is given by eqn.(8). Using a uniform P(M|σm, γm), we found σm ≈2.3 and γm ≈37 for the data in fig.2, A 6 these methods try to optimize a compromise between minimal within-bin variance and maximal between-bin variance. In this example, the bar PSTH consists of 26 bins. Graph D in fig.2 depicts a SDF obtained by smoothing the spiketrains with a 10ms wide Gaussian kernel, which is a standard way of calculating SDFs in the neurophysiological literature. All tested methods produce results which are, upon cursory visual inspection, largely consistent with the spiketrains. However, Bayesian binning is better suited than Gaussian smoothing to model steep changes, such as the transient response starting at ≈100ms. While the methods from [1, 2] share this advantage, they suffer from two drawbacks: firstly, the bin boundaries are evenly spaced, hence the peak of the transient is later than the scatterplots would suggest. Secondly, because the bin duration is the only parameter of the model, these methods are forced to put many bins even in intervals that are relatively constant, such as the baselines before and after the stimulus-driven response. In contrast, Bayesian binning, being able to put bin boundaries anywhere in the time span of interest, can model the data with less bins – the model posterior has its maximum at M = 6 (7 bins), whereas the bar PSTH consists of 26 bins. 6.3 Performance comparison 0 0.2 0.4 0 0.2 0.4 relative frequency 0 0.005 0.01 0.015 CV error relative to Bayesian Binning 0 0.2 0.4 10 ms Gaussian bar PSTH line PSTH 0 10 20 30 M 0 0.05 0.1 P(M|{z i}) Figure 3: Left: Comparison of Bayesian Binning with competing methods by 5-fold crossvalidation. The CV error is the negative expected log-probability of the test data. The histograms show relative frequencies of CV error differences between 3 competing methods and our Bayesian binning approach. Gaussian: SDFs obtained by Gaussian smoothing of the spiketrains with a 10 ms kernel. Bar PSTH and line PSTH: PSTHs computed by the binning methods described in [1, 2]. Right: Model posterior P(M|{⃗zi}) (see eqn.(18)) computed from the data shown in fig.2. The shape is fairly typical for model posteriors computed from the neural data used in this paper: a sharp rise at a moderately low M followed by a maximum (here at M = 6) and an approximately exponential decay. Even though a maximum M of 699 would have been possible, P(M > 23|{⃗zi}) < 0.001. Thus, we can accelerate the averaging process for quantities of interest (e.g. the predictive firing rate, section 4) by choosing a moderately small maximum M. For a more rigorous method comparison, we split the data into distinct sets, each of which contained the responses of a cell to a different stimulus. This procedure yielded 336 sets from 20 cells with at least 20 spiketrains per set. We then performed 5-fold crossvalidation, the crossvalidation error is given by the negative logarithm of the data (spike or gap) in the test sets: CV error = −⟨log(P(spike|t))⟩. (20) Thus, we measure how well the PSTHs predict the test data. The Gaussian SDFs were discretized into 1 ms time intervals prior to the procedure. We average the CV error over the 5 estimates to obtain a single estimate for each of the 336 neuron/stimulus combinations. On average, the negative log likelihood of our Bayesian approach predicting the test data (0.04556±0.00029, mean ± SEM) was significantly better than any of the other methods (10ms Gaussian kernel: 0.04654 ± 0.00028; Bar PSTH: 0.04739±0.00029; Line PSTH: 0.04658±0.00029). To directly compare the performance of different methods we calculate the difference in the CV error for each neuron/stimulus combination. Here a positive value indicates that Bayesian binning predicts the test data more accurately than the alternative method. Fig.3, left, shows the relative frequencies of CV error differences between the 3 other methods and our approach. Bayesian binning predicted the data better than the three other 7 methods in at least 295/336 cases, with a minimal difference of ≈−0.0008, indicating the general utility of this approach. 7 Summary We have introduced an exact Bayesian binning method for the estimation of PSTHs. Besides treating uncertainty – a real problem with small neurophysiological datasets – in a principled fashion, it also outperforms competing methods on real neural data. It offers automatic complexity control because the model posterior can be evaluated. While its computational cost is significantly higher than that of the methods we compared it to, it is still fast enough to be useful: evaluating the predictive probability takes less than 1s on a modern PC2, with a small memory footprint (<10MB for 512 spiketrains). Moreover, our approach can easily be adapted to extract other characteristics of neural responses in a Bayesian way, e.g. response latencies or expected bin boundary positions. Our method reveals a clear and sharp initial response onset, a distinct transition from the transient to the sustained part of the response and a well-defined offset. An extension towards joint PSTHs from simultaneous multi-cell recordings is currently being implemented. References [1] H. Shimazaki and S. Shinomoto. A recipe for optimizing a time-histogram. In B. Sch¨olkopf, J. Platt, and T. Hoffman, editors, Advances in Neural Information Processing Systems 19, pages 1289–1296. MIT Press, Cambridge, MA, 2007. [2] H. Shimazaki and S. Shinomoto. A method for selecting the bin size of a time histogram. Neural Computation, 19(6):1503–1527, 2007. [3] J.O. Berger. Statistical Decision Theory and Bayesian Analysis. Springer, New York, 1985. [4] D. Endres and P. F¨oldi´ak. Bayesian bin distribution inference and mutual information. IEEE Transactions on Information Theory, 51(11), 2005. [5] D. Endres. Bayesian and Information-Theoretic Tools for Neuroscience. PhD thesis, School of Psychology, University of St. Andrews, U.K., 2006. http://hdl.handle.net/10023/162. [6] M. Hutter. Bayesian regression of piecewise constant functions. Technical Report arXiv:math/0606315v1, IDSIA-14-05, 2006. [7] M. Hutter. Exact bayesian regression of piecewise constant functions. Journal of Bayesian Analysis, 2(4):635–664, 2007. [8] D. P. Bertsekas. Dynamic Programming and Optimal Control. Athena Scientific, 2000. [9] M. W. Oram, D. Xiao, B. Dritschel, and K.R. Payne. The temporal precision of neural signals: A unique role for response latency? Philosophical Transactions of the Royal Society, Series B, 357:987–1001, 2002. [10] CJ Bruce, R Desimone, and CG Gross. Visual properties of neurons in a polysensory area in superior temporal sulcus of the macaque. Journal of Neurophysiology, 46:369–384, 1981. [11] DI Perrett, ET Rolls, and W Caan. Visual neurons responsive to faces in the monkey temporal cortex. Expl. Brain. Res., 47:329–342, 1982. [12] G.C. Baylis, E.T. Rolls, and C.M. Leonard. Functional subdivisions of the temporal lobe neocortex. 1987. [13] M. W. Oram and D. I. Perrett. Time course of neural responses discriminating different views of the face and head. Journal of Neurophysiology, 68(1):70–84, 1992. [14] K Tanaka, H Saito, Y Fukada, and M Moriya. Coding visual images of objects in the inferotemporal cortex of the macaque monkey. Journal of Neurophysiology, pages 170–189, 1991. [15] N.E. Barraclough, D. Xiao, C.I. Baker, M.W. Oram, and D.I. Perrett. Integration of visual and auditory information by superior temporal sulcus neurons responsive to the sight of actions. Journal of Cognitive Neuroscience, 17, 2005. 23.2 GHz Intel XeonTM, SuSE Linux 10.0 8
2007
153
3,185
Online Linear Regression and Its Application to Model-Based Reinforcement Learning Alexander L. Strehl∗ Yahoo! Research New York, NY strehl@yahoo-inc.com Michael L. Littman Department of Computer Science Rutgers University Piscataway, NJ USA mlittman@cs.rutgers.edu Abstract We provide a provably efficient algorithm for learning Markov Decision Processes (MDPs) with continuous state and action spaces in the online setting. Specifically, we take a model-based approach and show that a special type of online linear regression allows us to learn MDPs with (possibly kernalized) linearly parameterized dynamics. This result builds on Kearns and Singh’s work that provides a provably efficient algorithm for finite state MDPs. Our approach is not restricted to the linear setting, and is applicable to other classes of continuous MDPs. Introduction Current reinforcement-learning (RL) techniques hold great promise for creating a general type of artificial intelligence (AI), specifically autonomous (software) agents that learn difficult tasks with limited feedback (Sutton & Barto, 1998). Applied RL has been very successful, producing worldclass computer backgammon players (Tesauro, 1994) and model helicopter flyers (Ng et al., 2003). Many applications of RL, including the two above, utilize supervised-learning techniques for the purpose of generalization. Such techniques enable an agent to act intelligently in new situations by learning from past experience in different but similar situations. Provably efficient RL for finite state and action spaces is accomplished by Kearns and Singh (2002) and hugely contributes to our understanding of the relationship between exploration and sequential decision making. The achievement of the current paper is to provide an efficient RL algorithm that learns in Markov Decision Processes (MDPs) with continuous state and action spaces. We prove that it learns linearly-parameterized MDPs, a model introduced by Abbeel and Ng (2005), with sample (or experience) complexity that grows only polynomially with the number of state space dimensions. Our new RL algorithm utilizes a special linear regresser, based on least-squares regression, whose analysis may be of interest to the online learning and statistics communities. Although our primary result is for linearly-parameterized MDPs, our technique is applicable to other classes of continuous MDPs and our framework is developed specifically with such future applications in mind. The linear dynamics case should be viewed as only an interesting example of our approach, which makes substantial progress in the goal of understanding the relationship between exploration and generalization in RL. An outline of the paper follows. In Section 1, we discuss online linear regression and pose a new online learning framework that requires an algorithm to not only provide predictions for new data points but also provide formal guarantees about its predictions. We also develop a specific algorithm and prove that it solves the problem. In Section 2, using the algorithm and result from the first section, we develop a provably efficient RL algorithm. Finally, we conclude with future work. ∗Some of the work presented here was conducted while the author was at Rutgers University. 1 1 Online Linear Regression Linear Regression (LR) is a well-known and tremendously powerful technique for prediction of the value of a variable (called the response or output) given the value of another variable (called the explanatory or input). Suppose we are given some data consisting of input-output pairs: (x1, y1), (x2, y2), . . . , (xm, ym), where xi ∈Rn and yi ∈R for i = 1, . . . , m. Further, suppose that the data satisfies a linear relationship, that is yi ≈θT xi ∀i ∈{1, . . . , m}, where θ ∈Rn is an n-dimensional parameter vector. When a new input x arrives, we would like to make a prediction of the corresponding output by estimating θ from our data. A standard approach is to approximate θ with the least-squares estimator ˆθ defined by ˆθ = (XT X)−1XT y, where X ∈Rm×n is a matrix whose ith row consists of the ith input xT i and y ∈Rn is a vector whose ith component is the ith output yi. Although there are many analyses of the linear regression problem, none is quite right for an application to model-based reinforcement learning (MBRL). In particular, in MBRL, we cannot assume that X is fixed ahead of time and we require more than just a prediction of θ but knowledge about whether this prediction is sufficiently accurate. A robust learning agent must not only infer an approximate model of its environment but also maintain an idea about the accuracy of the parameters of this model. Without such meta-knowledge, it would be difficult to determine when to explore (or when to trust the model) and how to explore (to improve the model). We coined the term KWIK (“know what it knows”) for algorithms that have this special property. With this idea in mind, we present the following online learning problem related to linear regression. Let ||v|| denote the Euclidean norm of a vector v and let Var [X] denote the variance of a random variable X. Definition 1 (KWIK Linear Regression Problem or KLRP) On every timestep t = 1, 2, . . . an input vector xt ∈Rnsatisfying||xt|| ≤1 and output number yt ∈[−1, 1] is provided. The input xt may be chosen in any way that depends on the previous inputs and outputs (x1, y1), . . . , (xt, yt). The output yt is chosen probabilistically from a distribution that depends only on xt and satisfies E[yt] = θT xt and Var[yt] ≤σ2, where θ ∈Rn is an unknown parameter vector satisfying ||θ|| ≤1 and σ ∈R is a known constant. After observing xt and before observing yt, the learning algorithm must produce an output ˆyt ∈[−1, 1] ∪{∅} (a prediction of E[yt|xt]). Furthermore, it should be able to provide an output ˆy(x) for any input vector x ∈{0, 1}n. A key aspect of our problem that distinguishes it from other online learning models is that the algorithm is allowed to output a special value ∅rather than make a valid prediction (an output other than ∅). An output of ∅signifies that the algorithm is not sure of what to predict and therefore declines to make a prediction. The algorithm would like to minimize the number of times it predicts ∅, and, furthermore, when it does make a valid prediction the prediction must be accurate, with high probability. Next, we formalize the above intuition and define the properties of a “solution” to KLRP. Definition 2 We define an admissible algorithm for the KWIK Linear Regression Problem to be one that takes two inputs 0 ≤ϵ ≤1 and 0 ≤δ < 1 and, with probability at least 1 −δ, satisfies the following conditions: 1. Whenever the algorithm predicts ˆyt(x) ∈[−1, 1], we have that |ˆyt(x) −θT x| ≤ϵ. 2. The number of timesteps t for which ˆyt(xt) = ∅is bounded by some function ζ(ϵ, δ, n), polynomial in n, 1/ϵ and 1/δ, called the sample complexity of the algorithm. 1.1 Solution First, we present an algorithm and then a proof that it solves KLRP. Let X denote an m × n matrix whose rows we interpret as transposed input vectors. We let X(i) denote the transpose of the ith row of X. Since XTX is symmetric, we can write it as XTX = UΛU T , (Singular Value Decomposition) (1) where U = [v1, . . . , vn] ∈Rn×n, with v1, . . . , vn being a set of orthonormal eigenvectors of XT X. Let the corresponding eigenvalues be λ1 ≥λ2 ≥· · · ≥λk ≥1 > λk+1 ≥· · · ≥λn ≥0. Note that Λ = diag(λ1, . . . , λn) is diagonal but not necessarily invertible. Now, define ¯U = [v1, . . . , vk] ∈ 2 Rn×k and ¯Λ = diag(λ1, . . . , λk) ∈Rk×k. For a fixed input xt (a new input provided to the algorithm at time t), define ¯q := X ¯U ¯Λ−1 ¯U T xt ∈Rm×n, (2) ¯v = [0, . . . , 0, vT k+1xt, . . . , vT n xt]T ∈Rn. (3) Algorithm 1 KWIK Linear Regression 0: Inputs: α1, α2 1: Initialize X = [ ] and y = [ ]. 2: for t = 1, 2, 3, · · · do 3: Let xt denote the input at time t. 4: Compute ¯q and ¯v using Equations 2 and 3. 5: if ||¯q|| ≤α1 and ||¯v|| ≤α2 then 6: Choose ˆθ ∈Rn that minimizes P i [y(i) −¯θT X(i)]2 subject to ||¯θ|| ≤1, where X(i) is the transpose of the ith row of X and y(i) is the ith component of y. 7: Output valid prediction xT ˆθ. 8: else 9: Output ∅. 10: Receive output yt. 11: Append xT t as a new row to the matrix X. 12: Append yt as a new element to the vector y. 13: end if 14: end for Our algorithm for solving the KWIK Linear Regression Problem uses these quantities and is provided in pseudocode by Algorithm 1. Our first main result of the paper is the following theorem. Theorem 1 With appropriate parameter settings, Algorithm 1 is an admissible algorithm for the KWIK Linear Regression Problem with a sample complexity bound of ˜O(n3/ϵ4). Although the analysis of Algorithm 1 is somewhat complicated, the algorithm itself has a simple interpretation. Given a new input xt, the algorithm considers making a prediction of the output yt using the norm-constrained least-squares estimator (specifically, ˆθ defined in line 6 of Algorithm1). The norms of the vectors ¯q and ¯v provide a quantitative measure of uncertainty about this estimate. When both norms are small, the estimate is trusted and a valid prediction is made. When either norm is large, the estimate is not trusted and the algorithm produces an output of ∅. One may wonder why ¯q and ¯v provide a measure of uncertainty for the least-squares estimate. Consider the case when all eigenvalues of XT X are greater than 1. In this case, note that x = XT X(XTX)−1x = XT ¯q. Thus, x can be written as a linear combination of the rows of X, whose coefficients make up ¯q, of previously experienced input vectors. As shown by Auer (2002), this particular linear combination minimizes ||q|| for any linear combination x = XTq. Intuitively, if the norm of ¯q is small, then there are many previous training samples (actually, combinations of inputs) “similar” to x, and hence our least-squares estimate is likely to be accurate for x. For the case of ill-conditioned XT X (when XT X has eigenvalues close to 0), X(XTX)−1x may be undefined or have a large norm. In this case, we must consider the directions corresponding to small eigenvalues separately and this consideration is dealt with by ¯v. 1.2 Analysis We provide a sketch of the analysis of Algorithm 1. Please see our technical report for full details. The analysis hinges on two key lemmas that we now present. In the following lemma, we analyze the behavior of the squared error of predictions based on an incorrect estimator ˆθ ̸= θ verses the squared error of using the true parameter vector θ. Specifically, we show that the squared error of the former is very likely to be larger than the latter when the predictions based on ˆθ (of the form ˆθT x for input x) are highly inaccurate. The proof uses Hoeffding’s bound and is omitted. 3 Lemma 1 Let θ ∈Rn and ˆθ ∈Rn be two fixed parameter vectors satisfying ||θ|| ≤1 and ||ˆθ|| ≤ 1. Suppose that (x1, y1), . . . , (xm, ym) is any sequence of samples satisfying xi ∈Rn, yi ∈R, ||xi|| ≤1, yi ∈[−1, 1], E[yi|xi] = θT xi, and Var[yi|xi] ≤σ2. For any 0 < δ′ < 1 and fixed positive constant z, if m X i=1 [(θ −ˆθ)T xi]2 ≥2 p 8m ln(2/δ) + z, (4) then m X i=1 (yi −ˆθT xi)2 > m X i=1 (yi −θT xi)2 + z (5) with probability at least 1 −2δ′. The following lemma, whose proof is fairly straight-forward and therefore omitted, relates the error of an estimate ˆθT x for a fixed input x based on an inaccurate estimator ˆθ to the quantities ||¯q||, ||¯v||, and ∆E(ˆθ) := qPm i=1 [(θ −ˆθ)T X(i)]2. Recall that when ||¯q|| and ||¯v|| are both small, our algorithm becomes confident of the least-squares estimate. In precisely this case, the lemma shows that |(θ −ˆθ)T x| is bounded by a quantity proportional to ∆E(ˆθ). Lemma 2 Let θ ∈Rn and ˆθ ∈Rn be two fixed parameter vectors satisfying ||θ|| ≤1 and ||ˆθ|| ≤ 1. Suppose that (x1, y1), . . . , (xm, ym) is any sequence of samples satisfying xi ∈Rn, yi ∈R, ||xi|| ≤1, yi ∈[−1, 1]. Let x ∈Rn be any vector. Let ¯q and ¯v be defined as above. Let ∆E(ˆθ) denote the error term qPm i=1 [(θ −ˆθ)T xi]2. We have that |(θ −ˆθ)T x| ≤||¯q||∆E(ˆθ) + 2||¯v||. (6) Proof sketch: (of Theorem 1) The proof has three steps. The first is to bound the sample complexity of the algorithm (the number of times the algorithm makes a prediction of ∅), in terms of the input parameters α1 and α2. The second is to choose the parameters α1 and α2. The third is to show that, with high probability, every valid prediction made by the algorithm is accurate. Step 1 We derive an upper bound ¯m on the number of timesteps for which either ||¯q|| > α1 holds or ||¯v|| > α2 holds. Observing that the algorithm trains on only those samples experienced during pricisely these timesteps and applying Lemma 13 from the paper by Auer (2002) we have that ¯m = O n ln(n/α1) α2 1 + n α2 2  . (7) Step 2 We choose α1 = C·Q ln Q, where C is a constant and Q = ϵ2 n√ ln(1/(ϵδ)) ln(n), and α2 = ϵ/4. Step 3 Consider some fixed timestep t during the execution of Algorithm 1 such that the algorithm makes a valid prediction (not ∅). Let ˆθ denote the solution of the norm-constrained least-squares minimization (line 6 in the pseudocode). By definition, since ∅was not predicted, we have that ¯q ≤α1 and ¯v ≤α2. We would like to show that |ˆθT x−θT x| ≤ϵ so that Condition 1 of Definition 2 is satisfied. Suppose not, namely that |(ˆθ −θ)T x| > ϵ. Using Lemma 2, we can lower bound the quantity ∆E(ˆθ)2 = Pm i=1[(θ −ˆθ)T X(i)]2, where m denotes the number of rows of the matrix X (equivalently, the number of samples obtained used by the algorithm for training, which we upperbounded by ¯m), and X(i) denotes the transpose of the ith row of X. Finally, we would like to apply Lemma 1 to prove that, with high probability, the squared error of ˆθ will be larger than the squared error of predictions based on the true parameter vector θ, which contradicts the fact that ˆθ was chosen to minimize the term Pm i=1(yi −ˆθT X(i))2. One problem with this approach is that Lemma 1 applies to a fixed ˆθ and the least-squares computation of Algorithm 1 may choose any ˆθ in the infinite set {ˆθ ∈Rn such that ||ˆθ|| ≤1}. Therefore, we use a uniform discretization to form a 4 finite cover of [−1, 1]n and apply the theorem to the member of the cover closest to ˆθ. To guarantee that the total failure probability of the algorithm is at most δ, we apply the union bound over all (finitely many) applications of Lemma 1. 2 1.3 Notes In our formulation of KLRP we assumed an upper bound of 1 on the the two-norm of the inputs xi, outputs yi, and the true parameter vector θ. By appropriate scaling of the inputs and/or outputs, we could instead allow a larger (but still finite) bound. Our analysis of Algorithm 1 showed that it is possible to solve KLRP with polynomial sample complexity (where the sample complexity is defined as the number of timesteps t that the algorithm outputs ∅for the current input xt), with high probability. We note that the algorithm also has polynomial computational complexity per timestep, given the tractability of solving norm-constrained least-squares problems (see Chapter 12 of the book by Golub and Van Loan (1996)). 1.4 Related Work Work on linear regression is abundant in the statistics community (Seber & Lee, 2003). The use of the quantities ¯v and ¯q to quantify the level of certainty of the linear estimator was introduced by Auer (2002). Our analysis differs from that by Auer (2002) because we do not assume that the input vectors xi are fixed ahead of time, but rather that they may be chosen in an adversarial manner. This property is especially important for the application of regression techniques to the full RL problem, rather than the Associative RL problem considered by Auer (2002). Our analysis has a similar flavor to some, but not all, parts of the analysis by Abbeel and Ng (2005). However, a crucial difference of our framework and analysis is the use of output ∅to signify uncertainty in the current estimate, which allows for efficient exploration in the application to RL as described in the next section. 2 Application to Reinforcement Learning The general reinforcement-learning (RL) problem is how to enable an agent (computer program, robot, etc.) to maximize an external reward signal by acting in an unknown environment. To ensure a well-defined problem, we make assumptions about the types of possible worlds. To make the problem tractable, we settle for near-optimal (rather than optimal) behavior on all but a polynomial number of timesteps, as well as a small allowable failure probability. This type of performance metric was introduced by Kakade (2003), in the vein of recent RL analyses (Kearns & Singh, 2002; Brafman & Tennenholtz, 2002). In this section, we formalize a specific RL problem where the environment is mathematically modeled by a continuous MDP taken from a rich class of MDPs. We present an algorithm and prove that it learns efficiently within this class. The algorithm is “model-based” in the sense that it constructs an explicit MDP that it uses to reason about future actions in the true, but unknown, MDP environment. The algorithm uses, as a subroutine, any admissible algorithm for the KWIK Linear Regression Problem introduced in Section 1. Although our main result is for a specific class of continuous MDPs, albeit an interesting and previously studied one, our technique is more general and should be applicable to many other classes of MDPs as described in the conclusion. 2.1 Problem Formulation The model we use is slightly modified from the model described by Abbeel and Ng (2005). The main difference is that we consider discounted rather than undiscounted MDPs and we don’t require the agent to have a “reset” action that takes it to a specified start state (or distribution). Let PS denote the set of all (measurable) probability distributions over the set S. The environment is described by a discounted MDP M = ⟨S, A, T, R, γ⟩, where S = RnS is the state space, A = RnA is the action space, T : S × A →PS is the unknown transition dynamics, γ ∈[0, 1) is the discount factor, and R : S × A →R is the known reward function.1 For each timestep t, let xt ∈S denote the current 1All of our results can easily be extended to the case of an unknown reward function with a suitable linearity assumption. 5 state and ut ∈A the current action. The transition dynamics T satisfy xt+1 = Mφ(xt, ut) + wt, (8) where xt+1 ∈S, φ(·, ·) : RnS+nA →Rn is a (basis or kernel) function satisfying ||φ(·, ·)|| ≤1, and M is an nS × n matrix. We assume that the 2-norm of each row of M is bounded by 1.2 Each component of the noise term wt ∈RnS is chosen i.i.d. from a normal distribution with mean 0 and variance σ2 for a known constant σ. If an MDP satisfies the above conditions we say that it is linearly parameterized, because the next-state xt+1 is a linear function of the vector φ(xt, ut) (which describes the current state and action) plus a noise term. We assume that the learner (also called the agent) receives nS, nA, n, R, φ(·, ·), σ, and γ as input, with T initially being unknown. The learning problem is defined as follows. The agent always occupies a single state s of the MDP M. The agent is given s and chooses an action a. It then receives an immediate reward r ∼R(s, a) and is transported to a next state s′ ∼T (s, a). This procedure then repeats forever. The first state occupied by the agent may be chosen arbitrarily. A policy is any strategy for choosing actions. We assume (unless noted otherwise) that rewards all lie in the interval [0, 1]. For any policy π, let V π M(s) (Qπ M(s, a)) denote the discounted, infinite-horizon value (action-value) function for π in M (which may be omitted from the notation) from state s. Specifically, let st and rt be the tth encountered state and received reward, respectively, resulting from execution of policy π in some MDP M from state s0. Then, V π M(s) = E[P∞ j=0 γjrj|s0 = s]. The optimal policy is denoted π∗and has value functions V ∗ M(s) and Q∗ M(s, a). Note that a policy cannot have a value greater than vmax := 1/(1 −γ) by the assumption of a maximum reward of 1. 2.2 Algorithm First, we discuss how to use an admissible learning algorithm for KLRP to construct an MDP model. We proceed by specifying the transition model for each of the (infinitely many) state-action pairs. Given a fixed state-action pair (s, a), we need to estimate the next-state distribution of the MDP from past experience, which consists of input state-action pairs (transformed by the nonlinear function φ) and output next states. For each state component i ∈{1, . . . , nS}, we have a separate learning problem that can be solved by any instance Ai of an admissible KLRP algorithm.3 If each instance makes a valid prediction (not ∅), then we simply construct an approximate next-state distribution whose ith component is normally distributed with variance σ2 and whose mean is given by the prediction of Ai (this procedure is equivalent to constructing an approximate transition matrix ˆ M whose ith row is equal to the transpose of the approximate parameter vector ˆθ learned by Ai). If any instance of our KLRP algorithm predicts ∅for state-action pair (s, a), then we cannot estimate the next-state distribution. Instead, we make s highly rewarding in the MDP model to encourage exploration, as done in the R-MAX algorithm (Brafman & Tennenholtz, 2002). Following the terminology introduced by Kearns and Singh (2002), we call such a state (state-action) an “unknown” state (state-action) and we ensure that the value function of our model assigns vmax (maximum possible) to state s. The standard way to satisfy this condition for finite MDPs is to make the transition function for action a from state s a self-loop with reward 1 (yielding a value of vmax = 1/(1−γ) for state s). We can affect the exact same result in a continuous MDP by adding a component to each state vector s and to each vector φ(s, a) for every state-action pair (s, a). If (s, a) is “unknown” we set the value of the additional components (of φ(s, a) and s) to 1, otherwise we set it to 0. We add an additional row and column to M that preserves this extra component (during the transformation from φ(s, a) to the next state s′) and otherwise doesn’t change the next-state distribution. Finally, we give a reward of 1 to any unknown state, leaving rewards for the known states unchanged. Pseudocode for the resulting KWIK-RMAX algorithm is provided in Algorithm 2. Theorem 2 For any ϵ and δ, the KWIK-RMAX algorithm executes an ϵ-optimal policy on at most a polynomial (in n, nS, 1/ϵ, 1/δ, and 1/(1 −γ)) number of steps, with probability at least 1 −δ. 2The algorithm can be modified to deal with bounds (on the norms of the rows of M) that are larger than one. 3One minor technical detail is that our KLRP setting requires bounded outputs (see Definition 1) while our application to MBRL requires dealing with normal, and hence unbounded outputs. This is easily dealt with by ignoring any extremely large (or small) outputs and showing that the resulting norm of the truncated normal distribution learned by the each instance Ai is very close to the norm of the untruncated distribution. 6 Algorithm 2 KWIK-RMAX Algorithm 0: Inputs: nS, nA, n, R, φ(·, ·), σ, γ, ϵ, δ, and admissible learning algorithm ModelLearn. 1: for all state components i ∈{1, . . . , nS} do 2: Initialize a new instantiation of ModelLearn, denoted Ai, with inputs C ϵ(1−γ)2 2√n and δ/nS, for inputs ϵ and δ, respectively, in Definition 2, and where C is some constant determined by the analysis. 3: end for 4: Initialize an MDP Model with state space S, action space A, reward function R, discount factor γ and transition function specified by Ai for i ∈{1, . . . , nS} as described above. 5: for t = 1, 2, 3, · · · do 6: Let s denote the state at time t. 7: Choose action a := ˆπ∗(s) where ˆπ∗is the optimal policy of the MDP Model. 8: Let s′ be the next state after executing action a. 9: for all factors i ∈{1, . . . , n} do 10: Present input-output pair (φ(s, a), s′(i)) to Ai,a. 11: end for 12: Update MDP Model. 13: end for 2.3 Analysis Proof sketch: (of Theorem 2) It can be shown that, with high probability, policy ˆπ∗is either an ϵ-optimal policy (V ˆπ∗(s) ≥ V ∗(s) −ϵ) or it is very likely to lead to an unknown state. However, the number of times the latter event can occur is bounded by the maximum number of times the instances Ai can predict ∅, which is polynomial in the relevant parameters. 2 2.4 The Planning Assumption We have shown that the KWIK-RMAX Algorithm acts near-optimally on all but a small (polynomial) number of timesteps, with high probability. Unfortunately, to do so, the algorithm must solve its internal MDP model completely and exactly. It is easy to extend the analysis to allow ϵapproximate solution. However, it is not clear whether even this approximate computation can be done efficiently. In any case, discretization of the state space can be used, which yields computational complexity that is exponential in the number of (state and action) dimensions of the problem, similar to the work of Chow and Tsitsiklis (1991). Alternatively, sparse sampling can be used, whose complexity has no dependence on the size of the state space but depends exponentially on the time horizon (≈1/(1 −γ)) (Kearns et al., 1999). Practically, there are many promising techniques that make use of value-function approximation for fast and efficient solution (planning) of MDPs (Sutton & Barto, 1998). Nevertheless, it remains future work to fully analyze the complexity of planning. 2.5 Related Work The general exploration problem in continuous state spaces was considered by Kakade et al. (2003), and at a high level our approach to exploration is similar in spirit. However, a direct application of Kakade et al.’s (2003) algorithm to linearly-parameterized MDPs results in an algorithm whose sample complexity scales exponentially, rather than polynomially, with the state-space dimension. That is because the analysis uses a factor of the size of the “cover” of the metric space. Reinforcement learning in continuous MDPs with linear dynamics was studied by Fiechter (1997). However, an exact linear relationship between the current state and next state is required for this analysis to go through, while we allow the current state to be transformed (for instance, adding non-linear state features) through non-linear function φ. Furthermore, Fiechter’s algorithm relied on the existence of a “reset” action and a specific form of reward function. These assumptions admit a solution that follows a fixed policy and doesn’t depend on the actual history of the agent or the underlying MDP. The model that we consider, linearly parameterized MDPs, is taken directly from the work by Abbeel and Ng (2005), where it was justified in part by an application to robotic helicopter flight. In 7 that work, a provably efficient algorithm was developed in the apprenticeship RL setting. In this setting, the algorithm is given limited access (polynomial number of calls) to a fixed policy (called the teacher’s policy). With high probably, a policy is learned that is nearly as good as the teacher’s policy. Although this framework is interesting and perhaps more useful for certain applications (such as helicopter flying), it requires a priori expert knowledge (to construct the teacher) and alleviates the problem of exploration altogether. In addition, Abbeel and Ng’s (2005) algorithm also relies heavily on a reset assumption, while ours does not. Conclusion We have provided a provably efficient RL algorithm that learns a very rich and important class of MDPs with continuous state and action spaces. Yet, many real-world MDPs do not satisfy the linearity assumption, a concern we now address. Our RL algorithm utilized a specific online linear regression algorithm. We have identified certain interesting and general properties (see Definition 2) of this particular algorithm that support online exploration. These properties are meaningful without the linearity assumption and should be useful for development of new algorithms for different modeling assumptions. Our real goal of the paper is to work towards developing a general technique for applying regression algorithms (as black boxes) to model-based reinforcement-learning algorithms in a robust and formally justified way. We believe the approach used with linear regression can be repeated for other important classes, but we leave the details as interesting future work. Acknowledgements We thank NSF and DARPA IPTO for support. References Abbeel, P., & Ng, A. Y. (2005). Exploration and apprenticeship learning in reinforcement learning. ICML ’05: Proceedings of the 22nd international conference on Machine learning (pp. 1–8). New York, NY, USA: ACM Press. Auer, P. (2002). Using confidence bounds for exploitation-exploration trade-offs. Journal of Machine Learning Research, 3, 397–422. Brafman, R. I., & Tennenholtz, M. (2002). R-MAX—a general polynomial time algorithm for near-optimal reinforcement learning. Journal of Machine Learning Research, 3, 213–231. Chow, C.-S., & Tsitsiklis, J. N. (1991). An optimal one-way multigrid algorithmfor discrete time stochastic control. IEEE Transactions on Automatic Control, 36, 898–914. Fiechter, C.-N. (1997). PAC adaptive control of linear systems. Tenth Annual Conference on Computational Learning Theory (COLT) (pp. 72–80). Golub, G. H., & Van Loan, C. F. (1996). Matrix computations. Baltimore, Maryland: The Johns Hopkins University Press. 3rd edition. Kakade, S. M. (2003). On the sample complexity of reinforcement learning. Doctoral dissertation, Gatsby Computational Neuroscience Unit, University College London. Kakade, S. M. K., Kearns, M. J., & Langford, J. C. (2003). Exploration in metric state spaces. Proceedings of the 20th International Conference on Machine Learning (ICML-03). Kearns, M., Mansour, Y., & Ng, A. Y. (1999). A sparse sampling algorithm for near-optimal planning in large Markov decision processes. Proceedings of the Sixteenth International Joint Conference on Artificial Intelligence (IJCAI-99) (pp. 1324–1331). Kearns, M. J., & Singh, S. P. (2002). Near-optimal reinforcement learning in polynomial time. Machine Learning, 49, 209–232. Ng, A. Y., Kim, H. J., Jordan, M. I., & Sastry, S. (2003). Autonomous helicopter flight via reinforcement learning. Advances in Neural Information Processing Systems 16 (NIPS-03). Seber, G. A. F., & Lee, A. J. (2003). Linear regression analysis. Wiley-Interscience. Sutton, R. S., & Barto, A. G. (1998). Reinforcement learning: An introduction. The MIT Press. Tesauro, G. (1994). TD-Gammon, a self-teaching backgammon program, achieves master-level play. Neural Computation, 6, 215–219. 8
2007
154
3,186
Transfer Learning using Kolmogorov Complexity: Basic Theory and Empirical Evaluations M. M. Hassan Mahmud Department of Computer Science University of Illinois at Urbana-Champaign mmmahmud@uiuc.edu Sylvian R. Ray Department of Computer Science University of Illinois at Urbana-Champaign ray@cs.uiuc.edu Abstract In transfer learning we aim to solve new problems using fewer examples using information gained from solving related problems. Transfer learning has been successful in practice, and extensive PAC analysis of these methods has been developed. However it is not yet clear how to define relatedness between tasks. This is considered as a major problem as it is conceptually troubling and it makes it unclear how much information to transfer and when and how to transfer it. In this paper we propose to measure the amount of information one task contains about another using conditional Kolmogorov complexity between the tasks. We show how existing theory neatly solves the problem of measuring relatedness and transferring the ‘right’ amount of information in sequential transfer learning in a Bayesian setting. The theory also suggests that, in a very formal and precise sense, no other reasonable transfer method can do much better than our Kolmogorov Complexity theoretic transfer method, and that sequential transfer is always justified. We also develop a practical approximation to the method and use it to transfer information between 8 arbitrarily chosen databases from the UCI ML repository. 1 Introduction The goal of transfer learning [1] is to learn new tasks with fewer examples given information gained from solving related tasks, with each task corresponding to the distribution/probability measure generating the samples for that task. The study of transfer is motivated by the fact that people use knowledge gained from previously solved, related problems to solve new problems quicker. Transfer learning methods have been successful in practice, for instance it has been used to recognize related parts of a visual scene in robot navigation tasks, predict rewards in related regions in reinforcement learning based robot navigation problems, and predict results of related medical tests for the same group of patients. Figure 1 shows a prototypical transfer method [1], and it illustrates some of the key ideas. The m tasks being learned are defined on the same input space, and are related by virtue of requiring the same common ‘high level features’ encoded in the hidden units. The tasks are learned in parallel – i.e. during training, the network is trained by alternating training samples from the different tasks, and the hope is that now the common high level features will be learned quicker. Transfer can also be done sequentially where information from tasks learned previously are used to speed up learning of new ones. Despite the practical successes, the key question of how one measures relatedness between tasks has, so far, eluded answer. Most current methods, including the deep PAC theoretic analysis in [2], start by assuming that the tasks are related because they have a common near-optimal inductive bias (the common hidden units in the above example). As no explicit measure of relatedness is prescribed, it becomes difficult to answer questions such as how much information to transfer between tasks and when not to transfer information. 1 Figure 1: A typical Transfer Learning Method. There has been some work which attempt to solve these problems. [3] gives a more explicit measure of task relatedness in which two tasks P and Q are said to be similar with respect to a given set of functions if the set contains an element f such that P(a) = Q(f(a)) for all events a. By assuming the existence of these functions, the authors are able to derive PAC sample complexity bounds for error of each task (as opposed to expected error, w.r.t. a distribution over the m tasks, in [2]). More interesting is the approach in [4], where the author derives PAC bounds in which the sample complexity is proportional to the joint Kolmogorov complexity [5] of the m hypotheses. So Kolmogorov complexity (see below) determines the relatedness between tasks. However, the bounds hold only for ≥8192 tasks (Theorem 3). In this paper we approach the above idea from a Bayesian perspective and measure tasks relatedness using conditional Kolmogorov complexity of the hypothesis. We describe the basics of the theory to show how it justifies this approach and neatly solves the problem of measuring task relatedness (details in [6; 7]). We then perform experiments to show the effectiveness of this method. Let us take a brief look at our approach. We assume that each hypothesis is represented by a program – for example a decision tree is represented by a program that contains a data structure representing the tree, and the relevant code to compute the leaf node corresponding to a given input vector. The Kolmogorov complexity of a hypothesis h (or any other bit string) is now defined as the length of the shortest program that outputs h given no input. This is a measure of absolute information content of an individual object – in this case the hypothesis h. It can be shown that Kolmogorov complexity is a sharper version of Information Theoretic entropy, which measures the amount of information in an ensemble of objects with respect to a distribution over the ensemble. The conditional Kolmogorov complexity of hypothesis h given h′, K(h|h′), is defined as the length of the shortest program that outputs the program h given h′ as input. K(h|h′) measures the amount of constructive information h′ contains about h – how much information h′ contains for the purpose of constructing h. This is precisely what we wish to measure in transfer learning. Hence this becomes our measure of relatedness for performing sequential transfer learning in the Bayesian setting. In the Bayesian setting, any sequential transfer learning mechanism/algorithm is ‘just’ a conditional prior W(·|h′) over the hypothesis/probability measure space, where h′ is the task learned previously – i.e. the task we are trying to transfer information from. In this case, by setting the prior over the hypothesis space to be P(·|h′) := 2−K(·|h′) we weight each candidate hypothesis by how related it is to previous tasks, and so we automatically transfer the right amount of information when learning the new problem. We show that in a certain precise sense this prior is never much worse than any reasonable transfer learning prior, or any non-transfer prior. So, sequential transfer learning is always justified from a theoretical perspective. This result is quite unexpected as the current belief in the transfer learning community is that it should hurt to transfer from unrelated tasks. Due to lack of space, we only just briefly note that similar results hold for an appropriate interpretation of parallel transfer, and that, translated to the Bayesian setting, current practical transfer methods look like sequential transfer methods [6; 7]. Kolmogorov complexity is computable only in the limit (i.e. with infinite resources), and so, while ideal for investigating transfer in the limit, in practice we need to use an approximation of it (see [8] for a good example of this). In this paper we perform transfer in Bayesian decision trees by using a fairly simple approximation to the 2−K(·|·) prior. In the rest of the paper we proceed as follows. In section 3 we define Kolmogorov complexity more precisely and state all the relevant Bayesian convergence results for making the claims above. We then describe our Kolmogorov complexity based Bayesian transfer learning method. In section 4 we describe our method for approximation of the above using Bayesian decision trees, and then in section 5 we describe 12 transfer experiments using 8 standard databases from the UCI machine learning repository [9]. Our experiments are the most general that we know of, in the sense that we 2 transfer between arbitrary databases with little or no semantic relationships. We note that this fact also makes it difficult to compare our method to other existing methods (see also section 6). 2 Preliminaries We consider Bayesian transfer learning for finite input spaces Ii and finite output spaces Oi. We assume finite hypothesis spaces Hi, where each h ∈Hi is a conditional probability measure on Oi, conditioned on elements of Ii. So for y ∈Oi and x ∈Ii, h(y|x) gives the probability of output being y given input x. Given Dn = {(x1, y1), (x2, y2), · · · , (xn, yn)} from Ii ×Oi, the probability of Dn according to h ∈Hi is given by: h(Dn) := n Y k=1 h(yk|xk) The conditional probability of a new sample (xnew, ynew) ∈Ii ×Oi for any conditional probability measure µ (e.g. h ∈Hi or MW in ( 3.2) ) is given by: µ(ynew|xnew, Dn) := µ(Dn ∪{(xnew, ynew)}) µ(Dn) (2.1) So the learning problem is: given a training sample Dn, where for each (xk, yk) ∈Dn yk is assumed to have been chosen according a h ∈Hi, learn h. The prediction problem is to predict the label of the new sample xnew using ( 2.1). The probabilities for the inputs x are not included above because they cancel out. This is merely the standard Bayesian setting, translated to a typical Machine learning setting (e.g. [10]). We use MCMC simulations in a computer to sample for our Bayesian learners, and so considering only finite spaces above is acceptable. However, the theory we present here holds for any hypothesis, input and output space that may be handled by a computer with infinite resources (see [11; 12] for more precise descriptions). Note that we are considering cross-domain transfer [13] as our standard setting (see section 6). We further assume that each h ∈Hi is a program (therefore a bit string) for some Universal prefix Turing machine U. When it is clear that a particular symbol p denotes a program, we will write p(x) to denote U(p, x), i.e. running program p on input x. 3 Transfer Learning using Kolmogorov Complexity 3.1 Kolmogorov Complexity based Task Relatedness A program is a bit string, and a measure of absolute constructive information that a bit string x contains about another bit string y is given by the conditional Kolmogorov complexity of x given y [5] . Since our hypotheses are programs/bit strings, the amount of information that a hypothesis or program h′ contains about constructing another hypothesis h is also given by the same: Definition 1. The conditional Kolmogorov complexity of h ∈Hj given h′ ∈Hi is defined as the length of the shortest program that given the program h′ as input, outputs the program h. K(h|h′) := min r {l(r) : r(h′) = h} We will use a minimality property of K. Let f(x, y) be a computable function over product of bit strings. f is computable means that there is a program p such that p(x, n), n ∈N, computes f(x) to accuracy ǫ < 2−n in finite time. Now assume that f(x, y) satisfies for each y P x 2−f(x,y) ≤1. Then for a constant cf = K(f) + O(1), independent of x and y, but dependent on K(f), the length of shortest program computing f, and some small constant (O(1)) [5, Corollary 4.3.1]: K(x|y) ≤f(x, y) + cf (3.1) 3.2 Bayesian Convergence Results A Bayes mixture MW over Hi is defined as follows: MW (Dn) := X h∈Hi h(Dn)W(h) with X h∈Hi W(h) ≤1 (3.2) 3 (the inequality is sufficient for the convergence results). Now assume that the data has been generated by a hj ∈Hi (this is standard for a Bayesian setting, but we will relax this constraint below). Then the following impressive result holds true for each (x, y) ∈Ii × Oi. ∞ X t=0 X Dn hj(Dn)[MW (y|x, Dn) −hj(y|x, Dn)]2 ≤−ln W(hj). (3.3) So for finite −ln W(hj), convergence is rapid; the expected number of times n |MW (a|x, Dn) − hj(a|x, Dn)| > ǫ is ≤−ln W(hj)/ǫ2, and the probability that the number of ǫ deviations > −ln W(hj)/ǫ2δ is < δ. This result was first proved in [14], and extended variously in [11; 12]. In essence these results hold as long as Hi can be enumerated and hj and W can be computed with infinite resources. These results also hold if hj ̸∈Hi, but ∃h′ j ∈Hi such that the nth order KL divergence between hj and h′ j is bounded by k. In this case the error bound is −ln W(h′ j) + k [11, section 2.5]. Now consider the Solomonoff-Levin prior: 2−K(h) – this has ( 3.3) error bound K(h) ln 2, and for any computable prior W(·), f(x, y) := −ln W(x)/ ln 2 satisfies conditions for f(x, y) in ( 3.1). So by ( 3.3), with y = the empty string, we get: K(h) ln 2 ≤−ln W(h) + cW (3.4) By ( 3.3), this means that for all h ∈Hi, the error bound for the 2−K(h) prior can be no more than a constant worse than the error bound for any other prior. Since reasonable priors have small K(W) (= O(1)), cW = O(1) and this prior is universally optimal [11, section 5.3]. 3.3 Bayesian Transfer Learning Assume we have previously observed/learned m −1 tasks, with task tj ∈Hij, and the mth task to be learned is in Him. Let t := (t1, t2, · · · , tm−1). In the Bayesian framework, a transfer learning scheme corresponds to a computable prior W(·|t) over the space Him, X h∈Him W(h|t) ≤1 In this case, by ( 3.3), the error bound of the transfer learning scheme MW (defined by the prior W) is −ln W(h|t). We define our transfer learning method MT L by choosing the prior 2−K(·|t): MT L(Dn) := X h∈Him h(Dn)2−K(h|t). For MT L the error bound is K(h|t) ln 2. By the minimality property ( 3.1), we get that K(h|t) ln 2 ≤−ln W(h|t) + cW So for a reasonable computable transfer learning scheme MW , cW = O(1) and for all h and t, the error bound for MT L is no more than a constant worse than the error bound for MW – i.e. MT L is universally optimal [11, section 5.3]. Also note that in general K(x|y) ≤K(x)1. Therefore by ( 3.4) the transfer learning scheme MT L is also universally optimal over all non-transfer learning schemes – i.e. in the precise formal sense of the framework in this paper, sequential transfer learning is always justified. The result in this section, while novel, are not technically deep (see also [6] [12, section 6]). We should also note that the 2−K(h) prior is not universally optimal with respect to the transfer prior W(·|t) because the inequality ( 3.4) now holds only upto the constant cW (·|t) which depends on K(t). So this constant increases with increasing number of tasks which is very undesirable. Indeed, this is demonstrated in our experiments when the base classifier used is an approximation to the 2−K(h) prior and the error of this prior is seen to be significantly higher than the transfer learning prior 2−K(h|t). 4 Practical Approximation using Decision Trees Since K is computable only in the limit, to apply the above ideas in practical situations, we need to approximate K and hence MT L. Furthermore we also need to specify the spaces Hi, Oi, Ii and how to sample from the approximation of MT L. We address each issue in turn. 1Because arg K(x), with a constant length modification, also outputs x given input y. 4 4.1 Decision Trees We will consider standard binary decision trees as our hypotheses. Each hypothesis space Hi consists of decision trees for Ii defined by the set fi of features. A tree h ∈Hi is defined recursively: h := nroot nj := rj Cj ∅∅| rj Cj nj L ∅| rj Cj ∅nj R | rj Cj nj L nj R C is a vector of size |Oi|, with component Ci giving the probability of the ith class. Each rule r is of the form f < v, where f ∈fi and v is a value for f. The vector C is used during classification only when the corresponding node has one or more ∅children. The size of each tree is Nc0 where N is the number of nodes, and c0 is a constant, denoting the size of each rule entry, the outgoing pointers, and C. Since c0 and the length of the program code p0 for computing the tree output are constants independent of the tree, we define the length of a tree as l(h) := N. 4.2 Approximating K and the Prior 2−K(·|t) Approximation for a single previously learned tree: We will approximate K(·|·) using a function that is defined for a single previously learned tree as follows: Cld(h|h′) := l(h) −d(h, h′) where d(h, h′) is the maximum number of overlapping nodes starting from the root nodes: d(h, h′) := d(nroot, n′ root) d(n, ∅) := 0 d(n, n′) := 1 + d(nL, n′ L) + d(nR, n′ R) d(∅, n′) := 0 In the single task case, the prior is just 2−l(h)/Zl (which is an approximation to the SolomonoffLevin prior 2−K(·)), and in the transfer learning case, the prior is 2−Cld(·|h′)/ZCld where the Zs are normalization terms2. In both cases, we can sample from the prior directly by growing the decision tree dynamically. Call a ∅in h a hole. Then for 2−l(h), during the generation process, we first generate an integer k according to 2−t distribution (easy to do using a pseudo random number generator). Then at each step we select a hole uniformly at random and then create a node there (with two more holes) and generate the corresponding rule randomly. We do so until we get a tree with l(h) = k. In the transfer learning case, for the prior 2−Cld(·|h′) we first generate an integer k according to 2−t distribution. Then we generate as above until we get a tree h with Cld(h|h′) = k. It can be seen with a little thought that these procedures sample from the respective priors. Approximation for multiple previously learned trees: We define Cld for multiple trees as an averaging of the contributions of each of the m −1 previously learned trees: Cm ld (hm|h1, h2, · · · , hm−1) := −log 1 m −1 m−1 X i=1 2−Cld(hm|hi) ! In the transfer learning case, we need to sample according 2−Cm ld(·|·)/ZCm ld which reduces to 1/[(m− 1)ZCm ld ] Pm−1 i=1 2−Cld(hm|hi). To sample from this, we can simply select a hi from the m −1 trees at random and then sample from 2−Cld(·|hi) to get the new tree. The transfer learning mixture: The approximation of the transfer learning mixture MT L is now: PT L(Dn) = X h∈Him h(Dn)2−Cm ld(h|t)/ZCm ld So by ( 3.3), the error bound for PT L is given by Cm ld (h|t) ln 2 + ln ZCld (the ln ZCld is a constant that is same for all h ∈Hi). So when using Cm ld , universality is maintained, but only up to the degree that Cm ld approximates K. In our experiments we used the prior 1.005−C instead of 2−C above to make larger trees more likely and hence speed up convergence of MCMC sampling. 2The Z’s exist, here because the Hs are finite, and in general because ki = Nc0 + l(p0) gives lengths of programs, which are known to satisfy P i 2−ki ≤1. 5 Table 1: Metropolis-Hastings Algorithm 1. Let Dn be the training sample; select the current tree/state hcur using the proposal distribution q(hcur). 2. For i = 1 to J do (a) Choose a candidate next state hprop according to the proposal distribution q(hprop). (b) Draw u uniformly at random from [0, 1] and set hcur := hprop if A(hprop, hcur) > u, where A is defined by A(h, h′) := min ( 1, h(Dn)2−Cm ld (h|t)q(h′) h′(Dn)2−Cm ld (h′|t)q(h) ) 4.3 Approximating PT L using Metropolis-Hastings As in standard Bayesian MCMC methods, the idea will be to draw N samples hmi from the posterior, P(h|Dn, t) which is given by P(h|Dn, t) := h(Dn)2−Cm ld(h|t)/(ZCm ld P(Dn)) Then we will approximate PT L by ˆPT L(y|x) := 1 N N X i=1 hmi(y|x) We will use the standard Metropolis-Hastings algorithm to sample from PT L (see [15] for a brief introduction and further references). The algorithm is given in table 1. The algorithm is first run for some J = T, to get the Markov chain q × A to converge, and then starting from the last hcur in the run, the algorithm is run again for J = N times to get N samples for ˆPT L. In our experiments we set T to 1000 and N = 50. We set q to our prior 2−Cm ld(·|t)/ZCm ld , and hence the acceptance probability A is reduced to min{1, h(Dn)/h′(Dn)}. Note that every time after we generate a tree according to q, we set the C entries using the training sample Dn in the usual way. 5 Experiments We used 8 databases from the UCI machine learning repository [9] in our experiments (table 2). To show transfer of information we used 20% of the data for a task as the training sample, but also used as prior knowledge trees learned on another task using 80% of the data as training sample. The reported error rates are on the testing sets and are averages over 10 runs . To the best of our knowledge our transfer experiments are the most general performed so far, in the sense that the databases information is transferred between have semantic relationship that is often tenuous. We performed 3 sets of experiments. In the first set we learned each classifier using 80% of the data as training sample and 20% as testing sample (since it is a Bayesian method, we did not use a validation sample-set). This set ensured that our base Bayesian classifier with 2−l(h) prior is reasonably powerful and that any improvement in performance in the transfer experiments (set 3) was due to transfer and not deficiency in our base classifier. From a survey of literature it seems the error rate for our classifier is always at least a couple of percentage points better than C4.5. As an example, for ecoli our classifier outperforms Adaboost and Random Forests in [16], but is a bit worse than these for German Credit. In the second set of experiments we learned the databases that we are going to transfer to using 20% of the database as training sample, and 80% of the data as the testing sample. This was done to establish baseline performance for the transfer learning case. The third and final set of experiments were performed to do the actual transfer. In this case, first one task was learned using 80/20 (80% training, 20% testing) data set and then this was used to learn a 20/80 dataset. During transfer, the N trees from the sampling of the 80/20 task were all used in the prior 2−CN ld(·|t). The results are 6 Table 2: Database summary. The last column gives the error and standard deviation for 80/20 database split. Data Set No. of Samples No. of Feats. No. Classes Error/S.D. Ecoli 336 7 8 9.8%, 3.48 Yeast 1484 8 10 14.8%, 2.0 Mushroom 8124 22 2 0.83%, 0.71 Australian Credit 690 14 2 16.6%, 3.75 German Credit 1000 20 2 28.2%, 4.5 Hepatitis 155 19 2 18.86%, 2.03 Breast Cancer,Wisc. 699 9 2 5.6%, 1.9 Heart Disease, Cleve. 303 14 5 23.0%, 2.56 given in table 3. In our experiments, we transferred only to tasks that showed a significant drop in error rate with the 20/80 split. Surprisingly, the error of the other data sets did not change much. As can be seen from comparing the tables, in most cases transfer of information improves the performance compared to the baseline transfer case. For ecoli, the transfer resulted in improvement to near 80/20 levels, while for australian the improvement was better than 80/20. While the error rate for mushroom and bc-wisc did not move up to 80/20 levels, there was improvement. Interestingly transfer learning did not hurt in one single case, which agrees with our theoretical results in the idealized setting. Table 3: Results of 12 transfer experiments. Transfer To and From rows gives databases information is transferred to and from. The row No-Transfer gives the baseline 20/80 error-rate and standard deviation. Row Transfer gives the error rate and standard deviation after transfer, and the final row PI gives percentage improvement in performance due to transfer. With our admittedly inefficient code, each experiment took between 15 −60 seconds on a 2.4 GHz laptop with 512 MB RAM. Trans. To ecoli Australian Trans. From Yeast Germ. BC Wisc Germ. ecoli hep. No-Transfer 20.6%, 3.8 20.6%, 3.8 20.6%, 3.8 23.2%, 2.4 23.2%, 2.4 23.2%, 2.4 Transfer 11.3%, 1.6 10.2%, 4.74 9.68%, 2.98 15.47%, 0.67 15.43%, 1.2 15.21%, 0.42 PI 45.1% 49% 53% 33.0% 33.5% 34.4% Trans. To mushroom BC Wisc. Trans. From ecoli BC Wisc. Germ. heart Aus. ecoli No-Transfer 13.8%, 1.3 13.8%, 1.3 13.8%, 1.3 10.3%, 1.6 10.3%, 1.6 10.3%, 1.6 Transfer 4.6%, 0.17 4.64%, 0.21 3.89%, 1.02 8.3%, 0.93 8.1%, 1.22 7.8%, 2.03 PI 66.0% 66.0% 71.8% 19.4% 21.3% 24.3% 6 Discussion In this paper we introduced a Kolmogorov Complexity theoretic framework for Transfer Learning. The theory is universally optimal and elegant, and we showed its practical applicability by constructing approximations to it to transfer information across disparate domains in standard UCI machine learning databases. The full theoretical development can be found in [6; 7]. Directions for future empirical investigations are many. We did not consider transferring from multiple previous tasks, and effect of size of source samples on transfer performance (using 70/30 etc. as the sources) or transfer in regression. Due to the general nature of our method, we can perform transfer experiments between any combination of databases in the UCI repository. We 7 also wish to perform experiments using more powerful generalized similarity functions like the gzip compressor [8]3. We also hope that it is clear that Kolmogorov complexity based approach elegantly solves the problem of cross-domain transfer, where we transfer information between tasks that are defined over different input,output and distribution spaces. To the best of our knowledge, the first paper to address this was [13], and recent works include [17] and [18]. All these methods transfer information by finding structural similarity between various networks/rule that form the hypotheses. This is, of course, a way to measure constructive similarity between the hypotheses, and hence an approximation to Kolmogorov complexity based similarity. So Kolmogorov complexity elegantly unifies these ideas. Additionally, the above methods, particularly the last two, are rather elaborate and are hypothesis space specific ([18] is even task specific). The theory of Kolmogorov complexity and its practical approximations such as [8] and this paper suggests that we can get good performance by just using generalized compressors, such as gzip, etc., to measure similarity. Acknowledgments We would like to thank Kiran Lakkaraju for their comments and Samarth Swarup for many fruitful disucssions. References [1] Rich Caruana. Multitask learning. Machine Learning, 28:41–75, 1997. [2] Jonathan Baxter. A model of inductive bias learning. Journal of Artificial Intelligence Research, 12:149– 198, March 2000. [3] Shai Ben-David and Reba Schuller. Exploiting task relatedness for learning multiple tasks. In Proceedings of the 16th Annual Conference on Learning Theory, 2003. [4] Brendan Juba. Estimating relatedness via data compression. In Proceedings of the 23rd International Conference on Machine Learning, 2006. [5] Ming Li and Paul Vitanyi. An Introduction to Kolmogorov Complexity and its Applications. SpringerVerlag, New York, 2nd edition, 1997. [6] M. M. Hassan Mahmud. On universal transfer learning. In Proceedings of the 18th International Conference on Algorithmic Learning Theory, 2007. [7] M. M. Hassan Mahmud. On universal transfer learning (Under Review). 2008. [8] R. Cilibrasi and P. Vitanyi. Clustering by compression. IEEE Transactions on Information theory, 51(4):1523–1545, 2004. [9] D.J. Newman, S. Hettich, C.L. Blake, and C.J. Merz. UCI repository of ML databases, 1998. [10] Radford M. Neal. Bayesian methods for machine learning, NIPS tutorial, 2004. [11] Marcus Hutter. Optimality of Bayesian universal prediction for general loss and alphabet. Journal of Machine Learning Research, 4:971–1000, 2003. [12] Marcus Hutter. On universal prediction and bayesian confirmation. Theoretical Computer Science (in press), 2007. [13] Samarth Swarup and Sylvian R. Ray. Cross domain knowledge transfer using structured representations. In Proceedings of the 21st National Conference on Artificial Intelligence (AAAI), 2006. [14] R. J. Solomonoff. Complexity-based induction systems: comparisons and convergence theorems. IEEE Transactions on Information Theory, 24(4):422–432, 1978. [15] Christophe Andrieu, Nando de Freitas, Arnaud Doucet, and Michael I. Jordan. An introduction to MCMC for machine learning. Machine Learning, 50(1-2):5–43, 2003. [16] Leo Breiman. Random forests. Machine Learning, 45:5–32, 2001. [17] Lilyana Mihalkova, Tuyen Huynh, and Raymond Mooney. Mapping and revising markov logic networks for transfer learning. In Proceedings of the 22nd National Conference on Artificial Intelligence (AAAI, 2007. [18] Matthew Taylor and Peter Stone. Cross-domain transfer for reinforcement learning. In Proceedings of the 24th International Conference on Machine Learning, 2007. 3A flavor of this approach: if the standard compressor is gzip, then the function Cgzip(xy) will give the length of the string xy after compression by gzip. Cgzip(xy) −Cgzip(y) will be the conditional Cgzip(x|y). So Cgzip(h|h′) will give the relatedness between tasks. 8
2007
155
3,187
McRank: Learning to Rank Using Multiple Classification and Gradient Boosting Ping Li ∗ Dept. of Statistical Science Cornell University pingli@cornell.edu Christopher J.C. Burges Microsoft Research Microsoft Corporation cburges@microsoft.com Qiang Wu Microsoft Research Microsoft Corporation qiangwu@microsoft.com Abstract We cast the ranking problem as (1) multiple classification (“Mc”) (2) multiple ordinal classification, which lead to computationally tractable learning algorithms for relevance ranking in Web search. We consider the DCG criterion (discounted cumulative gain), a standard quality measure in information retrieval. Our approach is motivated by the fact that perfect classifications result in perfect DCG scores and the DCG errors are bounded by classification errors. We propose using the Expected Relevance to convert class probabilities into ranking scores. The class probabilities are learned using a gradient boosting tree algorithm. Evaluations on large-scale datasets show that our approach can improve LambdaRank [5] and the regressions-based ranker [6], in terms of the (normalized) DCG scores. An efficient implementation of the boosting tree algorithm is also presented. 1 Introduction The general ranking problem has widespread applications including commercial search engines and recommender systems. We develop McRank, a computationally tractable learning algorithm for the general ranking problem; and we present our approach in the context of ranking in Web search. For a given user input query, a commercial search engine returns many pages of URLs, in an order determined by the underlying proprietary ranking algorithm. The quality of the returned results are largely evaluated on the URLs displayed in the very first page. The type of ranking problem in this study is sometimes referred to as dynamic ranking (or simply, just ranking), because the URLs are dynamically ranked (in real-time) according to the specific user input query. This is different from the query-independent static ranking based on, for example, “page rank” [3] or “authorities and hubs” [12], which may, at least conceptually, serve as an important “feature” for dynamic ranking or to guide the generation of a list of URLs fed to the dynamic ranker. There are two main categories of ranking algorithms. A popular scheme is based on learning pairwise preferences, including RankNet [4], LambdaRank [5], RankSVM [11], RankBoost [7], GBRank [14], and FRank [13]. Both LambdaRank and RankNet used neural nets.1 RankNet used a cross-entropy type of loss function and LambdaRank used a gradient based on NDCG smoothed by the RankNet loss. Another scheme is based on regression [6]. [6] considered the DCG measure (discounted cumulative gain) [10] and showed that the DCG errors are bounded by regression errors. In this study, we also consider the DCG measure. From the definition of DCG, it appears more direct to cast the ranking problem as multiple classification (“Mc”) as opposed to regression. In order to convert classification results into ranking scores, we propose a simple and stable mechanism by using the Expected Relevance. Our evaluations on large-scale datasets demonstrate the superiority of the classification-based ranker (McRank) over both the regression-based and pair-based schemes. 2 Discounted Cumulative Gain (DCG) For an input query, the ranker returns n ordered URLs. Suppose the URLs fed to the ranker are originally ordered {1, 2, 3, ..., n}. The ranker will output a permutation mapping π : {1, 2, 3, ..., n} → {1, 2, 3, ..., n}. We denote the inverse mapping by σi = σ(i) = π−1(i). The DCG score is computed from the relevance levels of the n URLs as DCG = n X i=1 c[i] (2yσi −1) = n X i=1 c[πi] (2yi −1) , (1) ∗Much of the work was conducted while Ping Li was an intern at Microsoft in 2006. 1In fact LambdaRank supports any preference function, although the reported results in [5] are for pairwise. where [i] is the rank order, and yi ∈{0, 1, 2, 3, 4} is the relevance level of the ith URL in the original (pre-ranked) order. yi = 4 corresponds to a “perfect” relevance and yi = 0 corresponds to a “poor” relevance. For generating training datasets, human judges have manually labeled a large number of queries and URLs. In this study, we assume these labels are “gold-standard.” In the definition of DCG, c[i], which is a non-increasing function of i, is typically set as c[i] = 1 log(1 + i), if i ≤L, and c[i] = 0, if i > L, (2) where L is the “truncation level” and is typically set to be L = 10, to reflect the fact that the search quality of commercial search engines is mainly determined by the URLs displayed in the first page. Suppose a dataset contains NQ queries. It is a common practice to normalize the DCG score for each query and report the normalized DCG (“NDCG”) score averaged over all queries. In other words, the NDCG for the jth query (NDCGj) and the final NDCG of the dataset (NDCGF ) are NDCGj = DCGj DCGj,g , NDCGF = 1 NQ NQ X j=1 NDCGj, (3) where DCGj,g is the maximum possible (or “gold standard”) DCG score of the jth query. 3 Learning to Rank Using Classification The definition of DCG suggests that we can cast the ranking problem naturally as multiple classification (i.e., K = 5 classes), because obviously perfect classifications will lead to perfect DCG scores. While the DCG criterion is non-convex and non-smooth, classification is very well-studied. We should mention that one does not really need perfect classifications in order to produce perfect DCG scores. For example, suppose within a query, the URLs are all labeled level 1 or higher. If an algorithm always classifies the URLs one level lower (i.e., URLs labeled level 4 are classified as level 3, and so on), we still have the perfect DCG score but the classification “error” is 100%. This phenomenon to an extent, may provide some “safety cushion” for casting ranking as classification. [6] cast ranking as regression and showed that the DCG errors are bounded by regression errors. It appears to us that the regression-based approach is less direct and possibly also less accurate than our classification-based proposal. For example, it is well-known that, although one can use regression for classification, it is often better to use logistic regression especially for multiple classification [8]. 3.1 Bounding DCG Errors by Classification Errors Following [6, Theorem 2], we show that the DCG errors can be bounded by classification errors. For a permutation mapping π, the error is DCGg - DCGπ. One simple way to obtain the perfect DCGg is to rank the URLs directly according to the gold-standard relevance levels. That is, all URLs with relevance level k + 1 are ranked higher than those with relevance level ≤k; and the URLs with the same relevance levels are arbitrarily ranked without affecting DCGg. We denote the corresponding permutation mapping also by g. Lemma 1 Given n URLs, originally ordered as {1, 2, 3, ..., n}. Suppose a classifier assigns a relevance level ˆyi ∈{0, 1, 2, 3, 4} to the ith URL, for all n URLs. A permutation mapping π ranks the URLs according to ˆyi, i.e., π(i) < π(j) if ˆyi > ˆyj, and, URL i and URL j are arbitrarily ranked if ˆyi = ˆyj. The corresponding DCG error is bounded by the square root of the classification error, DCGg −DCGπ ≤15 √ 2 n X i=1 c2 [i] −n n Y i=1 c2/n [i] !1/2 n X i=1 1yi̸=ˆyi !1/2 . (4) Proof: DCGπ = n X i=1 c[πi] (2yi −1) = n X i=1 c[πi]  2ˆyi −1  + n X i=1 c[πi]  2yi −2ˆyi ≥ n X i=1 c[gi]  2ˆyi −1  + n X i=1 c[πi]  2yi −2ˆyi = n X i=1 c[gi] (2yi −1) − n X i=1 c[gi]  2yi −2ˆyi + n X i=1 c[πi]  2yi −2ˆyi =DCGg + n X i=1 c[πi] −c[gi]   2yi −2ˆyi . Note that Pn i=1 c[πi] 2ˆyi −1  ≥Pn i=1 c[gi] 2ˆyi −1  . Therefore, DCGg −DCGπ ≤ n X i=1 c[gi] −c[πi]   2yi −2ˆyi ≤ n X i=1 c[gi] −c[πi] 2 !1/2 n X i=1  2yi −2ˆyi2 !1/2 ≤ 2 n X i=1 c2 [i] −2n n Y i=1 c2/n [i] !1/2 15 n X i=1 1yi̸=ˆyi !1/2 Note that Pn i=1 c2 [πi] = Pn i=1 c2 [gi] = Pn i=1 c2 [i], Qn i=1 c2 [πi] = Qn i=1 c2 [gi] = Qn i=1 c2 [i], and 24 −20 = 15. Thus, we can minimize the classification error Pn i=1 1yi̸=ˆyi as a surrogate for minimizing the DCG error. Of course, since the classification error itself is non-convex and non-smooth, we actually should use other (well-known) surrogate loss functions such as (7). 3.2 Input Data for Classification A training dataset contains NQ queries. The jth query corresponds to nj URLs; each URL is manually labeled by one of the K = 5 relevance levels. Engineers have developed methodologies to construct “features” by combining the query and URLs, but the details are usually “trade secret.” One important aspect in designing features, at least for the convenience of using traditional machine learning algorithms, is that these features should be comparable across queries. For example, one (artificial) feature could be the number of times the query appears in the Web page, which is comparable across queries. Both pair-based rankers and regression-based rankers implicitly made this assumption, as they tried to learn a single rank function for all queries using the same set of features. Thus, after we have generated feature vectors by combining the queries and URLs, we can create a “training data matrix” of size N ×P, where N = PNQ j=1 nj is the total number of “data points” (i.e., Query+URL) and P is the total number of features. This way, we can use the traditional machine learning notation {yi, xi}N i=1 to denote the training dataset. Here xi ∈RP is the ith feature vector in P dimensions; and yi ∈{0, 1, 2, 3, 4 = K −1} is the class (relevance) label of the ith data point. 3.3 From Classification to Ranking Although perfect classifications lead to perfect DCG scores, in reality, we will need a mechanism to convert (imperfect) classification results into ranking scores. One possibility is already mentioned in Lemma 1. That is, we classify each data point into one of the K = 5 classes and rank the data points according to the class labels (data points with the same labels are arbitrarily ranked). This suggestion, however, will lead to highly unstable ranking results. Our proposed solution is very simple. We first learn the class probabilities by some soft classification algorithm and then score each data point (query+URL) according to the Expected Relevance. Recall we assume a training dataset {yi, xi}N i=1, where the class label yi ∈{0, 1, 2, 3, 4 = K −1}. We learn the class probabilities pi,k = Pr(yi = k), denoted by ˆpi,k, and define a scoring function: Si = K−1 X k=0 ˆpi,kT(k), (5) where T (k) is some monotone (increasing) function of the relevance level k. Once we have computed the scores Si for all data points, we can then sort the data points within each query by the descending order of Si. This approach is apparently sensible and highly stable. In fact, we experimented with both T (k) = k and T (k) = 2k; the performance difference in terms of the NDCG scores was negligible, although T (k) = k appeared to be a slightly better choice (see Figure 3(c) in Appendix II). In this paper, the reported experimental results were based on T (k) = k. When T (k) = k, the scoring function Si is the Expected Relevance. Note that any monotone transformation on Si (e.g., 2Si −1) will not change the ranking results. Consequently, the ranking results are not affected by any affine transformation on T (k), aT (k) + b, (a > 0), because K−1 X k=0 pi,k (a × T(k) + b) = a × K−1 X k=0 pi,kT(k) ! + b, since K−1 X k=0 pi,k = 1. (6) 3.4 The Boosting Tree Algorithm for Learning Class Probabilities For multiple classification, we consider the following common (e.g., [8,9]) surrogate loss function N X i=1 K−1 X k=0 −log(pi,k)1yi=k. (7) Algorithm 1 implements a boosting tree algorithm for learning class probabilities pi,k; and we use basically the same implementation later for regression as well as multiple ordinal classification. Algorithm 1 The boosting tree algorithm for multiple classification, taken from [9, Algorithm 6], although the presentation is slightly different. 0: ˜yi,k = 1, if yi = k, and ˜yi,k = 0 otherwise. 1: Fi,k = 0, k = 0 to K −1, i = 1 to N 2: For m = 1 to M Do 3: For k = 0 to K −1 Do 4: pi,k = exp(Fi,k)/ PK−1 s=0 exp(Fi,s) 5: {Rj,k,m}J j=1 = J-terminal node regression tree for {˜yi,k −pi,k, xi}N i=1 6: βj,k,m = K−1 K P xi∈Rj,k,m ˜yi,k−pi,k P xi∈Rj,k,m (1−pi,k)pi,k 7: Fi,k = Fi,k + ν PJ j=1 βj,k,m1xi∈Rj,k,m 8: End 9: End There are three main parameters. M is the total number of boosting iterations, J is the tree size (number of terminal nodes), and ν is the shrinkage coefficient. As commented in [9] and verified in our experiments, the performance of the algorithm is not sensitive to these parameters. In Algorithm 1, Line 5 contains most of the implementation work, i.e., building the regression trees with J terminal nodes. Appendix I describes an efficient implementation for building the trees. 4 Multiple Ordinal Classification to Further Improve Ranking There is the possibility to (slightly) further improve our classification-based ranking scheme by taking into account the natural orders among the class labels, i.e., the multiple ordinal classification. A common approach for multiple ordinal classification is to learn the cumulative probabilities Pr (yi ≤k) instead of the class probabilities Pr (yi = k) = pi,k. We suggest a simple method similar to the so-called cumulative logits approach known in statistics [1, Section 7.2.1]. We first partition the training data points into two groups: {yi ≥4} and {yi ≤3}. Now we have a binary classification problem and hence we can use exactly the same boosting tree algorithm for multiple classification. Thus we can learn Pr (yi ≤3) easily. We can similarly partition the data and learn Pr (yi ≤2), Pr (yi ≤1), and Pr (yi ≤0), separately. We then infer the class probabilities pi,k = Pr (yi = k) = Pr (yi ≤k) −Pr (yi ≤k −1) , (8) and again we use the Expected Relevance to compute the ranking scores and sort the URLs. We call both rankers based on multiple classification and multiple ordinal classification as McRank. 5 Regression-based Ranking Using Boosting Tree Algorithm With slight modifications, the boosting tree algorithm can be used for regressions. Recall the input data are {yi, xi}N i=1, where yi ∈{0, 1, 2, 3, 4}. [6] suggested regressing the feature vectors xi on the response values 2yi −1. Algorithm 2 implements the least-square boosting tree algorithm. The pseudo code is similar to [9, Algorithm 3] by replacing the (l1) least absolute deviation (LAD) loss with the (l2) least square loss. In fact, we also implemented the LAD boosting tree algorithm but we found the performance was considerably worse than the least-square tree boost. Algorithm 2 The boosting tree algorithm for regressions. After we have learned the values for Si, we use them directly as the ranking scores to order the data points within each query. 0: ˜yi = 2yi −1 1: Si = 1 N PN s=1 ˜ys, i = 1 to N 2: For m = 1 to M Do 5: {Rj,m}J j=1 = J-terminal node regression tree for {˜yi −Si, xi}N i=1 6: βj,m = meanxi∈Rj,m ˜yi −Si 7: Si = Si + ν PJ j=1 βj,m1xi∈Rj,m 9: End 6 Experimental Results We present the evaluations of 4 ranking algorithms (LambdaRank with two-layer nets, regression, multiple classification, and multiple ordinal classification) on 4 datasets, including one artificial dataset and three Web search datasets, denoted by Web-1, Web-2, and Web-3. The artificial dataset and Web-1 are the same datasets used in [5]. Web-2 is the main dataset used in [13]. For the artificial data and Web-1, [5] reported that LambdaRank improved RankNet by about 1.0 (%) NDCG. For Web-2, [13] reported that FRank slightly improved RankNet (by about 0.5 (%) NDCG) and considerably improved RankSVM and RankBoost; but [13] did not compare with LambdaRank. Our experiment showed that LambdaRank improved FRank by about 0.9 (%) NDCG on Web-2. 6.1 The Datasets The artificial dataset [5] was meant to remove any variance caused by the quality of features and/or relevance labels. The data were generated from random cubic polynomials, with 50 features, 50 URLs per query, and 10,000/5,000/10,000 queries for train/validation/test. The Web search dataset Web-1 [5] has 367 features and 10,000/5,000/10,000 queries for train/validation/test, with in total 652,500 URLs. Web-2 [13] has 619 features and 12,000/3,800/3,800 queries for train/validation/test, with in total 1,741,930 URLs. Note that this dataset is only partially labeled with 20 unlabeled URLs per query. These unlabeled URLs were assigned the level 0 [13]. Web-3 has 450 features and 26,000 queries, with in total 474,590 URLs. We conducted five-fold cross-validations and report the average NDCG scores. 6.2 The Parameters: M, J, ν There are three main parameters in the boosting tree algorithm. M is the total number of iterations, J is the number of terminal nodes in each tree, and ν is the shrinkage factor. Our experiments verify that these parameters are not sensitive as long as they are within some “reasonable” ranges [9]. Since these experiments are time-consuming, we did not tune these parameters (M, J, ν) exhaustively; but the experiments appear to be convincing enough to establish the superiority of McRank. [9] suggested setting ν ≤0.1, to avoid over-fitting. We fix ν = 0.05 for the artificial dataset and Web-1, and fix ν = 0.02 for Web-2 and Web-3. The number of terminal nodes, J, should be reasonably big (but not too big) when the dataset is large with a large number of features, because the tree has to be deep enough to consider higher-order interactions [9]. We let J = 10 for the artificial dataset and Web-1, J = 40 for Web-2, and J = 20 for Web-3. With these values of J and ν, we did not observe obvious over-fitting even for a very large number of boosting iterations M. We will report the results with M = 1000 for the artificial data and Web-1, M = 2000 for Web-2, and M = 1500 for Web-3. 6.3 The Test NDCG Results at Truncation Level L = 10 Table 1 lists the NDCG results (both the mean and standard deviation, in percentages (%)) for all 4 datasets and all 4 ranking algorithms, evaluated at the truncation level L = 10. The NDCG scores indicate that that McRank (ordinal classification and classification) considerably improves the regression-based ranker and LambdaRank. If we conduct a one-sided t-test, the imTable 1: The test NDCG scores produced by 4 rankers on 4 datasets. The average NDCG scores are presented in percentages (%) with the standard deviations in the parentheses. Note that for the artificial data and Web-1, the LambdaRank results were taken directly from [5]. We also report the (one-sided) p-values to measure the statistical significance of the improvement of McRank over regression and LambdaRank. For the artificial data, Web-1, and Web-3, we use the ordinal classification results to compute the p-values. However, for Web-2, because our implementation for testing ordinal classification required too much memory for M = 2000, we did not obtain the final test NDCG scores; the partial results indicated that ordinal classification did not improve classification for this dataset. Therefore, we compute the p-values using classification results for Web-2. Datasets Ordinal Classification Classification Regression, p-value LambdaRank, p-value Artificial [5] 85.0 (9.5) 83.7 (9.9) 82.9 (10.2), 0 74.9, (12.6), 0 Web-1 [5] 72.4 (24.1) 72.2 (24.1) 71.7 (24.4), 0.021 71.2 (24.5), 0.0002 Web-2 [13] — 75.8 (23.8) 74.7 (24.4), 0.023 74.3 (24.3), 0.003 Web-3 72.5 (26.5) 72.4 (27.3) 72.0 (27.6), 0.017 71.3 (28.8), 3.8 × 10−7 provements are significant at about 98% level. However, multiple ordinal classification did not show significant improvement over multiple classification, except for the artificial dataset. For the artificial data, all other 3 rankers exhibit very large improvements over LambaRank. This is probably due to the fact that the artificial data are generated noise-free and hence the flexible (with high capacity) rankers using boosting tree algorithms tend to fit the data very well. 6.4 The NDCG Results at Various Truncation Levels (L = 1 to 10) For the artificial dataset and Web-1, [5] also reported the NDCG scores at various truncation levels, L = 1 to 10. To make the comparisons more convincing, we also report similar results for the artificial dataset and Web-1, in Figure 1. For a better clarity, we plot the standard deviations separately from the averages. Figure 1 verifies that the improvements shown in Table 1 are not only true for L = 10 but also (essentially) true for smaller truncation levels. 1 2 3 4 5 6 7 8 9 10 65 70 75 80 85 Truncation level NDCG (%) Artificial Ordinal Classification Regression LambdaRank 1 2 3 4 5 6 7 8 9 10 63 64 65 66 67 68 69 70 71 72 73 Truncation level NDCG (%) Web−1 Ordinal Classification Regression LambdaRank 1 2 3 4 5 6 7 8 9 10 68 69 70 71 72 73 74 75 76 Truncation level NDCG (%) Web−2 Classification Regression LambdaRank 1 2 3 4 5 6 7 8 9 10 58 60 62 64 66 68 70 72 Truncation level NDCG (%) Web−3 Ordinal Classification Regression LambdaRank 1 2 3 4 5 6 7 8 9 10 5 10 15 20 25 30 35 Truncation level NDCG std (%) Ordinal Classification Regression LambdaRank 1 2 3 4 5 6 7 8 9 10 24 26 28 30 32 34 36 38 40 42 Truncation level NDCG std (%) Ordinal Classification Regression LambdaRank 1 2 3 4 5 6 7 8 9 10 22 24 26 28 30 32 34 36 38 40 42 44 46 Truncation level NDCG std (%) Classification Regression LambdaRank 1 2 3 4 5 6 7 8 9 10 26 28 30 32 34 36 38 40 42 44 46 Truncation level NDCG std (%) Ordinal Classification Regression LambdaRank Figure 1: The NDCG scores at truncation levels L = 1 to 10, for four datasets. Upper Panels: the average NDCG scores. Bottom Panels: the corresponding standard deviations. 7 Conclusion The ranking problem has become an important topic in machine learning, partly due to its widespread applications in many decision-making processes especially in commercial search engines. In one aspect, the ranking problem is difficult because the measures of rank quality are usually based on sorting, which is not directly optimizable (at least not efficiently). On the other hand, one can cast ranking into various classical learning tasks such as regression and classification. The proposed classification-based ranking scheme is motivated by the fact that perfect classifications lead to perfect DCG scores and the DCG errors are bounded by the classification errors. It appears natural that the classification-based ranker is more direct and should work better than the regressionbased ranker suggested in [6]. To convert classification results into ranking, we propose a simple and stable mechanism by using the Expected Relevance, computed from the learned class probabilities. To learn the class probabilities, we implement a boosting tree algorithm for multiple classification and we use the same implementation for multiple ordinal classification and regression. Since commercial proprietary datasets are usually very large, an adaptive quantization-based approach efficiently implements the boosting tree algorithm, which avoids sorting and has lower memory cost. Our experimental results have demonstrated that McRank (including multiple classification and multiple ordinal classification) outperforms both the regression-based ranker and the pair-based LambdaRank. However, except for the artificial dataset, we did not observe significant improvement of ordinal classification over classification. In a summary, we regard McRank algorithm (retrospectively) simple, robust, and capable of producing quality ranking results. Appendix I An Efficient Implementation for Building Boosting Trees We use the standard regression tree algorithm [2], which recursively splits the training data points into two groups on the current “best” feature that will reduce the mean square errors (MSE) the most. Efficient (in both time and memory) implementation needs some care. The standard practice [9] is to pre-sort all the features; then after every split, carefully keep track of the indexes of the data points and the sorted orders in all other features for the next split. We suggest a simpler and more efficient approach, by taking advantage of some properties of the boosting tree algorithm. While the boosting tree algorithm is well-known to be robust and also accurate, an individual tree has limited predictive power and usually can be built quite crudely. When splitting on one feature, Figure 2(a) says that sometimes the split point can be chosen within a certain range without affecting the accuracy (i.e., the reduced MSE due to the split). In Figure 2(b), we bin (quantize) the data points into two (0/1) levels on the horizontal (i.e., feature) axis. Suppose we choose the quantization as shown in the Figure 2(b), then the accuracy will not be affected either. s s sR L x y (a) Bin 0 Bin 1 y x s (b) Bin length x y 0 1 2 3 4 5 6 7 8 9 10 1112 (c) Figure 2: To split on one feature (x), we seek a split point s on x such that after the splitting, the mean square error (MSE, in the y axis) of the data points at the left plus the MSE at the right is reduced the most. Panel (a) suggests that in some cases we can choose s in a range (within sL and sR) without affecting the reduced MSE. Panel (b) suggests that, if we bin the data on the x axis to be binary, the reduced MSE will not be affected either, if the data are binned in the way as in (b). Panel (c) pictures an adaptive binning scheme to make the accuracy loss (if any) as little as possible. Of course, we would not know ahead of time how to bin the data to avoid losing accuracy. Therefore, we suggest an adaptive quantization scheme, pictured in Figure 2(c), to make the accuracy loss (if any) as little as possible. In the pre-processing stage, for each feature, the training data points are sorted according to the feature value; and we bin the feature values in the sorted order. We start with a very small initial bin length, e.g., 10−8. As shown in Figure 2(c), we only bin the data where there are indeed data, because the boosting tree algorithm will not consider the area where there are no data anyway. We set an allowed maximum number of bins, denoted by B. If the bin length is so small that we need more than B bins, we simply increment the bin length and re-do the quantization. After the quantization, we replace the original feature value by the bin labels (0, 1, 2, ...). Note that since we start with a small bin length, the ordinal categorical features are naturally taken care of. This simple binning scheme is very effective particularly for the boosting tree algorithm: • It simplifies the implementation. After the quantization, there is no need for sorting (and keeping track of the indexes after splitting) because we conduct “bucket sort” implicitly. • It speeds up the computations for the tree-building step, the bottleneck of the algorithm. • It reduces the memory cost for training. For example, if we set the maximum allowed number of bins to be B = 28, we only need one byte per data entry. • It does not really result in loss of accuracy. We experimented with both B = 28 = 256 and B = 216 = 65536; and we did not observe real differences in the NDCG scores, although reported experimental results were all based on B = 216. See Appendix II, Figure 3(a)(b). Appendix II Some More Experiments on Web-1 Figure 3 (a)(b) present the experiment with our adaptive quantization scheme on Web-1 dataset. We binned the data with the maximum bin number B = 23, 24, 25, 26, 27, 28, and 216. In (a) and (b), the horizontal axis is the “exponent” of B. Panel (a) plots the relative number of total bins in Web-1 as a function of the exponent, normalized by the total number of bins at B = 216. Panel (b) plots the “NDCG loss” due to the quantization, relative to the NDCG scores at B = 216. When B = 28, the total number of bins is only about 6% of that when B = 216; however, both quantization levels achieved the same test NDCG scores. Besides the benefit of computational efficiency, quantization can also be considered as a way of “regularization” to slow down the training, as reflected in (b). 2 3 4 5 6 7 8 16 10 −3 10 −2 10 −1 10 0 Max bin number (Exponent) Percentage of total bins (a) 2 3 4 5 6 7 8 16 −4 −3 −2 −1 0 1 Max bin number (Exponent) NDCG Loss (%) Train Validation Test (b) 1 200 400 600 800 1000 69 70 71 72 73 74 75 76 77 Iteration NDCG (%) Train Validation Test Relevance Gain (c) Figure 3: Web-1. (a)(b): Experiment with our adaptive quantization scheme. (c): Experiment with two different scoring functions. Figure 3 (c) compares two scoring functions to convert learned class probabilities into ranking scores, including the Expected Relevance Si = PK−1 k=0 ˆpi,kk and the Expected Gain Si = PK−1 k=0 ˆpi,k 2k −1  . Panel (c) suggests that using the Expected Relevance is consistently better than using the Expected Gain but the differences are small, especially for the test NDCG scores. References [1] A. Agresti. Categorical Data Analysis. John Wiley & Sons, Inc., Hoboken, NJ, second edition, 2002. [2] L. Brieman, J. Friedman, R. Olshen, and C. Stone. Classification and Regression Trees. 1983. [3] S. Brin and L. Page. The anatomy of a large-scale hypertextual web search engine. In WWW, pages 107–117, 1998. [4] C. Burges, T. Shaked, E. Renshaw, A. Lazier, M. Deeds, N. Hamilton, and G. Hullender. Learning to rank using gradient descent. In ICML, pages 89–96, 2005. [5] C. Burges, R. Ragno, and Q. Le. Learning to rank with nonsmooth cost functions. In NIPS, pages 193–200, 2007. [6] D. Cossock and T. Zhang. Subset ranking using regression. In COLT, pages 605–619, 2006. [7] Y. Freund, R. Iyer, R. Schapire, and Y. Singer. An efficient boosting algorithm for combining preferences. Journal of Machine Learning Research, 4:933–969, 2003. [8] J. Friedman, T. Hastie, and R. Tibshirani. Additive logistic regression: a statistical view of boosting. The Annals of Statistics, 28(2):337– 407, 2000. [9] J. Friedman. Greedy function approximation: A gradient boosting machine. The Annals of Statistics, 29(5):1189–1232, 2001. [10] K. J¨arvelin and J. Kek¨al¨ainen. IR evaluation methods for retrieving highly relevant documents. In SIGIR, pages 41–48, 2000. [11] T. Joachims. Optimizing search engines using clickthrough data. In KDD, pages 133–142, 2002. [12] J. Kleinberg. Authoritative sources in a hyperlinked environment. In SODA, pages 668–677, 1998. [13] M. Tsai, T. Liu, T. Qin, H. Chen, and W. Ma. Frank: a ranking method with fidelity loss. In SIGIR, pages 383–390, 2007. [14] Z. Zheng, K. Chen, G. Sun, and H. Zha. A regression framework for learning ranking functions using relative relevance judgments. In SIGIR, pages 287-294, 2007.
2007
156
3,188
A Randomized Algorithm for Large Scale Support Vector Learning Krishnan S. Department of Computer Science and Automation, Indian Institute of Science, Bangalore-12 krishi@csa.iisc.ernet.in Chiranjib Bhattacharyya Department of Computer Science and Automation, Indian Institute of Science, Bangalore-12 chiru@csa.iisc.ernet.in Ramesh Hariharan Strand Genomics, Bangalore-80 ramesh@strandls.com Abstract This paper investigates the application of randomized algorithms for large scale SVM learning. The key contribution of the paper is to show that, by using ideas random projections, the minimal number of support vectors required to solve almost separable classification problems, such that the solution obtained is near optimal with a very high probability, is given by O(log n); if on removal of properly chosen O(log n) points the data becomes linearly separable then it is called almost separable. The second contribution is a sampling based algorithm, motivated from randomized algorithms, which solves a SVM problem by considering subsets of the dataset which are greater in size than the number of support vectors for the problem. These two ideas are combined to obtain an algorithm for SVM classification problems which performs the learning by considering only O(log n) points at a time. Experiments done on synthetic and real life datasets show that the algorithm does scale up state of the art SVM solvers in terms of memory required and execution time without loss in accuracy. It is to be noted that the algorithm presented here nicely complements existing large scale SVM learning approaches as it can be used to scale up any SVM solver. 1 Introduction Consider a training dataset D = {(xi, yi)}, i = 1 . . . n and yi = {+1, −1}, where xi ∈Rd are data points and yi specify the class labels. the problem of learning the classifier, y = sign(wT x + b), can be narrowed down to computing {w, b} such that it has good generalization ability. The SVM formulation for classification, which will be called C −SV M, for determining {w, b} is given by [1] C-SVM-1: Minimize(w,b,ξ) 1 2||w||2 + C n X i=1 ξi Subject to : yi(w · xi + b) ≥1 −ξi, , ξi ≥0, i = 1 . . . n At optimality w is given by w = X i:αi>0 αiyixi, 0 ≤αi ≤C 1 Consider the set S = {xi|αi > 0}; the elements of this set are called the Support vectors. Note that S completely determines the solution of C −SV M.The set S may not be unique, though w is. Define a parameter ∆to be the minimum cardinality over all S. See that ∆does not change with number of examples, n, and is often much less than n. More generally, the C −SV M problem can be seen as an instance of Abstract optimization problem(AOP) [2, 3, 4]. An AOP is defined as follows: An AOP is a triple (H, <, Φ) where H is a finite set, < a total ordering on 2H, and Φ an oracle that, for a given F ⊆G ⊆H, either reports F = min<F ′|F ′ ⊆G or returns a set F ′ ⊆G with F ′ < F. Many SVM learning problems are AOP problems; algorithms developed for AOP problems can be used for solving SVM problems. Every AOP has a combinatorial dimension associated with it; the combinatorial dimension captures the notion of number of free variables for that AOP. An AOP can be solved by a randomized algorithm by selecting subsets of size greater than the combinatorial dimension of the problem [2]. For SVM, ∆is the combinatorial dimension of the problem; by iterating over subsets of size greater than ∆, the subsets chosen using random sampling, the problem can be solved efficiently [3, 4]; this algorithm was called RandSVM by the authors. Apriori the value of ∆is not known, but for linearly separable classification problems the following holds: 2 ≤∆≤d + 1. This follows from the fact that the dual problem is the minimum distance between 2 non-overlapping convex hulls[5]. When the problem is not linearly separable, the authors use the reduced convex hull formulation [5] to come up with an estimate of the combinatorial dimension; this estimate is not very clear and much higher than d1. The algorithm RandSVM2 iterates over subsets of size proportional to ∆2. RandSVM is not practical because of the following reasons: the sample size is too large in case of high dimensional datasets, the dimension of feature space is usually unknown when using kernels, and the reduced convex hull method used to calculate the combinatorial dimension, when the data is not separable in the feature space, isn’t really useful as the number obtained is very large. This work overcomes the above problems using ideas from random projections[6, 7] and randomized algorithms[8, 9, 2, 10],. As mentioned by the authors of RandSVM, the biggest bottleneck in their algorithm is the value of ∆as it is too large. The main contribution is, using ideas from random projections, the conjecture that if RandSVM is solved using ∆equal to O(log n), then the solution obtained is close to optimal with high probability(Theorem 3), in particular for almost separable datasets. Almost separable datasets are those which become linearly separable when a small number of properly chosen data points are deleted from them. The second contribution is an algorithm which, using ideas from randomized algorithms for Linear Programming(LP), solves the SVM problem by using samples of size linear in ∆. This work also shows that the theory can be applied to non-linear kernels. 2 A NEW RANDOMIZED ALGORITHM FOR CLASSIFICATION This section uses results from random projections, and randomized algorithms for linear programming, to develop a new algorithm for learning large scale SVM problems. In Section 2.1, we discuss the case of linearly separable data and estimate the number of support vectors required such that the margin is preserved with high probability, and show that this number is much smaller than the data dimension d, using ideas from random projections. In Section 2.2, we look how the analysis applies to almost separable data and present the main result of the paper(Theorem 2.2). The section ends with a discussion on the application of the theory to non-linear kernels. In Section 2.3, we present shows the randomized algorithm from SVM learning. 2.1 Linearly separable data We start with determining the dimension k of the target space such that on performing a random projection to the space, the Euclidean distances and dot products are preserved. The appendix contains a few results from random projections which will be used in this section. 1Details of this calculation are present in the supplementary material 2Presented in supplementary material 2 For a linearly separable dataset D = {(xi, yi), i = 1, . . . , n}, xi ∈Rd, yi ∈{+1, −1}, the C-SVM formulation is the same as C-SVM-1 with ξi = 0, i = 1 . . . n. By dividing all the constraints by ||w||, the problem can be reformulated as follows: C-SVM-2a: Maximize( ˆ w,b,l)l; Subject to : yi( ˆw · xi + ˆb) ≥l, i = 1 . . . n, || ˆw|| = 1 where ˆw = w ||w||, ˆb = b ||w||, and l = 1 ||w||. l is the margin induced by the separating hyperplane, that is, it is the distance between the 2 supporting hyperplanes, h1 : yi(w · xi + b) = 1 and h2 : yi(w · xi + b) = −1. The determination of k proceeds as follows. First, for any given value of k, we show the change in the margin as a function of k, if the data points are projected onto the k dimensional subspace and the problem solved. From this, we determine the value k(k << d) which will preserve margin with a very high probability. In a k dimensional subspace, there are at the most k + 1 support vectors. Using the idea of orthogonal extensions(definition appears later in this section), we prove that when the problem is solved in the original space, using an estimate of k + 1 on the number of support vectors, the margin is preserved with a very high probability. Let w′ and x′ i, i = 1, . . . , n be the projection of ˆw and xi, i = 1, . . . , n respectively onto a k dimensional subspace (as in Lemma 2, Appendix A). The classification problem in the projected space with the dataset being D′ = {(x′ i, yi), i = 1, . . . , n}, x′ i ∈Rk, yi ∈{+1, −1} can be written as follows: C-SVM-2b: Maximize(w′,ˆb,l′)l′; Subject to : yi(w′ · x′ i + ˆb) ≥l′, i = 1 . . . n, ||w′|| ≤1 where l′ = l(1 −γ), γ is the distortion and 0 < γ < 1. The following lemma predicts, for a given value of γ, the k such that the margin is preserved with a high probability upon projection. be solved with the optimal margin obtained close to the optimal margin for the original problem is given by the following lemma. Theorem 1. Let L = max||xi|| and (w∗, b∗, l∗) be the optimal solution for C-SVM-2a. Let R be a random d × k matrix as given in Lemma 2(Appendix A). Let ew = RT w∗ √ k and x′ i = RT xi √ k , i = 1, . . . , n and k ≥ 8 γ2 (1 + (1+L2) 2l∗ )2 log 4n δ , 0 < γ < 1, 0 < δ < 1, then the following bound holds on the optimal margin lP obtained by solving the problem C-SVM-2b: P(lP ≥l∗(1 −γ)) ≥1 −δ Proof. From Corollary 1 of Lemma 2(Appendix A), we have w∗· xi −ϵ 2(1 + L2) ≤ew · x′ i ≤w∗· xi + ϵ 2(1 + L2) which holds with probability at least 1 −4e−ϵ2 k 8 , for some ϵ > 0. Consider some example xi with yi = 1. Then the following holds with probability at least 1 −2e−ϵ2 k 8 ew · x′ i + b∗≥w∗· xi −ϵ 2(1 + L2) + b∗≥l∗−ϵ 2(1 + L2) Dividing the above by || ew||, we have e w·x′ i+b∗ || e w|| ≥ l∗−ϵ 2 (1+L2) || e w|| . Note that from Lemma 1(Appendix A), we have (1 −ϵ)||w∗|| ≤ || ew|| ≤ (1 + ϵ)||w∗||, with probability at least 1 −2e−ϵ2 k 8 . Since ||w∗|| = 1, we have √1 −ϵ ≤ || ew|| ≤ √1 + ϵ. Hence we have ew · x′ i + b∗ || ew|| ≥ l∗−ϵ 2(1 + L2) √1 + ϵ ≥ (l∗−ϵ 2(1 + L2))( √ 1 −ϵ) = l∗(1 −ϵ 2l∗(1 + L2)( √ 1 −ϵ)) ≥ l∗( √ 1 −ϵ −ϵ 2l∗(1 + L2)) = l∗(1 −ϵ(1 + 1 + L2 2l∗ )) 3 This holds with probability at least 1 −4e−ϵ2 k 8 . A similar result can be derived for a point xj for which yj = −1. The above analysis guarantees that by projecting onto a k dimensional space, there exists at least one hyperplane ( e w || e w||, b∗ || e w||), which guarantees a margin of l∗(1 −γ) where γ ≤ϵ(1 + 1 + L2 2l∗ ) (1) with probability at least 1 −n4e−ϵ2 k 8 . The margin obtained by solving the problem C-SVM-2b, lP can only be better than this. So the value of k is given by: n4e − γ2 (1+ 1+L2 2l∗ )2 k 8 ≤δ ⇒k ≥8(1 + (1+L2) 2l∗ )2 γ2 log 4n δ (2) As seen above, by randomly projecting the points onto a k dimensional subspace, the margin is preserved with a high probability. This result is similar to the results obtained in work on random projections[7]. But there are fundamental differences between the method proposed in this paper and the previous methods: No random projection is actually done here, and no black box access to the data distribution is required. We use Theorem 1 to determine an estimate on the number of support vectors such that margin is preserved with a high probability, when the problem is solved in the original space. This is given in Theorem 2 and is the main contribution of this section. The theorem is based on the following fact: in a k dimensional space, the number of support vectors is upper bounded by k + 1. We show that this k + 1 can be used as an estimate of the number of support vectors in the original space such that the solution obtained preserves the margin with a high probability. We start with the following definition. Definition An orthogonal extension of a k −1-dimensional flat( a k −1 dimensional flat is a k −1-dimensional affine space) hp = (wp, b), where wp = (w1, . . . , wk), in a subspace Sk of dimension k to a d −1-dimensional hyperplane h = ( ew, b) in d-dimensional space, is defined as follows. Let R ∈Rd×d be a random projection matrix as in Lemma 2((Appendix A)). Let ˆR ∈Rd×k be a another random projection matrix which consists of only the the first k columns of R. Let ˆxi = RT xi and x′ i = ˆ RT √ k xi as follows: Let wp = (w1, . . . , wk) be the optimal hyperplane classifier with margin lP for the points x′ 1, . . . , x′ n in the k dimensional subspace. Now define ew to be all 0’s in the last d −k coordinates and identical to wp in the first k coordinates, that is, ew = (w1, . . . , wk, 0, . . . , 0). Orthogonal extensions have the following key property. If (wp, b) is a separator with margin lp for the projected points, then its orthogonal extension ( ew, b) is a separator with margin lp for the original points,that is, if, yi(wp · x′ i + b) ≥l, i = 1, . . . , n then yi( ew · ˆxi + b) ≥l, i = 1, . . . , n An important point to note, which will be required when extending orthogonal extensions to nonlinear kernels, is that dot products between the points are preserved upon doing orthogonal projections, that is, x′T i x′ j = ˆxi T ˆxj. Let L, l∗, γ, δ and n be as defined in Theorem 1. The following is the main result of this section. Theorem 2. Given k ≥ 8 γ2 (1 + (1+L2) 2l∗ )2 log 4n δ and n training points with maximum norm L in d dimensional space and separable by a hyperplane with margin l∗, there exists a subset of k′ training points x1′ . . . xk′ where k′ ≤k and a hyperplane h satisfying the following conditions: 1. h has margin at least l∗(1 −γ) with probability at least 1 −δ 2. x1′ . . . xk′ are the only training points which lie either on h1 or on h2 Proof. Let w∗, b∗denote the normal to a separating hyperplane with margin l∗, that is, yi(w∗· xi + b∗) ≥l∗for all xi and ||w∗|| = 1. Consider a random projection of x1, . . . , xn to a k dimensional space and let w′, z1, . . . , zn be the projections of w∗, x1, . . . , xn, respectively, scaled by 1/ √ k. By Theorem 1, yi(w′ · zi + b∗) ≥l∗(1 −γ) holds for all zi with probability at least 1 −δ. Let h be the orthogonal extension of w′, b∗to the full d dimensional space. Then h has margin at least l∗(1 −γ), as required. This shows the first part of the claim. To prove the second part, consider the projected training points which lie on w′, b∗(that is, they lie on either of the two sandwiching hyperplanes). Barring degeneracies, there are at the most k such points. Clearly, these will be the only points which lie on the orthogonal extension h, by definition.□ 4 From the above analysis, it is seen that if k << d, then we can estimate that the number of support vectors is k + 1, and the algorithm RandSVM would take on average O(k log n) iterations to solve the problem [3, 4]. 2.2 Almost separable data In this section, we look at how the above analysis can be applied to almost separable datasets. We call a dataset almost separable if by removing a fraction κ = O( log n n ) of the points, the dataset becomes linearly separable. The C-SVM formulation when the data is not linearly separable(and almost separable) was given in C-SVM-1. This problem can be reformulated as follows: Minimize(w,b,ξ) n X i=1 ξi Subject to : yi(w · xi + b) ≥l −ξi, ξi ≥0, i = 1 . . . n; ||w|| ≤1 l This formulation is known as the Generalized Optimal Hyperplane formulation. Here l depends on the value of C in the C-formulation. At optimality, the margin l∗= l. The following theorem proves a result for almost separable data similar to the one proved in Claim 1 for separable data. Theorem 3. Given k ≥ 8 γ2 (1 + (1+L2) 2l∗ )2 log 4n δ + κn, l∗being the margin at optimality, l the lower bound on l∗as in the Generalized Optimal Hyperplane formulation and κ = O( log n n ), there exists a subset of k′ training points x1′ . . . xk′, k′ ≤k and a hyperplane h satisfying the following conditions: 1. h has margin at least l(1 −γ) with probability at least 1 −δ 2. At the most 8(1+ (1+L2) 2l∗ )2 γ2 log 4n δ points lie on the planes h1 or on h2 3. x1′, . . . , xk′ are the only points which define the hyperplane h, that is, they are the support vectors of h. Proof. Let the optimal solution for the generalized optimal hyperplane formulation be (w∗, b∗, ξ∗). w∗= X i:αi>0 αiyixi, and l∗= 1 ||w∗|| as mentioned before. The set of support vectors can be split into to 2 disjoint sets,SV1 = {xi : αi > 0 and ξ∗ i = 0}(unbounded SVs), and SV2 = {xi : αi > 0 and ξ∗ i > 0}(bounded SVs). Now, consider removing the points in SV2 from the dataset. Then the dataset becomes linearly separable with margin l∗. Using an analysis similar to Theorem 1, and the fact that l∗≥l, we have the proof for the first 2 conditions. When all the points in SV2 are added back, at most all these points are added to the set of support vectors and the margin does not change. The margin not changing is guaranteed by the fact that for proving the conditions 1 and 2, we have assumed the worst possible margin, and any value lower than this would violate the constraints of the problem. This proves condition 3. □ Hence the number of support vectors, such that the margin is preserved with high probability, can be upper bounded by k + 1 = 8 γ2 (1 + (1 + L2) 2l∗ )2 log 4n δ + κn + 1 = 8 γ2 (1 + (1 + L2) 2l∗ )2 log 4n δ + O(log n) (3) Using a non-linear kernel Consider a mapping function Φ : Rd →Rd′, d′ > d, which projects a point xi ∈Rd to a point zi ∈Rd′, where Rd′ is a Euclidean space. Let the points be projected onto a random k dimensional subspace as before. Then, as in the case of linear kernels, the lemmata in the appendix are applicable to these random projections[11]. The orthogonal extensions can be 5 considered as a projection from the k dimensional space to the Φ-space, such that the kernel function values are preserved. Then it can be shown that Theorem 3 applies when using non-linear kernels also. 2.3 A Randomized Algorithm The reduction in the sample size from 6d2 to 6k2 is not enough to make RandSVM useful in practice as 6k2 is still a large number. This section presents another randomized algorithm which only requires that the sample size be greater than the number of support vectors. Hence a sample size linear in k can be used in the algorithm. This algorithm was first proposed to solve large scale LP problems[10]; it has been adapted for solving large scale SVM problems. Algorithm 1 RandSVM-1(D,k,r) Require: D - The dataset. Require: k - The estimate of the number of support vectors. Require: r - Sample size = ck, c > 0. 1: S = randomsubset(D, r); // Pick a random subset, S, of size r from the dataset D 2: SV = svmlearn(Φ, S); // SV - set of support vectors obtained by solving the problem S 3: V = {x ∈D−S|violates(x, SV )} //violator - nonsampled point not satisfying KKT conditions 4: while |V | > 0 and |SV | < k do 5: R = randomsubset(V , r −|SV |); //Pick a random subset from the set of violators 6: SV = svmlearn(SV, R); //SV - set of support vectors obtained by solving the problem SV ∪R 7: V = {x ∈D −(SV ∪R)|violates(x, SV )}; //Determine violators from nonsampled set 8: end while 9: return SV Proof of Convergence: Let SV be the current set of support vectors. Condition |SV | < k comes from Theorem 3. Hence if the condition is violated, then the algorithm terminates solution which is near optimal with a very high probability. Now consider the case where |SV | < k and |V | > 0. Let xi be a violator(xi is a non-sampled point such that yi(wT xi + b) < 1). Solving the problem with the set of constraints as SV ∪xi will only result, since SVM is an instance of AOP, in the increase(decrease) of the objective function of the primal(dual). As there are only finite number of basis for an AOP, the algorithm is bound to terminate; also if termination happens with the number of violators equal to zero, then the solution obtained is optimal. Determination of k The value of k depends on the l which is not available in case of C-SVM and nu-SVM. This can be handled only be solving for k as a function of ϵ where ϵ is the maximum allowed distortion in the L2 norms of the vectors upon projection. If all the data points are normalized to length 1, that is, L = 1, then Equation 1 becomes ϵ ≥γ/(1 + 1+L2 2l∗). Combining this with the result from Theorem 2, the value of k can be determined in terms of ϵ as follows: k ≥8 γ2 (1 + (1 + L2) 2l∗ )2 log 4n δ + O(log n) ≥16 γ2 (1 + (1 + L2) 2l∗ )2 log 4n δ ) ≥16 ϵ2 log 4n δ (4) 3 Experiments This section discusses the performance of RandSVM in practice. The experiments were performed on 3 synthetic and 1 real world dataset. RandSVM was used with LibSVM as the solver when using a non-linear kernel; with SVMLight for a linear kernel. This choice was made because it was observed that SVMLight is much faster than LibSVM when using a linear kernel, and vice-versa when using non-linear kernels. RandSVM has been compared with state of the art SVM solvers: LibSVM for non-linear kernels, and SVMPerf and SVMLin for linear kernels. Synthetic datasets The twonorm dataset is a 2 class problem where each class is drawn from a multivariate normal distribution with unit variance. Each vector is a 20 dimensional vector. One class has mean (a, a, . . . , a), and the other class has mean (−a, −a, . . . , −a), where a = 2/ p (20). The ringnorm dataset is a 2 class problem with each vector consisting of 20 dimensions. Each class 6 Category Kernel RandSVM LibSVM SVMPerf SVMLin twonorm1 Gaussian 300 (94.98%) 8542 (96.48%) X X twonorm2 Gaussian 437 (94.71%) X X ringnorm1 Gaussian 2637 (70.66%) 256 (70.31%) X X ringnorm2 Gaussian 4982 (65.74%) 85124 (65.34%) X X checkerboard1 Gaussian 406 (93.70%) 1568.93 (96.90%) X X checkerboard2 Gaussian 814 (94.10%) X X CCAT∗ Linear 345 (94.37%) X 148 (94.38%) 429(95.1913%) C11∗ Linear 449 (96.57%) X 120 (97.53%) 295 (97.71%) Table 1: The table gives the execution time(in seconds) and the classification accuracy(in brackets). The subscripts 1 and 2 indicate that the corresponding training set sizes are 105 and 106 respectively. A ’-’ indicates that the solver did not finish execution even after a running for a day. A ’X’ indicates that the experiment is not applicable for the corresponding solver. The ’∗’ indicates that the solver used with RandSVM was SVMLight; otherwise it was LibSVM. is drawn from a multivariate normal distribution. One class has mean 1, and covariance 4 times the identity. The other class has mean (a, a, . . . , a), and unit covariance where a = 2/ p (20). The checkerboard dataset consists of vectors in a 2 dimensional space. The points are generated in a 4 × 4 grid. Both the classes are generated from a multivariate uniform distribution; each point is (x1 = U(0, 4), x2 = U(0, 4)). The points are labelled as follows - if(⌈x1⌉%2 ̸= ⌈x2⌉%2), then the point is labelled negative, else the point is labelled positive. For each of the synthetic datasets, a training set of 10,00,000 points and a test set of 10,000 points was generated. A smaller subset of 1,00,000 points was chosen from training set for parameter tuning. From now on, the smaller training set will have a subscript of 1 and the larger training set will have a subscript of 2, for example, ringnorm1 and ringnorm2. Real world dataset The RCV1 dataset consists of 804,414 documents, with each document consisting of 47,236 features. Experiments were performed using 2 categories of the dataset - CCAT and C11. The dataset was split into a training set of 7,00,000 documents and a test set of 104,414 documents. Table 1 shows the kernels which were used for each of the datasets. The parameters used for the gaussian kernels, σ and C, were obtained using grid search based tuning. The parameter for the linear kernel, C, for CCAT and C11 were obtained from previous work done[12]. Selection of k for RandSVM: The values of ϵ and δ were fixed to 0.2 and 0.9 respectively, for all the datasets. For linearly separable datasets, k was set to (16 log(4n/δ))/ϵ2. For the others, k was set to (32 log(4n/δ))/ϵ2. Discussion of results: Table 1, which has the timing and classification accuracy comparisons, shows that RandSVM can scale up SVM solvers for very large datasets. Using just a small wrapper around the solvers, RandSVM has scaled up SVMLight so that its performance is comparable to that of state of the art solvers such as SVMPerf and SVMLin. Similarly LibSVM has been made capable of quickly solving problems which it could not do before, even after executing for a day. Furthermore, it is clear, from the experiments on the synthetic datasets, that the execution times taken for training with 105 examples and 106 examples are not too far apart; this is a clear indication that the execution time does not increase rapidly with the increase in the dataset size. All the runs of RandSVM terminated with the condition |SV | < k being violated. Since the classification accuracies obtained by using RandSVM and the baseline solvers are very close, it is clear that Theorem 2 holds in practice. 4 Further Research It is clear from the experimental evaluations that randomized algorithms can be used to scale up SVM solvers to large scale classification problems. If an estimate of the number of support vectors is obtained then algorithm RandSVM-1 can be used for other SVM learning problems also, as they are usually instances of an AOP. The future work would be to apply the work done here to such problems. 7 A Some Results from Random Projections Here we review a few lemmas from random projections [7]. The following lemma discusses how the L2 norm of a vector is preserved when it is projected on a random subspace. Lemma 1. Let R = (rij) be a random d × k matrix, such that each entry (rij) is chosen independently according to N(0, 1). For any fixed vector u ∈Rd, and any ϵ > 0, let u′ = RT u √ k . Then E[||u′||2] = ||u||2 and the following bound holds: P((1 −ϵ)||u||2 ≤||u′||2 ≤(1 + ϵ)||u||2) ≥1 −2e−(ϵ2−ϵ3) k 4 The following theorem and its corollary show the change in the Euclidean distance between 2 points and the dot products when they are projected onto a lower dimensional space [7]. Lemma 2. Let u, v ∈Rd. Let u′ = RT u √ k and v′ = RT u √ k be the projections of u and v to Rk via a random matrix R whose entries are chosen independently from N(0, 1) or U(−1, 1). Then for any ϵ > 0, the following bounds hold P((1 −ϵ)∥u −v∥2 ≤∥u′ −v′∥2) ≥ 1 −e−(ϵ2−ϵ3) k 4 , and P(∥u′ −v′∥2 ≤(1 + ϵ)∥u −v∥2) ≥ 1 −e−(ϵ2−ϵ3) k 4 A corollary of the above theorem shows how well the dot products are preserved upon projection(This is a slight modification of the corollary given in [7]). Corollary 1. Let u, v be vectors in Rd s.t. ∥u∥≤L1, ∥v∥≤L2. Let R be a random matrix whose entries are chosen independently from either N(0, 1) or U(−1, 1). Define u′ = RT u √ k and v′ = RT v √ k . Then for any ϵ > 0, the following holds with probability at least 1 −4e−ϵ2 k 8 u · v −ϵ 2(L2 1 + L2 2) ≤u′ · v′ ≤u · v + ϵ 2(L2 1 + L2 2) References [1] V. Vapnik. The Nature of Statistical Learning Theory. Springer, New York, 1995. [2] Bernd Gartner. A subexponential algorithm for abstract optimization problems. In Proceedings 33rd Symposium on Foundations of Computer Science, IEEE CS Press, 1992. [3] Jose L. Balcazar, Yang Dai, and Osamu Watanabe. A random sampling technique for training support vector machines. In ALT. Springer, 2001. [4] Jose L. Balcazar, Yang Dai, and Osamu Watanabe. Provably fast training algorithms for support vector machines. In ICDM, pages 43–50, 2001. [5] K. P. Bennett and E. J. Bredensteiner. Duality and geometry in SVM classifiers. In P. Langley, editor, ICML, pages 57–64, San Francisco, California, 2000. [6] W. Johnson and J. Lindenstauss. Extensions of lipschitz maps into a hilbert space. Contemporary Mathematics, 1984. [7] R. I. Arriaga and S. Vempala. An algorithmic theory of learning: Random concepts and random projections. In Proceedings of the 40th Foundations of Computer Science, 1999. [8] Kenneth L. Clarkson. Las vegas algorithms for linear and integer programming when the dimension is small. Journal of the ACM, 42(2):488–499, 1995. [9] B. Gartner and E. Welzl. A simple sampling lemma: analysis and application in geometric optimization. In Proceedings of the 16th annual ACM symposium on Computational Geometry, 2000. [10] M. Pellegrini. Randomizing combinatorial algorithms for linear programming when the dimension is moderately high. In SODA ’01, pages 101–108, Philadelphia, PA, USA, 2001. [11] Maria-Florina Balcan, Avrim Blum, and Santosh Vempala. On kernels, margins and lowdimensional mappings. In Proc. of the 15th Conf. Algorithmic Learning Theory, 2004. [12] T. Joachims. Training linear svms in linear time. In Proceedings of the ACM Conference on Knowledge Discovery and Data Mining (KDD), 2006. 8
2007
157
3,189
Direct Importance Estimation with Model Selection and Its Application to Covariate Shift Adaptation Masashi Sugiyama Tokyo Institute of Technology sugi@cs.titech.ac.jp Shinichi Nakajima Nikon Corporation nakajima.s@nikon.co.jp Hisashi Kashima IBM Research hkashima@jp.ibm.com Paul von B¨unau Technical University Berlin buenau@cs.tu-berlin.de Motoaki Kawanabe Fraunhofer FIRST nabe@first.fhg.de Abstract A situation where training and test samples follow different input distributions is called covariate shift. Under covariate shift, standard learning methods such as maximum likelihood estimation are no longer consistent—weighted variants according to the ratio of test and training input densities are consistent. Therefore, accurately estimating the density ratio, called the importance, is one of the key issues in covariate shift adaptation. A naive approach to this task is to first estimate training and test input densities separately and then estimate the importance by taking the ratio of the estimated densities. However, this naive approach tends to perform poorly since density estimation is a hard task particularly in high dimensional cases. In this paper, we propose a direct importance estimation method that does not involve density estimation. Our method is equipped with a natural cross validation procedure and hence tuning parameters such as the kernel width can be objectively optimized. Simulations illustrate the usefulness of our approach. 1 Introduction A common assumption in supervised learning is that training and test samples follow the same distribution. However, this basic assumption is often violated in practice and then standard machine learning methods do not work as desired. A situation where the input distribution P(x) is different in the training and test phases but the conditional distribution of output values, P(y|x), remains unchanged is called covariate shift [8]. In many real-world applications such as robot control [10], bioinformatics [1], spam filtering [3], brain-computer interfacing [9], or econometrics [5], covariate shift is conceivable and thus learning under covariate shift is gathering a lot of attention these days. The influence of covariate shift could be alleviated by weighting the log likelihood terms according to the importance [8]: w(x) = pte(x)/ptr(x), where pte(x) and ptr(x) are test and training input densities. Since the importance is usually unknown, the key issue of covariate shift adaptation is how to accurately estimate the importance. A naive approach to importance estimation would be to first estimate the training and test densities separately from training and test input samples, and then estimate the importance by taking the ratio of the estimated densities. However, density estimation is known to be a hard problem particularly in high-dimensional cases. Therefore, this naive approach may not be effective—directly estimating the importance without estimating the densities would be more promising. Following this spirit, the kernel mean matching (KMM) method has been proposed recently [6], which directly gives importance estimates without going through density estimation. KMM is shown 1 to work well, given that tuning parameters such as the kernel width are chosen appropriately. Intuitively, model selection of importance estimation algorithms (such as KMM) is straightforward by cross validation (CV) over the performance of subsequent learning algorithms. However, this is highly unreliable since the ordinary CV score is heavily biased under covariate shift—for unbiased estimation of the prediction performance of subsequent learning algorithms, the CV procedure itself needs to be importance-weighted [9]. Since the importance weight has to have been fixed when model selection is carried out by importance weighted CV, it can not be used for model selection of importance estimation algorithms. The above fact implies that model selection of importance estimation algorithms should be performed within the importance estimation step in an unsupervised manner. However, since KMM can only estimate the values of the importance at training input points, it can not be directly applied in the CV framework; an out-of-sample extension is needed, but this seems to be an open research issue currently. In this paper, we propose a new importance estimation method which can overcome the above problems, i.e., the proposed method directly estimates the importance without density estimation and is equipped with a natural model selection procedure. Our basic idea is to find an importance estimate bw(x) such that the Kullback-Leibler divergence from the true test input density pte(x) to its estimate bpte(x) = bw(x)ptr(x) is minimized. We propose an algorithm that can carry out this minimization without explicitly modeling ptr(x) and pte(x). We call the proposed method the Kullback-Leibler Importance Estimation Procedure (KLIEP). The optimization problem involved in KLIEP is convex, so the unique global solution can be obtained. Furthermore, the solution tends to be sparse, which contributes to reducing the computational cost in the test phase. Since KLIEP is based on the minimization of the Kullback-Leibler divergence, its model selection can be naturally carried out through a variant of likelihood CV, which is a standard model selection technique in density estimation. A key advantage of our CV procedure is that, not the training samples, but the test input samples are cross-validated. This highly contributes to improving the model selection accuracy since the number of training samples is typically limited while test input samples are abundantly available. The simulation studies show that KLIEP tends to outperform existing approaches in importance estimation including the logistic regression based method [2], and it contributes to improving the prediction performance in covariate shift scenarios. 2 New Importance Estimation Method In this section, we propose a new importance estimation method. 2.1 Formulation and Notation Let D ⊂(Rd) be the input domain and suppose we are given i.i.d. training input samples {xtr i }ntr i=1 from a training input distribution with density ptr(x) and i.i.d. test input samples {xte j }nte j=1 from a test input distribution with density pte(x). We assume that ptr(x) > 0 for all x ∈D. Typically, the number ntr of training samples is rather small, while the number nte of test input samples is very large. The goal of this paper is to develop a method of estimating the importance w(x) from {xtr i }ntr i=1 and {xte j }nte j=1: w(x) = pte(x) ptr(x). Our key restriction is that we avoid estimating densities pte(x) and ptr(x) when estimating the importance w(x). 2.2 Kullback-Leibler Importance Estimation Procedure (KLIEP) Let us model the importance w(x) by the following linear model: bw(x) = b X ℓ=1 αℓϕℓ(x), (1) 2 where {αℓ}b ℓ=1 are parameters to be learned from data samples and {ϕℓ(x)}b ℓ=1 are basis functions such that ϕℓ(x) ≥0 for all x ∈D and for ℓ= 1, 2, . . . , b. Note that b and {ϕℓ(x)}b ℓ=1 could be dependent on the samples {xtr i }ntr i=1 and {xte j }nte j=1, i.e., kernel models are also allowed—we explain how the basis functions {ϕℓ(x)}b ℓ=1 are chosen in Section 2.3. Using the model bw(x), we can estimate the test input density pte(x) by bpte(x) = bw(x)ptr(x). We determine the parameters {αℓ}b ℓ=1 in the model (1) so that the Kullback-Leibler divergence from pte(x) to bpte(x) is minimized: KL[pte(x)∥bpte(x)] = Z D pte(x) log pte(x) bw(x)ptr(x)dx = Z D pte(x) log pte(x) ptr(x)dx − Z D pte(x) log bw(x)dx. Since the first term in the last equation is independent of {αℓ}b ℓ=1, we ignore it and focus on the second term. We denote it by J: J = Z D pte(x) log bw(x)dx (2) ≈ 1 nte nte X j=1 log bw(xte j ) = 1 nte nte X j=1 log b X ℓ=1 αℓϕℓ(xte j ) ! , where the empirical approximation based on the test input samples {xte j }nte j=1 is used from the first line to the second line above. This is our objective function to be maximized with respect to the parameters {αℓ}b ℓ=1, which is concave [4]. Note that the above objective function only involves the test input samples {xte j }nte j=1, i.e., we did not use the training input samples {xtr i }ntr i=1 yet. As shown below, {xtr i }ntr i=1 will be used in the constraint. bw(x) is an estimate of the importance w(x) which is non-negative by definition. Therefore, it is natural to impose bw(x) ≥0 for all x ∈D, which can be achieved by restricting αℓ≥0 for ℓ= 1, 2, . . . , b. In addition to the non-negativity, bw(x) should be properly normalized since bpte(x) (= bw(x)ptr(x)) is a probability density function: 1 = Z D bpte(x)dx = Z D bw(x)ptr(x)dx (3) ≈1 ntr ntr X i=1 bw(xtr i ) = 1 ntr ntr X i=1 b X ℓ=1 αℓϕℓ(xtr i ), where the empirical approximation based on the training input samples {xtr i }ntr i=1 is used from the first line to the second line above. Now our optimization criterion is summarized as follows. maximize {αℓ}b ℓ=1   nte X j=1 log b X ℓ=1 αℓϕℓ(xte j ) !  subject to ntr X i=1 b X ℓ=1 αℓϕℓ(xtr i ) = ntr and α1, α2, . . . , αb ≥0. This is a convex optimization problem and the global solution can be obtained, e.g., by simply performing gradient ascent and feasibility satisfaction iteratively. A pseudo code is described in Figure 1-(a). Note that the solution {bαℓ}b ℓ=1 tends to be sparse [4], which contributes to reducing the computational cost in the test phase. We refer to the above method as Kullback-Leibler Importance Estimation Procedure (KLIEP). 3 Input: m = {ϕℓ(x)}b ℓ=1, {xtr i }ntr i=1, and {xte j }nte j=1 Output: bw(x) Aj,ℓ←−ϕℓ(xte j ); bℓ←− 1 ntr Pntr i=1 ϕℓ(xtr i ); Initialize α (> 0) and ε (0 < ε ≪1); Repeat until convergence α ←−α + εA⊤(1./Aα); α ←−α + (1 −b⊤α)b/(b⊤b); α ←−max(0, α); α ←−α/(b⊤α); end bw(x) ←−Pb ℓ=1 αℓϕℓ(x); (a) KLIEP main code Input: M = {mk | mk = {ϕ(k) ℓ (x)}b(k) ℓ=1}, {xtr i }ntr i=1, and {xte j }nte j=1 Output: bw(x) Split {xte j }nte j=1 into R disjoint subsets {X te r }R r=1; for each model m ∈M for each split r = 1, . . . , R bwr(x) ←−KLIEP(m, {xtr i }ntr i=1, {X te j }j̸=r); bJr(m) ←− 1 |X te r | P x∈X te r log bwr(x); end bJ(m) ←−1 R PR r=1 bJr(m); end bm ←−argmaxm∈M bJ(m); bw(x) ←−KLIEP( bm, {xtr i }ntr i=1, {xte j }nte j=1); (b) KLIEP with model selection Figure 1: KLIEP algorithm in pseudo code. ‘./’ indicates the element-wise division and ⊤denotes the transpose. Inequalities and the ‘max’ operation for a vector are applied element-wise. 2.3 Model Selection by Likelihood Cross Validation The performance of KLIEP depends on the choice of basis functions {ϕℓ(x)}b ℓ=1. Here we explain how they can be appropriately chosen from data samples. Since KLIEP is based on the maximization of the score J (see Eq.(2)), it would be natural to select the model such that J is maximized. The expectation over pte(x) involved in J can be numerically approximated by likelihood cross validation (LCV) as follows: First, divide the test samples {xte j }nte j=1 into R disjoint subsets {X te r }R r=1. Then obtain an importance estimate bwr(x) from {X te j }j̸=r and approximate the score J using X te r as bJr = 1 |X te r | X x∈X te r log bwr(x). We repeat this procedure for r = 1, 2, . . . , R, compute the average of bJr over all r, and use the average bJ as an estimate of J: bJ = 1 R R X r=1 bJr. (4) For model selection, we compute bJ for all model candidates (the basis functions {ϕℓ(x)}b ℓ=1 in the current setting) and choose the one that minimizes bJ. A pseudo code of the LCV procedure is summarized in Figure 1-(b) One of the potential limitations of CV in general is that it is not reliable in small sample cases since data splitting by CV further reduces the sample size. On the other hand, in our CV procedure, the data splitting is performed over the test input samples, not over the training samples. Since we typically have a large number of test input samples, our CV procedure does not suffer from the small sample problem. A good model may be chosen by the above CV procedure, given that a set of promising model candidates is prepared. As model candidates, we propose using a Gaussian kernel model centered at the test input points {xte j }nte j=1, i.e., bw(x) = nte X ℓ=1 αℓKσ(x, xte ℓ), where Kσ(x, x′) is the Gaussian kernel with kernel width σ: Kσ(x, x′) = exp  −∥x −x′∥2 2σ2  . (5) 4 The reason why we chose the test input points {xte j }nte j=1 as the Gaussian centers, not the training input points {xtr i }ntr i=1, is as follows. By definition, the importance w(x) tends to take large values if the training input density ptr(x) is small and the test input density pte(x) is large; conversely, w(x) tends to be small (i.e., close to zero) if ptr(x) is large and pte(x) is small. When a function is approximated by a Gaussian kernel model, many kernels may be needed in the region where the output of the target function is large; on the other hand, only a small number of kernels would be enough in the region where the output of the target function is close to zero. Following this heuristic, we decided to allocate many kernels at high test input density regions, which can be achieved by setting the Gaussian centers at the test input points {xte j }nte j=1. Alternatively, we may locate (ntr+nte) Gaussian kernels at both {xtr i }ntr i=1 and {xte j }nte j=1. However, in our preliminary experiments, this did not further improve the performance, but slightly increased the computational cost. Since nte is typically very large, just using all the test input points {xte j }nte j=1 as Gaussian centers is already computationally rather demanding. To ease this problem, we practically propose using a subset of {xte j }nte j=1 as Gaussian centers for computational efficiency, i.e., bw(x) = b X ℓ=1 αℓKσ(x, cℓ), (6) where cℓis a template point randomly chosen from {xte j }nte j=1 and b (≤nte) is a prefixed number. In the rest of this paper, we fix the number of template points at b = min(100, nte), and optimize the kernel width σ by the above CV procedure. 3 Experiments In this section, we compare the experimental performance of KLIEP and existing approaches. 3.1 Importance Estimation for Artificial Data Sets Let ptr(x) be the d-dimensional Gaussian density with mean (0, 0, . . . , 0)⊤and covariance identity and pte(x) be the d-dimensional Gaussian density with mean (1, 0, . . . , 0)⊤and covariance identity. The task is to estimate the importance at training input points: wi = w(xtr i ) = pte(xtr i ) ptr(xtr i ) for i = 1, 2, . . . , ntr. We compare the following methods: KLIEP(σ): {wi}ntr i=1 are estimated by KLIEP with the Gaussian kernel model (6). Since the performance of KLIEP is dependent on the kernel width σ, we test several different values of σ. KLIEP(CV): The kernel width σ in KLIEP is chosen based on 5-fold LCV (see Section 2.3). KDE(CV): {wi}ntr i=1 are estimated through the kernel density estimator (KDE) with the Gaussian kernel. The kernel widths for the training and test densities are chosen separately based on 5-fold likelihood cross-validation. KMM(σ): {wi}ntr i=1 are estimated by kernel mean matching (KMM) [6]. The performance of KMM is dependent on tuning parameters such as B, ϵ, and σ. We set B = 1000 and ϵ = (√ntr − 1)/√ntr following the paper [6], and test several different values of σ. We used the CPLEX software for solving quadratic programs in the experiments. LogReg(σ): Importance weights are estimated by logistic regression (LogReg) [2]. The Gaussian kernels are used as basis functions. Since the performance of LogReg is dependent on the kernel width σ, we test several different values of σ. We used the LIBLINEAR implementation of logistic regression for the experiments [7]. LogReg(CV): The kernel width σ in LogReg is chosen based on 5-fold CV. 5 2 4 6 8 10 12 14 16 18 20 10 −6 10 −5 10 −4 10 −3 Average NMSE over 100 Trials (in Log Scale) d (Input Dimension) KLIEP(0.5) KLIEP(2) KLIEP(7) KLIEP(CV) KDE(CV) KMM(0.1) KMM(1) KMM(10) LogReg(0.5) LogReg(2) LogReg(7) LogReg(CV) (a) When input dimension is changed 50 100 150 10 −6 10 −5 10 −4 10 −3 Average NMSE over 100 Trials (in Log Scale) ntr (Number of Training Samples) KLIEP(0.5) KLIEP(2) KLIEP(7) KLIEP(CV) KDE(CV) KMM(0.1) KMM(1) KMM(10) LogReg(0.5) LogReg(2) LogReg(7) LogReg(CV) (b) When training sample size is changed Figure 2: NMSEs averaged over 100 trials in log scale. We fixed the number of test input points at nte = 1000 and consider the following two settings for the number ntr of training samples and the input dimension d: (a) ntr = 100 and d = 1, 2, . . . , 20, (b) d = 10 and ntr = 50, 60, . . . , 150. We run the experiments 100 times for each d, each ntr, and each method, and evaluate the quality of the importance estimates { bwi}ntr i=1 by the normalized mean squared error (NMSE): NMSE = 1 ntr ntr X i=1  bwi Pntr i′=1 bwi′ − wi Pntr i′=1 wi′ 2 . NMSEs averaged over 100 trials are plotted in log scale in Figure 2. Figure 2(a) shows that the error of KDE(CV) sharply increases as the input dimension grows, while KLIEP, KMM, and LogReg with appropriate kernel widths tend to give smaller errors than KDE(CV). This would be the fruit of directly estimating the importance without going through density estimation. The graph also show that the performance of KLIEP, KMM, and LogReg is dependent on the kernel width σ—the results of KLIEP(CV) and LogReg(CV) show that model selection is carried out reasonably well and KLIEP(CV) works significantly better than LogReg(CV). Figure 2(b) shows that the errors of all methods tend to decrease as the number of training samples grows. Again, KLIEP, KMM, and LogReg with appropriate kernel widths tend to give smaller errors than KDE(CV). Model selection in KLIEP(CV) and LogReg(CV) works reasonably well and KLIEP(CV) tends to give significantly smaller errors than LogReg(CV). Overall, KLIEP(CV) is shown to be a useful method in importance estimation. 3.2 Covariate Shift Adaptation with Regression and Classification Benchmark Data Sets Here we employ importance estimation methods for covariate shift adaptation in regression and classification benchmark problems (see Table 1). Each data set consists of input/output samples {(xk, yk)}n k=1. We normalize all the input samples {xk}n k=1 into [0, 1]d and choose the test samples {(xte j , yte j )}nte j=1 from the pool {(xk, yk)}n k=1 as follows. We randomly choose one sample (xk, yk) from the pool and accept this with probability min(1, 4(x(c) k )2), where x(c) k is the c-th element of xk and c is randomly determined and fixed in each trial of experiments; then we remove xk from the pool regardless of its rejection or acceptance, and repeat this procedure until we accept nte samples. We choose the training samples {(xtr i , ytr i )}ntr i=1 uniformly from the rest. Intuitively, in this experiment, the test input density tends 6 to be lower than the training input density when x(c) k is small. We set the number of samples at ntr = 100 and nte = 500 for all data sets. Note that we only use {(xtr i , ytr i )}ntr i=1 and {xte j }nte j=1 for training regressors or classifiers; the test output values {yte j }nte j=1 are used only for evaluating the generalization performance. We use the following kernel model for regression or classification: bf(x; θ) = t X ℓ=1 θℓKh(x, mℓ), where Kh(x, x′) is the Gaussian kernel (5) and mℓis a template point randomly chosen from {xte j }nte j=1. We set the number of kernels at t = 50. We learn the parameter θ by importanceweighted regularized least squares (IWRLS) [9]: bθIW RLS ≡argmin θ " ntr X i=1 bw(xtr i )  bf(xtr i ; θ) −ytr i 2 + λ∥θ∥2 # . (7) The solution bθIW RLS is analytically given by bθ = (K⊤c W K + λI)−1K⊤c W y, where I is the identity matrix and y = (y1, y2, . . . , yntr)⊤, Ki,ℓ= Kh(xtr i , mℓ), c W = diag ( bw1, bw2, . . . , bwntr) . The kernel width h and the regularization parameter λ in IWRLS (7) are chosen by 5-fold importance weighted CV (IWCV) [9]. We compute the IWCV score by 1 |Ztr r | X (x,y)∈Ztr r bw(x)L  bfr(x), y  , where L (by, y) = (by −y)2 (Regression), 1 2(1 −sign{byy}) (Classification). We run the experiments 100 times for each data set and evaluate the mean test error: 1 nte nte X j=1 L  bf(xte j ), yte j  . The results are summarized in Table 1, where ‘Uniform’ denotes uniform weights, i.e., no importance weight is used. The table shows that KLIEP(CV) compares favorably with Uniform, implying that the importance weighted methods combined with KLIEP(CV) are useful for improving the prediction performance under covariate shift. KLIEP(CV) works much better than KDE(CV); actually KDE(CV) tends to be worse than Uniform, which may be due to high dimensionality. We tested 10 different values of the kernel width σ for KMM and described three representative results in the table. KLIEP(CV) is slightly better than KMM with the best kernel width. Finally, LogReg(CV) works reasonably well, but it sometimes performs poorly. Overall, we conclude that the proposed KLIEP(CV) is a promising method for covariate shift adaptation. 4 Conclusions In this paper, we addressed the problem of estimating the importance for covariate shift adaptation. The proposed method, called KLIEP, does not involve density estimation so it is more advantageous than a naive KDE-based approach particularly in high-dimensional problems. Compared with KMM 7 Table 1: Mean test error averaged over 100 trials. The numbers in the brackets are the standard deviation. All the error values are normalized so that the mean error by ‘Uniform’ (uniform weighting, or equivalently no importance weighting) is one. For each data set, the best method and comparable ones based on the Wilcoxon signed rank test at the significance level 5% are described in bold face. The upper half are regression data sets taken from DELVE and the lower half are classification data sets taken from IDA. ‘KMM(σ)’ denotes KMM with kernel width σ. Data Dim Uniform KLIEP (CV) KDE (CV) KMM (0.01) KMM (0.3) KMM (1) LogReg (CV) kin-8fh 8 1.00(0.34) 0.95(0.31) 1.22(0.52) 1.00(0.34) 1.12(0.37) 1.59(0.53) 1.30(0.40) kin-8fm 8 1.00(0.39) 0.86(0.35) 1.12(0.57) 1.00(0.39) 0.98(0.46) 1.95(1.24) 1.29(0.58) kin-8nh 8 1.00(0.26) 0.99(0.22) 1.09(0.20) 1.00(0.27) 1.04(0.17) 1.16(0.25) 1.06(0.17) kin-8nm 8 1.00(0.30) 0.97(0.25) 1.14(0.26) 1.00(0.30) 1.09(0.23) 1.20(0.22) 1.13(0.25) abalone 7 1.00(0.50) 0.94(0.67) 1.02(0.41) 1.01(0.51) 0.96(0.70) 0.93(0.39) 0.92(0.41) image 18 1.00(0.51) 0.94(0.44) 0.98(0.45) 0.97(0.50) 0.97(0.45) 1.09(0.54) 0.99(0.48) ringnorm 20 1.00(0.04) 0.99(0.06) 0.87(0.04) 1.00(0.04) 0.87(0.05) 0.87(0.05) 0.95(0.08) twonorm 20 1.00(0.58) 0.91(0.52) 1.16(0.71) 0.99(0.50) 0.86(0.55) 0.99(0.70) 0.94(0.59) waveform 21 1.00(0.45) 0.93(0.34) 1.05(0.47) 1.00(0.44) 0.93(0.32) 0.98(0.31) 0.95(0.34) Average 1.00(0.38) 0.94(0.35) 1.07(0.40) 1.00(0.36) 0.98(0.37) 1.20(0.47) 1.06(0.37) which also directly gives importance estimates, KLIEP is practically more useful since it is equipped with a model selection procedure. Our experiments highlighted these advantages and therefore KLIEP is shown to be a promising method for covariate shift adaptation. In KLIEP, we modeled the importance function by a linear (or kernel) model, which resulted in a convex optimization problem with a sparse solution. However, our framework allows the use of any models. An interesting future direction to pursue would be to search for a class of models which has additional advantages. Finally, the range of application of importance weights is not limited to covariate shift adaptation. For example, the density ratio could be used for novelty detection. Exploring possible application areas will be important future directions. Acknowledgments This work was supported by MEXT (17700142 and 18300057), the Okawa Foundation, the Microsoft CORE3 Project, and the IBM Faculty Award. References [1] P. Baldi and S. Brunak. Bioinformatics: The Machine Learning Approach. MIT Press, Cambridge, 1998. [2] S. Bickel, M. Br¨uckner, and T. Scheffer. Discriminative learning for differing training and test distributions. In Proceedings of the 24th International Conference on Machine Learning, 2007. [3] S. Bickel and T. Scheffer. Dirichlet-enhanced spam filtering based on biased samples. In B. Sch¨olkopf, J. Platt, and T. Hoffman, editors, Advances in Neural Information Processing Systems 19. MIT Press, Cambridge, MA, 2007. [4] S. Boyd and L. Vandenberghe. Convex Optimization. Cambridge University Press, Cambridge, 2004. [5] J. J. Heckman. Sample selection bias as a specification error. Econometrica, 47(1):153–162, 1979. [6] J. Huang, A. Smola, A. Gretton, K. M. Borgwardt, and B. Sch¨olkopf. Correcting sample selection bias by unlabeled data. In B. Sch¨olkopf, J. Platt, and T. Hoffman, editors, Advances in Neural Information Processing Systems 19, pages 601–608. MIT Press, Cambridge, MA, 2007. [7] C.-J. Lin, R. C. Weng, and S. S. Keerthi. Trust region Newton method for large-scale logistic regression. Technical report, Department of Computer Science, National Taiwan University, 2007. [8] H. Shimodaira. Improving predictive inference under covariate shift by weighting the log-likelihood function. Journal of Statistical Planning and Inference, 90(2):227–244, 2000. [9] 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, May 2007. [10] R. S. Sutton and G. A. Barto. Reinforcement Learning: An Introduction. MIT Press, Cambridge, MA, 1998. 8
2007
158
3,190
The Price of Bandit Information for Online Optimization Varsha Dani Department of Computer Science University of Chicago Chicago, IL 60637 varsha@cs.uchicago.edu Thomas P. Hayes Toyota Technological Institute Chicago, IL 60637 hayest@tti-c.org Sham M. Kakade Toyota Technological Institute Chicago, IL 60637 sham@tti-c.org Abstract In the online linear optimization problem, a learner must choose, in each round, a decision from a set D ⊂Rn in order to minimize an (unknown and changing) linear cost function. We present sharp rates of convergence (with respect to additive regret) for both the full information setting (where the cost function is revealed at the end of each round) and the bandit setting (where only the scalar cost incurred is revealed). In particular, this paper is concerned with the price of bandit information, by which we mean the ratio of the best achievable regret in the bandit setting to that in the full-information setting. For the full information case, the upper bound on the regret is O∗( √ nT), where n is the ambient dimension and T is the time horizon. For the bandit case, we present an algorithm which achieves O∗(n3/2√ T) regret — all previous (nontrivial) bounds here were O(poly(n)T 2/3) or worse. It is striking that the convergence rate for the bandit setting is only a factor of n worse than in the full information case — in stark contrast to the K-arm bandit setting, where the gap in the dependence on K is exponential ( √ TK vs. √T log K). We also present lower bounds showing that this gap is at least √n, which we conjecture to be the correct order. The bandit algorithm we present can be implemented efficiently in special cases of particular interest, such as path planning and Markov Decision Problems. 1 Introduction In the online linear optimization problem (as in Kalai and Vempala [2005]), at each timestep the learner chooses a decision xt from a decision space D ⊂Rn and incurs a cost Lt ·xt, where the loss vector Lt is in Rn. This paper considers the case where the sequence of loss vectors L1, . . . , LT is arbitrary — that is, no statistical assumptions are made about the data generation process. The goal of the learner is to minimize her regret, the difference between the incurred loss on the sequence and the loss of the best single decision in hindsight. After playing xt at time t, the two most natural sources of feedback that the learner receives are either complete information of the loss vector Lt (referred to as the full information case) or only the scalar feedback of the incurred loss Lt · xt (referred to as the partial feedback or “bandit” case). The online linear optimization problem has been receiving increasing attention as a paradigm for structured decision making in dynamic environments, with potential applications to network routing, 1 K-Arm Linear Optimization Full Partial Full Partial I.I.D. Expectation High Probability Lower Bound √ T ln K √ TK √ nT n √ T n √ T n √ T Upper Bound √ T ln K √ TK √ nT n √ T n3/2√ T n3/2√ T Efficient Algo N/A N/A Sometimes Yes Sometimes ? Table 1: Summary of Regret Bounds: Only the leading dependency in terms of n and T are shown (so some log factors are dropped). The results in bold are provided in this paper. The results for the K-arm case are from Freund and Schapire [1997], Auer et al. [1998]. The i.i.d. column is the stochastic setting (where the loss vectors are drawn from some fixed underlying distribution) and the result are from Dani et al. [2008]. The expectation column refers to the expected regret for an arbitrary sequence of loss vectors (considered in this paper). The high probability column follows from a forthcoming paper Bartlett et al. [2007]; these results also hold in the adaptive adversary setting, where the loss vectors could change in response to the learner’s previous decisions. The Efficient Algo row refers to whether or not there is an efficient implementation — “yes” means there is a polytime algorithm (for the stated upper bound) which only uses access to a certain optimization oracle (as in Kalai and Vempala [2005]) and “sometimes” means only in special cases (such as Path Planning) can the algorithm be implemented efficiently. See text for further details. path planning, job scheduling, etc. This paper focuses on the fundamental regrets achievable for the online linear optimization problem in both the full and partial information feedback settings, as functions of both the dimensionality n and the time horizon T. In particular, this paper is concerned with what might be termed the price of bandit information — how much worse the regret is in the partial information case as compared to the full information case. In the K-arm case (where D is the set of K choices), much work has gone into obtaining sharp regret bounds. These results are summarized in the left two columns in Table 1. For the full information case, the exponential weights algorithm, Hedge, of Freund and Schapire [1997] provides the regret listed. For the partial information case, there is a long history of sharp regret bounds in various settings (particularly in statistical settings where i.i.d assumptions are made), dating back to Robbins [1952]. In the (non-statistical) adversarial case, the algorithm of Auer et al. [1998] provides the regret listed in Table 1 for the partial information setting. This case has a convergence rate that is exponentially worse than the full information case (as a function of K). There are a number of issues that we must address in obtaining sharp convergence for the online linear optimization problem. The first issue to address is in understanding what are the natural quantities to state upper and lower bounds in terms of. It is natural to consider the case where the loss is uniformly bounded (say in [0, 1]). Clearly, the dimensionality n and the time horizon T are fundamental quantities. For the full information case, all previous bounds (see, e.g., Kalai and Vempala [2005]) also have dependencies on the diameter of the decision and cost spaces. It turns out that these are extraneous quantities — with the bounded loss assumption, one need not explicitly consider diameters of the decision and cost spaces. Hence, even in the full information case, to obtain a sharp upper bound we need a new argument to get an upper bound that is stated only in terms of n and T (and we do this via a relatively straightforward appeal to Hedge). The second (and more technically demanding) issue is to obtain a sharp bound for the partial information case. Here, for the K-arm bandit case, the regret is O∗( √ KT). Trivially, we can appeal to this result in the linear optimization case to obtain a p |D|T regret by setting K to be the size of D. However, the regret could have a very poor n dependence, as |D| could be exponential in n (or worse). In contrast, note that in the full information case, we could appeal to the K-arm case to obtain O( p T log |D|) regret, which in many cases is acceptable (such as when D is exponential in n). The primary motivation for different algorithms in the full information case (e.g. Kalai and Vempala [2005]) was for computational reasons. In contrast, in the partial information case, we seek a new algorithm in order to just obtain a sharper convergence rate (of course, we are still also interested in efficient implementations). The goal here is provide a regret that is O∗(poly(n) √ T). In fact, the partial information case (for linear optimization) has been receiving increasing interest in the literature [Awerbuch and Kleinberg, 2004, McMahan and Blum, 2004, Dani and Hayes, 2006]. Here, all regrets provided are O(poly(n)T 2/3) or worse. We should note that some of the results here [Awerbuch and Kleinberg, 2004, Dani and Hayes, 2006] are stated in terms of only n 2 and T (without referring to the diameters of various spaces). There is only one (non-trivial) special case [Gyorgy et al., 2007] in the literature where an O∗(poly(n) √ T) regret has been established, and this case assumes significantly more feedback than in the partial information case — their result is for Path Planning (where D is the set of paths on a graph and n is the number of edges) and the feedback model assumes that learner receives the weight along each edge that is traversed (significantly more information than the just the scalar loss). The current paper provides the first O∗(poly(n) √ T) regret for the general online linear optimization problem with scalar feedback — in particular, our algorithm has an expected regret that is O∗(n3/2√ T). The final issue to address here is lower bounds, which are not extant in the literature. This paper provides lower bounds for both the full and partial information case. We believe these lower bounds are tight, up to log factors. We have attempted to summarize the extant results in the literature (along with the results in this paper) in Table 1. We believe that we have a near complete picture of the achievable rates. One striking result is that the price of bandit information is relatively small — the upper bound is only a factor of n worse than in the full information case. In fact, the lower bounds suggest the partial feedback case is only worse by a factor of √n. Contrast this to the K arm case, where the full information case does exponentially better as a function of K. As we believe that the lower bounds are sharp, we conjecture that the price of bandit information is only √n. Part of our reasoning is due to our previous result [Dani et al., 2008] in the i.i.d. case (where the linear loss functions are sampled from a fixed, time invariant distribution) — there, we provided an upper bound on the regret of only O∗(n √ T). That bound was achieved by a deterministic algorithm which was a generalization of the celebrated algorithm of Lai and Robbins. [1985] for the K-arm case (in the i.i.d. setting). Finally, we should note that this paper primarily focuses on the achievable regrets, not on efficient implementations. In much of the previous work in the literature (for both the full and partial information case), the algorithms can be implemented efficiently provided access to a certain optimization oracle. We are not certain whether our algorithms can be implemented efficiently, in general, with only this oracle access. However, as our algorithms use the Hedge algorithm of Freund and Schapire [1997], for certain important applications, efficient implementations do exist, based on dynamic programming. Examples include problems such as Path Planning (for instance, in routing network traffic), and also Markov Decision Problems, one of the fundamental models for long-term planning in AI. This idea has been developed by Takimoto and Warmuth [2003] and also applied by Gyorgy et al. [2007] (mentioned earlier) for Path Planning — the extension to Markov Decision Problems is relatively straightforward (based on dynamic programming). The paper is organized as follows. In Section 2, we give a formal description of the problem. Then in Section 3 we present upper bounds for both the full information and bandit settings. Finally, in Section 4 we present lower bounds for both settings. All results in this paper are summarized in Table 1 (along with previous work). 2 Preliminaries Let D ⊂Rn denote the decision space. The learner plays the following T-round game against an oblivious adversary. First, the adversary chooses a sequence L1, . . . , LT of loss vectors in Rn. We assume that the loss vectors are admissible, meaning they satisfy the boundedness property that for each t and for all x ∈D, 0 ≤Lt·x = L† tx ≤1. On each round t, the learner must choose a decision xt in D, which results in a loss of ℓt = L† txt. Throughout the paper we represent x ∈D and Lt as column vectors and use v† to denote the transpose of a column vector v. In the full information case, Lt is revealed to the learner after time t. In the partial information case, only the incurred loss ℓt (and not the vector Lt) is revealed. If x1, . . . , xT are the decisions the learner makes in the game, then the total loss is PT t=1 L† txt. The cumulative regret is defined by R = T X t=1 L† txt −min x∈D T X t=1 L† tx ! 3 In other words, the learner’s loss is compared to the loss of the best single decision in hindsight. The goal of the learner is to make a sequence of decisions that guarantees low regret. For the partial information case, our upper bounds on the regret are only statements that hold in expectation (with respect to the learner’s randomness). The lower bounds provided hold with high probability. This paper also assumes the learner has access to a barycentric spanner (as defined by Awerbuch and Kleinberg [2004]) of the decision region — such a spanner is useful for exploration. This is a subset of n linearly independent vectors of the decision space, such that every vector in the decision space can be expressed as a linear combination of elements of the spanner with coefficients in [−1, 1]. Awerbuch and Kleinberg [2004] showed that any full rank compact set in Rn has a barycentric spanner. Furthermore, an almost barycentric spanner (where the coefficients are in [−2, 2]) can be found efficiently (with certain oracle access). In view of these remarks, we assume without loss of generality, that D contains the standard basis vectors ⃗e1 . . .⃗en and that D ⊂[−1, 1]n. We refer to the set {⃗e1 . . .⃗en} as the spanner. Note that with this assumption, ∥x∥2 ≤√n for all x ∈D. 3 Upper Bounds The decision set D may be potentially large or even uncountably infinite. However, for the purposes of designing algorithms with sharp regret bounds, the following lemma shows that we need only concern ourselves with finite decision sets — the lemma shows that any decision set may be approximated to sufficiently high accuracy by a suitably small set (which is a 1/ √ T-net for D). Lemma 3.1. Let D ⊂[−1, 1]n be an arbitrary decision set. Then there is a set ˜D ⊂D of size at most (4nT)n/2 such that for every sequence of admissible loss vectors, the optimal loss for eD is within an additive √ nT of the optimal loss for D. Proof sketch. For each x ∈D suppose we truncate each coordinate of x to only the first 1 2 log(nT) bits. Now from all x ∈D which result in the same truncated representation, we select a single representative to be included in eD This results in a set eD of size at most (4nT)n/2 which is a 1/ √ T-net for D. That is, every x ∈D is at distance at most 1/ √ T from its nearest neighbor in eD. Since an admissible loss vector has norm at most √n, summing over the T rounds of the game, we see that the optimal loss for eD is within an additive √ nT of the optimal loss for D. For implementation purposes, it may be impractical to store the decision set (or the covering net of the decision set) explicitly as a list of points. However, our algorithms only require the ability to sample from a specific distribution over the decision set. Furthermore, in many cases of interest the full decision set is finite and exponential in n, so we can directly work with D (rather than a cover of D). As discussed in the Introduction, in many important cases of interest this can actually be accomplished using time and space which are only logarithmic in |D| — this is due to that Hedge can be implemented efficiently for these special cases. 3.1 With Full Information In the full information setting, the algorithm Hedge of Freund and Schapire [1997] guarantees a regret at most of O( p T log |D|). Since we may modify D so that log |D| is O(n log n log T), this gives us regret O∗( √ nT). Note that we are only concerned with the regret here. Hedge may in general be quite inefficient to implement. However, in many special cases of interest, efficient implementations are in fact possible, as discussed in the Introduction. We also note that under the relatively minor assumption of the existence of an oracle for offline optimization, the algorithm of Kalai and Vempala [2005] is an efficient algorithm for this setting. However, it appears that that their regret is O(n √ T) rather than O( √ nT) — their regret bounds are stated in terms of diameters of the decision and cost spaces, but we can bound these in terms of n, which leads to the O(n √ T) regret for their algorithm. 4 3.2 With Bandit Information We now present the Geometric Hedge algorithm (shown in Algorithm 3.1) that achieves low expected regret for the setting where only the observed loss, ℓt = Lt · xt, is received as feedback. This algorithm is motivated by the algorithms in Auer et al. [1998] (designed for the K-arm case), which use Hedge (with estimated losses) along with a γ probability of exploration. Algorithm GEOMETRICHEDGE(D, γ, η) ∀x ∈D, p1(x) ← 1 |D| for t ←1 to T ∀x ∈D, bpt(x) = (1 −γ)pt(x) + γ n1{x ∈spanner} Sample xt according to distribution bpt Incur and observe loss ℓt := L† txt Ct := Ebpt [xx†] bLt := ℓtC−1 t xt ∀x ∈D, pt+1(x) ∝pt(x)e−ηbL† tx In the Geometric Hedge algorithm, there is a γ probability of exploring with the spanner on each round (motivated by Awerbuch and Kleinberg [2004]). The estimated losses we feed into Hedge are determined by the estimator bLt of Lt. Note that the algorithm is well defined as Ct is always non-singular. The following lemma shows why this estimator is sensible. Lemma 3.2. On each round t, bLt is an unbiased estimator for the true loss vector Lt. Proof. bLt = ℓtC−1 t xt = (Lt · xt)C−1 t xt = C−1 t xt(x† tLt). Therefore E [bLt] = E [C−1 t xt(x† tLt)] = C−1 t E [xtx† t]Lt = C−1 t CtLt = Lt where all the expectations are over the random choice of xt drawn from bpt. In the K-arm case, where n = K and D = {⃗e1, . . . ,⃗eK}, Algorithm 3.1 specializes to the Exp3 algorithm of Auer et al. [1998]. Note that if |D| is exponential in the dimension n then in general, maintaining and sampling from the distributions pt and bpt is very expensive in terms of running time. However in many special cases of interest, this can actually be implemented efficiently. We now state the main technical result of the paper. Theorem 3.3. Let γ = n3/2 √ T and η = 1 √ nT in Algorithm 3.1. For any sequence L1, . . . , LT of admissible loss vectors, let R denote the regret of Algorithm 3.1 on this sequence. Then ER ≤ln |D| √ nT + 2n3/2√ T As before, since we may replace D with a set of size O((nT)n/2) for an additional regret of only √ nT, the regret is O∗(n3/2√ T). Moreover, if |D| ≤cn for some constant c, as is the case for the online shortest path problem, then ER = O(n3/2√ T). 3.3 Analysis of Algorithm 3.1 In this section, we prove Theorem 3.3. We start by providing the following bound on the sizes of the estimated loss vectors used by Algorithm 3.1. Lemma 3.4. For each x ∈D and 1 ≤t ≤T, the estimated loss vector bLt satisfies |bLt · x| ≤n2 γ 5 Proof. First, let us examine Ct. Let λ1, . . . , λn be the eigenvalues of Ct, and v1, . . . , vn be the corresponding (orthonormal) eigenvectors. Since Ct := Ebpt [xx†] and λi = v† i Ctvi, we have λi = v† i E bpt [xx†]vi = X x∈D bpt(x)(x · vi)2 (1) and so λi = X x∈D bpt(x)(x · vi)2 ≥ X x∈spanner bpt(x)(x · vi)2 ≥ n X j=1 γ n(⃗ej · vi)2 = γ n∥vi∥2 = γ n It follows that the eigenvalues λ−1 1 , . . . λ−1 n of C−1 t are each at most n γ . Hence, for each x |bLt · x| = |ℓtC−1 t xt · x| ≤n γ |ℓt| ∥xt∥2∥x∥2 ≤n2 γ where we have used the upper bound on the eigenvalues and the upper bound of √n for x ∈D. The following proposition is Theorem 3.1 in Auer et al. [1998], restated in our notation (for losses instead of gains). We state it here without proof. Denote ΦM(η) := eMη−1−Mη M 2 . Proposition 3.5. (from Auer et al. [1998])For every x∗∈D, the sequence of estimated loss vectors bL1, . . . , bLT and the probability distributions p1, . . . pT satisfy T X t=1 X x∈D pt(x)bLt · x ≤ T X t=1 bLt · x∗+ ln |D| η + ΦM(η) η T X t=1 X x∈D pt(x)(bLt · x)2 where M = n2/γ is an upper bound on |bL · x|. Before we are ready to complete the proof, two technical lemmas are useful. Lemma 3.6. For each x ∈D and 1 ≤t ≤T, E xt∼bpt  (bLt · x)2 ≤x†C−1 t x Proof. Using that E  (bLt · x)2 = x† E  bLtbL† t  x, we have x† E  bLtbL† t  x = x† E  ℓ2 tC−1 t xtx† tC−1 t  x ≤x†C−1 t E  xtx† t  C−1 t x = x†C−1 t x Lemma 3.7. For each 1 ≤t ≤T, X x∈D bpt(x)x†C−1 t x = n Proof. The singular value decomposition of C−1 t is V BV † where B is diagonal (with the inverse eigenvalues as the diagonal entries) and V is orthogonal (with the columns being the eigenvectors). This implies that x†C−1 t x = P i λ−1 i (x · vi)2. Using Equation 1, it follows that X x∈D bpt(x)x†C−1 t x = X x∈D bpt(x) n X i=1 λ−1 i (x · vi)2 = n X i=1 λ−1 i X x∈D bpt(x)(x · vi)2 = n X i=1 1 = n We are now ready to complete the proof of Theorem 3.3. Proof. We now have, for any x∗∈D, X t,x bpt(x)bLt · x = T X t=1 X x∈D  (1 −γ)pt(x) + γ n1{∃j : x = ⃗ej}  bLt · x ≤(1 −γ) T X t=1 bLt · x∗+ ln |D| η + ΦM(η) η X t,x pt(x)(bLt · x)2 ! + T X t=1 n X j=1 γ n bLt · ⃗ej ≤ T X t=1 bLt · x∗+ ln |D| η + ΦM(η) η X t,x bpt(x)(bLt · x)2 + T X t=1 n X j=1 γ n bLt · ⃗ej 6 where the last step uses (1−γ)pt(x) ≤bpt(x). Taking expectations and using the unbiased property, E "X t,x bpt(x)bLt · x # = T X t=1 Lt · x∗+ ln |D| η + ΦM(η) η E "X t,x bpt(x)(bLt · x)2 # + T X t=1 n X j=1 γ nLt · ⃗ej ≤ T X t=1 Lt · x∗+ ln |D| η + ΦM(η) η E "X t,x bpt(x) E xt∼bpt (bLt · x)2 # + γT ≤ T X t=1 Lt · x∗+ ln |D| η + ΦM(η) η nT + γT where we have used Lemmas 3.6 and 3.7 in the last step. Setting γ = n3/2 √ T and η = 1 √ nT gives Mη = n2η/γ ≤1 , which implies that ΦM(η) = eMη −1 −Mη M 2 ≤M 2η2 M 2 = η2 where the inequality comes from that for α ≤1, eα ≤1 + α + α2. With the above, we have E "X t,x bpt(x)bLt · x # ≤ T X t=1 Lt · x∗+ ln |D| √ nT + 2n3/2√ T The proof is completed by noting that E "X t,x bpt(x)bLt · x # = E "X t,x bpt(x)E  bLt | Ht  · x # = E "X t,x bpt(x)Lt · x # = E X t Lt · xt ! is the expected total loss of the algorithm. 4 Lower Bounds 4.1 With Full Information We now present a family of distributions which establishes an Ω( √ nT) lower bound for i.i.d. loss vectors in the full information setting. In the remainder of the paper, we assume for convenience that the incurred losses are in the interval [−1, 1] rather than [0, 1]. (This changes the bounds by at most a factor of 2.) Example 4.1. For a given S ⊆{1, . . . , n} and 0 < ε < 1, we define a random loss vector L as follows. Choose i ∈{1, . . . , n} uniformly at random. Let σ ∈±1 be 1 with probability (1 + ε)/2 and −1 otherwise. Set L = σ⃗ei if i ∈S −σ⃗ei if i /∈S Let DS,ε denote the distribution of L. Theorem 4.2. Suppose the decision set D is the unit hypercube {−1, 1}n. For any full-information linear optimization algorithm A, and for any positive integer T, there exists S ⊆{1, . . . , n} such that for loss vectors L1, . . . , LT sampled i.i.d. according to DS,√ n/T , the expected regret is Ω( √ nT). Proof sketch. Clearly, for each S and ε, the optimal decision vector for loss vectors sampled i.i.d. according to DS,ε is the vector (x1, . . . , xn) where xi = −1 if i ∈S and 1 otherwise. Suppose S is chosen uniformly at random. In this case, it is clear that the optimal algorithm chooses decision (x1, . . . , xn) where for each i, the sign of xi is the same as the minority of past occurrences of loss vectors ±ei (in case of a tie, the value of xi doesn’t matter). Note that at every time step when the empirical minority incorrectly predicts the bias for coordinate i, the optimal algorithm incurs expected regret Ω(ε/n). By a standard application of Stirling’s 7 estimates, one can show that until coordinate i has been chosen Ω(1/ε2) times, the probability that the empirical majority disagrees with the long-run average is Ω(1). In expectation, this requires Ω(n/ε2) time steps. Summing over the n arms, the overall expected regret is thus at least Ω(n(ε/n) min{T, n/ε2} = Ω(min{εT, n/ε}). Setting ε = p n/T yields the desired bound. 4.2 With Bandit Information Next we prove that the same decision set {0, 1}n and family of distributions DS,ε can be used to establish an Ω(n √ T) lower bound in the bandit setting. Theorem 4.3. Suppose the decision set D is the unit hypercube {0, 1}n. For any bandit linear optimization algorithm A, and for any positive integer T, there exists S ⊆{1, . . . , n} such that for loss functions L1, . . . , LT sampled i.i.d. according to DS,n/ √ T , the expected regret is Ω(n √ T). Proof sketch. Again, for each S and ε, the optimal decision vector for loss vectors sampled i.i.d. according to DS,ε is just the indicator vector for the set S. Suppose S is chosen uniformly at random. Unlike the proof of Theorem 4.2, we do not attempt to characterize the optimal algorithm for this setting. Note that, for every 1 ≤i ≤n, every time step when the algorithm incorrectly sets xi ̸= 1{i ∈S}, contributes Ω(ε/n) to the expected regret. Let us fix i ∈{1, . . . , n} and prove a lower bound on its expected contribution to the total regret. To simplify matters, let us consider the best algorithm conditioned on the value of S\{i}. It is not hard to see that the problem of guessing the membership of i in S based on t past measurements can be recast as a problem of deciding between two possible means which differ by ε/n, given a sequence of t i.i.d. Bernoulli random variables with one of the unknown mean, where each of the means is a priori equally likely. But for this problem, the error probability is Ω(1) unless t = Ω((n/ε)2). Thus we have shown that the expected contribution of coordinate i to the total regret is Ω(min{T, (n/ε)2}ε/n). Summing over the n arms gives an overall expected regret of Ω(min{εT, n2/ε}. Setting ε = n/ √ T completes the proof. References P. Auer, N. Cesa-Bianchi, Y. Freund, and R. E. Schapire. Gambling in a rigged casino: the adversarial multiarmed bandit problem. In Proceedings of the 36th Annual Symposium on Foundations of Computer Science (1995). IEEE Computer Society Press, Los Alamitos, CA, extended version, 24pp., dated June 8, 1998. Available from R. Schapire’s website. B. Awerbuch and R. Kleinberg. Adaptive routing with end-to-end feedback: Distributed learning and geometric approaches. In Proceedings of the 36th ACM Symposium on Theory of Computing (STOC), 2004. P. Bartlett, V. Dani, T. P. Hayes, S. M. Kakade, A. Rakhlin, and A. Tewari. High probability regret bounds for online optimization (working title). Manuscript, 2007. V. Dani, T. P. Hayes, and S. M. Kakade. Stochastic linear optimization under bandit feedback. In submission, 2008. Varsha Dani and Thomas P. Hayes. Robbing the bandit: Less regret in online geometric optimization against an adaptive adversary. In Proceedings of the 17th ACM-SIAM Symposium on Discrete Algorithms (SODA), 2006. Y. Freund and R. Schapire. A decision-theoretic generalization of on-line learning and an application to boosting. Journal of Computer and System Sciences, 55(1):119–139, 1997. A. Gyorgy, T. Linder, G. Lugosi, and G. Ottucsak. The on-line shortest path problem under partial monitoring. Journal of Machine Learning Research, 8:2369–2403, 2007. Adam Kalai and Santosh Vempala. Efficient algorithms for online decision problems. J. Comput. Syst. Sci., 71 (3):291–307, 2005. ISSN 0022-0000. doi: http://dx.doi.org/10.1016/j.jcss.2004.10.016. T. L. Lai and H. Robbins. Asymptotically efficient adaptive allocation rules. Advances in Applied Mathematics, 6:4–25, 1985. H.B. McMahan and A. Blum. Online geometric optimization in the bandit setting against an adaptive adversary. In Proceedings of the 17th Annual Conference on Learning Theory (COLT), 2004. H. Robbins. Some aspects of the sequential design of experiments. Bulletin of the American Mathematical Society, 55:527–535, 1952. Eiji Takimoto and Manfred K. Warmuth. Path kernels and multiplicative updates. J. Mach. Learn. Res., 4: 773–818, 2003. ISSN 1533-7928. 8
2007
159
3,191
A Learning Framework for Nearest Neighbor Search Lawrence Cayton Department of Computer Science University of California, San Diego lcayton@cs.ucsd.edu Sanjoy Dasgupta Department of Computer Science University of California, San Diego dasgupta@cs.ucsd.edu Abstract Can we leverage learning techniques to build a fast nearest-neighbor (ANN) retrieval data structure? We present a general learning framework for the NN problem in which sample queries are used to learn the parameters of a data structure that minimize the retrieval time and/or the miss rate. We explore the potential of this novel framework through two popular NN data structures: KD-trees and the rectilinear structures employed by locality sensitive hashing. We derive a generalization theory for these data structure classes and present simple learning algorithms for both. Experimental results reveal that learning often improves on the already strong performance of these data structures. 1 Introduction Nearest neighbor (NN) searching is a fundamental operation in machine learning, databases, signal processing, and a variety of other disciplines. We have a database of points X = {x1, . . . , xn}, and on an input query q, we hope to return the nearest (or approximately nearest, or k-nearest) point(s) to q in X using some similarity measure. A tremendous amount of research has been devoted to designing data structures for fast NN retrieval. Most of these structures are based on some clever partitioning of the space and a few have bounds (typically worst-case) on the number of distance calculations necessary to query it. In this work, we propose a novel approach to building an efficient NN data structure based on learning. In contrast to the various data structures built using geometric intuitions, this learning framework allows one to construct a data structure by directly minimizing the cost of querying it. In our framework, a sample query set guides the construction of the data structure containing the database. In the absence of a sample query set, the database itself may be used as a reasonable prior. The problem of building a NN data structure can then be cast as a learning problem: Learn a data structure that yields efficient retrieval times on the sample queries and is simple enough to generalize well. A major benefit of this framework is that one can seamlessly handle situations where the query distribution is substantially different from the distribution of the database. We consider two different function classes that have performed well in NN searching: KD-trees and the cell structures employed by locality sensitive hashing. The known algorithms for these data structures do not, of course, use learning to choose the parameters. Nevertheless, we can examine the generalization properties of a data structure learned from one of these classes. We derive generalization bounds for both of these classes in this paper. Can the framework be practically applied? We present very simple learning algorithms for both of these data structure classes that exhibit improved performance over their standard counterparts. 1 2 Related work There is a voluminous literature on data structures for nearest neighbor search, spanning several academic communities. Work on efficient NN data structures can be classified according to two criteria: whether they return exact or approximate answers to queries; and whether they merely assume the distance function is a metric or make a stronger assumption (usually that the data are Euclidean). The framework we describe in this paper applies to all these methods, though we focus in particular on data structures for RD. Perhaps the most popular data structure for nearest neighbor search in RD is the simple and convenient KD-tree [1], which has enjoyed success in a vast range of applications. Its main downside is that its performance is widely believed to degrade rapidly with increasing dimension. Variants of the data structure have been developed to ameliorate this and other problems [2], though highdimensional databases continue to be challenging. One recent line of work suggests randomly projecting points in the database down to a low-dimensional space, and then using KD-trees [3, 4]. Locality sensitive hashing (LSH) has emerged as a promising option for high-dimensional NN search in RD [5]. It has strong theoretical guarantees for databases of arbitrary dimensionality, though they are for approximate NN search. We review both KD-trees and LSH in detail later. For data in metric spaces, there are several schemes based on repeatedly applying the triangle inequality to eliminate portions of the space from consideration; these include Orchard’s algorithm [6] and AESA [7]. Metric trees [8] and the recently suggested spill trees [3] are based on similar ideas and are related to KD-trees. A recent trend is to look for data structures that are attuned to the intrinsic dimension, e.g. [9]. See the excellent survey [10] for more information. There has been some work on building a data structure for a particular query distribution [11]; this line of work is perhaps most similar to ours. Indeed, we discovered at the time of press that the algorithm for KD-trees we describe appeared previously in [12]. Nevertheless, the learning theoretic approach in this paper is novel; the study of NN data structures through the lens of generalization ability provides a fundamentally different theoretical basis for NN search with important practical implications. 3 Learning framework In this section we formalize a learning framework for NN search. This framework is quite general and will hopefully be of use to algorithmic developments in NN searching beyond those presented in this paper. Let X = {x1, . . . , xn} denote the database and Q the space from which queries are drawn. A typical example is X ⊂RD and Q = RD. We take a nearest neighbor data structure to be a mapping f : Q →2X; the interpretation is we compute distances only to f(q), not all of X. For example, the structure underlying LSH partitions RD into cells and a query is assigned to the subset of X that falls into the same cell. What quantities are we interested in optimizing? We want to only compute distances to a small fraction of the database on a query; and, in the case of probabilistic algorithms, we want a high probability of success. More precisely, we hope to minimize the following two quantities for a data structure f: • The fraction of X that we need to compute distances to: sizef(q) ≡|f(q)| n . • The fraction of a query’s k nearest neighbors that are missed: missf(q) ≡|Γk(q) \ f(q)| k (Γk(q) denotes the k nearest neighbors of q in X). 2 In ϵ-approximate NN search, we only require a point x such that d(q, x) ≤(1 + ϵ)d(q, X), so we instead use an approximate miss rate: ϵmissf(q) ≡1 [∄x ∈f(q) such that d(q, x) ≤(1 + ϵ)d(q, X)] . None of the previously discussed data structures are built by explicitly minimizing these quantities, though there are known bounds for some. Why not? One reason is that research has typically focused on worst-case sizef and missf rates, which require minimizing these functions over all q ∈Q. Q is typically infinite of course. In this work, we instead focus on average-case sizef and missf rates—i.e. we assume q is a draw from some unknown distribution D on Q and hope to minimize Eq∼D [sizef(q)] and Eq∼D [missf(q)] . To do so, we assume that we are given a sample query set Q = {q1, . . . , qm} drawn iid from D. We attempt to build f minimizing the empirical size and miss rates, then resort to generalization bounds to relate these rates to the true ones. 4 Learning algorithms We propose two learning algorithms in this section. The first is based on a splitting rule for KD-trees designed to minimize a greedy surrogate for the empirical sizef function. The second is a algorithm that determines the boundary locations of the cell structure used in LSH that minimize a tradeoff of the empirical sizef and ϵmissf functions. 4.1 KD-trees KD-trees are a popular cell partitioning scheme for RD based on the binary search paradigm. The data structure is built by picking a dimension, splitting the database along the median value in that dimension, and then recursing on both halves. procedure BUILDTREE(S) if |S| < MinSize, return leaf. else: Pick an axis i. Let median = median(si : s ∈S). LeftTree = BUILDTREE({s ∈S : si ≤median}). RightTree= BUILDTREE({s ∈S : si > median}). return [LeftTree, RightTree, median, i]. To find a NN for a query q, one first computes distances to all points in the same cell, then traverses up the tree. At each parent node, the minimum distance between q and points already explored is compared to the distance to the split. If the latter is smaller, then the other child must be explored. Explore right subtree: Do not explore: Typically the cells contain only a few points; a query is expensive because it lies close to many of the cell boundaries and much of the tree must be explored. Learning method Rather than picking the median split at each level, we use the training queries qi to pick a split that greedily minimizes the expected cost. A split s divides the sample queries (that are in the cell being split) into three sets: Qtc, those q that are “too close” to s—i.e. nearer to s than d(q, X); Qr, those on the right of s but not in Qtc; and Ql, those on the left of s but not in Qtc. Queries in Qtc will require exploring both sides of the split. The split also divides the database points (that are in the cell being split) into Xl and Xr. The cost of split s is then defined to be cost(s) ≡|Ql| · |Xl| + |Qr| · |Xr| + |Qtc| · |X|. 3 cost(s) is a greedy surrogate for P i sizef(qi); evaluating the true average size would require a potentially costly recursion. In contrast, minimizing cost(s) can be done painlessly since it takes on at most 2m + n possible values and each can be evaluated quickly. Using a sample set led us to a very simple, natural cost function that can be used to pick splits in a principled manner. 4.2 Locality sensitive hashing LSH was a tremendous breakthrough in NN search as it led to data structures with provably sublinear (in the database size) retrieval time for approximate NN searching. More impressive still, the bounds on retrieval are independent of the dimensionality of the database. We focus on the LSH scheme for the ∥· ∥p norm (p ∈(0, 2]), which we refer to as LSHp. It is built on an extremely simple space partitioning scheme which we refer to as a rectilinear cell structure (RCS). procedure BUILDRCS(X ⊂RD) Let R ∈RO(log n)×d with Rij iid draws from a p-stable distribution.1 Project database down to O(log n) dimensions: xi 7→Rxi. Uniformly grid the space with B bins per direction. See figure 3, left panel, for an example. On query q, one simply finds the cell that q belongs to, and returns the nearest x in that cell. In general, LSHp requires many RCSs, used in parallel, to achieve a constant probability of success; in many situations one may suffice [13]. Note that LSHp only works for distances at a single scale R: the specific guarantee is that LSHp will return a point x ∈X within distance (1 + ϵ)R of q as long as d(q, X) < R. To solve the standard ϵ approximate NN problem, one must build O(log(n/ϵ)) LSHp structures. Learning method We apply our learning framework directly to the class of RCSs since they are the core structural component of LSHp. We consider a slightly wider class of RCSs where the bin widths are allowed to vary. Doing so potentially allows a single RCS to work at multiple scales if the bin positions are chosen appropriately. We give a simple procedure that selects the bin boundary locations. We wish to select boundary locations minimizing the cost P i ϵmissf(qi) + λsizef(qi), where λ is a tradeoff parameter (alternatively, one could fix a miss rate that is reasonable, say 5%, and minimize the size). The optimization is performed along one dimension at a time. Fortunately, the optimal binning along a dimension can be found by dynamic programming. There are at most m+n possible boundary locations; order them from left to right. The cost of placing the boundaries at p1, p2, pB+1 can be decomposed as c[p1, p2] + · · · + c[pB, pB+1], where c[pi, pi+1] = X q∈[pi,pi+1] ϵmissf(q) + λ X q∈[pi,pi+1] |{x ∈[pi, pi+1]}| . Let D be our dynamic programming table where D[p, i] is defined as the cost of putting the ith boundary at position p and the remaining B + 1 −i to the right. Then D[p, i] = minp′≥p c[p, p′] + D[p′, i −1]. 5 Generalization theory2 In our framework, a nearest neighbor data structure is learned by specifically designing it to perform well on a set of sample queries. Under what conditions will this search structure have good performance on future queries? Recall the setting: there is a database X = {x1, . . . , xn}, sample queries Q = {q1, . . . , qm} drawn iid from some distribution D on Q, and we wish to learn a data structure f : Q →2X drawn from a 1Dp is p-stable if for any v ∈Rd and Z, X1, . . . , Xd drawn iid from Dp, ⟨v, X⟩ d= ∥v∥pZ. For example, N(0, 1) is 2-stable. 2See the full version of this paper for any missing proofs. 4 function class F. We are interested in the generalization of sizef(q) ≡|f(q)| n , and missf(q) ≡ |Γk(q)\f(q)| k , both of which have range [0, 1] (ϵmissf(q) can be substituted for missf(q) throughout this section). Suppose a data structure f is chosen from some class F, so as to have low empirical cost 1 m m X i=1 sizef(qi) and 1 m m X i=1 missf(qi). Can we then conclude that data structure f will continue to perform well for subsequent queries drawn from the underlying distribution on Q? In other words, are the empirical estimates above necessarily close to the true expected values Eq∼Dsizef(q) and Eq∼Dmissf(q) ? There is a wide range of uniform convergence results which relate the difference between empirical and true expectations to the number of samples seen (in our case, m) and some measure of the complexity of the two classes {sizef : f ∈F} and {missf : f ∈F}. The following is particularly convenient to use, and is well-known [14, theorem 3.2]. Theorem 1. Let G be a set of functions from a set Z to [0, 1]. Suppose a sample z1, . . . , zm is drawn from some underlying distribution on Z. Let Gm denote the restriction of G to these samples, that is, Gm = {(g(z1), g(z2), . . . , g(zm)) : g ∈G}. Then for any δ > 0, the following holds with probability at least 1 −δ: sup g∈G Eg −1 m m X i=1 g(zi) ≤2 r 2 log |Gm| m + r log(2/δ) m . This can be applied immediately to the kind of data structure used by LSH. Definition 2. A (u1, . . . , ud, B)-rectilinear cell structure (RCS) in RD is a partition of RD into Bd cells given by x 7→(h1(x · u1), . . . , hd(x · ud)), where each hi : R →{1, . . . , B} is a partition of the real line into B intervals. Theorem 3. Fix any vectors u1, . . . , ud ∈RD, and, for some positive integer B, let the set of data structures F consist of all (u1, . . . , ud, B)-rectilinear cell structures in RD. Fix any database of n points X ⊂RD. Suppose there is an underlying distribution over queries in RD, from which m sample queries q1, . . . , qm are drawn. Then sup f∈F E[missf] −1 m m X i=1 missf(qi) ≤2 r 2d(B −1) log(m + n) m + r log(2/δ) m and likewise for sizef. Proof. Fix any X = {x1, . . . , xn} and any q1, . . . , qm. In how many ways can these points be assigned to cells by the class of all (u1, . . . , ud, B)-rectilinear data structures? Along each axis ui there are B −1 boundaries to be chosen and only m + n distinct locations for each of these (as far as partitioning of the xi’s and qi’s is concerned). Therefore there are at most (m+n)d(B−1) ways to carve up the points. Thus the functions {missf : f ∈F} (or likewise, {sizef : f ∈F}) collapse to a set of size just (m + n)d(B−1) when restricted to m queries; the rest follows from theorem 1. This is good generalization performance because it depends only on the projected dimension, not the original dimension. It holds when the projection directions u1, . . . , ud are chosen randomly, but, more remarkably, even if they are chosen based on X (for instance, by running PCA on X). If we learn the projections as well (instead of using random ones) the bound degrades substantially. Theorem 4. Consider the same setting as Theorem 3, except that now F ranges over (u1, . . . , ud, B)-rectilinear cell structures for all choices of u1, . . . , ud ∈RD. Then with probability at least 1 −δ, sup f∈F E[missf] −1 m m X i=1 missf(qi) ≤2 r 2 + 2d(D + B −2) log(m + n) m + r log(2/δ) m and likewise for sizef. 5 ann2fig dumpSTD ann2fig dumpL Figure 1: Left: Outer ring is the database; inner cluster of points are the queries. Center: KD-tree with standard median splits. Right: KD-tree with learned splits. KD-trees are slightly different than RCSs: the directions ui are simply the coordinate axes, and the number of partitions per direction varies (e.g. one direction may have 10 partitions, another only 1). Theorem 5. Let F be the set of all depth η KD-trees in RD and X ⊂RD be a database of points. Suppose there is an underlying distribution over queries in RD from which q1, . . . qm are drawn. Then with probability at least 1 −δ, sup f∈F E[missf] −1 m m X i=1 missf(qi) ≤2 r (2η+1 −2) log (D(3m + n)) m + r log (2/δ) m A KD-tree utilizing median splits has depth η ≤log n. The depth of a KD-tree with learned splits can be higher, though we found empirically that the depth was always much less than 2 log n (and can of course be restricted manually). KD-trees require significantly more samples than RCSs to generalize; the class of KD-trees is much more complex than that of RCSs. 6 Experiments3 6.1 KD-trees First let us look at a simple example comparing the learned splits to median splits. Figure 1 shows a 2-dimensional dataset and the cell partitions produced by the learned splits and the median splits. The KD-tree constructed with the median splitting rule places nearly all of the boundaries running right through the queries. As a result, nearly the entire database will have to be searched for queries drawn from the center cluster distribution. The KD-tree with the learned splits places most of the boundaries right around the actual database points, ensuring that fewer leaves will need to be examined for each query. We now show results on several datasets from the UCI repository and 2004 KDD cup competition. We restrict attention to relatively low-dimensional datasets (D < 100) since that is the domain in which KD-trees are typically applied. These experiments were all conducted using a modified version of Mount and Arya’s excellent KD-tree software [15]. For this set of experiments, we used a randomly selected subset of the dataset as the database and a separate small subset as the test queries. For the sample queries, we used the database itself—i.e. no additional data was used to build the learned KD-tree. The following table shows the results. We compare performance in terms of the average number of database points we have to compute distances to on a test set. data set DB size test pts dim # distance calculations % median split learned split improvement Corel (UCI) 32k 5k 32 1035.7 403.7 61.0 Covertype (UCI) 100k 10k 55 20.8 18.4 11.4 Letter (UCI) 18k 2k 16 470.1 353.8 27.4 Pen digits (UCI) 9k 1k 16 168.9 114.9 31.9 Bio (KDD) 100k 10k 74 1409.8 1310.8 7.0 Physics (KDD) 100k 10k 78 1676.6 404.0 75.9 The learned method outperforms the standard method on all of the datasets, showing a very large improvement on several of them. Note also that even the standard method exhibits good performance, 3Additional experiments appear in the full version of this paper. 6 0 0.2 0.4 0.6 0.8 0 .1 .2 .3 Bears standard KD-tree learned KD-tree 0 0.2 0.4 0.6 0.8 0 .1 .2 .3 N. American animals 0 0.2 0.4 0.6 0.8 0 .1 .2 .3 All animals 0 0.2 0.4 0.6 0.8 0 .1 .2 .3 Everything Figure 2: Percentage of DB examined as a function of  (the approximation factor) for various query distributions. Random boundaries Tuned boundaries Random boundaries Tuned boundaries Figure 3: Example RCSs. Left: Standard RCS. Right: Learned RCS often requiring distance calculations to less than one percent of the database. We are showing strong improvements on what are already quite good results. We additionally experimented with the ‘Corel50’ image dataset. It is divided into 50 classes (e.g. air shows, bears, tigers, Fiji) containing 100 images each. We used the 371-dimensional “semantic space” representation of the images recently developed in a series of image retrieval papers (see e.g. [16]). This dataset allows us to explore the effect of differing query and database distributions in a natural setting. It also demonstrates that KD-trees with learned parameters can perform well on high-dimensional data. Figure 2 shows the results of running KD-trees using median and learned splits. In each case, 4000 images were chosen for the database (from across all the classes) and images from select classes were chosen for the queries. The “All” queries were chosen from all classes; the “Animals” were chosen from the 11 animal classes; the “N. American animals” were chosen from 5 of the animal classes; and the “Bears” were chosen from the two bear classes. Standard KD-trees are performing somewhat better than brute force in these experiments; the learned KD-trees yield much faster retrieval times across a range of approximation errors. Note also that the performance of the learned KD-tree seems to improve as the query distribution becomes simpler whereas the performance for the standard KD-tree actually degrades. 6.2 RCS/LSH Figure 3 shows a sample run of the learning algorithm. The queries and DB are drawn from the same distribution. The learning algorithm adjusts the bin boundaries to the regions of density. Experimenting with RCS structures is somewhat challenging since there are two parameters to set (number of projections and boundaries), an approximation factor , and two quantities to compare (size and miss). We swept over the two parameters to get results for the standard RCSs. Results for learned RCSs were obtained using only a single (essentially unoptimized) parameter setting. Rather than minimizing a tradeoff between sizef and missf, we constrained the miss rate and optimized the sizef. The constraint was varied between runs (2%, 4%, etc.) to get comparable results. Figure 4 shows the comparison on databases of 10k points drawn from the MNIST and Physics datasets (2.5k points were used as sample queries). We see a marked improvement for the Physics dataset and a small improvement for the MNIST dataset. We suspect that the learning algorithm helps substantially for the physics data because the one-dimensional projections are highly nonuniform whereas the MNIST one-dimensional projections are much more uniform. 7 0 0.05 0.1 0.15 0.2 0 0.05 0.1 0.15 0.2 miss rate size rate (fraction of DB) Physics 0 0.05 0.1 0.15 0.2 0 0.05 0.1 0.15 0.2 0.25 MNIST miss rate size rate (fraction of DB) Standard Tuned Figure 4: Left: Physics dataset. Right: MNIST dataset. 7 Conclusion The primary contribution of this paper is demonstrating that building a NN search structure can be fruitfully viewed as a learning problem. We used this framework to develop algorithms that learn RCSs and KD-trees optimized for a query distribution. Possible future work includes applying the learning framework to other data structures, though we expect that even stronger results may be obtained by using this framework to develop a novel data structure from the ground up. On the theoretical side, margin-based generalization bounds may allow the use of richer classes of data structures. Acknowledgments We are grateful to the NSF for support under grants IIS-0347646 and IIS-0713540. Thanks to Nikhil Rasiwasia, Sunhyoung Han, and Nuno Vasconcelos for providing the Corel50 data. References [1] J. H. Friedman, J. L. Bentley, and R. A. Finkel. An algorithm for finding best matches in logarithmic expected time. ACM Transactions on Mathematical Software, 3(3):209–226, 1977. [2] S. Arya, D. M. Mount, N. S. Netanyahu, R. Silverman, and A. Wu. An optimal algorithm for approximate nearest neighbor searching. Journal of the ACM, 45(6):891–923, 1998. [3] T. Liu, A. W. Moore, A. Gray, and K. Yang. An investigation of practical approximate neighbor algorithms. In Neural Information Processing Systems (NIPS), 2004. [4] S. Dasgupta and Y. Freund. Random projection trees and low dimensional manifolds. Technical report, UCSD, 2007. [5] P. Indyk. Nearest neighbors in high dimensional spaces. In J. E. Goodman and J. O’Rourke, editors, Handbook of Discrete and Computational Geometry. CRC Press, 2006. [6] M. T. Orchard. A fast nearest-neighbor search algorithm. In ICASSP, pages 2297–3000, 1991. [7] E. Vidal. An algorithm for finding nearest neighbours in (approximately) constant average time. Pattern Recognition Letters, 4:145–157, 1986. [8] S. Omohundro. Five balltree construction algorithms. Technical report, ICSI, 1989. [9] A. Beygelzimer, S. Kakade, and J. Langford. Cover trees for nearest neighbor. In ICML, 2006. [10] K. L. Clarkson. Nearest-neighbor searching and metric space dimensions. In Nearest-Neighbor Methods for Learning and Vision: Theory and Practice, pages 15–59. MIT Press, 2006. [11] S. Maneewongvatana and D. Mount. The analysis of a probabilistic approach to nearest neighbor searching. In Workshop on Algorithms and Data Structures, 2001. [12] S. Maneewongvatana and D. Mount. Analysis of approximate nearest neighbor searching with clustered point sets. In Workshop on Algorithm Engineering and Experimentation (ALENEX), 1999. [13] Mayur Datar, Nicole Immorlica, Piotr Indyk, and Vahab S. Mirrokni. Locality-sensitive hashing scheme based on p-stable distributions. In SCG 2004, pages 253–262, New York, NY, USA, 2004. ACM Press. [14] O. Bousquet, S. Boucheron, and G. Lugosi. Theory of classification: a survey of recent advances. ESAIM: Probability and Statistics, 9:323–375, 2004. [15] D. Mount and S. Arya. ANN library. http://www.cs.umd.edu/∼mount/ANN/. [16] N. Rasiwasia, P. Moreno, and N. Vasconcelos. Bridging the gap: query by semantic example. IEEE Transactions on Multimedia, 2007. 8
2007
16
3,192
Iterative Non-linear Dimensionality Reduction by Manifold Sculpting Mike Gashler, Dan Ventura, and Tony Martinez ∗ Brigham Young University Provo, UT 84604 Abstract Many algorithms have been recently developed for reducing dimensionality by projecting data onto an intrinsic non-linear manifold. Unfortunately, existing algorithms often lose significant precision in this transformation. Manifold Sculpting is a new algorithm that iteratively reduces dimensionality by simulating surface tension in local neighborhoods. We present several experiments that show Manifold Sculpting yields more accurate results than existing algorithms with both generated and natural data-sets. Manifold Sculpting is also able to benefit from both prior dimensionality reduction efforts. 1 Introduction Dimensionality reduction is a two-step process: 1) Transform the data so that more information will survive the projection, and 2) project the data into fewer dimensions. The more relationships between data points that the transformation step is required to preserve, the less flexibility it will have to position the points in a manner that will cause information to survive the projection step. Due to this inverse relationship, dimensionality reduction algorithms must seek a balance that preserves information in the transformation without losing it in the projection. The key to finding the right balance is to identify where the majority of the information lies. Nonlinear dimensionality reduction (NLDR) algorithms seek this balance by assuming that the relationships between neighboring points contain more informational content than the relationships between distant points. Although non-linear transformations have more potential than do linear transformations to lose information in the structure of the data, they also have more potential to position the data to cause more information to survive the projection. In this process, NLDR algorithms expose patterns and structures of lower dimensionality (manifolds) that exist in the original data. NLDR algorithms, or manifold learning algorithms, have potential to make the high-level concepts embedded in multidimensional data accessible to both humans and machines. This paper introduces a new algorithm for manifold learning called Manifold Sculpting, which discovers manifolds through a process of progressive refinement. Experiments show that it yields more accurate results than other algorithms in many cases. Additionally, it can be used as a postprocessing step to enhance the transformation of other manifold learning algorithms. 2 Related Work Many algorithms have been developed for performing non-linear dimensionality reduction. Recent works include Isomap [1], which solves for an isometric embedding of data into fewer dimensions with an algebraic technique. Unfortunately, it is somewhat computationally expensive as it requires solving for the eigenvectors of a large dense matrix, and has difficulty with poorly sampled areas of ∗mikegashler@gmail.com, ventura@cs.byu.edu, martinez@cs.byu.edu 1 Figure 1: Comparison of several manifold learners on a Swiss Roll manifold. Color is used to indicate how points in the results correspond to points on the manifold. Isomap and L-Isomap have trouble with sampling holes. LLE has trouble with changes in sample density. the manifold. (See Figure 1.A.) Locally Linear Embedding (LLE) [2] is able to perform a similar computation using a sparse matrix by using a metric that measures only relationships between vectors in local neighborhoods. Unfortunately it produces distorted results when the sample density is non-uniform. (See Figure 1.B.) An improvement to the Isomap algorithm was later proposed that uses landmarks to reduce the amount of necessary computation [3]. (See Figure 1.C.) Many other NLDR algorithms have been proposed, including Kernel Principle Component Analysis [4], Laplacian Eigenmaps [5], Manifold Charting [6], Manifold Parzen Windows [7], Hessian LLE [8], and others [9, 10, 11]. Hessian LLE preserves the manifold structure better than the other algorithms but is, unfortunately, computationally expensive. (See Figure 1.D.). In contrast with these algorithms, Manifold Sculpting is robust to sampling issues and still produces very accurate results. This algorithm iteratively transforms data by balancing two opposing heuristics, one that scales information out of unwanted dimensions, and one that preserves local structure in the data. Experimental results show that this technique preserves information into fewer dimensions with more accuracy than existing manifold learning algorithms. (See Figure 1.E.) 3 The Algorithm An overview of the Manifold Sculpting algorithm is given in Figure 2a. Figure 2: δ and θ define the relationships that Manifold Sculpting attempts to preserve. 2 Step 1: Find the k nearest neighbors of each point. For each data point pi in P (where P is the set of all data points represented as vectors in Rn), find the k-nearest neighbors Ni (such that nij ∈Ni is the jth neighbor of point pi). Step 2: Compute relationships between neighbors. For each j (where 0 < j ≤k) compute the Euclidean distance δij between pi and each nij ∈Ni. Also compute the angle θij formed by the two line segments (pi to nij) and (nij to mij), where mij is the most colinear neighbor of nij with pi. (See Figure 2b.) The most colinear neighbor is the neighbor point that forms the angle closest to π. The values of δ and θ are the relationships that the algorithm will attempt to preserve during transformation. The global average distance between all the neighbors of all points δave is also computed. Step 3: Optionally preprocess the data. The data may optionally be preprocessed with the transformation step of Principle Component Analysis (PCA), or another efficient algorithm. Manifold Sculpting will work without this step; however, preprocessing can result in significantly faster convergence. To the extent that there is a linear component in the manifold, PCA will move the information in the data into as few dimensions as possible, thus leaving less work to be done in step 4 (which handles the non-linear component). This step is performed by computing the first |Dpres| principle components of the data (where Dpres is the set of dimensions that will be preserved in the projection), and rotating the dimensional axes to align with these principle components. (An efficient algorithm for computing principle components is presented in [12].) Step 4: Transform the data. The data is iteratively transformed until some stopping criterion has been met. One effective technique is to stop when the sum change of all points during the current iteration falls below a threshold. The best stopping criteria depend on the desired quality of results – if precision is important, the algorithm may iterate longer; if speed is important it may stop earlier. Step 4a: Scale values. All the values in Dscal (The set of dimensions that will be eliminated by the projection) are scaled by a constant factor σ, where 0 < σ < 1 (σ = 0.99 was used in this paper). Over time, the values in Dscal will converge to 0. When Dscal is dropped by the projection (step 5), there will be very little informational content left in these dimensions. Step 4b: Restore original relationships. For each pi ∈P, the values in Dpres are adjusted to recover the relationships that are distorted by scaling. Intuitively, this step simulates tension on the manifold surface. A heuristic error value is used to evaluate the current relationships among data points relative to the original relationships: ϵpi = k X j=0 wij δij −δij0 2δave 2 + θij −θij0 π 2! (1) where δij is the current distance to nij, δij0 is the original distance to nij measured in step 2, θij is the current angle, and θij0 is the original angle measured in step 2. The denominator values were chosen as normalizing factors because the value of the angle term can range from 0 to π, and the value of the distance term will tend to have a mean of about δave with some variance in both directions. We adjust the values in Dpres for each point to minimize this heuristic error value. The order in which points are adjusted has some impact on the rate of convergence. Best results were obtained by employing a breadth-first neighborhood graph traversal from a randomly selected point. (A new starting point is randomly selected for each iteration.) Intuitively this may be analogous to the manner in which a person smoothes a crumpled piece of paper by starting at an arbitrary point and smoothing outward. To further speed convergence, higher weight, wij, is given to the component of the error contributed by neighbors that have already been adjusted in the current iteration. For all of our experiments, we use wij = 1 if ni has not yet been adjusted in this iteration, and wij = 10, if nij has been adjusted in this iteration. Unfortunately the equation for the true gradient of the error surface defined by this heuristic is complex, and is in O(|D|3). We therefore use the simple hill-climbing technique of adjusting in each dimension in the direction that yields improvement. Since the error surface is not necessarily convex, the algorithm may potentially converge to local minima. At least three factors, however, mitigate this risk: First, the PCA pre-processing step often tends to move the whole system to a state somewhat close to the global minimum. Even if a local 3 Figure 3: The mean squared error of four algorithms with a Swiss Roll manifold using a varying number of neighbors k. When k > 57, neighbor paths cut across the manifold. Isomap is more robust to this problem than other algorithms, but HLLE and Manifold Sculpting still yield better results. Results are shown on a logarithmic scale. minimum exists so close to the globally optimal state, it may have a sufficiently small error as to be acceptable. Second, every point has a unique error surface. Even if one point becomes temporarily stuck in a local minimum, its neighbors are likely to pull it out, or change the topology of its error surface when their values are adjusted. Very particular conditions are necessary for every point to simultaneously find a local minimum. Third, by gradually scaling the values in Dscaled (instead of directly setting them to 0), the system always remains in a state very close to the current globally optimal state. As long as it stays close to the current optimal state, it is unlikely for the error surface to change in a manner that permanently separates it from being able to reach the globally optimal state. (This is why all the dimensions need to be preserved in the PCA pre-processing step.) And perhaps most significantly, our experiments show that Manifold Sculpting generally tends to converge to very good results. Step 5: Project the data. At this point Dscal contains only values that are very close to zero. The data is projected by simply dropping these dimensions from the representation. 4 Empirical Results Figure 1 shows that Manifold Sculpting appears visually to produce results of higher quality than LLE and Isomap with the Swiss Roll manifold, a common visual test for manifold learning algorithms. Quantitative analysis shows that it also yields better results than HLLE. Since the actual structure of this manifold is known prior to using any manifold learner, we can use this prior information to quantitatively measure the accuracy of each algorithm. 4.1 Varying number of neighbors. We define a Swiss Roll in 3D space with n points (xi, yi, zi) for each 0 ≤i < n, such that xi = t sin(t), yi is a random number −6 ≤yi < 6, and zi = t cos(t), where t = 8i/n + 2. In 2D manifold coordinates, the point is (ui, vi), such that ui = sinh−1(t)+t √ t2+1 2 and vi = yi. We created a Swiss Roll with 2000 data points and reduced the dimensionality to 2 with each of four algorithms. Next we tested how well these results align with the expected values by measuring the mean squared distance from each point to its expected value. (See Figure 3.) We rotated, scaled, and translated the values as required to obtain the minimum possible error measurement for each algorithm. These results are consistent with a qualitative assessment of Figure 1. Results are shown with a varying number of neighbors k. In this example, when k = 57, local neighborhoods begin to cut across the manifold. Isomap is more robust to this problem than other algorithms, but HLLE and Manifold Sculpting still yield better results. 4 Figure 4: The mean squared error of points from an S-Curve manifold for four algorithms with a varying number of data points. Manifold Sculpting shows a trend of increasing accuracy with an increasing number of points. This experiment was performed with 20 neighbors. Results are shown on a logarithmic scale. 4.2 Varying sample densities. A similar experiment was performed with an S-Curve manifold. We defined the S-Curve points in 3D space with n points (xi, yi, zi) for each 0 ≤i < n, such that xi = t, yi = sin(t), and zi is a random number 0 ≤zi < 2, where t = (2.2i−0.1)π n . In 2D manifold coordinates, the point is (ui, vi), such that ui = Z t 0 p cos2(w) + 1  dw and vi = yi. Figure 4 shows the mean squared error of the transformed points from their expected values using the same regression technique described for the experiment with the Swiss Roll problem. We varied the sampling density to show how this affects each algorithm. A trend can be observed in this data that as the number of sample points increases, the quality of results from Manifold Sculpting also increases. This trend does not appear in the results from other algorithms. One drawback to the Manifold Sculpting algorithm is that convergence may take longer when the value for k is too small. This experiment was also performed with 6 neighbors, but Manifold Sculpting did not always converge within a reasonable time when so few neighbors were used. The other three algorithms do not have this limitation, but the quality of their results still tend to be poor when very few neighbors are used. 4.3 Entwined spirals manifold. A test was also performed with an Entwined Spirals manifold. In this case, Isomap was able to produce better results than Manifold Sculpting (see Figure 5), even though Isomap yielded the worst accuracy in previous problems. This can be attributed to the nature of the Isomap algorithm. In cases where the manifold has an intrinsic dimensionality of exactly 1, a path from neighbor to neighbor provides an accurate estimate of isolinear distance. Thus an algorithm that seeks to globally optimize isolinear distances will be less susceptible to the noise from cutting across local corners. When the intrinsic dimensionality is higher than 1, however, paths that follow from neighbor to neighbor produce a zig-zag pattern that introduces excessive noise into the isolinear distance measurement. In these cases, preserving local neighborhood relationships with precision yields better overall results than globally optimizing an error-prone metric. Consistent with this intuition, Isomap is the closest competitor to Manifold Sculpting in other experiments that involved a manifold with a single intrinsic dimension, and yields the poorest results of the four algorithms when the intrinsic dimensionality is larger than one. 5 Figure 5: Mean squared error for four algorithms with an Entwined Spirals manifold. 4.4 Image-based manifolds. The accuracy of Manifold Sculpting is not limited to generated manifolds in three dimensional space. Unfortunately, the manifold structure represented by most real-world problems is not known a priori. The accuracy of a manifold learner, however, can still be estimated when the problem involves a video sequence by simply counting the percentage of frames that are sorted into the same order as the video sequence. Figure 6 shows several frames from a video sequence of a person turning his head while gradually smiling. Each image was encoded as a vector of 1, 634 pixel intensity values. This data was then reduced to a single dimension. (Results are shown on three separate lines in order to fit the page.) The one preserved dimension could then characterize each frame according to the high-level concepts that were previously encoded in many dimensions. The dot below each image corresponds to the single-dimensional value in the preserved dimension for that image. In this case, the ordering of every frame was consistent with the video sequence. 4.5 Controlled manifold topologies. Figure 7 shows a comparison of results obtained from a manifold generated by translating an image over a background of random noise. Nine of the 400 input images are shown as a sample, and results with each algorithm are shown as a mesh. Each vertex is placed at a position corresponding to the two values obtained from one of the 400 images. For increased visibility of the inherent structure, the vertexes are connected with their nearest input space neighbors. Because two variables (horizontal position and vertical position) were used to generate the dataset, this data creates a manifold with an intrinsic dimensionality of two in a space with an extrinsic dimensionality of 2,401 (the total number of pixels in each image). Because the background is random, the average distance between neighboring points in the input space is uniform, so the ideal result is known to be a square. The distortions produced by Manifold Sculpting tend to be local in nature, while the distortions produced by other algorithms tend to be more global. Note that the points are spread nearly uniformly across the manifold in the results from Manifold Sculpting. This explains why the results from Manifold Sculpting tend to fit the ideal results with much lower total error (as shown in Figure 6: Images of a face reduced by Manifold Sculpting into a single dimension. The values are are shown here on three wrapped lines in order to fit the page. The original image is shown above each point. 6 Figure 7: A comparison of results with a manifold generated by translating an image over a background of noise. Manifold Sculpting tends to produce less global distortion, while other algorithms tend to produce less local distortion. Each point represents an image. This experiment was done in each case with 8 neighbors. (LLE fails to yield results with these parameters, but [13] reports a similar experiment in which LLE produces results. In that case, as with Isomap and HLLE as shown here, distortion is clearly visible near the edges.) Figure 3 and Figure 4). Perhaps more significantly, it also tends to keep the intrinsic variables in the dataset more linearly separable. This is particularly important when the dimensionality reduction is used as a pre-processing step for a supervised learning algorithm. We created four video sequences designed to show various types of manifold topologies and measured the accuracy of each manifold learning algorithm. These results (and sample frames from each video) are shown in Figure 8. The first video shows a rotating stuffed animal. Since the background pixels remain nearly constant while the pixels on the rotating object change in value, the manifold corresponding to the vector encoding of this video will contain both smooth and changing areas. The second video was made by moving a camera down a hallway. This produces a manifold with a continuous range of variability, since pixels near the center of the frame change slowly while pixels near the edges change rapidly. The third video pans across a scene. Unlike the video of the rotating stuffed animal, there are no background pixels that remain constant. The last video shows another rotating stuffed animal. Unlike the first video, however, the high-contrast texture of the object used in this video results in a topology with much more variation. As the black spots shift across the pixels, a manifold is created that swings wildly in the respective dimensions. Due to the large hills and valleys in the topology of this manifold, the nearest neighbors of a frame frequently create paths that cut across the manifold. In all four cases, Manifold Sculpting produced results competitive with Isomap, which does particularly well with manifolds that have an intrinsic dimensionality of Figure 8: Four video sequences were created with varying properties in the corresponding manfolds. Dimensionality was reduced to one with each of four manifold learning algorithms. The percentage of frames that were correctly ordered by each algorithm is shown. 7 one, but Manifold Sculpting is not limited by the intrinsic dimensionality as shown in the previous experiments. 5 Discussion The experiments tested in this paper show that Manifold Sculpting yields more accurate results than other well-known manifold learning algorithms. Manifold Sculpting is robust to holes in the sampled area. Manifold Sculpting is more accurate than other algorithms when the manifold is sparsely sampled, and the gap is even wider with higher sampling densities. Manifold Sculpting has difficulty when the selected number of neighbors is too small but consistently outperforms other algorithms when it is larger. Due to the iterative nature of Manifold Sculpting, it’s difficult to produce a valid complexity analysis. Consequently, we measured the scalability of Manifold Sculpting empirically and compared it with that of HLLE, L-Isomap, and LLE. Due to space constraints these results are not included here, but they indicate that Manifold Sculpting scales better than the other algorithms when when the number of data points is much larger than the number of input dimensions. Manifold Sculpting benefits significantly when the data is pre-processed with the transformation step of PCA. The transformation step of any algorithm may be used in place of this step. Current research seeks to identify which algorithms work best with Manifold Sculpting to efficiently produce high quality results. (An implementation of Manifold Sculpting is included at http://waffles.sourceforge.net.) References [1] Joshua B. Tenenbaum, Vin de Silva, and John C. Langford. A global geometric framework for nonlinear dimensionality reduction. Science, 290:2319–2323, 2000. [2] Sam T. Roweis and Lawrence K. Saul. Nonlinear dimensionality reduction by locally linear embedding. Science, 290:2323–2326, 2000. [3] Vin de Silva and Joshua B. Tenenbaum. Global versus local methods in nonlinear dimensionality reduction. In NIPS, pages 705–712, 2002. [4] Bernhard Sch¨olkopf, Alexander J. Smola, and Klaus-Robert M¨uller. Kernel principal component analysis. Advances in kernel methods: support vector learning, pages 327–352, 1999. [5] Mikhail Belkin and Partha Niyogi. Laplacian eigenmaps and spectral techniques for embedding and clustering. In Advances in Neural Information Processing Systems, 14, pages 585– 591, 2001. [6] Matthew Brand. Charting a manifold. In Advances in Neural Information Processing Systems, 15, pages 961–968. MIT Press, Cambridge, MA, 2003. [7] Pascal Vincent and Yoshua Bengio. Manifold parzen windows. In Advances in Neural Information Processing Systems 15, pages 825–832. MIT Press, Cambridge, MA, 2003. [8] D. Donoho and C. Grimes. Hessian eigenmaps: locally linear embedding techniques for high dimensional data. Proc. of National Academy of Sciences, 100(10):5591–5596, 2003. [9] Yoshua Bengio and Martin Monperrus. Non-local manifold tangent learning. In Advances in Neural Information Processing Systems 17, pages 129–136. MIT Press, Cambridge, MA, 2005. [10] Elizaveta Levina and Peter J. Bickel. Maximum likelihood estimation of intrinsic dimension. In NIPS, 2004. [11] Zhenyue Zhang and Hongyuan Zha. A domain decomposition method for fast manifold learning. In Y. Weiss, B. Sch¨olkopf, and J. Platt, editors, Advances in Neural Information Processing Systems 18. MIT Press, Cambridge, MA, 2006. [12] Sam Roweis. Em algorithms for PCA and SPCA. In Michael I. Jordan, Michael J. Kearns, and Sara A. Solla, editors, Advances in Neural Information Processing Systems, volume 10, 1998. [13] Lawrence K. Saul and Sam T. Roweis. Think globally, fit locally: Unsupervised learning of low dimensional manifolds. Journal of Machine Learning Research, 4:119–155, 2003. 8
2007
160
3,193
Support Vector Machine Classification with Indefinite Kernels Ronny Luss ORFE, Princeton University Princeton, NJ 08544 rluss@princeton.edu Alexandre d’Aspremont ORFE, Princeton University Princeton, NJ 08544 aspremon@princeton.edu Abstract In this paper, we propose a method for support vector machine classification using indefinite kernels. Instead of directly minimizing or stabilizing a nonconvex loss function, our method simultaneously finds the support vectors and a proxy kernel matrix used in computing the loss. This can be interpreted as a robust classification problem where the indefinite kernel matrix is treated as a noisy observation of the true positive semidefinite kernel. Our formulation keeps the problem convex and relatively large problems can be solved efficiently using the analytic center cutting plane method. We compare the performance of our technique with other methods on several data sets. 1 Introduction Here, we present an algorithm for support vector machine (SVM) classification using indefinite kernels. Our interest in indefinite kernels is motivated by several observations. First, certain similarity measures take advantage of application-specific structure in the data and often display excellent empirical classification performance. Unlike popular kernels used in support vector machine classification, these similarity matrices are often indefinite and so do not necessarily correspond to a reproducing kernel Hilbert space (see [1] for a discussion). An application of classification with indefinite kernels to image classification using Earth Mover’s Distance was discussed in [2]. Similarity measures for protein sequences such as the SmithWaterman and BLAST scores are indefinite yet have provided hints for constructing useful positive semidefinite kernels such as those decribed in [3] or have been transformed into positive semidefinite kernels (see [4] for example). Here instead, our objective is to directly use these indefinite similarity measures for classification. Our work also closely follows recent results on kernel learning (see [5] or [6]), where the kernel matrix is learned as a linear combination of given kernels, and the resulting kernel is explicitly constrained to be positive semidefinite (the authors of [7] have adapted the SMO algorithm to solve the case where the kernel is written as a positively weighted combination of other kernels). In our case however, we never explicitly optimize the kernel matrix because this part of the problem can be solved explicitly, which means that the complexity of our method is substantially lower than that of classical kernel learning methods and closer in spirit to the algorithm used in [8], who formulate the multiple kernel learning problem of [7] as a semi-infinite linear program and solve it with a column generation technique similar to the analytic center cutting plane method we use here. Finally, it is sometimes impossible to prove that some kernels satisfy Mercer’s condition or the numerical complexity of evaluating the exact positive semidefinite kernel is too high and a proxy (and not necessarily positive semidefinite) kernel has to be used instead (see [9] for example). In both cases, our method allows us to bypass these limitations. 1 1.1 Current results Several methods have been proposed for dealing with indefinite kernels in SVMs. A first direction embeds data in a pseudo-Euclidean (pE) space: [10] for example, formulates the classification problem with an indefinite kernel as that of minimizing the distance between convex hulls formed from the two categories of data embedded in the pE space. The nonseparable case is handled in the same manner using reduced convex hulls (see [11] for a discussion of SVM geometric interpretations). Another direction applies direct spectral transformations to indefinite kernels: flipping the negative eigenvalues or shifting the kernel’s eigenvalues and reconstructing the kernel with the original eigenvectors in order to produce a positive semidefinite kernel (see [12] and [2]). Yet another option is to reformulate either the maximum margin problem or its dual in order to use the indefinite kernel in a convex optimization problem (see [13]). An equivalent formulation of SVM with the same objective but where the kernel appears in the constraints can be modified to a convex problem by eliminating the kernel from the objective. Directly solving the nonconvex problem sometimes gives good results as well (see [14] and [10]). 1.2 Contribution Here, instead of directly transforming the indefinite kernel, we simultaneously learn the support vector weights and a proxy positive semidefinite kernel matrix, while penalizing the distance between this proxy kernel and the original, indefinite one. Our main result is that the kernel learning part of that problem can be solved explicitly, meaning that the classification problem with indefinite kernels can simply be formulated as a perturbation of the positive semidefinite case. Our formulation can also be interpreted as a worst-case robust classification problem with uncertainty on the kernel matrix. In that sense, indefinite similarity matrices are seen as noisy observations of an unknown positive semidefinite kernel. From a complexity standpoint, while the original SVM classification problem with indefinite kernel is nonconvex, the robustification we detail here is a convex problem, and hence can be solved efficiently with guaranteed complexity bounds. The paper is organized as follows. In Section 2 we formulate our main classification problem and detail its interpretation as a robust SVM. In Section 3 we describe an algorithm for solving this problem. Finally, in Section 4, we test the numerical performance of these methods on various applications. 2 SVM with indefinite kernels Here, we introduce our robustification of the SVM classification problem with indefinite kernels. 2.1 Robust classification Let K ∈Sn be a given kernel matrix and y ∈Rn be the vector of labels, with Y = diag(y) the matrix with diagonal y, where Sn is the set of symmetric matrices of size n and Rn is the set of n-vectors of real numbers. We can write the dual of the SVM classification problem with hinge loss and quadratic penalty as: maximize αT e −Tr(K(Y α)(Y α)T )/2 subject to αT y = 0 0 ≤α ≤C (1) in the variable α ∈Rn and where e is an n-vector of ones. When K is positive semidefinite, this problem is a convex quadratic program. Suppose now that we are given an indefinite kernel matrix K0 ∈Sn. We formulate a robust version of problem (1) by restricting K to be a positive semidefinite kernel matrix in some given neighborhood of the original (indefinite) kernel matrix K0: max {αT y=0, 0≤α≤C} min {K⪰0, ∥K−K0∥2 F ≤β} αT e −1 2 Tr(K(Y α)(Y α)T ) (2) in the variables K ∈Sn and α ∈Rn, where the parameter β > 0 controls the distance between the original matrix K0 and the proxy kernel K. This can be interpreted as a worst-case robust 2 classification problem with bounded uncertainty on the kernel matrix K. The above problem is infeasible for some values of β so we replace here the hard constraint on K by a penalty on the distance between the proxy positive semidefinite kernel and the given indefinite matrix. The problem we solve is now: max {αT y=0,0≤α≤C} min {K⪰0} αT e −1 2 Tr(K(Y α)(Y α)T ) + ρ∥K −K0∥2 F (3) in the variables K ∈Sn and α ∈Rn, where the parameter ρ > 0 controls the magnitude of the penalty on the distance between K and K0. The inner minimization problem is a convex conic program on K. Also, as the pointwise minimum of a family of concave quadratic functions of α, the solution to the inner problem is a concave function of α, and hence the outer optimization problem is also convex (see [15] for further details). Thus, (3) is a concave maximization problem subject to linear constraints and is therefore a convex problem in α. Our key result here is that the inner kernel learning optimization problem can be solved in closed form. For a fixed α, the inner minimization problem is equivalent to the following problem: minimize ∥K −(K0 + 1 4ρ(Y α)(Y α)T )∥2 F subject to K ⪰0 in the variable K ∈Sn. This is the projection of the K0 + (1/4ρ)(Y α)(Y α)T on the cone of positive semidefinite matrices. The optimal solution to this problem is then given by: K∗= (K0 + (1/4ρ)(Y α)(Y α)T )+ (4) where X+ is the positive part of the matrix X, i.e. X+ = P i max(0, λi)xixT i where λi and xi are the ith eigenvalue and eigenvector of the matrix X. Plugging this solution into (3), we get: max {αT y=0, 0≤α≤C} αT e −1 2 Tr(K∗(Y α)(Y α)T ) + ρ∥K∗−K0∥2 F in the variable α ∈Rn, where (Y α)(Y α)T is the rank one matrix with coefficients yiαiαjyj, i, j = 1, . . . , n. We can rewrite this as an eigenvalue optimization problem by using the eigenvalue representation of X+. Letting the eigenvalue decomposition of K0+(1/4ρ)(Y α)(Y α)T be V DV T , we get K∗= V D+V T and, with vi the ith column of V , we can write: Tr(K∗(Y α)(Y α)T ) = (Y α)T V D+V T (Y α) = n X i=1 max  0, λi  K0 + 1 4ρ(Y α)(Y α)T  (αT Y vi)2 where λi (X) is the ith eigenvalue of the quantity X. Using the same technique, we can also rewrite the term ∥K∗−K0|2 F using this eigenvalue decomposition. Our original optimization problem (3) finally becomes: maximize αT e −1 2 P i max(0, λi(K0 + (Y α)(Y α)T /4ρ))(αT Y vi)2 +ρ P i (max(0, λi(K0 + (Y α)(Y α)T /4ρ)))2 −2ρ P i Tr((vivT i )K0)max(0, λi(K0 + (Y α)(Y α)T /4ρ)) + ρ Tr(K0K0) subject to αT y = 0, 0 ≤α ≤C (5) in the variable α ∈Rn. 2.2 Dual problem Because problem (3) is convex with at least one compact feasible set, we can formulate the dual problem to (5) by simply switching the max and the min. The inner maximization is a quadratic program in α, and hence has a quadratic program as its dual. We then get the dual by plugging this inner dual quadratic program into the outer minimization, to get the following problem: minimize Tr(K−1(Y (e −λ + µ + yν))(Y (e −λ + µ + yν))T )/2 + CµT e + ρ∥K −K0∥2 F subject to K ⪰0, λ, µ ≥0 (6) 3 in the variables K ∈Sn, λ, µ ∈Rn and ν ∈R. This dual problem is a quadratic program in the variables λ and µ which correspond to the primal constraints 0 ≤α ≤C and ν which is the dual variable for the constraint αT y = 0. As we have seen earlier, any feasible solution to the primal problem produces a corresponding kernel in (4), and plugging this kernel into the dual problem in (6) allows us to calculate a dual feasible point by solving a quadratic program which gives a dual objective value, i.e. an upper bound on the optimum of (5). This bound can then be used to compute a duality gap and track convergence. 2.3 Interpretation We noted that our problem can be viewed as a worst-case robust classification problem with uncertainty on the kernel matrix. Our explicit solution of the optimal worst-case kernel given in (4) is the projection of a penalized rank-one update to the indefinite kernel on the cone of positive semidefinite matrices. As ρ tends to infinity, the rank-one update has less effect and in the limit, the optimal kernel is the kernel given by zeroing out the negative eigenvalues of the indefinite kernel. This means that if the indefinite kernel contains a very small amount of noise, the best positive semidefinite kernel to use with SVM in our framework is the positive part of the indefinite kernel. This limit as ρ tends to infinity also motivates a heuristic for the transformation of the kernel on the testing set. Since the negative eigenvalues of the training kernel are thresholded to zero in the limit, the same transformation should occur for the test kernel. Hence, we update the entries of the full kernel corresponding to training instances by the rank-one update resulting from the optimal solution to (3) and threshold the negative eigenvalues of the full kernel matrix to zero. We then use the test kernel values from the resulting positive semidefinite matrix. 3 Algorithms We now detail two algorithms that can be used to solve Problem (5). The optimization problem is the maximization of a nondifferentiable concave function subject to convex constraints. An optimal point always exists since the feasibility set is bounded and nonempty. For numerical stability, in both algorithms, we quadratically smooth our objective to calculate a gradient instead. We first describe a simple projected gradient method which has numerically cheap iterations but has no convergence bound. We then show how to apply the much more efficient analytic center cutting plane method whose iterations are slightly more complex but which converges linearly. Smoothing Our objective contains terms of the form max{0, f(x)} for some function f(x), which are not differentiable (described in the section below). These functions are easily smoothed out by a regularization technique (see [16] for example). We replace them by a continuously differentiable ǫ 2-approximation as follows: ϕǫ(f(x)) = max 0≤u≤1(uf(x) −ǫ 2u2). and the gradient is given by ∇ϕǫ(f(x)) = u∗(x)∇f(x) where u∗(x) = argmaxϕǫ(f(x)). Gradient Calculating the gradient of our objective requires a full eigenvalue decomposition to compute the gradient of each eigenvalue. Given a matrix X(α), the derivative of the ith eigenvalue with respect to α is given by: ∂λi(X(α)) ∂α = vT i ∂X(α) ∂α vi (7) where vi is the ith eigenvector of X(α). We can then combine this expression with the smooth approximation above to get the gradient. We note that eigenvalues of symmetric matrices are not differentiable when some of them have multiplicities greater than one (see [17] for a discussion). In practice however, most tested kernels were of full rank with distinct eigenvalues so we ignore this issue here. One may also consider projected subgradient methods, which are much slower, or use subgradients for analytic center cutting plane methods (which does not affect complexity). 4 3.1 Projected gradient method The projected gradient method takes a steepest descent, then projects the new point back onto the feasible region (see [18] for example). In order to use these methods the objective function must be differentiable and the method is only efficient if the projection step is numerically cheap. We choose an initial point α0 ∈Rn and the algorithm proceeds as follows: Projected gradient method 1. Compute αi+1 = αi + t∇f(αi). 2. Set αi+1 = pA(αi+1). 3. If gap ≤ǫ stop, otherwise go back to step 1. The complexity of each iteration breaks down as follows. Step 1. This requires an eigenvalue decomposition and costs O(n3). We note that a line search would be costly because it would require multiple eigenvalue decompositions to recalculate the objective multiple times. Step 2. This is a projection onto the region A = {αT y = 0, 0 ≤α ≤C} and can be solved explicitly by sorting the vector of entries, with cost O(n log n). Stopping Criterion. We can compute a duality gap using the results of §2.2: let Ki = (K0 + (Y αi)(Y αi)T /4ρ)+ (the kernel at iteration i), then solving problem (1) which is just an SVM with a convex kernel Ki produces an upper bound on (5), and hence a bound on the suboptimality of the current solution. Complexity. The number of iterations required by this method to reach a target precision of ǫ is typically in O(1/ǫ2). 3.2 Analytic center cutting plane method The analytic center cutting plane method (ACCPM) reduces the feasible region on each iteration using a new cut of the feasible region computed by evaluating a subgradient of the objective function at the analytic center of the current set, until the volume of the reduced region converges to the target precision. This method does not require differentiability. We set A0 = {αT y = 0, 0 ≤α ≤C} which we can write as {A0 ≤b0} to be our first localization set for the optimal solution. The method then works as follows (see [18] for a more complete reference on cutting plane methods): Analytic center cutting plane method 1. Compute αi as the analytic center of Ai by solving: αi+1 = argmin y∈R n − m X i=1 log(bi −aT i y) where aT i represents the ith row of coefficients from the left-hand side of {A0 ≤b0}. 2. Compute ∇f(x) at the center αi+1 and update the (polyhedral) localization set: Ai+1 = Ai ∪{∇f(αi+1)(α −αi+1) ≥0} 3. If gap ≤ǫ stop, otherwise go back to step 1. The complexity of each iteration breaks down as follows. Step 1. This step computes the analytic center of a polyhedron and can be solved in O(n3) operations using interior point methods for example. 5 Step 2. This simply updates the polyhedral description. Stopping Criterion. An upper bound is computed by maximizing a first order Taylor approximation of f(α) at αi over all points in an ellipsoid that covers Ai, which can be done explicitly. Complexity. ACCPM is provably convergent in O(n log(1/ǫ)2) iterations when using cut elimination which keeps the complexity of the localization set bounded. Other schemes are available with slightly different complexities: an O(n2/ǫ2) is achieved in [19] using (cheaper) approximate centers for example. 4 Experiments In this section we compare the generalization performance of our technique to other methods of applying SVM classification given an indefinite similarity measure. We also test SVM classification performance on positive semidefinite kernels using the LIBSVM library. We finish with experiments showing convergence of our algorithms. Our algorithms were implemented in Matlab. 4.1 Generalization We compare our method for SVM classification with indefinite kernels to several of the kernel preprocessing techniques discussed earlier. The first three techniques perform spectral transformations on the indefinite kernel. The first, denoted denoise, thresholds the negative eigenvalues to zero. The second transformation, called flip, takes the absolute value of all eigenvalues. The last transformation, shift, adds a constant to each eigenvalue making them all positive. See [12] for further details. We finally also compare with using SVM on the original indefinite kernel (SVM converges but the solution is only a stationary point and is not guaranteed to be optimal). We experiment on data from the USPS handwritten digits database (described in [20]) using the indefinite Simpson score (SS) to compare two digits and on two data sets from the UCI repository (see [21]) using the indefinite Epanechnikov (EP) kernel. The data is randomly divided into training and testing data. We apply 5-fold cross validation and use an accuracy measure (described below) to determine the optimal parameters C and ρ. We then train a model with the full training set and optimal parameters and test on the independent test set. Table 1: Statistics for various data sets. Data Set # Train # Test λmin λmax USPS-3-5-SS 767 773 -34.76 453.58 USPS-4-6-SS 829 857 -37.30 413.17 Diabetes-EP 614 154 -0.27 18.17 Liver-EP 276 69 -1.38e-15 3.74 Table 1 provides statistics including the minimum and maximum eigenvalues of the training kernels. The main observation is that the USPS data uses highly indefinite kernels while the UCI data use kernels that are nearly positive semidefinite. Table 2 displays performance by comparing accuracy and recall. Accuracy is defined as the percentage of total instances predicted correctly. Recall is the percentage of true positives that were correctly predicted positive. Our method is referred to as Indefinite SVM. We see that our method performs favorably among the USPS data. Both measures of performance are quite high for all methods. Our method does not perform as well on the UCI data sets but is still favorable on one of the measures in each experiment. Notice though that recall is not good in the liver data set overall which could be the result of overfitting one of the classification categories. The liver data set uses a kernel that is almost positive semidefinite - this is an example where the input is almost a true kernel and Indefinite SVM finds one slightly better. We postulate that our method will perform better in situations where the similarity measure is highly indefinite as in the USPS dataset, while measures that are almost positive semidefinite maybe be seen as having a small amount of noise. 6 Table 2: Performance Measures for various data sets. Data Set Measure Denoise Flip Shift SVM Indefinite SVM USPS-3-5-SS Accuracy 95.47 95.73 90.43 74.90 96.25 Recall 94.50 95.45 92.11 72.73 96.65 USPS-4-6-SS Accuracy 97.78 97.90 94.28 90.08 97.90 Recall 98.42 98.65 93.68 88.49 98.87 Diabetes-EP Accuracy 75.32 74.68 68.83 75.32 68.83 Recall 90.00 90.00 92.00 90.00 95.00 Liver-EP Accuracy 63.77 63.77 57.97 63.77 65.22 Recall 22.58 22.58 25.81 22.58 22.58 4.2 Algorithm Convergence We ran our two algorithms on data sets created by randomly perturbing the four USPS data sets used above. The average results with one standard deviation above and below the mean are displayed in Figure 1 with the duality gap in log scale (note that the codes were not stopped here and that the target gap improvement is usually much smaller than 10−8). As expected, ACCPM converges much faster (in fact linearly) to a higher precision while each iteration requires solving a linear program of size n. The gradient projection method converges faster in the beginning but stalls at a higher precision, however each iteration only requires sorting the current point. 0 50 100 150 200 10 −4 10 −3 10 −2 10 −1 10 0 10 1 10 2 10 3 10 4 Duality Gap Iteration 0 200 400 600 800 1000 10 −3 10 −2 10 −1 10 0 10 1 Duality Gap Iteration Figure 1: Convergence plots for ACCPM (left) & projected gradient method (right) on randomly perturbed USPS data sets (average gap versus iteration number, dashed lines at plus and minus one standard deviation). 5 Conclusion We have proposed a technique for incorporating indefinite kernels into the SVM framework without any explicit transformations. We have shown that if we view the indefinite kernel as a noisy instance of a true kernel, we can learn an explicit solution for the optimal kernel with a tractable convex optimization problem. We give two convergent algorithms for solving this problem on relatively large data sets. Our initial experiments show that our method can at least fare comparably with other methods handling indefinite kernels in the SVM framework but provides a much clearer interpretation for these heuristics. 7 References [1] C. S. Ong, X. Mary, S. Canu, and A. J. Smola. Learning with non-positive kernels. Proceedings of the 21st International Conference on Machine Learning, 2004. [2] A. Zamolotskikh and P. Cunningham. An assessment of alternative strategies for constructing emd-based kernel functions for use in an svm for image classification. Technical Report UCD-CSI-2007-3, 2004. [3] H. Saigo, J. P. Vert, N. Ueda, and T. Akutsu. Protein homology detection using string alignment kernels. Bioinformatics, 20(11):1682–1689, 2004. [4] G. R. G. Lanckriet, N. Cristianini, M. I. Jordan, and W. S. Noble. Kernel-based integration of genomic data using semidefinite programming. 2003. citeseer.ist.psu.edu/648978.html. [5] G. R. G. Lanckriet, N. Cristianini, P. Bartlett, L. El Ghaoui, and M. I. Jordan. Learning the kernel matrix with semidefinite programming. Journal of Machine Learning Research, 5:27–72, 2004. [6] C. S. Ong, A. J. Smola, and R. C. Williamson. Learning the kernel with hyperkernels. Journal of Machine Learning Research, 6:1043–1071, 2005. [7] F. R. Bach, G. R. G. Lanckriet, and M. I. Jordan. Multiple kernel learning, conic duality, and the smo algorithm. Proceedings of the 21st International Conference on Machine Learning, 2004. [8] S. Sonnenberg, G. R¨atsch, C. Sch¨afer, and B. Sch¨olkopf. Large scale multiple kernel learning. Journal of Machine Learning Research, 7:1531–1565, 2006. [9] Marco Cuturi. Permanents, transport polytopes and positive definite kernels on histograms. Proceedings of the Twentieth International Joint Conference on Artificial Intelligence, 2007. [10] B. Haasdonk. Feature space interpretation of svms with indefinite kernels. IEEE Transactions on Pattern Analysis and Machine Intelligence, 27(4), 2005. [11] K. P. Bennet and E. J. Bredensteiner. Duality and geometry in svm classifiers. Proceedings of the 17th International conference on Machine Learning, pages 57–64, 2000. [12] G. Wu, E. Y. Chang, and Z. Zhang. An analysis of transformation on non-positive semidefinite similarity matrix for kernel machines. Proceedings of the 22nd International Conference on Machine Learning, 2005. [13] H.-T. Lin and C.-J. Lin. A study on sigmoid kernel for svm and the training of non-psd kernels by smo-type methods. 2003. [14] A. Wo´znica, A. Kalousis, and M. Hilario. Distances and (indefinite) kernels for set of objects. Proceedings of the 6th International Conference on Data Mining, pages 1151–1156, 2006. [15] S. Boyd and L. Vandenberghe. Convex Optimization. Cambridge University Press, 2004. [16] C. Gigola and S. Gomez. A regularization method for solving the finite convex min-max problem. SIAM Journal on Numerical Analysis, 27(6):1621–1634, 1990. [17] M. Overton. Large-scale optimization of eigenvalues. SIAM Journal on Optimization, 2(1):88–120, 1992. [18] D. Bertsekas. Nonlinear Programming, 2nd Edition. Athena Scientific, 1999. [19] J.-L. Goffin and J.-P. Vial. Convex nondifferentiable optimization: A survey focused on the analytic center cutting plane method. Optimization Methods and Software, 17(5):805–867, 2002. [20] J. J. Hull. A database for handwritten text recognition research. IEEE Transactions on Pattern Analysis and Machine Intelligence, 16(5), 1994. [21] A. Asuncion and D.J. Newman. UCI Machine Learning Repository. University of California, Irvine, School of Information and Computer Sciences, 2007. http://www.ics.uci.edu/∼mlearn/MLRepository.html. 8
2007
161
3,194
Learning with Transformation Invariant Kernels Christian Walder Max Planck Institute for Biological Cybernetics 72076 T¨ubingen, Germany christian.walder@tuebingen.mpg.de Olivier Chapelle Yahoo! Research Santa Clara, CA chap@yahoo-inc.com Abstract This paper considers kernels invariant to translation, rotation and dilation. We show that no non-trivial positive definite (p.d.) kernels exist which are radial and dilation invariant, only conditionally positive definite (c.p.d.) ones. Accordingly, we discuss the c.p.d. case and provide some novel analysis, including an elementary derivation of a c.p.d. representer theorem. On the practical side, we give a support vector machine (s.v.m.) algorithm for arbitrary c.p.d. kernels. For the thinplate kernel this leads to a classifier with only one parameter (the amount of regularisation), which we demonstrate to be as effective as an s.v.m. with the Gaussian kernel, even though the Gaussian involves a second parameter (the length scale). 1 Introduction Recent years have seen widespread application of reproducing kernel Hilbert space (r.k.h.s.) based methods to machine learning problems (Sch¨olkopf & Smola, 2002). As a result, kernel methods have been analysed to considerable depth. In spite of this, the aspects which we presently investigate seem to have received insufficient attention, at least within the machine learning community. The first is transformation invariance of the kernel, a topic touched on in (Fleuret & Sahbi, 2003). Note we do not mean by this the local invariance (or insensitivity) of an algorithm to application specific transformations which should not affect the class label, such as one pixel image translations (see e.g. (Chapelle & Sch¨olkopf, 2001)). Rather we are referring to global invariance to transformations, in the way that radial kernels (i.e. those of the form k(x, y) = φ(∥x −y∥)) are invariant to translations. In Sections 2 and 3 we introduce the more general concept of transformation scaledness, focusing on translation, dilation and orthonormal transformations. An interesting result is that there exist no non-trivial p.d. kernel functions which are radial and dilation scaled. There do exist non-trivial c.p.d. kernels with the stated invariances however. Motivated by this, we analyse the c.p.d. case in Section 4, giving novel elementary derivations of some key results, most notably a c.p.d. representer theorem. We then give in Section 6.1 an algorithm for applying the s.v.m. with arbitrary c.p.d. kernel functions. It turns out that this is rather useful in practice, for the following reason. Due to its invariances, the c.p.d. thin-plate kernel which we discuss in Section 5, is not only richly non-linear, but enjoys a duality between the length-scale parameter and the regularisation parameter of Tikhonov regularised solutions such as the s.v.m. In Section 7 we compare the resulting classifier (which has only a regularisation parameter), to that of the s.v.m. with Gaussian kernel (which has an additional length scale parameter). The results show that the two algorithms perform roughly as well as one another on a wide range of standard machine learning problems, notwithstanding the new method’s advantage in having only one free parameter. In Section 8 we make some concluding remarks. 1 2 Transformation Scaled Spaces and Tikhonov Regularisation Definition 2.1. Let T be a bijection on X and F a Hilbert space of functions on some non-empty set X such that f 7→f ◦T is a bijection on F. F is T -scaled if ⟨f, g⟩F = gT (F) ⟨f ◦T , g ◦T ⟩F (1) for all f ∈F, where gT (F) ∈R+ is the norm scaling function associated with the operation of T on F. If gT (F) = 1 we say that F is T -invariant. The following clarifies the behaviour of Tikhonov regularised solutions in such spaces. Lemma 2.2. For any Θ : F −− −→R and T such that f 7→f ◦T is a bijection of F, if the left hand side is unique then arg min f∈F Θ(f) =  arg min fT ∈F Θ(fT ◦T )  ◦T Proof. Let f ∗= arg minf∈F Θ(f) and f ∗ T = arg minfT ∈F Θ(fT ◦T ). By definition we have that ∀g ∈F, Θ(f ∗ T ◦T ) ≤Θ(g ◦T ). But since f 7→f ◦T is a bijection on F, we also have ∀g ∈F, Θ(f ∗ T ◦T ) ≤Θ(g). Hence, given the uniqueness, this implies f ∗= f ∗ T ◦T . The following Corollary follows immediately from Lemma 2.2 and Definition 2.1. Corollary 2.3. Let Li be any loss function. If F is T -scaled and the left hand side is unique then arg min f∈F  ∥f∥2 F + X i Li (f (xi))  =  arg min f∈F  ∥f∥2 F /gT (F) + X i Li (f (T xi))  ◦T . Corollary 2.3 includes various learning algorithms for various choices of Li — for example the s.v.m. with linear hinge loss for Li(t) = max (0, 1 −yit), and kernel ridge regression for Li(t) = (yi −t)2. Let us now introduce the specific transformations we will be considering. Definition 2.4. Let Ws, Ta and OA be the dilation, translation and orthonormal transformations Rd →Rd defined for s ∈R \ {0}, a ∈Rd and orthonormal A : Rd →Rd by Wsx = sx, Tax = x + a and OAx = Ax respectively. Hence, for an r.k.h.s. which is Ws-scaled for arbitrary s ̸= 0, training an s.v.m. and dilating the resultant decision function by some amount is equivalent training the s.v.m. on similarly dilated input patterns but with a regularisation parameter adjusted according to Corollary 2.3. While (Fleuret & Sahbi, 2003) demonstrated this phenomenon for the s.v.m. with a particular kernel, as we have just seen it is easy to demonstrate for the more general Tikhonov regularisation setting with any function norm satisfying our definition of transformation scaledness. 3 Transformation Scaled Reproducing Kernel Hilbert Spaces We now derive the necessary and sufficient conditions for a reproducing kernel (r.k.) to correspond to an r.k.h.s. which is T -scaled. The relationship between T -scaled r.k.h.s.’s and their r.k.’s is easy to derive given the uniqueness of the r.k. (Wendland, 2004). It is given by the following novel Lemma 3.1 (Transformation scaled r.k.h.s.). The r.k.h.s. H with r.k. k : X × X →R, i.e. with k satisfying ⟨k(·, x), f(·)⟩H = f(x), (2) is T -scaled iff k(x, y) = gT (H) k(T x, T y). (3) Which we prove in the accompanying technical report (Walder & Chapelle, 2007) . It is now easy to see that, for example, the homogeneous polynomial kernel k(x, y) = ⟨x, y⟩p corresponds to a Ws-scaled r.k.h.s. H with gWs(H) = ⟨x, y⟩p / ⟨sx, sy⟩p = s−2p. Hence when the homogeneous polynomial kernel is used with the hard-margin s.v.m. algorithm, the result is invariant to multiplicative scaling of the training and test data. If the soft-margin s.v.m. is used however, then the invariance 2 holds only under appropriate scaling (as per Corollary 2.3) of the margin softness parameter (i.e. λ of the later equation (14)). We can now show that there exist no non-trivial r.k.h.s.’s with radial kernels that are also Ws-scaled for all s ̸= 0. First however we need the following standard result on homogeneous functions: Lemma 3.2. If φ : [0, ∞) →R and g : (0, ∞) →R satisfy φ(r) = g(s)φ(rs) for all r ≥0 and s > 0 then φ(r) = aδ(r)+brp and g(s) = s−p, where a, b, p ∈R, p ̸= 0, and δ is Dirac’s function. Which we prove in the accompanying technical report (Walder & Chapelle, 2007). Now, suppose that H is an r.k.h.s. with r.k. k on Rd × Rd. If H is Ta-invariant for all a ∈Rd then k(x, y) = k(T−yx, T−yy) = k(x −y, 0) ≜φT (x −y). If in addition to this H is OA-invariant for all orthogonal A, then by choosing A such that A(x−y) = ∥x −y∥ˆe where ˆe is an arbitrary unit vector in Rd we have k(x, y) = k(OAx, OAy) = φT (OA(x −y)) = φT (∥x −y∥ˆe) ≜φOT (∥x −y∥) i.e. k is radial. All of this is straightforward, and a similar analysis can be found in (Wendland, 2004). Indeed the widely used Gaussian kernel satisfies both of the above invariances. But if we now also assume that H is Ws-scaled for all s ̸= 0 — this time with arbitrary gWs(H) — then k(x, y) = gWs(H)k(Wsx, Wsy) = gW|s|(H)φOT (|s| ∥x −y∥) so that letting r = ∥x −y∥we have that φOT (r) = gW|s|(H)φOT (|s| r) and hence by Lemma 3.2 that φOT (r) = aδ(r) + brp where a, b, p ∈R. This is positive semi-definite for the trivial case p = 0, but there are various ways of showing this cannot be non-trivially positive semi-definite for p ̸= 0. One simple way is to consider two arbitrary vectors x1 and x2 such that ∥x1 −x2∥= d > 0. For the corresponding Gram matrix K ≜  a bdp bdp a  , to be positive semi definite we require 0 ≤det(K) = a2 −b2d2p, but for arbitrary d > 0 and a < ∞, this implies b = 0. This may seem disappointing, but fortunately there do exist c.p.d. kernel functions with the stated properties, such as the thin-plate kernel. We discuss this case in detail in Section 5, after the following particularly elementary and in part novel introduction to c.p.d. kernels. 4 Conditionally Positive Definite Kernels In the last Section we alluded to c.p.d. kernel functions – these are given by the following Definition 4.1. A continuous function φ : X × X →R is conditionally positive definite with respect to (w.r.t.) the linear space of functions P if, for all m ∈N, all {xi}i=1...m ⊂X, and all α ∈Rm \ {0} satisfying Pm j=1 αjp(xj) = 0 for all p ∈P, the following holds Pm j,k=1 αjαkφ(xj, xk) > 0. (4) Due to the positivity condition (4) — as opposed one of non negativity — we are referring to c.p.d. rather than conditionally positive semi-definite kernels. The c.p.d. case is more technical than the p.d. case. We provide a minimalistic discussion here — for more details we recommend e.g. (Wendland, 2004). To avoid confusion, let us note in passing that while the above definition is quite standard (see e.g. (Wendland, 2004; Wahba, 1990)), many authors in the machine learning community use a definition of c.p.d. kernels which corresponds to our definition when P = {1} (e.g. (Sch¨olkopf & Smola, 2002)) or when P is taken to be the space of polynomials of some fixed maximum degree (e.g. (Smola et al., 1998)). Let us now adopt the notation P⊥(x1, . . . , xm) for the set {α ∈Rm : Pm i=1 αip(xi) = 0 for all p ∈P} . The c.p.d. kernels of Definition 4.1 naturally define a Hilbert space of functions as per Definition 4.2. Let φ : X × X →R be a c.p.d. kernel w.r.t. P. We define Fφ (X) to be the Hilbert space of functions which is the completion of the set nPm j=1 αjφ(·, xj) : m ∈N, x1, .., xm ∈X, α ∈P⊥(x1, .., xm) o , which due to the definition of φ we may endow with the inner product DPm j=1 αjφ(·, xj), Pn k=1 βkφ(·, yk) E Fφ(X) = Pm j=1 Pn k=1 αjβkφ(xj, yk). (5) 3 Note that φ is not the r.k. of Fφ (X) — in general φ(x, ·) does not even lie in Fφ (X). For the remainder of this Section we develop a c.p.d. analog of the representer theorem. We begin with Lemma 4.3. Let φ : X × X →R be a c.p.d. kernel w.r.t. P and p1, . . . pr a basis for P. For any {(x1, y1), . . . (xm, ym)} ⊂X × R, there exists an s = sFφ(X) + sP where sFφ(X) = Pm j=1 αjφ(·, xj) ∈Fφ (X) and sP = Pr k=1 βkpk ∈P, such that s(xi) = yi, i = 1 . . . m. A simple and elementary proof (which shows (17) is solvable when λ = 0), is given in (Wendland, 2004) and reproduced in the accompanying technical report (Walder & Chapelle, 2007). Note that although such an interpolating function s always exists, it need not be unique. The distinguishing property of the interpolating function is that the norm of the part which lies in Fφ (X) is minimum. Definition 4.4. Let φ : X ×X →R be a c.p.d. kernel w.r.t. P. We use the notation Pφ(P) to denote the projection Fφ (X) ⊕P →Fφ (X). Note that Fφ (X) ⊕Pφ(P) is a direct sum since p = Pm j=1 βiφ(zj, ·) ∈P ∩Fφ (X) implies ∥p∥2 Fφ(X) = ⟨p, p⟩Fφ(X) = Pm i=1 Pn j=1 βiβjφ(zi, zj) = Pm j=1 βjp(zj) = 0. Hence, returning to the main thread, we have the following lemma — our proof of which seems to be novel and particularly elementary. Lemma 4.5. Denote by φ : X × X →R a c.p.d. kernel w.r.t. P and by p1, . . . pr a basis for P. Consider an arbitrary function s = sFφ(X) + sP with sFφ(X) = Pm j=1 αjφ(·, xj) ∈Fφ (X) and sP = Pr k=1 βkpk ∈P. ∥Pφ(P)s∥Fφ(X) ≤∥Pφ(P)f∥Fφ(X) holds for all f ∈Fφ (X) ⊕P satisfying f(xi) = s(xi), i = 1 . . . m. (6) Proof. Let f be an arbitrary element of Fφ (X) ⊕P. We can always write f as f = m X j=1 (αi + αi) φ(·, xj) + n X l=1 blφ(·, zl) + r X k=1 ckpk. If we define1 [Px]i,j = pj(xi), [Pz]i,j = pj(zi), [Φxx]i,j = φ(xi, xj), [Φxz]i,j = φ(xi, zj), and [Φzx]i,j = φ(zi, xj), then the condition (6) can hence be written Pxβ = Φxxα + Φxzb + Pxc, (7) and the definition of Fφ (X) requires that e.g. α ∈P⊥(x1, . . . , xm), hence implying the constraints P ⊤ x α = 0 and P ⊤ x (α + α) + P ⊤ z b = 0. (8) The inequality to be demonstrated is then L ≜α⊤Φxxα ≤  α + α b ⊤ Φxx Φxz Φzx Φzz  | {z } ≜Φ  α + α b  ≜R. (9) By expanding R = α⊤Φxxα | {z } =L +  α b ⊤ Φ  α b  | {z } ≜∆1 + 2  α 0 ⊤ Φ  α b  | {z } ≜∆2 , it follows from (8) that P ⊤ x α + P ⊤ z β = 0, and since Φ is c.p.d. w.r.t. P ⊤ x P ⊤ z  that ∆1 ≥0. But (7) and (8) imply that L ≤R, since ∆2 = α⊤Φxxα + α⊤Φxzb = =0 z }| { α⊤Px (β −c) −α⊤Φxzb + α⊤Φxzb = 0. 1Square brackets w/ subscripts denote matrix elements, and colons denote entire rows or columns. 4 Using these results it is now easy to prove an analog of the representer theorem for the p.d. case. Theorem 4.6 (Representer theorem for the c.p.d. case). Denote by φ : X × X →R a c.p.d. kernel w.r.t. P, by Ωa strictly monotonic increasing real-valued function on [0, ∞), and by c : Rm → R ∪{∞} an arbitrary cost function. There exists a minimiser over Fφ (X) ⊕P of W(f) ≜c (f(x1), . . . , f(xm)) + Ω  ∥Pφ(P)f∥2 Fφ(X)  (10) which admits the form Pm i=1 αiφ(·, xi) + p, where p ∈P. Proof. Let f be a minimiser of W. Let s = Pm i=1 αiφ(·, xi) + p satisfy s(xi) = f(xi), i = 1 . . . m. By Lemma 4.3 we know that such an s exists. But by Lemma 4.5 ∥Pφ(P)s∥2 Fφ(X) ≥ ∥Pφ(P)f∥2 Fφ(X). As a result, W(s) ≤W(f) and s is a minimizer of W with the correct form. 5 Thin-Plate Regulariser Definition 5.1. The m-th order thin-plate kernel φm : Rd × Rd →R is given by φm(x, y) = ( (−1)m−(d−2)/2 ∥x −y∥2m−d log(∥x −y∥) if d ∈2N, (−1)m−(d−1)/2 ∥x −y∥2m−d if d ∈(2N −1), (11) for x ̸= y, and zero otherwise. φm is c.p.d. with respect to πm−1(Rd), the set of d-variate polynomials of degree at most m −1. The kernel induces the following norm on the space Fφm Rd of Definition 4.2 (this is not obvious — see e.g. (Wendland, 2004; Wahba, 1990)) ⟨f, g⟩Fφm(Rd) ≜ ⟨ψf, ψg⟩L2(Rd) = d X i1=1 · · · d X im=1 Z ∞ x1=−∞ · · · Z ∞ xd=−∞  ∂ ∂xi1 · · · ∂ ∂xim f   ∂ ∂xi1 · · · ∂ ∂xim g  dx1 . . . dxd, where ψ : Fφm Rd →L2(Rd) is a regularisation operator, implicitly defined above. Clearly gOA(Fφm Rd ) = gTa(Fφm Rd ) = 1. Moreover, from the chain rule we have ∂ ∂xi1 · · · ∂ ∂xim (f ◦Ws) = sm  ∂ ∂xi1 · · · ∂ ∂xim f  ◦Ws (12) and therefore since ⟨f, g⟩L2(Rd) = sd ⟨f ◦Ws, g ◦Ws⟩L2(Rd) ,we can immediately write ⟨ψ (f ◦Ws) , ψ (g ◦Ws)⟩L2(Rd) = s2m ⟨(ψf) ◦Ws, (ψg) ◦Ws⟩L2(Rd) = s2m−d ⟨ψf, ψg⟩L2(Rd) (13) so that gWs(Fφm Rd ) = s−(2m−d). Note that although it may appear that this can be shown more easily using (11) and an argument similar to Lemma 3.1, the process is actually more involved due to the log factor in the first case of (11), and it is necessary to use the fact that the kernel is c.p.d. w.r.t. πm−1(Rd). Since this is redundant and not central to the paper we omit the details. 6 Conditionally Positive Definite s.v.m. In the Section 3 we showed that non-trivial kernels which are both radial and dilation scaled cannot be p.d. but rather only c.p.d. It is therefore somewhat surprising that the s.v.m. — one of the most widely used kernel algorithms — has been applied only with p.d. kernels, or kernels which are c.p.d. respect only to P = {1} (see e.g. (Boughorbel et al., 2005)). After all, it seems interesting to construct a classifier independent not only of the absolute positions of the input data, but also of their absolute multiplicative scale. Hence we propose using the thin-plate kernel with the s.v.m. by minimising the s.v.m. objective over the space Fφ (X) ⊕P (or in some cases just over Fφ (X), as we shall see in Section 6.1). For this we require somewhat non-standard s.v.m. optimisation software. The method we propose seems simpler and more robust than previously mentioned solutions. For example, (Smola et al., 1998) mentions the numerical instabilities which may arise with the direct application of standard solvers. 5 Dataset Gaussian Thin-Plate dim/n banana 10.567 (0.547) 10.667 (0.586) 2/3000∗ breast 26.574 (2.259) 28.026 (2.900) 9/263 diabetes 23.578 (0.989) 23.452 (1.215) 8/768 flare 36.143 (0.969) 38.190 (2.317) 9/144 german 24.700 (1.453) 24.800 (1.373) 20/1000 heart 17.407 (2.142) 17.037 (2.290) 13/270 Dataset Gaussian Thin-Plate dim/n image 3.210 (0.504) 1.867 (0.338) 18/2086 ringnm 1.533 (0.229) 1.833 (0.200) 20/3000∗ splice 8.931 (0.640) 8.651 (0.433) 60/2844 thyroid 4.199 (1.087) 3.247 (1.211) 5/215 twonm 1.833 (0.194) 1.867 (0.254) 20/3000∗ wavefm 8.333 (0.378) 8.233 (0.484) 21/3000 Table 1: Comparison of Gaussian and thin-plate kernel with the s.v.m. on the UCI data sets. Results are reported as “mean % classification error (standard error)”. dim is the input dimension and n the total number of data points. A star in the n column means that more examples were available but we kept only a maximum of 2000 per class in order to reduce the computational burden of the extensive number of cross validation and model selection training runs (see Section 7). None of the data sets were linearly separable so we always used used the normal (β unconstrained) version of the optimisation described in Section 6.1. 6.1 Optimising an s.v.m. with c.p.d. Kernel It is simple to implement an s.v.m. with a kernel φ which is c.p.d. w.r.t. an arbitrary finite dimensional space of functions P by extending the primal optimisation approach of (Chapelle, 2007) to the c.p.d. case. The quadratic loss s.v.m. solution can be formulated as arg minf∈Fφ(X)⊕P of λ ∥Pφ(P)f∥2 Fφ(X) + n X i=1 max(0, 1 −yif(xi))2, (14) Note that for the second order thin-plate case we have X = Rd and P = π1(Rd) (the space of constant and first order polynomials). Hence dim (P) = d + 1 and we can take the basis to be pj(x) = [x]j for j = 1 . . . d along with pd+1 = 1. It follows immediately from Theorem 4.6 that, letting p1, p2, . . . pdim(P) span P, the solution to (14) is given by fsvm(x) = Pn i=1 αiφ(xi, x) + Pdim(P) j=1 βjpj(x). Now, if we consider only the margin violators — those vectors which (at a given step of the optimisation process) satisfy yif(xi) < 1, we can replace the max (0, ·) in (14) with (·). This is equivalent to making a local second order approximation. Hence by repeatedly solving in this way while updating the set of margin violators, we will have implemented a so-called Newton optimisation. Now, since ∥Pφ(P)fsvm ∥2 Fφ(X) = n X i,j=1 αiαjφ(xi, xj), (15) the local approximation of the problem is, in α and β minimise λα⊤Φα + ∥Φα + Pβ −y∥2 , subject to P ⊤α = 0, (16) where [Φ]i,j = φ(xi, xj), [P]j,k = pk(xj), and we assumed for simplicity that all vectors violate the margin. The solution in this case is given by (Wahba, 1990)  α β  =  λI + Φ P ⊤ P 0 −1  y 0  . (17) In practice it is essential that one makes a change of variable for β in order to avoid the numerical problems which arise when P is rank deficient or numerically close to it. In particular we make the QR factorisation (Golub & Van Loan, 1996) P ⊤= QR, where Q⊤Q = I and R is square. We then solve for α and β = Rβ. As a final step at the end of the optimisation process, we take the minimum norm solution of the system β = Rβ, β = R#β where R# is the pseudo inverse of R. Note that although (17) is standard for squared loss regression models with c.p.d. kernels, our use of it in optimising the s.v.m. is new. The precise algorithm is given in (Walder & Chapelle, 2007), where we also detail two efficient factorisation techniques, specific to the new s.v.m. setting. Moreover, the method we present in Section 6.2 deviates considerably further from the existing literature. 6 6.2 Constraining β = 0 Previously, if the data can be separated with only the P part of the function space — i.e. with α = 0 — then the algorithm will always do so regardless of λ. This is correct in that, since P lies in the null space of the regulariser ∥Pφ(P)·∥2 Fφ(X), such solutions minimise (14), but may be undesirable for various reasons. Firstly, the regularisation cannot be controlled via λ. Secondly, for the thin-plate, P = π1(Rd) and the solutions are simple linear separating hyperplanes. Finally, there may exist infinitely many solutions to (14). It is unclear how to deal with this problem — after all it implies that the regulariser is simply inappropriate for the problem at hand. Nonetheless we still wish to apply a (non-linear) algorithm with the previously discussed invariances of the thin-plate. To achieve this, we minimise (14) as before, but over the space Fφ (X) rather than Fφ (X) ⊕P. It is important to note that by doing so we can no longer invoke Theorem 4.6, the representer theorem for the c.p.d. case. This is because the solvability argument of Lemma 4.3 no longer holds. Hence we do not know the optimal basis for the function, which may involve infinitely many φ(·, x) terms. The way we deal with this is simple — instead of minimising over Fφ (X) we consider only the finite dimensional subspace given by nPn j=1 αjφ(·, xj) : α ∈P⊥(x1, . . . , xn) o , where x1, . . . xn are those of the original problem (14). The required update equation can be acquired in a similar manner as before. The closed form solution to the constrained quadratic programme is in this case given by (see (Walder & Chapelle, 2007)) α = −P⊥ P ⊤ ⊥ λΦ + Φ⊤ sxΦsx  P⊥ −1 P ⊤ ⊥Φ⊤ sxys (18) where Φsx = [Φ]s,:, s is the current set of margin violators and P⊥the null space of P satisfying PP⊥= 0. The precise algorithm we use to optimise in this manner is given in the accompanying technical report (Walder & Chapelle, 2007), where we also detail efficient factorisation techniques. 7 Experiments and Discussion We now investigate the behaviour of the algorithms which we have just discussed, namely the thinplate based s.v.m. with 1) the optimisation over Fφ (X) ⊕P as per Section 6.1, and 2) the optimisation over a subspace of Fφ (X) as per Section 6.2. In particular, we use the second method if the data is linearly separable, otherwise we use the first. For a baseline we take the Gaussian kernel k(x, y) = exp  −∥x −y∥2 /(2σ2)  , and compare on real world classification problems. Binary classification (UCI data sets). Table 1 provides numerical evidence supporting our claim that the thin-plate method is competitive with the Gaussian, in spite of it’s having one less hyper parameter. The data sets are standard ones from the UCI machine learning repository. The experiments are extensive — the experiments on binary problems alone includes all of the data sets used in (Mika et al., 2003) plus two additional ones (twonorm and splice). To compute each error measure, we used five splits of the data and tested on each split after training on the remainder. For parameter selection, we performed five fold cross validation on the four-fifths of the data available for training each split, over an exhaustive search of the algorithm parameter(s) (σ and λ for the Gaussian and happily just λ for the thin-plate). We then take the parameter(s) with lowest mean error and retrain on the entire four fifths. We ensured that the chosen parameters were well within the searched range by visually inspecting the cross validation error as a function of the parameters. Happily, for the thin-plate we needed to cross validate to choose only the regularisation parameter λ, whereas for the Gaussian we had to choose both λ and the scale parameter σ. The discovery of an equally effective algorithm which has only one parameter is important, since the Gaussian is probably the most popular and effective kernel used with the s.v.m. (Hsu et al., 2003). Multi class classification (USPS data set). We also experimented with the 256 dimensional, ten class USPS digit recognition problem. For each of the ten one vs. the rest models we used five fold cross validation on the 7291 training examples to find the parameters, retrained on the full training set, and labeled the 2007 test examples according to the binary classifier with maximum output. The Gaussian misclassified 88 digits (4.38%), and the thin-plate 85 (4.25%). Hence the Gaussian did not perform significantly better, in spite of the extra parameter. 7 Computational complexity. The normal computational complexity of the c.p.d. s.v.m. algorithm is the usual O(nsv3) — cubic in the number of margin violators. For the β = 0 variant (necessary only on linearly separable problems — presently only the USPS set) however, the cost is O(nb2nsv + nb3), where nb is the number of basis functions in the expansion. For our USPS experiments we expanded on all m training points, but if nsv ≪m this is inefficient and probably unnecessary. For example the final ten models (those with optimal parameters) of the USPS problem had around 5% margin violators, and so training each Gaussian s.v.m. took only ∼40s in comparison to ∼17 minutes (with the use of various efficient factorisation techniques as detailed in the accompanying (Walder & Chapelle, 2007) ) for the thin-plate. By expanding on only 1500 randomly chosen points however, the training time was reduced to ∼4 minutes while incurring only 88 errors — the same as the Gaussian. Given that for the thin-plate cross validation needs to be performed over one less parameter, even in this most unfavourable scenario of nsv ≪m, the overall times of the algorithms are comparable. Moreover, during cross validation one typically encounters larger numbers of violators for some suboptimal parameter configurations, in which cases the Gaussian and thin-plate training times are comparable. 8 Conclusion We have proven that there exist no non-trivial radial p.d. kernels which are dilation invariant (or more accurately, dilation scaled), but rather only c.p.d. ones. Such kernels have the advantage that, to take the s.v.m. as an example, varying the absolute multiplicative scale (or length scale) of the data has the same effect as changing the regularisation parameter — hence one needs model selection to chose only one of these, in contrast to the widely used Gaussian kernel for example. Motivated by this advantage we provide a new, efficient and stable algorithm for the s.v.m. with arbitrary c.p.d. kernels. Importantly, our experiments show that the performance of the algorithm nonetheless matches that of the Gaussian on real world problems. The c.p.d. case has received relatively little attention in machine learning. Our results indicate that it is time to redress the balance. Accordingly we provided a compact introduction to the topic, including some novel analysis which includes an new, elementary and self contained derivation of one particularly important result for the machine learning community, the representer theorem. References Boughorbel, S., Tarel, J.-P., & Boujemaa, N. (2005). Conditionally positive definite kernels for svm based image recognition. Proc. of IEEE ICME’05. Amsterdam. Chapelle, O. (2007). Training a support vector machine in the primal. Neural Computation, 19, 1155–1178. Chapelle, O., & Sch¨olkopf, B. (2001). Incorporating invariances in nonlinear support vector machines. In T. Dietterich, S. Becker and Z. Ghahramani (Eds.), Advances in neural information processing systems 14, 609–616. Cambridge, MA: MIT Press. Fleuret, F., & Sahbi, H. (2003). Scale-invariance of support vector machines based on the triangular kernel. Proc. of ICCV SCTV Workshop. Golub, G. H., & Van Loan, C. F. (1996). Matrix computations. Baltimore MD: The Johns Hopkins University Press. 2nd edition. Hsu, C.-W., Chang, C.-C., & Lin, C.-J. (2003). A practical guide to support vector classification (Technical Report). National Taiwan University. Mika, S., R¨atsch, G., Weston, J., Sch¨olkopf, B., Smola, A., & M¨uller, K.-R. (2003). Constructing descriptive and discriminative non-linear features: Rayleigh coefficients in feature spaces. IEEE PAMI, 25, 623–628. Sch¨olkopf, B., & Smola, A. J. (2002). Learning with kernels: Support vector machines, regularization, optimization, and beyond. Cambridge: MIT Press. Smola, A., Sch¨olkopf, B., & M¨uller, K.-R. (1998). The connection between regularization operators and support vector kernels. Neural Networks, 11, 637–649. Wahba, G. (1990). Spline models for observational data. Philadelphia: Series in Applied Math., Vol. 59, SIAM. Walder, C., & Chapelle, O. (2007). Learning with transformation invariant kernels (Technical Report 165). Max Planck Institute for Biological Cybernetics, Department of Empirical Inference, T¨ubingen, Germany. Wendland, H. (2004). Scattered data approximation. Monographs on Applied and Computational Mathematics. Cambridge University Press. 8
2007
162
3,195
A Probabilistic Model for Generating Realistic Lip Movements from Speech Gwenn Englebienne School of Computer Science University of Manchester ge@cs.man.ac.uk Tim F. Cootes Imaging Science and Biomedical Engineering University of Manchester Tim.Cootes@manchester.ac.uk Magnus Rattray School of Computer Science University of Manchester magnus.rattray@manchester.ac.uk Abstract The present work aims to model the correspondence between facial motion and speech. The face and sound are modelled separately, with phonemes being the link between both. We propose a sequential model and evaluate its suitability for the generation of the facial animation from a sequence of phonemes, which we obtain from speech. We evaluate the results both by computing the error between generated sequences and real video, as well as with a rigorous double-blind test with human subjects. Experiments show that our model compares favourably to other existing methods and that the sequences generated are comparable to real video sequences. 1 Introduction Generative systems that model the relationship between face and speech offer a wide range of exciting prospects. Models combining speech and face information have been shown to improve automatic speech recognition [4]. Conversely, generating video-realistic animated faces from speech has immediate applications to the games and movie industries. There is a strong correlation between lip movements and speech [7,10], and there have been multiple attempts at generating an animated face to match some given speech realistically [2,3,9,13]. Studies have indicated that speech might be informative not only of lip movement but also of movement in the upper regions of the face [3]. Incorporating speech therefore seems crucial to the generation of true-to-life animated faces. Our goal is to build a generative probabilistic model, capable of generating realistic facial animations in real time, given speech. We first use an Active Appearance Model (AAM [6]) to extract features from the video frames. The AAM itself is generative and allows us to produce video-realistic frames from the features. We then use a Hidden Markov Model (HMM [12]) to align phoneme labels to the audio stream of video sequences, and use this information to label the corresponding video frames. We propose a model which, when trained on these labelled video frames, is capable of generating new, realistic video from unseen phoneme sequences. Our model is a modification of Switching Linear Dynamical Systems (SLDS [1,15]) and we show that it performs better at generation than other existing models. We compare its performance to two previously proposed models by comparing the sequences they generate to a golden standard, features from real video sequences, and by asking volunteers to select the “real” video in a forced-choice test. The results of human evaluation of our generated sequences are extremely encouraging. Our system performs well with any speech, and since it can easily handle real-time generation of the facial animation, it brings a realistic-looking, talking avatar within reach. 1 2 The Data We used sequences from the freely available on-line news broadcast Democracy Now! The show is broadcast every weekday in a high quality MP4 format, and as such constitutes a constant source of new data. The text transcripts are available on-line, thus greatly facilitating the training of a speech recognition system. We manually extracted short video sequences of the news presenter talking (removing any inserts, telephone interviews, etc.), cutting at “natural” positions in the stream, viz. during pauses for breath and silences. The sequences are all of the same person, albeit on different days within a period of slightly more than a month. There was no reason to restrict the data to a single person, other than the difficulty to obtain sequences of similar quality from other sources. All usable sequences were extracted from the data, that is, those where the face of the speaker was visible and the sound was not corrupted by external sound sources. The sequences do include hesitations, corrections, incomplete words, noticeable fatigue, breath, swallowing, etc. The speaker visibly makes an effort to speak clearly, but obviously makes no effort to reduce head motion or facial expression, and the data is hence probably as representative of the problem as can be hoped for. In total, sequences totalling 1 hour and 7 minutes of video were extracted and annotated.1 The data was split into independent training and test sets for a 10-fold cross validation, based on the number of sequences in each set (rather than the total amount of data). This resulted in training sets of an average of 60 minutes of data, and test sets of approximately 7 min. All models evaluated here were trained and tested on the same data sets. Figure 1: Combining sound and face Sound features and labelling. The sequences are split into an audio and a video stream, which are treated separately (see Figure 1). From the sound stream, we extract Mel Frequency Cepstrum Coefficients (MFCC) at a rate of 100Hz, using tools from the HMM Tool Kit [16], resulting in 13-dimensional feature vectors. We train a HMM on these MFCC features, and use it to align phonetic labels to the sound. This is an easier task than unrestricted speech recognition, and is done satisfactorily by a simple HMM with monophones as hidden states, where mixtures of Gaussian distributions model the emission densities. The sound samples are labelled with the Viterbi path through the HMM that was “unrolled” with the phonetic transcription of the text. The labels obtained from the sound stream are then used to label the corresponding video frames. The difference in rate (the video is processed at 29.97 frames per second while MFCC coefficients are computed at 100 Hz) is handled by simple voting: each video frame is labelled with the phoneme that labels most of the corresponding sound frames. Face features. The feature extraction for the video was done using an Active Appearance Model (AAM [6]). The AAM represents both the shape and the texture of an object in an image. The shape of the lower part of the face is represented by the location of 23 points on key features on the eyes, mouth and jaw-line (see Figure 2). Given the position of the points in a set of training images, we align them to a common co-ordinate frame and apply PCA to learn a low-dimensional linear model capturing the shape change [5]. The intensities across the region in each example are warped to the mean shape using a simple triangulation of the region (Fig 2), and PCA applied to the vectors of intensities sampled from each image. This leads to a low-dimensional linear model of the intensities in the mean frame. Efficient algorithms exist for matching such models to new images [6]. By combining shape and intensity model together, a wide range of convincing synthetic faces can be generated [6]. In this case a 32 parameter model proves sufficient. This is closely related to eigenfaces [14] but gives far better results as shape and texture are decoupled [8]. Since the AAM parameters 1The data is publicly available at http://www.cs.manchester.ac.uk/ai/public/demnow. 2 Figure 2: The face was modelled with an AAM. A set of training images is manually labelled as shown in the two leftmost images. A statistical model of the shape is then combined with a model of the texture within the triangles between feature points. Applying the model to a new image results in a vector of coefficients, which can be used to reconstruct the original image. are a low-dimensional linear projection of the original object, projecting those parameters back to the high-dimensional space allows us to reconstruct the modelled part of the original image. 3 Modelling the dynamics of the face We model the face using only phoneme labels to capture the shared information between speech and face. We use 41 distinct phoneme labels, two of which are reserved for breath and silence, the rest being the generally accepted phonemes in the English language. Most earlier techniques that use discrete labels to generate synthetic video sequences use some form of smooth interpolation between key frames [2, 9]. This requires finding the correct key frames, and lacks the flexibility of a probabilistic formulation. Brand uses a HMM where Gaussian distributions are fitted to a concatenation of the data features and “delta” features [3]. Since the distribution is fitted to both the features and the difference between features, the resulting “distribution” cannot be sampled, as it would result in non-sensical mismatch between features and delta features. It is therefore not genuinely generative and obtaining new sequences from the model requires solving an optimisation problem. Under Brand’s approach, new sequences are obtained by finding the most likely sequence of observations for a set of labels. This is done by setting the first derivative of the likelihood with respect to the observations to zero, resulting in a set of linear equations involving, at each time t, the observation ys t and the previous observation ys t−1. Such a set of linear equations can be solved relatively efficiently thanks to its block-band-diagonal structure. This requires the storage of O(d2T) elements and O(d3T) time to solve, where d is twice the dimensionality of the face features and T is the number of frames in a sequence. This becomes non-trivial for sequences exceeding a few tens of seconds. More important, however, is that this cannot be done in real time, as the last label of the sequence must be known before the first observation can be computed. In this work, we consider more standard probabilistic models of sequential data, which are genuinely generative. These models are shown to outperform Brand’s approach for the generation of realistic sequences. Switching Linear Dynamical Systems. Before introducing the SLDS, we introduce some notational conventions. We have a set of S video sequences, which we index with s ∈[1 . . . S]. The feature vector of the frame at time t in the video sequence s is indicated as ys t ∈Rd, and the complete set of feature vectors for that sequence is denoted as {y}Ts 1 , where Ts is the length of the sequence. Continuous hidden variables are indicated as x and discrete state labels are indicated with π, where π ∈[1 . . . Π]. In an SLDS, the sequence of observations {y}Ts 1 is modelled as being a noisy version of a hidden sequence {x}Ts 1 which depends on a sequence of discrete labels {π}Ts 1 . Each state π is associated with a transition matrix Aπ and with a distribution for the output noise v and the process noise w, such that ys t = Bπs t xs t +vt, xs 1 ∼N(µπs 1, Σπs 1) and xs t = Aπs t xs t−1+νπs t +wt for 2 ⩽t ⩽Ts. Both the output noise vt and the process noise wt are normally distributed with zero mean; vt ∼N(0, Rπs t ) and wt ∼N(0, Qπs t ). The states in our application are 3 πt−2 πt−1 πt πt+1 πt+2 xt−2 xt−1 xt xt+1 xt+2 . . . . . . yt−2 yt−1 yt yt+1 yt+2 πt−2 yt−2 µt−2 πt−1 yt−1 µt−1 πt yt µt πt+1 yt+1 µt+1 πt+2 yt+2 µt+2 . . . . . . (a) (b) Figure 3: Graphical representation of the different models: figure (a) depicts the dependencies in an SLDS when the labels are known and (b) represents our proposed DPDS, where we assume the process is noiseless. The circles are discrete and the squares are multivariate continuous quantities. The shaded elements are observed and the random variables in the dashed box are conditioned on the quantities outside of it. the phonemes, which are obtained from the sound. Notice that in general, when the state labels are not known, computing the likelihood in an SLDS is intractable as it requires the enumeration of all possible state sequences, which is exponential in T [1]. In our case, however, the state label πs t of each frame is known from the sound and the likelihood can be computed with the same algorithm as for a standard Linear Dynamical Systems (LDS), which is linear in T. Parameter optimisation can therefore be carried out efficiently with a standard EM algorithm. Also note that neither SLDS or LDS are commonly described with the explicit state bias νπs t , as this can easily be emulated by augmenting each latent vector xs t with a 1 and incorporating νπs t into Aπs t . However, doing so prevents us from using a diagonal matrix for Aπs t , and experience has shown that the state mean is crucial to good prediction while the lack of sufficient data or, as is the case with our data, the `a priori known approximate independence of the data dimensions may make the reduction of the complexity of Aπs t , Qπs t and Rπs t warranted. In this form, the model is over-parametrised; it can be simplified without any loss of generality either by fixing Qπs t to the identity matrix I or, if there is no reason to use a different dimensionality for x and y, by setting Bπs t = I. We did the latter, as this makes the resulting {x}T 1 easier to interpret and compare across the different models we evaluate here. We trained a SLDS by maximum likelihood and used the model to generate new sequences of face observations for given sequences of labels. This was done by computing the most likely sequence of observations for the given set of labels. An in-depth evaluation of the trained SLDS model, when used to generate new video sequences, is given in section 4. This evaluation shows that SLDS is overly flexible: it appears to explain the data well and results in a very high likelihood, but does a poor job at generating realistic new sequences. Deterministic Process Dynamical System. We reduced the complexity of the model by simplifying its covariance structure. If we set the output noise vt of the SLDS to zero, leaving only process noise, we obtain the autoregressive hidden Markov model [11]. This model has the advantage that it can be trained using an EM algorithm when the state labels are unknown, but we find that it performs very poorly at data generation. If we set the process noise wt = 0, however, then we obtain a more useful model. The complete hidden sequence {x}T 1 is then determined exactly by the labels {π}T 1 . The log-likelihood p({y}|{π}) is given by log p({y}|{x}) = −1 2 S X s=1 h log |Σπs 1| + (ys 1 −xs 1)⊤Σ−1 πs 1 (ys 1 −xs 1)+ Ts X t=2  log |Rπs t | + (ys t −xs t)⊤R−1 πs t (ys t −xs t)  + dTs log 2π i (1) where xs 1 = µπs 1 and xs t = Aπs t xs t−1 + νπs t for t > 1. We will now refer to this model as the Deterministic Process Dynamical System (DPDS, see Figure 3). In our implementation we 4 (a) Mean L1 distance (b) RMS Error (c) Mean L∞distance (d) Log-likelihood Figure 4: Comparison of the multiple models on the test data of 10-fold cross-validation. Each plot shows the mean error of the generated data with respect to the real data over the 10 folds. The error bars span the 95% confidence interval of the true error. model all matrices Rπs t , Σπs t as diagonal, and further reduce the complexity by sharing the output noise covariance over all states. It is reasonable to assume this because the features are the result of PCA and are therefore uncorrelated. Since in this case the labels πs t are known, equation (1) does not contain any hidden variables. Applying EM is therefore not necessary. Deriving a closed-form solution for the ML estimates of the parameters, however, results in solving polynomial equations of the order Ts, because xs t = f(Aπs 2 · · · Aπs t ). An efficient solution is to use a gradient-based method. The log-likelihood of a sequence is a sum of scaled quadratic terms of (ys t −xs t), where xs t = f({π}t 1). The log-likelihood must thus be computed by a forward iteration over all time steps t using xs t−1 to compute xs t. The gradients of the likelihood with respect to Aπs t can be computed numerically in a similar fashion, by applying the chain rule iteratively at each time step and storing the result for the next step. The same could be done for other parameters, however for given values of Aπs t , the values of µπs t , νπs t and Rπs t that maximise the likelihood can be computed exactly by solving a set of linear equations. This markedly improves the rate of convergence. An algorithm for the computation of the gradients with respect to Aπs t and the exact evaluation of the other parameters is given in Appendix A. Sequence generation. Since all models parametrise the distribution of the data, we can sample them to generate new observation sequences. In order to evaluate the performance of the models and compare it to Brand’s model, it is however useful to generate the most likely sequence of observation features for a sequence of labels with the features of the corresponding real video sequence. For both SLDS (when Bπs t = I) and the DPDS, the mean for a given sequence of labels {π}T 1 is found by a forward iteration starting with ˆy1 = µπs 1 and iterating for t > 1 with ˆyt = Aπs t ˆyt−1 +νπs t . This does not require the storage of the complete sequence in memory as the current observation only depends on the previous one. In setups where artificial speech is generated, the video sequence can therefore be generated at the same time as the audio sequence and without length limitations, with O(d) space and O(dT) time complexity, where d is the dimensionality of the face features (without delta features). 4 Evaluation against real video We evaluated the models in two ways: (1) by computing the error between generated face features and a ground truth (the features of real video), and (2) by asking human subjects to rate how they perceived the sequences. Both tests were done on the same real-world data, but partitioned differently: the comparison to the ground truth was done using 10fold cross-validation, while the test on humans was done using a single partitioning, due to the limited availability of unbiased test subjects. Test error and likelihood. In order to test the models against the ground truth, we use the sound to align the labels to the video and generate the corresponding face features. We use 10-fold cross validation and evaluate the performance of the models using different metrics, see Figure 4. Plot (a) shows, for different models, the L1 error between the face 5 prefer prefer A A undecided B B Brand 5 7 54 DPDS Brand 4 7 55 reality Brand 36 21 9 SLDS DPDS 29 11 26 reality DPDS 60 5 1 SLDS reality 58 5 3 SLDS DPDS ≈reality ≻Brand ≻SLDS Table 1: Raw results of the Psychophysical test conducted by human volunteers. Every model is compared to every other model; the order in which models are listed in this table is meaningless. See text for details. features generated for the test sound sequences and the face features extracted from the real video. We compared the sequences generated by DPDS, Brand’s model and SLDS to the most likely observations under a standard HMM. This last model just generates the mean face for each phoneme, hence resulting in very unnatural sequences. It illustrates how an obviously incorrect model nevertheless performs very similarly to the other models in terms of generation error. Plots (b) and (c) respectively show the corresponding Root Mean Square (RMS) and L∞error. We can see that, except for the SLDS which performs worse than the other methods in terms of L1, RMS and L∞error, the generation error for the models considered, under all metrics, is consistently not statistically significantly different. In terms of the log-likelihood of the test data under the different models, the opposite is true: the traditional HMM and DPDS clearly perform worst, while SLDS performs dramatically better. The model with the highest likelihood generates the sequences with the largest error. The likelihood under Brand’s model cannot be compared directly as it has double the amount of features. These results notwithstanding, great differences can be seen in the quality of the generated video sequences, and the models giving the lowest error or the highest likelihood are far from generating the most realistic sequences. We have therefore performed a rigorous test where volunteers were asked to evaluate the quality of the sequences. Psychophysical test. For this experiment, we trained the models on a training set of 642 sequences of an average of 5 seconds each. We then labelled the sequences in our test set, which consists of 80 sequences and 436 seconds of video from sound with phonemes. These are substantial amounts of data, showing the face in a wide variety of positions. We set up a web-based test, where 33 volunteers compared 12 pairs of video sequences. All video sequences had original sound, but the video stream was generated by any one of four methods: (1) from the face features extracted from the corresponding real video, (2) from SLDS, (3) from Brand’s model and (4) from DPDS. A pool of 80 sequences was generated from previously unseen videos. The 12 pairs were chosen such that each generation method was pitted against each other generation method twice (once on each side, left or right, in order to eliminate bias towards a particular side) in random order. For each pair, corresponding sequences were chosen from the respective pools at random. The volunteers were only told that the sequences were either real or artificial, and were asked to either select the real video or to indicate that they could not decide. The test is kept available on-line for validation at http://www.cs.manchester.ac.uk/ai/public/dpdseval. The results are shown in Table 1. The first row, e.g., shows that when comparing Brand’s model with the DPDS, people thought that the sequence generated with the former model was real in 5 cases, could not make up their mind in 7 cases, and thought the sequence generated with DPDS was real in 54 instances. These results indicate that DPDS performs quite well at generation, clearly much better than the two other models. Note however that this test discriminates the models very harshly. Despite the strong down-voting of Brand’s model in this test, the sequences generated with that model do not look all that bad. They are over-smoothed, however, and humans appear to be very sensitive to that. Also remember that Brand’s model is the only model considered here with a closed form solution for the parameter estimation given the labels. Contrary to the other two models, it can easily be trained in the absence of labelling, using an EM algorithm. 6 In order to correlate human judgement with the generation errors discussed at the start of this section, we have computed the same error measures on the data as partitioned for the psychophysical test. These confirmed the earlier conclusions: the SLDS, which humans like least, gives the highest likelihood and the worst generation errors while DPDS and Brand’s model do not give significantly different errors. 5 Conclusion In this work we have proposed a truly generative model, which allows real-time generation of talking faces given speech. We have evaluated it both using multiple error measures and with a thorough test of human perception. The latter test clearly shows that our method perceptually outperforms the others and is virtually indistinguishable from reality. Compared to Brand’s method it is slower during training, and cannot easily be trained in the absence of labelling. This is a trade-offfor the very fast generation and visually much more appealing face animation. In addition, we have shown that traditional metrics do not agree with human perception. The error measures do not necessarily favour our method, but the human preference for it is very significant. We believe this deserves deeper analysis. In future work, we plan to investigate different error measures, especially on the more directly interpretable video frames rather than on the extracted features. We also intend to experiment with a covariance matrix per state and an unrestricted matrix structure for the transition matrix Aπs t . References [1] David Barber. Expectation correction for smoothed inference in switching linear dynamical systems. Journal of Machine Learning Research, 7:2515–2540, 2006. [2] V. Blanz, C. Basso, T. Poggio, and T. Vetter. Reanimating faces in images and video. In Proceedings of ACM SIGGRAPH, Annual Conference Series, 2003. [3] M. Brand. Voice puppetry. In SIGGRAPH ’99: Proceedings of the 26th annual conference on Computer graphics and interactive techniques, pages 21–28, New York, NY, USA, 1999. ACM Press/Addison-Wesley Publishing Co. [4] C. Bregler, H. Hild, and S. Manke. Improving letter recognition by lipreading. In Proceedings of ICASSP, 1993. [5] T. F. Cootes, C. J. Taylor, D. H. Cooper, and J. Graham. Active shape models, their training and application. Comput. Vis. Image Underst., 61(1):38–59, 1995. [6] T.F. Cootes, G.J. Edwards, and C.J. Taylor. Active appearance models. IEEE Transactions on Pattern Analysis and Machine Intelligence, 23(6):681–685, 2001. [7] P. Duchnowski, U. Meier, and A. Weibel. See me, hear me: Integrating automatic speech recognition and lipreading. In Proc. ICSLP 94, 1994. [8] G. Edwards, C. Taylor, and T. Cootes. Interpreting face images using active appearance models, 1998. [9] T. F. Ezzat, G. Geiger, and T. Poggio. Trainable videorealistic speech animation. In SIGGRAPH ’02: Proceedings of the 29th annual conference on Computer graphics and interactive techniques, pages 388–398, New York, NY, USA, 2002. ACM Press. [10] H. McGurk and J. MacDonald. Hearing lips and seeing voices. Nature, pages 746 – 748, December 1976. [11] Alan B. Poritz. Linear predictive hidden markov models and the speech signal. Proc. IEEE Int. Conf. Acoustics, Speech and Signal Processing, 7:1291–1294, May 1982. [12] L. R. Rabiner. A tutorial on hidden markov models and selected applications in speech recognition. In Readings in speech recognition, pages 267–296. Morgan Kaufmann Publishers Inc., San Francisco, CA, USA, 1990. [13] B. Theobald, G. Cawley, I. Matthews, J. Glauert, and J. Bangham. 2.5D visual speech synthesis using appearance models. Proceedings of the British Machine Vision Conference, 2003. [14] M. A. Turk and A. P. Pentland. Face recognition using eigenfaces. Proc. IEEE Conf. Computer Vision and Pattern Recognition, pages 586–591, 1991. [15] Mike West and JeffHarrison. Bayesian Forecasting and Dynamic Models. Springer, 1999. [16] S. Young. The HTK hidden markov model toolkit: Design and philosophy, 1993. 7 A Parameter estimation in DPDS The log-likelihood of a sequence is given by eq. 1, which is a multiplicative function of A (x1 = f(Aπs 1), x2 = f(Aπs 2Aπs 1), etc.). Applying the chain rule repeatedly gives us, for diagonal matrices and using Lt to denote the log-likelihood of a single observation at time t, that ∂L1  ∂An = 0 and ∂Lt  ∂An = R−1 πs t (ys t −xs t)(∂xs t  ∂An) for 2 ⩽t ⩽T, where ∂xs t ∂An = xs tδnπs t + Aπs t ∂xs t−1 ∂An , and δnπs t = 1 iffn = πs t (2) There we give the gradients for diagonal matrices for simplicity of notation and because we used diagonal matrices for this work, but the same principle applies to full matrices. The gradient of the likelihood is then ∂L  ∂An = PS s=1 PTs t=2 ∂Ls,t  ∂An. In general the same is done for the other parameters of the model, however when the covariance is shared by all states, the value of the other parameters can be maximised exactly as described below. In the following, superscripts differentiate between variables by indicating what the variable is a coefficient to. The covariance R = PS s=1 PTs t=2(ys t −xs t)(ys t −xs t)⊤ PS s=1(Ts −1) where xs 1 = µπs 1, xs t = Aπs t xs t−1 +νπs t , while µπs t and νπs t are found by solving the system of linear equations (3) for which the coefficients D and b are computed by Algorithm 1, which takes {π}, {y} and the current values of A1...Π as input:  diagΠ×Π(Dµµ n ) Dµν Π×Π Dνµ Π×Π Dνν Π×Π   " µΠ×1 νΠ×1 # = " bµ Π×1 bν Π×1 # where XΠ×Π ≜   X1,1 · · · X1,Π ... ... ... X1,Π · · · XΠ,Π  (3) Algorithm 1 Maximisation of L with respect to µ and ν for n ∈{1 . . . Π} do bµ n ←0, bν n ←0, Dµµ n ←0 ∀m ∈{1 . . . Π}: Dµν n,m, Dνν n,m, Dνµ n ←0 for s ∈{s|πs 0 = n} do ⊲Compute coefficients Dµµ n ,Dµν nx ,bµ n to µn Dµµ n ←Dµµ n + I, Dµ ←I, bµ n ←bµ n + ys t ∀m ∈{1 . . . Π}: Cµ m ←0 ⊲Cµ m and Dµ below are temporary variables for t ∈{2 . . . Ts} do Dµ ←Dµ + Aπs t Dµ, Dµµ n ←Dµµ n + DµDµ, bµ n ←bµ n + Dµys t ∀m ∈{1 . . . Π}: Cµ m ←Aπs t Cµ m, Dµν n,m ←Dµν n,m + DµCµ m Cµ πs t ←Cµ πs t + I end for end for for s ∈{1 . . . S} do ⊲Compute coefficients Dνµ nx ,Dνν nx,bν n to νn ∀m ∈{1 . . . Π}: Cν m ←0 Dν ←0, Cµ ←I ⊲Cν m, Dν, Cµ m are temporary variables for t ∈{2 . . . Ts} do Dν ←Aπs t Dν, if πs t = n then Dν ←Dν + I end if ∀m ∈{1 . . . Π}: Cν m ←Aπs t Cν m, Dνν n,m ←Dνν n,m + DνCν m Cν πs t ←Cν πs t + I, Cµ ←Aπs t Cµ, Dνµ πs 1 ←Dνµ πs 1 + DνCµ, bν n ←bν n + Dνys t end for end for end for 8
2007
163
3,196
Automatic Generation of Social Tags for Music Recommendation Douglas Eck∗ Sun Labs, Sun Microsystems Burlington, Mass, USA douglas.eck@umontreal.ca Paul Lamere Sun Labs, Sun Microsystems Burlington, Mass, USA paul.lamere@sun.com Thierry Bertin-Mahieux Sun Labs, Sun Microsystems Burlington, Mass, USA bertinmt@iro.umontreal.ca Stephen Green Sun Labs, Sun Microsystems Burlington, Mass, USA stephen.green@sun.com Abstract Social tags are user-generated keywords associated with some resource on the Web. In the case of music, social tags have become an important component of “Web2.0” recommender systems, allowing users to generate playlists based on use-dependent terms such as chill or jogging that have been applied to particular songs. In this paper, we propose a method for predicting these social tags directly from MP3 files. Using a set of boosted classifiers, we map audio features onto social tags collected from the Web. The resulting automatic tags (or autotags) furnish information about music that is otherwise untagged or poorly tagged, allowing for insertion of previously unheard music into a social recommender. This avoids the ”cold-start problem” common in such systems. Autotags can also be used to smooth the tag space from which similarities and recommendations are made by providing a set of comparable baseline tags for all tracks in a recommender system. 1 Introduction Social tags are a key part of “Web 2.0” technologies and have become an important source of information for recommendation. In the domain of music, Web sites such as Last.fm use social tags as a basis for recommending music to listeners. In this paper we propose a method for predicting social tags using audio feature extraction and supervised learning. These automatically-generated tags (or “autotags”) can furnish information about music for which good, descriptive social tags are lacking. Using traditional information retrieval techniques a music recommender can use these autotags (combined with any available listener-applied tags) to predict artist or song similarity. The tags can also serve to smooth the tag space from which similarities and recommendations are made by providing a set of comparable baseline tags for all artists or songs in a recommender. This is not the first attempt to predict something about textual data using music audio as input. Whitman & Rifkin [10], for example, provide an audio-driven model for predicting words found near artists in web queries . One main contribution of the work in this paper lies in the scale of our experiments. As is described in Section 4 we work with a social tag database of millions of tags applied to ∼100, 000 artists and an audio database of ∼90, 000 songs spanning many of the more popular of these artists. This compares favorably with previous attempts which by and large treat only very small datasets (e.g. [10] used 255 songs drawn from 51 artists.) ∗Eck and Bertin-Mahieux currently at Dept. of Computer Science, Univ. of Montreal, Montreal , Canada 1 This paper is organized as follows: in Section 2 we describe social tags in more depth, including a description of how social tags can be used to avoid problems found in traditional collaborative filtering systems, as well as a description of the tag set we built for these experiments. In Section 3 we present an algorithm for autotagging songs based on labeled data collected from the Internet. In Section 4 we present experimental results and also discuss the ability to use model results for visualization. Finally, in Section 5 we describe our conclusions and future work. 2 Using social tags for recommendation As the amount of online music grows, automatic music recommendation becomes an increasingly important tool for music listeners to find music that they will like. Automatic music recommenders commonly use collaborative filtering (CF) techniques to recommend music based on the listening behaviors of other music listeners. These CF recommenders (CFRs) harness the “wisdom of the crowds” to recommend music. Even though CFRs generate good recommendations there are still some problems with this approach. A significant issue for CFRs recommenders is the cold-start problem. A recommender needs a significant amount of data before it can generate good recommendations. For new music, music by an unknown artist with few listeners, a CFR cannot generate good recommendations. Another issue is the lack of transparency in recommendations [7]. A CFR cannot tell a listener why an artist was recommended beyond the description: “people who listen to X also listen to Y”. Also, a CFR is relatively insensitive to multimodal uses of the same album or song. For example songs from an album (a single purchase in a standard CFR system) may be used in the context of dining, jogging and working. In each context, the reason the song was selected changes. An alternative style of recommendation that addresses many of the shortcomings of a CFR is to recommend music based upon the similarity of “social tags” that have been applied to the music. Social tags are free text labels that music listeners apply to songs, albums or artists. Typically, users are motivated to tag as a way to organize their own personal music collection. The real strength of a tagging system is seen when the tags of many users are aggregated. When the tags created by thousands of different listeners are combined, a rich and complex view of the song or artist emerges. Table 1 show the top 21 tags and frequencies of tags applied to the band “The Shins”. Users have applied tags associated with the genre (Indie, Pop, etc.), with the mood (mellow, chill), opinion (favorite, love), style (singer-songwriter) and context (Garden State). From these tags and their frequencies we learn much more about “The Shins” than we would from a traditional single genre assignment of “Indie Rock”. In this paper, we investigate the automatic generation of tags with properties similar to those generated by social taggers. Specifically, we introduce a machine learning algorithm that takes as input acoustic features and predicts social tags mined from the web (in our case, Last.fm). The model can then be used to tag new or otherwise untagged music, thus providing a partial solution to the cold-start problem. For this research, we extracted tags and tag frequencies for nearly 100,000 artists from the social music website Last.fm using the Audioscrobbler web service [1]. The majority of tags describe audio content. Genre, mood and instrumentation account for 77% of the tags. See “extra material” for a breakdown of tag types. Overcoming the cold-start problem is the primary motivation for this area of research. For new music or sparsely tagged music, we predict social tags directly from the audio and apply these automatically generated tags (called autotags) in lieu of traditionally applied social tags. By automatically tagging new music in this fashion, we can reduce or eliminate much of the cold-start problem. 3 An autotagging algorithm We now describe a machine learning model which uses the meta-learning algorithm AdaBoost [5] to predict tags from acoustic features. This model is an extension of a previous model [3] which won the Genre Prediction Contest and was the 2nd place performer in the Artist Identification Contest at MIREX 2005 (ISMIR conference, London, 2005). The model has two principal advantages. First it selects features based on a feature’s ability to minimize empirical error. We can therefore use the 2 Tag Freq Tag Freq Tag Freq Indie 2375 The Shins 190 Punk 49 Indie rock 1138 Favorites 138 Chill 45 Indie pop 841 Emo 113 Singer-songwriter 41 Alternative 653 Mellow 85 Garden State 39 Rock 512 Folk 85 Favorite 37 Seen Live 298 Alternative rock 83 Electronic 36 Pop 231 Acoustic 54 Love 35 Table 1: Top 21 tags applied to The Shins Artist A 80s rock cool S o n g 1 80s rock cool SONG TAGGING LEARNING ’80s’ TAG S o n g 1 a u d i o f e a t u r e s target: ’80s’ n o n e / s o m e / a l o t ’ 8 0 s ’ b o o s t e r training PREDICTION SET OF BOOSTERS n e w s o n g p r e d i c t e d t a g s Figure 1: Overview of our model model to eliminate useless feature sets by looking at the order in which those features are selected. We used this property of the model to discard many candidate features such as chromagrams (which map spectral energy onto the 12 notes of the Western musical scale) because the weak learners associated with those features were selected very late by AdaBoost. Second, though AdaBoost may need relatively more weak learners to achieve the same performance on a large dataset than a small one, the computation time for a single weak learner scales linearly with the number of training examples. Thus AdaBoost has the potential to scale well to very large datasets. Both of these properties are general to AdaBoost and are not explored further in this short paper. See [5, 9] for more. 3.1 Acoustic feature extraction The features we use include 20 Mel-Frequency Cepstral Coefficients, 176 autocorrelation coefficients computed for lags spanning from 250msec to 2000msec at 10ms intervals, and 85 spectrogram coefficients sampled by constant-Q (or log-scaled) frequency (see [6] for descriptions of these standard acoustic features.) The audio features described above are calculated over short windows of audio ( 100ms with 25ms overlap). This yields too many features per song for our purposes. To address this, we create “aggregate” features by computing individual means and standard deviations (i.e., independent Gaussians) of these features over 5s windows of feature data. When fixing hyperparameters for these experiments, we also tried a combination of 5s and 10s features, but saw no real improvement in results. For reasons of computational efficiency we used random sampling to retain a maximum of 12 aggregate features per song, corresponding to 1 minute of audio data. 3.2 Labels as a classification problem Intuitively, automatic labeling would be a regression task where a learner would try to predict tag frequencies for artists or songs. However, because tags are sparse (many artist are not tagged at all; others like Radiohead are heavily tagged) this proves to be too difficult using our current Last.fm 3 dataset. Instead, we chose to treat the task as a classification one. Specifically, for each tag we try to predict if a particular artist has “none”, “some” or “a lot” of a particular tag relative to other tags. We normalize the tag frequencies for each artist so that artists having many tags can be compared to artists having few tags. Then for each tag, an individual artist is placed into a single class “none”, “some” or “a lot” depending on the proportion of times the tag was assigned to that artist relative to other tags assigned to that artist. Thus if an artist received only 50 rock tags and nothing else, it would be treated as having “a lot” of rock. Conversely, if an artist received 5000 rock tags but 10,000 jazz tags it would be treated as having “some” rock and “a lot” of jazz. The specific boundaries between “none”, “some” and “a lot” were decided by summing the normalized tag counts or all artists, generating a 100-bin histogram for each tag and moving the category boundaries such that an equal number of artists fall into each of the categories. In Figure 2 the histogram for “rock” is shown (with only 30 bins to make the plot easier to read). Note that most artists fall into the lowest bin (no or very few instances of the “rock” tag) and that otherwise most of the mass is in high bins. This was the trend for most tags and one of our motivations for using only 3 bins. As described in the paper we do not directly use the predictions of the “some” bin. Rather it serves as a class for holding those artists for which we cannot confidently say “none” or “a lot”. See Figure 2 for an example. Figure 2: A 30-bin histogram of the proportion of “rock” tags to other tags for all songs in the dataset. 3.3 Tag prediction with AdaBoost AdaBoost [5] is a meta-learning method that constructs a strong classifier from a set of simpler classifiers, called weak learners in an iterative way. Originally intended for binary classification, there exist several ways to extend it to multiclass classification. We use AdaBoost.MH [9] which treats multiclass classification as a set of one-versus-all binary classification problems. In each iteration t, the algorithm selects the best classifier, called h(t) from a pool of weak learners, based on its performance on the training set, and assigns it a coefficient α(t). The input to the weak learner is a d-dimensional observation vector x ∈ℜd containing audio features for one segment of aggregated data (5 seconds in our experiments). The output of h(t) is a binary vector y ∈{−1, 1}k over the k classes. h(t) l = 1 means a vote for class l by a weak learner while h(t), −1 is a vote against. After T iterations, the algorithm output is a vector-valued discriminant function: g(x) = T X t=1 α(t)h(y)(x) (1) As weak learners we used single stumps, e.g. a binary threshold on one of the features. In previous work we also tried decision trees without any significant improvement. Usually we obtain a single label by taking the class with the most votes i.e f(x) = arg maxl gl(x), but in our model, we use the output value for each class rather than the argmax. 3.4 Generating autotags For each aggregate segment, a booster yields a prediction over the classes “none”, “some”, and “a lot”. A booster’s raw output for a single segment might be (none:−3.56) (some:0.14) (a lot:2.6). 4 These segment predictions can then be combined to yield artist-level predictions. This can be achieved in two ways: a winning class can be chosen for each segment (in this example the class “a lot” would win with 2.6) and the mean over winners can be tallied for all segments belonging to an artist. Alternately we can skip choosing a winner and simply take the mean of the raw outputs for an artist’s segments. Because we wanted to estimate tag frequencies using booster magnitude we used the latter strategy. The next step is to transform these class for our individual social tag boosters into a bag of words to be associated with an artist. The most naive way to obtain a single value for rock is to look solely at the prediction for the “a lot” class. However this discards valuable information such as when a booster votes strongly “none”. A better way to obtain a measure for rock-ness is to take the center of mass of the three values. However, because the values are not scaled well with respect to one another, we ended up with poorly scaled results. Another intuitive idea is simply to subtract the value of the “none” bin from the value of the “a lot” bin, the reasoning being that “none” is truly the opposite of “a lot”. In our example, this would yield a rock strength of 7.16. In experiments for setting hyperparameters, this was shown to work better than other methods. Thus to generate our final measure of rock-ness, we ignore the middle bin (“some”). However this should not be taken to mean that the middle “some” bin is useless: the booster needed to learn to predict “some” during training thus forcing it to be more selective in predicting “none” and “a lot”. As a largemargin classifier, AdaBoost tries to separate the classes as much as possible, so the magnitude of the values for each bin are not easily comparable. To remedy this, we normalize by taking the minimum and maximum prediction for each booster, which seems to work for finding similar artists. This normalization would not be necessary if we had good tagging data for all artists and could perform regression on the frequency of tag occurrence across artists. 4 Experiments To test our model we selected the 60 most popular tags from the Last.fm crawl data described in Section 2. These tags included genres such as “Rock”, “Electronica”, and “Post Punk”, moodrelated terms such as “Chillout”. The full list of tags and frequencies are available in the “extra materials”. We collected MP3s for a subset of the artists obtained in our Audioscrobbler crawl. From those MP3s we extracted several popular acoustic features. In total our training and testing data included 89924 songs for 1277 artists and yielded more than 1 million 5s aggregate features. 4.1 Booster Errors As described above, a classifier was trained to map audio features onto aggregate feature segments for each of the 60 tags. A third of the data was withheld for testing. Because each of the 60 boosters needed roughly 1 day to process, we did not perform cross-validation. However each booster was trained on a large amount of data relative to the number of decision stumps learned, making overfitting a remote possibility. Classification errors are shown in Table 2. These errors are broken down by tag in the annex for this paper. Using 3 bins and balanced classes, the random error is about 67%. Mean Median Min Max Segment 40.93 43.1 21.3 49.6 Song 37.61 39.69 17.8 46.6 Table 2: Summary of test error (%) on predicting bins for songs and segments. 4.2 Evaluation measures We use three measures to evaluate the performance of the model. The first TopN compares two ranked lists, a target “ground truth” list A and our predicted list B. This measure is introduced in [2], and is intended to place emphasis on how well our list predicts the top few items of the target list. Let kj be the position in list B of the jth element from list A. αr = 0.51/3, and αc = 0.52/3, 5 as in [2]. The result is a value between 0 (dissimilar) and 1 (identical top N), si = PN j=1 αj rαkj c PN l=1(αr ∗αc)l (2) For the results produced below, we look at the top N = 10 elements in the lists. Our second measure is Kendall’s Tau, a classic measure in collaborative filtering which measures the number of discordant pairs in 2 lists. Let RA(i) be the rank of the element i in list A, if i is not explicitly present, RA(i) = length(A) + 1. Let C be the number of concordant pairs of elements (i, j), e.g. RA(i) > RA(j) and RB(i) < RB(j). In a similar way, D is the number of discordant pairs. We use τ’s approximation in [8]. We also define TA and TB the number of ties in list A and B. In our case, it’s the number of pairs of artists that are in A but not in B, because they end up having the same position RB = length(B) + 1, and reciprocally. Kendall’s tau value is defined as: τ = C −D sqrt((C + D + TA)(C + D + TB)) (3) Unless otherwise noted, we analyzed the top 50 predicted values for the target and predicted lists. Finally, we compute what we call the TopBucket, which is simply the percentage of common elements in the top N of 2 ranked lists. Here as in Kendall we compare the top 50 predicted values unless otherwise noted. 4.3 Constructing ground truth As has long been acknowledged [4] one of the biggest challenges in addressing this task is to find a reasonable “ground truth” against which to compare our results. We seek a similarity matrix among artists which is not overly biased by current popularity, and which is not built directly from the social tags we are using for learning targets. Furthermore we want to derive our measure using data that is freely available data on the web, thus ruling out commercial services such as AllMusic (www.allmusic.com). Our solution is to construct our ground truth similarity matrix using correlations from the listening habits of Last.fm users. If a significant number of users listen to artists A and B (regardless of the tags they may assign to that artist) we consider those two artists similar. One challenge, of course, is that some users listen to more music than others and that some artists are more popular than others. Text search engines must deal with a similar problem: they want to ensure that frequently used words (e.g., system) do not outweigh infrequently used words (e.g., prestidigitation) and that long documents do not always outweigh short documents. Search engines assign a weight to each word in a document. The weight is meant to represent how important that word is for that document. Although many such weighting schemes have been described (see [11] for a comprehensive review), the most popular is the term frequency-inverse document frequency (or TF×IDF) weighting scheme. TF×IDF assigns high weights to words that occur frequently in a given document and infrequently in the rest of the collection. The fundamental idea is that words that are assigned high weights for a given document are good discriminators for that document from the rest of the collection. Typically, the weights associated with a document are treated as a vector that has its length normalized to one. In the case of LastFM, we can consider an artist to be a “document”, where the “words” of the document are the users that have listened to that artist. The TF×IDF weight for a given user for a given artist takes into account the global popularity of a given artist and ensures that users who have listened to more artists do not automatically dominate users who have listened to fewer artists. The resulting similarity measure seems to us to do a reasonable enough job of capturing artist similarity. Furthermore it does not seem to be overly biased towards popular bands. See “extra material” for some examples. 4.4 Similarity Results One intuitive way to compare autotags and social tags is to look at how well the autotags reproduce the rank order of the social tags. We used the measures in Section 4.2 to measure this on 100 artists not used for training (Table 3). The results were well above random. For example, the top 5 autotags were in agreement with the top 5 social tags 61% of the time. 6 TopN 10 Kendall (N=5) TopBucket (N=5) autotags 0.636 -0.099 61.0% random 0.111 -0.645 8.1% Table 3: Results for all three measures on tag order for 100 out-of-sample artists. A more realistic way to compare autotags and social tags is via their artist similarity predictions. We construct similarity matrices from our autotag results and from the Last.fm social tags used for training and testing. The similarity measure we used wascosine similarity scos(A1, A2) = A1 ∗ A2/(||A1|| ||A2||) where A1 and A2 are tag magnitudes for an artist. In keeping with our interest in developing a commercial system, we used all available data for generating the similarity matrices, including data used for training. (The chance of overfitting aside, it would be unwise to remove The Beatles from your recommender simply because you trained on some of their songs). The similarity matrix is then used to generate a ranked list of similar artists for each artist in the matrix. These lists are used to compute the measures describe in Section 4.2. Results are found at the top in Table 4. One potential flaw in this experiment is that the ground truth comes from the same data source as the training data. Though the ground truth is based on user listening counts and our learning data comes from aggregate tagging counts, there is still a clear chance of contamination. To investigate this, we selected the autotags and social tags for 95 of the artists from the USPOP database [2]. We constructed a ground truth matrix based on the 2002 MusicSeer web survey eliciting similarity rankings between artists from appro 1000 listeners [2]. These results show much closer correspondence between our autotag results and the social tags from Last.fm than the previous test. See bottom, Table 4. Groundtruth Model TopN 10 Kendall 50 TopBucket 20 Last.FM social tags 0.26 -0.23 34.6% autotags 0.118 -0.406 22.5% random 0.005 -0.635 3.9% MusicSeer social tags 0.237 -0.182 29.7% autotags 0.184 -0.161 28.2% random 0.051 -0.224 21.5% Table 4: Performance against Last.Fm (top) and MusicSeer (bottom) ground truth. It is clear from these previous two experiments that our autotag results do not outperform the social tags on which they were trained. Thus we asked whether combining the predictions of the autotags with the social tags would yield better performance than either of them alone. To test this we blended the autotag similarity matrix Sa with the social tag matrix Ss using αSa + (1 −α)Ss. The results shown in Figure 3 show a consistent performance increase when blending the two similarity sources. It seems clear from these results that the autotags are of value. Though they do not outperform the social tags on which they were trained, they do yield improved performance when combined with social tags. At the same time they are driven entirely by audio and so can be applied to new, untagged music. With only 60 tags the model makes some reasonable predictions. When more boosters are trained, it is safe to assume that the model will perform better. 5 Conclusion and future work The work presented here is preliminary, but we believe that a supervised learning approach to autotagging has substantial merit. Our next step is to compare the performance of our boosted model to other approaches such as SVMs and neural networks. The dataset used for these experiments is already larger than those used for published results for genre and artist classification. However, a dataset another order of magnitude larger is necessary to approximate even a small commercial database of music. A further next step is comparing the performance of our audio features with other sets of audio features. 7 Figure 3: Similarity performance results when autotag similarities are blended with social tag similarities. The horizontal line is the performance of the social tags against ground truth. We plan to extend our system to predict many more tags than the current set of 60 tags. We expect the accuracy of our system to improve as we extend our tag set, especially as we add tags such as Classical and Folk that are associated with whole genres of music. We will also continue exploring ways in which the autotag results can drive music visualization. See “extra examples” for some preliminary work. Our current method of evaluating our system is biased to favor popular artists. In the future, we plan to extend our evaluation to include comparisons with music similarity derived from human analysis of music. This type of evaluation should be free of popularity bias. Most importantly, the machine-generated autotags need to be tested in a social recommender. It is only in such a context that we can explore whether autotags, when blended with real social tags, will in fact yield improved recommendations. References [1] Audioscrobbler. Web Services described at http://www.audioscrobbler.net/data/webservices/. [2] A. Berenzweig, B. Logan, D. Ellis, and B. Whitman. A large-scale evaluation of acoustic and subjective music similarity measures. In Proceedings of the 4th International Conference on Music Information Retrieval (ISMIR 2003), 2003. [3] J. Bergstra, N. Casagrande, D. Erhan, D. Eck, and B. K´egl. Aggregate features and AdaBoost for music classification. Machine Learning, 65(2-3):473–484, 2006. [4] D. Ellis, B. Whitman, A. Berenzweig, and S. Lawrence. The quest for ground truth in musical artist similarity. In Proceedings of the 3th International Conference on Music Information Retrieval (ISMIR 2002), 2002. [5] Y. Freund and R.E. Shapire. Experiments with a new boosting algorithm. In Machine Learning: Proceedings of the Thirteenth International Conference, pages 148–156, 1996. [6] B. Gold and N. Morgan. Speech and Audio Signal Processing: Processing and Perception of Speech and Music. Wiley, Berkeley, California., 2000. [7] Jonathan L. Herlocker, Joseph A. Konstan, and John Riedl. Explaining collaborative filtering recommendations. In Computer Supported Cooperative Work, pages 241–250, 2000. [8] Jonathan L. Herlocker, Joseph A. Konstan, Loren G. Terveen, and John T. Riedl. Evaluating collaborative filtering recommender systems. ACM Trans. Inf. Syst., 22(1):5–53, 2004. [9] R. E. Schapire and Y. Singer. Improved boosting algorithms using confidence-rated predictions. Machine Learning, 37(3):297–336, 1999. [10] Brian Whitman and Ryan M. Rifkin. Musical query-by-description as a multiclass learning problem. In IEEE Workshop on Multimedia Signal Processing, pages 153–156. IEEE Signal Processing Society, 2002. [11] Justin Zobel and Alistair Moffat. Exploring the similarity space. SIGIR Forum, 32(1):18–34, 1998. 8
2007
164
3,197
Learning to classify complex patterns using a VLSI network of spiking neurons Srinjoy Mitra†, Giacomo Indiveri† and Stefano Fusi †∇ †Institute of Neuroinformatics, UZH|ETH, Zurich ∇Center for Theoretical Neuroscience, Columbia University, New York srinjoy|giacomo|fusi@ini.phys.ethz.ch Abstract We propose a compact, low power VLSI network of spiking neurons which can learn to classify complex patterns of mean firing rates on–line and in real–time. The network of integrate-and-fire neurons is connected by bistable synapses that can change their weight using a local spike–based plasticity mechanism. Learning is supervised by a teacher which provides an extra input to the output neurons during training. The synaptic weights are updated only if the current generated by the plastic synapses does not match the output desired by the teacher (as in the perceptron learning rule). We present experimental results that demonstrate how this VLSI network is able to robustly classify uncorrelated linearly separable spatial patterns of mean firing rates. 1 Introduction Spike driven synaptic plasticity mechanisms have been thoroughly investigated in recent years to solve two important problems of learning: 1) how to modify the synapses in order to generate new memories 2) how to protect old memories against the passage of time, and the overwriting of new memories by ongoing activity. Temporal patterns of spikes can be encoded with spike-timing dependent plasticity (STDP) mechanisms (e.g. see [1, 2]). However, STDP in its simplest form is not suitable for learning patterns of mean firing rates [3], and most of the proposed STDP learning algorithms solved the problems of memory encoding and memory preservation only for relatively simple patterns of mean firing rates. Recently a new model of stochastic spike-driven synaptic plasticity has been proposed [4] that is very effective in protecting old learned memories, and captures the rich phenomenology observed in neurophysiological experiments on synaptic plasticity, including STDP protocols. It has been shown that networks of spiking neurons that use this synaptic plasticity model can learn to classify complex patterns of spike trains ranging from stimuli generated by auditory/vision sensors to images of handwritten digits from the MNIST database [4]. Here we describe a neuromorphic VLSI implementation of this spike-driven synaptic plasticity model and present classification experiments using the VLSI device that validate the model’s implementation. The silicon neurons and synapses inside the chip are implemented using full custom hybrid analog/digital circuits, and the network’s spikes are received in input and transmitted in output using asynchronous digital circuits. Each spike is represented as an Address-Event, where the address encodes either the source neuron or the destination synapse. This device is part of an increasing collection of spike-based computing chips that have been recently developed within the framework of Address-Event Representation (AER) systems [5, 6]. There are even multiple implementations of the same spike-driven plasticity model being investigated in parallel [7, 8]. The focus of this paper is to show that the VLSI device proposed here can successfully classify complex patterns of spike trains, producing results that are in accordance with the theoretical predictions. 1 Figure 1: Layout of a test chip comprising a network of I&F neurons and plastic synapses. The placement of a single neuron along with its synapses is highlighted in the top part of the figure. Other highlighted circuits are described in the test. In Section 2 we describe the main features of the spike-based plasticity model and show how they are well suited for future scaled CMOS VLSI technologies; in Section 3 we characterize the functionality of the spike-based learning circuits; in Section 4 we show control experiments on the learning properties of the VLSI network; and in Section 5 we present experimental results on complex patterns of mean firing rates. In Section 6 we present the concluding remarks and point out future outlooks and potential applications of this system. 2 Implementation of the spike-based plasticity mechanism Physical implementations of long lasting memories, either biological or electronic, are confronted with two hard limits: the synaptic weights are bounded (they cannot grow indefinitely or become negative), and the resolution of the synapse is limited (i.e. the synaptic weight cannot have an infinite number of states). These constraints, usually ignored by the vast majority of software models, have strong impact on the classification performance of the network, and on its memory storage capacity. It has been demonstrated that the number of random uncorrelated patterns p which can be classified or stored in a network of neurons connected by bounded synapses grows only logarithmically with the number of synapses [9]. In addition, if each synapse has a n stable states (i.e. its weight has to traverse n states to go from the lower bound to the upped bound), then the number of patterns p can grow quadratically n. However, this can happen only in unrealistic scenarios, where fine tuning of the network’s parameters is allowed. In more realistic scenarios where there are inhomogeneities and variability (as is the case for biology and silicon) p is largely independent of n [9]. Therefore, an efficient strategy for implementing long lasting memories in VLSI networks of spiking neurons is to use a large number of synapses with only two stable states (i.e. n = 2), and to modify their weights in a stochastic manner, with a small probability. This slows down the learning process, but has the positive effect of protecting previously stored memories from being overwritten. Using this strategy we can build large networks of spiking neurons with very compact learning circuits (e.g. that do not require local Analog-to-Digital Converters or floating gate cells for storing weight values). By construction, these types of devices operate in a massively parallel fashion and are faulttolerant: even if a considerable fraction of the synaptic circuits is faulty due to fabrication problems, the overall functionality of the chip is not compromised. This can be a very favorable property in view of the potential problems of future scaled VLSI processes. The VLSI test chip used to carry out classification experiments implementing such strategy is shown in Fig. 1. The chip comprises 16 low-power integrate-and-fire (I&F) neurons [5] and 2048 dynamic synapses. It was fabricated using a standard 0.35µm CMOS technology, and occupies an area of 6.1mm2 . We use an AER communication infrastructure that allows the chip to receive and transmit asynchronous events (spikes) off-chip to a workstation (for data logging and prototyping) and/or to other neuromorphic event-based devices [10]. An on-chip multiplexer can be used to reconfigure the neuron’s internal dendritic tree connectivity. A single neuron can be connected to 128, 256, 512 or 1024 synapses. Depending on the multiplexer state the number of active neurons decrease from 16 to 2. In this work we configured the chip to use all 16 neurons with 128 synapses per neuron. The synapses are divided into different functional blocks: 4 are excitatory with fixed (externally adjustable) weights, 4 inhibitory and 120 excitatory with local learning circuits. Every silicon neuron in the chip can be used as a classifier that separates the input patterns into two categories. During training, the patterns to be classified are presented to the pre-synaptic synapses, 2 IEPSC VDN VUP Vmem S1 S2 bistable pre input AER w synapses DPI (a) + Vmth VUP IUP VDN IDN Ik3 Ik2 Ik1 IB Vmem Vspk I[Ca] CC1 CC3 CC2 DPI I&F block Stop Learning Soma (b) Figure 2: (a) Plastic synapse circuits belonging to the neuron’s dendritic tree. The synaptic weight node w is modified when there is a pre-synaptic input (i.e. when S1 and S2 are on) depending on the values of VUP and VDN. In parallel, the bistable circuit slowly drives the node w toward either of its two stable states depending on its amplitude. The DPI is a pulse integrator circuit that produces an Excitatory Post-Synaptic Current (IEPSC), with an amplitude that depends on the synaptic weight w. (b) Neuron’s “soma” block diagram with stop-learning module. It comprises a low-power I&F neuron block, a DPI integrator, a voltage comparator and a three current comparators(CC). Winnertake-all (WTA) circuits are used as current comparators that set the output to be either the bias current IB, or zero. The voltage comparator enables either the IUP or the IDN block, depending on the value of Vmem with respect to Vmth. The voltages VUP and VDN are used to broadcast the values of IUP and IDN to the neuron’s dendritic tree. in parallel with a teacher signal that represents the desired response. The post-synaptic neuron responds with an activity that is proportional to its net input current, generated by the input pattern weighted by the learned synaptic efficacies, and by the teacher signal. If the neuron’s mean activity is in accordance with the teacher signal (typically either very high or very low), then the output neuron produces the correct response. In this case the the synapses should not be updated. Otherwise, the synapses are updated at the time of arrival of the (Poisson distributed) input spikes, and eventually make a transition to one of the two stable states. Such stochasticity, in addition to the ’stop-learning’ mechanism which prevents the synapses from being modified when the output is correct, allows each neuron to classify a wide class of highly correlated, linearly separable patterns. Furthermore, by using more than one neuron per class, it is possible to classify also complex non-linearly separable patterns [4]. 3 The VLSI learning circuits The learning circuits are responsible for locally updating the synaptic weights with the spike-based learning rule proposed in [4]. Upon the arrival of a pre-synaptic spike (an address-event), the plastic synapse circuit updates its weight w according to the spike-driven learning rule. The synapse then produces an Excitatory Post-Synaptic Current (EPSC) with an amplitude proportional to its weight, and with an exponential time course that can be set to last from microseconds to several hundreds of milliseconds [11]. The EPSC currents of all synapses afferent to the target neuron are summed into the neuron’s membrane capacitance, and eventually the I&F neuron’s membrane potential exceeds a threshold and the circuit generates an output spike. As prescribed by the model of [4], the post-synaptic neuron’s membrane potential, together with its mean firing rate are used to determine the weight change values ∆w. These weight change values are expressed in the chip as subthreshold currents. Specifically, the signal that triggers positive weight updates is represented by an IUP current, and the signal that triggers weight decreases if represented by the IDN current. The weight updates are performed locally at each synapse, in a pre-synaptic weight update module, while the ∆w values are computed globally (for each neuron), in a post-synaptic weight control module. 3 0 0.5 1 1.5 2.4 2.6 2.8 3 3.2 VCa 0 0.5 1 1.5 2.6 2.8 3 3.2 VDN 0 0.5 1 1.5 0 0.2 0.4 VUP Time (s) (a) 0 0.01 0.02 0.03 0.04 0.05 0 1 Vmem 0 0.01 0.02 0.03 0.04 0.05 2.6 2.8 3 VDN 0 0.01 0.02 0.03 0.04 0.05 0 0.2 0.4 VUP Time (s) (b) Figure 3: Post-synaptic circuit data. (a) State of the VUP and VDN voltages as a function of the calcium concentration voltage VCa. (b) State of the VUP and VDN voltages as function of the membrane potential Vmem. This data corresponds to a zoomed-version of the data shown in (a) for VCa ≈2.8V. 3.1 Pre-synaptic weight-update module This module, shown in Fig. 2(a), comprises four main blocks: an input AER interfacing circuit [12], a bistable weight refresh circuit, a weight update circuit and a log-domain current-mode integrator, dubbed the “diff-pair integrator” (DPI) circuit, and fully characterized in [11]. Upon the arrival of an input event (pre-synaptic spike), the asynchronous AER interfacing circuits produce output pulses that activate switches S1 and S2. Depending on the values of IUP and IDN, mirrored from the postsynaptic weight control module, the node w charges up, discharge toward ground, or does not get updated. The same input event activates the DPI circuit that produces an EPSC current (IEPSC) with an amplitude that depends on the synaptic weight value w. In parallel, the bistable weight refresh circuit slowly drives w toward one of two stable states depending on whether it is higher or lower than a set threshold value. The two stable states are global analog parameters, set by external bias voltages. 3.2 Post-synaptic weight control module This module is responsible for generating the two global signals VUP and VDN, mirrored to all synapses belonging to the same dendritic tree. Post-synaptic spikes (Vspk), generated in the soma are integrated by an other instance of the DPI circuit to produce a current ICa proportional to the neuron’s average spiking activity. This current is compared to three threshold values, Ik1, Ik2, and Ik3 of Fig. 2(b), using three current-mode winner-take-all circuits [13]. In parallel, the instantaneous value of the neuron’s membrane potential Vmem is compared to the threshold Vmth (see Fig. 2(b)). The values of IUP and IDN depend on the state of the neuron’s membrane potential and its average frequency. Specifically, if Ik1 < ICa < Ik3 and Vmem > Vmth, then IUP = IB. If Ik1 < ICa < Ik2 and Vmem < Vmth, then IDN = IB. Otherwise both IUP, and IDN are null. To characterize these circuits we injected a step current in the neuron, produced a regular output mean firing rate, and measured the voltages VCa, VUP, and VDN (see Fig. 3(a)). VCa is the gate voltage of the P-FET transistor producing ICa, while VDN, VUP are the gate voltages of the P- and N-FET transistors mirroring IDN and IUP respectively (Fig. 2(a)). The neuron’s spikes are integrated and the output current ICa increases with an exponential profile over time (VCa decreases accordingly over time, as shown in Fig. 3(a)). The steady-state asymptotic value depends on the average input frequency, as well as the circuit’s bias parameters [11]. As ICa becomes larger than the first threshold Ik1 (VCa decreases below the corresponding threshold voltage) both VUP and VDN are activated. When ICa becomes larger than the second threshold Ik2 the VDN signal is deactivated, and finally as ICa becomes larger than the third threshold Ik3, also the VUP signal is switched off. The small ∼ 300mV changes in VUP and VDN produce subthreshold currents (IUP and IDN) that are mirrored to the synapses (Fig. 2(a)). In Fig. 3(b) the VDN and VUP signals are zoomed in along with the membrane potential of the post-synaptic neuron (Vmem), for values of VCa ∼2.8V. Depending on the state of 4 0 0.05 0.1 0.15 0.2 0.25 0 0.5 1 1.5 Vmem 0 0.05 0.1 0.15 0.2 0.25 1.5 2 2.5 3 Vw 0 0.05 0.1 0.15 0.2 0.25 0 2 pre Time(s) (a) 0 0.05 0.1 0.15 0.2 0.25 0 0.5 1 1.5 Vmem 0 0.05 0.1 0.15 0.2 0.25 1.5 2 2.5 3 Vw 0 0.05 0.1 0.15 0.2 0.25 0 2 pre Time(s) (b) Figure 4: Stochastic synaptic LTP transition: in both sub-figures the non-plastic synapse is stimulated with Poisson distributed spikes at a rate of 250Hz, making the post-synaptic neuron fire at approximately 80Hz; and the plastic synapse is stimulated with Poisson distributed spike trains of 100Hz. (a) The updates in the synaptic weight did not produce any LTP transition during the 250ms stimulus presentation. (b) The updates in the synaptic weight produced an LTP transition that remains consolidated. Vmem, the signals VUP and VDN are activated or inactivated. When not null, currents IUP and IDN are complementary in nature: only one of the two is equal to IB. 4 Stochastic plasticity To characterize the stochastic nature of the weight update process we stimulated the neuron’s plastic synapses with Poisson distributed spike trains. When any irregular spike train is used as a presynaptic input, the synaptic weight voltage crosses the synapse bistability threshold in a stochastic manner, and the probability of crossing the threshold depends on the input’s mean frequency. Therefore Long Term Potentiation (LTP) or Long Term Depression (LTD) occur stochastically even when the mean firing rates of the input and the output are always the same. In Fig. 4 we show two instances of a learning experiment in which the mean input firing rate (bottom row) was 100Hz, and the mean output firing rate (top row) was 80Hz. Although these frequencies were the same for both experiments, LTP occurred only in one of the two cases (compare synaptic weight changes in middle row of both panels). In this experiment we set the efficacy of the “high” state of all plastic synapses to a relatively low value. In this way the neuron’s mean output firing rate depends primarily on the teacher signal, irrespective of the states of plastic synapses. One essential feature of this learning rule is the non-monotonicity of both the LTP/LTD probabilities as a function of the post-synaptic firing frequency νpost [4]. Such a non-monotonicity is essential to slow down and eventually stop-learning when νpost is very high or very low (indicating that the learned synaptic weights are already correctly classifying the input pattern). In Fig. 5 we show experimental results where we measured the LTP and LTD transitions of 60 synapses over 20 training sessions: for the LTD case (top row) we initialized the synapses to a high state (white pixel) and plotted a black pixel if its final state was low, at the end of the training session. The transitions (white to black) are random in nature and occur with a probability that first increases and then decreases with νpost. An analogous experiment was done for the LTP transitions (bottom row), but with complementary settings (the initial state was set to a low value). In Fig. 5(b) we plot the LTD (top row) and LTP (bottom row) probabilities measured for a single synapse. The shape of these curves can be modified by acting on the post-synaptic weight control module bias parameters such as Ik1−k3, or IB. 5 5 Synapse number 1 20 40 20 100 180 320 500 700 900 Synapse number 1 20 1 20 40 (a) 0 0.5 1 p(LTD) 0 200 400 600 0 0.5 1 νpost(Hz) p(LTP) (b) Figure 5: (a) LTD and LTP transitions of 60 synapses measured across 20 trials, for different values of post-synaptic frequency νpost (top label on each panel). Each black pixel represents a low synaptic state, and white pixel a high one. On x-axis of each panel we plot the trial number (1 to 20) and y-axis shows the state of the synapses at the end of each trial. In the top row we show the LTD transitions that occur after initializing all the synapses to high state. In the bottom row we show the LTP transition that occur after initializing the synapses to low state. The transitions are stochastic and the LTP/LTD probabilities peak at different frequencies before falling down at higher νpost validating the stop-learning algorithm. No data was taken for the gray panels. (b) Transition probabilities measured for a single synapse as a function νpost. The transition probabilities can be reduced by decreasing the value of IB. The probability peaks can also be modified by changing the biases that set Ik1−k3. (Fig. 2(b)) Integrate and Fire neuron T + T− C+ C Excitatory synapse, non−plastic Inhibitory synapse, non−plastic Excitatory synapse, plastic High input state (30Hz) Low input state (2Hz) Figure 6: A typical training scenario with 2 random binary spatial patterns. High and low inputs are encoded with generate Poisson spike trains with mean frequencies of 30Hz and 2Hz respectively. Binary patterns are assigned to the C+ or C−class arbitrarily. During training patterns belonging to the C+ class are combined with a T + (teacher) input spike train of with 250Hz mean firing rate. Similarly, patterns belonging to the C−class are combined with a T −spike train of 20Hz mean firing rate. New Poisson distributed spike trains are generated for each training iterations. 5 Classification of random spatial patterns In order to evaluate the chip’s classification ability, we used spatial binary patterns of activity, randomly generated (see Fig. 6). The neuron’s plastic synapses were stimulated with Poisson spike trains of either high (30Hz) or low (2Hz) mean firing rates. The high/low binary state of the input was chosen randomly, and the number of synapses used was 60. Each 60-input binary pattern was then randomly assigned to either a C+ or a C−class. During training, spatial patterns belonging to the C+ class are presented to the neuron in conjunction with a T + teacher signal (i.e. a 250Hz Poisson spike train). Conversely patterns belonging to the C−class are combined with a T −teacher signal of 20Hz. The T + and T −spike trains are presented to the neuron’s non-plastic synapses. Training sessions with C+ and C−patterns are interleaved in a random order, for 50 iterations. Each stimulus presentation lasted 500ms, with new Poisson distributions generated at each training session. 6 After training, the neuron is tested to see if it can correctly distinguish between patterns belonging to the two classes C+ and C−. The binary patterns used during training are presented to the neuron without the teacher signal, and the neuron’s mean firing rate is measured. In Fig. 7(a) we plot the responses of two neurons labeled neuron-A and neuron-B. Neuron-A was trained to produce a high output firing rate in response to patterns belonging to class C+, while neuron-B was trained to respond to patterns belonging to class C−. As shown, a single threshold (e.g. at 20Hz) is enough to classify the output in C+ (high frequency) and C−(low frequency) class. 1 2 3 4 0 20 40 60 80 neuron−A νpost(Hz) 1 2 3 4 neuron−B (a) 0 0.5 p(νpost) 0 50 100 150 0 0.5 νpost(Hz) p(νpost) (b) Figure 7: Classification results, after training on 4 patterns. (a) Mean output frequencies of neurons trained to recognize class C+ patterns (Neuron-A), and class C−patterns (Neuron-B). Patterns 1,2 belong to class C+, while patterns 3,4 belong to class C−. (b) Output frequency probability distribution, for all C+ patterns (top) and C−patterns (bottom) computed over 20 independent experiments. Fig. 7(b) shows the probability distribution of post-synaptic frequencies (of neuron-A) over different classification experiments, each done with new sets of random spatial patterns. To quantify the chip’s classification behavior statistically, we employed a Receiver Operating Characteristics (ROC) analysis [14]. Figure 8(a) shows the area under the ROC curve (AUC) plotted on y-axis for increasing number of patterns. An AUC magnitude of 1 represents 100% correct classification while 0.5 represents chance level. In Fig. 8(b) the storage capacity (p) –expressed as the number of patterns with AUC larger than 0.75– is plotted against the number of synapses N. The top and bottom traces show the theoretical predictions from [3], with (p∝2 √ N) and without (p∝ √ N) the stop learning condition, respectively. The performance of the VLSI system with 20, 40 and 60 synapses and the stop-learning condition lie within the two theoretical curves. 6 Conclusions We implemented in a neuromorphic VLSI device a recently proposed spike-driven synaptic plasticity model that can classify complex patterns of spike trains [4]. We presented results from the VLSI chip that demonstrate the correct functionality of the spike-based learning circuits, and performed classification experiments of random uncorrelated binary patterns, that confirm the theoretical predictions. Additional experiments have demonstrated that the chip can be applied to the classification of correlated spatial patterns of mean firing rates and as well [15]. To our knowledge, the classification performance achieved with this chip has not yet been reported for any other silicon system. These results show that the device tested can perform real-time classification of sequences of spikes, and is therefore an ideal computational block for adaptive neuromorphic sensory-motor systems and brain-machine interfaces. Acknowledgment This work was supported by the Swiss National Science Foundation grant no. PP00A106556, the ETH grant no. TH02017404, and by the EU grants ALAVLSI (IST-2001-38099) and DAISY (FP62005-015803). 7 2 4 6 8 10 12 0.5 0.6 0.7 0.8 0.9 1 # patterns AUC (a) 20 40 60 0 5 10 15 # input synapses Storage capacity (b) Figure 8: (a). Area under ROC curve (AUC) measured by performing 50 classification experiments. (b) Storage capacity (number of patterns with AUC value ≥0.75) as a function of the number of plastic synapses used. The solid line represents the data obtained from chip, while top and bottom traces represent the theoretical predictions with and without the stop learning condition. References [1] R. G¨utig and H. Sompolinsky. The tempotron: a neuron that learns spike timing–based decisions. Nature Neuroscience, 9:420–428, 2006. [2] R.A. Legenstein, C. N¨ager, and W. Maass. What can a neuron learn with spike-timing-dependent plasticity? Neural Computation, 17(11):2337–2382, 2005. [3] S. Fusi and W. Senn. Eluding oblivion with smart stochastic selection of synaptic updates. Chaos, An Interdisciplinary Journal of Nonlinear Science, 16(026112):1–11, 2006. [4] J. Brader, W. Senn, and S. Fusi. Learning real world stimuli in a neural network with spike-driven synaptic dynamics. Neural Computation, 2007. (In press). [5] G. Indiveri, E. Chicca, and R. Douglas. A VLSI array of low-power spiking neurons and bistable synapses with spike–timing dependent plasticity. IEEE Transactions on Neural Networks, 17(1):211–221, Jan 2006. [6] J. Arthur and K. Boahen. Learning in silicon: Timing is everything. In Y. Weiss, B. Sch¨olkopf, and J. Platt, editors, Advances in Neural Information Processing Systems 18. MIT Press, Cambridge, MA, 2006. [7] D. Badoni, M. Giulioni, V. Dante, and P. Del Giudice. An aVLSI recurrent network of spiking neurons with reconfigurable and plastic synapses. In Proceedings of the IEEE International Symposium on Circuits and Systems, pages 1227–1230. IEEE, IEEE, May 2006. [8] G. Indiveri and S. Fusi. Spike-based learning in VLSI networks of integrate-and-fire neurons. In Proc. IEEE International Symposium on Circuits and Systems, ISCAS 2007, pages 3371–3374, 2007. [9] S. Fusi and L. F. Abbott. Limits on the memory storage capacity of bounded synapses. Nature Neuroscience, 10:485–493, 2007. [10] E. Chicca, P. Lichtsteiner, T. Delbr¨uck, G. Indiveri, and R.J. Douglas. Modeling orientation selectivity using a neuromorphic multi-chip system. In Proceedings of IEEE International Symposium on Circuits and Systems, pages 1235–1238. IEEE, 2006. [11] C. Bartolozzi and G. Indiveri. Synaptic dynamics in analog VLSI. Neural Computation, 19:2581–2603, Oct 2007. [12] K. A. Boahen. Point-to-point connectivity between neuromorphic chips using address-events. IEEE Transactions on Circuits and Systems II, 47(5):416–34, 2000. [13] J. Lazzaro, S. Ryckebusch, M.A. Mahowald, and C.A. Mead. Winner-take-all networks of O(n) complexity. In D.S. Touretzky, editor, Advances in neural information processing systems, volume 2, pages 703–711, San Mateo - CA, 1989. Morgan Kaufmann. [14] T. Fawcett. An introduction to ROC analysis. Pattern Recognition Letters, (26):861–874, 2006. [15] S. Mitra, G. Indiveri, and S. Fusi. Robust classification of correlated patterns with a neuromorphic VLSI network of spiking neurons. In IEEE Proceedings on Biomedical Circuits and Systems (BioCAS08), 2008. (In press). 8
2007
165
3,198
Efficient Convex Relaxation for Transductive Support Vector Machine Zenglin Xu Dept. of Computer Science & Engineering The Chinese University of Hong Kong Shatin, N.T., Hong Kong zlxu@cse.cuhk.edu.hk Rong Jin Dept. of Computer Science & Engineering Michigan State University East Lansing, MI, 48824 rongjin@cse.msu.edu Jianke Zhu Irwin King Michael R. Lyu Dept. of Computer Science & Engineering The Chinese University of Hong Kong Shatin, N.T., Hong Kong {jkzhu,king,lyu}@cse.cuhk.edu.hk Abstract We consider the problem of Support Vector Machine transduction, which involves a combinatorial problem with exponential computational complexity in the number of unlabeled examples. Although several studies are devoted to Transductive SVM, they suffer either from the high computation complexity or from the solutions of local optimum. To address this problem, we propose solving Transductive SVM via a convex relaxation, which converts the NP-hard problem to a semi-definite programming. Compared with the other SDP relaxation for Transductive SVM, the proposed algorithm is computationally more efficient with the number of free parameters reduced from O(n2) to O(n) where n is the number of examples. Empirical study with several benchmark data sets shows the promising performance of the proposed algorithm in comparison with other state-of-the-art implementations of Transductive SVM. 1 Introduction Semi-supervised learning has attracted an increasing amount of research interest recently [3, 15]. An important semi-supervised learning paradigm is the Transductive Support Vector Machine (TSVM), which maximizes the margin in the presence of unlabeled data and keeps the boundary traversing through low density regions, while respecting labels in the input space. Since TSVM requires solving a combinatorial optimization problem, extensive research efforts have been devoted to efficiently finding the approximate solution to TSVM. The popular version of TSVM proposed in [8] uses a label-switching-retraining procedure to speed up the computation. In [5], the hinge loss in TSVM is replaced by a smooth loss function, and a gradient descent method is used to find the decision boundary in a region of low density. Chapelle et al. [2] employ an iterative approach for TSVM. It begins with minimizing an easy convex object function, and then gradually approximates the objective of TSVM with more complicated functions. The solution of the simple function is used as the initialization for the solution to the complicated function. Other iterative methods, such as deterministic annealing [11] and the concave-convex procedure (CCCP) method [6], are also employed to solve the optimization problem related to TSVM. The main drawback of the approximation methods listed above is that they are susceptible to local optima, and therefore are sensitive to the initialization of solutions. To address this problem, in [4], a branch50 100 150 200 250 300 0 200 400 600 800 1000 1200 1400 1600 1800 2000 Number of Samples Time (seconds) Time Comparison CTSVM RTSVM Figure 1: Computation time of the proposed convex relaxation approach for TSVM (i.e., CTSVM) and the semi-definite relaxation approach for TSVM (i.e., RTSVM) versus the number of unlabeled examples. The Course data set is used, and the number of labeled examples is 20. and-bound search method is developed to find the exact solution. In [14], the authors approximate TSVM by a semi-definite programming problem, which leads to a relaxation solution to TSVM (noted as RTSVM), to avoid the solution of local optimum. However, both approaches suffer from the high computational cost and can only be applied to small sized data sets. To this end, we present the convex relaxation for Transductive SVM (CTSVM). The key idea of our method is to approximate the non-convex optimization problem of TSVM by its dual problem. The advantage of doing so is twofold: • Unlike the semi-definite relaxation [14] that approximates TSVM by dropping the rank constraint, the proposed approach approximates TSVM by its dual problem. As the basic result of convex analysis, the conjugate of conjugate of any function f(x) is the convex envelope of f(x), and therefore provides a tighter convex relaxation for f(x) [7]. Hence, the proposed approach provides a better convex relaxation than that in [14] for the optimization problem in TSVM. • Compared to the semi-definite relaxation TSVM, the proposed algorithm involves fewer free parameters and therefore significantly improves the efficiency by reducing the worstcase computational complexity from O(n6.5) to O(n4.5). Figure 1 shows the running time of both the semi-definite relaxation of TSVM in [14] and the proposed convex relaxation for TSVM versus increasing number of unlabeled examples. The data set used in this example is the Course data set (see the experiment section), and the number of labeled examples is 20. We clearly see that the proposed convex relaxation approach is considerably more efficient than the semi-definition approach. The rest of this paper is organized as follows. Section 2 reviews the related work on the semidefinite relaxation for TSVM. Section 3 presents the convex relaxation approach for Transductive SVM. Section 4 presents the empirical studies that verify the effectiveness of the proposed relaxation for TSVM. Section 5 sets out the conclusion. 2 Related Work In this section, we review the key formulae for Transductive SVM, followed by the semi-definite programming relaxation for TSVM. Let X = (x1, . . . , xn) denote the entire data set, including both the labeled examples and the unlabeled ones. We assume that the first l examples within X are labeled by yℓ= (yℓ 1, yℓ 2, . . . , yℓ l ) where yℓ i ∈{−1, +1} represents the binary class label assigned to xi. We further denote by y = (y1, y2, . . . , yn) ∈{−1, +1}n the binary class labels predicted for all the data points in X. The goal of TSVM is to estimate y by using both the labeled examples and the unlabeled ones. Following the framework of maximum margin, TSVM aims to identify the classification model that will result in the maximum classification margin for both labeled and unlabeled examples, which amounts to solve the following optimization problem: min w,b,y∈{−1,+1}n,ε ∥w∥2 2 + C n X i=1 εi s. t. yi(w⊤xi −b) ≥1 −εi, εi ≥0, i = 1, 2, . . . , n yi = yℓ i, i = 1, 2, . . . , l, where C ≥0 is the trade-off parameter between the complexity of function w and the margin errors. The prediction function can be formulated as f(x) = w⊤x −b. Evidently, the above problem is a non-convex optimization problem due to the product term yiwj in the constraint. In order to approximate the above problem into a convex programming problem, we first rewrite the above problem into the following form using the Lagrange Theorem: min ν,y∈{−1,+1}n,δ,λ 1 2(e + ν −δ + λy)⊤D(y)K−1D(y)(e + ν −δ + λy) + Cδ⊤e (1) s. t. ν ≥0, δ ≥0, yi = yℓ i, i = 1, 2, . . . , l, where ν, δ and λ are the dual variables. e is the n-dimensional column vector of all ones and K is the kernel matrix. D(y) represents a diagonal matrix whose diagonal elements form the vector y. Detailed derivation can be found in [9, 13]. Using the Schur complement, the above formulation can be further formulated as follows: min y∈{−1,+1}n,t,ν,δ,λ t (2) s. t. µ yy⊤◦K e + ν −δ + λy (e + ν −δ + λy)⊤ t −2Cδ⊤e ¶ ⪰0 ν ≥0, δ ≥0, yi = yℓ i, i = 1, 2, . . . , l, where the operator ◦represents the element wise product. To convert the above problem into a convex optimization problem, the key idea is to replace the quadratic term yy⊤by a linear variable. Based on the result that the set Sa = {M = yy⊤|y ∈ {−1, +1}n} is equivalent to the set Sb = {M|Mi,i = 1, rank(M) = 1}, we can approximate the problem in (2) as follows: min M,t,ν,δ,λ t (3) s. t. µ M ◦K e + ν −δ (e + ν −δ)⊤ t −2Cδ⊤e ¶ ⪰0 ν ≥0, δ ≥0, M ⪰0, Mi,i = 1, i = 1, 2, . . . , n, where Mij = yℓ iyℓ j for 1 ≤i, j ≤l. Note that the key differences between (2) and (3) are (a) the rank constraint rank(M) = 1 is removed, and (b) the variable λ is set to be zero, which is equivalent to setting b = 0. The above approximation is often referred to as the Semi-Definite Programming (SDP) relaxation. As revealed by the previous studies [14, 1], the SDP programming problem resulting from the approximation is computationally expensive. More specifically, there are O(n2) parameters in the SDP cone and O(n) linear inequality constraints, which implies a worst-case computational complexity of O(n6.5). To avoid the high computational complexity, we present a different approach for relaxing TSVM into a convex problem. Compared to the SDP relaxation approach, it is advantageous in that (1) it produces the best convex approximation for TSVM, and (2) it is computationally more efficient than the previous SDP relaxation. 3 Relaxed Transductive Support Vector Machine In this section, we follow the work of generalized maximum margin clustering [13] by first studying the case of hard margin, and then extending it to the case of soft margin. 3.1 Hard Margin TSVM In the hard margin case, SVM does not penalize the classification error, which corresponds to δ = 0 in (1). The resulting formulism of TSVM becomes min ν,y,λ 1 2(e + ν + λy)⊤D(y)K−1D(y)(e + ν + λy) (4) s. t. ν ≥0, yi = yℓ i, i = 1, 2, . . . , l, y2 i = 1, i = l + 1, l + 2, . . . , n. Instead of employing the SDP relaxation as in [14], we follow the work in [13] and introduce a variable z = D(y)(e + ν) = y ◦(e + ν). Given that ν ≥0, the constraints in (4) can be written as yℓ izi ≥1 for the labeled examples, and z2 i ≥1 for all the unlabeled examples. Hence, z can be used as the prediction function, i.e., f ∗= z. Using this new notation, the optimization problem in (4) can be rewritten as follows: min z,λ 1 2(z + λe)⊤K−1(z + λe) (5) s. t. yℓ izi ≥1, i = 1, 2, . . . , l, z2 i ≥1, i = l + 1, l + 2, . . . , n. One problem with Transductive SVMs is that it is possible to classify all the unlabeled data to one of the classes with a very large margin due to the high dimension and few labeled data. This will lead to poor generalization ability. To solve this problem, we introduce the following balance constraint to ensure that no class takes all the unlabeled examples: −ϵ ≤1 l l X i=1 zi − 1 n −l n X i=l+1 zi ≤ϵ, (6) where ϵ ≥0 is a constant. Through the above constraint, we aim to ensure that the difference between the labeled data and the unlabeled data in their class assignment is small. To simplify the expression, we further define w = (z, λ) ∈Rn+1 and P = (In, e) ∈Rn×(n+1). Then, the problem in (5) becomes: min w w⊤P⊤K−1Pw (7) s. t. yℓ iwi ≥1, i = 1, 2, . . . , l, w2 i ≥1, i = l + 1, l + 2, . . . , n, −ϵ ≤1 l l X i=1 wi − 1 n −l n X i=l+1 wi ≤ϵ. When this problem is solved, the label vector y can be directly determined by the sign of the prediction function, i.e., sign(w). This is because wi = (1 + ν)yi for i = l + 1, . . . , n and ν ≥0. The following theorem shows that the problem in (7) can be relaxed to a semi-definite programming. Theorem 1. Given a sample X = {x1, . . . , xn} and a partial set of the labels yℓ= (yℓ 1, yℓ 2, . . . , yℓ l ) where 1 ≤l ≤n, the variable w that optimizes (7) can be calculated by w = 1 2 [A −D(γ ◦b)]−1 (γ ◦a −(α −β)c), (8) where a = (yl, 0n−l, 0) ∈Rn+1, b = (0l, 1n−l, 0) ∈Rn+1, c = ( 1 l 1l, −1 u1n−l, 0) ∈Rn+1, A = P⊤K−1P, and γ is determined by the following semi-definite programming: max γ,t,α,β −1 4t + n X i=1 γi −ϵ(α + β) (9) s. t. µ A −D(γ ◦b) γ ◦a −(α −β)c, (γ ◦a −(α −β)c)⊤ t ¶ ⪰0 α ≥0, β ≥0, γi ≥0, i = 1, 2, . . . , n. Proof Sketch. We define the Lagrangian of the minimization problem (7) as follows: min w max γ F(w, γ) = w⊤P⊤K−1Pw + l X i=1 γi(1 −yℓ iwi) + n X i=l+1 γi(1 −w2 i ) +α(c⊤w −ϵ) + β(−c⊤w −ϵ), where γi ≥0 for i = 1, . . . , n. It can be derived from the duality that minw maxγ F(w, γ) = maxγ minw F(w, γ). At the optimum, the derivatives of F with respect to the variable w are derived as below: ∂F ∂w = 2 [A −D(γ ◦b)] w −γ ◦a + (α −β)c = 0, where A = P⊤K−1P. The inverse of A−D(γ◦b) can be computed through adding a regularization parameter. Therefore, w is able to be calculated by: w = 1 2 [A −D(γ ◦b)]−1 (γ ◦a −(α −β)c). Thus, the dual form of the problem becomes: max γ L(γ) = −1 4(γ ◦a −(α −β)c)⊤[A −D(b ◦γ)]−1 (γ ◦a −(α −β)c) + n X i=1 γi −ϵ(α + β), We import a variable t, so that −1 4(γ ◦a −(α −β)c)⊤[A −D(b ◦γ)]−1(γ ◦a −(α −β)c) ≥−t. According to the Schur Complement, we obtain a semi-definite programming cone, from which the optimization problem (9) can be formulated. ■ Remark I. The problem in (9) is a convex optimization problem, more specifically, a semi-definite programming problem, and can be efficiently solved by the interior-point method [10] implemented in some optimization packages, such as SeDuMi [12]. Besides, our relaxation algorithm has O(n) parameters in the SDP cone and O(n) linear equality constraints, which involves a worst-case computational complexity of O(n4.5). However, in the previous relaxation algorithms [1, 14], there are approximately O(n2) parameters in the SDP cone, which involve a worst-case computational complexity in the scale of O(n6.5). Therefore, our proposed convex relaxation algorithm is more efficient. In addition, as analyzed in Section 2, the approximation in [1, 14] drops the rank constraint of the matrix y⊤y, which does not lead to a tight approximation. On the other hand, our prediction function f ∗implements the conjugate of conjugate of the prediction function f(x), which is the convex envelope of f(x) [7]. Thus, our proposed convex approximation method provides a tighter approximation than the previous method. Remark II. It is interesting to discuss the connection between the solution of the proposed algorithm and that of harmonic functions. We consider a special case of (8), where λ = 0 (which implies no bias term in the primal SVM), and there is no balance constraint. Then the solution of (9) can be expressed as follows: z = 1 2 £ K−1 −D(γ ◦(0l, 1n−l)) ¤−1 (γ ◦(yl, 0n−l)). (10) It can be further derived as follows: z = Ã In − n X i=l+1 γiKIi n !−1 Ã l X i=1 γiyℓ iK(xi, ·) ! , (11) where Ii n is defined as an n × n matrix with all elements being zero except the i-th diagonal element which is 1, and K(xi, ·) is the i-th column of K. Similar to the solution of the harmonic function, we first propagate the class labels from the labeled examples to the unlabeled one by term Pl i=1 γiyℓ iK(xi, ·), and then adjust the prediction labels by the factor ¡ In −Pn i=l+1 γiKIi n ¢−1. The key difference in our solution is that (1) different weights (i.e., γi) are assigned to the labeled examples, and (2) the adjustment factor is different to that in the harmonic function [16]. 3.2 Soft Margin TSVM We extend TSVM to the case of soft margin by considering the following problem: min ν,y,δ,λ 1 2(e + ν −δ + λy)⊤D(y)K−1D(y)(e + ν −δ + λy) + Cℓ l X i=1 δ2 i + Cu n X i=l+1 δ2 i s. t. ν ≥0, δ ≥0, yi = yℓ i, 1 ≤i ≤l, y2 i = 1, l + 1 ≤i ≤n, where δi is related to the margin error. Note that we distinguish the labeled examples from the unlabeled examples by introducing different penalty constants for margin errors, Cℓfor labeled examples and Cu for unlabeled examples. Similarly, we introduce the slack variable z, and then derive the following dual problem: max γ,t,α,β −1 4t + n X i=1 γi −ϵ(α + β) (12) s. t. µ A −D(γ ◦b) γ ◦a −(α −β)c (γ ◦a −(α −β)c)⊤ t ¶ ⪰0, 0 ≤γi ≤Cℓ, i = 1, 2, . . . , l, 0 ≤γi ≤Cu, i = l + 1, l + 2, . . . , n, α ≥0, β ≥0, which is also a semi-definite programming problem and can be solved similarly. 4 Experiments In this section, we report empirical study of the proposed method on several benchmark data sets. 4.1 Data Sets Description To make evaluations comprehensive, we have collected four UCI data sets and three text data sets as our experimental testbeds. The UCI data sets include Iono, sonar, Banana, and Breast, which are widely used in data classification. The WinMac data set consists of the classes, mswindows and mac, of the Newsgroup20 data set. The IBM data set contains the classes, IBM and non-IBM, of the Newsgroup20 data set. The course data set is made of the course pages and non-course pages of the WebKb corpus. For each text data set, we randomly sample the data with the sample size of 60, 300 and 1000, respectively. Each resulted sample is noted by the suffix, “-s”, “-m”, or “-l” depending on whether the sample size is small, medium or large. Table 1 describes the information of these data sets, where d represents the data dimensionality, l means the number of labeled data points, and n denotes the total number of examples. Table 1: Data sets used in the experiments, where d represents the data dimensionality, l means the number of labeled data points, and n denotes the total number of examples. Data set d l n Data set d l n Iono 34 20 351 WinMac-m 7511 20 300 Sonar 60 20 208 IBM-m 11960 20 300 Banana 4 20 400 Course-m 1800 20 300 Breast 9 20 300 WinMac-l 7511 50 1000 IBM-s 11960 10 60 IBM-l 11960 50 1000 Course-s 1800 10 60 Course-l 1800 50 1000 4.2 Experimental Protocol To evaluate the effectiveness of the proposed CTSVM method, we choose the conventional SVM as our baseline method. In our experiments, we also make comparisons with three state-of-the-art methods: the SVM-light algorithm [8], the Gradient Decent TSVM (∇TSVM) algorithm [5], and the Concave Convex Procedure (CCCP) [6]. Since the SDP approximation TSVM [14] has very high time complexity O(n6.5), which is difficult to process data sets with hundreds of examples. Thus, it is only evaluated on the smaller data sets, i.e., “IBM-s” and “Course-s”. The experiment setup is described as follows. For each data set, we conduct 10 trials. In each trial, the training set contains each class of data, and the remaining data are then used as the unlabeled (test) data. Moreover, the RBF kernel is used for “Iono”, “Sonar” and “Banana”, and the linear kernel is used for the other data sets. This is because the linear kernel performs better than the RBF kernel on these data sets. The kernel width of RBF kernel is chosen by 5-cross validation on the labeled data. The margin parameter Cℓis tuned by using the labeled data in all algorithms. Due to the small number of labeled examples, for CTSVM and CCCP, the margin parameter for unlabeled data, Cu, is set equal to Cℓ. Other parameters in these algorithms are set to the default values according to the relevant literatures. 4.3 Experimental Results Table 2: The classification performance of Transductive SVMs on benchmark data sets. Data Set SVM SVM-light ∇TSVM CCCP CTSVM Iono 78.55±4.83 78.25±0.36 81.72±4.50 82.11±3.83 80.09±2.63 Sonar 51.76±5.05 55.26±5.88 69.36±4.69 56.01±6.70 67.39±6.26 Banana 58.45±7.15 71.54±7.28 79.33±4.22 79.51±3.02 Breast 96.46±1.18 95.68±1.82 97.17±0.35 96.89±0.67 97.79±0.23 IBM-s 52.75±15.01 67.60±9.29 65.80±6.56 65.62±14.83 75.25±7.49 Course-s 63.52±5.82 76.82±4.78 75.80±12.87 74.20±11.50 79.75±8.45 WinMac-m 57.64±9.58 79.42±4.60 81.03±8.23 84.28±8.84 84.82±2.12 IBM-m 53.00±6.83 67.55±6.74 64.65±13.38 69.62±11.03 73.17±0.89 Course-m 80.18±1.27 93.89±1.49 90.35±3.59 88.78±2.87 92.92±2.28 WinMac-l 60.86±10.10 89.81±2.10 90.19±2.65 91.00±2.42 91.25±2.67 IBM-l 61.82±7.26 75.40±2.26 73.11±1.99 74.80±1.87 73.42±3.23 Course-l 83.56±3.10 92.35±3.02 93.58±2.68 91.32±4.08 94.62±0.97 Table 2 summarizes the classification accuracy and the standard deviations of the proposed algorithm, the baseline method and the state-of-the-art methods. It can be observed that our proposed algorithm performs significantly better than the standard SVM across all the data sets. Moreover, on the small-size data sets, i.e., “IBM-s” and “Course-s”, the results of the SDP-relaxation method are 68.57±22.73 and 64.03±7.65, which are worse than the proposed CTSVM method. In addition, the proposed CTSVM algorithm performs much better than other TSVM methods over “WinMac-m” and “Course-l”. As shown in Table 2, the SVM-light algorithm achieves the best results on “Coursem” and “IBM-l”, however, it fails to converge on “Banana”. On the remaining data sets, comparable results have been obtained for our proposed algorithm. From above, the empirical evaluations indicate that our proposed CTSVM method achieves promising classification results comparing with the state-of-the-art methods. 5 Conclusion and Future Work This paper presents a novel method for Transductive SVM by relaxing the unknown labels to the continuous variables. In contrast to the previous relaxation method which involves O(n2) free parameters in the semi-definite matrix, our method takes the advantages of reducing the number of free parameters to O(n), and can solve the optimization problem more efficiently. In addition, the proposed approach provides a tighter convex relaxation for the optimization problem in TSVM. Empirical studies on benchmark data sets demonstrate that the proposed method is more efficient than the previous semi-definite relaxation method and achieves promising classification results comparing to the state-of-the-art methods. As the current model is only designed for a binary-classification, we plan to develop a multi-class Transductive SVM model in the future. Moreover, it is desirable to extend the current model to classify the new incoming data. Acknowledgments The work described in this paper is supported by a CUHK Internal Grant (No. 2050346) and a grant from the Research Grants Council of the Hong Kong Special Administrative Region, China (Project No. CUHK4150/07E). References [1] T. D. Bie and N. Cristianini. Convex methods for transduction. In S. Thrun, L. Saul, and B. Sch¨olkopf, editors, Advances in Neural Information Processing Systems 16. MIT Press, Cambridge, MA, 2004. [2] O. Chapelle, M. Chi, and A. Zien. A continuation method for semi-supervised SVMs. In ICML ’06: Proceedings of the 23rd international conference on Machine learning, pages 185–192, New York, NY, USA, 2006. ACM Press. [3] O. Chapelle, B. Sch¨olkopf, and A. Zien. Semi-Supervised Learning. MIT Press, Cambridge, MA, 2006. [4] O. Chapelle, V. Sindhwani, and S. Keerthi. Branch and bound for semi-supervised support vector machines. In B. Sch¨olkopf, J. Platt, and T. Hoffman, editors, Advances in Neural Information Processing Systems 19. MIT Press, Cambridge, MA, 2007. [5] O. Chapelle and A. Zien. Semi-supervised classification by low density separation. In Proceedings of the Tenth International Workshop on Artificial Intelligence and Statistics, pages 57–64, 2005. [6] R. Collobert, F. Sinz, J. Weston, and L. Bottou. Large scale transductive SVMs. Journal of Machine Learning Reseaerch, 7:1687–1712, 2006. [7] J.-B. Hiriart-Urruty and C. Lemarechal. Convex analysis and minimization algorithms II: advanced theory and bundle methods. (2nd part edition). Springer-Verlag, New York, 1993. [8] T. Joachims. Transductive inference for text classification using support vector machines. In ICML ’99: Proceedings of the Sixteenth International Conference on Machine Learning, pages 200–209, San Francisco, CA, USA, 1999. Morgan Kaufmann Publishers Inc. [9] G. R. G. Lanckriet, N. Cristianini, P. Bartlett, L. E. Ghaoui, and M. I. Jordan. Learning the kernel matrix with semidefinite programming. Journal of Machine Learning Research, 5:27– 72, 2004. [10] Y. Nesterov and A. Nemirovsky. Interior point polynomial methods in convex programming: Theory and applications. Studies in Applied Mathematics. Philadelphia, 1994. [11] V. Sindhwani, S. S. Keerthi, and O. Chapelle. Deterministic annealing for semi-supervised kernel machines. In ICML ’06: Proceedings of the 23rd international conference on Machine learning, pages 841–848, New York, NY, USA, 2006. ACM Press. [12] J. F. Sturm. Using SeDuMi 1.02, a MATLAB toolbox for optimization over symmetric cones. Optimization Methods and Software, 11:625–653, 1999. [13] H. Valizadegan and R. Jin. Generalized maximum margin clustering and unsupervised kernel learning. In B. Sch¨olkopf, J. Platt, and T. Hoffman, editors, Advances in Neural Information Processing Systems 19. MIT Press, Cambridge, MA, 2007. [14] L. Xu and D. Schuurmans. Unsupervised and semi-supervised multi-class support vector machines. In AAAI, pages 904–910, 2005. [15] X. Zhu. Semi-supervised learning literature survey. Technical report, Computer Sciences, University of Wisconsin-Madison, 2005. [16] X. Zhu, Z. Ghahramani, and J. D. Lafferty. Semi-supervised learning using gaussian fields and harmonic functions. In Proceedings of Twentith International Conference on Machine Learning (ICML-2003), pages 912–919, 2003.
2007
166
3,199
Message Passing for Max-weight Independent Set Sujay Sanghavi LIDS, MIT sanghavi@mit.edu Devavrat Shah Dept. of EECS, MIT devavrat@mit.edu Alan Willsky Dept. of EECS, MIT willsky@mit.edu Abstract We investigate the use of message-passing algorithms for the problem of finding the max-weight independent set (MWIS) in a graph. First, we study the performance of loopy max-product belief propagation. We show that, if it converges, the quality of the estimate is closely related to the tightness of an LP relaxation of the MWIS problem. We use this relationship to obtain sufficient conditions for correctness of the estimate. We then develop a modification of max-product – one that converges to an optimal solution of the dual of the MWIS problem. We also develop a simple iterative algorithm for estimating the max-weight independent set from this dual solution. We show that the MWIS estimate obtained using these two algorithms in conjunction is correct when the graph is bipartite and the MWIS is unique. Finally, we show that any problem of MAP estimation for probability distributions over finite domains can be reduced to an MWIS problem. We believe this reduction will yield new insights and algorithms for MAP estimation. 1 Introduction The max-weight independent set (MWIS) problem is the following: given a graph with positive weights on the nodes, find the heaviest set of mutually non-adjacent nodes. MWIS is a well studied combinatorial optimization problem that naturally arises in many applications. It is known to be NP-hard, and hard to approximate [6]. In this paper we investigate the use of message-passing algorithms, like loopy max-product belief propagation, as practical solutions for the MWIS problem. We now summarize our motivations for doing so, and then outline our contribution. Our primary motivation comes from applications. The MWIS problem arises naturally in many scenarios involving resource allocation in the presence of interference. It is often the case that large instances of the weighted independent set problem need to be (at least approximately) solved in a distributed manner using lightweight data structures. In Section 2.1 we describe one such application: scheduling channel access and transmissions in wireless networks. Message passing algorithms provide a promising alternative to current scheduling algorithms. Another, equally important, motivation is the potential for obtaining new insights into the performance of existing message-passing algorithms, especially on loopy graphs. Tantalizing connections have been established between such algorithms and more traditional approaches like linear programming (see [9] and references). The MWIS problem provides a rich, yet relatively tractable, first framework in which to investigate such connections. 1.1 Our contributions In Section 4 we construct a probability distribution whose MAP estimate corresponds to the MWIS of a given graph, and investigate the application of the loopy Max-product algorithm to this distritbuion. We demonstrate that there is an intimate relationship between the max-product fixed-points and the natural LP relaxation of the original independent set problem. We use this relationship to provide a certificate of correctness for the max-product fixed point in certain problem instances. 1 In Section 5 we develop two iterative message-passing algorithms. The first, obtained by a minor modification of max-product, calculates the optimal solution to the dual of the LP relaxation of the MWIS problem. The second algorithm uses this optimal dual to produce an estimate of the MWIS. This estimate is correct when the original graph is bipartite. In Section 3 we show that any problem of MAP estimation in which all the random variables can take a finite number of values (and the probability distribution is positive over the entire domain) can be reduced to a max-weight independent set problem. This implies that any algorithm for solving the independent set problem immediately yields an algorithm for MAP estimation. We believe this reduction will prove useful from both practical and analytical perspectives. 2 Max-weight Independent Set, and its LP Relaxation Consider a graph G = (V, E), with a set V of nodes and a set E of edges. Let N(i) = {j ∈V : (i, j) ∈E} be the neighbors of i ∈V . Positive weights wi, i ∈V are associated with each node. A subset of V will be represented by vector x = (xi) ∈{0, 1}|V |, where xi = 1 means i is in the subset xi = 0 means i is not in the subset. A subset x is called an independent set if no two nodes in the subset are connected by an edge: (xi, xj) ̸= (1, 1) for all (i, j) ∈E. We are interested in finding a maximum weight independent set (MWIS) x∗. This can be naturally posed as an integer program, denoted below by IP. The linear programing relaxation of IP is obtained by replacing the integrality constraints xi ∈{0, 1} with the constraints xi ≥0. We will denote the corresponding linear program by LP. The dual of LP is denoted below by DUAL. IP : max n X i=1 wixi, s.t. xi + xj ≤1 for all (i, j) ∈E, xi ∈{0, 1}. DUAL : min X (i,j)∈E λij, s.t. X j∈N(i) λij ≥wi, for all i ∈V, λij ≥0, for all (i, j) ∈E. It is well-known that LP can be solved efficiently, and if it has an integral optimal solution then this solution is an MWIS of G. If this is the case, we say that there is no integrality gap between LP and IP or equivalently that the LP relaxation is tight. usIt is well known [3] that the LP relaxation is tight for bipartite graphs. More generally, for non-bipartite graphs, tightness will depend on the node weights. We will use the performance of LP as a benchmark with which to compare the performance of our message passing algorithms. The next lemma states the standard complimentary slackness conditions of linear programming, specialized for LP above, and for the case when there is no integrality gap. Lemma 2.1 When there is no integrality gap between IP and LP, there exists a pair of optimal solutions x = (xi), λ = (λij) of LP and DUAL respectively, such that: (a) x ∈{0, 1}n, (b) xi P j∈N(i) λij −wi  = 0 for all i ∈V , (c) (xi + xj −1) λij = 0, for all (i, j) ∈E. 2.1 Sample Application: Scheduling in Wireless Networks We now briefly describe an important application that requires an efficient, distributed solution to the MWIS problem: transmision scheduling in wireless networks that lack a centralized infrastructure, and where nodes can only communicate with local neighbors (e.g. see [4]). Such networks are ubiquitous in the modern world: examples range from sensor networks that lack wired connections to the fusion center, and ad-hoc networks that can be quickly deployed in areas without coverage, to the 802.11 wi-finetworks that currently represent the most widely used method for wireless data access. Fundamentally, any two wireless nodes that transmit at the same time and over the same frequencies will interfere with each other, if they are located close by. Interference means that the intended receivers will not be able to decode the transmissions. Typically in a network only certain pairs 2 of nodes interfere. The scheduling problem is to decide which nodes should transmit at a given time over a given frequency, so that (a) there is no interference, and (b) nodes which have a large amount of data to send are given priority. In particular, it is well known that if each node is given a weight equal to the data it has to transmit, optimal network operation demands scheduling the set of nodes with highest total weight. If a “ conflict graph” is made, with an edge between every pair of interfering nodes, the scheduling problem is exactly the problem of finding the MWIS of the conflict graph. The lack of an infrastructure, the fact that nodes often have limited capabilities, and the local nature of communication, all necessitate a lightweight distributed algorithm for solving the MWIS problem. 3 MAP Estimation as an MWIS Problem In this section we show that any MAP estimation problem is equivalent to an MWIS problem on a suitably constructed graph with node weights. This construction is related to the “overcomplete basis” representation [7]. Consider the following canonical MAP estimation problem: suppose we are given a distribution q(y) over vectors y = (y1, . . . , yM) of variables ym, each of which can take a finite value. Suppose also that q factors into a product of strictly positive functions, which we find convenient to denote in exponential form: q(y) = 1 Z Y α∈A exp (φα(yα)) = 1 Z exp X α∈A φα(yα) ! Here α specifies the domain of the function φα, and yα is the vector of those variables that are in the domain of φα. The α’s also serve as an index for the functions. A is the set of functions. The MAP estimation problem is to find a maximizing assignment y∗∈arg maxy q(y). We now build an auxillary graph eG, and assign weights to its nodes, such that the MAP estimation problem above is equivalent to finding the MWIS of eG. There is one node in eG for each pair (α, yα), where yα is an assignment (i.e. a set of values for the variables) of domain α. We will denote this node of eG by δ(α, yα). There is an edge in eG between any two nodes δ(α1, y1 α1) and δ(α2, y2 α2) if and only if there exists a variable index m such that 1. m is in both domains, i.e. m ∈α1 and m ∈α2, and 2. the corresponding variable assignments are different, i.e. y1 m ̸= y2 m. In other words, we put an edge between all pairs of nodes that correspond to inconsistent assignments. Given this graph eG, we now assign weights to the nodes. Let c > 0 be any number such that c + φα(yα) > 0 for all α and yα. The existence of such a c follows from the fact that the set of assignments and domains is finite. Assign to each node δ(α, yα) a weight of c + φα(yα). Lemma 3.1 Suppose q and eG are as above. (a) If y∗is a MAP estimate of q, let δ∗= {δ(α, y∗ α) | α ∈A} be the set of nodes in eG that correspond to each domain being consistent with y∗. Then, δ∗is an MWIS of eG. (b) Conversely, suppose δ∗is an MWIS of eG. Then, for every domain α, there is exactly one node δ(α, y∗ α) included in δ∗. Further, the corresponding domain assignments{y∗ α | α ∈A} are consistent, and the resulting overall vector y∗is a MAP estimate of q. Example. Let y1 and y2 be binary variables with joint distribution q(y1, y2) = 1 Z exp(θ1y1 + θ2y2 + θ12y1y2) where the θ are any real numbers. The corresponding eG is shown to the right. Let c be any number such that c+θ1, c+θ2 and c+θ12 are all greater than 0. The weights on the nodes in eG are: θ1 + c on node “1” on the left, θ2 + c for node “1” on the right, θ12 + c for the node “11”, and c for all the other nodes. 1 00 01 10 11 0 1 0 3 4 Max-product for MWIS The classical max-product algorithm is a heuristic that can be used to find the MAP assignment of a probability distribution. Now, given an MWIS problem on G = (V, E), associate a binary random variable Xi with each i ∈V and consider the following joint distribution: for x ∈{0, 1}n, p (x) = 1 Z Y (i,j)∈E 1{xi+xj≤1} Y i∈V exp(wixi), (1) where Z is the normalization constant. In the above, 1 is the standard indicator function: 1true = 1 and 1false = 0. It is easy to see that p(x) = 1 Z exp (P i wixi) if x is an independent set, and p(x) = 0 otherwise. Thus, any MAP estimate arg maxx p(x) corresponds to a maximum weight independent set of G. The update equations for max-product can be derived in a standard and straightforward fashion from the probability distribution. We now describe the max-product algorithm as derived from p. At every iteration t each node i sends a message {mt i→j(0), mt i→j(1)} to each neighbor j ∈N(i). Each node also maintains a belief {bt i(0), bt i(1)} vector. The message and belief updates, as well as the final output, are computed as follows. Max-product for MWIS (o) Initially, m0 i→j(0) = m0 j→i(1) = 1 for all (i, j) ∈E. (i) The messages are updated as follows: mt+1 i→j(0) = max    Y k̸=j,k∈N(i) mt k→i(0) , ewi Y k̸=j,k∈N(i) mt k→i(1)   , mt+1 i→j(1) = Y k̸=j,k∈N(i) mt k→i(0). (ii) Nodes i ∈V , compute their beliefs as follows: bt+1 i (0) = Y k∈N(i) mt+1 k→i(0), bt+1 i (1) = ewi Y k∈N(i) mt+1 k→i(1). (iii) Estimate max. wt. independent set x(bt+1) as follows: xi(bt+1 i ) = 1{bt+1 i (1)>bt+1 i (0)}. (iv) Update t = t + 1; repeat from (i) till x(bt) converges and output the converged estimate. For the purpose of analysis, we find it convenient to transform the messages be defining1 γt i→j = log  mt i→j(0) mt i→j(1)  . Step (i) of max-product now becomes γt+1 i→j = max   0,  wi − X k̸=j,k∈N(i) γt k→i     , (2) where we use the notation (x)+ = max{x, 0}. The estimation of step (iii) of max-product becomes: xi(γt+1) = 1{wi−P k∈N (i) γk→i>0}. This modification of max-product is often known as the “minsum” algorithm, and is just a reformulation of the max-product. In the rest of the paper we refer to this as simply the max-product algorithm. 1If the algorithm starts with all messages being strictly positive, the messages will remain strictly positive over any finite number of iterations. Thus taking logs is a valid operation. 4 4.1 Fixed Points of Max-Product When applied to general graphs, max product may either (a) not converge, (b) converge, and yield the correct answer, or (c) converge but yield an incorrect answer. Characterizing when each of the three situations can occur is a challenging and important task. One approach to this task has been to look directly at the fixed points, if any, of the iterative procedure [8]. Proposition 4.1 Let γ represent a fixed point of the algorithm, and let x(γ) = (xi(γ)) be the corresponding estimate for the independent set. Then, the following properties hold: (a) Let i be a node with estimate xi(γ) = 1, and let j ∈N(i) be any neighbor of i. Then, the messages on edge (i, j) satisfy γi→j > γj→i. Further, from this it can be deduced that x(γ) represents an independent set in G. (b) Let j be a node with xj(γ) = 0, which by definition means that wj −P k∈N(j) γk→j ≤0. Suppose now there exists a neighbor i ∈N(j) whose estimate is xi(γ) = 1. Then it has to be that wj −P k∈N(j) γk→j < 0, i.e. the inequality is strict. (c) For any edge (j1, j2) ∈E, if the estimates of the endpoints are xj1(γ) = xj2(γ) = 0, then it has to be that γj1→j2 = γj2→j1. In addition, if there exists a neighbor i1 ∈N(j1) of j1 whose estimate is xi1(γ) = 1, then it has to be that γj1→j2 = γj2→j1 = 0 (and similarly for a neighbor i2 of j2). The properties shown in Proposition 4.1 reveal striking similarities between the messages γ of fixed points of max-product, and the optimal λ that solves the dual linear program DUAL. In particular, suppose that γ is a fixed point at which the corresponding estimate x(γ) is a maximal independent set: for every j whose estimate xj(γ) = 0 there exists a neighbor i ∈N(j) whose estimate is xi(γ) = 1. The MWIS, for example, is also maximal (if not, one could add a node to the MWIS and obtain a higher weight). For a maximal estimate, it is easy to see that • (xi(γ) + xj(γ) −1) γi→j = 0 for all edges (i, j) ∈E. • xi(γ)  γi→j + P k∈N(i)−j γk→i −wi  = 0 for all i, j ∈V At least semantically, these relations share a close resemblance to the complimentary slackness conditions of Lemma 2.1. In the following lemma we leverage this resemblance to derive a certificate of optimality of the max-product fixed point estimate for certain problems. Lemma 4.1 Let γ be a fixed point of max-product and x(γ) the corresponding estimate of the independent set. Define G′ = (V, E′) where E′ = E\{(i, j) ∈E : γi→j = γj→i = 0} is the set of edges with at least one non-zero message. Then, if G′ is acyclic, we have that : (a) x(γ) is a solution to the MWIS for G, and (b) there is no integrality gap between LP and IP, i.e. x(γ) is an optimal solution to LP. Thus the lack of cycles in G′ provides a certificate of optimality for the estimate x(γ). Max-product vs. LP relaxation. The following general question has been of great recent interest: which of the two, max-product and LP relaxation, is more powerful ? We now briefly investigate this question for MWIS. As presented below, we find that there are examples where one technique is better than the other. That is, neither technique clearly dominates the other. To understand whether correctness of max-product (e.g. Lemma 4.1) provides information about LP relaxation, we consider the simplest loopy graph: a cycle. For bipartite graph, we know that LP relaxation is tight, i.e. provides answer to MWIS. Hence, we consider odd cycle. The following result suggests that if max-product works then it must be that LP relaxation is tight (i.e. LP is no weaker than max-product for cycles). Corollary 4.1 Let G be an odd cycle, and γ a fixed point of Max-product. Then, if there exists at least one node i whose estimate xi(γ) = 1, then there is no integrality gap between LP and IP. Next, we present two examples which help us conclude that neither max-product nor LP relaxation dominate the other. The following figures present graphs and the corresponding fixed points of max-product. In each graph, numbers represent node weights, and an arrow from i to j represents 5 a message value of γi→j = 2. All other messages have γ are equal to 0. The boxed nodes indicate the ones for which the estimate xi(γ) = 1. It is easy to verify that both represent max-product fixed points. 3 2 2 2 3 3 3 2 2 2 3 3 For the graph on the left, the max-product fixed point results in an incorrect estimate. However, the graph is bipartite, and hence LP will get the correct answer. In the graph on the right, there is an integrality gap between LP and IP: setting each xi = 1 2 yields an optimal value of 7.5, while the optimal solution to IP has value 6. However, the estimate at the fixed point of max-product is the correct MWIS. In both of these examples, the fixed points lie in the strict interiors of nontrivial regions of attraction: starting the iterative procedure from within these regions will result in convergence to the fixed point. These examples indicate that it may not be possible to resolve the question of relative strength of the two procedures based solely on an analysis of the fixed points of max-product. 5 A Convergent Message-passing Algorithm In this section we present our algorithm for finding the MWIS of a graph. It is based on modifying max-product by drawing upon a dual co-ordinate descent and barrier method. Specifically, the algorithm is as follows: (1) For small enough parameters ε, δ, run subroutine DESCENT(ǫ, δ) (close to) convergence. This will produce output λε,δ = (λε,δ ij )(i,j)∈E. (2) For small enough parameter δ1, use subroutine EST(λε,δ, δ1), to produce an estimate for the MWIS as the output of algorithm. Both of the subroutines, DESCENT, EST are iterative message-passing procedures. Before going into details of the subroutines, we state the main result about correctness and convergence of this algorithm. Theorem 5.1 The following properties hold for arbitrary graph G and weights: (a) For any choice of ε, δ, δ1 > 0, the algorithm always converges. (b) As ε, δ →0, λε,δ →λ∗where λ∗is an optimal solution of DUAL . Further, if G is bipartite and the MWIS is unique, then the following holds: (c) For small enough ε, δ, δ1, the algorithm produces the MWIS as output. 5.1 Subroutine: DESCENT Consider the standard coordinate descent algorithm for DUAL: the variables are {λij, (i, j) ∈ E}(with notation λij = λji) and at each iteration t one edge (i, j) ∈E is picked2 and update λt+1 ij = max   0,  wi − X k∈N(i),k̸=j λt ik  ,  wj − X k∈N(j),k̸=i λt jk      (3) The λ on all the other edges remain unchanged from t to t + 1. Notice the similarity (at least syntactic) between (3) and update of max-product (min-sum) (2): essentially, the dual coordinate descent is a sequential bidirectional version of the max-product algorithm ! It is well known that the coordinate descent always coverges, in terms of cost for linear programs. Further, it converges to an optimal solution if the constraints are of the product set type (see [2] for details). However, due to constraints of type P j∈N(i) λij ≥wi in DUAL, the algorithm may not 2A good policy for picking edges is round-robin or uniformly at random 6 converge to an optimal of DUAL. Therefore, a direct adaptation of max-product to mimic dual coordinate descent is not good enough. We use barrier (penalty) function based approach to overcome this difficulty. Consider the following convex optimization problem obtained from DUAL by adding a logarithmic barrier for constraint violations with ε ≥0 controlling penalty due to violation. CP(ε) : min  X (i,j)∈E λij  −ε  X i∈V log  X j∈N(i) λij −wi     subject to λij ≥0, for all (i, j) ∈E. The following is coordinate descent algorithm for CP(ε). DESCENT(ε, δ) (o) The parameters are variables λij, one for each edge (i, j) ∈E. We will use notation that λt ij = λt ji. The vector λ is iteratively updated, with t denoting the iteration number. ◦Initially, set t = 0 and λ0 ij = max{wi, wj} for all (i, j) ∈E. (i) In iteration t + 1, update parameters as follows: ◦Pick an edge (i, j) ∈E. This edge selection is done so that each edge is chosen infinitely often as t →∞(for example, at each t choose an edge uniformly at random.) ◦For all (i′, j′) ∈E, (i′, j′) ̸= (i, j) do nothing, i.e. λt+1 i′j′ = λt i′j′. ◦For edge (i, j), nodes i and j exchange messages as follows: γt+1 i→j =  wi − X k̸=j,k∈N(i) λt ki   + , γt+1 j→i =  wj − X k′̸=i,k′∈N(j) λt k′j   + ◦Update λt+1 ij as follows: with a = γt+1 i→j and b = γt+1 j→i, λt+1 ij = a + b + 2ε + p (a −b)2 + 4ε2 2 ! + . (4) (ii) Update t = t + 1 and repeat till algorithm converges within δ for each component. (iii) Output λ, the vector of paramters at convergence, Remark. The iterative step (4) can be rewritten as follows: for some β ∈[1, 2], λt+1 ij = βε + max   −βε,  wi − X k∈N(i)\j λt ik  ,  wj − X k∈N(j)\i λt kj     , where β depends on values of γt+1 i→j, γt+1 j→i. Thus the updates in DESCENT are obtained by small but important perturbation of dual coordinate descent for DUAL, and making it convergent. The output of DESCENT(ε, δ), say λε,δ →λ∗as ε, δ →0 where λ∗is an optimal solution of DUAL. 5.2 Subroutine: EST DESCENT yields a good estimate of the optimal solution to DUAL, for small values of ǫ and δ. However, we are interested in the (integral) optimum of LP. In general, it is not possible to recover the solution of a linear program from a dual optimal solution. However, we show that such a recovery is possible through EST algorithm described below for the MWIS problem when G is bipartite with unique MWIS. This procedure is likely to extend for general G when LP relaxation is tight and LP has unique solution. EST(λ, δ1). 7 (o) The algorithm iteratively estimates x = (xi) given λ. (i) Initially, color a node i gray and set xi = 0 if P j∈N(i) λij > wi. Color all other nodes with green and leave their values unspecified. The condition P j∈N(i) λij > wi is checked as whether P j∈N(i) λij ≥wi + δ1 or not. (ii) Repeat the following steps (in any order) till no more changes can happen: ◦if i is green and there exists a gray node j ∈N(i) with λij > 0, then set xi = 1 and color it orange. The condition λij > 0 is checked as whether λij ≥δ1 or not. ◦if i is green and some orange node j ∈N(i), then set xi = 0 and color it gray. (iii) If any node is green, say i, set xi = 1 and color it red. (iv) Produce the output x as an estimation. 6 Discussion We believe this paper opens several interesting directions for investigation. In general, the exact relationship between max-product and linear programming is not well understood. Their close similarity for the MWIS problem, along with the reduction of MAP estimation to an MWIS problem, suggests that the MWIS problem may provide a good first step in an investigation of this relationship. Also, our novel message-passing algorithm and the reduction of MAP estimation to an MWIS problem immediately yields a new message-passing algorithm for MAP estimation. It would be interesting to investigate the power of this algorithm on more general discrete estimation problems. References [1] M. Bayati, D. Shah and M. Sharma, “Max Weight Matching via Max Product Belief Propagation,” IEEE ISIT, 2005. [2] D. Bertsekas, “Non Linear Programming”, Athena Scientific. [3] M. Grtschel, L. Lovsz, and A. Schrijver, “Polynomial algorithms for perfect graphs,” in C. Berge and V. Chvatal (eds.) Topics on Perfect Graphs Ann. Disc. Math. 21, North-Holland, Amsterdam(1984) 325-356. [4] K. Jung and D. Shah, “Low Delay Scheduing in Wireless Networks,” IEEE ISIT, 2007. [5] C. Moallemi and B. Van Roy, “Convergence of the Min-Sum Message Passing Algorithm for Quadratic Optimization,” Preprint, 2006 available at arXiv:cs/0603058 [6] Luca Trevisan, “Inapproximability of combinatorial optimization problems,” Technical Report TR04-065, Electronic Colloquium on Computational Complexity, 2004. [7] M. Wainwright and M. Jordan, “Graphical models, exponential families, and variational inference,” UC Berkeley, Dept. of Statistics, Technical Report 649. September, 2003. [8] J. Yedidia, W. Freeman and Y. Weiss, “Generalized Belief Propagation,” Mitsubishi Elect. Res. Lab., TR2000-26, 2000. [9] Y. Weiss, C. Yanover, T. Meltzer “MAP Estimation, Linear Programming and Belief Propagation with Convex Free Energies” UAI 2007 8
2007
167