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
2,300
Categorization Under Complexity: A Unified MDL Account of Human Learning of Regular and Irregular Categories David Fass Department ofPsychology Center for Cognitive Science Rutgers University Piscataway, NJ 08854 dfass@ruccs.rutgers.edu Jacob Feldman* Department ofPsychology Center for Cognitive Science Rutgers University Piscataway, NJ 08854 jacob@ruccs.rutgers.edu Abstract We present an account of human concept learning-that is, learning of categories from examples-based on the principle of minimum description length (MDL). In support of this theory, we tested a wide range of two-dimensional concept types, including both regular (simple) and highly irregular (complex) structures, and found the MDL theory to give a good account of subjects' performance. This suggests that the intrinsic complexity of a concept (that is, its description-length) systematically influences its leamability. 1The Structure of Categories A number of different principles have been advanced to explain the manner in which humans learn to categorize objects. It has been variously suggested that the underlying principle might be the similarity structure of objects [1], the manipulability of decision bound~ aries [2], or Bayesian inference [3][4]. While many of these theories are mathematically well-grounded and have been successful in explaining a range of experimental findings, they have commonly only been tested on a narrow collection of concept types similar to the simple unimodal categories ofFigure 1(a-e). (a) (b) (c) (d) (e) Figure 1: Categories similar to those previously studied. Lines represent contours of equal probability. All except (e) are unimodal. ~http://ruccs.rutgers.edu/~jacob/feldman.html Moreover, in the scarce research that has ventured to look beyond simple category types, the goal has largely been to investigate categorization performance for isolated irregular distributions, rather than to present a survey of performance across a range of interesting distributions. For example, Nosofsky has previously examined the "criss-cross" category of Figure 1(d) and a diagonal category similar to Concept 3 of Figure 2, as well as some other multimodal categories [5J[6J. While these individual category structures are no doubt theoretically important, they in no way exhaust the range of possible concept structures. Indeed, if we view n-dimensional Cartesian space as the canvas upon which a category may be represented, then any set ofmanifolds in that space may be considered as a potential category [7]. It is therefore natural to ask whether one such category-manifold is in principle easier or more difficult to learn than another. Since previous investigations have never considered any reasonably broad range of category structures, they have never been in a position to answer this question. In this paper we present a theory for human categorization, based on the MDL principle, that is much better equipped to answer questions about .the intrinsic leamability of both structurally regular and structurally irregular categories. In support of this theory we briefly present an experiment testing human subjects' learning of a range of concept types defined over a continuous two-dimensional feature space, including both highly regular and highly irregular structures. We find that our MDL-based theory gives a good account of human learning for these concepts, and that descriptive complexity accurately predicts the subjective difficulty ofthe various concept types tested. 2 Previous Investigations of Category Structure The role of category structure in determining leamability has not been overlooked entirely in the literature; in fact, the intrinsic structure of binary-featured categories has been investigated quite thoroughly. The classic work by Shepard et al. [8J showed that human performance in learning such Boolean categories varies greatly depending on the intrinsic logical structure of the concept. More recently, we have shown that this performance is well-predicted by the intrinsic Boolean complexity of each concept, given by the length of the shortest Boolean formula that describes the objects in the category [9]. This result suggests that a principle of simplicity or parsimony, manifested as a minimization of complexity, might play an important role in human category learning. The details of Boolean complexity analysis do not generalize easily to the type of continuous feature spaces we wish to investigate here. Thus a new approach is required, similar in general spirit but differing in the mathematics. Our goals are therefore (1) to deploy a complexity minimization technique such as MDL to quantify the complexity of categories defined over continuous features, and (2) to investigate the influence of complexity on human category learning by testing a range ofconcept types differing widely in intrinsic complexity. 3 Experiment While the MDL principle that we plan to employ is applicable to concepts of any dimension, for reasons of convenience this experiment is limited to category structures that can be formed within a two-dimensional feature space. This feature space is discretized into a 4 x 4 grid from which a legitimate category can be specified by the selection ofany four grid squares. Our motivation for discretizing the feature space is to place a constraint on possible category structure that will facilitate the computation of a complexity measure; this does not restrict the range ofpossiblefeature values that can be adopted by stimuli. In principle, feature values are limited only by machine precision, but as a matter of convenience we restrict features to adopting one of 1000 possible values in the range [0,1]. Concept 1 Concept 2 Concept3 Concept 4 Concept 5 Concept 6 Concept 7 Concept 8 Concept 9 Concept 10 Concept 11 Concept 12 Figure 2: Abstract concepts used in experiment. The particular 12 abstract category structures ("concepts") examined in the experiment are shown in Figure 2. These concepts were considered to be individually interesting (from a cross-theoretical perspective) and jointly representative ofthe broader range of available concepts. The two categories in each concept are referred to as "positive" and "negative." The positive category is represented by the dark-shaded regions, and the corresponding negative category is its complement. Note that in many cases the categories are "disconnected" or multimodal. Nevertheless, these categories are not in any sense "probabilistic" or "ill-de:fil1.ed"; a given point in feature space is ahvays either p_ositive or negative. During the experiment, each stimulus is drawn randomly from the feature space and is labeled "positive" or "negative" based on the region from which it was drawn. Uniform sampling is used, so all 12 categories of Figure 2 have the same base rate for positives, P( ..) 4 1 posItIve == 16 == 4' The experiment itself was clothed as a video game that required subjects to discriminate between two classes of spaceships, "Ally" and "Enemy," by destroying Enemy ships and quick-landing Allied ships. Each subject (14 total) played 12 five-minute games in which the distribution ofAllies and Enemies corresponded (in random order) to the 12 concepts of Figure 2. The physical features ofthe spaceships in all cases were the height ofthe "tube" and the radius of the "pod." As shown in Figure 3, these physical features are mapped randomly onto the abstract feature space such that the experimental concepts may be any rigid rotation or reflection ofthe abstract concepts in Figure 2. 4 Derivation of the MDL Principle The MDL principle is largely due to Rissanen [10] and is easily shown to be a consequence of optimal Bayesian inference [11]. While several Bayesian algorithms have previously been proposed as models of human concept learning [3][4], the implications of the MDL principle for human learning have only recently come under scrutiny [12][13]. We briefly review the relevant theory. According to Bayes rule, a learner ought to select the category hypothesis H that maximizes (a) (b) (c) Pod Radius (d) Figure 3: (a) A spaceship. (b-d) Three possible instantiations of Concept 6 from Figure 2. the posterior P(H I D), where D is the data, and P(H I D) = P(D I H)P(H) P(D) Taking negative logarithms ofboth sides, we obtain -log P(H ID) == -log-P(D I H) - log P(H) + log P(D) (1) (2) The problem of maximizing P(H I D) is thus identical to the problem of minimizing - log P (H I D). Since log P (D) is constant for all hypotheses, its value does not enter into the minimization problem, and we can state that the hypothesis of choice ought to be such as to minimize the quantity -log P(D I H) - log P(H) (3) If we follow Rissanen and regard the quantity -log P(x) as the description length of x, DL(x ), then Equation 3 instructs us to select the hypothesis that minimizes the total description length DL(D I H) + DL(H) (4) What this means is that the hypothesis that is optimal from the standpoint of the Bayesian decision maker is the same hypothesis that yields the most compact two-part code in Equation 4. Thus, besides the merits ofbrevity for its own sake, we see that maximal descriptive compactness also corresponds to maximal inferential power. It is this equivalence between description length and inference that leads us to investigate the role ofdescriptive complexity in the domain of concept learning. 5 Theory In order to investigate the complexity of the 12 concepts of Figure 2, Equation 4 indicates that we need to analyze (1) the description length ofa hypothesis for each concept, DL(H), and (2) the description length ofthe concept given the hypothesis, DL(D I H). We discuss these in sequence. 5.1 The Hypothesis Description Length, DL(H) In order to compute DL(H), we first fix a language! within which hypotheses about the category structure can be expressed. We choose to use the "rectangle language" whose alphabet (Table 1) consists of 10 classes of symbols representing the 10 different sizes of rectangle that can be composited within a 4x4 grid: 1x 1, 1x2, 1x3, 1x4, 2x2, 2x3, 2x4, 3x3, 3x4, and 4x4.2 Each member of the class "m x n" is an m x n or n·x m rectangle situated at a particular position in the 4x 4 grid. We allow a given hypothesis to be represented by up to four distinct rectangles (i.e., four symbols). Having specified a language, the issue is now the length ofthe hypothesis code. The derivation above suggests that a codelength of -log P(x) be assigned to each symbol x, which corresponds to the so-called Shannon code. We therefore proceed to compute the Shannon codelengths for the rectangle alphabet ofTable 1.3 1Equivalently, a model class. The particular choice oflanguage (model class) is obviously an important determinant ofthe ultimate hypothesis description length. We mentionthat the MDL analysis in this paper might be replaced by another theoretical approach, such as a Bayesian framework, although we have not pursued this possibility. We adopt the MDL formulation partly because its emphasis on representation (i.e., description) seems apt for a study of complexity. 2The class "m x n" contains all rectangles of dimension m x nand n x m. 3We use the noninteger value - log P (x) rather than the integer r- log P (x)l. Logs are base-2. - ~- ·-1 Table 1: Rectangle alphabet. The third and fourth columns show the probability that the source generates a given member ofthe class "m x n" and the corresponding codelength. Rectangle Class Possible Locations Probability Codelength lxl 16 1 1 -log (1~0) 10 . 16 lx2 24 1 1 -log (2~0) 10 . 24 lx3 16 1 1 -log (1~0) 10 . 16 lx4 8 1 1 -log (8~) 10 . "8 2x2 9 1 1 -log (gI0 ) 10 ·9 2x3 12 1 1 -log (1~0) 10 . 12 2x4 6 1 1 -log (lo) 10 . "6 3x3 4 1 1 -log (410) 10 ·4 3x4 4 1 1 -log (4~) 10 ·4 4x4 1 .l. . 1 -log (1~) 10 Computing these codelengths requires t~at we specify the probability mass function of a source, P(x). It is convenient for this purpose (and compatible with the subject's perspective) to imagine that the concepts in Figure 2 are produced by a "concept generator," an information source whose parameters are essentially unknown. A reasonable assumption is that the source randomly selects a rectangle class with uniform probability, and then selects an individual member of the chosen class also with uniform probability. Since there are 10 classes, the assumption regarding class selection places a prior on each rectangle class ofP(m x n) == 1~. Moreover, the assumption of uniform within-class sampling means that in order to encode any individual rectangle, we need only consider the cardinality of the class to which it belongs. We now recall that the individual rectangles of the class "m x n" differ only in their positions within the 4 x 4 grid. Therefore, the cardinality ofthe class "m x n" is equal to the number ofunique ways N m x n in which an m x n or n x m rectangle can be selected from a 4 x 4 grid, where N - { (5-m)(5-n), m==n mXn 2(5 - m)(5 - n), m =I n (5) Thus, the probability associated with an individual rectangle of class "m x n" is PN(m xn) . rnXn The corresponding Shannon codelengths are shown next to these probabilities in Table 1. The description length of a particular hypothesis is the summed codeword lengths for all the rectangles (up to four) that are comprised by the hypothesis. 5.2 The Likelihood Description Length, DL(D I H) The second part ofthe two-part MDL code is the description ofthe concept with respect to the selected hypothesis, corresponding to the Bayes likelihood. There are several possible approaches to computing DL(D I H); we discuss one that is particularly straightforward. We recall that a hypothesis H is composed of up to four rectangular regions. Computing DL(D I H) therefore involves describing that portion of the positive category that falls within each rectangular hypothesis region. This is conceptually the same problem that we faced in computing DL(H) above, except that the region of interest for DL(H) was fixed Table 2: Minimum description lengths for the 12 abstract concepts. Concept MDL Codelength 8.0768 bits 2 8.3219 bits 3 27.3236 bits 4 17.8138 bits 5 16.5216 bits 6 14.4919 bits 7 17.1357 bits 8 22.5687 bits 9 14.4919 bits 10 15.0768 bits 11 27.1946 bits 12 28.1536 bits MDL Concept lIE .•..·;..'. ~ at 4x4, while the regions for DL(D I H) can be of any dimension 4x4 and smaller. Guided by this analogy, we follow the procedure of the previous section to compute an appropriate probability mass function. Since DL(D I H) must capture just the positive squares in the hypothesis region (a maximum of four squares), the only rectangle classes needed in the alphabet are those of size four: 1x 1, 1x2, 1x 3, 1x4, and 2x2. 6 Minimum Description Lengths for Experimental Concepts Applying the MDL analysis above to the concepts in Figure 2 requires that we compute the total description length DL(D I H) + DL(H) corresponding to all viable hypothe, ses for each concept. The hypothesis H corresponding to the shortest total codelength DL(D I H) +DL(H) for each concept is the MDL hypothesis.4 The MDL hypotheses for all 12 concepts are shown in Table 2 along with the corresponding minimum codelengths. It can be observed that while for some concepts the MDL hypothesis precisely conforms to the true positive category (meaning that almost all of the concept information is carried in the hypothesis code), for the majority of concepts the MDL hypothesis is broader than the true category region (meaning that the concept information is distributed between the hypothesis and likelihood codes). 4Note that the MDL hypothesis is not in general the most compact hypothesis, i.e., the hypothesis for which DL(H) is a minimum. Rather, the MDL hypothesis is the one for which the sum DL(D I H) + DL(H) is minimum. 7 Results For each game played by the subject (i.e., each concept in Figure 2), an overall measure of performance (d') is computed.5 Figure 4 shows performance for all subjects and all concepts as a function ofthe concept complexities (MDL codelengths) in Table 2. There is an evident decrease in performance with increasing complexity, which a regression analysis shows to be highly significant (R2 == .384, F(1,166) == 103.375, p < .000001), meaning that the linear trend in the plot is very unlikely to be a statistical accident. Thus, the MDL complexity predicts the subjective difficulty ofleaming across a broad range of concepts. 3.5r---+----,-------r--------.--------.-------, 2.5 ~ 2 Q.)g 1.5 co + E 1 + ~ ++ Q.) 0.5 0.. -0.5 -1 5 10 15 20 25 30 Complexity, DL(H) + DL(DIH) Figure 4: Performance vs. complexity for all 14 subjects. The d' performance for each concept is indicated by a '+' and the mean d' for each concept is indicated by an '0'. We mention that the MDL approach described here can be further modified to make "realtime" predictions ofhow subjects will categorize each new stimulus. In the most simplistic approach, the prediction for each new stimulus x is made based on the MDL hypothesis prevailing at the time that stimulus is observed. Correlation between this MDL prediction and the subject's actual decision is found to be highly significant (p :::; .002) for each ofthe 12 concept types. The Pearson r statistics are given below: Concept #: Pearson r: 123 .46 .47 .19 456 .18 .20 .51 7 8 9 10 11 12 .18 .14 .34 .32 .32 .05 Figure 5 illustrates the behavior ofthe real-time MDL algorithm. Simulations for a variety of data sets can be found at http://ruccs . rutgers. edu/-dfass/mdlmovies. html. ~ .:++: .:j.:: step 7 step 9 Step 19 step 59 step 113 Step 169 step 190 Figure 5: Real-time MDL hypothesis evolution for actual Concept 11 data. As the size of the data set grows beyond 150, there is oscillation between the one-rectangle (2x4) hypothesis.shown in Step 169 and the two-rectangle (1 x3) hypothesis shown in Step 190. 5d l (discriminability) gives a measure of subjects' intrinsic capacity to discriminate categories, i.e., one that is independent oftheir criterion for responding "positive" [14]. 8 Conclusions As discussed above, MDL bears a tight relationship with Bayesian inference, and hence serves as a reasonable basis for a theory of learning. The data presented above suggest that human learners are indeed guided by something very much like Rissanen's principle when classifying objects. While it is premature to conclude that humans construct anything precisely corresponding to the two-part code of Equation 4, it seems likely that they employ some closely related complexity-minimization principle-and an associated "cognitive code" still to be discovered. This finding is consistent with many earlier observations ofminimum principles guiding human inference, especially in perception (e.g., the Gestalt principle ofPragnanz). Moreover, our findings suggest a principled approach to predicting the subjective difficulty of concepts defined over continuous features. As we had previously found with Boolean concepts, subjective difficulty correlates with intrinsic complexity: That which is incompressible is) in turn) incomprehensible. The MDL approach is an elegant framework in which to make this observation rigorous and concrete, and one which apparently accords well with human performance. Acknowledgments This research was supported by NSF SBR-9875175. References [IJ Nosofsky, R. M., "Exemplar-based accounts of relations between classification, recognition, and typicality," Journal of Experimental Psychology: Learning) Memory, and Cognition, Vol. 14, No.4, 1988, pp. 700-708. [2J Ashby, F. G. and Alfonso-Reese, L. A., "Categorization as probability density estimation," Journal ofMathematical Psychology, Vol. 39, 1995, pp. 216-233. [3J Anderson, J. R., "The adaptive nature ofhuman categorization," Psychological Review, Vol. 98, No.3, 1991,pp.409-429. [4J Tenenbaum, J. B., "Bayesian modeling ofhuman concept learning," Advances in Neural Information Processing Systems, edited by M. S. Kearns, S. A. Solla, and D. A. Cohn, Vol. 11, MIT Press, Cambridge, MA, 1999. [5J Nosofsky, R. M., "Optimal performance and exemplar models of classification," Rational Models of Cognition, edited by M. Oaksford and N. Chater, chap. 11, Oxford University Press, Oxford, 1998, pp. 218-247. [6J Nosofsky, R. M., "Further tests ofan exemplar-similarity approach to relating identification and categorization," Perception andPsychophysics, Vol. 45,1989, pp. 279-290; [7J Feldman, J., "The structure of perceptual categories," Journal of Mathematical Psychology, Vol. 41, No.2, 1997, pp. 145-170. [8J Shepard, R. N., Hovland, C. I., and Jenkins, H. M., "Learning and memorization of classifications," Psychological Monographs: General andApplied, Vol. 75, No. 13, 1961, pp. 1-42. [9J Feldman, J., "Minimization of Boolean complexity in human concept learning," Nature, Vol. 407, 2000, pp. 630-632. [1 OJ Rissanen, J., "Modeling by shortest data description," Automatica, Vol. 14, 1978, pp. 465-471. [11J Li, M. and Vitanyi, P., An Introduction to Kolmogorov Complexity and Its Applications, Springer, New York, 2nd ed., 1997. [12] Pothos, E. M. and Chater, N., "Categorization by simplicity: A minimum description length approach to unsupervised clustering," Similarity and Categorization, edited by U. Hahn and M. Ramscar, chap. 4, Oxford University Press, Oxford, 2001, pp. 51-72. [13J Myung, 1. J., "Maximum entropy interpretation of decision bound and context models of categorization," Journal ofMathematical Psychology, Vol. 38, 1994, pp. 335-365. [14J Wickens, T. D., Elementary Signal Detection Theory, Oxford University Press, Oxford, 2002.
2002
92
2,301
Learning with Multiple Labels Rong Jin* *School of Computer Science Carnegie Mellon University Pittsburgh, PA 15213, USA rong@es.emu.edu Zoubin Ghahramanit* tGatsby Computational Neuroscience Unit University College London London WCIN 3AR, UK zoubin@gatsby.ucl.ae.uk Abstract In this paper, we study a special kind of learning problem in which each training instance is given a set of (or distribution over) candidate class labels and only one of the candidate labels is the correct one. Such a problem can occur, e.g., in an information retrieval setting where a set of words is associated with an image, or if classes labels are organized hierarchically. We propose a novel discriminative approach for handling the ambiguity of class labels in the training examples. The experiments with the proposed approach over five different UCI datasets show that our approach is able to find the correct label among the set of candidate labels and actually achieve performance close to the case when each training instance is given a single correct label. In contrast, naIve methods degrade rapidly as more ambiguity is introduced into the labels. 1 Introduction Supervised and unsupervised learning problems have been extensively studied in the machine learning literature. In supervised classification each training instance is associated with a single class label, while in unsupervised classification (i.e. clustering) the class labels are not known. There has recently been a great deal of interest in partially- or semi-supervised learning problems, where the training data is a mixture of both labeled and unlabelled cases. Here we study a new type of semisupervised learning problem. We generalize the notion of supervision by thinking of learning problems where multiple candidate class labels are associated with each training instance, and it is assumed that only one of the candidates is the correct label. For a supervised classification problem, the set of candidate class labels for every training instance contains only one label, while for an unsupervised learning problem, the set of candidate class labels for each training instance counts in all the possible class labels. For a learning problem with the mixture of labeled and unlabelled training data, the number of candidate class labels for every training instance can be either one or the total number of different classes. Here we study the general setup, i.e. a learning problem when each training instance is assigned to a subset of all the class labels (later, we further generalize this to include arbitrary distributions over the class labels). For example, there may be 10 different classes and each training instance is given two candidate class labels and one of the two given labels is correct. This learning problem is more difficult than supervised classification because for each training example we don't know which class among the given set of candidate classes is actually the target. For easy reference, we called this class of learning problems 'multiple-label' problems. In practice, many real problems can be formalized as a 'multiple-label' problem. For example, the problem of having several different class labels for a single training example can be caused by the disagreement between several assessors. 1 Consider the scenario when two assessors are hired to label the training data and sometimes the two assessors give different class labels to the same training example. In this case, we will have two class labels for a single training instance and don't know which, if any, is actually correct. Another scenario that can cause multiple class labels to be assigned to a single training example is when there is a hierarchical structure over the class labels and some of the training data are given the labels of the internal nodes in the hierarchy (i.e. superclasses) instead of the labels of the leaf nodes (subclasses). Such hierarchies occur, for example, in bioinformatics where proteins are regularly classified into superfamilies and families. For such hierarchical labels, we can treat the label of internal nodes as a set of the labels on the leaf nodes. 2 Related Work First of all, we need to distinguish this 'multiple-label' problem from the problem where the classes are not mutually exclusive and therefore each training example is allowed several class labels [4]. There, even though each training example can have multiple class labels, all the assigned class labels are actually correct labels while in 'multiple-label' problems only one of the assigned multiple labels is the target label for the training instance. The essential difficulty of 'multiple-label' problems comes from the ambiguity in the class labels for training data, i.e. among the several labels assigned to every training instance only one is presumed to be the correct one and unfortunately we are not informed which one is the target label. A similar difficulty appears in the problem of classification from labeled and unlabeled training data. The difference between the 'multiple-label' problem and the labeled/unlabeled classification problem is that in the former only a subset of the class labels can be the candidate for the target label, while in the latter any class label can be the candidate. As will be shown later, this constraint makes it possible for us to build up a purely discriminative approach while for learning problems using unlabeled data people usually take a generative approach and model properties of the input distribution. In contrast to the 'multiple-label' problem, there is a set of problems named 'multiple-instance' problems [3] where instances are organized into 'bags' of several instances, and a class label is tagged for every bag of instances. In the 'multiple-instance' problem, at least one of the instances within each bag corresponds to the label of the bag and all other instances within the bag are just noise. The difference between 'multiple-label' problems and 'multiple-instance' problems is that for 'multiple-label' problems the ambiguity lies on the side of class labels while for 'multiple-instance' problem the ambiguity comes from the instances within the bag. 1 Observer disagreement has been modeled using the EM algorithm [1]. Our multiplelabel framework differs in that we don't know which observer assigned which label to each case. This would be an interesting direction to extend our framework. The most related work to this paper is [6], where a similar problem is studied using the logistic regression method. Our framework is completely general for any discriminative model and incorporates non-uniform 'prior' on the labels. 3 Formal Description of the 'Multiple-label' Problem As described in the introduction, for a 'multiple-label' problem, each training instance is associated with a set of candidate class labels, only one of which is the target label for that instance. Let Xi be the input for the i-th training example, and Si be the set of candidate class labels for the i-th training example. Our goal is to find the model parameters e E e in some class of models M , i.e. a parameterized classifier with parameters e which maps inputs to labels, so that the predicted class label y for the i-th training example has a high probability to be a member of the set Si. More formally, using the maximum likelihood criterion and the assumption of i.i.d. assignments, this goal can be simply stated as 4 Description of the Discriminative Model for the 'Multiple-label' Problem (1) Before discussing the discriminative model for the 'multiple-label' problem, let's look at the standard discriminative model for supervised classification. Let p(y I X i ) stand for some given conditional distribution of class labels for the training instance Xi and p(y I x"f}) be the model-based conditional distribution for the training data Xi to have the class label y. A common and sensible criterion for finding model parameters (/ is to minimize the KL divergence between the given conditional distributions and the model-based distributions, i.e. B* = arg min {L L p(y I x,) log p(y I x) } B ; y p(y I x;, B) (2) For supervised learning problems, the class label for every trammg instance is known. Therefore, the given conditional distribution of the class label for every training instance is a delta function or jJ(y I Xi) = c5(y, Yi) where Yi is the given class label for the i-th instance. With this, it can be easily shown that Eqn. (2) will be simplified as maximum likelihood criterion. For the 'multiple-label' problem, each training instance Xi is assigned to a set of candidate class labels Si and therefore Eqn. (2) can be rewritten as: ()* = arg min {L L p(y I X,) log p(y I x,) } B i YES; p(y I Xi' (}) (3) with the constraints Vi L yESi p(y I Xi) = I . (4) In the 'multiple-label' problem the distribution of class labels p(y I x,) is unknown except for the constraint that the target class label for every training example is a member of the corresponding set of candidate class labels. A simple solution to the problem of unknown label distribution is to assume it is uniform, I.e. p(y I x,) = p(y' I x,) for any y, y' E Si . Then, Eqn. (3) can be simplified to: B* = argmin {L:1 L:loi 1 J} =argmax{L:1 L:IOgp(YIXi' B)} , (5) B i I Si I YES, II Si I p(y I x"B) B i I Si I YES, which corresponds to minimizing the KL divergence (2) to a uniform over Sj . For the case of multiple assessors giving differing labels to the data, discussed in the introduction, this corresponds to concatenating the labeled data sets. Standard learning algorithms can be applied to learn the conditional model p(y I x,B). For later reference, we called this simple idea the ' Naive Model'. A better solution than the 'NaIve Model' is to disambiguate the label association, i.e. to find which label among the given set is more appropriate than the others and use the appropriate label for training. It turns out that it is possible to apply the EM algorithm [2] to accomplish this goal, resulting in a procedure which iterates between disambiguating and classifying. Starting with the assumption that every class label within the set is equally likely, we train a conditional model p(y I x, B). Then, with the help of this conditional model, we estimate the label distribution jJ(y I x,) for each data point. With these label distributions, we refit the conditional model p(y I x,B) and so on. More formally, this idea can be expressed as follows: First, we estimate the conditional model based on the assumed or estimated label distribution according to Eqn. (3). This step corresponds to the M-step in the EM algorithm. Then, in the E-step, new label distributions are estimated by maximizing Eqn. (3) W.r.t. jJ(y I x,) under the constraints (4), resulting in: 1 P(yIXi,B) jJ(y I Xi) = L: p(y' I Xi' B) Y ESj o VYESi (6) otherwise importantly, this procedure optImIzes the objective function in Eqn. (1), by the usual EM proof. The negative of the KL divergence in Eqn. (3) is a lower bound on the log likelihood (1) by Jensen's inequality. Substituting Eqn. (6) for jJ(y I Xi) into (3) we obtain equality. For easy reference, we called this model the 'EM Model'. in some 'multiple-label' problems, information on which class label within the set Sj is more likely to be the correct one can be obtained. For example, if three assessors manually label the training data, in some cases two assessors will agree on the class label and the other doesn't. We should give more weights to the labels that are agreed by two assessors and low weights to the labels that are chosen by only one. To accommodate prior information on the class labels, we generalize the previous framework so that the estimated label distribution jJ(y I Xi) has low relative entropy with the prior on the class labels. Therefore, the objective function (1) and its EM -bound (4) can be modified to be B* = arg~in{ ~ ~ p(y I x,)logP:i.lyx,) - ~ ~ p(y I X,) log p(y I Xi,B)} (7) where " i,y is the prior probability for the i-th training example to have class label y. The first term in the objective function (7) encourages the estimated label distribution to be consistent with the prior distribution of class labels and the second term encourages the prediction of the model to be consistent with the estimated label distribution. The objective (7) is an upper bound on - L:\og L: 7l'i,yP(Y I xi,B) . YE Si When there is no prior information about which class label within the given set is preferable we can set n ;,y = 1/ I S; I and Eqn. (7) becomes B* = argmin{II p(y I xJlog p(y I x;) -II p(y I xJlogp(y I X;,B)} (I ; YES, 1/ I S; I ; YES, (7') = argmin{II p(y I xJlog p(y I xJ + Ilog I S; I} = argmin{I I p(y I xJlog p(y I xJ } II ; yES, p(y I x;,B) ; II; yES, p(y I x;,IJ) Eqn. (7') is identical to Eqn. (3), which shows that when there is no pnor knowledge on the class label distribution, we revert back to the' EM Model' . Again we can optimize Eqn. (7) using the EM algorithm, estimating the label distribution p(y I x;) in the E step fitting any standard discriminative model for p(y I x,B) in the M step. The label distribution that optimizes (7) in the Estep is: p(y I x.) = 7r. p(y I x B) / " 7r .p(y'l x B), and 0 otherwise. As we would expect, I I,), I' ~Y'ESi I,), I' the label distribution p(y I xJ trades off both the prior n ;,y and the model-based prediction p(y I x;, B). We will call this model 'EM+Prior Model'. Figure I: Diagram for graphic model interpretation of 'EM+Prior' model The 'EM+Prior Model' can also be interpreted from the viewpoint of a graphical model. The basic idea is illustrated in Figure 1, where the random variable ti represents the event that the true label Yi belongs to the label set Si. For the 'EM+Prior' model, n ;,y actually plays the role of a likelihood or noise model where, where p(y E Si I x i ,(}) in Eqn. (1) is replaced as in Eqn. (8). From this point of view, generalizing to Bayesian learning and regression is easy. P(ti = 11 xi,B) = LP(ti = 11 y)p(y I xi,B) = L"i.yP(y I xi,B) (8) YE5i YESi 5 Experiments The goal of our experiments is to answer the following questions: l. Is the 'EM Model' better than the 'Nai've Model'? The difference between the 'EM Model' and the 'Naive Model' for the 'multiple-label' problems is that the 'Naive Model' makes no effort in finding the correct label within the given label set while the 'EM Model' applies the EM algorithm to clarify the ambiguity in the class label. Therefore, in this experiment, we need to justify empirically whether the effort in disambiguating class labels is effective. 2. Will prior knowledge help the model? The difference between the 'EM Model' and the 'EM+Prior Model' is that the 'EM+Prior Model' takes advantage of prior knowledge on the distribution of class labels for instances. However, since sometimes the prior knowledge on the class label can be misleading, we need to test the robustness of the 'EM+Prior Model' to such noisy prior knowledge. 5.1 Experimental Data Since there don't exist standard data sets with trammg instances assigned to multiple class labels, we actually create several data sets with multiple class labels from the UCI classification datasets. To make our experiments more realistic, we tried two different methods of creating datasets with multiple class labels: • Random Distractors. For every training instance, in addition to the original assigned label, several randomly selected labels are added to the label candidate set. We varied the number of added classes to test reliability of our algorithm. • Nai"ve Bayes Distractors. In the previous method, the added class labels are randomly selected and therefore independent from the original class label. However, we usually expect that distractors are in the candidate set should be correlated with the original label. To simulate this realistic situation, we use the output of a NaIve Bayes (NB) classifier as an additional member of the class label candidate set. 1 First, a NaIve Bayes classifier using Gaussian generation models is trained on the dataset. Then, the trained NB classifier is asked to predict the class label of the training data. When the output of the NB classifier differs from the original label, it is added as a candidate label. Otherwise, a randomly selected label is added to the candidate set. Since the NB classifier errors are not completely random, they should have some correlation with the originally assigned labels. In these experiments we chose a simple maximum entropy (ME) model [5] as the basic discriminative model, which expresses a conditional probability p(y I i,e) in an exponential form, i.e. p(y I i ,e) = exp(e· i )/ Z(i ) where x is the input feature vector and Z(x) is the normalization constant which ensures that the conditional probabilities over all different classes y sum to 1. T bill £ b f UCI d h d· h a e n ormatIOn a out lve atasets t at are use III t e expenments Class Name ecoli wine pendi2it iris 21ass Number of Instances 327 178 2000 154 204 Number of Classes 5 3 10 3 5 Number of Features 7 13 16 14 10 % NB Output;tAssigned Label 15% 8% 22.3% 13.3% 16.6% Error Rate for ME on clean 12.6% 3.7% 9% 5.7% 9.7% data (lO-fold cross validation) Five different VCI datasets were selected as the testbed for experiments. Information about these datasets is listed in Table 1. For each dataset, the 10-fold cross validation results for the ME model together with the percentage of time the NB output differs from the originally assigned label are also listed in Table 1. 5.2 Experiment Results (I): 'Naive Model' vs. 'EM Model' Table 2 lists the results for the 'NaIve Model' and 'EM Model' over a varied number of additional class labels created by the 'random distractor' and the 'NaIve Bayes' distractor. Since 'wine' and 'iris' datasets only have 3 different classes, the maximum additional class labels for these two data sets is 1. Therefore, there is no experiment result for the case of 2 or 3 distractor class labels for 'wine' and 'iris'. As shown in Table 2, for the random distractor, the 'EM Model' substantially outperforms the 'NaIve Model' in all cases. Particularly, for the 'wine' and 'iris' datasets, by introducing an additional class label to every training instance, there is only one class label left out of the class label candidates and yet the performance of the 'EM Model' is still close to the case when there are no additional class labels. 1 NaIve Bayes distractor should not be confused with the multiple-label NaIve Model. Meanwhile, the 'NaIve Model' degrades significantly for both cases, i.e. from 3.7% to 10.0% for 'wine' and 5.7% to 18.5% for 'iris'. Therefore, we can conclude that the 'EM Model' is able to reduce the noise caused by randomly added class labels. T bl 2 A a e verage 10 D Id - 0 cross va I attOn error rates D b h 'N or ot aIve M d I' d 'EM M d I' o e an o e Class Name ecoli wine pendigit iris glass 1 extra label Naive 17.3% 10% 14.2% 18.5% 24.9% by random EM 13.6% 4.4% 8.9% 5.2% 12.9% distracter 2 extra labels Naive 20.7% 15.4% 44.9% by random EM 14.9% 9.4% 12% distracter 3 extra labels Naive 25 .8% 17.6% 34.6% by random EM 18.3% 11.7% 33.5% distracter 1 extra label Naive 22.4% 15.7% 17.2% 18.5% 27.7% byNB EM 14.6% 6.8% 15.4% 6.7% 20.6% distracter Secondly, we compare the performance of these two models over a more realistic setup for the 'multiple-label' problem where the distractor identity is correlated with the true label (simulated by using the NB distractor). Table 1 gives the percentage of times when the trained Naive Bayes classifier disagreed with the 'true' labels, which is also the percentage of the additional class labels that is created by the 'Naive Bayes distracter'. The last row of Table 2 shows the performance of these two models when the additional class labels are introduced by the 'NB distracter'. Again, the 'EM Model' is significantly better than 'NaIve Model'. For dataset 'ecoli', 'wine' and 'iris', the averaged error rates of the 'EM Model' are very close to the cases when there are no distractor class labels. Therefore, we can conclude that the 'EM Model' is able to reduce the noise caused not only by random label ambiguity but also by some systematic label ambiguity. 5.3 Experiment Results (II): 'EM Model' vs. 'EM+Prior Model' T bl 3 A a e verage 10 D Id - 0 cross va I attOn error rates D 'EM P' M d I' or + nor o e over f UCld Ive atasets. Class Name ecoli wine pendigit iris glass I extra label Perfect 13 .3% 3.7% 8.7% 5.2% 12.4% by random Noisy 13 .3% 3.2% 9.0% 18.5% 12.9% distracter 2 extra labels Perfect 13.6% 9.0% 12.5% by random Noisy 13.9% 9.4% 13.6% distracter 3 extra labels Perfect 12.6% 10.0% 12.4% by random Noisy 13.9% 11.0% 16.8% distracter I extra label Perfect 13.9% 5.0% 13.4% 5.2% 16.7% byNB Noisy 15.3% 6.2% 14.2% 6.7% 19.0% distracter In this subsection, we focus on whether the information from a prior distribution on class labels can improve the performance. In this experiment, we study two cases: • 'Perfect Case '. Here the guidance of the prior distribution on class labels is always correct. In our experiments for every training instance Xi we set the probability Jri,y; twice as large for the correct Yi as for other Jri,yo<y; • • 'Noisy Case '. For this case, we only allow the guidance of the prior distribution on the class label to be correct 70% of the time. With this setup, we are able to see if the 'EM+Prior Model' is robust to noise in the prior distribution. Table 3 lists the results for 'EM+Prior Model' under both 'Perfect' and 'Noisy' situations over five different collections. In the 'perfect case', the averaged error rates of 'EM+Prior Model' are quite close to the case when there is no label ambiguity at all (see Table 1). Moreover, the performance of the 'Noisy case' is also close to that of the 'Perfect case' for most data sets listed in Table 3. Therefore, we can conclude that our 'EM+Prior Model' is able to take advantage of the pnor distribution on class labels even when some of the' guidance' is not correct. 6 Conclusions and Future Work We introduced the 'multiple-label' problem and proposed a discriminative framework that is able to clarify the ambiguity between labels. Although it is discriminative, this framework is firmly grounded in the EM algorithm for maximum likelihood estimation. The framework was generalized to take advantage of prior knowledge on which class label is more likely to be the target label. Our experiments clearly indicate that the proposed discriminative model is robust to the addition of noisy class labels and to errors in the prior distribution over class labels. The idea of this framework, allowing the target distribution p(y I x,) to be inferred from the classifier itself, can be extended in many different ways. We outline several promising directions which we hope to explore. (1) It should be possible to extend this framework to function approximation, where y E 91, and ranges or distributions are given for the target. In this case, it may be useful to parameterize p(y I x,) to simplify the resulting variational optimization problem. (2) We have focused on maximum likelihood; however Bayesian generalizations, where the goal is to compute a posterior distribution over () given ambiguously labeled data would be interesting. (3) It is possible to use these ideas as a framework for combining multiple models. Each model is trained on a small labeled data set and predicts labels on a large unlabeled data set. These predicted labels can be combined with the small set to form a larger multiply-labeled data set (since not all models will agree). This larger data set can be used to train a more complex model. (4) It is possible to extend this framework to handle the presence of label noise and to combine it with the multiple-instance problem [3]. References [1] A. P. Dawid and A. M. Skene (1979) Maximum likelihood estimation of observer errorrates using the EM algorithm. Applied Statistics 28:20-28. [2] A. Dempster, N. Laird and D. Rubin (1977), Maximum likelihood from incomplete data via the EM algorithm, Journal of the Royal Statistical Society, 39 (Series B), 1-38. [3] T. G. Dietterich, R. H. Lathrop, and T. L.-Perez (1997) Solving the multiple-instance problem with axis-parallel rectangles, Artificial Intelligence, 89(1-2), pp. 31-71. [4] A. McCallum (1999) Multi-label text classification with a mixture model trained by EM, AAAI'99 Workshop on Text Learning. [5] S. Della Pietra, V. Della Pietra and J. Lafferty (1997) Inducing features of random fields, IEEE Transactions on Pattern Analysis and Machine Intelligence, 19(4): 380-393. [6] Y. Grandvalet (2002), Logistic regression for partial labels, 9th Information Processing and Managem ent of Uncertainty in Knowledge-based System (IPMU'02) , pp. 1935-1941.
2002
93
2,302
Branching Law for Axons Dmitri B. Chklovskii and Armen Stepanyants Cold Spring Harbor Laboratory 1 Bungtown Rd. Cold Spring Harbor, NY 11724 mitya@cshl.edu stepanya@cshl.edu Abstract What determines the caliber of axonal branches? We pursue the hypothesis that the axonal caliber has evolved to minimize signal propagation delays, while keeping arbor volume to a minimum. We show that for a general cost function the optimal diameters of mother (do) and daughter (d], d2 ) branches at a bifurcation obey b h· 1 d v+2 d v+2 d v+2 Th d " l' h a ranc mg aw: 0 =] + 2 . e envatIOn re les on t e fact that the conduction speed scales with the axon diameter to the power V (v = 1 for myelinated axons and V = 0.5 for nonmyelinated axons). We test the branching law on the available experimental data and find a reasonable agreement. 1 Introduction Multi-cellular organisms have solved the problem of efficient transport of nutrients and communication between their body parts by evolving spectacular networks: trees, blood vessels, bronchs, and neuronal arbors. These networks consist of segments bifurcating into thinner and thinner branches. Understanding of branching in transport networks has been advanced through the application of the optimization theory ([1], [2] and references therein). Here we apply the optimization theory to explain the caliber of branching segments in communication networks, i.e. neuronal axons. Axons in different organisms vary in caliber from O.ll1m (terminal segments in neocortex) to lOOOl1m (squid giant axon) [3]. What factors could be responsible for such variation in axon caliber? According to the experimental data [4] and cable theory [5], thicker axons conduct action potential faster, leading to shorter reaction times and, perhaps, quicker thinking. This increases evolutionary fitness or, equivalently, reduces costs associated with conduction delays. So, why not make all the axons infinitely thick? It is likely that thick axons are evolutionary costly because they require large amount of cytoplasm and occupy valuable space [6], [7]. Then, is there an optimal axon caliber, which minimizes the combined cost of conduction delays and volume? In this paper we derive an expression for the optimal axon diameter, which minimizes the combined cost of conduction delay and volume. Although the relative cost of delay and volume is unknown, we use this expression to derive a law describing segment caliber of branching axons with no free parameters. We test this law on the published anatomical data and find a satisfactory agreement. 2 Derivation of the branching law Although our theory holds for a rather general class of cost functions (see Methods), we start, for the sake of simplicity, by deriving the branching law in a special case of a linear cost function. Detrimental contribution to fitness, It , of an axonal segment of length, L , can be represented as the sum of two terms, one proportional to the conduction delay along the segment, T, and the other - to the segment volume, V: It =aT+ jJV. (1) Here, a and f3 are unknown but constant coefficients which reflect the relative contribution to the fitness cost of the signal propagation delay and the axonal volume. 5rr--,----.---.----,---.----.---.--7TO 4.5 4 3.5 2.5 2 1.5 delay cost ~ l/d 0.5 1 1.5 2 2.5 3 3.5 4 diameter, d Figure 1: Fitness cost of a myelinated axonal segment as a function of its diameter. The lines show the volume cost, the delay cost, and the total cost. Notice that the total cost has a minimum. Diameter and cost values are normalized to their respective optimal values. We look for the axon caliber d that minimizes the cost function It. To do this, we rewrite It as a function of d by noticing the following relations: i) Volume, V=!!...Ld 2 . ii) Time delay, T=.!::....; iii) Conduction velocity s=kd for 4 ' s myelinated axons (for non-myelinated axons, see Methods): (2) This cost function contains two terms, which have opposite dependence on d, and has a minimum, Fig. 1. a~ Next, by setting = 0 we find that the cost is minimized by the following axonal ad caliber: ( ) 1/3 d=~ lrkfJ (3) The utility of this result may seem rather limited because the relative cost of time delays vs. volume, a/ fJ ' is unknown. Figure 2: A simple axonal arbor with a single branch point and three axonal segments. Segment diameters are do, d" and d2 . Time delays along each segment are to, t" and t2. The total time delay down the first branch is T,= to +f" and the second Tz= to +f2· However, we can apply this result to axonal branching and arrive at a testable prediction about the relationship among branch diameters without knowing the relative cost. To do this we write the cost function for a bifurcation consisting of three segments, Fig. 2: (4) where to is a conduction delay along segment 0, t1 - conduction delay along segment 1, t2 - conduction delay along segment 2. Coefficients a 1 and a 2 represent relative costs of conduction delays for synapses located on the two daughter branches and may be different. We group the terms corresponding to the same segment together: (5) We look for segment diameters, which minimize this cost function. To do this we make the dependence on the diameters explicit and differentiate in respect to them. Because each term in Eq. (5) depends on the diameter of only one segment the variables separate and we arrive at expressions analogous to Eq.(3): d = 2al ( J I/3 I kfJn ' d = 2a2 ( J if3 2 k {In (6) It is easy to see that these diameters satisfy the following branching law: dg = d? +d~ . (7) Similar expression can be derived for non-myelinated axons (see Methods). In this case, the conduction velocity scales with the square root of segment diameter, resulting in a branching exponent of 2.5 . We note that expressions analogous to Eq. (7) have been derived for blood vessels, tree branching and bronchs by balancing metabolic cost of pumping viscous fluid and volume cost [8], [9]. Application of viscous flow to dendrites has been discussed in [10]. However, it is hard to see how dendrites could be conduits to viscous fluid if their ends are sealed. Rail [11] has derived a similar law for branching dendrites by postulating impedance matching: (8) However, the main purpose of Rail's law was to simplify calculations of dendritic conduction rather than to explain the actual branch caliber measurements. 3 Comparison with experiment We test our branching law, Eq.(7), by comparing it with the data obtained from myelinated motor fibers of the cat [12], Fig. 3. Data points represent 63 branch points for which all three axonal calibers were available. Eq.(7) predicts that the data should fall on the line described by: (9) where exponent TJ = 3 . Despite the large spread in the data it is consistent with our predictions. In fact, the best fit exponent, TJ = 2.57 , is closer to our prediction than to Rail 's law, TJ = 1.5. We also show the histogram of the exponents TJ obtained for each of 63 branch points from the same data set, Fig. 4. The average exponent, TJ = 2.67 , is much closer to our predicted value for myelinated axons, '7 = 3, than to RaIl's law, '7 = 1.5. 0.9 0.8 0.7 0.6 '"tj"'" RaZZ's law, '--.. 0.5 '"tj '-< 1] = 1.5 0.4 0.3 0.2 0.1 O L-~~~--~~~---L---L--~--~~~~ o 0.1 0.2 0.3 0.4 0.5 0.6 0.7 0.8 0.9 Figure 3: Comparison of the experimental data (asterisks) [12] with theoretical predictions. Each axonal bifurcation (with d, =F- d2 ) is represented in the plot twice. The lines correspond to Eq.(9) with various values of the exponent: the RaIl's law, '7 = 1.5 , the best-fit exponent, '7 = 2.57 , and our prediction for myelinated axons, '7 = 3. Analysis of the experimental data reveals a large spread in the values of the exponent, '7. This spread may arise from the biological variability in the axon diameters, other factors influencing axon diameters, or measurement errors due to the finite resolution of light microscopy. Although we cannot distinguish between these causes, we performed a simulation showing that a reasonable measurement error is sufficient to account for the spread. First, based on the experimental data [12], we generate a set of diameters do, d, and d2 at branch points, which satisfy Eq. (7). We do this by taking all diameter pairs at branch point from the experimental data and calculating the value of the third diameter according to Eq. (7). Next we simulate the experimental data by adding Gaussian noise to all branch diameters, and calculate the probability distribution for the exponent '7 resulting from this procedure. The line in Fig. 4 shows that the spread in the histogram of branching exponent could be explained by Gaussian measurement error with standard deviation of O.4.um. This value of standard deviation is consistent with 0.5.um precision with which diameter measurements are reported in [12]. 14 12 10 RaIl's 8 average exponent 6 predicted exponent 2 0 0 2 3 6 Figure 4: Experimentally observed spread in the branching exponent may arise from the measurement errors. The histogram shows the distribution of the exponent '7, Eq. (9), calculated for each axonal bifurcation [12]. The average exponent is '7 = 2.67 . The line shows the simulated distribution of the exponent obtained in the presence of measurement errors. 4 Conclusion Starting with the hypotheses that axonal arbors had been optimized in the course of evolution for fast signal conduction while keeping arbor volume to a minimum we derived a branching law that relates segment diameters at a branch point. The derivation was done for the cost function of a general form, and relies only on the known scaling of signal propagation velocity with the axonal caliber. This law is consistent with the available experimental data on myelinated axons. The observed spread in the branching exponent may be accounted for by the measurement error. More experimental testing is clearly desirable. We note that similar considerations could be applied to dendrites. There, similar to non-myelinated axons, time delay or attenuation of passively propagating signals scales as one over the square root of diameter. This leads to a branching law with exponent of 5/2. However, the presence of reflections from branch points and active conductances is likely to complicate the picture. 5 Methods The detrimental contribution of an axonal arbor to the evolutionary fitness can be quantified by the cost, Q:. We postulate that the cost function, Q:, is a monotonically increasing function of the total axonal volume per neuron, V , and all signal propagation delays, Tj , from soma to j -th synapse, where j = 1,2,3, ... : (10) Below we show that this rather general cost function (along with biophysical properties ofaxons) is minimized when axonal caliber satisfies the following branching law: ( 11) with branching exponent '7 = 3 for myelinated and '7 = 2.5 for non-myelinated axons. Although we derive Eq. (11) for a single branch point, our theory can be trivially extended to more complex arbor topologies. We rewrite the cost function, ([, in terms of volume contributions, ~, of i -th axonal segment to the total volume of the axonal arbor, V , and signal propagation delay, ti , occurred along i -th axonal segment. The cost function reduces to: (12) Next, we express volume and signal propagation delay of each segment as a function of segment diameter. The volume of each cylindrical segment is given by: 1r 2 V =-Ld, I 4 I I (13) where Li and di are segment length and diameter, correspondingly. Signal propagation delay, ti , is given by the ratio of segment length, Li , and signal speed, Si' Signal speed along axonal segment, in turn, depends on its diameter as: (14) where V = 1 for myelinated [4] and V = 0.5 for non-myelinated fibers [5]. As a result propagation delay along segment i is: (15) Substituting Eqs. (13), (15) into the cost function, Eq. (12), we find the dependence of the cost function on segment diameters, t1'(1r Lod2 1r ~d 2 1r ~d 2 Lo ~ Lo ~ J ~ ++-+--+4 0 4 I 4 2 ' kd v kd v ' kd v kd v . o I 0 2 (16) To find the diameters of all segments, which minimize the cost function ([, we calculate its partial derivatives with respect to all segment diameters and set them to zero: ~=Q:'!!...' d -Q:' v~ =0 ad v 2 '--2 2 T2 kd v+1 2 2 By solving these equations we find the optimal segment diameters: 2v(Q:~ +Q:;. ) dv+2 = I 2 o k1rQ:~' 2vQ:' d v+2 =----l.. 1 k1rQ:~ , 2vQ:' d v+2 =----!J.. 2 k1rQ:~ . (17) (18) These equations imply that the cost function is minimized when the segment diameters at a branch point satisfy the following expression (independent of the particular form of the cost function, which enters Eq. (18) through the partial derivatives Q:~ , Q:~ , and Q:~ ): I 2 d"=d"+d" o 1 2 , l] = v+2. (19) References [I] Brown, J. H., West, G. B., and Santa Fe Institute (Santa Fe N.M.). (2000) Scaling in biology. Oxford; New York: Oxford University Press. [2] Weibel, E. R. (2000) Symmorphosis : on form and function in shaping life. Cambridge, Mass.; London: Harvard University Press. [3] Purves, D. (1997) Neuroscience. Sunderland, Mass.: Sinauer Associates. [4] Rushton, W. A. H. (1951) A theory of the effects of fibre size in medullated nerve. J Physiol 115, 10 1-122. [5] Hodgkin, A. L. (1954) A note on conduction velocity. J Physioll25, 221-224. [6] Cajal, S. R. y. (1999) Texture of the Nervous System of Man and the Vertebrates, Volume l. New York: Springer. [7] Chklovskii, D. B., Schikorski, T., and Stevens, C. F. (2002) Wiring optimization in cortical circuits. Neuron 34,341-347. [8] Murray, C. D. (1926) The physiological principle of minimum work. 1. The vascular system and the cost of blood volume. PNAS 12, 207-214. [9] Murray, C. D. (1927) A relationship between circumference and weight in trees and its bearing on branching angles. J Cen Physioll0, 725-729. [10] Cherniak, C., Changizi, M., and Kang D.W. (1999) Large-scale optimization of neuron arbors. Phys Rev E 59,6001-6009. [11] Rail, W. (1959) Branching dendritic trees and motoneuron membrane resistivity. Exp Neuroll,491-527. [12] Adal, M. N., and Barker, D. (1965) Intramuscular branching of fusimotor fibers. J Physiol 177, 288-299.
2002
94
2,303
Dyadic Classification Trees via Structural Risk Minimization Clayton Scott and Robert Nowak Department of Electrical and Computer Engineering Rice University Houston, TX 77005 cscott,nowak  @rice.edu Abstract Classification trees are one of the most popular types of classifiers, with ease of implementation and interpretation being among their attractive features. Despite the widespread use of classification trees, theoretical analysis of their performance is scarce. In this paper, we show that a new family of classification trees, called dyadic classification trees (DCTs), are near optimal (in a minimax sense) for a very broad range of classification problems. This demonstrates that other schemes (e.g., neural networks, support vector machines) cannot perform significantly better than DCTs in many cases. We also show that this near optimal performance is attained with linear (in the number of training data) complexity growing and pruning algorithms. Moreover, the performance of DCTs on benchmark datasets compares favorably to that of standard CART, which is generally more computationally intensive and which does not possess similar near optimality properties. Our analysis stems from theoretical results on structural risk minimization, on which the pruning rule for DCTs is based. 1 Introduction Let      be a jointly distributed pair of random variables. In pattern recognition,  is called an input vector, and contains the measurements from an experiment. The values in  are referred to as features, attributes, or predictors.  is called a response variable, and is thought of as a class label associated with  . A classifier is a function     that attempts to match an input vector with the appropriate class. The performance of  for a given distribution of the data is measured by the probability of error:   "!$# %& (' !$)+* The classifier with the smallest probability of error, denoted -, , is called the Bayes classifier. The Bayes classifier is given by  , ./ 0! 1  if 23. 5476 8  otherwise  where 23. "! #  !    !$.  !   .  is the regression of  on  . The probability of error for the Bayes classifier is denoted  , . The true distribution on the data is generally unknown. In such cases, we may construct a classifier  based on a training dataset !  6   6 ***   of independent, identically distributed samples. A procedure that constructs a classifier for all is called a discrimination rule. The performance of   !   .   is measured by   !     ! #      (' !$    + the conditional probability of error. Note that   is random, since  is random. In this paper, we examine a family of classifiers called dyadic classification trees (DCTs), built by recursive, dyadic partitioning of the input space. The appropriate tree from this family is obtained by building an initial tree (in a data-independent fashion), followed by a data-dependent pruning operation based on structural risk minimization (SRM). Thus, one important distinction between our approach and usual decision trees is that the initial tree is not adaptively grown to fit the data. The pruning strategy resembles that used by CART, except that the penalty assigned to a subtree is proportional to the square root of its size. SRM penalized DCTs lead to a strongly consistent discrimination rule for input data  with support in the unit cube     . We also derive bounds on the rate of convergence of DCTs to the Bayes error. Under a modest regularity assumption (in terms of the box-counting dimension) on the underlying optimal Bayes decision boundary, we show that complexityregularized DCTs converge to the Bayes decision at a rate of  6   6 . Moreover, the minimax error rate for this class is at least  6   . This shows that dyadic classification trees are near minimax-rate optimal, i.e., that no discrimination rule can perform significantly better in this minimax sense. We also present an efficient algorithm for implementing the pruning strategy, which leads to an   algorithm for DCT construction. The pruning algorithm requires  ! #"%$& operations to prune an initial tree with  terminal nodes, and is based on the familiar pruning algorithm used by CART [1]. Finally, we compare DCTs with a CART-like tree classifier on four common datasets. 2 Dyadic Classification Trees Throughout this work we assume that the input data is restricted to the unit hypercube,     . This is a realistic assumption for real-world data, provided appropriate translation and scaling is applied. Let ' ! )( 6 *** (+*  be a tree-structured partition of the input space, where each (+, is a hyperrectangle with sides parallel to the coordinate axes. Given an integer - , let  -.  denote the element of ***  /  that is congruent to - modulo / . If (0, 1' is a cell at depth 2 in the tree, let (  6 , and (  8  , be the rectangles formed by splitting (0, at its midpoint along coordinate  2+3   . As a convention, assume (  6 , contains those points of (0, that are less than or equal to the midpoint along the dimension being split. Definition 1 A sequential dyadic partition (SDP) is any partition of     that can be obtained by applying the following rules recursively: 1. The trivial partition ' !      is an SDP, 2. If ' ! )( 6 *** (+*  is an SDP, then so is 4( 6 *** (5,  6  (  6 ,  (  8  ,  (0,  6 *** ( * + where 6 may be any integer, 87 6&7:9 . We define a dyadic classification tree (DCT) to be a sequential dyadic partition with a class label (0 or 1) assigned to each node in the tree. The partitions are sequential because children must be split along the next coordinate after the coordinate where their parent was split. Such splits are referred to as forced splits, as opposed to free splits, in which any coordinate may be split. The partitions are dyadic because we only allow midpoint splits. By a complete DCT of depth  , we mean a DCT such that every possible split up to depth  has been made. In a complete DCT, every terminal node has volume   . If  is a multiple of / , then the terminal nodes of a complete DCT are hypercubes of sidelength     . 3 SRM for DCTs Structural risk minimization (SRM) is an inductive principle for selecting a classifier from a sequence of sets of classifiers based on complexity regularization. It was introduced by Vapnik and Chervonenkis (see [2]), and later analyzed by Lugosi and Zeger [3], [4, Ch. 18]. We formulate structural risk minimization for dyadic classification trees by applying results from [4, Ch. 18]. SRM is formulated in terms of the VC dimension, which we briefly review. Let  be a collection of classifiers  5     , and let  6 ***   . If each of the  possible labellings of  6 ***4 can be correctly classified by some   , we say  shatters  6 ***  . The Vapnik-Chervonenkis dimension (or VC dimension) of  , denoted by  , is the largest integer for which there exist  6 ***    such that  shatters  6 ***  . If  shatters some points for every , then  !  by definition. The VC dimension is a measure of the capacity of  . As  increases,  is able to separate more complex patterns. If ! for some integer   , we say is dyadic. For dyadic , and for +7:9 7  , let   *   denote the collection of all DCTs with 9 terminal nodes and depth not exceeding / , so that no terminal node has a side of length less than  ! . It is easily shown that the VC dimension of   *   is 9 [5]. Given a dyadic integer , and training data  ,   ,   , 6 , for 9)!+***   , define   *    ! arg min  "!$#&%' ( )  3   where )     "!   * , 6 +  % , (' !$ , is the empirical risk of  . Thus,   *    is selected by empirical risk minimization over   *   . Define the penalty term , 9  !./ 9& " $ 10)  (1) and for  2  *   , define the penalized risk 3  3  "! )  3 3 , 9  * The SRM principle selects the classifier  ,   from among   *     9 ! 4***  , that minimizes 3      *    . We refer to 3, 5  as a penalized or complexity-regularized dyadic classification tree. We have the following risk bound. Theorem 1 For all and 9 76  , and for all 78:9 ,  9  , #<;   ,   >= ?@5A  "!$#&%' (  / 4B7DC7:0   EGF  6 8H 3JI * 0  KE1F L 6 8  and in particular, for all and ,     ,    =  , 7  ? @ 6  *     9 " $ 3J9 3  ?@5A  "! # %' (    =  ,   * Sketch of proof: Apply Theorem 18.3 in [4] with   *  !   *   and  * ! 9 for 9 ! 4***  . The first term on the right-hand side of the second bound is an upper bound on the expected estimation error. The second term is the approximation error. Even though the penalized DCT does not know the value of 9 that optimally balances the two terms, it performs as though it does, because of the “min” in the expression. Nobel [6] gives similar results for classifiers based on initial trees that depend on the data. The next result demonstrates strong consistency for the penalized DCT, where strong consistency means     , with probabilty one. Theorem 2 Suppose    , with !  assuming only dyadic integer values. If  !   #"%$ , then the penalized dyadic classification tree is strongly consistent for all distributions supported on the unit hypercube. Sketch of proof: The proof follows from the first part of Theorem 1 and strong universal consistency of the regular histogram classifier. See [5] for details. 4 Rates of Convergence In this section, we investigate bounds on the rate of convergence of complexity-regularized DCTs. First we obtain upper bounds on the rate of convergence for a particular class of distributions on    . We then state a minimax lower bound on the rate of convergence of any data based classifier for this class. Most rate of convergence studies in pattern recognition place a constraint on the regression function 23. "! #  !    !$.  by requiring it to belong to a certain smoothness class (e.g. Lipschitz, Besov, bounded variation). In contrast, the class we study is defined in terms of the regularity of the Bayes decision boundary, denoted  . We allow 23. to be arbitrarily irregular away from  , so long as it is well behaved near  . The Bayes decision boundary is informally defined as  ! .  23. ! " . A more rigorous definition should take into account the fact that 2 might not take on the value K [5]. We now define a class of distributions. Let    denote a random pair, as before, where  takes on values in     . Definition 2 Let  6  8 4  . Define   6  8 to be the collection of all distributions on    such that for all dyadic integers , if we subdivide the unit cube into cubes of side length  , A1 (Bounded marginal): For any such cube  intersecting the Bayes decision boundary, #    7 6 ( 0! 6   , where  denotes the Lebesgue measure. A2 (Regularity): The Bayes decision boundary passes through at most  8   6 of the resulting  cubes. Define  to be the class of all    belonging to   6  8 for some  6  8 . The first condition holds, for example, if the density of  is essentially bounded with respect to the Lebesgue measure, with essential supremum 7 6 . The second condition can be shown to hold when one coordinate of the Bayes decision boundary is a Lipschitz function of the others. See, for example, the boundary fragment class of [7] with !  therein. The regularity condition A2 is closely related to the notion of box-counting dimension of the Bayes decision boundary [8]. Roughly speaking, A2 holds for some  8 if and only if the Bayes decision boundary has box-counting dimension / =  . The box-counting dimension is an upper bound on the Hausdorff dimension, and the two dimensions are equal for most “reasonable” sets. For example, if  is a smooth 9 -dimensional submanifold of  , then  has box-counting dimension 9 . 4.1 Upper Bounds on DCT Rate of Convergence Theorem 3 Assume the distribution of    belongs to    6  8 . Let  ,   be the penalized dyadic classification tree, as described in Section 3. If    #"%$ 6   6 , then there exists a constant  4  such that for all &4 ,      ,    =  , 7 #"%$  6   6  * When we write    " $ 6   6  , we mean " $ 8 !  " $ 8    " $ 6  6 3  , where  is arbitrary. Sketch of proof: It can be shown that for each dyadic , there exists a pruned DCT  with 9 !     6 leaf nodes, such that    =  , 7  6  8  . Plugging this into the risk bound in Theorem 1 and minimizing over produces the desired result [5]. The minimal value of   in the above theorem tends to  6  8 as /   . Note that similar rate of convergence results for data-grown trees would be more difficult to establish, since the approximation error is random in those cases. It is possible to eliminate the log factor in the upper bound by means of Alexander’s inequality, as discussed in [4, Ch. 12]. This leads to a much larger value of   , but an improved asymptotic rate. To illustrate the significance of Theorem 3, consider a penalized histogram classifer, with bin width determined adaptively by structural risk minimization, as described in [4, Problem 18.6]. For that rule, the best exponent on the rate of convergence for our class is   /83B , compared with   /83  for our rule. Intuitively, this is because the adaptive resolution of dyadic classification trees enables them to focus on the / =  dimensional decision boundary, rather than the / dimensional regression function. In the event that the data  occupies a / / dimensional subset of     , the proof of Theorem 3 follows through as before, but with an exponent of /  3  instead of / 3  . Thus, the penalized DCT is able to automatically adapt to the dimensionality of the input data. 4.2 Minimax Lower Bound The next result demonstrates that complexity-regularized DCTs nearly achieve the minimimax rate for our class of distributions. Theorem 4 Let   denote any discrimination rule based on training data. There exists a constant  4  such that for sufficiently large, ?@5A       =  ,    6  * Sketch of proof: This result follows from Theorem 2 in [7] (with !!  therein). The proof of that result is in turn based on Assouad’s lemma. Theorems 3 and 4, together with the above remark on Alexander’s inequality, show that complexity-regularized DCTs are close to minimax-rate optimal for the class  . We suspect that the class studied by Tsybakov [7], used in our minimax proof, is more restrictive than our class. Therefore, it may be that the exponent  / in the above theorem can be decreased to   /53$ , in which case we achieve the minimax rate. Although bounds on the minimax rate of convergence in pattern recognition have been investigated in previous work [9, 10], the focus has been on placing regularity assumptions on the regression function 2  ./ )! #  !    ! .  . Yang demonstrates that in such cases, for many common function spaces (e.g. Lipschitz, Besov, bounded variation), classification is not easier than regression function estimation [10]. This contrasts with the conventional wisdom that, in general, classification is easier than regression function estimation [4, Ch. 6]. Our approach is to study minimax rates for distributions defined in terms of the regularity of the Bayes decision boundary. With this framework, we see that minimax rates for classification can be orders of magnitude faster than for estimation of 23./ , since 23./ may be arbitrarily irregular away from the decision boundary for distributions in our class. This view of minimax classification has also been adopted by Mammen and Tsybakov [7,11]. Our contribution with respect to their work is an implementable discrimination rule, with guaranteed computational complexity, that nearly achieves the minimax lower bounds. We also remark that “fast rates” (e.g.,    6 ) obtained by those authors require much stronger assumptions on the smoothness of the decision boundary and 23 ./ than we employ in this paper. 5 An Efficient Pruning Algorithm In this section we describe an algorithm to compute the penalized DCT efficiently. We switch notation, using  to denote an arbitrary classification tree. Let   7  denote that   is a pruned version of  (possibly  itself). For  , define  6  "! arg min   )      3       and  8  "! arg min    )  3   3       where     denotes the number of leaf nodes of   . We are interested in computing  8  % when  is a complete dyadic tree, and &! / #"%$ G0) 4 . Breiman, et.al. [1] showed the existence of weights =  !    6    ! and subtrees   6    !    such that  6  % ! , whenever    ,  6  , . Moreover, the weights  , and subtrees  , may be found in      " $    operations [12, 13]. A similar result holds for the square-root penalty, and the trees produced are a subset of the trees produced by the additive penalty [5]. Theorem 5 For each  , there exists   such that  8  "!  6   . Therefore, pruning  with the square-root penalty always produces one of the trees  . We may then determine the pruned tree   7  minimizing the penalized risk )      3      by minimizing this quantity over  , 6 ! +***   . Thus, square-root pruning can be performed in      " $    operations. In the context of constructing a penalized DCT, we start with an initial tree  that is a complete DCT. For the classifiers in Theorems 2 and 3, this initial tree has size    ! Table 1: Comparison of a greedy tree growing procedure, with model selection based on holdout error estimate, and two DCT based methods. Numbers shown are test errors. CART-HOLD DCT-HOLD DCT-SRM Pima Indian Diabetes 26.8 % 27.2 % 33.0 % Wisconsin Breast Cancer 4.7 % 6.4 % 6.3 % Ionosphere 12.88 % 18.6 % 18.8 % Waveform 19.8 % 29.1 % 31.0 %  !   " $ , and so pruning requires   operations. Since the growing procedure also requires   operations, the overall construction is   . 6 Experimental Comparison To gain a rough idea of the usefulness of dyadic classification trees in practice, we compared two DCT based classifiers with a greedy tree growing procedure, similar to that used by CART [1] or C4.5 [14], where each successive split is chosen to maximize an information gain defined in terms of an impurity function. We considered four two-class datasets, available on the web at http://www.ics.uci.edu/  mlearn/MLRepository.html. For each dataset, we randomly split the data into two halves to form training and testing datasets. For the greedy growing scheme, we used half of the training data to grow the tree, and constructed every possible pruning of the initial tree with an additive penalty. The best pruned tree was chosen to minimize the holdout error on the rest of the training data. We call this classifier CART-HOLD. The second classifier, DCT-HOLD, was constructed in a similar manner, except that the initial tree was a complete DCT, and all of the training data was used for computing the holdout error estimate. Finally, we implemented the complexityregularized DCT, denoted DCT-SRM, with square-root penalty determined by Equation 1. Table 1 shows the misclassification rate for each algorithm on each dataset. From these experiments, we might conclude two things: (i) The greedily-grown partition outperforms the dyadic partition; and (ii) Much of the discrepancy between CART-HOLD and DCT-SRM comes from the partitioning, and not from the model selection method (holdout versus SRM). Indeed, DCT-SRM beats or nearly equals DCT-HOLD on three of the four datasets. Conclusion (i) may be premature, for it is shown in [4, Ch. 20] that greedy partitioning based on impurity functions can perform arbitrarily poorly for some distributions, while this is never the case for complexity-regularized DCTs. In light of (ii), it may be possible to apply Nobel’s pruning rules for data-grown trees [6], which can now be implemented with our algorithm, to equal or surpass the performance of CART, while avoiding the heuristic and computationally expensive cross-validation technique usually employed by CART to determine the appropriately pruned tree. 7 Conclusion Dyadic classification trees exhibit desirable theoretical properties (finite sample risk bounds, consistency, near minimax-rate optimality) and can be trained extremely rapidly. The minimax result demonstrates that other discrimination rules, such as neural networks or support vector machines, cannot significantly outperform DCTs (in this minimax sense). This minimax result is asymptotic, and considers worst-case distributions. From a practical standpoint, with finite samples and non-worst-case distributions, other rules may beat DCTs, which our experiments on benchmark datasets confirm. The sequential dyadic partitioning scheme is especially susceptible when many of the features are irrelevant, since it must cycle through all features before splitting a feature again. Several modifications to the current dyadic partitioning scheme may be envisioned, such as free dyadic or median splits. Such modified tree induction strategies would still possess many of the desirable theoretical properties of DCTs. Indeed, Nobel has derived risk bounds and consistency results for classification trees grown according to data [6]. Our square-root pruning algorithm now provides a means of implementing his pruning schemes for comparison with other model selection techniques (e.g., holdout or cross-validation). It remains to be seen whether the rate of convergence analysis presented here extends to his work. Further details on this work, including full proofs, may be found in [5]. Acknowledgments This work was partially supported by the National Science Foundation, grant no. MIP– 9701692, the Army Research Office, grant no. DAAD19-99-1-0349, and the Office of Naval Research, grant no. N00014-00-1-0390. References [1] L. Breiman, J. Friedman, R. Olshen, and C. Stone, Classification and Regression Trees, Wadsworth, Belmont, CA, 1984. [2] V. Vapnik, Estimation of Dependencies Based on Empirical Data, Springer-Verlag, New York, 1982. [3] G. Lugosi and K. Zeger, “Concept learning using complexity regularization,” IEEE Transactions on Information Theory, vol. 42, no. 1, pp. 48–54, 1996. [4] L. Devroye, L. Gy¨orfi, and G. Lugosi, A Probabilistic Theory of Pattern Recognition, Springer, New York, 1996. [5] C. Scott and R. Nowak, “Complexity-regularized dyadic classification trees: Efficient pruning and rates of convergence,” Tech. Rep. TREE0201, Rice University, 2002, available at http://www.dsp.rice.edu/ cscott. [6] A. Nobel, “Analysis of a complexity based pruning scheme for classification trees,” IEEE Transactions on Information Theory, vol. 48, no. 8, pp. 2362–2368, 2002. [7] A. B. Tsybakov, “Optimal aggregation of classifiers in statistical learning,” preprint, 2001, available at http://www.proba.jussieu.fr/mathdoc/preprints/. [8] K. Falconer, Fractal Geometry: Mathematical Foundations and Applications, Wiley, West Sussex, England, 1990. [9] J. S. Marron, “Optimal rates of convergence to Bayes risk in nonparametric discrimination,” Annals of Statistics, vol. 11, no. 4, pp. 1142–1155, 1983. [10] Y. Yang, “Minimax nonparametric classification–Part I: Rates of convergence,” IEEE Transactions on Information Theory, vol. 45, no. 7, pp. 2271–2284, 1999. [11] E. Mammen and A. B. Tsybakov, “Smooth discrimination analysis,” Annals of Statistics, vol. 27, pp. 1808–1829, 1999. [12] P. Chou, T. Lookabaugh, and R. Gray, “Optimal pruning with applications to tree-structured source coding and modeling,” IEEE Transactions on Information Theory, vol. 35, no. 2, pp. 299–315, 1989. [13] B. Ripley, Pattern Recognition and Neural Networks, Cambridge University Press, Cambridge, UK, 1996. [14] R. Quinlan, C4.5: Programs for Machine Learning, Morgan Kaufmann, San Mateo, 1993.
2002
95
2,304
shorter argument and much tighter than previous margin bounds. There are two mathematical flavors of margin bound dependent upon the weights Wi of the vote and the features Xi that the vote is taken over. 1. Those ([12], [1]) with a bound on Li w~ and Li x~ ("bib" bounds). 2. Those ([11], [6]) with a bound on Li Wi and maxi Xi ("it/loo" bounds). The results here are of the "bll2" form. We improve on Shawe-Taylor et al. [12] and Bartlett [1] by a log(m)2 sample complexity factor and much tighter constants (1000 or unstated versus 9 or 18 as suggested by Section 2.2). In addition, the bound here covers margin errors without weakening the error-free case. Herbrich and Graepel [3] moved significantly towards the approach adopted in our paper, but the methodology adopted meant that their result does not scale well to high dimensional feature spaces as the bound here (and earlier results) do. The layout of our paper is simple - we first show how to construct a stochastic classifier with a good true error bound given a margin, and then construct a margin bound. 2 Margin Implies PAC-Bayes Bound 2.1 Notation and theoreIll Consider a feature space X which may be used to make predictions about the value in an output space Y = {-I, +1}. We use the notation x = (Xl, ... ,XN) to denote an N dimensional vector. Let the vote of a voting classifier be given by: vw(x) = wx = L WiXi· i The classifier is given by c(x) = sign (vw(x)). The number of "margin violations" or "margin errors" at 7 is given by: e1'(c) = Pr (yvw(x) < 7), (X,1I)~U(S) where U(S) is the uniform distribution over the sample set S. For convenience, we assume vx(x) :::; 1 and vw(w) :::; 1. Without this assumption, our results scale as ../vx(x)../vw(w)h rather than 117. Any margin bound applies to a vector W in N dimensional space. For every example, we can decompose the example into a portion which is parallel to W and a portion which is perpendicular to w. vw(x) XT = X IIwl12 w XII = x XT The argument is simple: we exhibit a "prior" over the weight space and a "posterior" over the weight space with an analytical form for the KL-divergence. The stochastic classifier defined by the posterior has a slightly larger empirical error and a small true error bound. For the next theorem, let F(x) = 1- f~oo ke-z2/2dx be the tail probability of a Gaussian with mean 0 and variance 1. Also let eQ(W,1',f) = Pr (h(x) =I y) (X,1I)~D,h~Q(w,1',f) be the true error rate of a stochastic classifier with distribution Q(f, w, 7) dependent on a free parameter f, the weights w of an averaging classifier, and a margin 7. Theorem 2.1 There exists a function Q mapping a weight vector w, margin 7, and value f > 0 to a distribution Q(w,7, f) such that ( A Inp(Fl:(Ol)+lnmtl) Pr Vw, 7, f: KL(e1'(c) + flleQ(w,1',f») :::; m ~ 1 - 8 S~D"' where KL(qllp) = qIn: + (1 - q) In ~::::: = the Kullback-Leibler divergence between two coins of bias q < p. 2.2 Discussion Theorem 2.1 shows that when a margin exists it is always possible to find a "posterior" distribution (in the style of [5]) which introduces only a small amount of additional training error rate. The true error bound for this stochastization of the large-margin classifier is not dependent on the dimensionality except via the margin. Since the Gaussian tail decreases exponentially, the value of P-l(f) is not very large for any reasonable value of f. In particular, at P(3), we have f :::; 0.01. Thus, for the purpose of understanding, we can replace P-l(f) with 3 and consider f ~ O. One useful approximation for P(x) with large x is: _ e-",2/2 F(x) ~ . tn= (1/x) y27f If there are no margin errors e1'(c) = 0, then these approximations, yield the approximate bound: ( _9_ + In 3v'2iT + In m±1 ) P 21'2 l' {j 1~ S Dr eQ(w,1',O) :::; ~ u ~"' m In particular, for large m the true error is approximately bounded by 21'~m' As an example, if 7 = 0.25, the bound is less than 1 around m = 100 examples and less than 0.5 around m = 200 examples. Later we show (see Lemmas 4.1 and 4.2 or Theorem 4.3) that the generalisation error of the original averaging classifier is only a factor 2 or 4 larger than that of the stochastic classifiers considered here. Hence, the bounds of Theorems 2.1 and 3.1 also give bounds on the averaging classifiers w. This theorem is robust in the presence of noise and margin errors. Since the PACBayes bound works for any "posterior" Q, we are free to choose Q dependent upon the data in any way. In practice, it may be desirable to follow an approach similar to [5] and allow the data to determine the "right" posterior Q. Using the data rather than the margin 7 allows the bound to take into account a fortuitous data distribution and robust behavior in the presence of a "soft margin" (a margin with errors). This is developed (along with a full proof) in the next section. 3 Main Full Result We now present the main result. Here we state a bound which can take into account the distribution of the training set. Theorem 2.1 is a simple consequence (1) of this result. This theorem demonstrates the flexibility of the technique since it incorporates significantly more data-dependent information into the bound calculation. When applying the bound one would choose p, to make the inequality (1) an equality. Hence, any choice of p, determines E and hence the overall bound. We then have the freedom to choose p, to optimise the bound. As noted earlier, given a weight vector w, any particular feature vector x decomposes into a portion xII which is parallel to w and a portion XT which is perpendicular to w. Hence, we can write x = xllell + XTeT, where ell is a unit vector in the direction of w and eT is a unit vector in the direction of XT. Note that we may have YXII < 0, if x is misclassified by w. Theorem 3.1 For all averaging classifiers c with normalized weights wand for all E > 0 stochastic error rates, If we choose p, > 0 such that - (YXII ) Ex,y~sF XT P, = E then there exists a posterior distribution Q(w, p" E) such that ( In ~l + In !!!±! ) F(p,) /j s~!J", VE, w, p,: KL(ElleQ(w,p"f)) ~ m ~ 1 - 6 where KL(qllp) = qIn ~ + (1 - q) In ~=: = the Kullback-Leibler divergence between two coins of bias q < p. Proof. The proof uses the PAC-Bayes bound, which states that for all prior distributions P, Pr (VQ: KL(eQlleQ) ~ KL(QIIP) + In¥) ~ 1- 6 S~D"' m We choose P = N(O,I), an isotropic Gaussian1 . A choice of the "posterior" Q completes the proof. The Q we choose depends upon the direction w, the margin 'Y, and the stochastic error E. In particular, Q equals P in every direction perpendicular to w, and a rectified Gaussian tail in the w direction2 • The distribution of a rectified Gaussian tail is given by R(p,) = 0 for x < p, and R(p,) = F(p,~.;21re-",2/2 for x ~ p,o The chain rule for relative entropy (Theorem 2.5.3 of [2]) and the independence of draws in each dimension implies that: KL(QIIP) KL(QIIIIPjI) + KL(QTIIPT) KL(R(p,)IIN(O, 1)) + KL(PTIIPr) KL(R(p,)IIN(O, 1)) + 0 roo 1 1p, Inp(p,)R(X)dx 1 = In P(p,) 1Later, the fact that an isotropic Gaussian has the same representation in all rotations of the coordinate sytem will be useful. 2Note that we use the invariance under rotation of N(O, I) here to line up one dimension with w. Thus, our choice of posterior implies the theorem if the empirical error rate is eq(w,x,.) :s Ex,._sF (*1') :s •which we show next. Given a point x, our choice of posterior implies that we can decompose the stochastic weight vector, W = wllell +wTeT +w, where ell is parallel to w, eT is parallel to XT and W is a residual vector perpendicular to both. By our definition of the stochastic generation wli ~ R(p) and WT ~ N(O, 1). To avoid an error, we must have: y = sign(v;;,(x)) = sign(wlixli +WTXT). Then, since tOil ~ JJ, no error occurs if: y(pxlI + WTXT) > 0 Since WT is drawn from N(O, 1) the probability of this event is: Pr (Y(I""II +WTXT) > 0) ~ 1- F (~~Ip) And so, the empirical error rate of the stochastic classifier is bounded by: eq:S Ex,._sF (~~Ip) =. as required. _ 3.1 Proof of Theorem 2.1 Proof. (sketch) The theorem follows from a relaxation of Theorem 3.1. In particular, we treat every example with a margin less than / as an error and use the bounds IlxT11 :s 1 and IlxlIll ~ /. 3.2 Further results Several aspects of the Theorem 3.1 appear arbitrary, but they are not. In particular, the choice of "prior" is not that arbitrary as the following lemma indicates. Lemma 3.2 The set of P satisfying 311111 : P(x) = 11II1(lIxI12) (rotational invariance) and P(x) = n~, p;(x;) (independence of each dimension) is N(O, >J) for >'>0. Proof. Rotational invariance together with the dimension independence imply that for all i,j,x: p;(x) =p;(x) which implies that: N P(x) = IIp(x;) ;=1 for some ftmction p(.). Applying rotational invariance, we have that: N P(x) = 11II1(llxIl2) = IIp(x;) ;=1 This implies: 10g11111 (~,q) = ~IOgP(X;)' Taking the derivative of this equation with respect to Xi gives 1I111 (1IxI1 2 ) 2xi P'(Xi) PjIIl(llxI1 2 ) p(Xi) . Since this holds for all values of x we must have Pjlll (t) = AlIllI (t) for some constant A, or Pjlll (t) = C exp(At), for some constant C. Hence, P(x) = C exp(AllxI1 2 ), as required. _ The constant A in the previous lemma is a free parameter. However, the results do not depend upon the precise value of Aso we choose 1 for simplicity. Some freedom in the choice of the "posterior" Q does exist and the results are dependent on this choice. A rectified gaussian appears simplest. 4 Margin Implies Margin Bound There are two methods for constructing a margin bound for the original averaging classifier. The first method is simplest while the second is sometimes significantly tighter. 4.1 Simple Margin Bound First we note a trivial bound arising from a folk theorem and the relationship to our result. Lemma 4.1 (Simple Averaging bound) For any stochastic classifier with distribution Q and true error rate eQ, the averaging classifier, CQ(X) = sign ([ h(X)dQ(h)) has true error rate: Proof. For every example (x,y), every time the averaging classifier errs, the probability of the stochastic classifier erring must be at least 1/2. _ This result is interesting and of practical use when the empirical error rate of the original averaging classifier is low. Furthermore, we can prove that cQ(x) is the original averaging classifier. Lemma 4.2 For Q = Q(w,'Y,e) derived according to Theorems 2.1 and 3.1 and cQ(x) as in lemma 4.1: CQ(X) = sign (vw(x)) Proof. For every x this equation holds because of two simple facts: 1. For any oW that classifies an input x differently from the averaging classifier, there is a unique equiprobable paired weight vector that agrees with the averaging classifier. 2. If vw(x) ¥- 0, then there exists a nonzero measure of classifier pairs which always agrees with the averaging classifier. Condition (1) is met by reversing the sign of WT and noting that either the original random vector or the reversed random vector must agree with the averaging classifier. Condition (2) is met by the randomly drawn classifier W= AW and nearby classifiers for any A> O. Since the example is not on the hyperplane, there exists some small sphere of paired classifiers (in the sense of condition (1)). This sphere has a positive measure. _ The simple averaging bound is elegant, but it breaks down when the empirical error is large because: e(c) ::; 2eQ = 2(€Q + 6om ) ~ 2€-y(c) + 260m where €Q is the empirical error rate of a stochastic classifier and 60m goes to zero as m -t 00. Next, we construct a bound of the form e(cQ) ::; €-y(c) + 6o~ where 6o~ > 60m but €-y(c) ::; 2€-y(c). 4.2 A (Sometimes) Tighter Bound By altering our choice of J.L and our notion of "error" we can construct a bound which holds without randomization. In particular, we have the following theorem: Theorem 4.3 For all averaging classifiers C with normalized weights W for all E > 0 "extra" error rates and"( > 0 margins: ( In -c/ 1(0») + 21nmtl) Pr VE, w,"(: KL(€-y(c) + Elle(c) - E) ::; F -"/-m ~ 1- 0 S~D"' where KL(qllp) = qln ~ + (1 - q) In ~::::: = the Kullback-Leibler divergence between two coins of bias q < p. The proof of this statement is strongly related to the proof given in [11] but noticeably simpler. It is also very related to the proof of theorem 2.1. Proof. (sketch) Instead of choosing wli so that the empirical error rate is increased by E, we instead choose wli so that the number of margin violations at margin ~ is increased by at most E. This can be done by drawing from a distribution such as A R (2F-1(E)) WII'" "( Applying the PAC-Bayes bound to this we reach a bound on the number of margin violations at ~ for the true distribution. In particular, we have: s!:!'- (KL (",(e) +<IleQ,;) oS In F(~ +In"'t') '"1_; The application is tricky because the bound does not hold uniformly for all "(.3 Instead we can discretize "( at scale 1/ m and apply a union bound to get 0 -t 0/m+1. For any fixed example, (x,y) with probability 1- 0, we know that with probability at least 1 eQ,~' the example has a margin of at least ~. Since the example has 3Thanks to David McAllester for pointing this out. a margin of at least ~ and our randomization doesn't change the margin by more than ~ with probability 1- f, the averaging classifier almost always predicts in the same way as the stochastic classifier implying the theorem. _ 4.3 Discussion &< Open Problems The bound we have obtained here is considerably tighter than previous bounds for averaging classifiers-in fact it is tight enough to consider applying to real learning problems and using the results in decision making. Can this argument be improved? The simple averaging bound (lemma 4.1) and the margin bound (theorem 4.3) each have a regime in which they dominate. We expect that there exists some natural theorem which does well in both regimes simultaneously. hI order to verify that the margin bound is as tight as possible, it would also be instructive to study lower bounds. 4.4 Acknowledgements Many thanks to David McAllester for critical reading and comments. References [1] P. L. Bartlett, "The sample complexity of pattern classification with neural networks: the size of the weights is more important than the size ofthe network," IEEE funsactiollS on Information Theory, vol. 44, no. 2, pp. 525-536, 1998. [2] Thomas Cover and Joy Thomas, "Elements of fuformation Theory" Wiley, New York 1991. [3] Ralf Herbrich and Thore Graepel, A PAC-Bayesian Margin Bound for Linear Classifiers: Why SVMs work. In Advances in Neural fuformation Processing Systems 13, pages 224-230. 2001. [4] T. Jaakkola, M. Mella, T. Jebara, "Maximum Entropy D iscrirnination\char" NIPS 1999. [5] John Langford and Rich Caruana, (Not) Bounding the True Error NIPS2001. [6] John Langford, Matthias Seeger, and Nimrod Megiddo, "An Improved Predictive Accuracy Bound for Averaging Classifiers" ICML2001. [7] John Langford and Matthias Seeger, "Bounds for Averaging Classifiers." CMU tech report, CMU-CS-01-102, 2001. [8] David McAllester, "PAC-Bayesian Model Averaging" COLT 1999. [9] Yoav Freund and Robert E. Schapire, "A Decision Theoretic Generalization of On-line Learning and an Application to Boosting" Eurocolt 1995. [10] Matthias Seeger, "PAC-Bayesian Generalization Error Bounds for Gaussian Processes", Tech Report, Division of fuformatics report EDI-INF-RR-0094. http://www.dai.ed.ac.uk/homes/seeger/papers/gpmcall-tr.ps.gz [11] Robert E. Schapire, Yoav Freund, Peter Bartlett, and Wee Sun Lee, "Boosting the Margin: A new explanation for the effectiveness of voting methods" The Annals of Statistics, 26(5):1651-1686, 1998. [12] J. Shawe-Taylor, P. L. Bartlett, R. C. Williamson, and M. Anthony. Structural risk minimization over data-dependent hierarchies. IEEE funsactions on Information Theory, 44(5):1926--1940, 1998.
2002
96
2,305
ynamic Causal Learning Thomas L. Griffiths Department of Psychology Stanford University Stanford, CA 94305-2130 gruffydd@psych.stanford.edu David Danks Institute for Human & Machine Cognition University of West Florida Pensacola, FL 32501 ddanks@ai.uwf.edu Joshua B. Tenenbaum Department of Brain & Cognitive Sciences ~AIT Cambridge, MA 02139 jbt@rnit.edu Abstract Current psychological theories of human causal learning and judgment focus primarily on long-run predictions: two by estimating parameters of a causal Bayes nets (though for different parameterizations), and a third through structural learning. This paper focuses on people's short-run behavior by examining dynamical versions of these three theories, and comparing their predictions to a real-world dataset. 1 Introduction Currently active quantitative models of human causal judgment for single (and sometimes multiple) causes include conditional j}JJ [8], power PC [1], and Bayesian network structure learning [4], [9]. All of these theories have some normative justification, and all can be understood rationally in terms of learning causal Bayes nets. The first two theories assume a parameterization for a Bayes net, and then perform maximum likelihood parameter estimation. Each has been the target of numerous psychological studies (both confirming and disconfirming) over the past ten years. The third theory uses a Bayesian structural score, representing the log likelihood ratio in favor of the existence of a connection between the potential cause and effect pair. Recent work found that this structural score gave a generally good account, and fit data that could be fit by neither of the other two models [9]. To date, all of these models have addressed only the static case, in which judgments are made after observing all of the data (either sequentially or in summary format). Learning in the real world, however, also involves dynamic tasks, in which judgments are made after each trial (or small number). Experiments on dynamic tasks, and theories that model human behavior in them, have received surprisingly little attention in the psychological community. In this paper, we explore dynamical variants of each of the above learning models, and compare their results to a real data set (from [7]). We focus only on the case of one potential cause, due to space and theoretical constraints, and a lack of experimental data for the multivariate case. 2 Real-World Data In the experiment on which we focus in this paper [7], people's stepwise acquisition curves were measured by asking people to determine whether camouflage makes a tank more or less likely to be destroyed. Subjects observed a sequence of cases in which the tank was either camouflaged or not, and destroyed or not. They were asked after every five cases to judge the causal strength of the- camouflage on a [-100, +100] scale, where -100 and +100 respectively correspond to the potential cause always preventing or producing the effect. The learning curves, constructed from average strength ratings, were: Me an jud gm ent 50 -50 Positive contingent High P(E) non-contingent Low P(E) non-contingent Negative contingent 10 15 20 Trials 25 30 35 40 Figure 1: Example of learning curves In this paper, we focus on qualitative features of the learning curves. These learning curves can be divided on the basis of the actual contingencies in the experimental condition. There were two contingent conditions: a positive condition in which peE I C) = .75 (the probability of the effect given the cause) and peE I -,C) = .25, and a negative condition where the opposite was true. There were also two noncontingent conditions, one in which peE) = .75 and one in which peE) = .25, irrespective of the presence or absence of the causal variable. We refer to the former non-contingent condition as having a high peE), and the latter as having a low peE). There are two salient, qualitative features of the acquisition curves: 1. For contingent cases, the strength rating does not immediately reach the final judgment, but rather converges to it slowly; and 2. For non-contingent cases, there is an initial non-zero strength rating when the probability of the effect, peE), is high, followed by convergence to zero. 3 Parameter Estimation Theories 3.1 Conditional ~p The conditional f1P theory predicts that the causal strength rating for a particular factor will be (proportional to) the conditional contrast for that factor [5], [8]. The general form of the conditional contrast for a particular potential cause is given by: f1PC.{X} = peE I C & X) - peE I-,C & X), where X ranges over the possible states of the other potential causes. So, for example, if we have two potential causes, C1 and C2, then there are two conditional contrasts for C1: f1PCl.{C2} = peE I C1 & C2) peE I-'C1 & C2) and f1PCl.{-.C2} = peE I C1 & -,C2) - peE I-'C1 & -,C2). Depending on the probability distribution, some conditional contrasts for a potential cause may be undefined, and the defined contrasts for a particular variable may not agree. The conditional I1P theory only makes predictions about a potential cause when the underlying probability distribution is "well-behaved": at least one of the conditional contrasts for the factor is defined, and all of the defined conditional contrasts for the factor are equal. For a single cause-effect relationship, calculation of the J1P value is a maximum likelihood parameter estimator assuming that the cause and the background combine linearly to predict the effect [9J. Any long-run learning model can model sequential data by being applied to all of the data observed up to a particular point. That is, after observing n datapoints, one simply applies the model, regardless of whether n is "the long-run." The behavior of such a strategy for the conditional ~p theory is shown in Figure 2 (a), and clearly fails to model accurately the above on-line learning curves. There is no gradual convergence to asymptote in the contingent cases, nor is there differential behavior in the non-contingent cases. An alternative dynamical model is the Rescorla-Wagner model [6J, which has essentially the same form as the well-known delta rule used for training simple neural networks. The R-W model has been shown to converge to the conditionall1P value in exactly the situations in which the I1P theory makes a prediction [2J. The R-W model follows a similar statistical logic as the I1P theory: J1P gives the maximum likelihood estimates in closed-form, and the R-W model essentially implements gradient ascent on the log-likelihood surface, as the delta rule has been shown to do. The R-W model produces' learning curves that qualitatively fit the learning curves in Figure 1, but suffers from other serious flaws. For example, suppose a subject is presented with trials ofA, C, and E, followed by trials with only A and E. In such a task, called backwards blocking, the R-W model predicts that C should be viewed as moderately causal, but human subjects rate C as non-causal. In the augmented R-W model [10J causal strength estimates (denoted by Vi, and assumed to start at zero) change after each observed case. Assuming that b(.x) = 1 if X occurs on a particular trial, and 0 otherwise, then strength estimates change by the following equation: aiO and ail are rate parameters (saliences) applied when Ci is present and absent, respectively, and Po and PI are the rate parameters when E is present and absent, respectively. By updating the causal strengths of absent potential causes, this model is able to explain many of the phenomena that escape the normal R-W model, such as backwards blocking. Although the augmented R-W model does not always have the same asymptotic behavior as the regular R-W model, it does have the same asymptotic behavior in exactly those situations in which the conditional J1P theory makes a prediction (under typical assumptions: aiO = -ail, Po = PI, and A = 1) [2]. To determine whether the augmented R-W model also captures the qualitative features of people's dynamic learning, we performed a simulation in which 1000 simulated individuals were shown randomly ordered cases that matched the probability distributions used in [7]. The model parameter values were A = 1.0, Q{)o = 0.4, alO = 0.7, au = -0.2, Po = PI = 0.5, with two learned parameters: Vo for the always present background cause Co, and VI for the potential cause CI . The mean values of VI, multiplied by 100 to match scale with Figure 1, are shown in Figure 2 (b). (a) 50 -50 5 10 15 20 25 30 35 40 (b) 5 10 15 20 25 30 35 40 (c) 50 -50 5 10 15 20 25 30 35 40 (d) 50 -50 5 10 15 20 25 30 35 40 (e) 50~ ,=:.::=:=t _5~~~~ 5 10 15 20 25 30 35 40 5 10 15 20 25 30 35 40 Figure 2: Modeling results. (a) is the maximum-likelihood estimate of fJJ , (b) is the augmented R-W model, (c) is the maximum-likelihood estimate of causal power, (d) is the analogue of augmented R-W model for causal power, (e) shows the Bayesian strength estimate with a uniform prior on all parameters, and (f) does likewise with a beta(I,5) prior on Va. The line-markers follow the conventions of Figure 1. Variations in A only change the response scale. Higher values of lXoo (the salience of the background) shift downward all early values of the learning curves, but do not affect the asymptotic values. The initial non-zero values for the non-contingent cases is proportional in size to (alO + al r), and so if the absence of the cause is more salient than the presence, the initial non-zero value will actually be negative. Raising the fJ values increases the speed of convergence to asymptote, and the absolute values of the contingent asymptotes decrease in proportion to (fJo - fJI). For the chosen parameter values, the learning curves for the contingent cases both gradually curve towards an asymptote, and in the non-contingent, high peE) case, there is an initial non-zero rating. Despite this qualitative fit and its computational simplicity, the augmented R-W model does not have a strong rational motivation. Its only rational justification is that it is a consistent estimator of fJJ: in the limit of infinite data, it converges to fJJ under the same circumstances that the regular (and well-motivated) R-W model does. But it does not seem to have any of the other properties of a good statistical estimator: it is not unbiased, nor does it seem to be a maximum likelihood or gradient-ascent-on-log-Iikelihood algorithm (indeed, sometimes it appears to descend in likelihood). This raises the question of whether there might be an alternative dynamical model of causal learning that produces the appropriate learning curves but is also a principled, rational statistical estimator. 3.2 Power PC In Cheng's power PC theory [1], causal strength estimates are predicted to be (proportional to) perceived causal power: the (unobserved) probability that the potential cause, in the absence of all other causes, will produce the effect. Although causal power cannot be directly observed, it can be estimated from observed statistics given some assumptions. The power PC theory predicts that, when the assumptions are believed to be satisfied, causal power for (potentially) generative or preventive 'causes will be estimated by the following equations: G · M eneratIve: p _ C C-1-P(EI-,C) Preventive: p = - Me e p(EI-'C) Because the power PC theory focuses on the long-run, one can easily d'etermine which equation to use: simply wait until asymptote, determine J1Pc, and then divide by the appropriate factor. Similar equations can also be given for interactive causes. Note that although the preventive causal power equation yields a positive number, we should expect people to report a negative rating for preventive causes. As with the t:JJ theory, the power PC theory can, in the case of a single cause-effect pair, also be seen as a maximum li).<elihood estimator for the strength parameter of a causal Bayes net, though one with a different parameterization than for conditional t:JJ. Generative causes and the background interact to produce the effect as though they were a noisy-OR gate. Preventive causes combine with them as a noisy-ANDNOT gate. Therefore, if the G/s are generative causes and lj's are preventive causes, the theory predicts: P(E) =I}(1-Ijl1-If(1- G,)]As for conditional J1P, simply applying the power PC equations to the sufficient statistics for observed sequential data does not produce appropriate learning curves. There is no gradual convergence in the contingent cases, and there is no initial difference in the non-contingent cases. This behavior is shown in Figure 2 (c). Instead, we suggest using an analogue of the augmented R-W model, which uses the above noisy-ORlAND-NOT prediction instead of the linear prediction implicit in the augmented R-W model. Specifically, we define the following algorithm (with all parameters as defined before), using the notational device that the C/s are preventive and the Cj ' s are generative: Unlike the R-W and augmented R-W models, there is no known characterization of the long-run behavior of this iterative algorithm. However, we can readily determine (using the equilibrium technique of [2]) the asymptotic Vi values for' one potential cause (and a single, always present, generative background cause). If we make the same simplifying assumptions as in Section 3.1, then this algorithm asymptotically computes the causal power for C, regardless of whether C is generative or preventive. We conjecture that this algorithm also computes the causal power for multiple potential causes. This iterative algorithm can only be applied if one knows whether each potential cause is potentially generative or preventive. Furthermore, we cannot determine directionality by the strategy of the power PC theory, as we do not necessarily have the correct t:JJ sign during the short run. However, changing the classification of Ci from generative to preventive (or vice versa) requires only removing from (adding to) the estimate (i) the Vi term; and (ii) all terms in which Vi was the only generative factor. Hence, we conjecture that this algorithm can be augmented to account for reclassification of potential causes after learning has begun. To simulate this dynamical version of the power PC theory, we used the same setup as in Section 3.1 (and multiplied preventive causal power ratings by -1 to properly scale them). The parameters for this run were: A = 1.0, lXoo = 0.1, al0 = 0.5, all = -0.4,/30 = /31 = 0.9, and the results are shown in Figure 2 (d). Parameter variations have the same effects as for the augmented R-W model, except that increasing lXoo reduces the size of the initial non-zero values in the non-contingent conditions (instead of all conditions), and absolute values of the asymptotes in all conditions are shifted by an amount proportional to (/30 - /31), This dynamical theory produces the right sort of learning curves for these parameter values, and is also a consistent estimator (converging to the power PC estimate in the limit of infinite data). But as with the augmented R-W model, there is no rational motivation for choosing this dynamic estimator: it is not unbiased, nor maximum likelihood, nor an implementation of gradient ascent in log-likelihood. The theory's main (and arguably only) advantage over the augmented R-W model is that it converges to a quantity that is more typically what subjects estimate in longrun experiments. But it is still not what we desire from a principled dynamic model. 4 Bayesian structure learning The learning algorithms considered thus far are based upon the idea that human causal judgments reflect the estimated value of a strength parameter in a particular (assumed) causal structure. Simple maximum likelihood estimation of these strength parameters does not capture the trends in the data, and so we have considered estimation algorithms that do not have a strong rational justification. Weare thus led to the question of whether human learning curves can be accounted for by a rational process. In this section, we argue that the key to forming a rational, statistical explanation of people's dynamical behavior is to take structural uncertainty into account when forming parameter estimates. Complete specification of the structure of a Bayesian network includes both the underlying graph and choice of parameterization. For example, in the present task there are three possible relationships between a potential cause C1 and an. effect E: generative (h+), preventive (h_), or non-existent (ho). These three possibilities can respectively be represented by a graph with a noisy-OR parameterization, one with a noisy-AND-NOT parameterization, and one with no edge between the potential cause and the effect. Each possibility is illustrated schematically in Figure 3. ho ~@ ® ~-~ +~N;_ ® Figure 3: Structural hypotheses for the Bayesian model. Co is an always present background cause, C1 is the potential cause, and E the effect. The signs of arrows indicate positive and negative influences on the outcome. Previous work applying Bayesian structure learning to human causal judgment focused on people .making the decision as to which of these structures best accounts for the observed data [9]. That work showed that the likelihood of finding a causal relationship rose with the base rate peE) in non-contingent cases, suggesting that structural decisions are a relevant part of the present data. However, the rating scale of the current task seems to encourage strength judgments rather, than purely structural decisions, because it is anchored at the endpoints by two qualitatively different causal strengths (strong generative, strong preventive). As a result, subjects' causal judgments appear to converge to causal power. Real causal learning tasks often involve uncertainty about both structure and parameters. Thus, even when a task demands ratings of causal strength, the structural uncertainty should still be taken into account; we do this by considering a hierarchy of causal models. The first level of this hierarchy involves structural uncertainty, giving equal probability to the relationship between the variables being generative, preventive, or non-existent. As mentioned in previous sections, the parameterizations associated with the first two models lead to' a maximum likelihood estimate of causal power. The second level of the hierarchy addresses uncertainty over the parameters. With a constant background and a single cause, there are two parameters for the noisy-OR and the noisy-AND-NOT models, Va and VI. If the cause and effect are unconnected, then only Va is required. Uncertainty in all parameters can be expressed with distributions on the unit interval. Using this set of m9dels, we can obtain a strength rating by taking the expectation of the strength parameter Vi associated with a causal variable over the posterior distribution on that parameter induced by the data. This expectation is taken over both structure and parameters, allowing both factors to influence the result. In the two-variable case, we can write this as 1 <11 >== L J11 "111 h,D) "hi D)dW hEHO where H = {h+, ha, h_}. The effective value of the strength parameter is a in the model where there is no relationship between cause and effect, and should be negative for preventive causes. We thus have: <VI> = P(h+)f.l+ - P(h_)f.lwhere f.l+, f.l- are the posterior means of VI under h+ and h_ respectively. While this theory is appealing from a rational and statistical point of view, it has computational drawbacks. All four terms in the above expression are quite computationally intensive to compute, and require an amount of information that increases exponentially with the number of causes. Furthermore, the number of different hypotheses we must consider grows exponentially with the number of potential causes, limiting its applicability for multivariate cases. We applied this model to the data of [7J, using a uniform prior over models, and also over parameters. The results, averaged across 200 random orderings of trials, are shown in Figure 2 (e). The predictions are somewhat symmetric with respect to positive and negative contingencies and high and low peE). This symmetry is a consequence of choosing a uniform (i.e., strongly uninformative) prior for the parameters. If we instead take a uniform prior on VI and a beta(1,5) prior on Va, consistent with a prior belief that effects occur only rarely without an observed cause and similar to starting with zero weights in the algorithms presented above, we obtain the results shown in Figure 2 (t). In both cases, the curvature of the learning curves is a consequence of structural uncertainty, and the asymptotic values reflect the strength of causal relationships. In the contingent cases, the probability distribution over structures rapidly transfers all of its mass to the correct hypothesis, and the result asymptotes at the posterior mean of' VI in that model, which will be very close to causal power. The initial non-zero ratings in the non-contingent cases result from h+ giving a slightly better account of the data than h_, essentially due to the non-uniform prior on Va. This structural account is only one means of understanding the rational basis for these learning curves. Dayan and Kakade [3] provide a statistical theory of classical conditioning based on Bayesian estimation of the parameters in a linear model similar to that underlying 11P. Their theory accounts for phenomena that the classical R-W theory does not, such as backwards blocking. They also give a neural network learning model that approximates the Bayesian estimate, and that closely resembles the augmented R-W model considered here. Their network model can also produce the learning curves discussed in this paper. However, because it is based on a linear model of causal interaction, it is not a good candidate for modeling human causal judgments, which across various studies of asymptotic behavior seem to be more closely approximated by parameter estimates' in noisy logic gates, as instantiated in the power PC model [1] and our Bayesian model. 5 Conclusion In this paper, we have outlined a range of dynamical models, from computationally simple ones (such as simply applying conditional liP to the observed datapoints) to rationally grounded ones (such as Bayesian structure/parameter estimation). Moreover, there seems to be a tension in this domain in trying to develop a model that is easily implemented in an individual and scales well with additional variables, and one that has a rational statistical basis. Part of our effort here has been aimed at providing a set of models that seem to equally well explain human behavior, but that have different virtues besides their fit with the data. Human causal learning might not scale up well, or it might not be rational; further discrimination among these possible theories awaits additional data about causal learning curves. References [1] Cheng, Patricia W. 1997. "From Covariation to Causation: A Causal Power Theory." Psychological Review, 104 (2): 367-405. [2] Danks, David. Forthcoming. "Equilibria of the Rescorla-Wagner Model." Journal of Mathematical Psychology. [3] Dayan, Peter, & Kakade, Sham. 2001. "Explaining Away in Weight Space." In Advances in Neural Information Processing Systems 13. [4] Gopnik, Alison, Clark Glymour, David M. Sobel, Laura E. Schulz, Tamar Kushnir, & David Danks. 2002. "A Theory of Causal Learning in Children: Causal Maps and Bayes Nets." Submitted to Psychological Review. [5] Lober, Klaus, & David R. Shanks. 2000. "Is Causal Induction Based on Causal Power? Critique of Cheng (1997)." Psychological Review, 107 (1): 195:..212. [6] Rescorla, Robert A., & Allan R. Wagner. 1972. "A Theory of Pavlovian Conditioning: Variations in the Effectiveness of Reinforcement and Nonreinforcement." In A. H. Black & W. F. Prokasy, eds. Classical Conditioning II: Current Research and Theory. New York: Appleton-Century-Crofts. pp. 64-99. [7] Shanks, David R. 1995. "Is Human Learning Rational?" The Quarterly Journal of Experimental Psychology, 48A (2): 257-279. [8] Spellman, Barbara A. 1996. "Conditionalizing Causality." In D. R. Shanks, K. J. Holyoak, & D. L. Medin, eds. 1996., Causal Learning: The Psychology of Learning and Motivation, Vol. 34. San Diego, Calif.: Academic Press. pp. 167-206. [9] Tenenbaum, Joshua B., & Thomas L. Griffiths. 2000. "Structure Learning in Human Causal Induction." In Advances in Neural Information Processing Systems 13. [10] Van Hamme, Linda J., & Edward A. Wasserman. 1994. "Cue Competition in Causality Judgments: The Role of Nonpresentation of Compound Stimulus Elements." Learning and Motivation, 25: 127-151.
2002
97
2,306
Maximally Informative Dimensions: Analyzing Neural Responses to Natural Signals Tatyana Sharpee , Nicole C. Rust  , and William Bialek   Sloan–Swartz Center for Theoretical Neurobiology, Department of Physiology University of California at San Francisco, San Francisco, California 94143–0444  Center for Neural Science, New York University, New York, NY 10003  Department of Physics, Princeton University, Princeton, New Jersey 08544 sharpee@phy.ucsf.edu, rust@cns.nyu.edu, wbialek@princeton.edu We propose a method that allows for a rigorous statistical analysis of neural responses to natural stimuli, which are non-Gaussian and exhibit strong correlations. We have in mind a model in which neurons are selective for a small number of stimulus dimensions out of the high dimensional stimulus space, but within this subspace the responses can be arbitrarily nonlinear. Therefore we maximize the mutual information between the sequence of elicited neural responses and an ensemble of stimuli that has been projected on trial directions in the stimulus space. The procedure can be done iteratively by increasing the number of directions with respect to which information is maximized. Those directions that allow the recovery of all of the information between spikes and the full unprojected stimuli describe the relevant subspace. If the dimensionality of the relevant subspace indeed is much smaller than that of the overall stimulus space, it may become experimentally feasible to map out the neuron’s input-output function even under fully natural stimulus conditions. This contrasts with methods based on correlations functions (reverse correlation, spike-triggered covariance, ...) which all require simplified stimulus statistics if we are to use them rigorously. 1 Introduction From olfaction to vision and audition, there is an increasing need, and a growing number of experiments [1]-[8] that study responses of sensory neurons to natural stimuli. Natural stimuli have specific statistical properties [9, 10], and therefore sample only a subspace of all possible spatial and temporal frequencies explored during stimulation with white noise. Observing the full dynamic range of neural responses may require using stimulus ensembles which approximate those occurring in nature, and it is an attractive hypothesis that the neural representation of these natural signals may be optimized in some way. Finally, some neuron responses are strongly nonlinear and adaptive, and may not be predicted from a combination of responses to simple stimuli. It has also been shown that the variability in neural response decreases substantially when dynamical, rather than static, stimuli are used [11, 12]. For all these reasons, it would be attractive to have a rigorous method of analyzing neural responses to complex, naturalistic inputs. The stimuli analyzed by sensory neurons are intrinsically high-dimensional, with dimensions      . For example, in the case of visual neurons, input is specified as light intensity on a grid of at least   pixels. The dimensionality increases further if the time dependence is to be explored as well. Full exploration of such a large parameter space is beyond the constraints of experimental data collection. However, progress can be made provided we make certain assumptions about how the response has been generated. In the simplest model, the probability of response can be described by one receptive field (RF) [13]. The receptive field can be thought of as a special direction  in the stimulus space such that the neuron’s response depends only on a projection of a given stimulus  onto  . This special direction  is the one found by the reverse correlation method [13, 14]. In a more general case, the probability of the response depends on projections    ,   ! #""" %$ , of the stimulus  on a set of vectors &'    ,     ("""  )+* : ,.-0/+132465!7  89 ,.-0/+132465 8;:        <"""  ) 8 (1) where ,.-=/;132465>7 8 is the probability of a spike given a stimulus  and ,.-=/;1?24!5 8 is the average firing rate. In what follows we will call the subspace spanned by the set of vectors &'  %* the relevant subspace (RS). Even though the ideas developed below can be used to analyze input-output functions with respect to different neural responses, we settle on a single spike as the response of interest. Eq. (1) in itself is not yet a simplification if the dimensionality $ of the RS is equal to the dimensionality @ of the stimulus space. In this paper we will use the idea of dimensionality reduction [15, 16] and assume that $BA @ . The input-output function : in Eq. (1) can be strongly nonlinear, but it is presumed to depend only on a small number of projections. This assumption appears to be less stringent than that of approximate linearity which one makes when characterizing neuron’s response in terms of Wiener kernels. The most difficult part in reconstructing the input-output function is to find the RS. For $DCE , a description in terms of any linear combination of vectors &'  +* is just as valid, since we did not make any assumptions as to a particular form of nonlinear function : . We might however prefer one coordinate system over another if it, for example, leads to sparser probability distributions or more statistically independent variables. Once the relevant subspace is known, the probability ,.-=/;1?24!5>7  8 becomes a function of only few parameters, and it becomes feasible to map this function experimentally, inverting the probability distributions according to Bayes’ rule: : &  *8F ,.&  * 7 /+1324!5 8 ,.&  *8 (2) If stimuli are correlated Gaussian noise, then the neural response can be characterized by the spike-triggered covariance method [15, 16]. It can be shown that the dimensionality of the RS is equal to the number of non-zero eigenvalues of a matrix given by a difference between covariance matrices of all presented stimuli and stimuli conditional on a spike. Moreover, the RS is spanned by the eigenvectors associated with the non-zero eigenvalues multiplied by the inverse of the a priori covariance matrix. Compared to the reverse correlation method, we are no longer limited to finding only one of the relevant directions   . However because of the necessity to probe a two-point correlation function, the spiketriggered covariance method requires better sampling of distributions of inputs conditional on a spike. In this paper we investigate whether it is possible to lift the requirement for stimuli to be Gaussian. When using natural stimuli, which are certainly non-Gaussian, the RS cannot be found by the spike-triggered covariance method. Similarly, the reverse correlation method does not give the correct RF, even in the simplest case where the input-output function (1) depends only on one projection. However, vectors that span the RS are clearly special directions in the stimulus space. This notion can be quantified by Shannon information, and an optimization problem can be formulated to find the RS. Therefore the current implementation of the dimensionality reduction idea is complimentary to the clustering of stimuli done in the information bottleneck method [17]; see also Ref. [18]. Non–information based measures of similarity between probability distributions ,.8 and ,. 7 /;132465 8 have also been proposed [19]. We illustrate how the optimization scheme of maximizing information as function of direction in the stimulus space works with natural stimuli for model orientation sensitive cells with one and two relevant directions, much like simple and complex cells found in primary visual cortex. It is also possible to estimate average errors in the reconstruction. The advantage of this optimization scheme is that it does not rely on any specific statistical properties of the stimulus ensemble, and can be used with natural stimuli. 2 Information as an objective function When analyzing neural responses, we compare the a priori probability distribution of all presented stimuli with the probability distribution of stimuli which lead to a spike. For Gaussian signals, the probability distribution can be characterized by its second moment, the covariance matrix. However, an ensemble of natural stimuli is not Gaussian, so that neither second nor any other finite number of moments is sufficient to describe the probability distribution. In this situation, the Shannon information provides a convenient way of comparing two probability distributions. The average information carried by the arrival time of one spike is given by [20]     ,. 7 /;132465 8   ,. 7 /;1?24!5 8  ,.8 " (3) The information per spike, as written in (3) is difficult to estimate experimentally, since it requires either sampling of the high-dimensional probability distribution ,. 7 /+132465 8 or a model of how spikes were generated, i.e. the knowledge of low-dimensional RS. However it is possible to calculate    in a model-independent way, if stimuli are presented multiple times to estimate the probability distribution ,.-0/+132465>7 8 . Then,    ,.-=/;1?24!5>7  8 ,.-=/;1?24!5 8   ,.-0/+1324!5>7  8 ,.-0/+132465 8 "!# (4) where the average is taken over all presented stimuli. Note that for a finite dataset of $ repetitions, the obtained value   $ 8 will be on average larger than  -&% 8 , with difference  $ (' )+*,   $  . / 8 , where $ (' )+*,  is the number of different stimuli, and $    is the number of elicited spikes [21] across all of the repetitions. The true value    can also be found by extrapolating to $10 % [22]. The knowledge of the total information per spike will characterize the quality of the reconstruction of the neuron’s input-output relation. Having in mind a model in which spikes are generated according to projection onto a lowdimensional subspace, we start by projecting all of the presented stimuli on a particular direction  in the stimulus space, and form probability distributions ,32 -4 7 /;1?24!5 8 657 -4    8 7 /+13246598 , , 2 -4 8 657 -4    8 8 . The information  8 ;: 4', 2 -4 7 /+1324!5 8  # , 2 -4 7 /;1?24!5 8  , 2 -4 8 (5) provides an invariant measure of how much the occurrence of a spike is determined by projection on the direction  . It is a function only of direction in the stimulus space and does not change when vector  is multiplied by a constant. This can be seen by noting that for any probability distribution and any constant < , ,#=2-4 8 ><@? ,A2 -4 B<8 . When evaluated along any vector, ' 8DC    . The total information   can be recovered along one particular direction only if      , and the RS is one-dimensional. By analogy with (5), one could also calculate information ' """ 8 along a set of several directions &  """  * based on the multi-point probability distributions: , 2    2  & 4 * 7 /;1?24!5 8  5   7 -4  >   8 7 /+1324!598 , 2    2  & 4  *8  5   7 -4   >   8 8 " If we are successful in finding all of the $ directions   in the input-output relation (1), then the information evaluated along the found set will be equal to the total information    . When we calculate information along a set of vectors that are slightly off from the RS, the answer is, of course, smaller than   and is quadratic in deviations 7   . One can therefore find the RS by maximizing information with respect to vectors simultaneously. The information does not increase if more vectors outside the RS are included into the calculation. On the other hand, the result of optimization with respect to the number of vectors  $ may deviate from the RS if stimuli are correlated. The deviation is also proportional to a weighted average of ,.-=/;1?24!5!7 >  <""" 6 ;8  ,.-=/;1?24!5!7 6  <"""  ) 8 . For uncorrelated stimuli, any vector or a set of vectors that maximizes  8 belongs to the RS. To find the RS, we first maximize ' 8 , and compare this maximum with   , which is estimated according to (4). If the difference exceeds that expected from finite sampling corrections, we increment the number of directions with respect to which information is simultaneously maximized. The information ' 8 as defined by (5) is a continuous function, whose gradient can be computed  2@ : 4',+2 -4 8  50 7 4 /+13246598  5= 7 4.8  4 , 2 -47 /+132465 8 ,A2-4 8 " (6) Since information does not change with the length of the vector,  2B  (which can also be seen from (6) directly), unnecessary evaluations of information for multiples of  are avoided by maximizing along the gradient. As an optimization algorithm, we have used a combination of gradient ascent and simulated annealing algorithms: successive line maximizations were done along the direction of the gradient. During line maximizations, a point with a smaller value of information was accepted according to Boltzmann statistics, with probability  5 1  -   8    8;8   . The effective temperature T is reduced upon completion of each line maximization. 3 Discussion We tested the scheme of looking for the most informative directions on model neurons that respond to stimuli derived from natural scenes. As stimuli we used patches of digitized to 8-bit scale photos, in which no corrections were made for camera’s light intensity transformation function. Our goal is to demonstrate that even though spatial correlations present in natural scenes are non-Gaussian, they can be successfully removed from the estimate of vectors defining the RS. 3.1 Simple Cell Our first example is taken to mimic properties of simple cells found in the primary visual cortex. A model phase and orientation sensitive cell has a single relevant direction    shown in Fig. 1(a). A given frame  leads to a spike if projection  9  '    reaches a threshold value  in the presence of noise: ,.-0/+1324!5!7  8 ,.-0/+1324!5 8 :    8  5      "!68 8 (7) Figure 1: Analysis of a model simple cell with RF shown in (a). The spike-triggered average  (' is shown in (b). Panel (c) shows an attempt to remove correlations according to reverse correlation method,  ?       ' ; (d) vector  ) found by maximizing information; (e) The probability of a spike ,.-0/+1324!5!7  F   8 (crosses) is compared to ,.-0/+132465!7    8 used in generating spikes (solid line). Parameters   ?"  )    )3  8 and . ?"   )    )3  8 [  )  and  )3  are the maximum and minimum values of >  over the ensemble of presented stimuli.] (f) Convergence of the algorithm according to information ' 8 and projection  !    as a function of inverse effective temperature  ? . where Gaussian random variable ! of variance  models additive noise, and function  -4 8.  for 4 CE , and zero otherwise. Together with the RF    , the parameters  for threshold and the noise variance  determine the input-output function. The spike-triggered average (STA), shown in Fig. 1(b), is broadened because of spatial correlations present in natural stimuli. If stimuli were drawn from a Gaussian probability distribution, they could be decorrelated by multiplying  ' by the inverse of the a priori covariance matrix, according to the reverse correlation method. The procedure is not valid for non-Gaussian stimuli and nonlinear input-output functions (1). The result of such a decorrelation is shown in Fig. 1(c). It is clearly missing the structure of the model filter. However, it is possible to obtain a good estimate of it by maximizing information directly, see panel (d). A typical progress of the simulated annealing algorithm with decreasing temperature  is shown in panel (e). There we plot both the information along the vector, and its projection on    . The final value of projection depends on the size of the data set, see below. In the example shown in Fig. 1 there were  3 %6! spikes with average probability of spike  3"  per frame. Having reconstructed the RF, one can proceed to sample the nonlinear input-output function. This is done by constructing histograms for ,. #  )  8 and ,.   ) ?7 /;1?24!5 8 of projections onto vector  )  found by maximizing information, and taking their ratio. In Fig. 1(e) we compare ,.-=/;1?24!5>7    ) 8 (crosses) with the probability ,.-=/;1?24!5!7 !  8 used in the model (solid line). 3.2 Estimated deviation from the optimal direction When information is calculated with respect to a finite data set, the vector  which maximizes will deviate from the true RF    . The deviation 7        arises because the probability distributions are estimated from experimental histograms and differ from the 0 1 2 3 0.8 0.85 0.9 0.95 1 N−1 spike 10−5 e1 ⋅ vmax Figure 2: Projection of vector  )  that maximizes information on RF    is plotted as a function of the number of spikes to show the linear scaling in  $   (solid line is a fit). distributions found in the limit on infinite data size. For a simple cell, the quality of reconstruction can be characterized by the projection     F    7   , where both  and    are normalized, and 7  is by definition orthogonal to    . The deviation 7  ?  , where is the Hessian of information. Its structure is similar to that of a covariance matrix:    / : 4 ,.-47 /+132465 8  4 / ,.-4 7 /+1324!5 8 ,.-4 8   5     7 4.8  5=  7 4 8 5=  7 4.8 8 (8) When averaged over possible outcomes of N trials, the gradient of information is zero for the optimal direction. Here in order to evaluate 57   8    ? 5   8 ?  , we need to know the variance of the gradient of . By discretizing both the space of stimuli and possible projections 4 , and assuming that the probability of generating a spike is independent for different bins, one could obtain that 5    B8    $   / 8 . Therefore an expected error in the reconstruction of the optimal filter is inversely proportional to the number of spikes and is given by:    3      5 7   8     ?  $    / (9) where  means that the trace is taken in the subspace orthogonal to the model filter, since by definition 7 (   .  . In Fig. 2 we plot the average projection of the normalized reconstructed vector  on the RF    , and show that it scales with the number of spikes. 3.3 Complex Cell A sequence of spikes from a model cell with two relevant directions was simulated by projecting each of the stimuli on vectors that differ by A - in their spatial phase, taken to mimic properties of complex cells, see Fig. 3. A particular frame leads to a spike according to a logical OR, that is if either !        ,     , 6          , or  6   exceeds a threshold value  in the presence of noise. Similarly to (7), ,.-0/+132465>7 8 ,.-0/+132465 8  :        8 65  -%7    7    ! 8 -%7     7    !  8 8 (10) where ! and !  are independent Gaussian variables. The sampling of this input-output function by our particular set of natural stimuli is shown in Fig. 3(c). Some, especially large, combinations of values of >  and 6   are not present in the ensemble. We start by maximizing information with respect to one direction. Contrary to analysis for a simple cell, one optimal direction recovers only about 60% of the total information per spike. This is significantly different from the total   for stimuli drawn from natural scenes, where due to correlations even a random vector has a high probability of explaining 60% of total information per spike. We therefore go on to maximize information with respect to two directions. An example of the reconstruction of input-output function of a complex cell is given in Fig. 3. Vectors  and   that maximize '   8 are not orthogonal, and are also rotated with respect to    and     . However, the quality of reconstruction is independent of a particular choice of basis with the RS. The appropriate measure of similarity between the two planes is the dot product of their normals. In the example of Fig. 3,       ?  2   2    ?" . Maximizing information with respect to two directions requires a significantly slower cooling rate, and consequently longer computational times. However, an expected error in the reconstruction,             ' 2   2   , follows a $ ?    behavior, similarly to (9), and is roughly twice that for a simple cell given the same number of spikes. In this calculation there were   spikes. 10 20 30 10 20 30 10 20 30 10 20 30 10 20 30 10 20 30 10 20 30 10 20 30 (a) (f) (d) (b) (c) (e) v2 e(2) P(spike|s(1),s(2)) P(spike|s⋅ v1,s⋅ v2) e(1) v1 model reconstruction Figure 3: Analysis of a model complex cell with relevant directions    and     shown in (a) and (b). Spikes are generated according to an “OR” input-output function :    6   8 with the threshold   ?"   )   )3  8 and noise variance   3"    )   )3  8 . Panel (c) shows how the input-output function is sampled by our ensemble of stimuli. Dark pixels for large values of !  and 6   correspond to cases where ,.!  6   8   . Below, we show vectors  and   found by maximizing information '   8 together with the corresponding input-output function with respect to projections   and    . In conclusion, features of the stimulus that are most relevant for generating the response of a neuron can be found by maximizing information between the sequence of responses and the projection of stimuli on trial vectors within the stimulus space. Calculated in this manner, information becomes a function of direction in a stimulus space. Those directions that maximize the information and account for the total information per response of interest span the relevant subspace. This analysis allows the reconstruction of the relevant subspace without assuming a particular form of the input-output function. It can be strongly nonlinear within the relevant subspace, and is to be estimated from experimental histograms. Most importantly, this method can be used with any stimulus ensemble, even those that are strongly non-Gaussian as in the case of natural images. Acknowledgments We thank K. D. Miller for many helpful discussions. Work at UCSF was supported in part by the Sloan and Swartz Foundations and by a training grant from the NIH. Our collaboration began at the Marine Biological Laboratory in a course supported by grants from NIMH and the Howard Hughes Medical Institute. References [1] F. Rieke, D. A. Bodnar, and W. Bialek. Naturalistic stimuli increase the rate and efficiency of information transmission by primary auditory afferents. Proc. R. Soc. Lond. B, 262:259–265, (1995). [2] W. E. Vinje and J. L. Gallant. Sparse coding and decorrelation in primary visual cortex during natural vision. Science, 287:1273–1276, 2000. [3] F. E. Theunissen, K. Sen, and A. J. Doupe. Spectral-temporal receptive fields of nonlinear auditory neurons obtained using natural sounds. J. Neurosci., 20:2315–2331, 2000. [4] G. D. Lewen, W. Bialek, and R. R. de Ruyter van Steveninck. Neural coding of naturalistic motion stimuli. Network: Comput. Neural Syst., 12:317–329, 2001. [5] N. J. Vickers, T. A. Christensen, T. Baker, and J. G. Hildebrand. Odour-plume dynamics influence the brain’s olfactory code. Nature, 410:466–470, 2001. [6] K. Sen, F. E. Theunissen, and A. J. Doupe. Feature analysis of natural sounds in the songbird auditory forebrain. J. Neurophysiol., 86:1445–1458, 2001. [7] D. L. Ringach, M. J. Hawken, and R. Shapley. Receptive field structure of neurons in monkey visual cortex revealed by stimulation with natural image sequences. Journal of Vision, 2:12–24, 2002. [8] W. E. Vinje and J. L. Gallant. Natural stimulation of the nonclassical receptive field increases information transmission efficiency in V1. J. Neurosci., 22:2904–2915, 2002. [9] D. L. Ruderman and W. Bialek. Statistics of natural images: scaling in the woods. Phys. Rev. Lett., 73:814–817, 1994. [10] D. J. Field. Relations between the statistics of natural images and the response properties of cortical cells. J. Opt. Soc. Am. A, 4:2379–2394, 1987. [11] P. Kara, P. Reinagel, and R. C. Reid. Low response variability in simultaneously recorded retinal, thalamic, and cortical neurons. Neuron, 27:635–646, 2000. [12] R. R. de Ruyter van Steveninck, G. D. Lewen, S. P. Strong, R. Koberle, and W. Bialek. Reproducibility and variability in neural spike trains. Science, 275:1805–1808, 1997. [13] F. Rieke, D. Warland, R. R. de Ruyter van Steveninck, and W. Bialek. Spikes: Exploring the neural code. MIT Press, Cambridge, 1997. [14] E. de Boer and P. Kuyper. Triggered correlation. IEEE Trans. Biomed. Eng., 15:169–179, 1968. [15] N. Brenner, W. Bialek, and R. R. de Ruyter van Steveninck. Adaptive rescaling maximizes information transmission. Neuron, 26:695–702, 2000. [16] R. R. de Ruyter van Steveninck and W. Bialek. Real-time performance of a movement-sensitive neuron in the blowfly visual system: coding and information transfer in short spike sequences. Proc. R. Soc. Lond. B, 234:379–414, 1988. [17] N. Tishby, F. C. Pereira, and W. Bialek. The information bottleneck method. In Proceedings of the 37th Allerton Conference on Communication, Control and Computing, edited by B. Hajek & R. S. Sreenivas. University of Illinois, 368–377, 1999. [18] A. G. Dimitrov and J. P. Miller. Neural coding and decoding: communication channels and quantization. Network: Comput. Neural Syst., 12:441–472, 2001. [19] L. Paninski. Convergence properties of some spike-triggered analysis techniques. In Advances in Neural Information Processing 15, edited by S. Becker, S. Thrun, and K. Obermayer, 2003. [20] N. Brenner, S. P. Strong, R. Koberle, W Bialek, and R. R. de Ruyter van Steveninck. Synergy in a neural code. Neural Comp., 12:1531-1552, 2000. [21] A. Treves and S. Panzeri. The upward bias in measures of information derived from limited data samples. Neural Comp., 7:399, 1995. [22] S. P. Strong, R. Koberle, R. R. de Ruyter van Steveninck, and W. Bialek. Entropy and information in neural spike trains. Phys. Rev. Lett., 80:197–200, 1998.
2002
98
2,307
Fast Exact Inference with a Factored Model for Natural Language Parsing Dan Klein Department of Computer Science Stanford University Stanford, CA 94305-9040 klein@cs.stanford.edu Christopher D. Manning Department of Computer Science Stanford University Stanford, CA 94305-9040 manning@cs.stanford.edu Abstract We present a novel generative model for natural language tree structures in which semantic (lexical dependency) and syntactic (PCFG) structures are scored with separate models. This factorization provides conceptual simplicity, straightforward opportunities for separately improving the component models, and a level of performance comparable to similar, non-factored models. Most importantly, unlike other modern parsing models, the factored model admits an extremely effective A* parsing algorithm, which enables efficient, exact inference. 1 Introduction Syntactic structure has standardly been described in terms of categories (phrasal labels and word classes), with little mention of particular words. This is possible, since, with the exception of certain common function words, the acceptable syntactic configurations of a language are largely independentof the particular words that fill out a sentence. Conversely, for resolving the important attachment ambiguities of modifiers and arguments, lexical preferences are known to be very effective. Additionally, methods based only on key lexical dependencies have been shown to be very effective in choosing between valid syntactic forms [1]. Modern statistical parsers [2, 3] standardly use complex joint models of over both category labels and lexical items, where “everything is conditioned on everything” to the extent possible within the limits of data sparseness and finite computer memory. For example, the probability that a verb phrase will take a noun phrase object depends on the head word of the verb phrase. A VP headed by acquired will likely take an object, while a VP headed by agreed will likely not. There are certainly statistical interactions between syntactic and semantic structure, and, if deeper underlying variables of communication are not modeled, everything tends to be dependent on everything else in language [4]. However, the above considerations suggest that there might be considerable value in a factored model, which provides separate models of syntactic configurations and lexical dependencies, and then combines them to determine optimal parses. For example, under this view, we may know that acquired takes right dependents headed by nouns such as company or division, while agreed takes no noun-headed right dependents at all. If so, there is no need to explicitly model the phrasal selection on top of the lexical selection. Although we will show that such a model can indeed produce a high performance parser, we will focus particularly on how a factored model permits efficient, exact inference, rather than the approximate heuristic inference normally used in large statistical parsers. S NP NN Factory NNS payrolls VP VBD fell PP IN in NN September fell-VBD payrolls-NNS Factory-NN Factory payrolls fell in-IN in September-NN September S, fell-VBD NP, payrolls-NNS Factory-NN Factory payrolls-NNS payrolls VP, fell-VBD fell-VBD fell PP, in-IN in-IN in September-NN September (a) PCFG Structure (b) Dependency Structure (c) Combined Structure Figure 1: Three kinds of parse structures. 2 A Factored Model Generative models for parsing typically model one of the kinds of structures shown in figure 1. Figure 1a is a plain phrase-structure tree T, which primarily models syntactic units, figure 1b is a dependency tree D, which primarily models word-to-word selectional affinities [5], and figure 1c is a lexicalized phrase-structure tree L, which carries both category and (part-of-speech tagged) head word information at each node. A lexicalized tree can be viewed as the pair L = (T, D) of a phrase structure tree T and a dependency tree D. In this view, generative models over lexicalized trees, of the sort standard in lexicalized PCFG parsing [2, 3], can be regarded as assigning mass P(T, D) to such pairs. To the extent that dependency and phrase structure need not be modeled jointly, we can factor our model as P(T, D) = P(T )P(D): this approach is the basis of our proposed models, and its use is, to our knowledge, new. This factorization, of course, assigns mass to pairs which are incompatible, either because they do not generate the same terminal string or do not embody compatible bracketings. Therefore, the total mass assigned to valid structures will be less than one. We could imagine fixing this by renormalizing. For example, this situation fits into the product-of-experts framework [6], with one semantic expert and one syntactic expert that must agree on a single structure. However, since we are presently only interested in finding most-likely parses, no global renormalization constants need to be calculated. Given the factorization P(T, D) = P(T )P(D), rather than engineering a single complex combined model, we can instead build two simpler sub-models. We show that the combination of even quite simple “off the shelf” implementations of the two sub-models can provide decent parsing performance. Further, the modularity afforded by the factorization makes it much easier to extend and optimize the individual components. We illustrate this by building improved versions of both sub-models, but we believe that there is room for further optimization. Concretely, we used the following sub-models. For P(T ), we used successively more accurate PCFGs. The simplest, PCFG-BASIC, used the raw treebank grammar, with nonterminals and rewrites taken directly from the training trees [7]. In this model, nodes rewrite atomically, in a top-down manner, in only the ways observed in the training data. For improved models of P(T ), tree nodes’ labels were annotated with various contextual markers. In PCFG-PA, each node was marked with its parent’s label as in [8]. It is now well known that such annotation improves the accuracy of PCFG parsing by weakening the PCFG independence assumptions. For example, the NP in figure 1a would actually have been labeled NPˆS. Since the counts were not fragmented by head word or head tag, we were able to directly use the MLE parameters, without smoothing.1 The best PCFG model, PCFGLING, involved selective parent splitting, order-2 rule markovization (similar to [2, 3]), and linguistically-derived feature splits.2 1This is not to say that smoothing would not improve performance, but to underscore how the factored model encounters less sparsity problems than a joint model. 2Infinitive VPs, possessive NPs, and gapped Ss were marked, the preposition tag was split into O(n5) Items and Schema X(h) h i j X(h) h i j + Y(h′) h′ j k + Z(h) X(h) Y(h′) Z(h) h i k An Edge The Edge Combination Schema Figure 2: Edges and the edge combination schema for an O(n5) lexicalized tabular parser. Models of P(D) were lexical dependency models, which deal with tagged words: pairs ⟨w, t⟩. First the head ⟨wh, th⟩of a constituent is generated, then successive right dependents ⟨wd, td⟩until a STOP token ⋄is generated, then successive left dependents until ⋄ is generated again. For example, in figure 1, first we choose fell-VBD as the head of the sentence. Then, we generate in-IN to the right, which then generates September-NN to the right, which generates ⋄on both sides. We then return to in-IN, generate ⋄to the right, and so on. The dependency models required smoothing, as the word-word dependency data is very sparse. In our basic model, DEP-BASIC, we generate a dependent conditioned on the head and direction, using a mixture of two generation paths: a head can select a specific argument word, or a head can select only an argument tag. For head selection of words, there is a prior distribution over dependents taken by the head’s tag, for example, left dependents taken by past tense verbs: P(wd, td|th, dir) = count(wd, td, th, dir)/count(th, dir). Observations of bilexical pairs are taken against this prior, with some prior strength κ: P(wd, td|wh, th, dir) = count(wd, td, wh, th, dir) + κ P(wd, td|th, dir) count(wh, th, dir) + κ This model can capture bilexical selection, such as the affinity between payrolls and fell. Alternately, the dependent can have only its tag selected, and then the word is generated independently: P(wd, td|wh, th, dir) = P(wd|td)P(td|wh, th, dir). The estimates for P(td|wh, th, dir) are similar to the above. These two mixture components are then linearly interpolated, giving just two prior strengths and a mixing weight to be estimated on held-out data. In the enhanced dependency model, DEP-VAL, we condition not only on direction, but also on distance and valence. The decision of whether to generate ⋄is conditioned on one of five values of distance between the head and the generation point: zero, one, 2–5, 6–10, and 11+. If we decide to generate a non-⋄dependent, the actual choice of dependent is sensitive only to whether the distance is zero or not. That is, we model only zero/non-zero valence. Note that this is (intentionally) very similar to the generative model of [2] in broad structure, but substantially less complex. At this point, one might wonder what has been gained. By factoring the semantic and syntactic models, we have certainly simplified both (and fragmented the data less), but there are always simpler models, and researchers have adopted complex ones because of their parsing accuracy. In the remainder of the paper, we demonstrate the three primary benefits of our model: a fast, exact parsing algorithm; parsing accuracy comparable to non-factored models; and useful modularity which permits easy extensibility. several subtypes, conjunctions were split into contrastive and other occurrences, and the word not was given a unique tag. In all models, unknown words were modeled using only the MLE of P(tag|unknown) with ML estimates for the reserved mass per tag. Selective splitting was done using an information-gain like criterion. 3 An A* Parser In this section, we outline an efficient algorithm for finding the Viterbi, or most probable, parse for a given terminal sequence in our factored lexicalized model. The naive approach to lexicalized PCFG parsing is to act as if the lexicalized PCFG is simply a large nonlexical PCFG, with many more symbols than its nonlexicalized PCFG backbone. For example, while the original PCFG might have a symbol NP, the lexicalized one has a symbol NP-x for every possible head x in the vocabulary. Further, rules like S →NP VP become a family of rules S-x →NP-y VP-x.3 Within a dynamic program, the core parse item in this case is the edge, shown in figure 2, which is specified by its start, end, root symbol, and head position.4 Adjacent edges combine to form larger edges, as in the top of figure 2. There are O(n3) edges, and two edges are potentially compatible whenever the left one ends where the right one starts. Therefore, there are O(n5) such combinations to check, giving an O(n5) dynamic program.5 The core of our parsing algorithm is a tabular agenda-based parser, using the O(n5) schema above. The novelty is in the choice of agenda priority, where we exploit the rapid parsing algorithms available for the sub-models to speed up the otherwise impractical combined parse. Our choice of priority also guarantees optimality, in the sense that when the goal edge is removed, its most probable parse is known exactly. Other lexicalized parsers accelerate parsing in ways that destroy this optimality guarantee. The top-level procedure is given in figure 3. First, we parse exhaustively with the two sub-models, not to find complete parses, but to find best outside scores for each edge e. An outside score is the score of the best parse structure which starts at the goal and includes e, the words before it, and the words after it, as depicted in figure 3. Outside scores are a Viterbi analog of the standard outside probabilities given by the inside-outside algorithm [11]. For the syntactic model, P(T ), well-known cubic PCFG parsing algorithms are easily adapted to find outside scores. For the semantic model, P(D), there are several presentations of cubic dependency parsing algorithms, including [9] and [12]. These can also be adapted to produce outside scores in cubic time, though since their basic data structures are not edges, there is some subtlety. For space reasons, we omit the details of these phases. An agenda-based parser tracks all edges that have been constructed at a given time. When an edge is first constructed, it is put on an agenda, which is a priority queue indexed by some score for that node. The agenda is a holding area for edges which have been built in at least one way, but which have not yet been used in the construction of other edges. The core cycle of the parser is to remove the highest-priority edge from the agenda, and act on it according to the edge combination schema, combining it with any previously removed, compatible edges. This much is common to many parsers; agenda-based parsers primarily differ in their choice of edge priority. If the best known inside score for an edge is used as a priority, then the parser will be optimal. In particular, when the goal edge is removed, its score will correspond the most likely parse. The proof is a generalization of the proof of Dijkstra’s algorithm (uniform-cost search), and is omitted for space reasons 3The score of such a rule in the factored model would be the PCFG score for S →NP VP, combined with the score for x taking y as a dependent and the left and right STOP scores for y. 4The head position variable often, as in our case, also specifies the head’s tag. 5Eisner and Satta [9] propose a clever O(n4) modification which separates this process into two steps by introducing an intermediate object. However, even the O(n4) formulation is impractical for exhaustive parsing with broad-coverage, lexicalized treebank grammars. There are several reasons for this: the constant factor due to the grammar is huge (these grammars often contain tens of thousands of rules once binarized), and larger sentences are more likely to contain structures which unlock increasingly large regions of the grammar ([10] describes how this can cause the sentence length to leak into terms which are analyzed as constant, leading to empirical growth far faster than the predicted bounds). We did implement a version of this parser using the O(n4) formulation of [9], but, because of the effectiveness of the A* estimate, it was only marginally faster; see section 4. 1. Extract the PCFG sub-model and set up the PCFG parser. 2. Use the PCFG parser to find outside scores αPCFG(e) for each edge. 3. Extract the dependency sub-model and set up the dependency parser. 4. Use the dependency parser to find outside scores αDEP(e) for each edge. 5. Combine PCFG and dependency sub-models into the lexicalized model. 6. Form the combined outside estimate a(e) = αPCFG(e) + αDEP(e) 7. Use the lexicalized A* parser, with a(e) as an A* estimate of α(e) words e β α Figure 3: The top-level algorithm and an illustration of inside and outside scores. PCFG Model Precision Recall F1 Exact Match PCFG-BASIC 75.3 70.2 72.7 11.0 PCFG-PA 78.4 76.9 77.7 18.5 PCFG-LING 83.7 82.1 82.9 25.7 Dependency Model Dependency Acc DEP-BASIC 76.3 DEP-VAL 85.0 (a) The PCFG Model (b) The Dependency Model Figure 4: Performance of the sub-models alone. (but given in [13]). However, removing edges by inside score is not practical (see section 4 for an empirical demonstration), because all small edges end up having better scores than any large edges. Luckily, the optimality of the algorithm remains if, rather than removing items from the agenda by their best inside scores, we add to those scores any optimistic (admissible) estimate of the cost to complete a parse using that item. The proof of this is a generalization of the proof of the optimality of A* search. To our knowledge, no way of generating effective, admissible A* estimates for lexicalized parsing has previously been proposed.6 However, because of the factored structure of our model, we can use the results of the sub-models’ parses to give us quite sharp A* estimates. Say we want to know the outside score of an edge e. That score will be the score α(Te, De) (a logprobability) of a certain structure (Te, De) outside of e, where Te and De are a compatible pair. From the initial phases, we know the exact scores of the overall best T ′ e and the best D′ e which can occur outside of e, though of course it may well be that T ′ e and D′ e are not compatible. However, αPCFG(Te) ≤αPCFG(T ′ e) and αDEP(De) ≤αDEP(D′ e), and so α(Te, De) = αPCFG(Te) + αDEP(De) ≤αPCFG(T ′ e) + αDEP(D′ e). Therefore, we can use the sum of the sub-models’ outside scores, a(e) = αPCFG(T ′ e)+αDEP(D′ e), as an upper bound on the outside score for the combined model. Since it is reasonable to assume that the two models will be broadly compatible and will generally prefer similar structures, this should create a sharp A* estimate, and greatly reduce the work needed to find the goal parse. We give empirical evidence of this in section 4. 4 Empirical Performance In this section, we demonstrate that (i) the factored model’s parsing performance is comparable to non-factored models which use similar features, (ii) there is an advantage to exact inference, and (iii) the A* savings are substantial. First, we give parsing figures on the standard Penn treebank parsing task. We trained the two sub-models, separately, on sections 02–21 of the WSJ section of the treebank. The numbers reported here are the result of then testing on section 23 (length ≤40). The treebank only supplies node labels (like NP) and 6The basic idea of changing edge priorities to more effectively guide parser work is standardly used, and other authors have made very effective use of inadmissible estimates. [2] uses extensive probabilistic pruning – this amounts to giving pruned edges infinitely low priority. Absolute pruning can, and does, prevent the most likely parse from being returned at all. [14] removes edges in order of estimates of their correctness. This, too, may result in the first parse found not being the most likely parse, but it has another more subtle drawback: if we hold back an edge e for too long, we may use e to build another edge f in a new, better way. If f has already been used to construct larger edges, we must then propagate its new score upwards (which can trigger still further propagation). PCFG Model Dependency Model Precision Recall F1 Exact Match Dependency Acc PCFG-BASIC DEP-BASIC 80.1 78.2 79.1 16.7 87.2 PCFG-BASIC DEP-VAL 82.5 81.5 82.0 17.7 89.2 PCFG-PA DEP-BASIC 82.1 82.2 82.1 23.7 88.0 PCFG-PA DEP-VAL 84.0 85.0 84.5 24.8 89.7 PCFG-LING DEP-BASIC 85.4 84.8 85.1 30.4 90.3 PCFG-LING DEP-VAL 86.6 86.8 86.7 32.1 91.0 PCFG Model Dependency Model Thresholded? F1 Exact Match Dependency Acc PCFG-LING DEP-VAL No 86.7 32.1 91.0 PCFG-LING DEP-VAL Yes 86.5 31.9 90.8 Figure 5: The combined model, with various sub-models, and with/without thresholding. does not contain head information. Heads were calculated for each node according to the deterministic rules given in [2]. These rules are broadly correct, but not perfect. We effectively have three parsers: the PCFG (sub-)parser, which produces nonlexical phrase structures like figure 1a, the dependency (sub-)parser, which produces dependency structures like figure 1b, and the combination parser, which produces lexicalized phrase structures like figure 1c. The outputs of the combination parser can also be projected down to either nonlexical phrase structures or dependency structures. We score the output of our parsers in two ways. First, the phrase structure of the PCFG and combination parsers can be compared to the treebank parses. The parsing measures standardly used for this task are labeled precision and recall.7 We also report F1, the harmonic mean of these two quantities. Second, for the dependency and combination parsers, we can score the dependency structures. A dependency structure D is viewed as a set of head-dependent pairs ⟨h, d⟩, with an extra dependency ⟨root, x⟩where root is a special symbol and x is the head of the sentence. Although the dependency model generates part-of-speech tags as well, these are ignored for dependency accuracy. Punctuation is not scored. Since all dependency structures over n non-punctuation terminals contain n dependencies (n −1 plus the root dependency), we report only accuracy, which is identical to both precision and recall. It should be stressed that the “correct” dependency structures, though generally correct, are generated from the PCFG structures by linguistically motivated, but automatic and only heuristic rules. Figure 4 shows the relevant scores for the various PCFG and dependency parsers alone.8 The valence model increases the dependency model’s accuracy from 76.3% to 85.0%, and each successive enhancement improves the F1 of the PCFG models, from 72.7% to 77.7% to 82.9%. The combination parser’s performance is given in figure 5. As each individual model is improved, the combination F1 is also improved, from 79.1% with the pair of basic models to 86.7% with the pair of top models. The dependency accuracy also goes up: from 87.2% to 91.0%. Note, however, that even the pair of basic models has a combined dependency accuracy higher than the enhanced dependency model alone, and the top three have combined F1 better than the best PCFG model alone. For the top pair, figure 6c illustrates the relative F1 of the combination parser to the PCFG component alone, showing the unsurprising trend that the addition of the dependency model helps more for longer sentences, which, on average, contain more attachment ambiguity. The top F1 of 86.7% is greater than that of the lexicalized parsers presented in [15, 16], but less than that of the newer, more complex, parsers presented in [3, 2], which reach as high as 90.1% F1. 7A tree T is viewed as a set of constituents c(T ). Constituents in the correct and the proposed tree must have the same start, end, and label to be considered identical. For this measure, the lexical heads of nodes are irrelevant. The actual measures used are detailed in [15], and involve minor normalizations like the removal of punctuation in the comparison. 8The dependency model is sensitive to any preterminal annotation (tag splitting) done by the PCFG model. The actual value of DEP-VAL shown corresponds to PCFG-LING. 1 10 100 1000 10000 100000 1000000 0 10 20 30 40 Length Edges Processed Uniform-Cost A-Star 0 20 40 60 80 100 0 5 10 15 20 25 30 35 40 Length Time (sec) Combined Phase Dependency Phase PCFG Phase 0 25 50 75 100 0 10 20 30 40 Length Absolute F1 0 0.5 1 1.5 2 Relative F1 Combination PCFG Combination/PCFG (a) (b) (c) Figure 6: (a) A* effectiveness measured by edges expanded, (b) time spent on each phase, and (c) relative F1, all shown as sentence length increases. However, it is worth pointing out that these higher-accuracyparsers incorporate many finely wrought enhancements which could presumably be extracted and applied to benefit our individual models.9 The primary goal of this paper is not to present a maximally tuned parser, but to demonstrate a method for fast, exact inference usable in parsing. Given the impracticality of exact inference for standard parsers, a common strategy is to take a PCFG backbone, extract a set of top parses, either the top k or all parses within a score threshold of the top parse, and rerank them [3, 17]. This pruning is done for efficiency; the question is whether it is hurting accuracy. That is, would exact inference be preferable? Figure 5 shows the result of parsing with our combined model, using the best model pair, but with the A* estimates altered to block parses whose PCFG projection had a score further than a threshold δ = 2 in log-probability from the best PCFG-only parse. Both bracket F1 and exact-match rate are lower for the thresholded parses, which we take as an argument for exact inference.10 We conclude with data on the effectiveness of the A* method. Figure 6a shows the average number of edges extracted from the agenda as sentence length increases. Numbers both with and without using the A* estimate are shown. Clearly, the uniform-cost version of the parser is dramatically less efficient; by sentence length 15 it extracts over 800K edges, while even at length 40 the A* heuristics are so effective that only around 2K edges are extracted. At length 10, the average number is less than 80, and the fraction of edges not suppressed is better than 1/10K (and improves as sentence length increases). To explain this effectiveness, we suggest that the combined parsing phase is really only figuring out how to reconcile the two models’ preferences.11 The A* estimates were so effective that even with our object-heavy Java implementation of the combined parser, total parse time was dominated by the initial, array-based PCFG phase (see figure 6b).12 9For example, the dependency distance function of [2] registers punctuation and verb counts, and both smooth the PCFG production probabilities, which could improve the PCFG grammar. 10While pruning typically buys speed at the expense of some accuracy (see also, e.g., [2]), pruning can also sometimes improve F1: Charniak et al. [14] find that pruning based on estimates for P(e|s) raises accuracy slightly, for a non-lexicalized PCFG. As they note, their pruning metric seems to mimic Goodman’s maximum-constituents parsing [18], which maximizes the expected number of correct nodes rather than the likelihood of the entire parse. In any case, we see it as valuable to have an exact parser with which these types of questions can be investigated at all for lexicalized parsing. 11Note that the uniform-cost parser does enough work to exploit the shared structure of the dynamic program, and therefore edge counts appear to grow polynomially. However, the A* parser does so little work that there is minimal structure-sharing. Its edge counts therefore appear to grow exponentially over these sentence lengths, just like a non-dynamic-programming parser’s would. With much longer sentences, or a less efficient estimate, the polynomial behavior would reappear. 12The average time to parse a sentence with the best model on a 750MHz Pentium III with 2GB RAM was: for 20 words, PCFG 13 sec, dependencies 0.6 sec, combination 0.3 sec; 40 words, PCFG 72 sec, dependencies 18 sec, combination 1.6 sec. 5 Conclusion The framework of factored models over lexicalized trees has several advantages. It is conceptually simple, and modularizes the model design and estimation problems. The concrete model presented performs comparably to other, more complex, non-exact models proposed, and can be easily extended in the ways that other parser models have been. Most importantly, it admits a novel A* parsing approach which allows fast, exact inference of the most probable parse. Acknowledgements. We would like to thank Lillian Lee, Fernando Pereira, and Joshua Goodman for advice and discussion about this work. This paper is based on work supported by the National Science Foundation (NSF) under Grant No. IIS-0085896, by the Advanced Research and Development Activity (ARDA)’s Advanced Question Answering for Intelligence (AQUAINT) Program, by an NSF Graduate Fellowship to the first author, and by an IBM Faculty Partnership Award to the second author. References [1] D. Hindle and M. Rooth. Structural ambiguity and lexical relations. Computational Linguistics, 19(1):103–120, 1993. [2] M. Collins. Head-Driven Statistical Models for Natural Language Parsing. PhD thesis, University of Pennsylvania, 1999. [3] E. Charniak. A maximum-entropy-inspired parser. NAACL 1, pp. 132–139, 2000. [4] R. Bod. What is the minimal set of fragments that achieves maximal parse accuracy? ACL 39, pp. 66–73, 2001. [5] I. A. Mel′ˇcuk. Dependency Syntax: theory and practice. State University of New York Press, Albany, NY, 1988. [6] G. E. Hinton. Training products of experts by minimizing contrastive divergence. Technical Report GCNU TR 2000-004, GCNU, University College London, 2000. [7] E. Charniak. Tree-bank grammars. Proceedings of the Thirteenth National Conference on Artificial Intelligence (AAAI ’96), pp. 1031–1036, 1996. [8] M. Johnson. PCFG models of linguistic tree representations. Computational Linguistics, 24(4):613–632, 1998. [9] J. Eisner and G. Satta. Efficient parsing for bilexical context-free grammars and head-automaton grammars. ACL 37, pp. 457–464, 1999. [10] D. Klein and C. D. Manning. Parsing with treebank grammars: Empirical bounds, theoretical models, and the structure of the Penn treebank. ACL 39/EACL 10, pp. 330–337, 2001. [11] J. K. Baker. Trainable grammars for speech recognition. D. H. Klatt and J. J. Wolf, editors, Speech Communication Papers for the 97th Meeting of the Acoustical Society of America, pp. 547–550, 1979. [12] J. Lafferty, D. Sleator, and D. Temperley. Grammatical trigrams: A probabilistic model of link grammar. Proc. AAAI Fall Symposium on Probabilistic Approaches to Natural Language, 1992. [13] D. Klein and C. D. Manning. Parsing and hypergraphs. Proceedings of the 7th International Workshop on Parsing Technologies (IWPT-2001), 2001. [14] E. Charniak, S. Goldwater, and M. Johnson. Edge-based best-first chart parsing. Proceedings of the Sixth Workshop on Very Large Corpora, pp. 127–133, 1998. [15] D. M. Magerman. Statistical decision-tree models for parsing. ACL 33, pp. 276–283, 1995. [16] M. J. Collins. A new statistical parser based on bigram lexical dependencies. ACL 34, pp. 184–191, 1996. [17] M. Collins. Discriminative reranking for natural language parsing. ICML 17, pp. 175–182, 2000. [18] J. Goodman. Parsing algorithms and metrics. ACL 34, pp. 177–183, 1996.
2002
99
2,308
Decoding V1 Neuronal Activity using Particle Filtering with Volterra Kernels Ryan Kelly Center for the Neural Basis of Cognition Carnegie-Mellon University Pittsburgh, PA 15213 rkelly@cs.cmu.edu Tai Sing Lee Center for the Neural Basis of Cognition Carnegie-Mellon University Pittsburgh, PA 15213 tai@cnbc.cmu.edu Abstract Decoding is a strategy that allows us to assess the amount of information neurons can provide about certain aspects of the visual scene. In this study, we develop a method based on Bayesian sequential updating and the particle filtering algorithm to decode the activity of V1 neurons in awake monkeys. A distinction in our method is the use of Volterra kernels to filter the particles, which live in a high dimensional space. This parametric Bayesian decoding scheme is compared to the optimal linear decoder and is shown to work consistently better than the linear optimal decoder. Interestingly, our results suggest that for decoding in real time, spike trains of as few as 10 independent but similar neurons would be sufficient for decoding a critical scene variable in a particular class of visual stimuli. The reconstructed variable can predict the neural activity about as well as the actual signal with respect to the Volterra kernels. 1 Introduction Cells in the primary visual cortex perform nonlinear operations on visual stimuli. This nonlinearity introduces ambiguity in the response of the neurons. Given a neuronal response, an optimal linear decoder cannot accurately reconstruct the visual stimulus due to nonlinearities. Is there a strategy to resolve this ambiguity and recover the information that is encoded in the response of these neurons? Bayesian decoding schemes, which are nonlinear, might be useful in this context . Bayesian sequential updating or belief propagation, implemented in the form of particle filtering, has recently been used in estimating the hand trajectories of monkeys based on M1 neuron’s responses [4] and the location of a rat based on the responses of the place cells in the hippocampus[3]. However, linear methods have been shown to be quite adequate for decoding LGN, motor cortical, or hippocampal place cells’ signals using population vectors or the optimal linear decoder [10, 5, 8]. Bayesian methods, with proper probability model assumptions, could work better than the linear methods, but they apparently are not critical to solving those problems. These methods may be more useful or important in the decoding of nonlinear visual neuronal responses. Here, we implement an algorithm based on Bayesian sequential updating in the form particle filtering to decode nonlinear visual neurons in awake behaving monkeys. The strategy is similar to the one used by Brown et al. [2] and Brockwell et al. [1] in their decoding of hippocampus place neurons or M1 neurons, except that we introduced the use of Volterra kernels [6, 7, 9] to filter the hypothesis particle to generate feedback messages. The Volterra kernels integrate information from the previous 200 ms. This window allows us to backtrack and update the hypotheses within a 200 ms window, so the hypothesis space does not grow beyond 200ms for lengthy signals. We demonstrated that this method is feasible practically and indeed useful for decoding a temporal variable in the stimulus input based on cells’ responses and that it succeeds even when the optimal linear decoder fails. 2 The Approach Our objective is to infer the time-series of a scene variable based on the ongoing response of one or a set of visual neurons. A hypothesis particle is then the entire history of the scene variable of interest up to the present time t, i.e. (x1, x2, . . . , xt) given the observed neuronal activity (y1, y2, . . . , yt). A key feature of our algorithm is the use of a decoded or estimated hypothesis to predict the response of the neurons at the next time step. The premise is that the scene variable we are inferring is sufficient to predict the activity of the neuron. Since visual neurons have a temporal receptive field and typically integrate information from the past 100-200 ms to produce a response, we cannot make the Markovian assumption made in other Bayesian decoding studies [1, 2, 3, 4]. Instead, we will use the receptive field (kernel) to filter each hypothesis particle to generate a prediction of the neural response. We propose to use the Volterra kernels, which have been used in previous studies [6, 7, 9] to characterize the transfer function or receptive field of a neuron, to filter the hypothesis (ˆxt, . . . ˆx1). The predicted response of the neuron according to the kernels is based on the stimulus in the last 200 ms, optionally incorporating some lag which we eliminated by shifting the response forward 40 ms in time to compensate for the 40 ms the visual signal required to travel from the retina to V1. Ongoing observation of the activity of Figure 1: Two sample sinewave gratings. neurons is compared to the predicted response or proposal to yield a likelihood measure. The likelihood measure of each hypothesis particle is proportional to how close the hypothesis’s predicted response is to the actual observed neural response. As all the existing hypotheses are weighted by their likelihood measures, the posterior distribution of the hypothesis is effectively resampled. The hypotheses that tend to generate incorrect proposals will die off over time. Conversely, the hypotheses that give predicted responses close to the actual response values will not only be kept alive, but also be allowed to give birth to offspring particles in its vicinity in the hypothesis space, allowing the algorithm to zoom in to the correct hypothesis more precisely. After weighting, resampling and reproducing, the hypothesis particles are propagated forward according to the prior statistical distribution on how the scene variable tends to progress. That is, p(xt|xt−1) yields a proposed hypothesis about the stimulus at time t + 1 based on the existing hypothesis which is defined at t and earlier times. These hypotheses are then filtered though the Volterra kernels to predict the distribution p(yt|xt−200,...,t−1), thus completing the loop. The entire flow-chart of our inference system is shown in Figure 4. Each step is described in detail below. 3 Neurophysiological Experiment We applied the ideas above to the data obFigure 2: A sample time series of the scene variable, with a sample spike train below. tained by the following experiment. This experiment sought to understand the encoding and decoding of temporal visual information by V1 neurons. In each experimental session, a movie (2.2 seconds per trial) of a sinewave grating stimulus was presented while the monkey had to maintain fixation on a spot within a 0.8o × 0.8o window. The sinewave grating was constrained to move along one dimension in a direction perpendicular to the grating with a step size in phase drawn from a random pink noise distribution which follow a 1/f power spectrum in the Fourier domain, approximating the statistical correlational structures in natural temporal stimuli. To ensure continuity of the input signals we took the cosine of the phase, which is related to the image intensity value at a local area within the receptive field. In decoding the cos(phase), a hidden variable, was the scene variable inferred. A sample stimulus is given in Figure 2. This scene variable, through the Volterra kernel procedure, can predict the neural responses of this class of stimulus reasonably well. 400 trials of different sequences were presented. The known pair sequences of stimulus and response in these trials were used to estimate the Volterra kernels by correlating the input x with the neural response y. In addition, one particular stimulus sequence is repeated 60-80 trials to obtain a PSTH, which is smoothed with a 10 ms window to give an estimate of the instantaneous firing rate. In our decoding work, we take the PSTH as input to our algorithm; this is considered equivalent to assuming simultaneous access to a number of identical, independent neurons. When the neurons are different, a kernel derivation for each neuron is necessary. 4 Volterra Kernels Volterra kernels have been used to characterize a cell’s transfer function. With Volterra kernels with memory length L, the response yt can be predicted by convolution of the kernels with the input xt, y(t) = yt = ho + L X τ=1 hτxt−τ + L X τ2 L X τ1 hτ1,τ2xt−τ1xt−τ2, where h0 corresponds to the mean firing rate, hτ is the first order kernel and hτ1,τ2 the second order kernel. We restrict all τ’s to be positive, so we only consider causal filters. This equation is easily expressed in matrix form as Y = XH, where time is now indexed by matrix row in Y and X. H contains the concatenation of the terms [h0 h1 · · · hL h1,1 h1,2 · · · hL,L]′ , and row t of X is similarly [1 xt−1 · · · xt−L (xt−1 xt−1) · · · (xt−L xt−L)] The standard solution for this regression problem is H = (X′X)−1 X′Y . That is, the parameters of the kernels are derived using the regression technique by correlating the input and the output, and are compensated by the covariance in the input, i.e. 0 500 1000 1500 2000 2500 0 0.05 0.1 0.15 0.2 Time(ms) Response (Prob of Spiking) PSTH Predicted Response Figure 3: The first and second order Volterra kernels of a V1 cell (left) and a typical prediction of the neuronal response compared to the actual response (right). H = (X′X)−1X′Y . Because of the correlations in the input signal xt, the matrix (X′X) is ill conditioned. Instead of directly inverting this matrix, singular value decomposition can be used, as USU ′ = X′X where US−1U ′ = (X′X)−1 and S is a diagonal matrix. Only the first n largest dimensions as ranked by their eigenvalue are included, where n is chosen to account for 99% of the variance in X [7]. Figure 3 depicts an example of the first and second order Volterra kernels and also shows a typical example of their accuracy in predicting the response PSTH yt. For a majority of these neurons, the Volterra kernels recovered are capable of predicting the neural response to the input stimulus with a high level of accuracy. This observation forms the basis of success for our scheme of particle filtering. 5 Decoding Scheme We apply Bayesian decoding to the problem of determining the visual stimulus variable xt for some time step t, given observations of the neural responses (y1, y2, . . . , yt). The global flow of the algorithm is shown in Figure 4. 5.1 Particle Prediction At each time step of of decoding scheme, we can now filter a hypothesis particle (ˆx1, ˆx2, . . . , ˆxt) by the Volterra kernels to generate a prediction of the response of the neuron to test the validity of the hypothesis. (y1, y2, . . . , yt) remains the observed neural activity of a V1 neuron up to time t, and ˆyi t is the predicted neural activity at time t based on hypothesis particle i. This gives us a set of predicted responses at time t, {ˆy1 t , ˆy2 t , . . . , ˆyN t }, where the subscript is the particle index, and N is the number of particles. 5.2 Particle Resampling The actual observed response of the neuron at time t is compared to each particle’s prediction as a means to evaluate the likelihood or fitness of the particle. If we assume yt is the average of spike trains from a single neuron in independent trials or the average firing rate of a population of independent neurons with identical tuning properties, then the resulting error distribution can be assumed to be a Gaussian distribution, with σ representing the uncertainty of the predicted response given the correct values of the stimulus variable. The Figure 4: Flow chart of the PF decoding scheme. The effect of one resampling step is shown in the two graphs. Each graph shows the particles’ (n=100) values during a trial over 200 ms. The thicknesses of the lines are proportional to the number of particles with the corresponding values. Notice the change in the distribution of particles after sampling. After the resampling there are many more particles concentrated around 1 instead of -1. relative likelihood of an observation given each particle is then given by p(yt|ˆxi 1, . . . , ˆxi t) = e−(ˆyi t−yt)2/2σ2 P j e−(ˆyj t −yt)2/2σ2 . All the particles together provide a representation of the particle-conditional distribution, p(yt|ˆxt, ˆxt−1, . . . , ˆx1). This is used to resample the posterior distribution of the hypotheses based on all the observations up to time t −1, p(ˆxt|y1, y2, . . . yt) ∝p(yt|ˆxt)p(ˆxt|y1, y2, . . . yt−1), to produce a current posterior distribution of the hypotheses. 5.3 Particle Propagation The next step in the decoding scheme is to generate new value ˆxt+1 and append it to the hypothesis particle p(ˆxt+1|y1, y2, . . . yt) = Z p(ˆxt+1|ˆxt)p(ˆxt|y1, y2, . . . yt)dxt, where p(ˆxt+1|ˆxt) is the state propagation model that provides the prior on how the stimulus changes over time. For the state propagation model used in this study, all initial positions for the stimulus are equally likely. The range of the stimulus (-1 to 1) is divided into 60 equally spaced intervals. A 60x60 probability table is constructed empirically from the training data stimuli, corresponding to a discrete version approximating the conditional prior above. Solving these priors analytically is difficult or even impossible. Besides, the hypothesis space is enormous as there are 60 possible values at each time point, and information from a 200 ms window (20 time points at 10 ms intervals) is being integrated to predict yt. The particle filtering algorithm is basically a way to approximate the distributions efficiently. The algorithm consists of cycling through Figure 5: A scatter plot showing the least squares regression line for the data. the above steps, i.e. particle prediction, particle resampling, and particle propagation. In summary, 1. Prediction step: Filter all particles by the Volterra kernels to generate the prediction of neural responses. 2. Resampling step: Compare actual neural response with the predicted response of each particle to assign a likelihood value to each particle. Resample (with replacement) the posterior distribution of the particles based on their likelihood. 3. Propagation step: Sample from the state model to randomly postulate a new stimulus value ˆxt for each particle and add this value to the end of the particle’s sequence to obtain (ˆx1, ˆx2, . . . , ˆxt). In the propagation step, the state model will move the stimulus in ways that it has typically been seen to move. In the prediction step, particles that predict a neural response close to the actual observed response will be highly valued and will likely be duplicated in the resampled set. Conversely, particles that predict a response which is not close to the actual response will not be highly valued and thus will likely be removed from the resultant set. 6 Results and Discussion Let xt, xt−1, . . . , x1 be the inferred scene variable Figure 6: Reconstruction error when input PSTH is constructed from fewer trials. With 10 spike trains, the PF has almost achieved the minimum error possible for this cell. (cos(phase)). sk(t) is the binary spike response of a neuron during trial k. The instantaneous firing rate of the neuron is given by y(t) = 1 m m X k = 1sk(t) where m is the number of trials. In general, for cells that respond well to a stimulus, this first order and the second order kernel can predict the response well. Over all cells tested (n=33), the average error ratio ey in the energy of the actual response is 18.4%. Each of the cells was decoded using the particle filtering algorithm with 1000 particles. The average reconstruction error ex is 27.14%, and the best cell has 10% error. A correlation exists between the encoding and decoding errors across trials as shown in Figure 5. ey = P t(ˆyt −yt)2 P t y2 t , ex = P t(ˆxt −xt)2 P t(xt + 1)2 , Figure 7: Particle filtering (PF) and optimal linear decoder (O.L.D.) reconstructions. The top left is the best PF reconstruction, and the bottom right is the worst out of all the cells tested. σ affects the rate at which the particle hypothesis space collapses around the correct solution. If σ is too large, all particles will become equally likely, while if σ is too small, only a few particles will survive each time step. Ideally, the particles will converge on a value for a number of time steps equal to the kernel’s length. The optimal value for σ was found empirically and was used in all reconstructions. Figure 7 shows sample reconstructions of some Figure 8: A scatter plot comparing the two decoding methods. good and bad cells. Decoding accuracy is limited by the performance of the Volterra kernel. When the kernel is unable to predict the neuronal response, particularly for cells that have low firing rates, any decoding scheme will suffer because of insufficient information. Thus the amount of error is correlated to the inability of the kernel in predicting neuronal responses. This idea is consistent with the error correlation between the particle filter and kernel in Figure 5. These cells do not provide enough relevant information about the visual stimulus in their spiking activities. Figure 6 shows that reconstruction based on the PSTH constructed from as few as 5-10 spike trains can reach an accuracy not far from reconstruction based on the PSTH of 80 trials. This suggests that as few as 10 independent but similar cells recorded simultaneously might be sufficient for decoding this scene variable. We find that the optimal linear decoder does not decode these cells well. The decoded output tends to follow the signal somewhat, but at a low amplitude as shown in Figure 7. The problem for the optimal linear decoder is that at any single moment in time it can only propose a single hypothesis, but there exist multiple signals that can produce the response. The optimal linear decoder tends to average in these cases. The particle filter keeps alive many independent hypotheses and can thus choose the most likely candidate by integrating information. The success of the particle filter relies mainly on three factors. First, in the particle prediction step, the Volterra kernels allow the particles to make reasonably accurate proposals based on the observed neural activities. This gives a good measure for evaluating the fitness of each particle. Second, in the resampling step, the weight of each particle embodies all the earlier observations, and because our particle filter keeps track of all proposals within the last 200 ms, earlier hypotheses can continue to be reevaluated and refined. Finally, in the propagation step, the particle filter utilizes prior knowledge about the manner in which the stimulus moves. This helps further in pruning down the hypothesis space. Acknowledgments This research is supported by NSF CAREER 9984706, NIH Vision Research core grant EY08098, and a NIH 2P41PR06009-11 for biomedical supercomputing. Thanks to Rick Romero, Yuguo Yu, and Anthony Brockwell for helpful discussion and advice. References [1] A. E. Brockwell, A. L. Rojas, and R. E. Kass. Bayesian decoding of motor cortical signals by particle filtering. Submitted to J. Neurophysiology, 2003. [2] E. Brown, L. Frank, D. Tang, M. Quirk, and M. Wilson. A statistical paradigm for neural spike train decoding applied to position prediction from ensemble firing patterns of rat hippocampal place cells. J. Neuroscience, 18(18):7411–7425, 1998. [3] U.T. Eden, L.M. Frank, R. Barbieri, and E.N. Brown. Particle filtering algorithms for neural decoding and adaptive estimation of receptive field plasticity. In Proc. Computational Neuroscience Meeting, CNS ’02, Santa Barbara, 2002. [4] Y. Gao, M. J. Black, E. Bienenstock, S. Shoham, and J. P. Donoghue. Probabilistic Inference of Hand Motion from Neural Activity in Motor Cortex, pages 213–220. MIT Press, Cambridge, MA, 2002. [5] A. P. Georgopoulos, A. B. Schwartz, and R. E. Kettner. Neuronal population coding of movement direction. Science, 243:234–236, 1989. [6] F. Rieke, D. Warland, R. deRuytervanSteveninck, and W. Bialek. Spikes: Exploring the Neural Code. MIT Press, Cambridge, MA, 1997. [7] R. Romero, Y. Yu, P Afhsar, and T. S. Lee. Adaptation of the temporal receptive fields of macaque v1 neurons. Neurocomputing, 52-54:135–140, 2002. [8] G. Stanley, F. Li, and Y. Dan. Reconstruction of natural scenes from ensemble responses in the lateral geniculate nucleus. J. Neuroscience, 19(18):8036–8042, 1999. [9] G. B. Stanley. Adaptive spatiotemporal receptive field estimation in the visual pathway. Neural Computation, 14:2925–2946, 2002. [10] K. Zhang, I. Ginzburg, B.L. McNaughton, and T. J. Sejnowski. Interpreting neuronal population activity by reconstruction: Unified framework with application to hippocampal place cells. J. Neurophysiology, 79:1017–1044, 1998.
2003
1
2,309
A Kullback-Leibler Divergence Based Kernel for SVM Classification in Multimedia Applications Pedro J. Moreno Purdy P. Ho Hewlett-Packard Cambridge Research Laboratory Cambridge, MA 02142, USA {pedro.moreno,purdy.ho}@hp.com Nuno Vasconcelos UCSD ECE Department 9500 Gilman Drive, MC 0407 La Jolla, CA 92093-0407 nuno@ece.ucsd.edu Abstract Over the last years significant efforts have been made to develop kernels that can be applied to sequence data such as DNA, text, speech, video and images. The Fisher Kernel and similar variants have been suggested as good ways to combine an underlying generative model in the feature space and discriminant classifiers such as SVM’s. In this paper we suggest an alternative procedure to the Fisher kernel for systematically finding kernel functions that naturally handle variable length sequence data in multimedia domains. In particular for domains such as speech and images we explore the use of kernel functions that take full advantage of well known probabilistic models such as Gaussian Mixtures and single full covariance Gaussian models. We derive a kernel distance based on the Kullback-Leibler (KL) divergence between generative models. In effect our approach combines the best of both generative and discriminative methods and replaces the standard SVM kernels. We perform experiments on speaker identification/verification and image classification tasks and show that these new kernels have the best performance in speaker verification and mostly outperform the Fisher kernel based SVM’s and the generative classifiers in speaker identification and image classification. 1 Introduction During the last years Support Vector Machines (SVM’s) [1] have become extremely successful discriminative approaches to pattern classification and regression problems. Excellent results have been reported in applying SVM’s in multiple domains. However, the application of SVM’s to data sets where each element has variable length remains problematic. Furthermore, for those data sets where the elements are represented by large sequences of vectors, such as speech, video or image recordings, the direct application of SVM’s to the original vector space is typically unsuccessful. While most research in the SVM community has focused on the underlying learning algorithms the study of kernels has also gained importance recently. Standard kernels such as linear, Gaussian, or polynomial do not take full advantage of the nuances of specific data sets. This has motivated plenty of research into the use of alternative kernels in the areas of multimedia. For example, [2] applies normalization factors to polynomial kernels for speaker identification tasks. Similarly, [3] explores the use of heavy tailed Gaussian kernels in image classification tasks. These approaches in general only try to tune standard kernels (linear, polynomial, Gaussian) to the nuances of multimedia data sets. On the other hand statistical models such as Gaussian Mixture Models (GMM) or Hidden Markov Models make strong assumptions about the data. They are simple to learn and estimate, and are well understood by the multimedia community. It is therefore attractive to explore methods that combine these models and discriminative classifiers. The Fisher kernel proposed by Jaakkola [4] effectively combines both generative and discriminative classifiers for variable length sequences. Besides its original application in genomic problems it has also been applied to multimedia domains, among others [5] applies it to audio classification with good results; [6] also tries a variation on the Fisher kernel on phonetic classification tasks. We propose a different approach to combine both discriminative and generative methods to classification. Instead of using these standard kernels, we leverage on successful generative models used in the multimedia field. We use diagonal covariance GMM’s and full covariance Gaussian models to better represent each individual audio and image object. We then use a metric derived from the symmetric Kullback-Leibler (KL) divergence to effectively compute inner products between multimedia objects. 2 Kernels for SVM’s Much of the flexibility and classification power of SVM’s resides in the choice of kernel. Some examples are linear, polynomial degree p, and Gaussian. These kernel functions have two main disadvantages for multimedia signals. First they only model inner products between individual feature vectors as opposed to an ensemble of vectors which is the typical case for multimedia signals. Secondly these kernels are quite generic and do not take advantage of the statistics of the individual signals we are targeting. The Fisher kernel approach [4] is a first attempt at solving these two issues. It assumes the existence of a generative model that explains well all possible data. For example, in the case of speech signals the generative model p(x|θ) is often a Gaussian mixture. Where the θ model parameters are priors, means, and diagonal covariance matrices. GMM’s are also quite popular in the image classification and retrieval domains; [7] shows good results on image classification and retrieval using Gaussian mixtures. For any given sequence of vectors defining a multimedia object X = {x1, x2, . . . , xm} and assuming that each vector in the sequence is independent and identically distributed, we can easily define the likelihood of the ensemble being generated by p(x|θ) as P(X|θ) = Qm i=1 p(xi|θ). The Fisher score maps each individual sequence {X1, . . . , Xn}, composed of a different number of feature vectors, into a single vector in the gradient log-likelihood space. This new feature vector, the Fisher score, is defined as UX = ∇θlog(P(X|θ)) (1) Each component of UX is a derivative of the log-likelihood of the vector sequence X with respect to a particular parameter of the generative model. In our case the parameters θ of the generative model are chosen from either the prior probabilities, the mean vector or the diagonal covariance matrix of each individual Gaussian in the mixture model. For example, if we use the mean vectors as our model parameters θ, i.e., for θ = µk out of K possible mixtures, then the Fisher score is ∇µklog(P(X|µk)) = m X i=1 P(k|xi)Σ−1 k (xi −µk) (2) where P(k|xi) represents the a posteriori probability of mixture k given the observed feature vector xi. Effectively we transform each multimedia object (audio or image) X of variable length into a single vector UX of fixed dimension. 3 Kullback-Leibler Divergence Based Kernels We start with a statistical model p(x|θi) of the data, i.e., we estimate the parameters θi of a generic probability density function (PDF) for each multimedia object (utterance or image) Xi = {x1, x2, . . . , xm}. We pick PDF’s that have been shown over the years to be quite effective at modeling multimedia patterns. In particular we use diagonal Gaussian mixture models and single full covariance Gaussian models. In the first case the parameters θi are priors, mean vectors, and diagonal covariance matrices while in the second case the parameters θi are the mean vector and full covariance matrix. Once the PDF p(x|θi) has been estimated for each training and testing multimedia object we replace the kernel computation in the original sequence space by a kernel computation in the PDF space: K(Xi, Xj) =⇒K(p(x|θi), p(x|θj)) (3) To compute the PDF parameters θi for a given object Xi we use a maximum likelihood approach. In the case of diagonal mixture models there is no analytical solution for θi and we use the Expectation Maximization algorithm. In the case of single full covariance Gaussian model there is a simple analytical solution for the mean vector and covariance matrix. Effectively we are proposing to map the input space Xi to a new feature space θi. Notice that if the number of vector in the Xi multimedia sequence is small and there is not enough data to accurately estimate θi we can use regularization methods, or even replace the maximum likelihood solution for θi by a maximum a posteriori solution. Other solutions like starting from a generic PDF and adapting its parameters θi to the current object are also possible. The next step is to define the kernel distance in this new feature space. Because of the statistical nature of the feature space a natural choice for a distance metric is one that compares PDF’s. From the standard statistical literature there are several possible choices, however, in this paper we only report our results on the symmetric Kullback-Leibler (KL) divergence D(p(x|θi), p(x|θj)) = ∞ Z −∞ p(x|θi) log( p(x|θi) p(x|θj)) dx + ∞ Z −∞ p(x|θj) log(p(x|θj) p(x|θi) ) dx (4) Because a matrix of kernel distances directly based on symmetric KL divergence does not satisfy the Mercer conditions, i.e., it is not a positive definite matrix, we need a further step to generate a valid kernel. Among many posibilities we simply exponentiate the symmetric KL divergence, scale, and shift (A and B factors below) it for numerical stability reasons K(Xi, Xj) =⇒K(p(x|θi), p(x|θj)) =⇒e−A D(p(x|θi),p(x|θj))+B (5) In the case of Gaussian mixture models the computation of the KL divergence is not direct. In fact there is no analytical solution to Eq. (4) and we have to resort to Monte Carlo methods or numerical approximations. In the case of single full covariance models the KL divergence has an analytical solution D(p(x|θi), p(x|θj)) = tr(Σi Σ−1 j ) + tr(Σj Σ−1 i )− 2 S + tr((Σ−1 i + Σ−1 j ) (µi −µj)(µi −µj)T ) (6) where S is the dimensionality of the original feature data x. This distance is similar to the Arithmetic harmonic sphericity (AHS) distance quite popular in the speaker identification and verification research community [8]. Notice that there are significant differences between our KL divergence based kernel and the Fisher kernel method. In our approach there is no underlying generative model to represent all the data. We do not use a single PDF (even if it encodes a latent variable indicative of class membership) as a way to map the multimedia object from the original feature vector space to a gradient log-likelihood vector space. Instead each individual object (consisting of a sequence of feature vectors) is modeled by its unique PDF. This represents a more localized version of the Fisher kernel underlying generative model. Effectively the modeling power is spent where it matters most, on each of the individual objects in the training and testing sets. Interestingly, the object PDF does not have to be extremely complex. As we will show in our experimental section a single full covariance Gaussian model produces extremely good results. Also, in our approach there is not a true intermediate space unlike the gradient log-likelihood space used in the Fisher kernel. Our multimedia objects are transformed directly into PDF’s. 4 Audio and Image Databases We chose the 50 most frequent speakers from the HUB4-96 [9] News Broadcasting corpus and 50 speakers from the Narrowband version of the KING corpus [10] to train and test our new kernels on speaker identification and verification tasks. The HUB training set contains about 25 utterances (each 3-7 seconds long) from each speaker, resulting in 1198 utterances (or about 2 hours of speech). The HUB test set contains the rest of the utterances from these 50 speakers resulting in 15325 utterances (or about 21 hours of speech). The KING corpus is commonly used for speaker identification and verification in the speech community [11]. Its training set contains 4 utterances (each about 30 seconds long) from each speaker and the test set contains the remaining 6 from these 50 speakers. A total of 200 training utterances (about 1.67 hours of speech) and 300 test utterances (about 2.5 hours of speech) were used. Following standard practice in speech processing each utterance was transformed into a sequence of 13 dimensional Mel-Frequency Cepstral vectors. The vectors were augmented with their first and second order time derivatives resulting in a 39 dimensional feature vector. We also mean-normalized the KING utterances in order to compensate for the distortion introduced by different telephone channels. We did not do so for the HUB experiments since mean normalizing the audio would remove important speaker characteristics. We chose the Corel database [12] to train and test all algorithms on image classification. COREL contains a variety of objects, such as landscape, vehicles, plants, and animals. To make the task more challenging we picked 8 classes of highly confusable objects: Apes, ArabianHorses, Butterflies, Dogs, Owls, PolarBears, Reptiles, and RhinosHippos. There were 100 images per class – 66 for training and 34 for testing; thus, a total of 528 training images and 272 testing images were used. All images are 353x225 pixel 24-bit RGB-color JPEGs. To extract feature vectors we followed standard practice in image processing. For each of the 3 color channels the image was scanned by an 8x8 window shifted every 4 pixels. The 192 pixels under each window were converted into a 192-dimensional Discrete Cosine Transform (DCT) feature vector. After this only the 64 low frequency elements were used since they captured most of the image characteristics. 5 Experiments and Results Our experiments trained and tested five different types of classifiers: Baseline GMM, Baseline AHS1, SVM using Fisher kernel, and SVM using our new KL divergence based kernels. When training and testing our new GMM/KL Divergence based kernels, a sequence of feature vectors, {x1, x2, . . . , xm} from each utterance or image X was modeled by a single GMM of diagonal covariances. Then the KL divergences between each of these GMM’s were computed according to Eq. (4) and transformed according to Eq. (5). This resulted in kernel matrices for training and testing that could be feed directly into a SVM classifier. Since all our SVM experiments are multiclass experiments we used the 1-vs-all training approach. The class with the largest positive score was designated as the winner class. For the experiments in which the object PDF was a single full covariance Gaussian we followed a similar procedure. The KL divergences between each pair of PDF’s were computed according to Eq. (6) and transformed according Eq. (5). The dimensions of the resulting training and testing kernel matrices are shown in Table 1. Table 1: Dimensions of the training and testing kernel matrices of both new probablisitic kernels on HUB, KING, and COREL databases. HUB HUB KING KING COREL COREL Training Testing Training Testing Training Testing 1198x1198 15325x1198 200x200 300x200 528x528 272x528 In the Fisher kernel experiments we computed the Fisher score vector UX for each training and testing utterance and image with θ parameter based on the prior probabilities of each mixture Gaussian. The underlying generative model was the same one used for the GMM classification experiments. The task of speaker verification is different from speaker identification. We make a binary decision of whether or not an unknown utterance is spoken by the person of the claimed identity. Because we have trained SVM’s using the one-vs-all approach their output can be directly used in speaker verification. To verify whether the utterance belongs to class A we just use the A-vs-all SVM output. On the other hand, the scores of the GMM and AHS classifiers cannot be used directly for verification experiments. We need to somehow combine the scores from the non claimed identities, i.e., if we want to verify whether an utterance belongs to speaker A we need to compute a model for non-A speakers. This nonclass model can be computed by first pooling the 49 non-class GMM’s together to form a super GMM with 256x49 mixtures, (each speaker GMM has 256 mixtures). Then the score produced by this super GMM is subtracted from the score produced by the claimed speaker GMM. In the case of AHS classifiers we estimate the non-class score as the arithmetic mean of the other 49 speaker scores. To compute the miss and false positive rates we compare the 1Arithmetic harmonic sphericity classifiers pull together all vectors belonging to a class and fit a single full covariance Gaussian model to the data. Similarly, a single full covariance model is fitted to each testing utterance. The similarity between the testing utterances and the class models is measured according to Eq. (6). The class with the minimum distance is chosen as the winning class. decision scores to a threshold Θ. By varying Θ we can compute Detection Error Tradeoff (DET) curves as the ones shown in Fig. 1. We compare the performance of all the 5 classifiers in speaker verification and speaker identification tasks. Table 2 shows equal-error rates (EER’s) for speaker verification and accuracies of speaker identification for both speech corpora. Table 2: Comparison of all the classifiers used on the HUB and KING corpora. Both classification accuracy (Acc) and equal error rates (EER) are reported in percentage points. Type of HUB HUB KING KING Classifier Acc EER Acc EER GMM 87.4 8.1 68.0 16.1 AHS 81.7 9.1 48.3 26.8 SVM Fisher 62.4 14.0 48.0 12.3 SVM GMM/KL 83.8 7.8 72.7 7.9 SVM COV/KL 84.7 7.4 79.7 6.6 We also compared the performance of 4 classifiers in the image classification task. Since the AHS classifier is not a effective image classifier we excluded it here. Table 3 shows the classification accuracies. Table 3: Comparison of the 4 classifiers used on the COREL animal subset. Classification accuracies are reported in percentage points. Type of Accuracy Classifier GMM 82.0 SVM Fisher 73.5 SVM GMM/KL 85.3 SVM COV/KL 80.9 Our results using the KL divergence based kernels in both multimedia data types are quite promising. In the case of the HUB experiments all classifiers perform similarly in both speaker verification and identification tasks with the exception of the SVM Fisher which performs significantly worse. However, For the KING database, we can see that our KL based SVM kernels outperform all other classifiers in both identification and verification tasks. Interestingly the Fisher kernel performs quite poorly too. Looking at the DET plots for both corpora we can see that on the HUB experiments the new SVM kernels perform quite well and on the KING corpora they perform much better than any other verification system. In image classification experiments with the COREL database both KL based SVM kernels outperform the Fisher SVM; the GMM/KL kernel even outperforms the baseline GMM classifier. 6 Conclusion and Future Work In this paper we have proposed a new method of combining generative models and discriminative classifiers (SVM’s). Our approach is extremely simple. For every multimedia object represented by a sequence of vectors, a PDF is learned using maximum likelihood approaches. We have experimented with PDF’s that are commonly used in the multimedia 0 0.05 0.1 0.15 0.2 0.25 0.3 0.35 0.4 0 0.05 0.1 0.15 0.2 0.25 0.3 0.35 0.4 HUB DETs P(false positive) P(miss) GMM NG=256 AHS SVM Fisher SVM GMM/KL SVM COV/KL 0 0.05 0.1 0.15 0.2 0.25 0.3 0.35 0.4 0 0.05 0.1 0.15 0.2 0.25 0.3 0.35 0.4 KING DETs P(false positive) P(miss) Figure 1: Speaker verification detection error tradeoff (DET) curves for the HUB and the KING corpora, tested on all 50 speakers. community. However, the method is generic enough and could be used with any PDF. In the case of GMM’s we use the EM algorithm to learn the model parameters θ. In the case of a single full covariance Gaussian we directly estimate its parameters. We then introduce the idea of computing kernel distances via a direct comparison of PDF’s. In effect we replace the standard kernel distance on the original data K(Xi, Xj) by a new kernel derived from the symmetric Kullback-Leibler (KL) divergence K(Xi, Xj) −→K(p(x|θi), p(x|θj)). After that a kernel matrix is computed and a traditional SVM can be used. In our experiments we have validated this new approach in speaker identification, verification, and image classification tasks by comparing its performance to Fisher kernel SVM’s and other well-known classification algorithms: GMM and AHS methods. Our results show that our new method of combining generative models and SVM’s always outperform the SVM Fisher kernel and the AHS methods, and it often outperforms other classification methods such as GMM’s and AHS. The equal error rates are consistently better with the new kernel SVM methods too. In the case of image classification our GMM/KL divergence-based kernel has the best performance among the four classifiers while our single full covariance Gaussian distance based kernel outperforms most other classifiers and only do slightly worse than the baseline GMM. All these encouraging results show that SVM’s can be improved by paying careful attention to the nature of the data being modeled. In both audio and image tasks we just take advantage of previous years of research in generative methods. The good results obtained using a full covariance single Gaussian KL kernel also make our algorithm a very attractive alternative as opposed to the more complex methods of tuning system parameters and combining generative classifiers and discriminative methods such as the Fisher SVM. This full covariance single Gaussian KL kernel’s performance is consistently good across all databases. It is especially simple and fast to compute and requires no tuning of system parameters. We feel that this approach of combining generative classifiers via KL divergences of derived PDF’s is quite generic and can possibly be applied to other domains. We plan to explore its use in other multimedia related tasks. References [1] Vapnik, V., Statistical learning theory, John Wiley and Sons, New York, 1998. [2] Wan, V. and Campbell, W., “Support vector machines for speaker verification and identification,” IEEE Proceeding, 2000. [3] Chapelle, O. and Haffner, P. and Vapnik V., “Support vector machines for histogram-based image classification,” IEEE Transactions on Neural Networks, vol. 10, no. 5, pp. 1055–1064, September 1999. [4] Jaakkola, T., Diekhans, M. and Haussler, D., “Using the fisher kernel method to detect remote protein homologies,” in Proceedings of the Internation Conference on Intelligent Systems for Molecular Biology, Aug. 1999. [5] Moreno, P. J. and Rifkin, R., “Using the fisher kernel method for web audio classification,” ICASSP, 2000. [6] Smith N., Gales M., and Niranjan M., “Data dependent kernels in SVM classification of speech patterns,” Tech. Rep. CUED/F-INFENG/TR.387,Cambridge University Engineering Department, 2001. [7] Vasconcelos, N. and Lippman, A., “A unifying view of image similarity,” IEEE International Conference on Pattern Recognition, 2000. [8] Bimbot, F., Magrin-Chagnolleau, I. and Mathan, L., “Second-order statistical measures for text-independent speaker identification,” Speech Communication, vol. 17, pp. 177–192, 1995. [9] Stern, R. M., “Specification of the 1996 HUB4 Broadcast News Evaluation,” in DARPA Speech Recognition Workshop, 1997. [10] “The KING Speech Database,” http://www.ldc.upenn.edu/Catalog/docs/LDC95S22/ kingdb.txt. [11] Chen K., “Towards better making a decision in speaker verification,” Pattern Recognition, , no. 36, pp. 329–246, 2003. [12] “Corel stock photos,” http://elib.cs.berleley.edu/photos/blobworld/cdlist.html.
2003
10
2,310
Approximate Policy Iteration with a Policy Language Bias Alan Fern and SungWook Yoon and Robert Givan Electrical and Computer Engineering, Purdue University, W. Lafayette, IN 47907 Abstract We explore approximate policy iteration, replacing the usual costfunction learning step with a learning step in policy space. We give policy-language biases that enable solution of very large relational Markov decision processes (MDPs) that no previous technique can solve. In particular, we induce high-quality domain-specific planners for classical planning domains (both deterministic and stochastic variants) by solving such domains as extremely large MDPs. 1 Introduction Dynamic-programming approaches to finding optimal control policies in Markov decision processes (MDPs) [4, 14] using explicit (flat) state space representations break down when the state space becomes extremely large. More recent work extends these algorithms to use propositional [6, 11, 7, 12] as well as relational [8] state-space representations. These extensions have not yet shown the capacity to solve large classical planning problems such as the benchmark problems used in planning competitions [2]. These methods typically calculate a sequence of cost functions. For familiar STRIPS planning domains (among others), useful cost functions can be difficult or impossible to represent compactly. The above techniques guarantee a certain accuracy at each stage. Here, we focus on inductive techniques that make no such guarantees. Existing inductive forms of approximate policy iteration (API) select compactly represented, approximate cost functions at each iteration of dynamic programming [5], again suffering when such representation is difficult. We know of no previous work that applies any form of API to benchmark problems from classical planning.1 Perhaps one reason is the complexity of typical cost functions for these problems, for which it is often more natural to specify a policy space. Recent work on inductive policy selection in relational planning domains [17, 19, 28], has shown that useful policies can be learned using a policy-space bias, described by a generic knowledge representation language. Here, we incorporate that work into a practical approach to API for STRIPS planning domains. We replace the use of cost-function approximations as policy representations in API2 with direct, compact state-action mappings, and use a standard relational learner to learn these mappings. We inherit from familiar API methods a (sampled) policy-evaluation phase using simulation of the current policy, or rollout [25], and an inductive policy-selection phase inducing an approximate next policy from sampled current policy values. 1Recent work in relational reinforcement learning has been applied to STRIPS problems with much simpler goals than typical benchmark planning domains, and is discussed below in Section 5. 2In concurrent work, [18] pursued a similar approach to API in attribute-value domains. We evaluate our API approach in several STRIPS planning domains, showing iterative policy improvement. Our technique solves entire planning domains, finding a policy that can be applied to any problem in the domain, rather than solving just a single problem instance from the domain. We view each planning domain as a single large MDP where each “state” specifies both the current world and the goal. The API method thus learns control knowledge (a “policy”) for the given planning domain. Our API technique naturally leverages heuristic functions (cost function estimates), if available—this allows us to benefit from recent advances in domain-independent heuristics for classical planning, as discussed below. Even when greedy heuristic search solves essentially none of the domain instances, our API technique successfully bootstraps from the heuristic guidance. We also demonstrate that our technique is able to iteratively improve policies that correspond to previously published hand-coded control knowledge (for TL-plan [3]) and policies learned by Yoon et al. [28]. Our technique gives a new way of using heuristics in planning domains, complementing traditional heuristic search strategies. 2 Approximate Policy Iteration We first review API for a general, action-simulator–based MDP representation, and later, in Section 3, detail a particular representation of planning domains as relational MDPs and the corresponding policy-space learning bias. Problem Setup. We follow and adapt [16] and [5]. We represent an MDP using a generative model ⟨S, A, T, C, I⟩, where S is a finite set of states, A is a finite set of actions, and T is a randomized “action-simulation” algorithm that, given state s and action a, returns a next state t. The component C is an action-cost function that maps S × A to real-numbers, and I is a randomized “initial-state algorithm” with no inputs that returns a state in S. We sometimes treat I and T(s, a) as random variables. For MDP M = ⟨S, A, T, C, I⟩, a policy π is a (possibly stochastic) mapping from S to A. The cost function Jπ M(s) and the Q-cost function Qπ M(s, a) are the unique solutions to Qπ M(s, a) = C(s, a) + αE[Jπ M(T(s, a))], where Jπ M(s) = E[Qπ M(s,π (s))], representing the expected, cumulative, discounted cost of following policy π in M starting from state s, and where 0 ≤α < 1 is the discount factor. In this work, we seek to heuristically minimize E[Jπ M(I)], due to the complexity of the problems we consider. Given a current policy π, we can define a new improved policy PI[π](s) by argmina∈AQπ M(s, a). The cost function of PI[π] is guaranteed to be no worse than that of π at each state and to improve at some state for non-optimal π. Exact policy iteration iterates policy improvement (PI) from any initial policy to reach an optimal fixed point. Policy improvement is divided into two steps: computing Jπ M (policy evaluation) and then computing Qπ M and selecting the minimizing action (policy selection). Approximate Policy Iteration. API, as described in [5], heuristically approximates policy iteration in large state spaces by using an approximate policy-improvement operator trained with Monte-Carlo simulation. The approximate operator performs policy evaluation by simulation—evaluating a policy π at a state s by drawing some number of sample trajectories of π starting at s—and performs policy selection by constructing a training set of samples of either the J or Q cost functions from a “small” but “representative” set of states and then using this training set to induce a new “approximately improved” policy. The use of API assumes that states and perhaps actions are represented in factored form (typically, a feature vector) that facilitates generalizing properties of the training data to the entire state and action spaces. Due to API’s inductive nature, there are typically no guarantees for policy improvement—nevertheless, API often “converges” usefully, e.g. [24, 26]. We start API by providing it with an initial policy π0 and a real-valued heuristic function H, where H(s) is interpreted as an estimate of the cost of state s (presumably with respect to the optimal policy). We note that H or π0 may be trivial, i.e. always returning a constant or random action respectively. For API to be effective, however, it is important that π0 and H combine to provide guidance toward improvement. For example, in goal-based planning domains either π0 should occasionally reach a goal or H should provide non-trivial goaldistance information. In our experiments we consider scenarios that use different types of initial policies and heuristics to bootstrap API. Given π0, H, and an MDP M = ⟨S, {a1, . . . , am}, T, C, I⟩, API produces a policy sequence by iterating steps of approximate policy improvement—note that π0 is used in only the initial iteration but the heuristic is always used. Approximate policy improvement computes an (approximate) improvement π′ of a policy π by attempting to approximate the output of exact policy improvement, i.e. π′(s) = argmina∈AQπ M(s, a). There are two steps: estimating Q-costs for all actions at a representative set of states, and using resulting data set to learn an approximation of π′. Figure 1 gives pseudo-code for our variant of API. Step 1: Q-Cost Estimation via Rollout. (see [25]) Given π, we construct a training set D, describing an improved policy π′, consisting of tuples ⟨s,π (s), ˆQ(s, a1), . . . , ˆQ(s, am)⟩. For each sampled state s and action a, the term ˆQ(s, a) refers to Qπ M(s, a) as estimated by drawing “sampling width” trajectories of length “horizon” from s and computing the average discounted trajectory cost over the sampled trajectories, where the cost of a trajectory includes the value of the heuristic function at the horizon state. To get a “representative set” of states, we include each state s visited by π′ (as indicated by the ˆQ estimates) within “horizon” steps from one of “training set size” states drawn from the initial distribution.3 Step 2: Learn Policy. Select π′ with the goal of minimizing the cumulative ˆQ-cost for π′ over D (approximating the same minimization over S in exact policy iteration). Traditional API uses a cost-function space learning bias in this selection—in Section 3 we detail the policy-space learning bias used by our technique. By labeling each training state with the associated Q-costs for each action, rather than simply with the best action, we enable the learner to make more informed trade-offs. We note that the inclusion of π(s) in each training example enables the learner to normalize the data, if desired—e.g. our learner (see Section 3) uses a bias that focuses on states where large improvement appears possible. 3 API for Relational Planning In order to use our API framework, we represent classical planning domains (not just single instances) as relationally factored MDPs. We then describe our compact relational policy language and the associated learner for use in step 2 of our API framework. Planning Domains as MDPs. We say that an MDP ⟨S, A, T, C, I⟩is relational when S and A are defined by giving the finite sets of objects O, predicates P, and action types Y . A fact is a predicate applied to the appropriate number of objects. A state in S is a set of facts (taken to be “true” in the state), and S is all such states. An action is an action type applied to the appropriate number of objects, and the action space A is the set of all actions. A classical planning domain is specified by providing a set of world predicates, action types, and an action simulator. We simultaneously solve all problem instances of such a planning domain4 by constructing a relational MDP as described below. Let O be a fixed set of objects and Y be the set of action types from the planning domain. Together, O and Y define the MDP action space. Each MDP state is a single problem 3It is important that states are sampled from π′ rather than π to match the training distribution to the implied “test set” distribution. 4As an example, the blocks world is a classical planning domain, where a problem instance is an initial block configuration and a set of goal conditions. Classical planners attempt to find solutions to specific problem instances of a domain. API (n, w, h, H,π 0) // training set size n, sampling width w, // horizon h, initial policy π0, // cost estimator (heuristic function) H. π ←π0; loop D ←Draw-Training-Set(n, w, h, H,π ); π ←Learn-Decision-List(D); until satisfied with π; //e.g. until change is small Return π; Draw-Training-Set(n, w, h, H,π ) // training set size n, sampling width w, // horizon h, cost estimator H, current policy π D ←∅; E ←set of n states sampled from I; for each state s0 ∈E // Draw trajectory of // sample states from s0 s ←s0; for i = 1 to h Qπ(s) ←Policy-Rollout(π, s, w, h, H); a ←action maximizing Qπ(s, a); D ←⟨s,π (s), Qπ(s)⟩∪D; s ←state sampled from T(s, a); Return D; Policy-Rollout (π, s, w, h, H) // Computes estimate of Qπ(s) // policy π, state s, sampling width w, horizon h, cost estimator H Initialize Qπ(s), a vector indexed by the actions in A, to zeroes; for1 each action a in A for2 sample = 1 to w s′ ←s; for3 step = 1 to h Qπ(s, a) ←Qπ(s, a) + C(s′, π(s′)); s′ ←a state sampled from T(s′, π(s′)) // end for3 Qπ(s, a) ←Qπ(s, a) + H(s′); // end for2 Qπ(s, a) ←Qπ(s,a) w // end for1 Return Qπ(s) Figure 1: Pseudo-code for our API algorithm. The MDP ⟨S, A, T, C, I⟩is assumed globally known. The general approach is inherited from [5], and is restated here for clarity. Key differences are the use of Learn-Decision-List [28], as discussed in Section 3, and the choice of action a in Draw-Training-Set (see Footnote 3). instance (i.e. an initial state and a goal) from the planning domain by specifying both the current world and the goal. We achieve this by letting P be the set of world predicates from the classical domain together with a new set of goal predicates, one for each world predicate. Goal predicates are named by prepending a ‘g’ to the corresponding world predicate. Thus, the MDP states are sets of world and goal facts involving some or all objects in O. The objective is to reach MDP states where the goal facts are a subset of the world facts (goal states). The state {on-table(a), on(a, b), clear(b), gclear(b)} is thus a goal state in a blocks-world MDP, but would not be a goal state without clear(b). We represent this objective by defining C to assign zero cost to actions taken in goal states and a positive cost to actions in all other states. In addition, we take T to be the action simulator from the planning domain (e.g. as defined by STRIPS rules), modified to treat goal states as terminal and to preserve without change all goal predicates. With this cost function, a low-cost policy must arrive at goal states as “quickly” as possible. Finally, the initial state distribution I can be any program that generates legal problem instances (MDP states) of the planning domain—e.g. one might use a problem generator from a planning competition. While here we assume and accurate T model is known, a more general reinforcementlearning context would require learning an approximate T, trading off exploitation of this model with exploration to improve it. Taxonomic Decision List Policies. We adapt the API method of Section 2 by using, for Step 2, the policy-space language bias and learning method of our previous work on learning policies in relational domains from small problem solutions [28], briefly reviewed here. In relational domains, useful rules often take the form “apply action type a to any object in set C”, e.g. “unload any object that is at its destination”. In [19], decision lists of such rules were used as a language bias for learning policies. We use such lists, and represent the sets of objects needed using class expressions C written in taxonomic syntax [20], defined by C ::= C0 | anything | ¬C | (R C) | C ∩C, with R ::= R0 | R −1 | R ∩R | R∗. Here, C0 is any one argument relation and R0 any binary relation from the predicates in P. One argument relations denote the set of objects that they are true of, (R C) denotes the image of the objects in class C under the binary relation R, and for the (natural) semantics of the other constructs shown, please refer to [28]. Given a state s and a concept C expressed in taxonomic syntax, it is straightforward to compute, in time polynomial in the sizes of s and C, the set of domain objects that are represented by C in s. Restricting our attention to one-argument–action types5, we write a policy as ⟨C1:a1, C2:a2, . . . , Cn:an⟩, where the Ci are taxonomic-syntax concepts and the ai are action types. See Yoon et al. [28] for examples and details. Our learner builds a decision-list of size-bounded rules by starting with the empty list and greedily selecting a new rule to add, continuing until the list “covers” all of the training data. This procedure is described in Yoon et al. [28], where a heuristically guided beamsearch is used to greedily select the next rule to add. The only difference between the learner in [28] and the one used here is the heuristic function, which incorporates Q-cost information (unlike [28]). Given training example ⟨s,π (s), ˆQ(s, a1), . . . , ˆQ(s, am)⟩in D, we define the Q-advantage of taking action a instead of π(s) in state s by ∆(s, a) = ˆQ(s,π (s))−ˆQ(s, a). We take the heuristic value of a concept-action rule to be the number of training examples where the rule “fires” plus the cumulative Q-advantage that the rule achieves on those training examples.6 Using Q-advantage rather than Q-cost focuses the learner toward instances where large improvement over the previous policy is possible. 4 Relational Planning Experiments Our experiments support three claims. 1) Using only the guidance of an (often weak) domain-independent heuristic, API learns effective policies for entire classical planning domains. 2) Each learned policy is a domain-specific planner that is fast and empirically compares well to the state-of-the-art domain-independent planner FF [13]. 3) API can improve on previously published control knowledge and on that learned by previous systems. Domains. We consider two deterministic domains with standard definitions and three stochastic domains from Yoon et al. [28]—these are: BW(n), the n-block blocks world; LW(l,t,p), the l location, t truck, p package logistics world; SBW(n), a stochastic variant of BW(n); SLW(l,c,t,p), the stochastic logistics world with c cars and t trucks; and SPW(n), a version of SBW(n) with a paint action. We draw problem instances from each domain by generating pairs of random initial states and goal conditions. The goal conditions specify block configurations involving all blocks in blocks worlds, and destinations for all packages in logistics worlds.7 Throughout, we use the domain-independent FF heuristic [13].8 Each experiment specifies a planning domain and an initial policy and then iterates API9 until “no more progress” is made. We evaluate each policy on 1000 random problem instances, recording the success 5Multiple argument actions can be simulated at some cost with multiple single argument actions. 6If the coverage term is not included, then covering a zero Q-advantage example is the same as not covering it. But zero Q-advantage can be good (e.g. the previous policy is optimal in that state). 7PSTRIPS domain definitions are at http://www.ece.purdue.edu/∼givan/nips03-domains.html. 8Space precludes a description of this complex and well studied planning heuristic here. 9We use discount factor 1 and select large enough horizons to accurately rank most policies: 4×n for BW(n) and SBW(n), 6×n for SPW(n), 12×p for LW(l,t,p) and SLW(l,c,t,p). Training set size is 0 0.2 0.4 0.6 0.8 1 0 2 4 6 8 10 iteration BW(10) SR AL/H 0 0.2 0.4 0.6 0.8 1 0 5 10 15 20 25 30 35 iteration BW(15) SR AL/H 0 0.2 0.4 0.6 0.8 1 0 2 4 6 8 10 iteration LW(4,4,12) SR AL(S)/H (a) (b) (c) Figure 2: Bootstrapping API with a domain-independent heuristic. 0 0.2 0.4 0.6 0.8 1 0 1 2 3 4 5 6 7 8 9 iteration TL-BW-b in BW(10) SR AL/H 0.5 0.6 0.7 0.8 0.9 1 0 1 2 3 4 5 6 7 8 9 iteration TL-BW-a in BW(10) SR AL/H 0.5 0.6 0.7 0.8 0.9 1 0 2 4 6 8 10 iteration TL-LW in LW(4,6,4) SR AL(S)/H (a) (b) (c) Figure 3: Using TL-Plan control knowledge as initial policies. 0.2 0.4 0.6 0.8 1 0 2 4 6 8 10 iteration SPW(10) Policy1 SR Policy2 SR 0.8 0.85 0.9 0.95 1 0 2 4 6 8 10 iteration SLW(4,3,3,4)Policy1 SR Policy2 SR 0.5 0.6 0.7 0.8 0.9 1 0 2 4 6 8 10 iteration SBW(10) Policy1 SR Policy2 SR (a) (b) (c) Figure 4: Using previously learned initial policies. ratio SR (fraction of problems solved within the horizon) and normalized average solution length AL/H (average plan length in successful trials divided by horizon), omitting AL/H for very low SR. Initial-policy performance is plotted at iteration zero. Bootstrapping from the Heuristic. We consider the domain-independent initial policy10 FF-Greedy, which acts using the FF heuristic with one-step look-ahead. Figures 2a and b show SR and AL/H after each API iteration for BW(10) and BW(15). FF-Greedy is poor in both domains. There is an initial period of no (apparent) progress, followed by rapid improvement to nearly perfect SR. Examination of the learned BW(15) policies shows that early iterations find important concepts and later iterations find a policy that achieves a small SR; at that point, rapid improvement ensues. Figure 2c shows the SR and AL/H for LW(4,4,12). FF-Greedy performs very well here; nevertheless, API yields compact declarative policies of the same quality as FF-Greedy. We replicated these experiments in the stochastic variants of these domains, with similar results (not shown for space reasons). Initial Hand-Coded Policies. TL-Plan [3] uses human-coded domain-specific control knowledge to solve classical planning problems. Here we use initial policies for API that correspond to the domain-specific control knowledge appearing in [3].11 For the blocks 100 trajectories, and sampling width is always 1, which worked well even for stochastic domains. A sampling width of 1 corresponds to a preference to draw a small number of trajectories from each of a variety of problems rather than a larger number from each of relatively fewer training problems—in either case, the learner must be robust to the noise resulting from stochastic effects. 10What is considered “domain independent” here is the means of constructing the policy. 11We can not exactly capture the TL-Plan knowledge in our policy language. Instead, we write policies that capture the knowledge but prune away some “bad” actions that TL-Plan might consider. world TL-Plan provides three sets of control knowledge of increasing quality—we use the best and second best sets to get the policies TL-BW-a and TL-BW-b, respectively. For logistics there is only one set of knowledge given, yielding the policy TL-LW. Figures 3a–3c show the SR and AL/H for API when starting with TL-BW-a and TL-BWb in BW(10) and TL-LW in LW(4,4,12). In each case, API improves the human-coded policies. Starting with TL-BW-a and TL-LW, which have perfect SR, API uncovers policies that maintain SR but improve AL/H by approximately 6.3% and 13%, respectively. Starting with TL-BW-b, which has SR of only 30%, API quickly uncovers policies with perfect SR. There is a dramatic difference in the quality of FF-Greedy (iteration 0 of Figure 2a), TLBW-a, and TL-BW-b in BW(10); yet, for each initial policy, API finds policies of roughly identical quality—requiring more iterations for lower quality initial policies. Initial Machine-Learned Policies. In Yoon et al. [28], policies were learned from solutions to randomly drawn small problems for the three stochastic domains we test here, among others. A significant range of policy qualities results, due to the random draw. Here, we use API starting with some below-average policies from that work.12 Figures 4a-c show results for SPW(10), SLW(4,3,3,4), and SBW(10). For each domain, API is shown to improve the SR for two arbitrarily selected, below-average, learned starting policies to nearly 1.0. API successfully exploits the previous, noisy learning to robustly obtain a good policy. Table 1: FF vs. learned policies. FF (in C) API (Scheme) Domains SR AL Time SR AL Time BW(10) 1 33 0.1s 0.99 25 1.5s BW(15) 0.96 58 2.7s 0.99 39 2.5s BW(20) 0.75 62 27.7s 0.98 55 3.7s BW(30) 0.14103166.0s 0.99 86 2.8s LW(4,4,12) 1 42 0.0s 1 43 2.7s LW(5,14,20) 1 73 0.4s 1 74 3.6s Comparing learned policies to FF. A learned policy corresponds to a domainspecific planner for the target planning domain. Here we show that these policies are competitive with FF, a state-of-the-art AI planer, with respect to planning time and success ratio. We selected a blocks-world policy and logistics-world policy corresponding to the learned policies (beyond iteration 0) in Figures 2a and c with the best SR, breaking ties with AL. We applied FF and the appropriate selected policy to each of 1000 new test problems from each of the domains shown in Table 1. Planning cutoff times were set at 600, 300, and 100 seconds for BW(30), BW(20), and all other domains, respectively. Table 1 records the percent of problems solved within the time cutoff (SR), the average length of successful trials (AL), and the average time for successful trials (Time) for both FF and our two selected policies. In blocks worlds with more than 10 blocks, the API policy improves on FF in every category, with scaling much better to 20 and 30 blocks. Using the same heuristic information (in a different way), API uncovers policies that significantly outperform FF. FF’s heuristic is well suited to logistics worlds, eliminating search for these problems. Our method performs equivalently, but for the slow prototype Scheme implementation. 5 Related Work Typically, previous “learning for planning” systems [22] learn from small-problem solutions to improve the efficiency and/or quality of planning. Two primary approaches are to learn control knowledge for search-based planners, e.g. [23, 27, 10, 15, 1], and, more closely related, to learn stand-alone control policies [17, 19, 28]. The former work is severely limited by the utility problem (see [21]), i.e., being “swamped” by low utility rules. Critically, our policy-language bias confronts this issue by preferring simpler policies. Regarding the latter, our work is novel in using API to iteratively improve 12For these stochastic domains we provide the heuristic (designed for deterministic domains) with a deterministic STRIPS domain approximation (using the mostly likely outcome of each action). policies, and leads to a more robust learner, as shown above. In addition, we leverage a domain-independent planning heuristic to avoid the need for access to small problems. Our learning approach is also not tied to having a base planner. The most closely related work is relational reinforcement learning (RRL) [9], a form of online API that learns relational cost-function approximations. Q-cost functions are learned in the form of relational decision trees (Q-trees) and are used to learn corresponding policies (P-trees). The RRL results clearly demonstrate the difficulty of learning cost-function approximations in relational domains. Compared to P-trees, Q-trees tend to generalize poorly and be much larger. RRL has not yet demonstrated scalability to problems as complex as those considered here—previous RRL blocks-world experiments include relatively simple goals13, which lead to cost functions that are much less complex than the ones here. However, unlike RRL, our API assumes an unconstrained simulator and (for the FF heuristic) a world model, which must be provided or learned by additional techniques. References [1] Ricardo Aler, Daniel Borrajo, and Pedro Isasi. Using genetic programming to learn and improve control knowledge. AIJ, 141(1-2):29–56, 2002. [2] Fahiem Bacchus. The AIPS ’00 planning competition. AI Magazine, 22(3)(3):57–62, 2001. [3] Fahiem Bacchus and Froduald Kabanza. Using temporal logics to express search control knowledge for planning. AIJ, 16:123–191, 2000. [4] R. Bellman. Dynamic Programming. Princeton University Press, 1957. [5] D. P. Bertsekas and J. N. Tsitsiklis. Neuro-Dynamic Programming. Athena Scientific, 1996. [6] Craig Boutilier and Richard Dearden. Approximating value trees in structured dynamic programming. In Lorenza Saitta, editor, ICML, 1996. [7] Craig Boutilier, Richard Dearden, and Moises Goldszmidt. Stochastic dynamic programming with factored representations. AIJ, 121(1-2):49–107, 2000. [8] Craig Boutilier, Raymond Reiter, and Bob Price. Symbolic dynamic programming for firstorder MDPs. In IJCAI, 2001. [9] S. Dzeroski, L. DeRaedt & K. Driessens. Relational reinforcement learning. MLJ, 43:7–52, 2001. [10] Tara A. Estlin and Raymond J. Mooney. Multi-strategy learning of search control for partialorder planning. In AAAI, 1996. [11] Robert Givan, Thomas Dean, and Matt Greig. Equivalence notions and model minimization in Markov decision processes. AIJ, 147(1-2):163–223, 2003. [12] Carlos Guestrin, Daphne Koller, and Ronald Parr. Max-norm projections for factored MDPs. In IJCAI, pages 673–680, 2001. [13] Jorg Hoffmann and Bernhard Nebel. The FF planning system: Fast plan generation through heuristic search. JAIR, 14:263–302, 2001. [14] R. Howard. Dynamic Programming and Markov Decision Processes. MIT Press, 1960. [15] Yi-Cheng Huang, Bart Selman, and Henry Kautz. Learning declarative control rules for constraint-based planning. In ICML, pages 415–422, 2000. [16] Michael J. Kearns, Yishay Mansour, and Andrew Y. Ng. A sparse sampling algorithm for nearoptimal planning in large markov decision processes. MLJ, 49(2–3):193–208, 2002. [17] Roni Khardon. Learning action strategies for planning domains. AIJ, 113(1-2):125–148, 1999. [18] M. Lagoudakis and R. Parr. Reinforcement learning as classification: Leveraging modern classifiers. In ICML, 2003. [19] Mario Martin and Hector Geffner. Learning generalized policies in planning domains using concept languages. In KRR, 2000. [20] D. McAllester & R. Givan. Taxonomic syntax for 1st-order inference. JACM, 40:246–83, 1993. [21] S. Minton. Quantitative results on the utility of explanation-based learning. In AAAI, 1988. [22] S. Minton, editor. Machine Learning Methods for Planning. Morgan Kaufmann, 1993. [23] S. Minton, J. Carbonell, C. A. Knoblock, D. R. Kuokka, O. Etzioni, and Y. Gil. Explanationbased learning: A problem solving perspective. AIJ, 40:63–118, 1989. [24] G. Tesauro. Practical issues in temporal difference learning. MLJ, 8:257–277, 1992. [25] G. Tesauro & G. Galperin. Online policy improvement via monte-carlo search. In NIPS, 1996. [26] J. Tsitsiklis and B. Van Roy. Feature-based methods for large scale DP. MLJ, 22:59–94, 1996. [27] M. Veloso, J. Carbonell, A. Perez, D. Borrajo, E. Fink, and J. Blythe. Integrating planning and learning: The PRODIGY architecture. Journal of Experimental and Theoretical AI, 7(1), 1995. [28] S. Yoon, A. Fern, and R. Givan. Inductive policy selection for first-order MDPs. In UAI, 2002. 13The most complex blocks-world goal for RRL was to achieve on(A, B) in an n block environment. We consider blocks-world goals that involve all n blocks.
2003
100
2,311
Information Bottleneck for Gaussian Variables Gal Chechik∗ Amir Globerson∗ Naftali Tishby Yair Weiss {ggal,gamir,tishby,yweiss}@cs.huji.ac.il School of Computer Science and Engineering and The Interdisciplinary Center for Neural Computation The Hebrew University of Jerusalem, 91904, Israel ∗Both authors contributed equally Abstract The problem of extracting the relevant aspects of data was addressed through the information bottleneck (IB) method, by (soft) clustering one variable while preserving information about another - relevance - variable. An interesting question addressed in the current work is the extension of these ideas to obtain continuous representations that preserve relevant information, rather than discrete clusters. We give a formal definition of the general continuous IB problem and obtain an analytic solution for the optimal representation for the important case of multivariate Gaussian variables. The obtained optimal representation is a noisy linear projection to eigenvectors of the normalized correlation matrix Σx|yΣ−1 x , which is also the basis obtained in Canonical Correlation Analysis. However, in Gaussian IB, the compression tradeoffparameter uniquely determines the dimension, as well as the scale of each eigenvector. This introduces a novel interpretation where solutions of different ranks lie on a continuum parametrized by the compression level. Our analysis also provides an analytic expression for the optimal tradeoff- the information curve - in terms of the eigenvalue spectrum. 1 Introduction Extracting relevant aspects of complex data is a fundamental task in machine learning and statistics. The problem is often that the data contains many structures, which make it difficult to define which of them are relevant and which are not in an unsupervised manner. For example, speech signals may be characterized by their volume level, pitch, or content; pictures can be ranked by their luminosity level, color saturation or importance with regard to some task. This problem was principally addressed by the information bottleneck (IB) approach [1]. Given the joint distribution of a “source” variable X and another “relevance” variable Y , IB operates to compress X, while preserving information about Y . The variable Y thus implicitly defines what is relevant in X and what isn’t. Formally, this is cast as the following variational problem min p(t|x) L : L ≡I(X; T) −βI(T; Y ) (1) where T represents the compression of X via the conditional distributions p(t|x), while the information that T maintains on Y is captured by p(y|t). The positive parameter β determines the tradeoffbetween compression and preserved relevant information, as the Lagrange multiplier for the constrained optimization problem minp(t|x) I(X; T) −β (I(T; Y ) −const). The information bottleneck approach has been applied so far mainly to categorical variables, with a discrete T that represents (soft) clusters of X. It has been proved useful for a range of applications from documents clustering, to gene expression analysis (see [2] for review and references). However, its general information theoretic formulation is not restricted, both in terms of the variables X and Y , as well as in the compression variable T. It can be naturally extended to nominal and continuous variables, as well as dimension reduction techniques rather than clustering. This is the goal of the current paper. The general treatment of IB for continuous T yields the same set of self-consistent equations obtained already in [1]. But rather than solving them for the distributions p(t|x), p(t) and p(y|t) using the generalized Blahut-Arimoto algorithm as proposed there, one can turn them into two coupled eigenvector problems for the logarithmic functional derivatives δ log p(x|t) δt and δ log p(y|t) δt , respectively. Solving these equations, in general, turns out to be a rather difficult challenge. As in many other cases, however, the problem turns out to be analytically tractable when X and Y are joint multivariate Gaussian variables, as shown in this paper. The optimal compression in the Gaussian Information Bottleneck (GIB) is defined in terms of the compression-relevance tradeoff, determined through the parameter β. It turns out to be a noisy linear projection to a subspace whose dimension is determined by the tradeoffparameter β. The subspaces are spanned by the basis vectors obtained in the well known Canonical Correlation Analysis (CCA)[3] method, but the exact nature of the projection is determined in a unique way via the tradeoffparameter β. Specifically, as β increases, additional dimensions are added to the projection variable T, through a series of critical points (structural phase transitions), while at the same time the relative magnitude of each basis vector is rescaled. This process continues until all the relevant information about Y is captured in T. This demonstrates how the IB formalism provides a continuous measure of model complexity in information theoretic terms. The idea of maximization of relevant information was also taken in the Imax framework [4, 5]. In that setting, there are two feed forward networks with inputs Xa, Xb and output neurons Ya, Yb. The output neuron Ya serves to define relevance to the output of the neighboring network Yb. Formally, The goal is to tune the incoming weights of both output neurons, such that their mutual information I(Ya; Yb) is maximized. An important difference between Imax and the IB setting, is that in the Imax setting, I(Ya; Yb) is invariant to scaling and translation of the Y ’s since the compression achieved in the mapping Xa →Ya is not modeled explicitly. In contrast, the IB framework aims to characterize the dependence of the solution on the explicit compression term I(T; X), which is a scale sensitive measure when the transformation is noisy. This view of compressed representation T of the inputs X is useful when dealing with neural systems that are stochastic in nature and limited in their response amplitudes and are thus constrained to finite I(T; X). 2 Gaussian Information Bottleneck We now formalize the problem of Information Bottleneck for Gaussian variables. Let (X, Y ) be two jointly Gaussian variables of dimensions nx, ny and denote by Σx, Σy the covariance matrices of X, Y and by Σxy their cross-covariance matrix1. The goal of GIB is to compress the variable X via a stochastic transformation into another variable T ∈Rnx, while preserving information about Y . With Gaussian X and Y , the optimal T is also jointly Gaussian with X and Y . The intuition is that only second order correlations exist in the joint distribution p(X, Y ), so that distributions of T with higher order moments do not carry additional information. This can be rigorously shown using an application of the entropy power inequality as in [6], and will be published elsewhere. Note that we do not explicitly limit the dimension of T, since we will show that the effective dimension is determined by the value of β. Since every two random variables X, T with jointly Gaussian distribution can be presented as T = AX + ξ, where ξ ∼N(0, Σξ) is another Gaussian that is independent of X, we formalize the problem as the minimization min A,Σξ L ≡I(X; T) −βI(T; Y ) (2) over the noisy linear transformations parametrized by the transformation A and noise covariance Σξ. T is normally distributed T ∼N(0, Σt) with Σt = AΣxAT +Σξ. 3 The optimal projection A main result of this paper is the characterization of the optimal A,Σξ as a function of β Theorem 3.1 The optimal projection T = AX + ξ for a given tradeoffparameter β is given by Σξ = Ix and A =          £ 0T ; . . . ; 0T ¤ 0 ≤β ≤βc 1 £ α1vT 1 , 0T ; . . . ; 0T ¤ βc 1 ≤β ≤βc 2 £ α1vT 1 ; α2vT 2 ; 0T ; . . . , 0T ¤ βc 2 ≤β ≤βc 3 ...          (3) where {vT 1 , vT 2 , . . . , vT nx} are left eigenvectors of Σx|yΣ−1 x sorted by their corresponding ascending eigenvalues λ1, λ2, . . . , λnx, βc i = 1 1−λi are critical β values, αi are coefficients defined by αi ≡β(1−λi)−1 λiri , ri ≡vT i Σxvi, 0T is an nx dimensional row vector of zeros, and semicolons separate rows in the matrix A. This theorem asserts that the optimal projection consists of eigenvectors of Σx|yΣ−1 x , combined in an interesting manner: For β values that are smaller than the smallest critical point βc 1, compression is more important than any information preservation and the optimal solution is the degenerated one A ≡0. As β is increased, it goes through a series of critical points βc i , at each of which another eigenvector of Σx|yΣ−1 x is added to A. Even though the rank of A increases at each of these transition points, it changes smoothly as a function of β since at the critical point βc i the coefficient αi vanishes. Thus β parameterizes a “continuous rank” of the projection. To illustrate the form of the solution, we plot the landscape of the target function L together with the solution in a simple problem where X ∈R2 and Y ∈R. In this case A has a single non-zero row, thus A can be thought of as a row vector 1For simplicity we assume that Σx, Σy are full rank, otherwise X, Y can be reduced to the proper dimensionality. A. B. Figure 1. L as a function of all possible projections A, for A : R2 →R, obtained numerically from Eq. 4. Darkred: low L values; light-yellow: large L values. Σxy = [0.1 0.2], Σx = I2. A. For β = 15, the optimal solution is the degenerated solution A ≡0. B. For β = 100, the eigenvector of Σx|yΣ−1 x with a norm according to theorem 3.1 (superimposed) is optimal. −5 −2.5 0 2.5 5 −5 −2.5 0 2.5 5 A2 A1 −5 −2.5 0 2.5 5 −5 −2.5 0 2.5 5 A2 A1 of length 2, that projects X to a scalar A : X →R, T ∈R. Figure 1 shows the target function L as a function of the projection A. In this example, λ1 = 0.95, thus βc 1 = 20. Therefor, for β = 15 (figure 1A) the zero solution is optimal, but for β = 100 > βc (figure 1B) the corresponding eigenvector is a feasible solution, and the target function manifold contains two mirror minima. As β increases from 0 to ∞, these two minima, starting as a single unified minimum at zero, split at βc 1, and then diverge apart to ∞. We now turn to prove theorem 3.12. We start by rewriting L using the formula for the entropy of a d dimensional Gaussian variable h(X) = 1 2 log((2πe)d|Σx|), where | · | denotes a determinant. Using the Schur complement formula to calculate the covariance of the conditional variable T|Y we have Σt|y = Σt −ΣtyΣ−1 y Σyt = AΣx|yAT + Σξ, and the target function (up to a factor of 2) can be written as L(A, Σξ) = (1−β) log |AΣxAT + Σξ| −log |Σξ| + β log |AΣx|yAT + Σξ| . (4) Although L is a function of both the noise Σξ and the projection A, it can be easily shown that for every pair (A, Σξ), there is another projection ˜A = √ D−1V A where Σξ = V DV T and L( ˜A, I) = L(A, Σξ) 3. This allows us to simplify the calculations by replacing the noise covariance matrix Σξ with the identity matrix. To identify the minimum of L we now differentiate L w.r.t. to the projection A using the algebraic identity δ δA log |ACAT | = (ACAT )−12AC which holds for any symmetric matrix C. Equating this derivative to zero and rearranging, we obtain necessary conditions for an internal minimum of L (β −1)/β £ (AΣx|yAT + Id)(AΣxAT + Id)−1¤ A = A £ Σx|yΣ−1 x ¤ . (5) Equation 5 shows that the multiplication of Σx|yΣ−1 x by A must reside in the span of the rows of A. This means that A should be spanned by up to d eigenvectors of Σx|yΣ−1 x . We can therefore represent the projection A as a mixture A = WV where the rows of V are left normalized eigenvectors of Σx|yΣ−1 x and W is a mixing matrix that weights these eigenvectors. In the remainder of this section we characterize the nature of the mixing matrix W. Lemma 3.2 The optimal mixing matrix W is a diagonal matrix of the form W = diag   s β(1 −λ1) −1 λ1r1 vT 1 , . . . , s β(1 −λk) −1 λkrk vT k , 0T , . . . , 0T   (6) 2Further details of the proofs can be found in a technical report [7]. 3Although this theorem holds only for full rank Σξ, it does not limit the generality of the discussion since low rank matrices yield infinite values of L and are therefore suboptimal. where {vT 1 , . . . , vT k } and {λ1, . . . , λk} are k ≤nx eigenvectors and eigenvalues of Σx|yΣ−1 x with βc 1, . . . , βc k ≤β. Proof: We write V Σx|yΣ−1 x = DV where D is a diagonal matrix whose elements are the corresponding eigenvalues, and denote by R the diagonal matrix whose ith element is ri = vT i Σxvi. When k = nx, we substitute A = WV into equation 5, and use the fact that W is full rank to obtain W T W = [β(I −D) −I](DR)−1 . (7) While this does not uniquely characterize W, we note that if we substitute A into the target function in equation 4, and use properties of the eigenvalues, we have L = (1 −β) n X i=1 log ¡ ||wT i ||2ri + 1 ¢ + β n X i=1 log ¡ ||wT i ||2riλi + 1 ¢ (8) where ||wT i ||2 is the ith element of the diagonal of W T W. This shows that L depends only on the norm of the columns of W, and all matrices W that satisfy (7) yield the same target function. We can therefore choose to take W to be the diagonal matrix which is the square root of (7) W = p [β(I −D) −I)](DR)−1 (9) To prove the case of k < nx, consider a matrix W that is a k×k matrix padded with zeros, thus it mixes only the first k eigenvectors. In this case, calculation similar to that above gives the solution A which has nx −k zero rows. To complete the proof, it remains to be shown that the above solution capture all extrema points. This point is detailed in [7] due to space considerations. We have thus characterized the set of all minima of L, and turn to identify which of them achieve the global minima. Corollary 3.3 The global minimum of L is obtained with all λi satisfying β > βc i Proof: Substituting the optimal W of equation 9 into equation 8 yields L = Pk i=1(β −1) log λi + log(1 −λi) + f(β). Since 0 ≤λ ≤1 and β ≥ 1 1−λ, L is minimized by taking all the eigenvalues that satisfy β > 1 (1−λi). Taken together, these observations prove that for a given value of β, the optimal projection is obtained by taking all the eigenvectors whose eigenvalues λi satisfy β ≥ 1 1−λi , and setting their norm according to A = WV . This completes the proof of theorem 3.1. 4 The GIB Information Curve The information bottleneck is targeted at characterizing the tradeoffbetween information preservation (accuracy of relevant predictions) and compression. Interestingly, much of the structure of the problem is reflected in the information curve, namely the maximal value of relevant preserved information (accuracy), I(T; Y ), as a function of the complexity of the representation of X, measured by I(T; X). This curve is related to the rate-distortion function in lossy source coding, as well as to the achievability limit in channel coding with side-information [8]. It is shown to be concave in general [9], but its precise functional form depends on the joint 0 5 10 15 20 25 0 1 I(T;X) I(T;Y)/ Σi log(λi) β−1 = 1−λ1 Figure 2. GIB information curve obtained with four eigenvalues λi = 0.1,0.5,0.7,0.9. The information at the critical points are designated by circles. For comparison, information curves calculated with smaller number of eigenvectors are also depicted (all curves calculated for β < 1000). The slope of the curve at each point is the corresponding β−1. The tangent at zero, with slope β−1 = 1 −λ1, is super imposed on the information curve. distribution and can reveal properties of the hidden structure of the variables. Analytic forms for the information curve are known only for very special cases, such as Bernoulli variables and some intriguing self-similar distributions. The analytic characterization of the Gaussian IB problem allows us to obtain a closed form expression for the information curve in terms of the relevant eigenvalues. To this end, we substitute the optimal projection A(β) into I(T; X) and I(T; Y ) and isolate Iβ(T; Y ) as a function of Iβ(T; X) Iβ(T; Y ) = Iβ(T; X) −nI 2 log à nI Y i=1 (1−λi) 1 nI + e 2Iβ (T ;X) nI nI Y i=1 λi 1 nI ! (10) where the products are over the first nI eigenvalues, since these obey the critical β condition, with cnI ≤Iβ(T; X) ≤cnI+1 and cnI = 1 2 PnI−1 i=1 log λnI λi 1−λi 1−λnI . The GIB curve, illustrated in Figure 2, is continuous and smooth, but is built of several of segments, since as I(T; X) increases additional eigenvectors are used in the projection. The derivative of the curve is given by β−1, which can be easily shown to be continuous and decreasing, yielding that the GIB information curve is concave everywhere. At each value of I(T; X) the curve is therefore bounded by a tangent with a slope β−1(I(T; X)). Generally in IB, the data processing inequality yields an upper bound on the slope at the origin, β−1(0) < 1, in GIB we obtain a tighter bound: β−1(0) < 1−λ1. The asymptotic slope of the curve is always zero, as β →∞, reflecting the law of diminishing return: adding more bits to the description of X does not provide more accuracy about T. This interesting relation between the spectral properties of the covariance matrices raises interesting questions for special cases where more can be said about this spectrum, such as for patterns in neural-network learning problems. 5 Relation To Other Works 5.1 Canonical Correlation Analysis and Imax The GIB projection derived above uses weighted eigenvectors of the matrix Σx|yΣ−1 x = Ix −ΣxyΣ−1 y ΣyxΣ−1 x . The same eigenvectors are also used in Canonical correlations Analysis (CCA) [3], a statistical method that finds linear relations between two variables. CCA aims to find sets of basis vectors for the two variables that maximize the correlation coefficient between the projections of the variables on the basis vectors. The CCA bases are the eigenvectors of the matrices Σ−1 y ΣyxΣ−1 x Σxy and Σ−1 x ΣxyΣ−1 y Σyx, and the square roots of their corresponding eigenvalues are termed canonical correlation coefficients. CCA was also shown to be a special case of continuous Imax [4, 5]. Although GIB and CCA involve the spectral analysis of the same matrices, they have some inherent differences. First of all, GIB characterizes not only the eigenvectors but also their norm, in a way that that depends on the trade-offparameter β. Since CCA depends on the correlation coefficient between the compressed (projected) versions of X and Y , which is a normalized measure of correlation, it is invariant to a rescaling of the projection vectors. In contrast, for any value of β, GIB will choose one particular rescaling given by equation (4). While CCA is symmetric (in the sense that both X and Y are projected), IB is non symmetric and only the X variable is compressed. It is therefore interesting that both GIB and CCA use the same eigenvectors for the projection of X. 5.2 Multiterminal information theory The Information Bottleneck formalism was recently shown [9] to be closely related to the problem of source coding with side information [8]. In the latter, two discrete variables X, Y are encoded separately at rates Rx, Ry, and the aim is to use them to perfectly reconstruct Y . The bounds on the achievable rates in this case were found in [8] and can be obtained from the IB information curve. When considering continuous variables, lossless compression at finite rates is no longer possible. Thus, mutual information for continuous variables is no longer interpretable in terms of encoding bits, but rather serves as an optimal measure of information between variables. The IB formalism, although coinciding with coding theorems in the discrete case, is more general in the sense that it reflects the tradeoff between compression and information preservation, and is not concerned with exact reconstruction. Such reconstruction can be considered by introducing distortion measures as in [6] but is not relevant for the question of finding representations which capture the information between the variables. 6 Discussion We applied the information bottleneck method to continuous jointly Gaussian variables X and Y , with a continuous representation of the compressed variable T. We derived an analytic optimal solution as well as a general algorithm for this problem (GIB) which is based solely on the spectral properties of the covariance matrices in the problem. The solution for GIB, characterized in terms of the trade-offparameter β, between compression and preserved relevant information, consists of eigenvectors of the matrix Σx|yΣ−1 x , continuously adding up as weaker compression and more complex models are allowed. We provide an analytic characterization of the information curve, which relates the spectrum to relevant information in an intriguing manner. Besides its clean analytic structure, GIB offers a new way for analyzing empirical multivariate data when only its correlation matrices can be estimated. In thus extends and provides new information theoretic insight to the classical Canonical Correlation Analysis method. The IB optima are known to obey three self consistent equations, that can be used in an iterative algorithm guaranteed to converge to a local optimum [1]. In GIB, these iterations over the conditional distributions p(t|x), p(t) and p(y|t) can be transformed into iterations over the projection parameter A. In this case, the iterative IB algorithm turns into repeated projections on the matrix Σx|yΣ−1 x , as used in power methods for eigenvector calculation. The parameter β determines the scaling of the vectors, such that some of the eigenvectors decay to zero, while the others converge to their value defined in Theorem 3.1. When handling real world data, the relevance variable Y often contains multiple structures that are correlated to X, although many of them are actually irrelevant. The information bottleneck with side information (IBSI) [10] alleviates this problem using side information in the form of an irrelevance variable Y −about which information is removed. IBSI thus aims to minimize L = I(X; T) −β (I(T; Y +) −γI(T; Y −)). This functional can be analyzed in the case of Gaussian variables (GIBSI: Gaussian IB with side information), in a similar way to the analysis of GIB presented above. This results in a generalized eigenvalue problem involving the covariance matrices Σx|y+ and Σx|y−. The detailed solution of this problem as a function of the tradeoffparameters remains to be investigated. For categorical variables, the IB framework can be shown to be closely related to maximum-likelihood in a latent variable model [11]. It would be interesting to see whether the GIB-CCA equivalence can be extended and give a more general understanding of the relation between IB and statistical latent variable models. The extension of IB to continuous variables reveals a common principle behind regularized unsupervised learning methods ranging from clustering to CCA. It remains an interesting challenge to obtain practical algorithms in the IB framework for dimension reduction (continuous T) without the Gaussian assumption, for example by kernelizing [12] or adding non linearities to the projections (as in [13]). References [1] N. Tishby, F.C. Pereira, and W. Bialek. The information bottleneck method. In Proc. of 37th Allerton Conference on communication and computation, 1999. [2] N. Slonim. Information Bottlneck theory and applications. PhD thesis, Hebrew University of Jerusalem, 2003. [3] H. Hotelling. The most predictable criterion. Journal of Educational Psychology,, 26:139–142, 1935. [4] S. Becker and G.E. Hinton. A self-organizing neural network that discovers surfaces in random-dot stereograms. Nature, 355(6356):161–163, 1992. [5] S. Becker. Mutual information maximization: Models of cortical self-organization. Network: Computation in Neural Systems, pages 7–31, 1996. [6] T. Berger abd R. Zamir. A semi-continuous version of the berger-yeung problem. IEEE Transactions on Information Theory, pages 1520–1526, 1999. [7] G. Chechik and A. Globerson. Information bottleneck and linear projections of gaussian processes. Technical Report 4, Hebrew University, May 2003. [8] A.D. Wyner. On source coding with side information at the decoder. IEEE Trans. on Info Theory, IT-21:294–300, 1975. [9] R. Gilad-Bachrach, A. Navot, and N. Tishby. An information theoretic tradeoffbetween complexity and accuracy. In Proceedings of the COLT, Washington., 2003. [10] G. Chechik and N. Tishby. Extracting relevant structures with side information. In S. Becker, S. Thrun, and K. Obermayer, editors, Advances in Neural Information Processing Systems 15, 2002. [11] N. Slonim and Y. Weiss. Maximum likelihood and the information bottleneck. In S. Becker, S. Thrun, and K. Obermayer, editors, Advances in Neural Information Processing Systems 15, 2002. [12] S. Mika, G. Ratsch, J. Weston, B. Scholkopf, A. Smola, and K. Muller. Invariant feature extraction and classification in kernel spaces. In S.A. Solla, T.K. Leen, and K.R. Muller, editors, Advances in Neural Information Processing Systems 12, 2000. [13] A.J. Bell and T.J. Sejnowski. An information maximization approach to blind seperation and blind deconvolution. Neural Computation, 7:1129–1159, 1995.
2003
101
2,312
Laplace Propagation Alex J. Smola, S.V.N. Vishwanathan Machine Learning Group ANU and National ICT Australia Canberra, ACT, 0200 {smola, vishy}@axiom.anu.edu.au Eleazar Eskin Department of Computer Science Hebrew University Jerusalem Jerusalem, Israel, 91904 eeskin@cs.columbia.edu Abstract We present a novel method for approximate inference in Bayesian models and regularized risk functionals. It is based on the propagation of mean and variance derived from the Laplace approximation of conditional probabilities in factorizing distributions, much akin to Minka’s Expectation Propagation. In the jointly normal case, it coincides with the latter and belief propagation, whereas in the general case, it provides an optimization strategy containing Support Vector chunking, the Bayes Committee Machine, and Gaussian Process chunking as special cases. 1 Introduction Inference via Bayesian estimation can lead to optimization problems over rather large data sets. Exact computation in these cases is often computationally intractable, which has led to many approximation algorithms, such as variational approximation [5], or loopy belief propagation. However, most of these methods still rely on the propagation of the exact probabilities (upstream and downstream evidence in the case of belief propagation), rather than an approximation. This approach becomes costly if the random variables are real valued or if the graphical model contains large cliques. To fill this gap, methods such as Expectation Propagation (EP) [6] have been proposed, with explicit modifications to deal with larger cliques and real-valued variables. EP works by propagating the sufficient statistics of an exponential family, that is, mean and variance for the normal distribution, between various factors of the posterior. This is an attractive choice only if we are able to compute the required quantities explicitly (this means that we need to solve an integral in closed form). Furthermore computation of the mode of the posterior (MAP approximation) is a legitimate task in its own right — Support Vector Machines (SVM) fall into this category. In the following we develop a cheap version of EP which requires only the Laplace approximation in each step and show how this can be applied to SVM and Gaussian Processes. Outline of the Paper We describe the basic ideas of LP in Section 2, show how it applies to Gaussian Processes (in particular the Bayes Committee Machine of [9]) in Section 3, prove that SVM chunking is a special case of LP in Section 4, and finally demonstrate in experiments the feasibility of LP (Section 5). 2 Laplace Propagation Let X be a set of observations and denote by θ a parameter we would like to infer by studying p(θ|X). This goal typically involves computing expectations Ep(θ|X)[θ], which can only rarely be computed exactly. Hence we approximate Ep(θ|X)[θ] ≈ argmaxθ −log p(θ|X) =: ˆθ (1) Varp(θ|X)[θ] ≈ ∂2 θ [−log p(θ|X)]|θ=ˆθ (2) This is commonly referred to as the Laplace-approximation. It is exact for normal distributions and works best if θ is strongly concentrated around its mean. Solving for ˆθ can be costly. However, if p(θ|X) has special structure, such as being the product of several simple terms, possibly each of them dependent only on a small number of variables at a time, computational savings can be gained. In the following we present an algorithm to take advantage of this structure by breaking up (1) into smaller pieces and optimizing over them separately. 2.1 Approximate Inference For the sake of simplicity in notation we drop the explicit dependency of θ on X and as in [6] we assume that p(θ) = N Y i=1 ti(θ). (3) Our strategy relies on the assumption that if we succeed in finding good approximations of each of the terms ti(θ) by ˜ti(θ) we will obtain an approximate maximizer ˜θ of p(θ) by maximizing ˜p(θ) := Q i ˜ti(θ). Key is a good approximation of each of the ti at the maximum of p(θ). This is ensured by maximizing ˜pi(θ) := ti(θ) N Y j=1,j̸=i ˜ti(θ). (4) and subsequent use of the Laplace approximation of ti(θ) at ˜θi := argmaxθ ˜pi(θ) as the new estimate ˜ti(θ). This process is repeated until convergence. The following lemma shows that this strategy is valid: Lemma 1 (Fixed Point of Laplace Propagation) For all second-order fixed points the following holds: θ∗is a fixed point of Laplace propagation if and only if it is a local optimum of p(θ). Proof Assume that θ∗is a fixed point of the above algorithm. Then the first order optimality conditions require ∂θ log ˜pi(θ∗) = 0 for all i and the Laplace approximation yields ∂θ log ˜ti(θ∗) = ∂θ log ti(θ∗) and ∂2 θ log ˜ti(θ∗) = ∂2 θ log ti(θ∗). Consequently, up to second order, the derivatives of ˜p, ˜pi, and p agree at θ∗, which implies that θ∗is a local optimum. Next assume that θ∗is locally optimal. Then again, ∂θ log ˜pi(θ∗) have to vanish, since the Laplace approximation is exact up to second order. This means that also all ˜ti will have an optimum at ˜θ∗, which means that θ∗is a fixed point. The next step is to establish methods for updating the approximations ˜ti of ti. One option is to perform such updates sequentially, thereby improving only one ˜ti at a time. This is advantageous if we can process only one approximation at a time. For parallel processing, however, we will perform several operations at a time, that is, recompute several ˜ti(θ) and merge the new approximations subsequently. We will see how the BCM is a one-step approximation of LP in the parallel case, whereas SV chunking is an exact implementation of LP in the sequential case. 2.2 Message Passing Message passing [7] has been widely successful for inference in graphical models. Assume that we can split θ into a (not necessarily disjoint) set of coordinates, say θC1, . . . , θCN , such that p(θ) = N Y i=1 tN(θCi). (5) Then the goal of computing a Laplace approximation of ˜pi reduces to computing a Laplace approximation for the subset of variables θCi, since these are the only coordinates ti depends on. Note that an update in θCi means that only terms sharing variables with θCi are affected. For directed graphical models, these are the conditional probabilities governing the parents and children of θCi. Hence, to carry out calculations we only need to consider local information regarding ˜ti(θCi). 7654 0123 θ2  7654 0123 θ1 ? ? ? ? 7654 0123 θ3 ? ? ? ?  7654 0123 θ5 7654 0123 θ4 In the example above θ3 depends on (θ1, θ2) and (θ4, θ5) are conditionally independent of θ1 and θ2, given θ3. Consequently, we may write p(θ) as p(θ) = p(θ1)p(θ2)p(θ3|θ1, θ2)p(θ4|θ3)p(θ5|θ3). (6) To find the Laplace approximation corresponding to the terms involving θ3 we only need to consider p(θ3|θ1, θ2) itself and its neighbors “upstream” and “downstream” of θ3 containing θ1, θ2, θ3 in their functional form. This means that LP can be used as a drop-in replacement of exact inference in message passing algorithms. The main difference being, that now we are propagating mean and variance from the Laplace approximation rather than true probabilities (as in message passing) or true means and variances (as in expectation propagation). 3 Bayes Committee Machine In this section we show that the Bayes Committee Machine (BCM) [9] corresponds to one step of LP in conjunction with a particular initialization, namely constant ˜ti. As a result, we extend BCM into an iterative method for improved precision of the estimates. 3.1 The Basic Idea Let us assume that we are given a set of sets of observations, say, Z1, . . . , ZN, which are conditionally independent of each other, given a parameter θ, as depicted in the figure on the right. ?>=< 89:; θ ujjjjjjjjjjjjjjjj zvvvvvvv $I I I I I I I I GFED @ABC Z1 GFED @ABC Z2 . . . GFED @ABC ZN Repeated application of Bayes rule allows us to rewrite the conditional density p(θ|Z) as p(θ|Z) ∝p(Z|θ)p(θ) = p(θ) N Y i=1 p(Zi|θ) ∝p1−N(θ) N Y i=1 p(θ|Zi). (7) Finally, Tresp and coworkers [9] find Laplace approximations for p(θ|Zi) ∝p(Zi|θ)p(θ) with respect to θ. These results are then combined via (7) to come up with an overall estimate of p(θ|X, Y ). 3.2 Rewriting The BCM The repeated invocation of Bayes rule seems wasteful, yet it was necessary in the context of the BCM formulation to explain how estimates from subsets could be combined in a committee like fashion. To show the equivalence of BCM with one step of LP recall the third term of (7). We have p(θ|Z) = c · p(θ) | {z } :=t0(θ) N Y i=1 p(Zi|θ) | {z } :=ti(θ) , (8) where c is a suitable normalizing constant. In Gaussian processes, we generally assume that p(θ) is normal, hence t0(θ) is quadratic. This allows us to state the LP algorithm to find the mode and curvature of p(θ|Z): Algorithm 1 Iterated Bayes Committee Machine Initialize ˜t0 ←cp(θ) and ˜ti(θ) ←const. repeat Compute new approximations ˜ti(θ) in parallel by finding Laplace approximations to ˜pi, as defined in (4). Since t0 is normal, ˜t0(θ) = t0(θ). For i ̸= 0 we obtain ˜pi = ti(θ) N Y j=0,j̸=i ˜ti(θ) = p(θ)p(Zi|θ) N Y j=1,j̸=i ˜ti(θ). (9) until Convergence Return argmaxθ t0(θ) QN i=1 ˜ti(θ). Note that in the first iteration (9) can be written as ˜pi ∝p(θ)p(Zi|θ), since all remaining terms ˜ti are constant. This means that after the first update ˜ti is identical to the estimates obtained from the BCM. Whereas the BCM stops at this point, we have the liberty to continue the approximation and also the liberty to choose whether we use a parallel or a sequential update regime, depending on the number of processing units available. As a side-effect, we obtain a simplified proof of the following: Theorem 2 (Exact BCM [9]) For normal distributions the BCM is exact, that is, the Iterated BCM converges in one step. Proof For normal distributions all ˜ti are exact, hence p(θ) = Y i ti(θ) = Y i ˜ti(θ) = ˜p(θ), which shows that ˜p = p. Note that [9] formulates the problem as one of classification or regression, that is Z = (X, Y ), where the labels Y are conditionally independent, given X and the parameter θ. This, however, does not affect the validity of our reasoning. 4 Support Vector Machines The optimization goals in Support Vector Machines (SVM) are very similar to those in Gaussian Processes: essentially the negative log posterior −log p(θ|Z) corresponds to the objective function of the SV optimization problem. This gives hope that LP can be adapted to SVM. In the following we show that SVM chunking [4] and parallel SVM training [2] can be found to be special cases of LP. Taking logarithms of (3) and defining πi(θ) := −log ti(θ) (and ˜π(θ) := −log ˜ti(θ) analogously) we obtain the following formulation of LP in log-space. Algorithm 2 Logarithmic Version of Laplace Propagation Initialize ˜πi(θ) repeat Choose index i ∈{1, . . . , N} Minimize πi(θ) + N X j=1,i̸=j ˜πj(θ) and replace ˜πi(θ) by a Taylor approximation at the minimum θi of the above expression. until All θi agree 4.1 Chunking To show that SV chunking is equivalent to LP in logspace, we briefly review the basic ideas of chunking. The standard SVM optimization problem is minimize θ,b π(θ, b) := 1 2∥θ∥2 + C m X i=1 c(xi, yi, f(xi)) subject to f(xi) = ⟨θ, Φ(xi)⟩+ b (10) Here Φ(x) is the map into feature space such that k(x, x′) = ⟨Φ(x), Φ(x′)⟩and c(x, y, f(x)) is a loss function penalizing the deviation between the estimate f(x) and the observation y. We typically assume that c is convex. For the rest of the deviation we let c(x, y, f(x)) = max(0, 1 −yf(x)) (the analysis still holds in the general case, however it becomes considerably more tedious). The dual of (10) becomes minimize α 1 2 m X i,j=1 αiαjyiyjKijk(xi, xj) − m X i=1 αi s.t. m X i=1 yiαi = 0 and αi ∈[0, C] (11) The basic idea of chunking is to optimize only over subsets of the vector α at a time. Denote by Sw the set of variables we are using in the current optimization step, let αw be the corresponding vector, and by αf the variables which remain unchanged. Likewise denote by yw, yf the corresponding parts of y, and let H =  Hww Hwf Hfw Hff  be the quadratic matrix of (11), again split into terms depending on αw and αf respectively. Then (11), restricted to αw can be written as [4] minimize αw 1 2α⊤ wHwwαw+α⊤ f Hfwαw− X i∈Sw αi s.t. y⊤ wαw+y⊤ f αf = 0, αi ∈[0, C] (12) 4.2 Equivalence to LP We now show that the correction terms arising from chunking are the same as those arising from LP. Denote by S1, . . . , SN a partition of {1, . . . m} and define π0(θ, b) := 1 2∥θ∥2 and πi(θ, b) := C X j∈Si c(xj, yj, f(xj)). (13) Then ˜π0 = π0, since π0 is purely quadratic, regardless of where we expand π0. As for πi (with i ̸= 0) we have ˜πi = X j∈Si yjβj⟨Φ(xj), θ⟩+ X j∈Si yjβjb = ⟨θi, θ⟩+ bib (14) where βj ∈Cc′(xj, yj, f(xj)), θi := P j∈Si yjβjΦ(xj), and bi := P j∈Si yjβj.1 In this case minimization over πi(θ) + P j̸=i ˜πj(θ) amounts to minimizing 1 2∥θ∥2 + C X j∈Si c(xj, yj, f(xj)) + C X j /∈Si [⟨θj, θ⟩+ bjb] s.t. f(xj) = ⟨θ, Φ(xj)⟩+ b. Skipping technical details, the dual optimization problem is given by minimize α 1 2 X j,l∈Si αjαlyjylk(xj, kl) − X j∈Si αj − X j∈Si,l̸∈Si αjβlyjylk(xj, kl) subject to αj ∈[0, C] and P j∈Si yjαj −P j̸∈Si yjβj = 0. (15) The latter is identical to (12), the optimization problem arising from chunking, provided that we perform the substitution αj = −βj for all j ̸∈Si. To show this last step, note that at optimality null has to be an element of the subdifferential of πi(θ) with respect to θ, b. Taking derivatives of πi + P j̸=i ˜πi implies θ ∈−C X j∈Si c′(xj, yj, f(xj)) −C X j̸=i θj. (16) Matching up terms in the expansion of θ we immediately obtain βj = −αj. Finally, to start the approximation scheme we need to consider a proper initialization of ˜πi. In analogy to the BCM setting we use ˜πi = 0, which leads precisely to the SVM chunking method, where one optimizes over one subset at a time (denoted by Si), while the other sets are fixed, taking only their linear contribution into account. LP does not require that all the updates of ˜ti (or ˜πi) be carried out sequentially. Instead, we can also consider parallel approximations similar to [2]. There the optimization problem is split into several small parts and each of them is solved independently. Subsequently the estimates are combined by averaging. This is equivalent to one-step parallel LP: with the initialization ˜πi = 0 for all i ̸= 0 and ˜π0 = π0 = 1 2∥θ∥2 we minimize πi + P j̸=i ˜πj in parallel. This is equivalent to solving the SV optimization problem on the corresponding subset Si (as we saw in the previous section). Hence, the linear terms θi, bi arising from the approximation ˜πi(θ, b) = C⟨θi, θ⟩+ Cbib lead to the overall approximation ˜π(θ, b) = X i ˜πi(θ, b) = 1 2∥θ∥2 + X i ⟨θi, θ⟩, (17) with the joint minimizer being the average of the individual solutions. 5 Experiments To test our ideas we performed a set of experiments with the widely available Web and Adult datasets from the UCI repository [1]. All experiments were performed on a 2.4 MHz Intel Xeon machine with 1 GB RAM using MATLAB R13. We used a RBF kernel with σ2 = 10 [8], to obtain comparable results. We first tested the performance of Gaussian process training with Laplace propogation using a logistic loss function. The data was partitioned into chunks of roughly 500 samples each and the maximum of columns in the low rank approximation [3] was set to 750. 1Note that we had to replace the equality with set inclusion due to the fact that c is not everywhere differentiable, hence we used sub-differentials instead. We summarize the performance of our algorithm in Table 1. TFactor refers to the time (in seconds) for computing the low rank factorization while TTrain denotes the training time for the Gaussian process. We empirically observed that on all datasets the algorithm converges in less than 3 iterations using serial updates and in less than 6 iterations using parallel updates. Dataset TFactor TSerial TParallel Dataset TFactor TSerial TParallel Adult1 16.38 25.72 53.90 Web1 20.33 34.33 93.47 Adult2 20.07 33.02 75.76 Web2 36.27 67.65 88.37 Adult3 24.41 47.05 106.88 Web3 37.09 92.36 212.04 Adult4 36.29 75.71 202.88 Web4 69.9 168.88 251.92 Adult5 56.82 97.57 169.79 Web5 68.15 225.13 249.15 Adult6 89.78 232.45 348.10 Web6 129.86 261.23 663.07 Adult7 119.39 293.45 559.23 Web7 213.54 483.52 838.36 Table 1: Gaussian process training with serial and parallel Laplace propogation. We conducted another set of experiments to test the speedups obtained by seeding the SMO with values of α obtained by performing one iteration of Laplace propogation on the dataset. As before we used a RBF kernel with σ2 = 10. We partitioned the Adult1 and Web1 datasets into 5 chunks each while the Adult4 and Web4 datasets were partitioned into 10 chunks each. The freely available SMOBR package was modified and used for our experiments. For simplicity we use the C-SVM and vary the regularization parameter. TParallel, TSerial and TNoMod refer to the times required by SMO to converge when using one iteration of parallel/serial/no LP on the dataset. Adult1 Adult4 C TParallel TSerial TNoMod C TParallel TSerial TNoMod 0.1 2.84 2.04 7.650 0.1 20.42 13.26 59.935 0.5 5.57 3.99 9.215 0.5 46.29 40.82 63.645 1.0 5.48 7.25 10.885 1.0 80.33 64.37 107.475 5.0 107.37 110.07 307.135 5.0 1921.19 1500.42 1427.925 Table 2: Performance of SMO Initialization on the Adult dataset. Web1 Web4 C TParallel TSerial TNoMod C TParallel TSerial TNoMod 0.1 21.36 15.65 27.34 0.1 63.76 77.05 95.10 0.5 34.64 35.66 60.12 0.5 140.61 149.80 156.525 1.0 61.15 38.56 63.745 1.0 254.84 298.59 232.120 5.0 224.15 62.41 519.67 5.0 1959.08 3188.75 2223.225 Table 3: Performance of SMO Initialization on the Web dataset. As can be seen our initialization significantly speeds up the SMO in many cases sometimes acheving upto 4 times speed up. Although in some cases (esp for large values of C) our method seems to slow down convergence of SMO. In general serial updates seem to perform better than parallel updates. This is to be expected since we use the information from other blocks as soon as they become available in case of the serial algorithm while we completely ignore the other blocks in the parallel algorithm. 6 Summary And Discussion Laplace propagation fills the gap between Expectation Propagation, which requires exact computation of first and second order moments, and message passing algorithms when optimizing structured density functions. Its main advantage is that it only requires the Laplace approximation in each computational step, while being applicable to a wide range of optimization tasks. In this sense, it complements Minka’s Expectation Propagation, whenever exact expressions are not available. As a side effect, we showed that Tresp’s Bayes Committee Machine and Support Vector Chunking methods are special instances of this strategy, which also sheds light on the fact why simple averaging schemes for SVM, such as the one of Colobert and Bengio seem to work in practice. The key point in our proofs was that we split the data into disjoint subsets. By the assumption of independent and identically distributed data it followed that the variable assignments are conditionally independent from each other, given the parameter θ, which led to a favorable factorization property in p(θ|Z). It should be noted that LP allows one to perform chunking-style optimization in Gaussian Processes, which effectively puts an upper bound on the amount of memory required for optimization purposes. Acknowledgements We thank Nir Friedman, Zoubin Ghahramani and Adam Kowalczyk for useful suggestions and discussions. References [1] C. L. Blake and C. J. Merz. UCI repository of machine learning databases, 1998. [2] R. Collobert, S. Bengio, and Y. Bengio. A parallel mixture of svms for very large scale problems. In Advances in Neural Information Processing Systems. MIT Press, 2002. [3] S. Fine and K. Scheinberg. Efficient SVM training using low-rank kernel representations. Journal of Machine Learning Research, 2:243–264, Dec 2001. http://www.jmlr.org. [4] T. Joachims. Making large-scale SVM learning practical. In B. Sch¨olkopf, C. J. C. Burges, and A. J. Smola, editors, Advances in Kernel Methods—Support Vector Learning, pages 169–184, Cambridge, MA, 1999. MIT Press. [5] M. I. Jordan, Z. Gharamani, T. S. Jaakkola, and L. K. Saul. An introduction to variational methods for graphical models. In Learning in Graphical Models, volume M. I. Jordan, pages 105–162. Kluwer Academic, 1998. [6] T. Minka. Expectation Propagation for approximative Bayesian inference. PhD thesis, MIT Media Labs, Cambridge, USA, 2001. [7] J. Pearl. Probabilistic Reasoning in Intelligent Systems. Morgan-Kaufman, 1988. [8] J. C. Platt. Sequential minimal optimization: A fast algorithm for training support vector machines. Technical Report MSR-TR-98-14, Microsoft Research, 1998. [9] V. Tresp. A Bayesian committee machine. Neural Computation, 12(11):2719–2741, 2000.
2003
102
2,313
Error Bounds for Transductive Learning via Compression and Clustering Philip Derbeko Ran El-Yaniv Ron Meir Technion - Israel Institute of Technology {philip,rani}@cs.technion.ac.il rmeir@ee.technion.ac.il Abstract This paper is concerned with transductive learning. Although transduction appears to be an easier task than induction, there have not been many provably useful algorithms and bounds for transduction. We present explicit error bounds for transduction and derive a general technique for devising bounds within this setting. The technique is applied to derive error bounds for compression schemes such as (transductive) SVMs and for transduction algorithms based on clustering. 1 Introduction and Related Work In contrast to inductive learning, in the transductive setting the learner is given both the training and test sets prior to learning. The goal of the learner is to infer (or “transduce”) the labels of the test points. The transduction setting was introduced by Vapnik [1, 2] who proposed basic bounds and an algorithm for this setting. Clearly, inferring the labels of points in the test set can be done using an inductive scheme. However, as pointed out in [2], it makes little sense to solve an easier problem by ‘reducing’ it to a much more difficult one. In particular, the prior knowledge carried by the (unlabeled) test points can be incorporated into an algorithm, potentially leading to superior performance. Indeed, a number of papers have demonstrated empirically that transduction can offer substantial advantage over induction whenever the training set is small or moderate (see e.g. [3, 4, 5, 6]). However, unlike the current state of affairs in induction, the question of what are provably effective learning principles for transduction is quite far from being resolved. In this paper we provide new error bounds and a general technique for transductive learning. Our technique is based on bounds that can be viewed as an extension of McAllester’s PAC-Bayesian framework [7, 8] to transductive learning. The main advantage of using this framework in transduction is that here priors can be selected after observing the unlabeled data (but before observing the labeled sample). This flexibility allows for the choice of “compact priors” (with small support) and therefore, for tight bounds. Another simple observation is that the PAC-Bayesian framework can be operated with polynomially (in m, the training sample size) many different priors simultaneously. Altogether, this added flexibility, of using data-dependent multiple priors allows for easy derivation of tight error bounds for “compression schemes” such as (transductive) SVMs and for clustering algorithms. We briefly review some previous results. The idea of transduction, and a specific algorithm for SVM transductive learning, was introduced and studied by Vapnik (e.g. [2]), where an error bound is also proposed. However, this bound is implicit and rather unwieldy and, to the best of our knowledge, has not been applied in practical situations. A PAC-Bayes bound [7] for transduction with Perceptron Decision Trees is given in [9]. The bound is data-dependent depending on the number of decision nodes, the margins at each node and the sample size. However, the authors state that the transduction bound is not much tighter than the induction bound. Empirical tests show that this transduction algorithm performs slightly better than induction in terms of the test error, however, the advantage is usually statistically insignificant. Refining the algorithm of [2] a transductive algorithm based on a SVMs is proposed in [3]. The paper also provides empirical tests indicating that transduction is advantageous in the text categorization domain. An error bound for transduction, based on the effective VC Dimension, is given in [10]. More recently Lanckriet et al. [11] derived a transductive bound for kernel methods based on spectral properties of the kernel matrix. Blum and Langford [12] recently also established an implicit bound for transduction, in the spirit of the results in [2]. 2 The Transduction Setup We consider the following setting proposed by Vapnik ([2] Chp. 8), which for simplicity is described in the context of binary classification (the general case will be discussed in the full paper). Let H be a set of binary hypotheses consisting of functions from input space X to {±1} and let Xm+u = {x1, . . . , xm+u} be a set of points from X each of which is chosen i.i.d. according to some unknown distribution µ(x). We call Xm+u the full sample. Let Xm = {x1, . . . , xm} and Ym = {y1, . . . , ym}, where Xm is drawn uniformly from Xm+u and yi ∈{±1}. The set Sm = {(x1, y1), . . . , (xm, ym)} is referred to as a training sample. In this paper we assume that yi = φ(xi) for some unknown function φ. The remaining subset Xu = Xm+u \ Xm is referred to as the unlabeled sample. Based on Sm and Xu our goal is to choose h ∈H which predicts the labels of points in Xu as accurately as possible. For each h ∈H and a set Z = x1, . . . , x|Z| of samples define Rh(Z) = 1 |Z| |Z| X i=1 ℓ(h(xi), yi), (1) where in our case ℓ(·, ·) is the zero-one loss function. Our goal in transduction is to learn an h such that Rh(Xu) is as small as possible. This problem setup is summarized by the following transduction “protocol” introduced in [2] and referred to as Setting 1: (i) A full sample Xm+u = {x1, . . . , xm+u} consisting of arbitrary m + u points is given.1 (ii) We then choose uniformly at random the training sample Xm ⊆Xm+u and receive its labeling Ym; the resulting training set is Sm = (Xm, Ym) and the remaining set Xu is the unlabeled sample, Xu = Xm+u \ Xm; (iii) Using both Sm and Xu we select a classifier h ∈H whose quality is measured by Rh(Xu). Vapnik [2] also considers another formulation of transduction, referred to as Setting 2: (i) We are given a training set Sm = (Xm, Ym) selected i.i.d according to µ(x, y). (ii) An independent test set Su = (Xu, Yu) of u samples is then selected in the same manner. 1The original Setting 1, as proposed by Vapnik, discusses a full sample whose points are chosen independently at random according to some source distribution µ(x). (iii) We are required to choose our best h ∈H based on Sm and Xu so as to minimize Rm,u(h) = Z 1 u m+u X i=m+1 ℓ(h(xi), yi) dµ(x1, y1) · · · dµ(xm+u, ym+u). (2) Even though Setting 2 may appear more applicable in practical situations than Setting 1, the derivation of theoretical results can be easier within Setting 1. Nevertheless, as far as the expected losses are concerned, Vapnik [2] shows that an error bound in Setting 1 implies an equivalent bound in Setting 2. In view of this result we restrict ourselves in the sequel to Setting 1. We make use of the following quantities, which are all instances of (1). The quantity Rh(Xm+u) is called the full sample risk of the hypothesis h, Rh(Xu) is referred to as the transduction risk (of h), and Rh(Xm) is the training error (of h). Thus, Rh(Xm) is the standard training error denoted by ˆRh(Sm). While our objective in transduction is to achieve small error over the unlabeled set (i.e. to minimize Rh(Xu)), it turns out that it is much easier to derive error bounds for the full sample risk. The following simple lemma translates an error bound on Rh(Xm+u), the full sample risk, to an error bound on the transduction risk Rh(Xu). Lemma 2.1 For any h ∈H and any C Rh(Xm+u) ≤ˆRh(Sm) + C ⇔ Rh(Xu) ≤ˆRh(Sm) + m + u u · C. (3) Proof: For any h Rh(Xm+u) = mRh(Xm) + uRh(Xu) m + u . (4) Substituting ˆRh(Sm) for Rh(Xm) in (4) and then substituting the result for the left-hand side of (3) we get Rh(Xm+u) = m ˆRh(Sm) + uRh(Xu) m + u ≤ˆRh(Sm) + C. The equivalence (3) is now obtained by isolating Rh(Xu) on the left-hand side. 2 3 General Error Bounds for Transduction Consider a hypothesis class H and assume for simplicity that H is countable; in fact, in the case of transduction it suffices to consider a finite hypothesis class. To see this note that all m + u points are known in advance. Thus, in the case of binary classification (for example) it suffices to consider at most 2m+u possible dichotomies. Recall that in the setting considered we select a sub-sample of m points from the set Xm+u of cardinality m+u. This corresponds to a selection of m points without replacement from a set of m+u points, leading to the m points being dependent. A naive utilization of large deviation bounds would therefore not be directly applicable in this setting. However, Hoeffding (see Theorem 4 in [13]) pointed out a simple procedure to transform the problem into one involving independent data. While this procedure leads to non-trivial bounds, it does not fully take advantage of the transductive setting and will not be used here. Consider for simplicity the case of binary classification. In this case we make use of the following concentration inequality, based on [14]. Theorem 3.1 Let C = {c1, . . . , cN}, ci ∈{0, 1}, be a finite set of binary numbers, and set ¯c = (1/N) PN i=1 ci. Let Z1, . . . , Zm, be random variables obtaining their values by sampling C uniformly at random without replacement. Set Z = (1/m) Pm i=1 Zi and β = m/N. Then, if 2 ε ≤min{1 −¯c, ¯c(1 −β)/β}, Pr {Z −EZ > ε} ≤exp ½ −mD(¯c + ε∥¯c) −(N −m) D µ ¯c − βε 1 −β °°°° ¯c ¶ + 7 log(N + 1) ¾ , where D(p∥q) = p log(p/q) = (1 −p) log(1 −p)/(1 −q), p, q, ∈[0, 1] is the binary Kullback-Leibler divergence. Using this result we obtain the following error bound for transductive classification. Theorem 3.2 Let Xm+u = Xm∪Xu be the full sample and let p = p(Xm+u) be a (prior) distribution over the class of binary hypotheses H that may depend on the full sample. Let δ ∈(0, 1) be given. Then, with probability at least 1 −δ over choices of Sm (from the full sample) the following bound holds for any h ∈H, Rh(Xu) ≤ˆRh(Sm) + v u u t à 2 ˆRh(Sm)(m + u) u ! log 1 p(h) + ln m δ + 7 log(m + u + 1) m −1 + 2 ³ log 1 p(h) + ln m δ + 7 log(m + u + 1) ´ m −1 . (5) Proof: (sketch) In our transduction setting the set Xm (and therefore Sm) is obtained by sampling the full sample Xm+u uniformly at random without replacement. We first claim that EΣm ˆRh(Sm) = Rh(Xm+u), (6) where EΣm(·) is the expectation with respect to a random choice of Sm from Xm+u without replacement. This is shown as follows. EΣm ˆRh(Sm) = 1 ¡m+u m ¢ X Sm ˆRh(Sm) = 1 ¡m+u m ¢ X Xm⊆Xm+n 1 m X x∈Sm ℓ(h(x), φ(x)). By symmetry, all points x ∈Xm+u are counted on the right-hand side an equal number of times; this number is precisely ¡m+u m ¢ − ¡m+u−1 m ¢ = ¡m+u−1 m−1 ¢ . The equality (6) is obtained by considering the definition of Rh(Xm+u) and noting that ¡m+u−1 m−1 ¢ / ¡m+u m ¢ = m m+u. The remainder of the proof combines Theorem 3.1 and the techniques presented in [15]. The details will be provided in the full paper. 2 Notice that when ˆRh(Sm) →0 the square root in (5) vanishes and faster rates are obtained. An important feature of Theorem 3.2 is that it allows one to use the sample Xm+u in order to choose the prior distribution p(h). This advantage has already been alluded to in [2], but does not seem to have been widely used in practice. Additionally, observe that (5) holds with probability at least 1 −δ with respect to the random selection of sub-samples of size m from the fixed set Xm+u. This should be contrasted with the standard inductive setting results where the probabilities are with respect to a random choice of m training points chosen i.i.d. from µ(x, y). The next bound we present is analogous to McAllester’s Theorem 1 in [8]. This theorem concerns Gibbs composite classifiers, which are distributions over the base classifiers in H. For any distribution q over H denote by Gq the Gibbs classifier, which classifies an 2The second condition, ε ≤¯c(1 −β)/β, simply guarantees that the number of ‘ones’ in the sub-sample does not exceed their number in the original sample. instance (in Xu) by randomly choosing, according to q, one hypothesis h ∈H. For Gibbs classifiers we now extend definition (1) as follows. Let Z = x1, . . . , x|Z| be any set of samples and let Gq be a Gibbs classifier over H. The risk of Gq over Z is RGq(Z) = Eh∼q n (1/|Z|) P|Z| i=1 ℓ(h(xi), φ(xi)) o . As before, when Z = Xm (the training set) we use the standard notation ˆRGq(Sm) = RGq(Xm). Due to space limitations, the proof of the following theorem will appear in the full paper. Theorem 3.3 Let Xm+u be the full sample. Let p be a distribution over H that may depend on Xm+u and let q be a (posterior) distribution over H that may depend on both Sm and Xu. Let δ ∈(0, 1) be given. With probability at least 1 −δ over the choices of Sm for any distribution q RGq(Xu) ≤ˆRGq(Sm) + v u u t à 2 ˆRGq(Sm)(m + u) u ! D(q∥p) + ln m δ + 7 log(m + u + 1) m −1 + 2 ¡ D(q∥p) + ln m δ + 7 m log(m + u + 1) ¢ m −1 . In the context of inductive learning, a major obstacle in generating meaningful and effective bounds using the PAC-Bayesian framework [8] is the construction of “compact priors”. Here we discuss two extensions to the PAC-Bayesian scheme, which together allow for easy choices of compact priors that can yield tight error bounds. The first extension we offer is the use of multiple priors. Instead of a single prior p in the original PACBayesian framework we observe that one can use all PAC-Bayesian bounds with a number of priors p1, . . . , pk and then replace the complexity term ln(1/p(h)) (in Theorem 3.2) by mini ln(1/pi(h)), at a cost of an additional ln k term (see below). Similarly, in Theorem 3.3 we can replace the KL-divergence term in the bound with mini D(q||pi). The penalty for using k priors is logarithmic in k (specifically the ln(1/δ) term in the original bound becomes ln(k/δ)). As long as k is sub-exponential in m we still obtain effective generalization bounds. The second “extension” is simply the feature of our transduction bounds (Theorems 3.2 and 3.3), which allows for the priors to be dependent on the full sample Xm+u. The combination of these two simple ideas yields a powerful technique for deriving error bounds in realistic transductive settings. After stating the extended result we later use it for deriving tight bounds for known learning algorithms and for deriving new algorithms. Suppose that instead of a single prior p over H we want to utilize k priors, p1, . . . , pk and in retrospect choose the best among the k corresponding PAC-Bayesian bounds. The following theorem shows that one can use polynomially many priors with a minor penalty. The proof, which is omitted due to space limitations, utilizes the union bound in a straightforward manner. Theorem 3.4 Let the conditions of Theorem 3.2 hold, except that we now have k prior distributions p1, . . . , pk defined over H, each of which may depend on Xm+u. Let δ ∈ (0, 1) be given. Then, with probability at least 1−δ over random choices of sub-samples of size m from the full-sample, for all h ∈H, (5) holds with p(h) replaced by min1≤i≤k pi(h) and log 1 δ is replaced by log k δ . Remark: A similar result holds for the Gibbs algorithm of Theorem 3.3. Also, as noted by one of the reviewers, when the supports of the k priors intersect (i.e. there is at least one pair of priors pi and pj with overlapping support), then one can do better by utilizing the “super prior” p = 1 k P i pi within the original Theorem 3.2. However, note that when the supports are disjoint, these two views (of multiple priors and a super prior) are equivalent. In the applications below we utilize non-intersecting priors. 4 Bounds for Compression Algorithms Here we propose a technique for bounding the error of “compression” algorithms based on appropriate construction of prior probabilities. Let A be a learning algorithm. Intuitively, A is a “compression scheme” if it can generate the same hypothesis using a subset of the data. More formally, a learning algorithm A (viewed as a function from samples to some hypothesis class) is a compression scheme with respect to a sample Z if there is a subsample Z′, Z′ ⊂Z, such that A(Z′) = A(Z). Observe that the SVM approach is a compression scheme, with Z′ being determined by the set of support vectors. Let A be a deterministic compression scheme and consider the full sample Xm+u. For each integer τ = 1, . . . , m, consider all subsets of Xm+u of size τ, and for each subset construct all possible dichotomies of that subset (note that we are not proposing this approach as an algorithm, but rather as a means to derive bounds; in practice one need not construct all these dichotomies). A deterministic algorithm A uniquely determines at most one hypothesis h ∈H for each dichotomy.3 For each τ, let the set of hypotheses generated by this procedure be denoted by Hτ. For the rest of this discussion we assume the worst case where |Hτ| = ¡m+u τ ¢ (i.e. if Hτ does not contains one hypothesis for each dichotomy the bounds improve). The prior pτ is then defined to be a uniform distribution over Hτ. In this way we have m priors, p1, . . . , pm which are constructed using only Xm+u (and are independent of Sm). Any hypothesis selected by the learning algorithm A based on the labeled sample Sm and on the test set Xu belongs to ∪m τ=1Hτ. The motivation for this construction is as follows. Each τ can be viewed as our “guess” for the maximal number of compression points that will be utilized by a resulting classifier. For each such τ the prior pτ is constructed over all possible classifiers that use τ compression points. By systematically considering all possible dichotomies of τ points we can characterize a relatively small subset of H without observing labels of the training points. Thus, each prior pτ represents one such guess. Using Theorem 3.4 we are later allowed to choose in retrospect the bound corresponding to the best “guess”. The following corollary identifies an upper bound on the divergence in terms of the observed size of the compression set of the final classifier. Corollary 4.1 Let the conditions of Theorem 3.4 hold. Let A be a deterministic learning algorithm leading to a hypothesis h ∈H based on a compression set of size s. Then with probability at least 1 −δ for all h ∈H, (5) holds with log(1/p(h)) replaced by s log(2e(m + u)/s) and ln(m/δ) replaced by ln(m2/δ). Proof: Recall that Hs ⊆H is the support set of ps and that ps(h) = 1/|Hs| for all h ∈Hs, implying that ln(1/ps(h)) = |Hs|. Using the inequality ¡m+u s ¢ ≤(e(m+u)/s)s we have that |Hs| = 2s¡m+u s ¢ ≤(2e(m + u)/s)s. Substituting this result in Theorem 3.4 while restricting the minimum over i to be over i ≥s, leads to the desired result. 2 The bound of Corollary 4.1 can be easily computed once the classifier is trained. If the size of the compression set happens to be small, we obtain a tight bound. SVM classification is one of the best studied compression schemes. The compression set for a sample Sm is given by the subset of support vectors. Thus the bound in Corollary 4.1 immediately applies with s being the number of observed support vectors (after training). We note that this bound is similar to a recently derived compression bound for inductive learning (Theorem 5.18 in [16]). Also, observe that the algorithm itself (inductive SVM) did not use in this case the unlabeled sample (although the bound does use this sample). Nevertheless, using exactly the same technique we obtain error bounds for the transductive SVM algorithms in [2, 3].4 3It might be that for some dichotomies the algorithm will fail. For example, an SVM in feature space without soft margin will fail to classify non linearly-separable dichotomies of Xm+u. 4Note however that our bounds are optimized with a “minimum number of support vectors” approach rather than “maximum margin”. 5 Bounds for Clustering Algorithms Some learning problems do not allow for high compression rates using compression schemes such as SVMs (i.e. the number of support vectors can sometimes be very large). A considerably stronger type of compression can often be achieved by clustering algorithms. While there is lack of formal links between entirely unsupervised clustering and classification, within a transduction setting we can provide a principled approach to using clustering algorithms for classification. Let A be any (deterministic) clustering algorithm which, given the full sample Xm+u, can cluster this sample into any desired number of clusters. We use A to cluster Xm+u into 2, 3 . . . , c clusters where c ≤m. Thus, the algorithm generates a collection of partitions of Xm+u into τ = 2, 3, . . . , c clusters, where each partition is denoted by Cτ. For each value of τ, let Hτ consist of those hypotheses which assign an identical label to all points in the same cluster of partition Cτ, and define the prior pτ(h) = 1/2τ for each h ∈Hτ and zero otherwise (note that there are 2τ possible dichotomies). The learning algorithm selects a hypothesis as follows. Upon observing the labeled sample Sm = (Xm, Ym), for each of the clusterings C2, . . . , Cc constructed above, it assigns a label to each cluster based on the majority vote from the labels Ym of points falling within the cluster (in case of ties, or if no points from Xm belong to the cluster, choose a label arbitrarily). Doing this leads to c −1 classifiers hτ, τ = 2, . . . , c. For each hτ there is a valid error bound as given by Theorem 3.4 and all these bounds are valid simultaneously. Thus we choose the best classifier (equivalently, number of clusters) for which the best bound holds. We thus have the following corollary of Theorem 3.4 and Lemma 2.1. Corollary 5.1 Let A be any clustering algorithm and let hτ, τ = 2, . . . , c be classifications of test set Xu as determined by clustering of the full sample Xm+u (into τ clusters) and the training set Sm, as described above. Let δ ∈(0, 1) be given. Then with probability at least 1 −δ, for all τ, (5) holds with log(1/p(h)) replaced by τ and ln(m/δ) replaced by ln(mc/δ). Error bounds obtained using Corollary 5.1 can be rather tight when the clustering algorithm is successful (i.e. when it captures the class structure in the data using a small number of clusters). Corollary 5.1 can be extended in a number of ways. One simple extension is the use of an ensemble of clustering algorithms. Specifically, we can concurrently apply k clustering algorithm (using each algorithm to cluster the data into τ = 2, . . . , c clusters). We thus obtain kc hypotheses (partitions of Xm+u). By a simple application of the union bound we can replace ln cm δ by ln kcm δ in Corollary 5.1 and guarantee that kc bounds hold simultaneously for all kc hypotheses (with probability at least 1 −δ). We thus choose the hypothesis which minimizes the resulting bound. This extension is particularly attractive since typically without prior knowledge we do not know which clustering algorithm will be effective for the dataset at hand. 6 Concluding Remarks We presented new bounds for transductive learning algorithms. We also developed a new technique for deriving tight error bounds for compression schemes and for clustering algorithms in the transductive setting. We expect that these bounds and new techniques will be useful for deriving new error bounds for other known algorithms and for deriving new types of transductive learning algorithms. It would be interesting to see if tighter transduction bounds can be obtained by reducing the “slacks” in the inequalities we use in our analysis. Another promising direction is the construction of better (multiple) priors. For example, in our compression bound (Corollary 4.1), for each number of compression points we assigned the same prior to each possible point subset and each possible dichotomy. However, in practice a vast majority of all these subsets and dichotomies are unlikely to occur. Acknowledgments The work of R.E and R.M. was partially supported by the Technion V.P.R. fund for the promotion of sponsored research. Support from the Ollendorff center of the department of Electrical Engineering at the Technion is also acknowledged. We also thank anonymous referees for their useful comments. References [1] V. N. Vapnik. Estimation of Dependences Based on Empirical Data. Springer Verlag, New York, 1982. [2] V. N. Vapnik. Statistical Learning Theory. Wiley Interscience, New York, 1998. [3] T. Joachims. Transductive inference for text classification unsing support vector machines. In European Conference on Machine Learning, 1999. [4] A. Blum and S. Chawla. Learning from labeled and unlabeled data using graph mincuts. In Proceeding of The Eighteenth International Conference on Machine Learning (ICML 2001), pages 19–26, 2001. [5] R. El-Yaniv and O. Souroujon. Iterative double clustering for unsupervised and semisupervised learning. In Advances in Neural Information Processing Systems (NIPS 2001), pages 1025–1032, 2001. [6] T. Joachims. Transductive learning via spectral graph partitioning. In Proceeding of The Twentieth International Conference on Machine Learning (ICML-2003), 2003. [7] D. McAllester. Some PAC-Bayesian theorems. Machine Learning, 37(3):355–363, 1999. [8] D. McAllester. PAC-Bayesian stochastic model selection. Machine Learning, 51(1):5–21, 2003. [9] D. Wu, K. Bennett, N. Cristianini, and J. Shawe-Taylor. Large margin trees for induction and transduction. In International Conference on Machine Learning, 1999. [10] L. Bottou, C. Cortes, and V. Vapnik. On the effective VC dimension. Technical report, AT&T, 1994. [11] G.R.G. Lanckriet, N. Cristianini, L. El Ghaoui, P. Bartlett, and M.I. Jordan. Learning the kernel matrix with semi-definite programming. Technical report, University of Berkeley, Computer Science Division, 2002. [12] A. Blum and J. Langford. Pac-mdl bounds. In COLT, pages 344–357, 2003. [13] W. Hoeffding. Probability inequalities for sums of bounded random variables. J. Amer. Statis. Assoc., 58:13–30, 1963. [14] A. Dembo and O. Zeitouni. Large Deviation Techniques and Applications. Springer, New York, second edition, 1998. [15] D. McAllester. Simplified pac-bayesian margin bounds. In COLT, pages 203–215, 2003. [16] R. Herbrich. Learning Kernel Classifiers: Theory and Algorithms. MIT Press, Boston, 2002.
2003
103
2,314
Approximate Expectation Tom Heskes, Onno Zoeter, and Wim Wiegerinck SNN, University of Nijmegen Geert Grooteplein 21, 6525 EZ, Nijmegen, The Netherlands Abstract We discuss the integration of the expectation-maximization (EM) algorithm for maximum likelihood learning of Bayesian networks with belief propagation algorithms for approximate inference. Specifically we propose to combine the outer-loop step of convergent belief propagation algorithms with the M-step of the EM algorithm. This then yields an approximate EM algorithm that is essentially still double loop, with the important advantage of an inner loop that is guaranteed to converge. Simulations illustrate the merits of such an approach. 1 Introduction The EM (expectation-maximization) algorithm [1, 2] is a popular method for maximum likelihood learning in probabilistic models with hidden variables. The E-step boils down to computing probabilities of the hidden variables given the observed variables (evidence) and current set of parameters. The M-step then, given these probabilities, yields a new set of parameters guaranteed to increase the likelihood. In Bayesian networks, that will be the focus of this article, the M-step is usually relatively straightforward. A complication may arise in the E-step, when computing the probability of the hidden variables given the evidence becomes intractable. An often used approach is to replace the exact yet intractable inference in the Estep with approximate inference, either through sampling or using a deterministic variational method. The use of a "mean-field" variational method in this context leads to an algorithm known as variational EM and can be given the interpretation of minimizing a free energy with respect to both a tractable approximate distribution (approximate E-step) and the parameters (M-step) [2]. Loopy belief propagation [3] and variants thereof, such as generalized belief propagation [4] and expectation propagation [5], have become popular alternatives to the "mean-field" variational approaches, often yielding somewhat better approximations. And indeed, they can and have been applied for approximate inference in the E-step of the EM algorithm (see e.g. [6, 7]). A possible worry, however, is that standard application of these belief propagation algorithms does not always lead to convergence. So-called double-loop algorithms with convergence guarantees have been derived, such as CCCP [8] and UPS [9], but they tend to be an order of magnitude slower than standard belief propagation~ . The goal of this article is to integrate expectation-maximization with belief propagation. As for variational EM, this integration relies on the free-energy interpretation of EM that is reviewed in Section 2. In Section 3 we describe how the exact free energy can be approximated with a Kikuchi free energy and how this leads to an approximate EM algorithm. Section 4 contains our main result: integrating the outer-loop of a convergent double-loop algorithm with the M-step, we are left with an overall double-loop algorithm, where the inner loop is now a convex constrained optimization problem with a unique solution. The methods are illustrated in Section 5; implications and extensions are discussed in Section 6. 2 The free energy interpretation of EM We consider probabilistic models P(x; fJ), with fJ the model parameters to be learned and x the variables in the model. We subdivide the variables into hidden variables h and observed, evidenced variables e. For ease of notation, we consider just a single set of observed variables e (in fact, if we have N sets of observed variables, we can simply copy our probability model N times and view this as our single probability model with "shared" parameters fJ). In maximum likelihood learning, the goal is to find the parameters fJ that maximize the likelihood P(e; fJ) or, equivalently, that minimize minus the loglikelihood L(O) = -log pee; 0) = -log [~p(e,h; 0)] . The EM algorithm can be understood from the observation, made in [2], that L(B) == min F(Q, fJ) , QEP with P the set of all probability distributions defined on h and F(Q, B) the so-called free energy [ Q(h) ] F(Q, 0) = L(O) + ~ Q(h) log P(hle; 0) = E(Q, 0) - SeQ) , with the "energy" E(Q, fJ) == - L Q(h) logP(e, h; B) , h and the "entropy" (1) . 8(Q) == - L Q(h) log Q(h) . h The EM algorithm now boils down to alternate minimization with respect to Q and fJ: E-step: fix fJ and solve Q == argminF(QI, B) Q'EP M-step: fix Q and solve B == argminF(Q,B1) == argrninE(Q,B1 ) ()' ()' (2) (3) The advantage of the M-step over direct minimization of -logP(e; fJ) is that the summation over h is now outside the logarithm, which in many cases implies that the minimum with respect to () can be computed explicitly. The main inference problem is then in the E-step. Its solution follows directly from (1): ( ) ( I) P(h, e; fJ) Q h = P h e;O = L-h' P(h',e;O) , with fJ the current setting of the parameters. However, in complex probability models P(hle; fJ) can be difficult and even intractable to compute, mainly because of the normalization in the denominator. For later purposes we note that the EM algorithm can be interpreted as a general "bound optimization algorithm" [10]. In this interpretation the free energy F(Q,B) is an upper bound on the function L(B) that we try to minimize; the E-step corresponds to a reset of the bound and the M-step to the minimization of the upper bound. In variational EM [2] one restricts the probability distribution Q to a specific set pI, such that the E-step. becomes tractable. Note that this restriction affects both the energy term and the entropy term. By construction the approximate minQEpl F(Q, B) is an upper bound on L(B). 3 Approximate free energies In several studies, propagation algorithms like loopy belief propagation [6J and expectation propagation [7] have been applied to find approximate solutions for the E-step. As we will see, the corresponding approximate EM-algorithm can be interpreted as alternate minimization of a Bethe or Kikuchi free energy. For the moment, we will consider the case of loopy and generalized belief propagation applied to probability models with just discrete variables. The generalization to expectation propagation is discussed in Section 6. The joint probability implied by a Bayesian network can be written in the form P(x; B) == II wa(xa;Ba) , where a denotes a subset of variables and Wa is a potential function. The parameters Ba may be shared, i.e., we may have Ba == Bal for some a =1= al. For a Bayesian network, the energy term simplifies into a sum over local terms: E(Q,B) == - LLQ(ha)log'1ia(ha,ea;Ba). a hex However, the entropy term is as intractable as the normalization in (3) that we try to prevent. In the Bethe or more generally Kikuchi approximation, this entropy term is approximated through [4] S(Q) == - LQ(h)logQ(h) ~ LSa(Q) + LcIJSIJ(Q).== S(Q) , h a IJ with and similarly for SIJ(Q). The subsets indexed by f3 correspond to intersections between the subsets indexed by a, intersections of intersections, and so on. The parameters clJ are called Moebius or overcounting numbers. In the above description, the a-clusters correspond to the potential subsets, i.e., the clusters in the moralized graph. However, we can also choose them to be larger, e.g., combining several potentials into a single cluster. The Kikuchi/Bethe approximation is exact if the a-clusters form a singly-connected structure. That is, exact inference is obtained when the a-clusters correspond to cliques in a junction tree. The f3 subsets then play the role of the separators and have overcounting numbers 1 - nlJ with n{J the number of neighboring cliq~es. The larger the clusters, the higher the computational complexity. There are different kinds of approximations (Bethe, CVM, junction graphs), each corresponding to a somewhat different choice of a-clusters, f3-subsets and overcounting numbers (see [4] for an overview). In the following we will refer to all of them as Kikuchi approximations. The important point is that the approximate entropy is, like the energy, a sum of local terms. Furthermore, the Kikuchi free energy as a function of the probability distribution Q only depends on the marginals Q(xa:) and Q(xf3). The minimization of the exact free energy with respect to a probability distribution Q has been turned into the minimization of the Kikuchi free energy F(Q,()) == E (Q, ()) -8(Q) with respect to a set of pseudo-marginals Q == {Q a: , Qf3}. For the approximation to make any sense, these pseudo-marginals have to be properly normalized as well as consistent, which boils down to a set of linear constraints of the form (4) The approximate EM algorithm based on the Kikuchi free energy now reads approximate E-step: fix () and solve Q == argminF(Q',8) Q/EP M-step: fix Q and solve () == argrninF(Q,()') == argrninE(Q,()') (jl 0' (5) where P refers to all sets of consistent and properly normalized pseudo-marginals {Qa:, Qf3}. Because the entropy does not depend on the parameters (), the M-step of the approximate EM algorithm is completely equivalent to the M-step of the exact EM algorithm. The only difference is that the statistics required for this M-step is computed approximately rather than exactly. In other words, the seemingly naive procedure of using generalized or loopy belief propagation to compute the statistics in the E-step and use it in the M-step, can be interpreted as alternate minimization of the Kikuchi approximation of the exact free energy. That is, algorithm (5) can be interpreted as a bound optimization algorithm for minimizing L(8) == miI! F(Q, 8) , QEP which we hope to be a good approximation (not necessarily a bound) of the original L(8). 4 Constrained optimization There are two kinds of approaches for finding the minimum of the Kikuchi free energy. The first one is to run loopy or generalized belief propagation, e.g., using Algorithm 1 in the hope that it converges to such a minimum. However, convergence guarantees can only be given in special cases and in practice one does observe convergence problems. In the following we will refer to the use of standard belief propagation in the E-step as the "naive algorithm". Recently, there have been derived double-loop algorithms that explicitly minimize the Kikuchi free energy [8, 9, 11]. Technically, finding the minimum of the Kikuchi free energy with respect to consistent marginals corresponds to a non-convex constrained optimization problem. The consistency and normalization constraints on the marginals are linear in Q and so is the energy term E (Q, 8). The non-convexity stems from the entropy terms and specifically those with negative overcounting numbers. Most currently described techniques, such as CCCP [8], UPS [9] and variants thereof, can be understood as general bound optimization algorithms. In CCCP concave terms are bounded with a linear term, yielding a convex bound and thus, in combination with the linear constraints, a convex optimization problem to be solved in the inner loop. In particular we can write F(Q,()) == miI!G(Q,R,8) with G(Q,R,8) ==F(Q,(}) +'K(Q,R) , (6) REP Algorithm 1 Generalized belief propagation. 1: while -,converged do 2: for all f3 do 3: for all a :J f3 do 4: Qa(XIJ) == L.Qa(Xa); xO:\{3 5: end for 6: 7: 8: 1 QIJ (XIJ) ex: J-la-+IJ (XIJ) n{3+c{3 a-.:JIJ for all a :J f3 do () QIJ(xlJ) J-l1J-+a xlJ == () ; J.La-+1J xlJ Qa(Xa) ex: Wa(Xa) II J.LIJ-+a(xlJ) IJCa 9: end for 10: end for 11: end while where K(Q, R) == L ICIJI L QIJ(hlJ) log [~~~~~~] , IJ;C{3 <0 h{3 IJ IJ is a weighted sum of local Kullback-Leibler divergences. By construction G(Q, R, 0) is convex in Q - the concave QIJ log QIJ terms in F(Q, 0) cancel with those in K (Q,R) - as well as an upper bound on F(Q, B) since K(Q, R) ~ O. The now convex optimization problem in the inner loop can be solved with a message passing algorithm very similar to standard loopy or generalized belief propagation. In fact, we can use Algorithm 1, with clJ == 0 and after a slight redefinition of the potentials Wa such that they incorporate the linear bound of the concave entropy terms (see [11] for details). The messages in this algorithm are in one-to-one correspondence with the Lagrange multipliers of the concave dual. Most importantly, with the particular scheduling in Algorithm 1, each update is guaranteed to increase the dual and therefore the inner-loop algorithm must converge to its unique solution. The outer loop simply sets R == Q and corresponds to a reset of the bound. Incorporating this double-loop algorithm into our approximate EM algorithm (5), we obtain inner-loop E-step: fix {B, R} solve Q == argmin G(QI,R, fJ) QiE'P outer-loop E-step: fix {Q, 8} solve R == argminG(Q,R',fJ) == argminK(Q,R) WE'P WE'P M-step: fix {Q, R} solve B== argrninG(Q,R,fJl) == argrninE(Q, 81) ()I ()I (7) To distinguish it from the naive algorithm, we will refer to (7) as the "convergent algorithm". The crucial observation is that we can combine the outer-loop E-step with the usual M-step: there is no need to run the double-loop algorithm in the E-step until convergence. This gives us then an overall double-loop rather than triple-loop algorithm. In principle (see however the next section) the algorithmic complexity of the convergent algorithm is- the same as that of the naive algorithm. 70.----,-----,---.,----,.------, "'"\ \ \ \ \ \ """"'---'-.:..,..=;=.....~. -, -. --''=::-. =.-=\ '.\ :\.: \ : \ .. \ \ \ "100 80 40 60 outer loops 20 55 '-------'-----'----'-----'--------' o (a) Coupled hidden Markov model. (b) Simulation results. Figure 1: Learning a coupled hidden Markov model. (a) Architecture for 3 time slice Qa'1d 4 hidden nodes per time slice. (b) 11inus the loglikelihood in the Kikuchi/Bethe approximation as a function of the number of M-steps. Naive algorithm (solid line), convergent algorithm (dashed), convergent algorithm with tighter bound and overrelaxation (dash-dotted), same for a Kikuchi approximation (dotted). See text for details. 5 'Simulations For illustration, we compare the naive and convergent approximate EM algorithms for learning in a coupled hidden Markov model. The architecture of coupled hidden Markov models is sketched in Figure l(a) for T == 3 time slices and M == 4 hiddenvariable nodes per time slice. In our simulations we used M == 5 and T == 20; all nodes are binary. The parameters to be learned are the observation matrix p(em,t == ilhm,t == j) and two transition matrices: p(h1,t+l == ilh1,t == j, h2,t == k) == p(hM,t+l == ilhM,t == j, hM-l,t == k) for the outer nodes and p(hm,t+l == ilhm-1,t == j, hm,t == k, hm+1,t == l) for the middle nodes. The prior for the first time slice is fixed and uniform. We randomly generated properly normalized transition and observation matrices and evidence given those matrices. fuitial parameters were set to another randomly generated instance. In the inner loop of both the naive and the convergent algorithm, Algorithm 1 was run for 10 iterations. Loopy belief propagation, which for dynamic Bayesian networks can be interpreted as an iterative version of the Boyen-Koller algorithm [12], converged just fine for the many instances that we have seen. The naive algorithm nicely minimizes the Bethe approximation of minus the loglikelihood L(O), as can be seen from the solid line in Figure 1(b). The Bethe approximation is fairly accurate in this model and plots of the exact loglikelihood, both those learned with exact and with approximate EM, are very similar (not shown). The convergent algorithm also works fine, but takes more time to converge (dashed line). This is to.be expected: the additional bound implied by the outer-loop E-step makes G(Q,R,(}) a looser bound of L((}) than F(Q, (}) and the tighter the bound in a bound optimization algorithm, the faster the convergence. Therefore, it makes sense to use tighter convex bounds on F(Q, (}), for example those derived in [Ill. On top of that, we can use overrelaxation, i.e., set log Q == 'TJ log R + (1 'TJ) log QO d .(up to normalization) with QOld the previous set of pseudo-marginals. See e.g. [10] for the general idea; here we took 'TJ == 1.4 fixed. Application of these two "tricks" yields the dash-dotted line. It gives an indication of how close one can bring the convergent to the naive algorithm (overrelaxation applied to the M-step affects both algorithms in the same way and is therefore not considered here). Another option is to repeat the inner and outer E-steps N times, before updating the parameters in the M-step. Plots for N ~ 3 are indistinguishable from the solid line for the naive algorithm. The above shows that the price to be paid for an algorithm that is guaranteed to converge is relatively low. Obviously, the true value of the convergent algorithm becomes clear when the naive algorithm fails. Many instances of non-convergence of loopy and especially generalized belief propagation have been reported (see e.g. [3, 11] and [12] specifically on coupled hidden Markov models). Some but not all of these problems disappear when the updates are damped, which further has the drawback of slowing down convergence as well as requiring additional tuning. In the context of the coupled hidden Markov models we observed serious problems with generalized belief propagation. For example, with a-clusters of size 12, consisting of 3 neighboring hidden and evidence nodes in two subsequent time slices, we did not manage to get the naive algorithm to converge properly. The convergent algorithm alvlays converged vlithout any problem, yielding the dotted line in Figure l(b) for the particular problem instance considered for the Bethe approximation as welL Note that, where the inner loops for the Bethe approximations take about the same amount of time (which makes the number of outer loops roughly proportional to cpu time), an inner loop for the Kikuchi approximation is in this case about two times slower. 6 Discussion The main idea of this article, that there is no need to run a converging doubleloop algorithm in an approximate E-step until convergence, only applies to directed probabilistic graphical models like Bayesian networks. In undirected graphical models like Boltzmann machines there is a global normalization constant that typically depends on all parameters .f) and is intractable to compute analytically. For this so-called partition function, the bound used in converging double-loop algorithms works in the opposite direction as the bound implicit in the EM algorithm. The convex bound of [13] does work in the right direction, but cannot (yet) handle missing values. In [14] standard loopy belief propagation is used in the inner loop of iterative proportional fitting (IPF). Also here it is not yet clear how to integrate IPF with convergent belief propagation without ending up with a triple-loop algorithm. Following the same line of reasoning, expectation maximization can be combined with expectation propagation (EP) [5]. EP can be understood as a generalization of loopy belief propagation. Besides neglecting possible loops in the gI;'aphical structure, expectation propagation can also handle projections onto an exponential family of distributions. The approximate free energy for EP is the same Bethe free energy, only the constraints are different. That is, the "strong" marginalization constraints (4) are replaced by the "weak" marginalization constraints that all subsets marginals agree upon their moments. These constraints are still linear in Qa and Q{3 and we can make the same decomposition (6) of the Bethe free energy into a convex and a concave term to derive a double-loop algorithm with a convex optimization problem in the inner loop. However, EP can have reasons for non-convergence that are not necessarily resolved with a double-loop version. For example, it can happen that while projecting onto Gaussians negative covariance matrices appear. This problem has, to the best of our knowledge, not yet been solved and is subject to ongoing research. It has been emphasized before [13] that it makes no sense to learn with approximate inference and then apply exact inference given the learned parameters. The intuition is that we tune the parameters to the evidence, incorporating the errors that are made while doing approximate inference. In that context it is important that the results of approximate inference are reproducable and the use of convergent algorithms is a relevant step in that direction. References [1] A. Dempster, N. Laird, and D. Rubin. Maximum likelihood from incomplete data via the EM algorithm. Journal of the Royal Statistical Society B, 39:1-38, 1977. [2] R. Neal and G. Hinton. A view of the EM algorithm that justifies incremental, sparse, and other variants. In M. Jordan, editor, Learning in Graphical Models, pages 355-368. Kluwer Academic Publishers, Dordrecht, 1998. [3] K. Murphy, Y. Weiss, and M. Jordan. 'Loopy belief propagation for approximate inference: An empirical study. In Proceedings of the Fifteenth Conference on Uncertainty in Articial Intelligence, pages 467-475, San Francisco, CA, 1999. Morgan Kaufmann. [4] J. Yedidia, W. Freeman, and Y. Weiss. Constructing free energy approximations and generalized belief propagation algorithms. Technical report, Mitsubishi Electric Research Laboratories, 2002. [5] T. Minka. Expectation propagation for approximate Bayesian inference. In Uncertainty in Artificial Intelligence: Proceedings of the Seventeenth Conference (UAI-2001), pages 362-369, San Francisco, CA, 2001. Morgan Kaufmann Publishers. [6] B. Frey and A. Kanna. Accumulator networks: Suitors of local probability propagation. In T. Leen, T. Dietterich, and V. Tresp, editors, Advances in Neural Information Processing Systems 13, pages 486-492. MIT Press, 2001. [7] T. Minka and J. Lafferty. Expectation propagation for the generative aspect model. In Proceedings of UAI-2002, pages 352-359, 2002. [8] A. Yuille. CCCP algorithms to minimize the Bethe and Kikuchi free energies: Convergent alternatives to belief propagation. Neural Computation, 14:16911722,2002. [9] Y. Teh and M. Welling. The unified propagation and scaling algorithm. In NIPS 14, 2002. [10] R. Salakhutdinov and S. Roweis. Adaptive overrelaxed bound optimization methods. In ICML-2003, 2003. [11] T. Heskes, K. Albers, and B. Kappen. Approximate inference and constrained optimization. In UAI-2003, 2003. [12] K. Murphy and Y. Weiss.. The factored frontier algorithm for approximate inference in DBNs. In UAI-2001, pages 378-385, 2001. [13] M. Wainwright, T. Jaakkola, and A. WHIsky. Tree-reweighted belief propagation algorithms and approximate ML estimation via pseudo-moment matching. In AISTATS-2003, 2003. [14] Y. Teh and M. Welling. On improving the efficiency of the iterative proportional fitting procedure. In AISTATS-2003, 2003.
2003
104
2,315
A Fast Multi-Resolution Method for Detection of Significant Spatial Disease Clusters Daniel B. Neill Department of Computer Science Carnegie Mellon University Pittsburgh, PA 15213 neill@cs.cmu.edu Andrew W. Moore Department of Computer Science Carnegie Mellon University Pittsburgh, PA 15213 awm@cs.cmu.edu Abstract Given an N ×N grid of squares, where each square has a count and an underlying population, our goal is to find the square region with the highest density, and to calculate its significance by randomization. Any density measure D, dependent on the total count and total population of a region, can be used. For example, if each count represents the number of disease cases occurring in that square, we can use Kulldorff’s spatial scan statistic DK to find the most significant spatial disease cluster. A naive approach to finding the maximum density region requires O(N3) time, and is generally computationally infeasible. We present a novel algorithm which partitions the grid into overlapping regions, bounds the maximum score of subregions contained in each region, and prunes regions which cannot contain the maximum density region. For sufficiently dense regions, this method finds the maximum density region in optimal O(N2) time, in practice resulting in significant (10-200x) speedups. 1 Introduction This paper develops fast methods for detection of spatial overdensities: discovery of spatial regions with high scores according to some density measure, and statistical significance testing in order to determine whether these high-density regions can reasonably have occurred by chance. A major application is in identifying clusters of disease cases, for purposes ranging from detection of bioterrorism (ex. anthrax) to environmental risk factors for diseases such as childhood leukemia ([1]-[3]). [4] discusses many other applications, including astronomy (identifying star clusters), reconnaissance, and medical imaging. Consider the case in which counts are aggregated to a uniform 2-d grid. Assume an N ×N grid of squares G, where each square si j ∈G is associated with a count ci j and an underlying population pi j. For example, a square’s count may be the number of disease cases in that geographical region in a given time period, while its population may be the total number of people “at-risk” for the disease. Our goal is to find the square region S∗⊆G with the highest density according to a density measure D: S∗= argmaxS D(S). We use the abbreviations mdr for the “maximum density region” S∗, and mrd for the “maximum region density” D(S∗), throughout. The density measure D must be an increasing function of the total count of the region, C(S) = ∑S ci j, and a decreasing function of the total population of the region, P(S) = ∑S pi j. In the case of a uniform underlying population, P(S) ∝k2, where k is the size of region S. But we focus on the more interesting case: non-uniform populations. The problem of finding significant spatial overdensities is distinct from that solved by gridbased hierarchical methods such as CLIQUE [5], MAFIA [6], and STING [7], which also look for “dense clusters.” There are three main differences: 1. Our method is applicable to any density measure D, while the other algorithms are specific to the “standard” density measure D1(S) = C(S) P(S). The D1 measure is the number of points per unit population, for example this corresponds to the region with the highest observed disease rate. Unlike many other density measures, D1 is monotonic: if a region S with density d is partitioned into any set of disjoint subregions, at least one subregion will have density d′ ≥d. Thus it is not particularly useful to find the “region” with maximum D1, since this will be the single square with highest ci j pi j . Instead, the other algorithms search for maximally sized regions with D1 greater than some threshold, relying on the monotonicity of D1 by first finding dense units (1×1 squares), then merging adjacent units in bottom-up fashion. For a non-monotonic measure such as Kulldorff’s, it is possible to have a large dense region where none of its subregions are themselves dense, so bottom-up can fail. Here, we will optimize with respect to arbitrary non-monotonic density measures, and thus use a different approach from CLIQUE, MAFIA, or STING. 2. Our method deals with non-uniform underlying populations: this is particularly important for real-world epidemiological applications, in which an overdensity of disease cases is more significant if the underlying population is large. 3. Our goal is not only to find the highest scoring region, but also to test whether that region is a true cluster or if it is likely to have occurred by chance. 1.1 The spatial scan statistic A non-monotonic density measure which is of great interest to epidemiologists is Kulldorff’s spatial scan statistic [8], which we denote by DK. This assumes that counts ci j are generated by an inhomogeneous Poisson process with mean qpi j, where q is the underlying “disease rate” (or expected value of the D1 density). We then calculate the log of the likelihood ratio of two possibilities: that the disease rate q is higher in the region than outside the region, and that the disease rate is identical inside and outside the region. For a region with count C and population P, in a grid with total count Ctot and population Ptot, we can calculate DK = Clog C P +(Ctot −C)log Ctot−C Ptot−P −Ctot log Ctot Ptot , if C P > Ctot Ptot , and 0 otherwise. [8] proved that the spatial scan statistic is individually most powerful for finding a significant region of elevated disease rate: it is more likely to detect the overdensity than any other test statistic. Note, however, that our algorithm is general enough to use any density measure, and in some cases we may wish to use measures other than Kulldorff’s. For instance, if we have some idea of the size of the maximum density region, we can use the Dr measure, Dr(S) = C(S) P(S)r , 0 < r < 1, with larger r corresponding to tests for smaller clusters. Once we have found the maximum density region (mdr) of grid G according to our density measure, we must still determine the statistical significance of this region. Since the exact distribution of the test statistic is only known in special cases (such as D1 density with a uniform underlying population), in general we must perform Monte Carlo simulation for our hypothesis test. To do so, we run a large number R of random replications, where a replica has the same underlying populations pi j as G, but assumes a uniform disease rate qrep = Ctot(G) Ptot(G) for all squares. For each replica G′, we first generate all counts ci j randomly from an inhomogeneous Poisson distribution with mean qreppi j, then compute the maximum region density (mrd) of G′ and compare this to mrd(G). The number of replicas G′ with mrd(G′) ≥mrd(G), divided by the total number of replications R, gives us the p-value for our maximum density region. If this p-value is less than .05, we can conclude that the discovered region is statistically significant (unlikely to have occurred by chance) and is thus a “spatial overdensity.” If the test fails, we have still discovered the maximum density region of G, but there is not sufficient evidence that this is an overdensity. 1.2 The naive approach The simplest method of finding the maximum density region is to compute the density of all square regions of sizes k = kmin ...N.1 Since there are (N −k + 1)2 regions of size k, there are a total of O(N3) regions to examine. We can compute the density of any region S in O(1), by first finding the count C(S) and population P(S), then applying our density measure D(C,P).2 This allows us to compute the mdr of an N ×N grid G in O(N3) time. However, significance testing by Monte Carlo replication also requires us to find the mrd for each replica G′, and compare this to mrd(G). Since calculation of the mrd takes O(N3) time for each replica, the total complexity is O(RN3), and R is typically large (we assume R = 1000). Several simple tricks may be used to speed up this procedure for cases where there is no significant spatial overdensity. First, we can stop examining a replica G′ immediately if we find a region with density greater than mrd(G). Second, we can use the Central Limit Theorem to halt our Monte Carlo testing early if, after a number of replications R′ < R, we can conclude with high confidence that the region is not significant. For cases where there is a significant spatial overdensity, the naive approach is still extremely computationally expensive, and this motivates our search for a faster algorithm. 2 Overlap-multires partitioning Since the problem of detection of spatial overdensities is closely related to problems such as kernel density estimation and kernel regression, this suggests that multi-resolution partitioning techniques such as kd-trees [9] and mrkd-trees [10] may be useful in speeding up our search. The main difference of our problem from kernel density estimation, however, is that we are only interested in the maximum density region; thus, we do not necessarily need to build a space-partitioning tree at all resolutions. Also, the assumption that counts are aggregated to a uniform grid simplifies and speeds up partitioning, eliminating the need for a computationally expensive instance-based approach. These observations suggest a top-down multi-resolution partitioning approach, in which we search first at coarse resolutions (large regions), then at successively finer resolutions as necessary. One option would be to use a “quadtree” [11], a hierarchical data structure in which each region is recursively partitioned into its top left, top right, bottom left, and bottom right quarters. However, a simple partitioning approach fails because of the non-monotonicity of our density measure: a dense region may be split into two or more separate subregions, none of which is as dense as the original region. This problem can be prevented by a partitioning approach in which adjacent regions partially overlap, an approach we call “overlap-multires partitioning.” To explain how this method works, we first define some notation. We denote a region S by an ordered triple (x,y,k), where (x,y) is the upper left corner of the region and k is its size. Next, we define the ω-children of a region S = (x,y,k) as the four overlapping subregions of size k −ω corresponding to the top left, top right, bottom left, and bottom right corners of S: (x,y,k −ω), (x + ω,y,k −ω), (x,y + ω,k −ω), and (x + ω,y + ω,k −ω). Next, we define a region as “even” if its size is 2k for some k ≥2, and “odd” if its size is 3×2k for some k ≥0. We define the “gridded children” (g-children) of an even region S = (x,y,k) as its ω-children for ω = k 4. Thus the four g-children of an even region are odd, and each overlaps 2 3 with the directly adjacent child regions. Similarly, we define the g-children of an odd region S = (x,y,k) as its ω-children for ω = k 3. Thus the four g-children of an odd region are even, and each overlaps 1 2 with the directly adjacent child regions. Note that 1We assume that a region must have size at least kmin to be significant: here kmin = 3. 2An old trick allows us to compute the count of any k×k region in O(1): we first form a matrix of the cumulative counts, then compute each region’s count by adding at most four cumulative counts. even though a region has four g-children, and each of its g-children has four g-children, it has only nine (not 16) distinct grandchildren, several of which are the child of multiple regions. Figure 1 shows the first two levels of such a tree. Figure 1: The first two levels of the overlapmutires tree. Each node represents a gridded region (denoted by a thick square) of the entire dataset (thin square and dots). Next, we assume that the size of the entire grid is a power of two: thus the entire grid G = (0,0,N) is an even region. We define the set of “gridded” regions of G as G and all of its “gridded descendents” (its g-children, g-grandchildren, etc.). Our algorithm focuses its search on the set of gridded regions, only searching non-gridded regions when necessary. This technique is useful because the total number of gridded regions is O(N2), as in the simple quadtree partitioning method. This implies that, if only gridded regions need to be searched, our total time to find the mdr of a grid is O(N2). Since it takes Ω(N2) time to generate the grid, this time bound is optimal. 2.1 Top-down pruning So when can we search only gridded regions, or alternatively, when does a given nongridded region need to be searched? Our basic method is branch-and-bound: we perform a top-down search, and speed up this search by pruning regions which cannot possibly contain the mdr. Our first step is to derive an upper bound Dmax(S,k) on the density of subregions of minimum size k contained in a given region S (Section 2.2). Then we can compare Dmax(S,k) to the density D(S∗) of the best region found so far: if Dmax(S,k) < D(S∗), we know that no subregion of S with size k or more can be the mdr. We can use this information for two types of pruning. First, if Dmax(S,kmin) < D(S∗), we know that no subregion of S can be optimal; we can prune the region completely, and not search its (gridded or non-gridded) children. Second, we can show that (for 0 < k < n) any region of size 2k + 1 or less is contained entirely in an odd gridded region of size 3 2 × 2k. Thus, if Dmax(G,2n−1 +2) < D(S∗) for the entire grid G, any optimal non-gridded region must be contained in an odd gridded region. Similarly, if Dmax(S,2k + 2) < D(S∗) for an odd gridded region S of size 3×2k, any optimal non-gridded subregion of S must be within an odd gridded subregion of S. Thus we can search only gridded regions if two conditions hold: 1) no subregion of G of size 2n−1 + 2 or more can be optimal, and 2) for each odd gridded region of size 3×2k, no subregion of size 2k +2 or more can be optimal. 2.2 Bounding subregion density To bound the maximum subregion density Dmax(S,k), we must find the highest possible score D(S′) of a subregion S′ ⊆S of size k or more. Let C = C(S), P = P(S), and K = size(S). We assume that these are known, as well as lower and upper bounds [dmin,dmax] on the D1 density of subregions of S. Let c = C(S′) and p = P(S′); these are presently unknown. We can prove that, if D(S′) > D(S), the maximum value of D(S′) occurs when S has the maximum allowable D1 density dmax, and S −S′ has the minimum allowable D1 density dmin: this gives us pdmax +(P−p)dmin = C. Thus p = C−Pdmin dmax−dmin and c = dmaxp = C−Pdmin 1−dmin/dmax . Then computing D(c, p) gives us a guaranteed upper bound on Dmax(S,k). We can place tighter bounds on Dmax(S,k) if we also have a lower bound pmin(S,k) on the population of a size k subregion S′ ⊆S: in this case, if the value calculated for p in the equation above is less than pmin, we know that D(c′, pmin), where c′ = C −(P−pmin)dmin, is a tighter upper bound for Dmax. We can bound pmin in several ways. First, if we know the minimum population ps,min of a single square s ∈S, then pmin ≥k2ps,min. Second, if we know the maximum population ps,max of a single square s ∈S, then pmin ≥P − (K2 −k2)ps,max. At the beginning of our algorithm, we calculate ps,max(S) = max pi j and ps,min(S) = min pi j (where si j ∈S) for each gridded region S. This calculation can be done recursively (bottom-up) in O(N2). The resulting population statistics are used for the original grid and for all replicas. For non-gridded regions, we use the population statistics of the region’s gridded parent (either an odd gridded region or the entire grid G); these bounds will be looser for the child region than for the parent, but are still correct. We also initially calculate dmax and dmin. This is done simply by finding the global maximum and minimum values of the D1 density: dmax = max C(S′) P(S′) (where S′ ⊆G and size(S′) = kmin), and dmin = min ci j pi j (where si j ∈G).3 Alternatively, we could compute dmax and dmin recursively (bottom-up) for each gridded region S, but in practice we find that the global values are sufficient for good performance on most test cases. 2.3 The algorithm Our algorithm, based on the overlap-multires partitioning scheme above, is a top-down, best-first search of the set of gridded regions, followed by a top-down, best-first search of any non-gridded regions as necessary. We use priority queues (q1,q2) for our search: each step of the algorithm takes the “best” (i.e. highest density) region from a queue, examines it, and (if necessary) adds its children to queues. The ω-children and g-children of a region S are defined above; note that the 1-children of S are its ω-children with ω = 1. We also assume that regions are “marked” once added to a queue, so that a region will not be searched more than once. Finally, we use the rules and density bounds derived above to speed up our search, by pruning subregions when Dmax(S,k) ≤D(S∗). The basic pseudocode outline of our method is as follows: Add G to q1. If D_max(G,N/2+2)>mrd, add 1-children(G) to q2 with k1=N/2+2. While q1 not empty: Get best region S from q1. If D(S)>mrd, set mdr=S and mrd=D(S). If D_max(S,k_min)>mrd, add g-children(S) to q1. If size(S)=3(2ˆk) and D_max(S,2ˆk+2)>mrd, add 1-children(S) to q2 with k1=2ˆk+2. While q2 not empty: Get best region S and value k1(S) from q2. If D(S)>mrd, set mdr=S and mrd=D(S). If D_max(S,k1(S))>mrd, add 1-children(S) to q2 with same k1. These steps are first performed for the original grid, allowing us to calculate its mdr and mrd. We then perform these steps to calculate the mrd of each replica; however, several techniques allow us to reduce the amount of computation necessary for a replica. First, we can stop examining a replica G′ immediately if we find a region with density greater than mrd(G). This is especially useful in cases where there is no significant spatial overdensity in G. Second, we can use mrd(G) for pruning our search on a replica G′: if Dmax(S,k) < mrd(G) for some S ⊆G′, we know that no subregion of S of size k or more can have a greater density than the mdr of the original grid, and thus we do not need to examine any of those subregions. This is especially useful where there is a significant spatial overdensity in G: a high mrd will allow large amounts of pruning on the replica grids. 3 Improving the algorithm The exact version of the algorithm uses conservative estimates of the D1 densities of S′ and S −S′ (dmax and dmin respectively), and a loose lower bound on the population of S′, to 3We can use the tighter bound for dmax since we are using it to bound the density of a square region S′ of size at least kmin; we cannot use the tighter bound for dmin since S−S′ is not square. calculate Dmax(S,k). This results in a loose upper bound on Dmax which is guaranteed to be correct, but allows little pruning to be done. We can derive tighter bounds on Dmax in two ways: by using a closer approximation to the D1 density of S −S′, and by using a tighter lower bound on the population of S′. These improvements are discussed below. 3.1 The outer density approximation To derive tighter bounds on the maximum density of a subregion S′ contained in a given region S, we first note that (under both the null hypothesis and the alternative hypothesis) we assume that at most one disease cluster Sdc exists, and that the disease rate q is expected to be uniform outside Sdc (or uniform everywhere, if no disease cluster exists). Thus, if Sdc is contained entirely in the region under consideration S, we would expect that the maximum density subregion S′ of S is Sdc, and that the disease rate of S−S′ is equal to the disease rate outside S: E h C−c P−p i = Ctot−C Ptot−P = dout. Assuming that the D1 density of S−S′ is equal to its expected value dout, we obtain the equation pdmax +(P−p)dout = C. Solving for p, we find p = C−Pdout dmax−dout . Then Dmax(S,k) = D(c, p), where c = dmaxp. The problem with this approach is that we have not compensated for the variance in densities: our calculated value of Dmax is an upper bound for the maximum subregion density D(S′) only in the most approximate probabilistic sense. We would expect the D1 density of S−S′ to be less than its expected value half the time, and thus we would expect D(S′) to be less than Dmax at least half the time; in practice, our bound will be correct more often, since we are still using a conservative approximation of the D1 density of S′. Note also that we expect to underestimate Dmax if the disease cluster Sdc is not contained entirely in S: this is acceptable (and desirable) since a region not containing Sdc does not need to be expanded. We can improve the correctness of our probabilistic bound by also considering the variance of C−c P−p −Ctot−C Ptot−P . Assuming that all counts outside Sdc are generated by a inhomogeneous Poisson distribution with parameter qpi j, we obtain: σ2 h C−c P−p −Ctot−C Ptot−P i = σ2 hPo(q(P−p)) P−p −Po(q(Ptot−P)) Ptot−P i = q P−p + q Ptot−P = q(Ptot−p) (P−p)(Ptot−P). Since the actual value of the parameter q is not known, we use a conservative empirical estimate: q = Ctot Ptot−p. From this, we obtain σ h C−c P−p −Ctot−C Ptot−P i = q Ctot (P−p)(Ptot−P). Then we can compute p by solving pdmax +(P−p)(dout −bσ) = C, and obtain c = dmaxp and Dmax = D(c, p) as before. By adjusting our approximation of the minimum density in this manner, we compute a higher score Dmax, reducing the likelihood that we will underestimate the maximum subregion density and prune a region that should not necessarily be pruned. Given a constant b, the D1 density of S −S′ will be greater than dout −bσ with probability P(Z < b), where Z is chosen randomly from the unit normal. For b = 2, there is an 98% chance that we will underestimate D1(S−S′), giving a guaranteed correct upper bound for the maximum subregion density. In practice, the maximum subregion density will be lower than our computed value of Dmax more often, since our estimates for dmax and q are conservative. Thus, though our algorithm is approximate, it is very likely to converge to the globally optimal mdr. In fact, our experiments demonstrate that b = 1 is sufficient to obtain the correct region with over 90% probability, approaching 100% for sufficiently dense regions. 3.2 Cached population statistics A final step in making the algorithm tractable is to cache certain statistics about the minimum populations of subsquares of gridded regions. This is only performed once: it need not be repeated for each replica (since populations need not be randomized). Although there is no room to describe it, we have empirically shown it to give an important acceleration if populations are highly non-uniform. The results below make use of this. 4 Results We first describe results with artificially generated grids and then real-world case data. An artificial grid is generated from a set of parameters (N, k, µ, σ, q′, q′′). The grid generator first creates an N ×N grid, and randomly selects a k ×k “test region.” Then the population of each square is chosen randomly from a normal distribution with mean µ and standard deviation σ (populations less than zero are set to zero). Finally, the count of each square is chosen randomly from a Poisson distribution with parameter qpi j, where q = q′ inside the test region and q = q′′ outside the test region. We tested three different adjustments for density variance (b = 0,1,2). The approximate algorithm was tested for grids of size N = 512; test region sizes of k = 16 and k = 4 were used, and the disease rate q was set to .002 inside the test region and .001 outside the test region. We used three different population distributions for testing: the “standard” distribution (µ = 104, σ = 103), and two types of “highly varying” populations. For the “city” distribution, we randomly selected a “city region” with size 16: square populations were generated with µ = 107 and σ = 106 inside the city, and µ = 104 and σ = 103 outside the city. For the “high-σ” distribution, we generated all square populations with µ = 104 and σ = 5 × 103. We first compared the performance of each variant of the algorithm to the naive approach for the three test cases; see Table 1 for results. For large test regions (k = 16), all variants of the algorithm had runtimes of ∼20 minutes, as compared to 44 hours for the naive approach, a speedup of 122-155x. For small test regions (k = 4), we observed that performance generally decreased with increasing b: the algorithm achieved average speedups of 133x for b = 0, 61x for b = 1, and 18x for b = 2. Next, we tested accuracy by generating 50 artificial grids for each population distribution, and computing the percentage of test grids on which the algorithm was able to find the correct mdr (see Table 2). For the large test region (k = 16), all variants were able to find the correct mdr with high (97-100%) accuracy. For the small test region, accuracy improved significantly with increasing b: the non-variance adjusted version (b = 0) achieved only 45% accuracy, while the variance adjusted versions (b = 1 and b = 2) achieved 89% and 99% accuracy respectively. These results demonstrate that the approximate algorithm (with variance adjustment and cached population statistics) is able to achieve high performance and accuracy even for very small test regions and highly non-uniform populations. Finally, we measured the performance of the approximate algorithm on a grid generated from real-world data. We used a database of (anonymized) Emergency Department data collected from Western Pennsylvania hospitals in the period 1999-2002. This dataset contained a total of 630,000 records, each representing a single ED visit and giving the latitude and longitude of the patient’s home location to the nearest .005 degrees (∼1 3 mile, a sufficiently low resolution to ensure anonymity). For each record, the latitude L and longitude l were converted to a grid square si j by i = L−Lmin .005 and j = l−lmin .005 ; this created a 512×512 grid. We tested for spatial clustering of “recent” disease cases: the “count” of each square was the number of ED visits in that square in the last two months, and the “population” of that square was the total number of ED visits in that square. See Figure 2 for a picture of this dataset, including the highest scoring region. We tested six variants of the approximate algorithm on the ED dataset; the presence/absence of cached population statistics did not significantly affect the performance or accuracy for this test, so we focus on the variation in b. All three variants (b = 0,1,2), as well as the naive algorithm, found the maximum density region (of size 101) and found it statistically significant (p-value 0/1000). The major difference, of course, was in runtime and number of regions searched (see Table 3). The naive algorithm took 2.7 days to find the mdr and perform 1000 Monte Carlo replications, while each of the variants of the approximate algorithm performed the same task in ∼2 hours or less. The approximate algorithm took 19 minutes (a speedup of 209x) for b = 0, 47 minutes (a speedup of 85x) for b = 1, and 126 minutes (a speedup of 31x) for b = 2. Thus we can see that all three variants find the correct region in much less time than Figure 2: The left picture shows the “population” distribution within Western PA and the right picture shows the “counts” distribution. The winning region is shown as a square. Table 1: Performance of algorithm, N = 512 method test time (orig+1000 reps) speedup naive all 2 : 37+43 : 36 : 40 x1 b = 0 std, k = 16 0 : 42+16 : 40 x151 b = 1 std, k = 16 0 : 43+16 : 20 x154 b = 2 std, k = 16 0 : 41+17 : 00 x148 b = 0 std, k = 4 0 : 41+17 : 00 x148 b = 1 std, k = 4 0 : 41+29 : 10 x88 b = 2 std, k = 4 0 : 42+1 : 13 : 00 x36 b = 0 city, k = 16 0 : 42+16 : 30 x153 b = 1 city, k = 16 0 : 46+20 : 40 x122 b = 2 city, k = 16 0 : 41+18 : 40 x135 b = 0 city, k = 4 0 : 43+24 : 30 x104 b = 1 city, k = 4 0 : 44+2 : 11 : 00 x20 b = 2 city, k = 4 0 : 47+7 : 06 : 50 x6.1 b = 0 high-σ, k = 16 0 : 41+17 : 00 x148 b = 1 high-σ, k = 16 0 : 41+16 : 40 x151 b = 2 high-σ, k = 16 0 : 41+17 : 00 x148 b = 0 high-σ, k = 4 0 : 44+17 : 15 x146 b = 1 high-σ, k = 4 0 : 45+34 : 10 x75 b = 2 high-σ, k = 4 1 : 08+3 : 20 : 00 x13 Table 2: Accuracy of algorithm method test accuracy accuracy (k = 16) (k = 4) b = 0 standard 96% 52% b = 0 city 98% 36% b = 0 high-σ 98% 46% b = 1 standard 100% 90% b = 1 city 100% 88% b = 1 high-σ 100% 90% b = 2 standard 100% 98% b = 2 city 100% 98% b = 2 high-σ 100% 100% Table 3: Emergency Dept. dataset method time (orig+1000 reps) speedup naive 4 : 05+65 : 50 : 00 x1 b = 0 4 : 20+14 : 36 x209 b = 1 4 : 22+42 : 20 x85 b = 2 4 : 36+2 : 01 : 12 x31 the naive approach. This is very important for applications such as real-time detection of disease outbreaks: if a system is able to detect an outbreak in minutes rather than days, preventive measures or treatments can be administered earlier, possibly saving many lives. Thus we have presented a fast overlap-multires partitioning algorithm for detection of spatial overdensities, and demonstrated that this method results in significant (10-200x) speedups on real and artificially generated datasets. We are currently applying this algorithm to national-level hospital and pharmacy data, attempting to detect statistically significant indications of a disease outbreak based on changes in the spatial clustering of disease cases. Application of a fast partitioning method using the techniques presented here may allow us to achieve the difficult goal of automatic real-time detection of disease outbreaks. References [1] S. Openshaw, et al. 1988. Investigation of leukemia clusters by use of a geographical analysis machine. Lancet 1, 272-273. [2] L. A. Waller, et al. 1994. Spatial analysis to detect disease clusters. In N. Lange, ed. Case Studies in Biometry. Wiley, 3-23. [3] M. Kulldorff and N. Nagarwalla. 1995. Spatial disease clusters: detection and inference. Statistics in Medicine 14, 799-810. [4] M. Kulldorff. 1999. Spatial scan statistics: models, calculations, and applications. In Glaz and Balakrishnan, eds. Scan Statistics and Applications. Birkhauser: Boston, 303-322. [5] R. Agrawal, et al. 1998. Automatic subspace clustering of high dimensional data for data mining applications. Proc. ACMSIGMOD Intl. Conference on Management of Data, 94-105. [6] S. Goil, et al. 1999. MAFIA: efficient and scalable subspace clustering for very large data sets. Northwestern University, Technical Report No. CPDC-TR-9906-010. [7] W. Wang, et al. 1997. STING: a statistical information grid approach to spatial data mining. Proc. 23rd Conference on Very Large Databases, 186-195. [8] M. Kulldorff. 1997. A spatial scan statistic. Communications in Statistics: Theory and Methods 26(6), 1481-1496. [9] F. P. Preparata and M. I. Shamos. 1985. Computational Geometry: An Introduction. Springer-Verlag: New York. [10] K. Deng and A. W. Moore. 1995. Multiresolution instance-based learning. Proc. 12th Intl. Joint Conference on Artificial Intelligence, 1233-1239. [11] H. Samet. 1990. The Design and Analysis of Spatial Data Structures. Addison-Wesley: Reading.
2003
105
2,316
Computing Gaussian Mixture Models with EM using Equivalence Constraints Noam Shental Computer Science & Eng. Center for Neural Computation Hebrew University of Jerusalem Jerusalem, Israel 91904 fenoam@cs.huji.ac.il Aharon Bar-Hillel Computer Science & Eng. Center for Neural Computation Hebrew University of Jerusalem Jerusalem, Israel 91904 aharonbh@cs.huji.ac.il Tomer Hertz Computer Science & Eng. Center for Neural Computation Hebrew University of Jerusalem Jerusalem, Israel 91904 tomboy@cs.huji.ac.il Daphna Weinshall Computer Science & Eng. Center for Neural Computation Hebrew University of Jerusalem Jerusalem, Israel 91904 daphna@cs.huji.ac.il Abstract Density estimation with Gaussian Mixture Models is a popular generative technique used also for clustering. We develop a framework to incorporate side information in the form of equivalence constraints into the model estimation procedure. Equivalence constraints are defined on pairs of data points, indicating whether the points arise from the same source (positive constraints) or from different sources (negative constraints). Such constraints can be gathered automatically in some learning problems, and are a natural form of supervision in others. For the estimation of model parameters we present a closed form EM procedure which handles positive constraints, and a Generalized EM procedure using a Markov net which handles negative constraints. Using publicly available data sets we demonstrate that such side information can lead to considerable improvement in clustering tasks, and that our algorithm is preferable to two other suggested methods using the same type of side information. 1 Introduction We are used to thinking about learning from labels as supervised learning, and learning without labels as unsupervised learning, where ’supervised’ implies the need for human intervention. However, in unsupervised learning we are not limited to using data statistics only. Similarly supervised learning is not limited to using labels. In this work we focus on semi-supervised learning using side-information, which is not given as labels. More specifically, we use unlabeled data augmented by equivalence constraints between pairs of data points, where the constraints determine whether each pair was generated by the same source or by different sources. Such constraints may be acquired without human intervention in a broad class of problems, and are a natural form of supervision in other scenarios. We show how to incorporate equivalence constraints into the EM algorithm [1], in order to fit a generative Gaussian mixture model to the data. Density estimation with Gaussian mixture models is a popular generative technique, mostly because it is computationally tractable and often produces good results. However, even when the approach is successful, the underlying assumptions (i.e., that the data is generated by a mixture of Gaussian sources) may not be easily justified. It is therefore important to have additional information which can steer the GMM estimation in the “right” direction. In this paper we propose to incorporate equivalence constraints into an EM parameter estimation algorithm. One added value may be a faster convergence to a high likelihood solution. Much more importantly, the constraints change the GMM likelihood function and therefore may lead the estimation procedure to choose a better solution which would have otherwise been rejected (due to low relative likelihood in the unconstrained GMM density model). Ideally the solution obtained with side information will be more faithful to the desired results. A simple example demonstrating this point is shown in Fig. 1. Unconstrained constrained unconstrained constrained (a) (b) (c) (d) Figure 1: Illustrative examples for the importance of equivalence constraints. Left: the data set consists of 2 vertically aligned classes - (a) given no additional information, the EM algorithm identifies two horizontal classes, and this can be shown to be the maximum likelihood solution (with log likelihood of −3500 vs. log likelihood of −2800 for the solution in (b)); (b) additional side information in the form of equivalence constraints changes the probability function and we get a vertical partition as the most likely solution. Right: the dataset consists of two classes with partial overlap - (c) without constraints the most likely solution includes two non-overlapping sources; (d) with constraints the correct model with overlapping classes was retrieved as the most likely solution. In all plots only the class assignment of novel un-constrained points is shown. Equivalence constraints are binary functions of pairs of points, indicating whether the two points come from the same source or from two different sources. We denote the first case as “is-equivalent” constraints, and the second as “not-equivalent” constraints. As it turns out, “is-equivalent” constraints can be easily incorporated into EM, while “not-equivalent” constraints require heavy duty inference machinery such as Markov networks. We describe the derivations in Section 2. Our choice to use equivalence constraints is motivated by the relative abundance of equivalence constraints in real life applications. In a broad family of applications, equivalence constraints can be obtained without supervision. Maybe the most important source of unsupervised equivalence constraints is temporal continuity in data; for example, in video indexing a sequence of faces obtained from successive frames in roughly the same location are likely to contain the same unknown individual. Furthermore, there are several learning applications in which equivalence constraints are the natural form of supervision. One such scenario occurs when we wish to enhance a retrieval engine using supervision provided by its users. The users may be asked to help annotate the retrieved set of data points, in what may be viewed as ’generalized relevance feedback’. The categories given by the users have subjective names that may be inconsistent. Therefore, we can only extract equivalence constraints from the feedback provided by the users. Similar things happen in a ’distributed learning’ scenario, where supervision is provided by several uncoordinated teachers. In such scenarios, when equivalence constraints are obtained in a supervised manner, our method can be viewed as a semi-supervised learning technique. Most of the work in the field of semi-supervised learning focused on the case of partial labels augmenting a large unlabeled data set [4, 8, 5]. A few recent papers use side information in the form of equivalence constraints [6, 7, 10]. In [9] equivalence constraints were introduced into the K-means clustering algorithm. The algorithm is closely related to our work since it allows for the incorporation of both “isequivalent” and “not-equivalent” constraints. In [3] equivalence constraints were introduced into the complete linkage clustering algorithm. In comparison with both approaches, we gain significantly better clustering results by introducing the constraints into the EM algorithm. One reason may be that the EM of a Gaussian mixture model is preferable as a clustering algorithm. More importantly, the probabilistic semantics of the EM procedure allows for the introduction of constraints in a principled way, thus overcoming many drawbacks of the heuristic approaches. Comparative results are given in Section 3, demonstrating the very significant advantage of our method over the two alternative constrained clustering algorithms using a number of data sets from the UCI repository and a large database of facial images [2]. 2 Constrained EM: the update rules A Gaussian mixture model (GMM) is a parametric statistical model which assumes that the data originates from a weighted sum of several Gaussian sources. More formally, a GMM is given by p(x|Θ) = ΣM l=1αlp(x|θl), where αl denotes the weight of each Gaussian, θl its respective parameters, and M denotes the number of Gaussian sources in the GMM. EM is a widely used method for estimating the parameter set of the model (Θ) using unlabeled data [1]. Equivalence constraints modify the ’E’ (expectation computation) step, such that the sum is taken only over assignments which comply with the given constraints (instead of summing over all possible assignments of data points to sources). It is important to note that there is a basic difference between “is-equivalent” (positive) and “not-equivalent” (negative) constraints: While positive constraints are transitive (i.e. a group of pairwise “is-equivalent” constraints can be merged using a transitive closure), negative constraints are not transitive. The outcome of this difference is expressed in the complexity of incorporating each type of constraint into the EM formulation. Therefore, we begin by presenting a formulation for positive constraints (Section 2.1), and then present a different formulation for negative constraints (Section 2.2). A unified formulation for both types of constraints immediately follows, and the details are therefore omitted. 2.1 Incorporating positive constraints Let a chunklet denote a small subset of data points that are known to belong to a single unknown class. Chunklets may be obtained by applying the transitive closure to the set of “is-equivalent” constraints. Assume as given a set of unlabeled data points and a set of chunklets. In order to write down the likelihood of a given assignment of points to sources, a probabilistic model of how chunklets are obtained must be specified. We consider two such models: 1. Chunklets are sampled i.i.d, with respect to the weight of their corresponding source (points within each chunklet are also sampled i.i.d). 2. Data points are sampled i.i.d, without any knowledge about their class membership, and only afterwards chunklets are selected from these points. The first assumption may be appropriate when chunklets are automatically obtained using temporal continuity. The second sampling assumption is appropriate when equivalence constraints are obtained using distributed learning. When incorporating these sampling assumptions into the EM formulation for GMM fitting, different algorithms are obtained: Using the first assumption we obtain closed-form update rules for all of the GMM parameters. When the second sampling assumption is used there is no closed-form solution for the sources’ weights. In this section we therefore restrict the discussion to the first sampling assumption only; the discussion of the second sampling assumption, where generalized EM must be used, is omitted. More specifically, let p(x) = PM l=1 αl pl(x|θl) denote our GMM. Each pl(x|θl) term is a Gaussian parameterized by θl = (µl, Σl) with a mixing coefficient αl. Let X denote the set of all data points, X = {xi}N i=1. Let {Xj}L j=1, L ≤N denote the distinct chunklets, where each Xj is a set of points xi such that SL j=1 Xj = {xi}N i=1 (unconstrained data points appear as chunklets of size one). Let Y = {yi}N i=1 denote the source assignment of the respective data-points, and Yj = {y1 j . . . y|Xj| j } denote the source assignment of the chunklet Xj. Finally, let EΩdenote the event {Y complies with the constraints}. The expectation of the log likelihood is the following: E[log(p(X, Y|Θnew, EΩ))|X Θold, EΩ] = X Y log(p(X, Y|Θnew, EΩ)) ·p(Y|X, Θold, EΩ) (1) where P Y stands for a summation over all assignments of points to sources: P Y ≡ PM y1=1 . . . PM yN=1. In the following discussion we shall also reorder the sum according to chunklets: P Y ≡P Y1 . . . P YL, where P Yj stands for P yj 1 · · · P yj |Xj |. First, using Bayes rule and the independence of chunklets, we can write p(Y|X, Θold, EΩ) = p(EΩ|Y, X, Θold) p(Y|X, Θold) P Y p(EΩ|Y, X, Θold) p(Y|X, Θold) = QL j=1 δYj p(Yj|Xj, Θold) P Y1 . . . P YL QL j=1 δYj p(Yj|Xj, Θold) (2) where δYj ≡δyj 1,...,yj |Xj | equals 1 if all the points in chunklet i have the same label, and 0 otherwise. Next, using chunklet independence and the independence of points within a chunklet we see that p(X, Y|Θnew, EΩ) = p(Y|Θnew, EΩ) p(X|Y, Θnew, EΩ) = L Y j=1 αyj N Y i=1 p(xi|yi, Θnew) Hence the log-likelihood is: log p(X, Y|Θnew, EΩ) = L X j=1 X xi∈Xj log p(xi|yi, Θnew) + L X j=1 log(αyj) (3) Finally, we substitute (3) and (2) into (1); after some manipulations, we obtain the following expression: E(LogLikelihood) = M X l=1 L X j=1 X xi∈Xj log p(xi|l, Θnew) · p(Yj = l|Xj, Θold) + M X l=1 L X j=1 log αl · p(Yj = l|Xj, Θold) where the chunklet posterior probability is: p(Yj = l|Xj, Θold) = αold l Q xi∈Xj p(xi|yj i = l, Θold) PM m=1 αold m Q xi∈Xj p(xi|yj i = m, Θold) To find the update rule for each parameter, we differentiate (4) with respect to µl, Σl and αl. We get the following rules: αnew l = 1 L L X j=1 p(Yj = l|Xj, Θold) µnew l = PL j=1 ¯Xjp(Yj = l|Xj, Θold)|Xj| PL j=1 p(Yj = l|Xj, Θold)|Xj| Σnew l = PL j=1 Σnew jl p(Yj = l|Xj, Θold)|Xj| PL j=1 p(Yj = l|Xj, Θold)|Xj| where ¯Xj denotes the sample mean of the points in chunklet j, |Xj| denotes the number of points in chunklet j, and Σnew jl denotes the sample covariance matrix of the jth chunklet of the lth class. As can be readily seen, the update rules above effectively treat each chunklet as a single data point weighed according to the number of elements in it. 2.2 Incorporating negative constraints The probabilistic description of a data set using a GMM attaches to each data point two random variables: an observable and a hidden. The hidden variable of a point describes its source label, while the data point itself is an observed example from the source. Each pair of observable and hidden variables is assumed to be independent of the other pairs. However, negative equivalence constraints violate this assumption, as dependencies between the hidden variables are introduced. Specifically, assume we have a group Ω= {(a1 i , a2 i )}P i=1 of index pairs corresponding to P pairs of points that are negatively constrained, and define the event EΩ= {Y complies with the constraints}. Now p(X, Y|Θ, EΩ) = p(X|Y, Θ, EΩ) p(Y|Θ, EΩ) = p(X|Y, Θ) p(EΩ|Y) p(Y|Θ) p(EΩ|Θ) Let Z denote the constant p(EΩ|Θ). Assuming sample independence, it follows that p(X|Y, Θ) · p(Y|Θ) = QN i=1 p(yi|Θ)p(xi|yi, Θ). By definition p(EΩ|Y) = 1Y∈EΩ, hence p(X, Y|Θ, EΩ) = 1 Z 1Y∈EΩ N Y i=1 p(yi|Θ)p(xi|yi, Θ) (4) Expanding 1Y∈EΩgives the following expression p(X, Y|Θ, EΩ) = 1 Z Y (a1 i ,a2 i ) (1 −δya1 i ,ya2 i ) N Y i=1 p(yi|Θ)p(xi|yi, Θ) (5) As a product of local components, the distribution in (5) can be readily described using a Markov network. The network nodes are the hidden source variables and the observable data point variables. The potential p(xi|yi, Θ) connects each observable data point, in a Gaussian manner, to a hidden variable corresponding to the label of its source. Each hidden source node holds an initial potential of p(yi|Θ) reflecting the prior of the cluster weights. Negative constraints are expressed by edges between hidden variables which prevent them from having the same value. A potential over an edge (a1 i −a2 i ) is expressed by 1−δya1 i ,ya2 i (see Fig. 2). Figure 2: An illustration of the Markov network required for incorporating “not-equivalent” constraints. Data points 1 and 2 have a negative constraint, and so do points 2 and 3. We derived an EM procedure which maximizes log(p(X|Θ, EΩ)) entailed by this distribution. The update rules for µl and Σl are still µnew l = PN i=1 xip(yi = l|X, Θold, EΩ) PN i=1 p(yi = l|X, Θold, EΩ) , Σnew l = PN i=1 c Σilp(yi = l|X, Θold, EΩ) PN i=1 p(yi = l|X, Θold, EΩ) where c Σil = (xi −µnew l )(xi −µnew l )T denotes the sample covariance matrix. Note, however, that now the vector of probabilities p(yi = l|X, Θold, EΩ) is inferred using the net. The update rule of αl = p(yi = l|Θnew, EΩ) is more intricate, since this parameter appears in the normalization factor Z in the likelihood expression (4): Z = p(EΩ|Θ) = X Y p(Y|Θ)p(EΩ|Y) = X y1 ... X yN N Y i=1 αyi Y (a1 i ,a2 i ) (1 −δya1 i ,ya2 i ) (6) This factor can be calculated using a net which is similar to the one discussed above but lacks the observable nodes. We use such a net to calculate Z and differentiate it w.r.t αl, after which we perform gradient ascent. Alternatively, we can approximate Z by assuming that the pairs of negatively constrained points are disjoint. Using such an assumption, Z is reduced to the relatively simple expression: Z = (1 −PM i=1 α2 i )P . This expression for Z can be easily differentiated, and can be used in the Generalized EM scheme. Although the assumption is not valid in most cases, it is a reasonable approximation in sparse networks, and our empirical tests show that it gives good results. 3 Experimental results In order to evaluate the performance of our EM derivations and compare it to the constrained K-means [9] and constrained complete linkage [3] algorithms, we tested all 3 algorithms using several data sets from the UCI repository and a real multi-class facial image database [2]. We simulated a ’distributed learning’ scenario in order to obtain side information. In this scenario equivalence constraints are obtained by employing N uncoordinated teachers. Each teacher is given a random selection of K data points from the data set, and is then asked to partition this set of points into equivalence classes. The constraints provided a b c d e f g h i a b c d e f g h i 0.5 0.6 0.7 0.8 0.9 1 "little" "much" BALANCE N=625 d=4 C=3 f1/2 a b c d e f g h i a b c d e f g h i 0.5 0.6 0.7 0.8 0.9 1 "little" "much" BOSTON N=506 d=13 C=3 f1/2 a b c d e f g h i a b c d e f g h i 0.5 0.6 0.7 0.8 0.9 1 "little" "much" IONOSPHERE N=351 d=34 C=2 f1/2 a b c d e f g h i a b c d e f g h i 0.5 0.6 0.7 0.8 0.9 1 "little" "much" PROTEIN N=116 d=20 C=6 f1/2 a b c d e f g h i a b c d e f g h i 0.5 0.6 0.7 0.8 0.9 1 "little" "much" WINE N=168 d=12 C=3 f1/2 a b c d e f g h i a b c d e f g h i 0.1 0.2 0.3 0.4 0.5 0.6 0.7 0.8 0.9 "little" "much" YaleB N=640 d=60 C=10 f1/2 Figure 3: Combined precision and recall scores (f 1 2 ) of several clustering algorithms over 5 data sets from the UCI repository, and 1 facial image database (YaleB). The YaleB dataset contained a total of 640 images including 64 frontal pose images of 10 different subjects. In this dataset the variability between images of the same person was due mainly to different lighting conditions. Results are presented for the following algorithms: (a) K-means, (b) constrained K-means using only positive constraints, (c) constrained K-means using both positive and negative constraints, (d) complete linkage, (e) complete linkage using positive constraints, (f) complete linkage using both positive and negative constraints, (g) regular EM, (h) EM using positive constraints, and (i) EM using both positive and negative constraints. In each panel results are shown for two cases, using 15% of the data points in constraints (left bars) and 30% of the points constrained (right bars). The results were averaged over 100 realizations of constraints for the UCI datasets, and 1000 realizations for the YaleB dataset. Also shown are the names of the data sets used and some of their parameters: N - the size of the data set; C - the number of classes; d - the dimensionality of the data. by the teachers are gathered and used as equivalence constraints. Each of the 3 algorithms (constrained EM, constrained K-means, and constrained complete linkage) was tested in three modes: (i) basic algorithm without using any side information, (ii) constrained version using only positive equivalence constraints, and (iii) constrained version using both positive and negative equivalence constraints. The results of the 9 algorithmic variants are compared in Fig. 3. In the simulations, the number of constrained points was determined by the number of teachers N and the size of the subset K given to each. By controlling the product NK we controlled the amount of side information provided to the learning algorithms. We experimented with two conditions: using “little” side information (approximately 15% of the data points are constrained) and using “much” side information (approximately 30% of the points are constrained). All algorithms were given initial conditions that did not take into account the available equivalence constraints. The results were evaluated using a combined measure of precision P and recall R scores: f 1 2 = 2P R R+P . Several effects can clearly be seen in the results reported in Fig. 3: • The constrained EM outperformed the two alternative algorithms in almost all cases, while showing substantial improvement over the baseline EM. The one case where constrained complete linkage outperformed all other algorithms involved the “wine” dataset. In this dataset the data lies in a high-dimensional space (R12) and therefore the number of model parameters to be estimated by the EM algorithm is relatively large. The EM procedure was not able to fit the data well even with constraints, probably due to the fact that only 168 data points were available for training. • Introducing side information in the form of equivalence constraints clearly improves the results of both K-means and the EM algorithms. This is not always true for the constrained complete linkage algorithm. As the amount of sideinformation increases, performance typically improves. • Most of the improvement can be attributed to the positive constraints, and can be achieved using our closed form EM version. In most cases adding the negative constraints contributes a small but significant improvement over results obtained when using only positive constraints. References [1] A. P. Dempster, N. M. Laird, and D. B. Rubin. Maximum likelihood from incomplete data via the EM algorithm. JRSSB, 39:1–38, 1977. [2] A. Georghiades, P.N. Belhumeur, and D.J. Kriegman. From few to many: Generative models for recognition under variable pose and illumination. IEEE international Conference on Automatic Face and Gesture Recognition, pages 277–284, 2000. [3] D. Klein, Sepandar D. Kamvar, and Christopher D. Manning. From instance-level constraints to space-level constraints: Making the most of prior knowledge in data clustering. In ICML, 2002. [4] D. Miller and S. Uyar. A mixture of experts classifier with learning based on both labelled and unlabelled data. In M. C. Mozer, M. I. Jordan, and T. Petsche, editors, NIPS 9, pages 571–578. MIT Press, 1997. [5] K. Nigam, A.K. McCallum, S. Thrun, and T.M. Mitchell. Learning to classify text from labeled and unlabeled documents. In Proceedings of AAAI-98, pages 792–799, Madison, US, 1998. AAAI Press, Menlo Park, US. [6] P.J. Phillips. Support vector machines applied to face recognition. In M. C. Mozer, M. I. Jordan, and T. Petsche, editors, NIPS 11, page 803ff. MIT Press, 1998. [7] N. Shental, T. Hertz, D. Weinshall, and M. Pavel. Adjustment learning and relevant component analysis. In A. Heyden, G. Sparr, M. Nielsen, and P. Johansen, editors, Computer Vision ECCV 2002, volume 4, page 776ff, 2002. [8] M. Szummer and T. Jaakkola. Partially labeled classification with markov random walks. In NIPS, volume 14. The MIT Press, 2001. [9] K. Wagstaff, C. Cardie, S. Rogers, and S. Schroedl. Constrained K-means clustering with background knowledge. In Proc. 18th International Conf. on Machine Learning, pages 577– 584. Morgan Kaufmann, San Francisco, CA, 2001. [10] E.P Xing, A.Y. Ng, M.I. Jordan, and S. Russell. Distance metric learnign with application to clustering with side-information. In Advances in Neural Information Processing Systems, volume 15. The MIT Press, 2002.
2003
106
2,317
Convex Methods for Transduction Tijl De Bie ESAT-SCD/SISTA, K.U.Leuven Kasteelpark Arenberg 10 3001 Leuven, Belgium tijl.debie@esat.kuleuven.ac.be Nello Cristianini Department of Statistics, U.C.Davis 360 Kerr Hall One Shields Ave. Davis, CA-95616 nello@support-vector.net Abstract The 2-class transduction problem, as formulated by Vapnik [1], involves finding a separating hyperplane for a labelled data set that is also maximally distant from a given set of unlabelled test points. In this form, the problem has exponential computational complexity in the size of the working set. So far it has been attacked by means of integer programming techniques [2] that do not scale to reasonable problem sizes, or by local search procedures [3]. In this paper we present a relaxation of this task based on semidefinite programming (SDP), resulting in a convex optimization problem that has polynomial complexity in the size of the data set. The results are very encouraging for mid sized data sets, however the cost is still too high for large scale problems, due to the high dimensional search space. To this end, we restrict the feasible region by introducing an approximation based on solving an eigenproblem. With this approximation, the computational cost of the algorithm is such that problems with more than 1000 points can be treated. 1 Introduction The general transduction task is the following: given a training set of labelled data, and a working set of unlabelled data (also called transduction samples), estimate the value of a classification function at the given points in the working set. Statistical learning results [1] suggest that this setting should deliver better results than the traditional ‘inductive’ setting, where a function needs to be learned first and only later tested on a test set of points chosen after the learning has been completed. Different algorithms have been proposed so far to take advantage of this advance knowledge of the test points (such as in [1], [2], [3], [4], [5], [6] and others). Given this general task, much research has been concentrated on a specific approach to transduction (first proposed by Vapnik [1]), based on the use of Support Vector Machines (SVM’s). In this case, the algorithm is aimed at finding a separating hyperplane for the training set that is also maximally distant from the (unlabelled) working set. This hyperplane is used to predict the labels for the working set points. In this form, the problem has exponential computational complexity, and several approaches have been attempted to solve it. Generally they involve some form of local search [3], or integer programming methods [2]. A recent development of convex optimization theory is Semi Definite Programming (SDP), a branch of that field aimed at optimizing over the cone of semi positive definite (SPD) matrices. One of its main attractions is that it has proven successful in constructing tight convex relaxations of hard combinatorial optimization problems [7]. SDP has recently been applied successfully to machine learning problems [8]. In this paper we show how to relax the problem of transduction into an SDP problem, that can then be solved by (polynomial time) convex optimization methods. Empirical results on mid-sized data sets are very promising, however, due to the dimensionality of the feasible region of the relaxed parameters, still the algorithm complexity appears too large to tackle large scale problems. Therefore, we subsequently shrink the feasible region by making an approximation that is based on a spectral clustering method. Positive empirical results will be given. Formal definition: transductive SVM. Based on the dual of the 1-norm soft margin SVM with zero bias1, the dual formulation of the transductive SVM optimization problem can be written as a minimization of the dual SVM cost function (which is the inverse margin plus training errors) over label matrix Γ ([1], p. 437): min Γ max α 2α′e −α′(K ⊙Γ)α (1) s.t. C ≥αi ≥0 (2) Γ =  yt yw  ·  yt yw ′ (3) yw i ∈{1, −1} (4) The (symmetric) matrix Γ is thus parameterized by the unknown working set label vector yw ∈{−1, 1}nw (with nw the size of the working set). The vector yt ∈{−1, 1}nt (with nt the number of training points) is the given fixed vector containing the known labels for the training points. The (symmetric) matrix K ∈ℜ(nw+nt)×(nw+nt) is the entire kernel matrix on the training set together with the working set. The dual vector is denoted by α ∈ℜnw+nt, and e is a vector of appropriate size containing all ones. The symbol ⊙represents the elementwise matrix product. It is clear indeed this is a combinatorial problem. The computational complexity scales exponentially in the size of the working set. Further notation. Scalars are lower case; vectors boldface lower case; matrices boldface upper case. The unit matrix is denoted by I. A pseudo-inverse is denoted with a superscript †, a transpose with a ′. For ease of notation, the training part of the label matrix (and thus also of the kernel matrix) is always assumed to be its upper nt × nt block (as is assumed already in (3)). Furthermore, the nt+ positive training samples are assumed to correspond to the first entries in yt , the nt− negative samples being at the end of this vector. 2 Relaxation to an SDP problem In this section, we will gradually derive a relaxed version of the transductive SVM formulation. To start with, we replace some of the constraints by an equivalent set: Proposition 2.1 (3) and (4) are equivalent with the following set of constraints: [Γ]i,j∈{1:nt,1:nt} = yt iyt j (5) 1We do not include a bias term since this would make the problem too non-convex. However this does not impair the result as is explained in [9]. diag(Γ) = e (6) rank(Γ) = 1 (7) The values of Γ will then indeed be equal to 1 or −1. It is basically the rank constraint that makes the resulting constrained optimization problem combinatorial. Note that these constraints imply that Γ is semi positive definite (SPD): Γ ⪰0 (this follows trivially from (3), or from (6) together with (7)). Now, in literature (see eg [7]) it is observed that such an SPD rank one constraint can often be relaxed to only the SPD constraint without sacrificing too much of the performance. Furthermore: Proposition 2.2 If we relax the constraints by replacing (7) with Γ ⪰0, (8) the optimization problem becomes convex. This follows from the fact that Γ appears linearly in the cost function, and that the constraints (2), (5), (6) and (8) consist of only linear equalities and linear (matrix) inequalities in the variables. Further on it will be shown to be an SDP problem. While this relaxation of the rank constraint makes the optimization problem convex, the result will not be a rank one matrix anymore; it will only provide an approximation for the optimal rank one matrix. Thus the values of Γ will not be equal to 1 or −1 anymore. However, it is well known that: Lemma 2.1 A principal submatrix of an SPD matrix is also SPD [10]. By applying this lemma on all 2 × 2 principal submatrices of Γ, it is shown that Corollary 2.1 From constraints (6) and (8) follows: −1 ≤[Γ]i,j ≤1. This is the problem will solve here: optimize (1) subject to (2), (5), (6) and (8). In the remainder of this section we will reformulate the optimization problem into a standard form of SDP, make further simplifications based on the problem structure, and show how to extract an approximation for the labels from the result. 2.1 Formulation as a standard SDP problem In the derivations in this subsection the equality constraints (5) and (6) will not be stated for brevity. Their consequences will be treated further in the paper. Furthermore, in the implementation, they will be enforced explicitly by the parameterization, thus they will not appear as constraints in the optimization problem. Also the SPD constraint (8) is not written every time, it should be understood. Let 2ν ≥0 be the Lagrange dual variables corresponding to constraint αi ≥0 and 2µ ≥0 corresponding to constraint αi ≤C. Then, since the problem is convex and thus the minimization and maximization are exchangeable (strong duality, see [8] for a brief introduction to duality), the optimization problem is equivalent with: min Γ,ν≥0,µ≥0 max α 2α′(e + ν −µ) −α′(K ⊙Γ)α + 2Cµ′e In case K ⊙Γ is rank deficient, (e + ν −µ) will be orthogonal to the null space of K ⊙Γ (otherwise, the object function could grow to infinity, and this while ν and µ on the contrary are minimizing the objective). The maximum over α is then reached for α = (K⊙Γ)†(e+ν −µ). Substituting this in the object function gives: minΓ,ν≥0,µ≥0(e + ν −µ)′(K ⊙Γ)†(e + ν −µ) + 2Cµ′e or equivalently: min Γ,ν≥0,µ≥0,t t s.t. t ≥(e + ν −µ)′(K ⊙Γ)†(e + ν −µ) + 2Cµ′e. with as additional constraint that (e + ν −µ) is orthogonal to the null space of K ⊙Γ. This latter constraint and the quadratic constraint can be reformulated as one SPD constraint thanks to the following extension of the Schur complement lemma [10] (the proof is omitted due to space restrictions): Lemma 2.2 (Extended Schur complement lemma) For symmetric A ⪰0 and C ≻0: The column space of B ⊥ the null space of A C ⪰ B′A†B  ⇔  A B B′ C  ⪰0. Indeed, applying this lemma to our problem with A = K ⊙Γ, B = e + ν −µ and C = t −2Cµ′e, leads to the problem formulation in the standard SDP form: min Γ,ν≥0,µ≥0,t t (9) s.t.  K ⊙Γ (e + ν −µ) (e + ν −µ)′ t −2Cµ′e  ⪰0 (10) together with the constraints (5), (6) and (8). The relaxation for the hard margin SVM is found by following a very similar derivation, or by just equating µ to 0. The number of variables specifying Γ, and the size of constraint (8) can be greatly reduced due to structure in the problem. This is subject of what follows now. 2.2 Simplifications due to the problem structure The matrix Γ can be parameterized as Γ =  ytyt′ Γc Γc′ Γw  where we have a training block ytyt′ ∈ℜnt×nt, cross blocks Γc ∈ℜnt×nw and Γc′, and a transduction block Γw ∈ℜnw×nw, which is a symmetric matrix with diagonal entries equal to 1. We now use Lemma 2.1: by choosing a submatrix that contains all rows and columns corresponding to the training block, and just one row and column corresponding to the transduction part, the SPD constraint of Γ is seen to imply that Γ =  ytyt′ γc i γc i ′ 1  ⪰0 where γc i represents the ith column of Γc. Using the extended Schur complement lemma 2.2, it follows that γc i is proportional to yt (denoted by γc i = giyt), and 1 ⪰γc i ′  ytyt′† γc i = γc i ′ ytyt′ ∥yt∥4 γc i. This implies that 1 ≥giyt′ ytyt′ ∥yt∥4 ytgi = g2 i such that −1 ≤gi ≤1. (Note that this is a corollary of the SPD constraint and does not need to be imposed explicitly.) Thus, the parameterization of Γ can be reduced to: Γ =  ytyt′ ytg′ gyt′ Γw  with Γw ii = 1 where g is the vector with gi as ith entry. We can now show that: Proposition 2.3 The constraint Γ ⪰0 is equivalent to (and can thus be replaced by) the following SPD constraint on a smaller matrix eΓ: eΓ =  1 g′ g Γw  ⪰0. Since eΓ is a principal submatrix of Γ (assuming at least one training label is equal to 1), lemma 2.1 indeed shows that Γ ⪰0 implies eΓ ⪰0. On the other hand, note that by adding a column and corresponding row to eΓ, the rank is not increased. Thus, an eigenvalue equal to 0 is added. Due to the interlacing property for bordered matrices [10] and the fact that eΓ ⪰0, we know this can only be the smallest eigenvalue of the resulting matrix. By induction this shows that also eΓ ⪰0 implies Γ ⪰0. This is the final formulation of the problem. For the soft margin case, the number of parameters is now 1+2nt+ n2 w+5nw 2 . For the hard margin case, this is 1+nt+ n2 w+3nw 2 . 2.3 Extraction of an estimate for the labels from Γ In general, the optimal Γ will of course not be rank one. We can approximate it by a rank one matrix however, by taking g as an approximation for the labels optimizing the unrelaxed problem. This is the approach we adopt: a thresholded value of the entries of g will be taken as a guess for the labels of the working set. Note that the minimum of the relaxed problem is always smaller than or equal to the minimum of the unrelaxed problem. Furthermore, the minimum of the unrelaxed problem is smaller than or equal to the value achieved by the thresholded relaxed labels. Thus, we obtain a lower and an upper bound for the true optimal cost. 2.4 Remarks The performance of this method is very good, as is seen on a toy problem (figure 1 shows an illustrative example). However, due to the (even though polynomial) complexity of SDP in combination with the quadratic dependence of the number of variables on the number of transduction points2, problems with more than about 1000 training samples and 100 transduction samples can not practically be solved with general purpose SDP algorithms. Especially the limitation on the working set is a drawback, since the advantage of transduction becomes apparent especially for a large working set as compared to the number of training samples. This makes the applicability of this approach for large real life problems rather limited. 3 Subspace SDP formulation However, if we would know a subspace (spanned by the d columns of a matrix V ∈ℜ(nt+nw)×d) in which (or close to which) the label vector lies, we can restrict the feasible region for Γ, leading to a much more efficient algorithm. In the next section a fast method to estimate such a space V will be provided. In this section we assume V is known, and explain how to do the reduction of the feasible region. If we know that the true label vector y lies in the column space of a matrix V, we know the true label matrix can be written in the form Γ = VMV′, with M a symmetric matrix. The number of parameters is now only d(d+1)/2. Furthermore, constraint (8) that Γ ⪰0 is then equivalent to M ⪰0, which is a cheaper constraint. Note however that in practical cases, the true label vector will not lie within but only close to the subspace spanned by the columns of V. Then the diagonal of the label matrix Γ can not always be made exactly equal to e as required by (6). We thus relax this constraint to the requirement that the diagonal is not larger than 2The worst case complexity for the problem at hand is O((nt+n2 w)2(nt+nw)2.5), which is of order 6.5 in the number of transduction points nw. −1 0 1 −1 −0.5 0 0.5 1 0 20 40 60 −1 −0.5 0 0.5 1 −1 0 1 −1 −0.5 0 0.5 1 Figure 1: The left picture shows 10 labelled samples represented by a ’o’ or a ’+’, depending on their class, together with 60 unlabelled samples represented by a ’·’. The middle picture shows the labels for the working set as estimated using the SDP method before thresholding: all are already invisibly close to 1 or −1. The right picture shows contour lines of the classification surface obtained by training an SVM using all labels as found by the SDP method. The method clearly finds a visually good label assignment that takes cluster structure in the data into account. e. Similarly, the block in the label matrix corresponding to the training samples may not contain 1’s and −1’s exactly (constraint (5)). However, the better V is chosen, the better this constraint will be met. Thus we optimize (9) subject to (10) together with three constraints that replace the constraints (5), (6) and (8): Γ = VMV′ diag(Γ) ≤ e M ⪰ 0 Thus we can approximate the relaxed transductive SVM using this reduced parameterization for Γ. The number of effective variables is now only a linear function of nw: 1 + nt + nw + d(d + 1)/2 for a hard margin and 1 + 2(nt + nw) + d(d + 1)/2 for a soft margin SVM. Furthermore, one of the SPD constraints is now a constraint on a d × d matrix instead of a potentially large (nw + 1) × (nw + 1) matrix. For a constant d, the worst case complexity is thus reduced to O((nt + nw)4.5). The quality of the approximation can be determined by the user: the number of components d can be chosen depending on the available computing resources, however empirical results show a good performance already for relatively small d. 4 Spectral transduction to find the subspace In this section we will discuss how to find a subspace V close to which the label vector will lie. Our approach is based on the spectral clustering algorithm proposed in [11]. They start with computing the eigenvectors corresponding to the largest eigenvalues of D−1/2KD−1/2 where d = Ke contains all row sums of K, and D = diag(d). The dominant eigenvectors are shown to reflect the cluster structure of the data. The optimization problem corresponding to this eigenvalue problem is: max v v′D−1/2KD−1/2v = v′ eKv s.t. v′v = 1. (11) 4.1 Constrained spectral clustering We could apply this algorithm to the kernel matrix K, but we can do more since we already know some of the labels: we will constrain the estimates of the labels for the training samples that are known to be in the same class to be equal to each other. Then we optimize the same object function with respect to these additional constraints. This can be achieved by choosing the following parameterization for v: v =   ent+/√nt+ 0 0 0 ent−/√nt− 0 0 0 I  ·   ht+ ht− hw  = Lh where en+ and en−denote the vectors containing nt+ (the number of positive training samples) and nt−(the number of negative training samples) ones. Then: Proposition 4.1 Optimization problem (11) is equivalent with: max h h′L′D−1/2KD−1/2Lh s.t. h′h = 1 which corresponds to the eigenvalue problem L′D−1/2KD−1/2Lh = λh. Then v is found as v = Lh. This is an extension of spectral clustering towards transduction3. We will use a subscript i to denote the ith eigenvector and eigenvalue, where λi ≥λj for i > j. 4.2 Spectral transduction provides a good V By construction, all entries of vi corresponding to positive training samples will be equal to ht+ i /√nt+; entries corresponding to the negative ones will all be equal to ht− i /√nt−. Furthermore, as in spectral clustering, the other entries of vectors vi with large eigenvalue λi will reflect the cluster structure of the entire data set, while respecting the label assignment of the training points however4. This means that such a vi will provide a good approximation for the labels. More specifically, the label vector will lie close to the column space of V, having d dominant ‘centered’ vi as its columns; the larger d, the better the approximation. The way we ‘center’ vi is by adding a constant so that entries for positive training samples become equal to minus those for the negative ones. Since then the first nt columns of the resulting Γ = VMV′ will be equal up to a sign, we can adopt basically the same approach as in section 2.3 to guess the labels: pick and threshold the first column of Γ. 5 Empirical results To show the potential of the method, we extracted data from the USPS data set to form two classes. The positive class is formed by 100 randomly chosen samples representing a number 0, and 100 representing a 1; the negative class by 100 samples representing a 2 and 100 representing a 3. Thus, we have a balanced classification problem with two classes of each 200 samples. The training set is chosen to contain only 10 samples from each of both classes, and is randomly drawn but evenly distributed over the 4 numbers. We used a hard margin SVM with an rbf kernel with σ = 7 (which is equal to the average distance of the samples to their nearest neighbors, verified to be a good value for the induction as well as for the 3We want to point out that the spectral transduction on its own is empirically observed to significantly improve over standard spectral clustering algorithms, and compares favorably with a recently proposed [5] extension of spectral clustering towards transduction. Furthermore, as also in [5] the method can be generalized towards a method for clustering with side-information (where side-information consists of sets of points that are known to be co-clustered). Space restrictions do not permit us to go into this in the current paper. 4Note: to reduce the influence from outliers, large entries of the vi can be thresholded. transduction case). The average ROC-score (area under the ROC-curve) over 10 randomizations is computed, giving 0.75 ± 0.03 as average for the inductive SVM, and 0.959 ± 0.03 for the method developed in this paper (we chose d = 4). To illustrate the scalability of the method, and to show that a larger working set is effectively exploited, we used a similar setting (same training set size) but with 1000 samples and d = 3, giving an average ROC-score of 0.993 ± 0.004. 6 Conclusions We developed a relaxation for the transductive SVM as first proposed by Vapnik. It is shown how this combinatorial problem can be relaxed to an SDP problem. Unfortunately, the number of variables in combination with the complexity of SDP is too high for it to scale to significant problem sizes. Therefore we show how, based on a new spectral method, the feasible region of the variables can be shrinked, leading to an approximation for the original SDP method. The complexity of the resulting algorithm is much more favorable. Positive empirical results are shown. Acknowledgement Tijl De Bie is a Research Assistant with the Fund for Scientific Research – Flanders (F.W.O.–Vlaanderen). References [1] V. N. Vapnik. Statistical Learning Theory. Springer, 1998. [2] K. Bennett and A. Demiriz. Semi-supervised support vector machines. In M. S. Kearns, S. A. Solla, and D. A. Cohn, editors, Advances in Neural Information Processing Systems 11, Cambridge, MA, 1999. MIT Press. [3] T. Joachims. Transductive inference for text classification using support vector machines. In Proc. of the International Conference on Machine Learning (ICML), 1999. [4] N. Cristianini, J. Kandola, A. Elisseeff, and J. Shawe-Taylor. On optimizing kernel alignment. Submitted for publication, 2003. [5] S. D. Kamvar, D. Klein, and C. D. Manning. Spectral learning. In Proc. of the International Joint Conference on Artificial Intelligence (IJCAI), 2003. [6] O. Chapelle, J. Weston, and B. Sch¨olkopf. Cluster kernels for semi-supervised learning. In S. Becker, S. Thrun, and K. Obermayer, editors, Advances in Neural Information Processing Systems 15, Cambridge, MA, 2003. MIT Press. [7] C. Helmberg. Semidefinite Programming for Combinatorial Optimization. Habilitationsschrift, TU Berlin, January 2000. ZIB-Report ZR-00-34, KonradZuse-Zentrum Berlin, 2000. [8] G. Lanckriet, N. Cristianini, P. Bartlett, L. El Ghaoui, and M. I. Jordan. Learning the kernel matrix with semidefinite programming. Journal of Machine Learning Research (JMLR), 5:27–72, 2004. [9] T. Poggio, S. Mukherjee, R. Rifkin, A. Rakhlin, and A. Verri. b. In Proceedings of the Conference on Uncertainty in Geometric Computations, 2001. [10] R. A. Horn and C. R. Johnson. Matrix Analysis. Cambridge University Press, 1985. [11] J. Shi and J. Malik. Normalized cuts and image segmentation. IEEE Transactions on Pattern Analysis and Machine Intelligence, 22(8):888–905, 2000.
2003
107
2,318
Kernel Dimensionality Reduction for Supervised Learning Kenji Fukumizu Institute of Statistical Mathematics Tokyo 106-8569 Japan fukumizu@ism.ac.jp Francis R. Bach CS Division University of California Berkeley, CA 94720, USA fbach@cs.berkeley.edu Michael I. Jordan CS Division and Statistics University of California Berkeley, CA 94720, USA jordan@cs.berkeley.edu Abstract We propose a novel method of dimensionality reduction for supervised learning. Given a regression or classification problem in which we wish to predict a variable Y from an explanatory vector X, we treat the problem of dimensionality reduction as that of finding a low-dimensional “effective subspace” of X which retains the statistical relationship between X and Y . We show that this problem can be formulated in terms of conditional independence. To turn this formulation into an optimization problem, we characterize the notion of conditional independence using covariance operators on reproducing kernel Hilbert spaces; this allows us to derive a contrast function for estimation of the effective subspace. Unlike many conventional methods, the proposed method requires neither assumptions on the marginal distribution of X, nor a parametric model of the conditional distribution of Y . 1 Introduction Many statistical learning problems involve some form of dimensionality reduction. The goal may be one of feature selection, in which we aim to find linear or nonlinear combinations of the original set of variables, or one of variable selection, in which we wish to select a subset of variables from the original set. Motivations for such dimensionality reduction include providing a simplified explanation and visualization for a human, suppressing noise so as to make a better prediction or decision, or reducing the computational burden. We study dimensionality reduction for supervised learning, in which the data consists of (X, Y ) pairs, where X is an m-dimensional explanatory variable and Y is an ℓ-dimensional response. The variable Y may be either continuous or discrete. We refer to these problems generically as “regression,” which indicates our focus on the conditional probability density pY |X(y|x). Thus, our framework includes classification problems, where Y is discrete. We wish to solve a problem of feature selection in which the features are linear combinations of the components of X. In particular, we assume that there is an r-dimensional subspace S ⊂Rm such that the following equality holds for all x and y: pY |X(y|x) = pY |ΠSX(y|ΠSx), (1) where ΠS is the orthogonal projection of Rm onto S. The subspace S is called the effective subspace for regression. Based on observations of (X, Y ) pairs, we wish to recover a matrix whose columns span S. We approach the problem within a semiparametric statistical framework—we make no assumptions regarding the conditional distribution pY |ΠSX(y|ΠSx) or the distribution pX(x) of X. Having found an effective subspace, we may then proceed to build a parametric or nonparametric regression model on that subspace. Thus our approach is an explicit dimensionality reduction method for supervised learning that does not require any particular form of regression model; it can be used as a preprocessor for any supervised learner. Most conventional approaches to dimensionality reduction make specific assumptions regarding the conditional distribution pY |ΠSX(y|ΠSx), the marginal distribution pX(x), or both. For example, classical two-layer neural networks can be seen as attempting to estimate an effective subspace in their first layer, using a specific model for the regressor. Similar comments apply to projection pursuit regression [1] and ACE [2], which assume an additive model E[Y |X] = g1(βT 1 X) + · · · + gK(βT KX). While canonical correlation analysis (CCA) and partial least squares (PLS, [3]) can be used for dimensionality reduction in regression, they make a linearity assumption and place strong restrictions on the allowed dimensionality. The line of research that is closest to our work is sliced inverse regression (SIR, [4]) and related methods including principal Hessian directions (pHd, [5]). SIR is a semiparametric method that can find effective subspaces, but only under strong assumptions of ellipticity for the marginal distribution pX(x). pHd also places strong restrictions on pX(x). If these assumptions do not hold, there is no guarantee of finding the effective subspace. In this paper we present a novel semiparametric method for dimensionality reduction that we refer to as Kernel Dimensionality Reduction (KDR). KDR is based on a particular class of operators on reproducing kernel Hilbert spaces (RKHS, [6]). In distinction to algorithms such as the support vector machine and kernel PCA [7, 8], KDR cannot be viewed as a “kernelization” of an underlying linear algorithm. Rather, we relate dimensionality reduction to conditional independence of variables, and use RKHSs to provide characterizations of conditional independence and thereby design objective functions for optimization. This builds on the earlier work of [9], who used RKHSs to characterize marginal independence of variables. Our characterization of conditional independence is a significant extension, requiring rather different mathematical tools—the covariance operators on RKHSs that we present in Section 2.2. 2 Kernel method of dimensionality reduction for regression 2.1 Dimensionality reduction and conditional independence The problem discussed in this paper is to find the effective subspace S defined by Eq. (1), given an i.i.d. sample {(Xi, Yi)}n i=1, sampled from the conditional probability Eq. (1) and a marginal probability pX for X. The crux of the problem is that we have no a priori knowledge of the regressor, and place no assumptions on the conditional probability pY |X or the marginal probability pX. We do not address the problem of choosing the dimensionality r in this paper—in practical applications of KDR any of a variety of model selection methods such as cross-validation can be reasonably considered. Rather our focus is on the problem of finding the effective subspace for a given choice of dimensionality. The notion of effective subspace can be formulated in terms of conditional independence. Let Q = (B, C) be an m-dimensional orthogonal matrix such that the column vectors of B span the subspace S (thus B is m × r and C is m × (m −r)), and define U = BT X and V = CT X. Because Q is an orthogonal matrix, we have pX(x) = pU,V (u, v) and pX,Y (x, y) = pU,V,Y (u, v, y). Thus, Eq. (1) is equivalent to pY |U,V (y|u, v) = pY |U(y|u). (2) X Y X Y V U X = (U,V) Y V | U Y V | U Figure 1: Graphical representation of dimensionality reduction for regression. This shows that the effective subspace S is the one which makes Y and V conditionally independent given U (see Figure 1). Mutual information provides another viewpoint on the equivalence between conditional independence and the effective subspace. It is well known that I(Y, X) = I(Y, U) + EU  I(Y |U, V |U)  , (3) where I(Z, W) is the mutual information between Z and W. Because Eq. (1) implies I(Y, X) = I(Y, U), the effective subspace S is characterized as the subspace which retains the entire mutual information between X and Y , or equivalently, such that I(Y |U, V |U) = 0. This is again the conditional independence of Y and V given U. 2.2 Covariance operators on kernel Hilbert spaces and conditional independence We use cross-covariance operators [10] on RKHSs to characterize the conditional independence of random variables. Let (H, k) be a (real) reproducing kernel Hilbert space of functions on a set Ωwith a positive definite kernel k : Ω× Ω→R and an inner product ⟨·, ·⟩H. The most important aspect of a RKHS is the reproducing property: ⟨f, k(·, x)⟩H = f(x) for all x ∈Ωand f ∈H. (4) In this paper we focus on the Gaussian kernel k(x1, x2) = exp  −∥x1 −x2∥2/2σ2 . Let (H1, k1) and (H2, k2) be RKHSs over measurable spaces (Ω1, B1) and (Ω2, B2), respectively, with k1 and k2 measurable. For a random vector (X, Y ) on Ω1 × Ω2, the cross-covariance operator ΣY X from H1 to H2 is defined by the relation ⟨g, ΣY Xf⟩H2 = EXY [f(X)g(Y )] −EX[f(X)]EY [g(Y )] (= Cov[f(X), g(Y )]) (5) for all f ∈H1 and g ∈H2. Eq. (5) implies that the covariance of f(X) and g(Y ) is given by the action of the linear operator ΣY X and the inner product. Under the assumption that EX[k1(X, X)] and EY [k2(Y, Y )] are finite, by using Riesz’s representation theorem, it is not difficult to see that a bounded operator ΣY X is uniquely defined by Eq. (5). We have Σ∗ Y X = ΣXY , where A∗denotes the adjoint of A. From Eq. (5), we see that ΣY X captures all of the nonlinear correlations defined by the functions in HX and HY . Cross-covariance operators provide a useful framework for discussing conditional probability and conditional independence, as shown by the following theorem and its corollary1: Theorem 1. Let (H1, k1) and (H2, k2) be RKHSs on measurable spaces Ω1 and Ω2, respectively, with k1 and k2 measurable, and (X, Y ) be a random vector on Ω1×Ω2. Assume that EX[k1(X, X)] and EY [k2(Y, Y )] are finite, and for all g ∈H2 the conditional expectation EY |X[g(Y ) | X = ·] is an element of H1. Then, for all g ∈H2 we have ΣXXEY |X[g(Y ) | X = ·] = ΣXY g. (6) 1Full proofs of all theorems can be found in [11]. Corollary 2. Let ˜Σ−1 XX be the right inverse of ΣXX on (KerΣXX)⊥. Under the same assumptions as Theorem 1, we have, for all f ∈(KerΣXX)⊥and g ∈H2, ⟨f, ˜Σ−1 XXΣXY g⟩H1 = ⟨f, EY |X[g(Y ) | X = ·]⟩H1. (7) Sketch of the proof. ΣXY can be decomposed as ΣXY = Σ1/2 XXV Σ1/2 Y Y for a bounded operator V (Theorem 1, [10]). Thus, we see ˜Σ−1 XXΣXY is well-defined, because RangeΣXY ⊂ RangeΣXX = (KerΣXX)⊥. Then, Eq. (7) is a direct consequence of Theorem 1. Given that ΣXX is invertible, Eq. (7) implies EY |X[g(Y ) | X = ·] = Σ−1 XXΣXY g for all g ∈H2. (8) This can be understood by analogy to the conditional expectation of Gaussian random variables. If X and Y are Gaussian random variables, it is well-known that the conditional expectation is given by EY |X[aT Y | X = x] = xT Σ−1 XXΣXY a for an arbitrary vector a, where ΣXX and ΣXY are the variance-covariance matrices in the ordinary sense. Using cross-covariance operators, we derive an objective function for characterizing conditional independence. Let (H1, k1) and (H2, k2) be RKHSs on measurable spaces Ω1 and Ω2, respectively, with k1 and k2 measurable, and suppose we have random variables U ∈H1 and Y ∈H2. We define the conditional covariance operator ΣY Y |U on H1 by ΣY Y |U := ΣY Y −ΣY U ˜Σ−1 UUΣUY . (9) Corollary 2 easily yields the following result on the conditional covariance of variables: Theorem 3. Assume that EX[k1(X, X)] and EY [k2(Y, Y )] are finite, and that EY |X[f(Y )|X] is an element of H1 for all f ∈H2. Then, for all f, g ∈H2, we have ⟨g, ΣY Y |Uf⟩H2 = EY [f(Y )g(Y )] −EU  EY |U[f(Y )|U]EY |U[g(Y )|U]  = EU  CovY |U  f(Y ), g(Y ) | U  . (10) As in the case of Eq. (8), Eqs. (9) and (10) can be viewed as the analogs of the well-known equality for Gaussian variables: Cov[aT Y, bT Y |U] = aT (ΣY Y −ΣY UΣ−1 UUΣUY )b. From Theorem 3, it is natural to use minimization of ΣY Y |U as a basis of a method for finding the most informative U, which gives the least VarY |U[f(Y )|U]. The following definition is needed to justify this intuition. Let (Ω, B) be a measurable space, let (H, k) be a RKHS over Ωwith k measurable and bounded, and let M be the set of all the probability measures on (Ω, B). The RKHS H is called probability-determining, if the map M ∋P → (f →EX∼P [f(X)]) ∈H∗ (11) is one-to-one, where H∗is the dual space of H. The following theorem can be proved using a argument similar to that used in the proof of Theorem 2 in [9]. Theorem 4. For an arbitrary σ > 0, the RKHS with Gaussian kernel k(x, y) = exp(−∥x− y∥2/2σ2) on Rm is probability-determining. Recall that for two RKHSs H1 and H2 on Ω1 and Ω2, respectively, the direct product H1⊗H2 is the RKHS on Ω1×Ω2 with the kernel k1k2 [6]. The relation between conditional independence and the conditional covariance operator is given by the following theorem: Theorem 5. Let (H11, k11), (H12, k12), and (H2, k2) be RKHSs on measurable spaces Ω11, Ω12, and Ω2, respectively, with continuous and bounded kernels. Let (X, Y ) = (U, V, Y ) be a random vector on Ω11 × Ω12 × Ω2, where X = (U, V ), and let H1 = H11 ⊗H12 be the direct product. It is assumed that EY |U[g(Y )|U = ·] ∈H11 and EY |X[g(Y )|X = ·] ∈H1 for all g ∈H2. Then, we have ΣY Y |U ≥ΣY Y |X, (12) where the inequality refers to the order of self-adjoint operators. If further H2 is probability-determining, in particular, for Gaussian kernels, we have the equivalence: ΣY Y |X = ΣY Y |U ⇐⇒ Y ⊥⊥V | U. (13) Sketch of the proof. Taking the expectation of the well-known equality VarY |U[g(Y )|U] = EV |U  VarY |U,V [g(Y )|U, V ]  + VarV |U  EY |U,V [g(Y )|U, V ]  with respect to U, we obtain EU  VarY |U[g(Y )|U]  −EX  VarY |X[g(Y )|X]  = EU  VarV |U[EY |X[g(Y )|X]]  ≥0, which implies Eq. (12). The equality holds iff EY |X[g(Y )|X] = EY |U[g(Y )|U] for a.e. X. Since H2 is probability-determining, this means PY |X = PY |U, that is, Y ⊥⊥V | U. From Theorem 5, for probability-determining kernel spaces, the effective subspace S can be characterized in terms of the solution to the following minimization problem: min S ΣY Y |U, subject to U = ΠSX. (14) 2.3 Kernel generalized variance for dimensionality reduction To derive a sampled-based objective function from Eq. (14) for a finite sample, we have to estimate the conditional covariance operator with given data, and choose a specific way to evaluate the size of self-adjoint operators. Hereafter, we consider only Gaussian kernels, which are appropriate for both continuous and discrete variables. For the estimation of the operator, we follow the procedure in [9] (see also [11] for further details), and use the centralized Gram matrix [9, 8], which is defined as: ˆKY =  In−1 n1n1T n  GY  In−1 n1n1T n  , ˆKU =  In−1 n1n1T n  GU  In−1 n1n1T n  (15) where 1n = (1, . . . , 1)T , (GY )ij = k1(Yi, Yj) is the Gram matrix of the samples of Y , and (GU)ij = k2(Ui, Uj) is given by the projection Ui = BT Xi. With a regularization constant ε > 0, the empirical conditional covariance matrix ˆΣY Y |U is then defined by ˆΣY Y |U := ˆΣY Y −ˆΣY U ˆΣ−1 UU ˆΣUY = ( ˆKY +εIn)2 −ˆKY ˆKU( ˆKU +εIn)−2 ˆKU ˆKY . (16) The size of ˆΣY Y |U in the ordered set of positive definite matrices can be evaluated by its determinant. Although there are other choices for measuring the size of ˆΣY Y |U, such as the trace and the largest eigenvalue, we focus on the determinant in this paper. Using the Schur decomposition, det(A −BC−1BT ) = det  A B BT C  /detC, we have det ˆΣY Y |U = det ˆΣ[Y U][Y U]/ det ˆΣUU, (17) where ˆΣ[Y U][Y U] is defined by ˆΣ[Y U][Y U] =  ˆΣY Y ˆΣY U ˆΣUY ˆΣUU  =  ( ˆ KY +εIn)2 ˆ KY ˆ KU ˆ KU ˆ KY ( ˆ KU+εIn)2  . We symmetrize the objective function by dividing by the constant det ˆΣY Y , which yields min B∈Rm×r det ˆΣ[Y U][Y U] det ˆΣY Y det ˆΣUU , where U = BT X. (18) We refer to this minimization problem with respect to the choice of subspace S or matrix B as Kernel Dimensionality Reduction (KDR). Eq. (18) has been termed the “kernel generalized variance” (KGV) by Bach and Jordan [9]. They used it as a contrast function for independent component analysis, in which the goal is to minimize a mutual information. They showed that KGV is in fact an approximation of the mutual information among the recovered sources around the factorized distributions. In the current setting, on the other hand, our goal is to maximize the mutual information SIR(10) SIR(15) SIR(20) SIR(25) pHd KDR R(b1) 0.987 0.993 0.988 0.990 0.110 0.999 R(b2) 0.421 0.705 0.480 0.526 0.859 0.984 Table 1: Correlation coefficients. SIR(m) indicates the SIR method with m slices. I(Y, U), and with an entirely different argument, we have shown that KGV is an appropriate objective function for the dimensionality reduction problem, and that minimizing Eq. (18) can be viewed as maximizing the mutual information I(Y, U). Given that the numerical task that must be solved in KDR is the same as the one to be solved in kernel ICA, we can import all of the computational techniques developed in [9] for minimizing KGV. In particular, the optimization routine that we use is gradient descent with a line search, where we exploit incomplete Cholesky decomposition to reduce the n × n matrices to low-rank approximations. To cope with local optima, we make use of an annealing technique, in which the scale parameter σ for the Gaussian kernel is decreased gradually during the iterations of optimization. For a larger σ, the contrast function has fewer local optima, and the search becomes more accurate as σ is decreased. 3 Experimental results We illustrate the effectiveness of the proposed KDR method through experiments, comparing it with several conventional methods: SIR, pHd, CCA, and PLS. The first data set is a synthesized one with 300 samples of 17 dimensional X and one dimensional Y , which are generated by Y ∼0.9X1 + 0.2/(1 + X17) + Z, where Z ∼ N(0, 0.012) and X follows a uniform distribution on [0, 1]17. The effective subspace is given by b1 = (1, 0, . . . , 0) and b2 = (0, . . . , 0, 1). We compare the KDR method with SIR and pHd only—CCA and PLS cannot find a 2-dimensional subspace, because Y is onedimensional. To evaluate estimation accuracy, we use the multiple correlation coefficient R(b) = maxβ∈S βT ΣXXb/(βT ΣXXβ · bT ΣXXb)1/2, which is used in [4]. As shown in Table 1, KDR outperforms the others in finding the weak contribution of b2. Next, we apply the KDR method to classification problems, for which many conventional methods of dimensionality reduction are not suitable. In particular, SIR requires the dimensionality of the effective subspace to be less than the number of classes, because SIR uses the average of X in slices along the variable Y . CCA and PLS have a similar limitation on the dimensionality of the effective subspace. Thus we compare the result of KDR only with pHd, which is applicable to general binary classification problems. We show the visualization capability of the dimensionality reduction methods for the Wine dataset from the UCI repository to see how the projection onto a low-dimensional space realizes an effective description of data. The Wine data consists of 178 samples with 13 variables and a label with three classes. Figure 2 shows the projection onto the 2-dimensional subspace estimated by each method. KDR separates the data into three classes most completely. We can see that the data are nonlinearly separable in the two-dimensional space. In the third experiment, we investigate how much information on the classification is preserved in the estimated subspace. After reducing the dimensionality, we use the support vector machine (SVM) method to build a classifier in the reduced space, and compare its accuracy with an SVM trained using the full-dimensional vector X. We use three data sets from the UCI repository. Figure 3 shows the classification rates for the test set for subspaces of various dimensionality. We can see that KDR yields good classification even in low-dimensional subspaces, while pHd is much worse in small dimensionality. It is noteworthy that in the Ionosphere data set the classifier in dimensions 5, 10, and 20 outperforms -20 -15 -10 -5 0 5 10 15 20 -20 -15 -10 -5 0 5 10 15 20 KDR -20 -15 -10 -5 0 5 10 15 20 -20 -15 -10 -5 0 5 10 15 20 CCA -20 -15 -10 -5 0 5 10 15 20 -20 -15 -10 -5 0 5 10 15 20 PLS -20 -15 -10 -5 0 5 10 15 20 -20 -15 -10 -5 0 5 10 15 20 SIR -20 -15 -10 -5 0 5 10 15 20 -20 -15 -10 -5 0 5 10 15 20 pHd Figure 2: Projections of Wine data: ”+”, ”•”, and gray ”□” represent the three classes. the classifier in the full-dimensional space. This is caused by suppressing noise irrelevant to explain Y . These results show that KDR successfully finds an effective subspace which preserves the class information even when the dimensionality is reduced significantly. 4 Extension to variable selection The KDR method can be extended to variable selection, in which a subset of given explanatory variables {X1, . . . , Xm} is selected. Extension of the KGV objective function to variable selection is straightforward. We have only to compare the KGV values for all the subspaces spanned by combinations of a fixed number of selected variables. We of course do not avoid the combinatorial problem of variable selection; the total number of combinations may be intractably large for a large number of explanatory variables m, and greedy or random search procedures are needed. We first apply this kernel method to the Boston Housing data (506 samples with 13 dimensional X), which has been used as a typical example of variable selection. We select four variables that attain the smallest KGV value among all the combinations. The selected variables are exactly the same as the ones selected by ACE [2]. Next, we apply the method to the leukemia microarray data of 7129 dimensions ([12]). We select 50 effective genes to classify two types of leukemia using 38 training samples. For optimization of the KGV value, we use a greedy algorithm, in which new variables are selected one by one, and subsequently a variant of genetic algorithm is used. Half of the 50 genes accord with 50 genes selected by [12]. With the genes selected by our method, the same classifier as that used in [12] classifies correctly 32 of the 34 test samples, for which, with their 50 genes, Golub et al. ([12]) report a result of classifying 29 of the 34 samples correctly. 5 Conclusion We have presented KDR, a novel method of dimensionality reduction for supervised learning. One of the striking properties of this method is its generality. We do not place any strong assumptions on either the conditional or the marginal distribution, in distinction to (a) Heart-disease (b) Ionosphere (c) Wisconsin Breast Cancer 3 5 7 9 11 13 50 55 60 65 70 75 80 85 Dimensionality Classification rate (%) Kernel PHD All variables 3 5 10 15 20 34 88 90 92 94 96 98 100 Dimensionality Classification rate (%) Kernel PHD All variables 0 10 20 30 70 75 80 85 90 95 100 Dimensionality Classification rate (%) Kernel PHD All variables Figure 3: Classification accuracy of the SVM for test data after dimensionality reduction. essentially all existing methods for dimensionality reduction in regression, including SIR, pHd, CCA, and PPR. We have demonstrating promising empirical performance of KDR, showing its practical utility in data visualization and feature selection for prediction. We have also discussed an extension of KDR method to variable selection. The theoretical basis of KDR lies in the nonparametric characterization of conditional independence that we have presented in this paper. Extending earlier work on the kernel-based characterization of marginal independence [9], we have shown that conditional independence can be characterized in terms of covariance operators on a kernel Hilbert space. While our focus has been on the problem of dimensionality reduction, it is also worth noting that there are many possible other applications of this result. In particular, conditional independence plays an important role in the structural definition of graphical models, and our result may have implications for model selection and inference in graphical models. References [1] Friedman, J.H. and Stuetzle, W. Projection pursuit regression. J. Amer. Stat. Assoc., 76:817– 823, 1981. [2] Breiman, L. and Friedman, J.H. Estimating optimal transformations for multiple regression and correlation. J. Amer. Stat. Assoc., 80:580–598, 1985. [3] Wold, H. Partial least squares. in S. Kotz and N.L. Johnson (Eds.), Encyclopedia of Statistical Sciences, Vol. 6, Wiley, New York. pp.581–591. 1985. [4] Li, K.-C. Sliced inverse regression for dimension reduction (with discussion). J. Amer. Stat. Assoc., 86:316–342, 1991. [5] Li, K.-C. On principal Hessian directions for data visualization and dimension reduction: Another application of Stein’s lemma. J. Amer. Stat. Assoc., 87:1025–1039, 1992. [6] Aronszajn, N. Theory of reproducing kernels. Trans. Amer. Math. Soc., 69(3):337–404, 1950. [7] Sch¨olkopf, B., Burges, C.J.C., and Smola, A. (eds.) Advances in Kernel Methods: Support Vector Learning. MIT Press. 1999. [8] Sch¨olkopf, B., Smola, A and M¨uller, K.-R. Nonlinear component analysis as a kernel eigenvalue problem. Neural Computation, 10:1299–1319, 1998. [9] Bach, F.R. and Jordan, M.I. Kernel independent component analysis. JMLR, 3:1–48, 2002. [10] Baker, C.R. Joint measures and cross-covariance operators. Trans. Amer. Math. Soc., 186:273– 289, 1973. [11] Fukumizu, K., Bach, F.R. and Jordan, M.I. Dimensionality reduction for supervised learning with reproducing kernel Hilbert spaces. JMLR, 5:73–99, 2004. [12] Golub T.R. et al. Molecular classification of cancer: Class discovery and class prediction by gene expression monitoring. Science, 286:531–537, 1999.
2003
108
2,319
Learning with Local and Global Consistency Dengyong Zhou, Olivier Bousquet, Thomas Navin Lal, Jason Weston, and Bernhard Sch¨olkopf Max Planck Institute for Biological Cybernetics, 72076 Tuebingen, Germany {firstname.secondname}@tuebingen.mpg.de Abstract We consider the general problem of learning from labeled and unlabeled data, which is often called semi-supervised learning or transductive inference. A principled approach to semi-supervised learning is to design a classifying function which is sufficiently smooth with respect to the intrinsic structure collectively revealed by known labeled and unlabeled points. We present a simple algorithm to obtain such a smooth solution. Our method yields encouraging experimental results on a number of classification problems and demonstrates effective use of unlabeled data. 1 Introduction We consider the general problem of learning from labeled and unlabeled data. Given a point set X = {x1, . . . , xl, xl+1, . . . , xn} and a label set L = {1, . . . , c}, the first l points have labels {y1, . . . , yl} ∈L and the remaining points are unlabeled. The goal is to predict the labels of the unlabeled points. The performance of an algorithm is measured by the error rate on these unlabeled points only. Such a learning problem is often called semi-supervised or transductive. Since labeling often requires expensive human labor, whereas unlabeled data is far easier to obtain, semisupervised learning is very useful in many real-world problems and has recently attracted a considerable amount of research [10]. A typical application is web categorization, in which manually classified web pages are always a very small part of the entire web, and the number of unlabeled examples is large. The key to semi-supervised learning problems is the prior assumption of consistency, which means: (1) nearby points are likely to have the same label; and (2) points on the same structure (typically referred to as a cluster or a manifold) are likely to have the same label. This argument is akin to that in [2, 3, 4, 10, 15] and often called the cluster assumption [4, 10]. Note that the first assumption is local, whereas the second one is global. Orthodox supervised learning algorithms, such as k-NN, in general depend only on the first assumption of local consistency. To illustrate the prior assumption of consistency underlying semi-supervised learning, let us consider a toy dataset generated according to a pattern of two intertwining moons in Figure 1(a). Every point should be similar to points in its local neighborhood, and furthermore, points in one moon should be more similar to each other than to points in the other moon. The classification results given by the Support Vector Machine (SVM) with a RBF kernel −1.5 −1 −0.5 0 0.5 1 1.5 2 2.5 −1.5 −1 −0.5 0 0.5 1 1.5 (a) Toy Data (Two Moons) unlabeled point labeled point −1 labeled point +1 −1.5 −1 −0.5 0 0.5 1 1.5 2 2.5 −1.5 −1 −0.5 0 0.5 1 1.5 (b) SVM (RBF Kernel) −1.5 −1 −0.5 0 0.5 1 1.5 2 2.5 −1.5 −1 −0.5 0 0.5 1 1.5 (c) k−NN −1.5 −1 −0.5 0 0.5 1 1.5 2 2.5 −1.5 −1 −0.5 0 0.5 1 1.5 (c) Ideal Classification Figure 1: Classification on the two moons pattern. (a) toy data set with two labeled points; (b) classifying result given by the SVM with a RBF kernel; (c) k-NN with k = 1; (d) ideal classification that we hope to obtain. and k-NN are shown in Figure 1(b) & 1(c) respectively. According to the assumption of consistency, however, the two moons should be classified as shown in Figure 1(d). The main differences between the various semi-supervised learning algorithms, such as spectral methods [2, 4, 6], random walks [13, 15], graph mincuts [3] and transductive SVM [14], lie in their way of realizing the assumption of consistency. A principled approach to formalize the assumption is to design a classifying function which is sufficiently smooth with respect to the intrinsic structure revealed by known labeled and unlabeled points. Here we propose a simple iteration algorithm to construct such a smooth function inspired by the work on spreading activation networks [1, 11] and diffusion kernels [7, 8, 12], recent work on semi-supervised learning and clustering [2, 4, 9], and more specifically by the work of Zhu et al. [15]. The keynote of our method is to let every point iteratively spread its label information to its neighbors until a global stable state is achieved. We organize the paper as follows: Section 2 shows the algorithm in detail and also discusses possible variants; Section 3 introduces a regularization framework for the method; Section 4 presents the experimental results for toy data, digit recognition and text classification, and Section 5 concludes this paper and points out the next researches. 2 Algorithm Given a point set X = {x1, . . . , xl, xl+1, . . . , xn} ⊂Rm and a label set L = {1, . . . , c}, the first l points xi(i ≤l) are labeled as yi ∈L and the remaining points xu(l+1 ≤u ≤n) are unlabeled. The goal is to predict the label of the unlabeled points. Let F denote the set of n × c matrices with nonnegative entries. A matrix F = [F T 1 , . . . , F T n ]T ∈F corresponds to a classification on the dataset X by labeling each point xi as a label yi = arg maxj≤c Fij. We can understand F as a vectorial function F : X →Rc which assigns a vector Fi to each point xi. Define a n×c matrix Y ∈F with Yij = 1 if xi is labeled as yi = j and Yij = 0 otherwise. Clearly, Y is consistent with the initial labels according the decision rule. The algorithm is as follows: 1. Form the affinity matrix W defined by Wij = exp(−∥xi −xj∥2/2σ2) if i ̸= j and Wii = 0. 2. Construct the matrix S = D−1/2WD−1/2 in which D is a diagonal matrix with its (i, i)-element equal to the sum of the i-th row of W. 3. Iterate F(t+1) = αSF(t)+(1−α)Y until convergence, where α is a parameter in (0, 1). 4. Let F ∗denote the limit of the sequence {F(t)}. Label each point xi as a label yi = arg maxj≤c F ∗ ij. This algorithm can be understood intuitively in terms of spreading activation networks [1, 11] from experimental psychology. We first define a pairwise relationship W on the dataset X with the diagonal elements being zero. We can think that a graph G = (V, E) is defined on X, where the the vertex set V is just X and the edges E are weighted by W. In the second step, the weight matrix W of G is normalized symmetrically, which is necessary for the convergence of the following iteration. The first two steps are exactly the same as in spectral clustering [9]. During each iteration of the third step each point receives the information from its neighbors (first term), and also retains its initial information (second term). The parameter α specifies the relative amount of the information from its neighbors and its initial label information. It is worth mentioning that self-reinforcement is avoided since the diagonal elements of the affinity matrix are set to zero in the first step. Moreover, the information is spread symmetrically since S is a symmetric matrix. Finally, the label of each unlabeled point is set to be the class of which it has received most information during the iteration process. Let us show that the sequence {F(t)} converges and F ∗= (1 −α)(I −αS)−1Y. Without loss of generality, suppose F(0) = Y. By the iteration equation F(t+1) = αSF(t)+(1− α)Y used in the algorithm, we have F(t) = (αS)t−1Y + (1 −α) t−1 X i=0 (αS)iY. (1) Since 0 < α < 1 and the eigenvalues of S in [-1, 1] (note that S is similar to the stochastic matrix P = D−1W = D−1/2SD1/2), lim t→∞(αS)t−1 = 0, and lim t→∞ t−1 X i=0 (αS)i = (I −αS)−1. (2) Hence F ∗= lim t→∞F(t) = (1 −α)(I −αS)−1Y, for classification, which is clearly equivalent to F ∗= (I −αS)−1Y. (3) Now we can compute F ∗directly without iterations. This also shows that the iteration result does not depend on the initial value for the iteration. In addition, it is worth to notice that (I −αS)−1 is in fact a graph or diffusion kernel [7, 12]. Now we discuss some possible variants of this method. The simplest modification is to repeat the iteration after convergence, i.e. F ∗= (I −αS)−1 · · · (I −αS)−1Y = (I − αS)−pY, where p is an arbitrary positive integer. In addition, since that S is similar to P, we can consider to substitute P for S in the third step, and then the corresponding closed form is F ∗= (I −αP)−1Y. It is also interesting to replace S with P T , the transpose of P. Then the classifying function is F ∗= (I −αP T )−1Y. It is not hard to see this is equivalent to F ∗= (D −αW)−1Y. We will compare these variants with the original algorithm in the experiments. 3 Regularization Framework Here we develop a regularization framework for the above iteration algorithm. The cost function associated with F is defined to be Q(F) = 1 2  n X i,j=1 Wij 1 √Dii Fi − 1 p Djj Fj 2 + µ n X i=1 Fi −Yi 2  , (4) Where µ > 0 is the regularization parameter. Then the classifying function is F ∗= arg min F ∈F Q(F). (5) The first term of the right-hand side in the cost function is the smoothness constraint, which means that a good classifying function should not change too much between nearby points. The second term is the fitting constraint, which means a good classifying function should not change too much from the initial label assignment. The trade-off between these two competing constraints is captured by a positive parameter µ. Note that the fitting constraint contains labeled as well as unlabeled data. We can understand the smoothness term as the sum of the local variations, i.e. the local changes of the function between nearby points. As we have mentioned, the points involving pairwise relationships can be be thought of as an undirected weighted graph, the weights of which represent the pairwise relationships. The local variation is then in fact measured on each edge. We do not simply define the local variation on an edge by the difference of the function values on the two ends of the edge. The smoothness term essentially splits the function value at each point among the edges attached to it before computing the local changes, and the value assigned to each edge is proportional to its weight. Differentiating Q(F) with respect to F, we have ∂Q ∂F F =F ∗ = F ∗−SF ∗+ µ(F ∗−Y ) = 0, which can be transformed into F ∗− 1 1 + µSF ∗− µ 1 + µY = 0. Let us introduce two new variables, α = 1 1 + µ, and β = µ 1 + µ. Note that α + β = 1. Then (I −αS)F ∗= βY, Since I −αS is invertible, we have F ∗= β(I −αS)−1Y. (6) which recovers the closed form expression of the above iteration algorithm. Similarly we can develop the optimization frameworks for the variants F ∗= (I−αP)−1Y and F ∗= (D −αW)−1Y . We omit the discussions due to lack of space. 4 Experiments We used k-NN and one-vs-rest SVMs as baselines, and compared our method to its two variants: (1) F ∗= (I −αP)−1Y ; and (2) F ∗= (D −αW)−1Y. We also compared to Zhu et al.’s harmonic Gaussian field method coupled with the Class Mass Normalization (CMN) [15], which is closely related to ours. To the best of our knowledge, there is no reliable approach for model selection if only very few labeled points are available. Hence we let all algorithms use their respective optimal parameters, except that the parameter α used in our methods and its variants was simply fixed at 0.99. −1.5 −1 −0.5 0 0.5 1 1.5 2 2.5 −1.5 −1 −0.5 0 0.5 1 1.5 (a) t = 10 −1.5 −1 −0.5 0 0.5 1 1.5 2 2.5 −1.5 −1 −0.5 0 0.5 1 1.5 (b) t = 50 −1.5 −1 −0.5 0 0.5 1 1.5 2 2.5 −1.5 −1 −0.5 0 0.5 1 1.5 (c) t = 100 −1.5 −1 −0.5 0 0.5 1 1.5 2 2.5 −1.5 −1 −0.5 0 0.5 1 1.5 (d) t = 400 Figure 2: Classification on the pattern of two moons. The convergence process of our iteration algorithm with t increasing from 1 to 400 is shown from (a) to (d). Note that the initial label information are diffused along the moons. Figure 3: The real-valued classifying function becomes flatter and flatter with respect to the two moons pattern with increasing t. Note that two clear moons emerge in (d). −1.5 −1 −0.5 0 0.5 1 1.5 2 2.5 −1.5 −1 −0.5 0 0.5 1 1.5 (a) SVM (RBF Kernel) labeled point −1 labeled point +1 −1.5 −1 −0.5 0 0.5 1 1.5 2 2.5 −1.5 −1 −0.5 0 0.5 1 1.5 (b) Smooth with Global Consistency Figure 4: Smooth classification results given by supervised classifiers with the global consistency: (a) the classification result given by the SVM with a RBF kernel; (b) smooth the result of the SVM using the consistency method. 4.1 Toy Problem In this experiment we considered the toy problem mentioned in Section 1 (Figure 1). The affinity matrix is defined by a RBF kernel but the diagonal elements are set to zero. The convergence process of our iteration algorithm with t increasing from 1 to 400 is shown in Figure 2(a)-2(d). Note that the initial label information are diffused along the moons. The assumption of consistency essentially means that a good classifying function should change slowly on the coherent structure aggregated by a large amount of data. This can be illustrated by this toy problem very clearly. Let us define a function f(xi) = (F ∗ i1 −F ∗ i2)/(F ∗ i1 + F ∗ i2) and accordingly the decision function is sign(f(xi)), which is equivalent to the decision rule described in Section 2. In Figure 3, we show that f(xi) becomes successively flatter with respect to the two moons pattern from Figure 3(a)3(d) with increasing t. Note that two clear moons emerge in the Figure 3(d). The basic idea of our method is to construct a smooth function. It is natural to consider using this method to improve a supervised classifier by smoothing its classifying result. In other words, we use the classifying result given by a supervised classifier as the input of our algorithm. This conjecture is demonstrated by a toy problem in Figure 4. Figure 4(a) is the classification result given by the SVM with a RBF kernel. This result is then assigned to Y in our method. The output of our method is shown in Figure 4(b). Note that the points classified incorrectly by the SVM are successfully smoothed by the consistency method. 4.2 Digit Recognition In this experiment, we addressed a classification task using the USPS handwritten 16x16 digits dataset. We used digits 1, 2, 3, and 4 in our experiments as the four classes. There are 1269, 929, 824, and 852 examples for each class, for a total of 3874. The k in k-NN was set to 1. The width of the RBF kernel for SVM was set to 5, and for the harmonic Gaussian field method it was set to 1.25. In our method and its variants, the affinity matrix was constructed by the RBF kernel with the same width used as in the harmonic Gaussian method, but the diagonal elements were set to 0. The test errors averaged over 100 trials are summarized in the left panel of Figure 5. Samples were chosen so that they contain at least one labeled point for each class. Our consistency method and one of its variant are clearly superior to the orthodox supervised learning algorithms k-NN and SVM, and also better than the harmonic Gaussian method. Note that our approach does not require the affinity matrix W to be positive definite. This enables us to incorporate prior knowledge about digit image invariance in an elegant way, e.g., by using a jittered kernel to compute the affinity matrix [5]. Other kernel methods are 4 10 15 20 25 30 40 50 0 0.05 0.1 0.15 0.2 0.25 0.3 0.35 # labeled points test error k−NN (k = 1) SVM (RBF kernel) harmonic Gaussian consistency method variant consistency (1) variant consistency (2) 4 10 15 20 25 30 40 50 0.2 0.25 0.3 0.35 0.4 0.45 0.5 0.55 0.6 0.65 0.7 # labeled points test error k−NN (k = 1) SVM (RBF kernel) harmonic Gaussian consistency method variant consistency (1) variant consistency (2) Figure 5: Left panel: the error rates of digit recognition with USPS handwritten 16x16 digits dataset for a total of 3874 (a subset containing digits from 1 to 4). Right panel: the error rates of text classification with 3970 document vectors in a 8014-dimensional space. Samples are chosen so that they contain at least one labeled point for each class. known to have problems with this method [5]. In our case, jittering by 1 pixel translation leads to an error rate around 0.01 for 30 labeled points. 4.3 Text Classification In this experiment, we investigated the task of text classification using the 20-newsgroups dataset. We chose the topic rec which contains autos, motorcycles, baseball, and hockey from the version 20-news-18828. The articles were processed by the Rainbow software package with the following options: (1) passing all words through the Porter stemmer before counting them; (2) tossing out any token which is on the stoplist of the SMART system; (3) skipping any headers; (4) ignoring words that occur in 5 or fewer documents. No further preprocessing was done. Removing the empty documents, we obtained 3970 document vectors in a 8014-dimensional space. Finally the documents were normalized into TFIDF representation. The distance between points xi and xj was defined to be d(xi, xj) = 1−⟨xi, xj⟩/∥xi∥∥xj∥ [15]. The k in k-NN was set to 1. The width of the RBF kernel for SVM was set to 1.5, and for the harmonic Gaussian method it was set to 0.15. In our methods, the affinity matrix was constructed by the RBF kernel with the same width used as in the harmonic Gaussian method, but the diagonal elements were set to 0. The test errors averaged over 100 trials are summarized in the right panel of Figure 5. Samples were chosen so that they contain at least one labeled point for each class. It is interesting to note that the harmonic method is very good when the number of labeled points is 4, i.e. one labeled point for each class. We think this is because there are almost equal proportions of different classes in the dataset, and so with four labeled points, the proportions happen to be estimated exactly. The harmonic method becomes worse, however, if slightly more labeled points are used, for instance, 10 labeled points, which leads to pretty poor estimation. As the number of labeled points increases further, the harmonic method works well again and somewhat better than our method, since the proportions of classes are estimated successfully again. However, our decision rule is much simpler, which in fact corresponds to the so-called naive threshold, the baseline of the harmonic method. 5 Conclusion The key to semi-supervised learning problems is the consistency assumption, which essentially requires a classifying function to be sufficiently smooth with respect to the intrinsic structure revealed by a huge amount of labeled and unlabeled points. We proposed a simple algorithm to obtain such a solution, which demonstrated effective use of unlabeled data in experiments including toy data, digit recognition and text categorization. In our further research, we will focus on model selection and theoretic analysis. Acknowledgments We would like to thank Vladimir Vapnik, Olivier Chapelle, Arthur Gretton, and Andre Elisseeff for their help with this work. We also thank Andrew Ng for helpful discussions about spectral clustering, and the anonymous reviewers for their constructive comments. Special thanks go to Xiaojin Zhu, Zoubin Ghahramani, and John Lafferty who communicated with us on the important post-processing step class mass normalization used in their method and also provided us with their detailed experimental data. References [1] J. R. Anderson. The architecture of cognition. Harvard Univ. press, Cambridge, MA, 1983. [2] M. Belkin and P. Niyogi. Semi-supervised learning on manifolds. Machine Learning Journal, to appear. [3] A. Blum and S. Chawla. Learning from labeled and unlabeled data using graph mincuts. In ICML, 2001. [4] O. Chapelle, J. Weston, and B. Sch¨olkopf. Cluster kernels for semi-supervised learning. In NIPS, 2002. [5] D. DeCoste and B. Sch¨olkopf. Training invariant support vector machines. Machine Learning, 46:161–190, 2002. [6] T. Joachims. Transductive learning via spectral graph partitioning. In ICML, 2003. [7] J. Kandola, J. Shawe-Taylor, and N. Cristianini. Learning semantic similarity. In NIPS, 2002. [8] R. I. Kondor and J. Lafferty. Diffusion kernels on graphs and other discrete input spaces. In ICML, 2002. [9] A. Y. Ng, M. I. Jordan, and Y. Weiss. On spectral clustering: analysis and an algorithm. In NIPS, 2001. [10] M. Seeger. Learning with labeled and unlabeled data. Technical report, The University of Edinburgh, 2000. [11] J. Shrager, T. Hogg, and B. A. Huberman. Observation of phase transitions in spreading activation networks. Science, 236:1092–1094, 1987. [12] A. Smola and R. I. Kondor. Kernels and regularization on graphs. In Learning Theory and Kernel Machines, Berlin - Heidelberg, Germany, 2003. Springer Verlag. [13] M. Szummer and T. Jaakkola. Partially labeled classification with markov random walks. In NIPS, 2001. [14] V. N. Vapnik. Statistical learning theory. Wiley, NY, 1998. [15] X. Zhu, Z. Ghahramani, and J. Lafferty. Semi-supervised learning using gaussian fields and harmonic functions. In ICML, 2003.
2003
109
2,320
A Model for Learning the Semantics of Pictures V. Lavrenko, R. Manmatha, J. Jeon Center for Intelligent Information Retrieval Computer Science Department, University of Massachusetts Amherst {lavrenko,manmatha,jeon}@cs.umass.edu Abstract We propose an approach to learning the semantics of images which allows us to automatically annotate an image with keywords and to retrieve images based on text queries. We do this using a formalism that models the generation of annotated images. We assume that every image is divided into regions, each described by a continuous-valued feature vector. Given a training set of images with annotations, we compute a joint probabilistic model of image features and words which allow us to predict the probability of generating a word given the image regions. This may be used to automatically annotate and retrieve images given a word as a query. Experiments show that our model significantly outperforms the best of the previously reported results on the tasks of automatic image annotation and retrieval. 1 Introduction Historically, librarians have retrieved images by first manually annotating them with keywords. Given a query, these annotations are used to retrieve appropriate pictures. Underlying this approach is the belief that the words associated (manually) with a picture essentially capture the semantics of the picture and any retrieval based on these keywords will, therefore, retrieve relevant pictures. Since manual image annotation is expensive, there has been great interest in coming up with automatic ways to retrieve images based on content. Queries based on image concepts like color or texture have been proposed for retrieving images by content but most users find it difficult to query using such visual attributes. Most people would prefer to pose text queries and find images relevant to those queries. For example, one should be able to pose a query like “find me cars on a race track”. This is difficult if not impossible with many of the current image retrieval systems and hence has not led to widespread adoption of these systems. We propose a model which looks at the probability of associating words with image regions. Single pixels and regions are often hard to interpret. The surrounding context often simplifies the interpretation of regions as a specific objects. For example, the association of a region with the word tiger is increased by the fact that there is a grass region and a water region in the same image and should be decreased if instead there is a region corresponding to the interior of an aircraft. Thus the association of different regions provides context while the association of words with image regions provides meaning. Our model computes a joint probability of image features over different regions in an image using a training set and uses this joint probability to annotate and retrieve images. More formally, we propose a statistical generative model to automatically learn the semantics of images - that is, for annotating and retrieving images based on a training set of images. We assume that an image is segmented into regions (although the regions could simply be a partition of the image) and that features are computed over each of these regions. Given a training set of images with annotations, we show that probabilistic models allow us to predict the probability of generating a word given the features computed over different regions in an image. This may be used to automatically annotate and retrieve images given a word as a query. We show that the continuous relevance model - a statistical generative model related to relevance models in information retrieval - allows us to derive these probabilities in a natural way. The model proposed here directly associates continuous features with words and does not require an intermediate clustering stage. Experiments show that the annotation performance of this continuous relevance model is substantially better than any other model tested on the same data set. It is almost an order of magnitude better (in terms of mean precision) than a model based on word-blob co-occurrence model, more than two and a half times better than a state of the art model derived from machine translation and 1.6 times as good as a discrete version of the relevance model. The model also allows ranked retrieval in response to a text query and again performs much better than any other model in this regard. Our model permits us to automatically associate semantics (in terms of words) with pictures and is an important building step in performing automatic object recognition. 2 Related Work Recently, there has been some work on automatically annotating images by looking at the probability of associating words with image regions. Mori et al. [9] proposed a Cooccurrence Model in which they looked at the co-occurrence of words with image regions created using a regular grid. Duygulu et al [4] proposed to describe images using a vocabulary of blobs. First, regions are created using a segmentation algorithm like normalized cuts. For each region, features are computed and then blobs are generated by clustering the image features for these regions across images. Each image is generated by using a certain number of these blobs. Their Translation Model applies one of the classical statistical machine translation models to translate from the set of keywords of an image to the set of blobs forming the image. Jeon et al [5] instead assumed that this could be viewed as analogous to the cross-lingual retrieval problem and used a cross-media relevance model (CMRM) to perform both image annotation and ranked retrieval. They showed that the performance of the model on the same dataset was considerably better than the models proposed by Duygulu et al [4] and Mori et al. [9]. Blei and Jordan [3] extended the Latent Dirichlet Allocation (LDA) Model and proposed a Correlation LDA model which relates words and images. This model assumes that a Dirichlet distribution can be used to generate a mixture of latent factors. This mixture of latent factors is then used to generate words and regions. EM is again used to estimate this model. Blei and Jordan show a few examples for labeling specific regions in an image. The model proposed in this paper is called Continuous-space Relevance Model (CRM). The model is closely related to models proposed by [3, 5], but there are several important differences which we will highlight in the remainder of this section. On the surface, CRM appears to be very similar to one of the intermediate models considered by Blei and Jordan [3]. Specifically, their GM-mixture model employs a nearly identical dependence structure among the random variables involved. However, the topological structure of CRM is quite different from the one employed by [3]. GM-mixture assumes a low-dimensional topology, leading to a fully-parametric model where 200 or so “latent aspects” are estimated using the EM algorithm. To contrast that, CRM makes no assumptions about the topological structure, and leads to a doubly non-parametric approach, where expectations are computed over every individual point in the training set. In that regard, CRM appears very similar to the cross-media relevance model (CMRM) [5], which is also doubly non-parametric. There are two significant differences between CRM and CMRM. First, CMRM is a discrete model and cannot take advantage of continuous features. In order to use CMRM for image annotation we have to quantize continuous feature J w1 w2 w3 g1 g2 g3 tiger = grass = sun = position,size, texture,shape, color, ... r1 r2 r 3 = = = P(w|J) P(g|J) P(r|g) Figure 1: A generative model of annotated images. Words wj in the annotation are i.i.d. sampled from the underlying multinomial. Image pixels are produced by first picking a set of i.i.d. feature vectors {g1. . .gn}, then generating image regions {r1. . .rn} from the feature vectors, and finally stacking the regions on top of each other. vectors into a discrete vocabulary (similarly to the co-ocurrence and translation [4] models). CRM, on the other hand, directly models continuous features. The second difference is that CMRM relies on clustering of the feature vectors into blobs. Annotation quality of the CMRM is very sensitive to clustering errors, and depends on being able to a-priori select the right cluster granularity: too many clusters will result in exptreme sparseness of the space, while too few will lead us to confuse different objects in the images. CRM does not rely on clustering and consequently does not suffer from the granularity issues. We would like to stress that the difference between CRM and previously discussed models is not merely conceptual. In section 4 we will show that CRM performs significantly better than all previosly proposed models on the tasks of image annotation and retrieval. To ensure a fair comparison, we use exactly the same data set and same feature representations as were used in [3, 4, 5, 9]. 3 A Model of Annotated Images The purpose of this section is to introduce a statistical formalism that will allow us to model a relationship between the contents of a given image and the annotation of that image. We will describe an approach to learning a joint probability disdribution P(r, w) over the regions r of some image and the words w in its annotation. Knowing the joint distribution P(r, w) is the key to solving two important real-world problems: 1. Image Annotation. Suppose we are given a new image for which no annotation is provided. That is, we know r, but do not know w. Having a joint distribution allows us to compute a conditional likelihood P(w|r) which can then be used to guess the most likely annotation w for the image in question. The new annotation can be presented to a user, indexed, or used for retrieval purposes. 2. Image Retrieval. Suppose we are given a collection of un-annotated images and a text query wqry consisting of a few keywords. Knowing the joint model of images and annotations, we can compute the query likelihood P(wqry|rJ) for every image J in the dataset. We can then rank images in the collection according to their likelihood of having the query as annotation, resulting in a special case of the popular Language Modeling approach to Information Retrieval [6]. The remainder of this section is organized as follows. In section 3.1 we discuss our choice of representation for images and their annotations. Section 3.2 presents a generative framework for relating image regions with image annotations. Section 3.3 provides detailed estimates for the components of our model. 3.1 Representation of Images and Annotations Let C denote the finite set of all possible pixel colors. We assume that C includes one “transparent” color c0, which will be handy when we have to layer image regions. As a matter of convenience, we assume that all images are of a fixed size W × H.1 This assumption allows us to represent any image as an element of a finite set R = CW ×H. We assume that each image contains several distinct regions {r1. . .rn}. Each region is itself an element of R and contains the pixels of some prominent object in the image, all pixels around the object are set to be transparent. For example, in Figure 1 we have a hypothetical picture containing three prominent objects: a tiger, the sun and some grass. Each object is represented by its own region: r1 for the sun, r2 for the grass, and r3 for the tiger. The final image is the result of stacking or layering the regions on top of each other, as shown on the right side of Figure 1. In our model of images, a central part will be played by a special function G which maps image regions r ∈R to real-valued vectors g ∈IRk. The value G(r) represents a set of features, or characteristics of an image region. The features could reflect the position of an object region, its relative size, a crude reflection of shape, as well as predominant colors and textures. For example, in Figure 1 the region r1 (sun) is a round object, located in the upper-right portion of the image, yellowish in color with a smooth texture. When we model image generation we will treat the output of G as a generator or a “recipe” for producing a certain type of image. For example, a feature vetor g1 = G(r1) can be thought of as a generator for any image region resembling a sun-like object in the upper-left corner. Finally, an annotation for a given image is a set of words {w1. . .wm} drawn from some finite vocabulary V. We assume that the annotation describes the objects represented by regions {r1. . .rn}. However, contrary to prior work [4, 3] we do not assume an underlying one-to-one correspondence between the objects in the image annotation and words in the annotation. Instead, we are interested in modeling a joint probability for observing a set of image regions {r1. . .rn} together with the set of annotation words {w1. . .wm}. 3.2 A Model for Generating Annotated Images Suppose T is the training set of annotated images, and let J be an element of T . According to the previous section J is represented as a set of image regions rJ = {r1. . .rn} along with the corresponding annotation wJ = {w1. . .wm}. We assume that the process that generated J is based on three distinct probability distributions. First, we assume that the words in wJ are an i.i.d. random sample from some underlying multinomial distribution PV(·|J). Second, the regions rJ are produced from a corresponding set of generator vectors g1. . .gn according to a process PR(ri|gi) which is independent of J. Finally, the generator vectors g1. . .gn are themselves an i.i.d. random sample from some underlying multi-variate density function PG(·|J). Now let rA = {r1. . .rnA} denote the regions of some image A, which is not in the training set T . Similarly, let wB = {w1. . .wnB} be some arbitrary sequence of words. We would like to model P(rA, wA), the joint probability of observing an image defined by rA together with annotation words wB. We hypothesize that the observation {rA, wB} came from the same process that generated one of the images J ∗in the training set T . However, we don’t know which process that was, and so we compute an expectation over all images J∈T . The overall process for jointly generating wB and rA is as follows: 1. Pick a training image J ∈T with some probability PT (J) 2. For b = 1 . . . nB: (a) Pick the annotation word wb from the multinomial distribution PV(·|J). 3. For a = 1 . . . nA: (a) Sample a generator vector ga from the probability density PG(·|J). (b) Pick the image region ra according to the probability PR(ra|ga) 1The assumptions of finite colormap and fixed image size can easily be relaxed but require arguments that are beyond the scope of this paper. Figure 1 shows a graphical dependency diagram for the generative process outlined above. We show the process of generating a simple image consisting of three regions and a corresponding 3-word annotation. Note that the number of words in the annotation nB does not have to be the same as the number of image regions nA. Formally, the probability of a joint observation {rA, wB} is given by: P(rA, wB) = X J∈T PT (J) nB Y b=1 PV(wb|J) nA Y a=1 Z IRk PR(ra|ga)PG(ga|J)dga (1) 3.3 Estimating Parameters of the Model In this section we will discuss simple but effective estimation techniques for the four components of the model: PT , PV, PG and PR. PT (J) is the probability of selecting the underlying model of image J to generate some new observation r, w. In the absence of any task knowledge we use a uniform prior PT (J) = 1/NT , where NT is the size of the training set. PR(r|g) is a global probability distribution responsible for mapping generator vectors g∈IRk to actual image regions r∈R. In our case for every image region r there is only one corresponding generator g = G(r), so we can assume a particularly simple form for the distribution PR: PR(r|g) =  1/Ng if G(r) = g 0 otherwise (2) where Ng is the number of all regions r′ in R such that G(r′) = g. For the scope of the current paper we do not attempt to reliably estimate Ng, instead we assume it to be a constant independent of g. PG(·|J) is a density function responsible for generating the feature vectors g1. . .gn, which are later mapped to image regions rJ according to PR. We use a non-parametric kernelbased density estimate for the distribution PG. Assuming rJ = {r1. . .rn} to be the set of regions of image J we estimate: PG(g|J) = 1 n n X i=1 1 p 2kπk|Σ| exp  (g −G(ri))⊤Σ−1(g −G(ri)) (3) Equation (3) arises out of placing a Gaussian kernel over the feature vector G(ri) of every region of image J. Each kernel is parametrized by the feature covariance matrix Σ. As a matter of convenience we assumed Σ = β·I, where I is the identity matrix. β playes the role of kernel bandwidth: it determines the smoothness of PG around the support point G(ri). The value of β is selected empirically on a held-out portion of the training set T . PV(·|J) is the multinomial distribution that is assumed to have generated the annotation wJ of image J∈T . We use a Bayesian framework for estimating PV(·|J). Let IP V be the simplex of all multinomial distributions over V. We assume a Dirichlet prior over IP V that has parameters {µpv : v∈V}. Here µ is a constant, selected empirically, and pv is the relative frequency of observing the word v in the training set. Introducing the observation wJ results in a Dirichlet posterior over IP V with parameters {µpv + Nv,J : v∈V}. Here Nv,J is the number of times v occurs in the observation wJ. Computing the expectation over this Dirichlet posterior gives us the following Bayesian estimate for PV: PV(v|J) = µpv + Nv,J µ + P v′ Nv′,J (4) 4 Experimental Results To provide a meaningful comparison with previously-reported results, we use, without any modification, the dataset provided by Duygulu et al.[4] 2. This allows us to compare the 2Available at http://www.cs.arizona.edu/people/kobus/ research/data/eccv 2002 Models Co-occurence Translation CMRM CRM #words with recall ≥0 19 49 66 107 +62% Results on 49 best words, as in[1, 5] Mean per-word Recall 0.34 0.48 0.70 +46% Mean per-word Precision 0.20 0.40 0.59 +48% Results on all 260 words Mean per-word Recall 0.02 0.04 0.09 0.19 +111% Mean per-word Precision 0.03 0.06 0.10 0.16 +60 % Table 1: Comparing recall and precision of the four models on the task of automatic image annotation. Our model (CRM) substantially outperforms all other models. Percent improvements are over the best previously-reported results (CMRM). performance of models in a strictly controlled manner. The dataset consists of 5,000 images from 50 Corel Stock Photo cds. Each cd includes 100 images on the same topic. Each image contains an annotation of 1-5 keywords. Overall there are 371 words. Prior to modeling, every image in the dataset is pre-segmented into regions using general-purpose algorithms, such as normalized cuts [11]. We use pre-computed feature vector G(r) for every segmented region r. The feature set consists of 36 features: 18 color features, 12 texture features and 6 shape features. For details of the features refer to [4]. Since we directly model the generation of feature vectors, there is no need to quantize feature data, as was done in [1, 4, 5]. We divided the dataset into 3 parts - with 4,000 training set images, 500 evaluation set images and 500 images in the test set. The evaluation set is used to find system parameters. After fixing the parameters, we merged the 4,000 training set and 500 evaluation set images to make a new training set. This corresponds to the training set of 4500 images and the test set of 500 images used by Duygulu et al [4]. 4.1 Results: Automatic Image Annotation In this section we evaluate the performance of our model on the task of automatic image annotation. We are given an un-annotated image J and are asked to automatically produce an annotation wauto. The automatic annotation is then compared to the held-out human annotation wJ. We follow the experimental methodology used by[4, 5]. Given a set of image regions rJ we use equation (1) to arrive at the conditional distribution P(w|rJ). We take the top 5 words from that distribution and call them the automatic annotation of the image in question. Then, following [4], we compute annotation recall and precision for every word in the testing set. Recall is the number of images correctly annotated with a given word, divided by the number of images that have that word in the human annotation. Precision is the number of correctly annotated images divided by the total number of images annotated with that particular word (correctly or not). Recall and precision values are averaged over the set of testing words. We compare the annotation performance of the four models: the Co-occurrence Model [9], the Translation Model [4], CMRM [5] and the model proposed in this paper (CRM). We report the results on two sets of words: the subset of 49 best words which was used by[4, 5], and the complete set of all 260 words that occur in the testing set. Table 1 shows the performance on both word sets. The figures clearly show that the model presented here (CRM) substabtially outperforms the other models and is the only one of the four capable of producing reasonable mean recall and mean precision numbers when every word in the test set is used. In Figure2 we provide sample annotations for the two best models in the table, CMRM and CRM, showing that the model in this paper is considerably more accurate.                                                   Figure 2: The generative model based on contiuous features (CRM) that is proposed here performs substantially better than the discrete cross-media relevance model (CMRM) for annotating images in the test set. Query length 1 word 2 words 3 words 4 words Number of queries 179 386 178 24 Relevant images 1675 1647 542 67 Precision after 5 retrieved images CMRM 0.1989 0.1306 0.1494 0.2083 CRM 0.2480 +25% 0.1902 +45% 0.1888 +26% 0.2333 +12% Mean Average Precision CMRM 0.1697 0.1642 0.2030 0.2765 CRM 0.2353 +39% 0.2534 +54% 0.3152 +55% 0.4471 +61% Table 2: Comparing our model to the Cross-Media Relevance Model (CMRM) on the task of image retrieval. Our model outperforms the CMRM model by a wide margin on all query sets. Boldface figures mark improvements that are statistically significant according to sign test with a confidence of 99% (p-value < 0.01). 4.2 Results: Ranked Retrieval of Images In this section we turn our attention to the problem of ranked retrieval of images. In the retrieval setting we are given a text query wqry and a testing collection of un-annotated images. For each testing image J we use equation (1) to get the conditional probability P(wqry|rJ). All images in the collection are ranked according to the conditional likelihood P(wqry|rJ). This can be thought of as a special case of the popular Langauge Modeling approach to Information Retrieval, proposed by Ponte and Croft[6]. In our retrieval experiments we do our best to reproduce the same settings that were used by Jeon et.al[5] in their work. Following[5], we use four sets of queries, constructed from all 1-, 2-, 3- and 4-word combinations of words that occur at least twice in the testing set. An image is considered relevant to a given query if its manual annotation contains all of the query words. As our evaluation metrics we use precision at 5 retrieved images and non-interpolated average precision3, averaged over the entire query set. Precision at 5 documents is a good measure of performance for a casual user who is interested in retrieving a couple of relevant items without looking at too much junk. Average precision is more appropriate for a professional user who wants to find a large proportion of relevant items. Table 2 shows the performance of our model on the four query sets, contrasted with performance of the CMRM[5] baseline on the same data. Baseline performance figures are quoted directly from the tables in[5]. We observe that our model substantially outperforms the CMRM baseline on every query set. Improvements in average precision are particularly impressive, our model outperforms the baseline by 40 - 60 percent. All improvements on 1-, 2- and 3-word queries are statistically significant based on a sign test with a p-value of 3Average precision is the average of precision values at the ranks where relevant items occur. Figure 3: Example: top 5 images retrieved in responce to text query “cars track” 0.01. We are also very encouraged by the precision our model shows at 5 retrieved images: precision values around 0.2 suggest that an average query always has a relevant image in the top 5. Figure 3 shows top 5 images retrieved in response to the text query “cars track”. 5 Conclusions and Future Work We have proposed a new statistical generative model for learning the semantics of images. We showed that this model works significantly better than a number of other models for image annotation and retrieval. Our model works directly on the continuous features. Future work will include the extension of this work to larger datasets (both training and test data). We believe this is needed both for better coverage and an evaluation of how such algorithms extend to large data sets. Improved feature sets may also lead to substantial improvements in performance. 6 Acknowledgments We thank Kobus Barnard for making their dataset [4] available. This work was supported in part by the Center for Intelligent Information Retrieval, by the National Science Foundation under grant NSF IIS-9909073 and by SPAWARSYSCEN-SD under grants N66001-991-8912 and N66001-02-1-8903. Jiwoon Jeon is partially supported by the Government of Korea. Any opinions, findings and conclusions or recommendations expressed in this material are the author(s) and do not necessarily reflect those of the sponsor. References [1] K. Barnard, P. Duygulu, N. de Freitas, D. Forsyth, D. Blei, and M. I. Jordan. Matching words and pictures. Journal of Machine Learning Research, 3:1107-1135, 2003. [2] D. Blei (2003) Private Communication. [3] D. Blei, and M. I. Jordan. (2003) Modeling annotated data. In Proceedings of the 26th Intl. ACM SIGIR Conf., pages 127–134, 2003 [4] P. Duygulu, K. Barnard, N. de Freitas, and D. Forsyth. Object recognition as machine translation: Learning a lexicon for a fixed image vocabulary. In Seventh European Conf. on Computer Vision, pages 97-112, 2002. [5] J. Jeon, V. Lavrenko and R. Manmatha. (2003) Automatic Image Annotation and Retrieval using Cross-Media Relevance Models In Proceedings of the 26th Intl. ACM SIGIR Conf., pages 119–126, 2003 [6] Ponte, J. M. and Croft, W. B. (1998). A language modeling approach to information retrieval. Proceedings of the 21st Intl. ACM SIGIR Conf., pages 275–281. [7] V. Lavrenko and W. Croft. Relevance-based language models. Proceedings of the 24th Intl. ACM SIGIR Conf., pages 120-127, 2001. [8] V. Lavrenko, M. Choquette, and W. Croft. Cross-lingual relevance models. Proceedings of the 25th Intl. ACM SIGIR Conf., pages 175–182, 2002. [9] Y. Mori, H. Takahashi, and R. Oka. Image-to-word transformation based on dividing and vector quantizing images with words. In MISRM’99 First Intl. Workshop on Multimedia Intelligent Storage and Retrieval Management, 1999. [10] H. Schneiderman, T. Kanade. A Statistical Method for 3D Object Detection Applied to Faces and Cars. Proc. IEEE CVPR 2000: 1746-1759 [11] J. Shi and J. Malik. Normalized cuts and image segmentation. IEEE Transactions on Pattern Analysis and Machine Intelligence, 22(8):888–905, 2000.
2003
11
2,321
Max-Margin Markov Networks Ben Taskar Carlos Guestrin Daphne Koller {btaskar,guestrin,koller}@cs.stanford.edu Stanford University Abstract In typical classification tasks, we seek a function which assigns a label to a single object. Kernel-based approaches, such as support vector machines (SVMs), which maximize the margin of confidence of the classifier, are the method of choice for many such tasks. Their popularity stems both from the ability to use high-dimensional feature spaces, and from their strong theoretical guarantees. However, many real-world tasks involve sequential, spatial, or structured data, where multiple labels must be assigned. Existing kernel-based methods ignore structure in the problem, assigning labels independently to each object, losing much useful information. Conversely, probabilistic graphical models, such as Markov networks, can represent correlations between labels, by exploiting problem structure, but cannot handle high-dimensional feature spaces, and lack strong theoretical generalization guarantees. In this paper, we present a new framework that combines the advantages of both approaches: Maximum margin Markov (M3) networks incorporate both kernels, which efficiently deal with high-dimensional features, and the ability to capture correlations in structured data. We present an efficient algorithm for learning M3 networks based on a compact quadratic program formulation. We provide a new theoretical bound for generalization in structured domains. Experiments on the task of handwritten character recognition and collective hypertext classification demonstrate very significant gains over previous approaches. 1 Introduction In supervised classification, our goal is to classify instances into some set of discrete categories. Recently, support vector machines (SVMs) have demonstrated impressive successes on a broad range of tasks, including document categorization, character recognition, image classification, and many more. SVMs owe a great part of their success to their ability to use kernels, allowing the classifier to exploit a very high-dimensional (possibly even infinite-dimensional) feature space. In addition to their empirical success, SVMs are also appealing due to the existence of strong generalization guarantees, derived from the margin-maximizing properties of the learning algorithm. However, many supervised learning tasks exhibit much richer structure than a simple categorization of instances into one of a small number of classes. In some cases, we might need to label a set of inter-related instances. For example: optical character recognition (OCR) or part-of-speech tagging both involve labeling an entire sequence of elements into some number of classes; image segmentation involves labeling all of the pixels in an image; and collective webpage classification involves labeling an entire set of interlinked webpages. In other cases, we might want to label an instance (e.g., a news article) with multiple non-exclusive labels. In both of these cases, we need to assign multiple labels simultaneously, leading to a classification problem that has an exponentially large set of joint labels. A common solution is to treat such problems as a set of independent classification tasks, dealing with each instance in isolation. However, it is well-known that this approach fails to exploit significant amounts of correlation information [7]. An alternative approach is offered by the probabilistic framework, and specifically by probabilistic graphical models. In this case, we can define and learn a joint probabilistic model over the set of label variables. For example, we can learn a hidden Markov model, or a conditional random field (CRF) [7] over the labels and features of a sequence, and then use a probabilistic inference algorithm (such as the Viterbi algorithm) to classify these instances collectively, finding the most likely joint assignment to all of the labels simultaneously. This approach has the advantage of exploiting the correlations between the different labels, often resulting in significant improvements in accuracy over approaches that classify instances independently [7, 10]. The use of graphical models also allows problem structure to be exploited very effectively. Unfortunately, even probabilistic graphical models that are trained discriminatively do not usually achieve the same level of generalization accuracy as SVMs, especially when kernel features are used. Moreover, they are not (yet) associated with generalization bounds comparable to those of margin-based classifiers. Clearly, the frameworks of kernel-based and probabilistic classifiers offer complementary strengths and weaknesses. In this paper, we present maximum margin Markov (M3) networks, which unify the two frameworks, and combine the advantages of both. Our approach defines a log-linear Markov network over a set of label variables (e.g., the labels of the letters in an OCR problem); this network allows us to represent the correlations between these label variables. We then define a margin-based optimization problem for the parameters of this model. For Markov networks that can be triangulated tractably, the resulting quadratic program (QP) has an equivalent polynomial-size formulation (e.g., linear for sequences) that allows a very effective solution. By contrast, previous margin-based formulations for sequence labeling [3, 1] require an exponential number of constraints. For non-triangulated networks, we provide an approximate reformulation based on the relaxation used by belief propagation algorithms [8, 12]. Importantly, the resulting QP supports the same kernel trick as do SVMs, allowing probabilistic graphical models to inherit the important benefits of kernels. We also show a generalization bound for such margin-based classifiers. Unlike previous results [3], our bound grows logarithmically rather than linearly with the number of label variables. Our experimental results on character recognition and on hypertext classification, demonstrate dramatic improvements in accuracy over both kernel-based instance-by-instance classification and probabilistic models. 2 Structure in classification problems In supervised classification, the task is to learn a function h : X 7→Y from a set of m i.i.d. instances S = {(x(i), y(i) = t(x(i)))}m i=1, drawn from a fixed distribution DX×Y. The classification function h is typically selected from some parametric family H. A common choice is the linear family: Given n real-valued basis functions fj : X × Y 7→IR, a hypothesis hw ∈H is defined by a set of n coefficients wj such that: hw(x) = arg max y n X i=1 wjfj(x, y) = arg max y w⊤f(x, y) , (1) where the f(x, y) are features or basis functions. The most common classification setting — single-label classification — takes Y = {y1, . . . , yk}. In this paper, we consider the much more general setting of multi-label classification, where Y = Y1 × . . . × Yl with Yi = {y1, . . . , yk}. In an OCR task, for example, each Yi is a character, while Y is a full word. In a webpage collective classification task [10], each Yi is a webpage label, whereas Y is a joint label for an entire website. In these cases, the number of possible assignments to Y is exponential in the number of labels l. Thus, both representing the basis functions fj(x, y) in (1) and computing the maximization arg maxy are infeasible. An alternative approach is based on the framework of probabilistic graphical models. In this case, the model defines (directly or indirectly) a conditional distribution P(Y | X). We can then select the label arg maxy P(y | x). The advantage of the probabilistic framework is that it can exploit sparseness in the correlations between labels Yi. For example, in the OCR task, we might use a Markov model, where Yi is conditionally independent of the rest of the labels given Yi−1, Yi+1. We can encode this structure using a Markov network. In this paper, purely for simplicity of presentation, we focus on the case of pairwise interactions between labels. We emphasize that our results extend easily to the general case. A pairwise Markov network is defined as a graph G = (Y, E), where each edge (i, j) is associated with a potential function ψij(x, yi, yj). The network encodes a joint conditional probability distribution as P(y | x) ∝Q (i,j)∈E ψij(x, yi, yj). These networks exploit the interaction structure to parameterize a classifier very compactly. In many cases (e.g., tree-structured networks), we can use effective dynamic programming algorithms (such as the Viterbi algorithm) to find the highest probability label y; in others, we can use approximate inference algorithms that also exploit the structure [12]. The Markov network distribution is simply a log-linear model, with the pairwise potential ψij(x, yi, yj) representing (in log-space) a sum of basis functions over x, yi, yj. We can therefore parameterize such a model using a set of pairwise basis functions f(x, yi, yj) for (i, j) ∈E. We assume for simplicity of notation that all edges in the graph denote the same type of interaction, so that we can define a set of features fk(x, y) = X (i,j)∈E fk(x, yi, yj). (2) The network potentials are then ψij(x, yi, yj) = exp [Pn k=1 wkfk(x, yi, yj)] = exp  w⊤f(x, yi, yj)  . The parameters w in a log-linear model can be trained to fit the data, typically by maximizing the likelihood or conditional likelihood (e.g., [7, 10]). This paper presents an algorithm for selecting w that maximize the margin, gaining all of the advantages of SVMs. 3 Margin-based structured classification For a single-label binary classification problem, support vector machines (SVMs) [11] provide an effective method of learning a maximum-margin decision boundary. For singlelabel multi-class classification, Crammer and Singer [5] provide a natural extension of this framework by maximizing the margin γ subject to constraints: maximize γ s.t. ||w|| ≤1; w⊤∆fx(y) ≥γ, ∀x ∈S, ∀y ̸= t(x); (3) where ∆fx(y) = f(x, t(x)) −f(x, y). The constraints in this formulation ensure that arg maxy w⊤f(x, y) = t(x). Maximizing γ magnifies the difference between the value of the true label and the best runner-up, increasing the “confidence” of the classification. In structured problems, where we are predicting multiple labels, the loss function is usually not simple 0-1 loss I(arg maxy w⊤fx(y) = t(x)), but per-label loss, such as the proportion of incorrect labels predicted. In order to extend the margin-based framework to the multi-label setting, we must generalize the notion of margin to take into account the number of labels in y that are misclassified. In particular, we would like the margin between t(x) and y to scale linearly with the number of wrong labels in y, ∆tx(y): maximize γ s.t. ||w|| ≤1; w⊤∆fx(y) ≥γ ∆tx(y), ∀x ∈S, ∀y; (4) where ∆tx(y) = P l i=1 ∆tx(yi) and ∆tx(yi) ≡I(yi ̸= (t(x))i). Now, using a standard transformation to eliminate γ, we get a quadratic program (QP): minimize 1 2||w||2 s.t. w⊤∆fx(y) ≥∆tx(y), ∀x ∈S, ∀y. (5) Unfortunately, the data is often not separable by a hyperplane defined over the space of the given set of features. In such cases, we need to introduce slack variables ξx to allow some constraints to be violated. We can now present the complete form of our optimization problem, as well as the equivalent dual problem [2]: Primal formulation (6) min 1 2||w||2 + C X x ξx ; s.t. w⊤∆fx(y) ≥∆tx(y) −ξx, ∀x, y. Dual formulation (7) max X x,y αx(y)∆tx(y) −1 2 ˛˛˛˛˛ ˛˛˛˛˛ X x,y αx(y)∆fx(y) ˛˛˛˛˛ ˛˛˛˛˛ 2 ; s.t. X y αx(y) = C, ∀x; αx(y) ≥0 , ∀x, y. (Note: for each x, we add an extra dual variable αx(t(x)), with no effect on the solution.) 4 Exploiting structure in M3 networks Unfortunately, both the number of constraints in the primal QP in (6), and the number of variables in the dual QP in (7) are exponential in the number of labels l. In this section, we present an equivalent, polynomially-sized, formulation. Our main insight is that the variables αx(y) in the dual formulation (7) can be interpreted as a density function over y conditional on x, as P y αx(y) = C and αx(y) ≥0. The dual objective is a function of expectations of ∆tx(y) and ∆fx(y) with respect to αx(y). Since both ∆tx(y) = P i ∆tx(yi) and ∆fx(y) = P (i,j) ∆fx(yi, yj) are sums of functions over nodes and edges, we only need node and edge marginals of the measure αx(y) to compute their expectations. We define the marginal dual variables as follows: µx(yi, yj) = P y∼[yi,yj] αx(y), ∀(i, j) ∈E, ∀yi, yj, ∀x; µx(yi) = P y∼[yi] αx(y), ∀i, ∀yi, ∀x; (8) where y ∼[yi, yj] denotes a full assignment y consistent with partial assignment yi, yj. Now we can reformulate our entire QP (7) in terms of these dual variables. Consider, for example, the first term in the objective function: X y αx(y)∆tx(y) = X y X i αx(y)∆tx(yi) = X i,yi ∆tx(yi) X y∼[yi] αx(y) = X i,yi µx(yi)∆tx(yi). The decomposition of the second term in the objective uses edge marginals µx(yi, yj). In order to produce an equivalent QP, however, we must also ensure that the dual variables µx(yi, yj), µx(yi) are the marginals resulting from a legal density α(y); that is, that they belong to the marginal polytope [4]. In particular, we must enforce consistency between the pairwise and singleton marginals (and hence between overlapping pairwise marginals): X yi µx(yi, yj) = µx(yj), ∀yj, ∀(i, j) ∈E, ∀x. (9) If the Markov network for our basis functions is a forest (singly connected), these constraints are equivalent to the requirement that the µ variables arise from a density. Therefore, the following factored dual QP is equivalent to the original dual QP: max X x X i,yi µx(yi)∆tx(yi) −1 2 X x,ˆx X (i,j) yi,yj X (r,s) yr,ys µx(yi, yj)µˆx(yr, ys)fx(yi, yj)⊤fˆx(yr, ys); s.t. X yi µx(yi, yj) = µx(yj); X yi µx(yi) = C; µx(yi, yj) ≥0. (10) Similarly, the original primal can be factored as follows: min 1 2||w||2 + C X x X i ξx,i + C X x X (i,j) ξx,ij; s.t. w⊤∆fx(yi, yj) + X (i′,j):i′̸=i mx,i′(yj) + X (j′,i):j′̸=j mx,j′(yi) ≥−ξx,ij; X (i,j) mx,j(yi) ≥∆tx(yi) −ξx,i; ξx,ij ≥0, ξx,i ≥0. (11) The solution to the factored dual gives us: w = P x P (i,j) P yi,yj µx(yi, yj)∆fx(yi, yj). Theorem 4.1 If for each x the edges E form a forest, then a set of weights w will be optimal for the QP in (6) if and only if it is optimal for the factored QP in (11). If the underlying Markov net is not a forest, then the constraints in (9) are not sufficient to enforce the fact that the µ’s are in the marginal polytope. We can address this problem by triangulating the graph, and introducing new η LP variables that now span larger subsets of Yi’s. For example, if our graph is a 4-cycle Y1—Y2—Y3—Y4—Y1, we might triangulate the graph by adding an arc Y1—Y3, and introducing η variables over joint instantiations of the cliques Y1, Y2, Y3 and Y1, Y3, Y4. These new η variables are used in linear equalities that constrain the original µ variables to be consistent with a density. The η variables appear only in the constraints; they do not add any new basis functions nor change the objective function. The number of constraints introduced is exponential in the number of variables in the new cliques. Nevertheless, in many classification problems, such as sequences and other graphs with low tree-width [4], the extended QP can be solved efficiently. Unfortunately, triangulation is not feasible in highly connected problems. However, we can still solve the QP in (10) defined by an untriangulated graph with loops. Such a procedure, which enforces only local consistency of marginals, optimizes our objective only over a relaxation of the marginal polytope. In this way, our approximation is analogous to the approximate belief propagation (BP) algorithm for inference in graphical models [8]. In fact, BP makes an additional approximation, using not only the relaxed marginal polytope but also an approximate objective (Bethe free-energy) [12]. Although the approximate QP does not offer the theoretical guarantee in Theorem 4.1, the solutions are often very accurate in practice, as we demonstrate below. As with SVMs [11], the factored dual formulation in (10) uses only dot products between basis functions. This allows us to use a kernel to define very large (and even infinite) set of features. In particular, we define our basis functions by fx(yi, yj) = ρ(yi, yj)φij(x), i.e., the product of a selector function ρ(yi, yj) with a possibly infinite feature vector φij(x). For example, in the OCR task, ρ(yi, yj) could be an indicator function over the class of two adjacent characters i and j, and φij(x) could be an RBF kernel on the images of these two characters. The operation fx(yi, yj)⊤fˆx(yr, ys) used in the objective function of the factored dual QP is now ρ(yi, yj)ρ(yr, ys)Kφ(x, i, j, ˆx, r, s), where Kφ(x, i, j, ˆx, r, s) = φij(x) · φrs(x) is the kernel function for the feature φ. Even for some very complex functions φ, the dot-product required to compute Kφ can be executed efficiently [11]. 5 SMO learning of M3 networks Although the number of variables and constraints in the factored dual in (10) is polynomial in the size of the data, the number of coefficients in the quadratic term (kernel matrix) in the objective is quadratic in the number of examples and edges in the network. Unfortunately, this matrix is often too large for standard QP solvers. Instead, we use a coordinate descent method analogous to the sequential minimal optimization (SMO) used for SVMs [9]. Let us begin by considering the original dual problem (7). The SMO approach solves this QP by analytically optimizing two-variable subproblems. Recall that P y αx(y) = C. We can therefore take any two variables αx(y1), αx(y2) and “move weight” from one to the other, keeping the values of all other variables fixed. More precisely, we optimize for α′ x(y1), α′ x(y2) such that α′ x(y1) + α′ x(y2) = αx(y1) + αx(y2). Clearly, however, we cannot perform this optimization in terms of the original dual, which is exponentially large. Fortunately, we can perform precisely the same optimization in terms of the marginal dual variables. Let λ = α′ x(y1) −αx(y1) = αx(y2) −α′ x(y2). Consider a dual variable µx(yi, yj). It is easy to see that a change from αx(y1), αx(y2) to α′ x(y1), α′ x(y2) has the following effect on µx(yi, yj): µ′ x(yi, yj) = µx(yi, yj) + λI(yi = y1 i , yj = y1 j ) −λI(yi = y2 i , yj = y2 j ). (12) We can solve the one-variable quadratic subproblem in λ analytically and update the appropriate µ variables. We use inference in the network to test for optimality of the current solution (the KKT conditions [2]) and use violations from optimality as a heuristic to select the next pair y1, y2. We omit details for lack of space. 6 Generalization bound In this section, we show a generalization bound for the task of multi-label classification that allows us to relate the error rate on the training set to the generalization error. As we shall see, this bound is significantly stronger than previous bounds for this problem. Our goal in multi-label classification is to maximize the number of correctly classified labels. Thus an appropriate error function is the average per-label loss L(w, x) = 1 l ∆tx(arg maxy w⊤fx(y)). As in other generalization bounds for margin-based classifiers, we relate the generalization error to the margin of the classifier. In Sec. 3, we define the notion of per-label margin, which grows with the number of mistakes between the correct assignment and the best runner-up. We can now define a γ-margin per-label loss: Lγ(w, x) = supz: |z(y)−w⊤fx(y)|≤γ∆tx(y); ∀y 1 l ∆tx(arg maxy z(y)). This loss function measures the worst per-label loss on x made by any classifier z which is perturbed from w⊤fx by at most a γ-margin per-label. We can now prove that the generalization accuracy of any classifier is bounded by its expected γ-margin per-label loss on the training data, plus a term that grows inversely with the margin.Intuitively, the first term corresponds to the “bias”, as margin γ decreases the complexity of our hypothesis class by considering a γ-per-label margin ball around w⊤fx and selecting one (the worst) classifier within this ball. As γ shrinks, our hypothesis class becomes more complex, and the first term becomes smaller, but at the cost of increasing the second term, which intuitively corresponds to the “variance”. Thus, the result provides a bound to the generalization error that trades off the effective complexity of the hypothesis space with the training error. Theorem 6.1 If the edge features have bounded 2-norm, max(i,j),yi,yj ∥fx(yi, yj)∥2 ≤ Redge, then for a family of hyperplanes parameterized by w, and any δ > 0, there exists a constant K such that for any γ > 0 per-label margin, and m > 1 samples, the per-label loss is bounded by: ExL(w, x) ≤ ESLγ(w, x) + v u u tK m " R2 edge ∥w∥2 2 q2 γ2 [ln m + ln l + ln q + ln k] + ln 1 δ # ; with probability at least 1−δ, where q = maxi |{(i, j) ∈E}| is the maximum edge degree in the network, k is the number of classes in a label, and l is the number of labels. Unfortunately, we omit the proof due to lack of space. (See a longer version of the paper at http://cs.stanford.edu/˜btaskar/.) The proof uses a covering number argument analogous to previous results in SVMs [13]. However we propose a novel method for covering structured problems by constructing a cover to the loss function from a cover of the individual edge basis function differences ∆fx(yi, yj). This new type of cover is polynomial in the number of edges, yielding significant improvements in the bound. Specifically, our bound has a logarithmic dependence on the number of labels (ln l) and depends only on the 2-norm of the basis functions per-edge (Redge). This is a significant gain over the previous result of Collins [3] which has linear dependence on the number of labels (l), and depends on the joint 2-norm of all of the features (which is ∼lRedge, unless each sequence is normalized separately, which is often ineffective in practice). Finally, note that if l m = O(1) (for example, in OCR, if the number of instances is at least a constant times the length of a word), then our bound is independent of the number of labels l. Such a result was, until now, an open problem for margin-based sequence classification [3]. 7 Experiments We evaluate our approach on two very different tasks: a sequence model for handwriting recognition and an arbitrary topology Markov network for hypertext classification. 0 0.05 0.1 0.15 0.2 0.25 0.3 0.35 Log-Reg CRF mSVM M^3N Test error (average per-character) linear quadratic cubic 0 0.05 0.1 0.15 0.2 0.25 Cor Tex Was Wis Ave Test error (pages per school) mSVM RMN M^3N (a) (b) (c) Figure 1: (a) 3 example words from the OCR data set; (b) OCR: Average per-character test error for logistic regression, CRFs, multiclass SVMs, and M3Ns, using linear, quadratic, and cubic kernels; (c) Hypertext: Test error for multiclass SVMs, RMNs and M3Ns, by school and average. Handwriting Recognition. We selected a subset of ∼6100 handwritten words, with average length of ∼8 characters, from 150 human subjects, from the data set collected by Kassel [6]. Each word was divided into characters, each character was rasterized into an image of 16 by 8 binary pixels. (See Fig. 1(a).) In our framework, the image for each word corresponds to x, a label of an individual character to Yi, and a labeling for a complete word to Y. Each label Yi takes values from one of 26 classes {a, . . . , z}. The data set is divided into 10 folds of ∼600 training and ∼5500 testing examples. The accuracy results, summarized in Fig. 1(b), are averages over the 10 folds. We implemented a selection of state-of-the-art classification algorithms: independent label approaches, which do not consider the correlation between neighboring characters — logistic regression, multi-class SVMs as described in (3), and one-against-all SVMs (whose performance was slightly lower than multi-class SVMs); and sequence approaches — CRFs, and our proposed M3 networks. Logistic regression and CRFs are both trained by maximizing the conditional likelihood of the labels given the features, using a zero-mean diagonal Gaussian prior over the parameters, with a standard deviation between 0.1 and 1. The other methods are trained by margin maximization. Our features for each label Yi are the corresponding image of ith character. For the sequence approaches (CRFs and M3), we used an indicator basis function to represent the correlation between Yi and Yi+1. For margin-based methods (SVMs and M3), we were able to use kernels (both quadratic and cubic were evaluated) to increase the dimensionality of the feature space. Using these high-dimensional feature spaces in CRFs is not feasible because of the enormous number of parameters. Fig. 1(b) shows two types of gains in accuracy: First, by using kernels, margin-based methods achieve a very significant gain over the respective likelihood maximizing methods. Second, by using sequences, we obtain another significant gain in accuracy. Interestingly, the error rate of our method using linear features is 16% lower than that of CRFs, and about the same as multi-class SVMs with cubic kernels. Once we use cubic kernels our error rate is 45% lower than CRFs and about 33% lower than the best previous approach. For comparison, the previously published results, although using a different setup (e.g., a larger training set), are about comparable to those of multiclass SVMs. Hypertext. We also tested our approach on collective hypertext classification, using the data set in [10], which contains web pages from four different Computer Science departments. Each page is labeled as one of course, faculty, student, project, other. In all of our experiments, we learn a model from three schools, and test on the remaining school. The text content of the web page and anchor text of incoming links is represented using a set of binary attributes that indicate the presence of different words. The baseline model is a simple linear multi-class SVM that uses only words to predict the category of the page. The second model is a relational Markov network (RMN) of Taskar et al. [10], which in addition to word-label dependence, has an edge with a potential over the labels of two pages that are hyper-linked to each other. This model defines a Markov network over each web site that was trained to maximize the conditional probability of the labels given the words and the links. The third model is a M3 net with the same features but trained by maximizing the margin using the relaxed dual formulation and loopy BP for inference. Fig. 1(c) shows a gain in accuracy from SVMs to RMNs by using the correlations between labels of linked web pages, and a very significant additional gain by using maximum margin training. The error rate of M3Ns is 40% lower than that of RMNs, and 51% lower than multi-class SVMs. 8 Discussion We present a discriminative framework for labeling and segmentation of structured data such as sequences, images, etc. Our approach seamlessly integrates state-of-the-art kernel methods developed for classification of independent instances with the rich language of graphical models that can exploit the structure of complex data. In our experiments with the OCR task, for example, our sequence model significantly outperforms other approaches by incorporating high-dimensional decision boundaries of polynomial kernels over character images while capturing correlations between consecutive characters. We construct our models by solving a convex quadratic program that maximizes the per-label margin. Although the number of variables and constraints of our QP formulation is polynomial in the example size (e.g., sequence length), we also address its quadratic growth using an effective optimization procedure inspired by SMO. We provide theoretical guarantees on the average per-label generalization error of our models in terms of the training set margin. Our generalization bound significantly tightens previous results of Collins [3] and suggests possibilities for analyzing per-label generalization properties of graphical models. For brevity, we simplified our presentation of graphical models to only pairwise Markov networks. Our formulation and generalization bound easily extend to interaction patterns involving more than two labels (e.g., higher-order Markov models). Overall, we believe that M3 networks will significantly further the applicability of high accuracy margin-based methods to real-world structured data. Acknowledgments. This work was supported by ONR Contract F3060-01-2-0564P00002 under DARPA’s EELD program. References [1] Y. Altun, I. Tsochantaridis, and T. Hofmann. Hidden markov support vector machines. In Proc. ICML, 2003. [2] D. Bertsekas. Nonlinear Programming. Athena Scientific, Belmont, MA, 1999. [3] M. Collins. Parameter estimation for statistical parsing models: Theory and practice of distribution-free methods. In IWPT, 2001. [4] R.G. Cowell, A.P. Dawid, S.L. Lauritzen, and D.J. Spiegelhalter. Probabilistic Networks and Expert Systems. Springer, New York, 1999. [5] K. Crammer and Y. Singer. On the algorithmic implementation of multiclass kernelbased vector machines. Journal of Machine Learning Research, 2(5):265–292, 2001. [6] R. Kassel. A Comparison of Approaches to On-line Handwritten Character Recognition. PhD thesis, MIT Spoken Language Systems Group, 1995. [7] J. Lafferty, A. McCallum, and F. Pereira. Conditional random fields: Probabilistic models for segmenting and labeling sequence data. In Proc. ICML01, 2001. [8] J. Pearl. Probabilistic Reasoning in Intelligent Systems. Morgan Kaufmann, 1988. [9] J. Platt. Using sparseness and analytic QP to speed training of support vector machines. In NIPS, 1999. [10] B. Taskar, P. Abbeel, and D. Koller. Discriminative probabilistic models for relational data. In Proc. UAI02, Edmonton, Canada, 2002. [11] V.N. Vapnik. The Nature of Statistical Learning Theory. Springer-Verlag, New York, 1995. [12] J. Yedidia, W. Freeman, and Y. Weiss. Generalized belief propagation. In NIPS, 2000. [13] T. Zhang. Covering number bounds of certain regularized linear function classes. Journal of Machine Learning Research, 2:527–550, 2002.
2003
110
2,322
Factorization with uncertainty and missing data: exploiting temporal coherence Amit Gruber and Yair Weiss School of Computer Science and Engineering The Hebrew University of Jerusalem 91904 Jerusalem, Israel {amitg,yweiss}@cs.huji.ac.il Abstract The problem of “Structure From Motion” is a central problem in vision: given the 2D locations of certain points we wish to recover the camera motion and the 3D coordinates of the points. Under simplified camera models, the problem reduces to factorizing a measurement matrix into the product of two low rank matrices. Each element of the measurement matrix contains the position of a point in a particular image. When all elements are observed, the problem can be solved trivially using SVD, but in any realistic situation many elements of the matrix are missing and the ones that are observed have a different directional uncertainty. Under these conditions, most existing factorization algorithms fail while human perception is relatively unchanged. In this paper we use the well known EM algorithm for factor analysis to perform factorization. This allows us to easily handle missing data and measurement uncertainty and more importantly allows us to place a prior on the temporal trajectory of the latent variables (the camera position). We show that incorporating this prior gives a significant improvement in performance in challenging image sequences. 1 Introduction Figure 1 illustrates the classical structure from motion (SFM) displays introduced by Ullman [13]. A transparent cylinder with painted dots rotates around its elongated axis. Even though no structure is apparent in any single frame, humans obtain a vivid percept of a cylinder1. SFM has been dealt with extensively in the computer vision literature. Typically a small number of feature points are tracked and a measurement matrix is formed in 1An online animation of this famous stimulus is available at: aris.ss.uci.edu/cogsci/personnel/hoffman/cylinderapplet.html Figure 1: The classical structure from motion stimulus introduced by Ullman [13]. Humans continue to perceive the correct structure even when each dot appears only for a small number of frames, but most existing factorization algorithm fail in this case. Replotted from [1] which each element corresponds to the image coordinates of a tracked point. The goal is to recover the camera motion and the 3D location of these points. Under simplified camera models it can be shown that this problem reduces to a problem of matrix factorization. We wish to describe the measurement matrix as a product of two low rank matrices. Thus if all features are reliably tracked in all the frames, the problem can be solved trivially using SVD [11]. In particular, performing an SVD on the measurement matrix of the rotating cylinder stimulus recovers the correct structure even if the measurement matrix is contaminated with significant amounts of noise and if the number of frames is relatively small. But in any realistic situation, the measurement matrix will have missing entries. This is either because certain feature points are occluded in some of the frames and hence their positions are unknown, or due to a failure in the tracking algorithm. This has lead to the development of a number of algorithms for factorization with missing data [11, 6, 9, 2]. Factorization with missing data turns out to be much more difficult than the full data case. To illustrate the difficulty, consider the cylinder stimulus in figure 1. Humans still obtain a vivid percept of a cylinder even when each dot has a short “dot life”. That is, each dot appears at a random starting frame, continues to appear for a small number of frames, and then disappears [12]. We applied the algorithms in [11, 6, 9, 2] to a sequence of 20 frames of a rotating cylinder in which the dot life was 10 frames. Thus the matrix was half full (or half empty). Surprisingly, none of the algorithms could recover the cylinder structure. They either failed to find any structure or they gave a structure that was drastically different from a cylinder. Presumably, humans are using additional prior knowledge that the algorithms are not. In this paper we point out a source of information in image sequences that is usually neglected by factorization algorithms: temporal coherence. In a video sequence, the camera location at time t + 1 will probably be similar to its location at time t. In other words, if we randomly permute the temporal order of the frames, we will get a very unlikely image sequence. Yet nearly all existing factorization algorithms will be invariant to this random permutation of the frames: they only seek a low rank approximation to a matrix and permuting the rows of the matrix will not change the approximation. In order to enable the use of temporal coherence, we formulate factorization in terms of maximum likelihood for a factor analysis model, where the latent variable corresponds to camera position. We use the familiar EM algorithm for factor analysis to perform factorization with missing data and uncertainty. We show how to add a temporal coherence prior to the model and derive the EM updates. We show that incorporating this prior gives a significant improvement in performance in challenging image sequences. 2 Model A set of P feature points in F images are tracked along an image sequence. Let (ufp, vfp) denote image coordinates of feature point p in frame f. Let U = (ufp), V = (vfp) and W = (wij) where w2i−1,j = uij and w2i,j = vij for 1 ≤i ≤F, i.e. W is an interleaving of the rows of U and V . In the orthographic camera model, points in the 3D world are projected in parallel onto the image plane. For example, if the camera’s optical center is in the origin (w.r.t 3D coordinate system), and its x, y axes coincide with X, Y axes in the 3D world, then taking a picture is a simple projection (in homogeneous coordinates): (x, y) = · 1 0 0 0 0 1 0 0 ¸   X Y Z 1  . The depth, Z, has no influence on the image. In this model, a camera can undergo rotation, translation, or a combination of the two. Under orthography, and in the absence of noise, [W]2F ×P = [M]2F ×4 [S]4×P (1) where M =   M1 ... MF   2F ×4 and S =   X1 · · · XP Y1 · · · YP Z1 · · · ZP 1 · · · 1   4×P . M describes camera motion (rotation and translation, [Mi]2×4 = · mT i di nT i ei ¸ ). mi and ni are 3 × 1 vectors that describe the rotation of the camera; di and ei are scalars describing camera translation, 2 and S describes points location in 3D. For noisy observations, the model becomes: [W]2F ×P = [M]2F ×4 [S]4×P + [η]2F ×P (2) where η is Gaussian noise. If the elements of the noise matrix η are uncorrelated and of equal variance then we seek a factorization that minimizes the mean squared error between W and MS. This can be solved trivially using the SVD of W. Missing data can be modeled using equation 2 by assuming some elements of the noise matrix η have infinite variance. Obviously the SVD is not the solution once we allow different elements of η to have different variances. 2.1 Factorization as factor analysis It is well known that the SVD calculation can be formulated as a limiting case of maximum likelihood factor analysis [8]. In standard factor analysis we have a set 2We do not subtract the mean of each row from it, since in case of missing data the centroids of points do not coincide. of observations {y(t)} that are linear combinations of a latent variable x(t): y(t) = Ax(t) + η(t) (3) with x(t) ∼N(0, σ2 xI) and η(t) ∼N(0, Ψt). If Ψt is a diagonal matrix with constant elements Ψt = σ2I then in the limit σ/σx →0 the ML estimate for A will give the same answer as the SVD. We now show how to rewrite the SFM problem in this form. In equation 1 the horizontal and vertical coordinates of the same point appear in different rows. It can be rewritten as: [U V ]F ×2P = [M N]F ×8 · S 0 0 S ¸ 8×2P + [˜η]F ×2P (4) Let y(t) be the vector of noisy observations (noisy image locations) at time t, i.e. y(t) = [u(t) v(t)], that is y(t) = [u1(t), · · · uP (t) v1(t), · · · vP (t)]T . Let x(t) be a vector of length 8 that denotes the camera position at time t x(t) = [m(t)T d(t) n(t)T e(t)]T and let A = · ST 0 0 ST ¸ . Identifying y(t) with the tth row of the matrix [U V ] and x(t) with the tth row of [m n], then equation 4 is equivalent to equation 3. We can now use the standard EM algorithm for factor analysis to find the ML estimate for S. E step: E(x(t)|y(t)) = ¡ σ−2 x I + AT Ψ−1 t A ¢−1 AT Ψ−1 t y(t) (5) V (x(t)|y(t)) = ¡ σ−2 x I + AT Ψ−1 t A ¢−1 (6) < x(t) > = E(x(t)|y(t)) (7) < x(t)x(t)T > = V (x(t)|y(t))−< x(t) >< x(t) >T (8) M step: In the M step we solve the normal equations for the structure S. The exact form depends on the structure of Ψt. Denote by sp a vector of length 3 that denotes the 3D coordinates of point p then for a diagonal noise covariance matrix Ψt the M step is: sp = BpC−1 p (9) where Bp = X t £ Ψ−1 t (p, p)(utp−< dt >) < m(t)T > (10) + Ψ−1 t (p + P, p + P)(vtp−< et >) < n(t) >T ¤ Cp = X t £ Ψ−1 t (p, p) < m(t)m(t)T > + Ψ−1 t (p + P, p + P) < n(t)n(t)T > ¤ where the expectation required in the M step are the appropriate subvectors and submatrices of < x(t) > and < x(t)x(t)T >. If we set Ψ−1 t (p, p) = Ψ−1 t (p + P, p + P) = 0 if point p is missing in frame t then we obtain an EM algorithm for factorization with missing data. Note that the form of the updates means we can put any value we wish in the missing elements of y and they will be ignored by the algorithm. x(1) y(1) x(2) y(2) x(3) y(3) x(1) y(1) x(2) y(2) x(3) y(3) a b Figure 2: a. The graphical model assumed by most factorization algorithms for SFM. The camera location x(t) is assumed to be independent of the camera location at any other time step. b. The graphical model assumed by our approach. We model temporal coherence by assuming a Markovian structure on the camera location. A more realistic noise model for real images is that Ψt is not diagonal but rather that the noise in the horizontal and vertical coordinates of the same point are correlated with an arbitrary 2 × 2 inverse covariance matrix. This problem is usually called factorization with uncertainty [5, 7]. It is easy to derive the M step in this case as well. It is similar to equation 9 except that cross terms involving Ψ−1 t (p, p + P) are also involved: sp = (Bp + B′ p)(Cp + C′ p)−1 (11) where B′ p = X t £ Ψ−1 t (p, p +P)(vtp−<et>)<m(t)T> (12) + Ψ−1 t (p + P, p)(utp−< dt >) < n(t)>T ¤ C′ p = X t £ Ψ−1 t (p, p + P) < n(t)m(t)T > + Ψ−1 t (p + P, p) < m(t)n(t)T > ¤ Regardless of uncertainty and missing data the complexity of the EM algorithm grows linearly with the number of feature points and the number of frames. At every iteration, the most computationally intensive step is an inversion of an 8 × 8 matrix. 2.2 Adding temporal coherence The factor analysis algorithm for factorization assumes that the latent variables x(t) are independent. In SFM this assumption means that the camera location in different frames is independent and hence permuting the order of the frames makes no difference for the factorization. As mentioned in the introduction, in almost any video sequence this assumption is wrong. Typically camera location varies smoothly as a function of time. Figure 2a shows the graphical model corresponding to most factorization algorithms: the independence of the camera location is represented by the fact that every time step is isolated from the other time steps in the graph. But it is easy to fix this assumption by adding edges between the latent variables as shown in figure 2b. Specifically, we use a second order approximation to the motion of the camera: x(t) = x(t −1) + v(t −1) + 1 2a(t −1) + ϵ1 (13) Truth factor analysis Jacobs Structure: −5 −4 −3 −2 −1 0 1 2 3 4 5 −5 −4 −3 −2 −1 0 1 2 3 4 5 −6 −4 −2 0 2 4 6 −5 −4 −3 −2 −1 0 1 2 3 4 5 −6 −4 −2 0 2 4 6 −5 −4 −3 −2 −1 0 1 2 3 4 5 Structure: −5 −4 −3 −2 −1 0 1 2 3 4 5 −5 −4 −3 −2 −1 0 1 2 3 4 5 −6 −4 −2 0 2 4 6 −6 −4 −2 0 2 4 6 8 10 −6 −4 −2 0 2 4 6 8 −300 −250 −200 −150 −100 −50 0 50 100 150 Figure 3: Comparison of factor analysis and Jacobs’ algorithm on synthetic sequences. All other existing algorithms performed worse than Jacobs. They all fail when there is noise and missing data while factor analysis with temporal coherence succeeds. Structure and motion are shown from a top view. v(t) = v(t −1) + a(t −1) + ϵ2 (14) a(t) = a(t −1) + ϵ3 (15) y(t) = Ax(t) + η(t) (16) Note that we do not assume that the 2D trajectory of each point is smooth. Rather we assume the 3D trajectory of the camera is smooth. It is straightforward to derive the EM iterations for a ML estimate of S using the model in equation 16. The M step is unchanged from the classical factor analysis and is given by equation 9. The only change in the E step is that E(x(t)|y) and V (x(t)|y) need to be calculated using a Kalman smoother. We use a standard RTS smoother [4]. Note that the computation of the E step is still linear in the number of frames and datapoints. Kalman filtering has been used extensively in a more perspective SFM setting(e.g. [10]). However, in perspective projections the problem is no longer one of factorization. Thus even for Gaussian noise, the Extended Kalman filter needs to be used, smoothing is not performed and no guarantee of increase in likelihood is obtained. Within the factorization framework, we can use the classical Kalman filter and obtain a simple algorithm that provably increases the likelihood at every iteration. 3 Experiments In this section we describe the experimental performance of EM with time coherence compared to ground truth and to previous algorithms for structure from motion with missing data [11, 6, 9, 2]. For [11, 6, 9] we used the Matlab implementation made public by D. Jacobs. The first input sequence is the sequence of the cylinder shown in figure 1. 100 points uniformly drawn from the cylinder surface are tracked over 20 frames. Each of the points appears for 10 frames, starting at a random time, and then disappears. The observed image locations were added a Gaussian noise with standard deviation σ = 0.1. We checked the performance of the different algorithms in the cases of: (1) full noise free observation matrix , (2) noisy full observation matrix, (3) noiseless observations Error as function of noise Error as function of missing data 0 0.05 0.1 0.15 0.2 0.25 0.3 0.35 0.4 0.45 0.5 2 3 4 5 6 7 8< percentage of missing data reconstruction square error EM with Temporal Coherence EM Jacobs 0 0.1 0.2 0.3 0.4 0.5 0 1 2 3 4 5 6 7 8 9 10 x 10 4 noise level (sigma) reconstruction square error EM with Temporal Coherence EM Jacobs Figure 4: Graphs depict influence of noise and percentage of missing data on reconstruction results of factor analysis and [6]. −150 −100 −50 0 50 100 −100 −50 0 50 100 150 200 Figure 5: Results of scene reconstruction from a real sequence: A binder and is placed on a rotating surface filmed with a static camera. Our algorithm succeeded in (approximately) obtaining the right structure and all other algorithms failed. Results are shown in top view. with missing data and (4) noisy observations with missing data. All algorithms performed well and gave similar results for the full matrix noiseless sequence. In the fully observed noisy case, factor analysis without temporal coherence gave comparable performance to Tomasi-Kanade, which minimize ∥MS −W∥2 F . When temporal coherence was added, the reconstruction results were improved. The results of Shum’s algorithm were similar to Tomasi-Kanade. The algorithms of Jacobs and Brand turned to be noise sensitive. In the case of noiseless missing data (figure 3 top), our algorithm and Jacobs’ algorithm reconstruct the correct motion and structure. Tomasi-Kanade’s algorithm and Shum’s algorithm could not handle this pattern of missing data and failed to give any structure. Once we add even very mild amounts of noise (figure 3 middle) all existing algorithms fail. While factor analysis with temporal coherence continues to extract the correct structure even for significant noise values. Figure 5 shows result on a real sequence. 4 Discussion Despite progress in algorithms for factorization with uncertainty the best existing algorithms still fall far short of human performance, even for seemingly simple stimuli. Presumably, humans are using additional prior information. In this paper we have focused on one particular prior: the temporal smoothness of the camera motion. We showed how to formulate SFM as a factor analysis problem and how to add temporal coherence to the EM algorithm. Our experimental results show that this simple prior can give a significant improvement in performance in challenging sequences. Temporal coherence is just one of many possible priors. It has been suggested that humans also use a smoothness prior on the 3D surface they are perceiving [12]. It would be interesting to extend our framework in this direction. The most drastic simplification our model makes is the assumption of Gaussian noise. It would be interesting to extend the algorithm to non Gaussian settings. This may require approximate inference algorithms in the E step as used in [3]. References [1] R.A. Andersen and D.C Bradley. Perception of three-dimensional structure from motion. In Trends in Cognitive Sciences, 2, pages 222–228, 1998. [2] M.E. Brand. Incremental singular value decomposition of uncertain data with missing values. In ECCV, pages 707–720, May 2002. [3] F. Dellaert, S. M. Seitz, C. E. Thorpe, and S. Thrun. Structure from motion without correspondence. In ICCV, pages 696–702, January 1999. [4] Arthur Gelb, editor. Applied Optimal Estimation. MIT Press, 1974. [5] M. Irani and P. Anandan. Factorization with uncertainty. In ECCV, pages 959–966, January 2000. [6] D. Jacobs. Linear fitting with missing data: Applications to structure-frommotion and to characterizing intensity images. In CVPR, pages 206–212, 1997. [7] D. D. Morris and T. Kanade. A unified factorization algorithm for points, line segments and planes with uncertain models. In ICCV, pages 696–702, January 1999. [8] S. Roweis. Em algorithms for pca and spca. In NIPS, pages 431–437, 1997. [9] H. Y. Shum, K. Ikeuchi, and R. Reddy. Principal component analysis with missing data and its application to polyhedral object modeling. pages 854– 867, September 1995. [10] S. Soatto and P. Perona. Reducing structure from motion: a general framework for dynamic vision. IEEE Trans. on Pattern Analysis and Machine Intelligence, pages 943–960, 1999. [11] C. Tomasi and T. Kanade. Shape and motion from image streams under orthography: A factorization method. Int. J. of Computer Vision, 9(2):137–154, November 1992. [12] S. Treue, M. Husain, and R. Andersen. Human perception of structure from motion. Vision Research, 31:59–75, 1991. [13] S. Ullman. The interpertation of visual motion. MIT Press, 1979.
2003
111
2,323
Sequential Bayesian Kernel Regression Jaco Vermaak, Simon J. Godsill, Arnaud Doucet Cambridge University Engineering Department Cambridge, CB2 1PZ, U.K. {jv211, sjg, ad2}@eng.cam.ac.uk Abstract We propose a method for sequential Bayesian kernel regression. As is the case for the popular Relevance Vector Machine (RVM) [10, 11], the method automatically identifies the number and locations of the kernels. Our algorithm overcomes some of the computational difficulties related to batch methods for kernel regression. It is non-iterative, and requires only a single pass over the data. It is thus applicable to truly sequential data sets and batch data sets alike. The algorithm is based on a generalisation of Importance Sampling, which allows the design of intuitively simple and efficient proposal distributions for the model parameters. Comparative results on two standard data sets show our algorithm to compare favourably with existing batch estimation strategies. 1 Introduction Bayesian kernel methods, including the popular Relevance Vector Machine (RVM) [10, 11], have proved to be effective tools for regression and classification. For the RVM the sparsity constraints are elegantly formulated within a Bayesian framework, and the result of the estimation is a mixture of kernel functions that rely on only a small fraction of the data points. In this sense it bears resemblance to the popular Support Vector Machine (SVM) [13]. Contrary to the SVM, where the support vectors lie on the decision boundaries, the relevance vectors are prototypical of the data. Furthermore, the RVM does not require any constraints on the types of kernel functions, and provides a probabilistic output, rather than a hard decision. Standard batch methods for kernel regression suffer from a computational drawback in that they are iterative in nature, with a computational complexity that is normally cubic in the number of data points at each iteration. A large proportion of the research effort in this area is devoted to the development of estimation algorithms with reduced computational complexity. For the RVM, for example, a strategy is proposed in [12] that exploits the structure of the marginal likelihood function to significantly reduce the number of computations. In this paper we propose a full Bayesian formulation for kernel regression on sequential data. Our algorithm is non-iterative, and requires only a single pass over the data. It is equally applicable to batch data sets by presenting the data points one at a time, with the order of presentation being unimportant. The algorithm is especially effective for large data sets. As opposed to batch strategies that attempt to find the optimal solution conditional on all the data, the sequential strategy includes the data one at a time, so that the posterior exhibits a tempering effect as the amount of data increases. Thus, the difficult global estimation problem is effectively decomposed into a series of easier estimation problems. The algorithm itself is based on a generalisation of Importance Sampling, and recursively updates a sample based approximation of the posterior distribution as more data points become available. The proposal distribution is defined on an augmented parameter space, and is formulated in terms of model moves, reminiscent of the Reversible Jump Markov Chain Monte Carlo (RJ-MCMC) algorithm [5]. For kernel regression these moves may include update moves to refine the kernel locations, birth moves to add new kernels to better explain the increasing data, and death moves to eliminate erroneous or redundant kernels. The remainder of the paper is organised as follows. In Section 2 we outline the details of the model for sequential Bayesian kernel regression. In Section 3 we present the sequential estimation algorithm. Although we focus on regression, the method extends straightforwardly to classification. It can, in fact, be applied to any model for which the posterior can be evaluated up to a normalising constant. We illustrate the performance of the algorithm on two standard regression data sets in Section 4, before concluding with some remarks in Section 5. 2 Model Description The data is assumed to arrive sequentially as input-output pairs (xt, yt), t = 1, 2, · · · , xt ∈Rd, yt ∈R. For kernel regression the output is assumed to follow the model yt = β0 + Xk i=1 βiK(xt, µi) + vt, vt ∼N(0, σ2 y), where k is the number of kernel functions, which we will consider to be unknown, βk = (β0 · · · βk) are the regression coefficients, Uk = (µ1 · · · µk) are the kernel centres, and σ2 y is the variance of the Gaussian observation noise. Assuming independence the likelihood for all the data points observed up to time t, denoted by Yt = (y1 · · · yt), can be written as p(Yt|k, βk, Uk, σ2 y) = N(Yt|Kkβk, σ2 yIt), (1) where Kk denotes the t × (k + 1) kernel matrix with [Kk]s,1 = 1 and [Kk]s,l = K(xs, µl−1) for l > 1, and In denotes the n-dimensional identity matrix. For the unknown model parameters θk = (βk, Uk, σ2 y, σ2 β) we assume a hierarchical prior that takes the form p(k, θk) = p(k)p(βk, σ2 β)p(Uk)p(σ2 y), (2) with p(k) ∝λk exp(−λ)/k!, k ∈{1 · · · kmax} p(βk, σ2 β) = N(βk|0, σ2 βIk+1)IG(σ2 β|aβ, bβ) p(Uk) = Yk l=1 Xt s=1 δxs(µl)/t p(σ2 y) = IG(σ2 y|ay, by), where δx(·) denotes the Dirac delta function with mass at x, and IG(·|a, b) denotes the Inverted Gamma distribution with parameters a and b. The prior on the number of kernels is set to be a truncated Poisson distribution, with the mean λ and the maximum number of kernels kmax assumed to be fixed and known. The regression coefficients are drawn from an isotropic Gaussian prior with variance σ2 β in each direction. This variance is, in turn, drawn from an Inverted Gamma prior. This is in contrast with the Automatic Relevance Determination (ARD) prior [8], where each coefficient has its own associated variance. The prior for the kernel centres is assumed to be uniform over the grid formed by the input data points available at the current time step. Note that the support for this prior increases with time. Finally, the noise variance is assumed to follow an Inverted Gamma prior. The parameters of the Inverted Gamma priors are assumed to be fixed and known. Given the likelihood and prior in (1) and (2), respectively, it is straightforward to obtain an expression for the full posterior distribution p(k, θk|Yt). Due to conjugacy this expression can be marginalised over the regression coefficients, so that the marginal posterior for the kernel centres can be written as p(k, Uk|σ2 y, σ2 β, Yt) ∝|Bk|1/2 exp(−YT tPkYt/2σ2 y)p(k)p(Uk) (2πσ2y)t/2(σ2 β)k+1/2 , (3) with Bk = (KT kKk/σ2 y + Ik+1/σ2 β)−1 and Pk = It −KkBkKT k/σ2 y. It will be our objective to approximate this distribution recursively in time as more data becomes available, using Monte Carlo techniques. Once we have samples for the kernel centres, we will require new samples for the unknown parameters (σ2 y, σ2 β) at the next time step. We can obtain these by first sampling for the regression coefficients from the posterior p(βk|k, Uk, σ2 y, σ2 β, Yt) = N(βk|bβk, Bk), (4) with bβk = BkKT kYt, and conditional on these values, sampling for the unknown parameters from the posteriors p(σ2 y|k, βk, Uk, Yt) = IG(σ2 y|ay + t/2, by + eT tet/2) p(σ2 β|k, βk) = IG(σ2 β|aβ + (k + 1)/2, bβ + βT kβk/2), (5) with et = Yt −Kkβk the model approximation error. Since the number of kernel functions to use is unknown the marginal posterior in (3) is defined over a discrete space of variable dimension. In the next section we will present a generalised importance sampling strategy to obtain Monte Carlo approximations for distributions of this nature recursively as more data becomes available. 3 Sequential Estimation Recall that it is our objective to recursively update a Monte Carlo representation of the posterior distribution for the kernel regression parameters as more data becomes available. The method we propose here is based on a generalisation of the popular importance sampling technique. Its application extends to any model for which the posterior can be evaluated up to a normalising constant. We will thus first present the general strategy, before outlining the details for sequential kernel regression. 3.1 Generalised Importance Sampling Our aim is to recursively update a sample based approximation of the posterior p(k, θk|Yt) of a model parameterised by θk as more data becomes available. The efficiency of importance sampling hinges on the ability to design a good proposal distribution, i.e. one that approximates the target distribution sufficiently well. Designing an efficient proposal distribution to generate samples directly in the target parameter space is difficult. This is mostly due to the fact that the dimension of the parameter space is generally high and variable. To circumvent these problems we augment the target parameter space with an auxiliary parameter space, which we will associate with the parameters at the previous time step. We now define the target distribution over the resulting joint space as πt(k, θk; k′, θ′ k′) = p(k, θk|Yt)q′ t(k′, θ′ k′|k, θk). (6) This joint clearly admits the desired target distribution as a marginal. Apart from some weak assumptions, which we will discuss shortly, the distribution q′ t is entirely arbitrary, and may depend on the data and the time step. In fact, in the application to the RVM we consider here we will set it to q′ t(k′, θ′ k′|k, θk) = δ(k,θk)(k′, θ′ k′), so that it effectively disappears from the expression above. A similar strategy of augmenting the space to simplify the importance sampling procedure has been exploited before in [7] to develop efficient Sequential Monte Carlo (SMC) samplers for a wide range of models. To generate samples in this joint space we define the proposal for importance sampling to be of the form Qt(k, θk; k′, θ′ k′) = p(k′, θ′ k′|Yt−1)qt(k, θk|k′, θ′ k′), (7) where qt may again depend on the data and the time step. This proposal embodies the sequential character of our algorithm. Similar to SMC methods [3] it generates samples for the parameters at the current time step by incrementally refining the posterior at the previous time step through the distribution qt. Designing efficient incremental proposals is much easier than constructing proposals that generate samples directly in the target parameter space, since the posterior is unlikely to undergo dramatic changes over consecutive time steps. To compensate for the discrepancy between the proposal in (7) and the joint posterior in (6) the importance weight takes the form Wt(k, θk; k′, θ′ k′) = p(k, θk|Yt)q′ t(k′, θ′ k′|k, θk) p(k′, θ′ k′|Yt−1)qt(k, θk|k′, θ′ k′). (8) Due to the construction of the joint in (6), marginal samples in the target parameter space associated with this weighting will indeed be distributed according to the target posterior p(k, θk|Yt). As might be expected the importance weight in (8) is similar in form to the acceptance ratio for the RJ-MCMC algorithm [5]. One notable difference is that the reversibility condition is not required, so that for a given qt, q′ t may be arbitrary, as long as the ratio in (8) is well-defined. In practice it is often necessary to design a number of candidate moves to obtain an efficient algorithm. Examples include update moves to refine the model parameters in the light of the new data, birth moves to add new parameters to better explain the new data, death moves to remove redundant or erroneous parameters, and many more. We will denote the set of candidate moves at time t by {αt,i, qt,i, q′ t,i}M i=1, where αt,i is the probability of choosing move i, with PM i=1 αt,i = 1. For each move i the importance weight is computed by substituting the corresponding qt,i and q′ t,i into (8). Note that the probability of choosing a particular move may depend on the old state and the time step, so that moves may be included or excluded as is appropriate. 3.2 Sequential Kernel Regression We will now present the details for sequential kernel regression. Our main concern will be the recursive estimation of the marginal posterior for the kernel centres in (3). This distribution is conditional on the parameters (σ2 y, σ2 β), for which samples can be obtained at each time step from the corresponding posteriors in (4) and (5). To sample for the new kernel centres we will consider three kinds of moves: a zero move qt,1, a birth move qt,2, and a death move qt,3. The zero move leaves the kernel centres unchanged. The birth move adds a new kernel at a uniformly randomly chosen location over the grid of unoccupied input data points. The death move removes a uniformly randomly chosen kernel. For k = 0 only the birth move is possible, whereas the birth move is impossible for k = kmax or k = t. Similar to [5] we set the move probabilities to αt,2 = c min{1, p(k + 1)/p(k)} αt,3 = c min{1, p(k −1)/p(k)} αt,1 = 1 −αt,2 −αt,3 in all other cases. In the above c ∈(0, 1) is a parameter that tunes the relative frequency of the dimension changing moves to the zero move. For these choices the importance weight in (8) becomes Wt,i(k, Uk; k′, U′ k′) ∝|Bk|1/2 exp(−(YT tPkYt −YT t−1P′ k′Yt−1)/2σ2 y) |B′ k′|1/2(2πσ2y)1/2(σ2 β)k−k′/2 × λk−k′(t −1)(k′ −1)! t(k −1)!qt,i(k, Uk|k′, U′ k′), where the primed variables are those corresponding to the posterior at time t −1. For the zero move the parameters are left unchanged, so that the expression for qt,1 in the importance weight becomes unity. This is often a good move to choose, and captures the notion that the posterior rarely changes dramatically over consecutive time steps. For the birth move one new kernel is added, so that k = k′ + 1. The centre for this kernel is uniformly randomly chosen from the grid of unoccupied input data points. This means that the expression for qt,2 in the importance weight reduces to 1/(t−k′), since there are t−k′ such data points. Similarly, the death move removes a uniformly randomly chosen kernel, so that k = k′ −1. In this case the expression for qt,3 in the importance weight reduces to 1/k′. It is straightforward to design numerous other moves, e.g. an update move that perturbs existing kernel centres. However, we found that the simple moves presented yield satisfactory results while keeping the computational complexity acceptable. We conclude this section with a summary of the algorithm. Algorithm 1: Sequential Kernel Regression Inputs: • Kernel function K(·, ·), model parameters (λ, kmax, ay, by, aβ, bβ), fraction of dimension change moves c, number of samples to approximate the posterior N. Initialisation: t = 0 • For i = 1 · · · N, set k(i) = 0, β(i) k = ∅, U(i) k = ∅, and sample σ2(i) y ∼p(σ2 y), σ2(i) β ∼p(σ2 β). Generalised Importance Sampling Step: t > 0 • For i = 1 · · · N, −Sample a move j(i) so that P(j(i) = l) = αt,l. −If j(i) = 1 (zero move), set eU(i) k = U(i) k and ek(i) = k(i). Else if j(i) = 2 (birth move), form eU(i) k by uniformly randomly adding a kernel at one of the unoccupied data points, and set ek(i) = k(i) + 1. Else if j(i) = 3 (death move), form eU(i) k by uniformly randomly deleting one of the existing kernels, and set ek(i) = k(i) −1. • For i = 1 · · · N, compute the importance weights W (i) t ∝Wt(ek(i), eU(i) k ; k(i), U(i) k ), and normalise. • For i = 1 · · · N, sample the nuisance parameters eβ (i) k ∼p(βk|ek(i), eU(i) k , σ2(i) y , σ2(i) β , Yt), eσ2(i) β ∼p(σ2 β|ek(i), eβ (i) k ), eσ2(i) y ∼p(σ2 y|ek(i), eβ (i) k , eU(i) k , Yt). Resampling Step: t > 0 • Multiply / discard samples {ek(i), eθ (i) k } with respect to high / low importance weights {W (i) t } to obtain N samples {k(i), θ(i) k }. ■ Each of the samples is initialised to be empty, i.e. no kernels are included. Initial values for the variance parameters are sampled from their corresponding prior distributions. Using the samples before resampling, a Minimum Mean Square Error (MMSE) estimate of the clean data can be obtained as bZt = XN i=1 W (i) t eK(i) k eβ (i) k . The resampling step is required to avoid degeneracy of the sample based representation. It can be performed by standard procedures such as multinomial resampling [4], stratified resampling [6], or minimum entropy resampling [2]. All these schemes are unbiased, so that the number of times Ni the sample (ek(i), eθ (i) k ) appears after resampling satisfies E(Ni) = NW (i) t . Thus, resampling essentially multiplies samples with high importance weights, and discards those with low importance weights. The algorithm requires only a single pass through the data. The computational complexity at each time step is O(N). For each sample the computations are dominated by the computation of the matrix Bk, which requires a (k + 1)-dimensional matrix inverse. However, this inverse can be incrementally updated from the inverse at the previous time step using the techniques described in [12], leading to substantial computational savings. 4 Experiments and Results In this section we illustrate the performance of the proposed sequential estimation algorithm on two standard regression data sets. 4.1 Sinc Data This experiment is described in [1]. The training data is taken to be the sinc function, i.e. sinc(x) = sin(x)/x, corrupted by additive Gaussian noise of standard deviation σy = 0.1, for 50 evenly spaced points in the interval x ∈[−10, 10]. In all the runs we presented these points to the sequential estimation algorithm in random order. For the test data we used 1000 points over the same interval. We used a Gaussian kernel of width 1.6, and set the fixed parameters of the model to (λ, kmax, ay, by, aβ, bβ) = (1, 50, 0, 0, 0, 0). For these settings the prior on the variances reduces to the uninformative Jeffreys’ prior. The fraction of dimension change moves was set to c = 0.25. It should be noted that the algorithm proved to be relatively insensitive to reasonable variations in the values of the fixed parameters. The left side of Figure 1 shows the test error as a function of the number of samples N. These results were obtained by averaging over 25 random generations of the training data for each value of N. As expected, the error decreases with an increase in the number of samples. No significant decrease is obtained beyond N = 250, and we adopt this value for subsequent comparisons. A typical MMSE estimate of the clean data is shown on the right side of Figure 1. In Table 1 we compare the results of the proposed sequential estimation algorithm with a number of batch strategies for the SVM and RVM. The results for the batch algorithms are duplicated from [1, 9]. The error for the sequential algorithm is slightly higher. This is due to the stochastic nature of the algorithm, and the fact that it uses only very simple moves that take no account of the characteristics of the data during the move proposition. This increase should be offset against the algorithm simplicity and efficiency. The error could be further decreased by designing more complex moves. 100 200 300 400 500 600 700 800 900 1000 0 0.05 0.1 0.15 0.2 0.25 0.3 0.35 0.4 −10 −8 −6 −4 −2 0 2 4 6 8 10 −0.5 0 0.5 1 1.5 Figure 1: Results for the sinc experiment. Test error as a function of the number of samples (left), and example fit (right), showing the uncorrupted data (blue circles), noisy data (red crosses) and MMSE estimate (green squares). For this example the test error was 0.0309 and an average of 6.18 kernels were used. Method Test Error # Kernels Noise Estimate Figueiredo 0.0455 7.0 − SVM 0.0519 28.0 − RVM 0.0494 6.9 0.0943 VRVM 0.0494 7.4 0.0950 MCMC 0.0468 6.5 − Sequential RVM 0.0591 4.5 0.1136 Table 1: Comparative performance results for the sinc data. The batch results are reproduced from [1, 9]. 4.2 Boston Housing Data We also applied our algorithm to the popular Boston housing data set. We considered random train / test partitions of the data of size 300 / 206. We again used a Gaussian kernel, and set the width parameter to 5. For the model and algorithm parameters we used values similar to those for the sinc experiment, except for setting λ = 5 to allow a larger number of kernels. The results are summarised in Table 2. These were obtained by averaging over 10 random partitions of the data, and setting the number of samples to N = 250. The test error is comparable to those for the batch strategies, but far fewer kernels are required. Method Test Error # Kernels SVM 8.04 142.8 RVM 7.46 39.0 Sequential RVM 7.18 25.29 Table 2: Comparative performance results for the Boston housing data. The batch results are reproduced from [10]. 5 Conclusions In this paper we proposed a sequential estimation strategy for Bayesian kernel regression. Our algorithm is based on a generalisation of importance sampling, and incrementally updates a Monte Carlo representation of the target posterior distribution as more data points become available. It achieves this through simple and intuitive model moves, reminiscent of the RJ-MCMC algorithm. It is further non-iterative, and requires only a single pass over the data, thus overcoming some of the computational difficulties associated with batch estimation strategies for kernel regression. Our algorithm is more general than the kernel regression problem considered here. Its application extends to any model for which the posterior can be evaluated up to a normalising constant. Initial experiments on two standard regression data sets showed our algorithm to compare favourably with existing batch estimation strategies for kernel regression. Acknowledgements The authors would like to thank Mike Tipping for helpful comments during the experimental procedure. The work of Vermaak and Godsill was partially funded by QinetiQ under the project ‘Extended and Joint Object Tracking and Identification’, CU006-14890. References [1] C. M. Bishop and M. E. Tipping. Variational relevance vector machines. In C. Boutilier and M. Goldszmidt, editors, Proceedings of the 16th Conference on Uncertainty in Artificial Intelligence, pages 46–53. Morgan Kaufmann, 2000. [2] D. Crisan. Particle filters – a theoretical perspective. In A. Doucet, J. F. G. de Freitas, and N. J. Gordon, editors, Sequential Monte Carlo Methods in Practice, pages 17–38. Springer-Verlag, 2001. [3] A. Doucet, J. F. G. de Freitas, and N. J. Gordon, editors. Sequential Monte Carlo Methods in Practice. Springer-Verlag, New York, 2001. [4] N. J. Gordon, D. J. Salmond, and A. F. M. Smith. Novel approach to nonlinear/non-Gaussian Bayesian state estimation. IEE Proceedings-F, 140(2):107–113, 1993. [5] P. J. Green. Reversible jump Markov chain Monte Carlo computation and Bayesian model determination. Biometrika, 82(4):711–732, 1995. [6] G. Kitagawa. Monte Carlo filter and smoother for non-Gaussian nonlinear state space models. Journal of Computational and Graphical Statistics, 5(1):1–25, 1996. [7] P. Del Moral and A. Doucet. Sequential Monte Carlo samplers. Technical Report CUED/FINFENG/TR.443, Signal Processing Group, Cambridge University Engineering Department, 2002. [8] R. M. Neal. Assessing relevance determination methods using DELVE. In C. M. Bishop, editor, Neural Networks and Machine Learning, pages 97–129. Springer-Verlag, 1998. [9] S. S. Tham, A. Doucet, and R. Kotagiri. Sparse Bayesian learning for regression and classification using Markov chain Monte Carlo. In Proceedings of the International Conference on Machine Learning, pages 634–643, 2002. [10] M. E. Tipping. The relevance vector machine. In S. A. Solla, T. K. Leen, and K. R. M¨uller, editors, Advances in Neural Information Processing Systems, volume 12, pages 652–658. MIT Press, 2000. [11] M. E. Tipping. Sparse Bayesian learning and the relevance vector machine. Journal of Machine Learning Research, 1:211–244, 2001. [12] M. E. Tipping and A. C. Faul. Fast marginal likelihood maximisation for sparse Bayesian models. In C. M. Bishop and B. J. Frey, editors, Proceedings of the Ninth International Workshop on Artificial Intelligence and Statistics, 2003. [13] V. N. Vapnik. Statistical Learning Theory. John Wiley and Sons, New York, 1998.
2003
112
2,324
PAC-Bayesian Generic Chaining Jean-Yves Audibert ∗ Universit´e Paris 6 Laboratoire de Probabilit´es et Mod`eles al´eatoires 175 rue du Chevaleret 75013 Paris - France jyaudibe@ccr.jussieu.fr Olivier Bousquet Max Planck Institute for Biological Cybernetics Spemannstrasse 38 D-72076 T¨ubingen - Germany olivier.bousquet@tuebingen.mpg.de Abstract There exist many different generalization error bounds for classification. Each of these bounds contains an improvement over the others for certain situations. Our goal is to combine these different improvements into a single bound. In particular we combine the PAC-Bayes approach introduced by McAllester [1], which is interesting for averaging classifiers, with the optimal union bound provided by the generic chaining technique developed by Fernique and Talagrand [2]. This combination is quite natural since the generic chaining is based on the notion of majorizing measures, which can be considered as priors on the set of classifiers, and such priors also arise in the PAC-bayesian setting. 1 Introduction Since the first results of Vapnik and Chervonenkis on uniform laws of large numbers for classes of {0, 1}-valued functions, there has been a considerable amount of work aiming at obtaining generalizations and refinements of these bounds. This work has been carried out by different communities. On the one hand, people developing empirical processes theory like Dudley and Talagrand (among others) obtained very interesting results concerning the behaviour of the suprema of empirical processes. On the other hand, people exploring learning theory tried to obtain refinements for specific algorithms with an emphasis on data-dependent bounds. One crucial aspect of all the generalization error bounds is that they aim at controlling the behaviour of the function that is returned by the algorithm. This function is data-dependent and thus unknown before seeing the data. As a consequence, if one wants to make statements about its behaviour (e.g. the difference between its empirical error and true error), one has to be able to predict which function is likely to be chosen by the algorithm. But ∗Secondary affiliation: CREST, ENSAE, Laboratoire de Finance et Assurance, Malakoff, France since this cannot be done exactly, there is a need to provide guarantees that hold simultaneously for several candidate functions. This is known as the union bound. The way to perform this union bound optimally is now well mastered in the empirical processes community. In the learning theory setting, one is interested in bounds that are as algorithm and data dependent as possible. This particular focus has made concentration inequalities (see e.g. [3]) popular as they allow to obtain data-dependent results in an effortless way. Another aspect that is of interest for learning is the case where the classifiers are randomized or averaged. McAllester [1, 4] has proposed a new type of bound that takes the randomization into account in a clever way. Our goal is to combine several of these improvements, bringing together the power of the majorizing measures as an optimal union bound technique and the power of the PACBayesian bounds that handle randomized predictions efficiently, and obtain a generalization of both that is suited for learning applications. The paper is structured as follows. Next section introduces the notation and reviews the previous improved bounds that have been proposed. Then we give our main result and discuss its applications, showing in particular how to recover previously known results. Finally we give the proof of the presented results. 2 Previous results We first introduce the notation and then give an overview of existing generalization error bounds. We consider an input space X, an output space Y and a probability distribution P on the product space Z ≜X × Y. Let Z ≜(X, Y ) denote a pair of random variables distributed according to P and for a given integer n, let Z1, . . . , Zn and Z′ 1, . . . , Z′ n be two independent samples of n independent copies of Z. We denote by Pn, P ′ n and P2n the empirical measures associated respectively to the first, the second and the union of both samples. To each function g : X →Y we associate the corresponding loss function f : Z → R defined by f(z) = L[g(x), y] where L is a loss function. In classification, the loss function is L = Ig(x)̸=y where I denotes the indicator function. F will denote a set of such functions. For such functions, we denote their expectation under P by Pf and their empirical expectation by Pnf (i.e. Pnf = n−1 Pn i=1 f(Zi)). En, E′ n and E2n denote the expectation with respect to the first, second and union of both training samples. We consider the pseudo-distances d2(f1, f2) = P(f1 −f2)2 and similarly dn, d′ n and d2n. We define the covering number N(F, ϵ, d) as the minimum number of balls of radius ϵ needed to cover F in the pseudo-distance d. We denote by ρ and π two probability measures on the space F, so that ρPf will actually mean the expectation of Pf when f is sampled according to the probability measure ρ. For two such measures, K(ρ, π) will denote their Kullback-Leibler divergence (K(ρ, π) = ρ log dρ dπ when ρ is absolutely continuous with respect to π and K(ρ, π) = +∞otherwise). Also, β denotes some positive real number while C is some positive constant (whose value may differ from line to line) and M1 +(F) is the set of probability measures on F. We assume that the functions in F have range in [a, b]. Generalization error bounds give an upper bound on the difference between the true and empirical error of functions in a given class, which holds with high probability with respect to the sampling of the training set. Single function. By Hoeffding’s inequality one easily gets that for each fixed f ∈F, with probability at least 1 −β, Pf −Pnf ≤C r log 1/β n . (1) Finite union bound. It is easy to convert the above statement into one which is valid simultaneously for a finite set of functions F. The simplest form of the union bound gives that with probability at least 1 −β, ∀f ∈F, Pf −Pnf ≤C r log |F| + log 1/β n . (2) Symmetrization. When F is infinite, the trick is to introduce the second sample Z′ 1, . . . , Z′ n and to consider the set of vectors formed by the values of each function in F on the double sample. When the functions have values in {0, 1}, this is a finite set and the above union bound applies. This idea was first used by Vapnik and Chervonenkis [5] to obtain that with probability at least 1 −β, ∀f ∈F, Pf −Pnf ≤C r log E2nN(F, 1/n, d2n) + log 1/β n . (3) Weighted union bound and localization. The finite union bound can be directly extended to the countable case by introducing a probability distribution π over F which weights each function and gives that with probability at least 1 −β, ∀f ∈F, Pf −Pnf ≤C r log 1/π(f) + log 1/β n . (4) It is interesting to notice that now the bound depends on the actual function f being considered and not just on the set F. This can thus be called a localized bound. Variance. Since the deviations between Pf and Pnf for a given function f actually depend on its variance (which is upper bounded by Pf 2/n or Pf/n when the functions are in [0, 1]), one can refine (1) into Pf −Pnf ≤C r Pf 2 log 1/β n + log 1/β n ! , (5) and combine this improvement with the above union bounds. This was done by Vapnik and Chervonenkis [5] (for functions in {0, 1}). Averaging. Consider a probability distribution ρ defined on a countable F, take the expectation of (4) with respect to ρ and use Jensen’s inequality. This gives with probability at least 1 −β, ∀ρ, ρ(Pf −Pnf) ≤C r K(ρ, π) + H(ρ) + log 1/β n , where H(ρ) is the Shannon entropy. The l.h.s. is the difference between true and empirical error of a randomized classifier which uses ρ as weights for choosing the decision function (independently of the data). The PAC-Bayes bound [1] is a refined version of the above bound since it has the form (for possibly uncountable F) ∀ρ, ρ(Pf −Pnf) ≤C r K(ρ, π) + log n + log 1/β n . (6) To some extent, one can consider that the PAC-Bayes bound is a refined union bound where the gain happens when ρ is not concentrated on a single function (or more precisely ρ has entropy larger than log n). Rademacher averages. The quantity EnEσ supf∈F 1 n P σif(Zi), where the σi are independent random signs (+1, −1 with probability 1/2), called the Rademacher average for F, is, up to a constant equal to En supf∈F Pf −Pnf which means that it best captures the complexity of F. One has with probability 1 −β, ∀f ∈F, Pf −Pnf ≤C 1 nEnEσ sup f∈F X σif(Zi) + r log 1/β n ! . (7) Chaining. Another direction in which the union bound can be refined is by considering finite covers of the set of function at different scales. This is called the chaining technique, pioneered by Dudley (see e.g. [6]) since one constructs a chain of functions that approximate a given function more and more closely. The results involve the Koltchinskii-Pollard entropy integral as, for example in [7], with probability 1 −β, ∀f ∈F, Pf −Pnf ≤C 1 √nEn Z ∞ 0 p log N(F, ϵ, dn)dϵ + r log 1/β n ! . (8) Generic chaining. It has been noticed by Fernique and Talagrand that it is possible to capture the complexity in a better way than using minimal covers by considering majorizing measures (essentially optimal for Gaussian processes). Let r > 0 and (Aj)j≥1 be partitions of F of diameter r−j w.r.t. the distance dn such that Aj+1 refines Aj. Using (7) and techniques from [2] we obtain that with probability 1 −β, ∀f ∈F Pf −Pnf ≤C  1 √nEn inf π∈M1 +(F) sup f∈F ∞ X j=1 r−jq log 1/πAj(f) + r log 1/β n  . (9) If one takes partitions induced by minimal covers of F at radii r−j, one recovers (8) up to a constant. Concentration. Using concentration inequalities as in [3] for example, one can get rid of the expectation appearing in the r.h.s. of (3), (8), (7) or (9) and thus obtain a bound that can be computed from the data. Refining the bound (7) is possible as one can localize it (see e.g. [8]) by computing the Rademacher average only on a small ball around the function of interest. So this comes close to combining all improvements. However it has not been combined with the PACBayes improvement. Our goal is to try and combine all the above improvements. 3 Main results Let F be as defined in section 2 with a = 0, b = 1 and π ∈M1 +(F). Instead of using partitions as in (9) we use approximating sets (which also induce partitions but are easier to handle here). Consider a sequence Sj of embedded finite subsets of F: {f0} ≜S0 ⊂ · · · ⊂Sj−1 ⊂Sj ⊂· · · . Let pj : F →Sj be maps (which can be thought of as projections) satisfying pj(f) = f for f ∈Sj and pj−1 ◦pj = pj−1. The quantities π, Sj and pj are allowed to depend on X2n 1 in an exchangeable way (i.e. exchanging Xi and X′ i does not affect their value). For a probability distribution ρ on F, define its j-th projection as ρj = P f∈Sj ρ{f ′ : pj(f ′) = f}δf, where δf denotes the Dirac measure on f. To shorten notations, we denote the average distance between two successive “projections” by ρd2 j ≜ρd2 2n[pj(f), pj−1(f)]. Finally, let ∆n,j(f) ≜ P ′ n[f −pj(f)] −Pn[f −pj(f)]. Theorem 1 If the following condition holds lim j→+∞sup f∈F ∆n,j(f) = 0, a.s. (10) then for any 0 < β < 1/2, with probability at least 1 −β, for any distribution ρ, we have ρP ′ nf −P ′ nf0 ≤ρPnf −Pnf0 + 5 +∞ X j=1 s ρd2 jK(ρj, πj) n + 1 √n +∞ X j=1 χj(ρd2 j), where χj(x) = 4 r x log  4j2β−1 log(e2/x)  . Remark 1 Assumption (10) is not very restrictive. For instance, it is satisfied when F is finite, or when limj→+∞supf∈F |f−pj(f)| = 0, almost surely or also when the empirical process  f 7→Pf −Pnf  is uniformly continuous (which happens for classes with finite V C dimension in particular) and limj→+∞supf∈F d2n(f, pj(f)) = 0. Remark 2 Let G be a model (i.e. a set of prediction functions). Let ˜g be a reference function (not necessarily in G). Consider the class of functions F =  z 7→L[g(x), y] : g ∈G ∪{˜g} . Let f0 = L[˜g(x), y]. The previous theorem compares the risk on the second sample of any (randomized) estimator with the risk on the second sample of the reference function ˜g. Now let us give a version of the previous theorem in which the second sample does not appear. Theorem 2 If the following condition holds lim j→+∞sup f∈F E′ n  ∆n,j(f)  = 0, a.s. (11) then for any 0 < β < 1/2, with probability at least 1 −β, for any distribution ρ, we have ρPf −Pf0 ≤ρPnf −Pnf0 + 5 +∞ X j=1 s E′n[ρd2 j]E′n[K(ρj, πj)] n + 1 √n +∞ X j=1 χj E′ n[ρd2 j]  . 4 Discussion We now discuss in which sense the result presented above combines several previous improvements in a single bound. Notice that our bound is localized in the sense that it depends on the function of interest (or rather on the averaging distribution ρ) and does not involve a supremum over the class. Also, the union bound is performed in an optimal way since, if one plugs in a distribution ρ concentrated on a single function, takes a supremum over F in the r.h.s., and upper bounds the squared distance by the diameter of the partition, one recovers a result similar to (9) up to logarithmic factors but which is localized. Also, when two successive projections are identical, they do not enter in the bound (which comes from the fact that the variance weights the complexity terms). Moreover Theorem 1 also includes the PAC-Bayesian improvement for averaging classifiers since if one considers the set S1 = F one recovers a result similar to McAllester’s (6) which in addition contains the variance improvement such as in [9]. Finally due to the power of the generic chaining, it is possible to upper bound our result by Rademacher averages, up to logarithmic factors (using the results of [10] and [11]). As a remark, the choice of the sequence of sets Sj can generally be done by taking successive covers of the hypothesis space with geometrically decreasing radii. However, the obtained bound is not completely empirical since it involves the expectation with respect to an extra sample. In the transduction setting, this is not an issue, it is even an advantage as one can use the unlabeled data in the computation of the bound. However, in the induction setting, this is a drawback. Future work will focus on using concentration inequalities to give a fully empirical bound. 5 Proofs Proof of Theorem 1: The proof is inspired by previous works on PAC-bayesian bounds [12, 13] and on the generic chaining [2]. We first prove the following lemma. Lemma 1 For any β > 0, λ > 0, j ∈N∗and any exchangeable function π : X 2n → M1 +(F), with probability at least 1 −β, for any probability distribution ρ ∈M1 +(F), we have ρ n P ′ n[pj(f) −pj−1(f)] −Pn[pj(f) −pj−1(f)] o ≤2λ n ρd2 2n[pj(f), pj−1(f)] + K(ρ,π)+log(β−1) λ . Proof Let λ > 0 and let π : X 2n →M1 +(F) be an exchangeable function. Introduce the quantity ∆i ≜pj(f)(Zn+i) −pj−1(f)(Zn+i) + pj−1(f)(Zi) −pj(f)(Zi) and h ≜λP ′ n  pj(f) −pj−1(f)  −λPn  pj(f) −pj−1(f)  −2λ2 n d2n  pj(f), pj−1(f)  . (12) By using the exchangeability of π, for any σ ∈{−1; +1}n, we have E2nπeh = E2nπe−2λ2 n d2n[pj(f),pj−1(f)]+ λ n Pn i=1 ∆i = E2nπe−2λ2 n d2n[pj(f),pj−1(f)]+ λ n Pn i=1 σi∆i. Now take the expectation wrt σ, where σ is a n-dimensional vector of Rademacher variables. We obtain E2nπeh = E2nπe−2λ2 n d2n[pj(f),pj−1(f)] Qn i=1 cosh λ n∆i  ≤ E2nπe−2λ2 n d2n[pj(f),pj−1(f)]e Pn i=1 λ2 2n2 ∆2 i where at the last step we use that cosh s ≤e s2 2 . Since ∆2 i ≤2  pj(f)(Zn+i) −pj−1(f)(Zn+i) 2 + 2  pj(f)(Zi) −pj−1(f)(Zi) 2, we obtain that for any λ > 0, E2nπeh ≤1. Therefore, for any β > 0, we have E2nIlog πeh+log β>0 = E2nIπeh+log β>1 ≤E2nπeh+log β ≤β, (13) On the event  log πeh+log β ≤0 , by the Legendre’s transform, for any probability distribution ρ ∈M1 +(F), we have ρh + log β ≤log πeh+log β + K(ρ, π) ≤K(ρ, π), (14) which proves the lemma. Now let us apply this result to the projected measures πj and ρj. Since, by definition, π, Sj and pj are exchangeable, πj is also exchangeable. Since pj(f) = f for any f ∈Sj, with probability at least 1 −β, uniformly in ρ, we have ρj n P ′ n[f −pj−1(f)] −Pn[pj(f) −pj−1(f)] o ≤2λ n ρjd2 2n[f, pj−1(f)] + K′ j λ , where K′ j ≜K(ρj, πj) + log(β−1). By definition of ρj, it implies that ρ n P ′ n[pj(f)−pj−1(f)]−Pn[pj(f)−pj−1(f)] o ≤2λ n ρd2 2n[pj(f), pj−1(f)]+ K′ j λ . (15) To shorten notations, define ρd2 j ≜ρd2 2n[pj(f), pj−1(f)] and ρ∆j ≜ρ  P ′ n[pj(f) − pj−1(f)] −Pn[pj(f) −pj−1(f)] . The parameter λ minimizing the RHS of the previous equation depends on ρ. Therefore, we need to get a version of this inequality which holds uniformly in λ. First let us note that when ρd2 j = 0, we have ρ∆j = 0. When ρd2 j > 0, let m q log 2 2n and λk = mek/2 and let b be a function from R∗to (0, 1] such that P k≥1 b(λk) ≤1. From the previous lemma and a union bound, we obtain that for any β > 0 and any integer j with probability at least 1 −β, for any k ∈N∗and any distribution ρ, we have ρ∆j ≤2λk n ρd2 j + K(ρj, πj) + log [b(λk)]−1β−1 λk . Let us take the function b such that h λ 7→ log [b(λ)]−1 λ i is continuous and decreasing. Then there exists a parameter λ∗> 0 such that 2λ∗ n ρd2 j = K(ρj,πj)+log([b(λ∗)]−1β−1) λ∗ . For any β < 1/2, we have (λ∗)2ρd2 j ≥ log 2 2 n, hence λ∗≥m. So there exists an integer k ∈N∗such that λke−1/2 ≤λ∗≤λk. Then we have ρ∆j ≤ 2λ∗ n √eρd2 j + K(ρj,πj)+log([b(λ∗)]−1β−1) λ∗ = (1 + √e) r 2 nρd2 j h K(ρj, πj) + log ([b(λ∗)]−1β−1) i . (16) To have an explicit bound, it remains to find an upperbound of [b(λ∗)]−1. When b is decreasing, this comes down to upperbouding λ∗. Let us choose b(λ) = 1 [log( e2λ m )]2 when λ ≥m and b(λ) = 1/4 otherwise. Since b(λk) = 4 (k+4)2 , we have P k≥1 b(λk) ≤1. Tedious computations give λ∗≤7m √ K′ j ρd2 j which combined with (16), yield ρ∆j ≤5 s ρd2 jK(ρj, πj) n + 3.75 s ρd2 j n log  2β−1 log h e2 ρd2 j i . By simply using an union bound with weights taken proportional to 1/j2, we have that the previous inequation holds uniformly in j ∈N∗provided that β−1 is replaced with π2 6 j2β−1 since P j∈N∗1/j2 = π2/6 ≈1.64  . Notice that ρ  P ′ nf −P ′ nf0 + Pnf0 −Pnf  = ρ∆n,J(f) + J X j=1 ρj  (P ′ n −Pn)f −(P ′ n −Pn)pj−1(f)  because pj−1 = pj−1 ◦pj. So, with probability at least 1 −β, for any distribution ρ, we have ρ  P ′ nf −P ′ nf0 + Pnf0 −Pnf  ≤supF ∆n,J + 5 PJ j=1 q ρd2 jK(ρj,πj) n +3.75 PJ j=1 r ρd2 j n log  3.3j2β−1 log h e2 ρd2 j i . Making J →+∞, we obtain theorem 1. □ Proof of Theorem 2: It suffices to modify slightly the proof of theorem 1. Introduce U ≜ supρ  ρh+log β −K(ρ, π) , where h is still defined as in equation (12). Inequations (14) implies that E2neU ≤β. By Jensen’s inequality, we get EneE′ nU ≤β, hence En n E′ nU ≥ 0 o ≤β. So with probability at least 1 −β, we have supρ E′ n  ρh + log β −K(ρ, π) ≤ E′ nU ≤0. □ 6 Conclusion We have obtained a generalization error bound for randomized classifiers which combines several previous improvements. It contains an optimal union bound, both in the sense of optimally taking into account the metric structure of the set of functions (via the majorizing measure approach) and in the sense of taking into account the averaging distribution. We believe that this is a very natural way of combining these two aspects as the result relies on the comparison of a majorizing measure which can be thought of as a prior probability distribution and a randomization distribution which can be considered as a posterior distribution. Future work will focus on giving a totally empirical bound (in the induction setting) and investigating possible constructions for the approximating sets Sj. References [1] D. A. McAllester. Some PAC-Bayesian theorems. In Proceedings of the 11th Annual Conference on Computational Learning Theory, pages 230–234. ACM Press, 1998. [2] M. Talagrand. Majorizing measures: The generic chaining. Annals of Probability, 24(3):1049– 1103, 1996. [3] S. Boucheron, G. Lugosi, and S. Massart. A sharp concentration inequality with applications. Random Structures and Algorithms, 16:277–292, 2000. [4] D. A. McAllester. PAC-Bayesian model averaging. In Proceedings of the 12th Annual Conference on Computational Learning Theory. ACM Press, 1999. [5] V. Vapnik and A. Chervonenkis. Theory of Pattern Recognition [in Russian]. Nauka, Moscow, 1974. (German Translation: W. Wapnik & A. Tscherwonenkis, Theorie der Zeichenerkennung, Akademie–Verlag, Berlin, 1979). [6] R. M. Dudley. A course on empirical processes. Lecture Notes in Mathematics, 1097:2–142, 1984. [7] L. Devroye and G. Lugosi. Combinatorial Methods in Density Estimation. Springer Series in Statistics. Springer Verlag, New York, 2001. [8] P. Bartlett, O. Bousquet, and S. Mendelson. Local rademacher complexities. Preprint, 2003. [9] D. A. McAllester. Simplified pac-bayesian margin bounds. In Proceedings of Computational Learning Theory (COLT), 2003. [10] M. Ledoux and M. Talagrand. Probability in Banach spaces. Springer-Verlag, Berlin, 1991. [11] M. Talagrand. The Glivenko-Cantelli problem. Annals of Probability, 6:837–870, 1987. [12] O. Catoni. Localized empirical complexity bounds and randomized estimators, 2003. Preprint. [13] J.-Y. Audibert. Data-dependent generalization error bounds for (noisy) classification: a PACbayesian approach. 2003. Work in progress.
2003
113
2,325
Ambiguous model learning made unambiguous with 1/f priors G. S. Atwal Department of Physics Princeton University Princeton, NJ 08544 gatwal@princeton.edu William Bialek Department of Physics Princeton University Princeton, NJ 08544 wbialek@princeton.edu Abstract What happens to the optimal interpretation of noisy data when there exists more than one equally plausible interpretation of the data? In a Bayesian model-learning framework the answer depends on the prior expectations of the dynamics of the model parameter that is to be inferred from the data. Local time constraints on the priors are insufficient to pick one interpretation over another. On the other hand, nonlocal time constraints, induced by a 1/f noise spectrum of the priors, is shown to permit learning of a specific model parameter even when there are infinitely many equally plausible interpretations of the data. This transition is inferred by a remarkable mapping of the model estimation problem to a dissipative physical system, allowing the use of powerful statistical mechanical methods to uncover the transition from indeterminate to determinate model learning. 1 Introduction The estimation of a model underlying the production of noisy data becomes highly nontrivial when there exists more than one equally plausible model that could be responsible for the output data. The viewing of ambiguous figures, such as the Necker cube [1], is a classical problem of this type in the field of visual psychology. Pitch perception when hearing a number of different harmonics is another example of ambiguous perception [2]. Previous studies [3] have reduced the problem of optimal interpretation of an ambiguous stimulus to the problem of estimating a single variable which may vary in time α(t), given a time sequence of noisy data. Enforcing a prior belief that the local dynamics α(t) should not vary too rapidly embodies the observer’s knowledge that rapid variations in α(t) are unlikely in the natural world or in a given experiment. Such a prior prevents overfitting the model estimate to the data as it arrives. The statistically optimal interpretation of the data was then found to consist of α(t) hopping randomly from one possible interpretation to another. The rate of random switching between interpretations was found to be controlled not by the noise level (e.g. in the neural hardware), as previously thought, but rather by the observer’s prior hypotheses. This hopping persists indefinitely despite the fact that the probability distribution of the incoming data remains the same. In such cases it is impossible to learn a specific model parameter. In this paper we introduce another prior over the dynamics of α(t). We assume that fluctuations in α(t) have a 1/f spectrum, as observed ubiquitously in nature. Such a prior is shown to induce nonlocal time constraints on the trajectories of α(t) and, unlike the local constraints, can result in specific model learning in the case of ambiguous models. The fact that 1/f priors can induce unambiguous model learning is the central result of this work. The analyses of the long-time dynamics with nonlocal priors is permitted by a surprising and remarkable mapping to a dissipative quantum system. This mapping not only guides our intuition of the optimal trajectories of α(t) but also permits the usage of powerful statistical mechanical techniques. In particular, the renormalization group (RG) can be employed to uncover the conditions in which there is a transition from non-specific model learning to specific model learning. 2 Formalism Suppose that we are given a series of N measurements {xt} at discrete times t. Then Bayes rule gives us the conditional probability of {αt} giving rise to those data P[{αt}|{xt}] = P[{xt}|{αt}] P[{αt}] P[{xt}] , (1) where the probability of making the observations {xi} is given by summing up all the possible models that may give rise to them, P({xt}) = Z dα P[{xt}|{αt}]P[{αt}]. (2) We further assume conditional independence of signals, P[{xt}|{αt}] = P[x1x2...xN|{αt}] = N Y t=1 P[xt|αt]. (3) A natural step is then to consider how close our estimate of the model α(t) lies to the true underlying model α(t), which we take to be stationary α(t) = α. We can think of these probability distributions as Boltzmann distributions in which some effective potential acts to hold α close to ¯α; thus we envision an energy landscape in the α space with a minimum at ¯α. A more interesting, and generalized, question arises when we consider the global properties of the extended energy landscape. In particular there may be M > 1 equally plausible interpretations consistent with the input data1 in which case there exist degenerate minima at αm (m = 1, 2....M), P[xt|α1] = P[xt|α2] = ... = P[xt|αM]. (4) Therefore we may write Eq. (3) as P[{xt}|{αt}] = N Y t=1 M Y m=1 P[xt|αm]1/M ! exp " 1 M M X m=1 N X t=1 ln P[xt|αt] P[xt|αm] # . (5) On average, the term in square brackets is related to the Kullback-Leibler divergences between distributions conditional on α(t) and distributions conditional on the true ¯α. If the 1Of course it may be the case that some interpretations may be more plausible than others, resulting in a non uniform probability distribution over possible models. In this paper we illustrate the case where all interpretations are equally likely, P[αm] = 1/M. time variation of α is slow, we effectively collect many samples of x before α changes, and it makes sense to replace the sum over samples by its average: lim N→∞ M X m=1 N X t=1 ln P[xt|αt] P[xt|αm] ≈ 1 τ0 M X m=1 Z dt Z dxP[x(t)|αm] ln P[x(t)|α(t)] P[x|αm] , ≡ −1 τ0 M X m=1 Z dtDKL[αm||α(t)]. (6) where τ0 is the average time between observations, and we take the continuum limit. 2.1 Priors We need to have some prior hypotheses about how α(t) can vary in time, serving as our prior probability distribution P[α(t)]. We introduce two different types of priors characterized by whether they constrain the local or nonlocal time dynamics, P[α(t)] = Plocal[α(t)]Pnonlocal[α(t)]. (7) To summarize our prior expectation that the local dynamics of α(t) vary slowly, we assume that the time derivative of α(t) is chosen independently at each instant of time from a Gaussian distribution, Plocal[α(t)] ∝exp " −1 4D Z dt ∂α ∂t 2# . (8) Note that this distribution corresponds to random walk with effective diffusion constant D. Motivated by the ubiquitous occurrence of 1/f fluctuations in nature we chose to encapsulate the nonlocal dynamics by a Gaussian distribution with a 1/f power spectrum of noise, conveniently expressed in Fourier coordinates ω as Pnonlocal[α(t)] ∝exp  −1 2 Z dω 2π |α(ω)|2 S(ω)  , (9) where the spectral noise function takes the form S(ω) = 1 η|ω|. (10) Note that the spectrum must be even in ω since for any stationary process S(ω) = S(−ω). The parameter η determines the strength of a priori belief in nonlocal dynamics, or as we will see later, it can be equivalently viewed as a frictional constant determining the dissipation of the time trajectories of α(t). In the time-domain Eq. (9) becomes Pnonlocal[α(t)] ∝exp " −η 4π Z dtdt′ α(t) −α(t′) t −t′ 2# . (11) Combining Eq. (8) and Eq. (11) we then obtain the total prior expectation of the probability distribution over the time-dependence of the model parameter α(t) P[α(t)] ∝exp " −1 4D Z dt ∂α ∂t 2 −η 4π Z dtdt′ α(t) −α(t′) t −t′ 2# . (12) Taken together, the local and non-local terms describe fluctuations in α which are 1/f up to a cutoff frequency, ωc ∼Dη. Returning to the Bayesian conditional probability Eq. (1) we then obtain a path-integral expression P[α(t)|{xi}] ∝exp(−S[α(t)]), (13) where the action S[α(t)] is given by S[α(t)] = Z dt " 1 4D ∂α ∂t 2 + η Z dt′ 4π α(t) −α(t′) t −t′ 2 + Veff[α(t)] # , (14) Veff[α(t)] = 1 τ0M M X m=1 DKL[αm||α(t)]. (15) This is equivalent to the imaginary time path-integral for a quantum mechanical particle [4] of mass 1/2D , with coordinates given by α(t), moving in an effective potential Veff[α(t)] and subject to (linear) frictional forces with a damping constant η. This mapping provides an extremely useful guide to our intuition for the probable trajectories of α(t). Just as in the analyses of particle dynamics in dissipative quantum mechanics [4] we anticipate that the time-course of α(t) may exhibit qualitatively different types of behavior depending on the strength of the non-local terms. In addition, the equivalence to a physical system permits exploitation of powerful techniques developed in the study of quantum mechanical systems with infinite degrees of freedom. In the following we consider the cases of m = 1 and m = 2 and use the RG transformations to consider localization-delocalization transitions. 2.2 M=1 : One true interpretation of data Now if α(t) differs from α by a small ∆α(t) we can Taylor expand the Kullback-Leibler divergence to give a quadratic distance measure DKL(α||α) = 1 2F[α(t)]∆α(t)2 + O(∆α3), (16) where the metric is the Fisher information F[α(t)] = Z dx 1 P[x|α(t)] ∂P[x|α(t)] ∂α(t) 2 . (17) Thus, close to the true parameter α the potential energy term in Eq. (14) is simply a harmonic oscillator with stiffness given by the Fisher information. Guided by the mapping to a dissipative quantum mechanical system we expect that if the initial distribution of α already happens to be closely centered around the correct value then the most likely trajectory will be simply to move closer to the minima of the potential energy at α1. The important point to note is that had we chosen just the local constraints on our priors Eq. (8) then the trajectory of α(t) would persistently fluctuate around α1, representing a trade-off between avoiding overfitting the data and inertia of our estimate. In the quantum mechanical picture this corresponds to the zero point fluctuations around the minima. Adding the dissipative term reduces the fluctuations around α1 by an amount monotonically dependent on η, thus improving on the optimal estimate. A RG treatment of the single-well problem, within the harmonic approximation, renormalizes the Fisher information such that the curvature of the potential well increases for all values of the η, and thus the fixed point of the dynamics is simply the convergence of α(t) to reduced fluctuations around the true parameter α1. We explicitly carry out the RG calculation in the more interesting case where we have two global minima in the next section. 2.3 M=2 : Two equally possible interpretations of the data In the case of two equally viable interpretations of the data, the potential energy term becomes that of a double-well potential with degenerate minima at α1 and α2 and energy barrier h h = 1 2τ0 (DKL(α1||(α1 + α2)/2) + DKL(α2||α1 + α2)/2)) (18) -10 -5 0 5 10 α 0 5 10 15 20 V(α) h a1 a2 Figure 1: Potential energy landscape for α where there exist two equally valid interpretations. Eq. (19) Without any dissipative dynamics, the optimal estimate of α(t) will switch between the two minima, representing instanton trajectories of a quantum particle tunnelling through the energy barrier backwards and forwards [3]. In contrast, it is well known that, at least in some regimes, the problem with dissipation has a phase transition to a truly localized state. Previous work has demonstrated such a dynamical phase transition in the strong-coupling limit (i.e. large barrier height limit) using semi-classical approximations for the dynamics [4,5,6], and in this section we will show that a perturbative RG treatment yields similar results in the opposite weak-coupling limit. For the sake of simplicity we employ the following simple quartic potential (see Fig.1), although the results will be independent of its exact form, V (α) = h α4 1 α2 −α2 1 2 . (19) The α coordinates have been shifted such that α1 = −α2, and the height h of the energy barrier located at α = 0 sets the overall energy scale. It is useful to write the effective action of Eq. (14) in dimensionless parameters a = α α1 , b = ηα2 1, c = h Λ, (20) where Λ = D/α2 1 is the energy/frequency scale 2 S = 1 2 Z dω 2π  1 2Λω2 + b|ω|  |a(ω)|2 + cΛ Z dt V ′(a), (21) V ′(a) = (a2 −1)2. (22) 2The constant of proportionality between energy and frequency is set to 1, akin to the common physics computation setting of ¯h = 1. By power counting in the first integral the dissipative term, at low frequencies, dominates over the kinetic energy term. In the language of RG, the kinetic energy term is an irrelevant operator and can thus be ignored if we now focus our attention to frequencies below some cut-off λ. To determine the RG flow of the dimensionless coupling parameters the highfrequency components are integrated out from ω = λ−dλ to ω = λ to give a new effective action ˜S over the low frequency modes ω < λ. To accomplish this the function α(ω) is split a(ω) = a<(ω)θ(|ω| < λ −dλ) + a>(ω)θ(λ −dλ < |ω| < λ), (23) and the new action is obtained by integrating over a>(ω), Z = Z Da exp[−S(a)], = Z Z Da<Da> exp[−S(a< + a>)], = Z Da< exp[−˜S(a<)]. (24) Therefore, ˜S(a<) = b 2 Z λ−dλ 0 dω 2π |ω||a<(ω)|2 + ln  exp  cΛ Z dtV ′(a< + α>)  a> , (25) where the averaging is defined by ⟨A⟩a> ∝ Z Da> exp ( −b 2 Z Λ Λ−dΛ dω 2π |ω||a>(ω)|2 ) A. (26) In the weak-coupling limit, we may expand the exponential term in Eq. (25) before performing the averaging,  exp[cΛ Z dtV ′(a< + a>)]  a> =  1 + cΛ Z dtV ′(a< + a>) + ...  a> . (27) Terminating the expansion to first order in the potential represents a one-loop calculation in field theories. Making use of a2 >(t) a> = Z λ λ−dλ dω π 1 b|ω| ≈1 πb dλ λ , (28) we find that the potential term renormalizes as (cΛ(a2 −1)2)λ ⇒(cΛ(a2 −1)2)λ−dλ ≈(cΛ)λ  (a2 < −1)2 + (3a2 < −1) 2 πb dλ λ  , (29) where we have ignored terms including higher powers of dλ/λ. To recast the new lowerfrequency action into the same form as the original action the dimensionless coupling parameters must be renormalised. In particular, we observe that the dimensionless barrier height c can either grow or shrink depending on the value of the dimensionless dissipation b. Note that the coordinates must also be rescaled (also known as wavefunction renormalization) for the potential in Eq. (29) to maintain the same quartic form as in Eq. (22), thereby inducing a rescaling of b. We concentrate here on the renormalized potential coupling term and find that, up to a constant, cλ−dλ = cλ  1 + dλ λ  1 −6 πb  , (30) giving then the following differential RG flow equation dc d ln λ = b∗ b −1  c. (31) As the (dimensionless) barrier height c renormalizes towards lower frequencies we observe two types of behavior depending on whether the parameter b is greater or smaller than the critical value b∗= 6/π (the actual numerical value may well be slightly altered by going to higher orders in the perturbative expansion, but the important point to note that it is nonzero and thus gives rise to distinct dynamical phases). For b > b∗the barrier height grows without bounds and thus effectively traps α(t) in one of the two minima, representing a localized phase. This localization can be brought about by increasing the magnitude of η, the numerical prefactor of our dissipative nonlocal priors, and/or increasing α1 the distance between the two possible interpretations of the data. On the other hand, for b < b∗the potential becomes ineffective in localizing α, and thus α freely tunnels between the two wells, representing indeterminancy of the correct true model parameter. It is interesting to note that a flow equation, similar to Eq. (31), has been reported for the opposite limit (strong-coupling) using the instanton method[5,6]. Arguably what we have really shown is that even if one starts with weak coupling, so that it should be ”easy” to jump from one interpretation to another, for b > b∗we will flow to strong-coupling, at which point known results about localization take over. c 0 8 * local nonlocal b b Figure 2: Schematic RG flow of the potential energy coupling parameter for M ≥2. Note that the flow-lines are not expected to be strictly vertical due to wavefunction renormalization. The qualitative picture does not change when there are more than two possible model interpretations, M > 2. In fact, the case of M = ∞has been studied [7] where the potential energy landscape is taken to be sinusoidal, and it has been demonstrated that there again exists a critical value b∗which separates a localized phase from a nonlocalized phase. The flow of the potential energy coupling constant c is shown in Fig.2 which is expected to be qualitatively correct across the whole range 2 ≤M ≤∞. 3 Discussion In summary, the optimal model estimate in the response of ambiguous signals always results in random perceptual switching when the priors only constrain the local dynamics. We have shown that when we allow the possibility of 1/f noise in our priors then a specific model is learnt amongst the many possible models. The connection between estimation theory and statistical mechanics is well known. One of the key results in statistical mechanics is that local interactions in one dimension can never lead to a phase transition. Thus if we are interested in, for example, learning a single parameter by making repeated observations, then there can be no phase transition to certainty about the value of this parameter as long as our prior hypotheses about its dynamics are equivalent to local models in statistical mechanics. Markov models, Gaussian processes with rational spectra, and other common priors all fall in this local class. The common occurrence of 1/f fluctuations in nature motivates the analyses of estimation theory with such priors. Crucially, 1/f spectra do not correspond to local models. In fact they correspond exactly to the addition of friction to the path integral describing a quantum mechanical particle, a problem of general interest in condensed matter physics and more recently in quantum computing. Here we note one important consequence of these priors, namely that we can process data in a model which admits the possibility of time variation for the underlying parameter, but nonetheless find that our best estimate of this parameter is localized for all time to one of many equally plausible alternatives. It seems that 1/f priors may provide a way to understand the emergence of certainty more generally as a phase transition. References [1] G. H. Fisher, Perception & Psychophysics 4, 189 (1968) [2] E. de Boer, Handbk. Sens. Physiol. 3, 479 (1976) [3] W. Bialek and M. DeWeese, M. Phys. Rev. Lett. 74, 3079 (1995) [4] A. O. Caldeira and A. J. Leggett, Phys. Rev. Lett. 46, 211 (1981) [5] A. J. Bray and M. A. Moore, Phys. Rev. Lett 49, 1545 (1982) [6] A. J. Leggett, S. Chakravarty, A. T. Dorsey, M. P. A. Fisher, A. Garg and W. Zwerger, Rev. Mod. Phys. 59, 1 (1987) [7] M. P. A. Fisher and W. Zwerger, Phys. Rev. Lett 32, 6190 (1985)
2003
114
2,326
Generalised Propagation for Fast Fourier Transforms with Partial or Missing Data Amos J Storkey School of Informatics, University of Edinburgh 5 Forrest Hill, Edinburgh UK a.storkey@ed.ac.uk Abstract Discrete Fourier transforms and other related Fourier methods have been practically implementable due to the fast Fourier transform (FFT). However there are many situations where doing fast Fourier transforms without complete data would be desirable. In this paper it is recognised that formulating the FFT algorithm as a belief network allows suitable priors to be set for the Fourier coefficients. Furthermore efficient generalised belief propagation methods between clusters of four nodes enable the Fourier coefficients to be inferred and the missing data to be estimated in near to O(n log n) time, where n is the total of the given and missing data points. This method is compared with a number of common approaches such as setting missing data to zero or to interpolation. It is tested on generated data and for a Fourier analysis of a damaged audio signal. 1 Introduction The fast Fourier transform is a fundamental component in any numerical toolbox. Commonly it is thought of as a deterministic transformation from data to Fourier space. It relies on regularly spaced data, ideally of length 2hi for some hi in each dimension i. However there are many circumstances where Fourier analysis would be useful for data which does not take this form. The following are a few examples of such situations: • There is temporary/regular instrument failure or interruption. • There are scratches on media, such as compact disks. • Missing packets occur in streamed data. • Data is not 2k in length or is from e.g. irregularly shaped image patches. • There is known significant measurement error in the data. • Data is quantised, either in Fourier domain (e.g. jpeg) or data domain (e.g. integer storage). Setting missing values to zeros or using interpolation will introduce various biases which will also affect the results; these approaches can not help in using Fourier information to help restore the missing data. Prior information is needed to infer the missing data or the corresponding Fourier components. However to be practically useful inference must be fast. Ideally we want techniques which scale close to O(n log n). The FFT algorithm can be described as a belief network with deterministic connections where each intermediate node has two parents and two children (a form commonly called the butterfly net). The graphical structure of the FFT has been detailed before in a number of places. See [1, 5] for examples. Prior distributions for the Fourier coefficients can be specified. By choosing a suitable cluster set for the network nodes and doing generalised propagation using these clusters, reasonable inference can be achieved. In the case that all the data is available this approach is computationally equivalent to doing the exact FFT. There have been other uses of belief networks and Bayesian methods to improve standard transforms. In [2], a hierarchical prior model of wavelet coefficients was used with some success. Other authors have recognised the problem of missing data in hierarchical systems. In [6] the authors specify a multiscale stochastic model, which enables a scale recursive description of a random process. Inference in their model is propagation within a tree structured belief network. FFT related Toeplitz methods combined with partition inverse equations are applicable for inference in grid based Gaussian process systems with missing data [9]. 2 Fast Fourier Transform 2.1 The FFT Network From this point forward the focus will be on the one dimensional fast Fourier transform. The FFT utilises a simple recursive relationship in order to implement the discrete Fourier transform in O(n log n) time for n = 2h data points. For W = exp(−2πi/n), the kth Fourier coefficient Fk is given by Fk def = n−1 X j=0 W kjxj = n/2−1 X j=0 W 2kjx2j + n/2−1 X j=0 W (2j+1)kx2j+1 = F e k + W kF o k (1) where F e k denotes the kth component of the length n/2 Fourier transform of the even components of xj. Likewise F o k is the same for the odd components. The two new shorter Fourier transforms can be split in the same way, recursively down to the transforms of length 1 which are just the data points themselves. It is also worth noting that F e k and F o k are in fact used twice, as Fk+n/2 = F e k −W kF o k . The inverse FFT uses exactly the same algorithm as the FFT, but with conjugate coefficients. This recursive algorithm can be drawn as a network of dependencies, using the inverse FFT as a generative model; it takes a set of Fourier components and creates some data. The usual approach to the FFT is to shuffle the data into reverse bit order (xi for binary i = 010111 is put in position i′ = 111010; see [8] for more details). This places data which will be combined in adjacent positions. Doing this, we get the belief network of Figure 1a as a representation of the dependencies. The top row of this figure gives the Fourier components in order, and the bottom row gives the bit reversed data. The intermediate nodes are the even and odd Fourier coefficients at different levels of recursion. 2.2 A Prior on Fourier Coefficients The network of Figure 1a, combined with (1), specifies the (deterministic) conditional distributions for all the nodes below the top layer. However no prior distribution is currently set for the top nodes, which denote the Fourier coefficients. In general little prior phase information is known, but often there might be some (a) (b) Figure 1: (a) The belief network corresponding to the fast Fourier transform. The top layer are the Fourier components in frequency order. The bottom layer is the data in bit reversed order. The intermediate layers denote the partial odd and even transforms that the algorithm uses. (b) The moralised undirected network with three clusters indicated by the boxes. All nodes surrounded by the same box type form part of the same cluster. expected power spectra. For example we might expect a 1/f power spectra, or in some circumstances empirical priors may be appropriate. For simplicity we choose independent complex Gaussian1 priors on each of the top nodes. Then the variance of each prior will represent the magnitude of the expected power of that particular coefficient. 3 Inference in the FFT Network Suppose that some of the data which would be needed to perform the FFT is missing. Then we would want to infer the Fourier coefficients based on the data that was available. The belief network of Figure 1a is not singly connected and so exact propagation methods are not appropriate. Forming the full Gaussian distribution of the whole network and calculating using that is too expensive except in the smallest situations. Using exact optimisation (eg conjugate gradient) in the conditional Gaussian system is O(n2), although a smaller number of iterations of conjugate gradient can provide a good approximation. Marrying parents and triangulating the system will result in a number of large cliques and so junction tree methods will not work in a reasonable time. 3.1 Loopy Propagation Loopy propagation [7, 10, 3] in the FFT network suffers from some serious deficits. Experiments with loopy propagation suggest that often there are convergence problems in the network, especially for systems of any significant size. Sometimes adding additional jitter and using damping approaches (see e.g. [4]) can help the system to converge, but convergence is then very slow. Intuitively the approximation given by loopy propagation fails to capture the moralisation of the parents, which, given the deterministic network, provides strong couplings. Note that when the system does converge the mean inferred values are correct [11], but the variances are significantly underestimated. 1A complex Gaussian is of the form exp(−0.5xT C−1x)/Z where x is complex, and C is positive (semi)definite. It is a more restrictive distribution than a general Gaussian in the complex plane. 4 Generalised Belief Propagation for the FFT In [14] the authors show that stationary points of loopy propagation between nodes of a Markov network are minimisers of the Bethe free energy of the probabilistic system. They also show that more general propagation procedures, such as propagation of information between clusters of a network correspond to the minimisation of a more general Kikuchi free energy of which The Bethe free energy is a special case. To overcome the shortfalls of belief propagation methods, a generalised belief propagation scheme is used here. The basic problem is that there is strong dependence between parents of a given node, and the fact that the values for those two nodes are fully determined by the two children but undetermined by only one. Hence it would seem sensible to combine these four nodes, the two parents and two children, together into one cluster. This can be done for all nodes at all levels, and we find that the cluster separator between any two clusters consists of at most one node. At each stage of propagation between clusters only the messages (in each direction) at single nodes need to be maintained. The procedure can be summarised as follows: Start with the belief network of Figure 1a and convert it to an undirected network by moralisation (Figure 1b). Then we identify the clusters of the graph, which each consist of four nodes as illustrated by the boxes in Figure 1b. Each cluster consists of two common parents and their common children. Each node not in the extreme layers is also a separator between two clusters. Building a network of clusters involves creating an edge for each separator. From Figure 1 it can be seen that this network will have undirected loops. Hence belief propagation in this system will not be exact. However it will be possible to iteratively propagate messages in this system. Hopefully the iteration will result in an equilibrium being reached which we can use as an approximate inference for the marginals of the network nodes, although such convergence is not guaranteed. 4.1 Propagation Equations This section provides the propagation messages for the approach described above. For simplicity, and to maintain symmetry we use an update scheme where messages are first passed down from what were the root nodes (before moralisation) to the leaf nodes, and then messages are passed up from the leaf to the root nodes. This process is then iterated. The first pass down the network is data independent and can be precomputed. 4.1.1 Messages Propagating Down The Markov network derived from a belief network has the potentials of each cluster defined by the conditional probability of all the child nodes in that cluster given their parents. Two adjoining clusters of the network are illustrated in Figure 2a. All the cluster interactions in the network have this form, and so the message passing described below applies to all the nodes. The message ρ4 ≡N(µ+ 4 , σ+ 4 ) is defined to be that passed down from some cluster C1 containing nodes y1, y2 (originally the parents) and y3, y4 (originally the children) to the cluster below: C2 = (y4, y5, y6, y7), with y6 and y7 the children. µ+ 4 is the message mean, and σ+ 4 is the covariance. The message is given by the marginal of the cluster potential multiplied by the incoming messages from the other nodes. The standard message passing scheme can be followed to get the usual form of results for Gaussian networks [7, 11]. Suppose λ3(y3) = N(y3; µ− 3 , σ− 3 ) is the message passing up the network at node 3, whereas ρ1(y1) = N(y1; µ+ 1 , σ+ 1 ) and ρ2(y2) = N(y2; µ+ 2 , σ+ 2 ) are the messages passing down the network at nodes 1 and 2 respectively. Here we use the notation of [7] and use σ to represent variances. Defining2 ΣA = B1  σ+ 1 0 0 σ+ 2  B† 1, µA = B1  µ+ 1 µ+ 2  where B1 =  b31 b32 b41 b42  (2) are the connection coefficients derived from (1), and Σ−1 D = Σ−1 A +  1/σ− 3 0 0 0  , µD = ΣD  Σ−1 A µA +  µ− 3 /σ− 3 0  (3) allows us to write the downward message as µ+ 4 = (µD)2 and Σ+ 4 = (ΣD)22. (4) 4.1.2 Messages Propagating Up In the same way we can calculate the messages which are propagated up the network. The message λ4 = N(µ− 4 , σ− 4 ) passed up from cluster C2 to cluster C1 is given by µ− 4 = (µU)1 and Σ− 4 = (ΣU)11 where B2 =  b64 b65 b74 b75  , and (5) ΣB = (B−1 2 )diag(σ− 6 , σ− 7 )(B−1 2 )†, µB = B−1 2 (µ6, µ7)T , (6) Σ−1 U = Σ−1 B + diag(0, 1/σ+ 5 ), µU = ΣU(Σ−1 B µB + diag(0, 1/σ+ 5 )(0, µ+ 5 )T ) (7) All the other messages follow by symmetry. 4.1.3 Calculation of the Final Marginals The approximate posterior marginal distributions are given by the product of the λ and ρ messages. Hence the posterior marginal at each node k is also a Gaussian distribution with variance and mean given by σk =  1 σ− k + 1 σ+ k −1 and µk = σk µ− k σ− k + µ+ k σ+ k  respectively. (8) 4.2 Initialisation The network is initialised by setting the λ messages at the leaf nodes to be N(x, 0) for a node known to take value x and N(0, ∞) for the missing data. All the other λ messages are initialised to N(0, ∞). The ρ message at a given root node is set to the prior at that root node. No other ρ messages need to be initialised as they are not needed before they are computed during the first pass. Computationally, we usually have to add a small jitter term network noise, and represent the infinite variances by large numbers to avoid numeric problems. 5 Demonstrations and Results In all the tests in this section the generalised propagation converged in a small number of iterations without the need to resort to damping. First we analyse the simple case where the variances of the Fourier component priors have a 1/k form where k is the component number (i.e., frequency). To test this scenario, a set of 2The †operator is used to denote the complex conjugate transpose (adjoint). 7 C C y y y y y y y 1 2 1 2 3 5 4 6 −2 −1.5 −1 −0.5 0 0.5 0 0.1 0.2 0.3 0.4 0.5 0.6 0.7 0.8 0.9 Power Proportion of MSE (a) (b) Figure 2: (a) Two clusters C1 and C2. All the clusters in the network contain four nodes. Each node is also common to one other cluster. Hence the interaction between any two connected clusters is of the form illustrated in this figure. (b) How the weighted mean square error varies for spectra with different power laws (fPower). The filled line is the belief network approach, the dashed line is linear interpolation, the dotted line uses mean-valued data. Mean fill Linear Spline BN MSE 0.072 0.045 9.9 0.037 WMSE 1.6 0.98 37.7 0.92 Table 1: Comparison of methods for estimating the FFT of a 1/f function. ‘Zero fill’ replaces missing values by zero and then does an FFT. ‘Linear’ interpolates linearly for the missing values. ‘Spline’ does the same with a cubic spline. ‘BN’ are the results using the mean Fourier components produced by the method described in this paper. 128 complex Fourier components are generated from the prior distribution. An inverse FFT is used to generate data from the Fourier components. A predetermined set of elements is then ‘lost’3. The remaining data is then used with the algorithm of this paper using 10 iterations of the down-up propagation. The resulting means are compared with the components obtained by replacing the missing data with zeros or with interpolated values and taking an FFT . Mean squared errors (MSE) in the Fourier components are calculated for each approach over the 100 different runs. Weighted mean squared errors (WMSE) are also calculated, where each frequency component is divided by its prior variance before averaging. The results are presented in Table 1. The generalised belief propagation produces better results than any of the other approaches. Similar results are achieved for a number of different spectral priors. The benefits of interpolation are seen for situations where there are only low frequency components, and the zeroing approach becomes more reasonable in white noise like situations, but across a broad spread of spectral priors, the belief network approach tends to perform better. Figure 2b illustrates of how the results vary for an average of 100 runs as the power spectrum varies from f −2 to f 0.5. Note that the approach is particularly good at the 1/f power spectra point, which corresponds to the form of spectra in many real life problems. 3Data in positions 3 4 5 6 8 11 13 15 18 21 22 24 25 27 28 29 30 32 33 34 35 36 42 47 51 55 58 61 65 67 71 73 75 77 78 79 81 84 86 94 97 101 102 103 104 114 115 116 117 118 119 120 121 122 123 124 125 126 127 are removed. This provides a mix of loss in whole regions, but also at isolated points. Linear Spline BN 1/f 4 3.41 × 10−8 1.72 × 10−8 8.51 × 10−7 1/f 2 3.33 × 10−6 9.90 × 10−6 3.53 × 10−6 1/f 9.39 × 10−5 5.15 × 10−4 5.52 × 10−5 Table 2: Testing the MSE predictive ability of the belief network approach. Zero fill Linear Spline BN MSE 3.421 1.612 0.869 0.317 WMSE 1.96 0.883 0.465 0.125 MSEPRED 0.0033 0.0016 0.00085 0.00031 Table 3: Testing the ability of the belief network approach on real life audio data. The BN approach performs better than all others for both prediction of the correct spectrum and prediction of the missing data. MSE: mean squared error, WMSE: weighted mean squared error, MSEPRED: Mean squared error of the data predictor. Next we compare approaches for filling in missing data. This time 50 runs are made on 1/f 4, 1/f 2 and 1/f power spectra. Note that ignoring periodic boundary constraints, a 1/f 2 power spectra produces a Brownian curve for which the linear predictor is the optimal mean predictor. In this case the mean square error for the belief network propagation approach (Table 2) is close to the linear error. On smooth curves such as that produced by the 1/f 4 noise the predictive ability of the approach (for small numbers of iterations) does not match interpolation methods. The local smoothness information is not easily used in the belief network propagation, because neighbouring points in data space are only connected at the highest level in the belief network. The approximations of loopy propagation methods do not preserve enough information when propagated over these distances. However for data such as that produced by the common 1/f power spectra, interpolation methods are less effective, and the belief network propagation performs well. In this situation the belief network approach outperforms interpolation. Calculations using zero values or mean estimates also prove significantly worse. Last, tests are made on some real world audio data. A 1024 point complex audio signal is built up from a two channel sample from a short stretch of laughter. Fourier power spectra of the mean of 15 other different sections of laughter are used to estimate the prior power spectral characteristics. Randomly selected parts of the data are removed corresponding to one tenth of the whole. A belief network FFT is then calculated in the usual way, and compared with the true FFT calculated on the whole data. The results are given in Table 3. The belief network approach performs better than all other methods including linear and cubic spline interpolation. 6 Discussion This paper provides a clear practical example of a situation where generalised propagation overcomes deficits in simpler propagation methods. It demonstrates how a belief network representation of the fast Fourier transform allows Fourier approaches to be used in situations where data is missing. Kikuchi inference in the FFT belief network proves superior to many naive approaches for dealing with missing data in the calculation of Fourier transforms. It also provides methods for inferring missing data. It does this while maintaining O(n log2 n) nature of the FFT algorithm, if we assume that the number of iterations needed for convergence does not increase with data size. In practice, additional investigations have shown that this is not the case, but that the increase in the number of iterations does not scale badly. Further investigation is needed to show exactly what the scaling is, and further documentation of the benefits of generalised propagation over loopy propagation and conjugate gradient methods is needed beyond the space available here. It might be possible that variational approximation using clusters [12] could provide another approach to inference in this system. This paper has also not considered the possibility of dependent or sparse priors over Fourier coefficients, or priors over phase information, all of which would be interesting. Formalising the extension to 2 dimensions would be straightforward but valuable, as it is likely the convergence properties would be different. In conclusion the tests done indicate that this is a valuable approach for dealing with missing data in Fourier analysis. It is particularly suited to the types of spectra seen in real world situations. In fact loopy propagation methods in FFT networks are also valuable in many scenarios. Very recent work of Yedidia [13], shows that discrete generalised belief propagation in FFT constructions may enable the benefits of sparse decoders to be used for Reed-Solomon codes. Acknowledgements This work was funded by a research fellowship from Microsoft Research, Cambridge. The author specifically thanks Erik Sudderth, Jonathan Yedidia, and the anonymous reviewers for their comments. References [1] S.M. Aji and R.J. McEliece. The generalised distributive law. IEEE Trans. Info. Theory, 47(2):498–519, February 2000. [2] C. A. Bouman and M. Shapiro. A multiscale random field model for Bayesian image segmentation. IEEE Transactions on Image Processing, 3(2):162–177, 1994. [3] B. J. Frey. Turbo factor analysis. Technical Report TR-99-1, University of Waterloo, Computer Science, April 1999. [4] T. Heskes. Stable fixed points of loopy propagation are minima of the Bethe Free Energy. In NIPS15, pages 343–350, 2003. [5] F. R. Kschischang, B. J. Frey, and H. A. Loeliger. Factor graphs and the sum–product algorithm. IEEE Trans. Info. Theory, 47(2):498–519, February 2001. [6] M. R. Luettgen and A. S. Willsky. Likelihood calculation for a class of multiscale stochastic models, with application to texture discrimination. IEEE Transactions on Image Processing, 4(2):194–207, 1995. [7] J. Pearl. Probabilistic Reasoning in Intelligent Systems: Networks of Plausible Inference. Morgan Kaufmann, 1988. [8] W. H. Press, S. A. Teukolsky, W. T. Vetterling, and B. P. Flannery. Numerical Recipies in C. Cambride University Press, 1988. [9] A. J. Storkey. Truncated covariance matrices and toeplitz methods in Gaussian processes. In ICANN99, pages 55–60, 1999. [10] Y. Weiss. Correctness of local probability propagation in graphical models with loops. Neural Computation, 12:1–41, 2000. [11] Y. Weiss and W. T. Freeman. Correctness of belief propagation in Gaussian models of arbitrary topology. Technical Report TR UCB//CSD-99-1046, University of California at Berkeley Computer Science Department, June 1999. [12] W. Wiegerinck and D. Barber. Variational belief networks for approximate inference. In La Poutre and Van den Henk, editors, Proceedings of the 10th Netherlands/Belgium Conference on AI, pages 177–183. CWI, 1998. [13] J. S. Yedidia. Sparse factor graph representations of Reed-Solomon and related codes. Technical Report TR2003-135, MERL, January 1994. [14] J. S. Yedidia, W. T. Freeman, and Y. Weiss. Generalised belief propagation. In NIPS13, pages 689–695, 2001.
2003
115
2,327
Can We Learn to Beat the Best Stock Allan Borodin1 Ran El-Yaniv2 Vincent Gogan1 Department of Computer Science University of Toronto1 Technion - Israel Institute of Technology2 {bor,vincent}@cs.toronto.edu rani@cs.technion.ac.il Abstract A novel algorithm for actively trading stocks is presented. While traditional universal algorithms (and technical trading heuristics) attempt to predict winners or trends, our approach relies on predictable statistical relations between all pairs of stocks in the market. Our empirical results on historical markets provide strong evidence that this type of technical trading can “beat the market” and moreover, can beat the best stock in the market. In doing so we utilize a new idea for smoothing critical parameters in the context of expert learning. 1 Introduction: The Portfolio Selection Problem The portfolio selection (PS) problem is a challenging problem for machine learning, online algorithms and, of course, computational finance. As is well known (e.g. see Lugosi [1]) sequence prediction under the log loss measure can be viewed as a special case of portfolio selection, and perhaps more surprisingly, from a certain worst case minimax criterion, portfolio selection is not essentially any harder (than prediction) as shown in [2] (see also [1], Thm. 20 & 21). But there seems to be a qualitative difference between the practical utility of “universal” sequence prediction and universal portfolio selection. Simply stated, universal sequence prediction algorithms under various probabilistic and worst-case models work very well in practice whereas the known universal portfolio selection algorithms do not seem to provide any substantial benefit over a naive investment strategy (see Sec. 4). A major pragmatic question is whether or not a computer program can consistently outperform the market. A closer inspection of the interesting ideas developed in information theory and online learning suggests that a promising approach is to exploit the natural volatility in the market and in particular to benefit from simple and rather persistent statistical relations between stocks rather than to try to predict stock prices or “winners”. We present a non-universal portfolio selection algorithm1, which does not try to predict winners. The motivation behind our algorithm is the rationale behind constant rebalancing algorithms and the worst case study of universal trading introduced by Cover [3]. Not only does our proposed algorithm substantially “beat the market” on historical markets, it also beats the best stock. So why are we presenting this algorithm and not just simply making money? There are, of course some caveats and obstacles to utilizing the algorithm. But for large investors the possibility of a goose laying silver (if not golden) eggs is not impossible. 1Any PS algorithm can be modified to be universal by investing any fixed fraction of the initial wealth in a universal algorithm. Assume a market with m stocks. Let vt = (vt(1), . . . , vt(m)) be the closing prices of the m stocks for the tth day, where vt(j) is the price of the jth stock. It is convenient to work with relative prices xt(j) = vt(j)/vt−1(j) so that an investment of $d in the jth stock just before the tth period yields dxt(j) dollars. We let xt = (xt(1), . . . , xt(m)) denote the market vector of relative prices corresponding to the tth day. A portfolio b is an allocation of wealth in the stocks, specified by the proportions b = (b(1), . . . , b(m)) of current dollar wealth invested in each of the stocks, where b(j) ≥0 and P j b(j) = 1. The daily return of a portfolio b w.r.t. a market vector x is b · x = P j b(j)x(j) and the (compound) total return, retX(b1, . . . , bn), of a sequence of portfolios b1, . . . , bn w.r.t. a market sequence X = x1, . . . , xn is Qn t=1 bt · xt. A portfolio selection algorithm is any deterministic or randomized rule for specifying a sequence of portfolios. The simplest strategy is to “buy-and-hold” stocks using some portfolio b. We denote this strategy by BAHb and let U-BAH denote the uniform buy-and-hold when b = (1/m, . . . , 1/m). We say that a portfolio selection algorithm “beats the market” when it outperforms U-BAH on a given market sequence although in practice “the market” can be represented by some non-uniform BAH (e.g. DJIA). Buy-and-hold strategies rely on the tendency of successful markets to grow. Much of modern portfolio theory focuses on how to choose a good b for the buy-and-hold strategy. The seminal ideas of Markowitz in [4] yield an algorithmic procedure for choosing the weights of the portfolio b so as to minimize the variance for any feasible expected return. This variance minimization is possible by placing appropriate larger weights on subsets of anti-correlated stocks, an idea which we shall also utilize. We denote the optimal in hindsight buy-and-hold strategy (i.e. invest only in the best stock) by BAH∗. An alternative approach to the static buy-and-hold is to dynamically change the portfolio during the trading period. This approach is often called “active trading”. One example of active trading is constant rebalancing; namely, fix a portfolio b and (re)invest your dollars each day according to b. We denote this constant rebalancing strategy by CBALb and let CBAL∗denote the optimal (in hindsight) CBAL. A constant rebalancing strategy can often take advantage of market fluctuations to achieve a return significantly greater than that of BAH∗. CBAL∗is always at least as good as the best stock BAH∗and in some real market sequences a constant rebalancing strategy will take advantage of market fluctuations and significantly outperform the best stock (see Table 1). For now, consider Cover and Gluss’ [5] classic (but contrived) example of a market consisting of cash and one stock and the market sequence of price relatives ¡ 1 1/2 ¢ , ¡1 2 ¢ , ¡ 1 1/2 ¢ , ¡1 2 ¢ , . . . Now consider the CBALb with b = ( 1 2, 1 2). On each odd day the daily return of CBALb is 1 21 + 1 2 1 2 = 3 4 and on each even day, it is 3/2. The total return over n days is therefore (9/8)n/2, illustrating how a constant rebalancing strategy can yield exponential returns in a “no-growth market”. Under the assumption that the daily market vectors are observations of identically and independently distributed (i.i.d) random variables, it is shown in [6] that CBAL∗performs at least as good (in the sense of expected total return) as the best online portfolio selection algorithm. However, many studies (see e.g. [7]) argue that stock price sequences do have long term memory and are not i.i.d. A non-traditional objective (in computational finance) is to develop online trading strategies that are in some sense always guaranteed to perform well. Within a line of research pioneered by Cover [5, 3, 2] one attempts to design portfolio selection algorithms that can provably do well (in terms of their total return) with respect to some online or offline benchmark algorithms. Two natural online benchmark algorithms are the uniform buy and hold U-BAH, and the uniform constant rebalancing strategy U-CBAL, which is CBALb with b = ( 1 m, . . . , 1 m). A natural offline benchmark is BAH∗and a more challenging offline benchmark is CBAL∗. Cover and Ordentlich’s Universal Portfolios algorithm [3, 2], denoted here by UNIVERSAL, was proven to be universal against CBAL∗, in the sense that for every market sequence X of m stocks over n days, it guarantees a sub-exponential (indeed polynomial) ratio in n, retX(CBAL∗)/retX(UNIVERSAL) ≤O ³ n m−1 2 ´ (1) From a theoretical perspective this is surprising as the ratio is a polynomial in n (for fixed m) whereas CBAL∗is capable of exponential returns. From a practical perspective, while the ratio n m−1 2 is not very useful, the motivation that underlies the potential of CBAL algorithms is useful! We follow this motivation and develop a new algorithm which we call ANTICOR. By attempting to systematically follow the constant rebalancing philosophy, ANTICOR is capable of some extraordinary performance in the absence of transaction costs, or even with very small transaction costs. 2 Trying to Learn the Winners The most direct approach to expert learning and portfolio selection is a “(reward based) weighted average prediction” algorithm which adaptively computes a weighted average of experts by gradually increasing (by some multiplicative or additive update rule) the relative weights of the more successful experts. For example, in the context of the PS problem consider the “exponentiated gradient” EG(η) algorithm proposed by Helmbold et al. [8]. The EG(η) algorithm computes the next portfolio to be bt+1(j) = bt(j) exp {ηxt(j)/(bt · xt)} Pm j=1 bt(j) exp {ηxt(j)/(bt · xt)} where η is a “learning rate” parameter. EG was designed to greedily choose the best portfolio for yesterday’s market xt while at the same time paying a penalty from moving far from yesterday’s portfolio. For a universal bound on EG, Helmbold et al. set η = 2xmin p 2(log m)/n where xmin is a lower bound on any price relative.2 It is easy to see that as n increases, η decreases to 0 so that we can think of η as being very small in order to achieve universality. When η = 0, the algorithm EG(η) degenerates to the uniform CBAL which is not a universal algorithm. It is also the case that if each day the price relatives for all stocks were identical, then EG (as well as other PS algorithms) will converge to the uniform CBAL. Combining a small learning rate with a “reasonably balanced” market we expect the performance of EG to be similar to that of the uniform CBAL and this is confirmed by our experiments (see Table1).3 Cover’s universal algorithms adaptively learn each day’s portfolio by increasing the weights of successful CBALs. The update rule for these universal algorithms is bt+1 = R b · rett(CBALb)dµ(b) R rett(CBALb)dµ(b) , where µ(·) is some prior distribution over portfolios. Thus, the weight of a possible portfolio is proportional to its total return rett(b) thus far times its prior. The particular universal algorithm we consider in our experiments uses the Dirichlet prior (with parameters ( 1 2, . . . , 1 2)) [2]. Within a constant factor, this algorithm attains the optimal ratio (1) with respect to CBAL∗.4 The algorithm is equivalent to a particular static distribution over the 2Helmbold et al. show how to eliminate the need to know xmin and n. While EG can be made universal, its performance ratio is only sub-exponential (and not polynomial) in n. 3Following Helmbold et al. we fix η = 0.01 in our experiments. 4Experimentally (on our datasets) there is a negligible difference between the uniform universal algorithm in [3] and the above Dirichlet universal algorithm. class of all CBALs. This equivalence helps to demystify the universality result and also shows that the algorithm can never outperform CBAL∗. A different type of “winner learning” algorithm can be obtained from any sequence prediction strategy. For each stock, a (soft) sequence prediction algorithm provides a probability p(j) that the next symbol will be j ∈{1, . . . , m}. We view this as a prediction that stock j will have the best price relative for the next day and set bt+1(j) = pj. We consider predictions made using the prediction component of the well-known Lempel-Ziv (LZ) lossless compression algorithm [9]. This prediction component is nicely described in Langdon [10] and in Feder [11]. As a prediction algorithm, LZ is provably powerful in various senses. First it can be shown that it is asymptotically optimal with respect to any stationary and ergodic finite order Markov source (Rissanen [12]). Moreover, Feder shows that LZ is also universal in a worst case sense with respect to the (offline) benchmark class of all finite state prediction machines. To summarize, the common approach to devising PS algorithms has been to attempt and learn winners using winner learning schemes. 3 The Anticor Algorithm We propose a different approach, motivated by the CBAL “philosophy”. How can we interpret the success of the uniform CBAL on the Cover and Gluss example of Sec. 1? Clearly, the uniform CBAL here is taking advantage of price fluctuation by constantly transferring wealth from the high performing stock to the anti-correlated low performing stock. Even in a less contrived market, we should be able to take advantage when a stock is currently outperforming other stocks especially if this strong performance is anti-correlated with the performance of these other stocks. Our ANTICORw algorithm considers a short market history (consisting of two consecutive “windows”, each of w trading days) so as to model statistical relations between each pair of stocks. Let LX1 = log(xt−2w+1), . . . , log(xt−w)T and LX2 = log(xt−w+1), . . . , log(xt)T , where log(xk) denotes (log(xk(1)), . . . , log(xk(m))). Thus, LX1 and LX2 are the two vector sequences (equivalently, two w × m matrices) constructed by taking the logarithm over the market subsequences corresponding to the time windows [t −2w + 1, t −w] and [t −w + 1, t], respectively. We denote the jth column of LXk by LXk(j). Let µk = (µk(1), . . . , µk(m)), be the vectors of averages of columns of LXk (that is, µk(j) = E{LXk(j)}). Similarly, let σk, be the vector of standard deviations of columns of LXk. The cross-correlation matrix (and its normalization) between column vectors in LX1 and LX2 are defined as: Mcov(i, j) = (LX1(i) −µ1(i))T (LX2(j) −µ2(j)); Mcor(i, j) ½ Mcov(i,j) σ1(i)σ2(j) σ1(i), σ2(j) ̸= 0; 0 otherwise. Mcor(i, j) ∈[−1, 1] measures the correlation between log-relative prices of stock i over the first window and stock j over the second window. For each pair of stocks i and j we compute claimi→j, the extent to which we want to shift our investment from stock i to stock j. Namely, there is such a claim iff µ2(i) > µ2(j) and Mcor(i, j) > 0 in which case claimi→j = Mcor(i, j) + A(i) + A(j) where A(h) = |Mcor(h, h)| if Mcor(h, h) < 0, else 0. Following our interpretation for the success of a CBAL, Mcor(i, j) > 0 is used to predict that stocks i and j will be correlated in consecutive windows (i.e. the current window and the next window based on the evidence for the last two windows) and Mcor(h, h) < 0 predicts that stock h will be anti-correlated with itself over consecutive windows. Finally, bt+1(i) = ˜bt(i) + P j̸=i[transferj→i −transferi→j] where transferi→j = ˜bt(i) · claimi→j/ P j claimi→j and ˜bt is the resulting portfolio just after market closing (on day t). 2 5 10 15 20 25 30 10 0 10 1 10 2 10 5 10 8 NYSE: Anticorw vs. window size Window Size (w) Total Return (log−scale) BAH(Anticorw) Anticorw Best Stock Market Anticorw Best Stock 5 10 15 20 25 30 1 2 4 6 8 10 12 SP500: Anticor vs. window size Window Size (w) Total Return BAH(Anticorw) Anticorw Best Stock Market Return Anticorw Best Stock Figure 1: ANTICORw’s total return (per $1 investment) vs. window size 2 ≤w ≤30 for NYSE (left) and SP500 (right). Our ANTICORw algorithm has one critical parameter, the window size w. In Figure 1 we depict the total return of ANTICORw on two historical datasets as a function of the window size w = 2, . . . , 30. As we might expect, the performance of ANTICORw depends significantly on the window size. However, for all w, ANTICORw beats the uniform market and, moreover, it beats the best stock using most window sizes. Of course, in online trading we cannot choose w in hindsight. Viewing the ANTICORw algorithms as experts, we can try to learn the best expert. But the windows, like individual stocks, induce a rather volatile set of experts and standard expert combination algorithms [13] tend to fail. Alternatively, we can adaptively learn and invest in some weighted average of all ANTICORw algorithms with w less than some maximum W. The simplest case is a uniform investment on all the windows; that is, a uniform buy-and-hold investment on the algorithms ANTICORw, w ∈[2, W], denoted by BAHW (ANTICOR). Figure 2 (left) graphs the total return of BAHW (ANTICOR) as a function of W for all values of 2 ≤W ≤50 with respect to the NYSE dataset (see details below). Similar graphs for the other datasets we consider appear qualitatively the same and the choice W = 30 is clearly not optimal. However, for all W ≥3, BAHW (ANTICOR) beats the best stock in all our experiments. 5 10 15 20 25 30 35 40 45 50 10 0 10 1 10 2 10 3 10 4 10 5 10 6 10 7 NYSE: Total Return vs. Max Window Maximal Window size (W) Total Return (log−scale) BAHW(Anticor) Best Stock MArket BAHW(Anticor) Best Stock 5 10 15 20 25 0.4 0.5 0.6 0.7 0.8 0.9 1 1.1 Days Total Return Stocks 5 10 15 20 25 1 1.2 1.4 1.6 1.8 2 2.2 Days Anticor1 5 10 15 20 25 1.6 1.8 2 2.2 2.4 2.6 2.8 Days Anticor2 DJIA: Dec 14, 2002 − Jan 14, 2003 Figure 2: Left: BAHW (ANTICOR)’s total return (per $1 investment) as a function of the maximal window W. Right: Cumulative returns for last month of the DJIA dataset: stocks (left panel); ANTICORw algorithms trading the stocks (denoted ANTICOR1, middle panel); ANTICORw algorithms trading the ANTICOR algorithms (right panel). Since we now consider the various algorithms as stocks (whose prices are determined by the cumulative returns of the algorithms), we are back to our original portfolio selection problem and if the ANTICOR algorithm performs well on stocks it may also perform well on algorithms. We thus consider active investment in the various ANTICORw algorithms using ANTICOR. We again consider all windows w ≤W. Of course, we can continue to compound the algorithm any number of times. Here we compound twice and then use a buy-and-hold investment. The resulting algorithm is denoted BAHW (ANTICOR(ANTICOR)). One impact of this compounding, depicted in Figure 2 (right), is to smooth out the anti-correlations exhibited in the stocks. It is evident that after compounding twice the returns become almost completely correlated thus diminishing the possibility that additional compounding will substantially help.5 This idea for eliminating critical parameters may be applicable in other learning applications. The challenge is to understand the conditions and applications in which the process of compounding algorithms will have this smoothing effect! 4 Experimental Results We present an experimental study of the the ANTICOR algorithm and the three online learning algorithms described in Sec. 2. We focus on BAH30(ANTICOR), abbreviated by ANTI1 and BAH30(ANTICOR(ANTICOR)), abbreviated by ANTI2. Four historical datasets are used. The first NYSE dataset, is the one used in [3, 2, 8, 14]. This dataset contains 5651 daily prices for 36 stocks in the New York Stock Exchange (NYSE) for the twenty two year period July 3rd, 1962 to Dec 31st, 1984. The second TSE dataset consists of 88 stocks from the Toronto Stock Exchange (TSE), for the five year period Jan 4th, 1994 to Dec 31st, 1998. The third dataset consists of the 25 stocks from SP500 which (as of Apr. 2003) had the largest market capitalization. This set spans 1276 trading days for the period Jan 2nd, 1998 to Jan 31st, 2003. The fourth dataset consists of the thirty stocks composing the Dow Jones Industrial Average (DJIA) for the two year period (507 days) from Jan 14th, 2001 to Jan 14th, 2003.6 These four datasets are quite different in nature (the market returns for these datasets appear in the first row of Table 1). While every stock in the NYSE increased in value, 32 of the 88 stocks in the TSE lost money, 7 of the 25 stocks in the SP500 lost money and 25 of the 30 stocks in the “negative market” DJIA lost money. All these sets include only highly liquid stocks with huge market capitalizations. In order to maximize the utility of these datasets and yet present rather different markets, we also ran each market in reverse. This is simply done by reversing the order and inverting the relative prices. The reverse datasets are denoted by a ‘-1’ superscript. Some of the reverse markets are particularly challenging. For example, all of the NYSE−1 stocks are going down. Note that the forward and reverse markets (i.e. U-BAH) for the TSE are both increasing but that the TSE−1 is also a challenging market since so many stocks (56 of 88) are declining. Table 1 reports on the total returns of the various algorithms for all eight datasets. We see that prediction algorithms such as LZ can do quite well but the more aggressive ANTI1 and ANTI2 have excellent and sometimes fantastic returns. Note that these active strategies beat the best stock and even CBAL∗in all markets with the exception of the TSE−1 in which they still significantly outperform the market. The reader may well be distrustful of what appears to be such unbelievable returns for ANTI1 and ANTI2 especially when applied to the NYSE dataset. However, recall that the NYSE dataset consists of n = 5651 trading days and the y such that yn = the total NYSE return is approximately 1.0029511 for ANTI1 (respectively, 1.0074539 for ANTI2); that is, the average daily increase is less than .3% 5This smoothing effect also allows for the use of simple prediction algorithms such as “expert advice” algorithms [13], which can now better predict a good window size. We have not explored this direction. 6The four datasets, including their sources and individual stock compositions can be downloaded from http://www.cs.technion.ac.il/∼rani/portfolios. (respectively, .75%). Thus a transaction cost of 1% can present a significant challenge to such active trading strategies (see also Sec. 5). We observe that UNIVERSAL and EG have no substantial advantage over U-CBAL. Some previous expositions of these algorithms highlighted particular combinations of stocks where the returns significantly outperformed UNIVERSAL and the best stock. But the same can be said for U-CBAL. Algorithm NYSE TSE SP500 DJIA NYSE−1 TSE−1 SP500−1 DJIA−1 MARKET (U-BAH) 14.49 1.61 1.34 0.76 0.11 1.67 0.87 1.43 BEST STOCK 54.14 6.27 3.77 1.18 0.32 37.64 1.65 2.77 CBAL∗ 250.59 6.77 4.06 1.23 2.86 58.61 1.91 2.97 U-CBAL 27.07 1.59 1.64 0.81 0.22 1.18 1.09 1.53 ANTI1 17,059,811.56 26.77 5.56 1.59 246.22 7.12 6.61 3.67 ANTI2 238,820,058.10 39.07 5.88 2.28 1383.78 7.27 9.69 4.60 LZ 79.78 1.32 1.67 0.89 5.41 4.80 1.20 1.83 EG 27.08 1.59 1.64 0.81 0.22 1.19 1.09 1.53 UNIVERSAL 26.99 1.59 1.62 0.80 0.22 1.19 1.07 1.53 Table 1: Monetary returns in dollars (per $1 investment) of various algorithms for four different datasets and their reversed versions. The winner and runner-up for each market appear in boldface. All figures are truncated to two decimals. 5 Concluding Remarks When handling a portfolio of m stocks our algorithm may perform up to m transactions per day. A major concern is therefore the commissions it will incur. Within the proportional commission model (see e.g. [14] and [15], Sec. 14.5.4) there exists a fraction γ ∈(0, 1) such that an investor pays at a rate of γ/2 for each buy and for each sell. Therefore, the return of a sequence b1, . . . , bn of portfolios with respect to a market sequence x1, . . . , xn is Q t ³ bt · xt(1 −P j γ 2 |bt(j) −˜bt(j)|) ´ , where ˜bt = 1 bt·xt (bt(1)xt(1), . . . , bt(m)xt(m)). Our investment algorithm in its simplest form can tolerate very small proportional commission rates and still beat the best stock.7 We note that Blum and Kalai [14] showed that the performance guarantee of UNIVERSAL still holds (and gracefully degrades) in the case of proportional commissions. Many current online brokers only charge a small per share commission rate. A related problem that one must face when actually trading is the difference between bid and ask prices. These bid-ask spreads (and the availability of stocks for both buying and selling) are typically functions of stock liquidity and are typically smaller for large market capitalization stocks. We consider here only very large market cap stocks. As a final caveat, we note that we assume that any one portfolio selection algorithm has no impact on the market! But just like any goose laying golden eggs, widespread use will soon lead to the end of the goose; that is, the market will quickly react. Any report of abnormal returns using historical markets should be suspected of “data snooping”. In particular, when a dataset is excessively mined by testing many strategies there is a substantial chance that one of the strategies will be successful by simple overfitting. Another data snooping hazard is stock selection. For example, the 36 stocks selected for the NYSE dataset were all known to have survived for 22 years. Our ANTICOR algorithms were fully developed using only the NYSE and TSE datasets. The DJIA and SP500 sets were obtained (from public domain sources) after the algorithms were fixed. Finally, our algorithm has one parameter (the maximal window size W). Our experiments indicate that the algorithm’s performance is robust with respect to W (see Figure 2). 7For example, with γ = 0.1% we can typically beat the best stock. These results will be presented in the full paper. A number of well-respected works report on statistically robust “abnormal” returns for simple “technical analysis” heuristics, which slightly beat the market. For example, the landmark study of Brock et al. [16] apply 26 simple trading heuristics to the DJIA index from 1897 to 1986 and provide strong support for technical analysis heuristics. While consistently beating the market is considered a great (if not impossible) challenge, our approach to portfolio selection indicates that beating the best stock is an achievable goal. What is missing at this point of time is an analytical model which better explains why our active trading strategies are so successful. In this regard, we are investigating various “statistical adversary” models along the lines suggested by [17, 18]. Namely, we would like to show that an algorithm performs well (relative to some benchmark) for any market sequence that satisfies certain constraints on its empirical statistics. References [1] G. Lugosi. Lectures on prediction of individual sequences. URL:http://www.econ.upf.es/∼lugosi/ihp.ps, 2001. [2] T.M. Cover and E. Ordentlich. Universal portfolios with side information. IEEE Transactions on Information Theory, 42(2):348–363, 1996. [3] T.M. Cover. Universal portfolios. Mathematical Finance, 1:1–29, 1991. [4] H. Markowitz. Portfolio Selection: Efficient Diversification of Investments. John Wiley and Sons, 1959. [5] T.M. Cover and D.H. Gluss. Empirical bayes stock market portfolios. Advances in Applied Mathematics, 7:170–181, 1986. [6] T.M. Cover and J.A. Thomas. Elements of Information Theory. John Wiley & Sons, Inc., 1991. [7] A. Lo and C. MacKinlay. A Non-Random Walk Down Wall Street. Princeton University Press, 1999. [8] D.P. Helmbold, R.E. Schapire, Y. Singer, and M.K. Warmuth. Portfolio selection using multiplicative updates. Mathematical Finance, 8(4):325–347, 1998. [9] J. Ziv and A. Lempel. Compression of individual sequences via variable rate coding. IEEE Transactions on Information Theory, 24:530–536, 1978. [10] G.G. Langdon. A note on the lempel-ziv model for compressing individual sequences. IEEE Transactions on Information Theory, 29:284–287, 1983. [11] M. Feder. Gambling using a finite state machine. IEEE Transactions on Information Theory, 37:1459–1465, 1991. [12] J. Rissanen. A universal data compression system. IEEE Transactions on Information Theory, 29:656–664, 1983. [13] N. Cesa-Bianchi, Y. Freund, D. Haussler, D.P. Helmbold, R.E. Schapire, and M.K. Warmuth. How to use expert advice. Journal of the ACM, 44(3):427–485, May 1997. [14] A. Blum and A. Kalai. Universal portfolios with and without transaction costs. Machine Learning, 30(1):23–30, 1998. [15] A. Borodin and R. El-Yaniv. Online Computation and Competitive Analysis. Cambridge University Press, 1998. [16] L. Brock, J. Lakonishok, and B. LeBaron. Simple technical trading rules and the stochastic properties of stock returns. Journal of Finance, 47:1731–1764, 1992. [17] P. Raghavan. A statistical adversary for on-line algorithms. DIMACS Series in Discrete Mathematics and Theoretical Computer Science, 7:79–83, 1992. [18] A. Chou, J.R. Cooperstock, R. El-Yaniv, M. Klugerman, and T. Leighton. The statistical adversary allows optimal money-making trading strategies. In Proceedings of the 6th Annual ACM-SIAM Symposium on Discrete Algorithms, 1995.
2003
116
2,328
An MCMC-Based Method of Comparing Connectionist Models in Cognitive Science Woojae Kim, Daniel J. Navarro∗, Mark A. Pitt, In Jae Myung Department of Psychology Ohio State University fkim.1124, navarro.20, pitt.2, myung.1g@osu.edu Abstract Despite the popularity of connectionist models in cognitive science, their performance can often be difficult to evaluate. Inspired by the geometric approach to statistical model selection, we introduce a conceptually similar method to examine the global behavior of a connectionist model, by counting the number and types of response patterns it can simulate. The Markov Chain Monte Carlo-based algorithm that we constructed Þnds these patterns efficiently. We demonstrate the approach using two localist network models of speech perception. 1 Introduction Connectionist models are popular in some areas of cognitive science, especially language processing. One reason for this is that they provide a means of expressing the fundamental principles of a theory in a readily testable computational form. For example, levels of mental representation can be mapped onto layers of nodes in a connectionist network. Information ßow between levels is then deÞned by the types of connection (e.g., excitatory and inhibitory) between layers. The soundness of the theoretical assumptions are then evaluated by studying the behavior of the network in simulations and testing its predictions experimentally. Although this sort of modeling has enriched our understanding of human cognition, the consequences of the choices made in the design of a model can be difficult to evaluate. While good simulation performance is assumed to support the model and its underlying principles, a drawback of this testing methodology is that it can obscure the role played by a model’s complexity and other reasons why a competing model might simulate human data equally well. These concerns are part and parcel of the well-known problem of model selection. A great deal of progress has been made in solving it for statistical models (i.e., those that can be described by a family of probability distributions [1, 2]). Connectionist ∗Correspondence should be addressed to Daniel Navarro, Department of Psychology, Ohio State University, 1827 Neil Avenue Mall, Columbus OH 43210, USA. Telephone: (614) 292-1030, Facsimile: (614) 292-5601. models, however, are a computationally different beast. The current paper introduces a technique that can be used to assist in evaluating and choosing between connectionist models of cognition. 2 A Complexity Measure for Connectionist Models The ability of a connectionist model to simulate human performance well does not provide conclusive evidence that the network architecture is a good approximation to the human cognitive system that generated the data. For instance, it would be unimpressive if it turned out that the model could also simulate many non-humanlike patterns. Accordingly, we need a “global” view of the model’s behavior to discover all of the qualitatively different patterns it can simulate. A model’s ability to reproduce diverse patterns of data is known as its complexity, an intrinsic property of a model that arises from the interaction between its parameters and functional form. For statistical models, it can be calculated by integrating the determinant of the Fisher information matrix over the parameter space of the model, and adding a term that is linear in the number of parameters. Although originally derived by Rissanen [1] from an algorithmic coding perspective, this measure is sometimes called the geometric complexity, because it is equal to the logarithm of the ratio of two Riemannian volumes. Viewed from this geometric perspective, the measure has an elegant interpretation as a count of the number of “distinguishable” distributions that a model can generate [3, 4]. Unfortunately, geometric complexity cannot be applied to connectionist models, because these models rarely possess a likelihood function, much less a well-deÞned Fisher information matrix. Also, in many cases a learning (i.e., model-Þtting) algorithm for Þnding optimal parameter values is not proposed along with the model, further complicating matters. A conceptually simple solution to the problem, albeit a computationally demanding one, is Þrst to discretize the data space in some properly deÞned sense and then to identify all of the data patterns a connectionist model can generate. This approach provides the desired global view of the model’s capabilities and its deÞnition resembles that of geometric complexity: the complexity of a connectionist model is deÞned in terms of the number of discrete data patterns the model can produce. As such, this reparametrization-invariant complexity measure can be used for virtually all types of network models provided that the discretization of the data space is both justiÞable and meaningful. A challenge in implementing this solution lies in the enormity of the data space, which may contain a truly astronomical number of patterns. Only a small fraction of these might correspond to a model’s predictions, so it is essential to use an efficient search algorithm, one that will Þnd most or all of these patterns in a reasonable time. We describe an algorithm that uses Markov Chain Monte Carlo (MCMC) to solve such problems. It is tailored to exploit the kinds of search spaces that we suspect are typical of localist connectionist models, and we evaluate its performance on two of them. 3 Localist Models of Phoneme Perception A central issue in the Þeld of human speech perception is how lexical knowledge inßuences the perception of speech sounds. That is, how does knowing the word you are hearing inßuence how you hear the smaller units that make up the word (i.e., its phonemes)? Two localist models have been proposed that represent opposing theoretical positions. Both models were motivated by different theoretical prinPhoneme Layer Lexical Layer Phoneme Input Phoneme Decision Lexical Layer Figure 1: Network architectures for trace (left) and merge (right). Arrows indicate excitatory connections between layers; lines with dots indicate inhibitory connections within layers. ciples. Proponents of trace [5] argue for bi-directional communication between layers whereas proponents of merge [6] argue against it. The models are shown schematically in Figure 1. Each contains two main layers. Phonemes are represented in the Þrst layer and words in the second. Activation ßows from the Þrst to the second layer in both models. At the heart of the controversy is whether activation also ßows in the reverse direction, directly affecting how the phonemic input is processed. In trace it can. In merge it cannot. Instead, the processing performed at the phoneme level in merge is split in two, with an input stage and a phoneme decision stage. The second, lexical layer cannot directly affect phoneme activation. Instead, the two sources of information (phonemic and lexical) are integrated only at the phoneme decision stage. Although the precise details of the models are unnecessary for the purposes of this paper , it will be useful to sketch a few of their technical details. The parameters for the models (denoted θ), of which trace has 7 and merge has 11, correspond to the strength of the excitatory and inhibitory connections between nodes, both within and between layers. The networks receive a continuous input, and stabilize at a Þnal state after a certain number of cycles. In our formulation, a parameter set θ was considered valid only if the Þnal state satisÞed certain decision criteria (discussed shortly). Detailed descriptions of the models, including typical parameter values, are given by [5] and [6]. Despite the differences in motivation, trace and merge are comparable in their ability to simulate key experimental Þndings [6], making it quite challenging if not impossible to distinguish between then experimentally. Yet surely the models are not identical? Is one more complex than the other? What are the functional differences between the two? In order to address these questions, we consider data from experiments by [6] which are captured well by both models. In the experiments, monosyllabic words were presented in which the last phoneme from one word was partially replaced by one from another word (through digital editing) to create word blends that retained residual information about the identity of the phoneme from both words. The six types of blends are listed on the left of Table 1. Listeners had to categorize the last phoneme in one task (phoneme decision) and categorize the entire utterance as a word or a nonsense word in the other task (lexical decision). The response choices in each task are listed in the table. Three responses choices were used in lexical decision to test the models’ ability to distinguish between words, not just words and nonwords. The asterisks in each cell indicate the responses that listeners chose most often. Both trace and merge can simulate this pattern of responses. Table 1: The experimental design. Asterisks denote human responses. Condition Name Example Phonemic Decision Lexical Decision /b/ /g/ /z/ /v/ job jog nonword bB JOb + joB * * gB JOg + joB * * vB JOv + joB * * zZ JOz + joZ * * gZ JOg + joZ * * vZ JOv + joZ * * Table 2: Two sets of decision rules for trace and merge. The values shown correspond to activation levels of the appropriate decision node. Phoneme Decision Lexical Decision Constraint Choose /b/ if. . . Choose "job" if. . . Choose “nonword” if. . . Weak /b/> 0.4 & others < 0.4 job > 0.4 & jog < 0.4 both < 0.4 Strong /b/> 0.45 & others < 0.25 job > 0.45 & jog < 0.25 both < 0.25 (/b/ −max(others)) > 0.3 (job −jog) > 0.3 abs(difference) < 0.15 The proÞle of responses decisions (phoneme and lexical) over the six experimental conditions provides a natural deÞnition of a data pattern that the model could produce, and the decision rules establish a natural (surjective) mapping from the continuous space of network states (of which each model can produce some subset) to the discrete space of data patterns. We applied two different sets of decision rules, listed in Table 2, and were interested in determining how many patterns (besides the human-like pattern) each model can generate. As previously discussed, these counts will serve as a measure of model complexity. 4 The Search Algorithm The search problem that we need to solve differs from the standard Monte Carlo counting problem. Ordinarily, Monte Carlo methods are used to discover how much of the search space is covered by some region by counting how often co-ordinates are sampled from that region. In our problem, a high-dimensional parameter space has been partitioned into an unknown number of regions, with each region corresponding to a single data pattern. The task is to Þnd all such regions irrespective of their size. How do we solve this problem? Given the dimensionality of the space, brute force searches are impossible. Simple Monte Carlo (SMC; i.e., uniform random sampling) will fail because it ignores the structure of the search space. The spaces that we consider seem to possess three regularities, which we call a “grainy” structure, illustrated schematically in Figure 2. Firstly, on many occasions the network does not converge on a state that meets the decision criteria, so some proportion of the parameter space does not correspond to any data pattern. Secondly, the size of the regions vary a great deal. Some data patterns are elicited by a wide range of parameter values, whereas others can be produced only by a small range of values. Thirdly, small regions tend to cluster together. In these models, there are likely to be regions where the model consistently chooses the dominant phoneme and makes the correspondingly appropriate lexical decision. However, there will also be large regions in which the models always choose “nonword” irFigure 2: A parameter space with “grainy” structure. Each region corresponds to a single data pattern that the model can generate. Regions vary in size, and small regions cluster together. respective of whether the stimulus is a word. Along the borders between regions, however, there might be lots of smaller “transition regions”, and these regions will tend to be near one another. The consequence of this structure is that the size of the region in which the process is currently located provides extensive information about the number of regions that are likely to lie nearby. In a small region, there will probably be other small regions nearby, so a Þne-grained search is required in order to Þnd them. However, a Þne-grained search process will get stuck in a large region, taking tiny steps when great leaps are required. Our algorithm exploits this structure by using MCMC to estimate a different parameter sampling distribution p(θjri) for every region ri that it encounters, and then cycling through these distributions in order to sample parameter sets. The procedure can be reduced to three steps: 1. Set i = 0, m = 0. Sample θ from p(θjr0), a uniform distribution over the space. If θ does not generate a valid data pattern, repeat Step 1. 2. Set m = m + 1 and then i = m. Record the new pattern, and use MCMC to estimate p(θjri). 3. Sample θ from p(θjri). If θ generates a new pattern, return to Step 2. Otherwise, set i = mod(i, m) + 1, and repeat Step 3. The process of estimating p(θjri) is a fairly straightforward application of MCMC [7]. We specify a uniform jumping distribution over a small hypersphere centered on the current point θ in the parameter space, accepting candidate points if and only if they produce the same pattern as θ. After collecting enough samples, we calculate the mean and variance-covariance matrix for these observations, and use this to estimate an ellipsoid around the mean, as an approximation to the i-th region. However, since we want to Þnd points in the bordering regions, the the estimated ellipsoid is deliberately oversized. The sampling distribution p(θjri) is simply a uniform distribution over the ellipsoid. Unlike SMC (or even a more standard application of MCMC), our algorithm has the desirable property that it focuses on each region in equal proportion, irrespective of its size. Not only that, because the parameter space is high dimensional, the vast majority of the distribution p(θjri) will actually lie near the edges of the ellipsoid: that is, the area just outside of the i-th region. Consequently, we search primarily along the edges of the regions that we have already discovered, paying closer attention to the small regions. The overall distribution p(θ) is essentially a mixture distribution that assigns higher density to points known to lie near many regions. 5 Testing the Algorithm In the absence of analytic results, the algorithm was evaluated against standard SMC. The Þrst test applied both to a simple toy problem possessing a grainy structure. Inside a hypercube [0, 1]d, an assortment of large and small regions (also hypercubes) were deÞned using unevenly spaced grids so that all the regions neighbored each other (d ranged from 3 to 6). In higher dimensions (d ¸ 4), SMC did not Þnd all of the regions. In contrast, the MCMC algorithm found all of the regions, and did so in a reasonable amount of time. Overall, the MCMC-based algorithm is slower than SMC at the beginning of the search due to the time required for region estimation. However, the time required to learn the structure of the parameter space is time well spent because the search becomes more efficient and successful, paying large dividends in time and accuracy in the end. As a second test, we applied the algorithms to simpliÞed versions of trace, constructed so that even SMC might work reasonably well. In one reduced model, for instance, only phoneme responses were considered. In the other, only lexical responses were considered. Weak and strong constraints (Table 2) were imposed on both models. In all cases, MCMC found as many or more patterns than SMC, and all SMC patterns were among the MCMC patterns. 6 Application to Models of Phoneme Perception Next we ran the search algorithm on the full versions of trace and merge, using both the strong and weak constraints (Table 2). The number of patterns discovered in each case is summarized in Figure 3. In this experimental design merge is more complex than trace, although the extent of this effect is somewhat dependent on the choice of constraints. When strong constraints are applied trace (27 patterns) is nested within merge (67 patterns), which produces 148% more patterns. However, when these constraints are eased, the nesting relationship disappears, and merge (73 patterns) produces only 40% more patterns than trace (52 patterns). Nevertheless, it is noteworthy that the behavior of each is highly constrained, producing less than 100 of the 46 £ 36 = 2, 985, 984 patterns available. Also, for both models (under both sets of constraints), the vast majority of the parameter space was occupied by only a few patterns. A second question of interest is whether each model’s ouput veers far from human performance (Table 1). To answer this, we classiÞed every data pattern in terms of the number of mismatches from the human-like pattern (from 0 to 12), and counted how frequently the model patterns fell into each class. The results, shown in Figure 4, are quite similar and orderly for both models. The choice of constraints had little effect, and in both cases the trace distribution (open circles) is a little closer to the human-like pattern than the merge distribution (closed circles). Even so, both models are remarkably human-like when considered in light of the distribution of all possible patterns (cross hairs). In fact, the probability is virtually zero that a “random model” (consisting of a random sample of patterns) would display such a low mismatch frequency. Building on this analysis, we looked for qualitative differences in the types of mismatches made by each model. Since the choice of constraints made no difference, Figure 5 shows the mismatch proÞles under weak constraints. Both models produce no mismatches in some conditions (e.g., bB-phoneme identiÞcation, vZ-lexical decision) and many in others (e.g., gB-lexical decision). Interestingly, trace and merge produce similar mismatch proÞles for lexical decision, and a comparable number of mismatches (108 vs. 124). However, striking qualitative differences are evident for Weak Constraints Strong Constraints 40 27 41 32 20 MERGE TRACE MERGE TRACE Figure 3: Venn diagrams showing the number of patterns discovered for both models under both types of constraint. 0 1 2 3 4 5 6 7 8 9 10 11 12 0 0.1 0.2 0.3 0.4 Number of Mismatches Proportion of Patterns Weak TRACE Strong TRACE Weak MERGE Strong MERGE All Patterns Figure 4: Mismatch distributions for all four models plus the data space. The 0-point corresponds to the lone human-like pattern contained in all distributions. phoneme decisions, with merge producing mismatches in conditions that trace does not (e.g., vB, vZ). When the two graphs are compared, an asymmetry is evident in the frequency of mismatches across tasks: merge makes phonemic mismatches with about the same frequency as lexical errors (139 vs. 124), whereas trace does so less than half as often (56 vs. 108). The mismatch asymmetry accords nicely with the architectures shown in Figure 1. The two models make lexical decisions in an almost identical manner: phonemic information feeds into the lexical decision layer, from which a decision is made. It should then come as no surprise that lexical processing in trace and merge is so similar. In contrast, phoneme processing is split between two layers in merge but conÞned to one in trace. The two layers dedicated to phoneme processing provide merge an added degree of ßexibility (i.e., complexity) in generating data patterns. This shows up in many ways, not just in merge’s ability to produce mismatches in more conditions than trace. For example, these mismatches yield a wider range of phoneme responses. Shown above each bar in Figure 5 is the phoneme that was misrecognized in the given condition. trace only misrecogized the phoneme as /g/ whereas merge misrecognized it as /g/, /z/, and /v/. These analyses describe a few consequences of dividing processing between two layers, as in merge, and in doing so creating a more complex model. On the basis of performance (i.e., Þt) alone, this additional complexity is unnecessary for modeling phoneme perception because the simpler architecture of trace simulates human data as well as merge. If merge’s design is to be preferred, the additional complexity must be justifed for other reasons [6]. bB gB vB zZ gZ vZ bB gB vB zZ gZ vZ 0 5 10 15 20 25 30 35 40 45 50 55 TRACE Number of Mismatches /g/ /g/ nw jog nw nw jog phoneme lexical bB gB vB zZ gZ vZ bB gB vB zZ gZ vZ 0 5 10 15 20 25 30 35 40 45 50 55 MERGE Number of Mismatches /g/ /z/ /g/ /v/ nw jog nw nw jog phoneme lexical Figure 5: Mismatch proÞles for both trace and merge when the weak constraints are applied. Conditions are denoted by their phoneme blend. 7 Conclusions The results of this preliminary evaluation suggest that the MCMC-based algorithm is a promising method for comparing connectionist models. Although it was developed to compare localist models like trace and merge, it may be broadly applicable whenever the search space exhibits this “grainy” structure. Indeed, the algorithm could be a general tool for designing, comparing, and evaluating connectionist models of human cognition. Plans are underway to extend the approach to other experimental designs, dependent measures (e.g., reaction time), and models. Acknowledgements The authors were supported by NIH grant R01-MH57472 awarded to IJM and MAP. DJN was also supported by a grant from the Office of Research at OSU. We thank Nancy Briggs, Cheongtag Kim and Yong Su for helpful discussions. References [1] Rissanen, J. (1996). Fisher information and stochastic complexity. IEEE Transactions on Information Theory 42, 40-47. [2] Rissanen, J. (2001). Strong optimality of the normalized ML models as universal codes and information in data. IEEE Transactions on Information Theory 47, 1712-1717. [3] Balasubramanian, V. (1997). Statistical inference, Occam’s razor and statistical mechanics on the space of probability distributions. Neural Computation, 9, 349-368. [4] Myung, I. J., Balasubramanian, V., & Pitt, M. A. (2000). Counting probability distributions: Differential geometry and model selection. Proceedings of the National Academy of Sciences USA, 97, 11170-11175. [5] McClelland, J. L. & Elman, J. L. (1986). The TRACE model of speech perception. Cognitive Psychology, 18, 1-86. [6] Norris, D., McQueen, J. M. & Cutler, A. (2000). Merging phonetic and lexical information in phonetic decision-making. Behavioral & Brain Sciences, 23, 299-325. [7] Gilks, W. R. , Richardson, S., & Spiegelhalter, D. J. (1995). Markov Chain Monte Carlo in Practice. London: Chapman and Hall.
2003
117
2,329
Dynamical Modeling with Kernels for Nonlinear Time Series Prediction Liva Ralaivola Laboratoire d’Informatique de Paris 6 Universit´e Pierre et Marie Curie 8, rue du capitaine Scott F-75015 Paris, FRANCE liva.ralaivola@lip6.fr Florence d’Alch´e–Buc Laboratoire d’Informatique de Paris 6 Universit´e Pierre et Marie Curie 8, rue du capitaine Scott F-75015 Paris, FRANCE florence.dalche@lip6.fr Abstract We consider the question of predicting nonlinear time series. Kernel Dynamical Modeling (KDM), a new method based on kernels, is proposed as an extension to linear dynamical models. The kernel trick is used twice: first, to learn the parameters of the model, and second, to compute preimages of the time series predicted in the feature space by means of Support Vector Regression. Our model shows strong connection with the classic Kalman Filter model, with the kernel feature space as hidden state space. Kernel Dynamical Modeling is tested against two benchmark time series and achieves high quality predictions. 1 Introduction Prediction, smoothing and filtering are traditional tasks applied to time series. The machine learning community has recently paid a lot of attention to these problems and especially to nonlinear time series prediction in various areas such as biological signals, speech or financial markets. To cope with non linearities, extensions of the Kalman filter [5, 4] have been proposed for filtering and smoothing while recurrent artificial neural networks [2] and support vector regressors [7, 8] have been developed for prediction purposes. In this paper, we focus on prediction tasks and introduce a powerful method based on the kernel trick [1], which has been successfully used in tasks ranging from classification and regression to data analysis (see [13, 15] for details). Time series modeling is addressed by extending the framework of observable linear dynamical systems [12] to the feature space defined by a kernel. The predictions are realized in the feature space and are then transformed to obtain the corresponding preimages in the input space. While the proposed model could be used for smoothing as well as filtering, we here focus on the prediction task. A link to the Kalman filter can be drawn by noticing that given the efficiency of our model for the prediction task it can be used as a hidden transition process in the Kalman filter setting. The paper is organized as follows. In the next section, we describe how the modeling of a time series can take place in the feature space and explain how to solve the preimage problem by a learning strategy. In the third section, we present prediction results achieved by our model In the fourth section, the estimation algorithm is discussed and its link to the Kalman filter is highlighted. We finally conclude by giving some perspectives to our work. 2 Principles of Dynamical Modeling with Kernels 2.1 Basic Formulation The problem we address is that of modeling d-dimensional nonlinear real-valued time series defined as xt+1 = h(xt) + u (1) from an observed sequence x1:T = {x1, . . . , xT } produced by this model, where h is a (possibly unknown) nonlinear function and u a noise vector. Modeling such a series can be done with the help of recurrent neural networks [2] or support vector machines [7]. In this work, we instead propose to deal with this problem by extending linear dynamical modeling thanks to the kernel trick. Instead of considering the observation sequence x1:T = {x1, . . . , xT }, we consider the sequence xφ 1:T = {φ(x1), . . . , φ(xT )}, where φ is a mapping from Rd to H and k its associated kernel function [15] such that k(v1, v2) = ⟨φ(v1), φ(v2)⟩∀v1, v2 ∈Rd, ⟨·, ·⟩being the inner product of H. The Kernel Dynamical Model (KDM) obtained can be written as: xφ t+1 = Aφxφ t + µφ + νφ (2) where Aφ is the process transition matrix, µφ an offset vector, νφ ∈H a gaussian isotropic noise of magnitude σ2 and xφ t stands for φ(xt). We are going to show that it is possible to apply the maximum likelihood principle to identify σ2, Aφ and µφ and come back to the input space thanks to preimages determination. 2.2 Estimation of the Model Parameters Learning the parameters of the model (2) by maximum likelihood given an observation sequence xφ 1:T merely consists in optimizing the associated log-likelihood Lφ(xφ 1:T , θφ)1: Lφ(xφ 1:T ; θφ) = ln P(xφ 1) T Y t=2 P(xφ t |xφ t−1) ! = g(µφ 1, Σφ 1) − 1 2σ2 T X t=2 ∥xφ t −Aφxφ t−1 −µφ∥2 −1 2p(T −1) ln σ2 where p is the dimension of H, g(µφ 1, Σφ 1) is a function straightforward to compute which we let aside as it does not add any complexity in setting the gradient of Lφ to 0. Indeed, performing this task leads to the equations: Aφ = T X t=2 xφ t xφ t−1 ′ − 1 T −1 T X t=2 xφ t T X t=2 xφ t−1 ′ ! (3) T X t=2 xφ t−1xφ t−1 ′ − 1 T −1 T X t=2 xφ t−1 T X t=2 xφ t−1 ′ !−1 µφ = 1 T −1 T X t=2 “ xφ t −Aφxφ t−1 ” (4) σ2 = 1 p(T −1) T X t=2 ∥xφ t −Aφxφ t−1 −µφ∥2 (5) 1θφ := {Aφ, µφ, σ2, µφ 1, Σφ 1}, and µφ 1 and Σφ 1 are the parameters of the gaussian vector xφ 1. which require to address two problems: inverting a matrix which could be of infinite dimension (e.g., if a gaussian kernel is used) and/or singular (equation (3)) and making a division by the dimension of the feature space (p in equation (5)). A general solution to circumvent these problems is to introduce an orthonormal basis U = {uφ 1, . . . , uφ m} for the subspace Hx of H spanned by xφ 1:T . For instance, U can be obtained by computing the set of principal components with non-zero eigenvalues of xφ 1:T following the procedure proposed in [6]. Once such a set of vectors is available, trying to find good parameters for the model (2) is equivalent to finding an m-dimensional linear dynamical model for the sequence z1:T = {z1, . . . , zT } where zt is the vector of coordinates of xφ t with respect to U, i.e.: zt = h ⟨xφ t , uφ 1⟩⟨xφ t , uφ 2⟩· · · ⟨xφ t , uφ m⟩ i′ ∀t = 1, . . . , T. (6) Given z1:T , the following linear dynamical model has to be considered: zt+1 = Azzt + µz + νz (7) where νz is again a gaussian noise vector of variance σ2. Determining a basis of Hx allows to learn the linear dynamical model (7). As it is based on the coordinates of the observed vectors xφ 1, . . . , xφ T with respect to the basis, it is equivalent to learning (2). The parameters are estimated thanks to equations (3), (4) and (5) where xφ t is replaced with zt and p with m. For the sake of generalization ability, it might be useful to choose Az as simple as possible [15]. To do this, we put a penalization on matrices Az having large values, by imposing a prior distribution pA on Az defined as: pA(Az) ∝exp(−γ 2 trace (A′ zAz)), γ > 0. The computation of the maximum a posteriori values for A, µ and σ2 is very similar to (3), (4) and (5) except that a few iterations of gradient ascent have to be done. 2.3 Back to the Input Space: the Preimage Problem The problem Predicting the future observations with model (7) gives vectors in the feature space H while vectors from the input space Rd are needed. Given a vector zφ in H, finding a good vector x in Rd such that φ(x) is as close as possible to zφ is known as the preimage problem. Mika et al. [6] propose to tackle this problem considering the optimization problem: min x ∥φ(x) −zφ∥2. This problem can be solved efficiently by gradient descent techniques for gaussian kernels. Nevertheless, it may require several optimization phases with different starting points to be ran when other kernels are used (e.g. polynomial kernels of some particular degree). Here, we propose to use Support Vector Regression (SVR) to solve the preimage problem. This avoids any local minimum problem and allows to benefit from the fact that we have to work with vectors from the inner product space H. In addition, using this strategy, there is no need to solve an optimization problem each time a preimage has to be computed. SVR and Preimages Learning Given a sample dataset S = {(z1, y1), . . . , (zℓ, yℓ)} with pairs in Z × R, the SVR algorithm assumes a structure on Z given by a kernel kz and its associated mapping φ and feature space H (see [15]). It proceeds as follows (see [14] and [15] for further details). Given a real positive value ε, the algorithm determines a function f such that (a) it maps each zi to a value not having deviation larger than ε from yi, and (b) it is as flat as possible. This function computes its output as f(z) = Pℓ i=1(α∗ i −αi)kz(zi, z) + b where the vectors α∗and α are the solutions of the problem max α∗,α −ε′(α∗+ α) + y′(α∗−α) −1 2((α∗−α)KZ(α∗−α) + 1 C (α∗′α∗+ α′α)) s.t.  1′(α∗−α) = 0 α∗≥0, α ≥0 The vectors involved in this program are of dimension ℓ, with 1 = [1 · · · 1]′, 0 = [0 · · · 0]′, ε = [ε · · · ε]′, y = [y1 · · · yℓ]′ and KZ is the Gram matrix KZij = kz(zi, zj). Here, ε is the parameter of the Vapnik’s ε-insensitive quadratic loss function and C is a user-defined constant penalizing data points which fail to meet the ε-deviation constraint. In our case, we are interested in learning the mapping from Hx to Rd. In order to learn this mapping, we construct d (the dimension of input space) SVR machines f1, . . . , fd. Each fi is trained to estimate the ith coordinate of the vector xt given the coordinates vector zt of xt with respect to U. Denoting by zu the function which maps a vector x to its coordinate vector z in U, the d machines provide the mapping ψ: ψ : Hx → Rd x 7→ [f1(zu(x)) · · · fd(zu(x))]′ (8) which can be used to estimate the preimages. Using ψ, and noting that the program involved by the SVR algorithm is convex, the estimation of the preimages does not have to deal with any problem of local minima. 3 Numerical Results In this section we present experiments on highly nonlinear time series prediction with Kernel Dynamical Modeling. As the two series we consider are one dimensional we use the following setup. Each series of length T is referred to as x1:T . In order to model it, we introduce an embedding dimension d and a step size κ such that vectors xt = (xt, xt−κ, . . . , xt−(d−1)κ)′ are considered. We compare the perfomances of KDM to the performances achieved by an SVR for nonlinear time series analysis [7, 8], where the mapping associating xt to xt+κ is learned. The hyperparameters (kernel parameter and SVR penalization constant C) are computed with respect to the one-step prediction error measured on a test set, while the value of ε is set to 1e-4. Prediction quality is assessed on an independent validation sequence on which root mean squared error (RMSE) is computed. Two kinds of prediction capacity are evaluated. The first one is a one-step prediction when after a prediction has been made, the true value is used to estimate the next time series output. The second one is a multi-step or trajectory prediction, where the prediction made by a model serves as a basis for the future predictions. In order to make a prediction for a time t > T, we suppose that we are provided with the vector xt−1, which may have been observed or computed. We determine the coordinates zt−1 of xφ t−1 with respect to U and infer the value of zt by zt = Azzt−1 + µz (see equation (7)); ψ is then used to recover an estimation of xt+1 (cf. equation (8)). In all our experiments we have made the crude –yet efficient– choice of the linear kernel for kz. 0.4 0.5 0.6 0.7 0.8 0.9 1 1.1 1.2 1.3 0 20 40 60 80 100 0 50 100 150 200 250 0 50 100 150 200 250 300 350 Figure 1: (left) 100 points of the Mackey-Glass time series MG17, (right) the first 350 points of the Laser time series. Table 1: Error (RMSE) of one-step and trajectory predictions for gaussian and polynomial kernels for the time series MG17. The regularizing values used for KDM are in subscript. The best results are italicized. Gaussian Polynomial Algo. 1S 100S 1S 100S SVR 0.0812 0.2361 0.1156 KDM0 0.0864 0.2906 0.1112 0.2975 KDM0.1 0.0863 0.2893 0.1112 0.2775 KDM1 0.0859 0.2871 0.1117 0.2956 KDM10 0.0844 0.2140 0.1203 0.1964 KDM100 0.0899 0.1733 0.0970 0.1744 3.1 Mackey-Glass Time Series Prediction The Mackey-Glass time series comes from the modeling of blood cells production evolution. It is a one-dimensional signal determined by dx(t) dt = −0.1x(t) + 0.2x(t −τ) 1 + x(t −τ)10 which, for values of τ greater than 16.8, shows some highly nonlinear chaotic behavior (see Figure 1 left). We focus on MG17, for which τ = 17, and construct embedding vectors of size d = 6 and step size κ = 6. As xt is used to predict xt+κ, the whole dataset can be divided into six “independent” datasets, the first one S1 containing x1+(d−1)κ, the second one S2, x2+(d−1)κ, ..., and the sixth one S6, xdκ. Learning is done as follows. The first 100 points of S1 are used to learning, while the first 100 points of S2 serve to choose the hyperparameters. The prediction error is measured with respect to the points in the range 201 to 300 of S1. Table 1 reports the RMSE error obtained with gaussian and polynomial kernels, where 1S and 100S respectively stand for one-step prediction and multi-step prediction over the 100 future observations. SVR one-step prediction with gaussian kernel gives the best RMSE. None of the tested regularizers allows KDM to perform better, even if the prediction error obtained with them is never more than 10% away from SVR error. Table 2: Error (RMSE) of one-step and trajectory predictions for gaussian and polynomial kernels for the time series Laser. The regularizing values used for KDM are in subscript. Gaussian Polynomial Algo. 1S 100S 1S 100S SVR 15.81 67.57 18.14 66.73 KDM0 67.95 416.2 43.92 68.90 KDM0.1 16.59 69.65 22.37 69.60 KDM1 13.96 70.16 18.13 70.65 KDM10 15.18 66.82 17.39 69.43 KDM100 18.65 56.53 17.61 53.84 KDM trajectory prediction with gaussian kernel and regularizer γ = 100 leads to the best error. It is around 17% lower than that of SVR multi-step prediction while KDM with no regularizer gives the poorest prediction, emphasizing the importance of the regularizer. Regarding one-step prediction with polynomial kernel, there is no significant difference between the performance achieved by SVR and that of KDM, when regularizer is 0, 0.1, 1 or 10. For a regularizer γ = 100, KDM however leads to the best one-step prediction error, around 16% lower than that obtained by SVR prediction. The dash ’-’ appearing in the first line of the table means that the trajectory prediction made by the SVR with a polynomial kernel has failed to give finite predictions. On the contrary, KDM never shows this kind of behavior. For a regularizer value of γ = 100, it even gives the best trajectory prediction error. 3.2 Laser Time Series Prediction The Laser time series is the dataset A from the Santa Fe competition. It is a univariate time series from an experiment conducted in a physics laboratory (Figure 1 (right) represents the first 350 points of the series). An embedding dimension d = 3 and a step size κ = 1 are used. The dataset is divided as follows. The first 100 points are used for training, whereas the points in the range 201 to 300 provide a test set to select hyperparameters. The validation error (RMSE) is evaluated on the points in the range 101 to 200. Table 2 reports the validation errors obtained for the two kinds of prediction. The most striking information provided by this table is the large error archieved by KDM with no regularizer when a gaussian kernel is used. Looking at the other RMSE values corresponding to different regularizers, the importance of penalizing transition matrices with large entries is underlined. Besides, when the regularizer γ is appropriately chosen, we see that KDM with a gaussian kernel can achieve very good predictions, for the one-step prediction and the multi-step prediction as well. KDM one-step best prediction error is however not as far from SVR one-step prediction (about 10% lower) than KDM multi-step is from its SVR counterpart (around 16% lower). When a polynomial kernel is used, we observe that KDM with no regularizer provides poor results with regards to the one-step prediction error. Contrary to what occurs with the use of a gaussian kernel, KDM with no regularization does not show bad multi-step prediction ability. Looking at the other entries of this table once again shows that KDM can give very good predictions when a well-suited regularizer is chosen. Hence, we notice that the best multi-step prediction error of KDM is above 19% better than that obtained by SVR multi-step prediction. 4 Discussion 4.1 Another Way of Choosing the Parameters The introduction of a basis U allows to find the parameters of KDM without computing any inversion of infinite dimensional matrices or division by the dimension of H. There is, however a more elegant way to find these parameters when σ2 is assumed to be known. In this case, equation (5) needs not to be considered any longer. Considering the prior pA(Aφ) ∝exp(−γ 2σ2 trace (Aφ′Aφ)), for a user defined γ, the maximum a posteriori for Aφ is obtained as: Aφ = T X t=2 xφ t xφ t−1 ′ − 1 T −1 T X t=2 xφ t T X t=2 xφ t−1 ′ ! γI + T X t=2 xφ t−1xφ t−1 ′ − 1 T −1 T X t=2 xφ t−1 T X t=2 xφ t−1 ′ !−1 . Introducing the matrix Xφ = [xφ 1 · · · xφ T ], the T-dimensional vectors f := [0 1 · · · 1]′, g := [1 · · · 1 0], the T × T matrix P = (Pij) = (δi,j+1) defining J = P −f g/(T −1)′ and M = diag (g) −gg′/(T −1), Aφ can be rewritten as Aφ =  XφJXφ′  γI + XφMXφ′−1 = 1 γ XφJ  I −1 γ KM(I + 1 γ MKM)−1M  Xφ′ thanks to the Sherman-Woodbury formula, K being the Gram matrix associated to xφ 1:T . It is thus possible to directly determine the matrix Aφ when σ2 is known, the same holding for µφ since equation (5) remains unchanged. 4.2 Link to Kalman Filtering The usual way to recover a noisy nonlinear signal is to use the Extended Kalman Filter (EKF) or the Unscented Kalman Filter (UKF) [4]. The use of these algorithms involves two steps. First, the clean dynamics, as given by h in equation (1) is learned by a regressor, e.g., a multilayer perceptron. Given a noisy time series from the same driving process h, EKF and UKF then process that series by respectively a first-order linearization of h and an efficient ’sampling’ method to determine the clean signal. Apart from the latter essential approximations done by these algorithms, the core of EKF and UKF resembles that of classical Kalman filtering (and smoothing). Regarding the performances of KDM to learn a complex dynamics, it could be directly used to model the process h. In addition, its matricial formulation is suitable to the traditional matrices computations involved by the filtering task (see [5, 11] for details). Hence, a link between KDM and Kalman filtering has been the purpose of [9, 10] where a nonlinear Kalman filter based on the use of kernels is proposed: the ability of the proposed model to address the modeling of nonlinear dynamics is demonstrated, while the classical procedures (even the EM algorithm) associated to linear dynamical systems remain valid. 5 Conclusion and Future Work Three main results are presented: first, we introduce KDM, a kernel extension of linear dynamical models and show how the kernel trick allows to learn a linear model in a feature space associated to a kernel. Second, an original and efficient solution based on learning has been applied for the preimage problem. Third, Kernel Dynamical Model can be linked to the Kalman filter model with a hidden state process living in the feature space. In the framework of time series prediction, KDM proves to work very well and to compete with the best time series predictors particularly on long time range prediction. To conclude, this work can lead to several future directions. All classic tasks involving a dynamic setting such as filtering/predicting (e.g., tracking) and smoothing (e.g., time series denoising) can be tackled by our approach and have to be tested. As pointed out by [9, 10], the kernel approach can also be applied to linear dynamical models with hidden states to provide a kernelized version of the Kalman filter, particularly allowing the implementation of an exact nonlinear EM procedure (involving closed form equations as the method proposed by [3]). Besides, the use of kernel opens the door to dealing with structured data, making KDM a very attractive tool in many areas such as bioinformatics, texts and video application. Lastly, from the theoretical point of view, a very interesting issue is that of the actual noise corresponding to a gaussian noise in a feature space. References [1] B. Boser, I. Guyon, and V. Vapnik. A Training Algorithm for Optimal Margin Classifiers. In Proc. of the 5th Annual Workshop on Comp. Learning Theory, volume 5, 1992. [2] G. Dorffner. Neural networks for time series processing. Neural Network World, 6(4):447–468, 1996. [3] Z. Ghahramani and S. Roweis. Learning nonlinear dynamical systems using an em algorithm. In M. S. Kearns, S. A. Solla, and D. A. Cohn, editors, Advances in Neural Information Processing Systems, volume 11, pages 599–605. MIT Press, 1999. [4] S. Julier and J. Uhlmann. A New Extension of the Kalman Filter to Nonlinear Systems. In Int. Symp. Aerospace/Defense Sensing, Simul. and Controls, 1997. [5] R. E. Kalman. A New Approach to Linear Filtering and Prediction Problems. Transactions of the ASME–Journal of Basic Engineering, 82(Series D):35–45, 1960. [6] S. Mika, B. Sch¨olkopf, A. J. Smola, K.-R. M¨uller, M. Scholz, and G. R¨atsch. Kernel PCA and De-Noising in Feature Spaces. In NIPS. MIT Press, 1999. [7] S. Mukherjee, E. Osuna, and F. Girosi. Nonlinear prediction of chaotic time series using support vector machines. In Proc. of IEEE NNSP’97, 1997. [8] K. M¨uller, A. Smola, G. R¨atsch, B. Sch¨olkopf, J. Kohlmorgen, and V. Vapnik. Predicting Time Series with Support Vector Machines. In W. Gerstner, A. Germond, M. Hasler, and J.-D. Nicoud, editors, Artificial Neural Networks - ICANN’97, pages 999–1004. Springer, 1997. [9] L. Ralaivola. Mod´elisation et apprentissage de concepts et de syst`emes dynamiques. PhD thesis, Universit´e Paris 6, France, 2003. [10] L. Ralaivola and F. d’Alch´e-Buc. Filtrage de Kalman non lin´eaire `a l’aide de noyaux. In Actes du 19eme Symposium GRETSI sur le traitement du signal et des images, 2003. [11] A-V.I. Rosti and M.J.F. Gales. Generalised linear Gaussian models. Technical Report CUED/FINFENG/TR.420, Cambridge University Engineering Department, 2001. [12] S. Roweis and Z. Ghahramani. A unifying review of linear Gaussian models. Neural Computation, 11(2):305–345, 1997. [13] B. Sch¨olkopf and A. J. Smola. Learning with Kernels, Support Vector Machines, Regularization, Optimization and Beyond. MIT University Press, 2002. [14] A. Smola and B. Sch¨olkopf. A Tutorial on Support Vector Regression. Technical Report NC2TR-1998-030, NeuroCOLT2, 1998. [15] V. Vapnik. Statistical Learning Theory. John Wiley and Sons, inc., 1998.
2003
118
2,330
Learning Non-Rigid 3D Shape from 2D Motion Lorenzo Torresani Stanford University ltorresa@cs.stanford.edu Aaron Hertzmann University of Toronto hertzman@dgp.toronto.edu Christoph Bregler New York University chris.bregler@nyu.edu Abstract This paper presents an algorithm for learning the time-varying shape of a non-rigid 3D object from uncalibrated 2D tracking data. We model shape motion as a rigid component (rotation and translation) combined with a non-rigid deformation. Reconstruction is ill-posed if arbitrary deformations are allowed. We constrain the problem by assuming that the object shape at each time instant is drawn from a Gaussian distribution. Based on this assumption, the algorithm simultaneously estimates 3D shape and motion for each time frame, learns the parameters of the Gaussian, and robustly fills-in missing data points. We then extend the algorithm to model temporal smoothness in object shape, thus allowing it to handle severe cases of missing data. 1 Introduction We can generally think of a non-rigid object’s motion as consisting of a rigid component plus a non-rigid deformation. For example, a person’s head can move rigidly (e.g. turning left or right) while deforming (due to changing facial expressions). If we view this non-rigid motion from a single camera view, the shape and motion are ambiguous: for any hypothetical rigid motion, a corresponding 3D shape can be devised that fits the image observations. Even if camera calibration and rigid motion are known, a depth ambiguity remains. Despite this apparent ambiguity, humans interpret the shape and motion of non-rigid objects with relative ease; clearly, more assumptions about the nature of the deformations are used by humans. This paper addresses the question: how can we resolve the ambiguity, with as weak assumptions as possible? We argue that, by assuming that the 3D shape is drawn from some non-uniform PDF, we can reconstruct 3D non-rigid shape from 2D motion unambiguously. Moreover, we show that this can be done without assuming that the parameters of the PDF are known in advance. The use of a proper PDF makes the technique robust to noise and overfitting. We demonstrate this approach by modeling the PDF as a Gaussian distribution (more specifically, as a factor analyzer), and describe a novel EM algorithm for simultaneously learning the 3D shapes, the rigid motion, and the parameters of the Gaussian. We also generalize this approach by modeling the shape as a Linear Dynamical System (LDS). Our algorithm can be thought of as a structure-from-motion (SFM) algorithm with a learning component: we assume that a set of labeled point tracks have been extracted from a raw video sequence, and the goal is to estimate 3D shape, camera motion, and a deformation PDF. Our algorithm is well-suited to reconstruction in the case of missing data, such as due to occlusions and other tracking outliers. However, we show significant improvements over previous algorithms even when all tracks are visible. Our work may also be seen as unifying Active Shape Models [1, 2, 5] with SFM, where both are estimated jointly from an image sequence. Our methods are closely related to factor analysis, probabilistic PCA, and linear dynamical systems. Our missing-data technique can be viewed as generalizing previous algorithms for SFM with missing data (e.g. [8, 9]) to the nonrigid case. In work concurrent to our own, Gruber and Weiss [7] also apply EM to SFM; their work focuses on the rigid case with known noise, and applies temporal smoothing to rigid motion parameters rather than shape. 2 Deformation, Shape, and Ambiguities We now formalize the problem of interpreting non-rigid shape and motion. We assume that a scene consists of J scene points sj,t, where j is an index over scene points, and t is an index over image frames. The 2D projections pj,t of these points are imaged under orthographic projection: pj,t = Rt(sj,t + dt) + n (1) where pj,t is the 2D projection of scene point j at time t, dt is a 2 × 1 translation vector, Rt is a 2 × 3 matrix that combines rotation with orthographic projection [12], and n is zero-mean Gaussian noise with variance σ2. Collecting the projected points into a 2 × J matrix Pt = [p1,t, ..., pJ,t] and the 3D shape into a 3 × J matrix St = [s1,t, ...sJ,t] gives the equivalent form Pt = Rt(St + Dt) + N (2) where Dt = dt1T contains J copies of the translation matrix dt. Note that rigid motion of the object and rigid motion of the camera are interchangeable. Our goal is to estimate the time-varying shape St and motion (Rt, Dt) from the observed projections Pt. Without any constraints on the 3D shape sj,t, this problem is extremely ambiguous [11]. For example, given a shape St and motion (Rt, Dt) and an arbitrary orthonormal matrix At, we can produce a new shape AtSt and motion (RtA−1 t , AtDt) that together give identical 2D projections as the original model, even if a different matrix At is applied in every frame. A common way to model non-rigid deformations is to assume that the shape is produced by adding deformations to a shape average ¯S: St = ¯S + K X k=1 Vkzk,t (3) where zk,t are scalar per-frame weights that indicate the contributions of the deformations to each shape; these weights are combined in a vector zt = [z1,t, ..., zK,t]T . Together, ¯S and Vk are referred to as the shape basis. Equivalently, the space of possible shapes may be described by linear combinations of basis shapes, by selecting K + 1 linearly independent points in the space. This model was first applied to non-rigid SFM by Bregler et al. [4]. However, this model contains ambiguities, since, for some 3D shape and motion, there will still be ways to combine different weights and a different rigid motion to produce the same 3D shape. Since we are performing a 2D projection, an additional depth ambiguity occurs. For example, whenever there exist weights wk such that Rt P Vkwk = 0 and P Vkwk ̸= 0, these weights define a linear space of distinct 3D shapes (with weights zt,k + αwk) that give identical 2D projections. (When the number of basis shapes is small, these ambiguities are rarer and may not make a dramatic impact.) Furthermore, a leastsquares fit may overfit noise, especially with many basis shapes. As the number of basis shapes grows, the problem is more likely to become unconstrained, eventually approaching the totally unconstrained case described above. The ambiguity and overfitting may be resolved by introducing regularization terms that penalize large deformations, and then solving for 3D shape in a least-squares sense. Soatto and Yezzi [11] use a regularization term equivalent to P t ||St −¯S||2. However, this regularization may be too restrictive in many cases and too loose in others. For example, when tracking a face, deformations of the jaw are much more likely than deformations of the nose. Moreover, the weight for this regularization term must be specified by hand1. Alternatively, Brand [3] proposes placing a user-specified Gaussian prior on the deformation basis and a prior on the deformations based on an initial estimate. In order to motivate our approach, we can restate the above techniques as follows. Suppose we assume that shapes St are drawn from a probabilitity distribution p(St|θ) with known parameters θ. The non-rigid shape and motion are estimated by maximizing p(S, R, D|P, θ, σ2) ∝ p(P|S, R, D, θ, σ2)p(S, R, D|θ, σ2) (4) ∝ Y t p(Pt|St, Rt, Dt, σ2)p(St|θ) (5) assuming uniform priors on Rt, and Dt. The projection likelihood p(Pt|St, Rt, Dt, σ2) is a spherical Gaussian (Equation 2). The negative log-posterior −ln p(S, R, D, θ|P) corresponds to a standard least-squares formulation for SFM, plus a regularization term −ln p(St|θ). If we set p(St|θ) to be a uniform distribution, then we get the highly underconstrained case described above. If we set p(St|θ) to be a spherical Gaussian with a specified variance (e.g. p(St|θ) = N(¯S; σ2I)) then we obtain the simple regularization used previously — the problem is constrained, but by a weak regularization term with a user-specified weight (variance). Our approach. Our approach is to simultaneously estimate the rigid motion and learn the shape PDF. In other words, we estimate R, D, θ, and σ2 to maximize p(R, D, θ, σ2|P) = Z p(R, D, θ, S, σ2|P)dS (6) ∝ Z p(P|R, D, S, σ2)p(S|θ)dS (7) The key idea is that we can estimate shape and motion while learning the parameters of the PDF p(S|θ) over shapes. (Our method marginalizes over the unknown shapes St, rather than solving for estimates of shape.) In effect, the regularization terms (i.e. the PDF) are learned simultaneously with the rest of SFM. This means that the regularization terms need not be set manually, and can thus be much more sophisticated and have many more parameters than previous methods. In practice, we find that this leads to significantly improved reconstructions over user-specified shape PDFs. We demonstrate the approach by modeling the shape PDF as a general Gaussian. We reduce the dimensionality of the Gaussian by representing it as a factor analyzer. In this case, the factors Vk may be interpreted as basis deformations. We later generalize this approach to model shape as an LDS, leading to temporal correlations in the shape PDF. It might seem that, since the parameters of the PDF are not known a priori, the algorithm could estimate wildly varying shapes, and then learn a correspondingly spread-out PDF. 1In their work, Soatto and Yezzi address a slightly simpler problem where the 3D data is observed without noise or projection, and thus there are no weights to specify in this case However, such a spread-out PDF would assign very low likelihood to the solution and thus be suboptimal; this is a typical case of Bayesian learning naturally balancing the desire to fit the data with the desire for a “simple” model. One way to see this is to consider the terms of −ln p(R, D, θ|P) in the case of the Gaussian prior PDF: in addition to the datafitting term and the regularization term, there is a “normalization constant” term of T ln |φ|, where T is the number of frames and φ is the covariance of the shape PDF. This term directly penalizes spread-out Gaussians. Hence, the optimal solution trades-off between (a) fitting the projection data, (b) fitting the shapes St to the shape PDF (regularizing), and (c) minimizing the variance of the shape PDF as much as possible. The algorithm simultaneously regularizes and learns the regularization. 3 Learning a Gaussian shape distribution We now describe our algorithm in detail. We model p(St|θ) as a factor analyzer [6]. In this setting, the factors of the Gaussian can be interpreted as basis deformations — shape is modeled by Equation 3 — but the weights zt are now hidden variables, with zero-mean Gaussian priors with unit variance for each: zt ∼ N(0; I) (8) The shape and projection model is then completely specified by Equations 2, 3, and 8. The problem of non-rigid SFM is now to solve for the maximum likelihood estimates of Rt, Dt, ¯S, V, and σ2, i.e. maximize p(Rt, Dt, ¯S, V, σ2|Pt) ∝ Q t p(Pt|Rt, Dt, ¯S, V, σ2) = Q t R p(Pt, zt|Rt, Dt, ¯S, V, σ2)p(zt)dzt 3.1 Vectorized form. For later computations, it is useful to rewrite the model in a vectorized form. First, define ft to be the vector of point tracks ft = vec(Pt) = [x1,t, y1,t, ..., xJ,t, yJ,t]T . Note that ft is the same variable as Pt, but written as a vector rather than a matrix2. Expanding ft we have ft = vec(Pt) = vec(RtSt + RtDt + Nt) (9) = K X k=1 vec(RtVk)zk,t + vec(Rt¯S) + vec(RtDt) + vec(Nt) (10) = Mtzt + ¯ft + Tt + vec(Nt) (11) where Mt = [vec(RtV1), ..., vec(RtVK)], zt = [z1,t, ..., zK,t]T , ¯ft = vec(Rt¯S) and Tt = vec(RtDt) = [(Rtdt)T , ..., (Rtdt)T ]T = [tT t , ..., tT t ]T . Note that the marginal distribution over shape — as well as its projection — is Gaussian: p(ft|ψ) = Z p(ft|zt, ψ)p(zt|ψ)dzt (12) = N(ft|Tt + ¯ft; MtMT t + σ2I) (13) where ψ encapsulates the model parameters ¯S, Vk, Rt, Dt and σ2. Let ˜H = [vec(¯S), vec(V1), ..., vec(VK)] and ˜zt = [1, zT t ]T . We can also rewrite the shape equation as vec(RtSt) = (I ⊗Rt)vec(St) = (I ⊗Rt) ˜H˜zt, by using the identity vec(ABC) = (CT ⊗A)vec(B). The symbol ⊗denotes Kronecker product. 2The vec operator stacks the columns of a matrix into a vector, e.g. vec  a0 a2 a1 a3  = [a0, a1, a2, a3]T . The operator is linear: vec(A + B) = vec(A) + vec(B), vec(αA) = αvec(A) for any matrices A and B and scalar α. 3.2 Generalized EM algorithm. Given a set of point tracks P (equivalently, f), we can estimate the motion and deformation model using EM; the algorithm is similar to EM for factor analysis [6]. The E-step. We estimate the distribution over zt given the current motion and shape estimates, for each frame t. Defining q(zt) to be the distribution to be estimated in frame t, it can be computed as q(zt) = p(zt|ft, ψ) (14) = N(zt|β(ft −¯ft −Tt); I −βMt) (15) β = MT t (MtMT t + σ2I)−1 (16) The matrix inversion lemma may be used to accelerate the computation of β. We define the expectations µt ≡Eq[zt] and φt ≡Eq[ztzT t ] and compute them as: µt = β(ft −¯ft −Tt) (17) φt = I −βMt + µtµT t (18) We also define ˜µt = E[˜zt] = [1, µT t ]T and ˜φ = E[˜zt˜zT t ] =  1 µT t µt φt  . The M-step. We estimate the motion parameters by minimizing Q(P, ψ) = Eq(z1),...,q(zT )[−log p(P|ψ)] (19) = X t Eq(zt)[||ft −vec(RtSt) −Tt)||2/(2σ2)] + 2JT log √ 2πσ2 (20) This function is quadratic in the shape parameters (¯S, Vk), in the rigid motion parameters (Rt, Tt) and in the gaussian noise variance parameter σ2. To update each of these parameters we compute the corresponding partial derivative of the expected log likelihood, set it to zero and solve it. The parameter update rules are: • Shape basis: vec( ˜H) ← X t (˜φt ⊗(I ⊗RT t Rt)) !−1 vec X t (I ⊗Rt)T (ft −Tt)˜µT t ! (21) • Noise variance: σ2 ← 1 2JT X t (||ft −¯ft −Tt||2 −2(ft −¯ft −Tt)T Mtµt +tr(MT t Mtφt)) (22) • Translation: Tt ←(1 ⊗I) 1 J X j (ftj −Rt(¯Sj + X k Vkjµtk)) (23) • Rotation: Rt ←arg min Rt ||Rt X j ( ˜Hj ˜φt ˜HT j ) − X j ((ftj −tt)˜µT t ˜HT j )|| (24) where ˜H = [ ˜HT 1 , ..., ˜HT J ]T and ft = [ft1, ..., ftJ]. Since the system of equations in Equation 21 is large and sparse, we solve it using conjugate gradient. In Equation 24, we enforce orthonormality of rotations by parameterizing Rt with exponential coordinates. We linearize the equation with respect to the exponential coordinates, and solve the resulting quadratic. If any of the point tracks are missing, they are also filled in during the M-step. Let f ∗ t denote the elements of a frame of tracking data that are not observed; they are estimated as f ∗ t ← ¯f ∗ t + M∗ t µt + T∗ t (25) where (∗) indicates rows that correspond to the missing data. In our M-step, we apply each of these updates once, although they could also be alternated. Once EM has converged, the maximum likelihood shapes may be computed as St = ¯S + P k Vkµt,k. 4 Learning dynamics Many real deformations contain some temporal smoothness. We model temporal behavior of deformations using a Linear Dynamical System (LDS). In this model, Equation 8 is replaced with z0 ∼ N(0; I) (26) zt = Φzt−1 + n, n ∼N(0; Q) (27) where Φ is an arbitrary unknown K ×K matrix, and Q is a K ×K covariance matrix. For certain estimates of Φ, this model corresponds to an assumption of continuously or slowly changing shape. Since our model is a special form of Shumway and Stoffer’s algorithm for LDS learning with EM [10], it is straightforward to adapt it to our needs. In the Estep, we apply Shumway and Stoffer’s E-step to estimate µt, φt, and E[ztzT t−1], based on Pt, ¯S, Mt, Φ, Q, and σ2. In the M-step, we apply the same shape and motion updates as in the previous section; additionally, we update Φ and Q in the same way as in Shumway and Stoffer’s algorithm. In other words, this reconstruction algorithm learns 3D shape with temporal smoothing, while learning the temporal smoothness term. 5 Experiments We compared our algorithm with the iterative SFM algorithm presented by Torresani et al. [13], which we will refer to as ILSQ (iterative least-squares) in the following discussion3. ILSQ optimizes Equations 2 and 3 by alternating optimization of each of the unknowns (rotation, basis shapes, and coefficients). We also improved the algorithm by updating the translations as well. When some data is missing, ILSQ optimizes with respect to the available data. For both algorithms, the rigid motion is initialized by Tomasi-Kanade [12], and random initialization of the shape basis and coefficients. For the algorithm presented in section 3, we adopted an annealing scheme that forces σ2 to remain large in the initial steps of the optimization. We refer to our new algorithms as EM-Gaussian and EM-LDS. We tested the algorithms on a synthetic animation of a deforming shark in Figure 1. The motion consists of rigid rotation plus deformations generated by K = 2 basis shapes. The average reconstruction errors in Z for ILSQ and EM-Gaussian are respectively 7.10% and 2.50% on this sequence after 100 parameter updates.4 By enforcing temporal smoothness 3In our experience, ILSQ always performs better than the algorithm of Bregler et al. [4]. 4All errors are computed in percentage points: the average distance of the reconstructed point to the correct point divided by the size of the shape. 2D Tracks −100 −50 0 50 100 −40 −20 0 20 40 60 x y −100 −50 0 50 100 −40 −20 0 20 40 60 x y −80 −60 −40 −20 0 20 40 60 80 100 −40 −20 0 20 40 60 x y −30 −20 −10 0 10 20 30 40 50 −40 −20 0 20 40 60 x y −100 −50 0 50 100 −40 −20 0 20 40 60 x y −60 −40 −20 0 20 40 60 −40 −20 0 20 40 60 x y −40 −30 −20 −10 0 −40 −20 0 20 40 60 x y ILSQ −100 −50 0 50 100 −100 −50 0 50 100 x z −100 −50 0 50 100 −100 −50 0 50 100 x z −80 −60 −40 −20 0 20 40 60 80 100 −100 −50 0 50 100 x z −20 0 20 40 −100 −50 0 50 100 x z −100 −50 0 50 100 −100 −50 0 50 100 x z −60 −40 −20 0 20 40 60 −100 −50 0 50 100 x z −40 −20 0 −100 −50 0 50 100 x z EM-Gaussian −100 −50 0 50 100 −100 −50 0 50 100 x z −100 −50 0 50 100 −100 −50 0 50 100 x z −80 −60 −40 −20 0 20 40 60 80 100 −100 −50 0 50 100 x z −20 0 20 40 −100 −50 0 50 100 x z −100 −50 0 50 100 −100 −50 0 50 100 x z −60 −40 −20 0 20 40 60 −100 −50 0 50 100 x z −40 −20 0 −100 −50 0 50 100 x z EM-LDS −100 −50 0 50 100 −100 −50 0 50 100 x z −100 −50 0 50 100 −100 −50 0 50 100 x z −80 −60 −40 −20 0 20 40 60 80 100 −100 −50 0 50 100 x z −20 0 20 40 −100 −50 0 50 100 x z −100 −50 0 50 100 −100 −50 0 50 100 x z −60 −40 −20 0 20 40 60 −100 −50 0 50 100 x z −40 −20 0 −100 −50 0 50 100 x z t=20 t=50 t=80 t=115 t=148 t=175 t=200 Figure 1: Reconstructions of the shark sequence using the three algorithms. Each algorithm was given 2D tracks as inputs; reconstructions are shown here from a different viewpoint than the inputs to the algorithm. Ground-truth features are shown as blue dots; reconstructions are red circles. Note that, although ILSQ gets approximately the correct shape in most cases, it misses details, whereas EM gives very accurate results most of the time. Some of the deformation errors of EM-Gaussian (e.g. for t=148) are corrected by EM-LDS through temporal smoothing. EM-LDS was able to correct some of the deformation errors of EM-Gaussian. The average Z error for EM-LDS on the shark sequence after 100 EM iterations is 1.24%. Videos of the shark reconstructions and the Matlab software used for these experiments are available from http://movement.stanford.edu/learning-nr-shape/ . In highly-constrained cases — low-rank motion, no image noise, and no missing data — ILSQ achieved reasonably good results. However, EM-Gaussian gave better results in nearly every case, and dramatically better results in underconstrained cases. Figure 2(a) and (b) show experimental results on another set of artificial data consisting of random basis shapes. Figure 2(a) shows the results of reconstruction with missing data; the ILSQ results degrade much faster as the percentage of missing data increases. Figure 2(b) shows the effect of changing the complexity of the model, while leaving the complexity of the data fixed. ILSQ yields poor results when the model complexity does not closely match the data complexity, but EM-Gaussian yields reasonable results regardless. 6 Discussion and future work We have described an approach to non-rigid structure-from-motion with a probabilistic deformation model, and demonstrated its usefulness in the case of a Gaussian deformation model. We expect that more sophisticated distributions can be used to model more complex non-rigid shapes in video. More general graphical models with other correlations (such as from audio data) could be built from this method. Our method is also applicable to 0 10 20 30 40 50 0 0.5 1 1.5 2 2.5 3 % missing data % z error EM−Gaussian ILSQ 1 2 3 4 5 6 0 1 2 3 4 5 6 7 8 9 10 K % z error EM−Gaussian ILSQ (a) (b) Figure 2: Error comparison between ILSQ and EM-Gaussian on random basis shapes. (a) Increasing missing data. As the percentage of missing feature tracks per frame increases, ILSQ degenerates much more rapidly than EM-Gaussian. (b) ILSQ gives poor results when the model complexity does not match the actual data complexity, whereas EM-Gaussian is relatively robust to this. separating rigid from non-rigid motion in fully-observed data, as in Soatto and Yezzi’s work [11]. Our models could easily be generalized to perspective projection, although the optimization may be more difficult. Acknowledgements. Thanks to Hrishikesh Deshpande for assisting with an early version of this project, and to Stefano Soatto for discussing deformation ambiguities. Portions of this work were performed while LT was visiting New York University, AH was at University of Washington, and while CB was at Stanford University. LT and CB were supported by ONR grant N00014-01-1-0890 under the MURI program. AH was supported in part by UW Animation Research Labs, NSF grant IIS-0113007, the Connaught Fund, and an NSERC Discovery Grant. References [1] A. Blake and M. Isard. Active Contours. Springer-Verlag, 1998. [2] V. Blanz and T. Vetter. A Morphable Model for the Synthesis of 3D Faces. In Proceedings of SIGGRAPH 99, Computer Graphics Proceedings, pages 187–194, Aug. 1999. [3] M. Brand. Morphable 3D models from video. In Proc. CVPR 2001, 2001. [4] C. Bregler, A. Hertzmann, and H. Biermann. Recovering Non-Rigid 3D Shape from Image Streams. In Proc. CVPR 2000, 2000. [5] T. F. Cootes and C. J. Taylor. Statistical models of appearance for medical image analysis and computer vision. In Proc. SPIE Medical Imaging, 2001. [6] Z. Ghahramani and G. E. Hinton. The EM Algorithm for Mixtures of Factor Analyzers. Technical Report CRG-TR-96-1, University of Toronto, 1996. [7] A. Gruber and Y. Weiss. Factorization with Uncertainty and Missing Data: Exploiting Temporal Coherence. In Proc. NIPS 2003, 2003. In these proceedings. [8] D. W. Jacobs. Linear Fitting with Missing Data for Structure-From-Motion. Computer Vision and Image Understanding, 82:57–82, 2001. [9] H. Shum, K. Ikeuchi, and R. Reddy. Principal Component Analysis with Missing Data and Its Applications to Polyhedral Object Modeling. IEEE Trans. PAMI, 17(9):854–867, 1995. [10] R. H. Shumway and D. S. Stoffer. An approach to time series smoothing and forecasting using the em algorithm. J. Time Series Analysis, 3(4):253–264, 1982. [11] S. Soatto and A. J. Yezzi. Deformotion: Deforming Motion, Shape Averages, and the Joint Registration and Segmentation of Images. In Proc. ECCV 2002, May 2002. [12] C. Tomasi and T. Kanade. Shape and motion from image streams under orthography: A factorization method. Int. J. of Computer Vision, 9(2):137–154, 1992. [13] L. Torresani, D. Yang, G. Alexander, and C. Bregler. Tracking and Modeling Non-Rigid Objects with Rank Constraints. In Proc. CVPR, 2001.
2003
119
2,331
The Diffusion Mediated Biochemical Signal Relay Channel Peter J. Thomas∗, Donald J. Spencer† Computational Neurobiology Laboratory (Terrence J. Sejnowski, Director) Salk Institute for Biological Studies La Jolla, CA 92037 Sierra K. Hampton, Peter Park, Joseph P. Zurkus Department of Electrical and Computer Engineering University of California San Diego La Jolla, CA 92093 Abstract Biochemical signal-transduction networks are the biological information-processing systems by which individual cells, from neurons to amoebae, perceive and respond to their chemical environments. We introduce a simplified model of a single biochemical relay and analyse its capacity as a communications channel. A diffusible ligand is released by a sending cell and received by binding to a transmembrane receptor protein on a receiving cell. This receptor-ligand interaction creates a nonlinear communications channel with non-Gaussian noise. We model this channel numerically and study its response to input signals of different frequencies in order to estimate its channel capacity. Stochastic effects introduced in both the diffusion process and the receptor-ligand interaction give the channel low-pass characteristics. We estimate the channel capacity using a water-filling formula adapted from the additive white-noise Gaussian channel. 1 Introduction: The Diffusion-Limited Biochemical Signal-Relay Channel The term signal-transduction network refers to the web of biochemical interactions by which single cells process sensory information about their environment. Just as neural networks underly the interaction of many multicellular organisms with their environments, these biochemical networks allow cells to perceive, evaluate and react to chemical stimuli [1]. Examples include chemical signaling across the synaptic cleft, calcium signaling within the postsynaptic dendritic spine, pathogen localization by the immune system, ∗Corresponding author: pjthomas@salk.edu †dspencer@salk.edu growth-cone guidance during neuronal development, phototransduction in the retina, rhythmic chemotactic signaling in social amoebae, and many others. The introduction of quantitative measurements of the distribution and activation of chemical reactants within living cells [2] has prepared the way for detailed quantitative analysis of their properties, aided by numerical simulations. One of the key questions that can now be addressed is the fundamental limits to cell-to-cell communication using chemical signaling. To communicate via chemical signaling cells must contend with the unreliability inherent in chemical diffusion and in the interactions of limited numbers of signaling molecules and receptors [3]. We study a simplified situation in which one cell secretes a signaling molecule, or ligand, which can be detected by a receptor on another cell. Limiting ourselves to one ligand-receptor interaction allows a treatment of this communications system using elementary concepts from information theory. The information capacity of this fundamental signaling system is the maximum of the mutual information between the ensemble of input signals, the time-varying rate of ligand secretion s(t), and the output signal r(t), a piecewise continuous function taking the values one or zero as the receptor is bound to ligand or unbound. Using numerical simulation we can estimate the channel capacity via a standard ”water-filling” information measure [4], as described below. 2 Methods: Numerical Simulation of the Biochemical Relay We simulate a biochemical relay system as follows: in a two-dimensional rectangular volume V measuring 5 micrometers by 10 micrometers, we locate two cells spaced 5 micrometers apart. Cell A emits ligand molecules from location xs = [2.5µ, 2.5µ] with rate s(t) ≥0; they diffuse with a given diffusion constant D and decay at a rate α. Both secretion and decay occur as random Poisson processes, and diffusion is realized as a discrete random walk with Gaussian-distributed displacements. The boundaries of V are taken to be reflecting. We track the positions of each of N particles {xi, i = 1, · · · , N} at intervals of ∆t = 1msec. The local concentration in a neighborhood of size σ around a location x is given by the convolution ˆc(x, t) = Z V N X i=1 δ(x′ −xi)g(x −x′, σ) dx′ (1) where g(·, σ) is a normalized Gaussian distribution in the plane, with mean 0 and variance σ2. The motions of the individual particles cause ˆc(x, t) to fluctuate about the mean concentration, causing the local concentration at cell B, ˆc(xr, t) to be a noisy, low-pass filtered version of the original signal s(t) (see Figure 1). Cell B, located at xr = [7.5µ, 2.5µ], registers the presence of ligand through binding and unbinding transitions, which form a two-state Markov process with time-varying transition rates. Given an unbound receptor, the binding transition happens at a rate that depends on the ligand concentration around the receptor: k+ˆc(xr, t). The size of the neighborhood σ reflects the range of the receptor, with binding most likely in a small region close to xr. Once the receptor is bound to a ligand molecule, no more binding events occur until the receptor releases the ligand. The receiver is insensitive to fluctuations in ˆc(xr, t) while it is in the bound state (see Figure 1). The unbinding transition occurs with a fixed rate k−. For concreteness, we take values for D, α, k−, k+, and σ appropriate for cyclic AMP signaling between Dictyostelium amoebae, a model organism for chemical communication: D = 0.25µ2msec−1, α = 1 sec−1, σ = 0.1µ, k−= 1 sec−1, k+ = 1 2πσ2 sec−1. Kd = k−/k+ is the dissociation constant, the concentration at which the receptor on average is bound half the time. For the chosen values of the reaction constants k±, we have Figure 1: Biochemical Signaling Simulation. Top: Cell A secretes a signaling molecule (red dots) with a time-varying rate r(t). Molecules diffuse throughout the two-dimensional volume, leading to locally fluctuating concentrations that carry a corrupted version of the signal. Molecules within a neighborhood of cell B can bind to a receptor molecule, giving a received signal s(t) ∈{0, 1}. Bottom Left: Input signal. Mean instantaneous rate of molecule release (thousands of molecules per second). Molecule release is a Poisson process with time-varying rate. Bottom Center: Local concentration fluctuations, as seen by cell B, indicated by the number of molecules within 0.2 microns of the receptor. The receptor is sensitive to fluctuations in local concentrations only while it is unbound. While the receptor is bound, it does not register changes in the local concentration (indicated by constant plateaus corresponding to intervals when r(t) = 1 in bottom right panel. Bottom Right: Output signal r(t). At each moment the receptor is either bound (1) or unbound (0). The receiver output is a piecewise constant function with a finite number of transitions. Kd ≈15.9molecules µ2 ≈26.4nMol, comparable to the most sensitive values reported for the cyclic AMP receptor [2]. At this concentration the volume V = 50µ2 contains about 800 signaling molecules, assuming a nominal depth of 1µ. 3 Results: Estimating Information Capacity via Frequency Response Communications channels mediated by diffusion and ligand receptor interaction are nonlinear with non-Gaussian noise. The expected value of the output signal, 0 ≤E[r] < 1, is a sigmoidal function of the log concentration for a constant concentration c: E[r] = c c + Kd = 1 1 + e−(y−y0) (2) where y = ln(c), y0 = ln(Kd). The mean response saturates for high concentrations, c ≫Kd, and the noise statistics become pronouncedly Poissonian (rather than Gaussian) for low concentrations. Several different kinds of stimuli can be used to characterize such a channel. The steadystate response to constant input reflects the static (equilibrium) transfer function. Concentrations ranging from 100Kd to 0.01Kd occupy 98% of the steady-state operating range, 0.99 > E[r] > 0.01 [5]. For a finite observation time T the actual fraction of time spent bound, ¯rT , is distributed about E[r] with a variance that depends on T. The biochemical relay may be used as a binary symmetric channel randomly selecting a ‘high’ or ‘low’ secretion rate, and ‘decoding’ by setting a suitable threshold for ¯rT . As T increases, the variance of ¯rT and the probability of error decrease. The binary symmetric channel makes only crude use of this signaling mechanism. Other possible communication schemes include sending all-or-none bursts of signaling molecule, as in synaptic transmission, or detecting discrete stepped responses. Here we use the frequency response of the channel as a way of estimating the information capacity of the biochemical channel. For an idealized linear channel with additive white Gaussian noise (AWNG channel) the channel capacity under a mean input power constraint P is given by the so-called “waterfilling formula” [4], C = 1 2 Z ωmax ω=ωmin log2  1 + (ν −N(ω))+ N(ω)  dω (3) given the constraining condition Z ωmax ω=ωmin (ν −N(ω))+ dω ≤P (4) where the constant ν is the sum of the noise and the signal power in the usable frequency range, N(ω) is the power of the additive noise at frequency ω and (X)+ indicates the positive part of X. The formula applies when each frequency band (ω, ω+dω) is subject to noise of power N(ω) independently of all other frequency bands, and reflects the optimal allocation of signal power S(ω) = (ν −N(ω))+, with greater signal power invested in frequencies at which the noise power is smallest. The capacity C is in bits/second. For an input signal of finite duration T = 100 sec, we can independently specify the amplitudes and phases of its frequency components at ω = [0.01 Hz, 0.02 Hz, · · · , 500 Hz], where 500 Hz is the Nyquist frequency given a 1 msec simulation timestep. Because the population of secreted signaling molecules decays exponentially with a time constant of 1/α = 1 sec, the concentration signal is unable to pass frequencies ω ≥1Hz (see Figure 2) providing a natural high-frequency cutoff. For the AWGN channel the input and Figure 2: Frequency Response of Biochemical Relay Channel. The sending cell secreted signaling molecules at a mean rate of 1000 + 1000 sin(2πωt) molecules per second. From top to bottom, the input frequencies were 1.0, 0.5, 0.2, 0.1, 0.05, 0.02 and 0.01 Hz. The total signal duration was T = 100 seconds. Left Column: Total number of molecules in the volume. Attenuation of the original signal results from exponential decay of the signaling molecule population. Right Column: A one-second moving average of the output signal r(t), which takes the value one when the receptor molecule is bound to ligand, and zero when the receptor is unbound. Figure 3: Frequency Transmission Spectrum Noise power N(ω), calculated as the total power in r(t)−¯r in all frequency components save the input frequency ω. Frequencies were binned in intervals of 0.01 Hz = 1/T. The maximum possible power in r(t) over all frequencies is 0.25; the power successfully transmitted by the channel is given by 0.25/N(ω). The lower curve is N(ω) for input signals of the form s(t) = 1000+1000 sin 2πωt, which uses the full dynamic range of the receptor. Decreasing the dynamic range used reduces the amount of power transmitted at the sending frequency: the upper curve is N(ω) for signals of the form s(t) = 1000 + 500 sin 2πωt. output signals share the same units (e.g. rms voltage); for the biological relay the input s(t) is in molecules/second while the output r(t) is a function with binary range {r = 0, r = 1}. The maximum of the mean output power for a binary function r(t) is  1 T R T t=0 |r(t) −¯r| dt 2 ≤1 4. This total possible output power will be distributed between different frequencies depending on the frequency of the input. We wish to estimate the channel capacity by comparing the portion of the output power present in the sending frequency ω to the limiting output power 0.25. Therefore we set the total output power constant to ν = 0.25. Given a pure sinusoidal input signal s(t) = a0 + a1 sin(2πωt), we consider the power in the output spectrum at ω Hz to be the residual power from the input and the rest of the power in the spectrum of r(t) to be analogous to the additive noise power spectrum N(ω) in the AWNG channel. We calculate N(ω) to be the total power of r(t)−¯r in all frequency bands except ω. For signals of length T = 100 sec, the possible frequencies are discretized at intervals ∆ω = 0.01 Hz. Because the noise power N(ω) ≤0.25, the water-filling formula (3) for the capacity reduces to Cest = 1 2 Z 1Hz 0.01Hz log2  0.25 N(ω)  dω. (5) As mentioned above frequencies ω ≥1 Hz do not transmit any information about the signal (see Figure 2) and do not contribute to the capacity. We approximate this integral using linear interpolation of log2(N(ω)) between the measured values at ω = [0.01, 0.02, 0.05, 0.1, 0.2, 0.5, 1.0] Hz. (See Figure 3.) This procedure gives an estimate of the channel capacity, Cest = 0.087 bits/second. 4 Discussion & Conclusions Diffusion and the Markov switching between bound and unbound states create a low-pass filter that removes high-frequency information in the biochemical relay channel. A general Poisson-type communications channel, such as commonly encountered in optical communications engineering, can achieve an arbitrarily large capacity by transmitting high frequencies and high amplitudes, unless bounded by a max or mean amplitude constraint [6]. In the biochemical channel, the effective input amplitude is naturally constrained by the saturation of the receptor at concentrations above the Kd. And the high frequency transmission is limited by the inherent dynamics of the Markov process. Therefore this channel has a finite capacity. The channel capacity estimate we derived, Cest = 0.087 bits/second, seems quite low compared to signaling rates in the nervous system, requiring long signaling times to transfer information successfully. However temporal dynamics in cellular systems can be quite deliberate; cell-cell communication in the social amoeba Dictyostelium, for example, is achieved by means of a carrier wave with a period of seven minutes. In addition, cells typically possess thousands of copies of the receptors for important signaling molecules, allowing for more complex detection schemes than those investigated here. Our simplified treatment suggests several avenues for further work. For example, signal transducing receptors often form Markov chains with more complicated dynamics reflecting many more than two states [7]. Also, the nonlinear nature of the channel is probably not well served by our additive noise approximation, and might be better suited to a treatment via multiplicative noise [8]. Whether cells engage in complicated temporal coding/decoding schemes, as has been proposed for neural information processing, or whether instead they achieve efficient communication by evolutionary matching of the noise characteristics of sender and receiver, remain to be investigated. We note that the dependence of the channel capacity C on such parameters as the system geometry, the diffusion and decay constants, the binding constants and the range of the receptor may shed light on evolutionary mechanisms and constraints on communication within cellular biological systems. Acknowledgments This work would not have been possible without the generous support of the Howard Hughes Medical Institute and the resources of the Computational Neurobiology Laboratory, Terrence J. Sejnowski, Director. References [1] Rappel, W.M., Thomas, P.J., Levine, H. & Loomis, W.F. (2002) Establishing Direction during Chemotaxis in Eukaryotic Cells. Biophysical Journal 83:1361-1367. [2] Ueda, M., Sako, Y., Tanaka, T., Devreotes, P. & Yanagida, T. (2001) Single Molecule Analysis of Chemotactic Signaling in Dictyostelium Cells. Science 294:864-867. [3] Detwiler, P.B., Ramanathan, S., Sengupta, A. & Shraiman, B.I. (2000) Engineering Aspects of Enzymatic Signal Transduction: Photoreceptors in the Retina. Biophysical Journal79:2801-2817. [4] Cover, T.M. & Thomas, J.A. (1991) Elements of Information Theory, New York: Wiley. [5] Getz, W.M. & Lansky, P. (2001) Receptor Dissociation Constants and the Information Entropy of Membranes Coding Ligand Concentration. Chem. Senses 26:95-104. [6] Frey, R.M. (1991) Information Capacity of the Poisson Channel. IEEE Transactions on Information Theory 37(2):244-256. [7] Uteshev, V.V. & Pennefather, P.S. (1997) Analytical Description of the Activation of Multi-State Receptors by Continuous Neurotransmitter Signals at Brain Synapses. Biophysical Journal72:11271134. [8] Mitra, P.P. & Stark, J.B. (2001) Nonlinear limits to the information capacity of optical fibre communications. Nature411:1027-1030.
2003
12
2,332
Discriminative Fields for Modeling Spatial Dependencies in Natural Images Sanjiv Kumar and Martial Hebert The Robotics Institute Carnegie Mellon University Pittsburgh, PA 15213 {skumar,hebert}@ri.cmu.edu Abstract In this paper we present Discriminative Random Fields (DRF), a discriminative framework for the classification of natural image regions by incorporating neighborhood spatial dependencies in the labels as well as the observed data. The proposed model exploits local discriminative models and allows to relax the assumption of conditional independence of the observed data given the labels, commonly used in the Markov Random Field (MRF) framework. The parameters of the DRF model are learned using penalized maximum pseudo-likelihood method. Furthermore, the form of the DRF model allows the MAP inference for binary classification problems using the graph min-cut algorithms. The performance of the model was verified on the synthetic as well as the real-world images. The DRF model outperforms the MRF model in the experiments. 1 Introduction For the analysis of natural images, it is important to use contextual information in the form of spatial dependencies in images. In a probabilistic framework, this leads one to random field modeling of the images. In this paper we address the main challenge involving such modeling, i.e. how to model arbitrarily complex dependencies in the observed image data as well as the labels in a principled manner. In the literature, Markov Random Field (MRF) is a commonly used model to incorporate contextual information [1]. MRFs are generally used in a probabilistic generative framework that models the joint probability of the observed data and the corresponding labels. In other words, let y be the observed data from an input image, where y = {yi}i∈S, yi is the data from ith site, and S is the set of sites. Let the corresponding labels at the image sites be given by x = {xi}i∈S. In the MRF framework, the posterior over the labels given the data is expressed using the Bayes’ rule as, p(x|y) ∝p(x, y) = p(x)p(y|x) where the prior over labels, p(x) is modeled as a MRF. For computational tractability, the observation or likelihood model, p(y|x) is usually assumed to have a factorized form, i.e. p(y|x) = Q i∈S p(yi|xi)[1][2]. However, as noted by several researchers [3][4], this assumption is too restrictive for the analysis of natural images. For example, consider a class that contains man-made structures (e.g. buildings). The data belonging to such a class is highly dependent on its neighbors since the lines or edges at spatially adjoining sites follow some underlying organization rules rather than being random (See Fig. 2). This is also true for a large number of texture classes that are made of structured patterns. Some efforts have been made in the past to model the dependencies in the data [3][4], but they make factored approximations of the actual likelihood for tractability. In addition, simplistic forms of the factors preclude capturing stronger relationships in the observations in the form of arbitrarily complex features that might be desired to discriminate between different classes. Now considering a different point of view, for classification purposes, we are interested in estimating the posterior over labels given the observations, i.e., p(x|y). In a generative framework, one expends efforts to model the joint distribution p(x, y), which involves implicit modeling of the observations. In a discriminative framework, one models the distribution p(x|y) directly. As noted in [2], a potential advantage of using the discriminative approach is that the true underlying generative model may be quite complex even though the class posterior is simple. This means that the generative approach may spend a lot of resources on modeling the generative models which are not particularly relevant to the task of inferring the class labels. Moreover, learning the class density models may become even harder when the training data is limited [5]. In this work we present a Discriminative Random Field (DRF) model based on the concept of Conditional Random Field (CRF) proposed by Lafferty et al. [6] in the context of segmentation and labeling of 1-D text sequences. The CRFs directly model the posterior distribution p(x|y) as a Gibbs field. This approach allows one to capture arbitrary dependencies between the observations without resorting to any model approximations. Our model further enhances the CRFs by proposing the use of local discriminative models to capture the class associations at individual sites as well as the interactions in the neighboring sites on 2-D grid lattices. The proposed model uses local discriminative models to achieve the site classification while permitting interactions in both the observed data and the label field in a principled manner. The research presented in this paper alleviates several problems with the previous version of the DRFs described in [7]. 2 Discriminative Random Field We first restate in our notations the definition of the Conditional Random Fields as given by Lafferty et al. [6]. In this work we will be concerned with binary classification, i.e. xi ∈{−1, 1}. Let the observed data at site i, yi ∈ℜc. CRF Definition: Let G = (S, E) be a graph such that x is indexed by the vertices of G. Then (x, y) is said to be a conditional random field if, when conditioned on y, the random variables xi obey the Markov property with respect to the graph: p(xi|y, xS−{i}) = p(xi|y, xNi), where S−{i} is the set of all nodes in G except the node i, Ni is the set of neighbors of the node i in G, and xΩrepresents the set of labels at the nodes in set Ω. Thus CRF is a random field globally conditioned on the observations y. The condition of positivity requiring p(x|y)>0 ∀x has been assumed implicitly. Now, using the Hammersley Clifford theorem [1] and assuming only up to pairwise clique potentials to be nonzero, the joint distribution over the labels x given the observations y can be written as, p(x|y)= 1 Z exp  X i∈S Ai(xi, y)+ X i∈S X j∈Ni Iij(xi, xj, y)   (1) where Z is a normalizing constant known as the partition function, and -Ai and -Iij are the unary and pairwise potentials respectively. With a slight abuse of notations, in the rest of the paper we will call Ai as association potential and Iij as interaction potential. Note that both the terms explicitly depend on all the observations y. In the DRFs, the association potential is seen as a local decision term which decides the association of a given site to a certain class ignoring its neighbors. The interaction potential is seen as a data dependent smoothing function. For simplicity, in the rest of the paper we assume the random field given in (1) to be homogeneous and isotropic, i.e. the functional forms of Ai and Iij are independent of the locations i and j. Henceforth we will leave the subscripts and simply use the notations A and I. Note that the assumption of isotropy can be easily relaxed at the cost of a few additional parameters. 2.1 Association potential In the DRF framework, A(xi, y) is modeled using a local discriminative model that outputs the association of the site i with class xi. Generalized Linear Models (GLM) are used extensively in statistics to model the class posteriors given the observations [8]. For each site i, let f i(y) be a function that maps the observations y on a feature vector such that f i : y →ℜl. Using a logistic function as the link, the local class posterior can be modeled as, P(xi =1|y)= 1 1+e−(w0+wT 1 f i(y)) =σ(w0 + wT 1 f i(y)) (2) where w = {w0, w1} are the model parameters. To extend the logistic model to induce a nonlinear decision boundary in the feature space, a transformed feature vector at each site i is defined as, hi(y) = [1, φ1(f i(y)), . . . , φR(f i(y))]T where φk(.) are arbitrary nonlinear functions. The first element of the transformed vector is kept as 1 to accommodate the bias parameter w0. Further, since xi ∈{−1, 1}, the probability in (2) can be compactly expressed as P(xi|y) = σ(xiwT hi(y)). Finally, the association potential is defined as, A(xi, y) = log(σ(xiwT hi(y)) (3) This transformation makes sure that the DRF yields standard logistic classifier if the interaction potential in (1) is set to zero. Note that the transformed feature vector at each site i, i.e. hi(y) is a function of whole set of observations y. On the contrary, the assumption of conditional independence of the data in the MRF framework allows one to use the data only from a particular site, i.e. yi to get the log-likelihood, which acts as the association potential. As a related work, in the context of tree-structured belief networks, Feng et al. [2] used the scaled likelihoods to approximate the actual likelihoods at each site required by the generative formulation. These scaled likelihoods were obtained by scaling the local class posteriors learned using a neural network. On the contrary, in the DRF model, the local class posterior is an integral part of the full conditional model in (1). Also, unlike [2], the parameters of the association and interaction potential are learned simultaneously in the DRF framework. 2.2 Interaction potential To model the interaction potential I, we first analyze the interaction potential commonly used in the MRF framework. Note that the MRF framework does not permit the use of data in the interaction potential. For a homogeneous and isotropic Ising model, the interaction potential is given as I = βxixj, which penalizes every dissimilar pair of labels by the cost β [1]. This form of interaction prefers piecewise constant smoothing without explicitly considering discontinuities in the data. In the DRF formulation, the interaction potential is a function of all the observations y. We would like to have similar labels at a pair of sites for which the observed data supports such a hypothesis. In other words, we are interested in learning a pairwise discriminative model as the interaction potential. For a pair of sites (i, j), let µij(ψi(y), ψj(y)) be a new feature vector such that µij :ℜγ × ℜγ →ℜq, where ψk : y →ℜγ. Denoting this feature vector as µij(y) for simplification, the interaction potential is modeled as, I(xi, xj, y) = xixjvT µij(y) (4) where v are the model parameters. Note that the first component of µij(y) is fixed to be 1 to accommodate the bias parameter. This form of interaction potential is much simpler than the one proposed in [7], and makes the parameter learning a convex problem. There are two interesting properties of the interaction potential given in (4). First, if the association potential at each site and the interaction potentials of all the pairwise cliques except the pair (i, j) are set to zero in (1), the DRF acts as a logistic classifier which yields the probability of the site pair to have the same labels given the observed data. Second, the proposed interaction potential is a generalization of the Ising model. The original Ising form is recovered if all the components of vector v other than the bias parameter are set to zero in (4). Thus, the form in (4) acts as a data-dependent discontinuity adaptive model that will moderate smoothing when the data from the two sites is ’different’. The data-dependent smoothing can especially be useful to absorb the errors in modeling the association potential. Anisotropy can be easily included in the DRF model by parametrizing the interaction potentials of different directional pairwise cliques with different sets of parameters v. 3 Parameter learning and inference Let θ be the set of DRF parameters where θ = {w, v}. The form of the DRF model resembles the posterior of the MRF framework assuming conditionally independent data. However, in the MRF framework, the parameters of the class generative models, p(yi|xi) and the parameters of the prior random field on labels, p(x) are generally assumed to be independent and learned separately [1]. In contrast, we make no such assumption and learn all the parameters of the DRF simultaneously. The maximum likelihood approach to learn the DRF parameters involves evaluation of the partition function Z which is in general a NP-hard problem. One could use either sampling techniques or resort to some approximations e.g. pseudo-likelihood to estimate the parameters. In this work we used the pseudo-likelihood formulation due to its simplicity and consistency of the estimates for the large lattice limit [1]. In the pseudo-likelihood approach, a factored approximation is used such that, P(x|y, θ) ≈Q i∈S P(xi|xNi, y, θ). However, for the Ising model in MRFs, pseudo-likelihood tends to overestimate the interaction parameter β, causing the MAP estimates of the field to be very poor solutions [9]. Our experiments in the previous work [7] and Section 4 of this paper verify these observations for the interaction parameters in DRFs too. To alleviate this problem, we take a Bayesian approach to get the maximum a posteriori estimates of the parameters. Similar to the concept of weight decay in neural learning literature, we assume a Gaussian prior over the interaction parameters v such that p(v|τ) = N(v; 0, τ 2I) where I is the identity matrix. Using a prior over parameters w that leads to weight decay or shrinkage might also be beneficial but we leave that for future exploration. The prior over parameters w is assumed to be uniform. Thus, given M independent training images, bθ=arg max θ M X m=1 X i∈S   log σ(xiwT hi(y))+ X j∈Ni xixjvTµij(y)−log zi   −1 2τ 2 vT v (5) where zi = X xi∈{−1,1} exp   log σ(xiwT hi(y)) + X j∈Ni xixjvT µij(y)    If τ is given, the penalized log pseudo-likelihood in (5) is convex with respect to the model parameters and can be easily maximized using gradient descent. As a related work regarding the estimation of τ, Mackay [10] has suggested the use of type II marginal likelihood. But in the DRF formulation, integrating the parameters v is a hard problem. Another choice is to integrate out τ by choosing a non-informative hyperprior on τ as in [11] [12]. However our experiments showed that these methods do not yield good estimates of the parameters because of the use of pseudo-likelihood in our framework. In the present work we choose τ by cross-validation. Alternative ways of parameter estimation include the use of contrastive divergence [13] and saddle point approximations resembling perceptron learning rules [14]. We are currently exploring these possibilities. The problem of inference is to find the optimal label configuration x given an image y, where optimality is defined with respect to a cost function. In the current work we use the MAP estimate as the solution to the inference problem. While using the Ising MRF model for the binary classification problems, exact MAP solution can be computed using mincut/max-flow algorithms provided β ≥0 [9][15]. For the DRF model, the MAP estimates can be obtained using the same algorithms. However, since these algorithms do not allow negative interaction between the sites, the data-dependent smoothing for each clique is set to be vTµij(y) = max{0, vTµij(y)}, yielding an approximate MAP estimate. This is equivalent to switching the smoothing off at the image discontinuities. 4 Experiments and discussion For comparison, a MRF framework was also learned assuming a conditionally independent likelihood and a homogeneous and isotropic Ising interaction model. So, the MRF posterior is p(x|y) = Z−1 m exp P i∈S log p(si(yi)|xi) + P i∈S P j∈Ni βxixj  where β is the interaction parameter and si(yi) is a single-site feature vector at ith site such that si : yi →ℜd. Note that si(yi) does not take into account influence of the data in the neighborhood of ith site. A first order neighborhood (4 nearest neighbors) was used for label interaction in all the experiments. 4.1 Synthetic images The aim of these experiments was to obtain correct labels from corrupted binary images. Four base images, 64 × 64 pixels each, were used in the experiments (top row in Fig. 1). We compare the DRF and the MRF results for two different noise models. For each noise model, 50 images were generated from each base image. Each pixel was considered as an image site and the feature vector si(yi) was simply chosen to be a scalar representing the intensity at ith site. In experiments with the synthetic data, no neighborhood data interaction was used for the DRFs (i.e. f i(y)=si(yi)) to observe the gains only due to the use of discriminative models in the association and interaction potentials. A linear discriminant was implemented in the association potential such that hi(y) = [1, f i(y)]T . The pairwise data vector µij(y) was obtained by taking the absolute difference of si(yi) and sj(yj). For the MRF model, each class-conditional density, p(si(yi)|xi), was modeled as a Gaussian. The noisy data from the left most base image in Fig.1 was used for training while 150 noisy images from the rest of the three base images were used for testing. Three experiments were conducted for each noise model. (i) The interaction parameters for the DRF (v) as well as for the MRF (β) were set to zero. This reduces the DRF model to a logistic classifier and MRF to a maximum likelihood (ML) classifier. (ii) The parameters of the DRF, i.e. [w, v], and the MRF, i.e. β, were learned using pseudo-likelihood approach without any penalty, i.e. τ = ∞. (iii) Finally, the DRF parameters were learned using penalized pseudo-likelihood and the best β for the MRF was chosen from cross-validation. The MAP estimates of the labels were obtained using graph-cuts for both the models. Under the first noise model, each image pixel was corrupted with independent Gaussian noise of standard deviation 0.3. For the DRF parameter learning, τ was chosen to be 0.01. The pixelwise classification error for this noise model is given in the top row of Table 1. Since the form of noise is the same as the likelihood model in the MRF, MRF is Table 1: Pixelwise classification errors (%) on 150 synthetic test images. For the Gaussian noise MRF and DRF give similar error while for ’bimodal’ noise, DRF performs better. Note that only label interaction (i.e. no data interaction) was used for these tests (see text). Noise ML Logistic MRF (PL) DRF (PL) MRF DRF Gaussian 15.62 15.78 13.18 29.49 2.35 2.30 Bimodal 24.00 29.86 22.70 29.49 7.00 6.21 Figure 1: Results on synthetic images. From top, first row:original images, second row: images corrupted with ’bimodal’ noise, third row: MRF results, fourth row: DRF results. expected to give good results. The DRF model does marginally better than MRF even for this case. Note that the DRF and MRF results are worse when the parameters were learned without penalizing the pseudo-likelihood (shown in Table 1 with suffix (PL)). The MAP inference yields oversmoothed images for these parameters. The DRF model is affected more because all the parameters in DRFs are learned simultaneously unlike MRFs. In the second noise model each pixel was corrupted with independent mixture of Gaussian noise. For each class, a mixture of two Gaussians with equal mixing weights was used yielding a ’bimodal’ class noise. The mixture model parameters (mean, std) for the two classes were chosen to be [(0.08, 0.03), (0.46, 0.03)], and [(0.55, 0.02), (0.42, 0.10)] inspired by [5]. The classification results are shown in the bottom row of Table 1. An interesting point to note is that DRF yields lower error than MRF even when the logistic classifier has higher error than the ML classifier on the test data. For a typical noisy version of the four base images, the performance of different techniques in compared in Fig. 1. Table 2: Detection Rates (DR) and False Positives (FP) for the test set containing 129 images (49, 536 sites). FP for logistic classifier were kept to be the same as for DRF for DR comparison. Superscript ′−′ indicates no neighborhood data interaction was used. MRF Logistic− DRF− Logistic DRF DR (%) 58.35 47.50 61.79 60.80 72.54 FP (per image) 2.44 2.28 2.28 1.76 1.76 4.2 Real-World images The proposed DRF model was applied to the task of detecting man-made structures in natural scenes. The aim was to label each image site as structured or nonstructured. The training and the test set contained 108 and 129 images respectively, each of size 256×384 pixels, from the Corel image database. Each nonoverlapping 16×16 pixels block is called an image site. For each image site i, a 5-dim single-site feature vector si(yi) and a 14-dim multiscale feature vector f i(y) is computed using orientation and magnitude based features as described in [16]. Note that f i(y) incorporates data interaction from neighboring sites. For the association potentials, a transformed feature vector hi(y) was computed at each site i using quadratic transforms of vector f i(y). The pairwise data vector µij(y) was obtained by concatenating the two vectors f i(y) and f j(y). For the DRF parameter learning, τ was chosen to be 0.001. For the MRF, each class conditional density was modeled as a mixture of five Gaussians. Use of a single Gaussian for each class yielded very poor results. For two typical images from the test set, the detection results for the MRF and the DRF models are given in Fig. 2. The blocks detected as structured have been shown enclosed within an artificial boundary. The DRF results show higher detections with lower false positives. For a quantitative evaluation, we compared the detection rates and the number of false positives per image for different techniques. For the comparison of detection rates, in all the experiments, the decision threshold of the logistic classifier was fixed such that it yields the same false positive rate as the DRF. The first set of experiments was conducted using the single-site features for all the three methods. Thus, no neighborhood data interaction was used for both the logistic classifier and the DRF, i.e. f i(y) = si(yi). The comparative results for the three methods are given in Table 2 under ’MRF’, ’Logistic−’ and ’DRF−’. The detection rates of the MRF and the DRF are higher than the logistic classifier due to the label interaction. However, higher detection rate and lower false positives for the DRF in comparison to the MRF indicate the gains due to the use of discriminative models in the association and interaction potentials in the DRF. In the next experiment, to take advantage of the power of the DRF framework, data interaction was allowed for both the logistic classifier as well as the DRF (’Logistic’ and ’DRF’ in Table 2). The DRF detection rate increases substantially and the false positives decrease further indicating the importance of allowing the data interaction in addition to the label interaction. 5 Conclusion and future work We have presented discriminative random fields which provide a principled approach for combining local discriminative classifiers that allow the use of arbitrary overlapping features, with adaptive data-dependent smoothing over the label field. We are currently exploring alternative ways of parameter learning using contrastive divergence and saddle point approximations. One of the further aspects of the DRF model is the use of general kernel mappings to increase the classification accuracy. However, one will need some method to induce sparseness to avoid overfitting [12]. In addition, we intend to extend the model to accommodate multiclass classification problems. Acknowledgments Our thanks to John Lafferty and Jonas August for immensely helpful discussions. Figure 2: Example structure detection results. Left column: MRF results. Right column: DRF results. DRF has higher detection rate with lower false positives. References [1] S. Z. Li. Markov Random Field Modeling in Image Analysis. Springer-Verlag, Tokyo, 2001. [2] X. Feng, C. K. I. Williams, and S. N. Felderhof. Combining belief networks and neural networks for scene segmentation. IEEE Trans. Pattern Anal. Machine Intelli., 24(4):467–483, 2002. [3] H. Cheng and C. A. Bouman. Multiscale bayesian segmentation using a trainable context model. IEEE Trans. on Image Processing, 10(4):511–525, 2001. [4] R. Wilson and C. T. Li. A class of discrete multiresolution random fields and its application to image segmentation. IEEE Trans. on Pattern Anal. and Machine Intelli., 25(1):42–56, 2003. [5] Y. D. Rubinstein and T. Hastie. Discriminative vs informative learning. In Proc. Third Int. Conf. on Knowledge Discovery and Data Mining, pages 49–53, 1997. [6] J. Lafferty, A. McCallum, and F. Pereira. Conditional random fields: Probabilistic models for segmenting and labeling sequence data. In Proc. Int. Conf. on Machine Learning, 2001. [7] S. Kumar and M. Hebert. Discriminative random fields: A discriminative framework for contextual interaction in classification. IEEE Int. Conf. on Computer Vision, 2:1150–1157, 2003. [8] P. McCullagh and J. A. Nelder. Generalised Linear Models. Chapman and Hall, London, 1987. [9] D. M. Greig, B. T. Porteous, and A. H. Seheult. Exact maximum a posteriori estimation for binary images. Journal of Royal Statis. Soc., 51(2):271–279, 1989. [10] D. Mackay. Bayesian non-linear modelling for the 1993 energy prediction competition. In Maximum Entropy and Bayesian Methods, pages 221–234, 1996. [11] P. Williams. Bayesian regularization and pruning using a laplacian prior. Neural Computation, 7:117–143, 1995. [12] M. A. T. Figueiredo. Adaptive sparseness using jeffreys prior. Advances in Neural Information Processing Systems (NIPS), 2001. [13] G. E. Hinton. Training product of experts by minimizing contrastive divergence. Neural Computation, 14:1771–1800, 2002. [14] M. Collins. Discriminative training methods for hidden markov models: Theory and experiments with perceptron algorithms. In Proc. Conference on Empirical Methods in Natural Language Processing (EMNLP), 2002. [15] V. Kolmogorov and R. Zabih. What energy functions can be minimized via graph cuts. In Proc. European Conf. on Computer Vision, 3:65–81, 2002. [16] S. Kumar and M. Hebert. Man-made structure detection in natural images using a causal multiscale random field. In Proc. IEEE Int. Conf. on Comp. Vision and Pattern Recog., June 2003.
2003
120
2,333
Fast Algorithms for Large-State-Space HMMs with Applications to Web Usage Analysis Pedro F. Felzenszwalb1, Daniel P. Huttenlocher2, Jon M. Kleinberg2 1AI Lab, MIT, Cambridge MA 02139 2Computer Science Dept., Cornell University, Ithaca NY 14853 Abstract In applying Hidden Markov Models to the analysis of massive data streams, it is often necessary to use an artificially reduced set of states; this is due in large part to the fact that the basic HMM estimation algorithms have a quadratic dependence on the size of the state set. We present algorithms that reduce this computational bottleneck to linear or near-linear time, when the states can be embedded in an underlying grid of parameters. This type of state representation arises in many domains; in particular, we show an application to traffic analysis at a high-volume Web site. 1 Introduction Hidden Markov Models (HMMs) are used in a wide variety of applications where a sequence of observable events is correlated with or caused by a sequence of unobservable underlying states (e.g., [8]). Despite their broad applicability, HMMs are in practice limited to problems where the number of hidden states is relatively small. The most natural such problems are those where some abstract categorization provides a small set of discrete states, such as phonemes in the case of speech recognition or coding and structure in the case of genomics. Recently, however, issues arising in massive data streams, such as the analysis of usage logs at hightraffic Web sites, have led to problems that call naturally for HMMs with large state sets over very long input sequences. A major obstacle in scaling HMMs up to larger state spaces is the computational cost of implementing the basic primitives associated with them: given an n-state HMM and a sequence of T observations, determining the probability of the observations, or the state sequence of maximum probability, takes O(T n2) time using the forward-backward and Viterbi algorithms. The quadratic dependence on the number of states is a long-standing bottleneck that necessitates a small (often artificially coarsened) state set, particularly when the length T of the input is large. In this paper, we present algorithms that overcome this obstacle for a broad class of HMMs. We improve the running times of the basic estimation and inference primitives to have a linear or near-linear dependence on the number of states, for a family of models in which the states are embedded as discrete grid points in an underlying parameter space, and the state transition costs (the negative logs of the state transition probabilities) correspond to a possibly non-metric distance on this space. This kind of embedded-state model arises in many domains, including object tracking, de-noising one-dimensional signals, and event detection in time series. Thus the algorithms can be seen as extending the applicability of HMMs to problems that are traditionally solved with more restricted linear Gaussian statespace models such as Kalman filtering. Non-Gaussian state-space techniques are a research focus in their own right (e.g., [6]) and our methods could be used to improve their efficiency. Given a structured embedding of states in an underlying d-dimensional space, our approach is to reduce the amount of work in the dynamic programming iterations of the Viterbi and forward-backward algorithms. For the Viterbi algorithm, we make use of distance transform (also known as Voronoi surface) techniques, which are widely used in computer vision, image processing, and discrete computational geometry [2]. For a broad class of distance functions on the embedding space (including functions that are far from obeying the triangle inequality), we are able to run each dynamic programming step of the Viterbi algorithm in O(n) time, yielding an overall running time of O(T n). In the case of the forward-backward algorithm, we are able to achieve O(T n) time for any transition probabilities that can be decomposed into a constant number of box filters [10]. Box filters are discrete convolution kernels that can be computed in linear time; many functions, including the Gaussian, can be expressed or approximated as the composition of a few box filters. Moreover, in the case of the forward-backward algorithm, we are able to obtain a running time of O(T n log n) for arbitrary state transition probabilities, as long as they are based only on differences in the embedded positions of the states. A motivating application for our work comes from the analysis of Web usage data [1]. We focus on the Internet Archive site (www.archive.org) as a prototypical example of a high-traffic site (millions of page-visits per month) offering an array of digital items for download. An important question at such a site is to determine variations in user interest in the items being offered. We use a coin-tossing HMM model in which the discrete states correspond to the current probability of a user downloading a given item; this state set has a natural embedding in the interval [0, 1]. We study the effect of increasing the number of states, and find that a fairly large state set (of size roughly a hundred or more) is needed in order to detect brief but significant events that affect the download rate. With tens of millions of observations and a state set of this size, practical analysis would be computationally prohibitive without the faster HMM algorithms described here. It should be noted that our methods can also be used in belief revision and belief propagation algorithms for Bayesian networks (e.g., [7]), as these algorithms are essentially variants of the Viterbi and forward-backward algorithms for HMMs. The methods are also applicable to continuous Markov models, which have recently been employed for Web user modeling based on duration of page views [9]. 2 Hidden Markov Models We briefly review HMMs; however we assume that the reader is familiar both with HMMs and with the Viterbi and forward-backward estimation algorithms. Rabiner [8] provides a good introduction to HMMs; we use notation similar to his. An HMM can be represented by a 5-tuple λ = (S, V, A, B, π) where S = {s1, . . . , sn} is a finite set of (hidden) states, V = {v1, . . . , vm} is a finite set of observable symbols, A is an n × n matrix with entries aij corresponding to the probability of going from state i to state j, B = {bi(k)} where bi(k) specifies the probability of observing symbol vk in state si, and π is an n-vector with each entry πi corresponding to the probability Function Viterbi Forward-Backward aij = p if |i −j| ≤d, aij = 0 otherwise Min-filter Box sum aij ∝exp(−|i −j|2/2σ2) L2 2 dist. trans. Gaussian approx. aij ∝exp(−k|i −j|) L1 dist. trans. FFT aij = p if |i −j| ≤d, aij = q otherwise Combin. min-filter Combin. box sum aij ∝exp(−|i −j|2/2σ2) if |i −j| ≤d, aij ∝exp(−k|i −j|) otherwise Combin. dist. trans. FFT Table 1: Some transition probabilities that can be handled efficiently using our techniques (see text for an explanation). All running times are O(T n) except those using the FFT which are O(T n log n). that the initial state of the system is si. Let qt denote the state of the system at time t, while ot denotes the observed symbol at time t. Given a sequence of observations O = (o1, . . . , oT ) there are three standard estimation (or inference) problems that have wide applications: 1. Find a state sequence Q = (q1, . . . , qT ) maximizing P(Q|O, λ). 2. Compute P(O|λ), the probability of an observation sequence being generated by λ. 3. Compute the posterior probabilities of each state, P(qt = si|O, λ). As is well known these problems can be solved in O(T n2) time using the Viterbi algorithm for the first task and the forward-backward algorithm for the others. We show how to solve them more efficiently for a wide range of transition probabilities based on differences between states that are embedded in an underlying grid. This grid can be multi-dimensional, however in this paper we consider only the one-dimensional case. Table 1 lists some widely applicable transition probability distributions that can be handled by our methods. The algorithms for each distribution differ slightly and are explained in the subsequent sections. The distributions given in the bottom part of the table can be computed as combinations of the basic distributions in the top part. Other distributions can be obtained using these same combination techniques, as long as only a constant number of distributions are being combined. An additional problem, which we do not explicitly consider here, is that of determining the best model λ given some set of observed sequences {O1, . . . , Ol}. However the most widely used technique for solving this problem, expectation maximization (EM), requires repeatedly running the forward-backward algorithm. Thus our algorithms also indirectly make the model learning problem more efficient. 2.1 Viterbi Algorithm The Viterbi algorithm is used to find a maximum posterior probability state sequence, that is a sequence Q = (q1, . . . , qT ) maximizing P(Q|O, λ). The main computation is to determine the highest probability along a path, accounting for the observations and ending in a given state. While there are an exponential number of possible paths, the Viterbi algorithm uses a dynamic programming approach Figure 1: An example of the L1 distance transform for a grid with n = 9 points containing the point set P = {1, 3, 7}. The distance transform value at each point is given by the height of the lower envelope, depicted as a dashed contour. (see e.g., [8]), employing the recursive equation δt+1(j) = bj(ot+1) max i (δt(i)aij) , where δt(i), for i = 1, 2, . . ., n, encodes the highest probability along a path which accounts for the first t observations and ends in state si. The maximization term takes O(n2) time, resulting in an overall time of O(T n2) for a sequence of length T . Computing δt for each time step is only the first pass of the Viterbi algorithm. In a subsequent backward pass, a minimizing path is found. This takes only O(T n) time, so the forward computation is the dominant part of the running time. In general a variant of the Viterbi algorithm is employed that uses negative log probabilities rather than probabilities, such that the computation becomes δ′ t+1(j) = b′ j(ot+1) + mini(δ′ t(i) + a′ ij), where ′ is used to denote a negative log probability. We now turn to the computation of δ′ for restricted forms of the transition costs a′ ij, where there is an underlying parameter space such that the costs can be expressed in terms of a distance between parameter values corresponding to the states. Let us denote such cost functions by ρ(i −j). Then, δ′ t+1(j) = b′ j(ot+1) + min i (δ′ t(i) + ρ(i −j)) . (1) We now show how the minimization in the second term can be computed in O(n) time rather than O(n2). The approach is based on a generalization of the distance transform, which is defined for sets of points on a grid. Consider a grid with N locations and a point set P on that grid. The distance transform of P specifies for each grid location, the distance to the closest point in the set P, DP (j) = min i∈P ρ(i −j). Clearly the distance transform can be computed in O(N 2) time by considering all pairs of grid locations. However, it can also be computed in linear time for many distance functions using simple algorithms (e.g., [2, 5]). These algorithms have small constants and are fast in practice. The algorithms work for distance transforms of d-dimensional grids, not just for the one-dimensional case that we illustrate here. In order to compute the distance transform efficiently it is commonly expressed as, DP (j) = min i (ρ(i −j) + 1(i)) , where 1(i) is an indicator function for the set P such that 1(i) = 0 when i ∈P and 1(i) = ∞otherwise. Intuitively one can think of a collection of upward facing cones, one rooted at each grid location that is in the set P. The transform is then obtained by taking the lower envelope (or minimum) of these cones. For concreteness consider the one-dimensional case with the L1 distance between grid locations. In this case the “cones” are v-shapes of slope 1 rising from the value y = 0 at each grid location that corresponds to a point of the set P, as illustrated in Figure 1. It is straightforward to verify that a simple two-pass algorithm correctly computes this one-dimensional distance transform. First the vector D(j) is initialized to 1(j). Then in the forward pass, each successive element of D(j) is set to the minimum of its own value and one plus the value of the previous element (this is done “in place” so that updates affect one another). j = 1, ..., n −1 : D(j) = min(D(j), D(j −1) + 1). The backward pass is analogous, j = n −2, ..., 0 : D(j) = min(D(j), D(j + 1) + 1). Consider the example in Figure 1. After the initialization step the value of D is (∞, 0, ∞, 0, ∞, ∞, ∞, 0, ∞), after the forward pass it is (∞, 0, 1, 0, 1, 2, 3, 0, 1) and after the backward pass the final answer of (1, 0, 1, 0, 1, 2, 1, 0, 1). This computation of the distance transform does not depend on the form of the function 1(i). This suggests a generalization of distance transforms where the indicator function 1(i) is replaced with an arbitrary function, Df(j) = min i (ρ(i −j) + f(i)) . The same observation was used in [4] to efficiently compute certain tree-based cost functions for visual recognition of multi-part objects. Intuitively, the upward-facing cones are now rooted at height f(i) rather than at zero, and are positioned at every grid location. The function Df is as above the lower envelope of these cones. This generalized distance transform Df is precisely the form of the minimization term in the computation of the Viterbi recursion δ′ in equation (1), where each state corresponds to a grid point. The algorithm above can be used to compute each step of the Viterbi minimization in O(n) time when ρ is the L1 norm, giving an O(T n) algorithm overall. This corresponds to the problem in the third row of Table 1. The computation for the second row of the table is similar, except that computing the distance transform for the L2 distance squared is a bit more involved (see [5]). The distribution in the first row of the table can be handled using a linear time algorithm for the min-filter [3]. Combinations of transforms can be formed by computing each function separately and then taking the minimum of the results. The entries in the bottom part of Table 1 show two such combinations. The function in the fourth row is often of practical interest, where the probability is p of staying near the current state and q of transitioning to any other state. The function in the last row is a so-called “truncated quadratic”, arising commonly in robust statistics. In the experimental section we use a similar function that is the combination of two linear components with different slopes. 2.2 Forward-Backward Algorithm The forward-backward algorithm is used to find the probability of the observed sequence given the the model, P(O|λ). The computation also determines the posterior probability of the states at each time, P(qt = si|O, λ). Most of the work in the forward-backward algorithm is spent in determining the so-called forward and backward probabilities at each step (again see [8] or any other introduction to HMMs). The forward probabilities at a given time can be expressed as the n-vector αt(i) = P(o1, o2, . . . , ot, qt = si|λ), i.e., the probability of the partial observation sequence up until time t and the state at time t, given the model. The backward probabilities βt can be expressed analogously and are not considered here. The standard computation is to express the vector αt recursively as αt+1(j) = bj(ot+1) n X i=1 (αt(i)aij) . In this form it is readily apparent that computing αt+1 from αt involves O(n2) operations, as each of the n entries in the vector involves a sum of n terms. When the transition probabilities are based just on the differences between the underlying coordinates corresponding to the states, aij = h(j −i), the recursive computation of α becomes αt+1(j) = bj(ot+1) n X i=1 (αt(i)h(j −i)) . The summation term is simply the convolution of αt with h. In general, this discrete convolution can be computed in O(n log n) time using the FFT. While this is a simple observation, it enables efficient calculation of the forward and backward probabilities for problems where the states are embedded in a grid. In certain specific cases convolution can be computed in linear time. One case of particular interest is the so-called box sum, in which the convolution kernel is a constant function within a region. That is, h(j) = k over some interval and h(j) = 0 outside that interval. A Gaussian can be well approximated by convolution of just a few such box filters [10], and thus it is possible to approximately compute the functions in the first and second rows of Figure 1 in O(T n) time. Similarly to the Viterbi case, functions can be created from combinations of box-sums. In this case a weighted sum of the individual functions is used rather than their minimum. 3 Coin-Tossing Models and Web Usage Analysis We now turn to the application mentioned in the introduction: using a coin-tossing model with a one-dimensional embedding of states to estimate the download probability of items at a Web site. Our data comes from the Internet Archive site (www.archive.org), which offers digital text, movie, and audio files. Each item on the site has a separate description page, which contains the option to download it; this is similar to the paper description pages on CiteSeer or the e-print arXiv and to the item description pages at online retailers (with the option to purchase). On a site of this type, the probability that a user chooses to acquire an item, conditioned on having visited the description page, can be viewed as a measure of interest [1]. This ratio of acquisitions to visits is particularly useful as a way of tracking the changes in user interest in an item. Suppose the item is featured prominently on the site; or an active off-site link to the item description drives a new sub-population of users to it; or a technical problem makes it impossible to obtain the item — these are all discrete events that can have a sudden, significant effect on the fraction of users who download the item. By identifying such discrete changes, we can discover the most significant events, both on the site and on the Web at large, that have affected user interest in each item. Such a history of events can be useful to site administrators, as feedback to the users of the site, and for researchers. This type of change-detection fits naturally into the framework of HMMs. For a fixed item, each observation corresponds to a user’s visit to the item description, 0.05 0.1 0.15 0.2 0.25 0.3 0.35 0.4 0.45 0.5 0.55 1.03e+09 1.035e+09 1.04e+09 1.045e+09 1.05e+09 State for Corresponding Visit Time of Visit Step Size .1 0.05 0.1 0.15 0.2 0.25 0.3 0.35 0.4 0.45 0.5 0.55 1.03e+09 1.035e+09 1.04e+09 1.045e+09 1.05e+09 State for Corresponding Visit Time of Visit Step Size .01 Figure 2: Estimate of underlying download bias; best state sequence for models with step sizes of .1 (9 states) on the left and .01 (81 states) on the right. and there are two observable symbols V = {1, 0}, corresponding to the decision to download or not. We assume a model in which there is a hidden coin of some unknown bias that is flipped when the user visits the description and whose outcome determines the download decision. Thus, each state si corresponds to a discretized value pi of the underlying bias parameter. The natural observation cost function b′ i(k) is simply the negative log of the probability p for a head and (1 −p) for a tail. The points at which state transitions occur in the optimal state sequence thus become candidates for discrete changes in user interest. The form of the state transition costs is based on our assumptions about the nature of these changes. As indicated above, they often result from the introduction of a new sub-population with different interests or expectations; thus, it is natural to expect that the transition cost should rise monotonically as the change in bias increases, but that even large changes should happen with some regularity. We quantize the underlying bias parameter values equally, such that |pi−pj| ∝|i−j| and use a cost function of the form a′ ij = min (k1|i −j|, k2|i −j| + k3) , where the ki are positive constants and k1 > k2. This two-slope linear model is monotone increasing but once the change in bias becomes large enough the rate of increase is small. The model prefers constant or small changes in bias but allows for arbitrarily large changes, similarly to the “truncated model” common in robust statistics. Figure 2 shows the best state sequence obtained with the Viterbi algorithm under this model, using two different discretizations of the parameter space, for an input sequence of 11, 159 visits from August 2002 to April 2003 to the description page for a particular video in the Internet Archive. On the left is a 9-state model with probabilities ranging from .1 to .9 in steps of size .1. On the right is an 81-state model with the same range of .1 to .9 but where the steps are of size .01. The x-axis shows the visit time (UTC in billions of seconds since the epoch) and the y-axis shows the bias associated with the state in the optimal sequence at that time. We begin by observing that both models capture a number of discrete changes in download behavior. These changes correspond to genuine external events. In particular, both models capture the long-term drop and rebound in bias which corresponds to the time period where the item was highlighted on a top-level page, as well as the two rightmost short downward spikes which correspond to technical problems that made downloads temporarily impossible. Even though these latter failures were relatively short-lived, lasting a few hours out of the several-month range, they are detected easily by the stochastic model; in contrast, temporal windowing techniques miss such short events. The two plots, however, exhibit some subtle but important differences that illustrate the qualitatively greater power we obtain from a larger state set. In particular, the 81-state model has four short downward spikes rather than three in the time interval from 1.045 to 1.05. The latter two are the technical failures identified by both models, but the first two correspond to two distinct off-site referring pages each of which drove a significant amount of low-interest user traffic to the item. While the 81-state model was able to resolve these as separate events, the 9-state model blurs them into an artificial period of medium bias, followed by a downward spike to the lowest possible state (i.e. the same state it used for the technical failures). Finally, the 81-state model discovers a gradual decline in the download rate near the end of the plot that is not visible when there are fewer states. We see that a model with a larger state set is able to pick up the effects of different types of events — both on-site and off-site highlighting of the item, as well as technical problems — and that these events often result in sudden, discrete changes. Moreover, it appears that beyond a certain point, the set of significant events remains roughly fixed even as the resolution in the state set increases. While we do not show the result here, an 801-state model with step size .001 produces a plot that is qualitatively indistinguishable from the 81 state model with step size .01 — only the y-values provide more detail with the smaller step size. References [1] J. Aizen, D. Huttenlocher, J. Kleinberg, A. Novak, “Traffic-Based Feedback on the Web,” To appear in Proceedings of the National Academy of Sciences. [2] G. Borgefors, “Distance Transformations in Digital Images”, Computer Vision, Graphics and Image Processing, Vol. 34, pp. 344-371, 1986. [3] Y. Gil and M. Werman, “Computing 2D Min, Max and Median Filters” IEEE Trans. PAMI, Vol. 15, 504-507, 1993. [4] P. Felzenszwalb, D. Huttenlocher, “Efficient Matching of Pictorial Structures,” Proc. IEEE Computer Vision and Pattern Recognition Conf., 2000, pp. 66-73. [5] A. Karzanov, “Quick algorithm for determining the distances from the points of the given subset of an integer lattice to the points of its complement”, Cybernetics and System Analysis, 1992. (Translation from the Russian by Julia Komissarchik.) [6] G. Kitagawa, “Non-Gaussian State Space Modeling of Nonstationary Time Series”, Journal of the American Statistical Association, 82, pp. 1032-1063, 1987. [7] J. Pearl, Probabilistic Reasoning in Intelligent Systems: Networks of Plausible Inference, Morgan Kaufmann, 1988. [8] L. Rabiner, “A tutorial on hidden Markov models and selected applications in speech recognition,” Proceedings of the IEEE Vol. 77(2), pp. 257-286, 1989. [9] S.L. Scott, P. Smyth, “The Markov Modulated Poisson Process and Markov Poisson Cascade with Applications to Web Traffic Data,” Bayesian Statistics 7(2003), to appear. [10] W.M. Wells, “Efficient synthesis of Gaussian filters by cascaded uniform filters”, IEEE Trans. PAMI, Vol. 8(2), pp. 234-239, 1986.
2003
121
2,334
A probabilistic model of auditory space representation in the barn owl Brian J. Fischer Dept. of Electrical and Systems Eng. Washington University in St. Louis St. Louis, MO 63110 fischerb@pcg.wustl.edu Charles H. Anderson Department of Anatomy and Neurbiology Washington University in St. Louis St. Louis, MO 63110 cha@pcg.wustl.edu Abstract The barn owl is a nocturnal hunter, capable of capturing prey using auditory information alone [1]. The neural basis for this localization behavior is the existence of auditory neurons with spatial receptive fields [2]. We provide a mathematical description of the operations performed on auditory input signals by the barn owl that facilitate the creation of a representation of auditory space. To develop our model, we first formulate the sound localization problem solved by the barn owl as a statistical estimation problem. The implementation of the solution is constrained by the known neurobiology. 1 Introduction The barn owl shows great accuracy in localizing sound sources using only auditory information [1]. The neural basis for this localization behavior is the existence of auditory neurons with spatial receptive fields called space specific neurons [2]. Experimental evidence supports the hypothesis that spatial selectivity in auditory neurons arises from tuning to a specific combination of the interaural time difference (ITD) and the interaural level difference (ILD) [3]. Still lacking, however, is a complete account of how ITD and ILD spectra are integrated across frequency to give rise to spatial selectivity. We describe a computational model of the operations performed on the auditory input signals leading to an initial representation of auditory space. We develop the model in the context of a statistical estimation formulation of the localization problem that the barn owl must solve. We use principles of signal processing and estimation theory to guide the construction of the model, but force the implementation to respect neurobiological constraints. 2 The environment The environment consists of Ns point sources and a source of ambient noise. Each point source is defined by a sound signal, si(t), and a direction (θi, φi) where θi is the azimuth and φi is the elevation of the source relative to the owl’s head. In general, source location may change over time. For simplicity, however, we assume that source locations are fixed. Source signals can be broadband or narrowband. Signals with onsets are modeled as broadband noise signals modulated by a temporal envelope, si(t) = [PNi n=1 win(t)]ni(t), where win(t) = Aine−1 2 (t−cin)2/σ2 in and ni(t) is Gaussian white noise bandlimited to 12 kHz (see figure (4A)). The ambient noise is described below. 3 Virtual Auditory Space The first step in the localization process is the location-dependent mapping of source signals to the received pressure waveforms at the eardrums. For a given source location, the system describing the transformation of a source signal to the waveform received at the eardrum is well approximated by a linear system. This system is characterized by its transfer function called the head related transfer function (HRTF) or, equivalently, by its impulse response, the head related impulse response (HRIR). Additionally, when multiple sources are present the composite waveform at each ear is the sum of the waveforms received due to each source alone. Therefore, we model the received pressure waveforms at the ears as rL(t) = Ns X i=1 hL(θi,φi)(t)∗si(t)+nL(t) and rR(t) = Ns X i=1 hR(θi,φi)(t)∗si(t)+nR(t) (1) where hL(θ,φ)(t) and hR(θ,φ)(t) are the HRIRs for the left and right ears, respectively, when the source location is (θ, φ), [4], and nL(t), nR(t) are the ambient noises experienced by the left and right ears, respectively. For our simulations, the ambient noise for each ear is created using a sample of a natural sound recording of a stream, sb(t) [5]. The sample is filtered by HRIRs for all locations in the frontal hemisphere, Ω, then averaged so that nL(t) = 1 |Ω| P i∈ΩhL(θi,φi)(t) ∗sb(t) and nR(t) = 1 |Ω| P i∈ΩhR(θi,φi)(t) ∗sb(t). 4 Cue Extraction In our model, location information is not inferred directly from the received signals but is obtained from stimulus-independent binaural location cues extracted from the input signals [6],[7]. The operations used in our model to process the auditory input signals and extract cues are motivated by the known processing in the barn owl’s auditory system and by the desire to extract stimulus-independent location cues from the auditory signals that can be used to infer the locations of sound sources. 4.1 Cochlear processing In the first stage of our model, input signals are filtered with a bank of linear band-pass filters. Following linear filtering, input signals undergo half-wave rectification. So, the input signals to the two ears rL(t) and rR(t) are decomposed into a set of scalar valued functions uL(t, ωk) and uR(t, ωk) defined by uL(t, ωk) = [fωk ⋆rL(t)]+ and uR(t, ωk) = [fωk ⋆rR(t)]+ (2) where fωk(t) is the linear bandpass filter for the channel with center frequency ωk. Here we use the standard gammatone filter fωk(t) = tγ−1e−t/τk cos(ωkt) with γ = 4 [8]. Following rectification there is a gain control step that is a modified version of the divisive normalization model of Schwartz and Simoncelli [9]. We introduce intermediate variables γL(t, ωk) and γR(t, ωk) that dynamically compute the intensity of the signals within each frequency channel as ˙γL(t, ωk) = −γL(t, ωk) τ + uL(t, ωk) P n aknγ(t, ωn) + σ (3) and ˙γR(t, ωk) = −γR(t, ωk) τ + uR(t, ωk) P n aknγ(t, ωn) + σ (4) where γ(t, ωn) = γL(t, ωk) + γR(t, ωk). We define the output of the cochlear filter in frequency channel k to be vL(t, ωk) = uL(t, ωk) P n aknγ(t, ωn) + σ and vR(t, ωk) = uR(t, ωk) P n aknγ(t, ωn) + σ (5) for the left and right, respectively. Note that the rectified outputs from the left and right ears, uL(t, ωk) and uR(t, ωk), are normalized by the same term so that binaural disparities are not introduced by the gain control operation. Initial cue extraction operations are performed within distinct frequency channels established by this filtering process. 4.2 Level difference cues The level difference pathway has two stages. First, the outputs of the filter banks are integrated over time to obtain windowed intensity measures for the components of the left and right ear signals. Next, signals from the left and right ears are combined within each frequency channel to measure the location dependent level difference. We compute the intensity of the signal in each frequency channel over a small time window, w(t), as: yL(t, ωk) = Z t 0 vL(σ, ωk)w(t −σ)dσ and yR(t, ωk) = Z t 0 vR(σ, ωk)w(t −σ)dσ. (6) We use a simple exponential window w(t) = e−t/τH(t) where H(t) is the unit step function. The magnitude of yL(t, ωk) and yR(t, ωk) vary with both the signal intensity and the gain of the HRIR in the frequency band centered at ωk. To compute the level difference between the input signals that is introduced by the HRIRs in a manner that is invariant to changes in the intensity of the source signal we compute z(t, ωk) = log(yR(t, ωk) yL(t, ωk)). (7) 4.3 Temporal difference cues We use a modified version of the standard windowed cross correlation operation to measure time differences. Our modifications incorporate three features that model processing in the barn owl’s auditory system. First, signals are passed through a saturating nonlinearity to model the saturation of the nucleus magnocellularis (NM) inputs to the nucleus laminaris (NL) [10]. We define χL(t, ωk) = F(vL(t, ωk)) and χR(t, ωk) = F(vR(t, ωk)), where F(·) is a saturating nonlinearity. Let x(t, ωk, m) denote the value of the cross correlation in frequency channel k at delay index m ∈{0, . . . , N}, defined by ˙x(t, ωk, m) = −x(t, ωk, m) τ(y(t, ωk)) + [χL(t −∆m, ωk) + α][χR(t −∆(N −m), ωk) + β]. (8) Here, τ(y(t, ωk)) is a time constant that varies with the intensity of the stimulus in the frequency channel where y(t, ωk) = yL(t, ωk)+yR(t, ωk). The time constant decreases as y(t, ωk) increases, so that for more intense sounds information is integrated over a smaller time window. This operation functions as a gain control and models the inhibition of NL neurons by superior olive neurons [11]. The constants α, β > 0 are included to reflect the fact that NL neurons respond to monaural stimulation, [12], and are chosen so that at input levels above threshold (0 −5 dB SPL) the cross correlation term dominates. We choose the delay increment ∆to satisfy ∆N = 200µs so that the full range of possible delays is covered. 5 Representing auditory space The general localization problem that the barn owl must solve is that of localizing multiple objects in its environment using both auditory and visual cues. An abstract discussion of a possible solution to the localization problem will motivate our model of the owl’s initial representation of auditory space. Let Ns(t) denote the number of sources at time t. Assume that each source is characterized by the direction pair (θi, φi) that obeys a dynamical system ( ˙θi, ˙φi) = f(θi, φi, µi) where µi is a noise term and f : R3 →R2 is a possibly nonlinear mapping. We assume that (θi(t), φi(t)) defines a stationary stochastic process with known density p(θi, φi) [6],[7]. At time t, let ξa t denote a vector of cues computed from auditory input and let ξv t denote a vector of cues computed from visual input. The problem is to estimate, at each time, the number and locations of sources in the environment using past measurements of the auditory and visual cues at a finite set of sample times. A simple Bayesian approach is to introduce a minimal state vector αt = [θ(t) φ(t)]T where ˙αt = f(αt, µt) and compute the posterior density of αt given the cue measurements. Here the number and locations of sources can be inferred from the existence and placement of multiple modes in the posterior. If we assume that the state sequence {αtn} is a Markov process and that the state is conditionally independent of past cue measurements given the present cue measurement, then we can recursively compute the posterior through a process of prediction and correction described by the equations p(αtn|ξt1:tn−1) = Z Z p(αtn|αtn−1)p(αtn−1|ξt1:tn−1)dαtn−1 (9) p(αtn|ξt1:tn) ∝p(ξtn|αtn)p(αtn|ξt1:tn−1) = p(ξa tn|αtn)p(ξv tn|αtn)p(αtn|ξt1:tn−1) (10) where ξt = [ξa t ξv t ]T . This formulation suggests that at each time auditory space can be represented in terms of the likelihood function p(ξa t |θ(t), φ(t)). 6 Combining temporal and intensity difference signals To facilitate the calculation of the likelihood function over the locations, we introduce compact notation for the cues derived from the auditory signals. Let x(t, ωk) = [x(t, ωk, 0), . . . , x(t, ωk, N)]/∥[x(t, ωk, 0), . . . , x(t, ωk, N)]∥be the normalized vector of cross correlations computed within frequency channel k. Let x(t) = [x(t, ω1), . . . , x(t, ωNF )] denote the spectrum of cross correlations and let z(t) = [z(t, ω1), . . . , z(t, ωNF )] denote the spectrum of level differences where NF is the number of frequency channels. Let ξa t = [x(t) z(t)]T . We assume that ξa t = [x(t) z(t)]T = [¯x(θ, φ) ¯z(θ, φ)]T + η(t) where ¯x(θ, φ) and ¯z(θ, φ) are the expected values of the cross correlation and level difference spectra, respectively, for a single source located at (θ, φ), and η(t) is Gaussian white noise [6],[7]. Experimental evidence about the nature of auditory space maps in the barn owl suggests that spatial selectivity occurs after both the combination of temporal and level difference cues and the combination of information across frequency [3],[13]. The computational model specifies that the transformation from cues computed from the auditory input signals to a representation of space occurs by performing inference on the cues through the likelihood function p(ξa t |θ, φ) = p(x(t), z(t)|θ, φ) ∝exp(−1 2∥(x(t), z(t)) −(¯x(θ, φ),¯z(θ, φ))∥2 Σ−1 n ). (11) The known physiology of the barn owl places constraints on how this likelihood function can be computed. First, the spatial tuning of auditory neurons in the optic tectum is consistent with a model where spatial selectivity arises from tuning to combinations of time difference and level difference cues within each frequency channel [14]. This suggests −50 0 50 −80 −60 −40 −20 0 20 40 60 80 θ φ 0.5 1 1.5 2 2.5 3 3.5 4 x 10−3 −50 0 50 −80 −60 −40 −20 0 20 40 60 80 θ 1 2 3 4 5 6 7 8 9 10 x 10−29 Figure 1: Non-normalized likelihood functions at t = 26 ms with sources located at (−25o, 0o) and (0o, 25o). Source signals are s1(t) = A P i cos(ωi1(t)) and s2(t) = A P j cos(ωj2(t)) where ωi1 ̸= ωj2 for any i, j. Left: Linear model of frequency combination. Right: Multiplicative model of frequency combination. that time and intensity information is initially combined multiplicatively within frequency channels. Given this constraint we propose two models of the frequency combination step. In the first model of frequency integration we assume that the likelihood is a product of kernels p(x(t), z(t)|θ, φ) ∝ Y k K(x(t, ωk), z(t, ωk); θ, φ). (12) Each kernel is a product of a temporal difference function and a level difference function to respect the first constraint, K(x(t, ωk), z(t, ωk); θ, φ) = Kx(x(t, ωk); θ, φ)Kz(z(t, ωk); θ, φ). (13) If we require that each kernel is normalized, R R K(x(t∗, ωk), z(t∗, ωk); θ, φ)dx(t∗, ωk)dz(t∗, ωk) = 1, for each t∗then the multiplicative model is a factorization of the likelihood into a product of the conditional probabilities p(x(t∗, ωk), z(t∗, ωk)|θ, φ). The second model is a linear model of frequency integration where the likelihood is approximated by a kernel estimate of the form p(x(t), z(t)|θ, φ) ∝ X k ck(y(t, ωk))K(x(t, ωk), z(t, ωk); θ, φ) (14) where each kernel is of the above product form. We again assume that the kernels are normalized, but we weight each kernel by the intensity of the signal in that frequency channel. Experiments performed in multiple source environments by Takahashi et al. suggest that information is not multiplied across frequency channels [15]. Takahashi et al. measured the response of space specific neurons in the external nucleus of the inferior colliculus under conditions of two sound sources located on the horizontal plane with each signal consisting of a unique combination of sinusoids. Their results suggest that a bump of activity will be present at each source location in the space map. Using identical stimuli (see Table 1 columns A and C in [15]) we compute the likelihood function using the linear model and the multiplicative model. The results shown in figure (1) demonstrate that with a linear model the likelihood function will display a peak corresponding to each source location, but with the multiplicative model only a spurious location that is consistent among the kernels remains and information about the two sources is lost. Therefore, we use a model in which time difference and level difference information is first combined multiplicatively within frequency channels and is then summed across frequency. 7 Examples 7.1 Parameters In each example stimuli are presented for 100 ms and HRIRs for owl 884 recorded by Keller et al., [4], are used to generate the input signals. We use six gammatone filters for each ear −50 0 50 −80 −60 −40 −20 0 20 40 60 80 θ φ 2 4 6 8 10 12 14 16 x 10−3 −50 0 50 −80 −60 −40 −20 0 20 40 60 80 θ 0.5 1 1.5 2 2.5 3 3.5 x 10−3 Figure 2: Non-normalized likelihood functions at t = 21.1 ms for a single source located at (−25o, −15o). Left: Broadband source signal at 50 dB SPL. Right: Source signal is a 7 kHz tone at 50 dB SPL. −50 0 50 −80 −60 −40 −20 0 20 40 60 80 θ φ 1 2 3 4 5 6 7 8 9 10 11 x 10−3 −50 0 50 −80 −60 −40 −20 0 20 40 60 80 θ 1 2 3 4 5 6 7 8 9 10 11 x 10−3 −50 0 50 −80 −60 −40 −20 0 20 40 60 80 θ 1 2 3 4 5 6 7 8 9 x 10−3 Figure 3: Non-normalized likelihood functions under conditions of summing localization. In each case sources are located at (−20o, 0o) and (20o, 0o) and produce scaled versions of the same waveform. Left: Left signal at 50 dB SPL, right signal at 40 dB SPL. Center: Left signal at 50 dB SPL, right signal at 50 dB SPL. Right: Left signal at 40 dB SPL, right signal at 50 dB SPL. with center frequencies {4.22, 5.14, 6.16, 7.26, 8.47, 9.76} kHz, and Q10 values chosen to match the auditory nerve fiber data of K¨oppl [16]. In each example we use a Gaussian form for the temporal and level difference kernels, Kx(x(t, ωk); θ, φ) ∝exp(−1 2∥x(t, ωk) − ¯x(θ, φ)∥2/σ2) and Kz(z(t, ωk); θ, φ) ∝exp(−1 2∥z(t, ωk) −¯z(θ, φ)∥2/σ2) where σ2 = 0.1. The terms ¯x(θ, φ) and ¯z(θ, φ) correspond to the time average of the cross correlation and level difference cues for a broadband noise stimulus. Double polar coordinates are used to describe source locations. Only locations in the frontal hemisphere are considered. Ambient noise is present at 10 dB SPL. 7.2 Single source In figure (2) we show the approximate likelihood function of equation (19) at a single time during the presentation of a broadband noise stimulus and a 7 kHz tone from direction (−25o, −15o). In response to the broadband signal there is a peak at the source location. In response to the tone there is a peak at the true location and significant peaks near (60o, −5o) and (20o, −25o). 7.3 Multiple sources In figure (3) we show the response of our model under the condition of summing localization. The top signal shown in figure (4A) was presented from (−20o, 0o) and (20o, 0o) with no delay between the two sources, but with varied intensities for each signal. In each case there is a single phantom bump at an intermediate location that is biased toward the more intense source. In figure (4) we simulate an echoic environment where the signal at the top of 4A is presented from (−20o, 0o) and a copy delayed by 2 ms shown at the bottom of 4A is presented from (20o, 0o). We plot the likelihood function at the three times indicated by vertical dotted lines in 4A. At the first time the initial signal dominates and there is a peak at the location of the leading source. At the second time when both the leading and lagging sounds have similar envelope amplitudes there is a phantom bump at an intermediate, al0 50 100 time (ms) −50 0 50 −80 −60 −40 −20 0 20 40 60 80 θ 1 2 3 4 5 6 7 8 9 10 11 x 10−4 −50 0 50 −80 −60 −40 −20 0 20 40 60 80 θ 1 2 3 4 5 6 x 10−3 −50 0 50 −80 −60 −40 −20 0 20 40 60 80 θ 1 2 3 4 5 6 x 10−3 A B C D Figure 4: Non-normalized likelihoods under simulated echoic conditions. The leading signal is presented from (−20o, 0o) and the lagging source from (20o, 0o). Both signals are presented at 50 dB SPL. A: The top signal is the leading signal and the bottom is the lagging. Vertical lines show times at which the likelihood function is plotted in B,C,D. B: Likelihood at t = 14.3 ms. C: Likelihood at t = 21.1 ms. D: Likelihood at t = 30.6 ms. though elevated, location. At the third time where the lagging source dominates there are peaks at both the leading and lagging locations. 8 Discussion We used a Bayesian approach to the localization problem faced by the barn owl to guide our modeling of the computational operations supporting sound localization in the barn owl. In the context of our computational model, auditory space is initially represented in terms of a likelihood function parameterized by time difference and level difference cues computed from the auditory input signals. In transforming auditory cues to spatial locations, the model relies on stimulus invariance in the cue values achieved by normalizing the cross correlation vector and computing a ratio of the left and right signal intensities within each frequency channel. It is not clear from existing experimental data where or if this invariance occurs in the barn owl’s auditory system. In constructing a model of the barn owl’s solution to the estimation problem, the operations that we employ are constrained to be consistent with the known physiology. As stated above, physiological data is consistent with the multiplication of temporal difference and level difference cues in each frequency channel, but not with multiplication across frequency. This model does not explain, however, across frequency nonlinearities that occur in the processing of temporal difference cues [17]. The likelihood function used in our model is a linear approximation to the likelihood specified in equation (11). The multiplicative model clearly does not explain the response of the space map to multiple sound sources producing spectrally nonoverlapping signals [15]. The linear approximation may reflect the requirement to function in a multiple source environment. We must more precisely define the multi-target tracking problem that the barn owl solves and include all relevant implementation constraints before interpreting the nature of the approximation. The tuning of space specific neurons to combinations of ITD and ILD has been interpreted as a multiplication of ITD and ILD related signals [3]. Our model suggests that, to be consistent with known physiology, the multiplication of ITD and ILD signals occurs in the medial portion of the lateral shell of the central nucleus of the inferior colliculus before frequency convergence [13]. Further experiments must be done to determine if the multiplication is a network property of the first stage of lateral shell neurons or if multiplication occurs at the level of single neurons in the lateral shell. We simulated the model’s responses under conditions of summing localization and simulated echoes. The model performs as expected for two simultaneous sources with a phantom bump occurring in the likelihood function at a location intermediate between the two source locations. Under simulated echoic conditions the likelihood shows evidence for both the leading and lagging source, but only the leading source location appears alone. This suggests that with this instantaneous estimation procedure the lagging source would be perceptible as a source location, however, possibly less so than the leading. It is likely that a feedback mechanism, such as the Bayesian filtering described in equations (14) and (15), will need to be included to explain the decreased perception of lagging sources. Acknowledgments We thank Kip Keller, Klaus Hartung, and Terry Takahashi for providing the head related transfer functions. We thank Mike Lewicki for providing the natural sound recordings. This work was supported by the Mathers Foundation. References [1] Payne, R.S., “Acoustic location of prey by barn owls (Tyto alba).”, J. Exp. Biol., 54: 535-573, 1971. [2] Knudsen, E.I., Konishi, M., “A neural map of auditory space in the owl.”, Science, 200: 795-797, 1978. [3] Pe˜na, J.L., Konishi, M., “Auditory receptive fields created by multiplication.”, Science, 292: 249252, 2001. [4] Keller, C.H., Hartung, K., Takahashi, T.T., “Head-related transfer functions of the barn owl: measurement and neural responses.”, Hearing Research, 118: 13-34, 1998. [5] Lewicki, M.S., “Efficient coding of natural sounds.”, Nature Neurosci., 5(4): 356-363, 2002. [6] Martin, K.D., “A computational model of spatial hearing.”, Masters thesis, MIT, 1995. [7] Duda, R.O., “Elevation dependence of the interaural transfer function.”, In Gilkey, R. and Anderson, T.R. (eds.), Binaural and Spatial Hearing, 49-75, 1994. [8] Slaney, M., “Auditory Toolbox.”, Apple technical report 45, Apple Computer Inc., 1994. [9] Schwartz, O., Simoncelli, E.P., “Natural signal statistics and sensory gain control.”, Nature Neurosci., 4(8): 819-825, 2001. [10] Sullivan, W.E., Konishi, M., “Segregation of stimulus phase and intensity coding in the cochlear nucleus of the barn owl.”, J. Neurosci., 4(7): 1787-1799, 1984. [11] Yang, L., Monsivais, P., Rubel, E.W., “The superior olivary nucleus and its influence on nucleus laminaris: A source of inhibitory feedback for coincidence detection in the avian auditory brainstem.”, J. Neurosci., 19(6): 2313-2325, 1999. [12] Carr, C.E., Konishi, M., “A circuit for detection of interaural time differences in the brain stem of the barn owl.” J. Neurosci., 10(10): 3227-3246, 1990. [13] Mazer, J.A., “Integration of parallel processing streams in the inferior colliculus of the barn owl.”, Ph.D thesis, Caltech 1995. [14] Brainard, M.S., Knudsen, E.I., Esterly, S.D., “Neural derivation of sound source location: Resolution of spatial ambiguities in binaural cues.”, J. Acoust. Soc. Am., 91(2): 1015-1026, 1992. [15] Takahashi, T.T., Keller, C.H., “Representation of multiple sources in the owl’s auditory space map.”, J. Neurosci., 14(8): 4780-4793, 1994. [16] K¨oppl, C., “Frequency tuning and spontaneous activity in the auditory nerve and cochlear nucleus magnocellularis of the barn owl Tyto alba.”, J. Neurophys., 77: 364-377, 1997. [17] Takahashi, T.T., Konishi, M., “Selectivity for interaural time difference in the owl’s midbrain.”, J. Neurosci., 6(12): 3413-3422, 1986.
2003
122
2,335
Gaussian Process Latent Variable Models for Visualisation of High Dimensional Data Neil D. Lawrence Department of Computer Science, University of Sheffield, Regent Court, 211 Portobello Street, Sheffield, S1 4DP, U.K. neil@dcs.shef.ac.uk Abstract In this paper we introduce a new underlying probabilistic model for principal component analysis (PCA). Our formulation interprets PCA as a particular Gaussian process prior on a mapping from a latent space to the observed data-space. We show that if the prior’s covariance function constrains the mappings to be linear the model is equivalent to PCA, we then extend the model by considering less restrictive covariance functions which allow non-linear mappings. This more general Gaussian process latent variable model (GPLVM) is then evaluated as an approach to the visualisation of high dimensional data for three different data-sets. Additionally our non-linear algorithm can be further kernelised leading to ‘twin kernel PCA’ in which a mapping between feature spaces occurs. 1 Introduction Visualisation of high dimensional data can be achieved through projecting a data-set onto a lower dimensional manifold. Linear projections have traditionally been preferred due to the ease with which they can be computed. One approach to visualising a data-set in two dimensions is to project the data along two of its principal components. If we were forced to choose a priori which components to project along, we might sensibly choose those associated with the largest eigenvalues. The probabilistic reformulation of principal component analysis (PCA) also informs us that choosing the first two components is also the choice that maximises the likelihood of the data [11]. 1.1 Integrating Latent Variables, Optimising Parameters Probabilistic PCA (PPCA) is formulated as a latent variable model: given a set centred of -dimensional data    and denoting the latent variable associated with each datapoint   we may write the likelihood for an individual data-point under the PPCA model as                "!   where     is Gaussian distributed with unit covariance,            , and               . The solution for  can then be found1 by assuming that   is i.i.d. and maximising the likelihood of the data-set,            where       T is the  design matrix. Probabilistic principal component analysis and other latent variable models, such as factor analysis (FA) or independent component analysis (ICA), require a marginalisation of the latent variables and optimisation of the parameters. In this paper we consider the dual approach of marginalising  and optimising each   . This probabilistic model also turns out to be equivalent to PCA. 1.2 Integrating Parameters, Optimising Latent Variables By first specifying a prior distribution,            where   is the  th row of the matrix  , and integrating over  we obtain a marginalised likelihood for ,   !    " $#&% ('*) +  , ' +.-0/21 354 " # tr  ,  6 T 87  (1) where , 9:!;! T <    and ! =       T. The corresponding log-likelihood is then >  4 ? #A@CB D#E%  4 #F@CB  ,  4 " # tr  ,  6 T  (2) Now that the parameters are marginalised we may focus on optimisation of the likelihood with respect to the ! . The gradients of (2) with respect to ! may be found as, G > G ! H:,  ; T ,  ! 4  ,  !  which implies that at our solution " ; T ,  ! H!  some algebraic manipulation of this formula [11] leads to ! JILK MON T where ILK is an PRQ matrix ( Q is the dimension of the latent space) whose columns are eigenvectors of 6 T, M is a QSTQ diagonal matrix whose U th element is VXW  Y[Z8\ ]  4 ^ ]:_ a` + , where b W is the U th eigenvalue of ; T, and N is an arbitrary QcdQ orthogonal matrix2. Note that the eigenvalue problem we have developed can easily be shown to be equivalent to that solved in PCA (see e.g. [10]), indeed the formulation of PCA in this manner is a key step in the development of kernel PCA [9] where ; T is replaced with a kernel. Our probabilistic PCA model shares an underlying structure with [11] but differs in that where they optimise we marginalise and where they marginalise we optimise. The marginalised likelihood we are optimising in (1) is recognised as the product of independent Gaussian processes where the (linear) covariance function is given by e!6! T <   . Therefore a natural extension is the non-linearisation of the mapping from latent space to the data space through the introduction of a non-linear covariance function. 1As can the solution for f but since the solution for g is not dependent on f we will disregard it. 2For independent component analysis the correct rotation matrix h must also be found, here we have placed no constraints on the orientation of the axes so this matrix cannot be recovered. 2 Gaussian Process Latent Variable Models We saw in the previous section how PCA can be interpreted as a Gaussian process ‘mapping3’ from a latent space to a data space where the locale of the points in latent space is determined by maximising the Gaussian process likelihood with respect to ! . We will refer to models of this class as Gaussian process latent variable models (GPLVM). Principal component analysis is a GPLVM where the process prior is based on the  [ inner product matrix of ! , in this section we develop an alternative GPLVM by considering a prior which allows for non-linear processes, specifically we focus on the popular ‘RBF kernel’ which takes the form      / 1 Y 4 #    4    T    4    _ <     where    is the element in the th row and th column of , ,  is a scale parameter and    denotes the Kronecker delta. Gradients of (2) with respect to the latent points can be found through combining G > G ,  ,  6 T ,  4 ,   with    \ via the chain rule. These gradients may be used in combination with (2) in a non-linear optimiser such as scaled conjugate gradients (SCG) [7] to obtain a latent variable representation of the data. Furthermore gradients with respect to the parameters of the kernel matrix may be computed and used to jointly optimise ! ,  ,  and  . The solution for ! will naturally not be unique; even for the linear case described above the solution is subject to an arbitrary rotation, here we may expect multiple local minima. 2.1 Illustration of GPLVM via SCG To illustrate a simple Gaussian process latent variable model we turn to the ‘multi-phase oil flow’ data [2]. This is a twelve dimensional data-set containing data of three known classes corresponding to the phase of flow in an oil pipeline: stratified, annular and homogeneous. In this illustration, for computational reasons, the data is sub-sampled to 100 data-points. Figure 1 shows visualisations of the data using both PCA and our GPLVM algorithm which required 766 iterations of SCG. The ! positions for the GPLVM model were initialised using PCA (see http://www.dcs.shef.ac.uk/~neil/gplvm/ for the MATLAB code used). The gradient based optimisation of the RBF based GPLVM’s latent space shows results which are clearly superior (in terms of greater separation between the different flow domains) to those achieved by the linear PCA model. Additionally the use of a Gaussian process to perform our ‘mapping’ means that there is uncertainty in the positions of the points in the data space. For our formulation the level of uncertainty is shared across all4 dimensions and thus may be visualised in the latent space. In Figure 1 (and subsequently) this is done through varying the intensity of the background pixels. Unfortunately, a quick analysis of the complexity of the algorithm shows that each gradient step requires an inverse of the kernel matrix, an  D operation, rendering the algorithm impractical for many data-sets of interest. 3Strictly speaking the model does not represent a mapping as a Gaussian process ‘maps’ to a distribution in data space rather than a point. 4This apparent weakness in the model may be easily rectified to allow different levels of uncertainty for each output dimension, our more constrained model allows us to visualise this uncertainty in the latent space and is therefore preferred for this work. −0.8 −0.6 −0.4 −0.2 0 0.2 0.4 0.6 −0.5 −0.4 −0.3 −0.2 −0.1 0 0.1 0.2 0.3 −0.2 −0.1 0 0.1 0.2 0.3 −0.25 −0.2 −0.15 −0.1 −0.05 0 0.05 0.1 0.15 0.2 0.4 0.6 0.8 1 1.2 1.4 1.6 1.8 2 2.2 2.4 Figure 1: Visualisation of the Oil data with (a) PCA (a linear GPLVM) and (b) A GPLVM which uses an RBF kernel. Crosses, circles and plus signs represent stratified, annular and homogeneous flows respectively. The greyscales in plot (b) indicate the precision with which the manifold was expressed in data-space for that latent point. The optimised parameters of the kernel were  ,    and f   . 2.2 A Practical Algorithm for GPLVMs There are three main components to our revised, computationally efficient, optimisation process: Sparsification. Kernel methods may be sped up through sparsification, i.e. representing the data-set by a subset,  , of ! points known as the active set. The remainder, the inactive set, is denoted by  . We make use of the informative vector machine [6] which selects points sequentially according to the reduction in the posterior process’s entropy that they induce. Latent Variable Optimisation. A point from the inactive set, U , can be shown to project into the data space as a Gaussian distribution   W   W          W   W  W  (3) whose mean is  W  T ,       W where ,    denotes the kernel matrix developed from the active set and    W is a column vector consisting of the elements from the U th column of , that correspond to the active set. The variance is   W     W   W  4  T   W ,        W  Note that since  W does not appear in the inverse, gradients with respect to  W do not depend on other data in  . We can therefore independently optimise the likelihood of each  W with respect to each  W . Thus the full set ! can be optimised with one pass through the data. Kernel Optimisation. The likelihood of the active set is given by     " #&%  ' +  ,     ` + /21 3 4 " # T  ,      7  (4) which can be optimised5 with respect to  ,  and  with gradient evaluations costing   !   Algorithm 1 summarises the order in which we implemented these steps. Note that whilst we never optimise points in the active set, we repeatedly reselect the active set so it is 5 In practice we looked for MAP solutions for all our optimisations, specifying a unit covariance Gaussian prior for the matrix  and using   ,  0f and  for , f and respectively. Algorithm 1 An algorithm for modelling with a GPLVM. Require: A size for the active set, ! . A number of iterations, . Initialise ! through PCA. for iterations do Select a new active set using the IVM algorithm. Optimise (4) with respect to the parameters of , using scaled conjugate gradients. Select a new active set. for Each point not in active set, U . do Optimise (3) with respect to  W using scaled conjugate gradients. end for end for unlikely that many points remain in their original location. For all the experiments that follow we used  "  iterations and an active set of size ! "   . The experiments were run on a ‘one-shot’ basis6 so we cannot make statements as to the effects that significant modification of these parameters would have. We present results on three data-sets: for the oil flow data (Figure 2) from the previous section we now make use of all 1000 available points and we include a comparison with the generative topographic mapping (GTM) [4]. −1 −0.8 −0.6 −0.4 −0.2 0 0.2 0.4 0.6 0.8 1 −1 −0.8 −0.6 −0.4 −0.2 0 0.2 0.4 0.6 0.8 1 −3 −2 −1 0 1 2 3 −2.5 −2 −1.5 −1 −0.5 0 0.5 1 1.5 2 0.8 1 1.2 1.4 1.6 1.8 Figure 2: The full oil flow data-set visualised with (a) GTM with 225 latent points laid out on a     grid and with 16 RBF nodes and (b) an RBF based GPLVM. The parameters of the latent variable model were found to be    , f   and  . Notice how the GTM artificially ‘discretises’ the latent space around the locations of the 225 latent points. We follow [5] in our 2-D visualisation of a sub-set of 3000 of the digits 0-4 (600 of each digit) from a "  " greyscale version of the USPS digit data-set (Figure 3). Finally we modelled a face data-set [8] consisting of 1965 images from a video sequence digitised at #  #  . Since the images are originally from a video sequence we might expect the underlying dimensionality of the data to be one — the images are produced in a smooth way over time which can be thought of as a piece of string embedded in a high (560) dimensional pixel space. We therefore present ordered results from a 1-D visualisation in Figure 4 . All the code used for performing the experiments is available from http://www.dcs. 6By one-shot we mean that, given the algorithm above, each experiment was only run once with one setting of the random seed and the values of  and  given. If we were producing a visualisation for only one dataset this would leave us open to the criticism that our one-shot result was ‘lucky’. However we present three data-sets in what follows and using a one-shot approach in problems with multiple local minima removes the temptation of preferentially selecting ‘prettier’ results. −4 −2 0 2 4 −4 −2 0 2 4 0.4 0.45 0.5 0.55 0.6 0.65 0.7 0.75 0.8 Figure 3: The digit images visualised in the 2-D latent space. We followed [5] in plotting images in a random order but not plotting any image which would overlap an existing image. 538 of the 3000 digits are plotted. Note how little space is taken by the ‘ones’ (the thin line running from (-4, -1.5) to (-1, 0)) in our visualisation, this may be contrasted with the visualisation of a similar data-set in [5]. We suggest this is because ‘ones’ are easier to model and therefore do not require a large region in latent space. shef.ac.uk/~neil/gplvm/ along with avi video files of the 1-D visualisation and results from two further experiments on the same data (a 1-D GPLVM model of the digits and a 2-D GPLVM model of the faces). 3 Discussion Empirically the RBF based GPLVM model gives useful visualisations of a range of datasets. Strengths of the method include the ability to optimise the kernel parameters and to generate fantasy data from any point in latent space. Through the use of a probabilistic process we can obtain error bars on the position of the manifolds which can be visualised by imposing a greyscale image upon the latent space. When Kernels Collide: Twin Kernel PCA The eigenvalue problem which provides the maxima of (2) with respect to ! for the linear kernel is exploited in kernel PCA. One could consider a ‘twin kernel’ PCA where both e!6! T <   and 6 T are replaced by kernel functions. Twin kernel PCA could no longer be undertaken with an eigenvalue decomposition but Algorithm 1 would still be a suitable mechanism with which to determine the values of ! and the parameters of ! ’s kernel. Figure 4: Top: Fantasy faces from the 1-D model for the face data. These faces were created by taking 64 uniformly spaced and ordered points from the latent space and visualising the mean of their distribution in data space. The plots above show this sequence unfolding (starting at the top left and moving right). Ideally the transition between the images should be smooth. Bottom: Examples from the data-set which are closest to the corresponding fantasy images in latent space. Full sequences of 2000 fantasies and the entire dataset are available on the web as avi files. Stochastic neighbor embedding. Consider that (2) could be written as >       ,   @CB      ,  "!  where we have introduced a vector,  , of length  , ,    6 T and we have redefined , as ,  . The entropy of       ,   is constant7 in ! , we therefore may add it to > to obtain KL             ,   @CB      ,        ,   !   (5) which is recognised Kullback-Leibler (KL) divergence between the two distributions. Stochastic neighbor embedding (SNE) [5] also minimises this KL divergence to visualise data. However in SNE the vector  is discrete. Generative topographic mapping. The Generative topographic mapping [3] makes use of a radial basis function network to perform the mapping from latent space to observed space. Marginalisation of the latent space is achieved with an expectation-maximisation 7Computing the entropy requires   to be of full rank, this is not true in general but can be forced by adding ‘jitter’ to   , e.g.      . (EM) algorithm. A radial basis function network is a special case of a generalised linear model and can be interpreted as a Gaussian process. Under this interpretation the GTM becomes GPLVM with a particular covariance function. The special feature of the GTM is the manner in which the latent space is represented, as a set of uniformly spaced delta functions. One could view the GPLVM as having a delta function associated with each data-point: in the GPLVM the positions of the delta functions are optimised, in the GTM each data point is associated with several different fixed delta functions. 4 Conclusions We have presented a new class of models for probabilistic modelling and visualisation of high dimensional data. We provided strong theoretical grounding for the approach by proving that principal component analysis is a special case. On three real world data-sets we showed that visualisations provided by the model cluster the data in a reasonable way. Our model has an advantage over the various spectral clustering algorithms that have been presented in recent years in that, in common with the GTM, it is truly generative with an underlying probabilistic interpretation. However it does not suffer from the artificial ‘discretetisation’ suffered by the GTM. Our theoretical analysis also suggested a novel non-linearisation of PCA involving two kernel functions. Acknowledgements We thank Aaron Hertzmann for comments on the manuscript. References [1] S. Becker, S. Thrun, and K. Obermayer, editors. Advances in Neural Information Processing Systems, volume 15, Cambridge, MA, 2003. MIT Press. [2] C. M. Bishop and G. D. James. Analysis of multiphase flows using dual-energy gamma densitometry and neural networks. Nuclear Instruments and Methods in Physics Research, A327:580– 593, 1993. [3] C. M. Bishop, M. Svensén, and C. K. I. Williams. GTM: a principled alternative to the SelfOrganizing Map. In Advances in Neural Information Processing Systems, volume 9, pages 354–360. MIT Press, 1997. [4] C. M. Bishop, M. Svensén, and C. K. I. Williams. GTM: the Generative Topographic Mapping. Neural Computation, 10(1):215–234, 1998. [5] G. Hinton and S. Roweis. Stochastic neighbor embedding. In Becker et al. [1], pages 857–864. [6] N. D. Lawrence, M. Seeger, and R. Herbrich. Fast sparse Gaussian process methods: The informative vector machine. In Becker et al. [1], pages 625–632. [7] I. T. Nabney. Netlab: Algorithms for Pattern Recognition. Advances in Pattern Recognition. Springer, Berlin, 2001. Code available from http://www.ncrg.aston.ac.uk/netlab/. [8] S. Roweis, L. K. Saul, and G. Hinton. Global coordination of local linear models. In T. G. Dietterich, S. Becker, and Z. Ghahramani, editors, Advances in Neural Information Processing Systems, volume 14, pages 889–896, Cambridge, MA, 2002. MIT Press. [9] B. Schölkopf, A. J. Smola, and K.-R. Müller. Kernel principal component analysis. In Proceedings 1997 International Conference on Artificial Neural Networks, ICANN’97, page 583, Lausanne, Switzerland, 1997. [10] M. E. Tipping. Sparse kernel principal component analysis. In T. K. Leen, T. G. Dietterich, and V. Tresp, editors, Advances in Neural Information Processing Systems, volume 13, pages 633–639, Cambridge, MA, 2001. MIT Press. [11] M. E. Tipping and C. M. Bishop. Probabilistic principal component analysis. Journal of the Royal Statistical Society, B, 6(3):611–622, 1999.
2003
123
2,336
Tree-structured approximations by expectation propagation Thomas Minka Department of Statistics Carnegie Mellon University Pittsburgh, PA 15213 USA minka@stat.cmu.edu Yuan Qi Media Laboratory Massachusetts Institute of Technology Cambridge, MA 02139 USA yuanqi@media.mit.edu Abstract Approximation structure plays an important role in inference on loopy graphs. As a tractable structure, tree approximations have been utilized in the variational method of Ghahramani & Jordan (1997) and the sequential projection method of Frey et al. (2000). However, belief propagation represents each factor of the graph with a product of single-node messages. In this paper, belief propagation is extended to represent factors with tree approximations, by way of the expectation propagation framework. That is, each factor sends a “message” to all pairs of nodes in a tree structure. The result is more accurate inferences and more frequent convergence than ordinary belief propagation, at a lower cost than variational trees or double-loop algorithms. 1 Introduction An important problem in approximate inference is improving the performance of belief propagation on loopy graphs. Empirical studies have shown that belief propagation (BP) tends not to converge on graphs with strong positive and negative correlations (Welling & Teh, 2001). One approach is to force the convergence of BP, by appealing to a freeenergy interpretation (Welling & Teh, 2001; Teh & Welling, 2001; Yuille, In press 2002). Unfortunately, this doesn’t really solve the problem because it dramatically increases the computational cost and doesn’t necessarily lead to good results on these graphs (Welling & Teh, 2001). The expectation propagation (EP) framework (Minka, 2001a) gives another interpretation of BP, as an algorithm which approximates multi-variable factors by single-variable factors (f(x1, x2) →˜f1(x1) ˜f2(x2)). This explanation suggests that it is BP’s target approximation which is to blame, not the particular iterative scheme it uses. Factors which encode strong correlations should not be well approximated in this way. The connection between failure to converge and poor approximation holds true for EP algorithms in general, as shown by Minka (2001a) and Heskes & Zoeter (2002). Yedidia et al. (2000) describe an extension of BP involving the Kikuchi free-energy. The resulting algorithm resembles BP on a graph of node clusters, where again multi-variable factors are decomposed into independent parts (f(x1, x2, x3) →˜f1(x1) ˜f23(x2, x3)). In this paper, the target approximation of BP is enriched by exploiting the connection to expectation propagation. Instead of approximating each factor by disconnected nodes or clusters, it is approximated by a tree distribution. The algorithm is a strict generalization of belief propagation, because if the tree has no edges, then the results are identical to (loopy) belief propagation. This approach is inspired by previous work employing trees. For example, Ghahramani & Jordan (1997) showed that tree structured approximations could improve the accuracy of variational bounds. Such bounds are tuned to minimize the ‘exclusive’ KL-divergence KL(q||p), where q is the approximation. Frey et al. (2000) criticized this error measure and described an alternative method for minimizing the ‘inclusive’ divergence KL(p||q). Their method, which sequentially projects graph potentials onto a tree structure, is closely related to expectation propagation and the method in this paper. However, their method is not iterative and therefore sensitive to the order in which the potentials are sequenced. There are also two tangentially related papers by Wainwright et al. (2001); Wainwright et al. (2002). In the first paper, a “message-free” version of BP was derived, which used multiple tree structures to propagate evidence. The results it gives are nevertheless the same as BP. In the second paper, tree structures were used to obtain an upper bound on the normalizing constant of a Markov network. The trees produced by that method do not necessarily approximate the original distribution well. The following section describes the EP algorithm for updating the potentials of a tree approximation with known structure. Section 3 then describes the method we use to choose the tree structure. Section 4 gives numerical results on various graphs, comparing the new algorithm to BP, Kikuchi, and variational methods. 2 Updating the tree potentials This section describes an expectation-propagation algorithm to approximate a given distribution (of arbitrary structure) by a tree with known structure. It elaborates section 4.2.2 of Minka (2001b), with special attention to efficiency. Denote the original distribution by p(x), written as a product of factors: p(x) = Y i fi(x) (1) For example, if p(x) is a Bayesian network or Markov network, the factors are conditional probability distributions or potentials which each depend on a small subset of the variables in x. In this paper, the variables are assumed to be discrete, so that the factors fi(x) are simply multidimensional tables. 2.1 Junction tree representation The target approximation q(x) will have pairwise factors along a tree T : q(x) = Q (j,k)∈T q(xj, xk) Q s∈S q(xs) (2) In this notation, q(xs) is the marginal distribution for variable xs and q(xj, xk) is the marginal distribution for the two variables xj and xk. These are going to be stored as multidimensional tables. The division is necessary to cancel over-counting in the numerator. A useful way to organize these divisions is to construct a junction tree connecting the cliques (j, k) ∈T (Jensen et al., 1990). This tree has a different structure than T —the nodes in the junction tree represent cliques in T , and the edges in the junction tree represent variables which are shared between cliques. These separator variables S in the junction tree are p q junction tree of q Figure 1: Approximating a complete graph p by a tree q. The junction tree of q is used to organize computations. exactly the variables that go in the denominator of (2). Note that the same variable could be a separator more than once, so technically S is a multiset. Figure 1 shows an example of how this all works. We want to approximate the distribution p(x), which has a complete graph, by q(x), whose graph is a spanning tree. The marginal representation of q can be directly read off of the junction tree: q(x) = q(x1, x4)q(x2, x4)q(x3, x4) q(x4)q(x4) (3) 2.2 EP updates The algorithm iteratively tunes q(x) so that it matches p(x) as closely as possible, in the sense of ‘inclusive’ KL-divergence. Specifically, q tries to preserve the marginals and pairwise marginals of p: q(xj) ≈ p(xj) (4) q(xj, xk) ≈ p(xj, xk) (j, k) ∈T (5) Expectation propagation is a general framework for approximating distributions of the form (1) by approximating the factors one by one. The final approximation q is then the product of the approximate factors. The functional form of the approximate factors is determined by considering the ratio of two different q’s. In our case, this leads to approximations of the form fi(x) ≈˜fi(x) = Q (j,k)∈T ˜fi(xj, xk) Q s∈S ˜fi(xs) (6) A product of such factors gives a distribution of the desired form (2). Note that ˜fi(xj, xk) is not a proper marginal distribution, but just a non-negative function of two variables. The algorithm starts by initializing the clique and separator potentials on the junction tree to 1. If a factor in p only depends on one variable, or variables which are adjacent in T , then its approximation is trivial. It can be multiplied into the corresponding clique potential right away and removed from further consideration. The remaining factors in p, the off-tree factors, have their approximations ˜fi initialized to 1. To illustrate, consider the graph of figure 1. Suppose all the potentials in p are pairwise, one for each edge. The edges {(1, 4), (2, 4), (3, 4)} are absorbed directly into q. The off-tree edges are {(1, 2), (1, 3), (2, 3)}. The algorithm then iteratively passes through the off-tree factors in p, performing the following three steps until all ˜fi converge: (a) Deletion. Remove ˜fi from q to get an ‘old’ approximation q\i: q\i(xj, xk) = q(xj, xk) ˜fi(xj, xk) (j, k) ∈T (7) q\i(xs) = q(xs) ˜fi(xs) s ∈S (8) (b) Incorporate evidence. Form the product fi(x)q\i(x), by considering f(x) as ‘evidence’ for the junction tree. Propagate the evidence to obtain new clique marginals q(xj, xk) and separators q(xs) (details below). (c) Update. Re-estimate ˜fi by division: ˜fi(xj, xk) = q(xj, xk) q\i(xj, xk) (j, k) ∈T (9) ˜fi(xs) = q(xs) q\i(xs) s ∈S (10) 2.3 Incorporating evidence by cutset conditioning The purpose of the “incorporate evidence” step is to find a distribution q minimizing KL(fi(x)q\i || q). This is equivalent to matching the marginal distributions corresponding to each clique in q. By definition, fi depends on a set of variables which are not adjacent in T , so the graph structure corresponding to fi(x)q\i(x) is not a tree, but has one or more loops. One approach is to apply a generic exact inference algorithm to fi(x)q\i(x) to obtain the desired marginals, e.g. construct a new junction tree in which fi(x) is a clique and propagate evidence in this tree. But this does not exploit the fact that we already have a junction tree for q\i on which we can perform efficient inference. Instead we use a more efficient approach—Pearl’s cutset conditioning algorithm—to incorporate the evidence. Suppose fi(x) depends on a set of variables V. The domain of fi(x) is the set of all possible assignments to V. Find the clique (j, k) ∈T which has the largest overlap with this domain—call this the root clique. Then enumerate the rest of the domain V\(xj, xk). For each possible assignment to these variables, enter it as evidence in q’s junction tree and propagate to get marginals and an overall scale factor (which is the probability of that assignment). When the variables V\(xj, xk) are fixed, entering evidence simply reduces to zeroing out conflicting entries in the junction tree, and multiplying the root clique (j, k) by fi(x). After propagating evidence multiple times, average the results together according to their scale factors, to get the final marginals and separators of q. Continuing the example of figure 1, suppose we want to process edge (1, 2), whose factor is f1(x1, x2). When added to q, this creates a loop. We cut the loop by conditioning on the variable with smallest arity. Suppose x1 is binary, so we condition on it. The other clique, (2, 4), becomes the root. In one case, the evidence is (x1 = 0, f1(0, x2)) and in the other it is (x1 = 1, f1(1, x2)). Propagating evidence for both cases and averaging the results gives the new junction tree potentials. Because it is an expectation-propagation algorithm, we know that a fixed point always exists, but we may not always find one. In these cases, the algorithm could be stabilized by a stepsize or double-loop iteration. But overall the method is very stable, and in this paper no convergence control is used. 2.4 Within-loop propagation A further optimization is also used, by noting that evidence does not need to be propagated to the whole junction tree. In particular, it only needs to be propagated within the subtree that connects the nodes in V. Evidence propagated to the rest of the tree will be exactly canceled by the separators, so even though the potentials may change, the ratios in (2) will not. For example, when we process edge (1, 2) in figure 1, there is no need to propagate evidence to clique (3, 4), because when q(x3, x4) is divided by the separator q(x4), we have q(x3|x4) which is the same before and after the evidence. Thus evidence is propagated as follows: first collect evidence from V to the root, then distribute evidence from the root back to V, bypassing the rest of the tree (these operations are defined formally by Jensen et al. (1990)). In the example, this means we collect evidence from clique (1, 4) to the root (2, 4), then distribute back from (2, 4) to (1, 4), ignoring (3, 4). This simplification also means that we don’t need to store ˜fi for the cliques that are never updated by factor i. When moving to the next factor, once we’ve designated the root for that factor, we collect evidence from the previous root. In this way, the results are the same as if we always propagated evidence to the whole junction tree. 3 Choosing the tree structure This section describes a simple method to choose the tree structure. It leaves open the problem of finding the ‘optimal’ approximation structure; instead, it presents a simple rule which works reasonably well in practice. Intuitively, we want edges between the variables which are the most correlated. The approach is based on Chow & Liu (1968): estimate the mutual information between adjacent nodes in p’s graph, call this the ‘weight’ of the edge between them, and then find the spanning tree with maximal total weight. The mutual information between nodes requires an estimate of their joint distribution. In our implementation, this is obtained from the product of factors involving only these two nodes, i.e. the single-node potentials times the edge between them. While crude, it does capture the amount of correlation provided by the edge, and thus whether we should have it in the approximation. 4 Numerical results 4.1 The four-node network This section illustrates the algorithm on a concrete problem, comparing it to other methods for approximate inference. The network and approximation will be the ones pictured in figure 1, with all nodes binary. The potentials were chosen randomly and can be obtained from the authors’ website. Five approximate inference methods were compared. The proposed method (TreeEP) used the tree structure specified in figure 1. Mean-field (MF) fit a variational bound with independent variables, and TreeVB fit a tree-structured variational bound, with the same structure as TreeEP. TreeVB was implemented using the general method described by Wiegerinck (2000), with the same junction tree optimizations as in TreeEP. Generalized belief propagation (GBP) was implemented using the parent-child algorithm of Yedidia et al. (2002) (with special attention to the damping described in section 8). We also used GBP to perform ordinary loopy belief propagation (BP). Our implementation tries to be efficient in terms of FLOPS, but we do not know if it is the fastest possible. GBP and BP were first run using stepsize 0.5, and if didn’t converge, halved it and started over. The time for these ‘trial runs’ was not counted. Method FLOPS E[x1] E[x2] E[x3] E[x4] Error Exact 200 0.474 0.468 0.482 0.536 0 TreeEP 800 0.467 0.459 0.477 0.535 0.008 GBP 2200 0.467 0.459 0.477 0.535 0.008 TreeVB 11700 0.460 0.460 0.476 0.540 0.014 BP 500 0.499 0.499 0.5 0.501 0.035 MF 11500 0.000 0.000 0.094 0.946 0.474 Table 1: Node means estimated by various methods (TreeEP = the proposed method, BP = loopy belief propagation, GBP = generalized belief propagation on triangles, MF = meanfield, TreeVB = variational tree). FLOPS are rounded to the nearest hundred. The algorithms were all implemented in Matlab using Kevin Murphy’s BNT toolbox (Murphy, 2001). Computational cost was measured by the number of floating-point operations (FLOPS). Because the algorithms are iterative and can be stopped at any time to get a result, we used a “5% rule” to determine FLOPS. The algorithm was run for a large number of iterations, and the error at each iteration was computed. At each iteration, we then get an error bound, which is the maximum error from that iteration onwards. The first iteration whose error bound is within 5% of the final error is chosen for the official FLOP count. (The official error is still the final error.) The results are shown in table 1. TreeEP is more accurate than BP, with less cost than TreeVB and GBP. GBP was run with clusters {(1, 2, 4), (1, 3, 4), (2, 3, 4)}. This gives the same result as TreeEP, because these clusters are exactly the off-tree loops. 4.2 Complete graphs The next experiment tests the algorithms on complete graphs of varying size. The graphs have random single-node and pairwise potentials, of the form fi(xj) = [exp(θj) exp(−θj)] and fi(xj, xk) = " exp(wjk) exp(−wjk) exp(−wjk) exp(wjk) # . The “external fields” θj were drawn independently from a Gaussian with mean 0 and standard deviation 1. The “couplings” wjk were drawn independently from a Gaussian with mean 0 and standard deviation 3/√n −1, where n is the number of nodes. Each node has n −1 neighbors, so this tries to keep the overall coupling level constant. Figure 2(a) shows the approximation error as n increases. For each n, 10 different potentials were drawn, giving 110 networks in all. For each one, the maximum absolute difference between the estimated means and exact means was computed. These errors are averaged over potentials and shown separately for each graph size. TreeEP and TreeVB always used the same structure, picked according to section 3. TreeEP outperforms BP consistently, but TreeVB does not. For this type of graph, we found that GBP works well with clusters in a ‘star’ pattern, i.e. the clusters are {(1, 2, 3), (1, 3, 4), (1, 4, 5), ..., (1, n, 2)}. Node ‘1’ is the center of the star, and was chosen to be the node with highest average coupling to its neighbors. As shown in figure 2(a), this works much better than using all triples of nodes, as done by Kappen & Wiegerinck (2001). Note that if TreeEP is given a similar ‘star’ structure, the results are the same as GBP. This is because the GBP clusters coincide with the off-tree loops. In general, if the off-tree loops are triangles, then GBP on those triangles will give identical results. Figure 2(b) shows the cost as n increases. TreeEP and TreeVB scale the best, with TreeEP being the fastest method on large graphs. 4 6 8 10 12 14 10 −2 10 −1 # of nodes Error BP GBP−star/TreeEP−star TreeEP TreeVB GBP−triples 4 6 8 10 12 14 10 3 10 4 10 5 10 6 # of nodes FLOPS Exact BP GBP−star TreeEP TreeVB (a) (b) Figure 2: (a) Error in the estimated means for complete graphs with randomly chosen potentials. Each point is an average over 10 potentials. (b) Average FLOPS for the results in (a). 20 40 60 80 100 120 10 −5 10 −4 10 −3 10 −2 # of nodes Error BP GBP−squares TreeEP TreeVB 20 40 60 80 100 120 10 3 10 4 10 5 10 6 10 7 # of nodes FLOPS Exact BP GBP−squares TreeEP TreeVB (a) (b) Figure 3: (a) Error in the estimated means for grid graphs with randomly chosen potentials. Each point is an average over 10 potentials. (b) Average FLOPS for the results in (a). 4.3 Grids The next experiment tests the algorithms on square grids of varying size. The external fields θj were drawn as before, and the couplings wjk had standard deviation 1. The GBP clusters were overlapping squares, as in Yedidia et al. (2000). Figure 3(a) shows the approximation error as n increases, with results averaged over 10 trials as in the previous section. TreeVB performs consistently worse than BP, even though it is using the same tree structures as TreeEP. The plot also shows that these structures, being automatically chosen, are not as good as the hand-crafted clusters used by GBP. We have hand-crafted tree structures that perform just as well on grids, but for simplicity we do not include these results. Figure 3(b) shows that TreeEP is the fastest on large grids, even faster than BP, because BP must use increasingly smaller stepsizes. GBP is more than a factor of ten slower. 5 Conclusions Tree approximation allows a smooth tradeoff between cost and accuracy in approximate inference. It improves on BP for a modest increase in cost. In particular, when ordinary BP doesn’t converge, TreeEP is an attractive alternative to damping or double-loop iteration. TreeEP performs better than the corresponding variational bounds, because it minimizes the inclusive KL-divergence. We found that TreeEP was equivalent to GBP in some cases, which deserves further study. We hope that these results encourage more investigation into approximation structure for inference algorithms, such as finding the ‘optimal’ structure for a given problem. There are many other opportunities for special approximation structure to be exploited, especially in hybrid networks, where not only do the independence assumptions matter but also the distributional forms. Acknowledgments We thank an anonymous reviewer for advice on comparisons to GBP. References Chow, C. K., & Liu, C. N. (1968). Approximating discrete probability distributions with dependence trees. IEEE Transactions on Information Theory, 14, 462–467. Frey, B. J., Patrascu, R., Jaakkola, T., & Moran, J. (2000). Sequentially fitting inclusive trees for inference in noisy-OR networks. NIPS 13. Ghahramani, Z., & Jordan, M. I. (1997). Factorial hidden Markov models. Machine Learning, 29, 245–273. Heskes, T., & Zoeter, O. (2002). Expectation propagation for approximate inference in dynamic Bayesian networks. Proc UAI. Jensen, F. V., Lauritzen, S. L., & Olesen, K. G. (1990). Bayesian updating in causal probabilistic networks by local computations. Computational Statistics Quarterly, 5, 269–282. Kappen, H. J., & Wiegerinck, W. (2001). Novel iteration schemes for the cluster variation method. NIPS 14. Minka, T. P. (2001a). Expectation propagation for approximate Bayesian inference. UAI (pp. 362– 369). Minka, T. P. (2001b). A family of algorithms for approximate Bayesian inference. Doctoral dissertation, Massachusetts Institute of Technology. Murphy, K. (2001). The Bayes Net Toolbox for Matlab. Computing Science and Statistics, 33. Teh, Y. W., & Welling, M. (2001). The unified propagation and scaling algorithm. NIPS 14. Wainwright, M. J., Jaakkola, T., & Willsky, A. S. (2001). Tree-based reparameterization for approximate estimation on loopy graphs. NIPS 14. Wainwright, M. J., Jaakkola, T. S., & Willsky, A. S. (2002). A new class of upper bounds on the log partition function. Proc UAI. Welling, M., & Teh, Y. W. (2001). Belief optimization for binary networks: A stable alternative to loopy belief propagation. UAI. Wiegerinck, W. (2000). Variational approximations between mean field theory and the junction tree algorithm. Proc UAI. Yedidia, J. S., Freeman, W. T., & Weiss, Y. (2000). Generalized belief propagation. NIPS 13. Yedidia, J. S., Freeman, W. T., & Weiss, Y. (2002). Constructing free energy approximations and generalized belief propagation algorithms (Technical Report). MERL Research Lab. Yuille, A. (In press, 2002). A double-loop algorithm to minimize the Bethe and Kikuchi free energies. Neural Computation.
2003
124
2,337
Boosting versus Covering Kohei Hatano∗ Tokyo Institute of Technology hatano@is.titech.ac.jp Manfred K. Warmuth UC Santa Cruz manfred@cse.ucsc.edu Abstract We investigate improvements of AdaBoost that can exploit the fact that the weak hypotheses are one-sided, i.e. either all its positive (or negative) predictions are correct. In particular, for any set of m labeled examples consistent with a disjunction of k literals (which are one-sided in this case), AdaBoost constructs a consistent hypothesis by using O(k2 log m) iterations. On the other hand, a greedy set covering algorithm finds a consistent hypothesis of size O(k log m). Our primary question is whether there is a simple boosting algorithm that performs as well as the greedy set covering. We first show that InfoBoost, a modification of AdaBoost proposed by Aslam for a different purpose, does perform as well as the greedy set covering algorithm. We then show that AdaBoost requires Ω(k2 log m) iterations for learning k-literal disjunctions. We achieve this with an adversary construction and as well as in simple experiments based on artificial data. Further we give a variant called SemiBoost that can handle the degenerate case when the given examples all have the same label. We conclude by showing that SemiBoost can be used to produce small conjunctions as well. 1 Introduction The boosting method has become a powerful paradigm of machine learning. In this method a highly accurate hypothesis is built by combining many “weak” hypotheses. AdaBoost [FS97, SS99] is the most common boosting algorithm. The protocol is as follows. We start with m labeled examples labeled with ±1. AdaBoost maintains a distribution over the examples. At each iteration t, the algorithm receives a ±1 valued weak hypothesis ht whose error (weighted by the current distribution on the examples) is slightly smaller than 1 2. It then updates its distribution so that after the update, the hypothesis ht has weighted error exactly 1 2. The final hypothesis is a linear combination of the received weak hypotheses and it stops when this final hypothesis is consistent with all examples. It is well known [SS99] that if each weak hypothesis has weighted error at most 1 2 −γ 2 , then the upper bound on the training error reduces by a factor of  1 −γ2 ∗This research was done while K. Hatano was visiting UC Santa Cruz under the EAP exchange program. and after O( 1 γ2 log m) iterations, the final hypothesis is consistent with all examples. Also, it has been shown that if the final hypotheses are restricted to (unweighted) majority votes of weak hypotheses [Fre95], then this upper bound on the number of iterations cannot be improved by more than a constant factor. However, if there always is a positively one-sided weak hypothesis (i.e. its positive predictions are always correct) that has error1 at most 1 2 −γ 2 , then a set cover algorithm can be used to reduce the training error by a factor2 of 1 −γ and O( 1 γ log m) weak hypotheses suffice to form a consistent hypothesis [Nat91]. In this paper we show that the improved factor is also achieved by InfoBoost, a modification of AdaBoost developed by Aslam [Asl00] based on a different motivation. In particular, consider the problem of finding a consistent hypothesis for m examples labeled by a k literal disjunction. Assume we use the literals as the pool of weak hypotheses and always choose as the weak hypothesis a literal that is consistent with all negative examples. Then it can be shown that, for any distribution D on the examples, there exists a literal (or a constant hypothesis) h with weighted error at most 1 2 −1 4k (See e.g. [MG92]). Therefore, the upper bound on the training error of AdaBoost reduces by a factor of  1 − 1 4k2 and O(k2 log m) iterations suffice. However, a trivial greedy set covering algorithm, that follows a strikingly similar protocol as the boosting algorithms, finds a consistent disjunction with O(k log m) literals. We show that InfoBoost mimics the set cover algorithm in this case (and attains the improved factor of 1 −1 k). We first explain the InfoBoost algorithm in terms of constraints on the updated distribution. We then show that Ω(k2 log m) iterations are really required by AdaBoost using both an explicit construction (which requires some assumptions) and artificial experiments. The differences are quite large: For m = 10, 000 random examples and a disjunction of size k = 60, AdaBoost requires 2400 iterations (on the average), whereas Covering and InfoBoost require 60 iterations. We then show that InfoBoost has the improved reduction factor if the weak hypotheses happen to be one-sided. Finally we give a modified version of AdaBoost that exploits the one-sidedness of the weak hypotheses and avoids some technical problems that can occur with InfoBoost. We also discuss how this algorithm can be used to construct small conjunctions. 2 Minimizing relative entropy subject to constraints Assume we are given a set of m examples (x1, y1), . . . , (xm, ym). The instances xi are in some domain X and the labels yi are in {−1, 1}. The boosting algorithms maintain a distribution Dt over the examples. The initial distribution is D1 and is typically uniform. At the t-th iteration, the algorithm chooses a weak3 hypothesis ht : X →{−1, 1} and then updates its distribution. The most popular boosting algorithm does this as follows: AdaBoost: Dt+1(i) = Dt(i) exp{−yiht(xi)αt} Zt , 1This assumes equal weight on both types of examples. 2Wipe out the weights of positive examples that are correctly classified and re-balance both types of examples. 3For the sake of simplicity we focus on the case when the range of the labels and the weak hypotheses is ±1 valued. Many parts of this paper generalize to the range [−1, 1] [SS99, Asl00]. Here Zt is a normalization constant and the coefficient αt depends on the error ϵt at iteration t: αt = 1 2 ln 1−ϵt ϵt and ϵt = PrDt[ht(xi) ̸= yi]. The final hypothesis is given by the sign of the following linear combination of the chosen weak hypotheses: H(x) = T t=1 αtht(x). Following [KW99, Laf99], we motivate the updates on the distributions of boosting algorithms as a constraint minimization of the relative entropy between the new and old distributions: AdaBoost: Dt+1 = argminD∈[0,1]m, i D(i)=1∆(D, Dt), s.t. Pr D [ht(xi) ̸= yi] = 1 2. Here the relative entropy is defined as ∆(D, D′) =  i D(i) ln D(i) D′(i) and error w.r.t. the updated distribution is constraint to half. The constraint can be easily understood using the table of Figure 1. There are two types of misclassified examples: false positive (weight c) and false negative (weight b). The AdaBoost constraint means b + c = 1 2 w.r.t. the updated distribution Dt+1. yi \ ht +1 −1 +1 a b −1 c d Figure 1: Four types of examples. The second boosting algorithm we discuss in this paper has the following update: InfoBoost: Dt+1(i) = Dt(i) exp{−yiht(xi)αt[ht(xi)]} Zt , where αt[±1] = 1 2 ln 1−ϵ[±1] ϵt[±1] , ϵt[±1] = PrDt[ht(xi) ̸= yi|ht(xi) = ±1] and Zt is the normalization factor. The final hypothesis is given by the sign of H(x) = T t=1 αt[ht(x)] ht(x). In the original paper [Asl00], the InfoBoost update was motivated by seeking a distribution Dt+1 for which the error of ht is half and yi and ht(xi) have mutual information zero. Here we motivate InfoBoost as a minimization of the same relative entropy subject to the AdaBoost constraint b + c = 1 2 and a second simultaneously enforced constraint a + b = 1 2. Note that the second constraint is the AdaBoost constraint w.r.t. the constant hypothesis 1. A natural question is why not just do two steps of AdaBoost at each iteration t: One for ht and and then, sequentially, one for 1. We call the latter algorithm AdaBoost with Bias, since the constant hypothesis introduces a bias into the final hypothesis. See Figure 2 for an example of the different updates. Dt : yi \ ht +1 −1 +1 2 5 2 5 −1 0 1 5 Dt+1 : AdaB. yi \ ht +1 −1 +1 1 3 1 2 −1 0 1 6 Dt+1 : InfoB. yi \ ht +1 −1 +1 0 1 2 −1 0 1 2 Dt+1 : AdaB.w.Bias yi \ ht +1 −1 +1 1 5 3 10 −1 0 1 2 Figure 2: Updating based on a positively one-sided hypothesis ht (weight c is 0): The updated distributions on the four types of examples are quite different. We will show in the next section that in the case of learning disjunctions, AdaBoost with Bias (and plain AdaBoost) can require many more iterations than InfoBoost and the trivial covering algorithm. This is surprising because the AdaBoost with Bias and InfoBoost seem so similar to each other (simultaneous versus sequential enforcement of the same constraints). A natural extension would be to constrain the errors of all past hypotheses to half which is the Totally Corrective Algorithm of [KW99]. However this can lead to subtle convergence problems (See discussion in [RW02]). 3 Lower bounds of AdaBoost for Learning k disjunctions So far we did not specify how the weak hypothesis ht is chosen at iteration t. We assume there is a pool H of weak hypotheses and distinguish two methods: Greedy: Choose a ht ∈H for which the normalization factor Zt in the update of the algorithm is minimized. Minimal: Choose ht with error smaller than a given threshold 1 2 −δ. The greedy method is motivated by the fact that  t Zt upper bounds the training error of the final hypothesis ([SS99, Asl00]) and this method greedily minimizes this upper bound. Note that the Zt factors are different for AdaBoost and InfoBoost. In our lower bounds on the number of iterations the example set is always consistent with a k-literal monotone disjunction over N variables. More precisely the instances xi are in {±1}N and the label yi is xi,1 ∨xi,2 ∨. . .∨xi,k. The pool of weak learners consists of the N literals Xj, where Xj(xi) = xij. For the greedy method we show that on random data sets InfoBoost and the covering algorithm use drastically fewer iterations than AdaBoost with Bias. We chose 10, 000 examples as follows: The first k bits of each example are chosen independently at random so that the probability of label +1 is half (i.e. the probability of +1 for each of the first k bits is 1 −2−1/k); the remaining N −k irrelevant bits of each example are chosen +1 with probability half. Figure 3 shows the number of iterations as function of the size of disjunction k (averaged over 20 runs) of AdaBoost with Bias until consistency is reached on all 10, 000 examples. The number of iteration in this very simple setting grows quadratically with k. If the numFigure 3: Average # of steps of AdaBoost with Bias for k = 10, 20, 30, 40, 50, 60. ber of iterations is divided by k2 then the resulting curve is larger than a constant. In contrast the number of iterations of the greedy covering algorithm and InfoBoost is provably linear in k: For k = 60 and m = 10, 000, the former require 60 iterations on the average, whereas AdaBoost with Bias with the greedy choice of the weak hypothesis requires 1200 even though it never chooses irrelevant variables as weak learners (Plain AdaBoost requires twice as many iterations). The above construction is not theoretical. However we now give an explicit construction for the minimal method of choosing the weak hypothesis for which the number of iterations of greedy covering and InfoBoost grow linearly in k and the number of iterations of AdaBoost with Bias is quadratic in k. For any dimension N we define an example set which is the rows of the following (N + 1) × N dimensional matrix x: All entries on the main diagonal and above are +1 and the remaining entries −1. In particular, the last row is all −1 (See Figure 4). The i-th instance xi is the i-th row of this matrix and the first N examples (rows) are labeled +1 and the label of the last row yN+1 is −1. Clearly the literal XN is consistent with the labels and thus always has error 0 w.r.t. any distribution on the examples. But note that the disjunction of the last k literals is also consistent (for any k). We will construct a distribution on the rows that gives high probability to the early rows (See Figure 4) and allows the following ”minimal” choice of weak hypotheses: At iteration t, AdaBoost with Bias is given the weak hypothesis Xt. This weak hypothesis will have error 1 2 −1 2k (δ = 1 2k) w.r.t. current distribution of the examples. Contrary to our construction, the initial distribution for boosting applications is typically uniform. However, using padding this can be avoided but makes the construction more complicated. For any precision parameter ϵ ∈(0, 1) and disjunction size k, we define the dimension N :=   −ln 1 2ε −ln  1 −1 k  ln 1 − 2 k(k+1)   + 1 ≥k2 2 ln 1 2ε −k 2 The initial distribution D1 is defined as D1(xt) :=          1 2k, for t = 1 1 k(k+1)  1 −1 k  1 − 2 k(k+1) t−2 , for 2 ≤t ≤N −1 1 2 −N−1 t=1 D(xt), for t = N 1 2, for t=N + 1. . The example xN has the lowest probability w.r.t. D1 (See Figure 4). However one can show that its probability is at least ε. D1(xi) xi,j yi        + + + + + − + + + + − − + + + − − − + + − − − + + − − − − + − − − − −               + + + + + + −        Figure 4: The examples (rows of the matrix), the labels, and the distribution D1. Also for t ≤ N −1, the probability D1(x≤t) of the first t examples is 1 2  1 −  1 −1 k  1 − 2 k(k+1) t−1 . AdaBoost with Bias does two update steps at iteration t (constrain the error of ht to half and then sequentially the error of 1 to half.) Dt(i) = Dt(i) exp{−yiht(xi)αt} Zt and Dt+1 = Dt(i) exp{−yiαt} Zt . The Z’s are normalization factors, αt = 1 2 ln 1−εt εt and αt = 1 2 ln Dt(x≤N) Dt(xN+1). The final hypothesis is the sign of the following linear combination: H(x) = T t=1 αtht(x) + T t=1 αt. Proposition 1. For AdaBoost with Bias and t ≤N, PrDt[Xt(xi) ̸= yi] = 1 2 − 1 2k. Proof. (Outline) Since each literal Xt is one-sided, Xt classifies the negative example xN+1 correctly. Since PrDt[Xt(xi) = yi] = Dt(xN+1)+Dt(x≤t) and Dt(xN+1) = 1 2 it suffices to show that Dt(x≤t) = 1 2k for t ≤N. The proof is by induction on t. For t = 1, the statement follows from the definition of D1. Now assume that the statement holds for any t′ < t. Then we have Dt(x≤t) = Dt(x≤t−1) + Dt(xt) = Dt−1(x≤t−1)e−αt−1 Zt−1 eαt−1 Zt−1 + Dt(xt). (1) Note that the example xt is not covered by any previous hypotheses X1, . . . , Xt−1, and thus we have Dt(xt) = D1(xt) t−1  j=1 eαj Zj eαj Zj . (2) Using the inductive assumption that PrDt′[Xt′(xi) ̸= yi] = 1 2 − 1 2k, for t′ < t, one can show that αt′ = 1 2 ln k+1 k−1, Zt′ = 1 k  (k −1)(k + 1), Dt′(x≤N) = 1 2 + 1 2(k+1), Dt′(xN+1) = 1 2 − 1 2(k+1), αt′ = 1 2 ln k+2 k , and Zt′ = 1 k+1  k(k + 2). Substituting these values into the formulae (1) and (2), completes the proof. Theorem 2. For the described examples set, initial distribution D1, and minimal choice of weak hypotheses, AdaBoost with Bias needs at least N iterations to construct a final hypothesis whose error with respect to D1 is below ε. Proof. Let t be any integer smaller than N. At the end of the iteration t, the examples xt+1, . . . , xN are not correctly classified by the past weak hypotheses X1, . . . , Xt. In particular, the final linear combination evaluated at xN is H(xN) = t  j=1 αjXj(xN)+ t  j=1  αj = − t  j=1 αj+ t  j=1  αj = −t 2 ln k + 1 k −1+ t 2 ln k + 2 k < 0. Thus sign(H(xN)) = −1 and the final hypothesis has error at least D1(xN) ≥ε with respect to D1. To show a similar lower bound for plain AdaBoost we use the same example set and the following sequence of weak hypotheses X1, 1, X2, 1, . . . XN, 1. For odd iteration numbers t the above proposition shows the error of the weak hypothesis is 1 2 −1 2k and for even iteration numbers one can show that the hypothesis 1 has error 1 2 − 1 2(k+1). 4 InfoBoost and SemiBoost for one-sided weak hypotheses Aslam proved the following upper bound on the training error[Asl00] of InfoBoost: Theorem 3. The training error of the final hypothesis produced by InfoBoost is bounded by T t=1 Zt, where Zt = PrDt[ht(xi) = +1]  1 −γt[+1]2 + PrDt[ht(xi) = −1]  1 −γt[−1]2 and edge4 γt[±1] = 1 −2εt[±1]. Let γt = 1 −2εt. If γt[+1] = γt[−1] = γt, then Zt =  1 −γ2 t , as for AdaBoost. However, if ht is one-sided, InfoBoost gives the improved factor of √1 −γt: Corollary 4. For t ≥2, if ht is one-sided w.r.t. Dt, then Zt = √1 −γt. 4The edge γ and error ϵ are related as follows: γ = 1−2ϵ and ϵ = 1 2 −1 2γ ; ϵ = 1 2 ⇔γ = 0. Proof. Wlog. assume ht is always correct when it predicts +1. Then γt[+1] = 1 and the first summand in the expression for Zt given in the above theorem disappears. Recall that InfoBoost maintains the distribution Dt over examples so that PrDt[yi = +1] = 1 2 for t ≥2. So the second summand becomes 2  Pr Dt[ht(xi) = −1, yi = +1] Pr Dt[ht(xi) = −1, yi = −1] = 2  Pr Dt[yi = +1] Pr Dt[yi = −1]  Pr Dt[ht(xi) = −1|yi = +1] Pr Dt[ht(xi) = −1|yi = −1] =  Pr Dt[ht(xi) = −1|yi = +1]. By the definition of γt, we have 1 −γt = 2PrDt[ht(xi) ̸= yi] = 2PrDt[ht(xi) = −1, yi = +1] (because of one-sidedness of ht) = 2PrDt[yi = +1] Pr Dt[ht(xi) = −1|yi = +1] = PrDt[ht(xi) = −1|yi = +1] (because PrDt[yi = +1] = 1 2) 2 This corollary implies that if a one-sided hypothesis is chosen at each iteration, then InfoBoost constructs a final hypothesis consistent with all m examples within 2 γ ln m iterations. When the considered weak hypotheses are positively one-sided, then the trivial greedy covering algorithm (which simply chooses the set that covers the most uncovered positive examples), achieves the improved factor of 1−γ, which means at most 1 γ ln m iterations. By a careful analysis (not included), one can show that the factor for InfoBoost can be improved to 1 −γ, if all weak hypotheses are one-sided. So in this case InfoBoost indeed matches the 1 −γ factor of the greedy covering algorithm. A technical problem arises when InfoBoost is given a set of examples that are all labeled +1. Then we have α1[+1] = ∞and α1[−1] = −∞. This implies H(x) = α1[h1(xi)]ht(xi) = ∞for any instance xi. Thus InfoBoost terminates in a single iteration and outputs a hypothesis that predicts +1 for any instance and InfoBoost cannot be used for constructing a cover. We propose a natural way to cope with this subtlety. Recall that the final hypothesis of InfoBoost is given by H(x) = T t=1 αt[ht(x)] ht(x). This doesn’t seem to be a linear combination of hypotheses from H since the coefficients vary with the prediction of weak hypotheses. However observe that αt[ht(x)] ht(x) = αt[+1] h+ t (x) + αt[−1] h− t (x), where h± = h(x) if h(x) = ±1 and 0 otherwise. We call h+ and h−the semi hypotheses of h. Note that h+(x) = h(x)+1 2 and h−(x) = h(x)−1 2 . So the final hypothesis of InfoBoost and the new algorithm we will define in a moment is a bias plus a linear combination of the the original weak learners in H. We propose the following variant of AdaBoost (called Semi-Boost): In each iteration execute one step of AdaBoost but the chosen weak hypothesis must be a semi hypothesis of one of the original hypothesis h ∈H which has a positive edge. SemiBoost avoids the outlined technical problem and can handle equally labeled example sets. Also if all the chosen hypotheses are of the h+ type then the final hypothesis is a disjunction. If hypotheses are chosen by smallest error (largest edge), then the greedy covering algorithm is simulated. Analogously, if all the chosen hypotheses are of the h−type then one can show that the final hypothesis of SemiBoost is a conjunction. Furthermore, two steps of SemiBoost (with hypothesis h+ in the first step followed by the sibling hypothesis h−in the second step) are equivalent to one step of InfoBoost with hypothesis h. Finally we note that the final hypothesis of InfoBoost (or SemiBoost) is not welldefined when it includes both types of one-sided hypotheses, i.e. positive and negative infinite coefficients may conflict each other. We propose two solutions. First, following [SS99] one can use the modified coefficients α[±1]′ = 1 2 ln 1−ε[±1]+∆ ε[±1]+∆ for small ∆> 0. It can be shown that the new Z′ increases by at most √ 2∆([SS99]). Second, we allow infinite coefficients but interpret the final hypothesis as a version of a decision list [Riv87]: Whenever more than one semi hypotheses with infinite coefficients are non-zero on the current instance, then the semi hypothesis with the lowest iteration number determines the label. Once such a consistent decision list over some set of hypothesis ht and 1 has been found, it is easy the find an alternate linear combination of the same set of hypotheses (using linear programming) that maximizes the margin or minimizes the one-norm of the coefficient vector subject to consistency. Conclusion: We showed that AdaBoost can require significantly more iterations than the simple greedy cover algorithm when the weak hypotheses are one-sided and gave a variant of AdaBoost that can readily exploit one-sidedness. The open question is whether the new SemiBoost algorithm gives improved performance on natural data and can be used for feature selection. Acknowledgment: This research benefited from many discussions with Gunnar R¨atsch. He encouraged us to analyze AdaBoost with Bias and suggested to write the final hypothesis of InfoBoost as a linear combination of semi hypotheses. We also thank anonymous referees for helpful comments. References [Asl00] J. A. Aslam. Improving algorithms for boosting. In Proc. 13th Annu. Conference on Comput. Learning Theory, pages 200–207, 2000. [Fre95] Y. Freund. Boosting a weak learning algorithm by majority. Inform. Comput., 121(2):256–285, September 1995. Also appeared in COLT90. [FS97] Y. Freund and R. E. Schapire:. A decision-theoretic generalization of on-line learning and an application to boosting. J. Comput. Syst. Sci., 55(1):119–139, 1997. [KW99] Jyrki Kivinen and Manfred K. Warmuth. Boosting as entropy projection. In Proc. 12th Annu. Conf. on Comput. Learning Theory, pages 134–144. ACM Press, New York, NY, 1999. [Laf99] J. Lafferty. Additive models, boosting, and inference for generalized divergences. In Proc. 12th Annu. Conf. on Comput. Learning Theory, pages 125–133. ACM, 1999. [MG92] A. A. Razborov M. Goldmann, J. Hastad. Majority gates vs. general weighted threshold gates. Journal of Computation Complexity, 1(4):277– 300, 1992. [Nat91] B. K. Natarajan. Machine Learning: A Theoretical Approach. Morgan Kaufmann, San Mateo, CA, 1991. [Riv87] R. L. Rivest. Learning decision lists. Machine Learning, 2:229–246, 1987. [RW02] G. R¨atsch and M. K. Warmuth. Maximizing the margin with boosting. In Proceedings of the 15th Annual Conference on Computational Learning Theory, pages 334–350. Springer, July 2002. [SS99] Robert E. Schapire and Yoram Singer. Improved boosting algorithms using confidence-rated predictions. Machine Learning, 37(3):297–336, 1999.
2003
125
2,338
Learning Near-Pareto-Optimal Conventions in Polynomial Time Xiaofeng Wang ECE Department Carnegie Mellon University Pittsburgh, PA 15213 xiaofeng@andrew.cmu.edu Tuomas Sandholm CS Department Carnegie Mellon University Pittsburgh, PA 15213 sandholm@cs.cmu.edu Abstract We study how to learn to play a Pareto-optimal strict Nash equilibrium when there exist multiple equilibria and agents may have different preferences among the equilibria. We focus on repeated coordination games of non-identical interest where agents do not know the game structure up front and receive noisy payoffs. We design efficient near-optimal algorithms for both the perfect monitoring and the imperfect monitoring setting(where the agents only observe their own payoffs and the joint actions). 1 Introduction Recent years have witnessed a rapid development of multiagent learning theory. In particular, the use of reinforcement learning (RL) and game theory has attracted great attentions. However, research on multiagent RL (MARL) is still facing some rudimentary problems. Most importantly, what is the goal of a MARL algorithm? In a multiagent system, a learning agent generally cannot achieve its goal independent of other agents, which in turn tend to pursue their own goals. This questions the definition of optimality: No silver bullet guarantees maximization of each agent’s payoff. In the setting of self play (where all agents use the same algorithm), most existing MARL algorithms seek to learn to play a Nash equilibrium. It is the fixed point of the agents’ best-response process, that is, each agent maximizes its payoff given the other’s strategy. An equilibrium can be viewed as a convention that the learning agents reach for playing the unknown game. A key difficulty here is that a game usually contains multiple equilibria, and the agents need to coordinate on which one to play. Furthermore, the agents may have different preferences among the equilibria. Most prior work has avoided this problem by focusing on games with a unique equilibrium or games in which the agents have common interests. In this paper, we advocate Pareto-optimal Nash equilibria as the equilibria that a MARL algorithm should drive agents to. This is a natural goal: Pareto-optimal equilibria are equilibria for which no other equilibrium exists where both agents are better off. We further design efficient algorithms for learning agents to achieve this goal in polynomial time. 2 Definitions and background We study a repeated 2-agent game where the agents do not know the game up front, and try to learn how to play based on the experiences in the previous rounds of the game. As usual, we assume that the agents observe each others’ actions. We allow for the possibility that the agents receive noisy but bounded payoffs (as is the case in many real-world MARL settings); this complicates the game because the joint action does not determine the agents’ payoffs deterministically. Furthermore, the agents may prefer different outcomes of the game. In the next subsection we discuss the (stage) game that is repeated over and over. 2.1 Coordination games (of potentially non-identical interest) We consider two agents, 1 and 2. The set of actions that agent i can choose from is denoted by Ai. We denote the other agent by −i. Agents choose their individual actions ai ∈Ai independently and concurrently. The results of their joint action can be represented in matrix form: The rows correspond to agent 1’s actions and the columns correspond to agent 2’s actions. Each cell {a1, a2} in the matrix has the payoffs u1({a1, a2}), u2({a1, a2}). The agents may receive noisy payoffs. In this case, the ui functions are expected payoffs. A strategy for agent i is a distribution πi over its action set Ai. A pure strategy deterministically chooses one of the agent’s individual actions. A Nash equilibrium (NE) is a strategy profile π = {πi, π−i} in which no agent can improve its payoff by unilaterally deviating to a different strategy: ui({πi, π−i}) ≥ui({π′ i, π−i}) for both agents (i = 1, 2) and any strategy π′ i. We call a NE a pure strategy NE if the individuals’ strategies in it are pure. Otherwise, we call it a mixed strategy NE. The NE is strict if we can replace “≥” with “>”. We focus on the important and widely studied class of games called coordination games:1 Definition 1 [Coordination game] A 2-agent coordination game G is an N × N matrix game with N strict Nash equilibria (called conventions). (It follows that there are no other pure-strategy equilibria.) A coordination game captures the notion that agents have the common interest of being coordinated (they both get higher payoffs by playing equilibria than other strategy profiles), but at the same time there are potentially non-identical interests (each agent may prefer different equilibria). The following small games illustrates this: OPT OUT LARGE DEMAND SMALL DEMAND OPT OUT 0,0 0,-0.1 0,-0.1 SMALL DEMAND -0.1,0 0.3,0.5 0.3,0.3 LARGE DEMAND -0.1,0 -0.1,-0.1 0.5,0.3 Table 1: Two agents negotiate to split a coin. Each one can demand a small share (0.4) or a large share (0.6). There is a cost for bargaining (0.1). If the agents’ demands add to less than 1, each one gets its demand. In this game, though agents favor different conventions, they would rather have a deal than opt out. The convention where both agents opt out is Pareto-dominated and the other two conventions are Pareto-optimal. Definition 2 [Pareto-optimality] A convention {a1, a2} is Pareto-dominated if there exists at least one other convention {a′ 1, a′ 2} such that ui({a1, a2}) < ui({a′ 1, a′ 2}) and u−i({a1, a2}) ≤u−i({a′ 1, a′ 2}). If the inequality is strict, the Pareto domination is strict. Otherwise, it is weak. A convention is Pareto-optimal (PO) if and only if it is not Paretodominated. 1The term “coordination game”has sometimes been used to refer to special cases of coordination games, such as identicalinterest games where agents have the same preferences [2], minimum-effort games that have strict Nash equilibria on the diagonal and both agents prefer equilibria further to the top left. Our definition is the most general (except that some have even called games that have weak Nash equilibria coordination games). A Pareto-dominated convention is unpreferable because there is another convention that makes both agents better off. Therefore, we advocate that a MARL algorithm should at least cause agents to learn a PO convention. In the rest of the paper we assume, without loss of generality, that the game is normalized so that all payoffs are strictly positive. We do this so that we can set artificial payoffs of zero (as described later) and be guaranteed that they are lower than any real payoffs. This is merely for ease of exposition; in reality we can set the artificial payoffs to a negative value below any real payoff. 2.2 Learning in game theory: Necessary background Learning in game theory [6] studies repeated interactions of agents, usually with the goal of having the agents learn to play Nash equilibrium. There are key differences between learning in game theory and MARL. In the former, the agents are usually assumed to know the game before play, while in MARL the agents have to learn the game structure in addition to learning how to play. Second, the former has paid little attention to the efficiency of learning, a central issue in MARL. Despite the differences, the theory of learning in games has provided important principle for MARL. One most widely used learning model is fictitious play (FP). The basic FP does not guarantee to converge in coordination games while its variance, adaptive play (AP) [17], does. Therefore, we take AP as a building block for our MARL algorithms. 2.2.1 Adaptive play (AP) The learning process of AP is as follows: Learning agents are assumed to have a memory to keep record of recent m plays of the game. Let at ∈A be a joint action played at time t over a game. Fix integers k and m such that 1 ≤k ≤m. When t ≤m, each agent i randomly chooses its actions. Starting from t = m+1, each agent looks back at the m most recent plays ht = (at−m, at−m+1, . . . , at−1) and randomly (without replacement) selects k samples from ht. Let Kt(a−i) be the number of times that an action a−i ∈A−i appears in the k samples at t. Agent i calculates its expected payoff w.r.t its individual action ai as EP(ai) = P a−i∈A−i ui({ai, a−i}) Kt(a−i) k , and then randomly chooses an action from a set of best responses: BRt i = {ai | ai = arg maxa′ i∈Ai EP(a′ i)}. The learning process of AP can be modeled as a Markov chain. We take the initial history hm = (a1, a2, . . . , am) as the initial state of the Markov chain. The definition of the other states is inductive: A successor of state h is any state h′ obtained by deleting the left-most element of h and appending a new right-most element. Let h′ be a successor of h, and let a′ = {a′ 1, a′ 2} be the new element (joint action) that was appended to the right of h to get h′. Let ph,h′ be the transition probability from h to h′. Now, ph,h′ > 0 if and only if for each agent i, there exists a sample of size k in h to which a′ i is i’s best response. Because agent i chooses such a sample with probability independent of time t, the Markov chain is stationary. In the Markov chain model, each state h = (a, . . . , a) with a being a convention is an absorbing state. According to Theorem 1 in [17], AP in coordination games converge to such an absorbing state with probability 1 if m ≥4k. 2.2.2 Adaptive play with persistent noise AP does not choose a particular convention. However, Young showed that if there is small constant noise in action selection, AP usually selects a particular convention. Young studied the problem under an independent random tremble model: Suppose that instead of always taking a best-response action, with a small probability ε, the agent chooses a random action. This yields an irreducible and aperiodic perturbed process of the original Markov chain (unperturbed process). Young showed that with sufficiently small ε, the perturbed process converges to a stationary distribution in which the probability to play so called stochastic stable convention(s) is at least 1 −Cε, where C is a positive constant (Theorem 4 and its proof in [17]). The stochastic stable conventions of a game can be identified by considering the mistakes being made during state transitions. We say an agent made a mistake if it chose an action that is not a best response to any sample, of size k, taken from the m most recent steps of history. Call the absorbing states in the unperturbed process convention states in the perturbed process. For each convention state h, we construct an h-tree τh (with each node being a convention state) such that there is a unique direct path from every other convention state to h. Label the direct edges (v, v′) in τh with the number of mistakes rv,v′ needed to make the transition from convention state v to convention state v′. The resistance of the h-tree is r(τh) = P (v,v′)∈τh rv,v′. The stochastic potential of the convention state h is the least resistance among all possible h-trees τh. Young proved that the stochastic stable states are the states with the minimal stochastic potentials. 2.3 Reinforcement learning Reinforcement learning offers an effective way for agents to estimate the expected payoffs associated with individual actions based on previous experience—without knowing the game structure. A simple and well-understood algorithm for single-agent RL is Qlearning [9]. The general form of Q-learning is for learning in a Markov decision process. It is more than we need here. In our single-state setting, we take a simplified form of the algorithm, with Q-value Qi t(a) recording the estimate of the expected payoffs ui(a) for agent i at time t. The agent updates its Q-values based on the sample of the payoff Rt and the observed action a. Qi t+1(a) = Qi t(a) + α(Rt −Qi t(a)) (1) In single-agent RL, if each action is sampled infinitely and the learning rate α is decreased over time fast enough but not too fast, the Q-values will converge to agent i’s expected payoff ui. In our setting, we set α = 1 ηt(a), where ηt(a) is the number of times that action a has been taken. Most early literature on RL was about asymptotic convergence to optimum. The extension of the convergence results to MARL include the minimax-Q [11], Nash-Q [8], friend-foe-Q [12] and correlated-Q [7]. Recently, significant attention has been paid to efficiency results: near-optimal polynomial-time learning algorithms. Important results include Fiechter’s algorithm [5], Kearns and Singh’s E3 [10], Brafman and Tennenholtz’s Rmax [3], and Pivazyan and Shoham’s efficient algorithms for learning a near-optimal policy [14]. These algorithms aim at efficiency, accumulating a provably close-to-optimal average payoff in polynomial running time with large probability. The equilibrium-selection problem in MARL has also been explored in the form of team games, a very restricted version of coordination games [4, 16]. In this paper, we develop efficient MARL algorithms for learning a PO convention in an unknown coordination game. We consider both the perfect monitoring setting where agents observe each others’ payoffs, and the imperfect monitoring setting where agents do not observe each others’ payoffs (and do not want to tell each other their payoffs). In the latter setting, our agents learn to play PO conventions without learning each others’ preferences over conventions. Formally, the objectives of our MARL algorithms are: Efficiency: Let 0 < δ < 1 and ϵ > 0 be constants. Then with probability at least 1 −δ, agents will start to play a joint policy a within steps polynomial in 1 ϵ , 1 δ , and N, such that there exists no convention a′ that satisfies u1(a) + ϵ < u1(a′) and u2(a) + ϵ < u2(a′). We call such a policy an ϵ-PO convention. 3 An efficient algorithm for the perfect monitoring setting In order to play an ϵ-PO convention, agents need to find all these conventions first. Existing efficient algorithms employ random sampling to learn game G before coordination. However, these approaches are thin for the goal: Even when the game structure estimated from samples is within ϵ of G, its PO conventions might still be ϵ away from these of G. Here we present a new algorithm to identify ϵ-PO conventions efficiently. Learning game structure (perfect monitoring setting) 1. Choose ϵ > 0, 0.5 > δ > 0. Set w = 1. 2. Compute the number of samples M( ϵ w , δ 2w−1 ) by using Chernoff/Hoeffding bound [14], such that P r{maxa,i |Qi M(a) −ui(a)| ≤ ϵ w } ≥1 − δ 2w−1 . 3. Start from t = 0, randomly try M actions with uniform distributions and update the Q-values using Equation 1. 4. If (1) GM = (Q1 M , Q2 M ) has N conventions, and (2) for every convention {ai, a−i} in GM and every agent i, Qi M ({ai, a−i}) > Qi M({a′ i, a−i}) + 2 ϵ w for every a′ i ̸= ai, then Stop; else w ←w + 1, Goto Step 2. In Step 2 and Step 3, agent i samples the coordination game G sufficiently so that the game GM = (Q1 M, Q2 M) formed from M samples is within ϵ w of G with probability at least 1 − δ 2w−1 . This is plausible because the agent can observe the other’s payoffs. In Step 4, if Condition (1) and (2) are met and GM are within ϵ w of G, we know that GM has the same set of conventions as G. So, any convention not strictly Pareto-dominated in GM is a 2ϵ-PO convention in G by definition. The loop from Step 2 to Step 4 searches for a sufficiently small ϵ w which has Condition (1) and (2) met. Throughout the learning, the probability that GM always stays within ϵ w of G after Step 3 is at least 1 −P w δ 2w−1 > 1 −2δ. This implies that the algorithm will identify all the conventions of G with probability at least 1 −2δ. The total number of samples drawn is polynomial in (N, 1 δ , 1 ϵ ) according to Chernoff bound [14]. After learning the game, the agents will further learn how to play, that is, to determine which PO convention in GM to choose. A simple solution is to let two agents randomize their action selection until they arrive at a PO convention in GM. However, this treatment is problematic because each agent may have different preferences over the conventions and thus will not randomly choose an action unless it believes the action is a best response to the other’s strategy. In this paper, we consider the learning agents which use adaptive play to negotiate the convention they should play. In game theory, AP was suggested as a simple learning model for bargaining [18], where each agent dynamically adjusts its offer w.r.t its belief about the other’s strategy. Here we further propose a new algorithm called k-step adaptive play (KSAP) whose expected running time is polynomial in m and k. Learning how to play (perfect monitoring setting) 1. Let V GM = (Q1 M , Q2 M). Now, set those entries in V GM to zero that do not correspond to PO conventions. 2. Starting from a random initial state, sample the memory only every k steps. Specifically, with probability 0.5, sample the most recent k plays, otherwise, just randomly draw k samples from the earlier m −k observations without replacement. 3. Choose an action against V GM as in adaptive play except that when there exist multiple best-response actions that correspond to some conventions in the game, choose an action that belongs to a convention that offers the greatest payoff (breaking remaining ties randomly). 4. Play that action k times. 5. Once observe that the last k steps are composed of the same strict NE, play that NE forever. In Step 1, agents construct a virtual game V GM from the game GM = (Q1 M, Q2 M) by setting the payoffs of all actions except PO conventions to zero. This eliminates all Paretodominated conventions in GM. Step 2 to Step 5 is KSAP. Comparing with AP, KSAP lets an agent sample the experience to update its opponent model every k steps. This makes the expected steps to reach an absorbing state polynomial in k. A KSAP agent pays more attentions on the most recent k observations and will freeze its action once coordinated. This further enhances the performance of the learning algorithm. Theorem 1 In any unknown 2-agent coordination game with perfect monitoring, if m ≥ 4k, agents that use the above algorithm will learn a 2ϵ-PO policy with probability at least 1 −2δ in time poly(N, 1 δ , 1 ϵ , m, k). Due to limited space, we present all proofs in a longer version of this paper [15]. 4 An efficient algorithm for the imperfect monitoring setting In this section, we present an efficient MARL algorithm for the imperfect monitoring setting where the agents do not observe each others’ payoff during learning. Actually, since agents can observe joint actions, they may explicitly signal to each other their preferences over conventions through actions. This reduces the learning problem to that in the perfect monitoring setting. Here we assume that agents are not willing to explicitly signal each other their preferences over conventions, even part of such information (e.g., their most preferable conventions).2 We study how to achieve optimal coordination without relying on such preference information. Because each agent is unable to observe the other’s payoffs and because there is noise in payoffs received, it is difficult for the agent to determine when enough samples have been taken to identify all conventions. We address this by allowing agents to demonstrate to each other their understanding of game structure (where the conventions are) after sampling. Learning the game structure (imperfect monitoring setting) 1. Each agent plays its actions in order, with wrap around, until both agents have just wrapped around.3 The agents name each others’ actions 1,2,... according to the order of first appearance in play. 2. Given ϵ and δ, agents are randomly sampling the game until every joint action has been visited at least M( ϵ w , δ 2w−1 ) times (with w = 1) and updating their Q-values using Equation 1 along the way. 3. Starting at the same time, each agent i goes through the other’s N individual actions a−i in order, playing the action ai such that Qi M({ai, a−i}) > 2 ϵ w + Qi M ({a′ i, a−i}) for any a′ i ̸= ai. (If such an action ai does not exists for some a−i, then agent i plays action 1 throughout this demonstration phase.) 4. Each agent determines whether the agents hold the same view of the N strict Nash equilibria. If not, they let w ←w + 1, Goto Step 2. After learning the game, the agents start to learn how to play. The difficulty is, without knowing about the other’s preferences over conventions, agents cannot explicitly eliminate Pareto-dominated conventions in GM. A straightforward approach is to allow each agent to choose its most preferable convention, and break tie randomly. This, however, requires to disclose the preference information to the other agent, thereby violating our assumption. Moreover, such a treatment limits the negotiation to only two solutions. Thus, even if there exists a better convention in which one agent compromise a little but the other is better off greatly, it will not be chosen. The intriguing question here is whether agents can learn to play a PO convention without knowing the other’s preferences at all. Adaptive play with persistent noise in action selection (see Section 2.2.2) causes agents to choose “stochastic stable” conventions most of time. This provides a potential solution to the above problem. Specifically, over Qi M, each agent i first constructs a best-response set by including, for each possible action of the other agent a−i, the joint action {a∗ i , a−i} where a∗ i is i’s best response to a−i. Then, agent i forms a virtual Q-function V Qi M which equals Qi M, except that the values of the joint actions not in the best-reponse set are zero. We have proved that in the virtual game (V Q1 M, V Q2 M), conventions strictly Pareto-dominated are not stochastic stable [15]. This implies that using AP with persistent noise, agents will play 2ϵ-PO conventions most of time even without knowing the other’s preferences. Therefore, if the agents can stop using noise in action selection at some point (and will thus play a particular convention from then on), there is a high probability that they end up playing a 2ϵ-PO convention. The rest of this section presents our algorithm in more detail. We first adapt KSAP (see Section 3) to a learning model with persistent noise. After choosing the best-response action suggested by KSAP, each agent checks whether the current 2Agents may prefer to hide such information to avoid giving others some advantage in the future interactions. 3In an N × N game this occurs for both agents at the same time, but the technique also works for games with a different number of actions per agent. state (containing the m most recent joint actions) is a convention state. If it is not, the agent plays KSAP as usual (i.e., k plays of the action selected). If it is, then in each of the following k steps, the agent has probability ε to randomly independently choose an action, and probability 1 −ε to play the best-response action. We call this algorithm ε-KSAP. We can model this learning process as a Markov chain, with the state space including all and only convention states. Let st be the state at time t and sc t be the first convention state the agents reach after time t. The transition probability is pε h,h′ = Pr{sc t = h′|st = h}, and it depends only on h, not t (for a fixed ε). Therefore, the Markov chain is stationary. It is also irreducible and aperiodic, because with ε > 0, all actions have positive probability to be chosen in a convention state. Therefore, Theorem 4 in [17] applies and thus the chain has a unique stationary distribution circling around the stochastic stable conventions of {V Q1, V Q2}. These conventions are 2ϵ-PO (Lemma 5 in [15]) with probability 1 −2δ. The proof of Lemma 1 in [17] further characterizes the support of the limit distribution. With 0 < ε < 1, it is easy to obtain from the proof of Lemma 1 in [17] that the probability of playing 2ϵ-PO conventions is at least 1 −Cε, where C > 0 is a constant. Our algorithm intends to let agents stop taking noisy actions at some point and stick to a particular convention. This amounts to sampling the stationary distribution of the Markov chain. If the sampling is unbiased, the agents have a probability at least 1 −Cε to learn a 2ϵ-convention. The issue is how to make the sampling unbiased. We address this by applying a simple and efficient Markov chain Monte Carlo algorithm proposed by Lov´asz and Winkler [13]. The algorithm first randomly selects a state h and randomly walks along the chain until all states have been visited. During the walk, it generates a function Ah : S \ {h} →S, where S is the set of all convention states. Ah can be represented as a direct graph with a direct edge from each h′ to Ah(h′). After the walk, if agents find that Ah defines an h-tree (see Section 2.2.2), h becomes the convention the agents play forever. Otherwise, agents take another random sample from S and repeat random walk, and so on. Lov´asz and Winkler proved that the algorithm makes an exact sampling of the Markov chain and that its expected running time is O(¯h3 log N), where ¯h is the maximum expected time to transfer from one convention state to another. In our setting, we know that the probability to transit from one convention state to another is polynomial in ε (probability to make mistakes in convention states). So, ¯h is polynomial in 1 ε. In addition, recall that our Markov chain is constructed on the convention states instead of all states. The expected time for making a transition in this chain is upper-bounded by the expected convergence time of KSAP which is polynomial in m and k. Recall that Lov´asz and Winkler’s algorithm needs to do uniform random experiments when choosing h and constructing Ah. In our setting, individual agents generate random numbers independently. Without knowing each others’ random numbers, agents cannot commit to a convention together. If one of our learning agents commits to the final action before the other, the other may never commit because it is unable to complete the random walk. It is nontrivial to coordinate a joint commitment time between the agents because the agents cannot communicate (except via actions). We solve this problem by making the agents use the same random numbers (without requiring communication). We accomplish this via a random hash function technique, an idea common in cryptograhy [1]. Formally, a random hash function is a mapping from a pre-image space to an image space. Denote the random hash function with an image space X by γX. It has two properties: (1) For any input, γX randomly with uniform distribution draws an image from X as an output. (2) With the same input, γX gives the same output. Such functions are easy to construct (e.g., standard hash functions like MD5 and SHA can be converted to random hash functions by truncating their output [1]). In our learning setting, the agents share the same observations of previous plays. Therefore, we take the pre-image to be the most recent m joint actions appended by the number of steps played so far. Our learning agents have the same random hash function γX. Whenever an agent should make a call to a random number generator, it instead inputs to γX the m most recent joint actions and the total number of steps played so far, and uses the output of γX as the random number. 4 This way the agents see the same uniform random numbers, and because the agents use the same algorithms, they will reach commitment to the final action at the same step. Learning how to play (imperfect monitoring setting) 1. Construct a virtual Q-function V Qi from Qi t. 2. For steps = 1, 2, 4, 8, . . . do5 3. For j = 1, 2, 3, . . . , 3N do 4. h = γS(ht, t) (Use random hash function γS to choose a convention state h uniformly from S.) 5. U = {h} 6. Do until U = S (a) Play ε-KSAP until a convention state h′ ̸∈U is reached (b) y = γ{1,...,steps}(ht′, t′) (c) Play ε-KSAP until convention states have been visited y times (counting duplicates). Denote the most recent convention state by Ah(h′) (d) U = U ∪{h′} 7. If Ah defines an h-tree, play h forever 8. Endfor 9. Endfor Theorem 2 In any unknown 2-agent coordination game with imperfect monitoring, for 0 < ε < 1 and some constant C > 0, if m ≥4k, using the above algorithm, the agents learn a 2ϵ-PO deterministic policy with probability at least 1 −2δ −Cε in time poly(N, 1 δ , 1 ϵ , 1 ε, m, k). 5 Conclusions and future research In this paper, we studied how to learn to play a Pareto-optimal strict Nash equilibrium when there exist multiple equilibria and agents may have different preferences among the equilibria. We focused on 2-agent repeated coordination games of non-identical interest where the agents do not know the game structure up front and receive noisy payoffs. We designed efficient near-optimal algorithms for both the perfect monitoring and the imperfect monitoring setting (where the agents only observe their own payoffs and the joint actions). In a longer version of the paper [15], we also present the convergence algorithms. In the future work, we plan to extend all these results to n-agent and multistage coordination games. References [1] Bellare and Rogaway. Random oracle are practical: A paradigm for designing efficient protocols. In Proceedings of First ACM Annual Conference on Computer and Communication Security, 93. [2] Boutilier. Planning, learning and coordination in multi-agent decision processes. In TARK, 96. [3] Brafman and Tennenholtz. R-max: A general polynomial time algorithm for near-optimal reinforcement learning. In IJCAI, 01. [4] Claus and Boutilier. The dynamics of reinforcement learning in cooperative multi-agent systems. In AAAI, 98. [5] Fiechter. Efficient reinforcement learning. In COLT, 94. [6] Fudenberg and Levine. The theory of learning in games. MIT Press, 98. [7] Greenwald and Hall. Correlated-q learning. In AAAI Spring Symposium, 02. [8] Hu and Wellman. Multiagent reinforcement learning: theoretical framework and an algorithm. In ICML, 98. [9] Kaelbling, Littman, and Moore. Reinforcement learning: A survey. JAIR, 96. [10] Kearns and Singh. Near-optimal reinforcement learning in polynomial time. In ICML, 98. [11] Littman. Value-function reinforcement learning in markov games. J. of Cognitive System Research, 2:55–66, 00. [12] Littman. Friend-or-Foe Q-learning in general sum game. In ICML, 01. [13] Lov´asz and Winkler. Exact mixing in an unknown markov chain. Electronic Journal of Combinatorics, 95. [14] Pivazyan and Shoham. Polynomial-time reinforcement learning of near-optimal policies. In AAAI, 02. [15] Wang and Sandholm. Learning to play pareto-optimal equilibria: Convergence and efficiency. www.cs.cmu.edu/˜xiaofeng/LearnPOC.ps. [16] Wang and Sandholm. Reinforcement learning to play an optimal Nash equilibrium in team markov game. In NIPS, 02. [17] Young. The evolution of conventions. Econometrica, 61:57–84, 93. [18] Young. An evolutionary model of bargaining. Journal of Economic Theory, 59, 93. 4Recall that agents have established the same numbering of actions. This allows them to encode their joint actions for inputting into γ in the same way. 5The pattern of the for-loops is from the Lov´asz-Winkler algorithm [13].
2003
126
2,339
Using the Forest to See the Trees: A Graphical Model Relating Features, Objects, and Scenes Kevin Murphy MIT AI lab Cambridge, MA 02139 murphyk@ai.mit.edu Antonio Torralba MIT AI lab Cambridge, MA 02139 torralba@ai.mit.edu William T. Freeman MIT AI lab Cambridge, MA 02139 wtf@ai.mit.edu Abstract Standard approaches to object detection focus on local patches of the image, and try to classify them as background or not. We propose to use the scene context (image as a whole) as an extra source of (global) information, to help resolve local ambiguities. We present a conditional random field for jointly solving the tasks of object detection and scene classification. 1 Introduction Standard approaches to object detection (e.g., [24, 15]) usually look at local pieces of the image in isolation when deciding if the object is present or not at a particular location/ scale. However, this approach may fail if the image is of low quality (e.g., [23]), or the object is too small, or the object is partly occluded, etc. In this paper we propose to use the image as a whole as an extra global feature, to help overcome local ambiguities. There is some psychological evidence that people perform rapid global scene analysis before conducting more detailed local object analysis [4, 2]. The key computational question is how to represent the whole image in a compact, yet informative, form. [21] suggests a representation, called the “gist” of the image, based on PCA of a set of spatially averaged filter-bank outputs. The gist acts as an holistic, low-dimensional representation of the whole image. They show that this is sufficient to provide a useful prior for what types of objects may appear in the image, and at which locations/scale. We extend [21] by combining the prior suggested by the gist with the outputs of bottom-up, local object detectors, which are trained using boosting (see Section 2). Note that this is quite different from approaches that use joint spatial constraints between the locations of objects, such as [11, 20, 19, 8]. In our case, the spatial constraints come from the image as a whole, not from other objects. This is computationally much simpler. Another task of interest is detecting if the object is present anywhere in the image, regardless of location. (This can be useful for object-based image retrieval.) In principle, this is straightforward: we declare the object is present iff the detector fires (at least once) at any location/scale. However, this means that a single false positive at the patch level can cause a 100% error rate at the image level. As we will see in Section 4, even very good detectors can perform poorly at this task. The gist, however, is able to perform quite well at suggesting the presence of types of objects, without using a detector at all. In fact, we can use the gist to decide if it is even “worth” running a detector, although we do not explore this here. Often, the presence of certains types of objects is correlated, e.g., if you see a keyboard, you expect to see a screen. Rather than model this correlation directly, we introduce a hidden common cause/ factor, which we call the “scene”. In Section 5, we show how we can reliably determine the type of scene (e.g., office, corridor or street) using the gist. Scenes can also be defined in terms of the objects which are present in the image. Hence we combine the tasks of scene classification and object-presence detection using a tree-structured graphical model: see Section 6. We perform top-down inference (scenes to objects) and bottom-up inference (objects to scenes) in this model. Finally, we conclude in Section 7. (Note: there is a longer, online version of this paper available at www.ai.mit.edu/∼murphyk/Papers/nips2003 long.pdf, which has more details and experimental results than could fit into 8 pages.) 2 Object detection and localization For object detection there are at least three families of approaches: parts-based (an object is defined as a specific spatial arrangement of small parts e.g., [6]), patch-based (we classify each rectangular image region as object or background), and region-based (a region of the image is segmented from the background and is described by a set of features that provide texture and shape information e.g., [5]). Here we use a patch-based approach. For objects with rigid, well-defined shapes (screens, keyboards, people, cars), a patch usually contains the full object and a small portion of the background. For the rest of the objects (desks, bookshelves, buildings), rectangular patches may contain only a piece of the object. In that case, the region covered by a number of patches defines the object. In such a case, the object detector will rely mostly on the textural properties of the patch. The main advantage of the patch-based approach is that object-detection can be reduced to a binary classification problem. Specifically, we compute P(Oc i = 1|vc i ) for each class c and patch i (ranging over location and scale), where Oc i = 1 if patch i contains (part of) an instance of class c, and Oc i = 0 otherwise; vc i is the feature vector (to be described below) for patch i computed for class c. To detect an object, we slide our detector across the image pyramid and classify all the patches at each location and scale (20% increments of size and every other pixel in location). After performing non-maximal suppression [1], we report as detections all locations for which P(Oc i |vc i ) is above a threshold, chosen to given a desired trade-off between false positives and missed detections. 2.1 Features for objects and scenes We would like to use the same set of features for detecting a variety of object types, as well as for classifying scenes. Hence we will create a large set of features and use a feature selection algorithm (Section 2.2) to select the most discriminative subset. We compute a single feature k for image patch i in three steps, as follows. First we convolve the (monochrome) patch Ii(x) with a filter gk(x), chosen from the set of 13 (zero-mean) filters shown in Figure 1(a). This set includes oriented edges, a Laplacian filter, corner detectors and long edge detectors. These features can be computed efficiently: The filters used can be obtained by convolution of 1D filters (for instance, the long edge filters are obtained by the convolution of the two filters [−1 0 1]T and [1 1 1 1 1 1]) or as linear combinations of the other filter outputs (e.g., the first six filters are steerable). We can summarize the response of the patch convolved with the filter, |Ii(x)∗gk(x)|, using a histogram. For natural images, we can further summarize this histogram using just two statistics, the variance and the kurtosis [7]. Hence in step two, we compute |Ii(x)∗gk(x)|γk, for γk ∈{2, 4}. (The kurtosis is useful for characterizing texture-like regions.) Often we are only interested in the response of the filter within a certain region of the patch. Hence we can apply one of 30 different spatial templates, which are shown in Figure 1(b). The use of a spatial template provides a crude encoding of “shape” inside the rectangular patch. We use rectangular masks because we can efficiently compute the average response of a filter within each region using the integral image [24].1 Summarizing, we can compute feature k for patch i as follows: fi(k) = P x wk(x) (|I(x) ∗gk(x)|γk)i . (To achieve some illumination invariance, we also standardize each feature vector on a per-patch basis.) The feature vector has size 13×30×2 = 780 (the factor of 2 arises because we consider γk = 2 or 4). Figure 2 shows some of the features selected by the learning algorithm for different kinds of objects. For example, we see that computer monitor screens are characterized by long horizontal or vertical lines on the edges of the patch, whereas buildings, seen from the outside, are characterized by cross-like texture, due to the repetitive pattern of windows. (a) Dictionary of 13 filters, g(x). (b) Dictionary of 30 spatial templates, w(x). Figure 1: (a) Dictionary of filters. Filter 1 is a delta function, 2–7 are 3x3 Gaussian derivatives, 8 is a 3x3 Laplacian, 9 is a 5x5 corner detector, 10–13 are long edge detectors (of size 3x5, 3x7, 5x3 and 7x3). (b) Dictionary of 30 spatial templates. Template 1 is the whole patch, 2–7 are all sub-patches of size 1/2, 8–30 are all sub-patches of size 1/3. Energy Kurt Kurt Kurt Kurt Kurt Energy Energy Energy Energy Kurt Energy Energy Energy Energy Energy Energy Energy Energy Energy Energy Energy Energy Energy Energy Energy Energy Energy Kurt Kurt Figure 2: Some of the features chosen after 100 rounds of boosting for recognizing screens, pedestrians and buildings. Features are sorted in order of decreasing weight, which is a rough indication of importance. “Energy” means γk = 2 and “Kurt” (kurtosis) means γk = 4. 1The Viola and Jones [24] feature set is equivalent to using these masks plus a delta function filter; the result is like a Haar wavelet basis. This has the advantage that objects of any size can be detected without needing an image pyramid, making the system very fast. By contrast, since our filters have fixed spatial support, we need to down-sample the image to detect large objects. 2.2 Classifier Following [24], our detectors are based on a classifier trained using boosting. There are many variants of boosting [10, 9, 17], which differ in the loss function they are trying to optimize, and in the gradient directions which they follow. We, and others [14], have found that GentleBoost [10] gives higher performance than AdaBoost [17], and requires fewer iterations to train, so this is the version we shall (briefly) present below. The boosting procedure learns a (possibly weighted) combination of base classifiers, or “weak learners”: α(v) = P t αtht(v), where v is the feature vector of the patch, ht is the base classifier used at round t, and αt is its corresponding weight. (GentleBoost, unlike AdaBoost, does not weight the outputs of the weak learners, so αt = 1.) For the weak classifiers we use regression stumps of the form h(v) = a[vf > θ]+b, where [vf > θ] = 1 iff component f of the feature vector v is above threshold θ. For most of the objects we used about 100 rounds of boosting. (We use a hold-out set to monitor overfitting.) See Figure 2 for some examples of the selected features. The output of a boosted classifier is a “confidence-rated prediction”, α. We convert this to a probability using logistic regression: P(Oc i = 1|α(vc i )) = σ(wT [1 α]), where σ(x) = 1/(1 + exp(−x)) is the sigmoid function [16]. We can then change the hit rate/false alarm rate of the detector by varying the threshold on P(O = 1|α). Figure 3 summarizes the performances of the detectors for a set of objects on isolated patches (not whole images) taken from the test set. The results vary in quality since some objects are harder to recognize than others, and because some objects have less training data. When we trained and tested our detector on the training/testing sets of side-views of cars from UIUC2, we outperformed the detector of [1] at every point on the precision-recall curve (results not shown), suggesting that our base-line detectors can match state-of-the-art detectors when given enough training data. 0 5 10 15 20 25 30 35 0 10 20 30 40 50 60 70 80 90 100 bookshelf building car desk streetlight pedestrian screen steps bookshelf building car coffee coffee machine desk streetlight pedestrian screen steps Detection rate False alarms (from 2000 distractors) Figure 3: a) ROC curves for 9 objects; we plot hit rate vs number of false alarms, when the detectors are run on isolated test patches. b) Example of the detector output on one of the test set images, before non-maximal suppression. c) Example of the detector output on a line drawing of a typical office scene. The system correctly detects the screen, the desk and the bookshelf. 3 Improving object localization by using the gist One way to improve the speed and accuracy of a detector is to reduce the search space, by only running the detector in locations/ scales that we expect to find the object. The expected location/scale can be computed on a per image basis using the gist, as we explain below. (Thus our approach is more sophisticated than having a fixed prior, such as “keyboards always occur in the bottom half of an image”.) If we only run our detectors in a predicted region, we risk missing objects. Instead, we run our detectors everywhere, but we penalize detections that are far from the predicted 2http://l2r.cs.uiuc.edu/∼cogcomp/Data/Car/ location/scale. Thus objects in unusual locations have to be particularly salient (strong local detection score) in order to be detected, which accords with psychophysical results of human observers. We define the gist as a feature vector summarizing the whole image, and denote it by vG. One way to compute this is to treat the whole image as a single patch, and to compute a feature vector for it as described in Section 2.1. If we use 4 image scales and 7 spatial masks, the gist will have size 13×7×2×4 = 728. Even this is too large for some methods, so we consider another variant that reduces dimensionality further by using PCA on the gist-minus-kurtosis vectors. Following [22, 21], we take the first 80 principal components; we call this the PCA-gist. We can predict the expected location/scale of objects of class c given the gist, E[Xc|vG], by using a regression procedure. We have tried linear regression, boosted regression [9], and cluster-weighted regression [21]; all approaches work about equally well. Using the gist it is easy to distinguish long-distance from close-up shots (since the overall structure of the image looks quite different), and hence we might predict that the object is small or large respectively. We can also predict the expected height. However, we cannot predict the expected horizontal location, since this is typically unconstrained by the scene. To combine the local and global sources of information, we construct a feature vector f which combines the output of the boosted detector, α(vc i ), and the vector between the location of the patch and the predicted location for objects of this class, xc i −ˆxc. We then train another classifier to compute P(Oc i = 1|f(α(vc i ), xc i, ˆxc)) using either boosting or logistic regression. In Figure 4, we compare localization performance using just the detectors, P(Oc i = 1|α(vc i ), and using the detectors and the predicted location, P(Oc i = 1|f(α(vc i ), xc i, ˆxc)). For keyboards (which are hard to detect) we see that using the predicted location helps a lot, whereas for screens (which are easy to detect), the location information does not help. 0 0.1 0.2 0.3 0.4 0.5 False alarm rate Prob. location of keyboard 0.1 0.2 0.3 0.4 0.5 0.6 0.7 0.8 0.9 1 Detection rate P(Op | vp) P(Op | vp,x(vG)) 0 0.1 0.2 0.3 0.4 0.5 0.6 0.7 0.1 0.2 0.3 0.4 0.5 0.6 0.7 0.8 0.9 1 Detection rate False alarm rate Prob. location of screen P(Op | vp) P(Op | vp,x(vG)) 0 0.1 0.2 0.3 0.4 0.5 0.6 0.7 0.8 0.9 False alarm rate Prob. location of person P(Op | vp) P(Op | vp,x(vG)) 0.1 0.2 0.3 0.4 0.5 0.6 0.7 0.8 0.9 1 Detection rate (a) (b) (c) Figure 4: ROC curves for detecting the location of objects in the image: (a) keyboard, (b) screen, (c) person. The green circles are the local detectors alone, and the blue squares are the detectors and predicted location. 4 Object presence detection We can compute the probability that the object exists anywhere in the image (which can be used for e.g., object-based image retrieval) by taking the OR of all the detectors: P(Ec = 1|vc 1:N) = ∨iP(Oc = 1|vc 1:N). Unfortunately, this leads to massive overconfidence, since the patches are not independent. As a simple approximation, we can use P(Ec = 1|vc 1:N) ≈max i P(Ec = 1|vc 1:N) = P(Ec = 1| max i αi(vc i )) = P(Ec = 1|αc max). Unfortunately, even for good detectors, this can give poor results: the probability of error at the image level is 1 −Q i(1 −qi) = 1 −(1 −q)N, where q is the probability of error at the patch level and N is the number of patches. For a detector with a reasonably low false alarm rate, say q = 10−4, and N = 5000 patches, this gives a 40% false detection rate at the image level! For example, see the reduced performance at the image level of the screen detector (Figure 5(a)), which performs very well at the patch level (Figure 4(a)). An alternative approach is to use the gist to predict the presence of the object, without using a detector at all. This is possible because the overall structure of the image can suggest what kind of scene this is (see Section 5), and this in turn suggests what kinds of objects are present (see Section 6). We trained another boosted classifier to predict P(Ec = 1|vG); results are shown Figure 5. For poor detectors, such as keyboards, the gist does a much better job than the detectors, whereas for good detectors, such as screens, the results are comparable. Finally, we can combine both approaches by constructing a feature vector from the output of the global and local boosted classifiers and using logistic regression: P(Ec = 1|vG, vc 1:N) = σ(wT [1 α(vG)αc max]). However, this seems to offer little improvement over the gist alone (see Figure 5), presumably because our detectors are not very good. 0 0.1 0.2 0.3 0.4 0.5 0.6 0.7 0.8 0 0.2 0.4 0.6 0.8 1 Detection rate False alarm rate Keyboard P(E|vG) P(E|vlocal) P(E|joint) 0 0.1 0.2 0.3 0.4 0.5 0.6 0.7 0 0.2 0.4 0.6 0.8 1 Detection rate False alarm rate Screen P(E|vG) P(E|vlocal) P(E|joint) 0 0.1 0.2 0.3 0.4 0.5 0.6 0.7 0.8 0.9 0 0.2 0.4 0.6 0.8 1 Detection rate False alarm rate Person P(E|vG) P(E|vlocal) P(E|joint) (a) (b) (c) Figure 5: ROC curves for detecting the presence of object classes in the image: (a) keyboard (b) screen, (c) person. The green circles use the gist alone, the blue squares use the detectors alone, and the red stars use the joint model, which uses the gist and all the detectors from all the object classes. 5 Scene classification As mentioned in the introduction, the presence of many types of objects is correlated. Rather than model this correlation directly, we introduce a latent common “cause”, which we call the “scene”. We assume that object presence is conditionally independent given the scene, as explained in Section 6. But first we explain how we recognize the scene type, which in this paper can be office, corridor or street. The approach we take to scene classification is simple. We train a one-vs-all binary classifier for recognizing each type of scene using boosting applied to the gist.3 Then we 3An alternative would be to use the multi-class LogitBoost algorithm [10]. However, training separate one-vs-all classifiers allows them to have different internal structure (e.g., number of rounds). S vG Ec1 . . . Ecn Oc1 i1 . . . Oc1 iN1 Ocn i1 . . . Ocn iNn vc1 i1 . . . vc1 iN1 vcn i1 . . . vcn iNn v 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 PR for 3 scenes categories Maxent Boost Baseline Joint Recall Precision (a) (b) Figure 6: (a) Graphical model for scene and object recognition. n = 6 is the number of object classes, Nc ∼5000 is the number of patches for class c. Other terms are defined in the text. (b) Precision-recall curve for scene classification. normalize the results: P(S = s|vG) = P (Ss=1|vG) P s′ P (Ss′=1|vG) where P(Ss = 1|vG) is the output of the s-vs-other classifier.4 6 Joint scene classification and object-presence detection We now discuss how we can use scene classification to facilitate object-presence detection, and vice versa. The approach is based on the tree-structured graphical model5 in Figure 6(a), which encodes our assumption that the objects are conditionally independent given the scene. This graphical model encodes the following conditional joint density: P(S, E1:n, Oc 1:N, . . . , Ocn 1:N|v) = 1 Z P(S|vG) Y c φ(Ec, S) Y i P(Oc i |Ec, vc i ) where vG and vc i are deterministic functions of the image v and Z is a normalizing constant. called the partition function (which is tracatable to compute, since the graph is a tree). By conditioning on the observations as opposed to generating them, we are free to incorporate arbitrary, possibly overlapping features (local and global), without having to make strong independence assumptions c.f., [13, 12]. We now define the individual terms in this expression. P(S|vG) is the output of boosting as described in Section 5. φ(Ec, S) is essentially a table which counts the number of times object type c occurs in scene type S. Finally, we define P(Oc i = 1|Ec = e, vc i ) = ½ σ(wT [1 α(vc i )]) if e = 1 0 if e = 0 This means that if we know the object is absent in the image (Ec = 0), then all the local detectors should be turned off (Oc i = 0); but if the object is present (Ec = 1), we do not know where, so we allow the local evidence, vc i , to decide which detectors should turn on. We can find the maximum likelihood estimates of the parameters of this model by training it jointly using a gradient procedure; see the long version of this paper for details. In Figure 5, we see that we can reliably detect In Figure 5, we see that we can reliably detect the presence of the object in an image without using the gist directly, providing we 4For scenes, it is arguably more natural to allow multiple labels, as in [3], rather than forcing each scene into a single category; this can be handled with a simple modification of boosting [18]. 5The graph is a tree once we remove the observed nodes. know what the scene type is (the red curve, derived from the joint model in this section, is basically the same as the green curve, derived from the gist model in Section 4). The importance of this is that it is easy to label images with their scene type, and hence to train P(S|vG), but it is much more time consuming to annotate objects, which is required to train P(Ec|vG).6 7 Conclusions and future work We have shown how to combine global and local image features to solve the tasks of object detection and scene recognition. In the future, we plan to try a larger number of object classes. Also, we would like to investigate methods for choosing which order to run the detectors. For example, one can imagine a scenario in which we run the screen detector first (since it is very reliable); if we discover a screen, we conclude we are in an office, and then decide to look for keyboards and chairs; but if we don’t discover a screen, we might be in a corridor or a street, so we choose to run another detector to disambiguate our belief state. This corresponds to a dynamic message passing protocol on the graphical model. References [1] S. Agarwal and D. Roth. Learning a sparse representation for object detection. In Proc. European Conf. on Computer Vision, 2002. [2] I. Biederman. On the semantics of a glance at a scene. In M. Kubovy and J. Pomerantz, editors, Perceptual organization, pages 213–253. Erlbaum, 1981. [3] M. Boutell, X. Shen, J. Luo, and C. Brown. Multi-label semantic scene classification. Technical report, Dept. Comp. Sci. U. Rochester, 2003. [4] D. Davon. Forest before the trees: the precedence of global features in visual perception. Cognitive Psychology, 9:353–383, 1977. [5] Pinary Duygulu, Kobus Barnard, Nando de Freitas, David Forsyth, and Michael I. Jordan. Object recognition as machine translation: Learning a lexicon for a fixed image vocabulary. In Proc. European Conf. on Computer Vision, 2002. [6] R. Fergus, P. Perona, and A. Zisserman. Object class recognition by unsupervised scale-invariant learning. In Proc. IEEE Conf. Computer Vision and Pattern Recognition, 2003. [7] D. Field. Relations between the statistics of natural images and the response properties of cortical cells. J. Opt. Soc. Am., A4:2379–2394, 1987. [8] M. Fink and P. Perona. Mutual boosting for contextual influence. In Advances in Neural Info. Proc. Systems, 2003. [9] J. Friedman. Greedy function approximation: a gradient boosting machine. Annals of Statistics, 29:1189–1232, 2001. [10] J. Friedman, T. Hastie, and R. Tibshirani. Additive logistic regression: a statistical view of boosting. Annals of statistics, 28(2):337–374, 2000. [11] R. Haralick. Decision making in context. IEEE Trans. on Pattern Analysis and Machine Intelligence, 5:417–428, 1983. [12] Sanjiv Kumar and Martial Hebert. Discriminative random fields: A discriminative framework for contextual interaction in classification. In IEEE Conf. on Computer Vision and Pattern Recognition, 2003. [13] J. Lafferty, A. McCallum, and F. Pereira. Conditional random fields: Probabilistic models for segmenting and labeling sequence data. In Intl. Conf. on Machine Learning, 2001. [14] R. Lienhart, A. Kuranov, and V. Pisarevsky. Empirical analysis of detection cascades of boosted classifiers for rapid object detection. In DAGM 25th Pattern Recognition Symposium, 2003. [15] C. Papageorgiou and T. Poggio. A trainable system for object detection. Intl. J. Computer Vision, 38(1):15–33, 2000. [16] J. Platt. Probabilistic outputs for support vector machines and comparisons to regularized likelihood methods. In A. Smola, P. Bartlett, B. Schoelkopf, and D. Schuurmans, editors, Advances in Large Margin Classifiers. MIT Press, 1999. [17] R. Schapire. The boosting approach to machine learning: An overview. In MSRI Workshop on Nonlinear Estimation and Classification, 2001. [18] Robert E. Schapire and Yoram Singer. BoosTexter: A boosting-based system for text categorization. Machine Learning, 39(2/3):135–168, 2000. [19] A. Singhal, Jiebo Luo, and Weiyu Zhu. Probabilistic spatial context models for scene content understanding. In Proc. IEEE Conf. Computer Vision and Pattern Recognition, 2003. [20] T. M. Strat and M. A. Fischler. Context-based vision: recognizing objects using information from both 2-D and 3-D imagery. IEEE Trans. on Pattern Analysis and Machine Intelligence, 13(10):1050–1065, 1991. [21] A. Torralba. Contextual priming for object detection. Intl. J. Computer Vision, 53(2):153–167, 2003. [22] A. Torralba, K. Murphy, W. Freeman, and M. Rubin. Context-based vision system for place and object recognition. In Intl. Conf. Computer Vision, 2003. [23] A. Torralba and P. Sinha. Detecting faces in impoverished images. Technical Report 028, MIT AI Lab, 2001. [24] Paul Viola and Michael Jones. Robust real-time object detection. International Journal of Computer Vision - to appear, 2002. 6Since we do not need to know the location of the object in the image in order to train P(Ec|vG), we can use partially annotated data such as image captions, as used in [5].
2003
127
2,340
Approximability of Probability Distributions Alina Beygelzimer∗ IBM T. J. Watson Research Center Hawthorne, NY 10532 beygel@cs.rochester.edu Irina Rish IBM T. J. Watson Research Center Hawthorne, NY 10532 rish@us.ibm.com Abstract We consider the question of how well a given distribution can be approximated with probabilistic graphical models. We introduce a new parameter, effective treewidth, that captures the degree of approximability as a tradeoff between the accuracy and the complexity of approximation. We present a simple approach to analyzing achievable tradeoffs that exploits the threshold behavior of monotone graph properties, and provide experimental results that support the approach. 1 Introduction One of the major concerns in probabilistic reasoning using graphical models, such as Bayesian networks, is the computational complexity of inference. In general, probabilistic inference is NP-hard and a typical approach to handling this complexity is to use an approximate inference algorithm that trades accuracy for efficiency. This leads to the following question: How can we distinguish between distributions that are easy to approximate and those that are hard? More generally, how can we characterize the inherent degree of distribution’s complexity, i.e. its approximability? These questions also arise in the context of learning probabilistic graphical models from data. Note that traditional model selection criteria, such as BIC/MDL, aim at fitting the data well and minimizing the representation complexity of the learned model (i.e., the total number of parameters). However, as demonstrated in [2], such criteria are unable to capture the inference complexity: two models that have similar representation complexity and fit data equally well may have quite different graph structures, making one model exponentially slower for inference than the other. Thus, our goal is to develop learning algorithms that can find good trade-offs between accuracy of a model and its inference complexity. Commonly used exact inference algorithms, such as the junction tree algorithm [12], or closely related variable-elimination techniques [6], essentially triangulate the graph, and their complexity is exponential in the size of largest clique induced during triangulation (parameter known as treewidth). Generally, it can be shown that (in some precise sense) any scheme for belief updating based on local calculations must contain a hidden triangulation [10]. Thus the treewidth arises as a natural measure of inference complexity in graphical models. ∗The work was done while the author was at the Department of Computer Science, University of Rochester. Intuitively, a probability distribution is approximable, or easy, if it is close to a distribution represented by an efficient, low-treewidth graphical model. We use the Kullback-Leibler divergence dKL as a measure of closeness. 1. The following example explains our intuition behind approximable vs. nonapproximable distributions. Motivating Example Consider the parity function on n binary random variables {X1, . . . , Xn}, and let our target distribution P be the uniform distribution on the values to which it assigns 1 (i.e., on n-bit strings with an odd number of 1s). It is easy to see that any approximation Q that decomposes over a network whose moralized graph misses at least one edge, is precisely as inaccurate as the one that assumes all variables to be independent (i.e., has no edges). This follows from the fact that the probability treewidth n −1 n −2 (clique) 0 1 (empty graph) dKL distribution induced on any proper subset of the variables is uniform, and thus for any subset {Xi1, . . . , Xik} of k < n variables, P(Xi1 | Xi2, . . . , Xik) = P(Xi1), uniform on {0, 1}. It is then readily seen that P x P(x) log Q(x) = 2−(n−1) P x:P (x)>0 log Qn i=1 Q(xi | xi1, . . . , xir) = log Qn i=1 Q(xi) = log 2−n = −n, 2 and dKL(P, Q) = −H(P)+n = 1 since H(P) = n−1. Thus, unless we can afford the complexity of the complete graph, there is absolutely no sense (i.e., absolutely no gain in accuracy and a potentially exponential loss of efficiency) in using a model more complex than the empty graph (i.e., n isolated nodes with no edges). This intuitively captures what we mean by a nonapproximable distribution. On the other hand, one can easily construct a distribution with large weak dependencies such that representing this distribution exactly requires a network with large treewidth; however, if we are willing to sacrifice just a bit of accuracy, we get a very simple model. For example, consider a distribution P({X1, . . . , Xn}) in which variables X1, . . . , Xn−1 are independent and uniformly distributed; if all X1, . . . , Xn−1 are true, Xn is true with probability 1 (and false with probability 0); otherwise Xn is true with probability 1/2 (regardless of the values of X1, . . . , Xn−1). The network yielding zero KL-divergence is the n-node clique (after moralization). Tolerating KL-divergence 2−(n−1) (i.e., exponentially vanishing with n) allows us to use an exponentially more efficient model for P (namely, the empty graph). The following questions naturally arise: If we tolerate a certain inaccuracy, what is the best inference complexity we can hope to achieve? Or, what is the best achievable approximation accuracy given a constraint on the complexity (i.e., a bound on the treewidth)? The tradeoff between the complexity and accuracy is monotonic; however, it may be far from linear. The goal is to exploit these nonlinearities in choosing the best available tradeoff. Our analysis of accuracy vs. complexity trade-offs is based on the results from random graph theory which suggest that graph properties monotone in edge addition (e.g., such as graph connectivity) appear rather suddenly: the transition from the property being very unlikely to it being very likely occurs during a small change of the edge probability p (density) in the random graph [7, 8]. This paper makes the following contributions. First, we show that both important properties of random graphical models, the property of “being efficient” (i.e., having treewidth at most some fixed integer k) and the property of “being accurate” (i.e., being at distance at most some δ from the target distribution), are monotone and demonstrate a threshold behavior, giving us two families of threshold curves parameterized by k and by δ, respectively. Second, we introduce the notion of effective treewidth k(δ), which denotes the smallest 1Note that minimizing dKL from the empirical distribution (induced by a given set of samples) also corresponds to maximizing the likelihood of observed data. 2The second to last equality is due to the well-known fact that dKL(P, Q) is minimized by forcing the conditional probabilities of Q to coincide with those computed from P. achievable treewidth k given a constraint δ on KL-divergence (error) from the target (we also introduce a notion of ϵ-achievable k(δ) which requires at least ϵ-fraction of models in a given set to achieve treewidth k and error δ). The effective treewidth captures the approximability of the distribution, and is determined by relative position of the threshold curves, an inherent property of the target distribution. Finally, we provide an efficient sampling-based approach that actually finds a model achieving k(δ) with high probability. We estimate the threshold curves and, using their relative position, identify a class of treewidth-bounded models such that the models in the class are still simple, yet this class already contains (with high probability) a sufficiently good approximations to the target distribution (otherwise, we suggest that the distribution is inherently hard to approximate). 2 Preliminaries and Related Work Let P be a probability distribution on n discrete random variables X1, X2, . . . , Xn. A Bayesian network exploits the independences among the Xi to provide a compact representation of P as a product of low-order conditional probability distributions. The independences are encoded by a directed acyclic graph (DAG) G with nodes corresponding to X1, X2, . . . , Xn and edges representing direct dependencies. Each Xi is independent of its non-descendants given its parents in the graph [12]. The dependencies are quantified by associating each node Xi with a local conditional probability distribution PB(Xi | Πi), where Πi is the set of parents of Xi in G. The joint probability distribution encoded by B is given by the product PB(X1, . . . , Xn) = Qn i=1 PB(Xi | Πi). We say that a distribution P decomposes over a DAG G if there exist local conditional probability distributions corresponding to G such that P can be written in such a form. In general, exact probabilistic inference in Bayesian networks is NP-hard. For singlyconnected networks (i.e., networks with no undirected cycles), there is a linear time local belief-propagation algorithm [12]. In order to use this algorithm in the presence of cycles, one typically constructs a junction tree of the network and runs the algorithm on this tree [12]. Constructing a junction tree involves triangulating the graph, i.e., adding edges so that every cycle of length greater than three has a chord (i.e., an edge between a pair of non-adjacent nodes). Each triangulation corresponds to some order of eliminating variables when summing terms out during inference [6]. Exact inference can then be done in time and space linear in the representation of clique marginals in the junction tree, which is exponential in the size of the largest clique induced during triangulation. This number (minus one) is known as the width of a given triangulation. The minimum width over all possible triangulations is called the treewidth of the graph. The triangulation procedure is defined for undirected graphs, so we must first make the network undirected while preserving the set of independence assumptions; this can be done by moralizing the network, i.e., connecting (“marrying”) the parents of every node by a clique and then dropping the direction of all edges. Given a set of independent samples from P, the general goal is to learn a model (a Bayesian network) of this distribution that involves dependencies only on limited subsets of the variables. Restricting the size of dependencies controls both overfitting and the complexity of inference in the resulting model. The samples are in the form of tuples ⟨x1, . . . , xn⟩each corresponding to a particular assignment ⟨X1 = x1, . . . , Xn = xn⟩. Given a target distribution P(X) and an approximation Q(X), the information divergence (or Kullback-Leibler distance) between P and Q is defined as dKL(P, Q) = P x P(x) log P (x) Q(x), where x ranges over all possible assignments to the variables in X (See [5].) Notice that dKL(P, Q) is not necessarily symmetric. A natural way of controlling the complexity of the learned model is to limit ourselves to a class of treewidth-bounded networks. Let Dk denote the class of distributions decomposable on graphs with treewidth at most k (0 ≤k < n), with D1 corresponding to the set of tree-decomposable distributions. The distribution within Dk minimizing the information divergence from the target distribution P is called the projection of P onto Dk. Again, if P is the empirical distribution, then this is also the distribution within Dk maximizing the likelihood of observing the data. Learning bounded-treewidth models Chow and Liu [4] showed how to find a projection onto the set of tree-decomposable distributions. For a fixed tree T, the projection of P onto the set of T-decomposable distributions is uniquely given by the distribution in which the conditional probabilities along the edges of T coincide with those computed from P. Hence the tree yielding the closest projection is simply given by any maximum weight spanning tree, where the edge weight is the mutual information between the corresponding variables. Notice that candidate spanning trees can be compared without any knowledge of P beyond that given by pairwise statistics. The tree can be efficiently found using any of the well known algorithms. The additive decomposition of dKL used in the proof, can be easily extended to “wider” networks. Fix a network structure G, and let Q be a distribution decomposable over G. Then dKL(P, Q) = X x P(x) log P(x) Q(x) = − n X i=1 X xi,πi P(xi, πi) log Q(xi | πi) −H(P), where πi ranges over all possible values of Πi. If P is the empirical distribution induced by the given sample of size N (i.e., defined by frequencies of events in the sample), then the first term can be shown to be −LL(Q)/N.3 Thus minimizing dKL(P, Q) is equivalent to maximizing the log likelihood LL(Q). Standard arguments (see, for example, [12]) show that the first term is maximized by forcing all conditional probabilities Q(xi | πi) to coincide with those computed from P. If P is the empirical distribution, this means forcing the parameters to be the corresponding relative frequencies in the sample. Hence if G is fixed, the projection onto the set of Gdecomposable distributions is uniquely defined, and we will identify G with this projection (ignoring some notational abuse). It remains, of course, to find G that is the closest to P among all DAGs in some treewidth-bounded class Dk. As observed by H¨offgen [9], the problem readily reduces to the minimum-weight hypertree problem. The reverse reduction is not known, so the NP-hardness of the hypertree problem does not imply the hardness of the learning problem. Srebro [13] showed that a similar undirected decomposition holds for bounded treewidth Markov networks (probabilistic models that use undirected graphs to represent dependencies). He showed that the learning problem is equivalent to finding a minimum-weight undirected hypertree, and so is NP-hard. It is important to note that Srebro [13] considered approximation in the context of density estimation rather than model selection, thus the choice of k is directly driven by the size of the sample space; the only rationale for limiting the class of hypothesis distributions is to prevent overfitting. With an infinite amount of data, they would learn a clique, since adding edges would always decrease the divergence. Our goal, on the other hand, is to find the most appropriate treewidth-bounded class onto which to project the distribution. Threshold behavior of random graphs We use the model of random directed acyclic graphs (DAGs) defined by Barak and Erd˝os [1]. Consider the probability space G(n, p) of random undirected graphs on n nodes with edge probability p (i.e., every pair of nodes is connected with probability p, independently of every other pair). Let Gn,p stand for a random graph from this probability space. We will also occasionally use Gn,m to denote a graph chosen randomly from among all graphs with n nodes and m edges. When p = m/ ¡n 2 ¢ , the two models are practically identical. A random DAG in the Barak-Erd˝os model is obtained from Gn,p by orienting the edges according to the ordering of vertices, i.e., all edges are directed from higher to lower indexed vertices. 3Since the true distribution P is given only by the sample, we let P also denote the empirical distribution induced by the sample, ignoring some abuse of notation. A graph property P is naturally associated with the set of graphs having P. A property is monotone increasing if it is preserved under edge addition: If a graph G satisfies the property, then every graph on the same set of nodes containing G as a subgraph must satisfy it as well. It is easy to see (and intuitively clear) that if P is a monotone increasing property then the probability that Gn,p satisfies P is a non-decreasing function of p. A monotone decreasing property is defined similarly. For example, the property of having treewidth at most some fixed integer k is monotone decreasing: adding edges can only increase the treewidth. The theory of random graphs was initiated by Erd˝os and R´enyi [7], and one of the main observations they made was that many natural monotone properties appear rather suddenly, i.e., as we increase p, there is a sharp transition from a property being very unlikely to it being very likely. Friedgut [8] proved that every monotone graph property of undirected graphs has such a threshold behavior. Random DAGs (corresponding to random partially ordered sets) have received less attention then random undirected graphs, partially because of the additional structure that prevents the completely independent choice of edges. Nonetheless, many properties of random DAGs were also shown to have threshold functions. (See, for example, [3] and references therein.) However, we are not aware of any general result for random DAGs analogous to that of Friedgut [8]. 3 Formalization First we introduce two properties of networks essential for the rest of the paper. Accuracy Recall that the information divergence of a given DAG G from the target distribution P is given by dKL(P, G) = W(G) −H(P), where W(G) = −Pn i=1 P xi,πi P(xi, πi) log P(xi | πi). (In our case, P is the empirical distribution induced by the given sample S of size N. As mentioned before, W(G) = −LL(G)/N ≥0.) Fix a distance parameter δ > 0, and consider the property Pδ of n-node DAGs of having W(G) ≤δ. Notice that Pδ is monotone increasing: Adding edges to a graph can only bring the graph closer to the target distribution, since any distribution decomposable on the original graph is also decomposable on the augmented one. Thus if G is a subgraph of G′, then W(G) ≤δ only if W(G′) ≤δ. Complexity Fix an integer k, and consider the property of n-node DAGs of having treewidth of their moralized graph at most k. Call this property Pk and note that it is a structural property of a DAG, which does not depend on the target distribution and its projection onto the DAG. It is also a monotone decreasing property, since if a graph has treewidth at most k, then certainly any of its subgraphs does. Recall that we identify each graph with the projection of the target distribution onto the graph. We call a pair (k, δ) achievable for a distribution P, if there exists a distribution Q decomposable on a graph with treewidth at most k such that dKL(P, Q) ≤δ. The effective treewidth of P, with respect to a given δ, is defined as the smallest k(δ) such that the pair (k, δ) is achievable, i.e., if all distributions at distance at most δ from P are not decomposable on graphs with treewidth less than k(δ). This formulation gives the level of inevitable complexity (i.e., treewidth) k, given the desired level of accuracy δ. We will also be interested in average-case analogs of these definitions. Fix ϵ > 0. We will say that a pair (k, δ) is ϵ-achievable for P if at least an ϵ-fraction of all DAGs in Dk certify that (k, δ) is achievable. Thus we not only care about the existence of an approximation with given δ and k, but also in the number of such approximations. 4 Main Idea Consider, for each treewidth bound k, the curve given by µk(p) = Pr[width(Gn,p) ≤k], and let pk be such that µk(pk) = 1/2 + ϵ, where 0 < ϵ < 1 2 is some fixed constant. Similarly, for δ > 0, define the curve µδ(p) = Pr[W(Gn,p) ≤δ], and let pδ be the critical value of p given by µδ(pδ) = 1/2. For reasons that will become clear in a moment, our goal will be to find, for each feasible treewidth k, the value of δ such that pδ = pk. To find each pk, the algorithm will simply do a binary search on the interval (0, 1): For the current value of edge probability p, the algorithm estimates µk(Gn,p) by random sampling and branches according to the estimate. The search is continued until p gets sufficiently close to satisfying µk(Gn,p) = 1/2 + ϵ. To estimate µk(Gn,p) within an additive error ρ with probability at least 1 −γ, the algorithm samples m = ln(2/γ) 2ρ2 independent copies of Gn,p, and outputs the average value of the 0/1 random variable indicating whether the treewidth of the sampled DAG is at most k. The analysis is just a straightforward application of the Chernoff Bound. Note that the values related to treewidth are independent of the target distribution and can be precomputed offline. To find δ = δ(k) for a given value of k, the algorithm computes the values of W(Gn,pk) for the m sampled random DAGs in G(n, pk), orders them and chooses the median. Each pair (k, δ) gives a point on the threshold curve. We know that at least a (1/2 + ϵ)-fraction of the DAGs in G(n, pk) satisfy Pk. On the other hand, at least half of them satisfy Pδ, and thus at least an ϵ-fraction satisfies both. Moreover, there is a very simple probabilistic algorithm for finding a model realizing the tradeoff: We just need to sample O(1/ϵ) DAGs in G(n, pk) and choose the closest one. Clearly we are overcounting, since the same DAGs may contribute to both probabilities; however not absurdly, since intuitively the graphs in G(n, pk) with small treewidth will not fit the distribution better than the ones with larger treewidth. A small example should help make $0$ $0.2$ $0.4$ $0.6$ $0.8$ $1$ $5$ $10$ $15$ $20$ $25$ $30$ number of edges Figure 1: Threshold curves for a 3-wise independent distribution on 8 random variables (using a construction from [11]). the goals clear. A distribution is called k-wise independent if any subset of k variables is mutually independent (however, there may exist dependencies on larger subsets). Figure 1 shows the curves for a 3wise independent distribution on 8 random variables. We can hardly expect graphs with treewidth at most 2 to do well on this distribution, since all triples are independent, and their marginals do not reveal any higher-order structure; as we will see this is indeed the case. The xaxis in Figure 1 corresponds to the number of edges m, the y-axis denotes the probability that Gn,m satisfies the property corresponding to a given curve. The monotone decreasing curves correspond to the properties Pk for k = {1, . . . , 6} (from left to right respectively). For k = 7, the curve is just µm(Pk) = 1. The monotone increasing curves correspond to the property of having dKL at most δ. The leftmost curve is for δ = 0.07, and it decreases by 0.01 as we go from left to right; the smaller δ, the higher the quality of approximation, thus the smaller the probability of attaining it. The empty graph (treewidth 0) had divergence 0.073. As m increases, the probability of having small treewidth decreases, while the probability of getting close to the target increases. (Since n is small, we computed the divergence exactly.) As the random graph evolves, we want to capture the moment when the first probability is still high, while the second is already high. As expected, graphs with treewidth at most 2 are as inaccurate as the empty graph since all triples are independent. Given the desired level of closeness δ, we want to find the smallest treewidth k such that the corresponding curves meet above some cut-off probability. For example, to get within dKL at most 0.7, we may suggest, say, projecting onto graphs with treewidth 4 (cutting at 0.4). The cut-off value determines the efficiency of finding a model with such k and δ (see discussion above). Estimating dKL Fix a bounded-treewidth DAG G. Let the target distribution be the empirical distribution P induced by a given sample. Recall that dKL(P, G) decomposes into sum of conditional entropies induced by G (minus the entropy of P). H¨offgen [9] showed how to estimate these conditional entropies with any fixed additive precision ρ using polynomially many samples. More precisely, he showed that a sample of size m = m(γ, ρ) = O(( n ρ )2 log2 n ρ log nk+1 γ ) suffices to obtain good estimations of all induced conditional entropies with probability at least 1 −γ, which in turn suffices to estimate dKL(P, G) with the additive precision ρ. Estimating Treewidth We, of course, will not attempt to compute the treewidth of the randomly generated graphs exactly. The problem is NP-hard 4. In practice, people often use heuristics (based, for example, on eliminating vertices in the order of maximum cardinality, minimum degree, or minimum separating vertex set). There are no theoretical guarantees in general, but heuristics tend to perform reasonably well: used in combination with various lower bound techniques, they can often pin down the treewidth to a small range, or even identify it exactly 5. We stress that the values related to treewidth are independent of the target distribution and can be precomputed. 5 Experimental Results We tested the approach presented in the paper on distributions ancestrally sampled from real-life medical networks commonly used for benchmarking. The experiments support the following conclusions: the properties capturing the complexity and accuracy of a model indeed demonstrate a threshold behavior, which can be exploited in determining the best tradeoff for the given distribution; the simple approach based on generating random graphs and using them to approximate the thresholds is indeed capable of capturing the effective width of a distribution. Due to page limit, we discuss an application of the method to a single network known as ALARM (originating from anesthesia monitoring). The network has 37 nodes, 46 directed edges, 10 12 14 16 18 20 22 24 0 5 10 15 20 25 30 35 accuracy (W) complexity (treewidth) Figure 2: Tradeoff curve for ALARM 19 additional undirected edges induced by moralization; the treewidth is 4. A sample of size N = 104 was generated using ancestral sampling, inducing the empirical distribution with support on 5570 unique variable assignments. The entropy of the empirical distribution P was 9.6 (maximum possible entropy for a 5570-point distribution is 12.4). Figure 2 shows the curve illustrating the (estimated) tradeoffs available for P. For each treewidth bound k, the curves gives an estimate of the best achievable value of W = dKL −H(P). (Recall that LL = −N · W.) The estimate is based on generating 400 random DAGs with 37 nodes and m edges, for every possible m. Several points on the curve are worthy of note. The upper-left point (0, 23.4) corresponds to the model that assumes all 37 variables to be independent. On the other extreme, the lower-right point (36, 0) corresponds to the clique on 37 nodes, which of course can model P perfectly, but with exponential complexity. The closer the area under the curve to zero, the easier the distribution (in the sense discussed in this paper). Here we see that the highest gain in accuracy from allowing the model to be more complex occurs up to treewidth 4, less so 5 and 6; by further increasing the treewidth we do not gain much in accuracy. We succeed in reconstructing the width in the sense that the distribution was 4If k is fixed, the problem of determining whether a graph has treewidth k has a linear time algorithm. As typical, the bound contains a large hidden constant with k in the exponent, making the algorithm hardly applicable in practice. There is a number of constant-factor approximations with an exponential dependence on k, and a polynomial-time O(log k)-factor approximation. No polynomial-time constant-factor approximation is known. 5Although one can construct graphs for which they produce solutions that are arbitrarily far from optimal. 0 0.2 0.4 0.6 0.8 1 0 20 40 60 80 100 120 probability of satisfying the property number of edges Figure 3: Threshold curves for ALARM simulated from a treewidth-4 model.6 Such tradeoff curves are similar to commonly used ROC (Receiver Operating Characteristic) curves; the techniques for finding the cutoff value in ROC curves can be used here as well. Instead of plotting the best achievable distance, we can plot the best distance achievable by at least an ϵ-fraction of models in the class, parameterizing the tradeoff curve by ϵ. Figure 3 shows the threshold curves. The axes have the same meaning as in Figure 1. Varying sample size and the number of randomly generated DAGs does not change the behavior of the curves in any meaningful way; not surprisingly, increasing these parameters results in smoother curves. References [1] A. Barak and P. Erd˝os. On the maximal number of strongly independent vertices in a random acyclic directed graph. SIAM J. Algebraic and Discrete Methods, 5:508–514, 1984. [2] A. Beygelzimer and I. Rish. Inference complexity as a model-selection criterion for learning bayesian networks. In Proceedings of the Eighth International Conference on Principles of Knowledge Representation and Reasoning (KR2002), Toulouse, France, 2002. [3] B. Bollob´as and G. Brightwell. The structure of random graph orders. SIAM J. Discrete Mathematics, 10(2):318–335, 1997. [4] C. Chow and C. Liu. Approximating discrete probability distributions with dependence trees. IEEE Trans. on Inf. Theory, 14:462–467, 1968. [5] T. Cover and J. Thomas. Elements of information theory. John Wiley & Sons Inc., New York, 1991. A Wiley-Interscience Publication. [6] R. Dechter. Bucket elimination: A unifying framework for probabilistic reasoning. In M. I. Jordan (Ed.), Learning in Graphical Models, Kluwer Academic Press, 1998. [7] P. Erd˝os and A. R´enyi. On the evolution of random graphs. Bull. Inst. Internat. Statist., 38:343– 347, 1961. [8] E. Friedgut and G. Kalai. Every monotone graph property has a sharp threshold. Proceedings of the American Mathematical Society, 124(10):2993–3002, 1996. [9] K. H¨offgen. Learning and robust learning of product distributions. In Proceedings of the 6th Annual Workshop on Computational Learning Theory, pages 77–83, 1993. [10] F. V. Jensen and F. Jensen. Optimal junction trees. In Proc. Tenth Conference on Uncertainty and AI (UAI), 1994. [11] J. Naor and M. Naor. Small-bias probability spaces: Efficient constructions and applications. In Proc. of the 22nd ACM Symposium on Theory of Computing (STOC), pages 213–223, 1990. [12] J. Pearl. Probabilistic Reasoning in Intelligent Systems: Networks of Plausible Inference. Morgan Kaufmann Publishers, 1988. [13] N. Srebro. Maximum likelihood bounded Tree-Width markov networks. In Proceedings of the 17th Conference on Uncertainty in AI (UAI), pages 504–511, 2001. 6Note, however, that it does not imply that the empirical distribution itself decomposes on a treewidth-4 model. The simplest example of this is when the true distribution is uniform.
2003
128
2,341
Gene Expression Clustering with Functional Mixture Models Darya Chudova, Department of Computer Science University of California, Irvine Irvine CA 92697-3425 dchudova@ics.uci.edu Christopher Hart Division of Biology California Institute of Technology Pasadena, CA 91125 hart@caltech.edu Eric Mjolsness Department of Computer Science University of California, Irvine Irvine CA 92697-3425 emj@uci.edu Padhraic Smyth Department of Computer Science University of California, Irvine Irvine CA 92697-3425 smyth@ics.uci.edu Abstract We propose a functional mixture model for simultaneous clustering and alignment of sets of curves measured on a discrete time grid. The model is specifically tailored to gene expression time course data. Each functional cluster center is a nonlinear combination of solutions of a simple linear differential equation that describes the change of individual mRNA levels when the synthesis and decay rates are constant. The mixture of continuous time parametric functional forms allows one to (a) account for the heterogeneity in the observed profiles, (b) align the profiles in time by estimating real-valued time shifts, (c) capture the synthesis and decay of mRNA in the course of an experiment, and (d) regularize noisy profiles by enforcing smoothness in the mean curves. We derive an EM algorithm for estimating the parameters of the model, and apply the proposed approach to the set of cycling genes in yeast. The experiments show consistent improvement in predictive power and within cluster variance compared to regular Gaussian mixtures. 1 Introduction Curve data arises naturally in a variety of applications. Each curve typically consists of a sequence of measurements as a function of discrete time or some other independent variable. Examples of such data include trajectory tracks of individuals or objects (Gaffney and Smyth, 2003) and biomedical measurements of response to drug therapies (James and Sugar, 2003). In some cases, the curve data is measured on regular grids and the curves have the same lengths. It is straightforward to treat such curves as elements of the corresponding vector spaces, and apply traditional vector based clustering methodologies such as k-means or mixtures of Gaussian distributions Often the curves are sampled irregularly, have varying lengths, lack proper alignment in the time domain or the task requires interpolation or inference at the off-grid locations. Such properties make vector-space representations undesirable. Curve data analysis is typically referred to as “functional data analysis” in the statistical literature (Ramsay and Silverman, 1997), where the observed measurements are treated as samples from an assumed underlying continuous-time process. Clustering in this context can be performed using mixtures of continuous functions such as splines (James and Sugar, 2003) and polynomial regression models (DeSarbo and Cron, 1988; Gaffney and Smyth, 2003). In this paper we focus on the specific problem of analyzing gene expression time course data and extend the functional mixture modelling approach to (a) cluster the data using plausible biological models for the expression dynamics, and (b) align the expression profiles along the time axis. Large scale gene expression profiling measures the relative abundance of tens of thousands of mRNA molecules in the cell simultaneously. The goal of clustering in this context is to discover groups of genes with similar dynamics and find sets of genes that participate in the same regulatory mechanism. For the most part, clustering approaches to gene expression data treat the observed curves as elements of the corresponding vector-space. A variety of vector-based clustering algorithms have been successfully applied, ranging from hierarchical clustering (Eisen et al., 1998) to model based methods (Yeung et al., 2001). However, approaches operating in the observed “gridded” domain of discrete time are insensitive to many of the constraints that the temporal nature of the data imposes, including Continuity of the temporal process: The continuous-time nature of gene expression dynamics are quite important from a scientific viewpoint. There has been some previous work on continuous time models in this context, e.g., mixed effects mixtures of splines (Bar-Joseph et al., 2002) were applied to clustering and alignment of the cell-cycle regulated genes in yeast and good interpolation properties were demonstrated. However, such spline models are “black boxes” that can approximate virtually any temporal behavior — they do not take the specifics of gene regulation mechanisms into account. In contrast, in this paper we propose specific functional forms that are targeted at short time courses, in which fairly simple reaction kinetics can describe the possible dynamics. Alignment: Individual genes within clusters of co-regulated genes can exhibit variations in the time of the onset of their characteristic behaviors or in their initial concentrations. Such differences can significantly increase within-cluster variability and produce incorrect cluster assignments. We address this problem by explicitly modelling the unknown real-valued time shifts between different genes. Smoothing. The high noise levels of observed gene expression data imply the need for robust estimation of mean behavior. Functional models (such as those that we propose here) naturally impose smoothness in the learned mean curves, providing implicit regularization for such data. While some of these problems have been previously addressed individually, no prior work handles all of them in a unified manner. The primary contributions of this paper are (a) a new probabilistic model based on functional mixtures that can simultaneously cluster and align sets of curves observed on irregular time grids, and (b) a proposal for a specific functional form that models changes in mRNA levels for short gene expression time courses. 2 Model Description 2.1 Generative Model We describe a generative model that allows one to simulate heterogeneous sets of curves from a mixture of functional curve models. Each generated curve Yi is a series of observations at a discrete set of values Xi of an independent variable. In many applications, and for gene expression measurements in particular, the independent variable X is time. We adopt the same general approach to functional curve clustering that is used in regression mixture models (DeSarbo and Cron, 1988), random effects regression mixtures (Gaffney and Smyth, 2003) and mixtures of spline models (James and Sugar, 2003). In all of these models, the component densities are conditioned on the values of the independent variable Xi, and the conditional likelihood of a set Y of N curves is defined as P(Y|X, Θ) = N  i=1 K  k=1 P(Yi|Xi, Θk)P(k) (1) Here P(k) is the component probability and Θ is a complete set of model parameters. The clusters are defined by their mean curves parametrized by a set of parameters µk: fk(x) = f(x, µk), and a noise model that describes the deviation from the mean functional form (described below in Section 2.2. In contrast to standard Gaussian mixtures, the functional mixture is defined in continuous time, allowing evaluation of the mean curves on a continuum of “off-grid” time points. This allows us to extend the functional mixture models described above by incorporating real-valued alignment of observed curves along the time axis. In particular, the precise time grid Xi of observation i is assumed unknown and is allowed to vary from curve to curve. This is common in practice when the measurement process cannot be synchronized from curve to curve. For simplicity we assume (unknown) linear shifts of the curves along the time axis. We fix the basic time grid X, but generate each curve on its own grid (X + φi) with a curve-specific time offset φi. We treat the offset corresponding to curve Yi as an additional real-valued latent variable in the model. The conditional likelihood of a single curve under component k is calculated by integrating out all possible offset values: P (Yi|X, Θk) =  φi P(Yi|X + φi, Θk)P(φi|Θk)dφi (2) Finally, we assume that the measurements have additive Gaussian noise with zero mean and diagonal covariance matrix Ck, and express the conditional likelihood as P(Yi|X + φi, Θk) ∝N (Yi|fk(X + φi), Ck) (3) The full set of cluster parameters Θk includes mean curve parameters µk that define fk(x), covariance matrix Ck, cluster probability P(k), and time shift probability P(φ|k): Θk = {µk, Ck, P(k), P(φ|k)} 2.2 Functional form of the mean curves The generative model described above uses a generic functional form f(x, µ) for the mean curves. In this section, we introduce a parametric representation of f(x, µ) that is specifically tailored to short gene expression time courses. To a first-order approximation, the raw mRNA levels {v1, . . . , vN} measured in gene expression experiments can be modeled via a system of differential equations with the following structure (see Gibson and Mjolsness , eq. 1.19, and Mestl, Lemay, and Glass (1996)): dvi dt = σg1,i(v1, . . . , vN) −ϱvig2,i(v1, . . . , vN) (4) The first term on the right hand side is responsible for the synthesis of vi with maximal rate σ, and the second term represents decay with maximal fractional rate ϱ. In general, we don’t know the specific coefficients or nonlinear saturating functions g1 and g2 that define the right hand-side of the equations. Instead, we make a few simplifying assumptions about the equation and use it as a motivation for the parametric functional form that we propose below. Specifically, suppose that • the set of N heterogeneous variables can be divided into K groups of variables, whose production is driven by similar mechanisms; • the synthesis and decay functions g1 and g2 are approximately piecewise constant in time for any given group; • there are at most two regimes involved in the production of vi, each characterized by their own synthesis and decay rates — this is appropriate for short time courses; • for each group there can be an unknown change point on the time axis where a relatively rapid switching between the two different regimes takes place, due to exogenous changes in the variables (v1, . . . , vN) outside the group. Within the regions of constant synthesis and decay functions g1 and g2, we can solve equation (4) analytically and obtain a family of simple exponential solutions parametrized by µ1 = {ν, σ, ϱ}: f a(x, µ1) =  ν −σ ϱ  e−σx + σ ϱ , (5) This motivates us to construct the functional forms for the mean curves by concatenating two parameterized exponents, with an unknown change point and a smooth transition mechanism: f(x, µ) = f a(x, µ1) (1 −Φ(x, δ, ψ)) + f a(x, µ2)Φ(x, δ, ψ) (6) Here f a(x, µ1) and f a(x, µ2) represent the exponents to the left and right of the switching point, with different sets of initial conditions, synthesis and decay rates denoted by parameters µ1 and µ2. The nonlinear sigmoid transfer function Φ(x, δ, ψ) allows us to model switching between the two regimes at x = ψ with slope δ: Φ(x, δ, ψ) = (1 + e−δ(x−ψ)) −1 The random effects on the time grid allow us to time-shift each curve individually by replacing x with (x + φi) in Equation (6). There are other biologically plausible transformation on the curves in a cluster that we do not pursue in this paper, such as allowing ψ to vary with each curve, or representing minor differences in the regulatory functions g1,i and g2,i which affect the timing of their transitions. When learning these models from data, we restrict the class of functions in Equation (6) to those with non-negative initial conditions, synthesis and decay rates, as well as enforcing continuity of the exponents at the switching point: fa(ψ, µ1) = f a(ψ, µ2). Finally, given that the log-normal noise model is well-suited to gene expression data (Yeung et al., 2001) we use the logarithm of the functional forms proposed in Equation (6) as a general class of functions that describe the mean behavior within the clusters. 3 Parameter Estimation We use the well-known Expectation Maximization (EM) algorithm to simultaneously recover the full set of model parameters Θ = {Θ1, . . . , ΘK}, as well as the posterior joint −10 0 10 20 30 40 50 60 70 80 −1 0 1 Time [minutes] Log−intensity −10 0 10 20 30 40 50 60 70 80 −2 0 2 Time [minutes] Log−intensity −10 0 10 20 30 40 50 60 70 80 −1 0 1 Time [minutes] Log−intensity −10 0 10 20 30 40 50 60 70 80 −2 0 2 Time [minutes] Log−intensity −10 0 10 20 30 40 50 60 70 80 −2 −1 0 1 Time [minutes] Log−intensity 20 30 40 50 60 0 0.5 1 1.5 2 2.5 3 3.5 4 4.5 5 Switching Time [minutes] Inverse Switching Slope K = 1 K = 2 K = 3 K = 4 K = 5 Figure 1: A view of the cluster mean curves (left) and variation in the switching-point parameters across 10 cross-validation folds (right) using functional clustering with alignment (see Section 4 for full details). distribution of cluster membership Z and time offsets φ for each observed curve. Each cluster is characterized by the parameters of the mean curves, noise variance, cluster probability and time shift distribution: Θk = {µk, Ck, P(k), P(φ|k)}. • In the E-step, we find the posterior distribution of the cluster membership Zi and the time shift φi for each curve Yi, given current cluster parameters Θ; • In the M-step, we maximize the expected log-likelihood with respect to the posterior distribution of Z and φ by adjusting Θ. Since the time shifts φ are real-valued, the E-step requires evaluation of the posterior distribution over a continuous domain of φ. Similarly, the M-step requires integration with respect to φ. We approximate the domain of φ with a finite sample from its prior distribution. The sample is kept fixed throughout the computation. The posterior probability of the sampled values is updated after each M-step to approximate the model distribution P(φ|k). The M-step optimization problem does not allow closed-form solutions due to nonlinearities with respect to function parameters. We use conjugate gradient descent with a pseudo-Newton step size selection. The step size selection issue is crucial in this problem, as the second derivatives with respect to different parameters of the model differ by orders of magnitude. This indicates the presence of ridges and ravines on the likelihood surface, which makes gradient descent highly sensitive to the step size and slow to converge. To speed up the EM algorithm, we initialize the coefficients of the mean functional forms by approximating the mean vectors obtained using a standard vector-based Gaussian mixture model on the same data. This typically produces a useful set of initial parameter values which are then optimized by running the full EM algorithm for a functional mixture model with alignment. We use the EM algorithm in its maximum a posteriori (MAP) formulation, using a zeromean Gaussian prior distribution on the curve-specific time shifts. The variance of the prior distribution allows us to control the amount of shifting allowed in the model. We also use conjugate prior distributions for the noise variance Ck to regularize the model and prohibit degenerate solutions with near-zero covariance terms. Figure 1 shows examples of mean curves (Equation (6)), that were learned from actual gene expression data. Each functional form has 7 free parameters: µ = {ν, σ1, ϱ1, σ2, ϱ2, δ, ψ}. Note that, as with many time-course gene expression data sets, having so few points presents an obvious problem for parameter estimation directly from a single curve. However, the curve-specific time shifts in effect provide a finer sampling grid that helps to 5 6 7 8 9 −0.26 −0.25 −0.24 −0.23 −0.22 −0.21 −0.2 −0.19 −0.18 −0.17 Number of components Per−point logP Functional MM Gaussian MM 5 6 7 8 9 0.095 0.1 0.105 0.11 0.115 0.12 Number of components MSE Functional MM Gaussian MM Figure 2: Cross-validated conditional logP scores (left) and cross-validated interpolation mean-squared error (MSE) (right), as a function of the number of mixture components, for the first cell cycle of the Cho et al. data set. recover the parameters from observed data, in addition to the “pooling” effect of learning common functional forms for groups of curves. The right-hand side of Figure 1 shows a scatter plot of the switching parameters for 5 clusters estimated from 10 different crossvalidation runs. The 5 clusters exhibit different dynamics (as indicated by the spread in parameter space) and the algorithm finds qualitatively similar parameter estimates for each cluster across the 10 different runs. 4 Experimental Evaluation 4.1 Gene expression data We illustrate our approach using the immediate responses of yeast Saccharomyces cerevisiae when released from cell cycle arrest, using the raw data reported by Cho et al (1998). Briefly, the CDC28 TS mutants were released from the cell cycle arrest by temperature shift. Cells were harvested and RNA was collected every 10 min for 170 min, spanning two cell cycles. The RNA was than analyzed using Affymetrix gene chip arrays. From these data we select only the 416 genes which are reported to be actively regulated throughout the cell cycle and are expressed for 30 continuous minutes above an Affymetrix absolute level of 100 (a total of 385 genes pass these criteria). We normalize each gene expression vector by its median expression value throughout the time course to reduce the influence of probe-specific intensity biases. 4.2 Experimental results In order to study the immediate cellular response we analyze only the first 8 time points of this data set. We evaluate the cross-validated out-of-sample performance of the proposed functional mixture model. A conventional Gaussian mixture model applied to observations on the discrete time grid is used for baseline comparison. It is not at all clear a priori that the functional mixture models with highly constrained parametric set of mean curves should outperform Gaussian mixtures that impose no parametric assumptions and are free to approximate any discrete grid observation. While one can expect that mixtures of splines (Bar-Joseph et al., 2002) or functions with universal approximation capabilities can be fitted to any mean behavior, the restricted class of functions that we proposed (based on the simplified dynamics of the mRNA changes implied by the differential equation in Equation (4)) is likely to fail if the true dynamics does not match the assumptions. There are two main reasons to use the proposed restricted class of functional forms: (1) 5 6 7 8 9 0.06 0.065 0.07 0.075 0.08 0.085 MSE T = 6 Functional MM Regular MM 5 6 7 8 9 0.09 0.1 0.11 0.12 MSE T = 7 5 6 7 8 9 0.11 0.12 0.13 0.14 0.15 Number of Components MSE T = 8 5 6 7 8 9 0.09 0.095 0.1 0.105 0.11 0.115 Number of Components MSE T = 6:8 5 6 7 8 9 0.17 0.175 0.18 0.185 0.19 MSE T = 2 Functional MM Regular MM 5 6 7 8 9 0.15 0.16 0.17 0.18 0.19 0.2 MSE T = 3 5 6 7 8 9 0.06 0.065 0.07 0.075 0.08 0.085 MSE T = 4 5 6 7 8 9 0.075 0.08 0.085 0.09 0.095 0.1 Number of Components MSE T = 5 5 6 7 8 9 0.055 0.06 0.065 0.07 0.075 Number of Components MSE T = 6 5 6 7 8 9 0.06 0.07 0.08 0.09 0.1 0.11 Number of Components MSE T = 7 Figure 3: Cross-validated one-step-ahead prediction MSE (left) and cross-validated interpolation MSE (right) for the first cell cycle of the Cho et al. data set. to be able to interpret the resulting mean curves in terms of the synthesis / decay rates at each of the regimes as well as the switching times; (2) to naturally incorporate alignment by real-values shifts along the time axis. In Figures 2 and 3, we present 5-fold cross-validated out-of-sample scores, as a function of the number of clusters, for both the functional mixture model and the baseline Gaussian mixture model. The conditional logP score (Figure 2, left panel) estimates the average probability assigned to a single measurement at time points 6, 7, 8 within an unseen curve, given the first five measurements of the same curve. Higher scores indicate a better fit. The conditioning on the first few time points allows us to demonstrate the power of models with random effects since estimation of alignment based on partial curves improves the probability of the remainder of the curve. The interpolation error in Figure 2 (right panel) shows the accuracy of recovering missing measurements. The observed improvement in this score is likely due to the effect of aligning the test curves. To evaluate the interpolation error, we trained the models on the full training curves, and then assumed a single measurement was missing from the test curve (at time point 2 through 7). The model was then used to make a prediction at the time point of the missing measurement, and the interpolation error was averaged for all time points and test curves. The right panel of Figure 3 contains a detailed view of these results: each subplot shows the mean error in recovering values at a particular time point. While some time points are harder to approximate than the others (in particular, T = 2, 3), the functional mixture models provide better interpolation properties overall. Difficulties in approximating at T = 2, 3 can be attributed to the large changes in the intensities at these time points, and possibly indicate the limitations of the functional forms chosen as candidate mean curves. Finally, the left panel of Figure 3 shows improvement in one-step-ahead prediction error. Again, we trained the models on the full curves, and then used the models to make prediction for test curves at time T given all measurements up to T −1 (T = 6, 7, 8). Figures 2 and 3 demonstrate a consistent improvement in the out-of-sample performance of the functional mixtures. The improvements seen in these plots result from integrating alignment along the time axis into the clustering framework. We found that the functional mixture model without alignment does not result in better out-of-sample performance than discrete-time Gaussian mixtures. This may not be surprising given the constrained nature of the fitted functions. In the experiments presented in this paper we used a Gaussian prior distribution on the timeshift parameter to softly constrain the shifts to lie roughly within 1.5 time grid intervals. The discrete grid alignment approaches that we proposed earlier in Chudova et al (2003) can successfully align curves if one assumes offsets on the scale of multiple time grid points. However, they are not designed to handle finer sub-grid alignments. Also worth noting is the fact that continuous time mixtures can align curves sampled on non-uniform time grids (such non-uniform sampling in time is relatively common in gene expression time course data). 5 Conclusions We presented a probabilistic framework for joint clustering and alignment of gene expression time course data using continuous time cluster models. These models allow (1) realvalued off-grid alignment of unequally spaced measurements, (2) off-grid interpolation, and (3) regularization by enforcing smoothness implied by the functional cluster forms. We have demonstrated that a mixture of simple parametric functions with nonlinear transition between two exponential regimes can model a broad class of gene expression profiles in a single cell cycle of yeast. Cross-validated performance scores show the advantages of continuous time models over standard Gaussian mixtures. Possible extensions include adding additional curve-specific parameters, incorporating other alignment methods, and introducing periodic functional forms for multi-cycle data. References Bar-Joseph, Z., Gerber, G., Gifford, D., Jaakkola, T., and Simon, I. (2002). A new approach to analyzing gene expression time series data. In The Sixth Annual International Conference on (Research in) Computational (Molecular) Biology (RECOMB), pages 39–48, N.Y. ACM Press. Cho, R. J., Campbell, M. J., Winzeler, E. A., Steinmetz, L., Conway, A., Wodicka, L., Wolfsberg, T. G., Gabrielian, A. E., Landsman, D., Lockhart, D. J., and Davis, R. W. (1998). A genomewide transcriptional analysis of the mitotic cell cycle. Mol Cell, 2(1):65–73. Chudova, D., Gaffney, S., Mjolsness, E., and Smyth, P. (2003). Mixture models for translationinvariant clustering of sets of multi-dimensional curves. In Proceedings of the Ninth ACM SIGKDD International Conference on Knowledge Discovery and Data Mining, pages 79–88, Washington, DC. DeSarbo, W. S. and Cron, W. L. (1988). A maximum likelihood methodology for clusterwise linear regression. Journal of Classification, 5(1):249–282. Eisen, M. B., Spellman, P. T., Brown, P. O., and Botstein, D. (1998). Cluster analysis and display of genome-wide expression patterns. Proc Natl Acad Sci U S A, 95(25):14863–8. Gaffney, S. J. and Smyth, P. (2003). Curve clustering with random effects regression mixtures. In Bishop, C. M. and Frey, B. J., editors, Proceedings of the Ninth International Workshop on Artificial Intelligence and Statistics, Key West, FL. Gibson, M. and Mjolsness, E. (2001). Modeling the activity of single genes. In Bower, J. M. and Bolouri, H., editors, Computational Methods in Molecular Biology. MIT Press. James, G. M. and Sugar, C. A. (2003). Clustering for sparsely sampled functional data. Journal of the American Statistical Association, 98:397–408. Mestl, T., Lemay, C., and Glass, L. (1996). Chaos in high-dimensional neural and gene networks. Physica, 98:33. Ramsay, J. and Silverman, B. W. (1997). Functional Data Analysis. Springer-Verlag, New York, NY. Yeung, K. Y., Fraley, C., Murua, A., Raftery, A. E., and Ruzzo, W. L. (2001). Model-based clustering and data transformations for gene expression data. Bioinformatics, 17(10):977–987.
2003
129
2,342
Margin Maximizing Loss Functions Saharon Rosset Watson Research Center IBM Yorktown, NY, 10598 srosset@us.ibm.com Ji Zhu Department of Statistics University of Michigan Ann Arbor, MI, 48109 jizhu@umich.edu Trevor Hastie Department of Statistics Stanford University Stanford, CA, 94305 hastie@stat.stanford.edu Abstract Margin maximizing properties play an important role in the analysis of classi£cation models, such as boosting and support vector machines. Margin maximization is theoretically interesting because it facilitates generalization error analysis, and practically interesting because it presents a clear geometric interpretation of the models being built. We formulate and prove a suf£cient condition for the solutions of regularized loss functions to converge to margin maximizing separators, as the regularization vanishes. This condition covers the hinge loss of SVM, the exponential loss of AdaBoost and logistic regression loss. We also generalize it to multi-class classi£cation problems, and present margin maximizing multiclass versions of logistic regression and support vector machines. 1 Introduction Assume we have a classi£cation “learning” sample {xi, yi}n i=1 with yi ∈{−1, +1}. We wish to build a model F(x) for this data by minimizing (exactly or approximately) a loss criterion  i C(yi, F(xi)) =  i C(yiF(xi)) which is a function of the margins yiF(xi) of this model on this data. Most common classi£cation modeling approaches can be cast in this framework: logistic regression, support vector machines, boosting and more. The model F(x) which these methods actually build is a linear combination of dictionary functions coming from a dictionary H which can be large or even in£nite: F(x) =  hj∈H βjhj(x) and our prediction at point x based on this model is sgnF(x). When |H| is large, as is the case in most boosting or kernel SVM applications, some regularization is needed to control the “complexity” of the model F(x) and the resulting over£tting. Thus, it is common that the quantity actually minimized on the data is a regularized version of the loss function: ˆβ(λ) = min β  i C(yiβ′h(xi)) + λ∥β∥p p (1) where the second term penalizes for the lp norm of the coef£cient vector β (p ≥1 for convexity, and in practice usually p ∈{1, 2}), and λ ≥0 is a tuning regularization parameter. The 1- and 2-norm support vector machine training problems with slack can be cast in this form ([6], chapter 12). In [8] we have shown that boosting approximately follows the “path” of regularized solutions traced by (1) as the regularization parameter λ varies, with the appropriate loss and an l1 penalty. The main question that we answer in this paper is: for what loss functions does ˆβ(λ) converge to an “optimal” separator as λ →0? The de£nition of “optimal” which we will use depends on the lp norm used for regularization, and we will term it the “lp-margin maximizing separating hyper-plane”. More concisely, we will investigate for which loss functions and under which conditions we have: lim λ→0 ˆβ(λ) ∥ˆβ(λ)∥ = arg max ∥β∥p=1 min i yiβ′h(xi) (2) This margin maximizing property is interesting for three distinct reasons. First, it gives us a geometric interpretation of the “limiting” model as we relax the regularization. It tells us that this loss seeks to optimally separate the data by maximizing a distance between a separating hyper-plane and the “closest” points. A theorem by Mangasarian [7] allows us to interpret lp margin maximization as lq distance maximization, with 1/p + 1/q = 1, and hence make a clear geometric interpretation. Second, from a learning theory perspective large margins are an important quantity — generalization error bounds that depend on the margins have been generated for support vector machines ([10] — using l2 margins) and boosting ( [9] — using l1 margins). Thus, showing that a loss function is “margin maximizing” in this sense is useful and promising information regarding this loss function’s potential for generating good prediction models. Third, practical experience shows that exact or approximate margin maximizaion (such as non-regularized kernel SVM solutions, or “in£nite” boosting) may actually lead to good classi£cation prediction models. This is certainly not always the case, and we return to this hotly debated issue in our discussion. Our main result is a suf£cient condition on the loss function, which guarantees that (2) holds, if the data is separable, i.e. if the maximum on the RHS of (2) is positive. This condition is presented and proven in section 2. It covers the hinge loss of support vector machines, the logistic log-likelihood loss of logistic regression, and the exponential loss, most notably used in boosting. We discuss these and other examples in section 3. Our result generalizes elegantly to multi-class models and loss functions. We present the resulting margin-maximizing versions of SVMs and logistic regression in section 4. 2 Suf£cient condition for margin maximization The following theorem shows that if the loss function vanishes “quickly” enough, then it will be margin-maximizing as the regularization vanishes. It provides us with a uni£ed margin-maximization theory, covering SVMs, logistic regression and boosting. Theorem 2.1 Assume the data {xi, yi}n i=1 is separable, i.e. ∃β s.t. mini yiβ′h(xi) > 0. Let C(y, f) = C(yf) be a monotone non-increasing loss function depending on the margin only. If ∃T > 0 (possibly T = ∞) such that: lim t↗T C(t · [1 −ϵ]) C(t) = ∞, ∀ϵ > 0 (3) Then C is a margin maximizing loss function in the sense that any convergence point of the normalized solutions ˆβ(λ) ∥ˆβ(λ)∥p to the regularized problems (1) as λ →0 is an lp marginmaximizing separating hyper-plane. Consequently, if this margin-maximizing hyper-plane is unique, then the solutions converge to it: lim λ→0 ˆβ(λ) ∥ˆβ(λ)∥p = arg max ∥β∥p=1 min i yiβ′h(xi) (4) Proof We prove the result separately for T = ∞and T < ∞. a. T = ∞: Lemma 2.2 ∥ˆβ(λ)∥p λ→0 −→∞ Proof Since T = ∞then C(m) > 0 ∀m > 0, and limm→∞C(m) = 0. Therefore, for loss+penalty to vanish as λ →0, ∥ˆβ(λ)∥p must diverge, to allow the margins to diverge. Lemma 2.3 Assume β1, β2 are two separating models, with ∥β1∥p = ∥β2∥p = 1, and β1 separates the data better, i.e.: 0 < m2 = mini yih(xi)′β2 < m1 = mini yih(xi)′β1. Then ∃U = U(m1, m2) such that ∀t > U,  i C(yih(xi)′(tβ1)) <  i C(yih(xi)′(tβ2)) In words, if β1 separates better than β2 then scaled-up versions of β1 will incur smaller loss than scaled-up versions of β2, if the scaling factor is large enough. Proof Since condition (3) holds with T = ∞, there exists U such that ∀t > U, C(tm2) C(tm1) > n. Thus from C being non-increasing we immediately get: ∀t > U,  i C(yih(xi)′(tβ1)) ≤n · C(tm1) < C(tm2) <  i C(yih(xi)′(tβ2)) Proof of case a.: Assume β∗is a convergence point of ˆβ(λ) ∥ˆβ(λ)∥p as λ →0, with ∥β∗∥p = 1. Now assume by contradiction ˜β has ∥˜β∥p = 1 and bigger minimal lp margin. Denote the minimal margins for the two models by m∗and ˜m, respectively, with m∗< ˜m. By continuity of the minimal margin in β, there exists some open neighborhood of β∗on the lp sphere: Nβ∗= {β : ∥β∥p = 1, ∥β −β∗∥2 < δ} and an ϵ > 0, such that: min i yiβ′h(xi) < ˜m −ϵ, ∀β ∈Nβ∗ Now by lemma 2.3 we get that exists U = U( ˜m, ˜m −ϵ) such that t˜β incurs smaller loss than tβ for any t > U, β ∈Nβ∗. Therefore β∗cannot be a convergence point of ˆβ(λ) ∥ˆβ(λ)∥p . b. T < ∞ Lemma 2.4 C(T) = 0 and C(T −δ) > 0, ∀δ > 0. Proof From condition (3), C(T −T ϵ) C(T ) = ∞. Both results follow immediately, with δ = Tϵ. Lemma 2.5 limλ→0 mini yi ˆβ(λ)′h(xi) = T Proof Assume by contradiction that there is a sequence λ1, λ2, ... ↘0 and ϵ > 0 s.t. ∀j, mini yi ˆβ(λj)′h(xi) ≤T −ϵ. Pick any separating normalized model ˜β i.e. ∥˜β∥p = 1 and ˜m := mini yi ˜β′h(xi) > 0. Then for any λ < ˜mp C(T −ϵ) T p we get:  i C(yi T ˜m ˜β′h(xi)) + λ∥T ˜m ˜β∥p p < C(T −ϵ) since the £rst term (loss) is 0 and the penalty is smaller than C(T −ϵ) by condition on λ. But ∃j0 s.t. λj0 < ˜mp C(T −ϵ) T p and so we get a contradiction to optimality of ˆβ(λj0), since we assumed mini yi ˆβ(λj0)′h(xi) ≤T −ϵ and thus:  i C(yi ˆβ(λj0)′h(xi)) ≥C(T −ϵ) We have thus proven that lim infλ→0 mini yi ˆβ(λ)′h(xi) ≥T. It remains to prove equality. Assume by contradiction that for some value of λ we have m := mini yi ˆβ(λ)′h(xi) > T. Then the re-scaled model T m ˆβ(λ) has the same zero loss as ˆβ(λ), but a smaller penalty, since ∥T m ˆβ(λ)∥= T m∥ˆβ(λ)∥< ∥ˆβ(λ)∥. So we get a contradiction to optimality of ˆβ(λ). Proof of case b.: Assume β∗is a convergence point of ˆβ(λ) ∥ˆβ(λ)∥p as λ →0, with ∥β∗∥p = 1. Now assume by contradiction ˜β has ∥˜β∥p = 1 and bigger minimal margin. Denote the minimal margins for the two models by m∗and ˜m, respectively, with m∗< ˜m. Let λ1, λ2, ... ↘0 be a sequence along which ˆβ(λj) ∥ˆβ(λj)∥p →β∗. By lemma 2.5 and our assumption, ∥ˆβ(λj)∥p → T m∗> T ˜m. Thus, ∃j0 such that ∀j > j0, ∥ˆβ(λj)∥p > T ˜m and consequently:  i C(yi ˆβ(λj)′h(xi)) + λ∥ˆβ(λj)∥p p > λ( T ˜m)p =  i C(yi T ˜m ˜βh(xi)) + λ∥T ˜m ˜β∥p p So we get a contradiction to optimality of ˆβ(λj). Thus we conclude for both cases a. and b. that any convergence point of ˆβ(λ) ∥ˆβ(λ)∥p must maximize the lp margin. Since ∥ ˆβ(λ) ∥ˆβ(λ)∥p ∥p = 1, such convergence points obviously exist. If the lp-margin-maximizing separating hyper-plane is unique, then we can conclude: ˆβ(λ) ∥ˆβ(λ)∥p →ˆβ := arg max ∥β∥p=1 min i yiβ′h(xi) Necessity results A necessity result for margin maximization on any separable data seems to require either additional assumptions on the loss or a relaxation of condition (3). We conjecture that if we also require that the loss is convex and vanishing (i.e. limm→∞C(m) = 0) then condition (3) is suf£cient and necessary. However this is still a subject for future research. 3 Examples Support vector machines Support vector machines (linear or kernel) can be described as a regularized problem: min β  i [1 −yiβ′h(xi)]+ + λ∥β∥p p (5) where p = 2 for the standard (“2-norm”) SVM and p = 1 for the 1-norm SVM. This formulation is equivalent to the better known “norm minimization” SVM formulation in the sense that they have the same set of solutions as the regularization parameter λ varies in (5) or the slack bound varies in the norm minimization formulation. The loss in (5) is termed “hinge loss” since it’s linear for margins less than 1, then £xed at 0 (see £gure 1). The theorem obviously holds for T = 1, and it veri£es our knowledge that the non-regularized SVM solution, which is the limit of the regularized solutions, maximizes the appropriate margin (Euclidean for standard SVM, l1 for 1-norm SVM). Note that our theorem indicates that the squared hinge loss (AKA truncated squared loss): C(yi, F(xi)) = [1 −yiF(xi)]2 + is also a margin-maximizing loss. Logistic regression and boosting The two loss functions we consider in this context are: Exponential : Ce(m) = exp(−m) (6) Log likelihood : Cl(m) = log(1 + exp(−m)) (7) These two loss functions are of great interest in the context of two class classi£cation: Cl is used in logistic regression and more recently for boosting [4], while Ce is the implicit loss function used by AdaBoost - the original and most famous boosting algorithm [3] . In [8] we showed that boosting approximately follows the regularized path of solutions ˆβ(λ) using these loss functions and l1 regularization. We also proved that the two loss functions are very similar for positive margins, and that their regularized solutions converge to margin-maximizing separators. Theorem 2.1 provides a new proof of this result, since the theorem’s condition holds with T = ∞for both loss functions. Some interesting non-examples Commonly used classi£cation loss functions which are not margin-maximizing include any polynomial loss function: C(m) = 1 m, C(m) = m2, etc. do not guarantee convergence of regularized solutions to margin maximizing solutions. Another interesting method in this context is linear discriminant analysis. Although it does not correspond to the loss+penalty formulation we have described, it does £nd a “decision hyper-plane” in the predictor space. For both polynomial loss functions and linear discriminant analysis it is easy to £nd examples which show that they are not necessarily margin maximizing on separable data. 4 A multi-class generalization Our main result can be elegantly extended to versions of multi-class logistic regression and support vector machines, as follows. Assume the response is now multi-class, with K ≥2 possible values i.e. yi ∈{c1, ..., cK}. Our model consists of a “prediction” for each class: Fk(x) =  hj∈H β(k) j hj(x) with the obvious prediction rule at x being arg maxk Fk(x). This gives rise to a K −1 dimensional “margin” for each observation. For y = ck, de£ne the margin vector as: m(ck, f1, ..., fK) = (fk −f1, ..., fk −fk−1, fk −fk+1, ..., fk −fK)′ (8) And our loss is a function of this K −1 dimensional margin: C(y, f1, ..., fK) =  k I{y = ck}C(m(ck, f1, ..., fK)) −2 −1.5 −1 −0.5 0 0.5 1 1.5 2 0 0.5 1 1.5 2 2.5 3 hinge exponential logistic −2 −1 0 1 2 3 −2 −1 0 1 2 3 0 1 2 3 4 5 6 Figure 1: Margin maximizing loss functions for 2-class problems (left) and the SVM 3-class loss function of section 4.1 (right) The lp-regularized problem is now: ˆβ(λ) = arg min β(1),...,β(K)  i C(yi, h(xi)′β(1), ..., h(xi)′β(K)) + λ  k ∥β(k)∥p p (9) Where ˆβ(λ) = (ˆβ(1)(λ), ..., ˆβ(K)(λ))′ ∈RK·|H|. In this formulation, the concept of margin maximization corresponds to maximizing the minimal of all n · (K −1) normalized lp-margins generated by the data: max ∥β(1)∥p p+...+∥β(K)∥p p=1 min i min yi̸=ck h(xi)′(β(yi) −β(k)) (10) Note that this margin maximization problem still has a natural geometric interpretation, as h(xi)′(β(yi) −β(k)) > 0 ∀i, k ̸= yi implies that the hyper-plane h(x)′(β(j) −β(k)) = 0 successfully separates classes j and k for any two classes. Here is a generalization of the optimal separation theorem 2.1 to multi-class models: Theorem 4.1 Assume C(m) is commutative and decreasing in each coordinate, then if ∃T > 0 (possibly T = ∞) such that: limt↗T C(t[1 −ϵ], tu1, ...tuK−2) C(t, tv1, ..., tvK−2) = ∞, (11) ∀ϵ > 0, u1 ≥1, ..., uK−2 ≥1, v1 ≥1, ...vK−2 ≥1 Then C is a margin-maximizing loss function for multi-class models, in the sense that any convergence point of the normalized solutions to (9), ˆβ(λ) ∥ˆβ(λ)∥p , attains the optimal separation as de£ned in (10) Idea of proof The proof is essentially identical to the two class case, now considering the n · (K −1) margins on which the loss depends. The condition (11) implies that as the regularization vanishes the model is determined by the minimal margin, and so an optimal model puts the emphasis on maximizing that margin. Corollary 4.2 In the 2-class case, theorem 4.1 reduces to theorem 2.1. Proof The loss depends on β(1) −β(2), the penalty on ∥β(1)∥p p + ∥β(2)∥p p. An optimal solution to the regularized problem must thus have β(1) + β(2) = 0, since by transforming: β(1) →β(1) −β(1) + β(2) 2 , β(2) →β(2) −β(1) + β(2) 2 we are not changing the loss, but reducing the penalty, by Jensen’s inequality: ∥β(1) −β(1) + β(2) 2 ∥p p + ∥β(2) −β(1) + β(2) 2 ∥p p = 2∥β(1) −β(2) 2 ∥p p ≤∥β(1)∥p p + ∥β(2)∥p p So we can conclude that ˆβ(1)(λ) = −ˆβ(2)(λ) and consequently that the two margin maximization tasks (2), (10) are equivalent. 4.1 Margin maximization in multi-class SVM and logistic regression Here we apply theorem 4.1 to versions of multi-class logistic regression and SVM. For logistic regression, we use a slightly different formulation than the “standard” logistic regression models, which uses class K as a “reference” class, i.e. assumes that β(K) = 0. This is required for non-regularized £tting, since without it the solution is not uniquely de£ned. However, using regularization as in (9) guarantees that the solution will be unique and consequently we can “symmetrize” the model — which allows us to apply theorem 4.1. So the loss function we use is (assume y = ck belongs to class k): C(y, f1, ..., fK) = −log efk ef1 + ... + efK = (12) = log(ef1−fk + ... + efk−1−fk + 1 + efk+1−fk + ... + efK−fk) with the linear model: fj(xi) = h(xi)′β(j). It is not dif£cult to verify that condition (11) holds for this loss function with T = ∞, using the fact that log(1 + ϵ) = ϵ + O(ϵ2). The sum of exponentials which results from applying this £rst-order approximation satis£es (11), and as ϵ →0, the second order term can be ignored. For support vector machines, consider a multi-class loss which is a natural generalization of the two-class loss: C(m) = K−1  j=1 [1 −mj]+ (13) Where mj is the j’th component of the multi-margin m as in (8). Figure 1 shows this loss for K = 3 classes as a function of the two margins. The loss+penalty formulation using 13 is equivalent to a standard optimization formulation of multi-class SVM (e.g. [11]): max c s.t. h(xi)′(β(yi) −β(k)) ≥c(1 −ξik), i ∈{1, ...n}, k ∈{1, ..., K}, ck ̸= yi ξik ≥0 ,  i,k ξik ≤B ,  k ∥β(k)∥p p = 1 As both theorem 4.1 (using T = 1) and the optimization formulation indicate, the regularized solutions to this problem converge to the lp margin maximizing multi-class solution. 5 Discussion What are the properties we would like to have in a classi£cation loss function? Recently there has been a lot of interest in Bayes-consistency of loss functions and algorithms ([1] and references therein), as the data size increases. It turns out that practically all “reasonable” loss functions are consistent in that sense, although convergence rates and other measures of “degree of consistency” may vary. Margin maximization, on the other hand, is a £nite sample optimality property of loss functions, which is potentially of decreasing interest as sample size grows, since the training data-set is less likely to be separable. Note, however, that in very high dimensional predictor spaces, such as those typically used by boosting or kernel SVM, separability of any £nite-size data-set is a mild assumption, which is violated only in pathological cases. We have shown that the margin maximizing property is shared by some popular loss functions used in logistic regression, support vector machines and boosting. Knowing that these algorithms “converge”, as regularization vanishes, to the same model (provided they use the same regularization) is an interesting insight. So, for example, we can conclude that 1-norm support vector machines, exponential boosting and l1-regularized logistic regression all facilitate the same non-regularized solution, which is an l1-margin maximizing separating hyper-plane. From Mangasarian’s theorem [7] we know that this hyper-plane maximizes the l∞distance from the closest points on either side. The most interesting statistical question which arises is: are these “optimal” separating models really good for prediction, or should we expect regularized models to always do better in practice? Statistical intuition supports the latter, as do some margin-maximizing experiments by Breiman [2] and Grove and Schuurmans [5]. However it has also been observed that in many cases margin-maximization leads to reasonable prediction models, and does not necessarily result in over-£tting. We have had similar experience with boosting and kernel SVM. Settling this issue is an intriguing research topic, and one that is critical in determining the practical importance of our results, as well as that of margin-based generalization error bounds. References [1] Bartlett, P., Jordan, M. & McAuliffe, J. (2003). Convexity, Classi£cation and Risk Bounds. Technical reports, dept. of Statistics, UC Berkeley. [2] Breiman, L. (1999). Prediction games and arcing algorithms. Neural Computation 7:1493-1517. [3] Freund, Y. & Scahpire, R.E. (1995). A decision theoretic generalization of on-line learning and an application to boosting. Proc. of 2nd Eurpoean Conf. on Computational Learning Theory. [4] Friedman, J. H., Hastie, T. & Tibshirani, R. (2000). Additive logistic regression: a statistical view of boosting. Annals of Statistics 28, pp. 337-407. [5] Grove, A.J. & Schuurmans, D. (1998). Boosting in the limit: Maximizing the margin of learned ensembles. Proc. of 15th National Conf. on AI. [6] Hastie, T., Tibshirani, R. & Friedman, J. (2001). Elements of Stat. Learning. Springer-Verlag. [7] Mangasarian, O.L. (1999). Arbitrary-norm separating plane. Operations Research Letters, Vol. 24 1-2:15-23 [8] Rosset, R., Zhu, J & Hastie, T. (2003). Boosting as a regularized path to a maximum margin classi£er. Technical report, Dept. of Statistics, Stanford Univ. [9] Scahpire, R.E., Freund, Y., Bartlett, P. & Lee, W.S. (1998). Boosting the margin: a new explanation for the effectiveness of voting methods. Annals of Statistics 26(5):1651-1686 [10] Vapnik, V. (1995). The Nature of Statistical Learning Theory. Springer. [11] Weston, J. & Watkins, C. (1998). Multi-class support vector machines. Technical report CSDTR-98-04, dept of CS, Royal Holloway, University of London.
2003
13
2,343
Large Scale Online Learning. L´eon Bottou NEC Labs America Princeton NJ 08540 leon@bottou.org Yann Le Cun NEC Labs America Princeton NJ 08540 yann@lecun.com Abstract We consider situations where training data is abundant and computing resources are comparatively scarce. We argue that suitably designed online learning algorithms asymptotically outperform any batch learning algorithm. Both theoretical and experimental evidences are presented. 1 Introduction The last decade brought us tremendous improvements in the performance and price of mass storage devices and network systems. Storing and shipping audio or video data is now inexpensive. Network traffic itself provides new and abundant sources of data in the form of server log files. The availability of such large data sources provides clear opportunities for the machine learning community. These technological improvements have outpaced the exponential evolution of the computing power of integrated circuits (Moore’s law). This remark suggests that learning algorithms must process increasing amounts of data using comparatively smaller computing resources. This work assumes that datasets have grown to practically infinite sizes and discusses which learning algorithms asymptotically provide the best generalization performance using limited computing resources. • Online algorithms operate by repetitively drawing a fresh random example and adjusting the parameters on the basis of this single example only. Online algorithms can quickly process a large number of examples. On the other hand, they usually are not able to fully optimize the cost function defined on these examples. • Batch algorithms avoid this issue by completely optimizing the cost function defined on a set of training examples. On the other hand, such algorithms cannot process as many examples because they must iterate several times over the training set to achieve the optimum. As datasets grow to practically infinite sizes, we argue that online algorithms outperform learning algorithms that operate by repetitively sweeping over a training set. 2 Gradient Based Learning Many learning algorithms optimize an empirical cost function Cn(θ) that can be expressed as the average of a large number of terms L(z, θ). Each term measures the cost associated with running a model with parameter vector θ on independent examples zi (typically input/output pairs zi = (xi, yi).) Cn(θ) △= 1 n n X i=1 L(zi, θ) (1) Two kinds of optimization procedures are often mentioned in connection with this problem: • Batch gradient: Parameter updates are performed on the basis of the gradient and Hessian information accumulated over a predefined training set: θ(k) = θ(k −1) −Φk ∂Cn ∂θ (θ(k −1)) = θ(k −1) −1 n Φk n X i=1 ∂L ∂θ (zi, θ(k −1)) (2) where Φk is an appropriately chosen positive definite symmetric matrix. • Online gradient: Parameter updates are performed on the basis of a single sample zt picked randomly at each iteration: θ(t) = θ(t −1) −1 t Φt ∂L ∂θ (zt, θ(t −1)) (3) where Φt is again an appropriately chosen positive definite symmetric matrix. Very often the examples zt are chosen by cycling over a randomly permuted training set. Each cycle is called an epoch. This paper however considers situations where the supply of training samples is practically unlimited. Each iteration of the online algorithm utilizes a fresh sample, unlikely to have been presented to the system before. Simple batch algorithms converge linearly1 to the optimum θ∗ n of the empirical cost. Careful choices of Φk make the convergence super-linear or even quadratic2 in favorable cases (Dennis and Schnabel, 1983). Whereas online algorithms may converge to the general area of the optimum at least as fast as batch algorithms (Le Cun et al., 1998), the optimization proceeds rather slowly during the final convergence phase (Bottou and Murata, 2002). The noisy gradient estimate causes the parameter vector to fluctuate around the optimum in a bowl whose size decreases like 1/t at best. Online algorithms therefore seem hopelessly slow. However, the above discussion compares the speed of convergence toward the minimum of the empirical cost Cn, whereas one should be much more interested in the convergence toward the minimum θ∗of the expected cost C∞, which measures the generalization performance: C∞(θ) △= Z L(z, θ) p(z) dz (4) Density p(z) represents the unknown distribution from which the examples are drawn (Vapnik, 1974). This is the fundamental difference between optimization speed and learning speed. 1Linear convergence speed: log 1/|θ(k) −θ∗ n|2 grows linearly with k. 2Quadratic convergence speed: log log 1/|θ(k) −θ∗ n|2 grows linearly with k. 3 Learning Speed Running an efficient batch algorithm on a training set of size n quickly yields the empirical optimum θ∗ n. The sequence of empirical optima θ∗ n usually converges to the solution θ∗ when the training set size n increases. In contrast, online algorithms randomly draw one example zt at each iteration. When these examples are drawn from a set of n examples, the online algorithm minimizes the empirical error Cn. When these examples are drawn from the asymptotic distribution p(z), it minimizes the expected cost C∞. Because the supply of training samples is practically unlimited, each iteration of the online algorithm utilizes a fresh example. These fresh examples follow the asymptotic distribution. The parameter vectors θ(t) thus directly converge to the optimum θ∗of the expected cost C∞. The convergence speed of the batch θ∗ n and online θ(t) sequences were first compared by Murata and Amari (1999). This section reports a similar result whose derivation uncovers a deeper relationship between these two sequences. This approach also provides a mathematically rigorous treatment (Bottou and Le Cun, 2003). Let us first define the Hessian matrix H and Fisher information matrix G: H △= E  ∂2 ∂θ∂θL(z, θ∗)  G △= E ∂L ∂θ (z, θ∗)  ∂L ∂θ (z, θ∗) T ! Manipulating a Taylor expansion of the gradient of Cn(θ) in the vicinity of θ∗ n−1 immediately provides the following recursive relation between θ∗ n and θ∗ n−1. θ∗ n = θ∗ n−1 −1 nΨn ∂L ∂θ (zn, θ∗ n−1) + O  1 n2  (5) with Ψn △= 1 n n X i=1 ∂2 ∂θ∂θL(zi, θ∗ n−1) !−1 −→ t→∞H−1 Relation (5) describes the θ∗ n sequence as a recursive stochastic process that is essentially similar to the online learning algorithm (3). Each iteration of this “algorithm” consists in picking a fresh example zn and updating the parameters according to (5). This is not a practical algorithm because we have no analytical expression for the second order term. We can however apply the mathematics of online learning algorithms to this stochastic process. The similarity between (5) and (3) suggests that both the batch and online sequences converge at the same speed for adequate choices of the scaling matrix Φt. Under customary regularity conditions, the following asymptotic speed results holds when the scaling matrix Φt converges to the inverse H−1 of the Hessian matrix. E |θ(t) −θ∗|2 + o 1 t  = E |θ∗ t −θ∗|2 + o 1 t  = tr H−1 G H−1 t (6) This convergence speed expression has been discovered many times. Tsypkin (1973) establishes (6) for linear systems. Murata and Amari (1999) address generic stochastic gradient algorithms with a constant scaling matrix. Our result (Bottou and Le Cun, 2003) holds when the scaling matrix Φt depends on the previously seen examples, and also holds when the stochastic update is perturbed by unspecified second order terms, as in equation (5). See the appendix for a proof sketch (Bottou and LeCun, 2003). Result (6) applies to both the online θ(t) and batch θ(t) sequences. Not only does it establish that both sequences have O (1/t) convergence, but also it provides the value of the constant. This constant is neither affected by the second order terms of (5) nor by the convergence speed of the scaling matrix Φt toward H−1. In the Maximum Likelihood case, it is well known that both H and G are equal on the optimum. Equation (6) then indicates that the convergence speed saturates the Cramer-Rao bound. This fact was known in the case of the natural gradient algorithm (Amari, 1998). It remains true for a large class of online learning algorithms. Result (6) suggests that the scaling matrix Φt should be a full rank approximation of the Hessian H. Maintaining such an approximation becomes expensive when the dimension of the parameter vector increases. The computational cost of each iteration can be drastically reduced by maintaining only a coarse approximations of the Hessian (e.g. diagonal, blockdiagonal, multiplicative, etc.). A proper setup ensures that the convergence speed remains O (1/t) despite a less favorable constant factor. The similar nature of the convergence of the batch and online sequences can be summarized as follows. Consider two optimally designed batch and online learning algorithms. The best generalization error is asymptotically achieved by the learning algorithm that uses the most examples within the allowed time. 4 Computational Cost The discussion so far has established that a properly designed online learning algorithm performs as well as any batch learning algorithm for a same number of examples. We now establish that, given the same computing resources, an online learning algorithm can asymptotically process more examples than a batch learning algorithm. Each iteration of a batch learning algorithm running on N training examples requires a time K1N + K2. Constants K1 and K2 respectively represent the time required to process each example, and the time required to update the parameters. Result (6) provides the following asymptotic equivalence: (θ∗ N −θ∗)2 ∼1 N The batch algorithm must perform enough iterations to approximate θ∗ N with at least the same accuracy (∼1/N). An efficient algorithm with quadratic convergence achieves this after a number of iterations asymptotically proportional to log log N. Running an online learning algorithm requires a constant time K3 per processed example. Let us call T the number of examples processed by the online learning algorithm using the same computing resources as the batch algorithm. We then have: K3T ∼(K1N + K2) log log N =⇒ T ∼N log log N The parameter θ(T) of the online algorithm also converges according to (6). Comparing the accuracies of both algorithms shows that the online algorithm asymptotically provides a better solution by a factor O (log log N). (θ(T) −θ∗)2 ∼ 1 N log log N ≪1 N ∼(θ∗ N −θ∗)2 This log log N factor corresponds to the number of iterations required by the batch algorithm. This number increases slowly with the desired accuracy of the solution. In practice, this factor is much less significant than the actual value of the constants K1, K2 and K3. Experience shows however that online algorithms are considerably easier to implement. Each iteration of the batch algorithm involves a large summation over all the available examples. Memory must be allocated to hold these examples. On the other hand, each iteration of the online algorithm only involves one random example which can then be discarded. 5 Experiments A simple validation experiment was carried out using synthetic data. The examples are input/output pairs (x, y) with x ∈R20 and y = ±1. The model is a single sigmoid unit trained using the least square criterion. L(x, y, θ) = (1.5y −f(θx))2 where f(x) = 1.71 tanh(0.66x) is the standard sigmoid discussed in LeCun et al. (1998). The sigmoid generates various curvature conditions in the parameter space, including negative curvature and plateaus. This simple model represents well the final convergence phase of the learning process. Yet it is also very similar to the widely used generalized linear models (GLIM) (Chambers and Hastie, 1992). The first component of the input x is always 1 in order to compensate the absence of a bias parameter in the model. The remaining 19 components are drawn from two Gaussian distributions, centered on (−1, −1, . . . , −1) for the first class and (+1, +1, . . . , +1) for the second class. The eigenvalues of the covariance matrix of each class range from 1 to 20. Two separate sets for training and testing were drawn with 1 000 000 examples each. One hundred permutations of the first set are generated. Each learning algorithm is trained using various number of examples taken sequentially from the beginning of the permuted sets. The resulting performance is then measured on the testing set and averaged over the one hundred permutations. Batch-Newton algorithm The reference batch algorithm uses the Newton-Raphson algorithm with Gauss-Newton approximation (Le Cun et al., 1998). Each iteration visits all the training and computes both gradient g and the Gauss-Newton approximation H of the Hessian matrix. g = X i ∂L ∂θ (xi, yi, θk−1) H = X i (f ′(θk−1xi))2 xixT i The parameters are then updated using Newton’s formula: θk = θk−1 −H−1g Iterations are repeated until the parameter vector moves by less than 0.01/N where N is the number of training examples. This algorithm yields quadratic convergence speed. Online-Kalman algorithm The online algorithm performs a single sequential sweep over the training examples. The parameter vector is updated after processing each example (xt, yt) as follows: θt = θt−1 −1 τ Φt ∂L ∂θ (xt, yt, θt−1) The scalar τ = max (20, t −40) makes sure that the first few examples do not cause impractically large parameter updates. The scaling matrix Φt is equal to the inverse of a leaky average of the per-example Gauss-Newton approximation of the Hessian. Φt =   1 −2 τ  Φ−1 t−1 + 2 τ  (f ′(θt−1xt))2 xtxT t −1 The implementation avoids the matrix inversions by directly computing Φt from Φt−1 using the matrix inversion lemma. (see (Bottou, 1998) for instance.) αA−1 + βuuT −1 = 1 α  A −(Au)(Au)T α/β + uTAu  1000 10000 100000 1e−4 1e−3 1e−2 1e−1 100 1000 10000 1e−4 1e−3 1e−2 1e−1 Figure 1: Average (θ−θ∗)2 as a function of the number of examples. The gray line represents the theoretical prediction (6). Filled circles: batch. Hollow circles: online. The error bars indicate a 95% confidence interval. Figure 2: Average (θ−θ∗)2 as a function of the training time (milliseconds). Hollow circles: online. Filled circles: batch. The error bars indicate a 95% confidence interval. The resulting algorithm slightly differs from the Adaptive Natural Gradient algorithm (Amari, Park, and Fukumizu, 1998). In particular, there is little need to adjust a learning rate parameter in the Gauss-Newton approach. The 1/t (or 1/τ) schedule is asymptotically optimal. Results The optimal parameter vector θ∗was first computed on the testing set using the batchnewton approach. The matrices H and G were computed on the testing set as well in order to determine the constant in relation (6). Figure 1 plots the average squared distance between the optimal parameter vector θ∗and the parameter vector θ achieved on training sets of various sizes. The gray line represents the theoretical prediction. Both the batch points and the online points join the theoretical prediction when the training set size increases. Figure 2 shows the same data points as a function of the CPU time required to run the algorithm on a standard PC. The online algorithm gradually becomes more efficient when the training set size increases. This happens because the batch algorithm needs to perform additional iterations in order to maintain the same level of accuracy. In practice, the test set mean squared error (MSE) is usually more relevant than the accuracy of the parameter vector. Figure 3 displays a logarithmic plot of the difference between the MSE and the best achievable MSE, that is to say the MSE achieved by parameter vector θ∗. This difference can be approximated as (θ −θ∗)TH (θ −θ∗). Both algorithms yield virtually identical errors for the same training set size. This suggests that the small differences shown in figure 1 occur along the low curvature directions of the cost function. Figure 4 shows the MSE as a function of the CPU time. The online algorithm always provides higher accuracy in significantly less time. As expected from the theoretical argument, the online algorithm asymptotically outperforms the super-linear Newton-Raphson algorithm3. More importantly, the online algorithm achieves this result by performing a single sweep over the training data. This is a very significant advantage when the data does not fit in central memory and must be sequentially accessed from a disk based database. 3Generalized linear models are usually trained using the IRLS method (Chambers and Hastie, 1992) which is closely related to the Newton-Raphson algorithm and requires similar computational resources. 1000 10000 100000 Mse* +1e−4 Mse* +1e−3 Mse* +1e−2 Mse* +1e−1 100 1000 10000 0.342 0.346 0.350 0.354 0.358 0.362 0.366 Figure 3: Average test MSE as a function of the number of examples (left). The vertical axis shows the logarithm of the difference between the error and the best error achievable on the testing set. Both curves are essentially superposed. Figure 4: Average test MSE as a function of the training time (milliseconds). Hollow circles: online. Filled circles: batch. The gray line indicates the best mean squared error achievable on the test set. 6 Conclusion Many popular algorithms do not scale well to large number of examples because they were designed with small data sets in mind. For instance, the training time for Support Vector Machines scales somewhere between N 2 and N 3, where N is the number of examples. Our baseline super-linear batch algorithm learns in N log log N time. We demonstrate that adequate online algorithms asymptotically achieve the same generalization performance in N time after a single sweep on the training set. The convergence of learning algorithms is usually described in terms of a search phase followed by a final convergence phase (Bottou and Murata, 2002). Solid empirical evidence (Le Cun et al., 1998) suggests that online algorithms outperform batch algorithms during the search phase. The present work provides both theoretical and experimental evidence that an adequate online algorithm outperforms any batch algorithm during the final convergence phase as well. Appendix4: Sketch of the convergence speed proof Lemma — Let (ut) be a sequence of positive reals verifying the following recurrence: ut =  1 −α t + o 1 t  ut−1 + β t2 + o  1 t2  (7) The lemma states that t ut −→ β α−1 when α > 1 and β > 0. The proof is delicate because the result holds regardless of the unspecified low order terms of the recurrence. However, it is easy to illustrate this convergence with simple numerical simulations. Convergence speed — Consider the following recursive stochastic process: θ(t) = θ(t −1) −1 t Φt ∂L ∂θ (zt, θ(t −1)) + O  1 n2  (8) Our discussion addresses the final convergence phase of this process. Therefore we assume that the parameters θ remain confined in a bounded domain D where the cost function C∞(θ) is convex and has a single non degenerate minimum θ∗∈D. We can assume 4This section has been added for the final version θ∗= 0 without loss of generality. We write Et (X) the conditional expectation of X given all that is known before time t, including the initial conditions θ0 and the selected examples z1, . . . , zt−1. We initially assume also that Φt is a function of z1, . . . , zt−1 only. Using (8), we write Et (θtθ′ t) as a function of θt−1. Then we simplify5 and take the trace. Et |θt|2 = |θt−1|2 −2 t |θt−1|2 + o |θt−1|2 t  + tr H−1 G H−1 t2 + o  1 t2  Taking the unconditional expectation yields a recurence similar to (7). We then apply the lemma and conclude that t E(|θt|2) −→tr H−1 G H−1 . Remark 1 — The notation o (Xt) is quite ambiguous when dealing with stochastic processes. There are many possible flavors of convergence, including uniform convergence, almost sure convergence, convergence in probability, etc. Furthermore, it is not true in general that E (o (Xt)) = o (E (Xt)). The complete proof precisely defines the meaning of these notations and carefully checks their properties. Remark 2 — The proof sketch assumes that Φt is a function of z1, . . . , zt−1 only. In (5), Ψt also depends on zt. The result still holds because the contribution of zt vanishes quickly when t grows large. Remark 3 — The same 1 t behavior holds when Φt →Φ∗and when Φ∗is greater than 1 2H−1 in the semi definite sense. The constant however is worse by a factor roughly equal to ||HΦ∗||. Acknowledgments The authors acknowledge extensive discussions with Yoshua Bengio, Sami Bengio, Ronan Collobert, Noboru Murata, Kenji Fukumizu, Susanna Still, and Barak Pearlmutter. References Amari, S. (1998). Natural Gradient Works Efficiently in Learning. Neural Computation, 10(2):251– 276. Bottou, L. (1998). Online Algorithms and Stochastic Approximations, 9-42. In Saad, D., editor, Online Learning and Neural Networks. Cambridge University Press, Cambridge, UK. Bottou, L. and Murata, N. (2002). Stochastic Approximations and Efficient Learning. In Arbib, M. A., editor, The Handbook of Brain Theory and Neural Networks, Second edition,. The MIT Press, Cambridge, MA. Bottou, L. and Le Cun, Y. (2003). Online Learning for Very Large Datasets. NEC Labs TR-2003L039. To appear: Applied Stochastic Models in Business and Industry. Wiley. Chambers, J. M. and Hastie, T. J. (1992). Statistical Models in S, Chapman & Hall, London. Dennis, J. and Schnabel, R. B. (1983). Numerical Methods For Unconstrained Optimization and Nonlinear Equations. Prentice-Hall, Inc., Englewood Cliffs, New Jersey. Amari, S. and Park, H. and Fukumizu, K. (1998). Adaptive Method of Realizing Natural Gradient Learning for Multilayer Perceptrons, Neural Computation, 12(6):1399–1409 Le Cun, Y., Bottou, L., Orr, G. B., and M¨uller, K.-R. (1998). Efficient Back-prop. In Neural Networks, Tricks of the Trade, Lecture Notes in Computer Science 1524. Springer Verlag. Murata, N. and Amari, S. (1999). Statistical analysis of learning dynamics. Signal Processing, 74(1):3–28. Vapnik, V. N. and Chervonenkis, A. (1974). Theory of Pattern Recognition (in russian). Nauka. Tsypkin, Ya. (1973). Foundations of the theory of learning systems. Academic Press. 5Recall Et Φt ∂L ∂θ (zt, θ)  = Φt ∂C ∂θ (θ) = ΦtHθ + o (|θ|) = θ + o (|θ|)
2003
130
2,344
Plasticity Kernels and Temporal Statistics Peter Dayan1 Michael Hausser2 Michael London1·2 1 GCNU, 2WIBR, Dept of Physiology UCL, Gower Street, London dayan@gats5y.ucl.ac.uk {m.hausser,m.london}@ucl.ac.uk Abstract Computational mysteries surround the kernels relating the magnitude and sign of changes in efficacy as a function of the time difference between pre- and post-synaptic activity at a synapse. One important idea34 is that kernels result from filtering, ie an attempt by synapses to eliminate noise corrupting learning. This idea has hitherto been applied to trace learning rules; we apply it to experimentally-defined kernels, using it to reverse-engineer assumed signal statistics. We also extend it to consider the additional goal for filtering of weighting learning according to statistical surprise, as in the Z-score transform. This provides a fresh view of observed kernels and can lead to different, and more natural, signal statistics. 1 Introduction Speculation and data that the rules governing synaptic plasticity should include a very special role for timel,7,13,17,20,21,23,24,26,27,31,32,3S was spectacularly confirmed by a set of highly influential experiments4·S,ll,l6,25 showing that the precise relative timing of pre-synaptic and post-synaptic action potentials governs the magnitude and sign of the resulting plasticity. These experimentally-determined rules (usually called spike-time dependent plasticity or STDP rules), which are constantly being refined,18,3o have inspired substantial further theoretical work on their modeling and interpretation.2·9,l0,22·28·29·33 Figure l(Dl-Gl)* depict some of the main STDP findings/ of which the best-investigated are shown in figure l(Dl;El), and are variants of a 'standard' STDP rule. Earlier work considered rate-based rather than spikebased temporal rules, and so we adopt the broader term 'time dependent plasticity' or TDP. Note the strong temporal asymmetry in both the standard rules. Although the theoretical studies have provided us with excellent tools for modeling the detailed consequences of different time-dependent rules, and understanding characteristics such as long-run stability and the relationship with non-temporal learning rules such as BCM,6 specifically computational ideas about TDP are rather thinner on the ground. Two main qualitative notions explored in various of the works cited above are that the temporal asymmetries in TDP rules are associated with causality or prediction. However, looking specifically at the standard STDP rules, models interested in prediction *We refer to graphs in this figure by row and column. concentrate mostly on the L 1P component and have difficulty explaining the predsely-timed nature of the LTD. Why should it be particularly detrimental to the weight of a synapse that the pre-synaptic action potential comes just after a post-synaptic action-potential, rather than 200ms later, for instance?. In the case of time-difference or temporal difference rules,29•32 why might the LTD component be so different from the mirror reflection of the L1P component (figure 1(£1)), at least short of being tied to some particular biophysical characteristic of the post-synaptic cell. We seek alternative computationally-sound interpretations. Wallis & Baddeley34 formalized the intuition underlying one class of TDP rules (the so-called trace based rules, figure l(A1)) in terms of temporal filtering. In their model, the actual output is a noisy version of a 'true' underlying signal. They suggested, and showed in an example, that learning proceeds more proficiently if the output is filtered by an optimal noise-removal filter (in their case, a Wiener filter) before entering into the learning rule. This is like using a prior over the signal, and performing learning based on the (mean) of the posterior over the signal given the observations (ie the output). If objects in the world normally persist for substantial periods, then, under some reasonable assumptions about noise, it turns out to be appropriate to apply a low-pass filter to the output. One version of this leads to a trace-like learning rule. Of course, as seen in column 1 of figure 1, TDP rules are generally not tracelike. Here, we extend the Wallis-Baddeley (WB) treatment to rate-based versions of the actual rules shown in the figure. We consider two possibilities, which infer optimal signal models from the rules, based on two different assumptions about their computational role. One continues to regard them as Wiener filters. The other, which is closely related to recent work on adaptation and modulation, 3• s, 15• 36 has the kernel normalize frequency components according to their standard deviations, as well as removing noise. Under this interpretation, the learning signal is a Z-score-transformed veFsion of the output. In section 2, we describe the WB model. In section 3, we extend this model to the case of the observed rules for synaptic plasticity. 2 Filtering Consider a set of pre-synaptic inputs i E { 1 ... n} with firing rates Xi ( t) at time t to a neuron with output rate y ( t). A general TDP plasticity rule suggests that synaptic weight Wi should change according to the correlation between input Xi(t) and output y(t), through the medium of a temporal filter cf>(s) ~wi ex: J dtxi(t) {J dt'y(t')cf>(t-t')} = J dt'y(t'){J dtxi(t)cp(t-t')} (1) Provided the temporal filters for each synapse on a single post-synaptic cell are the same, equation 1 indicates that pre-synaptic and post-synaptic filtering have essentially the same effect. WB34 consider the case that the output can be decomposed as y(t) = s(t) + n(t), where s(t) is a 'true' underlying signal and n(t) is noise corrupting the signal. They suggest defining the filter so that s(t) = f dt' y(t')cf>(t-t') is the optimal least-squares estimate of the signal. Thus, learning would be based on the best available information about the signal s ( t). If signal and noise are statistically stationary signals, with power spectra IS ( w) 12 and IN ( w) 12 respectively at (temporal) frequency w, then the magnitude of the Fourier transform CD 0 [[] [!] kernel kernel signal signal spectrum spectrum spectrum (A]~ !wiener I !white I ;§ :o ~ ...... t w ©j L L klrug~N~ 0 t w w w Figure 1: Time-dependent plastidty rules. The rows are for various suggested rules (A;17 B;23 D;25 E;16 F;2 G, 14 from Abbott & Nelson2); the columns show: (1) the kernels in time t; (2) their temporal power spectra as a function of frequency w; (3) signal power S ( w) as function of w assuming the kernels are derived from the underlying Wiener filter; (4) signal power S(w) assuming the kernels are derived from the noise-removal and whitening filter. Different kernels also have different phase spectra. See text for more details. The ordinates of the plots have been individually normalized; but the abscissce for all the temporal (t) plots and, separately, all the the spectral (w) plots, are the same, for the purposes of comparison. Numerical scales are omitted to focus on structural characteristics. In the text, we refer to individual graphs in this figure by their row letter (A-G) and column number (1-4). of the (Wiener) filter is IS(w)l 2 I<P(w)l = IS(w)l 2 + IN(w)l 2 (2) Any filter with this spectral tuning will eliminate noise as best as possible; the remaining freedom lies in choosing the phases of the various frequency components. Following Foldiak,l? WB suggest using a causal filter for y(t), with cp(t-t') = 0 fort< t'. This means that the input Xi(t) at timet is correlated with weighted values of y(t') for times t'::;;; t only. In fact, WB derive the optimal acausal filter and take its casual half, which is not necessarily the same thing. Interestingly, the forms of TDP that have commonly been used in reinforcement learning23•31•32 consider purely acausal filters for y(t) (such that Xi(t) is correlated with future values of the output), and therefore use exactly the opposite condition on the filter, namely that cp(t-t') = 0 fort> t'. In the context of input coming from visually presented objects, WB suggest using white noise N ( w) = N, 'if w, and consider two possibilities for S ( w), based on the assumptions that objects persist for either fixed, or randomly variable, lengths of time. We summarize their main result in the first three rows of figure 1. Figure l(A3) shows the assumed, scale-free, magnitude spectrum IS(w)l = 1/w for the signal. Figure l(Al) shows the (truly optimal) purely causal version of the filter that results - it can be shown to involve exactly an exponential decay, with a rate constant which depends on the level of the noise N. In WB's self-supervised setting, it is rather unclear a priori whether the assumption of white noise is valid; WB's experiments bore it out to a rough approximation, and showed that the filter of figure l(Al) worked well on a task involving digit representation and recognition. Figure l(Bl;B3) repeat the analysis, with the same signal spectrum, but for the optimal purely acausal filter as used in reinforcement learning's synaptic eligibility traces. Of course, the true TDP kernels (shown in figure l(Dl-Gl)) are neither purely casual nor acausal; figure l(Cl) shows the normal low pass filter that results from assuming phase 0 for all frequency components. Although the WB filter of figure l(Cl) somewhat resembles a Hebbian version of the anti-Hebbian rule for layer IV spiny stellate cells shown in figure l(Gl), it is clearly not a good match for the standard forms of TDP. One might also question the relationship between the time constants of the kernels and the signal spectrum that comes from object persistence. The next section considers two alternative possibilities for interpreting TDP kernels. 3 Signalling and Whitening The main intent of this paper is to combine WB's idea about the role of filtering in synaptic plasticity with the actual forms of the kernels that have been revealed in the experiments. Under two different models for the computational goal of filtering, we work back from the experimental kernels to the implied forms of the statistics of the signals. The first method employs WB's Wiener filtering idea. The second method can be seen as using a more stringent defintion of statistical significance. ~ phase for E1 ~ phase=-¥ (g DoG kernel @] DoG signals b ,, \ \ Wiener w t t w Figure 2: Kernel manipulation. A) The phase spectrum (ie kernel phase as a function of frequency) for the kernel (shown in figure l(El)) with asymmetric LTP and LTD.l6 B) The kernel that results from the power spectrum of figure l(E2) but constant phase -rr/2. This kernel has symmetric LTP and LTD, with an intermediate time constant. C) Plasticity kernel that is exactly a difference of two Gaussians (DoG; compare figure l(Fl)). White (solid; from equation 4) and Wiener (dashed; from equation 3) signal spectra derived from the DoG kernel in (C). Here, the signal spectrum in the case of whitening has been vertically displaced so it is clearer. Both signal spectra show dear periodicities. 3.1 Reverse engineering signals from Wiener filtering Accepting equation 2 as the form of the filter (note that this implies that lci>(w)l ~ 1), and, with WB, making the assumption that the noise is white, so IN(w)l = N, Vw, the assumed amplitude spectrum of the signal process s(t) is IS(w)l = N~lci>(w)l/(1-lci>(i.o)i). (3) Importantly, the assumed power of the noise does not affect the form of the signal power, it only scales it. Figure 1(D2-G2) shows the magnitude of the Fourier transform of the experimental kernels (which are shown in figure 1(D1-G 1)), and figure 1(D3-G3) show the implied signal spectra. Since there is no natural data that specify the absolute scale of the kernels (ie the maximum value of lci>(w) 1), we set it arbitrarily to 0.5. Any value less than ~ 0.9 leads to similar predictions for the signal spectra. We can relate figure 1(D3-G3) to to the heuristic criteria mentioned above for the signal power spectrum. In two cases (D3;F3), the clear peaks in the signal power spectra imply strong periodicities. For layer V pyramids (D3), the time constant for the kernel is ~ 20ms, implying a peak frequency of w =50Hz in they band. In the hippocampal case, the frequency may be a little lower. Certainly, the signal power spectra underlying the different kernels have quite different forms. 3.2 Reverse engineering signals from whitening WB's suggestion that the underlying signal s(t) should be extracted from the output y ( t) far from exhausts the possibilities for filtering. In particular, there have been various suggestions36 that learning should be licensed by statistical surprise, ie according to how components of the output differ from expectations. A simple form of this that has gained recent currency is the Z-score transformation,8•15•36 which implies considering components of the signal in units of (ie normalized by) their standard deviations. Mechanistically, this is closely related to whitening in the face of input noise, but with a rather different computational rationale. A simple formulation of a noise-sensitive Z-score is Dong & Atick's12 whitening filter. Under the same formulation as WB (equation 2), this suggests multiplying the Wiener filter by 1 I IS ( w) I, giving I<I>(w)l = IS(w)II(IS(w)l 2 + N(w) 2). (4) As in equation 3, it is possible to solve for the signal power spectra implied by the various kernels. The 4th column of figure 1 shows the result of doing this for the experimental kernels. In particular, it shows that the clear spectral peaks suggested by the Wiener filter (in the 3rd column) may be artefactual they can arise from a form of whitening. Unlike the case of Wiener filtering, the signal statistics derived from the assumption of whitening have the common characteristic of monotonically decreasing signal powers as a function of frequency w, which is a common finding for natural scene statistics, for instance. The case of the layer V pyramids25 (row Din figure 1) is particularly clear. If the time constants of potentiation (LTP) and depression (LTD) are T, and LTP and LTD are matched, then the Fourier transform of the plasticity kernel is ( 1 ( 1 1 ) -~ w . 2~ tJ ( ) <I> W) = + = -t = -tT 5 VEi iw + 1. iw - 1. rr w2 + ~ rr ~ + T2 T T T W which is exactly the form of equation 4 for S ( w) = 1 I w (which is duly shown in figure 1(D4)). Note the factor of -i in <I>(w). This is determined by the phases of the frequency components, and comes from the anti-symmetry of the kernel. The phase of the components (L<I>(w) = -rr 12, by one convention) implies the predictive nature of the kernel: Xi(t) is being correlated with led (ie future) values of noise-filtered, significance-normalized, outputs. The other cases in figure 1 follow in a similar vein. Row E, from cortical layer II/ll, with its asymmetry between LTP and LID, has similar signal statistics, but with an extra falloff constant w0, making S(w) = 11(w + w 0 ). Also, it has a phase spectrum L<I>(w) which is not constant with w (see figure 2A). Row F, from hippocampal GABAergic cells in culture, has a form that can arise from an exponentially decreasing signal power and little assumed noise (small N ( w) ). Conversely, row G, in cortical layer IV spiny-stellate cells, arises from the same signal statistics, but with a large noise term N(w). Unlike the case of the Wiener filter (equation 3), the form of the signal statistics, and not just their magnitude, depends on the amount of assumed noise. Figure 2B-C show various aspects of how these results change with the parameters or forms of the kernels. Figure 2B shows that coupling the power spectrum (of figure 1E2) for the rule with asymmetric LTP and LTD with a constant phase spectrum (-rr 12) leads to a rule with the same filtering characteristic, but with symmetric LTP and LTD. The phase spectrum concerns the predictive relationship between pre- and post-synaptic frequency components; it will be interesting to consider the kernels that result from other temporal relationships between pre- and post-synaptic activities. Figure 2C shows the kernel generated as a difference of two Gaussians (DoG). Although this kernel resembles that of figure 1F1, the signal spectra (figure 2D) calculated on the basis of whitening (solid; vertically displaced) or Wiener filtering (dashed) are similar to each other, and both involve strong periodicity near the spectral peak of the kernel. 4 Discussion Temporal asymmetries in synaptic plasticity have been irresistibly alluring to theoretical treatments. We followed the suggestion that the kernels indicate that learning is not based on simple correlation between pre- and post -synaptic activity, but rather involves filtering in the light of prior information, either to remove noise from the signals (Wiener filtering), or to remove noise and boost components of the signals according to their statistical significance. Adopting this view leads to new conclusions about the kernels, for instance revealing how the phase spectrum differentiates rules with symmetric and asymmetric potentiation and depression components (compare figures l(El); 2B). Making some further assumptions about the characteristics of the assumed noise, it permits us to reverse engineer the assumed statistics of the signals, ie to give a window onto the priors at synapses or cells (columns 3;4 of figure 1). Structural features in these signal statistics, such as strong periodicities, may be related to experimentally observable characteristics such as oscillatory activity in relevant brain regions. Most importantly, on this view, the detailed characteristics of the filtering might be expected to adapt in the light of patterns of activity. This suggests the straightforward experimental test of manipulating the input and/or output statistics and recording the consequences. Various characteristics of the rules bear comment. Since we wanted to focus on structural features of the rules, the graphs in the figures all lack precise time or frequency scales. In some cases we know the time constants of the kernels, and they are usually quite fast (on the order of tens of milliseconds). This can suggest high frequency spectral peaks in assumed signal statistics. However, it ·also hints at the potential inadequacy of our rate-based treatment that we have given, and suggests the importance of a spike-based treatment. 22• 30 Recent evidence that successive pairs of pre- and post-synaptic spikes do not interact additively in determining the magnitude and direction of plasticity18 make the averaging inherent in the rate-based approximation less appealing. Further, we commented at the outset that pre- and post-synaptic filtering have similar effects, provided that all the filters on one post-synaptic cell are the same. If they are different, then synapses might well be treated as individual filters, ascertaining important signals for learning. In our framework, it is interesting to speculate about the role of (pre-)synaptic depression itself as a form of noise filter (since noise should be filt€red before it can affect the activity of the postsynaptic cell, rather than just its plasticity); leaving the kernel as a significance filter, as in the whitening treatment. Finally, largely because of the separate roles of signal and noise, we have been unable to think of a simple experiment that would test between Wiener and whitening filtering. However, it is a quite critical issue in further exploring computational accounts of plasticity. Acknowledgements We are very grateful to Odelia Schwartz for helpful discussions. Funding was from the Gatsby Charitable Foundation, the Wellcome Trust (MH) and an HFSP Long Term Fellowship (ML). References · [1] Abbott, LF, & Blum, KI (1996) Functional significance of long-term potentiation for sequence learning and prediction. Cerebral Cortex 6:406-416. [2] Abbott, LF & Nelson, SB (2000) Synaptic plasticity: taming the beast. Nature Neuroscience 3:1178-1183. [3] Atick, JJ, li, Z, & Redlich, AN (1992) Understanding retinal color coding from first principles. Neural Computation 4:559-572. [4] Bell, CC, Han, VZ, Sugawara, Y & Grant K (1997) Synaptic plasticity in a cerebellum-like structure depends on temporal order. Nature 387:278-81. [5] Bi, GQ & Poo, MM (1998) Synaptic modifications in cultured hippocampal neurons: dependence on spike timing, synaptic strength, and postsynaptic cell type. Journal of Neurosdence 18:10464-10472. [6] Bienenstock, EL, Cooper, IN, & Munro, PW (1982) Theory for the development of neuron selectivity: Orientation specificity and binocular interaction in visual cortex. Journal of Neuroscience 2:32-48. [7] Blum, KI, & Abbott, LF (1996) A model of spatial map formation in the hippocampus of the rat. Neural Computation 8:85-93. [8] Buiatti, M & Van Vreeswijk, C (2003) Variance normalisation: a key mechanism for temporal adaptation in natural vision? VISion Research, in press. [9] Cateau, H & Fukai, T (2003) A stochastic method to predict the consequence of arbitrary forms of spike-timing-dependent plasticity. Neural Computation 15:597-620. [1 0] Chechik, G (2003). Spike time dependent plasticity and information maximization. Neural Computation in press. [11] Debanne, D, Gahwiler, BH & Thompson, SM (1998) Long-term synaptic plasticity between pairs of individual CA3 pyramidal cells in rat hippocampal slice cultures. Journal of Physiology 507:237-247. [12] Dong, DW, & A tick, JJ (1995) Temporal decorrelation: A theory of lagged and nonlagged responses in the lateral geniculate nucleus. Network: Computation in Neural Systems 6:159-178. [13] Edelman, S & Weinshall, D (1991) A self-organizing multiple-view representation of 3D objects. Biological Cybernetics 64:209-219. [14] Egger, V, Feldmeyer, D & Sakmann, B (1999) Coincidence detection and changes of synaptic efficacy in spiny stellate neurons in rat barrel cortex. Nature Neurosdence 2:1098-1105. [15] Fairhall, AL, Lewen, GD, Bialek, W & de Ruyter Van Steveninck, RR (2001) Efficiency and ambiguity in an adaptive neural code. Nature 412:787-792. [16] Feldman, DE (2000) Timing-based LTP and LTD at vertical inputs to layer II/III pyramidal cells in rat barrel cortex. Neuron 27:45-56. [17] Foldiflk, P (1991) Learning invariance from transformed sequences. Neural Computation 3:194-200. [18] Froemke, RC & Dan, Y (2002) Spike-timing-dependent synaptic modification induced by natural spike trains. Nature 416:433-438. [19] Ganguly K, Kiss, L & Poo, M (2000) Enhancement of presynaptic neuronal excitability by correlated presynaptic and postsynaptic spiking. Nature Neuroscience 3:1018-1026. [20] Gerstner, W & Abbott, LF (1997) Learning navigational maps through potentiation and modulation of hippocampal place cells. Journal of Computational Neurosdence 4:79-94. [21] Gerstner, W, Kempter, R, van Hemmen, JL & Wagner, H (1996) A neuronal learning rule for submillisecond temporal coding. Nature 383:76-81. [22] Gerstner, W & Kistler, WM (2002) Mathematical formulations ofHebbianlearning. Biological Cybernetics 87:404-15 .. [23] Hull, CL (1943) Prindples of Behavior New York, NY: Appleton-Century. [24] Levy, WB & Steward, D (1983) Temporal contiguity requirements for long-term associative potentiation/depression in the hippocampus. Neurosdence 8:791-797 [2 5] Markram, H, Lubke, J, Frotscher, M, & Sakmann, B (1997) Regulation of synaptic efficacy by coincidence of postsynaptic APs and EPSPs. Science 275:213-215. [26] Minai, AA, & Levy, WB (1993) Sequence learning in a single trial. International Neural Network Society World Congress of Neural Networks II. Portland, OR: International Neural Network Society, 505-508. [2 7] Pavlov, PI (192 7) Conditioned Reflexes Oxford, England, OUP. [28] Porr, B & Worgotter, F (2003) Isotropic sequence order learning. Neural Computation 15:831-864. [29] Rao, RP & Sejnowski, TJ (2001) Spike-timing-dependentHebbian plasticity as temporal difference learning. Neural Computation 13:2221-2237. · [30] Sjostrom, PJ, Turrigiano, GG & Nelson, SB (2001) Rate, timing, and cooperativity jointly determine cortical synaptic plasticity. Neuron 32:1149-1164. [31] Sutton, RS (1988) Learning to predict by the methods of temporal difference. Machine Learning 3:9-44. [3 2] Sutton, RS & Barto, AG (1981) Toward a modern theory of adaptive networks: Expectation and prediction. Psychological Review 88:135-170. [33] van Rossum, MC, Bi, GQ & Turrigiano, GG (2000) Stable Hebbian learning from spike timing-dependent plasticity. journal of Neurosdence 20:8812-21. [34] Wallis, G & Baddeley, R (1997) Optimal, unsupervised learning in invariant object recognition. Neural Computation 9:883-894. [35] Wallis, G & Rolls, ET (1997). Invariant face and object recognition in the visual system. it Progress in Neurobiology 51:167-194. [36] Yu, AJ & Dayan, P (2003) Expected and unexpected uncertainty: ACh & NE in the neocortex. In NIPS 2002 Cambridge, MA: MIT Press.
2003
131
2,345
Phonetic Speaker Recognition with Support Vector Machines W. M. Campbell, J. P. Campbell, D. A. Reynolds, D. A. Jones, and T. R. Leek MIT Lincoln Laboratory Lexington, MA 02420 wcampbell,jpc,dar,daj,tleek@ll.mit.edu Abstract A recent area of significant progress in speaker recognition is the use of high level features—idiolect, phonetic relations, prosody, discourse structure, etc. A speaker not only has a distinctive acoustic sound but uses language in a characteristic manner. Large corpora of speech data available in recent years allow experimentation with long term statistics of phone patterns, word patterns, etc. of an individual. We propose the use of support vector machines and term frequency analysis of phone sequences to model a given speaker. To this end, we explore techniques for text categorization applied to the problem. We derive a new kernel based upon a linearization of likelihood ratio scoring. We introduce a new phone-based SVM speaker recognition approach that halves the error rate of conventional phone-based approaches. 1 Introduction We consider the problem of text-independent speaker verification. That is, given a claim of identity and a voice sample (whose text content is a priori unknown), determine if the claim is correct or incorrect. Traditional speaker recognition systems use features based upon the spectral content (e.g., cepstral coefficients) of the speech. Implicitly, these systems model the vocal tract and its associated dynamics over a short time period. These approaches have been quite successful, see [1, 2]. Traditional systems have several drawbacks. First, robustness is an issue because channel effects can dramatically change the measured acoustics of a particular individual. For instance, a system relying only on acoustics might have difficulty confirming that an individual speaking on a land-line telephone is the the same as an individual speaking on a cell phone [3]. Second, traditional systems also rely upon seemingly different methods than human listeners [4]. Human listeners are aware of prosody, word choice, pronunciation, accent, and other speech habits (laughs, etc.) when recognizing speakers. Potentially because of this use of higher level cues, human listeners are less affected by variation in channel and noise types than automatic algorithms. An exciting area of recent development pioneered by Doddington [5] is the use of “high level” features for speaker recognition. In Doddington’s idiolect work, word N-grams from conversations were used to characterize a particular speaker. More recent systems have used a variety of approaches involving phone sequences [6], pronunciation modeling [7], and prosody [8]. For this paper, we concentrate on the use of phone sequences [6]. The processing for this type of system uses acoustic information to obtain sequences of phones for a given conversation and then discards the acoustic waveform. Thus, processing is done at the level of terms (symbols) consisting of, for example, phones or phone N-grams. This paper is organized as follows. In Section 2, we discuss the NIST extended data speaker recognition task. In Section 3.1, we present a method for obtaining a phone stream. Section 3.2 shows the structure of the SVM phonetic speaker recognition system. Section 4 discusses how we construct a kernel for speaker recognition using term weighting techniques for document classification. We derive a new kernel based upon a linearization of a likelihood ratio. Finally, Section 5 shows the applications of our methods and illustrates the dramatic improvement in performance possible over standard phone-based N-gram speaker recognition methods. 2 The NIST extended data task Experiments for the phone-based speaker recognition experiments were performed based upon the NIST 2003 extended data task [9]. The corpus used was a combination of phases II and III of the Switchboard-2 corpora [10]. Each potential training utterance in the NIST extended data task consisted of a conversation side that was nominally of length 5 minutes recorded over a land-line telephone. Each conversation side consisted of a speaker having a conversation on a topic selected by an automatic operator; conversations were typically between unfamiliar individuals. For training and testing, a jacknife approach was used to increase the number of tests. The data was divided into 10 splits. For training, a given split contains speakers to be recognized (target speakers) and impostor speakers; the remaining splits could be used to construct models describing the statistics of the general population—a “background” model. For example, when conducting tests on split 1, splits 2-10 could be used to construct a background. Training a speaker model was performed by using statistics from 1, 2, 4, 8, or 16 conversation sides. This simulated a situation where the system could use longer term statistics and become “familiar” with the individual; this longer term training allows one to explore techniques which might mimic more what human listeners perceive about an individual’s speech habits. A large number of speakers and tests were available; for instance, for 8 conversation training, 739 distinct target speakers were used and 11, 171 true trials and 17, 736 false trials were performed. For additional information on the training/testing structure we refer to the NIST extended data task description [9]. 3 Speaker Recognition with Phone Sequences 3.1 Phone Sequence Extraction Phone sequence extraction for the speaker recognition process is performed using the phone recognition system (PPRLM) designed by Zissman [11] for language identification. PPRLM uses a mel-frequency cepstral coefficient front end with delta coefficients. Each phone is modeled in a gender-dependent context-independent (monophone) manner using a three-state hidden Markov model (HMM). Phone recognition is performed with a Viterbi search using a fully connected null-grammar network of monophones; note that no explicit language model is used in the decoding process. The phone recognition system encompassed multiple languages—English (EG), German (GE), Japanese (JA), Mandarin (MA), and Spanish (SP). In earlier phonetic speaker recognition work [6], it was found that these multiple streams were useful for improving accuracy. The phone recognizers were trained using the OGI multilanguage corpus which had been hand labeled by native speakers. After a “raw” phone stream was obtained from PPRLM, additional processing was performed to increase robustness. First, speech activity detection marks were used to eliminate phone segments where no speech was present. Second, silence labels of duration greater than 0.5 seconds were replaced by “end start” pairs. The idea in this case is to capture some of the ways in which a speaker interacts with others—does the speaker pause frequently, etc. Third, extraneous silence was removed at the beginning and end of the resulting segments. Finally, all phones with short duration were removed (less than 3 frames). 3.2 Phonetic SVM System Our system for speaker recognition using phone sequences is shown in Figure 1. The scenario for its usage is as follows. An individual makes a claim of identity. The system then retrieves the SVM models of the claimed identity for each of the languages in the system. Speech from the individual is then collected (a test utterance). A phone sequence is derived using each of the language phone recognizers and then post-processing is performed on the sequence as discussed in Section 3.1. After this step, the phone sequence is vectorized by computing frequencies of N-grams—this process will be discussed in Section 4. We call this term calculation since we compute term types (unigram, bigram, etc.), term probabilities and weightings in this step [12]. This vector is then introduced into a SVM using the speaker’s model in the appropriate language and a score per language is produced. Note that we do not threshold the output of the SVM. These scores are then fused using a linear weighting to produce a final score for the test utterance. The final score is compared to a threshold and a reject or accept decision is made based upon whether the score was below or above the threshold, respectively. An interesting aspect of the system in Figure 1 is that it uses multiple streams of phones in different languages. There are several reasons for this strategy. First, the system can be used without modification for speakers in multiple languages. Second, although not obvious, from experimentation we show that phone streams different from the language being spoken provide complimentary information for speaker recognition. That is, accuracy improves with these additional systems. A third point is that the system may also work in other languages not represented in the phone streams. It is known that in the case of language identification, language characterization can be performed even if a phone recognizer is not available in that particular language [11]. speech EG phone recognizer O O O Phone PostProcessing Term Calculation EG Speaker Model SVM Σ GE phone recognizer Phone PostProcessing Term Calculation GE Speaker Model SVM SP phone recognizer Phone PostProcessing Term Calculation SP Speaker Model SVM score Figure 1: Phonetic speaker recognition using support vector machines Training for the system in Figure 1 is based upon the structure of the NIST extended data corpus (see Section 2). We treat each conversationside in the corpus as a “document.” From each of these conversation sides we derive a single (sparse) vector of weighted probabilities. To train a model for a given speaker, we use a one-versus-all strategy. The speaker’s conversations are trained to a SVM target value of +1. The conversations sides not in the current split (see Section 2) are used as a background. That is, all conversation sides not in the current split are used as the class for SVM target value of −1. Note that this strategy ensures that speakers that are used as impostors are “unseen” in the training data. 4 Kernel Construction Possibly the most important aspect of the process of phonetic speaker recognition is the selection of the kernel for the SVM. Of particular interest is a kernel which will preserve the identity cues a particular individual might present in their phone sequence. We describe two steps for kernel construction. Our first step of kernel construction is the selection of probabilities to describe the phone stream. We follow the work of [5, 6]. The basic idea is to use a “bag of N-grams” approach. For a phone sequence, we produce N-grams by the standard transformation of the stream; e.g., for bigrams (2-grams) the sequence of phones, t1, t2, ..., tn, is transformed to the sequence of bigrams of phones t1 t2, t2 t3, ..., tn−1 tn. We then find probabilities of Ngrams with N fixed. That is, suppose we are considering unigrams and bigrams of phones, and the unique unigrams and bigrams are designated d1, ..., dM and d1 d1, ... dM dM, respectively; then we calculate probabilities and joint probabilities p(di) = #(tk = di) P k #(tk = dk) p(di dj) = #(tk tl = di dj) P k,l #(ti tj = dk dl) (1) where #(tk = di) indicates the number of phones in the conversation side equal to di, and an analogous definition is used for bigrams. These probabilities then become entries in a vector v describing the conversation side v = [p(d1) . . . p(dM) p(d1 d1) . . . p(dM dM)]t . (2) In general, the vector v will be sparse since the conversation side will not contain all potential unigrams, bigrams, etc. A second step of kernel construction is the selection of the “document component” of term weighting for the entries of the vector v in (2) and the normalization of the resulting vector. By term weighting we mean that for each entry, vi, of the vector v, we multiply by a “collection” (or background) component, wi, for that entry. We tried two distinct approaches for term weighting. TFIDF weighting. The first is based upon the standard TFIDF approach [12, 13]. From the background section of the corpus we compute the frequency of a particular N-gram using conversation sides as the item analogous to a document. I.e., if we let DF(ti) be the number of conversation sides where a particular N-gram, ti, is observed, then our resulting term-weighted vector has entries vi log # of conversation sides in background DF(ti)  . (3) We follow the weighting in (3) by a normalization of the vector to unit length x 7→x/∥x∥2. Log-likelihood ratio weighting. An alternate method of term weighting may be derived using the following strategy. Suppose that we have two conversation sides from speakers, spk1 and spk2. Further suppose that the sequence of N-grams (for fixed N) in each conversation side is t1,t2, ..., tn and u1, u2, ..., um respectively. We denote the unique set of N-grams as d1, ..., dM. We can build a “model” based upon the conversation sides for each speaker consisting of the probability of N-grams, p(di|spkj). We then compute the likelihood ratio of the first conversation side as is standard in verification problems [1]; a linearization of the likelihood ratio computation will serve as the kernel. Proceeding, p(t1, t2, . . . , tn|spk2) p(t1, . . . , tn|background) = n Y i=1 p(ti|spk2) p(ti|background) (4) where we have made the assumption that the probabilities are independent. We then consider the log of the likelihood ratio normalized by the number of observations, score = 1 n n X i=1 log  p(ti|spk2) p(ti|background)  = M X j=1 #(ti = dj) n log  p(dj|spk2) p(dj|background)  = M X j=1 p(dj|spk1) log  p(dj|spk2) p(dj|background)  . (5) If we now “linearize” the log function in (5) by using log(x) ≈x −1, we get score ≈ M X j=1 p(dj|spk1) p(dj|spk2) p(dj|background) − M X j=1 p(dj|spk1) = M X j=1 p(dj|spk1) p(dj|spk2) p(dj|background) −1 = M X j=1 p(dj|spk1) p p(dj|background) p(dj|spk2) p p(dj|background) −1 (6) Thus, (6) suggests we use a term weighting given by 1/ p p(dj|background). Note that the strategy used for constructing a kernel is part of a general process of finding kernels based upon training on one instance and testing upon another instance [2]. 5 Experiments Experiments were performed using the NIST extended data task “v1” lists (which encompass the entire Switchboard 2 phase II and III corpora). Tests were performed for 1, 2, 4, 8, and 16 training conversations. Scoring was performed using the SVM system shown in Figure 1. Five language phone recognizers were used—English (EG), German (GE), Japanese (JA), Mandarin (MA), and Spanish (SP). The resulting phone sequences were vectorized as unigram and bigram probabilities (2). Both the standard TFIDF term weighting (3) and the log-likelihood ratio (TFLLR) term weighting (6) methods were used. We note that when a term did not appear in the background, it was ignored in training and scoring. A linear kernel was used x · y + 1 to compare the vectors of term weights. Training was performed using the SVMTorch package [14] with c = 1. Comparisons of performance for different strategies were typically done with 8 conversation training and English phone streams since these were representative of overall performance. Table 1: Comparison of different term weighting strategies, English only scores, 8 conversation training Term Weighting Method EER TFIDF 7.4% TFLLR 5.2% Results were compared via equal error rates (EERs)—the error at the threshold which produces equal miss and false alarm probabilities, Pmiss = Pfa. Table 1 shows the results for two different weightings, TFIDF (3) and TFLLR (6), using English phones only and 8 training conversations. The table illustrates that the new TFLLR weighting method is more effective. This may be due to the fact the IDF is too “smooth”; e.g., for unigrams, the IDF is approximately 1 since a unigram almost always appears in a given 5 minute conversation. Also, alternate methods of calculating the TF component of TFIDF have not been explored and may yield gains compared to our formulation. We next considered the effect on performance of the language of the phone stream for the 8 conversation training case. Figure 2 shows a DET plot (a ROC plot with a special scale [15]) with results corresponding to the 5 language phone streams. The best performing system in the figure is an equal fusion of all scores from the SVM outputs for each language and has an EER of 3.5%; other fusion weightings were not explored in detail. Note that the best performing language is English, as expected. Note, though, as we indicated in Section 3.1 that other languages do provide significant speaker recognition information. 0.1 0.2 0.5 1 2 5 10 20 40 0.1 0.2 0.5 1 2 5 10 20 40 False Alarm probability (in %) Miss probability (in %) Fused Scores EG GE MA SP JA Figure 2: DET plot for the 8 conversation training case with varying languages and TFLLR weighting. The plot shows in order of increasing EER—fused scores, EG, MA, GE, JA, SP Table 2: Comparison of equal error rates (EERs) for different conversation training lengths using the TFLLR phonetic SVM and the standard log likelihood ratio (LLR) method # Training SVM EER LLR EER SVM EER Conversations Reduction 1 13.4% 21.8% 38% 2 8.6% 14.9% 42% 4 5.3% 10.3% 49% 8 3.5% 8.8% 60% 16 2.5% 8.3% 70% 0.1 0.2 0.5 1 2 5 10 20 40 0.1 0.2 0.5 1 2 5 10 20 40 False Alarm probability (in %) Miss probability (in %) SVM Standard Trigram Standard Bigram Figure 3: DET plot for 8 conversation training showing a comparison of the SVM approach (solid line) to the standard log likelihood ratio approach using bigrams (dash-dot line) and the standard log likelihood ratio approach using trigrams (dashed line) Table 2 shows the effect of different training conversation lengths on the EER. As expected, more training data leads to lower error rates. We also see that even for 1 training conversation, the SVM system provides significant speaker characterization ability. Figure 3 shows DET plots comparing the performance of the standard log likelihood ratio method [6] to our new SVM method using the TFLLR weighting. We show log likelihood results based on both bigrams and trigrams; in addition, a slightly more complex model involving discounting of probabilities is used. One can see the dramatic reduction in error, especially apparent for low false alarm probabilities. The EERs of the standard system are 8.8% (trigrams, see Table 2) and 10.4% (bigrams), whereas our new SVM system produces an EER of 3.5%; thus, we have reduced the error rate by 60%. 6 Conclusions and future work An exciting new application of SVMs to speaker recognition was shown. By computing frequencies of phones in conversations, speaker characterization was performed. A new kernel was introduced based on the standard method of log likelihood ratio scoring. The resulting SVM method reduced error rates dramatically over standard techniques. Acknowledgements This work was sponsored by the United States Government Technical Support Working Group under Air Force Contract F19628-00-C-0002. Opinions, interpretations, conclusions, and recommendations are those of the authors and are not necessarily endorsed by the United States Government. References [1] Douglas A. Reynolds, T. F. Quatieri, and R. Dunn, “Speaker verification using adapted Gaussian mixture models,” Digital Signal Processing, vol. 10, no. 1-3, pp. 19–41, 2000. [2] W. M. Campbell, “Generalized linear discriminant sequence kernels for speaker recognition,” in Proceedings of the International Conference on Acoustics Speech and Signal Processing, 2002, pp. 161–164. [3] T. F. Quatieri, D. A. Reynolds, and G. C. O’Leary, “Estimation of handset nonlinearity with application to speaker recognition,” IEEE Trans. Speech and Audio Processing, vol. 8, no. 5, pp. 567–584, 2000. [4] Astrid Schmidt-Nielsen and Thomas H. Crystal, “Speaker verification by human listeners: Experiments comparing human and machine performance using the NIST 1998 speaker evaluation data,” Digital Signal Processing, vol. 10, pp. 249–266, 2000. [5] G. Doddington, “Speaker recognition based on idiolectal differences between speakers,” in Proceedings of Eurospeech, 2001, pp. 2521–2524. [6] Walter D. Andrews, Mary A. Kohler, Joseph P. Campbell, John J. Godfrey, and Jaime Hern´andez-Cordero, “Gender-dependent phonetic refraction for speaker recognition,” in Proceedings of the International Conference on Acoustics Speech and Signal Processing, 2002, pp. I149–I153. [7] David Klus´aˇcek, Jir´i Navar´atil, D. A. Reynolds, and J. P. Campbell, “Conditional pronunciation modeling in speaker detection,” in Proceedings of the International Conference on Acoustics Speech and Signal Processing, 2003, pp. IV–804–IV–807. [8] Andre Adami, Radu Mihaescu, Douglas A. Reynolds, and John J. Godfrey, “Modeling prosodic dynamics for speaker recognition,”in Proceedings of the International Conference on Acoustics Speech and Signal Processing, 2003, pp. IV–788–IV–791. [9] M. Przybocki and A. Martin, “The NIST year 2003 speaker recognition evaluation plan,” http://www.nist.gov/speech/tests/spk/2003/index.htm, 2003. [10] Linguistic Data Consortium, “Switchboard-2 corpora,”http://www.ldc.upenn.edu. [11] M. Zissman, “Comparison of four approaches to automatic language identification of telephone speech,” IEEE Trans. Speech and Audio Processing, vol. 4, no. 1, pp. 31–44, 1996. [12] Thorsten Joachims, Learning to Classify Text Using Support Vector Machines, Kluwer Academic Publishers, 2002. [13] G. Salton and C. Buckley, “Term weighting approaches in automatic text retrieval,”Information Processing and Management, vol. 24, no. 5, pp. 513–523, 1988. [14] Ronan Collobert and Samy Bengio, “SVMTorch: Support vector machines for large-scale regression problems,” Journal of Machine Learning Research, vol. 1, pp. 143–160, 2001. [15] Alvin Martin, G. Doddington, T. Kamm, M. Ordowski, and Marc Przybocki, “The DET curve in assessment of detection task performance,” in Proceedings of Eurospeech, 1997, pp. 1895– 1898.
2003
132
2,346
The IM Algorithm : A variational approach to Information Maximization David Barber Felix Agakov Institute for Adaptive and Neural Computation : www.anc.ed.ac.uk Edinburgh University, EH1 2QL, U.K. Abstract The maximisation of information transmission over noisy channels is a common, albeit generally computationally difficult problem. We approach the difficulty of computing the mutual information for noisy channels by using a variational approximation. The resulting IM algorithm is analagous to the EM algorithm, yet maximises mutual information, as opposed to likelihood. We apply the method to several practical examples, including linear compression, population encoding and CDMA. 1 Introduction The reliable communication of information over noisy channels is a widespread issue, ranging from the construction of good error-correcting codes to feature extraction[3, 12]. In a neural context, maximal information transmission has been extensively studied and proposed as a principal goal of sensory processing[2, 5, 7]. The central quantity in this context is the Mutual Information (MI) which, for source variables (inputs) x and response variables (outputs) y, is I(x, y) ≡H(y) −H(y|x), (1) where H(y) ≡−⟨log p(y)⟩p(y) and H(y|x) ≡−⟨log p(y|x)⟩p(x,y) are marginal and conditional entropies respectively, and angled brackets represent averages. The goal is to adjust parameters of the mapping p(y|x) to maximise I(x, y). Despite the simplicity of the statement, the MI is generally intractable for all but special cases. The key difficulty lies in the computation of the entropy of p(y) (a mixture). One such tractable special case is if the mapping y = g(x; Θ) is deterministic and invertible, for which the difficult entropy term trivially becomes H(y) = ⟨log |J|⟩p(y) + const. (2) Here J = {∂yi/∂xj} is the Jacobian of the mapping. For non-Gaussian sources p(x), and special choices of g(x; Θ), the minimization of (1) with respect to the parameters Θ leads to the infomax formulation of ICA[4]. Another tractable special case is if the source distribution p(x) is Gaussian and the mapping p(y|x) is Gaussian. p(z) x y x p(x) p(y|x) q(x|y,z) decoder source encoder z Figure 1: An illustration of the form of a more general mixture decoder. x represents the sources or inputs, which are (stochastically) encoded as y. A receiver decodes y (possibly with the aid of auxiliary variables z). However, in general, approximations of the MI need to be considered. A variety of methods have been proposed. In neural coding, a popular alternative is to maximise the Fisher ‘Information’[5]. Other approaches use different objective criteria, such as average reconstruction error. 2 Variational Lower Bound on Mutual Information Since the MI is a measure of information transmission, our central aim is to maximise a lower bound on the MI. Using the symmetric property of the MI, an equivalent formulation of the MI is I(x, y) = H(x) −H(x|y). Since we shall generally be interested in optimising MI with respect to the parameters of p(y|x), and p(x) is simply the data distribution, we need to bound H(x|y) suitably. The KullbackLeibler bound P x p(x|y) log p(x|y) −p(x|y) log q(x|y) ≥0 gives I(x, y) ≥ H(x) | {z } “entropy′′ + ⟨log q(x|y)⟩p(x,y) | {z } “energy′′ def = ˜I(x, y). (3) where q(x|y) is an arbitrary variational distribution. The bound is exact if q(x|y) ≡ p(x|y). The form of this bound is convenient since it explicitly includes both the encoder p(y|x) and decoder q(x|y), see fig(1). Certainly other well known lower bounds on the MI may be considered [6] and a future comparison of these different approaches would be interesting. However, our current experience suggests that the bound considered above is particularly computationally convenient. Since the bound is based on the KL divergence, it is equivalent to a moment matching approximation of p(x|y) by q(x|y). This fact is highly beneficial in terms of decoding, since mode matching approaches, such as mean-field theory, typically get trapped in the one of many sub-optimal local minima. More successful decoding algorithms approximate the posterior mean[10]. The IM algorithm To maximise the MI with respect to any parameters θ of p(y|x, θ), we aim to push up the lower bound (3). First one needs to choose a class of variational distributions q(x|y) ∈Q for which the energy term is tractable. Then a natural recursive procedure for maximising ˜I(X, Y ) for given p(x), is 1. For fixed q(x|y), find θnew = arg maxθ ˜I(X, Y ) 2. For fixed θ, qnew(x|y) = arg maxq(x|y)∈Q ˜I(X, Y ), where Q is a chosen class of distributions. These steps are iterated until convergence. This procedure is analogous to the (G)EM algorithm which maximises a lower bound on the likelihood[9]. The difference is simply in the form of the “energy” term. Note that if |y| is large, the posterior p(x|y) will typically be sharply peaked around its mode. This would motivate a simple approximation q(x|y) to the posterior, Figure 2: The MI optimal linear projection of data x (dots) is not always given by PCA. PCA projects data onto the vertical line, for which the entropy conditional on the projection H(x|y) is large. Optimally, we should project onto the horizontal line, for which the conditional entropy is zero. significantly reducing the computational complexity of optimization. In the case of real-valued x, a natural choice in the large |y| limit is to use a Gaussian. A simple approximation would then be to use a Laplace approximation to p(x|y) with covariance elements [Σ−1]ij = ∂2 log p(x|y) ∂xi∂xj . Inserted in the bound, this then gives a form reminiscent of the Fisher Information[5]. The bound presented here is arguably more general and appropriate than presented in [5] since, whilst it also tends to the exact value of the MI in the limit of a large number of responses, it is a principled bound for any response dimension. Relation to Conditional Likelihood Consider an autoencoder x →y →˜x and imagine that we wish to maximise the probability that the reconstruction ˜x is in the same s state as x: log p(˜x = s|x = s) = log Z y p(˜x = s|y)p(y|x = s) Jensen z}|{ ≥ ⟨log p(˜x = s|y)⟩p(y|x=s) Averaging this over all the states of x: X s p(x = s) log p(˜x = s|x = s) ≥ X s ⟨log p(˜x = s|y)⟩p(x=s,y) ≡⟨log q(x|y)⟩p(x,y) Hence, maximising ˜I(X, Y ) (for fixed p(x)) is the same as maximising the lower bound on the probability of a correct reconstruction. This is a reassuring property of the lower bound. Even though we do not directly maximise the MI, we also indirectly maximise the probability of a correct reconstruction – a form of autoencoder. Generalisation to Mixture Decoders A straightforward application of Jensen’s inequality leads to the more general result: I(X, Y ) ≥H(X) + ⟨log q(x|y, z)⟩p(y|x)p(x)q(z) ≡˜I(X, Y ) where q(x|y, z) and q(z) are variational distributions. The aim is to choose q(x|y, z) such that the bound is tractably computable. The structure is illustrated in fig(1). 3 Linear Gaussian Channel : Improving on PCA A common theme in linear compression and feature extraction is to map a (high dimensional) vector x to a (lower dimensional) vector y = Wx such that the information in the vector x is maximally preserved in y. The classical solution to this problem (and minimizes the linear reconstruction error) is given by PCA. However, as demonstrated in fig(2), the optimal setting for W is, in general not given by the widely used PCA. To see how we might improve on the PCA approach, we consider optimising our bound with respect to linear mappings. We take as our projection (encoder) model, p(y|x) ∼N(Wx, s2I), with isotropic Gaussian noise. The empirical distribution is simply p(x) ∝PP µ=1 δ(x −xµ), where P is the number of datapoints. Without loss of generality, we assume the data is zero mean. For a decoder q(x|y) = N(m(y), Σ(y)), maximising the bound on MI is equivalent to minimising P X µ=1 (x −m(y))T Σ−1(y)(x −m(y)) + log det Σ(y) p(y|xµ) For constant diagonal matrices Σ(y), this reduces to minimal mean square reconstruction error autoencoder training in the limit s2 →0. This clarifies why autoencoders (and hence PCA) are a sub-optimal special case of MI maximisation. Linear Gaussian Decoder A simple decoder is given by q(x|y) ∼N(Uy, σ2I), for which ˜I(x, y) ∝2tr(UWS) −tr(UMUT ), (4) where S = ⟨xxT ⟩= P µ xµ(xµ)T /P is the sample covariance of the data, and M = Is2 + WSWT (5) is the covariance of the mixture distribution p(y). Optimization of (4) for U leads to SWT = UM. Eliminating U, this gives ˜I(x, y) ∝tr SWT M−1WS  (6) In the zero noise limit, optimisation of (6) produces PCA. For noisy channels, unconstrained optimization of (6) leads to a divergence of the matrix norm ∥WWT ∥∞; a norm-constrained optimisation in general produces a different result to PCA. The simplicity of the linear decoder in this case severely limits any potential improvement over PCA, and certainly would not resolve the issue in fig(2). For this, a non-linear decoder q(x|y) is required, for which the integrals become more complex. Non-linear Encoders and Kernel PCA An alternative to using non-linear decoders to improve on PCA is to use a non-linear encoder. A useful choice is p(y|x) = N(WΦ(x), σ2I) where Φ(x) is in general a high dimensional, non-linear embedding function, for which W will be non-square. In the zero-noise limit the optimal solution for the encoder results in non-linear PCA on the covariance ⟨Φ(x)Φ(x)T ⟩of the transformed data. By Mercer’s theorem, the elements of the covariance matrix may be replaced by a Kernel function of the users choice[8]. An advantage of our framework is that our bound enables the principled comparison of embedding functions/kernels. 4 Binary Responses (Neural Coding) In a neurobiological context, a popular issue is how to encode real-valued stimuli in a population of spiking neurons. Here we look briefly at a simple case in which each neuron fires (yi = 1) with increasing probability the further the membrane potential wT i x is above threshold −bi. Independent neural firing suggests: p(y|x) = Y i p(yi|x) def = Y σ(yi(wT i x + bi)). (7) Figure 3: Top row: a subset of the original real-valued source data. Middle row: after training, 20 samples from each of the 7 output units, for each of the corresponding source inputs. Bottom row: Reconstruction of the source data from 50 samples of the output units. Note that while the 8th and the 10th patterns have closely matching stochastic binary representations, they differ in the firing rates of unit 5. This results in a visibly larger bottom loop of the 8th reconstructed pattern, which agrees with the original source data. Also, the thick vertical 1 (pattern 3) differs from the thin vertical eight (pattern 6) due to the differences in stochastic firings of the third and the seventh units. Here the response variables y ∈{−1, +1}|y|, and σ(a) def = 1/(1 + e−a). For the decoder, we chose a simple linear Gaussian q(x|y) ∼N(Uy, Σ). In this case, exact evaluation of the bound (3) is straightforward, since it only involves computations of the second-order moments of y over the factorized distribution. A reasonable reconstruction of the source x⋆from its representation y will be given by the mean ˜x = ⟨x⟩q(x|y) of the learned approximate posterior. In noisy channels we need to average over multiple possible representations, i.e. ˜x = ⟨⟨x⟩q(x|y)⟩p(y|x⋆). We performed reconstruction of continuous source data from stochastic binary responses for |x| = 196 input and |y| = 7 output units. The bound was optimized with respect to the parameters of p(y|x) and q(x|y) with isotropic norm constraints on W and b for 30 instances of digits 1 and 8 (15 of each class). The source variables were reconstructed from 50 samples of the corresponding binary representations at the mean of the learned q(x|y), see fig(3). 5 Code Division Multiple Access (CDMA) In CDMA[11], a mobile phone user j ∈1, . . . , M wishes to send a bit sj ∈{0, 1} of information to a base station. To send sj = 1, she transmits an N dimensional realvalued vector gj, which represents a time-discretised waveform (sj = 0 corresponds to no transmission). The simultaneous transmissions from all users results in a received signal at the base station of ri = X j gj i sj + ηi, i = 1, . . . , N, or r = Gs + η where ηi is Gaussian noise. Probabilistically, we can write p(r|s) ∝exp n −(r −Gs)2 /(2σ2) o . The task for the base station (which knows G) is to decode the received vector r so that s can be recovered reliably. For simplicity, we assume that N = M so that the matrix G is square. Using Bayes’ rule, p(s|r) ∝p(r|s)p(s), and assuming a flat prior on s, p(s|r) ∝exp  − −2rT Gs + sT GT Gs  /(2σ2) (8) Computing either the MAP solution arg maxs p(s|r) or the MPM solution arg maxsj p(sj|r), j = 1, . . . , M is, in general, NP-hard. If GT G is diagonal, optimal decoding is easy, since the posterior factorises, with p(sj|r) ∝exp ( 2 X i riGji −Djj ! sj/(2σ2) ) where the diagonal matrix D = GT G (and we used s2 i ≡si for si ∈{0, 1}). For suitably randomly chosen matrices G, GT G will be approximately diagonal in the limit of large N. However, ideally, one would like to construct decoders that perform near-optimal decoding without recourse to the approximate diagonality of GT G. The MAP decoder solves the problem mins∈{0,1}N sT GT Gs −2sT GT r  ≡mins∈{0,1}N s −G−1r T GT G s −G−1r  and hence the MAP solution is that s which is closest to the vector G−1r. The difficulty lies in the meaning of ‘closest’ since the space is non-isotropically warped by the matrix GT G. A useful guess for the decoder is that it is the closest in the Euclidean sense to the vector G−1r. This is the so-called decorrelation estimator. Computing the Mutual Information Of prime interest in CDMA is the evaluation of decoders in the case of nonorthogonal matrices G[11]. In this respect, a principled comparison of decoders can be obtained by evaluating the corresponding bound on the MI1, I(r, s) ≡H(s) −H(s|r) ≥H(s) + X r X s p(s)p(r|s) log q(s|r) (9) where H(s) is trivially given by M (bits). The bound is exact if q(s|r) = p(s|r). We make the specific assumption in the following that our decoding algorithm takes the factorised form q(s|r) = Q i q(si|r) and, without loss of generality, we may write q(si|r) = σ ((2si −1)fi(r)) (10) for some decoding function fi(r). We restrict interest here to the case of simple linear decoding functions fi(r) = ai + X j wijrj. Since p(r|s) is Gaussian, (2si −1)fi(r) ≡xi is also Gaussian, p(xi|s) = N(µi(s), vari), µi(s) ≡(2si −1)(ai + wT i Gs), vari ≡σ2wT i wi where wT i is the ith row of the matrix [W]ij ≡wij. Hence −H(s|r) ≥ X i 1 p 2πσ2wT i wi Z ∞ x=−∞ [log σ (x)] e−[x−(2si−1)(ai+wT i Gs)]2/(2σ2wT i wi)  p(s) (11) In general, the average over the factorised distribution p(s) can be evaluated by using the Fourier Transform [1]. However, to retain clarity here, we constrain the decoding matrix W so that wT i Gs = bisi, i.e. WG = diag(b), for a parameter vector b. The average over p(s) then gives −H(s|r) ≥1 2 X i D log σ (x) (1 + e−[−2xbi−4xai+2aibi+b2 i ]/(2σ2wT i wi)E N(−ai,var=σ2wT i wi) , (12) 1Other variational methods may be considered to approximate the normalisation constant of p(s|r)[13], and it would be interesting to look into the possibility of using them in a MI approximation, and also as approximate decoding 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 MI bound for Inverse Decoder MI bound for Constrained Optimal Decoder Figure 4: The bound given by the decoder W ∝G−1r plotted against the optimised bound (for the same G) found using 50 updates of conjugate gradients. This was repeated over several trials of randomly chosen matrices G, each of which are square of N = 10 dimensions. For clarity, a small number of poor results (in which the bound is negative) have been omitted. To generate G, form the matrix Aij ∼ N(0, 1), and B = A + AT . From the eigen-decomposition of B, i.e BE = EΛ, form [G]ij = [EΛ]ij + 0.1N(0, 1) (so that GT G has small offdiagonal elements). a sum of one dimensional integrals, each of which can be evaluated numerically. In the case of an orthogonal matrix GT G = D the decoding function is optimal and the MI bound is exact with the parameters in (12) set to ai = −[GT G]ii/(2σ2) W = GT /σ2 bi = [GT G]ii/σ2. Optimising the linear decoder In the case that GT G is non-diagonal, what is the optimal linear decoder? A partial answer is given by numerically optimising the bound from (11). For the constrained case, WG = diag(b), (12) can be used to calculate the bound. Using W = diag(b)G−1, σ2wT i wi = σ2b2 i X j ([G−1]ij)2, and the bound depends only on a and b. Under this constraint the bound can be numerically optimised as a function of a and b, given a fixed vector P j([G−1]ij)2. As an alternative we can employ the decorrelation decoder, W = G−1/σ2, with ai = −1/(2σ2). In fig(4) we see that, according to our bound, the decorrelation or (‘inverse’) decoder is suboptimal versus the linear decoder fi(r) = ai + wT i r with W = diag(b)G−1, optimised over a and b. These initial results are encouraging, and motivate further investigations, for example, using syndrome decoding for CDMA. 6 Posterior Approximations There is an interesting relationship between maximising the bound on the MI and computing an optimal estimate q(s|r) of an intractable posterior p(s|r). The optimal bit error solution sets q(si|r) to the mean of the exact posterior marginal p(si|r). Mean Field Theory approximates the posterior marginal by minimising the KL divergence: KL(q||p) = P s (q(s|r) log q(s|r) −q(s|r) log p(s|r)), where q(s|r) = Q i q(si|r). In this case, the KL divergence is tractably computable (up to a neglectable prefactor). However, this form of the KL divergence chooses q(si|r) to be any one of a very large number of local modes of the posterior distribution p(si|r). Since the optimal choice is to choose the posterior marginal mean, this is why using Mean Field decoding is generally suboptimal. Alternatively, consider KL(p||q) = X s (p(s|r) log p(s|r) −p(s|r) log q(s|r)) = − X s p(s|r) log q(s|r)+const. This is the correct KL divergence in the sense that, optimally, q(si|r) = p(si|r), that is, the posterior marginal is correctly calculated. The difficulty lies in performing averages with respect to p(s|r), which are generally intractable. Since we will have a distribution p(r) it is reasonable to provide an averaged objective function, X r X s p(r)p(s|r) log q(s|r) = X r X s p(s)p(r|s) log q(s|r). (13) Whilst, for any given r, we cannot calculate the best posterior marginal estimate, we may be able to calculate the best posterior marginal estimate on average. This is precisely the case in, for example, CDMA since the average over p(r|s) is tractable, and the resulting average over p(s) can be well approximated numerically. Wherever an average case objective is desired is of interest to the methods suggested here. 7 Discussion We have described a general theoretically justified approach to information maximization in noisy channels. Whilst the bound is straightforward, it appears to have attracted little previous attention as a practical tool for MI optimisation. We have shown how it naturally generalises linear compression and feature extraction. It is a more direct approach to optimal coding than using the Fisher ‘Information’ in neurobiological population encoding. Our bound enables a principled comparison of different information maximisation algorithms, and may have applications in other areas of machine learning and Information Theory, such as error-correction. [1] D. Barber, Tractable Approximate Belief Propagation, Advanced Mean Field Methods Theory and Practice (D. Saad and M. Opper, eds.), MIT Press, 2001. [2] H. Barlow, Unsupervised Learning, Neural Computation 1 (1989), 295–311. [3] S Becker, An Information-theoretic unsupervised learning algorithm for neural networks, Ph.D. thesis, University of Toronto, 1992. [4] A.J. Bell and T.J. Sejnowski, An information-maximisation approach to blind separation and blind deconvolution, Neural Computation 7 (1995), no. 6, 1004–1034. [5] N. Brunel and J.-P. Nadal, Mutual Information, Fisher Information and Population Coding, Neural Computation 10 (1998), 1731–1757. [6] T. Jaakkola and M. Jordan., Improving the mean field approximation via the use of mixture distributions, Proceedings of the NATO ASI on Learning in Graphical Models, Kluwer, 1997. [7] R. Linsker, Deriving Receptive Fields Using an Optimal Encoding Criterion, Advances in Neural Information Processing Systems (Lee Giles (eds) Steven Hanson, Jack Cowan, ed.), vol. 5, Morgan-Kaufmann, 1993. [8] S. Mika, B. Schoelkopf, A.J. Smola, K-R. Muller, M. Scholz, and Gunnar Ratsch, Kernel PCA and De-Noising in Feature Spaces, Advances in Neural Information Processing Systems 11 (1999). [9] R. M. Neal and G. E. Hinton, A View of the EM Algorithm That Justifies Incremental, Sparse, and Other Variants, Learning in Graphical Models (M.J. Jordan, ed.), MIT Press, 1998. [10] D. Saad and M. Opper, Advanced Mean Field Methods Theory and Practice, MIT Press, 2001. [11] T. Tanaka, Analysis of Bit Error Probability of Direct-Sequence CDMA Multiuser Demodulators, Advances in Neural Information Processing Systems (T. K. Leen et al. (eds.), ed.), vol. 13, MIT Press, 2001, pp. 315–321. [12] K. Torkkola and W. M. Campbell, Mutual Information in Learning Feature Transformations, Proc. 17th International Conf. on Machine Learning (2000). [13] M. Wainwright, T. Jaakkola, and A. Willsky, A new class of upper bounds on the log partition function, Uncertainty in Artificial Intelligence, 2002.
2003
133
2,347
Variational Linear Response Manfred Opper(1) Ole Winther(2) (1) Neural Computing Research Group, School of Engineering and Applied Science, Aston University, Birmingham B4 7ET, United Kingdom (2) Informatics and Mathematical Modelling, Technical University of Denmark, R. Petersens Plads, Building 321, DK-2800 Lyngby, Denmark opperm@aston.ac.uk owi@imm.dtu.dk Abstract A general linear response method for deriving improved estimates of correlations in the variational Bayes framework is presented. Three applications are given and it is discussed how to use linear response as a general principle for improving mean field approximations. 1 Introduction Variational and related mean field techniques have attracted much interest as methods for performing approximate Bayesian inference, see e.g. [1]. The maturity of the field has recently been underpinned by the appearance of the variational Bayes method [2, 3, 4] and associated software making it possible with a window based interface to define and make inference for a diverse range of graphical models [5, 6]. Variational mean field methods have shortcomings as thoroughly discussed by Mackay [7]. The most important is that it based upon the variational assumption of independent variables. In many cases where the effective coupling between the variables are weak this assumption works very well. However, if this is not the case, the variational method can grossly underestimate the width of marginal distributions because variance contributions induced by other variables are ignored as a consequence of the assumed independence. Secondly, the variational approximation may be non-convex which is indicated by the occurrence of multiple solutions for the variational distribution. This is a consequence of the fact that a possibly complicated multi-modal distribution is approximated by a simpler uni-modal distribution. Linear response (LR) is a perturbation technique that gives an improved estimate of the correlations between the stochastic variables by expanding around the solution to variational distribution [8]. This means that we can get non-trivial estimates of correlations from the factorizing variational distribution. In many machine learning models, e.g. Boltzmann machine learning [9] or probabilistic Independent Component Analysis [3, 10], the M-step of the EM algorithm depend upon the covariances of the variables and LR has been applied with success in these cases [9, 10]. Variational calculus is in this paper used to derive a general linear response correction from the variational distribution. It is demonstrated that the variational LR correction can be calculated as systematically the variational distribution in the Variational Bayes framework (albeit at a somewhat higher computational cost). Three applications are given: a model with a quadratic interactions, a Bayesian model for estimation of mean and variance of a 1D Gaussian and a Variational Bayes mixture of multinomials (i.e. for modeling of histogram data). For the two analytically tractable models (the Gaussian and example two above), it is shown that LR gives the correct analytical result where the variational method does not. The need for structured approximations, see e.g. [5] and references therein, that is performing exact inference for solvable subgraphs, might thus be eliminated by the use of linear response. We define a general probabilistic model M for data y and model parameters s: p(s, y) = p(s, y|M). The objective of a Bayesian analysis are typically the following: to derive the marginal likelihood p(y|M) = R ds p(s, y|M) and marginal distributions e.g. the one-variable pi(si|y) = 1 p(y) R Q k̸=i dskp(s, y) and the two-variable pij(si, sj|y) = 1 p(y) R Q k̸=i,j dskp(s, y). In this paper, we will only discuss how to derive linear response approximations to marginal distributions. Linear response corrected marginal likelihoods can also be calculated, see Ref. [11]. The paper is organized as follows: in section 2 we discuss how to use the marginal likelihood as a generating functions for deriving marginal distributions. In section 4 we use this result to derive the linear response approximation to the two-variable marginals and derive an explict solution of these equations in section 5. In section 6 we discuss why LR in the cases where the variational method gives a reasonable solution will give an even better result. In section 7, we give the three applications and in section we conclude and discuss how to combine the mean field approximation (variational, Bethe,...) with linear response to give more precise mean field approaches. After finishing this paper we have become aware of the work of Welling and Teh [12, 13] which also contains the result eq. (8) and furthermore extend linear response to the Bethe approximation, give several general results for the properties of linear response estimates and derive belief propagation algorithms for computing the linear response estimates. The new contributions of this paper compared to Refs. [12, 13] are the explicit solution of the linear response equations, the discussion of the expected increased quality of linear response estimates, the applications of linear response to concrete examples especially in relation to variational Bayes and the discussion of linear response and mean field methods beyond variational. 2 Generating Marginal Distributions In this section it is shown how exact marginal distributions can be obtained from functional derivatives of a generating function (the log partition function). In the derivation of the variational linear response approximation to the two-variable marginal distribution pij(si, sj|y), we can use result by replacing the exact marginal distribution with the variational approximation. To get marginal distributions we introduce a generating function Z[a] = Z ds p(s, y)e P i ai(si) (1) which is a functional of the arbitrary functions ai(si) and a is shorthand for the vector of functions a = (a1(s1), a2(s2), . . . , aN(sN)). We can now obtain the marginal distribution p(si|y, a) by taking the functional derivative1 with respect to ai(si): δ δai(si) ln Z[a] = eai(si) Z[a] Z Y k̸=i n dˆskeak(ˆsk)o p(ˆs, y) = pi(si|y, a) . (2) 1The functional derivative is defined by δaj(sj) δai(si) = δijδ(si −sj) and the chain rule. Setting a = 0 above gives the promised result. The next step is to take the second derivative. This will give us a function that are closely related to the two-variable marginal distribution. A careful derivation gives Bij(si, s′ j) ≡ δ2 ln Z[a] δaj(s′ j)δai(si) a=0 = δpi(si|y, a) δaj(s′ j) a=0 (3) = δijδ(si −s′ j)pi(si|y) + (1 −δij)pij(si, s′ j|y) −pi(si|y)pj(s′ j|y) Performing an average of sm i (s′ j)n over Bij(si, s′ j), it is easy to see that Bij(si, s′ j) gives the ’mean-subtracted’ marginal distributions. In the two next sections, variational approximations to the single variable and two-variable marginals are derived. 3 Variational Learning In many models of interest, e.g. mixture models, exact inference scales exponentially with the size of the system. It is therefore of interest to come up with polynomial approximations. A prominent method is the variational, where a simpler factorized distribution q(s) = Q i qi(si) is used instead of the posterior distribution. Approximations to the marginal distributions pi(si|y) and pij(si, sj|y) are now simply qi(si) and qi(si)qj(sj). The purpose of this paper is to show that it is possible within the variational framework to go beyond the factorized distribution for two-variable marginals. For this purpose we need the distribution q(s) which minimizes the KL-divergence or ‘distance’ between q(s) and p(s|y): KL(q(s)||p(s|y)) = Z ds q(s) ln q(s) p(s|y) . (4) The variational approximation to the Likelihood is obtained from −ln Zv[a] = Z ds q(s) ln q(s) p(s, y)e P k ak(ˆsk) = −ln Z[a] + KL(q(s)||p(s|y, a)) , where a has been introduced to be able use qi(si|a) as a generating function. Introducing Lagrange multipliers {λi} as enforce normalization and minimizing KL + P i λi( R dsiqi(si) −1) with respect to qi(si) and λi, one finds qi(si|a) = eai(si)+ R Q k̸=i{dskqk(sk|a)} ln p(s,y) R dˆsieai(ˆsi)+ R Q k̸=i{dˆskqk(ˆsk|a)} ln p(ˆs,y) . (5) Note that qi(si|a) depends upon all a through the implicit dependence in the qks appearing on the right hand side. Writing the posterior in terms of ‘interaction potentials’, i.e. as a factor graph p(s, y) = Y i ψi(si) Y i>j ψi,j(si, sj) . . . , (6) it is easy to see that potentials that do not depend upon si will drop out of variational distribution. A similar property will be used below to simplify the variational two-variable marginals. 4 Variational Linear Response Eq. (3) shows that we can obtain the two-variable marginal as the derivative of the marginal distribution. To get the variational linear response approximation we exchange the exact marginal with the variational approximation eq. (5) in eq. (3). In section 6 an argument is given for why one can expect the variational approach to work in many cases and why the linear response approximation gives improved estimates of correlations in these cases. Defining the variational ’mean subtracted’ two-variable marginal as Cij(si, s′ j|a) ≡δqi(si|a) δaj(s′ j) , (7) it is now possible to derive an expression corresponding to eq. (3). What makes the derivation a bit cumbersome is that it necessary to take into account the implicit dependence of aj(s′ j) in qk(sk|a) and the result will consequently be expressed as a set of linear integral equations in Cij(si, s′ j|a). These equations can be solved explicitly, see section 5 or can as suggested by Welling and Teh [12, 13] be solved by belief propagation. Taking into account both explicit and implicit a dependence we get the variational linear response theorem: Cij(si, s′ j|a) = δij  δ(si −s′ j)qi(si|a) −qi(si|a)qj(s′ j|a) (8) +qi(si|a) X l̸=i Z Y k̸=i dsk Y k̸=i,l qk(sk|a)Clj(sl, s′ j|a) ×  ln p(s, y) − Z dsiqi(si|a) ln p(s, y)  . The first term represents the normal variational correlation estimate and the second term is linear response correction which expresses the coupling between the two-variable marginals. Using the factorization of the posterior eq. (6), it is easily seen that potentials that do not depend on both si and sl will drop out in the last term. This property will make the calculations for the most variational Bayes models quite simple since this means that one only has to sum over variables that are directly connected in the graphical model. 5 Explicit Solution The integral equation can be simplified by introducing the symmetric kernel Kij(s, s′) = (1 −δij) ⟨ln p(s, y)⟩\(i,j) −⟨ln p(s, y)⟩\j −⟨ln p(s, y)⟩\i + ⟨ln p(s, y)⟩  , where the brackets ⟨. . .⟩\(i,j) = ⟨. . .⟩q\(i,j) denote expectations over q for all variables, except for si and sj and similarly for ⟨. . .⟩\i. One can easily show that R ds qi(s) Kij(s, s′) = 0. Writing C in the form Cij(s, s′) = qi(s)qj(s′)  δij δ(s −s′) qj(s′) −1  + Rij(s, s′)  , (9) we obtain an integral equation for the function R Rij(s, s′) = X l Z d˜s ql(˜s)Kil(s, ˜s)Rlj(˜s, s′) + Kij(s, s′) . (10) This result can most easily be obtained by plugging the definition eq. (9) into eq. (8) and using that R ds qi(s) Rij(s, s′) = 0. For many applications, kernels can be written in the form of sums of pairwise multiplicative ‘interactions’, i.e. Kij(s, s′) = X αα′ Jαα′ ij φα i (s)φα′ j (s′) (11) with ⟨φα i ⟩q = 0 for all i and α then the solution will be on the form Rij(s, s′) = P αα′ Aαα′ ij φα i (s)φα′ j (s′). The integral equation reduces to a system of linear equations for the coefficients Aαα′ ij . We now discuss the simplest case where Kij(s, s′) = Jijφi(s)φj(s′). This is obtained if the model has only pairwise interactions of the quadratic form ψij(s, s′) = eJijΦi(s)Φj(s′), where φi(s) = Φi(s) −⟨Φi⟩q. Using Rij(s, s′) = Aijφi(s)φj(s′) and augmenting the matrix of Jij’s with the diagonal elements Jii ≡− 1 ⟨φ2 i ⟩q yield the solution Aij = −JiiJjj D(Jii) −J−1 ij , (12) where D(Jii) is a diagonal matrix with entries Jii. Using (9), this result immediately leads to the expression for the correlations ⟨φiφj⟩= ⟨ΦiΦj⟩−⟨Φi⟩⟨Φj⟩= −(J−1)ij . (13) 6 Why Linear Response Works It may seem paradoxical that an approximation which is based on uncorrelated variables allows us to obtain a nontrivial result for the neglected correlations. To shed more light on this phenomenon, we would like to see how the true partition function, which serves as a generating function for expectations, differs from the mean field one when the approximating mean field distribution q are close. We will introduce into the generating function eq. (1) the parameter ϵ: Zϵ[a] = Z ds q(s)eϵ(P i ai(si)+ln p(s|y)−ln q(s)) (14) which serves as a bookkeepingdevice for collecting relevant terms, when ln p(s|y)−ln q(s) is assumed to be small. At the end we will set ϵ = 1 since Z[a] = Zϵ=1[a]. Then expanding the partition function to first order in ϵ, we get ln Zϵ[a] = ϵ X i ⟨ai(si)⟩q + ⟨ln p(s|y) −ln q(s)⟩q ! + O(ϵ2) (15) = ϵ X i ⟨ai(si)⟩q −KL(q||p) ! + O(ϵ2) . Keeping only the linear term, setting ϵ = 1 and inserting the minimizing mean field distribution for q yields pi(s|y, a) = δ ln Z δai(s) = qi(s|a) + O(ϵ2) . (16) Hence the computation of the correlations via Bij(s, s′) = δ2 ln Z δai(s)δaj(s′) = δpi(s|a) δaj(s′) = δqi(s|a) δaj(s′) + O(ϵ2) = Cij(s, s′) + O(ϵ2) (17) can be assumed to incorporate correctly effects of linear order in ln p(s|a) −ln q(s). On the other hand, one should expect p(si, sj|y) −qi(si)qj(sj) to be order ϵ. Although the above does not prove that diagonal correlations are estimated more precisely from Cii(s, s′) than from qi(s)–only that both are correct to linear order in ϵ—one often observes this in practice, see below. 7 Applications 7.1 Quadratic Interactions The quadratic interaction model—ln ψij(si, sj) = siJijsj and arbitrary ψ(si), i.e. ln p(s, y) = P i ln ψi(si) + 1 2 P i̸=j siJijsj + constant—is used in many contexts, e.g. the Boltzmann machine, independent component analysis and the Gaussian process prior. For this model we can immediately apply the result eq. (13) to get ⟨sisj⟩−⟨si⟩⟨sj⟩= −(J−1)ij (18) where we have set Jii = −1/(⟨s2 i ⟩q −⟨si⟩2 q). We can apply this to the Gaussian model ln ψi(si) = hisi + Ais2 i /2, The variational distribution is Gaussian with variance −1/Ai (and covariance zero). Hence, we can set Jii = Ai. The mean is −[J−1h]i. The exact marginals have mean −[J−1h]i and covariance −[J−1]ij. The difference can be quite dramatic, e.g. in two dimensions for J =  1 ϵ ϵ 1  , we get J−1 = 1 1−ϵ2  1 −ϵ −ϵ 1  . The variance estimates are 1/Jii = 1 for variational and [J−1]ii = 1/(1 −ϵ2) for the exact case. The latter diverges for completely correlated variable, ϵ →1 illustrating that the variational covariance estimate breaks down when the interaction between the variables are strong. A very important remark should be made at this point: although the covariance eq. (18) comes out correctly, the LR method does not reproduce the exact two variable marginals, i.e. the distribution eq. (9) plus the sum of the product of the one variable marginals is not a Gaussian distribution. 7.2 Mean and Variance of 1D Gaussian A one dimensional Gaussian observation model p(y|µ, β) = p β/2π exp(−β(x−µ)2/2), β = 1/σ2 with a Gaussian prior over the mean and a Gamma prior over β [7] serves as another example of where linear response—as opposed to variational—gives exact covariance estimates. The N example likelihood can be rewritten as p(y|µ, β) =  β 2π  N 2 exp  −β 2 N ˆσ2 −β 2 N(µ −y)2  , (19) where y and ˆσ2 = P i(yi −y)2/N are the empirical mean and variance. We immediately recognize −β 2 N(µ −y)2 as the interaction term. Choosing non-informative priors—p(µ) flat and p(β) ∝1/β—the variational distribution qµ(µ) becomes Gaussian with mean y and variance 1/N⟨β⟩q and qβ(β) becomes a Gamma distribution Γ(β|b, c) ∝βc−1e−β/b, with parameters cq = N/2 and 1/bq = N 2 (ˆσ2 + ⟨(µ −y)2⟩q). The mean and variance of Gamma distribution are given by bc and b2c. Solving with respect to ⟨(µ −y)2⟩q and ⟨β⟩q give 1/bq = N ˆσ2 2 N N−1. Exact inference gives cexact = (N −1)/2 and 1/bexact = N ˆσ2 2 [7]. A comparison shows that the mean bc is the same in both cases whereas variational underestimates the variance b2c. This is a quite generic property of the variational approach. The LR correction to the covariance is easily derived from (13) setting J12 = −N/2 and φ1(β) = β −⟨β⟩q and φ2(µ) = (µ −y)2 −⟨(µ −y)2⟩q. This yields J11 = −1/⟨φ2 1(β)⟩= −1/bq⟨β⟩q. Using ⟨(µ −y)2⟩q = 1/N⟨β⟩q and ⟨(µ −y)4⟩q = 3⟨(µ −y)2⟩2 q, we have J22 = −1/⟨φ2 2(µ)⟩= −N 2⟨β⟩2 q/2. Inverting the 2 × 2 matrix J, we immediately get ⟨φ2 1⟩= Var(β) = −(J−1)11 = bq⟨β⟩q/(1 −bq/2⟨β⟩q) Inserting the result for ⟨β⟩q, we find that this is in fact the correct result. 7.3 Variational Bayes Mixture of Multinomials As a final example, we take a mixture model of practical interest and show that linear response corrections straightforwardly can be calculated. Here we consider the problem of modeling histogram data ynj consisting of N histograms each with D bins: n = 1, . . . , N and j = 1, . . . , D. We can model this with a mixture of multinomials (Lars Kai Hansen 2003, in preparation): p(yn|πππ,ρρρ) = K X k=1 πk D Y j=1 ρynj kj , (20) where πk is the probability of the kth mixture and ρkj is the probability of observing the jth histogram given we are in the kth component, i.e. P k πk = 1 and P j ρkj = 1. Eventually in the variational Bayes treatment we will introduce Dirichlet priors for the variables. But the general linear response expression is independent of this. To rewrite the model such that it is suitable for a variational treatment—i.e. in a product form—we introduce hidden (Potts) variables xn = {xnk}, xnk = {0, 1} and P k xnk = 1 and write the joint probability of observed and hidden variables as: p(yn, xn|πππ,ρρρ) = K Y k=1  πk D Y j=1 ρynj kj   xnk . (21) Summing over all possible xn vectors, we recover the original observation model. We can now identify the interaction terms in P n ln p(yn, xn,πππ,ρρρ) as xnk ln πk and ynjxnk ln ρkj. Generalizing eq. (8) to sets of variables, we can compute the following correlations C(πππ,πππ′), C(πππ,ρρρ′) and C(ρρρk,ρρρ′ k′). To get the explicit solution we need to write the coupling matrix for the problem and add diagonal terms and invert. Normally, the complexity will be order cubed in the number of parameters. However, it turns out that the two variable marginal distributions involving the hidden variables—the number of which scales with the number of examples—can be eliminated analytically. The computation of correlation are thus only cubic in the number of parameters, K + K ∗D, making computation of correlations attractive even for mixture models. The symmetric coupling matrix for this problem can be written as J = Jxx Jxπππ Jxρρρ Jπππx Jππππππ Jπρρρ Jρρρx Jρπππ Jρρρρ ! with Jρρρx =    Jρρρ1x1 · · · Jρρρ1xN ... ... JρρρKx1 · · · JρρρKxN   , (22) where for simplicity the log on π and ρ are omitted and (Jρρρkxn)jk = ynj. The other nonzero sub-matrix is: Jπππx = [Jπππx1 · · · JπππxN] with (Jπππxn)kk′ = δk,k′. To get the covariance V we introduce diagonal elements into J (which are all tractable in ⟨. . .⟩= ⟨. . .⟩q): −(J−1 xnxn)kk′ = ⟨xnkxnk′⟩−⟨xnk⟩⟨xnk′⟩= δkk′⟨xnk⟩−⟨xnk⟩⟨xnk′⟩ (23) −(J−1 ππππππ)kk′ = ⟨ln πk ln πk′⟩−⟨ln πk⟩⟨ln πk′⟩ (24) −(J−1 ρρρkρρρk)jj′ = ⟨ln ρkj ln ρkj′⟩−⟨ln ρkj⟩⟨ln ρkj′⟩ (25) and invert: V = −J−1. Using inversion by partitioning and the Woodbury formula we find the following simple formula Vππππππ =  ˆJππππππ −Jππππππ −ˆJπππρρρ  ˆJρρρρρρ −Jρρρρρρ −1 ˆJρρρπππ −1 , (26) where we have introduced the ‘indirect’ couplings ˆJππππππ = JπππxJ−1 xxJxπππ and ˆJπππρρρ = JπππxJ−1 xxJxρρρ. Similar formulas can be obtained for Vπππρρρ and Vρρρρρρ. 8 Conclusion and Outlook In this paper we have shown that it is possible to extend linear response to completely general variational distributions and solve the linear response equations explicitly. We have given three applications that show 1. that linear response provides approximations of increased quality for two-variable marginals and 2. linear response is practical for variational Bayes models. Together this suggests that building linear response into variational Bayes software such as VIBES [5, 6] would be useful. Welling and Teh [12, 13] have, as mentioned in the introduction, shown how to apply the general linear response methods to the Bethe approximation. However, the usefulness of linear response even goes beyond this: if we can come up with a better tractable approximation to the marginal distribution q(si) with some free parameters, we can tune these parameters by requiring consistency between q(si) and the linear response estimate of the diagonal of the two-variable marginals eq. (8): Cii(si, s′ i) = δ(si −s′ i)q(si) −q(si)q(s′ i) . (27) This design principle can be generalized to models that give non-trivial estimates of twovariable marginals such as Bethe. It might not be possible to match the entire distribution for a tractable choice of q(si). In that case it is possibly to only require consistency for some statistics. The adaptive TAP approach [11]—so far only studied for quadratic interactions— can be viewed in this way. Generalizing this idea to general potentials, general mean field approximations, deriving the corresponding marginal likelihoods and deriving guaranteed convergent algorithms for the approximations are under current investigation. References [1] M. Opper and D. Saad, Advanced Mean Field Methods: Theory and Practice, MIT Press, 2001. [2] H. Attias, “A variational Bayesian framework for graphical models,” in Advances in Neural Information Processing Systems 12, T. Leen et al., Ed. 2000, MIT Press, Cambridge. [3] J. W. Miskin and D. J. C. MacKay, “Ensemble learning for blind image separation and deconvolution,” in Advances in Independent Component Analysis, M Girolami, Ed. 2000, SpringerVerlag Scientific Publishers. [4] Z. Ghahramani and M. J. Beal, “Propagation algorithms for variational Bayesian learning,” in Advances in Neural Information Processing Systems 13. 2001, pp. 507–513, MIT Press, Cambridge. [5] C. M. Bishop, D. Spiegelhalter, and J. Winn, “VIBES: A variational inference engine for Bayesian networks,” in Advances in Neural Information Processing Systems 15, 2002. [6] C. M. Bishop and J. Winn, “Structured variational distributions in VIBES,” in Artificial Intelligence and Statistics, Key West, Florida, 2003. [7] D. J. C. MacKay, Information Theory, Inference, and Learning Algorithms, Cambridge University Press, 2003. [8] G. Parisi, Statistical Field Theory, Addison-Wesley, 1988. [9] H.J. Kappen and F.B. Rodr´ıguez, “Efficient learning in Boltzmann machines using ’ linear response theory,” Neural Computation, vol. 10, pp. 1137–1156, 1998. [10] P. A.d.F.R. Hojen-Sorensen, O. Winther, and L. K. Hansen, “Mean field approaches to independent component analysis,” Neural Computation, vol. 14, pp. 889–918, 2002. [11] M. Opper and O. Winther, “Adaptive and self-averaging Thouless-Anderson-Palmer mean field theory for probabilistic modeling,” Physical Review E, vol. 64, pp. 056131, 2001. [12] M. Welling and Y. W. Teh, “Linear response algorithms for approximate inference,” Artificial Intelligence Journal, 2003. [13] M. Welling and Y. W. Teh, “Propagation rules for linear response estimates of joint pairwise probabilities,” preprint, 2003.
2003
134
2,348
Circuit Optimization Predicts Dynamic Networks for Chemosensory Orientation in the Nematode Caenorhabditis elegans Nathan A. Dunn John S. Conery Dept. of Computer Science University of Oregon Eugene, OR 97403 {ndunn,conery}@cs.uoregon.edu Shawn R. Lockery Institute of Neuroscience University of Oregon Eugene, OR 97403 shawn@lox.uoregon.edu ∗ Abstract The connectivity of the nervous system of the nematode Caenorhabditis elegans has been described completely, but the analysis of the neuronal basis of behavior in this system is just beginning. Here, we used an optimization algorithm to search for patterns of connectivity sufficient to compute the sensorimotor transformation underlying C. elegans chemotaxis, a simple form of spatial orientation behavior in which turning probability is modulated by the rate of change of chemical concentration. Optimization produced differentiator networks with inhibitory feedback among all neurons. Further analysis showed that feedback regulates the latency between sensory input and behavior. Common patterns of connectivity between the model and biological networks suggest new functions for previously identified connections in the C. elegans nervous system. 1 Introduction The complete description of the morphology and synaptic connectivity of all 302 neurons in the nematode Caenorhabditis elegans [15] raised the prospect of the first comprehensive understanding of the neuronal basis of an animal’s entire behavioral repertoire. The advent of new electrophysiological and functional imaging techniques for C. elegans neurons [7, 8] has made this project more realistic than before. Further progress would be accelerated, however, by prior knowledge of the sensorimotor transformations underlying the behaviors of C. elegans, together with knowledge of how these transformations could be implemented with C. elegans-like neuronal elements. In previous work, we and others have identified the main features of the sensorimotor transformation underlying C. elegans chemotaxis [5, 11], one of two forms of spatial orientation identified in this species. Locomotion consists of periods of sinusoidal forward movement, called “runs,” which are punctuated by bouts of turning [12] that have been termed “pirouettes” [11]. Pirouette probability is modulated by the rate of change of chemical concentration (dC(t)/dt). When dC(t)/dt < 0, pirouette probability is increased whereas when ∗To whom correspondence should be addressed. dC(t)/dt > 0, pirouette probability is decreased. Thus, runs down the gradient are truncated and runs up the gradient are extended, resulting in net movement toward the gradient peak. The process of identifying the neurons that compute this sensorimotor transformation is just beginning. The chemosensory neurons responsible for the input representation are known[1], as are the premotor interneurons for turning behavior[2]. Much less is known about the interneurons that link inputs to outputs. To gain insight into how this transformation might be computed at the interneuronal level, we used an unbiased parameter optimization algorithm to construct model neural networks capable of computing the transformation using C. elegans-like neurons. We found that networks with one or two interneurons were sufficient. A common but unexpected feature of all networks was inhibitory feedback among all neurons. We propose that the main function of this feedback is to regulate the latency between sensory input and behavior. 2 Assumptions We used simulated annealing to search for patterns of connectivity sufficient for computing the chemotaxis sensorimotor transformation. The algorithm was constrained by three main assumptions: 1. Primary chemosensory neurons in C. elegans report attractant concentration at a single point in space. 2. Chemosensory interneurons converge on a network of locomotory command neurons to regulate turning probability. 3. The sensorimotor transformation in C. elegans is computed mainly at the network level, not at the cellular level. Assumption (1) follows from the anatomy and distribution of chemosensory organs in C. elegans[1, 13, 14]. Assumption (2) follows from anatomical reconstructions of the C. elegans nervous system [15], together with the fact that laser ablation studies have identified four pairs of pre-motor interneurons that are necessary for turning in C. elegans[2]. Assumption (3) is heuristic. 3 Network Neurons were modeled by the equation: τi dAi(t) dt = −Ai(t) + σ(Ii), with Ii = X j (wjiAj(t)) + bi (1) where Ai is activation level of neuron i in the network, σ(Ii) is the logistic function 1/(1 + e−Ii), wji is the synaptic strength from neuron j to neuron i, and bi is static bias. The time constant τi determines how rapidly the activation approaches its steadystate value for constant Ii. Equation 1 embodies the additional assumption that, on the time scale of chemotaxis behavior, C. elegans neurons are effectively passive, isopotential nodes that release neurotransmitter in graded fashion. This assumption follows from preliminary electrophysiological recordings from neurons and muscles in C. elegans and Ascaris, another species of nematode[3, 4, 6]. The model of the chemosensory network had one input neuron, eight interneurons, and one output neuron (Figure 1). The input neuron (i = 0) was a lumped representation of all F(t ) C(t) (0) sensory neuron (1) interneuron (2) interneuron (8) interneuron (9) output neuron Figure 1: Model chemosensory network. Model neurons were passive, isopoential nodes. The network contained one sensory neuron, one output neuron, and eight interneurons. Input to the sensory neuron was the time course of chemoattractant concentration C(t). The activation of the output neuron was mapped to turning probability by the function F(t) given in Equation 2. The network was fully connected with selfconnections (not shown). the chemosensory neurons in the real animal. Sensory input to the network was C(t), the time course of attractant concentration experienced by a real worm in an actual chemotaxis assay[11]. C(t) was added to the net input of the sensory neuron (i = 0). The interneurons in the model (1 ≤i ≤8) represented all the chemosensory interneurons in the real animal. The activity level of the output neuron (i = 9) determined the behavioral state of the model, i.e. turning probability[11], according to the piecewise function: F(t) = ( Phigh A9(t) ≤T1 Prest T1 < A9(t) < T2 Plow A9(t) ≥T2 (2) where T1 and T2 are arbitrary thresholds and the three P values represent the indicated levels of turning probability. 4 Optimization The chemosensory network model was optimized to compute an idealized version of the true sensorimotor transformation linking C(t) to turning probability[11]. To construct the idealized transformation, we mapped the instantaneous derivative of C(t) to desired turning probability G(t) as follows: G(t) = ( Phigh dC(t)/dt ≤−U Prest −U < dC(t)/dt < +U Plow dC(t)/dt ≥+U (3) where U is a threshold derived from previous behavioral observations (Figure 7 in [11]). The goal of the optimization was to make the network’s turning probability F(t) equal to the desired turning probability G(t) at all t. Optimization was carried out by annealing three parameter types: weights, time constants, and biases. Optimized networks were fully connected and self-connections were allowed. The result of a typical optimization run is illustrated in Figure 2(a), which shows good agreement between network and desired turning probabilities. Results similar to Figure 2(a) were found for 369 networks out of 401 runs (92%). We noted that in most networks, many interneurons had a constant offset but showed little or no response to changes in sensory input. We found that we could eliminate these interneurons by a pruning procedure in which the tonic effect of the offset was absorbed into the bias term of postsynaptic neurons. Pruning had little or no effect on network performance (Figure 2(b)), suggesting that the eliminated neurons were nonfunctional. By this procedure, 67% of the networks could be reduced to one interneuron and 27% could be reduced to two interneurons. A key question is whether the network generalizes to a C(t) time course that it has not seen before. Generalization was tested by challenging pruned networks with the C(t) time course from a second real chemotaxis assay. There was good agreement between network and desired turning probability, indicating an acceptable level of generalization (Figure 2(c)). 800 600 400 200 0 G(t) F(t) (a) 800 600 400 200 0 time (seconds) G(t) F(t) (c) 800 600 400 200 0 G(t) F(t) (b) Figure 2: Network performance after optimization. In each panel, the upper trace represents G(t), the desired turning probability in response to a particular C(t) time course (not shown), whereas the lower trace represents F(t), the resulting network turning probability. Shading signifies turning probability (black = Phigh, grey = Prest, white = Plow). (a) Performance of a typical network after optimization. (b) Performance of the same network after pruning. (c) Performance of the pruned network when stimulated by a different C(t) time course. Network turning probability is delayed relative to desired turning probability because of the time required for sensory input to affect behavioral state. 5 Results Here we focus on the largest class of networks, those with a single interneuron (Figure 3(a)). All single-interneuron networks had three common features (Figure 3(b)). First, the direct pathway from sensory neuron to output neuron was excitatory, whereas the indirect pathway via the interneuron was inhibitory. Such a circuit computes an approximate derivative of its input by subtracting a delayed version of the input from its present value[9]. Second, all neurons had significant inhibitory self-connections. We noted that inhibitory self-connections were strongest on the input and output neurons, the two neurons comprising the direct pathway representing current sensory input. We hypothesized that the function of inhibitory self-connections was to decrease response latency in the direct pathway. Such a decrease would be a means of compensating for the fact that G(t) was an instantaneous function of C(t), whereas the neuronal time constant τi tends to introduce a delay between C(t) and the network’s output. Third, the net effect of all disynaptic recurrent connections was also inhibitory. By analogy to inhibitory self-connections, we hypothesized that the function of the recurrent pathways was also to regulate response latency. To test the hypothetical functions of the self-connections and recurrent connections, we introduced an explicit time delay (∆t) between dC(t)/dt and the desired turning probability G(t) such that: G′(t) = G(t −∆t) (4) G′(t) was then substituted for G(t) during optimization. We then repeated the optimization procedure with a range of ∆t values and looked for systematic effects on connectivity. Input Neuron Output Neuron Interneuron C(t) F(t) Excitatory Inhibitory (a) Feature + + slow hypothesis: regulation of response latency differentiation self-connection direct excitatory delayed inhibitory inhibitory recurrent connection (b) Figure Function Figure 3: Connectivity and common features of single-interneuron networks. (a) Average sign and strength of connections. Line thickness is proportional to connection strength. In other single-interneuron networks, the sign of the connections to and from the interneuron were reversed (not shown). (b) The three common features of single-interneuron networks. Effects on self-connections. We found that the magnitude of self-connections on the input and output neurons was inversely related to ∆t (Figure 4(a)). This result suggests that the function of these self-connections is to regulate response latency, as hypothesized. We noted that the interneuron self-connection remains comparatively small regardless of ∆t. This result is consistent with the function of the disynaptic pathway, which is to present a delayed version of the input to the output neuron. -250 -200 -150 -100 -50 5 4 3 2 1 0 input - interneuron input - output interneuron - output  t, Target Delay for G(t) (seconds) Product of Recurrent Weights input - interneuron interneuron - output input - output Self-connection Weight  t, Target Delay for G(t) (seconds) -20 -15 -10 -5 5 4 3 2 1 0 input neuron interneuron output neuron  t (seconds) input - interneuron interneuron - output input neuron output neuron interneuron (a) -250 -200 -150 -100 -50 5 4 3 2 1 0 input - interneuron input - output interneuron - output  t (seconds) Product of Recurrent Weights input - interneuron interneuron - output input - output (b) Figure 4: The effect on connectivity of introducing time delays between input and output during optimization. (a) The effect on self-connections. (b) The effect on recurrent connections. Recurrent connection strength was quantified by taking the product of the weights along each of the three recurrent loops in Figure 3(a). Effects on recurrent connections. We quantified the strength of the recurrent connections by taking the product of the two weights along each of the three recurrent loops in the network. We found that the strengths of the two recurrent loops that included the interneuron was inversely related to ∆t (Figure 4(b)). This result suggests that the function of these loops is to regulate response latency and supports the hypothetical function of the recurrent connections. Interestingly, however, the strength of the recurrent loop between input and output neurons was not affected by changes in ∆t. Comparing the overall patterns of changes in weights produced by changes in ∆t showed that the optimization algorithm utilized self-connections to adjust delays along the direct pathway and recurrent connections to adjust delays along the indirect pathway. The reason for this pattern is presently unclear. 6 Analysis To provide a theoretical explanation for the effects of time delays on the magnitude of selfconnections, we analyzed the step response of Equation 1 for a reduced system containing a single linear neuron with a self-connection: τi dAi(t) dt = wiiAi(t) −Ai(t) + h(t) (5) where h(t) represents a generic external input (sensory or synaptic). Solving Equation 5 for h(t) equal to a step of amplitude M at t = 0 with A(0) = 0 gives: Ai(t) =  M 1 −wii   1 −exp  − 1 −wii τi t  (6) From Equation 6, when wii = 0 (no self-connection) the neuron relaxes at the rate 1/τi, whereas when wii < 0 (inhibitory self-connection) the neuron relaxes at the higher rate of (1 + |wii|)/τi. Thus, response latency drops as the strength of the inhibitory self connection increases and, conversely, response latency rises as connection strength decreases. This result explains the effect on self-connection strength of introducing a delay between between dC(t)/dt and turning probability (Figure 4(a)). We made a similar analysis of the effects of time delays on the recurrent connections. Here, however, we studied a reduced system of two linear neurons with reciprocal synapses and an external input to one of the neurons. τi dAi(t) dt = wjiAj(t) −Ai(t) + h(t) and τj dAj(t) dt = wijAi(t) −Aj(t) (7) We solved this system for the case where the external input h(t) = M sin(Ωt). The solution has the form: Ai(t) = Di sin(Ωt −φi) and Aj(t) = Dj sin(Ωt −φj) (8) with φi = φj = arctan  2Ωτ 1 −wijwji −Ω2τ 2  (9) Equation (9) gives the phase delay between the sinusoidal external input and the sinusoidal response of the two neuron system. In Figure 5, the relationship between phase delay and the strength of the recurrent connections is plotted with the connection strength on the ordinate as in Figure 4(b). The graph shows an inverse relationship between connection strength and phase delay that approximates the inverse relationship between connection strength and time delay shown in Figure 4(b). The correspondence between the trends in Figure 4(b) and 5 explain the effects on recurrent connection strength of introducing a delay between between dC(t)/dt and turning probability. 80x10 -3 60 40 20 Phase Delay (radians) -250 -200 -150 -100 -50 Recurrent Product f = 0.00375 Hz f = 0.01875 Hz f = 0.05 Hz Ω1 Ω2 Ω3 -250 -200 -150 -100 -50 Recurrent Product 80x10 -3 60 40 20 Recurrent Product Phase Delay (radians) Ω1 Ω2 Ω3 Figure 5: The relationship between phase delay and recurrent connection strength. Equation 9 is plotted for three different driving frequencies, (Hz ×10−3): Ω1 = 50, Ω2 = 18.75, and Ω3 = 3.75. These frequencies span the frequencies observed in a Fourier analysis of the C(t) time course used during optimization. There is an inverse relationship between connection strength and phase delay. Axis have been reversed for comparison with Figure 4(b). AIB AVA AFD ASE AIA RIB RIM SAAD DVC FLP RIA AWC AVB RIF interneurons chemosensory neurons command neurons AIY Figure 6: The network of chemosensory interneurons in the real animal. Shown are the interneurons interposed between the chemosensory neuron ASE and the two locomotory command neurons AVA and AVB. The diagram is restricted to interneuron pathways with less than three synapses. Arrows are chemical synapses. Dashed lines are gap junctions. Connectivity is inferred from the anatomical reconstructions of reference [15]. 7 Discussion We used simulated annealing to search for networks capable of computing an idealized version of the chemotaxis sensorimotor transformation in C. elegans. We found that one class of such networks is the three neuron differentiator with inhibitory feedback. The appearance of differentiator networks was not surprising [9] because the networks were optimized to report, in essence, the sign of dC(t)/dt (Equation 3). The prevalence of inhibitory feedback, however, was unexpected. Inhibitory feedback was found at two levels: self-connections and recurrent connections. Combining an empirical and theoretical approach, we have argued that inhibitory feedback at both levels functions to regulate the response latency of the system’s output relative to its input. Such regulation could be functionally significant in the C. elegans nervous system, where neurons may have an unusually high input resistance due to their small size. High input resistance could lead to long relaxation times because the membrane time constant is proportional to input resistance. The types of inhibitory feedback identified here could also be used to mitigate this effect. There are intriguing parallels between our three-neuron network models and the biological network. Figure 6 shows the network of interneurons interposed between the chemosensory neuron class ASE, the main chemosensory neurons for salt chemotaxis, and the locomotory command neurons classes AVB and AVA. The interneurons in Figure 6 are candidates for computing the sensorimotor transformation for chemotaxis C. elegans. Three parallels are prominent. First, there are two candidate differentiator circuits, as noted previously[16]. These circuits are formed by the neuronal triplets ASE-AIA-AIB and ASE-AWC-AIB. Second, there are self-connections on three neuron classes in the circuit, including AWC, one of the differentiator neurons. These self-connections represent anatomically identified connections between left and right members of the respective classes. It remains to be seen, however, whether these connections are inhibitory in the biological network. Selfconnections could also be implemented at the cellular level by voltage dependent currents. A voltage-dependent potassium current, for example, can be functionally equivalent to an inhibitory self-connection. Electrophysiological recordings from ASE and other neurons in C. elegans confirm the presence of such currents[6, 10]. Thus, it is conceivable that many neurons in the biological network have the cellular equivalent of self-connections. Third, there are reciprocal connections between ASE and three of its four postsynaptic targets. These connections could provide recurrent inhibition if they have the appropriate signs. Common patterns of connectivity between the model and biological networks suggest new functionality for identified connections in the C. elegans nervous system. It should be possible to test these functions through physiological recordings and neuronal ablations. Acknowledgements We are grateful Don Pate for his technical assistance. Supported by NSF IBN-0080068. References [1] C. I. Bargmann and H. R. Horvitz. Chemosensory neurons with overlapping functions direct chemotaxis to multiple chemicals in C. elegans. Neuron, 7:729–742, 1991. [2] M. Chalfie, J.E. Sulston, J.G. White, E. Southgate, J.N. Thomson, and S. Brenner. The neural circuit for touch sensitivity in C. elegans. J. of Neurosci., 5:956–964, 1985. [3] R. E. Davis and A. O. Stretton. Passive membrane properties of motorneurons and their role in long-distance signaling in the nematode Ascaris. J. of Neurosci., 9:403–414, 1989. [4] R. E. Davis and A. O. W. Stretton. Signaling properties of Ascaris motorneurons: graded active response, graded synaptic transmission, and tonic transmitter release. J. of Neurosci., 9:415– 425, 1989. [5] D.B. Dusenbery. Responses of the nematode C. elegans to controlled chemical stimulation. J. of Comparative Physiology, 136:127–331, 1980. [6] M.B. Goodman, D.H. Hall, L. Avery, and S.R. Lockery. Active currents regulate sensitivity and dynamic range in C. elegans neurons. Neuron, 20:763–772, 1998. [7] R. Kerr, V. Lev-Ram, G. Baird, P. Vincent, R. Y. Tsien, and W. R. Schafer. Optical imaging of calcium transients in neurons and pharyngeal muscle of C. elegans. Neuron, 26(3):583–94, 2000. [8] S. R. Lockery and M. B. Goodman. Tight-seal whole-cell patch clamping of C. elegans neurons. Methods Enzymol, 293:201–17, 1998. [9] E.E. Munro, L.E. Shupe, and E.E Fetz. Integration and differentiation in dynamical recurrent neural networks. Neural Computation, 6:405–419, 1994. [10] W.T. Nickell, R.Y. Pun, C.I. Bargmann, and S.J. Kleene. Single ionic channels of two C. elegans chemosensory neurons in native membrane. J. of Membrane Biology, 189(1):55–66, 2002. [11] J. T. Pierce-Shimomura, T. M. Morse, and S. R. Lockery. The fundamental role of pirouettes in C. elegans chemotaxis. J. of Neurosci., 19(21):9557–69, 1999. [12] T.A. Rutherford and N.A. Croll. Wave forms of C. elegans in a chemical attractant and repellent and in thermal gradients. J. of Nematology, 11:232–240, 1979. [13] S. Ward. Chemotaxis by the nematode C. elegans: identification of attractants and analysis of the response by use of mutants. Proc of the Natl Acad Sci USA, 70:817–821, 1973. [14] S. Ward, N. Thomson, J. G. White, and S. Brenner. Electron microscopical reconstruction of the anterior sensory anatomy of the nematode C. elegans. J. of Comparative Neurology, 160:313–338, 1975. [15] J. G White, E. Southgate, J. N. Thomson, and S. Brenner. The structure of the nervous system of the nematode C. elegans. Phil Trans of the R Soc Lond [Biol], 314:1–340, 1986. [16] J.G. White. Neuronal connectivity in C. elegans. Trends in Neuroscience, 8:277–283, 1985.
2003
135
2,349
Learning to Find Pre-Images G¨okhan H. Bakır, Jason Weston and Bernhard Sch¨olkopf Max Planck Institute for Biological Cybernetics Spemannstraße 38, 72076 T¨ubingen, Germany {gb,weston,bs}@tuebingen.mpg.de Abstract We consider the problem of reconstructing patterns from a feature map. Learning algorithms using kernels to operate in a reproducing kernel Hilbert space (RKHS) express their solutions in terms of input points mapped into the RKHS. We introduce a technique based on kernel principal component analysis and regression to reconstruct corresponding patterns in the input space (aka pre-images) and review its performance in several applications requiring the construction of pre-images. The introduced technique avoids difficult and/or unstable numerical optimization, is easy to implement and, unlike previous methods, permits the computation of pre-images in discrete input spaces. 1 Introduction We denote by Hk the RKHS associated with the kernel k(x, y) = φ(x)⊤φ(y), where φ(x) : X →Hk is a possible nonlinear mapping from input space X (assumed to be a nonempty set) to the possible infinite dimensional space Hk. The pre-image problem is defined as follows: given a point Ψ in Hk, find a corresponding pattern x ∈X such that Ψ = φ(x). Since Hk is usually a far larger space than X, this is often not possible (see Fig. ??). In these cases, the (approximate) pre-image z is chosen such that the squared distance of Ψ and φ(z) is minimized, z = arg min z ∥Ψ −φ(z)∥2. (1) This has a significant range of applications in kernel methods: for reduced set methods [1], for denoising and compression using kernel principal components analysis (kPCA), and for kernel dependency estimation (KDE), where one finds a mapping between paired sets of objects. The techniques used so far to solve this nonlinear optimization problem often employ gradient descent [1] or nonlinear iteration methods [2]. Unfortunately, this suffers from (i) being a difficult nonlinear optimization problem with local minima requiring restarts and other numerical issues, (ii) being computationally inefficient, given that the problem is solved individually for each testing example, (iii) not being the optimal approach (e.g., we may be interested in minimizing a classification error rather then a distance in feature space); and (iv) not being applicable for pre-images which are objects with discrete variables. In this paper we propose a method which can resolve all four difficulties: the simple idea is to estimate the function (1) by learning the map Ψ →z from examples (φ(z), z). Depending on the learning technique used this can mean, after training, each use of the function (each pre-image found) can be computed very efficiently, and there are no longer issues with complex optimization code. Note that this problem is unusual in that it is possible to produce an infinite amount of training data ( and thus expect to get good performance) by generating points in Hk and labeling them using (1). However, often we have knowledge about the distribution over the pre-images, e.g., when denoising digits with kPCA, one expects as a pre-image something that looks like a digit, and an estimate of this distribution is actually given by the original data. Taking this distribution into account, it is conceivable that a learning method could outperform the naive method, that of equation (1), by producing pre-images that are subjectively preferable to the minimizers of (1). Finally, learning to find pre-images can also be applied to objects with discrete variables, such as for string outputs as in part-of-speech tagging or protein secondary structure prediction. The remainder of the paper is organized as follows: in Section 2 we review kernel methods requiring the use of pre-images: kPCA and KDE. Then, in Section 3 we describe our approach for learning pre-images. In Section 4 we verify our method experimentally in the above applications, and in Section 5 we conclude with a discussion. 2 Methods Requiring Pre-Images 2.1 Kernel PCA Denoising and Compression Given data points {xi}m i=1 ∈X, kPCA constructs an orthogonal set of feature extractors in the RKHS. The constructed orthogonal system P = {v1, . . . , vr} lies in the span of the data points, i.e., P = ¡Pm i=1 α1 i φ(xi), . . . , Pm i=1 αr i φ(xi) ¢ . It is obtained by solving the eigenvalue problem mλαi = Kαi for 1 ≤i ≤r where Kij = k(xi, xj) is the kernel matrix and r ≤m is the number of nonzero eigenvalues.1 Once built, the orthogonal system P can be used for nonlinear feature extraction. Let x denote a test point, then the nonlinear principal components can be extracted via Pφ(x) = ¡Pm i=1α1 i k(xi, x), . . . , Pm i=1 αr i k(xi, x) ¢ where k(xi, x) is substituted for φ(xi)⊤φ(x). See ([3],[4] chapter 14) for details. Beside serving as a feature extractor, kPCA has been proposed as a denoising and compression procedure, both of which require the calculation of input patterns x from feature space points Pφ(x). Denoising. Denoising is a technique used to reconstruct patterns corrupted by noise. Given data points {xi}m i=1 and the orthogonal system P = (v1, . . . , va, . . . , vr) obtained by kPCA. Assume that the orthogonal system is sorted by decreasing variance, we write φ(x) = Pφ(x) = Paφ(x) + P ⊥ a φ(x), where Pa denotes the projection on the span of (v1, . . . , va). The hope is that Paφ(x) retains the main structure of x, while P ⊥ a φ(x) contains noise. If this is the case, then we should be able to construct a denoised input pattern as the pre-image of Paφ(x). This denoised pattern z can be obtained as solution to the problem z = arg min z ∥Paφ(x) −φ(z)∥2. (2) For an application of kPCA denoising see [2]. Compression. Consider a sender receiver-scenario, where the sender S wants to transmit information to the receiver R. If S and R have the same projection matrix P serving as a vocabulary, then S could use Pa to encode x and send Paφ(x) ∈Ra instead of x ∈Rn. This corresponds to a lossy compression, and is useful if a ≪n. R would obtain the 1We assume that the φ(xi) are centered in feature space. This can be achieved by centering the kernel matrix Kc = (I − 1 m11⊤)K(I − 1 m11⊤), where 1 ∈Rm is the vector with every entry equal 1. Test patterns must be centered with the same center obtained from the training stage. corresponding pattern x by minimizing (2) again. Therefore kPCA would serve as encoder and the pre-image technique as decoder. 2.2 Kernel Dependency Estimation Kernel Dependency Estimation (KDE) is a novel algorithm [5] which is able to learn general mappings between an input set X and output set Y, give definitions of kernels k and l (with feature maps Φk and Φl) which serve as similarity measures on X and Y, respectively. To learn the mapping from data {xi, yi}m i=1 ∈X × Y, KDE performs two steps. 1) Decomposition of outputs. First a kPCA is performed in Hl associated with kernel l. This results in r principal axes v1, . . . , vr in Hl. Obtaining the principal axes, one is able to obtain principal components (φl(y)⊤v1, . . . , φl(y)⊤vr) of any object y. 2) Learning the map. Next, we learn the map from φk(x) to (φl(y)⊤v1, . . . , φl(y)⊤vr). To this end, for each principal axis vj we solve the problem arg min βj Xm i=1(φl(yi)⊤vj −g(xi, βj))2 + γ∥βj∥2, (3) where γ∥βj∥2 acts as a regularization term (with γ > 0), g(xi, βj) = Pm s=1 βj sk(xs, xi), and β ∈Rm×r. Let P ∈Rm×r with Pij = φl(yi)⊤vj, j = 1 . . . r and K ∈Rm×m the kernel matrix with entries Kst = k(xs, xt), with s, t = 1 . . . m. Problem (3) can then be minimized, for example via kernel ridge regression, yielding β = (K⊤K + γI)−1KP. (4) 3) Testing Phase. Using the learned map from input patterns to principal components, predicting an output y′ for a new pattern x′ requires solving the pre-image problem y′ = arg min y ∥(φl(y)⊤v1, . . . , φl(y)⊤vr) −(k(x1, x′), . . . , k(xm, x′))β∥2. (5) Thus y′ is the approximate pre-image of the estimated point φ(y′) in Hl. 3 Learning Pre-Images We shall now argue that by mainly being concerned with (1), the methods that have been used for this task in the past disregard an important piece of information. Let us summarize the state of the art (for details, see [4]). Exact pre-images. One can show that if an exact pre-image exists, and if the kernel can be written as k(x, x′) = fk((x⊤x′)) with an invertible function fk (e.g., k(x, x′) = (x⊤x′)d with odd d), then one can compute the pre-image analytically as z = PN i=1 f −1 k ³Pm j=1 αjk(xj, ei) ´ ei, where {e1, . . . , eN} is any orthonormal basis of input space. However, if one tries to apply this method in practice, it usually works less well than the approximate pre-image methods described below. This is due to the fact that it usually is not the case that exact pre-images exist. General approximation methods. These methods are based on the minimization of (1). Whilst there are certain cases where the minimizer of (1) can be found by solving an eigenvalue problem (for k(x, x′) = (x⊤x′)2), people in general resort to methods of nonlinear optimization. For instance, if the kernel is differentiable, one can multiply out (1) to express it in terms of the kernel, and then perform gradient descent [1]. The drawback of these methods is that the optimization procedure is expensive and will in general only find a local optimum. Alternatively one can select the k best input points from some training set and use them in combination to minimize the distance (1), see [6] for details. Iteration schemes for particular kernels. For particular types of kernels, such as radial basis functions, one can devise fixed point iteration schemes which allow faster minimization of (1). Again, there is no guarantee that this leads to a global optimum. One aspect shared by all these methods is that they do not explicitly make use of the fact that we have labeled examples of the unknown pre-image map: specifically, if we consider any point in x ∈X, we know that the pre-image of Φ(x) is simply x.2 Below, we describe a method which makes heavy use of this information. Specifically, we use kernel regression to estimate the pre-image map from data. As a data set, we consider the training data {xi}m i=1 that we are given in our original learning problem (kPCA, KDE, etc.). 3.1 Estimation of the Pre-Image Map We seek to estimate a function Γ : Hk →X with the property that, at least approximately, Γ(Φ(xi)) = xi for i = 1, . . . , m. If we were to use regression using the kernel k corresponding to Hk, then we would simply look for weight vectors wj ∈Hk, j = 1, . . . , dim X such that Γj(Ψ) = w⊤ j Ψ, and use the kernel trick to evaluate Γ. However, in general we may want to use a kernel κ which is different from k, and thus we cannot perform our computations implicitly by the use of a kernel. This looks like a problem, but there is a way to handle it. It is based on the well-known observation that although the data in Hk may live in an infinite-dimensional space, any finite data set spans a subspace of finite dimension. A convenient way of working in that subspace is to choose a basis and to work in coordinates, e.g., using a kPCA basis. Let PnΨ = Pn i=1(Ψ⊤vi)vi denote the projection that maps a point into its coordinates in the PCA basis v1, . . . , vn, i.e., into the subspace where the training set has nonzero variance. We then learn the pre-image map Γj : Rn →X by solving the learning problem Γj = arg min Γj Xm i=1 l (xi, Γ(Pnφ(xi))) + λΩ(Γ). (6) Here, Ωis a regularizer, and λ ≥0. If X is the vector space RN, we can consider the problem (6) as a standard regression problem for the m training points xi and use kernel ridge regression with a kernel κ. This yields a pre-image mapping Γj(Pnφ(x)) = Pm r=1 βj rκ(Pnφ(x), Pnφ(xr)), j = 1, . . . , N, which can be solved like (3). Note that the general learning setup of (6) allows to use of any suitable loss function, incorporating invariances and a-priori knowledge. For example, if the pre-images are (natural) images, a psychophysically motivated loss function could be used, which would allow the algorithm to ignore differences that cannot be perceived. 3.2 Pre-Images for Complex Objects In methods such as KDE one is interested in finding pre-images for general sets of objects, e.g. one may wish to find a string which is the pre-image of a representation using a string kernel [7, 8]. Using gradient descent techniques this is not possible as the objects have discrete variables (elements of the string). However, using function estimation techniques, as long as it is possible to learn to find pre-images even for such objects, the problem can be approached by decomposition into several learning subtasks. This should be possible whenever there is structure in the object one is trying to predict. In the case of strings one can predict each character of the string independently given the estimate φl(y′). This is made particularly tractable in fixed-length string prediction problems such as for part-ofspeech tagging or protein secondary structure prediction because the length is known (it is the same length as the input). Otherwise the task is more difficult but still one could also 2It may not be the only pre-image, but this does not matter as long as it minimizes the value of (1). predict the length of the output string before predicting each element of it. As an example, we now describe in depth a method for finding pre-images for known-length strings. The task is to predict a string y given a string x and a set of paired examples (xi, yi) ∈ ∪∞ p=1(Σx)p × ∪∞ p=1(Σy)p. Note that |xi| = |yi| for all i, i.e., the length of any paired input and output strings are the same. This is the setting of part-of-speech tagging, where Σx are words and Σy are parts of speech, and also secondary structure prediction, where Σx are amino acids of a protein sequence and Σy are classes of structure that the sequence folds into, e.g. helix, sheet or coil. It is possible to use KDE (Section 2.2) to solve this task directly. One has to define an appropriate similarity function for both sets of objects using a kernel function, giving two implicit maps φk(x) and φl(y) using string kernels. KDE then learns a map between the two feature spaces, and for a new test string x one must find the pre-image of the estimate φl(y′) as in equation (5). One can find this pre-image by predicting each character of the string independently given the estimate φl(y′) as it has known length given the input x. One can thus learn a function bp = f(φl(y′), αp) where bp is the pth element of the output and αp = (a(p−n/2)a(p−n/2+1) . . . a(p+n/2)) is a window of length n + 1 with center at position p in the input string. One computes the entire output string with β = (f(φl(y′), α1) . . . f(φl(y′), α|x|)); window elements outside of the string can be encoded with a special terminal character. The function f can be trained with any multi-class classification algorithm to predict one of the elements of the alphabet, the approach can thus be seen as a generalization of the traditional approach which is learning a function f given only a window on the input (the second parameter). Our approach first estimates the output using global information from the input and with respect to the loss function of interest on the outputs—it only decodes this global prediction in the final step. Note that problems such as secondary structure prediction often have loss functions dependent on the complete outputs, not individual elements of the output string [9]. 4 Experiments In the following we demonstrate the pre-image learning technique on the applications we have introduced. Gaussian noise PCA kPCA+grad.desc. kPCA+learn-pre. Figure 1: Denoising USPS digits: linear PCA fails on this task, learning to find pre-images for kPCA performs at least as well as finding pre-images by gradient descent. KPCA Denoising. We performed a similar experiment to the one in [2] for demonstration purposes: we denoised USPS digits using linear and kPCA. We added Gaussian noise with variance 0.5 and selected 100 randomly chosen non-noisy digits for training and a further 100 noisy digits for testing, 10 from each class. As in [2] we chose a nonlinear map via a Gaussian kernel with σ = 8. We selected 80 principal components for kPCA. We found pre-images using the Matlab function fminsearch, and compared this to our preimage-learning method (RBF kernel K(x, x′) = exp(−||x −x′||2/2σ2) with σ = 1, and regularization parameter λ = 1). Figure 1 shows the results: our approach appears to perform better than the gradient descent approach. As in [2], linear PCA visually fails for this problem: we show its best results, using 32 components. Note the mean squared error performance of the algorithms is not precisely in accordance with the loss of interest to the user. This can be seen as PCA has an MSE (13.8±0.4) versus gradient descent (31.6±1.7) and learnt pre-images (29.2±1.8). PCA has the lowest MSE but as can be seen in Figure 1 it doesn’t give satisfactorys visual results in terms of denoising. Note that some of the digits shown are actually denoised incorrectly as the wrong class. This is of course possible as choosing the correct digit is a problem which is harder than a standard digit classification problem because the images are noisy. Moreover, kPCA is not a classifier per se and could not be expected to classify digits as well as Support Vector Machines. In this experiment, we also took a rather small number of training examples, because otherwise the fminsearch code for the gradient descent was very slow, and this allowed us to compare our results more easily. KPCA Compression. For the compression experiment we use a video sequence consisting of 1000 graylevel images, where every frame has a 100 × 100 pixel resolution. The video sequence shows a famous science fiction figure turning his head 180 degrees. For training we used every 20th frame resulting in a video sequence of 50 frames with 3.6 degree orientation difference per image. The motivation is to store only these 50 frames and to reconstruct all frames in between. We applied a kPCA to all 50 frames with a Gaussian kernel with kernel parameter σ1. The 50 feature vectors v1, . . . , v50 ∈R50 are used then to learn the interpolation between the timeline of the 50 principal components vij where i is the time index, j the principal component number j and 1 ≤i, j ≤50. A kernel ridge regression with Gaussian kernel and kernel parameter σ2 and ridge r1 was used for this task. Finally the pre-image map Γ was learned from projections onto vi to frames using kernel ridge regression with kernel parameter σ3 and ridge r2. All parameters σ1, σ2, σ3, r1, r2 were selected in a loop such that new synthesized frames looked subjectively best. This led to the values σ1 = 2.5, σ2 = 1, σ3 = 0.15 and for the ridge parameters r1 = 10−13, r2 = 10−7. Figure 2 shows the original and reconstructed video sequence. Note that the pre-image mechanism could possibly be adapted to take into account invariances and a-priori knowledge like geometries of standard heads to reduce blending effects, making it more powerful than gradient descent or plain linear interpolation of frames. For an application of classical pre-image methods to face modelling, see [10]. String Prediction with Kernel Dependency Estimation. In the following we expose a simple string mapping problem to show the potential of the approach outlined in Section 3.2. We construct an artificial problem with |Σx| = 3 and |Σy| = 2. Output strings are generated by the following algorithm: start in a random state (1 or 2) corresponding to one of the output symbols. The next symbol is either the same or, with probability 1 5, the state switches (this tends to make neighboring characters the same symbol). The length of the string is randomly chosen between 10 and 20 symbols. Each input string is generated with equal probability from one of two models, starting randomly in state a, b or c and using the following transition matrices, depending on the current output state: Model 1 Model 2 Output 1 Output 2 Output 1 Output 2 a b c a 0 0 1 b 0 0 1 c 1 0 0 a b c a 1/2 1/2 0 b 1/2 1/2 0 c 0 1 0 a b c a 1/2 1/2 0 b 1/2 1/2 0 c 0 1/2 1/2 a b c a 1 0 0 b 0 1 0 c 0 1 0 Subsequence of original video sequence. Subsequence of synthesized video sequence. First and last frame are used in training set. Figure 2: Kernel PCA compression used to learn intermediate images. The pre-images are in a 100 × 100 dimensional space making gradient-descent based descent impracticable. As the model of the string can be better predicted from the complete string, a global method could be better in principle than a window-based method. We use a string kernel called the spectrum kernel[11] to define strings for inputs. This method builds a representation which is a frequency count of all possible contiguous subsequences of length p. This produces a mapping with features φk(x) = ⟨P|x|−p+1 i=1 [(xi, . . . , x(i+p−1)) = α] : α ∈(Σx)p⟩where [x = y] is 1 if x = y, and 0 otherwise. To define a feature space for outputs we count the number of contiguous subsequences of length p on the input that, if starting in position q, have the same element of the alphabet at position q + (p −1)/2 in the output, for odd values of p. That is, φl(x, y) = ⟨P|x|−p+1 i=1 [(xi, . . . , x(i+p−1)) = α][yi+(p−1)/2 = b] : α ∈(Σx)p, b ∈Σy⟩. We can then learn pre-images using a window also of size p as described in Section 3.2, e.g. using k-NN as the learner. Note that the output kernel is defined on both the inputs and outputs: such an approach is also used in [12] and called “joint kernels”, and in their approach the calculation of pre-images is also required, so they only consider specific kernels for computational reasons. In fact, our approach could also be a benefit if used in their algorithm. We normalized the input and output kernel matrices such that a matrix S is normalized with S ←D−1SD−1 where D is a diagonal matrix such that Dii = P i Sii. We also used a nonlinear map for KDE, via an RBF kernel, i.e. K(x, x′) = exp(−d(x, x′)) where the distance d is induced by the input string kernel defined above, and we set λ = 1. We give the results on this toy problem using the classification error (fraction of symbols misclassified) in the table below, with 50 strings using 10-fold cross validation, we compare to k-nearest neighbor using a window size of 3, in our method we used p = 3 to generate string kernels, and k-NN to learn the pre-image, therefore we quote different k for both methods. Results for larger window sizes only made the results worse. 1-NN 3-NN 5-NN 7-NN 9-NN KDE 0.182±0.03 0.169±0.03 0.162±0.03 0.164±0.03 0.163±0.03 k-NN 0.251±0.03 0.243±0.03 0.249±0.03 0.250±0.03 0.248±0.03 5 Conclusion We introduced a method to learn the pre-image of a vector in an RKHS. Compared to classical approaches, the new method has the advantage that it is not numerically unstable, it is much faster to evaluate, and better suited for high-dimensional input spaces. It is demonstrated that it is applicable when the input space is discrete and gradients do not exist. However, as a learning approach, it requires that the patterns used during training reasonably well represent the points for which we subsequently want to compute pre-images. Otherwise, it can fail, an example being a reduced set (see [1]) application, where one needs pre-images of linear combinations of mapped points in H, which can be far away from training points, making generalization of the estimated pre-image map impossible. Indeed, preliminary experiments (not described in this paper) showed that whilst the method can be used to compute reduced sets, it seems inferior to classical methods in that domain. Finally, the learning of the pre-image can probably be augmented with mechanisms for incorporating a-priori knowledge to enhance performance of pre-image learning, making it more flexible than just a pure optimization approach. Future research directions include the inference of pre-images in structures like graphs and incorporating a-priori knowledge in the pre-image learning stage. Acknowledgement. The authors would like to thank Kwang In Kim for fruitful discussions, and the anonymous reviewers for their comments. References [1] C. J. C. Burges. Simplified support vector decision rules. In L. Saitta, editor, Proceedings of the 13th International Conference on Machine Learning, pages 71–77, San Mateo, CA, 1996. Morgan Kaufmann. [2] S. Mika, B. Sch¨olkopf, A. J. Smola, K.-R. M¨uller, M. Scholz, and G. R¨atsch. 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 11, pages 536–542, Cambridge, MA, 1999. MIT Press. [3] B. Sch¨olkopf, A. J. Smola, and K.-R. M¨uller. Nonlinear component analysis as a kernel eigenvalue problem. Neural Computation, 10:1299–1319, 1998. [4] B. Sch¨olkopf and A. J. Smola. Learning with Kernels. MIT Press, Cambridge, MA, 2002. [5] Jason Weston, Olivier Chapelle, Andre Elisseeff, Bernhard Sch¨olkopf, and Vladimir Vapnik. Kernel dependency estimation. In S. Becker, S. Thrun, and K. Obermayer, editors, Advances in Neural Information Processing Systems 15, Cambridge, MA, 2002. MIT Press. [6] J.T. Kwok and I.W. Tsang. Finding the pre images in kernel principal component analysis. In NIPS’2002 Workshop on Kernel Machines, 2002. [7] D. Haussler. Convolutional kernels on discrete structures. Technical Report UCSC-CRL-99-10, Computer Science Department, University of California at Santa Cruz, 1999. [8] H. Lodhi, J. Shawe-Taylor, N. Cristianini, and C. Watkins. Text classification using string kernels. Technical Report 2000-79, NeuroCOLT, 2000. Published in: T. K. Leen, T. G. Dietterich and V. Tresp (eds.), Advances in Neural Information Processing Systems 13, MIT Press, 2001, as well as in JMLR 2:419-444, 2002. [9] S. Hua and Z. Sun. A novel method of protein secondary structure prediction with high segment overlap measure: Svm approach. Journal of Molecular Biology, 308:397–407, 2001. [10] S. Romdhani, S. Gong, and A. Psarrou. A multiview nonlinear active shape model using kernel PCA. In Proceedings of BMVC, pages 483–492, Nottingham, UK, 1999. [11] C. Leslie, E. Eskin, and W. S. Noble. The spectrum kernel: A string kernel for SVM protein classification. Proceedings of the Pacific Symposium on Biocomputing, 2002. [12] Y. Altun, I. Tsochantaridis, and T. Hofmann. Hidden markov support vector machines. In 20th International Conference on Machine Learning (ICML), 2003.
2003
136
2,350
Sparse Representation and Its Applications in Blind Source Separation Yuanqing Li, Andrzej Cichocki, Shun-ichi Amari, Sergei Shishkin RIKEN Brain Science Institute, Saitama, 3510198, Japan Jianting Cao Department of Electronic Engineering Saitama Institute of Technology Saitama, 3510198, Japan Fanji Gu Department of Physiology and Biophysics Fudan University Shanghai, China Abstract In this paper, sparse representation (factorization) of a data matrix is first discussed. An overcomplete basis matrix is estimated by using the K−means method. We have proved that for the estimated overcomplete basis matrix, the sparse solution (coefficient matrix) with minimum l1−norm is unique with probability of one, which can be obtained using a linear programming algorithm. The comparisons of the l1−norm solution and the l0−norm solution are also presented, which can be used in recoverability analysis of blind source separation (BSS). Next, we apply the sparse matrix factorization approach to BSS in the overcomplete case. Generally, if the sources are not sufficiently sparse, we perform blind separation in the time-frequency domain after preprocessing the observed data using the wavelet packets transformation. Third, an EEG experimental data analysis example is presented to illustrate the usefulness of the proposed approach and demonstrate its performance. Two almost independent components obtained by the sparse representation method are selected for phase synchronization analysis, and their periods of significant phase synchronization are found which are related to tasks. Finally, concluding remarks review the approach and state areas that require further study. 1 Introduction Sparse representation or sparse coding of signals has received a great deal of attention in recent years. For instance, sparse representation of signals using large-scale linear programming under given overcomplete bases (e.g., wavelets) was discussed in [1]. Also, in [2], a sparse image coding approach using the wavelet pyramid architecture was presented. Sparse representation can be used in blind source separation [3][4]. In [3], a two stage approach was proposed, that is, the first is to estimate the mixing matrix by using a clustering algorithm, the second is to estimate the source matrix. In our opinion, there are still three fundamental problems related to sparse representation of signals and BSS which need to be further studied: 1) detailed recoverability analysis; 2) high dimensionality of the observed data; 3) overcomplete case in which the sources number is unknown. The present paper first considers sparse representation (factorization) of a data matrix based on the following model X = BS, (1) where the X = [x(1), · · · , x(N)] ∈Rn×N (N ≫1) is a known data matrix, B = [b1 · · · bm] is a n × m basis matrix, S = [s1, · · · , sN] = [sij]m×N is a coefficient matrix, also called a solution corresponding to the basis matrix B. Generally, m > n, which implies that the basis is overcomplete. The discussion of this paper is under the following assumptions on (1). Assumption 1: 1. The number of basis vectors m is assumed to be fixed in advance and satisfies the condition n ≤m < N. 2. All basis vectors are normalized to be unit vectors with their 2−norms being equal to 1 and all n basis vectors are linearly independent. The rest of this paper is organized as follows. Section 2 analyzes the sparse representation of a data matrix. Section 3 presents the comparison of the l0 norm solution and l1 norm solution. Section 4 discusses blind source separation via sparse representation. An EEG data analysis example is given in Section 5. Concluding remarks in Section 6 summarize the advantages of the proposed approach. 2 Sparse representation of data matrix In this section, we discuss sparse representation of the data matrix X using the two-stage approach proposed in [3]. At first, we apply an algorithm based on K−means clustering method for finding a suboptimal basis matrix that is composed of the cluster centers of the normalized, known data vectors as in [3]. With this kind of cluster center basis matrix, the corresponding coefficient matrix estimated by linear programming algorithm presented in this section can become very sparse. Algorithm outline 1: Step 1. Normalize the data vectors. Step 2. Begin a K−means clustering iteration followed by normalization to estimate the suboptimal basis matrix. End Now we discuss the estimation of the coefficient matrix. For a given basis matrix B in (1), the coefficient matrix can be found by solving the following optimization problem as in many existing references (e.g., [3, 5]), min m X i=1 N X j=1 |sij|, subject to BS = X. (2) It is not difficult to prove that the linear programming problem (2) is equivalent to the following set of N smaller scale linear programming problems: min m X i=1 |sij|, subject to Bsj = x(j), j = 1, · · · , N. (3) By setting S = U −V, where U = [uij]m×N ≥0, V = [vij]m×N ≥0, (3) can be converted to the following standard linear programming problems with non-negative constraints, min m X i=1 (uij + vij), subject to [B, −B][uT j , vT j ]T = x(j), uj ≥0, vj ≥0, (4) where j = 1, · · · , N. Theorem 1 For almost all bases B ∈Rn×m, the sparse solution (l1−norm solution) of (1) is unique. That is, the set of bases B, under which the sparse solution of (1) is not unique, is of measure zero. And there are at most n nonzero entries of the solution. It follows from Theorem 1 that for any given basis, there exists a unique sparse solution of (2) with probability of one. 3 Comparison of the l0 norm solution and l1 norm solution Usually, l0 norm J0(S) = nP i=1 N P j=1 |sij|0 (the number of nonzero entries of S) is used as a sparsity measure of S, since it ensures the sparsest solution. Under this measure, the sparse solution is obtained by solving the problem min m X i=1 N X j=1 |sij|0, subject to BS = X. (5) In [5], is discussed optimally sparse representation in general (non-orthogonal) dictionaries via l1−norm minimization, and two sufficient conditions are proposed on the nonzero entry number of the l0−norm solution, under which the equivalence between l0−norm solution and l1−norm solution holds precisely. However, these bounds are very small in real world situations generally, if the basis vectors are far away from orthogonality. For instance, the bound is smaller than 1.5 in the simulation experiments shown in the next section. This implies that the l0−norm solution allows only one nonzero entry in order that the equivalence holds. In the next, we will also discuss the equivalence of the l0 norm solution and l1 norm solution but from the viewpoint of probability. First, we introduce the two optimization problems: (P0) min m P i=1 |si|0, subject to As = x, (P1) min m P i=1 |si|, subject to As = x. where A ∈Rn×m, x ∈Rn are a known basis matrix and a data vector, respectively, and s ∈Rm, n ≤m. Suppose that s0∗is a solution of (P0), and s1∗is a solution of (P1). Theorem 2 The solution of (P0) is not robust to additive noise of the model, while the solution of (P1) is robust to additive noise, at least to some degree. Although the problem (P0) provides the sparsest solution, it is not an efficient way to find the solution by solving the problem (P0). The reasons are: 1) if ||s0∗||0 = n, then the solution of (P0) is not unique generally; 2) until now, an effective algorithm to solve the optimization problem (P0) does not exist (it has been proved that problem (P0) is NP hard); 3) the solution of (P0) is not robust to noise. In contrast, the solution of (P1) is unique with a probability of one according to Theorem 1. It is well known that there are many efficient optimization tools to solve the problem (P1). From the above mentioned facts arises naturally a problem: what is the condition under which the solution of (P1) is one of the sparsest solutions, that is, the solution has the same number of nonzero entries as the solution of (P0)? In the following, we will discuss the problem. Lemma 1 Suppose that x ∈Rn and A ∈Rn×m are selected randomly. If x is represented by a linear combination of k column vectors of A, then k ≥n generally, that is, the probability that k < n is zero. Theorem 3 For the optimization problems (P0) and (P1), suppose that A ∈Rn×m is selected randomly, x ∈Rn is generated by As∗, l = ||s∗||0 < n, and that all nonzero entries of s∗are also selected randomly. We have 1. s∗is the unique solution of (P0) with probability of one, that is, s0∗= s∗. And if ||s1∗||0 < n, then s1∗= s∗with probability of one. 2. The probability P(s1∗= s∗) ≥(P(1, l, n, m))l, where P(1, l, n, m) (1 ≤l ≤n) are n probabilities satisfying 1 = P(1, 1, n, m) ≥P(1, 2, n, m) ≥· · · ≥P(1, n, n, m) (their explanations are omitted here due to limit of space). 3. For given positive integers l0 and n0, if l ≤l0, and m −n ≤n0, then lim n→+∞P(s1∗= s∗) = 1. Remarks 1: 1. From Theorem 3, if n and m are fixed, and l is sufficiently small, then s1∗= s∗with a high probability. 2. For fixed l and m −n, if n is sufficiently large, then s1∗=s∗with a high probability. Theorem 3 will be used in recoverability analysis of BSS. 4 Blind source separation based on sparse representation In this section, we discuss blind source separation based on sparse representation of mixture signals. The proposed approach is also suitable for the case in which the number of sensors is less than or equal to the number of sources, while the number of source is unknown. We consider the following noise-free model, xi = Asi, i = 1, · · · , N, (6) where the mixing matrix A ∈Rn×m is unknown, the matrix S = [s1, · · · , sN] ∈ Rm×N is composed by the m unknown sources, and the only observed data matrix X = [x1, · · · , xN] ∈Rn×N that has rows containing mixtures of sources, n ≤m. The task of blind source separation is to recover the sources using only the observable data matrix X. We also use a two-step approach presented in [3] for BSS. The first step is to estimate the mixing matrix using clustering Algorithm 1. If the mixing matrix is estimated correctly, and a source vector s∗satisfies that ||s∗||0 = l < n, then by Theorem 3, s∗is the l0norm solution of (6) with probability one. And if the source vector is sufficiently sparse, e.g., l is sufficiently small compared with n, then it can be recovered by solving the linear programming problem (P1) with a high probability. Considering the source number is unknown generally, we denote the estimated mixing matrix ¯A = [ ˜A, △A] ∈Rn×m′ (m′ > m). We introduce the following optimization problem (P ′ 1) and denote its solution ¯s = [˜sT , △sT ]T ∈Rm′, (P ′ 1) min m′ P i=1 |si|, subject to ¯As = x. We can prove the following recoverability result. Theorem 4 Suppose that the sub-matrix ˜A (of the estimated mixing matrix ¯A) is sufficiently close to the true mixing matrix A neglecting scaling and permutation ambiguities, and that a source vector is sufficiently sparse. Then the source vector can be recovered with a high probability (close to one) by solving (P ′ 1). That is, ˜s is sufficiently close to the original source vector, and △s is close to zero vector. To illustrate Theorem 4 partially, we have performed two simulation experiments in which the mixing matrix is supposed to be estimated correctly. Fig. 1 shows the probabilities that a source vector can be recovered correctly in different cases, estimated in the two simulations. In the first simulation, n and m are fixed to be 10 and 15, respectively, l denotes the number of nonzero entries of source vector and changes from 1 to 15. For every fixed nonzero entry number l, the probabilities that the source vector is recovered correctly is estimated through 3000 independent repeated stochastic experiments, in which the mixing matrix A and all nonzero entries of the source vector s0 are selected randomly according to the uniform distribution. Fig. 1 (a) shows the probability curve. We can see that the source can be estimated correctly when l = 1, 2, and the probability is greater than 0.95 when l ≤5. In the second simulation experiment, all original source vectors have 5 nonzero entries, that is, l = 5; and m = 15. The dimension n of the mixture vectors varies from 5 to 15. As in the first simulation, the probabilities for correctly estimated source vectors are estimated through 3000 stochastic experiments and showed in Fig. 1 (b). It is evident that when n ≥10, the source can be estimated correctly with probability higher than 0.95. 0 5 10 15 0 0.2 0.4 0.6 0.8 1 l Probabity 5 10 15 0 0.2 0.4 0.6 0.8 1 n Probability (b) (a) Figure 1: (a) the probability curve that the source vectors are estimated correctly as a function of l obtained in the first simulation; (b) the probability curve that the source vectors are estimated correctly as a function of n obtained in the second simulation. In order to estimate the mixing matrix correctly, the sources should be sufficiently sparse. Thus sparseness of the sources plays an important role not only in estimating the sources but also in estimating the mixing matrix. However, if the sources are not sufficiently sparse in reality, we can have a wavelet packets transformation preprocessing. In the following, a blind separation algorithm based on preprocessing is presented for dense sources. Algorithm outline 2: Step 1. Transform the n time domain signals, (n rows of X, to time-frequency signals by a wavelet packets transformation, and make sure that n wavelet packets trees have the same structure. Step 2. Select these nodes of wavelet packets trees, of which the coefficients are as sparse as possible. The selected nodes of different trees should have the same indices. Based on these coefficient vectors, estimate the mixing matrix ¯A ∈Rn×m′ using the Algorithm 1 presented in Section 2. Step 3. Based on the estimated mixing matrix ¯A and the coefficients of all nodes obtained in step 1, estimate the coefficients of all the nodes of the wavelet packets trees of sources by solving the set of linear programming problems (4). Step 4. Reconstruct sources using the inverse wavelet packets transformation. End We have successfully separated speech sources in a number of simulations in overcomplete case (e.g., 8 sources, 4 sensors) using Algorithm 2. In the next section, we will present an EEG data analysis example. Remark 2: A challenge problem in the algorithm above is to estimate the mixing matrix as precisely as possible. In our many simulations on BSS of speech mixtures, we use 7−level wavelet packets transformation for preprocessing. When K−means clustering method is used for estimating the mixing matrix, the number of clusters (the number of columns of the estimated mixing matrix) should be set to be greater than the source number even if the source number is known. In this way, the estimated matrix will contain a submatrix very close to the original mixing matrix. From Theorem 4, we can estimate the source using the overestimated mixing matrix. 5 An example in EEG data analysis The electroencephalogram (EEG) is a mixture of electrical signals coming from multiple brain sources. This is why application of ICA to EEG recently has become popular, yielding new promising results (e.g., [6]). However, compared with ICA, the sparse representation has two important advantages: 1) sources are not assumed to be mutually independent as in ICA, even be not stationary; 2) source number can be larger than the number of sensors. We believe that sparse representation is a complementary and very prospective approach in the analysis of EEG. Here we present the results of testing the usefulness of sparse representation in the analysis of EEG data based on temporal synchronization between components. The analyzed 14channel EEG was recorded in an experiment based on modified Sternberg memory task. Subjects were asked to memorize numbers successively presented at random positions on the computer monitor. After 2.5 s pause following by a warning signal, a “test number” was presented. If it was the same as one of the numbers in the memorized set, the subject had to press the button. This cycle, including also resting (waiting) period, was repeated 160 times (about 24 min). EEG was sampled at 256 Hz rate. Here we describe, mainly, the analysis results of one subject’s data. EEG was filtered off-line in 1 −70 Hz range, trials with artifacts were rejected by visual inspection, and a data set including 20 trials with correct response, and 20 trials with incorrect response, was selected for analysis (1 trial=2176 points). Thus we obtain a 14×87040 dimensional data matrix, denoted by X. Using the sparse representation algorithm proposed in this paper, we decomposed the EEG signals X into 20 components. Denote the 20×87040 dimensional components matrix S, which contains 20 trials for correct response, and 20 trials for incorrect response, respectively. At first, we calculated the correlation coefficient matrices of X and S, denoted by Rx and Rs, respectively. We found that Rx i,j ∈(0.18, 1] (the median of |Rx i,j| is 0.5151). In the case of components, the correlation coefficients were considerably lower (the median of |Rs i,j| is 0.2597). And there exist many pairs of components with small correlation coefficients, e.g., Rs 2,11 = 0.0471, Rs 8,13 = 0.0023, etc. Furthermore, we found that the higher order correlation coefficients of these pairs are also very small (e.g., the median of absolute value of 4th order correlation is 0.1742). We would like to emphasize that, although the independence principle was not used, many pairs of components were almost independent. According to modern brain theories, dynamics of synchronization of rhythmic activities in distinct neural networks plays a very important role in interactions between them. Thus, phase synchronization in a pair of two almost independent components (si 1, si 14) (Rs1,14 = 0.0085, fourth correlation coefficient 0.0026) was analyzed using method described in [7]. The synchronization index is defined by SI(f, t) = max(SPLV (f, t) −Ssur, 0), where SPLV (f, t) is a single-trial phase locking value at the frequency f and time t, which has been smoothed by a window with a length of 99, and Ssur is the 0.95 percentile of the distribution of 200 surrogates (the 200 pairs of surrogate data are Gaussian distributed). Fig. 2 shows phase synchrony analysis results. The phase synchrony is observed mainly in low frequency band (1 Hz-15 Hz) and demonstrated a tendency for task-related variations.Though only ten trials are presented among the 40 trials due to page space, 32 of 40 trials shows similar characteristics. In Fig. 3 (a), two averaged synchronization index curves are presented, which are obtained by averaging synchronization index SI in the range 1-15 Hz and across 20 trials, separately for correct and incorrect response. Note the time variations of the averaged synchronization index and its higher values for correct responses, especially in the beginning and the end of the trial (preparation and response periods). To test the significance of the time and correctness effects, the synchronization index was averaged again for each 128 time points (0.5 s) for removing artificial correlation between neighboring points and submitted to Friedman nonparametric ANOVA. The test showed significance of time (p=0.013) and correctness (p=0.0017) effects. Thus, the phase synchronization between the two analyzed components was sensitive both to changes in brain activity induced by time-varying task demands and to correctness-related variations in the brain state. The higher synchronization for correct responses could be related to higher integration of brain systems required for effective information processing. This kind of phenomena also has been seen in the same analysis of EEG data from another subject (Fig. 3 (b)). A substantial part of synchronization between raw EEG channels can be explained by volume conduction effects. Large cortical areas may work as stable unified oscillating systems, and this may account for other large part of synchronization in raw EEG. This kind of strong synchronization may make invisible synchronization appearing for brief periods, which is of special interest in brain research. To study temporally appearing synchronization, components related to the activity of more or less unified brain sources should be separated from EEG. Our first results of application of sparse representation to real EEG data support that they can help us to reveal brief periods of synchronization between brain “sources”. 1 1088 2176 1 15 30 Frequency 1 1088 2176 1 30 1 1088 2176 1 30 1 1088 2176 1 30 1 1088 2176 1 30 0.2 0.4 0.6 0.8 1 1 1088 2176 0 0.25 0.5 Averaged SI 1 1088 2176 0 0.5 1 1088 2176 0 0.5 1 1088 2176 0 0.5 1 1088 2176 0 0.5 1 1088 2176 1 15 30 Frequency 1 1088 2176 1 30 1 1088 2176 1 30 1 1088 2176 1 30 1 1088 2176 1 30 0.2 0.4 0.6 0.8 1 1 1088 2176 0 0.25 0.5 k Averaged SI 1 1088 2176 0 0.5 k 1 1088 2176 0 0.5 k 1 1088 2176 0 0.5 k 1 1088 2176 0 0.5 k Figure 2: Time course of EEG synchrony in single trials. 1st row: time-frequency charts for 5 single trials with correct response. Synchronization index values are shown for every frequency and time sample point (f, k). 2nd row: mean synchronization index averaged across frequencies in range 1-15 Hz, for the same trials as in the 1st row. 3d and 4th rows: same for five trials with incorrect response. In each subplot, the first line refers to the beginning of presentation of numbers to be memorized, the second line refers to the end of test number. 6 Concluding remarks Sparse representation of data matrices and its application to blind source separation were analyzed based on a two-step approach presented in [3] in this paper. The l1 norm is used 1 1088 2176 0 0.1 0.2 k Averaged SI 1 1088 2176 0 0.1 0.2 0.3 0.4 k Averaged SI (a) (a) (b) Figure 3: Time course of EEG synchrony, averaged across trials. Left: same subject as in previous figure; right: another subject. The curves show mean values of synchronization index averaged in the range 1-15 Hz and across 20 trials. Black curves are for trials with correct response, red dotted curves refers to trials with incorrect response. Solid vertical lines: as in the previous figure. as a sparsity measure, whereas, the l0 norm sparsity measure is considered for comparison and recoverability analysis of BSS. From equivalence analysis of the l1 norm solution and l0 norm solution presented in this paper, it is evident that if a data vector (observed vector) is generated from a sufficiently sparse source vector, then, with high probability, the l1 norm solution is equal to the l0 norm solution, the former in turn is equal to the source vector, which can be used for recoverability analysis of blind sparse source separation. This kind of construct that employs sparse representation can be used in BSS as in [3], especially in cases in which fewer sensors exist than sources while the source number is unknown, and sources are not completely independent. Lastly, an application example for analysis of phase synchrony in real EEG data supports its validity and performance of the proposed approach. Since the components separated by sparse representation are not constrained by the condition of complete independence, they can be used in the analysis of brain synchrony maybe more effectively than components separated by general ICA algorithms based on independence principle. References [1] Chen, S., Donoho, D.L. & Saunders M. A. (1998) Automic decomposition by basis pursuit.SIAM Journal on Scientific Computing 20(1):33-61. [2] Olshausen, B.A., Sallee, P. & Lewicki, M.S. (2001) Learning sparse image codes using a wavelet pyramid architecture. Advances in Neural Information Processing Systems 13, pp. 887893. Cambridge, MA: MIT Press. [3] Zibulevsky M., Pearlmutter B. A., Boll P., & Kisilev P. (2000) Blind source separation by sparse decomposition in a signal dictionary. In Roberts, S. J. and Everson, R. M. (Eds.), Independent Components Analysis: Principles and Practice, Cambridge University Press. [4] Lee, T.W., Lewicki, M.S., Girolami, M. & Sejnowski, T.J. (1999) Blind source separation of more sources than mixtures using overcomplete representations. IEEE Signal Processing Letter 6(4):87-90. [5] Donoho, D.L. & Elad, M. (2003) Maximal sparsity representation via l1 minimization. the Proc. Nat. Aca. Sci. 100:2197-2202. [6] Makeig, S., Westerfield, M., Jung, T.P., Enghoff, S., Townsend, J., Courchesne, E. & Sejnowski, T.J. (2002) Dynamic brain sources of visual evoked responses. Science 295:690-694. [7] Le Van Quyen, M., Foucher, J., Lachaux, J.P., Rodriguez, E., Lutz, A., Martinerie, J. & Varela, F.J. (2001) Comparison of Hilbert transform and wavelet methods for the analysis of neuronal synchrony. Journal of Neuroscience Methods 111:83-98.
2003
137
2,351
Probabilistic Inference in Human Sensorimotor Processing Konrad P. K¨ording Institute of Neurology UCL London London WC1N 3BG,UK konrad@koerding.com Daniel M. Wolpert  Institute of Neurology UCL London London WC1N 3BG,UK wolpert@ion.ucl.ac.uk Abstract When we learn a new motor skill, we have to contend with both the variability inherent in our sensors and the task. The sensory uncertainty can be reduced by using information about the distribution of previously experienced tasks. Here we impose a distribution on a novel sensorimotor task and manipulate the variability of the sensory feedback. We show that subjects internally represent both the distribution of the task as well as their sensory uncertainty. Moreover, they combine these two sources of information in a way that is qualitatively predicted by optimal Bayesian processing. We further analyze if the subjects can represent multimodal distributions such as mixtures of Gaussians. The results show that the CNS employs probabilistic models during sensorimotor learning even when the priors are multimodal. 1 Introduction Real world motor tasks are inherently uncertain. For example, when we try to play an approaching tennis ball, our vision of the ball does not provide perfect information about its velocity. Due to this sensory uncertainty we can only generate an estimate of the ball’s velocity. This uncertainty can be reduced by taking into account information that is available on a longer time scale: not all velocities are a priori equally probable. For example, very fast and very slow balls may be experienced less often than medium paced balls. Over the course of a match there will be a probability distribution of velocities. Bayesian theory [1-2] tells us that to make an optimal estimate of the velocity of a given ball, this a priori information about the distribution of velocities should be combined with the evidence provided by sensory feedback. This combination process requires prior knowledge, how probable each possible velocity is, and knowledge of the uncertainty inherent in the sensory estimate of velocity. As the degree of uncertainty in the feedback increases, for example when playing in fog or at dusk, an optimal system should increasingly depend on prior knowledge. Here we examine whether subjects represent the probability distribution of a task and if this can be appropriately combined with an estimate of sensory uncerwww.koerding.com www.wolpertlab.com tainty. Moreover, we examine whether subjects can represent priors that have multimodal distributions. 2 Experiment 1: Gaussian Prior To examine whether subjects can represent a prior distribution of a task and integrate it with a measure of their sensory uncertainty we examined performance on a reaching task. The perceived position of the hand is displaced relative to the real position of the hand. This displacement or shift is drawn randomly from an underlying probability distribution and subjects have to estimate this shift to perform well on the task. By examining where subjects reached while manipulating the reliability of their visual feedback we distinguished between several models of sensorimotor learning. 2.1 Methods Ten subjects made reaching movement on a table to a visual target with their right index finger in a virtual reality setup (for details of the set-up see [6]). An Optotrak 3020 measured the position of their finger and a projection/mirror system prevented direct view of their arm and allowed us to generate a cursor representing their finger position which was displayed in the plane of the movement (Figure 1A). As the finger moved from the starting circle, the cursor was extinguished and shifted laterally from the true finger location by an amount   which was drawn each trial from a Gaussian distribution:                     (1) where   and      (Figure 1B). Halfway to the target (10 cm), visual feedback was briefly provided for 100 ms either clearly (  ) or with different degrees of blur (  and  ), or withheld (  ). On each trial one of the 4 types of feedback (       ) was selected randomly, with the relative frequencies of (3, 1, 1, 1) respectively. The ( ) feedback was a small white sphere. The ( ) feedback was 25 small translucent spheres, distributed as a 2 dimensional Gaussian with a standard deviation of 1 cm, giving a cloud type impression. The ( ) feedback was analogous but with a standard deviation of 2 cm. No feedback was provided in the ( ) case. After another 10 cm of movement the trial finished and feedback of the final cursor location was only provided in the ( ) condition. The experiment consisted of 2000 trials for each subject. Subjects were instructed to take into account what they see at the midpoint and get as close to the target as possible and that the cursor is always there even if it is not displayed. 2.2 Results: Trajectories in the Presence of Uncertainty Subjects were trained for 1000 trials on the task to ensure that they experienced many samples   drawn from the underlying distribution   . After this period, when feedback was withheld ( ), subjects pointed 0.97 0.06 cm (mean se across subjects) to the left of the target showing that they had learned the average shift of 1 cm experienced over the trials. Subsequently, we examined the relationship between visual feedback and the location   subjects pointed to. On trials in which feedback was provided, there was compensation during the second half of the movement. Figure 1A shows typical finger and cursor paths for two trials,   and  , in which    . The visual feedback midway through the movement provides information about the lateral shift on the current trial and allows for a correction for the current lateral shift. However, the visual system is not perfect and we expect some uncertainty in the sensed lateral shift  . The distribution of sensed shifts over a large number of trials is expected to have a Gaussian lateral shift xtrue (e.g.2cm) estimated lateral shift xestimate N(1,σp=0.5) cm Evidence sensed lateral shift xsensed [cm] probability p(xtrue) probability p(xsensed|xtrue) σM σ0 Target σL σ 8 probability p(xtrue|xsensed) Probabilistic Model A B C D E Prior Compensation Model Mapping Model Probabilistic Model 1 cm 1 cm Feedback: cursor path finger path (not visible) 0 -1 1 0 -1 1 0 -1 1 lateral deviation <xtrue-xestimate>[cm] lateral shift xtrue [cm] lateral shift xtrue [cm] lateral shift xtrue [cm] lateral shift xtrue [cm] lateral shift xtrue [cm] Figure 1: The experiment and models. A) Subjects are required to place the cursor on the target, thereby compensating for the lateral displacement. The finger paths illustrate typical trajectories at the end of the experiment when the lateral shift was 2 cm (the colors correspond to two of the feedback conditions). B) The experimentally imposed prior distribution of lateral shifts is Gaussian with a mean of 1 cm. C) A schematic of the probability distribution of visually sensed shifts under clear and the two blurred feedback conditions (colors as in panel A) for a trial in which the true lateral shift is 2 cm. D) The estimate of the lateral shift for an optimal observer that combines the prior with the evidence. E) The average lateral deviation from the target as a function of the true lateral shift for the models. Left: the full compensation model. Middle the Bayesian probabilistic model. Right: the mapping model (see text for details). distribution centered on   with a standard deviation    that depends on the acuity of the system.                       (2) As the blur increases we expect    to increase (Figure 1C). 2.3 Computational Models and Predictions There are several computational models which subjects could use to determine the compensation needed to reach the target based on the sensed location of the finger midway through the movement. To analyze the subjects performance we plot the average lateral deviation        in a set of bins of as a function of the true shift  . Because feedback is not biased this term approximates      . Three competing computational models are able to predict such a graph. 1) Compensation model. Subjects could compensate for the sensed lateral shift   and thus use     . The average lateral deviation should thus be         (Figure 1E, left panel). In this model, increasing the uncertainty of the feedback    (by increasing the blur) affects the variability of the pointing but not the average location. Errors arise from variability in the visual feedback and the means squared error (MSE) for this strategy (ignoring motor variability) is    . Crucially this model does not require subjects to estimate their visual uncertainty nor the distribution of shifts. 2) Bayesian model. Subjects could optimally use prior information about the distribution and the uncertainty of the visual feedback to estimate the lateral shift. They have to estimate   given  . Using Bayes rule we can obtain the posterior distribution, that is the probability of a shift   given the evidence  ,                 (3) If subjects choose the most likely shift they also minimize their mean squared error (MSE). We can determine this optimal estimate   by differentiating (3) after inserting (1) and (2). This optimal estimate is a weighted sum between the mean of the prior and the sensed feedback position:                                 (4) The average lateral deviation       is thus linearly dependent to   and the slope increases with increasing uncertainty (Figure 1E middle panel). The MSE depends on two factors, the width of the prior    and the uncertainty in the visual feedback   . Calculating the MSE for the above optimal choice we obtain:                   (5) which is always less than the MSE for model 1. As we increase the blur, and thus the degree of uncertainty, the estimate of the shift moves away from the visually sensed displacement   towards the mean of the prior distribution  (Figure 1D). Such a computational strategy thus allows subjects to minimize the MSE at the target. 3) Mapping model. A third computational strategy is to learn a mapping from the sensed shift   to the optimal lateral shift  . By minimizing the average error over many trials the subjects could achieve a combination similar to model 2 but without any representation of the prior distribution or the visual uncertainty. However, to learn such a mapping requires visual feedback and knowledge of the error at the end of the movement. In our experiment we only revealed the shifted position of the finger at the end of the movement of the clear feedback trials ( ). Therefore, if subjects learn a mapping, they can only do so for these trials and apply the same mapping to the blurred conditions ( ,  ). Therefore, this model predicts that the average lateral shift       should be independent of the degree of blur (Figure 1E right panel) 2.3.1 Results: Lateral Deviation Graphs of        against   are shown for a representative subject in Figure 2A. The slope increases with increasing uncertainty and is, therefore, incompatible with models 1 and 3 but is predicted by model 2. Moreover, this transition from using feedback to using prior information occurs gradually with increasing uncertainty as also predicted by this Bayesian model. These effects are consistent over all the subjects tested. The slope increases with increasing uncertainty in the visual feedback (Figure 2B). Depending on the uncertainty of the feedback, subjects thus combine prior knowledge of the distribution of shifts with new evidence to generate the optimal compensatory movement. Using Bayesian theory we can furthermore infer the degree of uncertainty from the errors the subjects made. Given the width of the prior      and the result in (4) we can 0 1 2 -1 1 0 2 -1 0 1 0 1 2 -1 1 0 2 -1 1 0 1 slope A B *** ** *** 1 C σM σ0 σL σ 8 σM σ0 σL σ 8 -0.5 1 2.5 1 inferred prior [AU] 0 lateral deviation <xtrue-xestimate>[cm] lateral deviation <xtrue-xestimate>[cm] lateral deviation <xtrue-xestimate>[cm] lateral deviation <xtrue-xestimate>[cm] lateral shift xtrue [cm] lateral shift xtrue [cm] lateral shift xtrue [cm] lateral shift xtrue [cm] lateral shift xtrue [cm] Figure 2: Results with color codes as in Figure 1. A) The average lateral deviation of the cursor at the end of the trial as a function of the imposed lateral shift for a typical subject. Errorbars denote the s.e.m. The horizontal dotted lines indicate the prediction from the full compensation model and sloped line for a model that ignores sensory feedback on the current trial and corrects only for the mean over all trials. B) The slopes for the optimal linear fits are shown for the full population of subjects. The stars indicate the significance indicated by the paired t-test. C) The inferred priors and the real prior (red) for each subjects and condition. estimate the uncertainty    from Fig 2A. For the three levels of imposed uncertainty,  ,  and  , we find that the subjects uncertainty    are 0.360.1, 0.670.3, 0.80.2 cm (meansd across subjects), respectively. Furthermore we have developed a novel technique to infer the priors used by the subjects. An obvious choice of   is the maximum of the posterior     . The derivative of this posterior with respect to   must vanish at the optimal  . This allows us to estimate the prior used by each subject. Taking derivatives of (3) after inserting (2) and setting to zero we get:                       (6) We assume that   has a narrow peak around   and thus approximate it by  . We insert the    obtained in (4), affecting the scaling of the integral but not its form. The average of   across many trials is the imposed shift  . Therefore the right hand side is measured in the experiment and the left hand side approximates the derivative of    . Since  must approach zero for both very small and very large  , we subtract the mean of the right hand side before integrating numerically to obtain an estimate the prior   . Figure 2C shows the priors inferred for each subject and condition. This shows that the real prior (red line) was reliably learned by each subject. 3 Experiment 2: Mixture of Gaussians Priors The second experiment was designed to examine whether subjects are able to represent more complicated priors such as mixtures of Gaussians and if they can utilize such prior knowledge. 3.1 Methods 12 additional subjects participated in an experiment similar to Experiment 1 with the following changes. The experiments lasted for twice as many trials run on two consecutive days with 2000 trials performed on each day. Feedback midway through the movement was always blurred (spheres distributed as a two dimensional Gaussian with   ) and feedback at the end of the movement was provided on every trial. The prior distribution was a mixture of Gaussians ( Figure 3A,D). One group of 6 subjects was exposed to:                                    (7) where   is half the distance between the two peaks of the Gaussians.    is the width of each Gaussian which is set to 0.5 cm. Another group of 6 subjects experienced                                            (8) In this case we set    so that the variance is identical to the two Gaussians case.    is still 0.5 cm. To estimate the priors learned by the subjects we fitted and compared two models. The first assumed that subjects learned a single Gaussian distribution and the second assumed that subjects learned a mixture of Gaussians and we tuned the position of the Gaussians to minimizes the MSE between predicted and actual data. 0 -2 2 -1 0 1 0 -2 2 0 1 relative frequency A B 0 -2 2 -1 0 1 C p(xtrue) single subject all subjects 4 -3 0 3 −4 0 4 0 1 relative frequency −4 0 D E 4 -3 3 −4 0 F p(xtrue) single subject all subjects 0 lateral shift xtrue [cm] lateral shift xtrue [cm] lateral shift xtrue [cm] lateral shift xtrue [cm] lateral shift xtrue [cm] lateral shift xtrue [cm] lateral deviation <xtrue-xestimate>[cm] lateral deviation <xtrue-xestimate>[cm] lateral deviation <xtrue-xestimate>[cm] lateral deviation <xtrue-xestimate>[cm] Figure 3: A The used distribution of   as mixture of Gaussians model. B The performance of an arbitrarily chosen subject is shown together with a fit from the ignore prior model (dotted line), the Gaussian model (dashed line) and the Bayesian Mixture of Gaussians model (solid line) C the average response over all subjects is shown D-F shows the same as A-C for the Three Gaussian Distribution 3.2 Results: Two Gaussians Distribution The resulting response graphs (Figure 3B,C) show clear nonlinear effects. Fitting the    and  to a two component Mixture of Gaussians model led to an average error over all 6 subjects of 0.140.01 cm compared to an average error obtained for a single Gaussian of 0.190.02 cm for the two Gaussians model. The difference, is significant at  . The mixture model of the prior is thus better able to explain the data than the model that assumes that people can just represent one Gaussian. One of the subjects compensated least for the feedback and his data was well fit by a single Gaussian. After removing this subject from the dataset we could fit the width of the distribution  and obtained 2.40.4 cm, close to the real value of the probability density function of 2 cm. 3.3 Results: Three Gaussians Distribution The resulting response graphs (Figure 3E,F) again show clear nonlinear effects. Fitting the    and  of the three Gaussians model (Figure 3E) led to an average error over all subjects of 0.210.02 cm instead of an error from a single Gaussians of 0.25 0.02 cm. The fitted distance  however was 2.00.4 cm, significantly smaller than the real distance. This result shows that subjects can not fully learn this more complicated distribution but rather just learn some of its properties. This could be due to several effects. First, large values of   are experienced only rarely. Second, it could be that subjects use a simpler model such as a generalized Gaussian (the family of distribution that also the Laplacian distribution belongs to) or that they use a mixture of only a few Gaussians model. Third, subjects could have a prior over priors that makes a mixture of three Gaussians model very unlikely. Learning such a mixture would therefore be expected to take far longer. 3.4 Results: Evolution of the Subjects Performance -2 -2 2 2 0 -2 -2 2 2 0 -2 -2 2 2 0 -2 -2 2 2 0 -2 -2 2 2 0 -2 -2 2 2 0 -2 -2 2 2 0 -2 -2 2 2 0 3501-4000 3001-3500 3001-3500 2501-3000 1501-2000 501-1000 01-500 1001-1500 lateral shift xtrue [cm] lateral deviation <xtrue-xestimate>[cm] B 1 2 3 4 5 6 7 8 0 20 additional variance explained by Full model [%] blocks of 500 trials C 0 4000 0 5 average error [cm] trial A Figure 4: A The mean error over the 6 subjects is shown as a function of the trial number B The average lateral deviation as a function of the shift and the trial number C  The additional variance explained by the full model is plotted as a function of the trial number As a next step we wanted to analyze how the behaviour of the subjects changes over the course of training. During the process of training the average error over batches of 500 subsequent trials decreased from 1.97 cm to 0.84 cm (Figure 4A). What change leads to this decrease? To address this we plot the evolution of the lateral deviation graph, as a function of the trial number (Figure 4B). Subjects initially exhibit a slope of about 1 and approximately linear behaviour. This indicates that initially they are using a narrow Gaussian prior. In other words they rely on the prior belief that their hand will not be displaced and ignore the feedback. Only later during training do they show behaviour that is consistent with a bimodal Gaussians distribution. In Figure 4C we plot the percentage of additional variance explained by the full model when compared to the Gaussian model averaged over the population. It seems that in particular after trial 2000, the trial after which people enjoy a nights rest, does the explanatory power of the full model improve. It could be that subjects need a consolidation period to adequately learn the distribution. Such improvements in learning contingent upon sleep have also been observed in visual learning [7]. 4 Conclusion We have shown that a prior is used by humans to determine appropriate motor commands and that it is combined with an estimate of sensory uncertainty. Such a Bayesian view of sensorimotor learning is consistent with neurophysiological studies that show that the brain represents the degree of uncertainty when estimating rewards [8-10] and with psychophysical studies addressing the timing of movements [11]. Not only do people represent the uncertainty and combine this with prior information, they are also able to represent and utilize complicated nongaussian priors. Optimally using a priori knowledge might be key to winning a tennis match. Tennis professionals spend a great deal of time studying their opponent before playing an important match - ensuring that they start the match with correct a priori knowledge. Acknowledgments We like to thank Zoubin Ghahramani for inspiring discussions and the Wellcome Trust for financial support. We also like to thank James Ingram for technical support. References [1] Cox, R.T. (1946) American Journal of Physics 17, 1 [2] Bernardo, J.M. & Smith, A.F.M. (1994) Bayesian theory. John Wiley [3] Berrou, C., Glavieux, A. & Thitimajshima, P. (1993) Proc. ICC’93 Geneva, Switzerland 1064 [4] Simoncelli, E.P. & Adelson, E.H. (1996) Proc. 3rd International Conference on Image Processing Lausanne, Switzerland [5] Weiss, Y., Simoncelli, E.P. & Adelson, E.H. (2002) Nature Neuroscience 5, 598 [6] Goodbody, W. & Wolpert, D. (1998) Journal of Neurophysiology 79,1825 [7] Stickgold, R., James, L. & Hobson, J.A. (2000) Nature 3 ,1237 [8] Fiorillo, C.D., Tobler, P.N. & Schultz, W. (2003) Science 299, 1898 [9] Basso, M.A. & Wurt, R.H. (1998) Journal of Neuroscience 18, 7519 [10] Platt M.L. (1999) Nature 400, 233 [11] Carpenter, R.H. & Williams, M.L. Nature 377, 59
2003
138
2,352
From Algorithmic to Subjective Randomness Thomas L. Griffiths & Joshua B. Tenenbaum {gruffydd,jbt}@mit.edu Massachusetts Institute of Technology Cambridge, MA 02139 Abstract We explore the phenomena of subjective randomness as a case study in understanding how people discover structure embedded in noise. We present a rational account of randomness perception based on the statistical problem of model selection: given a stimulus, inferring whether the process that generated it was random or regular. Inspired by the mathematical definition of randomness given by Kolmogorov complexity, we characterize regularity in terms of a hierarchy of automata that augment a finite controller with different forms of memory. We find that the regularities detected in binary sequences depend upon presentation format, and that the kinds of automata that can identify these regularities are informative about the cognitive processes engaged by different formats. 1 Introduction People are extremely good at finding structure embedded in noise. This sensitivity to patterns and regularities is at the heart of many of the inductive leaps characteristic of human cognition, such as identifying the words in a stream of sounds, or discovering the presence of a common cause underlying a set of events. These acts of everyday induction are quite different from the kind of inferences normally considered in machine learning and statistics: human cognition usually involves reaching strong conclusions on the basis of limited data, while many statistical analyses focus on the asymptotics of large samples. The ability to detect structure embedded in noise has a paradoxical character: while it is an excellent example of the kind of inference at which people excel but machines fail, it also seems to be the source of errors in tasks at which machines regularly succeed. For example, a common demonstration conducted in introductory psychology classes involves presenting students with two binary sequences of the same length, such as HHTHTHTT and HHHHHHHH, and asking them to judge which one seems more random. When students select the former, they are told that their judgments are irrational: the two sequences are equally random, since they have the same probability of being produced by a fair coin. In the real world, the sense that some random sequences seem more structured than others can lead people to a variety of erroneous inferences, whether in a casino or thinking about patterns of births and deaths in a hospital [1]. Here we show how this paradox can be resolved through a proper understanding of what our sense of randomness is designed to compute. We will argue that our sense of randomness is actually extremely well-calibrated with a rational statistical computation – just not the one to which it is usually compared. While previous accounts criticize people’s randomness judgments as poor estimates of the probability of an outcome, we claim that subjective randomness, together with other everyday inductive leaps, can be understood in terms of the statistical problem of model selection: given a set of data, evaluating hypotheses about the process that generated it. Solving this model selection problem for small datasets requires two ingredients: a set of hypotheses about the processes by which the data could have been generated, and a rational statistical inference by which these hypotheses are evaluated. We will model subjective randomness as an inference comparing the probability of a sequence under a random process, P(X|random), with the probability of that sequence under a regular process, P(X|regular). In previous work we have shown that defining P(X|regular) using a restricted form of Kolmogorov complexity, in which regularity is characterized in terms of a simple computing machine, can provide a good account of human randomness judgments for binary sequences [2]. Here, we explore the consequences of manipulating the conditions under which these sequences are presented. We will show that the kinds of regularity to which people are sensitive depend upon whether the full sequence is presented simultaneously, or its elements are presented sequentially. By exploring how these regularities can be captured by different kinds of automata, we extend our rational analysis of the inference involved in subjective randomness to a rational characterization of the processes underlying it: certain regularities can only be detected by automata with a particular form of memory access, and identifying the conditions under which regularities are detectable provides insight into how characteristics of human memory interact with rational statistical inference. 2 Kolmogorov complexity and randomness A natural starting point for a formal account of subjective randomness is Kolmogorov complexity, which provides a mathematical definition of the randomness of a sequence in terms of the length of the shortest computer program that would produce that sequence. The idea of using a code based upon the length of computer programs was independently proposed in [3], [4] and [5], although it has come to be associated with Kolmogorov. A sequence X has Kolmogorov complexity K(X) equal to the length of the shortest program p for a (prefix) universal Turing machine U that produces X and then halts, K(X) = min p:U(p)=X ℓ(p), (1) where ℓ(p) is the length of p in bits. Kolmogorov complexity identifies a sequence X as random if ℓ(X) −K(X) is small: random sequences are those that are irreducibly complex [4]. While not necessarily following the form of this definition, psychologists have preserved its spirit in proposing that the perceived randomness of a sequence increases with its complexity (eg. [6]). Kolmogorov complexity can also be used to define a variety of probability distributions, assigning probability to events based upon their complexity. One such distribution is algorithmic probability, in which the probability of X is R(X) = 2−K(X) = max p:U(p)=X 2−ℓ(p). (2) There is no requirement that R(X) sum to one over all sequences; many probability distributions that correspond to codes are unnormalized, assigning the missing probability to an undefined sequence. There are three problems with using Kolmogorov complexity as the basis for a computational model of subjective randomness. Firstly, the Kolmogorov complexity of any particular sequence X is not computable [4], presenting a practical challenge for any modelling effort. Secondly, while the universality of an encoding scheme based on Turing machines is attractive, many of the interesting questions in cognition come from the details: issues of representation and processing are lost in the asymptotic equivalence of coding schemes, but play a key role in people’s judgments. Finally, Kolmogorov complexity is too permissive in what it considers a regularity. The set of regularities identified by people are a strict subset of those that might be expressed in short computer programs. For example, people are very unlikely to be able to tell the difference between a binary sequence produced by a linear congruential random number generator (a very short program) and a sequence produced by flipping a coin, but these sequences should differ significantly in Kolmogorov complexity. Restricting the set of regularities does not imply that people are worse than machines at recognizing patterns: reducing the size of the set of hypotheses increases inductive bias, making it possible to identify the presence of structure from smaller samples. 3 A statistical account of subjective randomness While there are problems with using Kolmogorov complexity as the basis for a rational theory of subjective randomness, it provides a clear definition of regularity. In this section we will present a statistical account of subjective randomness in terms of a comparison between random and regular sources, where regularity is defined by analogues of Kolmogorov complexity for simpler computing machines. 3.1 Subjective randomness as model selection One of the most basic problems that arises in statistical inference is identifying the source of a set of observations, based upon a set of hypotheses. This is the problem of model selection. Model selection provides a natural basis for a statistical theory of subjective randomness, viewing these judgments as the consequence of an inference to the process that produced a set of observations. On seeing a stimulus X, we consider two hypotheses: X was produced by a random process, or X was produced by a regular process. The decision about the source of X can be formalized as a Bayesian inference, P(random|X) P(regular|X) = P(X|random) P(X|regular) P(random) P(regular) , (3) in which the posterior odds in favor of a random generating process are obtained from the likelihood ratio and the prior odds. The only part of the right hand side of the equation affected by X is the likelihood ratio, so we define the subjective randomness of X as random(X) = log P(X|random) P(X|regular) , (4) being the evidence that X provides towards the conclusion that it was produced by a random process. 3.2 The nature of regularity In order to define random(X), we need to specify P(X|random) and P(X|regular). When evaluating binary sequences, it is natural to set P(X|random) = ( 1 2)ℓ(X). Taking the logarithm in base 2, random(X) is −ℓ(X) −log2 P(X|regular), depending entirely on P(X|regular). We obtain random(X) = K(X) −ℓ(X), the difference between the complexity of a sequence and its length, if we choose P(X|regular) = R(X), the algorithmic probability defined in Equation 2. This is identical to the mathematical definition of randomness given by Kolmogorov complexity. However, the key point of this statistical approach is that we are not restricted to using R(X): we have a measure of the randomness of X for any choice of P(X|regular). The choice of P(X|regular) will reflect the stimulus domain, and express the kinds of regularity which people can detect in that domain. For binary sequences, a good candidate for specifying P(X|regular) is a hidden Markov model (HMM), a probabilistic finite H H H T T T 1 2 3 4 5 6 Figure 1: Finite state automaton used to define P(X|regular) to give random(X) ∝DP. Solid arrows are transitions consistent with repeating a motif, which are taken with probability δ. Dashed arrows are motif changes, using the prior determined by α. state automaton. In fact, specifying P(X|regular)in terms of a particular HMM results in random(X) being equivalent to the “Difficulty Predictor” (DP) [6] a measure of sequence complexity that has been extremely successful in modelling subjective randomness judgments. DP measures the complexity of a sequence in terms of the number of repeating (eg. HHHH) and alternating (eg. HTHT) subsequences it contains, adding one point for each repeating subsequence and two points for each alternating subsequence. For example, the sequence TTTHHHTHTH is a run of tails, a run of heads, and an alternating sub-sequence, DP = 4. If there are several partitions into runs and alternations, DP is calculated on the partition that results in the lowest score. In [2], we showed that random(X) ∝DP if P(X|regular) is specified by a particular HMM. This HMM produces sequences by motif repetition, using the transition graph shown in Figure 1. The model emits sequences by choosing a motif, a sequence of symbols of length k, with probability proportional to αk, and emitting symbols consistent with that motif with probability δ, switching to a new motif with probability 1 −δ. In Figure 1, state 1 repeats the motif H, state 2 repeats T, and the remaining states repeat the alternating motifs HT and TH. The randomness of a sequence under this definition of regularity depends on δ and α, but is generally affected by the number of repeating and alternating subsequences. The equivalence to DP, in which a sequence scores a single point for each repeating subsequence and two points for each alternating subsequence, results from taking δ = 0.5 and α = √ 3−1 2 , and choosing the the state sequence for the HMM that maximizes the probability of the sequence. Just as the algorithmic probability R(X) is a probability distribution defined by the length of programs for a universal Turing machine, this choice of P(X|regular) can be seen as specifying the length of “programs” for a particular finite state automaton. The output of a finite state automaton is determined by its state sequence, just as the output of a universal Turing machine is determined by its program. However, since the state sequence is the same length as the sequence itself, this alone does not provide a meaningful measure of complexity. In our model, probability imposes a metric on state sequences, dictating a greater cost for moves between certain states, which translates into a code length through the logarithm. Since we find the state sequence most likely to have produced X, and thus the shortest code length, we have an analogue of Kolmogorov complexity defined on a finite state automaton. 3.3 Regularities and automata Using a hidden Markov model to specify P(X|regular) provides a measure of complexity defined in terms of a finite state automaton. However, the kinds of regularities people can detect in binary sequences go beyond the capacity of a finite state automaton. Here, we consider three additional regularities: symmetry (eg. THTHHTHT), symmetry in the com(duplication) Queue automaton Stack automaton Turing machine (all computable) Finite state automaton (motif repetition) Pushdown automaton (symmetry) Figure 2: Hierarchy of automata used to define measures of complexity. Of the regularities discussed in this paper, each automaton can identify all regularities identified by those automata to its left as well as those stated in parentheses beneath its name. plement (eg. TTTTHHHH), and the perfect duplication of subsequences (eg. HHHTHHHT vs. HHHTHHHTH). These regularities identify formal languages that cannot be recognized by a finite state automaton, suggesting that we might be able to develop better models of subjective randomness by defining P(X|regular) in terms of more sophisticated automata. The automata we will consider in this paper form a hierarchy, shown in Figure 2. This hierarchy expresses the same content as Chomsky’s [7] hierarchy of computing machines – the regularities identifiable by each machine are a strict superset of those identifiable to the machine to the left – although it features a different set of automata. The most restricted set of regularities are those associated with the finite state automaton, and the least restricted are those associated with the Turing machine. In between are the pushdown automaton, which augments a finite controller with a stack memory, in which the last item added is the first to be accessed; the queue automaton,1 in which the memory is a queue, in which the first item added is the first to be accessed; and the stack automaton, in which the memory is a stack but any item in the stack can be read by the controller [9, 10]. The key difference between these kinds of automata is the memory available to the finite controller, and exploring measures of complexity defined in terms of these automata thus involves assessing the kind of memory required to identify regularities. Each of the automata shown in Figure 2 can identify a different set of regularities. The finite state automaton is only capable of identifying motif repetition, while the pushdown automaton can identify both kinds of symmetry, and the queue automaton can identify duplication. The stack automaton can identify all of these regularities, and the Turing machine can identify all computable regularities. For each of the sub-Turing automata, we can use these constraints to specify a probabilistic model for P(X|regular). For example, the probabilistic model corresponding to the pushdown automaton generates regular sequences by three methods: repetition, producing sequences with probabilities determined by the HMM introduced above; symmetry, where half of the sequence is produced by the HMM and the second half is produced by reflection; and complement symmetry, where the second half is produced by reflection and exchanging H and T. We then take P(X|regular) = maxZ,M P(X, Z|M)P(M), where M is the method of production and Z is the state sequence for the HMM. Similar models can be defined for the queue and stack automata, with the queue automaton allowing generation by repetition or duplication, and the stack automaton allowing any of these four methods. Each regularity introduced into the model requires a further parameter in specifying P(M), so the hierarchy shown in Figure 2 also expresses the statistical structure of this set of models: each model is a special case of the model to its right, in which some regularities are eliminated by setting P(M) to zero. We can use this structure to perform model selection with likelihood ratio tests, determining which model gives the best account of a particular dataset using just the difference in the log-likelihoods. We apply this method in the next section. 1An unrestricted queue automaton is equivalent to a Turing machine. We will use the phrase to refer to an automaton in which the number of queue operations that can be performed for each input symbol is limited, which is generally termed a quasi real time queue automaton [8]. 4 Testing the models The models introduced in the previous section differ in the memory systems with which they augment the finite controller. The appropriateness of any one measure of complexity to a particular task may thus depend upon the memory demands placed upon the participant. To explore this hypothesis, we conducted an experiment in which participants make randomness judgments after either seeing a sequence in its entirety, or seeing each element one after another. We then used model selection to determine which measure of complexity gave the best account of each condition, illustrating how the strategy of defining more restricted forms of complexity can shed light into the cognitive processes underlying regularity detection. 4.1 Experimental methods There were two conditions in the experiment, corresponding to Simultaneous and Sequential presentation of stimuli. The stimuli were sequences of heads (H) and tails (T) presented in 130 point fixed width sans-serif font on a 19” monitor at 1280 × 1024 pixel resolution. In the Simultaneous condition, all eight elements of the sequence appeared on the display simultaneously. In the Sequential condition, the elements appeared one by one, being displayed for 300ms with a 300ms inter-stimulus interval. The participants were 40 MIT undergraduates, randomly assigned to the two conditions. Participants were instructed that they were about to see sequences which had either been produced by a random process (flipping a fair coin) or by other processes in which the choice of heads and tails was not random, and had to classify these sequences according to their source. After a practice session, each participant classified all 128 sequences of length 8, in random order, with each sequence randomly starting with either a head or a tail. Participants took breaks at intervals of 32 sequences. 4.2 Results and Discussion We analyzed the results by fitting the models corresponding to the four automata described above, using all motifs up to length 4 to specify the basic model. We computed random(X) for each stimulus as in Eq. (4), with P(X|regular) specified by the probabilistic model corresponding to each of the automata. We then converted this log-likelihood ratio into the posterior probability of a random generating process, using P(random|X) = 1 1 + exp{−λ random(X) −ψ} where λ and ψ are parameters weighting the contribution of the likelihoods and the priors respectively. We then optimized λ, ψ, δ, α and the parameters contributing to P(M) for each model, maximizing the likelihood of the classifications of the sequences by the 20 participants in each of the 2 conditions. The results of the model-fitting are shown in Figure 3(a) and (b), which indicate the relationship between the posterior probabilities predicted by the model and the proportion of participants who classified a sequence as random. The correlation coefficients shown in the figure provide a relatively good indicator of the fit of the models, and each sequence is labelled according to the regularity it expresses, showing how accommodating particular regularities contributes to the fit. The log-likelihood scores obtained from fitting the models can be used for model selection, testing whether any of the parameters involved in the models are unnecessary. Since the models form a nested hierarchy, we can use likelihood ratio tests to evaluate whether introducing a particular regularity (and the parameters associated with it) results in a statistically significant improvement in fit. Specifically, if model 1 has log-likelihood L1 and df1 parameters, and model 2 has log-likelihood L2 and df2 > df1 parameters, 2(L2 −L1) Stack r=0.83 Queue r=0.76 Pushdown r=0.79 0 0.5 1 0 0.5 1 Finite state r=0.69 Simultaneous data P(random|x) Stack r=0.77 Queue r=0.76 Pushdown r=0.70 0 0.5 1 0 0.5 1 Finite state Sequential data P(random|x) r=0.70 Repetition Symmetry Complement Duplication (a) (b) 31.42 (1df, p < 0.0001) 5.69 (2df, p = 0.0582) 33.24 (1df, p < 0.0001) 1.82 (2df, p = 0.4025) Queue Pushdown 45.08 (1df, p < 0.0001) 75.41 (2df, p < 0.0001) 57.43 (1df, p < 0.0001) 87.76 (2df, p < 0.0001) Stack Finite state Finite state Pushdown Queue Stack (d) (c) Figure 3: Experimental results for (a) the Simultaneous and (b) the Sequential condition, showing the proportion of participants classifying a sequence as “random” (horizontal axis) and P(random|X) (vertical axis) as assessed by the four models. Points are labelled according to their parse under the Stack model. (c) and (d) show the model selection results for the Simultaneous and Sequential conditions respectively, showing the four automata with edges between them labelled with χ2 score (df, p-value) for improvement in fit. should have a χ2(df2 −df1) distribution under the null hypothesis of no improvement in fit. We evaluated the pairwise likelihood ratio tests for the four models in each condition, with the results shown in Figure 3(c) and (d). Additional regularities always improved the fit for the Simultaneous condition, while adding duplication, but not symmetry, resulted in a statistically significant improvement in the Sequential condition. The model selection results suggest that the best model for the Simultaneous condition is the stack automaton, while the best model for the Sequential condition is the queue automaton. These results indicate the importance of presentation format in determining subjective randomness, as well as the benefits of exploring measures of complexity defined in terms of a range of computing machines. The stack automaton can evaluate regularities that require checking information in arbitrary positions in a sequence, something that is facilitated by a display in which the entire sequence is available. In contrast, the queue automaton can only access information in the order that it enters memory, and gives a better match to the task in which working memory is required. This illustrates an important fact about cognition – that human working memory operates like a queue rather than a stack – that is highlighted by this approach. The final parameters of the best-fitting models provide some insight into the relative importance of the different kinds of regularities under different presentation conditions. For the Simultaneous condition, δ = 0.66, α = 0.12, λ = 0.26, ψ = −1.98 and motif repetition, symmetry, symmetry in the complement, and duplication were given probabilities of 0.748, 0.208, 0.005, and 0.039 respectively. Symmetry is thus a far stronger characteristic of regularity than either symmetry in the complement or duplication, when entire sequences are viewed simultaneously. For the Sequential condition, δ = 0.70, α = 0.11, λ = 0.38, ψ = −1.24, and motif repetition was given a probability of 0.962 while duplication had a probability of 0.038, with both forms of symmetry being given zero probability since the queue model provided the best fit. Values of δ > 0.5 for both models indicates that regular sequences tend to repeat motifs, rather than rapidly switching between them, and the low α values reflect a preference for short motifs. 5 Conclusion We have outlined a framework for understanding the rational basis of the human ability to find structure embedded in noise, viewing this inference in terms of the statistical problem of model selection. Solving this problem for small datasets requires two ingredients: strong prior beliefs about the hypothetical mechanisms by which the data could have been generated, and a rational statistical inference by which these hypotheses are evaluated. When assessing the randomness of binary sequences, which involves comparing random and regular sources, people’s beliefs about the nature of regularity can be expressed in terms of probabilistic versions of simple computing machines. Different machines capture regularity when sequences are presented simultaneously and when their elements are presented sequentially, and the differences between these machines provide insight into the cognitive processes involved in the task. Analyses of the rational basis of human inference typically either ignore questions about processing or introduce them as relatively arbitrary constraints. Here, we are able to give a rational characterization of process as well as inference, evaluating a set of alternatives that all correspond to restrictions of Kolmogorov complexity to simple general-purpose automata. Acknowledgments. This work was supported by a Stanford Graduate Fellowship to the first author. We thank Charles Kemp and Michael Lee for useful comments. References [1] D. Kahneman and A. Tversky. Subjective probability: A judgment of representativeness. Cognitive Psychology, 3:430–454, 1972. [2] T. L. Griffiths and J. B. Tenenbaum. Probability, algorithmic complexity and subjective randomness. In Proceedings of the 25th Annual Conference of the Cognitive Science Society, Hillsdale, NJ, 2003. Erlbaum. [3] R. J. Solomonoff. A formal theory of inductive inference. Part I. Information and Control, 7:1–22, 1964. [4] A. N. Kolmogorov. Three approaches to the quantitative definition of information. Problems of Information Transmission, 1:1–7, 1965. [5] G. J. Chaitin. On the length of programs for computing finite binary sequences: statistical considerations. Journal of the ACM, 16:145–159, 1969. [6] R. Falk and C. Konold. Making sense of randomness: Implicit encoding as a bias for judgment. Psychological Review, 104:301–318, 1997. [7] N. Chomsky. Threee models for the description of language. IRE Transactions on Information Theory, 2:113–124, 1956. [8] A. Cherubini, C. Citrini, S. C. Reghizzi, and D. Mandrioli. QRT FIFO automata, breadth-first grammars and their relations. Theoretical Comptuer Science, 85:171–203, 1991. [9] S. Ginsburg, S. A. Greibach, and M. A. Harrison. Stack automata and compiling. Journal of the ACM, 14:172–201, 1967. [10] A. V. Aho. Indexed grammars – an extension of context-free grammars. Journal of the ACM, 15:647–671, 1968.
2003
139
2,353
Inferring State Sequences for Non-linear Systems with Embedded Hidden Markov Models Radford M. Neal, Matthew J. Beal, and Sam T. Roweis Department of Computer Science University of Toronto Toronto, Ontario, Canada M5S 3G3 {radford,beal,roweis}@cs.utoronto.ca Abstract We describe a Markov chain method for sampling from the distribution of the hidden state sequence in a non-linear dynamical system, given a sequence of observations. This method updates all states in the sequence simultaneously using an embedded Hidden Markov Model (HMM). An update begins with the creation of “pools” of candidate states at each time. We then define an embedded HMM whose states are indexes within these pools. Using a forward-backward dynamic programming algorithm, we can efficiently choose a state sequence with the appropriate probabilities from the exponentially large number of state sequences that pass through states in these pools. We illustrate the method in a simple one-dimensional example, and in an example showing how an embedded HMM can be used to in effect discretize the state space without any discretization error. We also compare the embedded HMM to a particle smoother on a more substantial problem of inferring human motion from 2D traces of markers. 1 Introduction Consider a dynamical model in which a sequence of hidden states, x = (x0, . . . , xn−1), is generated according to some stochastic transition model. We observe y = (y0, . . . , yn−1), with each yt being generated from the corresponding xt according to some stochastic observation process. Both the xt and the yt could be multidimensional. We wish to randomly sample hidden state sequences from the conditional distribution for the state sequence given the observations, which we can then use to make Monte Carlo inferences about this posterior distribution for the state sequence. We suppose in this paper that we know the dynamics of hidden states and the observation process, but if these aspects of the model are unknown, the method we describe will be useful as part of a maximum likelihood learning algorithm such as EM, or a Bayesian learning algorithm using Markov chain Monte Carlo. If the state space is finite, of size K, so that this is a Hidden Markov Model (HMM), a hidden state sequence can be sampled by a forward-backwards dynamic programming algorithm in time proportional to nK2 (see [5] for a review of this and related algorithms). If the state space is ℜp and the dynamics and observation process are linear, with Gaussian noise, an analogous adaptation of the Kalman filter can be used. For more general models, or for finite state space models in which K is large, one might use Markov chain sampling (see [3] for a review). For instance, one could perform Gibbs sampling or Metropolis updates for each xt in turn. Such simple Markov chain updates may be very slow to converge, however, if the states at nearby times are highly dependent. A popular recent approach is to use a particle smoother, such as the one described by Doucet, Godsill, and West [2], but this approach can fail when the set of particles doesn’t adequately cover the space, or when particles are eliminated prematurely. In this paper, we present a Markov chain sampling method for a model with an arbitrary state space, X, in which efficient sampling is facilitated by using updates that are based on temporarily embedding an HMM whose finite state space is a subset of X, and then applying the efficient HMM sampling procedure. We illustrate the method on a simple one-dimensional example. We also show how it can be used to in effect discretize the state space without producing any discretization error. Finally, we demonstrate the embedded HMM on a problem of tracking human motion in 3D based on the 2D projections of marker positions, and compare it with a particle smoother. 2 The Embedded HMM Algorithm In our description of the algorithm, model probabilities will be denoted by P, which will denote probabilities or probability densities without distinction, as appropriate for the state space, X, and observation space, Y. The model’s initial state distribution is given by P(x0), transition probabilities are given by P(xt | xt−1), and observation probabilities are given by P(yt | xt). Our goal is to sample from the conditional distribution P(x0, . . . , xn−1 | y0, . . . , yn−1), which we will abbreviate to π(x0, . . . , xn−1), or π(x). To accomplish this, we will simulate a Markov chain whose state space is X n — i.e., a state of this chain is an entire sequence of hidden states. We will arrange for the equilibrium distribution of this Markov chain to be π(x0, . . . , xn−1), so that simulating the chain for a suitably long time will produce a state sequence from the desired distribution. The state at iteration i of this chain will be written as x(i) = (x(i) 0 , . . . , x(i) n−1). The transition probabilities for this Markov chain will be denoted using Q. In particular, we will use some initial distribution for the state of the chain, Q(x(0)), and will simulate the chain according to the transition probabilities Q(x(i) | x(i−1)). For validity of the sampling method, we need these transitions to leave π invariant: π(x′) = X x∈X n π(x)Q(x′ | x), for all x′ in X n (1) (If X is continuous, the sum is replaced by an integral.) This is implied by the detailed balance condition: π(x)Q(x′ | x) = π(x′)Q(x | x′), for all x and x′ in X n (2) The transition Q(x(i) | x(i−1)) is defined in terms of “pools” of states for each time. The current state at time t is always part of the pool for time t. Other states in the pool are produced using a pool distribution, ρt, which is designed so that points drawn from ρt are plausible alternatives to the current state at time t. The simplest way to generate these additional pool states is to draw points independently from ρt. This may not be feasible, however, or may not be desirable, in which case we can instead simulate an “inner” Markov chain defined by transition probabilities written as Rt(· | ·), which leave the pool distribution, ρt, invariant. The transitions for the reversal of this chain with respect to ρt will be denoted by ˜Rt(· | ·), and are defined so as to satisfy the following condition: ρt(xt)Rt(x′ t | xt) = ρt(x′ t) ˜Rt(xt | x′ t), for all xt and x′ t in X (3) If the transitions Rt satisfy detailed balance with respect to ρt, ˜Rt will be the same as Rt. To generate pool states by drawing from ρt independently, we can let Rt(x′|x) = ˜Rt(x′|x) = ρt(x′). For the proof of correctness below, we must not choose ρt or Rt based on the current state, x(i), but we may choose them based on the observations, y. To perform a transition Q to a new state sequence, we begin by at each time, t, producing a pool of K states, Ct. One of the states in Ct is the current state, x(i−1) t ; the others are produced using Rt and ˜Rt. The new state sequence, x(i), is then randomly selected from among all sequences whose states at each time t are in Ct, using a form of the forwardbackward procedure. In detail, the pool of candidate states for time t is found as follows: 1) Pick an integer Jt uniformly from {0, . . . , K−1}. 2) Let x[0] t = x(i−1) t . (So the current state is always in the pool.) 3) For j from 1 to Jt, randomly pick x[j] t according to the transition probabilities Rt(x[j] t | x[j−1] t ). 4) For j from −1 down to −K +Jt +1, randomly pick x[j] t according to the reversed transition probabilities, ˜Rt(x[j] t | x[j+1] t ). 5) Let Ct be the pool consisting of x[j] t , for j ∈{−K+Jt+1, . . . , 0, . . . , Jt}. If some of the x[j] t are the same, they will be present in the pool more than once. Once the pools of candidate states have been found, a new state sequence, x(i), is picked from among all sequences, x, for which every xt is in Ct. The probability of picking x(i) = x is proportional to π(x)/ Qn−1 t=0 ρt(xt), which is proportional to P(x0) Qn−1 t=1 P(xt | xt−1) Qn−1 t=0 P(yt | xt) Qn−1 t=0 ρt(xt) (4) The division by Qn−1 t=0 ρt(xt) is needed to compensate for the pool states having been drawn from the ρt distributions. If duplicate states occur in some of the pools, they are treated as if they were distinct when picking a sequence in this way. In effect, we pick indexes of states in these pools, with probabilities as above, rather than states themselves. The distribution of these sequences of indexes can be regarded as the posterior distribution for a hidden Markov model, with the transition probability from state j at time t−1 to state k at time t being proportional to P(x[k] t | x[j] t−1), and the probabilities of the hypothetical observed symbols being proportional to P(yt | x[k] t )/ρt(x[k] t ). Crucially, using the forward-backward technique, it is possible to randomly pick a new state sequence from this distribution in time growing linearly with n, even though the number of possible sequences grows as Kn. After the above procedure has been used to produce the pool states, x[j] t for t = 0 to n−1 and j = −K+Jt + 1 to Jt, this algorithm operates as follows (see [5]): 1) For t = 0 to n−1 and for j = −K+Jt+1 to Jt, let ut,j = P(yt | x[j] t )/ρt(x[j] t ). 2) For j = −K+J0+1 to J0, let w0,j = u0,j P(X0 = x[j] 0 ). 3) For t = 1 to n−1 and for j = −K+Jt + 1 to Jt, let wt,j = ut,j P k wt−1,k P(x[j] t | x[k] t−1) 4) Randomly pick sn−1 from {−K+Jn−1+1, . . . , Jn−1}, picking the value j with probability proportional to wn−1,j. 5) For t = n−1 down to 1, randomly pick st−1 from {−K +Jt−1+1, . . . , Jt−1}, picking the value j with probability proportional to wt−1,j P(x[st] t | x[j] t−1). Note that when implementing this algorithm, one must take some measure to avoid floatingpoint underflow, such as representing the wt,j by their logarithms. Finally, the embedded HMM transition is completed by letting the new state sequence, x(i), be equal to (x[s0] 0 , x[s1] 1 , . . . , x[sn−1] n−1 ) 3 Proof of Correctness To show that a Markov chain with these transitions will converge to π, we need to show that it leaves π invariant, and that the chain is ergodic. Ergodicity need not always hold, and proving that it does hold may require considering the particulars of the model. However, it is easy to see that the chain will be ergodic if all possible state sequences have non-zero probability density under π, the pool distributions, ρt, have non-zero density everywhere, and the transitions Rt are ergodic. This probably covers most problems that arise in practice. To show that the transitions Q(· | ·) leave π invariant, it suffices to show that they satisfy detailed balance with respect to π. This will follow from the stronger condition that the probability of moving from x to x′ (starting from a state picked from π) with given values for the Jt and given pools of candidate states, Ct, is the same as the corresponding probability of moving from x′ to x with the same pools of candidate states and with values J ′ t defined by J′ t = Jt −ht, where ht is the index (from −K + Jt + 1 to Jt) of x′ t in the candidate pool. The probability of such a move from x to x′ is the product of several factors. First, there is the probability of starting from x under π, which is π(x). Then, for each time t, there is the probability of picking Jt, which is 1/K, and of then producing the states in the candidate pool using the transitions Rt and ˜Rt, which is Jt Y j=1 Rt(x[j] t | x[j−1] t ) × −1 Y j=−K+Jt+1 ˜Rt(x[j] t | x[j+1] t ) = Jt−1 Y j=0 Rt(x[j+1] t | x[j] t ) × −1 Y j=−K+Jt+1 Rt(x[j+1] t | x[j] t ) ρt(x[j] t ) ρt(x[j+1] t ) (5) = ρt(x[−K+Jt+1] t ) ρt(x[0] t ) Jt−1 Y j=−K+Jt+1 Rt(x[j+1] t | x[j] t ) (6) Finally, there is the probability of picking x′ from among all the sequences with states from the pools, Ct, which is proportional to π(x′)/ Q ρt(x′ t). The product of all these factors is π(x) × 1 Kn × n−1 Y t=0  ρt(x[−K+Jt+1] t ) ρt(x[0] t ) Jt−1 Y j=−K+Jt+1 Rt(x[j+1] t | x[j] t )  × π(x′) Qn−1 t=0 ρt(x′ t) = 1 Kn π(x)π(x′) Qn−1 t=0 ρ(xt)ρ(x′ t) n−1 Y t=0  ρt(x[−K+Jt+1] t ) Jt−1 Y j=−K+Jt+1 Rt(x[j+1] t | x[j] t )  (7) We can now see that the corresponding expression for a move from x′ to x is identical, apart from a relabelling of candidate state x[j] t as x[j−ht] t . 4 A simple demonstration The following simple example illustrates the operation of the embedded HMM. The state space X and the observation space, Y, are both ℜ, and each observation is simply the state plus Gaussian noise of standard deviation σ — i.e., P(yt | xt) = N(yt | xt, σ2). The state transitions are defined by P(xt | xt−1) = N(xt | tanh(ηxt−1), τ 2), for some constant expansion factor η and transition noise standard deviation τ. Figure 1 shows a hidden state sequence, x0, . . . , xn−1, and observation sequence, y0, . . . , yn−1, generated by this model using σ = 2.5, η = 2.5, and τ = 0.4, with n = 1000. The state sequence stays in the vicinity of +1 or −1 for long periods, with rare switches between these regions. Because of the large observation noise, there is considerable uncertainty regarding the state sequence given the observation sequence, with the posterior distribution assigning fairly high probability to sequences that contain short-term switches between the +1 and −1 regions that are not present in the actual state sequence, or that lack some of the short-term switches that are actually present. We sampled from this distribution over state sequences using an embedded HMM in which the pool distributions, ρt, were normal with mean zero and standard deviation one, and the pool transitions simply sampled independently from this distribution (ignoring the current pool state). Figure 2 shows that after only two updates using pools of ten states, embedded HMM sampling produces a state sequence with roughly the correct characteristics. Figure 3 demonstrates how a single embedded HMM update can make a large change to the state sequence. It shows a portion of the state sequence after 99 updates, the pools of states produced for the next update, and the state sequence found by the embedded HMM using these pools. A large change is made to the state sequence in the region from time 840 to 870, with states in this region switching from the vicinity of −1 to the vicinity of +1. This example is explored in more detail in [4], where it is shown that the embedded HMM is superior to simple Metropolis methods that update one hidden state at a time. 5 Discretization without discretization error A simple way to handle a model with a continuous state space is to discretize the space by laying down a regular grid, after transforming to make the space bounded if necessary. An HMM with grid points as states can then be built that approximates the original model. Inference using this HMM is only approximate, however, due to the discretization error involved in replacing the continuous space by a grid of points. The embedded HMM can use a similar grid as a deterministic method of creating pools of states, aligning the grid so that the current state lies on a grid point. This is a special case of the general procedure for creating pools, in which ρt is uniform, Rt moves to the next grid point and ˜Rt moves to the previous grid point, with both wrapping around when the first or last grid point is reached. If the number of pool states is set equal to the number of points in a grid, every pool will consist of a complete grid aligned to include the current state. On their own, such embedded HMM updates will never change the alignments of the grids. However, we can alternately apply such an embedded HMM update and some other MCMC update (eg, Metropolis) which is capable of making small changes to the state. These small changes will change the alignment of the new grids, since each grid is aligned to include the current state. The combined chain will be ergodic, and sample (asymptotically) from the correct distribution. This method uses a grid, but nevertheless has no discretization error. We have tried this method on the example described above, laying the grid over the transformed state tanh(xt), with suitably transformed transition densities. With K = 10, the grid method samples more efficiently than when using N(0, 1) pool distributions, as above. 0 200 400 600 800 1000 −5 0 5 Figure 1: A state sequence (black dots) and observation sequence (gray dots) of length 1000 produced by the model with σ = 2.5, η = 2.5, and τ = 0.4. 0 200 400 600 800 1000 −5 0 5 Figure 2: The state sequence (black dots) produced after two embedded HMM updates, starting with the states set equal to the data points (gray dots), as in the figure above. 820 840 860 880 900 920 940 −6 −4 −2 0 2 4 6 Figure 3: Closeup of an embedded HMM update. The true state sequence is shown by black dots and the observation sequence by gray dots. The current state sequence is shown by the dark line. The pools of ten states at each time used for the update are shown as small dots, and the new state sequence picked by the embedded HMM by the light line. Figure 4: The four-second motion sequence used for the experiment, shown in three snapshots with streamers showing earlier motion. The left plot shows frames 1-59, the middle plot frames 5991, and the right plot frames 91-121. There were 30 frames per second. The orthographic projection in these plots is the one seen by the model. (These plots were produced using Hertzmann and Brand’s mosey program.) 6 Tracking human motion We have applied the embedded HMM to the more challenging problem of tracking 3D human motion from 2D observations of markers attached to certain body points. We constructed this example using real motion-capture data, consisting of the 3D positions at each time frame of a set of identified markers. We chose one subject, and selected six markers (on left and right feet, left and right hands, lower back, and neck). These markers were projected to a 2D viewing plane, with the viewing direction being known to the model. Figure 4 shows the four-second sequence used for the experiment.1 Our goal was to recover the 3D motion of the six markers, by using the embedded HMM to generate samples from the posterior distribution over 3D positions at each time (the hidden states of the model), given the 2D observations. To do this, we need some model of human dynamics. As a crude approximation, we used Langevin dynamics with respect to a simple hand-designed energy function that penalizes unrealistic body positions. In Langevin dynamics, a gradient descent step in the energy is followed by the addition of Gaussian noise, with variance related to the step size. The equilibrium distribution for this dynamics is the Boltzmann distribution for the energy function. The energy function we used contains terms pertaining to the pairwise distances between the six markers and to the heights of the markers above the plane of the floor, as well as a term that penalizes bending the torso far backwards while the legs are vertical. We chose the step size for the Langevin dynamics to roughly match the characteristics of the actual data. The embedded HMM was initialized by setting the state at all times to a single frame of the subject in a typical stance, taken from a different trial. As the pool distribution at time t, we used the posterior distribution when using the Boltzmann distribution for the energy as the prior and the single observation at time t. The pool transitions used were Langevin updates with respect to this pool distribution. For comparison, we also tried solving this problem with the particle smoother of [2], in which a particle filter is applied to the data in time order, after which a state sequence is selected at random in a backwards pass. We used a stratified resampling method to reduce variance. The initial particle set was created by drawing frames randomly from sequences other than the sequence being tested, and translating the markers in each frame so that their centre of mass was at the same point as the centre of mass in the test sequence. Both programs were implemented in MATLAB. The particle smoother was run with 5000 particles, taking 7 hours of compute time. The resulting sampled trajectories roughly fit the 2D observations, but were rather unrealistic — for instance, the subject’s feet often floated above the floor. We ran the embedded HMM using five pool states for 300 iterations, taking 1.7 hours of compute time. The resulting sampled trajectories were more realistic 1Data from the graphics lab of Jessica Hodgins, at http://mocap.cs.cmu.edu. We chose markers 167, 72, 62, 63, 31, 38, downsampled to 30 frames per second. The experiments reported here use frames 400-520 of trial 20 for subject 14. The elevation of the view direction was 45 degrees, and the azimuth was 45 degrees away from a front view of the person in the first frame. than those produced by the particle smoother, and were quantitatively better with respect to likelihood and dynamical transition probabilities. However, the distribution of trajectories found did not overlap the true trajectory. The embedded HMM updates appeared to be sampling from the correct posterior distribution, but moving rather slowly among those trajectories that are plausible given the observations. 7 Conclusions We have shown that the embedded HMM can work very well for a non-linear model with a low-dimensional state. For the higher-dimensional motion tracking example, the embedded HMM has some difficulties exploring the full posterior distribution, due, we think, to the difficulty of creating pool distributions with a dense enough sampling of states to allow linking of new states at adjacent times. However, the particle smoother was even more severely affected by the high dimensionality of this problem. The embedded HMM therefore appears to be a promising alternative to particle smoothers in such contexts. The idea behind the embedded HMM should also be applicable to more general treestructured graphical models. A pool of values would be created for each variable in the tree (which would include the current value for the variable). The fast sampling algorithm possible for such an “embedded tree” (a generalization of the sampling algorithm used for the embedded HMM) would then be used to sample a new set of values for all variables, choosing from all combinations of values from the pools. Finally, while much of the elaboration in this paper is designed to create a Markov chain whose equilibrium distribution is exactly the correct posterior, π(x), the embedded HMM idea can be also used as a simple search technique, to find a state sequence, x, which maximizes π(x). For this application, any method is acceptable for proposing pool states (though some proposals will be more useful than others), and the selection of a new state sequence from the resulting embedded HMM is done using a Viterbi-style dynamic programming algorithm that selects the trajectory through pool states that maximizes π(x). If the current state at each time is always included in the pool, this Viterbi procedure will always either find a new x that increases π(x), or return the current x again. This embedded HMM optimizer has been successfully used to infer segment boundaries in a segmental model for voicing detection and pitch tracking in speech signals [1], as well as in other applications such as robot localization from sensor logs. Acknowledgments. This research was supported by grants from the Natural Sciences and Engineering Research Council of Canada, and by an Ontario Premier’s Research Excellence Award. Computing resources were provided by a CFI grant to Geoffrey Hinton. References [1] Achan, K., Roweis, S. T., and Frey, B. J. (2004) “A Segmental HMM for Speech Waveforms”, Technical Report UTML-TR-2004-001, University of Toronto, January 2004. [2] Doucet, A., Godsill, S. J., and West, M. (2000) “Monte Carlo filtering and smoothing with application to time-varying spectral estimation” Proc. IEEE International Conference on Acoustics, Speech and Signal Processing, 2000, volume II, pages 701-704. [3] Neal, R. M. (1993) Probabilistic Inference Using Markov Chain Monte Carlo Methods, Technical Report CRG-TR-93-1, Dept. of Computer Science, University of Toronto, 144 pages. Available from http://www.cs.utoronto.ca/∼radford. [4] Neal, R. M. (2003) “Markov chain sampling for non-linear state space models using embedded hidden Markov models”, Technical Report No. 0304, Dept. of Statistics, University of Toronto, 9 pages. Available from http://www.cs.utoronto.ca/∼radford. [5] Scott, S. L. (2002) “Bayesian methods for hidden Markov models: Recursive computing in the 21st century”, Journal of the American Statistical Association, vol. 97, pp. 337–351.
2003
14
2,354
Eye micro-movements improve stimulus detection beyond the Nyquist limit in the peripheral retina Matthias H. Hennig and Florentin W¨org¨otter Computational Neuroscience Psychology University of Stirling FK9 4LR Stirling, UK {hennig,worgott}@cn.stir.ac.uk Abstract Even under perfect fixation the human eye is under steady motion (tremor, microsaccades, slow drift). The “dynamic” theory of vision [1, 2] states that eye-movements can improve hyperacuity. According to this theory, eye movements are thought to create variable spatial excitation patterns on the photoreceptor grid, which will allow for better spatiotemporal summation at later stages. We reexamine this theory using a realistic model of the vertebrate retina by comparing responses of a resting and a moving eye. The performance of simulated ganglion cells in a hyperacuity task is evaluated by ideal observer analysis. We find that in the central retina eye-micromovements have no effect on the performance. Here optical blurring limits vernier acuity. In the retinal periphery however, eye-micromovements clearly improve performance. Based on ROC analysis, our predictions are quantitatively testable in electrophysiological and psychophysical experiments. 1 Introduction Normal visual acuity is limited by the photoreceptor distance on the retina to about 1′ of visual angle, which is imposed by the neural nyquist sampling limit. The human visual system, however, is capable of resolving certain stimuli (e.g. vernier stimuli) at a much higher resolution of < 5′′. This effect, called hyperactuity, has given rise to a large number of psychophysical studies and several qualitative theories about perception as well as the underlying neuronal properties. Most notably are the so-called “dynamic” and “static” theories of vision [3], which claim that hyperacuity would require eye-micromovements (microtremor, microsaccades) or not. Along the dynamic theory it has been suggested by Averill and Weymouth [1] and later by Marshall and Talbot [2] that small eye-movements would shift the photoreceptor grid across the stimulus leading to a better discriminability when appropriate spatiotemporal integration is used. In a previous study we had designed a realistic and detailed model of the vertebrate retina [4]. This allows us for the first time to quantitatively test the Marshall-Talbot Figure 1: Overview of the model. A, Structure of the retina model. Photoreceptors (P) connect to horizontal (H) and bipolar cells (B). Horizontal cells antagonize bipolar cells. Bipolar cells provide the center input to ganglion cells (G) and the surround is mediated by a Type 1 (1) amacrine cell [4]. B, Scaling of optical point spread functions (top curves), photoreceptor (upper lines, values shown, data from [5]) and ganglion cell separation (lower lines, values shown, data from [6, 7]) at different retinal eccentricities. PSF’s are shown for the constant (straight lines) and scaled case (dashed lines). C, Spatial layout of the stimulus (S) and the photoreceptor (P) and ganglion cell (G) grids. D, Nyquist frequencies for photoreceptors, P ganglion cells and the scaled PSF as a function of the eccentricity. Aliasing occurs in the shaded region. theory under different experimental conditions. We will show that the presence of eyemicromovements indeed improves hyperacuity. Contrary to earlier assumptions we find that eye micromovements have no effect in the central part of the retina, where optical blurring defines the limit for hyperacuity tasks. At above 5◦retinal eccentricity, eyemicromovements are clearly improving hyperacuity. Our approach relies on a model free (receiver-operator characteristic, ROC) analysis, and the reported results should be directly measurable in retinal ganglion cells and psychophysically. 2 MATERIALS AND METHODS The model used in this study is based on a previously described model of the light adapted retina. In this section, we only mention aspects which are important in the context of this study. For a detailed discussion of the model, see [4]. Briefly, the model consists of cone photoreceptors, horizontal and bipolar, amacrine and ganglion cells (Fig. 1A). Neurons are arranged on homogeneous two-dimensional hexagonal grids (Fig. 1C). Ganglion cells are shifted randomly by 12% of their separation to account for the non-ideal distribution on the hexagonal grid. Cones, bipolar and ganglion cells form the feed-forward path and horizontal and amacrine cells two lateral layers. Densities and receptive field sizes of photoreceptors and ganglion cells were adjusted to the anatomical data available for the human retina at the different eccentricities studied (Fig.1B). The separation of horizontal, bipolar and amacrine cells was scaled proportional to the cone density. Eccentricity PSF scaling Vernier offset [deg] [arcsec] 0 1.00 7 5 2.51 46 10 2.98 83 15 3.31 92 20 3.52 98 Table 1: Spatial scaling of the PSF that simulates the optical blurring and of the vernier offset as a function of the eccentricity. The photoreceptor model is a slightly modified version of the mathematical description given by Hennig et al. [4]. It is originally based on a description by Schnapf et al. [8]. The voltage responses were tested against experimental data from the macaque monkey by Schneeweis and Schnapf [9]. To account for the sustained responses for strong, but brief stimuli, the single initial activation stage [4] was replaced by three cascaded lowpass filters. This study focuses on human P On-center cells (or “midget” cells). Receptive field sizes and densities were chosen according to anatomical data (Fig. 1). The center and surround input of both cell types is weighted by overlapping Gaussian profiles [10], where the surround extends > 3.8 times the center input [11]. Ocular optical blurring has been accounted for by convolving the stimulus with the pointspread function (PSF) given by Westheimer et al. [12] for the fovea: PSF(ρ) = 0.933 · e−2.59·ρ1.36 + 0.047 · e−2.34·ρ1.74 (1) ρ is the radius in arcmin. For higher eccentricities two sets of simulations were performed, one with a constant and one with a scaled PSF (Fig.1B). The first case is an approximation of the case when off-axis refractory errors of the ocular optics are corrected. Then aliasing occurs already at the level of the cone mosaic. The more realistic case corresponds to a scaled PSF because off-axis astigmatism and increasing cone aperture increase the amount of blurring at higher eccentricities. Scaling factors were chosen to fit experimental data (Tab. 1, [13]). Under these conditions, aliasing on the ganglion cell layer begins at 5◦(Fig.1D). Eye micromovements where modeled by shifting the retina randomly relative to the stimulus by using a data fit by Eizenman et al. (Fig. 2A,B, [14]). They include the ocular microtremor and fast and slow microsaccades (Fig. 2B). Two types of micromovements were used in the simulations in this work: slow and fast microsaccades and the microtremor (MT) and only fast microsaccades and the tremor (FMT). A typical vernier stimulus has been used in the simulations. To remove the effect of the stimulus size, we used a bipartite field of 100% contrast with a small horizontal displacement in the vertical half (Fig.1C). Simulations were carried out at five different retinal eccentricities: in the fovea and at 5, 10, 15 and 20 deg. The vernier offset was scaled with increasing eccentricity proportional to the ratio of the cone to ganglion cell separation (Tab.1). Figure 2: Characteristics of the simulated eye-micromovements. A, Traces of the horizontal retinal displacement for the two tremor spectra used (top: MT, bottom: FMT, see Methods). B, Power spectra of the two cases from part A (dashed line: MT, dotted line: FMT) and the full spectrum given by Eigenman et al. (straight line, [14]). C, Responses of P-ganglion cells to a contrast step (100% contrast) without tremor (solid line) and with eye micromovements (MT, dotted line). Horizontal alignment corresponds to the location of the cell relative to the stimulus (location of contrast step indicated by dotted line). 3 Results Fig. 2 summarizes the characteristics of simulated eye-micromovements. In part A an example for the horizontal displacement of the retina is shown for the two types of micromovements included in the model (MT and FMT, see Methods). Part B shows the corresponding power spectra. Fig. 2C shows the membrane potential of a simulated ganglion cell at different locations relative to a contrast step with and without eye micromovements. When the cell is located in the dark half of the contrast step, moving the light half of the stimulus into its receptive field causes frequent strong depolarizations. For the reverse case, when the dark half of the stimulus moves into the receptive field of a cell which was previously excited, the membrane potential hyperpolarizes. These hyperpolarizations are weaker than the depolarizations in the former case because the photoreceptor response is asymmetric with respect to the to on- and offset of light. Light onset leads a to brief, strong transient hyperpolarization whereas offset causes a slower response decay and a weaker phasic depolarization [4, 9]. Fig. 3A,E show the spatial response distribution on the ganglion cell layer 30ms after stimulus onset for two retinal eccentricities for the constant PSF. At 5◦eccentricity the vernier offset is well visible by eye by comparing the upper and lower half of the responses. At 10◦however, upper and lower half look very similar, implying that vernier detection is not possible. To quantify the detectability of a vernier stimulus we performed a ROC analysis of the spatial response profiles. This procedure is shown in Fig.3: First a horizontal cross-section of the spatial response profile on the ganglion cell layer is taken for the upper and lower part of the stimulus (B, F). The detectability of a vernier stimulus should be reflected in the population average of the ganglion cell responses for upper and lower part of the stimulus. This assumption reflects the known convergence properties of the primary visual pathway, where each cortical cell receives input (via the LGN) from many ganglion cells. We used Figure 3: Spatial analysis of the vernier stimuli. A, Spatial response profiles of the ganglion cells to a vernier stimulus 30ms after stimulus onset (5◦retinal eccentricity, vernier offset 45′′). The membrane potential is coded by gray levels. B, Spatial response profile for the upper (black) and lower half (grey) of the responses in A (average over four rows). C, Spatial derivative of the curves in B, rectified at zero. D, ROC curve calculated from the curves in C. Value of the integral of the ROC curve (shaded gray) is shown for each curve (detectability index). E-H The same analysis at 10◦retinal eccentricity and a vernier offset of 92′′. an average of four rows of the ganglion cells for analysis. The resulting profiles closely fit cumulative Difference of Gaussians functions, which is a consequence of the ganglion cell receptive field structure. In the next step, the spatial derivative of the response profile is calculated and rectified at the resting potential (C, G). This operation is similar to a cortical edge detection mechanism [15] and leads to Gaussian-like distributions. From these curves it is possible to directly compute a ROC-curve (D, H). The integral of the ROC curve, ranging from 0.5 to 1, is then taken as a direct measure of the detectability of the vernier offset. This method combines the standard, model-free ROC-type analysis with basic assumptions about the convergence properties in the primary visual pathway. Eye-movements lead to temporal changes of the detectability. Thus, the integral of the ROC curve, which we will call the “detectability index” (DI), then varies over time. Fig. 4A shows this effect for the five different retinal eccentricities studied and different types of micromovements using the scaled PSF. For each eccentricity, the stimulus has been placed at five different locations relative to the ganglion cell receptive fields. We found that, without eye-micromovements and increasing eccentricities, the detectability strongly depends on the location of the stimulus in the receptive field. This is not surprising when one considers that spatial undersampling of the stimulus occurs at the ganglion cell layer. At the fovea visual resolution is limited by the optics of the eye. At > 5◦eccentricity, there are substantial “gaps” in the ganglion cell representation of the stimulus (see Fig.1B) which cause aliasing effects. Aliasing effects in the periphery due to undersampling has been reported in psychophysics [16]. Ocular micromovements leads to clearly visible effects (Fig. 4A). The noisy curves are Figure 4: Temporal analysis of the ROC curves. A, Detectability index as function of time at different retinal eccentricities and different stimulus displacements relative to the ganglion cell positions (thick curves: resting eye, thin curves: slow+fast microsaccades+tremor, grey curves: fast microsaccades+tremor). Stimulus offsets are shown above the traces. B, Maximum of the curves in A at each eccentricity and location for the scaled PSF on a noisy ganglion cells grid. Only values are considered as a maximum where the DI stays above the mean for > 10ms. C, Maximal DI for the constant PSF. now randomly oscillating across the smooth curves without micromovements. We note for most curves obtained with tremor there is an interval of at least 10ms where the DI is substantially above its mean and equal or above the noise-free equivalent. Psychophysical evidence shows that detection tasks may require only short periods of as little as 5-10ms where the detectability must exceed threshold [17]. Thus in the retinal periphery the eye micromovements have a beneficial effect on the detectability by reducing aliasing. In Fig. 4B, the maximum of DI at different stimulus locations is plotted as function of the stimulus position. The maximum is defined as the largest value of the detectability index within a > 10ms transient. The curves show the same effects as described above: Performance remains the similar in the central and improves in the peripheral retina. If the mean value of DI instead of the maximum is considered, the effect is similar in the fovea, but no performance increase can be observed in the periphery (not shown). Fig. 4C shows the same analysis of responses for a constant PSF on a regular ganglion cell grid (see Fig. 1B), where aliasing occurs already at the photoreceptor level. The effect is very similar to that of the scaled PSF with stronger aliasing at higher eccentricities. However, at 10 and 15 deg, DI is lower for all cases because the disarray of the ganglion cells allows for improved spatial averaging. To summarize the previous results, the mean value of each curve in Fig. 4B and C is calculated. This can be interpreted as the psychophysical performance of a subject after many stimulus repetitions. They are shown in Fig. 5A for the scaled and Fig. 5B for the constant Figure 5: Mean detectability index (DI) for the experiments in Fig.3A (left, constant PSF) and B (right, PSF scaled proportional to cone-ganglion cell convergence ratio) as function of the retinal eccentricity. PSF. The differences in DI at different eccentricities is a result of the stimulus scaling. For both cases, eye micromovements increases the detectability at all eccentricities except in the fovea. For the two types of eye micromovements, the maximal relative improvement of DI happens at different eccentricities. The first type, comprising microsaccades and tremor, frequently shifts the stimulus across adjoining ganglion cells at eccentricities 20◦. The second type has a smaller amplitude, thus the excitation of nearby ganglion cells is most efficient at 10◦. Thus, the effect depends on the spatial extend of the eye movements. At 20◦, DI is much lower for the scaled PSF on a noisy ganglion cell grid than for the constant PSF on the regular grid. Because DI is consistently lower in the latter case for the other eccentricities, this indicates that here the effect of the spatial disarray can not be countered by spatial averaging of just four rows of ganglion cells. Taken together, the results from the simulations shown here imply that a complex interplay of different factors affect the detectability of hyperacuity stimuli. Indeed the quantitative results from the model are very sensitive to changes of certain parameters (e.g. cell density). Equally, a great variability in human psychophysical performance exists. However, the effect of eye micromovements is consistent across the two cases shown here. 4 Discussion Our results suggest that eye-micromovements contribute to visual hyperacuity in the peripheral visual field. By simulating ganglion cell responses for vernier stimuli using a realistic model and applying model-free ideal observer analysis, we show that in the retinal periphery eye-micromovements reduce the effect of aliasing due to neural undersampling. This leads to a higher detectability of hyperacuity stimuli. There has been a successful attempt to use small, continuous “scanning” movements to increase the resolution of a low resolution sensor array as a technical application [18]. We show that this principle can indeed be employed by vertebrates to improve visual acuity in certain (hyperacuity) tasks. However, eye movements have the reverse effect on detection tasks that require aliasing. Packer and Williams [19] have shown that in a high frequency (aliasing) grating detection task contrast thresholds are low for very brief and long presentation durations. For intermediate presentation times the threshold increases substantially. Because detection relies on aliasing, it requires a resting eye. This is more likely for very brief and long presentation times. For intermediate intervals, motion prevents aliasing. In hyperacuity, eye-micromovements increase detectability and we expect an asymptotic decrease of thresholds as function of the presentation time. The question arises how eye-micromovements affect human psychophysical performance. We predict an influence of the effect of stimulus presentation time for vernier targets between the central and peripheral retina. We would also expect an increase of detection thresholds under stabilized eye conditions in the periphey. This and further experiments also suggest that eye micromovements generally influence detection tasks that are performed close to the psychophysical threshold. It is further possible to directly apply the experimental procedure that was used in this work in an electrophysiological study. Specifically, it is possible to record from one ganglion cell with many different stimulus locations. These responses can then be used to reconstruct a spatial response profile equivalent to our simulated activity distribution (Fig.3B, F) and ROC analysis can be applied. References [1] H.L. Averill and F.W. Weymouth. Visual perception and the retinal mosaic. II. The influence of eye-movements on the displacement threshold. J Comp Psychol, 5:147–176, 1925. [2] W.H. Marshall and S.A. Talbot. Recent evidence for neural mechanisms in vision leading to a general theory of sensory acuity. Biol Symp, 7:117–164, 1942. [3] R.M. Steinman and J.Z. Levinson. Eye movements and their role in visual and cognitive processes, chapter The role of eye movement in the detection of contrast and spatial detail, pages 115–212. Elsevier Science, 1990. [4] M.H. Hennig, K. Funke, and F. W¨org¨otter. The influence of different retinal subcircuits on the nonlinearity of ganglion cell behavior. J Neurosci, 22:8726–8738, 2002. [5] J. Sj¨ostrand, V. Olsson, Z. Popovic, and N. Conradi. Quantitative estimations of foveal and extra-foveal retinal circuitry in humans. Vision Res, 39:2987–2998, 1999. [6] A.K. Goodchild, K.K. Ghosh, and P.R. Martin. Comparison of photoreceptor spatial density and ganglion cell morphology in the retina of human, macaque monkey, cat, and the marmoset callithrix jacchus. J Comp Neurol, 366:55–75, 1996. [7] D.M. Dacey and M.R. Petersen. Dendritic field size and morphology of midget and parasol ganglion cells in the human retina. Proc Natl Acad Sci USA, 89:9666–9670, 1992. [8] J.L. Schnapf, B.J. Nunn, M. Meister, and D.A. Baylor. Visual transduction in cones of the monkey macaca fascicularis. J Physiol, 427:681–713, 1990. [9] D.M. Schneeweis and J.L. Schnapf. The photovoltage of marcaque cone photoreceptors: adapation, noise and kinetics. J Neurosci, 19(4):1203–1216, 1999. [10] R.W. Rodieck and J. Stone. Analysis of receptive fields of cat retinal ganglion cells. J Neurophysiol, 28:833–849, 1965. [11] L.J. Croner and E. Kaplan. Receptive fields of P and M ganglion cells across the primate retina. Vision Res, 35(1):7–24, 1995. [12] G. Westheimer. Handbook of Perception and Human Performance, volume 1, chapter The eye as an optical instrument. John Wiley & Sons, New York, 1986. [13] L.N. Thibos, D.L. Still, and Bradley A. Characterization of spatial aliasing and contrast sensitivity in peripheral vision. Vision Res, 36:249–58, 1996. [14] M. Eizenman, P.E. Hallett, and R.C. Frecker. Power spectra for ocular drift and tremor. Vision Res, 25:1635–1640, 1985. [15] D.H. Hubel and T.N. Wiesel. Receptive fields, binocular interaction, and functional architecture in the cat’s visual cortex. J Physiol, 160:106–154, 1962. [16] L.N. Thibos, D.J. Walsh, and Cheney F.E. Vision beyond the resolution limit: aliasing in the periphery. Vision Res, 27:2193–2197, 1987. [17] A.B. Watson. Handbook of perception and human performance, volume 1, chapter Temporal sensitivity. Wiley, New York, 1986. [18] Landolt O. and Mitros A. Visual sensor with resolution enhancement by mechanical vibrations. Autonomous Robots, 11:233–239, 2001. [19] O. Packer and D.R. Williams. Blurring by fixational eye movements. Vision Res, 32:1931–1939, 1992.
2003
140
2,355
Mechanism of neural interference by transcranial magnetic stimulation: network or single neuron? Yoichi Miyawaki RIKEN Brain Science Institute Wako, Saitama 351-0198, JAPAN yoichi miyawaki@brain.riken.jp Masato Okada RIKEN Brain Science Institute PRESTO, JST Wako, Saitama 351-0198, JAPAN okada@brain.riken.jp Abstract This paper proposes neural mechanisms of transcranial magnetic stimulation (TMS). TMS can stimulate the brain non-invasively through a brief magnetic pulse delivered by a coil placed on the scalp, interfering with specific cortical functions with a high temporal resolution. Due to these advantages, TMS has been a popular experimental tool in various neuroscience fields. However, the neural mechanisms underlying TMSinduced interference are still unknown; a theoretical basis for TMS has not been developed. This paper provides computational evidence that inhibitory interactions in a neural population, not an isolated single neuron, play a critical role in yielding the neural interference induced by TMS. 1 Introduction Transcranial magnetic stimulation (TMS) is an experimental tool for stimulating neurons via brief magnetic pulses delivered by a coil placed on the scalp. TMS can non-invasively interfere with neural functions related to a target cortical area with high temporal accuracy. Because of these unique and powerful features, TMS has been popular in various fields, including cognitive neuroscience and clinical application. However, despite its utility, the mechanisms of how TMS stimulates neurons and interferes with neural functions are still unknown. Although several studies have modeled spike initiation and inhibition with a brief magnetic pulse imposed on an isolated single neuron [1][2], it is rather more plausible to assume that a large number of neurons are stimulated massively and simultaneously because the spatial extent of the induced magnetic field under the coil is large enough for this to happen. In this paper, we computationally analyze TMS-induced effects both on a neural population level and on a single neuron level. Firstly, we demonstrate that the dynamics of a simple excitatory-inhibitory balanced network well explains the temporal properties of visual percept suppression induced by a single pulse TMS. Secondly, we demonstrate that sustained inhibitory effect by a subthreshold TMS is reproduced by the network model, but not by an isolated single neuron model. Finally, we propose plausible neural mechanisms underlying TMS-induced interference with coordinated neural activities in the cortical network. Figure 1: A) The network architecture. TMS was delivered to all neurons uniformly and simultaneously. B) The bistability in the network. The afferent input consisted of a suprathreshold transient and subthreshold sustained component leads the network into the bistable regime. The parameters used here are ϵ = 0.1, β = 0.25, J0 = 73, J2 = 110, and T = 1. 2 Methods 2.1 TMS on neural population 2.1.1 Network model for feature selectivity We employed a simple excitatory-inhibitory balanced network model that is well analyzed as a model for a sensory feature detector system [3] (Fig. 1A): τm d dtm(θ, t) = −m(θ, t) + g[h(θ, t)] (1) h(θ, t) =  π 2 −π 2 dθ′ π J(θ −θ′)m(θ′, t) + hext(θ, t) (2) J(θ −θ′) = −J0 + J2 cos 2(θ −θ′) (3) hext(θ, t) = c(t)[1 −ϵ + ϵ cos 2(θ −θ0)] (4) Here, m(θ, t) is the activity of neuron θ and τm is the microscopic characteristic time analogous to the membrane time constant of a neuron (Here we set τm = 10 ms). g[h] is a quasi-linear output function, g[h] =  0 (h < T ) β(h −T ) (T ≤h < T + 1/β) 1 (h ≥T + 1/β) (5) where T is the threshold of the neuron, β is the gain factor, and h(θ, t) is the input to neuron θ. For simplicity, we assume that m(θ, t) has a periodic boundary condition (−π/2 ≤θ ≤ π/2), and the connections of each neuron are limited to this periodic range. θ0 is a stimulus feature to be detected, and the afferent input, hext(θ, t), has its maximal amplitude c(t) at θ = θ0. We assume a static visual stimulus so that θ0 is constant during the stimulation (Hereafter we set θ0 = 0). ϵ is an afferent tuning coefficient, describing how the afferent input to the target population has already been localized around θ0 (0 ≤ ϵ ≤1/2). The synaptic weight from neuron θ to θ′, J(θ −θ′), consists of the uniform inhibition J0 and a feature-specific interaction J2. J0 increases an effective threshold and regulates the whole network activity through all-to-all inhibition. J2 facilitates neurons neighboring in the feature space and suppresses distant ones through a cosine-type connection weight. Through these recurrent interactions, the activity profile of the network evolves and sharpens after the afferent stimulus onset. The most intuitive and widely accepted example representable by this model is the orientation tuning function of the primary visual cortex [3][4][5]. Assuming that the coded feature is the orientation of a stimulus, we can regard θ as a neuron responding to angle θ, hext as an input from the lateral geniculate nucleus (LGN), and J as a recurrent interaction in the primary visual cortex (V1). Because the synaptic weight and afferent input have only the 0th and 2nd Fourier components, the network state can be fully described by the two order parameters m0 and m2, which are 0th- and 2nd-order Fourier coefficients of m(θ, t). The macroscopic dynamics of the network is thus derived by Fourier transformation of m(θ, t), τm d dtm0(t) = −m0(t) +  π 2 −π 2 dθ π g[h(θ, t)] (6) τm d dtm2(t) = −m2(t) +  π 2 −π 2 dθ π g[h(θ, t)] cos 2θ (7) where m0(t) represents the mean activity of the entire network and m2(t) represents the degree of modulation of the activity profile of the network. h(θ, t) is also described by the order parameter, h(θ, t) = −J0m0(t) + c(t)(1 −ϵ) + (ϵc(t) + J2m2(t)) cos 2θ (8) Substituting Eq.8 into Eq.6 and 7, the network dynamics can be calculated numerically. 2.1.2 TMS induction We assumed that the TMS perturbation would be constant for all neurons in the network because the spatial extent of the neural population that we were dealing with is small compared with the spatial gradient of the induced electric field. Thus we modified the input function as ˆh(θ, t) = h(θ, t) + ITMS(t). Eq.6 to 8 were also modified accordingly by replacing h with ˆh. Here we employ a simple rectangular input (amplitude: ITMS, duration: DTMS) as a TMS-like perturbation (see the middle graph of Fig. 2A). 2.1.3 Bistability and afferent input model TMS applied to the occipital area after visual stimulus presentation typically suppresses its visual percept [6][7][8]. To determine whether the network model produces suppression similar to the experimental data, we applied a TMS-like perturbation at various timings after the afferent onset and examined whether the final state was suppressed or not. For this purpose, the network must hold two equilibria for the same afferent input condition and reach one of them depending on the specific timing and intensity of TMS. We thus chose proper sets of β, J0, and J2 that operated the network in the non-linear regime. In addition, we employed an afferent input model consisting of suprathreshold transient (amplitude: At > T , duration: Dt) and subthreshold sustained (amplitude: As < T ) components (see the bottom graph of Fig. 2A). This is the simplest input model to lead the network into the bistable range (Fig. 1B), yet it still captures the common properties of neural signals in brain areas such as the LGN and visual cortex. 2.2 TMS on single neuron 2.2.1 Compartment model of cortical neuron We also examined the effect of TMS on an isolated single neuron by using a compartment model of a neocortical neuron analyzed by Mainen and Sejnowski [9]. The model included Figure 2: A) The time course of the order parameters, the perturbation, and the afferent input. B) The network state in the order parameter’s plane. The network bifurcates depending on the induction timing of the perturbation and converges to either of the attractors. Two examples of TMS induction timing (10 and 20 ms after the afferent onset) are shown here. The dotted lines indicate the control condition without the perturbation in both graphs. the following membrane ion channels: a low density of Na+ channels in soma and dendrites and a high density in the axon hillock and the initial segment, fast K+ channels in soma but not in dendrites, slow calcium- and voltage-dependent K+ channels in soma and dendrites, and high-threshold Ca2+ channels in soma and dendrites. We examined several types of cellular morphology as Mainen’s report but excluded axonal compartments in order to evaluate the effect of induced current only from dendritic arborization. We injected a constant somatic current and observed a specific spiking pattern depending on morphology (Fig. 5). 2.2.2 TMS induction There have been several reports on theoretically estimating the intracellular current induced by TMS [1][2][10]. Here we briefly describe a simple expression for the axial and transmembrane current induced by TMS. The electric field E induced by a brief magnetic pulse is given by the temporal derivative of the magnetic vector potential A, i.e., E(s, t) = −∂A(s, t)/∂t. Suppose the spatial gradient of the induced magnetic field is so small compared to a single cellular dimension that E can be approximated to be constant over all compartments. The simplest case is that one compartment has one distal and one proximal connection, in which the transmembrane current can be defined as the difference between the axial current going into and coming out of the adjacent compartment. The axial current between the adjacent compartment can be uniquely determined by distance and axial conductance between them (Fig. 5B), ITMS a (j, k) = Gjk  sk sj E(s) · ds = GjkE · sjk. (9) Hence the transmembrane current in the k-th compartment is, ITMS m (k) = ITMS a (j, k) −ITMS a (k, l) = E · (Gjksjk −Gklskl). (10) Now we see that the important factors to produce a change in local membrane potential by TMS are the differences in axial conductance and position between adjacent compartments. As Nagarajan and Kamitani pointed out [1][2], if the cellular size is small, the heterogeneity of the local cellular properties (e.g. branching, ending, bending of dendrites, and change in dendrite diameter) could be crucial in inducing an intracellular current by TMS. A multiple branching formulation is easily obtained from Eq.10. For simplicity, the induced electric field was approximated as a rectangular pulse. The pulse’s duration was set to be 1 ms, as in the network model, and the amplitude was varied within a physically valid range according to the numerical experiment’s conditions. Figure 3: A) The minimum intensity of the suppressive perturbation in our model (solid line for single- and dashed line for paired-pulse). The width of each curve indicates the suppressive latency range for a particular intensity of the perturbation (e.g. if At = 1.5 and ITMS = 12, the network is suppressed during -35.5 to 64.2 ms for a single pulse case; thus the suppressive latency range is 99.7 ms.) B) Experimental data of suppressive effect on a character recognition task replotted and modified from [7] and [11]. Both graph A and B equivalently indicate the susceptibility to TMS at the particular timing. To compare the absolute timing, the model results must be biased with the proper amount of delay in neural signal transmission given to the target neural population because these are measured from the timing of afferent signal arrival, not from the onset of the visual stimulus presentation. 3 Results 3.1 Temporally selective suppression of neural population The time course of the order parameters are illustrated in Fig. 2A. The network state can be also depicted as a point on a two-dimensional plane of the order parameters (Fig. 2B). Because TMS was modeled as a uniform perturbation, the mean activity, m0, was transiently increased just after the onset of the perturbation and was followed by a decrease of both m0 and m2. This result was obtained regardless of the onset timing of the perturbation. The final state of the network, however, critically depended on the onset timing of the perturbation. It converged to either of the bistable states; the silent state in which the network activity is zero or the active state in which the network holds a local excitation. When the perturbation was applied temporally close to the afferent onset, the network was completely suppressed and converged to the silent state. On the other hand, when the perturbation was too early or too late from the afferent onset, the network was transiently perturbed but finally converged to the active state. We could thus find the latency range during which the perturbation could suppress the network activity (Fig. 3A). The width of suppressive latency range increased with the amplitude of the perturbation and reached over 100 ms, which is comparable to typical experimental data of suppression of visual percepts by occipital TMS [6][7]. When we supplied a strong afferent input to the network, equivalent to a contrast increase in the visual stimulus, the suppressive latency range narrowed and shifted upward, and consequently, it became difficult to suppress the network activity without a strict timing control and larger amplitude of the perturbation. These results also agree with experiments using visual stimuli of various contrasts or visibilities [8][13]. The suppressive latency range consistently had a bell shape with the bottom at the afferent onset regardless of parameter changes, indicating that TMS works most suppressively at the timing when the afferent signal reaches the target Figure 4: Threshold reduction by paired pulses in the steady state. A) Network model and B) experimental data of the phosphene threshold replotted from [12]. The dashed line indicates the threshold for a single pulse TMS. neural population. 3.2 Sustained inhibition of neural population by subthreshold pulse Multiple TMS pulses within a short interval, or repetitive TMS (rTMS), can evoke phosphene or visual deficits even though each single pulse fails to elicit any perceptible effect. This experimental fact suggests that a TMS pulse, even if it is a subthreshold one, induces a certain sustained inhibitory effect and reduces the next pulse’s threshold to elicit perceptible interference. We considered the effect of paired pulses on a neural population and determined the duration of the threshold reduction by a subthreshold TMS. Here we set the subthreshold level at the upper limit of intensity which could not suppress the network at the induction timing. For the steady state, the initial subthreshold perturbation significantly reduced the suppressive threshold for the subsequent perturbation; the original threshold level was restored to more than 100 ms after the initial TMS (Fig. 4A). The threshold slightly increased when the pulse interval was shorter than τm. These results agree with experimental data of occipital TMS examining the relationship between phosphene threshold and the paired-pulse TMS interval [12] (Fig. 4B). For the transient state, we also observed that the initial subthreshold perturbation, indicated by the arrow in Fig. 3A, significantly reduced the suppressive threshold for the subsequent perturbation, and consequently, the suppressive latency range was extended up to 60 ms (Fig. 3A). These results are consistent with Amassian’s experimental results demonstrating that a preceding subthreshold TMS to the occipital cortex increased the suppressive latency range in a character recognition task [11] (Fig. 3B). 3.3 Transient inhibition of single neuron by subthreshold pulse Next, we focus on the effect of TMS on a single neuron. Results from a layer V pyramidal cell are illustrated in Fig. 5. An intense perturbation could inhibit the spike train for over 100ms after a brief spike burst (Fig. 5C1). This sustained spike inhibition might be caused by mechanisms similar to after-hyperpolarization or adaptation because the intracellular concentration of Ca2+ rapidly increased during the bursting period. These results are basically the same as Kamitani’s report [1] using Poisson synapses as current inputs to the neuron. We tried several types of morphology and found that it was difficult to suppress their original spike patterns when the size of the neuron was small (e.g. stellate cell) or when the neuron initially showed spike bursts (e.g. pyramidal cell with more bushy dendritic arbors). Figure 5: A) Layer V pyramidal cell. B) Compartment model of the neuron and the transmembrane current induced by TMS. C1, C2) The spike train perturbed by a suprathreshold and subthreshold TMS. C3) The temporal variation of the TMS threshold for inducing the spike inhibition. Thin lines in C1–C3 indicate the control condition without TMS. Using a morphology whose spike train was most easily suppressed (i.e. a pyramidal cell in Fig. 5A), we determined whether a preceding subthreshold pulse could induce the sustained inhibitory effect. Here, the suppressive threshold was defined as the lowest intensity of the perturbation yielding a spike inhibitory period whose duration was more than 100 ms. The perturbation below the suppressive threshold caused the spike timing shift as illustrated in Fig. 5C2. In the single cell’s case, the suppressive threshold highly depended on the relative timing within the spike interval and repeated its pattern periodically. In the initial spike interval from the subthreshold perturbation to the next spike, the suppressive threshold decreased but it recovered to the original level immediately after the next spike initiation (Fig. 5C3). This fast recovery of the suppressive threshold occurred regardless of the induction timing of the subthreshold perturbation, indicating that the sustained inhibitory effect by the preceding subthreshold perturbation lasted on the order of one (or two at most) spike interval, even with the most suppressible neuron model. The result is incomparably shorter than the experimental data as noted in Sec. 3.2, suggesting that it is impossible to attribute the neural substrates of the threshold reduction caused by the subthreshold pulse to only the membrane dynamics of a single neuron. 4 Discussion This paper focused on the dichotomy to determine what is essential for TMS-induced suppression–a network or a single neuron? Our current answer is that the network is essential because the temporal properties of suppression observed in the neural population model were totally consistent with the experimental data. In a single neuron model, we can actually observe a spike inhibition whose duration is comparable to the silent period of the electromyogram induced by TMS on the motor cortex [14]; however, the degree of suppression is highly dependent on the property of the high-threshold Ca2+ channel and is also very selective about the cellular morphology. In addition, the most critical point is that the sustained inhibitory effect of a subthreshold pulse cannot be explained by only the membrane mechanisms of a single neuron. These results indicate that TMS can induce a spike inhibition or a spike timing shift on a single neuron level, which yet seems not enough to explain the whole experimental data. As Walsh pointed out [15], TMS is highly unlikely to evoke a coordinated activity pattern or to stimulate a specific functional structure with a fine spatial resolution in the target cortical area. Rather, TMS seems to induce a random activity irrespective of the existing neural activity pattern. This paper simply modeled TMS as a uniform perturbation simultaneously applied to all neurons in the network. Walsh’s idea and our model are basically equivalent in that TMS gives a neural stimulation irrespective of the existing cortical activity evoked by the afferent input. Thus inactive parts of the network, or opponent neurons far from θ0, can be also activated by the perturbation if it is strong enough to raise such inactive neurons above the activation threshold, resulting in suppression of the original local excitation through lateral inhibitory connections. To suppress the network activity, TMS needs to be applied before the local excitation is built up and the inactive neurons are strongly suppressed. In the paired-pulse case, even though each TMS pulse was not strong enough to activate the suppressed neurons, the pre-activation by the preceding TMS can facilitate the subsequent TMS’s effect if it is applied until the network restores its original activity pattern. These are the basic mechanisms of TMS-induced suppression in our model, by which the computational results are consistent with the various experimental data. In addition to our computational evidence, recent neuropharmacological studies demonstrated that GABAergic drugs [16] and hyperventilation environment [17] could modulate TMS effect, suggesting that transsynaptic inhibition via inhibitory interneuron might be involved in TMS-induced effects. All these facts indicate that TMS-induced neural interference is mediated by a transsynaptic network, not only by single neuron properties, and that inhibitory interactions in a neural population play a critical role in yielding neural interference and its temporal properties. Acknowledgments We greatly appreciate our fruitful discussions with Dr. Yukiyasu Kamitani. References [1] Y. Kamitani, V. Bhalodi, Y. Kubota, and S. Shimojo, Neurocomputing 38-40, 697 (2001). [2] S. Nagarajan, D. Durand, and E. Warman, IEEE Trans Biomed Eng 40, 1175 (1993). [3] R. Ben-Yishai, R. Bar-Or, and H. Sompolinsky, Proc Natl Acad Sci USA 92, 3844 (1995). [4] H. Sompolinsky and R. Shapley, Curr Opin Neurobiol 7, 514 (1997). [5] D. Somers, S. Nelson, and M. Sur, J Neurosci 15, 5448 (1995). [6] Y. Kamitani and S. Shimojo, Nat Neurosci 2, 767 (1999). [7] V. Amassian, R. Cracco, P. Maccabee, J. Cracco, A. Rudell, and L. Eberle, Electroencephalogr Clin Neurophysiol 74, 458 (1989). [8] T. Kammer and H. Nusseck, Neuropsychologia 36, 1161 (1998). [9] Z. Mainen and T. Sejnowski, Nature 382, 363 (1996). [10] B. Roth and P. Basser, IEEE Trans Biomed Eng 37, 588 (1990). [11] V. Amassian, P. Maccabee, R. Cracco, J. Cracco, A. Rudell, and E. L, Brain Res 605, 317 (1993). [12] P. Ray, K. Meador, C. Epstein, D. Loring, and L. Day, J Clin Neurophysiol 15, 351 (1998). [13] V. Amassian, R. Cracco, P. Maccabee, and J. Cracco, Handbook of Transcranial Magnetic Stimulation (Arnold Publisher, 2002), chap. 30, pp. 323–34. [14] M. Inghilleri, A. Berardelli, G. Cruccu, and M. Manfredi, J Physiol 466, 521 (1993). [15] V. Walsh and A. Cowey, Nat Rev Neurosci 1, 73 (2000). [16] U. Ziemann, J. Rothwell, and M. Ridding, J Physiol 496.3, 873 (1996). [17] A. Priori, A. Berardelli, B. Mercuri, M. Inghilleri, and M. Manfredi, Electroencephalogr Clin Neurophysiol 97, 69 (1995).
2003
141
2,356
Efficient Multiscale Sampling from Products of Gaussian Mixtures Alexander T. Ihler, Erik B. Sudderth, William T. Freeman, and Alan S. Willsky Department of Electrical Engineering and Computer Science Massachusetts Institute of Technology ihler@mit.edu, esuddert@mit.edu, billf@ai.mit.edu, willsky@mit.edu Abstract The problem of approximating the product of several Gaussian mixture distributions arises in a number of contexts, including the nonparametric belief propagation (NBP) inference algorithm and the training of product of experts models. This paper develops two multiscale algorithms for sampling from a product of Gaussian mixtures, and compares their performance to existing methods. The first is a multiscale variant of previously proposed Monte Carlo techniques, with comparable theoretical guarantees but improved empirical convergence rates. The second makes use of approximate kernel density evaluation methods to construct a fast approximate sampler, which is guaranteed to sample points to within a tunable parameter ϵ of their true probability. We compare both multiscale samplers on a set of computational examples motivated by NBP, demonstrating significant improvements over existing methods. 1 Introduction Gaussian mixture densities are widely used to model complex, multimodal relationships. Although they are most commonly associated with parameter estimation procedures like the EM algorithm, kernel or Parzen window nonparametric density estimates [1] also take this form for Gaussian kernel functions. Products of Gaussian mixtures naturally arise whenever multiple sources of statistical information, each of which is individually modeled by a mixture density, are combined. For example, given two independent observations y1, y2 of an unknown variable x, the joint likelihood p(y1, y2|x) ∝p(y1|x)p(y2|x) is equal to the product of the marginal likelihoods. In a recently proposed nonparametric belief propagation (NBP) [2, 3] inference algorithm for graphical models, Gaussian mixture products are the mechanism by which nodes fuse information from different parts of the graph. Product densities also arise in the product of experts (PoE) [4] framework, in which complex densities are modeled as the product of many “local” constraint densities. The primary difficulty associated with products of Gaussian mixtures is computational. The product of d mixtures of N Gaussians is itself a Gaussian mixture with N d components. In many practical applications, it is infeasible to explicitly construct these components, and therefore intractable to build a smaller approximating mixture using the EM algorithm. Mixture products are thus typically approximated by drawing samples from the product density. These samples can be used to either form a Monte Carlo estimate of a desired expectation [4], or construct a kernel density estimate approximating the true product [2]. Although exact sampling requires exponential cost, Gibbs sampling algorithms may often be used to produce good approximate samples [2, 4]. When accurate approximations are required, existing methods for sampling from products of Gaussian mixtures often require a large computational cost. In particular, sampling is the primary computational burden for both NBP and PoE. This paper develops a pair of new sampling algorithms which use multiscale, KD-Tree [5] representations to improve accuracy and reduce computation. The first is a multiscale variant of existing Gibbs samplers [2, 4] with improved empirical convergence rate. The second makes use of approximate kernel density evaluation methods [6] to construct a fast ϵ-exact sampler which, in contrast with existing methods, is guaranteed to sample points to within a tunable parameter ϵ of their true probability. Following our presentation of the algorithms, we demonstrate their performance on a set of computational examples motivated by NBP and PoE. 2 Products of Gaussian Mixtures Let {p1(x), . . . , pd(x)} denote a set of d mixtures of N Gaussian densities, where pi(x) = X li wliN(x; µli, Λi) (1) Here, li are a set of labels for the N mixture components in pi(x), wli are the normalized component weights, and N(x; µli, Λi) denotes a normalized Gaussian density with mean µli and diagonal covariance Λi. For simplicity, we assume that all mixtures are of equal size N, and that the variances Λi are uniform within each mixture, although the algorithms which follow may be readily extended to problems where this is not the case. Our goal is to efficiently sample from the N d component mixture density p(x) ∝Qd i=1 pi(x). 2.1 Exact Sampling Sampling from the product density can be decomposed into two steps: randomly select one of the product density’s N d components, and then draw a sample from the corresponding Gaussian. Let each product density component be labeled as L = [l1, . . . , ld], where li labels one of the N components of pi(x).1 The relative weight of component L is given by wL = Qd i=1 wliN(x; µli, Λi) N(x; µL, ΛL) Λ−1 L = d X i=1 Λ−1 i Λ−1 L µL = d X i=1 Λ−1 i µli (2) where µL, ΛL are the mean and variance of product component L, and this equation may be evaluated at any x (the value x = µL may be numerically convenient). To form the product density, these weights are normalized by the weight partition function Z ≜P L wL. Determining Z exactly takes O(N d) time, and given this constant we can draw N samples from the distribution in O(N d) time and O(N) storage. This is done by drawing and sorting N uniform random variables on the interval [0, 1], and then computing the cumulative distribution of p(L) = wL/Z to determine which, if any, samples are drawn from each L. 2.2 Importance Sampling Importance sampling is a Monte Carlo method for approximately sampling from (or computing expectations of) an intractable distribution p(x), using a proposal distribution q(x) for which sampling is feasible [7]. To draw N samples from p(x), an importance sampler draws M ≥N samples xi ∼q(x), and assigns the ith sample weight wi ∝p(xi)/q(xi). The weights are then normalized by Z = P i wi, and N samples are drawn (with replacement) from the discrete distribution ¯p(xi) = wi/Z. 1Throughout this paper, we use lowercase letters (li) to label input density components, and capital letters (L = [l1, . . . , ld]) to label the corresponding product density components. Parallel Gibbs Sampler Sequential Gibbs Sampler Mix 1 Mix 2 Mix 1 Mix 2 ... X X ... Figure 1: Two possible Gibbs samplers for a product of 2 mixtures of 5 Gaussians. Arrows show the weights assigned to each label. Top left: At each iteration, one label is sampled conditioned on the other density’s current label. Bottom left: Alternate between sampling a data point X conditioned on the current labels, and resampling all labels in parallel. Right: After κ iterations, both Gibbs samplers identify mixture labels corresponding to a single kernel (solid) in the product density (dashed). For products of Gaussian mixtures, we consider two different proposal distributions. The first, which we refer to as mixture importance sampling, draws each sample by randomly selecting one of the d input mixtures, and sampling from its N components (q(x) = pi(x)). The remaining d −1 mixtures then provide the importance weight (wi = Q j̸=i pj(xi)). This is similar to the method used to combine density trees in [8]. Alternatively, we can approximate each input mixture pi(x) by a single Gaussian density qi(x), and choose q(x) ∝Q i qi(x). We call this procedure Gaussian importance sampling. 2.3 Gibbs Sampling Sampling from Gaussian mixture products is difficult because the joint distribution over product density labels, as defined by equation (2), is complicated. However, conditioned on the labels of all but one mixture, we can compute the conditional distribution over the remaining label in O(N) operations, and easily sample from it. Thus, we may use a Gibbs sampler [9] to draw asymptotically unbiased samples, as illustrated in Figure 1. At each iteration, the labels {lj}j̸=i for d −1 of the input mixtures are fixed, and the ith label is sampled from the corresponding conditional density. The newly chosen li is then fixed, and another label is updated. After a fixed number of iterations κ, a single sample is drawn from the product mixture component identified by the final labels. To draw N samples, the Gibbs sampler requires O(dκN 2) operations; see [2] for further details. The previously described sequential Gibbs sampler defines an iteration over the labels of the input mixtures. Another possibility uses the fact that, given a data point ¯x in the product density space, the d input mixture labels are conditionally independent [4]. Thus, one can define a parallel Gibbs sampler which alternates between sampling a data point conditioned on the current input mixture labels, and parallel sampling of the mixture labels given the current data point (see Figure 1). The complexity of this sampler is also O(dκN 2). 3 KD–Trees A KD-tree is a hierarchical representation of a point set which caches statistics of subsets of the data, thereby making later computations more efficient [5]. KD-trees are typically binary trees constructed by successively splitting the data along cardinal axes, grouping points by spatial location. We use the variable l to denote the label of a leaf node (the index of a single point), and l to denote a set of leaf labels summarized at a node of the KD-tree. xx x x x x x x xx x x x x x x xx x x x x x x {1,2,3,4,5,6,7,8} {1,2,3,4} {5,6,7,8} {3,4} {1,2} {5,6} {7,8} xx x x x x x x xx x x x x x x xx x x x x x x {1,2,3,4,5,6,7,8} {1,2,3,4} {5,6,7,8} {3,4} {1,2} {5,6} {7,8} xx x x x x x x xx x x x x x x xx x x x x x x {1,2,3,4,5,6,7,8} {1,2,3,4} {5,6,7,8} {3,4} {1,2} {5,6} {7,8} xx x x x x x x xx x x x x x x xx x x x x x x (a) (b) Figure 2: Two KD-tree representations of the same one-dim. point set. (a) Each node maintains a bounding box (label sets l are shown in braces). (b) Each node maintains mean and variance statistics. Figure 2 illustrates one-dimensional KD-trees which cache different sets of statistics. The first (Figure 2(a)) maintains bounding boxes around the data, allowing efficient computation of distances; similar trees are used in Section 4.2. Also shown in this figure are the label sets l for each node. The second (Figure 2(b)) precomputes means and variances of point clusters, providing a multi-scale Gaussian mixture representation used in Section 4.1. 3.1 Dual Tree Evaluation xx x x x x x x D min D max o o o o o o o o Figure 3: Two KD-tree representations may be combined to efficiently bound the maximum (Dmax) and minimum (Dmin) pairwise distances between subsets of the summarized points (bold). Multiscale representations have been effectively applied to kernel density estimation problems. Given a mixture of N Gaussians with means {µi}, we would like to evaluate p(xj) = X i wiN(xj; µi, Λ) (3) at a given set of M points {xj}. By representing the means {µi} and evaluation points {xj} with two different KD-trees, it is possible to define a dual–tree recursion [6] which is much faster than direct evaluation of all NM kernel–point pairs. The dual-tree algorithm uses bounding box statistics (as in Figure 2(a)) to approximately evaluate subsets of the data. For any set of labels in the density tree lµ and location tree lx, one may use pairwise distance bounds (see Figure 3) to find upper and lower bounds on X i∈lµ wiN(xj; µi, Λ) for any j ∈lx (4) When the distance bounds are sufficiently tight, the sum in equation (4) may be approximated by a constant, asymptotically allowing evaluation in O(N) operations [6]. 4 Sampling using Multiscale Representations 4.1 Gibbs Sampling on KD-Trees Although the pair of Gibbs samplers discussed in Section 2.3 are often effective, they sometimes require a very large number of iterations to produce accurate samples. The most difficult densities are those for which there are multiple widely separated modes, each of which is associated with disjoint subsets of the input mixture labels. In this case, conditioned on a set of labels corresponding to one mode, it is very unlikely that a label or data point corresponding to a different mode will be sampled, leading to slow convergence. Similar problems have been observed with Gibbs samplers on Markov random fields [9]. In these cases, convergence can often be accelerated by constructing a series of “coarser scale” approximate models in which the Gibbs sampler can move between modes more easily [10]. The primary challenge in developing these algorithms is to determine procedures for constructing accurate coarse scale approximations. For Gaussian mixture products, KD-trees provide a simple, intuitive, and easily constructed set of coarser scale models. As in Figure 2(b), each level of the KD-tree stores the mean and variance (biased by kernel size) of the summarized leaf nodes. We start at the same coarse scale for all input mixtures, and perform standard Gibbs sampling on that scale’s summary Gaussians. After several iterations, we condition on a data sample (as in the parallel Gibbs sampler of Section 2.3) to infer labels at the next finest scale. Intuitively, by gradually moving from coarse to fine scales, multiscale sampling can better explore all of the product density’s important modes. As the number of sampling iterations approaches infinity, multiscale samplers have the same asymptotic properties as standard Gibbs samplers. Unfortunately, there is no guarantee that multiscale sampling will improve performance. However, our simulation results indicate that it is usually very effective (see Section 5). 4.2 Epsilon-Exact Sampling using KD-Trees In this section, we use KD-trees to efficiently compute an approximation to the partition function Z, in a manner similar to the dual tree evaluation algorithm of [6] (see Section 3.1). This leads to an ϵ-exact sampler for which a label L = [l1, . . . , ld], with true probability pL, is guaranteed to be sampled with some probability ˆpL ∈[pL −ϵ, pL + ϵ]. We denote subsets of labels in the input densities with lowercase script (li), and sets of labels in the product density by L = l1 ×· · ·×ld. The approximate sampling procedure is similar to the exact sampler of Section 2.1. We first construct KD-tree representations of each input density (as in Figure 2(a)), and use a multi–tree recursion to approximate the partition function ˆZ = P ˆwL by summarizing sets of labels L where possible. Then, we compute the cumulative distribution of the sets of labels, giving each label set L probability ˆwL/ ˆZ. 4.2.1 Approximate Evaluation of the Weight Partition Function We first note that the weight function (equation (2)) can be rewritten using terms which involve only pairwise distances (the quotient is computed elementwise): wL = d Y j=1 wlj  · Y (li,lj>i) N(µli; µlj, Λ(i,j)) where Λ(i,j) = ΛiΛj ΛL (5) This equation may be divided into two parts: a weight contribution Qd i=1 wli, and a distance contribution (which we denote by KL) expressed in terms of the pairwise distances between kernel centers. We use the KD-trees’ distance bounds to compute bounds on each of these pairwise distance terms for a collection of labels L = l1×· · ·×ld. The product of the upper (lower) pairwise bounds is itself an upper (lower) bound on the total distance contribution for any label L within the set; denote these bounds by K+ L and K− L , respectively.2 By using the mean K∗ L = 1 2 K+ L + K− L  to approximate KL, we incur a maximum error 1 2 K+ L −K− L  for any label L ∈L. If this error is less than Zδ (which we ensure by comparing to a running lower bound Zmin on Z), we treat it as constant over the set L and approximate the contribution to Z by X L∈L ˆwL = K∗ L X L∈L ( Y i wli) = K∗ L Y i ( X li∈li wli) (6) This is easily calculated using cached statistics of the weight contained in each set. If the error is larger than Zδ, we need to refine at least one of the label sets; we use a heuristic to make this choice. This procedure is summarized in Algorithm 1. Note that all of the 2We can also use multipole methods such as the Fast Gauss Transform [11] to efficiently compute alternate, potentially tighter bounds on the pairwise values. MultiTree([l1, . . . , ld]) 1. For each pair of distributions (i, j > i), use their bounding boxes to compute (a) K(i,j) max ≥maxli∈li,lj∈lj N(xli −xlj; 0, Λ(i,j)) (b) K(i,j) min ≤minli∈li,lj∈lj N(xli −xlj; 0, Λ(i,j)) 2. Find Kmax = Q (i,j>i) K(i,j) max and Kmin = Q (i,j>i) K(i,j) min 3. If 1 2 (Kmax −Kmin) ≤Zminδ, approximate this combination of label sets: (a) ˆwL = 1 2 (Kmax + Kmin) (Q wli), where wli = P li∈li wli is cached by the KD-trees (b) Zmin = Zmin + Kmin (Q wli) (c) ˆZ = ˆZ + ˆwL 4. Otherwise, refine one of the label sets: (a) Find arg max(i,j) K(i,j) max/K(i,j) min such that range(li) ≥range(lj). (b) Call recursively: i. MultiTree([l1, . . . , Nearer(Left(li), Right(li), lj), . . . , ld]) ii. MultiTree([l1, . . . , Farther(Left(li), Right(li), lj), . . . , ld]) where Nearer(Farther) returns the nearer (farther) of the first two arguments to the third. Algorithm 1: Recursive multi-tree algorithm for approximately evaluating the partition function Z of the product of d Gaussian mixture densities represented by KD–trees. Zmin denotes a running lower bound on the partition function, while ˆZ is the current estimate. Initialize Zmin = ˆZ = 0. Given the final partition function estimate ˆZ, repeat Algorithm 1 with the following modifications: 3. (c) If ˆc ≤ˆZuj < ˆc + ˆwL for any j, draw L ∈L by sampling li ∈li with weight wli/wli 3. (d) ˆc = ˆc + ˆwL Algorithm 2: Recursive multi-tree algorithm for approximate sampling. ˆc denotes the cumulative sum of weights ˆwL. Initialize by sorting N uniform [0, 1] samples {uj}, and set Zmin = ˆc = 0. quantities required by this algorithm may be stored within the KD–trees, avoiding searches over the sets li. At the algorithm’s termination, the total error is bounded by |Z −ˆZ| ≤ X L |wL −ˆwL| ≤ X L 1 2 K+ L −K− L  Y wli ≤Zδ X L Y wli ≤Zδ (7) where the last inequality follows because each input mixture’s weights are normalized. This guarantees that our estimate ˆZ is within a fractional tolerance δ of its true value. 4.2.2 Approximate Sampling from the Cumulative Distribution To use the partition function estimate ˆZ for approximate sampling, we repeat the approximation process in a manner similar to the exact sampler: draw N sorted uniform random variables, and then locate these samples in the cumulative distribution. We do not explicitly construct the cumulative distribution, but instead use the same approximate partial weight sums used to determine ˆZ (see equation (6)) to find the block of labels L = l1 ×· · ·×ld associated with each sample. Since all labels L ∈L within this block have approximately equal distance contribution KL ≈K∗ L, we independently sample a label li within each set li proportionally to the weight wli. This procedure is shown in Algorithm 2. Note that, to be consistent about when approximations are made and thus produce weights ˆwL which still sum to ˆZ, we repeat the procedure for computing ˆZ exactly, including recomputing the running lower bound Zmin. This algorithm is guaranteed to sample each label L with probability ˆpL ∈[pL −ϵ, pL + ϵ]: |ˆpL −pL| = ˆwL ˆZ −wL Z ≤ 2δ 1 −δ ≜ϵ (8) Proof: From our bounds on the error of K∗ L, | wL Z − ˆ wL Z | = |KL−K∗ L| Z Q wli ≤δ(Q wli) ≤δ and | ˆ wL Z − ˆ wL ˆ Z | = ˆ wL Z |1 − 1 ˆ Z/Z | ≤ ˆ wL Z |1 − 1 1−δ | ≤ ˆ wL Z δ 1−δ ≤1+δ 1−δ δ. Thus, the estimated probability of choosing label L has at most error | wL Z −ˆ wL ˆ Z | ≤| wL Z −ˆ wL Z | + | ˆ wL Z −ˆ wL ˆ Z | ≤ 2δ 1−δ . 5 Computational Examples 5.1 Products of One–Dimensional Gaussian Mixtures In this section, we compare the sampling methods discussed in this paper on three challenging one–dimensional examples, each involving products of mixtures of 100 Gaussians (see Figure 4). We measure performance by drawing 100 samples, constructing a kernel density estimate using likelihood cross–validation [1], and calculating the KL divergence from the true product density. We repeat this test 250 times for each of a range of parameter settings of each algorithm, and plot the average KL divergence versus computation time. For the product of three mixtures in Figure 4(a), the multiscale (MS) Gibbs samplers dramatically outperform standard Gibbs sampling. In addition, we see that sequential Gibbs sampling is more accurate than parallel. Both of these differences can be attributed to the bimodal product density. However, the most effective algorithm is the ϵ–exact sampler, which matches exact sampling’s performance in far less time (0.05 versus 2.75 seconds). For a product of five densities (Figure 4(b)), the cost of exact sampling increases to 7.6 hours, but the ϵ–exact sampler matches its performance in less than one minute. Even faster, however, is the sequential MS Gibbs sampler, which takes only 0.3 seconds. For the previous two examples, mixture importance sampling (IS) is nearly as accurate as the best multiscale methods (Gaussian IS seems ineffective). However, in cases where all of the input densities have little overlap with the product density, mixture IS performs very poorly (see Figure 4(c)). In contrast, multiscale samplers perform very well in such situations, because they can discard large numbers of low weight product density kernels. 5.2 Tracking an Object using Nonparametric Belief Propagation NBP [2] solves inference problems on non–Gaussian graphical models by propagating the results of local sampling computations. Using our multiscale samplers, we applied NBP to a simple tracking problem in which we observe a slowly moving object in a sea of randomly shifting clutter. Figure 5 compares the posterior distributions of different samplers two time steps after an observation containing only clutter. ϵ–exact sampling matches the performance of exact sampling, but takes half as long. In contrast, a standard particle filter [7], allowed ten times more computation, loses track. As in the previous section, multiscale Gibbs sampling is much more accurate than standard Gibbs sampling. 6 Discussion For products of a few mixtures, the ϵ–exact sampler is extremely fast, and is guaranteed to give good performance. As the number of mixtures grow, ϵ–exact sampling may become overly costly, but the sequential multiscale Gibbs sampler typically produces accurate samples with only a few iterations. We are currently investigating the performance of these algorithms on large–scale nonparametric belief propagation applications. References [1] B. W. Silverman. Density Estimation for Statistics and Data Analysis. Chapman & Hall, 1986. [2] E. B. Sudderth, A. T. Ihler, W. T. Freeman, and A. S. Willsky. Nonparametric belief propagation. In CVPR, 2003. [3] M. Isard. PAMPAS: Real–valued graphical models for computer vision. In CVPR, 2003. [4] G. E. Hinton. Training products of experts by minimizing contrastive divergence. Technical Report 2000-004, Gatsby Computational Neuroscience Unit, 2000. [5] K. Deng and A. W. Moore. Multiresolution instance-based learning. In IJCAI, 1995. [6] A. G. Gray and A. W. Moore. Very fast multivariate kernel density estimation. In JSM, 2003. [7] A. Doucet, N. de Freitas, and N. Gordon, editors. Sequential Monte Carlo Methods in Practice. Springer-Verlag, New York, 2001. [8] S. Thrun, J. Langford, and D. Fox. Monte Carlo HMMs. In ICML, pages 415–424, 1999. [9] S. Geman and D. Geman. Stochastic relaxation, Gibbs distributions, and the Bayesian restoration of images. IEEE Trans. PAMI, 6(6):721–741, November 1984. [10] J. S. Liu and C. Sabatti. Generalised Gibbs sampler and multigrid Monte Carlo for Bayesian computation. Biometrika, 87(2):353–369, 2000. [11] J. Strain. The fast Gauss transform with variable scales. SIAM J. SSC, 12(5):1131–1139, 1991. (a) Input Mixtures Product Mixture 0 0.1 0.2 0.3 0.4 0.5 0.6 0 0.1 0.2 0.3 0.4 0.5 Computation Time (sec) KL Divergence Exact MS ε−Exact MS Seq. Gibbs MS Par. Gibbs Seq. Gibbs Par. Gibbs Gaussian IS Mixture IS (b) Input Mixtures Product Mixture 0 0.5 1 1.5 2 2.5 0 0.2 0.4 0.6 0.8 1 1.2 1.4 1.6 1.8 2 Computation Time (sec) KL Divergence Exact MS ε−Exact MS Seq. Gibbs MS Par. Gibbs Seq. Gibbs Par. Gibbs Gaussian IS Mixture IS (c) Input Mixtures Product Mixture 0 0.1 0.2 0.3 0.4 0.5 0.6 0 0.1 0.2 0.3 0.4 0.5 Computation Time (sec) KL Divergence Exact MS ε−Exact MS Seq. Gibbs MS Par. Gibbs Seq. Gibbs Par. Gibbs Gaussian IS Mixture IS Figure 4: Comparison of average sampling accuracy versus computation time for different algorithms (see text). (a) Product of 3 mixtures (exact requires 2.75 sec). (b) Product of 5 mixtures (exact requires 7.6 hours). (c) Product of 2 mixtures (exact requires 0.02 sec). Target Location Observations Exact NBP Target Location ε−Exact NBP Particle Filter Target Location MS Seq. Gibbs NBP Seq. Gibbs NBP (a) (b) (c) Figure 5: Object tracking using NBP. Plots show the posterior distributions two time steps after an observation containing only clutter. The particle filter and Gibbs samplers are allowed equal computation. (a) Latest observations, and exact sampling posterior. (b) ϵ–exact sampling is very accurate, while a particle filter loses track. (c) Multiscale Gibbs sampling leads to improved performance.
2003
142
2,357
Markov Models for Automated ECG Interval Analysis Nicholas P. Hughes, Lionel Tarassenko and Stephen J. Roberts Department of Engineering Science University of Oxford Oxford, 0X1 3PJ, UK {nph,lionel,sjrob}@robots.ox.ac.uk Abstract We examine the use of hidden Markov and hidden semi-Markov models for automatically segmenting an electrocardiogram waveform into its constituent waveform features. An undecimated wavelet transform is used to generate an overcomplete representation of the signal that is more appropriate for subsequent modelling. We show that the state durations implicit in a standard hidden Markov model are ill-suited to those of real ECG features, and we investigate the use of hidden semi-Markov models for improved state duration modelling. 1 Introduction The development of new drugs by the pharmaceutical industry is a costly and lengthy process, with the time from concept to final product typically lasting ten years. Perhaps the most critical stage of this process is the phase one study, where the drug is administered to humans for the first time. During this stage each subject is carefully monitored for any unexpected adverse effects which may be brought about by the drug. Of particular interest is the electrocardiogram (ECG1) of the patient, which provides detailed information about the state of the patient’s heart. By examining the ECG signal in detail it is possible to derive a number of informative measurements from the characteristic ECG waveform. These can then be used to assess the medical well-being of the patient, and more importantly, detect any potential side effects of the drug on the cardiac rhythm. The most important of these measurements is the “QT interval”. In particular, drug-induced prolongation of the QT interval (so called Long QT Syndrome) can result in a very fast, abnormal heart rhythm known as torsade de pointes, which is often followed by sudden cardiac death 2. In practice, QT interval measurements are carried out manually by specially trained ECG analysts. This is an expensive and time consuming process, which is susceptible to mistakes by the analysts and provides no associated degree of confidence (or accuracy) in the measurements. This problem was recently highlighted in the case of the antihistamine 1The ECG is also referred to as the EKG. 2This is known as Sudden Arrhythmia Death Syndrome, or SADS. −0.08 −0.06 −0.04 −0.02 0 0.02 0.04 0.06 P wave Baseline 1 QRS complex T wave U wave Baseline 2 Pon Poff Q J Toff Uoff Figure 1: A human ECG waveform. terfenadine, which had the side-effect of significantly prolonging the QT interval in a number of patients. Unfortunately this side-effect was not detected in the clinical trials and only came to light after a large number of people had unexpectedly died whilst taking the drug [8]. In this paper we consider the problem of automated ECG interval analysis from a machine learning perspective. In particular, we examine the use of hidden Markov models for automatically segmenting an ECG signal into its constituent waveform features. A redundant wavelet transform is used to provide an informative representation which is both robust to noise and tuned to the morphological characteristics of the waveform features. Finally we investigate the use of hidden semi-Markov models for explicit state duration modelling. 2 The Electrocardiogram 2.1 The ECG Waveform Each individual heartbeat is comprised of a number of distinct cardiological stages, which in turn give rise to a set of distinct features in the ECG waveform. These features represent either depolarization (electrical discharging) or repolarization (electrical recharging) of the muscle cells in particular regions of the heart. Figure 1 shows a human ECG waveform and the associated features. The standard features of the ECG waveform are the P wave, the QRS complex and the T wave. Additionally a small U wave (following the T wave) is occasionally present. The cardiac cycle begins with the P wave (the start and end points of which are referred to as Pon and Poff), which corresponds to the period of atrial depolarization in the heart. This is followed by the QRS complex, which is generally the most recognisable feature of an ECG waveform, and corresponds to the period of ventricular depolarization. The start and end points of the QRS complex are referred to as the Q and J points. The T wave follows the QRS complex and corresponds to the period of ventricular repolarization. The end point of the T wave is referred to as Toffand represents the end of the cardiac cycle (presuming the absence of a U wave). 2.2 ECG Interval Analysis The timing between the onset and offset of particular features of the ECG (referred to as an interval) is of great importance since it provides a measure of the state of the heart and can indicate the presence of certain cardiological conditions. The two most important intervals in the ECG waveform are the QT interval and the PR interval. The QT interval is defined as the time from the start of the QRS complex to the end of the T wave, i.e. Toff−Q, and corresponds to the total duration of electrical activity (both depolarization and repolarization) in the ventricles. Similarly, the PR interval is defined as the time from the start of the P wave to the start of the QRS complex, i.e. Q −Pon, and corresponds to the time from the onset of atrial depolarization to the onset of ventricular depolarization. The measurement of the QT interval is complicated by the fact that a precise mathematical definition of the end of the T wave does not exist. Thus T wave end measurements are inherently subjective and the resulting QT interval measurements often suffer from a high degree of inter- and intra-analyst variability. An automated ECG interval analysis system, which could provide robust and consistent measurements (together with an associated degree of confidence in each measurement), would therefore be of great benefit to the medical community. 2.3 Previous Work on Automated ECG Interval Analysis The vast majority of algorithms for automated QT analysis are based on threshold methods which attempt to predict the end of the T wave as the point where the T wave crosses a predetermined threshold [3]. An exception to this is the work of Koski [4] who trained a hidden Markov model on raw ECG data using the Baum-Welch algorithm. However the performance of this model was not assessed against a labelled data set of ECG waveforms. More recently, Graja and Boucher have investigated the use of hidden Markov tree models for segmenting ECG signals encoded with the discrete wavelet transform [2]. 3 Data Collection In order to develop an automated system for ECG interval analysis, we collected a data set of over 100 ECG waveforms (sampled at 500 Hz), together with the corresponding waveform feature boundaries3 as determined by a group of expert ECG analysts. Due to time constraints it was not possible for each expert analyst to label every ECG waveform in the data set. Therefore we chose to distribute the waveforms at random amongst the different experts (such that each waveform was measured by one expert only). For each ECG waveform, the following points were labelled: Pon, Poff, Q, J and Toff(if a U wave was present the Uoffpoint was also labelled). In addition, the point corresponding to the start of the next P wave (i.e. the P wave of the following heart beat), NPon, was also labelled. During the data collection exercise, we found that it was not possible to obtain reliable estimates for the Ton and Uon points, and therefore these were taken to be the J and Toffpoints respectively. 4 A Hidden Markov Model for ECG Interval Analysis It is natural to view the ECG signal as the result of a generative process, in which each waveform feature is generated by the corresponding cardiological state of the heart. In addition, the ECG state sequence obeys the Markov property, since each state is solely 3We developed a novel software application which enabled an ECG analyst to label the boundaries of each of the features of an ECG waveform, using a pair of “onscreen calipers”. P wave 5.5 47.2 0.5 4.4 26.5 15.9 Baseline 1 1.7 80.0 1.6 1.3 9.5 5.9 QRS complex 1.0 11.3 79.0 4.6 2.7 1.4 T wave 0.9 1.8 1.2 83.6 7.3 5.2 Baseline 2 2.3 32.2 1.3 3.5 31.8 28.9 U wave 0.6 25.3 0.6 3.9 26.8 42.8 Table 1: Percentage confusion matrix for an HMM trained on the raw ECG data. dependent on the previous state. Thus, hidden Markov models (HMMs) would seem ideally suited to the task of segmenting an ECG signal into its constituent waveform features. Using the labelled data set of ECG waveforms we trained a hidden Markov model in a supervised manner. The model was comprised of the following states: P wave, QRS complex, T wave, U wave, and Baseline. The parameters of the transition matrix aij were computed using the maximum likelihood estimates, given by: ˆaij = nij/ X k nik (1) where nij is the total number of transitions from state i to state j over all of the label sequences. We estimated the observation (or emission) probability densities bi for each state i by fitting a Gaussian mixture model (GMM) to the set of signal samples corresponding to that particular state4. Model selection for the GMM was performed using the minimum description length framework [1]. In our initial experiments, we found that the use of a single state to represent all the regions of baseline in the ECG waveform resulted in poor performance when the model was used to infer the underlying state sequence of new unseen waveforms. In particular, a single baseline state allowed for the possibility of the model returning to the P wave state, following a P wave - Baseline sequence. Therefore we decided to partition the Baseline state into two separate states; one corresponding to the region of baseline between the Poffand Q points (which we termed “Baseline 1”), and a second corresponding to the region between the Toffand NPon points5 (termed “Baseline 2”). In order to fully evaluate the performance of our model, we performed 5-fold crossvalidation on the data set of 100 labelled ECGs. Prior to training and testing, the raw ECG data was pre-processed to have zero mean and unit energy. This was done in order to normalise the dynamic range of the signals and stabilise the baseline sections. Once the model had been trained, the Viterbi algorithm [9] was used to infer the optimal state sequence for each of the signals in the test set. Table 1 shows the resulting confusion matrix (computed from the state assignments on a sample-point basis). Although reasonable classification accuracies are obtained for the QRS complex and T wave states, the P wave state is almost entirely misclassified as Baseline 1, Baseline 2 or U wave. In order to improve the performance of the model, we require an encoding of the ECG that captures the key temporal and spectral characteristics of the waveform features in a more informative representation than that of the raw time series data alone. Thus we now examine the use of wavelet methods for this purpose. 4We also investigated autoregressive observation densities, although these were found to perform poorly in comparison to GMMs. 5If a U wave was present the Uoffpoint was used instead of Toff. P wave 74.2 14.4 0.1 0.3 11.0 0 Baseline 1 15.8 81.5 1.7 0.1 0.9 0 QRS complex 0 2.1 94.4 3.5 0 0 T wave 0 0 1.0 96.1 2.2 0.7 Baseline 2 1.4 0 0 1.6 95.6 1.4 U wave 0.1 0.1 0.1 1.7 85.6 12.4 Table 2: Percentage confusion matrix for an HMM trained on the wavelet encoded ECG. 4.1 Wavelet Encoding of ECG Wavelets are a class of functions that possess compact support and form a basis for all finite energy signals. They are able to capture the non-stationary spectral characteristics of a signal by decomposing it over a set of atoms which are localised in both time and frequency. These atoms are generated by scaling and translating a single mother wavelet. The most popular wavelet transform algorithm is the discrete wavelet transform (DWT), which uses the set of dyadic scales (i.e. those based on powers of two) and translates of the mother wavelet to form an orthonormal basis for signal analysis. The DWT is therefore most suited to applications such as data compression where a compact description of a signal is required. An alternative transform is derived by allowing the translation parameter to vary continuously, whilst restricting the scale parameter to a dyadic scale (thus, the set of time-frequency atoms now forms a frame). This leads to the undecimated wavelet transform6 (UWT), which for a signal s ∈L2(R), is given by: wυ(τ) = 1 √υ Z +∞ −∞ s(t) ψ∗ t −τ υ  dt υ = 2k, k ∈Z, τ ∈R (2) where wυ(τ) are the UWT coefficients at scale υ and shift τ, and ψ∗is the complex conjugate of the mother wavelet. In practice the UWT can be computed in O(N log N) using fast filter bank algorithms [6]. The UWT is particularly well-suited to ECG interval analysis as it provides a timefrequency description of the ECG signal on a sample-by-sample basis. In addition, the UWT coefficients are translation-invariant (unlike the DWT coefficients), which is important for pattern recognition applications. In order to find the most effective wavelet basis for our application, we examined the performance of HMMs trained on ECG data encoded with wavelets from the Daubechies, Symlet, Coiflet and Biorthogonal wavelet families. In the frequency domain, a wavelet at a given scale is associated with a bandpass filter7 of a particular centre frequency. Thus the optimal wavelet basis will correspond to the set of bandpass filters that are tuned to the unique spectral characteristics of the ECG. In our experiments we found that the Coiflet wavelet with two vanishing moments resulted in the highest overall classification accuracy. Table 2 shows the results for this wavelet. It is evident that the UWT encoding results in a significant improvement in classification accuracy (for all but the U wave state), when compared with the results obtained on the raw ECG data. 6The undecimated wavelet transform is also known as the stationary wavelet transform and the translation-invariant wavelet transform. 7These filters satisfy a constant relative bandwidth property, known as “constant-Q”. 0 50 100 150 200 0 0.01 0.02 0.03 State duration (ms) P wave True Model 0 50 100 150 0 0.005 0.01 0.015 0.02 0.025 0.03 0.035 0.04 State duration (ms) QRS complex True Model 0 100 200 300 400 0 0.002 0.004 0.006 0.008 0.01 0.012 0.014 State duration (ms) T wave True Model Figure 2: Histograms of the true state durations and those decoded by the HMM. 4.2 HMM State Durations A significant limitation of the standard hidden Markov model is the manner in which it models state durations. For a given state i with self-transition coefficient aii, the probability density of the state duration d is a geometric distribution, given by: pi(d) = (aii)d−1(1 −aii) (3) For the waveform features of the ECG signal, this geometric distribution is inappropriate. Figure 2 shows histograms of the true state durations and the durations of the states decoded by the HMM, for each of the P wave, QRS complex and T wave states. In each case it is clear that a significant number of decoded states have a duration that is much shorter than the minimum state duration observed with real ECG signals. Thus for a given ECG waveform the decoded state sequence may contain many more state transitions than are actually present in the signal. The resulting HMM state segmentation is then likely to be poor and the resulting QT and PR interval measurements unreliable. One solution to this problem is to post-process the decoded state sequences using a median filter designed to smooth out sequences whose duration is known to be physiologically implausible. A more principled and more effective approach, however, is to model the probability density of the individual state durations explicitly, using a hidden semi-Markov model. 5 A Hidden Semi-Markov Model for ECG Interval Analysis A hidden semi-Markov model (HSMM) differs from a standard HMM in that each of the self-transition coefficients aii are set to zero, and an explicit probability density is specified for the duration of each state [5]. In this way, the individual state duration densities govern the amount of time the model spends in a given state, and the transition matrix governs the probability of the next state once this time has elapsed. Thus the underlying stochastic process is now a “semi-Markov” process. To model the durations pi(d) of the various waveform features of the ECG, we used a Gamma density since this is a positive distribution which is able to capture the inherent skewness of the ECG state durations. For each state i, maximum likelihood estimates of the shape and scale parameters were computed directly from the set of labelled ECG signals (as part of the cross-validation procedure). In order to infer the most probable state sequence Q = {q1q2 · · · qT } for a given observation sequence O = {O1O2 · · · OT }, the standard Viterbi algorithm must be modified to 0 50 100 150 200 0 0.01 0.02 0.03 State duration (ms) P wave True Model 0 50 100 150 0 0.005 0.01 0.015 0.02 0.025 0.03 0.035 0.04 State duration (ms) QRS complex True Model 0 100 200 300 400 0 0.002 0.004 0.006 0.008 0.01 0.012 0.014 State duration (ms) T wave True Model Figure 3: Histograms of the true state durations and those decoded by the HSMM. handle the explicit state duration densities of the HSMM. We start by defining the likelihood of the most probable state sequence that accounts for the first t observations and ends in state i: δt(i) = max q1q2···qt−1 p(q1q2 · · · qt = i, O1O2 · · · Ot|λ) (4) where λ is the set of parameters governing the HSMM. The recurrence relation for computing δt(i) is then given by: δt(i) = max di n max j  δt−di(j)aji pi(di) Πt t′=t−di+1bi(Ot′) o (5) where the outer maximisation is performed over all possible values of the state duration di for state i, and the inner maximisation is over all states j. At each time t and for each state i, the two arguments that maximise equation (5) are recorded, and a simple backtracking procedure can then be used to find the most probable state sequence. The time complexity of the Viterbi decoding procedure for an HSMM is given by O(K2 T Dmax), where K is the total number of states, and Dmax is the maximum range of state durations over all K states, i.e. Dmax = maxi(max(di) −min(di)). As noted in [7], scaling the computation of δt(i) to avoid underflow is non-trivial. However, by simply computing log δt(i) it is possible to avoid any numerical problems. Figure 3 shows histograms of the resulting state durations for an HSMM trained on a wavelet encoding of the ECG (using 5-fold cross-validation). Clearly, the durations of the decoded state sequences are very well matched to the true durations of each of the ECG features. This improvement in duration modelling is reflected in the accuracy and robustness of the segmentations produced by the HSMM. Model Pon Q J Toff HMM on raw ECG 157 31 27 139 HMM on wavelet encoded ECG 12 11 20 46 HSMM on wavelet encoded ECG 13 3 7 12 Table 3: Mean absolute segmentation errors (in milliseconds) for each of the models. Table 3 shows the mean absolute errors8 for the Pon, Q, J and Toffpoints, for each of the models discussed. On the important task of accurately determining the Q and Toffpoints for QT interval measurements, the HSMM significantly outperforms the HMM. 8The error was taken to be the time difference from the first decoded segment boundary to the true segment boundary (of the same type). 6 Discussion In this work we have focused on the two core issues in developing an automated system for ECG interval analysis: the choice of representation for the ECG signal and the choice of model for the segmentation. We have demonstrated that wavelet methods, and in particular the undecimated wavelet transform, can be used to generate an encoding of the ECG which is tuned to the unique spectral characteristics of the ECG waveform features. With this representation the performance of the models on new unseen ECG waveforms is significantly better than similar models trained on the raw time series data. We have also shown that the robustness of the segmentation process can be improved through the use of explicit state duration modelling with hidden semi-Markov models. With these models the detection accuracy of the Q and Toffpoints compares favourably with current methods for automated QT analysis [3, 2]. A key advantage of probabilistic models over traditional threshold-based methods for ECG segmentation is that they can be used to generate a confidence measure for each segmented ECG signal. This is achieved by considering the log likelihood of the observed signal given the model, i.e. log p(O|λ), which can be computed efficiently for both HMMs and HSMMs. Given this confidence measure, it should be possible to determine a suitable threshold for rejecting ECG signals which are either too noisy or too corrupted to provide reliable estimates of the QT and PR intervals. The robustness with which we can detect such unreliable QT interval measurements based on this log likelihood score is one of the main focuses of our current research. Acknowledgements We thank Cardio Analytics Ltd for help with data collection and labelling, and Oxford BioSignals Ltd for funding this research. NH thanks Iead Rezek for many useful discussions, and the anonymous reviewers for their helpful comments. References [1] M. A. T. Figueiredo and A. K. Jain. Unsupervised learning of finite mixture models. IEEE Transactions on Pattern Analysis and Machine Intelligence, 24(3):381–396, 2002. [2] S. Graja and J. M. Boucher. Multiscale hidden Markov model applied to ECG segmentation. In WISP 2003: IEEE International Symposium on Intelligent Signal Processing, pages 105–109, Budapest, Hungary, 2003. [3] R. Jan´e, A. Blasi, J. Garc´ia, and P. Laguna. Evaluation of an automatic threshold based detector of waveform limits in Holter ECG with QT database. In Computers in Cardiology, pages 295– 298. IEEE Press, 1997. [4] A. Koski. Modelling ECG signals with hidden Markov models. Artificial Intelligence in Medicine, 8:453–471, 1996. [5] S. E. Levinson. Continuously variable duration hidden Markov models for automatic speech recognition. Computer Speech and Language, 1(1):29–45, 1986. [6] S. Mallat. A Wavelet Tour of Signal Processing. Academic Press, 2nd edition, 1999. [7] K. P. Murphy. Hidden semi-Markov models. Technical report, MIT AI Lab, 2002. [8] C. M. Pratt and S. Ruberg. The dose-response relationship between Terfenadine (Seldane) and the QTc interval on the scalar electrocardiogram in normals and patients with cardiovascular disease and the QTc interval variability. American Heart Journal, 131(3):472–480, 1996. [9] L. R. Rabiner. A tutorial on hidden Markov models and selected applications in speech recognition. Proceedings of the IEEE, 77(2):257–286, 1989.
2003
143
2,358
A Mixed-Signal VLSI for Real-Time Generation of Edge-Based Image Vectors Masakazu Yagi, Hideo Yamasaki, and Tadashi Shibata* Department of Electronic Engineering *Department of Frontier Informatics The University of Tokyo 7-3-1 Hongo, Bunkyo-ku, Tokyo, 113-8656, Japan mgoat@dent.osaka-u.ac.jp, hideo@if.t.u-tokyo.ac.jp, shibata@ee.t.u-tokyo.ac.jp Abstract A mixed-signal image filtering VLSI has been developed aiming at real-time generation of edge-based image vectors for robust image recognition. A four-stage asynchronous median detection architecture based on analog digital mixed-signal circuits has been introduced to determine the threshold value of edge detection, the key processing parameter in vector generation. As a result, a fully seamless pipeline processing from threshold detection to edge feature map generation has been established. A prototype chip was designed in a 0.35-µm double-polysilicon three-metal-layer CMOS technology and the concept was verified by the fabricated chip. The chip generates a 64-dimension feature vector from a 64x64-pixel gray scale image every 80µsec. This is about 104 times faster than the software computation, making a real-time image recognition system feasible. 1 Introduction The development of human-like image recognition systems is a key issue in information technology. However, a number of algorithms developed for robust image recognition so far [1]-[3] are mostly implemented as software systems running on general-purpose computers. Since the algorithms are generally complex and include a lot of floating point operations, they are computationally too expensive to build real-time systems. Development of hardware-friendly algorithms and their direct VLSI implementation would be a promising solution for real-time response systems. Being inspired by the biological principle that edge information is firstly detected in the visual cortex, we have developed an edge-based image representation algorithm compatible to hardware processing. In this algorithm, multiple-direction edges extracted from an original gray scale image is utilized to form a feature vector. Since the spatial distribution of principal edges is represented by a vector, it was named Projected Principal-Edge Distribution (PPED) [4],[5], or formerly called Principal Axis Projection (PAP) [6],[7]. (The algorithm is explained later.) Since the PPED vectors very well represent the human perception of similarity among images, robust image recognition systems have been developed using PPED vectors in conjunction with the analog soft pattern classifier [4],[8], the digital VQ (Vector Quantization) processor [9], and support vector machines [10] . The robust nature of PPED representation is demonstrated in Fig. 1, where the system was applied to cephalometric landmark identification (identifying specific anatomical landmarks on medical radiographs) as an example, one of the most important clinical practices of expert dentists in orthodontics [6],[7]. Typical X-ray images to be experienced by apprentice doctors were converted to PPED vectors and utilized as templates for vector matching. The system performance has been proven for 250 head film samples regarding the fundamental 26 landmarks [11]. Important to note is the successful detection of the landmark on the soft tissue boundary (the tip of the lower lip) shown in Fig. 1(c). Landmarks on soft tissues are very difficult to detect as compared to landmarks on hard tissues (solid bones) because only faint images are captured on radiographs. The successful detection is due to the median algorithm that determines the threshold value for edge detection. Landmark on soft tissue Sella Orbitale By our system By expert dentists Nasion (a) (b) (c) Fig. 1: Image recognition using PPED vectors: (a,b) cephalometric landmark identification; (c) successful landmark detection on soft tissue. We have adopted the median value of spatial variance of luminance within the filtering kernel (5x5 pixels), which allows us to extract all essential features in a delicate gray scale image. However, the problem is the high computational cost in determining the median value. It takes about 0.6 sec to generate one PPED vector from a 64x64-pixel image (a standard image size for recognition in our system) on a SUN workstation, making real time processing unrealistic. About 90% of the computation time is for edge detection from an input image, in which most of the time is spent for median detection. Then the purpose of this work is to develop a new architecture median-filter VLSI subsystem for real-time PPED-vector generation. Special attention has been paid to realize a fully seamless pipeline processing from threshold detection to edge feature map generation by employing the four-stage asynchronous median detection architecture. 2 Projected Principal Edge Distribution (PPED) Projected Principal Edge Distribution (PPED) algorithm [5],[6] is briefly explained using Fig. 2(a). A 5x5-pixel block taken from a 64x64-pixel target image is subjected to edge detection filtering in four principal directions, i.e. horizontal, vertical, and ±45-degree directions. In the figure, horizontal edge filtering is shown as an example. (The filtering kernels used for edge detection are given in Fig. 2(b).) In order to determine the threshold value for edge detection, all the absolute-value differences between two neighboring pixels are calculated in both vertical and horizontal directions and the median value is taken as the threshold. By scanning the 5x5-pixel filtering kernels in the target image, four 64x64 edge-flag maps are generated, which are called feature maps. In the horizontal feature map, for example, edge flags in every four rows are accumulated and spatial distribution of edge flags are represented by a histogram having 16 elements. Similar procedures are applied to other three directions to form respective histograms each having 16 elements. Finally, a 64-dimension vector is formed by series-connecting the four histograms in the order of horizontal, +45-degree, vertical, and –45-degree. 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 1 1 1 1 1 -1-1-1-1-1 Scan Absolute value difference between neiboring pels. 64x64 Edge Filter (Horizontal) Feature Map (64x64) (Horizontal) Threshold || Median PPED Vector (Horizontal Section) Edge Detection Threshold Detection (16 elements) 1 -1 0 1 -1 0 1 -1 0 1 -1 0 1 -1 0 0 0 0 0 0 0 0 0 0 0 Horizontal +45-degree 0 1 1 1 1 1 -1 -1 -1 -1 -1 0 0 0 0 0 0 0 0 0 0 0 0 0 0 Vertical -45-degree 0 0 1 0 0 -1 0 1 0 0 -1 0 1 0 0 -1 0 1 0 0 -1 0 1 0 0 -1 1 -1 0 0 0 0 0 0 0 0 1 1 1 1 -1 -1 -1 -1 0 0 0 0 0 0 (a) (b) Fig. 2: PPED algorithm (a) and filtering kernels for edge detection (b). 3 System Organization The system organization of the feature map generation VLSI is illustrated in Fig. 3. The system receives one column of data (8-b x 5 pixels) at each clock and stores the data in the last column of the 5x6 image buffer. The image buffer shifts all the stored data to the right at every clock. Before the edge filtering circuit (EFC) starts detecting four direction edges with respect to the center pixel in the 5x5 block, the threshold value calculated from all the pixel data in the 5x5 block must be ready in time for the processing. In order to keep the coherence of the threshold detection and the edge filtering processing, the two last-in data locating at column 5 and 6 are given to median filter circuit (MFC) in advance via absolute value circuit (AVC). AVC calculates all luminance differences between two neighboring pixels in columns 5 and 6. In this manner, a fully seamless pipeline processing from threshold detection to edge feature map generation has been established. The key requirement here is that MFC must determine the median value of the 40 luminance difference data from the 5x5-pixel block fast enough to carry out the seamless pipeline processing. For this purpose, a four-stage asynchronous median detection architecture has been developed which is explained in the following. 4 5 1 2 3 6 Feature maps Threshold value H +45 V -45 Image buffer 8-b x 5 pixels (One column) Edge flags Edge Filtering Circuit (EFC) Median Filter Circuit (MFC) Absolute Value Circuit (AVC) Fig. 3: System organization of feature map generation VLSI. The well-known binary search algorithm was adopted for fast execution of median detection. The median search processing for five 4-b data is illustrated in Fig. 4 for the purpose of explanation. In the beginning, majority voting is carried out for the MSB’s of all data. Namely, the number of 1’s is compared with the number of 0’s and the majority group wins. The majority group flag (“0” in this example) is stored as the MSB of the median value. In addition, the loser group is withdrawn in the following voting by changing all remaining bits to the loser MSB (“1” in this example). By repeating the processing, the median value is finally stored in the median value register. 0 0 1 1 1 1 1 1 0 1 0 1 1 0 0 1 0 1 1 0 Median Register : 0 X X X 0 1 X X 0 1 1 0 0 0 1 1 1 1 1 1 0 1 1 0 0 1 0 1 1 1 1 1 0 0 1 1 1 1 0 1 1 0 0 1 0 1 1 1 1 1 0 0 0 0 1 1 1 1 0 1 1 0 0 1 1 1 1 1 0 0 0 0 Majority Voting Circuit (MVC) Majority Flag : 0 1 1 0 MVC3 MVC2 MVC1 MVC0 MVC3 MVC2 MVC1 MVC0 MVC3 MVC2 MVC1 MVC0 MVC3 MVC2 MVC1 MVC0 Elapse of time Fig. 4: Hardware algorithm for median detection by binary search. How the median value is detected from all the 40 8-b data (20 horizontal luminance difference data and 20 vertical luminance difference data) is illustrated in Fig. 5. All the data are stored in the array of median detection units (MDU’s). At each clock, the array receives four vertical luminance difference data and five horizontal luminance difference data calculated from the data in column 5 and 6 in Fig. 3. The entire data are shifted downward at each clock. The median search is carried out for the upper four bits and the lower four bits separately in order to enhance the throughput by pipelining. For this purpose, the chip is equipped with eight majority voting circuits (MVC 0~7). The upper four bits from all the data are processed by MVC 4~7 in a single clock cycle to yield the median value. In the next clock cycle, the loser information is transferred to the lower four bits within each MDU and MVC0~3 carry out the median search for the lower four bits from all the data in the array. Shift MVC4 MVC5 MVC6 MVC7 MVC0 MVC1 MVC2 MVC3 Shift Median Detection Unit (MDU) Upper 4bit Lower 4bit MVCs for upper 4bit MVCs for lower 4bit x (40 Units) AVC AVC AVC AVC AVC AVC AVC AVC AVC Vertical Luminance Difference Horizontal Luminance Difference Fig. 5: Median detection architecture for all 40 luminance difference data. The majority voting circuit (MVC) is shown in Fig. 6. Output connected CMOS inverters are employed as preamplifiers for majority detection which was first proposed in Ref. [12]. In the present implementation, however, two preamps receiving input data and inverted input data are connected to a 2-stage differential amplifier. Although this doubles the area penalty, the instability in the threshold for majority detection due to process and temperature variations has been remarkably improved as compared to the single inverter thresholding in Ref. [12]. The MVC in Fig. 6 has 41 input terminals although 40 bits of data are inputted to the circuit at one time. Bit “0” is always given to the terminal IN40 to yield “0” as the majority when there is a tie in the majority voting. OUT IN0 IN1 IN40 IN0 IN1 IN40 ENBL ENBL W/L W/L W/L 2W/L 2W/L W/L W/L W/L 2W/L 2W/L PREAMP PREAMP Fig. 6: Majority voting circuit (MVC). The edge filtering circuit (EFC) in Fig. 3 is composed as a four-stage pipeline of regular CMOS digital logic. In the first two stages, four-direction edge gradients are computed, and in the succeeding two stages, the detection of the largest gradient and the thresholding is carried out to generate four edge flags. 4 Experimental Results The feature map generation VLSI was fabricated in a 0.35-µm double-poly three-metal-layer CMOS technology. A photomicrograph of the proof-of-concept chip is shown in Fig. 7. The measured waveforms of the MVC at operating frequencies of 10MHz and 90MHz are demonstrated in Fig. 8. The input condition is in the worst case. Namely, 21 “1” bits and 20 “0” bits were fed to the inputs. The observed computation time is about 12 nsec which is larger than the simulation result of 2.5 nsec. This was caused by the capacitance loading due to the probing of the test circuit. In the real circuit without external probing, we confirmed the average computation time of 4~5 nsec. Edge-detection Filtering Circuit Median Filter Control Unit Majority Voting Circuit X8 MVC Processing Technology 0.35µm CMOS 2-Poly 3-Metal Chip Size 4.5mm x 4.5mm Supply Voltage 3.3 V Operation Frequengy 50MHz Vector Generator Fig. 7: Photomicrograph and specification of the fabricated proof-of-concept chip. 1 IN MVC_OUT 1V/div 5ns/div Majority Voting operation MVC_Output IN 1V/div 8ns/div Majority Voting operation (a) (b) Fig. 8: Measured waveforms of majority voting circuit (MVC) at operation frequencies of 10MHz (a) and 90 MHz (b) for the worst-case input data. The feature maps generated by the chip at the operation frequency of 25 MHz are demonstrated in Fig. 9. The power dissipation was 224 mW. The difference between the flag bits detected by the chip and those obtained by computer simulation are also shown in the figure. The number of error flags was from 80 to 120 out of 16,384 flags, only a 0.6% of the total. The occurrence of such error bits is anticipated since we employed analog circuits for median detection. However, such error does not cause any serious problems in the PPED algorithm as demonstrated in Figs. 10 and 11. The template matching results with the top five PPED vector candidates in Sella identification are demonstrated in Fig. 11, where Manhattan distance was adopted as the dissimilarity measure. The error in the feature map generation processing yields a constant bias to the dissimilarity and does not affect the result of the maximum likelihood search. Horizontal Plus 45-degrees Vertical Minus 45-degrees Sella Generated Feature maps Difference as compared to computer simulation Fig. 9: Feature maps for Sella pattern generated by the chip. Sella Generated PPED vector by the chip Difference as compared to computer simulation Fig. 10: PPED vector for Sella pattern generated by the chip. The difference in the vector components between the PPED vector generated by the chip and that obtained by computer simulation is also shown. 0 200 400 600 800 1000 1200 1st (Correct) 2nd 3rd 4th 5th Dissimilarity (by Manhattan Distance) Candidates in Sella recognition Computer Simulation Measured Data Fig. 11: Comparison of template matching results. 5 Conclusion A mixed-signal median filter VLSI circuit for PPED vector generation is presented. A four-stage asynchronous median detection architecture based on analog digital mixed-signal circuits has been introduced. As a result, a fully seamless pipeline processing from threshold detection to edge feature map generation has been established. A prototype chip was designed in a 0.35-µm CMOS technology and the fab ricated chip generates an edge based image vector every 80 µsec, which is about 104 times faster than the software computation. Acknowledgments The VLSI chip in this study was fabricated in the chip fabrication program of VLSI Design and Education Center (VDEC), the University of Tokyo with the collaboration by Rohm Corporation and Toppan Printing Corporation. The work is partially supported by the Ministry of Education, Science, Sports, and Culture under Grant-in-Aid for Scientific Research (No. 14205043) and by JST in the program of CREST. References [1] C. Liu and Harry Wechsler, “Gabor feature based classification using the enhanced fisher linear discriminant model for face recognition”, IEEE Transactions on Image Processing, Vol. 11, No.4, Apr. 2002. [2] C. Yen-ting, C. Kuo-sheng, and L. Ja-kuang, “Improving cephalogram analysis through feature subimage extraction”, IEEE Engineering in Medicine and Biology Magazine, Vol. 18, No. 1, 1999, pp. 25-31. [3] H. Potlapalli and R. C. Luo, “Fractal-based classification of natural textures”, IEEE Transactions on Industrial Electronics, Vol. 45, No. 1, Feb. 1998. [4] T. Yamasaki and T. Shibata, “Analog Soft-Pattern-Matching Classifier Using Floating-Gate MOS Technology,” Advances in Neural Information Processing Systems 14, Vol. II, pp. 1131-1138. [5] Masakazu Yagi, Tadashi Shibata, “An Image Representation Algorithm Compatible to Neural-Associative-Processor-Based Hardware Recognition Systems,” IEEE Trans. Neural Networks, Vol. 14, No. 5, pp. 1144-1161, September (2003). [6] M. Yagi, M. Adachi, and T. Shibata, "A hardware-friendly soft-computing algorithm for image recognition," in Proc. EUSIPCO 2000, Sept. 2000, pp. 729-732. [7] M. Yagi, T. Shibata, and K. Takada, "Human-perception-like image recognition system based on the associative processor architecture," in Proc. EUSIPCO 2002, Vol. I, pp. 103-106, Sept. 2002. [8] M. Yagi and T. Shibata, "An associative-processor-based mixed signal system for robust image recognition," in Proc. ISCAS 2002, May 2002, pp. V-137-V-140. [9] M. Ogawa, K. Ito, and T. Shibata, "A general-purpose vector-quantization processor employing two-dimensional bit-propagating winner-take-all," in Symp. on VLSI Circuits Dig. Tech. Papers, Jun. 2002, p.p. 244-247. [10] S. Chakrabartty, M. Yagi, T. Shibata, and G. Cauwenberghs, “Robust Cephalometric Landmark Identification Using Support Vector Machines,” ICASSP 2003, Hong Kong, April 6-10, 2003, pp. II-825-II-828. [11] Masakazu Yagi, Tadashi Shibata, Chihiro Tanikawa, and Kenji Takada, “A Robust Medical Image Recognition System Employing Edge-Based Feature Vector Representation,” in the Proceeding of 13th Scandinavian Conference on Image Analysis (SCIA2003), pp.534-540, Goteborg, Sweden, Jun. 29-Jul. 2, 2003. [12] C.L. Lee and C.-W. Jen, “Bit-sliced median filter design based on majority gate,” in IEE Proceedings-G, Vol. 139, No. 1, Feb. 1992, pp. 63-71.
2003
144
2,359
Autonomous helicopter flight via Reinforcement Learning Andrew Y. Ng Stanford University Stanford, CA 94305 H. Jin Kim, Michael I. Jordan, and Shankar Sastry University of California Berkeley, CA 94720 Abstract Autonomous helicopter flight represents a challenging control problem, with complex, noisy, dynamics. In this paper, we describe a successful application of reinforcement learning to autonomous helicopter flight. We first fit a stochastic, nonlinear model of the helicopter dynamics. We then use the model to learn to hover in place, and to fly a number of maneuvers taken from an RC helicopter competition. 1 Introduction Helicopters represent a challenging control problem with high-dimensional, complex, asymmetric, noisy, non-linear, dynamics, and are widely regarded as significantly more difficult to control than fixed-wing aircraft. [7] Consider, for instance, the problem of designing a helicopter that hovers in place. We begin with a single, horizontally-orientedmain rotor attached to the helicopter via the rotor shaft. Suppose the main rotor rotates clockwise (viewed from above), blowing air downwards and hence generating upward thrust. By applying clockwise torque to the main rotor to make it rotate, our helicopter experiences an anti-torque that tends to cause the main chassis to spin anti-clockwise. Thus, in the invention of the helicopter, it was necessary to add a tail rotor, which blows air sideways/rightwards to generate an appropriate moment to counteract the spin. But, this sideways force now causes the helicopter to drift leftwards. So, for a helicopter to hover in place, it must actually be tilted slightly to the right, so that the main rotor’s thrust is directed downwards and slightly to the left, to counteract this tendency to drift sideways. The history of helicopters is rife with such tales of ingenious solutions to problems caused by solutions to other problems, and of complex, nonintuitive dynamics that make helicopters challenging to control. In this paper, we describe the successful application of reinforcement learning to designing a controller for autonomous helicopter flight. Due to space constraints, our description of this work is necessarily brief; a detailed treatment is provided in [9]. For a discussion of related work on autonomous flight, also see [9, 12]. 2 Autonomous Helicopter The helicopter used in this work was a Yamaha R-50 helicopter, which is approximately 3.6m long, carries up to a 20kg payload, and is shown in Figure 1a. A detailed description of the design and construction of its instrumentation is in [12]. The helicopter carries an Inertial Navigation System (INS) consisting of 3 accelerometers and 3 rate gyroscopes installed in exactly orthogonal x,y,z directions, and a differential GPS system, which with the assistance of a ground station, gives position estimates with a resolution of 2cm. An onboard navigation computer runs a Kalman filter which integrates the sensor information from the GPS, INS, and a digital compass, and reports (at 50Hz) 12 numbers corresponding to the estimates of the helicopter’s position (  ), orientation (roll  , pitch , yaw ), velocity (     ) and angular velocities (    ). (a) (b) Figure 1: (a) Autonomous helicopter. (b) Helicopter hovering under control of learned policy. Most Helicopters are controlled via a 4-dimensional action space:   : The longtitudinal (front-back) and latitudinal (left-right) cyclic pitch controls. The rotor plane is the plane in which the helicopter’s rotors rotate. By tilting this plane either forwards/backwards or sideways, these controls cause the helicopter to accelerate forward/backwards or sideways.  : The (main rotor) collective pitch control. As the helicopter main-rotor’s blades sweep through the air, they generate an amount of upward thrust that (generally) increases with the angle at which the rotor blades are tilted. By varying the tilt angle of the rotor blades, the collective pitch control affects the main rotor’s thrust.  : The tail rotor collective pitch control. Using a mechanism similar to the main rotor collective pitch control, this controls the tail rotor’s thrust. Using the position estimates given by the Kalman filter, our task is to pick good control actions every 50th of a second. 3 Model identification To fit a model of the helicopter’s dynamics, we began by asking a human pilot to fly the helicopter for several minutes, and recorded the 12-dimensional helicopter state and 4dimensional helicopter control inputs as it was flown. In what follows, we used 339 seconds of flight data for model fitting, and another 140 seconds of data for hold-out testing. There are many natural symmetries in helicopter flight. For instance, a helicopter at (0,0,0) facing east behaves in a way related only by a translation and rotation to one at (10,10,50) facing north, if we command each to accelerate forwards. We would like to encode these symmetries directly into the model rather force an algorithm to learn them from scratch. Thus, model identification is typically done not in the spatial (world) coordinates                   , but instead in the helicopter body coordinates, in which the ,  , and  axes are forwards, sideways, and down relative to the current position of the helicopter. Where there is risk of confusion, we will use superscript and  to distinguish between spatial and body coordinates; thus,  is forward velocity, regardless of orientation. Our model is identified in the body coordinates                  . which has four fewer variables than  . Note that once this model is built, it is easily converted back using simple geometry to one in terms of spatial coordinates. Our main tool for model fitting was locally weighted linear regression (e.g., [11, 3]). Given a dataset    ! #"  where the $ ’s are vector-valued inputs and the   ’s are the realvalued outputs to be predicted, we let % be the design matrix whose & -th row is  , and let  be the vector of ' ’s. In response to a query at , locally weighted linear regression makes the prediction  )(+* , where (, -.%/*102% 3  %/*10  , and 0 is a diagonal matrix with (say) 0 4 6587:9;=<    < $> *? 3   <  , so that the regression gives datapoints near a larger weight. Here, ? 3  determines how weights fall off with distance from , and was picked in our experiments via leave-one-out cross validation.1 Using the estimator for noise @  given in [3], this gives a model  A( * CBED , where DGFAHJIKMLONQP SR  @   . By 1Actually, since we were fitting a model to a time-series, samples tend to be correlated in time, 0 0.5 1 0 0.2 0.4 0.6 0.8 1 seconds mean squared error xdot 0 0.5 1 0 0.1 0.2 0.3 0.4 0.5 seconds mean squared error xdot 0 0.5 1 0 0.1 0.2 0.3 0.4 0.5 seconds mean squared error xdot 0 0.5 1 0 0.002 0.004 0.006 0.008 0.01 0.012 seconds mean squared error thetadot 0 2 4 6 8 10 −3 −2 −1 0 1 2 time ydot Σ Σ Σ Σ Σ Σ Σ Σ ΣΣ Σ x x err erry errω a1 +1 θ φ errz z ω y a a a 2 3 4 (a) (b) (c) Figure 2: (a) Examples of plots comparing a model fit using the parameterization described in the text (solid lines) to some other models (dash-dot lines). Each point plotted shows the mean-squared error between the predicted value of a state variable—when a model is used to the simulate the helicopter’s dynamics for a certain duration indicated on the -axis—and the true value of that state variable (as measured on test data) after the same duration. Top left: Comparison of  -error to model not using  , etc. terms. Top right: Comparison of  -error to model omitting intercept (bias) term. Bottom: Comparison of  and   to linear deterministic model identified by [12]. (b) The solid line is the true helicopter   state on 10s of test data. The dash-dot line is the helicopter state predicted by our model, given the initial state at time 0 and all the intermediate control inputs. The dotted lines show two standard deviations in the estimated state. Every two seconds, the estimated state is “reset” to the true state, and the track restarts with zero error. Note that the estimated state is of the full, highdimensional state of the helicopter, but only   is shown here. (c) Policy class. The picture inside the circles indicate whether a node outputs the sum of their inputs, or the  of the sum of their inputs. Each edge with an arrow in the picture denotes a tunable parameter. The solid lines show the hovering policy class (Section 5). The dashed lines show the extra weights added for trajectory following (Section 6). applying locally-weighted regression with the state  and action   as inputs, and the onestep differences (e.g.,   <  ) of each of the state variables in turn as the target output, this gives us a non-linear, stochastic, model of the dynamics, allowing us to predict   as a function of  and   plus noise. We actually used several refinements to this model. Similar to the use of body coordinates to exploit symmetries, there is other prior knowledge that can be incorporated. Since both  and  are state variables, and we know that (at 50Hz)    B  QR , there is no need to carry out a regression for  . Similarly, we know that the roll angle  of the helicopter should have no direct effect on forward velocity . So, when performing regression to estimate , the coefficient in ( corresponding to  can be set to 0. This allows us to reduce the number of parameters that have to be fit. Similar reasoning allows us to conclude (cf. [12]) that certain other parameters should be R , R or  (gravity), and these were also hard-coded into the model. Finally, we added three extra (unobserved) variables    ,       to model latencies in the responses to the controls. (See [9] for details.) Some of the (other) choices that we considered in selecting a model include whether to use the    ,    and/or   terms; whether to include an intercept term; at what frequency to identify the model; whether to hardwire certain coefficients as described; and whether to use weighted or unweighted linear regression. Our main tool for choosing among the models was plots such as those shown in Figure 2a. (See figure caption.) We were particularly interested in checking how accurate a model is not just for predicting   from    , but how accurate it is at longer time scales. Each of the panels in Figure 2a shows, for a model, the mean-squared error (as measured on test data) between the helicopter’s true position and the estimated position at a certain time in the future (indicated on the -axis). The helicopter’s blade-tip moves at an appreciable fraction of the speed of sound. Given the and the presence of temporally close-by samples—which will be spatially close-by as well—may make data seem more abundant than in reality (leading to bigger !#"  than might be optimal for test data). Thus, when leaving out a sample in cross validation, we actually left out a large window (16 seconds) of data around that sample, to diminish this bias. danger and expense (about $70,000) of autonomous helicopters, we wanted to verify the fitted model carefully, so as to be reasonably confident that a controller tested successfully in simulation will also be safe in real life. Space precludes a full discussion, but one of our concerns was the possibility that unmodeled correlations in D might mean the noise variance of the actual dynamics is much larger than predicted by the model. (See [9] for details.) To check against this, we examined many plots such as shown in Figure 2, to check that the helicopter state “rarely” goes outside the errorbars predicted by our model at various time scales (see caption). 4 Reinforcement learning: The PEGASUS algorithm We used the PEGASUS reinforcement learning algorithm of [10], which we briefly review here. Consider an MDP with state space , initial state  , action space  , state transition probabilities      , reward function   , and discount  . Also let some family  of policies   be given, and suppose our goal is to find a policy in  with high utility, where the policy of  is defined to be      S  +B  S 8;B   S  B !  #"    where the expectation is over the random sequence of states    !$!$$ visited over time when  is executed in the MDP starting from state  . These utilities are in general intractable to calculate exactly, but suppose we have a computer simulator of the MDP’s dynamics—that is, a program that inputs  and outputs #% drawn from      . Then a standard way to define an estimate &    of    is via Monte Carlo: We can use the simulator to sample a trajectory    $!$!$ , and by taking the empirical sum of discounted rewards S  B    B !  on this sequence, we obtain one “sample” with which to estimate    . More generally, we could generate ' such sequences, and average to obtain a better estimator. We can then try to optimize the estimated utilities and search for “ NQK)(L N 7+* &  ,  .” Unfortunately, this is a difficult stochastic optimization problem: Evaluating &  ,  involves a Monte Carlo sampling process, and two different evaluations of &  ,  will typically give slightly different answers. Moreover, even if the number of samples ' that we average over is arbitrarily large, &    will fail with probability 1 to be a (“uniformly”) good estimate of  ,  . In our experiments, this fails to learn any reasonable controller for our helicopter. The PEGASUS method uses the observation that almost all computer simulations of the form described sample % F      by first calling a random number generator to get one (or more) random numbers - , and then calculating % as some deterministic function of the input M and the random - . If we demand that the simulator expose its interface to the random number generator, then by pre-sampling all the random numbers in advance and fixing them, we can then use these same, fixed, random numbers to evaluate any policy. Since all the random numbers are fixed, &  ./ is just an ordinary deterministic function, and standard search heuristics can be used to search for NK0(LON 7 * &  ,  . Importantly, this also allows us to show that, so long as we average over a number of samples ' that is at most polynomial in all quantities of interest, then with high probability, &  will be a uniformly good estimate of  ( "#&    <    "2143 ). This also allows us to give guarantees on the performance of the solutions found. For further discussion of PEGASUS and other work such as the variance reduction and gradient estimation methods (cf. [6, 5]), see [9]. 5 Learning to Hover One previous attempt had been made to use a learning algorithm to fly this helicopter, using 5 -synthesis [2]. This succeeded in flying the helicopter in simulation, but not on the actual helicopter (Shim, pers. comm.). Similarly, preliminary experiments using 6  and 687 controllers to fly a similar helicopter were also unsuccessful. These comments should not be taken as conclusive of the viability of any of these methods; rather, we take them to be indicative of the difficulty and subtlety involved in learning a helicopter controller. 0 5 10 15 20 25 30 −1.5 −1 −0.5 0 0.5 1 1.5 x−velocity (m/s) 0 5 10 15 20 25 30 −0.6 −0.4 −0.2 0 0.2 0.4 y−velocity (m/s) 0 5 10 15 20 25 30 −0.5 0 0.5 1 z−velocity (m/s) 0 5 10 15 20 25 30 61.5 62 62.5 63 63.5 64 64.5 65 65.5 66 x−position (m) 0 5 10 15 20 25 30 −80 −75 −70 −65 −60 −55 −50 −45 y−position (m) 0 5 10 15 20 25 30 4.5 5 5.5 6 6.5 7 z−position (m) Figure 3: Comparison of hovering performance of learned controller (solid line) vs. Yamaha licensed/specially trained human pilot (dotted line). Top:   velocities. Bottom:   positions. We began by learning a policy for hovering in place. We want a controller that, given the current helicopter state and a desired hovering position and orientation        , computes controls    <     to make it hover stably there. For our policy class  , we chose the simple neural network depicted in Figure 2c (solid edges only). Each of the edges in the figure represents a weight, and the connections were chosen via simple reasoning about which control channel should be used to control which state variables. For instance, consider the the longitudinal (forward/backward) cyclic pitch control   , which causes the rotor plane to tilt forward/backward, thus causing the helicopter to pitch (and/or accelerate) forward or backward. From Figure 2c, we can read off the  control control as     B   5 KMK +B  MN  5 KMK ;B   B      N    ;B    $ Here, the   ’s are the tunable parameters (weights) of the network, and 5 KMK  <  !#"%$& '"%! is defined to be the error in the  -position (forward direction, in body coordinates) between where the helicopter currently is and where we wish it to hover. We chose a quadratic cost function on the (spatial representation of the) state, where2 (*)+-,.0/1)32546) / 7 ,%89:25;)  /  7 ,%89:25<=)  /  7 ,%89:2?> 4  8=9:2:> ;   89:2?> <   89:2A@5)CB*/B 7 ,%8D, E (1) This encourages the helicopter to hover near     F    , while also keeping the velocity small and not making abrupt movements. The weights G  GIH , etc. (distinct from the weights   parameterizing our policy class) were chosen to scale each of the terms to be roughly the same order of magnitude. To encourage small actions and smooth control of the helicopter, we also used a quadratic penalty for actions:  : < JG -K    B G ML    B G N    B G DO    , and the overall reward was S M S B  : . Using the model identified in Section 3, we can now apply PEGASUS to define approximations &  ,  to the utilities of policies. Since policies are smoothly parameterized in the weights, and the dynamics are themselves continuous in the actions, the estimates of utilities are also continuous in the weights.3 We may thus apply standard hillclimbing algorithms to maximize &    in terms of the policy’s weights. We tried both a gradient 2The B:/1B 7 error term is computed with appropriate wrapping about PMQ rad, so that if B 7 .SRE RT rad, and the helicopter is currently facing BU. P-Q /VRE RT rad, the error is 0.02, not PMQ /VRE R P rad. 3Actually, this is not true. One last component of the reward that we did not mention earlier was that, if in performing the locally weighted regression, the matrix WYX5Z[W is singular to numerical precision, then we declare the helicopter to have “crashed,” terminate the simulation, and give it a huge negative (-50000) reward. Because the test checking if W X Z[W is singular to numerical precision returns either 1 or 0, \ ]?) Q , has a discontinuity between “crash” and “not-crash.” −68 −67 −66 −65 −64 −63 −62 −61 −60 −59 −58 63.5 64 5.5 6 6.5 7 7.5 8 8.5 9 9.5 10 −105 −100 −95 −90 64 66 68 70 72 74 76 78 80 82 6 6.2 6.4 −81 −80 −79 −78 −77 −76 −75 −74 −73 −72 −71 67.5 68 68.5 5.5 6 6.5 7 7.5 8 8.5 9 9.5 Figure 4: Top row: Maneuver diagrams from RC helicopter competition. [Source: www.modelaircraft.org]. Bottom row: Actual trajectories flown using learned controller. ascent algorithm, in which we numerically evaluate the derivative of &    with respect to the weights and then take a step in the indicated direction, and a random-walk algorithm in which we propose a random perturbation to the weights, and move there if it increases &  ,  . Both of these algorithms worked well, though with gradient ascent, it was important to scale the derivatives appropriately, since the estimates of the derivatives were sometimes numerically unstable.4 It was also important to apply some standard heuristics to prevent its solutions from diverging (such as verifying after each step that we did indeed take a step uphill on the objective &  , and undoing/redoing the step using a smaller stepsize if this was not the case). The most expensive step in policy search was the repeated Monte Carlo evaluation to obtain &  ,  . To speed this up, we parallelized our implementation, and Monte Carlo evaluations using different samples were run on different computers, and the results were then aggregated to obtain &    . We ran PEGASUS using 30 Monte Carlo evaluations of 35 seconds of flying time each, and  R $  . Figure 1b shows the result of implementing and running the resulting policy on the helicopter. On its maiden flight, our learned policy was successful in keeping the helicopter stabilized in the air. (We note that [1] was also successful at using our PEGASUS algorithm to control a subset, the cyclic pitch controls, of a helicopter’s dynamics.) We also compare the performance of our learned policy against that of our human pilot trained and licensed by Yamaha to fly the R-50 helicopter. Figure 5 shows the velocities and positions of the helicopter under our learned policy and under the human pilot’s control. As we see, our controller was able to keep the helicopter flying more stably than was a human pilot. Videos of the helicopter flying are available at http://www.cs.stanford.edu/˜ang/nips03/ 6 Flying competition maneuvers We were next interested in making the helicopter learn to fly several challenging maneuvers. The Academy of Model Aeronautics (AMA) (to our knowledge the largest RC helicopter organization) holds an annual RC helicopter competition, in which helicopters have to be accurately flown through a number of maneuvers. This competition is organized into Class I (for beginners, with the easiest maneuvers) through Class III (with the most difficult maneuvers, for the most advanced pilots). We took the first three maneuvers from the most challenging, Class III, segment of their competition. Figure 4 shows maneuver diagrams from the AMA web site. In the first of these maneuvers 4A problem exacerbated by the discontinuities described in the previous footnote. (III.1), the helicopter starts from the middle of the base of a triangle, flies backwards to the lower-right corner, performs a R pirouette (turning in place), flies backwards up an edge of the triangle, backwards down the other edge, performs another R pirouette, and flies backwards to its starting position. Flying backwards is a significantly less stable maneuver than flying forwards, which makes this maneuver interesting and challenging. In the second maneuver (III.2), the helicopter has to perform a nose-in turn, in which it flies backwards out to the edge of a circle, pauses, and then flies in a circle but always keeping the nose of the helicopter pointed at center of rotation. After it finishes circling, it returns to the starting point. Many human pilots seem to find this second maneuver particularly challenging. Lastly, maneuver III.3 involves flying the helicopter in a vertical rectangle, with two R  pirouettes in opposite directions halfway along the rectangle’s vertical segments. How does one design a controller for flying trajectories? Given a controller for keeping a system’s state at a point  5      , one standard way to make the system move through a particular trajectory is to slowly vary     F    along a sequence of set points on that trajectory. (E.g., see [4].) For instance, if we ask our helicopter to hover at SR  R  R  R  , then a fraction of a second later ask it to hover at .R $ R   R  R  R  , then at .R $ R  R  R  R  and so on, our helicopter will slowly fly in the  -direction. By taking this procedure and “wrapping” it around our old policy class from Figure 2c, we thus obtain a computer program—that is, a new policy class—not just for hovering, but also for flying arbitrary trajectories. I.e., we now have a family of policies that take as input a trajectory, and that attempt to make the helicopter fly that trajectory. Moreover, we can now also retrain the policy’s parameters for accurate trajectory following, not just hovering. Since we are now flying trajectories and not only hovering, we also augmented the policy class to take into account more of the coupling between the helicopter’s different subdynamics. For instance, the simplest way to turn is to change the tail rotor collective pitch/thrust, so that it yaws either left or right. This works well for small turns, but for large turns, the thrust from the tail rotor also tends to cause the helicopter to drift sideways. Thus, we enriched the policy class to allow it to correct for this drift by applying the appropriate cyclic pitch controls. Also, having a helicopter climb or descend changes the amount of work done by the main rotor, and hence the amount of torque/anti-torque generated, which can cause the helicopter to turn. So, we also added a link between the collective pitch control and the tail rotor control. These modifications are shown in Figure 2c (dashed lines). We also needed to specify a reward function for trajectory following. One simple choice for would have been to use Equation (1) with the newly-defined (time-varying)  5   F    . But we did not consider this to be a good choice. Specifically, consider making the helicopter fly in the increasing -direction, so that     F    starts off as .R  R  R  R  (say), and has its first coordinate  slowly increased over time. Then, while the actual helicopter position  will indeed increase, it will also almost certainly lag consistently behind 5 . This is because the hovering controller is always trying to “catch up” to the moving  5   F    . Thus, < A may remain large, and the helicopter will continuously incur a < 5 cost, even if it is in fact flying a very accurate trajectory in the increasing -direction exactly as desired. It would be undesirable to have the helicopter risk trying to fly more aggressively to reduce this fake “error,” particularly if it is at the cost of increased error in the other coordinates. So, we changed the reward function to penalize deviation not from  5     8 , but instead deviation from       , where        is the “projection” of the helicopter’s position onto the path of the idealized, desired trajectory. (In our example of flying in a straight line, for a helicopter at      , we easily see       -  R  R  R  .) Thus, we imagine an “external observer” that looks at the actual helicopter state and estimates which part of the idealized trajectory the helicopter is trying to fly through (taking care not to be confused if a trajectory loops back on itself), and the learning algorithm pays a penalty that is quadratic between the actual position and the “tracked” position on the idealized trajectory. We also needed to make sure the helicopter is rewarded for making progress along the trajectory. To do this, we used the potential-based shaping rewards of [8]. Since, we are already tracking where along the desired trajectory the helicopter is, we chose a potential function that increases along the trajectory. Thus, whenever the helicopter’s      makes forward progress along this trajectory, it receives positive reward. (See [8].) Finally, our modifications have decoupled our definition of the reward function from  5   F    and the evolution of    F    in time. So, we are now also free to consider allowing      8 to evolve in a way that is different from the path of the desired trajectory, but nonetheless in way that allows the helicopter to follow the actual, desired trajectory more accurately. (In control theory, there is a related practice of using the inverse dynamics to obtain better tracking behavior.) We considered several alternatives, but the main one used ended up being a modification for flying trajectories that have both a vertical and a horizontal component (such as along the two upper edges of the triangle in III.1). Specifically, it turns out that the  (vertical)-response of the helicopter is very fast: To climb, we need only increase the collective pitch control, which almost immediately causes the helicopter to start accelerating upwards. In contrast, the and  responses are much slower. Thus, if      8 moves at  upwards as in maneuver III.1, the helicopter will tend to track the  -component of the trajectory much more quickly, so that it accelerates into a climb steeper than   , resulting in a “bowed-out” trajectory. Similarly, an angled descent results in a “bowed-in” trajectory. To correct for this, we artificially slowed down the  -response, so that when        is moving into an angled climb or descent, the     8 portion will evolve normally with time, but the changes to   will be delayed by  seconds, where  here is another parameter in our policy class, to be automatically learned by our algorithm. Using this setup and retraining our policy class’ parameters for accurate trajectory following, we were able to learn a policy that flies all three of the competition maneuvers fairly accurately. Figure 4 (bottom) shows actual trajectories taken by the helicopter while flying these maneuvers. Videos of the helicopter flying these maneuvers are also available at the URL given at the end of Section 5. References [1] J. Bagnell and J. Schneider. Autonomous helicopter control using reinforcement learning policy search methods. In Int’l Conf. Robotics and Automation. IEEE, 2001. [2] G. Balas, J. Doyle, K. Glover, A. Packard, and R. Smith. 5 -analysis and synthesis toolbox user’s guide, 1995. [3] W. Cleveland. Robust locally weighted regression and smoothing scatterplots. J. Amer. Stat. Assoc, 74, 1979. [4] Gene F. Franklin, J. David Powell, and Abbas Emani-Naeini. Feedback Control of Dynamic Systems. Addison-Wesley, 1995. [5] Y. Ho and X. Cao. Pertubation analysis of discrete event dynamic systems. Kluwer, 1991. [6] J. Kiefer and J. Wolfowitz. Stochastic estimation of the maximum of a regression function. Annals of Mathematical Statistics, 23:462–466, 1952. [7] J. Leishman. Principles of Helicopter Aerodynamics. Cambridge Univ. Press, 2000. [8] A. Y. Ng, D. Harada, and S. Russell. Policy invariance under reward transformations: Theory and application to reward shaping. In Proc. 16th ICML, pages 278–287, 1999. [9] Andrew Y. Ng. Shaping and policy search in reinforcement learning. PhD thesis, EECS, University of California, Berkeley, 2003. [10] Andrew Y. Ng and Michael I. Jordan. PEGASUS: A policy search method for large MDPs and POMDPs. In Proc. 16th Conf. Uncertainty in Artificial Intelligence, 2000. [11] C. Atkeson S. Schaal and A. Moore. Locally weighted learning. AI Review, 11, 1997. [12] Hyunchul Shim. Hierarchical flight control system synthesis for rotorcraft-based unmanned aerial vehicles. PhD thesis, Mech. Engr., U.C. Berkeley, 2000.
2003
145
2,360
Insights from Machine Learning Applied to Human Visual Classification Arnulf B. A. Graf and Felix A. Wichmann Max Planck Institute for Biological Cybernetics Spemannstraße 38 72076 T¨ubingen, Germany {arnulf.graf, felix.wichmann}@tuebingen.mpg.de Abstract We attempt to understand visual classification in humans using both psychophysical and machine learning techniques. Frontal views of human faces were used for a gender classification task. Human subjects classified the faces and their gender judgment, reaction time and confidence rating were recorded. Several hyperplane learning algorithms were used on the same classification task using the Principal Components of the texture and shape representation of the faces. The classification performance of the learning algorithms was estimated using the face database with the true gender of the faces as labels, and also with the gender estimated by the subjects. We then correlated the human responses to the distance of the stimuli to the separating hyperplane of the learning algorithms. Our results suggest that human classification can be modeled by some hyperplane algorithms in the feature space we used. For classification, the brain needs more processing for stimuli close to that hyperplane than for those further away. 1 Introduction The last decade has seen tremendous technological advances in neuroscience from the microscopic to the macroscopic scale (e.g. from multi-unit recordings to functional magnetic resonance imaging). On an algorithmic level, however, methods and understanding of brain processes are still limited. Here we report on a study combining psychophysical and machine learning techniques in order to improve our understanding of human classification of visual stimuli. What algorithms best describe the way the human brain classifies? Might humans use something akin to hyperplanes for classification? If so, is the learning rule as simple as in mean-of-class prototype learners or are more sophisticated algorithms better candidates? In our experiments, subjects and machines classified human faces according to gender. The stimuli were presented and we collected the subjects’ responses, which are the estimated gender, reaction time and confidence rating (sec.2). For every subject two personal new datasets were created: the original faces either with the true or with the subject’s labels (true or estimated gender response). We then applied a Principal Component Analysis to a texture and shape representation of the faces. Various algorithms such as Support Vector Machines, Relevance Vector Machines, Prototype and K-means Learners (sec.3) were applied on this low-dimensional dataset with either the true or the subjects’ labels. The resulting classification performances were compared, the corresponding decision hyperplanes were computed and the distances of the faces to the hyperplanes were correlated with the subjects’ responses, the data being pooled among all subjects and stimuli or on a stimulus-by-stimulus basis (sec.4). 2 Human Classification Behaviour We used grey-scale frontal views of human faces taken from the MPI face database [1]. Because of technical inhomogeneities of the faces in the database we post-processed each face such that all faces have same mean intensity, same pixel-surface area and are centred [2]. This processing stage is followed by a slight low-pass filtering of each face in the database in order to eliminate, as much as possible, scanning artifacts. The database is gender-balanced and contains 200 Caucasian faces (see Fig.1). Twenty-seven human 0 20 40 60 80 100 120 140 160 180 200 7 8 9 10 11 12 13 14 15 index of component i eigenvalue log(λi) Figure 1: Female and male faces from the processed database (left). Eigenvalue spectrum from the PCA of our texture-shape representation (see sec.4): λmin = 1.01 · 103 (the last eigenvalue being 0 is not plotted) and λmax = 2.47 · 106 (right). subjects were asked to classify the faces according to their gender and we recorded three responses: estimated class (i.e. female/male), reaction time (RT) and, after each estimatedclass-response, a confidence rating (CR) on a scale from 1 (unsure) to 3 (sure). The stimuli were presented sequentially to the subjects on a carefully calibrated display using a modified Hanning window (a raised cosine function with a raising time of ttransient = 500ms and a plateau time of tsteady = 1000ms, for a total presentation time t = 2000ms per face). Subjects were asked to answer as fast as possible to obtain perceptual, rather than cognitive, judgements. Most of the time they responded well before the presentation of the stimulus had ended (mean RT over all stimuli and subjects was approximately 900ms). All subjects had normal or corrected-to-normal vision and were paid for their participation. Most of them were students from the University of T¨ubingen and all of them were naive to the purpose of the experiment. Analysis of the classification performance of humans is based on signal detection theory [3] and we assume that, on the decision axis, the internal signal and noise distributions are Gaussian with same unit variance but different means. We define correct response probabilities for males (+) and females (−) as P+ = P(ˆy = 1|y = 1) and P−= P(ˆy = −1|y = −1) where ˆy is the estimated class and y the true class of the stimulus. The discriminability of both stimuli can then be computed as: d′ = Z(P+) + Z(P−) where Z = Φ−1, and Φ is the cumulative normal distribution with zero mean and unit variance. Averaged across subjects we obtain d′ = 2.85 ± 0.73. This value indicates that the classification task is comparatively easy for the subjects, although without being trivial (no ceiling effect). We observe a strong male bias (a large number of females classified as males but very few males classified as females) and express this bias as: η = Z2(P+) −Z2(P−) = 3.14 ± 2.61. The subplots of Fig.2 show the correlations of (a) RT and classification error, (b) classification error and CR, and (c) RT and CR. First, no error error 0.8 0.9 1 1.1 RT [s] (a) 1 2 3 0 0.2 0.4 0.6 CR mean error (b) 1 2 3 0.8 0.9 1 1.1 CR RT [s] (c) Figure 2: Human classification behaviour: mutual dependencies of the subject’s responses. RT’s are longer for incorrect answers than for correct ones (a). Second, a high CR is correlated with a low classification error (b) and thus subjects have veridical knowledge about the difficulty of individual responses—this is certainly not the case in many low-level psychophysical settings. Third, the RT decreases as the CR increases (c), i.e. stimuli easy to classify are also classified rapidly. It may thus be concluded that a high error (or equivalently a low CR) implies higher RT’s. This may suggest that patterns difficult to classify need more computation, i.e. longer processing, by the brain than patterns easy to classify. 3 Machine Learning Classifiers In the following, various hyperplane classification algorithms are expressed as weighted dual space learners with different learning rules. Given a dataset {⃗xi, yi}p i=1, we assume classification is done in the input space, i.e. we consider linear kernels. Moreover, the input space is normalized since this has proved to be effective for some classifiers [4]. The hyperplanes can be written using a weight (or normal) vector ⃗w and an offset b in order to yield a classification rule as y(⃗x) = sign(⟨⃗w|⃗x⟩+ b) in the first three cases whereas in the last one, the decision rule is a collection of hyperplanes. These classifiers are compared on a two-dimensional toy dataset in Fig.3. Support Vector Machine (SVM, [5]). The weight vector is given as: ⃗w = P i αiyi⃗xi where ⃗α is obtained by maximising P i αi −1 2 P ij yiyjαiαj⟨⃗xi|⃗xj⟩subject to P i αiyi = 0 and 0 ≤αi ≤C where C is a regularisation parameter, determined using for instance cross-validation. The offset is computed as: b = ⟨yi −⟨⃗w|⃗xi⟩⟩i|0<αi<C. Relevance Vector Machine (RVM, [6]). The weight vector (incorporating here the offset) is expressed as ⃗w = P i αi⃗xi. A Bernoulli distribution describes P(⃗y|X, ⃗α) where X = {⃗xi}p i=1. A hyperparameter ⃗β is introduced in order to retrieve a sparse and smooth solution for ⃗α using a Gaussian distribution for P(⃗α|⃗β). Learning amounts to maximising P(⃗y|X, ⃗β) = R P(⃗y|X, ⃗α)P(⃗α|⃗β)d⃗α with respect to ⃗β. Since the latter is not integrable analytically, the Laplace approximation (local approximation of the integrand by a Gaussian) is used for resolution, yielding an iterative update scheme for ⃗β. Prototype Learner (Prot, [7]). Defining the prototypes ⃗p± = P p i=1 ⃗xi(yi±1) P p i=1(yi±1) = P i|yi=±1 αi⃗xi as the centre of mass of each class, the weight vector is then expressed as: ⃗w = ⃗p+ −⃗p−= P i αiyi⃗xi and the offset as: b = ∥⃗p−∥2−∥⃗p+∥2 2 = −⟨⃗w| P i αi⃗xi⟩ 2 . K-means Clustering with Nearest-neighbor Learner (Kmean, [8]). Once the K centres of the clusters for each class are computed using the K-means algorithm, one mean ⃗k±(⃗x) = P i ϕ± i (⃗x)⃗xi for each class is selected for a pattern ⃗x using the nearest-neighbour rule. The weight is then computed as: ⃗w(⃗x) = ⃗k+(⃗x) −⃗k−(⃗x) = P i(ϕ+ i (⃗x) −ϕ− i (⃗x))⃗xi, the offset being given by: b(⃗x) = ∥⃗k−(⃗x)∥2−∥⃗k+(⃗x)∥2 2 . Since the nearest-neighbour rule is used for each pattern, the decision function is piecewise linear. The appropriate value of K is determined for instance using cross-validation. SVM RVM Prot Kmean Figure 3: Two-dimensional toy example illustrating classification for a SVM, RVM, Prot and Kmean: the lines indicate the separating hyperplanes and the circles show the SVs, RVs, prototypes or means respectively. 4 Human Classification Behaviour Revisited by Machine Each face taken from the MPI database is represented by three vectors: an intensitystandardised texture map, and space-standardised x- and y-flowfields representing the shape. The texture and shape vectors contain the information required to generate a specific face from an “average” reference face by putting each face of the database into correspondence. This format makes intensity and structural information about the faces explicit. For the sake of numerical tractability, especially when using cross-validation methods, the dimension of the image vectors has to be reduced to be usable by machine learning algorithms. We use Principal Component Analysis (PCA) to represent the concatenated textureand shape vectors of each face of size 3 · 2562 in only 200 dimensions. In contrast to [9] where PCA is applied only to the intensity (or pixel) information of standard images, the use of PCA on the texture-shape representation forces learning machines to encode information about local structure and spatial correspondences. It may be argued that the Principal Components of faces form a biologically-plausible basis for representation of faces [10], the so-called eigenfaces. Standard PCA on the images themselves may thus be considered a biologically-plausible representation of faces. Given that we use PCA on texture and shape, any claim of biological plausibility of our representation is somewhat tenuous, however. The variant of PCA considered in this paper searches to express the eigenvectors as linear combinations of the data vectors [10, 11]. It has the computational advantage over classic PCA that it does not require the computation of a correlation between the dimensions of the input but between the patterns of the input. For the stimuli considered here, the eigenvalue spectrum as shown in Fig.1 is a monotonically decreasing function with no flat regions. Thus PCA seems to be a sensible choice to represent the human face stimuli used in this study (for a comparative study of PCA against Locally Linear Embedding, where PCA is clearly superior for machine learning purposes, see [2]). 4.1 Classification Performance of Man and Machine We compare the classification performance of man and machine in plot (a) of Fig.4. For humans, the classification error on the true dataset is obtained by comparing the estimated gender (class) to the true one. The classification error on the subject dataset, seen as a measure for the mean consistency between subjects, is the mean over all subjects of the man SVM RVM Prot Kmean 0 0.05 0.1 0.15 0.2 0.25 0.3 0.35 error (a) classification error on true dataset classification error on subject dataset no error error 0 0.05 0.1 0.15 0.2 0.25 0.3 |δ| to SH (b) SVM RVM Prot Kmean bin 1 bin 2 bin 3 0 0.05 0.1 0.15 0.2 0.25 0.3 |δ| to SH RT (binified) (c) 1 2 3 0 0.05 0.1 0.15 0.2 0.25 0.3 CR |δ| to SH (d) Figure 4: Classification performance of man and machine on the true and subject datasets (a) and correlation of behaviour of man (classification error, RT and CR) with machine (|δ|) for data pooled across subjects and stimuli (b-d). mean classification error the other subjects made on the stimuli presented to each subject by defining as an error when the other subjects responded differently than the considered subject. For machines the classification error is obtained for the dataset with either the true or the subject’s labels by using a single 10-fold cross-validation for RVM and Prot and a double 10-fold cross-validation to determine C for SVMs and K for Kmeans. Since every subject gets a different set of 148 randomly chosen faces from the 200 available, the mean and standard error of the classification errors of man or machine for each dataset is plotted. When classifying the dataset with the true labels, the combination of PCA with Kmean yields a classification performance comparable to that of humans. The better classification performance of Kmean compared to the simple prototype classifier may be explained by the piecewise linear decision function. The prototype classifier, popular in neuroscience, psychology and philosophy, performs on average worse than humans. Either humans do not classify gender using prototypes in the linear PCA space, or they use prototypes but not the PCA representation, or, of course, they use neither. An intriguing fact is that SVMs and RVMs perform better than man, which is contrary to what is reported in [5, 12] where human experts and machines are tested on digits from the postal service database USPS. The context of the study presented here is different, however. Our subjects were presented with human faces with some high-level features such as hair, beards, or glasses removed. However, such features were likely used by the subjects to create their representation of gender-space during their lifetime. Subjects are thus trained on one type of data and tested on another. The machines on the other hand are trained and tested on the same type of stimuli. This may explain the quite disappointing performance of man in such a biologically-relevant task compared to machine. However while humans learn the gender classification during their lifetime, it seems that they solve the problem in a manner not as optimal from a statistical point of view as SVMs or RVMs, but similarly to Kmeans and better than prototype learners. The classification on the subject’s labels represents the ability of the classifier to learn what we, based on the responses of the subjects, presume to be their internal representation of face-space. The machines have more difficulty in learning the dataset with the subject’s labels than the one with the true labels. Given our aim of re-creating the subjects’ decision boundaries using artificial classifiers—to compare human response patterns to machine learning concepts—this makes SVM and RVM good, Kmean a mediocre, and the prototype learner a rather poor candidate for this enterprise using the PCA representation. 4.2 Correlation of Behaviour of Man with Machine Here we correlate the classification behaviours of man and machine. The results are summarized in plot (b-d) of Fig.4 and in Fig.5 where the parameters are averaged over the subjects as before. This type of data analysis simply correlates the subject’s classification error, RT, and CR to the distance |δ(⃗xi)| = |⟨⃗w|⃗xi⟩+b| ∥⃗w∥ of the face stimuli to the separating hyperplane (SH) obtained for the four types of hyperplane classifiers (in the case of Kmean this distance is computed for each pattern with respect to the SH constructed using its nearest mean of each class.). The hyperplanes are determined using cross-validation (see above) on the dataset with the subject’s labels. The distance of a pattern ⃗x to the SH is then calculated using the hyperplane computed using the training set corresponding to the testing set ⃗x is belonging to. Notice that |δ| reflects the construction rule of the classification hyperplane rather than the generalisation ability of the algorithm. SVMs maximise the distance to the nearest point but not the average distance to all points, which may yield a small value of |δ|. Moreover the number of SVs, here ♯(SV ) = 74 ± 1 out of 148 patterns, indicates that most patterns are close to the SH since classification is done in a space of dimensionality 200. The number of RVs, ♯(RV ) = 9 ± 0, is comparatively small, this sparsity being a well-known feature of RVMs. Looking at Fig.4 (b-d) where the data is averaged across subjects and stimuli, we observe, first, that the error of the subjects is high for |δ| low, suggesting that elements near the SH are more difficult to classify. Second |δ| is low for high RT’s: the elements near the SH seem to require more processing in the brain resulting in a higher RT. Third, the high CR for high |δ| indicates that the subjects are sure when stimuli are far from SH. Thus elements far from the SH are classified more accurately, faster and with higher confidence than those near to the SH. In order to compare the classifiers, we proceed as below. Thus far we only considered data averaged across all face-stimuli. In the following we assess the relation between the distance of each face representation to the SH and the mean across all subjects of one of their responses (classification error, RT or CR) for that face. We perform a non-parametric rank correlation analysis using the tied rank of the subject’s response and of |δ| across the set of 200 faces. Fig.5 presents the resulting scatter plots for each classifier and for each type of response. Qualitatively, it seems that RVMs show most and prototype learners least correlation between the subject’s response and |δ|. In order to compare these behaviours in a more quantitative manner, we indicate in fig.5 Spearman’s rank correlation coefficients r (linear correlation between the tied rank of one variable and the tied rank of the other) between the parameter of machine (distance of a face to the SH) and the responses of man (classification error, RT and CR). Under the null hypothesis of no correlation between man and machine, the variable z = r √ N −1 follows a standard normal distribution, N = 200 being the number of points in the scatter plots, and the significance of the hypothesis test is computed as P = Φ(z) where Φ is the cumulative normal distribution with zero mean and unit variance. We get for all cases P < 5 · 10−4 which allows us to reject the null hypothesis with a high degree of confidence. 1 50 100 150 200 1 50 100 150 200 SVM r=−0.60 ± 0.02 subject error |δ| to SH 1 50 100 150 200 1 50 100 150 200 RVM r=−0.65 ± 0.01 |δ| to SH 1 50 100 150 200 1 50 100 150 200 Prot r=−0.29 ± 0.02 |δ| to SH 1 50 100 150 200 1 50 100 150 200 Kmean r=−0.39 ± 0.02 |δ| to SH 1 50 100 150 200 1 50 100 150 200 SVM r=−0.69 ± 0.01 RT [s] |δ| to SH 1 50 100 150 200 1 50 100 150 200 RVM r=−0.71 ± 0.01 |δ| to SH 1 50 100 150 200 1 50 100 150 200 Prot r=−0.35 ± 0.02 |δ| to SH 1 50 100 150 200 1 50 100 150 200 Kmean r=−0.45 ± 0.02 |δ| to SH 1 50 100 150 200 1 50 100 150 200 SVM r=0.59 ± 0.02 CR |δ| to SH 1 50 100 150 200 1 50 100 150 200 RVM r=0.67 ± 0.01 |δ| to SH 1 50 100 150 200 1 50 100 150 200 Prot r=0.24 ± 0.02 |δ| to SH 1 50 100 150 200 1 50 100 150 200 Kmean r=0.40 ± 0.02 |δ| to SH Figure 5: Scatter plots relating the subjects’ responses (classification error, RT and CR) to the distance |δ| to the SH for each face in the database, the pooling being done across subjects. From these results it can be seen that RVMs correlate best all the subject’s responses with the distances of the stimuli to the SH. The RT seems to be the performance measure where most correlation between man and machine can be asserted although all performance measures are related as shown in sec.2. The prototype algorithm again behaves in the least human-like manner of the four classifiers. The correlation between the classification behaviour of man and machine indicates for RVMs, and to some extent SVMs, that heads far from the SH are more easily processed by humans. It may be concluded that the brain needs to do more processing (higher RT) to classify stimuli close to the decision hyperplane, while stimuli far from it are classified more accurately (low error) and with higher confidence (high CR). Human classification behaviour can thus be modeled by hyperplane algorithms; a piecewise linear decision function as found in Kmean seems however to be not biologically-plausible. 5 Conclusions Our study compared classification of faces by man and machine. Psychophysically we noted that a high classification error and a low CR for humans is accompanied by a longer processing of information by the brain (a longer RT). Moreover, elements far from the SH are classified more accurately, faster and with higher confidence than those near to the SH. We also find three noteworthy results. First, SVMs and RVMs can learn to classify faces using the subjects’ labels but perform much better when using the true labels. Second, correlating the average response of humans (classification error, RT or CR) with the distance to the SH on a face-by-face basis using Spearman’s rank correlation coefficients shows that RVMs recreate human performance most closely in every respect. Third, the mean-of-class prototype, its popularity in neuroscience notwithstanding, is the least human-like classifier in all cases examined. Obviously our results rely on a number of crucial assumptions: first, all measurements were done in a linear space; second, the conclusions are only valid given the PCA representation (pre-processing). Third, when rejecting the prototype learner as a plausible candidate for human classification we assume the representativeness of our face space: we assume that the mean face of our human subjects’ is close to the sample mean of our database. Clearly, a larger face database would be welcome, but is not trivial as we need texture maps and the corresponding shapes. Finally, there is the different learning regime. Machines were trained on the dataset proper, whereas humans were assumed to have extracted the relevant information during their lifetime, and they were tested on faces with some cues removed. However, the representation we used does allow the genders to be separated well, as shown by the SVM classification performance on the true labels. As a first attempt to extend the neuroscience community’s toolbox with machine learning methods we believe to have shown the fruitfulness of this approach. Acknowledgements The authors would like to thank Volker Blanz for providing the face database and the flowfield algorithms. In addition we are grateful to G¨okhan Bakır, Heinrich B¨ulthoff, Jez Hill, Carl Rasmussen, Gunnar R¨atsch, Bernhard Sch¨olkopf and Vladimir Vapnik for helpful comments and suggestions. AG was supported by a grant from the European Union (IST 2000-29375 COGVIS). References [1] V. Blanz and T. Vetter. A Morphable Model for the Synthesis of 3D Faces. Proc. Siggraph99, pp. 187-194. Los Angeles: ACM Press, 1999. [2] A. B. A. Graf and F. A. Wichmann. Gender Classification of Human Faces. Proceedings of the BMCV, Springer LNCS 2525, 491-501, 2002. [3] T. D. Wickens. Elementary Signal Detection Theory. Oxford University Press, 2002. [4] A. B. A. Graf, A. J. Smola, and S. Borer. Classification in a Normalized Feature Space using Support Vector Machines. IEEE Transactions on Neural Networks 14(3), 597-605, 2003. [5] V. N. Vapnik. The Nature of Statistical Learning Theory. Springer, 1995. [6] M. E. Tipping. Sparse Bayesian learning and the relevance vector machine. Journal of Machine Learning Research 1, 211-244, 2001. [7] S. K. Reed. Pattern Recognition and Categorization. Cognitive Psychology 3, 382407, 1972. [8] R. O. Duda, P.E. Hart, and D.G. Stork. Pattern Classification. John Wiley & Sons, 2001. [9] L. Sirovich and M. Kirby. Low-Dimensional Procedure for the Characterization of Human Faces. Journal of the Optical Society of America A, 4(3), 519-524, 1987. [10] M. Turk and A. Pentland. Eigenfaces for Recognition. Journal of Cognitive Neuroscience, 3(1), 1991. [11] B. Sch¨olkopf, A. Smola, and K.-R. M¨uller. Nonlinear Component Analysis as a Kernel Eigenvalue Problem. Neural Computation, 10, 1299-1319, 1998. [12] J. Bromley and E. S¨ackinger. Neural-network and K-nearest-neighbor Classifiers. Technical Report 11359-910819-16TM, AT&T, 1991.
2003
146
2,361
Classification with Hybrid Generative/Discriminative Models Rajat Raina, Yirong Shen, Andrew Y. Ng Computer Science Department Stanford University Stanford, CA 94305 Andrew McCallum Department of Computer Science University of Massachusetts Amherst, MA 01003 Abstract Although discriminatively trained classifiers are usually more accurate when labeled training data is abundant, previous work has shown that when training data is limited, generative classifiers can out-perform them. This paper describes a hybrid model in which a high-dimensional subset of the parameters are trained to maximize generative likelihood, and another, small, subset of parameters are discriminatively trained to maximize conditional likelihood. We give a sample complexity bound showing that in order to fit the discriminative parameters well, the number of training examples required depends only on the logarithm of the number of feature occurrences and feature set size. Experimental results show that hybrid models can provide lower test error and can produce better accuracy/coverage curves than either their purely generative or purely discriminative counterparts. We also discuss several advantages of hybrid models, and advocate further work in this area. 1 Introduction Generative classifiers learn a model of the joint probability, p(x, y), of the inputs x and the label y, and make their predictions by using Bayes rule to calculate p(y|x), and then picking the most likely label y. In contrast, discriminative classifiers model the posterior p(y|x) directly. It has often been argued that for many application domains, discriminative classifiers often achieve higher test set accuracy than generative classifiers (e.g., [6, 4, 14]). Nonetheless, generative classifiers also have several advantages, among them straightforward EM methods for handling missing data, and often better performance when training set sizes are small. Specifically, it has been shown that a simple generative classifier (naive Bayes) outperforms its conditionally-trained, discriminative counterpart (logistic regression) when the amount of available labeled training data is small [11]. In an effort to obtain the best of both worlds, this paper explores a class of hybrid models for supervised learning that are partly generative and partly discriminative. In these models, a large subset of the parameters are trained to maximize the generative, joint probability of the inputs and outputs of the supervised learning task; another, much smaller, subset of the parameters are discriminatively trained to maximize the conditional probability of the outputs given the inputs. Motivated by an application in text classification as well as a desire to begin by exploring a simple, pure form of hybrid classification, we describe and give results with a “generativediscriminative” pair [11] formed by naive Bayes and logistic regression, and a hybrid algorithm based on both. We also give two natural by-products of the hybrid model: First, a scheme for allowing different partitions of the variables to contribute more or less strongly to the classification decision—for an email classification example, modeling the text in the subject line and message body separately, with learned weights for the relative contributions. Second, a method for improving accuracy/coverage curves of models that make incorrect independence assumptions, such as naive Bayes. We also prove a sample complexity result showing that the number of training examples needed to fit the discriminative parameters depends only on the logarithm of the vocabulary size and document length. In experimental results, we show that the hybrid model achieves significantly more accurate classification than either its purely generative or purely discriminative counterparts. We also demonstrate that the hybrid model produces class posterior probabilities that better reflect empirical error rates, and as a result produces improved accuracy/coverage curves. 2 The Model We begin by briefly reviewing the multinomial naive Bayes classifier applied to text categorization [10], and then describe our hybrid model and its relation to logistic regression. Let Y = {0, 1} be the set of possible labels for a document classification task, and let W = {w1, w2, . . . , w|W|} be a dictionary of words. A document of N words is represented by a vector X = (X1, X2, . . . , XN) of length N. The ith word in the document is Xi ∈W. Note that N can vary for different documents. The multinomial naive Bayes model assumes that the label Y is chosen from some prior distribution P(Y = ·), the length N is drawn from some distribution P(N = ·) independently of the label, and each word Xi is drawn independently from some distribution P(W = ·|Y ) over the dictionary. Thus, we have:1 P(X = x, Y = y) = P(Y = y)P(N = n) Qn i=1 P(W = xi|Y = y). (1) Since the length n of the document does not depend on the label and therefore does not play a significant role, we leave it out of our subsequent derivations. The parameters in the naive Bayes model are ˆP(Y ) and ˆP(W|Y ) (our estimates of P(Y ) and P(W|Y )). They are set to maximize the joint (penalized) log-likelihood of the x and y pairs in a labeled training set, M = {(x(i), y(i))}m i=1. Let n(i) be the length of document x(i). Specifically, for any k ∈{0, 1}, we have: ˆP(Y = k) = 1 m Pm i=1 1{y(i) = k} (2) ˆP(W = wl|Y = k) = Pm i=1 Pn(i) j=1 1{x(i) j =wl, y(i)=k}+1 Pm i=1 n(i)1{y(i)=k}+|W| , (3) where 1{·} is the indicator function (1{True} = 1, 1{False} = 0), and we have applied Laplace (add-one) smoothing in obtaining the estimates of the word probabilities. Using Bayes rule, we obtain the estimated class posterior probabilities for a new document x as: ˆP(Y = 1|X = x) = ˆ P (X=x|Y =1) ˆ P (Y =1) P y∈Y ˆ P (X=x|Y =y) ˆ P (Y =y) where ˆP(X = x|Y = y) = Qn i=1 ˆP(W = xi|Y = y). (4) The predicted class for the new document is then simply arg maxy∈Y ˆP(Y = y|X = x). In many text classification applications, the documents involved consist of several disjoint regions that may have different dependencies with the document label. For example, a USENET news posting includes both a subject region and a message body region.2 Because 1We adopt the notational convention that upper-case is used to denote random variables, and lower-case is used to denote particular values taken by the random variables. 2Other possible text classification examples include: Emails consisting of subject and body; technical papers consisting of title, abstract, and body; web pages consisting of title, headings, and body. of the strong assumptions used by naive Bayes, it treats the words in the different regions of a document in exactly the same way, ignoring the fact that perhaps words in a particular region (such as words in the subject) might be more “important.” Further, it also tends to allow the words in the longer region to dominate. (Explained below.) In the sequel, we assume that every input document X can be naturally divided into R regions X1, X2, . . . , XR. Note that R can be one. The regions are of variable lengths N1, N2, . . . , NR. For the sake of conciseness and clarity, in the following discussion we will focus on the case of R = 2 regions, the generalization offering no difficulties. Thus, the document probability in Equation (4) is now replaced with: ˆP(X = x|Y = y) = ˆP(X1 = x1|Y = y) ˆP(X2 = x2|Y = y) (5) = Qn1 i=1 ˆP(W = x1 i |Y = y) Qn2 i=1 ˆP(W = x2 i |Y = y) (6) Here, xj i denotes the ith word in the jth region. Naive Bayes will predict y = 1 if: Pn1 i=1 log ˆP(W = x1 i |Y = 1) + Pn2 i=1 log ˆP(W = x2 i |Y = 1) + log ˆP(Y = 1) ≥ Pn1 i=1 log ˆP(W = x1 i |Y = 0) + Pn2 i=1 log ˆP(W = x2 i |Y = 0) + log ˆP(Y = 0) and predict y = 0 otherwise. In an email or USENET news classification problem, if the first region is the subject, and the second region is the message body, then n2 ≫n1, since message bodies are usually much longer than subjects. Thus, in the equation above, the message body contributes to many more terms in both the left and right sides of the summation, and the result of the “≥” test will be largely determined by the message body (with the message subject essentially ignored or otherwise having very little effect). Given the importance and informativeness of message subjects, this suggests that we might obtain better performance than the basic naive Bayes classifier by considering a modified algorithm that assigns different “weights” to different regions, and normalizes for region lengths. Specifically, consider making a prediction using the modified inequality test: θ1 n1 Pn1 i=1 log ˆP(W = x1 i |Y = 1) + θ2 n2 Pn2 i=1 log ˆP(W = x2 i |Y = 1) + log ˆP(Y = 1) ≥ θ1 n1 Pn1 i=1 log ˆP(W = x1 i |Y = 0) + θ2 n2 Pn2 i=1 log ˆP(W = x2 i |Y = 0) + log ˆP(Y = 0) Here, the vector of parameters θ = (θ1, θ2) controls the relative “weighting” between the message subjects and bodies, and will be fit discriminatively. Specifically, we will model the class posteriors, which we denote by ˆPθ to make explicit the dependence on θ, as:3 ˆPθ(y|x) = ˆ P (y) ˆ P (x1|y) θ1 n1 ˆ P (x2|y) θ2 n2 ˆ P (Y =0) ˆ P (x1|Y =0) θ1 n1 ˆ P (x2|Y =0) θ2 n2 + ˆ P (Y =1) ˆ P (x1|Y =1) θ1 n1 ˆ P (x2|Y =1) θ2 n2 (7) We had previously motivated our model as assigning different weights to different parts of the document. A second reason for using this model is that the independence assumptions of naive Bayes are too strong. Specifically, with a document of length n, the classifier “assumes” that it has n completely independent pieces of evidence supporting its conclusion about the document’s label. Putting nr in the denominator of the exponent as a normalization factor can be viewed as a way of counteracting the overly strong independence assumptions.4 After some simple manipulations, we obtain the following expression for ˆPθ(Y = 1|x): ˆPθ(Y = 1|x) = 1 1+exp(−a−θ1b1−...−θRbR) (8) where a = log ˆ P (Y =1) ˆ P (Y =0) and br = 1 nr (log ˆ P (xr|Y =1) ˆ P (xr|Y =0)). With this expression for ˆPθ(y|x), we see that it is very similar to the form of the class posteriors used by logistic regression, the 3When there is no risk of ambiguity, we will sometimes replace P(X = x|Y = y), P(Y = y|X = x), P(W = xi|Y = y), etc. with P(x|y), P(y|x), P(xi|y). 4θr can also be viewed as an “effective region length” parameter, where we assume that region r of the document can be treated as only θr independent pieces of observation. For example, note that if each region r of the document has θr words exactly, then this model reduces to naive Bayes. only difference being that in this case a is a constant calculated from the estimated class priors. To make the parallel to logistic regression complete, we define b0 = 1, redefine θ as θ = (θ0, θ1, θ2), and define a new class posterior ˆPθ(Y = 1|x) = 1 1+exp(−θT b) (9) Throughout the derivation, we had assumed that the parameters ˆP(x|y) were fit generatively as in Equation (3) (and b is in turn derived from these parameters as described above). It therefore remains only to specify how θ is chosen. One method would be to pick θ by maximizing the conditional log-likelihood of the training set M = {x(i), y(i)}m i=1: θ = arg maxθ′ Pm i=1 log ˆPθ′(y(i)|x(i)) (10) However, the word generation probabilities that were used to calculate b were also trained from the training set M. This procedure therefore fits the parameters θ to the training data, using “features” b that were also fit to the data. This leads to a biased estimator. Specifically, since what we care about is the generalization performance of the algorithm, a better method is to pick θ to maximize the log-likelihood of data that wasn’t used to calculate the “features” b, because when we see a test example, we will not have had the luxury of incorporating information from the test example into the b’s (cf. [15, 12]). This leads to the following “leave-one-out” strategy of picking θ: θ = arg maxθ′ Pm i=1 log ˆPθ′,−i(y(i)|x(i)), (11) where ˆPˆθ,−i(y(i)|x(i)) is as given in Equation (9), except that each br is computed from word generation probabilities that were estimated with the ith example of the training set held out. We note that optimizing this objective to find θ is still the same optimization problem as in logistic regression, and hence is convex and can be solved efficiently. Further, the word generation probabilities with the ith example left out can also be computed efficiently.5 The predicted label for a new document under this method is arg maxy∈Y ˆPθ(y|x). We call this method the normalized hybrid algorithm. For the sake of comparison, we will also consider an algorithm in which the exponents in Equation (7) are not normalized by nr. In other words, we replace θr/nr there by just θr. We refer to this latter method as the unnormalized hybrid algorithm. 3 Experimental Results We now describe the results of experiments testing the effectiveness of our methods. All experiments were run using pairs of newsgroups from the 20newsgroups dataset [8] of USENET news postings. When parsing this data, we skipped everything in the USENET headers except the subject line; numbers and email addresses were replaced by special tokens NUMBER and EMAILADDR; and tokens were formed after stemming. In each experiment, we compare the performance of the basic naive Bayes algorithm with that of the normalized hybrid algorithm and logistic regression with Gaussian priors on the parameters. We used logistic regression with word-counts in the feature vectors (as in [6]), which forms a discriminative-generative pair with multinomial naive Bayes. All results reported in this section are averages over 10 random train-test splits. Figure 1 plots learning curves for the algorithms, when used to classify between various pairs of newsgroups. We find that in every experiment, for the training set sizes considered, the normalized hybrid algorithm with R = 2 has test error that is either the lowest or very near the lowest among all the algorithms. In particular, it almost always outperforms the 5Specifically, by precomputing the numerator and denominator of Equation (3), we can later remove any example by subtracting out the terms in the numerator and denominator corresponding to that example. 0 500 1000 1500 0.2 0.25 0.3 0.35 0.4 size of training set test error atheism vs religion.misc 0 500 1000 1500 0.05 0.1 0.15 0.2 0.25 0.3 0.35 0.4 size of training set test error pc.hardware vs mac.hardware 0 500 1000 1500 0 0.02 0.04 0.06 0.08 0.1 0.12 0.14 size of training set test error graphics vs mideast (a) (b) (c) 0 500 1000 1500 0 0.05 0.1 0.15 0.2 size of training set test error atheism vs sci.med 0 500 1000 1500 0 0.05 0.1 0.15 0.2 size of training set test error autos vs motorcycles 0 500 1000 1500 0 0.02 0.04 0.06 0.08 size of training set test error hockey vs christian (d) (e) (f) Figure 1: Plots of test error vs training size for several different newsgroup pairs. Red dashed line is logistic regression; blue dotted line is standard naive Bayes; black solid line is the hybrid algorithm. (Colors where available.) (If more training data were available, logistic regression would presumably out-perform naive Bayes; cf. [6, 11].) basic naive Bayes algorithm. The difference in performance is especially dramatic for small training sets. Although these results are not shown here, the hybrid algorithm with R = 2 (breaking the document into two regions) outperforms R = 1. Further, the normalized version of the hybrid algorithm generally outperforms the unnormalized version. 4 Theoretical Results In this section, we give a distribution free uniform convergence bound for our algorithm. Classical learning and VC theory indicates that, given a discriminative model with a small number of parameters, typically only a small amount of training data should be required to fit the parameters “well” [14]. In our model, a large number of parameters ˆP are fit generatively, but only a small number (the θ’s) are fit discriminatively. We would like to show that only a small training set is required to fit the discriminative parameters θ.6 However, standard uniform convergence results do not apply to our problem, because the “features” bi given to the discriminative logistic regression component also depend on the training set. Further, the θi’s are fit using the leave-one-out training procedure, so that every pair of training examples is actually dependent. For our analysis, we assume the training set of size m is drawn i.i.d.from some distribution D over X × Y. Although not necessary, for simplicity we assume that each document has the same total number of words n = PR i=1 ni, though the lengths of the individual regions may vary. (It also suffices to have an upper- and a lower-bound on document length.) Finally, we also assume that each word occurs at most Cmax times in a single document, and that the distribution D from which training examples are drawn satisfies 6For a result showing that naive Bayes’ generatively fit parameters (albeit one using a different event model) converge to their population (asymptotic) values after a number of training examples that depends logarithmically on the size of the number of features, also see [11]. ρmin ≤P(Y = 1) ≤1 −ρmin, for some fixed ρmin > 0. Note that we do not assume that the “naive Bayes assumption” (that words are conditionally independent given the class label) holds. Specifically, even when the naive Bayes assumption does not hold, the naive Bayes algorithm (as well as our hybrid algorithm) can still be applied, and our results apply to this setting. Given a set M of m training examples, for a particular setting of the parameter θ, the expected log likelihood of a randomly drawn test example is: εM(θ) = E(x,y)∼D log ˆPθ(y|x) (12) where ˆPθ is the probability model trained on M as described in the previous section, using parameters ˆP fit to the entire training set. Our algorithm uses a leave-one-out estimate of the true log likelihood; we call this the leave-one-out log likelihood: ˆεM −1(θ) = 1 m Pm i=1 log ˆPθ,−i(y(i)|x(i)) (13) where ˆPθ,−i represents the probability model trained with the ith example left out. We would like to choose θ to maximize εM, but we do not know εM. Now, it is well-known that if we have some estimate ˆε of a generalization error measure ε, and if |ˆε(θ)−ε(θ)| ≤ϵ for all θ, then optimizing ˆε will result in a value for θ that comes within 2ϵ of the best possible value for ε [14]. Thus, in order to show that optimizing ˆεM −1 is a good “proxy” for optimizing εM, we only need to show that ˆεM −1(θ) is uniformly close to εM(θ). We have: Theorem 1 Under the previous set of assumptions, in order to ensure that with probability at least 1 −δ, we have |εM(θ) −ˆεM −1(θ)| < ϵ for all parameters θ such that ||θ||∞≤η, it suffices that m = O(poly(1/δ, 1/ϵ, log n, log |W|, R, η)R). The full proof of this result is fairly lengthy, and is deferred to the full version of this paper [13]. From the theorem, the number of training examples m required to fit the θ parameters (under the fairly standard regularity condition that θ be bounded) depends only on the logarithms of the document length n and the vocabulary size |W|. In our bound, there is an exponential dependence on R; however, from our experience, R does not need to be too large for significantly improved performance. In fact, our experimental results demonstrate good performance for R = 2. 5 Calibration Curves We now consider a second application of these ideas, to a text classification setting where the data is not naturally split into different regions (equivalently, where R = 1). In this setting we cannot use the “reweighting” power of the hybrid algorithm to reduce classification error. But, we will see that, by giving better class posteriors, our method still gives improved performance as measured on accuracy/coverage curves. An accuracy/coverage curve shows the accuracy (fraction correct) of a classifier if it is asked only to provide x% coverage—that is, if it is asked only to label the x% of the test data on which it is most confident. Accuracy/coverage curves towards the upper-right of the graph mean high accuracy even when the coverage is high, and therefore good performance. Accuracy value at coverage 100% is just the normal classification error. In settings where both human and computer label documents, accuracy/coverage curves play a central role in determining how much data has to be labeled by humans. They are also indicative of the quality of a classifier’s class posteriors, because a classifier with better class posteriors would be able to better judge which x% of the test data it should be most confident on, and achieve higher accuracy when it chooses to label that x% of the data. Figure 2 shows accuracy/coverage curves for classifying several pairs of newsgroups from the 20newsgroups dataset. Each plot is obtained by averaging the results of ten 50%/50% random train/test splits. The normalized hybrid algorithm (R = 1) does significantly better than naive Bayes, and has accuracy/coverage curves that are higher almost everywhere. 0 0.2 0.4 0.6 0.8 1 0.7 0.75 0.8 0.85 0.9 0.95 1 Coverage Accuracy atheism vs religion.misc 0 0.2 0.4 0.6 0.8 1 0.88 0.9 0.92 0.94 0.96 0.98 1 Coverage Accuracy pc.hardware vs mac.hardware 0 0.2 0.4 0.6 0.8 1 0.975 0.98 0.985 0.99 0.995 1 1.005 Coverage Accuracy graphics vs mideast (a) (b) (c) 0 0.2 0.4 0.6 0.8 1 0.96 0.97 0.98 0.99 1 1.01 1.02 Coverage Accuracy atheism vs sci.med 0 0.2 0.4 0.6 0.8 1 0.94 0.95 0.96 0.97 0.98 0.99 1 Coverage Accuracy autos vs motorcycles 0 0.2 0.4 0.6 0.8 1 0.985 0.99 0.995 1 1.005 Coverage Accuracy hockey vs christian (d) (e) (f) Figure 2: Accuracy/Coverage curves for different newsgroups pairs. Black solid line is our normalized hybrid algorithm with R = 1; magenta dash-dot line is naive Bayes; blue dotted line is unnormalized hybrid, and red dashed line is logistic regression. (Colors where available.) For example, in Figure 2a, the normalized hybrid algorithm with R = 1 has a coverage of over 40% at 95% accuracy, while naive Bayes’ coverage is 0 for the same accuracy. Also, the unnormalized algorithm has performance about the same as naive Bayes. Even in examples where the various algorithms have comparable overall test error, the normalized hybrid algorithm has significantly better accuracy/coverage. 6 Discussion and Related Work This paper has described a hybrid generative/discriminative model, and presented experimental results showing that a simple hybrid model can perform better than either its purely generative or discriminative counterpart. Furthermore, we showed that in order to fit the parameters θ of the model, only a small number of training examples is required. There have been a number of previous efforts to modify naive Bayes to obtain more empirically accurate posterior probabilities. Lewis and Gale [9] use logistic regression to recalibrate naive Bayes posteriors in an active learning task. Their approach is similar to the lower-performing unnormalized version of our algorithm, with only one region. Bennett [1] studies the problem of using asymmetric parametric models to obtain high quality probability estimates from the scores outputted by text classifiers such as naive Bayes. Zadrozny and Elkan [16] describe a simple non-parametric method for calibrating naive Bayes probability estimates. While these methods can obtain good class posteriors, we note that in order to obtain better accuracy/coverage, it is not sufficient to take naive Bayes’ output p(y|x) and find a monotone mapping from that to a set of hopefully better class posteriors (e.g., [16]). Specifically, in order to obtain better accuracy/coverage, it is also important to rearrange the confidence orderings that naive Bayes gives to documents (which our method does because of the normalization). Jaakkola and Haussler [3] describe a scheme in which the kernel for a discriminative classifier is extracted from a generative model. Perhaps the closest to our work, however, is the commonly-used, simple “reweighting” of the language model and acoustic model in speech recognition systems (e.g., [5]). Each of the two models is trained generatively; then a single weight parameter is set using hold-out cross-validation. In related work, there are also a number of theoretical results on the quality of leave-oneout estimates of generalization error. Some examples include [7, 2]. (See [7] for a brief survey.) Those results tend to be for specialized models or have strong assumptions on the model, and to our knowledge do not apply to our setting, in which we are also trying to fit the parameters θ. In closing, we have presented one hybrid generative/discriminative algorithm that appears to do well on a number of problems. We suggest that future research in this area is poised to bear much fruit. Some possible future work includes: automatically determining which parameters to train generatively and which discriminatively; training methods for more complex models with latent variables, that require EM to estimate both sets of parameters; methods for taking advantage of the hybrid nature of these models to better incorporate domain knowledge; handling missing data; and support for semi-supervised learning. Acknowledgments. We thank Dan Klein, David Mulford and Ben Taskar for helpful conversations. Y. Shen is supported by an NSF graduate fellowship. This work was also supported by the Department of the Interior/DARPA under contract number NBCHD030010, and NSF grant #IIS-0326249. References [1] Paul N. Bennett. Using asymmetric distributions to improve text classifier probability estimates. In Proceedings of SIGIR-03, 26th ACM International Conference on Research and Development in Information Retrieval, 2003. [2] Luc P. Devroye and T. J. Wagner. Distribution-free performance bounds for potential function rules. IEEE Transactions on Information Theory, 5, September 1979. [3] T. Jaakkola and D. Haussler. Exploiting generative models in discriminative classifiers. In Advances in Neural Information Processing Systems 11, 1998. [4] T. Jebara and A. Pentland. Maximum conditional likelihood via bound maximization and the cem algorithm. In Advances in Neural Information Processing Systems 11, 1998. [5] D. Jurafsky and J. Martin. Speech and language processing. Prentice Hall, 2000. [6] John Lafferty Kamal Nigam and Andrew McCallum. Using maximum entropy for text classification. In IJCAI-99 Workshop on Machine Learning for Information Filtering, 1999. [7] Michael Kearns and Dana Ron. Algorithmic stability and sanity-check bounds for leave-one-out cross-validation. Computational Learning Theory, 1997. [8] Ken Lang. Newsweeder: learning to filter netnews. In Proceedings of the Ninth European Conference on Machine Learning, 1997. [9] David D. Lewis and William A. Gale. A sequential algorithm for training text classifiers. In Proceedings of SIGIR-94, 17th ACM International Conference on Research and Development in Information Retrieval, 1994. [10] Andrew McCallum and Kamal Nigam. A comparison of event models for naive bayes text classification. In AAAI-98 Workshop on Learning for Text Categorization, 1998. [11] Andrew Y. Ng and Michael I. Jordan. On discriminative vs. generative classifiers: a comparison of logistic regression and naive bayes. In NIPS 14, 2001. [12] John C. Platt. Probabilistic outputs for support vector machines and comparisons to regularized likelihood methods. In A. Smola, P. Bartlett, B. Scholkopf, and D. Schuurmans, editors, Advances in Large Margin Classifiers. MIT Press, 1999. [13] R. Raina, Y. Shen, A. Y. Ng, and A. McCallum. Classification with hybrid generative/discriminative models. http://www.cs.stanford.edu/˜rajatr/nips03.ps, 2003. [14] V. N. Vapnik. Statistical Learning Theory. John Wiley & Sons, 1998. [15] David H. Wolpert. Stacked generalization. Neural Networks, 5(2):241–260, 1992. [16] Bianca Zadrozny and Charles Elkan. Obtaining calibrated probability estimates from decision trees and naive bayesian classifiers. In ICML ’01, 2001.
2003
147
2,362
Fast Feature Selection from Microarray Expression Data via Multiplicative Large Margin Algorithms Claudio Gentile DICOM, Universit`a dell’Insubria Via Mazzini, 5, 21100 Varese, Italy gentile@dsi.unimi.it Abstract New feature selection algorithms for linear threshold functions are described which combine backward elimination with an adaptive regularization method. This makes them particularly suitable to the classification of microarray expression data, where the goal is to obtain accurate rules depending on few genes only. Our algorithms are fast and easy to implement, since they center on an incremental (large margin) algorithm which allows us to avoid linear, quadratic or higher-order programming methods. We report on preliminary experiments with five known DNA microarray datasets. These experiments suggest that multiplicative large margin algorithms tend to outperform additive algorithms (such as SVM) on feature selection tasks. 1 Introduction Microarray technology allows researchers to simultaneously measure expression levels associated with thousands or ten thousands of genes in a single experiment (e.g., [7]). However, the number of replicates in these experiments is often seriously limited (tipically a few dozen). This gives rise to datasets having a large number of gene expression values (numerical components) and a relatively small number of samples. As a popular example, in the “Leukemia” dataset from [10] we have only 72 observations of the expression level of 7129 genes. It is clear that in this extreme scenario machine learning methods related to feature selection play a fundamental role for increasing efficiency and enhancing the comprehensibility of the results. Besides, in biological and medical research finding accurate class prediction rules which depend on the level of expression of few genes is important for a number of activities, ranging from medical diagnostics to drug discovery. Within the classification framework, a regularization method (also called penalty-based or feature weighting method) is an indirect route to feature selection. Whereas a (direct) feature selection method searches in the combinatorial space of feature subsets, a regularization method constrains the magnitudes of the parameters assigning them a “degree of relevance” during learning, thereby performing feature selection as a by-product of its learning mechanism (see, e.g., [16, 19, 17, 14, 4, 20]). Feature selection is a wide and active field of research; the reader is referred to [15] for a valuable survey. See also, e.g., [3, 6] (and references therein) for specific work on gene expression data. In this paper, we introduce novel feature selection algorithms for linear threshold functions, whose core learning procedure is an incremental large margin algorithm called1 ALMAp (Approximate Large Margin Algorithm w.r.t. norm p) [8]. Our ALMAp-based feature selection algorithms lie between a direct feature selection method and a regularization method. These algorithms might be considered as a refinement on a recently proposed method, specifically tested on microarray expression data, called Recursive Feature Elimination (RFE) [13]. RFE uses Support Vector Machines (SVM) as the core learning algorithm, and performs backward selection to greedily remove the feature whose associated weight is smallest in absolute value until only the desired number of features remain. Our algorithms operate in a similar fashion, but they allow us to eliminate many features at once by exploiting margin information about the current training set. The degree of dimensionality reduction is ruled by the norm p in ALMAp. The algorithms start by being aggressive (simulating a multiplicative algorithm when the number of current features is large) and end by being gentle (simulating an additive algorithm such as SVM when few features are left). From a computational standpoint, our algorithms lie somewhere between a 1-norm and a 2-norm penalization method. However, unlike other regularization approaches specifically tailored to feature selection, such as those in [4, 20], we do avoid computationally intensive linear (or nonlinear) programming methods. This is because we not only solve the optimization problem associated to regularization in an approximate way, but also use an incremental algorithm having the additional capability to smoothly interpolate between the two kinds of penalizations. Our algorithms are simple to implement and turn out to be quite fast. We made preliminary experiments on five known DNA microarray datasets. In these experiments, we compared the margin-based feature selection performed by our multiplicative algorithms to a standard correlation-based feature selection method applied to both additive (SVM-like) and multiplicative (Winnow-like) core learning procedures. When possible, we tried to follow previous experimental settings, such as those in [13, 22, 20]. The conclusion of our preliminary study is that a multiplicative (large margin) algorithm is often better that an SVM-like algorithm when the goal is to compute linear threshold rules that are both accurate and depend on the value of few components (as is often the case in gene expression datasets). 2 Preliminaries and notation An example is a pair (x, y), where x is an instance vector lying in Rf and y ∈{−1, +1} is the binary label associated with x. A training set S is a sequence of examples S = ((x1, y1), ..., (xm, ym)) ∈(Rf × {−1, +1})m. When F ⊆{1, ..., f} is a set of features and v ∈Rf, we denote by v|F the subvector of v where the features/dimensions not in F are eliminated. Also, S|F denotes the training set S|F = ((x1|F , y1), ..., (xm|F , ym)). A weight vector w = (w1, ..., wf) ∈Rf represents a hyperplane passing through the origin. As usual, we associate with w the (zero threshold) linear threshold function w : x → sign(w · x) = 1 if w · x ≥0 and = −1 otherwise. When p ≥1 we denote by ||w||p the p-norm of w, i.e., ||w||p = (Pf i=1 |wi|p)1/p (also, ||w||∞= limp→∞(Pf i=1 |wi|p)1/p = maxi |wi|). We say that norm q is dual to norm p if q = p p−1. In this paper we assume that p and q are some pair of dual values, with p ≥2. We use p-norms for instance vectors and q-norms for weight vectors. For notational brevity, throughout this paper we use normalized instances ˆx = x/||x||p, where p will be clear from the surrounding context. The (normalized) p-norm margin (or just the margin) of a hyperplane w with ||w||q ≤1 on example (x, y) is defined as y w · ˆx. If this margin is positive then w classifies (x, y) correctly. Notice that ||x||p ≤f 1/p ||x||∞for any x ∈Rf. Hence if p is logarithmic in the number of features/dimensions of x, i.e., p = ln f, we obtain ||x||(ln f) ≤e ||x||∞. 1Broadly speaking, as the norm parameter p is varied, ALMAp is able to (approximately) interpolate between Support Vector Machines [5] and (large margin versions of) multiplicative classification algorithms, such as Winnow [16]. Compared to Winnow, ALMAp is more flexible (since we can adjust the norm parameter p) and requires less tuning. See Section 3 for details. ALGORITHM ALMAp(S, α) Input: Training set S = ((x1, y1), ..., (xm, ym)); norm parameter p ≥2; approximation parameter α ∈(0, 1]. Initialization: w1 = 0; k = 1. For t = 1, 2, ... do: Get example (xt, yt) and update weights as follows: Set: γk = √ 8 (p−1) α 1 √ k; ηk = q 2 p−1 1 √ k. If yt wk · ˆxt ≤(1 −α) γk then: w′ k = T−1(T(wk) + ηk yt ˆxt), wk+1 = w′ k/||w′ k||q, where q = p p−1, k ←k + 1. Output: Final weight vector wk = (wk,1, ..., wk,f); final margin γ = γk. Figure 1: The approximate large margin algorithm ALMAp. Also, ||w||1 ≤1 implies ||w||q ≤1 for any q > 1. Thus if ||w||1 ≤1 the (ln f)-norm margin y w·x ||x||(ln f) is actually bounded from below by the ∞-norm margin y w·x ||x||∞divided by some constant. Arguing about the ∞-norm margin is convenient when dealing with sparse hyperplanes, i.e., with hyperplanes having only a small number of relevant features (e.g., [14]). We say that a training set S = ((x1, y1), ..., (xm, ym)) is linearly separable with margin γ > 0 when there exists a hyperplane w with ||w||q ≤1 such that yt w · ˆxt ≥γ for t = 1, ..., m. Given α ∈(0, 1], we say that hyperplane w′ is an α-approximation to w (w.r.t. training set S) if ||w′||q ≤1 and yt w′ · ˆxt ≥(1 −α)γ holds for t = 1, ..., m. In particular, if the underlying margin is an ∞-norm margin (and α is not close to 1) then w′ tends to share the sparsity properties of w. See also Section 3. 3 The large margin algorithm ALMAp ALMAp is a large margin variant of the p-norm Perceptron algorithm2 introduced by [11] (see also [9]). The version of the algorithm we have used in our experiments is described in Figure 1, where the one-one mapping T = (T1, ..., Tf) : Rf →Rf is the gradient of the scalar function 1 2|| · ||2 q and its inverse T−1 = (T −1 1 , ..., T −1 f ) : Rf →Rf is the gradient of the (Legendre dual) function 1 2|| · ||2 p. The mapping T depends on the chosen norm p, which we omit for notational brevity. One can immediately see that p = q = 2 gives T = T−1 = identity. See [9] for further discussion about the properties of T. The algorithm in Figure 1 takes in input a training set S = ((x1, y1), ..., (xm, ym)) ∈(Rf × {−1, +1})m, a norm value p ≥2 and a parameter α ∈(0, 1], measuring the degree of approximation to the optimal margin hyperplane. Learning proceeds in a sequence of trials. ALMAp maintains a normalized vector wk of f weights. It starts from w1 = 0 and in the generic trial t it processes example (xt, yt). If the current weight vector wk classifies (xt, yt) with (normalized) margin not larger than (1−α) γk then the algorithm updates its internal state. The update rule consists of the following: First, the algorithm computes w′ k via a (p-norm) perceptron-like update rule. Second, w′ k is normalized w.r.t. the chosen norm q (recall that q is dual to p). The normalized vector wk+1 will then be used in the next trial. After sweeping (typically more than once) through the training set, the algorithm outputs an fdimensional vector wk which represents the linear model the algorithm has learned from the data. The output also includes the final margin γ = γk, where k is the total number of updates (plus one) the algorithm took to compute wk. This margin is a valuable indication of the level of “noise” in the data. In particular, when the training set S is linearly separable, 2The p-norm Perceptron algorithm is a generalization of the classical Perceptron algorithm, obtained by setting p = 2. we can use γ to estimate from above the true margin γ∗of S (see Theorem 1). In turn, γ∗ helps us in setting up a reliable feature selection process (see Section 4). Theorem 1 is a convergence result stating two things [8]: 1. ALMAp(S, α) computes an α-approximation to the maximal p-norm margin hyperplane after a finite number of updates; 2. the margin γ output by ALMAp(S, α) is an upper bound on the true margin of S.3 Theorem 1 [8] Let γ∗= maxw∈Rf : ||w||q=1 mint=1,...,m yt w · ˆxt > 0. Then the number of updates made by the algorithm in Figure 1 (i.e., the number of trials t such that yt wk · ˆxt ≤(1 −α) γk) is upper bounded by 2 (p−1) (γ∗)2 2 α −1 2 + 8 α −4 = O  p−1 α2 (γ∗)2  . Furthermore, throughout the run of the algorithm we have γk ≥γ ≥γ∗, for k = 1, 2, ... (recall that γ is the last γk produced by ALMAp). Hence the previous bound is also an upper bound on the number of trials t such that yt wk · ˆxt ≤(1 −α) γ. Recalling Section 2, we notice that setting p = O(ln f) makes ALMAp useful when learning sparse hyperplanes. In particular, the above theorem gives us the following ∞-norm margin upper bound on the number of updates: O ln f / (α2 (γ∗)2)  , where γ∗= maxw∈Rf : ||w||1=1 mint=1,...,m yt w · xt / ||xt||∞. This is similar to the behavior exhibited by classifiers based on linear programming (e.g., [17, 19, 4] and references therein), as well as to the performance achieved by multiplicative algorithms, such as the zero-threshold Winnow algorithm [11]. 4 The multiplicative feature selection algorithms We now describe two feature selection algorithms based on ALMAp. The algorithms differ in the way features are eliminated. The first algorithm, called ALMA-FS (ALMA-based Feature Selection), is strongly influenced by its training behavior: If ALMAp has made many updates during training then arguably this corresponds to a high level of noise in the data (w.r.t. a linear model). In this case the feature selection mechanism tends to be prudent in eliminating features. On the other hand, if the number of updates is small we can think of the linear model computed by ALMAp as an accurate one for the training data at hand, so that one can reliably perform a more aggressive feature removal. The second algorithm, called ALMAln-RFE, performs Recursive Feature Elimination (RFE) on the linear model computed by ALMAp, and might be seen as a simplified version of the first one, where the rate of feature removal is constant and the final number of features is fixed ahead of time. ALMA-FS is described in Figure 2. It takes in input a training set S = ((x1, y1), ..., (xm, ym)) ∈(Rn × {−1, +1})m and a parameter α (which is the same as ALMAp’s). Then the algorithm repeatedly invokes ALMAp on the same training set but progressively reducing the set F of current features. The algorithm starts with F = {1, ..., n}, being n the dimension of the input space. Then, on each repeat-until iteration, the algorithm: sets the norm p to the logarithm4 of the number f of current features, runs ALMAp for the given values of α and p, gets in output w and γ, and computes the new (smaller) F to be used in the next iteration. Computing the new F amounts to sorting the components of w according to decreasing absolute value and then keeping, among the f features, only the largest ones (thereby eliminating features which are likely to be irrelevant). Here c(α) ∈[0, 1] is a suitable function whose value will be specified later. We call a repeat-until iteration of this kind a feature selection stage. ALMA-FS terminates when it reaches a local minimum F, where the algorithm is unable to drop any further features. ALMA-FS uses the output produced by ALMAp in the most natural way, retaining only the features corresponding to (supposedly) relevant components of w. We point out that here the discrimination between relevant and irrelevant components is based on the margin γ 3A more general statement holds for the nonseparable case (see [8] for details). In this case, the α parameter in ALMAp(.,α) is similar to the C parameter in SVM [5]. 4In order to prevent p < 2, we actually set p = 2 when ln f < 2. ALGORITHM ALMA-FS(S, α) Input: Training set S = ((x1, y1), ..., (xm, ym)); approx. param. α ∈(0, 1]. Initialization: F = {1, 2, ..., n}; f := |F| = n. Repeat • Set p := max{2, ln f} and run ALMAp(S|F , α), getting in output w = (w1, ..., wf) ∈Rf and γ > 0; • Sort w1, ..., wf according to decreasing |wi| and let wi1, ..., wif be the sorted sequence; set q = p p−1 and compute the smallest f ∗≤f s.t. Pf ∗ j=1 |wij|q ≥1 −(c(α) γ)q; (1) • Set F = {i1, i2, ..., if ∗}; f := |F| = f ∗; Until F does not shrink any more. Output: Final weight vector w = (w1, ..., wf). Figure 2: ALMA-FS: Feature selection using ALMAp where p is logarithmic in f. output by ALMAp. In turn, γ depends on the number of training updates made by ALMAp, i.e., on the “amount of noise” in the data. This criterion can be viewed as a margin-based criterion according to the following fact: If in any given stage ALMAp has computed an α-approximation to the maximal margin hyperplane for a (linearly separable) training sequence S, then the (smaller) vector computed at the end of that stage will be an (α+c(α))approximation to the maximal margin hyperplane for the new (linearly separable) sequence where some features have been eliminated. This statement follows directly from (1) and Theorem 1. We omit the details due to space limitations. From this point of view, a reasonable choice of c(α) is one which insures α + c(α) ≤1 for α ∈[0, 1] and the two limiting conditions limα→0 α + c(α) = 0 and limα→1 α + c(α) = 1. The simplest function satisfying the conditions above (the one we used in the experiments) is c(α) = α (1 −α). ALMA-FS starts with a relatively large value of the norm parameter p (making it fairly aggressive at the beginning), and then progressively reduces this parameter so that the algorithm can focus in later stages on the remaining features. This heuristic approach allows us to keep a good approximation capability (as measured by the margin) while dropping a lot of irrelevant components from the weight vectors computed by ALMAp. ALMAln-RFE is a simplified version of ALMA-FS that halves the number of features in each stage, and uses again a norm p logarithmic in the number of current features. The α parameter is replaced by nf, the desired number of features. ALMAln-RFE(S, nf) is obtained from the algorithm in Figure 2 upon replacing the definition of f ∗in (1) by f ∗= max{⌊f/2⌋, nf}, so that the number of training stages is always logarithmic in n/nf. 5 Experiments We tested ALMA-FS and ALMAln-RFE on a few well-known microarray datasets (see below). For the sake of comparison, we tended to follow previous experimental settings, such as those described in [13, 22, 20]. Our results are summarized in Table 1. For each dataset, we first generated a number of random training/test splits. Since we used on-line algorithms, the output depends on the order of the training sequence. Therefore our random splits also included random permutations of the training set. The results shown in Table 1 are averaged over these random splits. Five datasets have been used in our experiments. 1. The ALL-AML dataset [10] contains 72 samples, each with expression profiles about 7129 genes. The task is to distinguish between the two variants of leukemia ALL and AML. We call this dataset the “Leukemia” dataset. We used the first 38 examples as training set and the remaining 34 as test set. This seems to be a standard training/test split (e.g., [10, 21, 13, 22]). The results have been averaged over 1000 random permutations of the training set. 2. The “Colon Cancer” dataset [2] contains 62 expression profiles for tumor and normal samples concerning 2000 genes. Following [20], we randomly split the dataset into a training set of 50 examples and a test set of 12. The random split was performed 1000 times. 3. In the ER+/ER−dataset from [12] 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. 4. The “Prostate” cancer dataset from [18] contains 102 samples with expression profiles concerning 12600 genes. The task is to separate tumor from normal samples. As in [18], we estimated the test error through a Leave-One Out Cross Validation (LOOCV)-like estimator. In particular, for this dataset we randomly split 1000 times into a training set of 101 examples and a test set of 1 example, and then averaged the results. (This is roughly equivalent to LOOCV with 10 random permutations of the training set.) 5. In the “Lymphoma” dataset [1] 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, 62 samples are in the classes “DLCL”, “FL” and “CLL” (malignant) and the remaining 34 are labelled “otherwise”. As in [20], we randomly split the dataset into a training set of size 60 and a test set of size 36. The random split was performed 1000 times. We made no preprocessing on the data. All our experiments have been run on a PC with a single AMD Athlon processor running at 1300 Mhz. The running times we will be giving are measured on this machine. We compared on these datasets ALMA-FS (“FS” in Table 1) and ALMAln-RFE (“ln-RFE”) to three more feature selection algorithms: a fast approximation to Recursive Feature Elimination applied to SVM (called ALMA2-RFE, abbreviated as “2-RFE” in Table 1), and a standard feature selection method based on correlation coefficients (e.g., [10]) applied to both (an approximation to) SVM and ALMAln f, being f the number of features selected by the correlation method. We call the last two methods ALMA2-CORR (“2-CORR” in Table 1) and ALMAln-CORR (“ln-CORR” in Table 1), respectively. In all cases our base learning algorithm was ALMAp(.,α), where α ∈{0.5, 0.6, 0.7, 0.8, 0.9}, and p was either 2 (to approximate SVM) or logarithmic in the number of features the algorithm was operating on (to simulate a multiplicative large margin algorithm). For each combination (algorithm, number of genes), only the best accuracy results (w.r.t. α) are shown. On the “Colon cancer”, the “Breast” and the “Lymphoma” datasets we run ALMAp by cycling 50 times over the current training set. On the “Leukemia” and the “Prostate” datasets (which are larger) we cycled 100 times. In Table 1 we give, for each dataset, the average error and the number of features (“# GENES”) selected by the algorithms.5 The only algorithm which tries to determine the final number of features as a part of its inference mechanism is ALMA-FS: all the others take this number as an explicit input parameter. The main goal of this experimental study was to carry out a direct comparison between different feature selection methods combined with different core learning algorithms. Feature selection performed by ALMA-FS, ALMAln-RFE and ALMA2-RFE is margin-based, while feature selection performed by ALMA2-CORR and ALMAln-CORR is correlation-based. According to [15], the former falls within the category of wrapper methods, while the latter is an example of filter methods. The two core learning algorithms we employed are the SVM-like algorithm ALMA2 and the (large margin) Winnow-like algorithm ALMAp, with logarithmic p. The first has been used with ALMA2-RFE and ALMA2-CORR, the second has been used with ALMA-FS, ALMAln-RFE and ALMAln-CORR. The accuracy results we have obtained are often superior to those reported in the litera5Observe that, due to the on-line nature of the algorithms, different sets of genes get selected on different runs. Therefore one could also collect statistics about the gene selection frequency over the runs. Details will be given in the full paper. Table 1: Experimental results on five microarray datasets. The percentages denote the average fraction of misclassified patterns in the test set, while “# GENES” denotes the average number of genes (features) selected. The results refer to the same training/test splits. Notice that ALMA-FS (“FS”) determines automatically the number of genes to select. According to Wilcoxon signed rank test, ≥0.5% accuracy difference might be considered significant. # GENES FS 2-RFE ln-RFE 2-CORR ln-CORR LEUKEMIA 20 — 5.8% 3.3% 5.9% 3.7% 26.5 3.0% — — — — 40 — 6.7% 3.0% 5.0% 3.6% 60 — 8.9% 3.2% 4.3% 2.9% 100 — 9.0% 2.5% 4.0% 2.9% 200 — 7.2% 3.1% 3.0% 4.5% ALL — 3.5% 3.3% 3.5% 3.3% COLON 20 — 17.0% 13.1% 15.4% 14.8% CANCER 22.6 12.7% — — — — 40 — 15.4% 12.1% 14.4% 14.0% 60 — 14.8% 12.0% 14.2% 13.6% 100 — 14.3% 12.6% 13.7% 13.1% 200 — 13.2% 12.4% 13.9% 13.2% ALL — 13.0% 13.3% 13.0% 13.3% BREAST 20 — 11.5% 10.3% 6.1% 5.5% 38.5 9.5% — — — — 40 — 10.7% 9.9% 6.5% 6.5% 60 — 10.1% 9.9% 7.5% 8.5% 100 — 10.4% 9.8% 13.1% 10.4% 200 — 11.9% 9.6% 14.6% 14.5% ALL — 15.8% 10.0% 15.8% 10.0% PROSTATE 20 — 8.4% 7.8% 11.5% 10.4% 30.8 9.5% — — — — 40 — 8.1% 9.4% 10.2% 8.0% 60 — 8.1% 10.3% 8.5% 7.7% 100 — 9.3% 10.2% 6.9% 6.5% 200 — 9.8% 9.9% 8.4% 7.2% ALL — 10.0% 10.4% 10.0% 10.4% LYMPHOMA 20 — 10.1% 9.9% 12.6% 12.3% 30.8 8.1% — — — — 40 — 7.9% 7.4% 10.5% 10.2% 60 — 7.4% 6.8% 9.5% 9.2% 100 — 6.6% 6.0% 8.2% 8.3% 200 — 6.3% 5.6% 7.4% 7.7% ALL — 7.2% 5.5% 7.2% 5.5% ture, though this should not be considered very significant.6 From our direct comparison, however, a few (more reliable) conclusions can be drawn. First, on these gene expression 6In fact, the results on feature selection applied to microarray datasets are not readily comparable across different papers, due to the randomness in the training/test splits (which is a relevant source of variance) and the different preprocessing of the data. That said, we briefly mention a few results reported by other researchers on the same datasets. On the “Leukemia” dataset, [22] report 0% test error for a logistic regression algorithm that chooses the number of features to extract by LOOCV. The same error rate is reported by [21] for a linear SVM using 20 genes. [20] use linear SVM as the underlying learning algorithm. On the “Colon Cancer” dataset, the authors report an average accuracy of 16.4% without feature selection and an accuracy ranging between 15.0% and 16.9% (depending on the number of genes selected) for the RFE and the AROM (Approximation of the Zero-Norm Minimization) methods. On the “Lymphoma” dataset the same authors report 7.1% average error for linear SVM and 5.9% to 6.8% average error (again depending on the number of genes selected) for the RFE and the AROM methods. On the “Prostate” dataset, [18] use a k-NN classifier and report a LOOCV accuracy comparable to ALMA2-RFE’s (but worse than ALMAln-CORR’s). datasets a large margin Winnow-like algorithm generally outperforms an SVM-like algorithm. Second, despite the common wisdom [15] according to which wrapper methods tend to be more accurate than filter methods, it is hard to tell here how the two methods compare (see [22] for similar results). Third, knowing the “optimal” number of genes beforehand is a valuable side information. Notice that, unlike many of the methods proposed in the literature, ALMA-FS tries to determine in an automatic way a “good” number of features to select.7 In fact, due to the scarcity of examples and the large number of vector components, the repeated use of cross-validation on the same validation set might lead to overfitting. ALMA-FS seems to do a fine job of it on three out of five datasets (on the “Breast” dataset “FS” should only be compared to “2-RFE” and “ln-RFE”). Finally, we would like to stress that our feature selection algorithms are quite fast. To give an idea, on the “Colon Cancer” and the “Breast” datasets our algorithms take on average just a few seconds, while on the “Prostate” dataset they take just a few minutes. References [1] Alizadeh, A., et al. (2000). Distinct types of diffuse large b-cell lymphoma identified by gene expression profiling. Nature, 403, 503–511. [2] Alon, U., et al. (1999). Broad patterns of gene expression revealed by clustering analysis of tumor and normal colon cancer tissues probed by oligonucleotide arrays. Cell Biol., 96, 6745– 6750. [3] Ben-Dor, A., et al. (2000). Tissue classification with gene expression profiles. J. Comput. Biol., 7, 559–584. [4] Bradley, P., & Mangasarian, O. (1998). Feature selection via concave minimization and support vector machines. Proc. 15th ICML (pp. 82–90). [5] Cortes, C., & Vapnik, V. (1995). Support-vector networks. Machine Learning, 20(3), 273–297. [6] Dudoit, S., Fridlyand, J., & Speed T.P. (2002). Comparison of discrimination methods for the classification of tumors using gene expression data. JASA, 97(457), 77–87. [7] Fodor, S. (1997). Massively parallel genomics. Science, 277, 393–395. [8] Gentile, C. (2001a). A new approximate maximal margin classification algorithm. JMLR, 2, 213–242. [9] Gentile, C. (2001b). The robustness of the p-norm algorithms. Machine Learning J., to appear. [10] Golub, T., et al. (1999). Molecular classification of cancer: Class discovery and class prediction by gene expression. Science, 286, 531–537. [11] Grove, A., Littlestone, N., & Schuurmans, D. (2001). General convergence results for linear discriminant updates. Machine Learning Journal, 43(3), 173–210. [12] Gruvberger, S., et al. (2001). Estrogen receptor status in breast cancer is associated with remarkably distinct gene expression patterns. Cancer Res., 61, 5979–5984. [13] Guyon, I., Weston, J., Barnhill, S., & Vapnik, V. (2002). Gene selection for cancer classification using support vector machines. Machine Learning Journal, 46(1-3), 389–422. [14] Kivinen, J., Warmuth, M., & Auer, P. (1997). The perceptron algorithm vs. winnow: linear vs. logarithmic mistake bounds when few input variables are relevant. AI, 97, 325–343. [15] Kohavi, R., & John, G. (1997). Wrappers for feature subset selection. AI, 97, 273–324. [16] Littlestone, N. (1988). Learning quickly when irrelevant attributes abound: A new linearthreshold algorithm. Machine Learning, 2, 285–318. [17] Mangasarian, O. (1997). Mathematical programming in data mining. DMKD, 42(1), 183–201. [18] Singh, D., et al. (2002). Gene expression correlates of clinical prostate cancer behavior. Cancer Cell, 1. [19] Tibshirani, R. (1995). Regression selection and shrinkage via the lasso. JRSS B, 1, 267–288. [20] Weston, J., Elisseeff, A., Scholkopf, B., & Tipping, M. (2002). The use of zero-norm with linear models and kernel methods. JMLR, to appear. [21] Weston, J., Mukherjee, S., Chapelle, O., Pontil, M., Poggio, T., & Vapnik, V. (2000). Feature selection for svms. Proc. NIPS 13. [22] Xing, E., Jordan, M., & Karp, R. (2001). Feature selection for high-dimensional genomic microarray data. Proc. 18th ICML. 7The reader might object that the number of selected features can depend on the value of parameter α in ALMAp. In practice, however, we observed that α does not have a big influence on this number.
2003
148
2,363
Feature Selection in Clustering Problems Volker Roth and Tilman Lange ETH Zurich, Institut f. Computational Science Hirschengraben 84, CH-8092 Zurich Tel: +41 1 6323179 {vroth, tilman.lange}@inf.ethz.ch Abstract A novel approach to combining clustering and feature selection is presented. It implements a wrapper strategy for feature selection, in the sense that the features are directly selected by optimizing the discriminative power of the used partitioning algorithm. On the technical side, we present an efficient optimization algorithm with guaranteed local convergence property. The only free parameter of this method is selected by a resampling-based stability analysis. Experiments with real-world datasets demonstrate that our method is able to infer both meaningful partitions and meaningful subsets of features. 1 Introduction The task of selecting relevant features in classification problems can be viewed as one of the most fundamental problems in the field of machine learning. A major motivation for selecting a subset of features from which a learning rule is constructed is the interest in sparse and interpretable rules, emphasizing only a few relevant variables. In supervised learning scenarios, feature selection has been studied widely in the literature. The methods used can be subdivided in filter methods and wrapper methods. The main difference is that a wrapper method makes use of the classifier, while a filter method does not. From a conceptual viewpoint, wrapper approaches are clearly advantageous, since the features are selected by optimizing the discriminative power of the finally used classifier. Selecting features in unsupervised learning scenarios is a much harder problem, due to the absence of class labels that would guide the search for relevant information. Problems of this kind have been rarely studied in the literature, for exceptions see e.g. [1, 9, 15]. The common strategy of most approaches is the use of an iterated stepwise procedure: in the first step a set of hypothetical partitions is extracted (the clustering step), and in the second step features are scored for relevance (the relevance determination step). A possible shortcoming is the way of combining these two steps in an “ad hoc” manner: usually the relevance determination mechanism implements a filter approach and does not take into account the properties of the clustering method used. Usual scoring methods make an implicit independence assumption, while ignoring feature correlations. It is thus of particular interest to combine wrapper selection strategies and clustering methods. The approach presented in this paper can be viewed as a method of this kind. It combines a Gaussian mixture model with a Bayesian feature selection principle. The usual combinatorial problems involved with wrapper approaches are overcome by using a Bayesian marginalization mechanism. We present an efficient optimization algorithm for our model with guaranteed convergence to a local optimum. The only free model parameter is selected by a resampling-based stability analysis. The problem of many ambiguous and equally high-scoring splitting hypotheses, which seems to be a an inherent shortcoming of many other approaches, is successfully overcome. A comparison with ground-truth labels in control experiments indicates that the selected models induce sample clusters and feature subsets which both provide a clear interpretation. Our approach to combining clustering and feature selection is based on a Gaussian mixture model, which is optimized by way of the classical expectation-maximization (EM) algorithm. In order to incorporate the feature selection mechanism, the M-step is first reformulated as a linear discriminant analysis (LDA) problem, which makes use of the “fuzzy labels” estimated in the preceding E-step. We then use the well-known identity of LDA and linear regression to restate the M-step in a form which easily allows us to regularize the estimation problem by specifying a prior distribution over the regression coefficients. This distribution has the functional form of an Automatic Relevance Determination (ARD) prior. For each regression coefficient, the ARD prior contains a free hyperparameter, which encodes the “relevance” of the corresponding variable in the linear regression. In a Bayesian marginalization step, these hyperparameters are then integrated out. We finally arrive at an M-step with integrated feature selection mechanism. 2 Clustering and Bayesian relevance determination Gaussian mixtures and LDA. The dataset is given as a collection of N samples xi ∈Rd. For the purpose of finding clusters, consider now a Gaussian mixture model with 2 mixture components which share an identical covariance matrix Σ. Under this model, the loglikelihood for the dataset reads lmix = PN i=1 log P2 ν=1 πνφ(xi; µν, Σ)  , (1) where the mixing proportions πν sum to one, and φ denotes a Gaussian density. The classical EM-algorithm, [2], provides a convenient method for maximizing lmix: E-step: set pηi = Prob(xi ∈class η) = πηφ(xi; µη, Σ) P2 ν=1 πνφ(xi; µν, Σ) . M-step: set µν = PN i=1 pνixi PN i=1 pνi , Σ = 1 N 2 X ν=1 N X i=1 pνi (xi −µν) (xi −µν)⊤. The likelihood equations in the M-step can be viewed as weighted mean and covariance maximum likelihood estimates in a weighted and augmented problem: one replicates the N observations 2 times, with the ν-th such replication having observation weights pνi. In [5] it is proven that the M-step can be carried out via a weighted and augmented linear discriminant analysis (LDA). Following [6], any LDA problem can be restated as an optimal scoring problem. Let the class-memberships of the N data vectors be coded as a matrix Z, the i, ν-th entry of which equals one if the i-th observation belongs to class ν. The point of optimal scoring is to turn categorical variables into quantitative ones: the score vector θ assigns the real number θν to the entries in the ν-th column of Z. The simultaneous estimation of scores and regression coefficients β constitutes the optimal scoring problem: minimize M(θ, β) = ∥Zθ −Xβ∥2 2 (2) under the constraint 1 N ∥Zθ∥2 2 = 1. The notion ∥· ∥2 2 stands for the squared ℓ2–norm, and X denotes the (centered) data matrix of dimension N × d. In [6] an algorithm for carrying out this optimization has been proposed, whose main ingredient is a linear regression of the data matrix X against the scored indicator matrix Zθ. Returning from a standard LDA-problem to the above weighted and augmented problem, it turns out that it is not necessary to explicitly replicate the observations: the optimal scoring version of LDA allows an implicit solution of the augmented problem that still uses only N observations. Instead of using a response indicator matrix Z, a blurred response matrix ˜Z is employed, whose rows consist of the current class probabilities for each observation. At each M-step this ˜Z enters in the linear regression, see [5]. After iterated application of the E- and M-step, an observation xi is finally assigned to the class ν with highest probability of membership pνi. Note that the EM-iterations converge to a local maximum. LDA and Automatic Relevance Determination. We now focus on incorporating the automatic feature selection mechanism into the EM-algorithm. According to [6], the 2-class LDA problem in the M-step can be solved by the following algorithm: 1. Choose an initial N-vector of scores θ0 which satisfies N −1θT 0 ˜ZT ˜Zθ0 = 1, and is orthogonal to a k-vector of ones, 1k. Set θ∗= ˜Zθ0; 2. Run a linear regression of X on θ∗: c θ∗= X(XT X)−1XT θ∗≡Xβ. The feature selection mechanism can now be incorporated in the M-step by imposing a certain constraint on the linear regression. In [6, 4] it has been proposed to use a ridgetype penalized regression. Taking a Bayesian perspective, such a ridge-type penalty can be interpreted as introducing a spherical Gaussian prior over the coefficients: p(β) = N(0, λ−1I). The main idea of incorporating an automatic feature selection mechanism consists of replacing the Gaussian prior with an automatic relevance determination (ARD) prior1 of the form p(β| ϑ) = Q i N(0, ϑ−1 i ) ∝exp[−P i ϑiβ2 i ]. (3) In this case, each coefficient βi has its own prior variance ϑ−1 i . Note that in the above ARD framework only the functional form of the prior (3) is fixed, whereas the parameters ϑi, which encode the “relevance” of each variable, are estimated from the data. In [3] the following Bayesian inference procedure for the prior parameters has been introduced: given exponential hyperpriors (the variances ϑ−1 i must be nonnegative), p(ϑi) = γ 2 exp{−γϑi 2 }, one can analytically integrate out the hyperparameters from the prior distribution over the coefficients βi: p(βi) = R ∞ 0 p(βi|ϑi)p(ϑi) dϑi = γ 2 exp{−√γ|βi|}. (4) Switching to the maximum a posteriori (MAP) solution in log-space, this marginalization directly leads us to the following penalized functional: M(θ, β) = ∥˜Zθ −Xβ∥2 2 + ˜λ ∥β∥1, (5) where ˜λ ≡√γ has the role of a Lagrange parameter in the ℓ1–constrained problem: minimize ∥˜Zθ −Xβ∥2 2 subject to ∥β∥1 < κ. In the statistical literature, this model is known as the Least Absolute Shrinkage and Selection Operator (LASSO) model, [14]. Returning to equation (3), we are now able to interpret the LASSO estimate as a Bayesian feature selection principle: for the purpose of feature selection, we would like to estimate the value of a binary selection variable S for each feature: Si equals one, if the i-th feature is considered relevant for the given task, and zero otherwise. Taking into account feature correlations, estimation of Si necessarily involves searching the space of all possible subsets of features containing the i-th one. In the Bayesian ARD formalism, this combinatorial explosion of the search space is overcome by relaxing the binary selection variable to a positive real-valued variance of a Gaussian prior over each component of the coefficient vector. Following the Bayesian inference principle, we introduce hyperpriors and integrate out these variances, and we finally arrive at the ℓ1–constrained LASSO problem. Optimizing the final model. Since space here precludes a detailed discussion of ℓ1– constrained regression problems, the reader is referred to [12], where a highly efficient algorithm with guaranteed global convergence has been proposed. Given this global convergence in the M-step, for the EM-model we can guarantee convergence to a local maximum of the constrained likelihood. Consider two cases: (i) the unconstrained solution is feasible. In this case our algorithm simply reduces to the standard EM procedure, for which is it known that in every iteration the likelihood monotonically increases; (ii) the ℓ1–constraint is active. Then, in every iteration the LASSO algorithm maximizes the likelihood within the feasible region of β-values defined by ∥β∥1 < κ. The likelihood cannot be decreased in further stages of the iteration, since any solution β found in a preceding iteration is also a valid solution for the actual problem (note that κ is fixed!). In this case, the algorithm has converged to a local maximum of the likelihood within the constraint region. 1For an introduction to the ARD principle the reader is referred to [10]. 3 Model selection Our model has only one free parameter, namely the value of the ℓ1–constraint κ. In the following we describe a method for selecting κ by observing the stability of data partitions. For each of the partitions which we have identified as “stable”, we then examine the fluctuations involved in the feature selection process. It should be noticed that the concept of measuring the stability of solutions as a means of model selection has been successfully applied to several unsupervised learning problems, see e.g. [8, 11]. We will usually find many potential splits of a dataset, depending on how many features are selected: if we select only one feature, it is likely to find many competing hypotheses for splits. The problem is that most of the feature vectors usually vote for a different partition. If, on the other hand, we select too many features, we face the usual problems of finding structure in high-dimensional datasets: our functional which we want to optimize will have many local minima, and with high probability, the EM-algorithm will find suboptimal solutions. Between these two extremes, we can hope to find relatively stable splits, which are robust against noise and also against inherent instabilities of the optimization method. To obtain a quantitative measure of stability, we propose the following procedure: run the class discovery method once, corrupt the data vectors by a small amount of noise, repeat the grouping procedure, and calculate the Hamming distance between the two partitions as a measure of (in-)stability. For computing Hamming distances, the partitions are viewed as vectors containing the cluster labels. Simply taking the average stability over many such two-sample comparisons, however, would not allow an adequate handling of situations where there are two equally likely stable solutions, of which the clustering algorithm randomly selects one. In such situations, the averaged stability will be very low, despite the fact that there exist two stable splitting hypotheses. This problem can be overcome by looking for compact clusters of highly similar partitions, leading to the following algorithm: Algorithm for identifying stable partitions: for different values of the ℓ1–constraint κ do (i) compute m noisy replications of the data (ii) run the class discovery algorithm for each of these datasets (iii) compute the m × m matrix of pairwise Hamming distances between all partitions (iv) cluster the partitions into compact groups and score the groups by their frequency (v) select dominant groups of partitions and choose representative partitions In step (i) a “suitable” noise level must be chosen a priori. In our experiments we make use of the fact that we have normalized the input data to have zero mean and unit variance. Given this normalization, we then add Gaussian noise with 5% of the total variance in the dataset, i.e. σ2 = 0.05. In step (iii) we use Hamming distances as a dissimilarity measure between partitions. In order to make Hamming distances suitable for this purpose, we have to consider the inherent permutation symmetry of the clustering process: a cluster called “1” in the first partition can be called “2” in the second one. When computing the pairwise Hamming distances, we thus have to minimize over the two possible permutations of cluster labels. Steps (iv) and (v) need some further explanation: the problem of identifying compact groups in datasets which are represented by pairwise distances can by solved by optimizing the pairwise clustering cost function, [7]. We iteratively increase the number of clusters (which is a free parameter in the pairwise clustering functional) until the average dissimilarity in each group does not exceed a predefined threshold. Reasonable problemspecific thresholds can be defined by considering the following null-model: given N samples, the average Hamming distance between two randomly drawn 2–partitions P1 and P2 is roughly dHamming(P1, P2) ≈N/2. It may thus be reasonable to consider only clusters which are several times more homogeneous than the expected null-model homogeneity (in the experiments we have set this threshold to 10 times the null-model homogeneity). For the clusters which are considered homogeneous, we observe their populations, and out of all models investigated we choose the one leading to the partition cluster of largest size. For this dominating cluster, we then select a prototypical partition. For selecting such prototypical partitions in pairwise clustering problems, we refer the reader to [13], where it is shown that the pairwise clustering problem can be equivalently restated as a k-means problem in a suitably chosen embedding space. Each partition is represented as a vector in this space. This property allows us to select those partitions as representants, which are closest to the partition cluster centroids. The whole work-flow of model selection is summarized schematically in figure 1. 8 0 0 Sample 1 Sample 2 Sample n Sample n−1 Partitions Sample 3 Hamming distances Dissimilarity matrix Histogramming cluster populations Embedding & Clustering Noisy resample 100 Noisy resample 99 Noisy resample 1 Hamming distance Cluster index Cluster population 0 0.05 0.1 0.15 0.2 0.25 0.3 0.35 2 4 6 8 10 Figure 1: Model selection: schematic work-flow for one fixed value of the ℓ1–constraint κ. 4 Experiments Clustering USPS digits. In a first experiment we test our method for the task of clustering digits from the USPS handwritten digits database. Sample images are shown in figure 2. Figure 2: Sample images of digits ’6’ and ’7’ from the USPS database. The 16 × 16 gray-value images of the digits are treated as 256-dimensional vectors. For this experiment, we extracted a subset of 200 images, consisting of randomly selected digits ’6’ and ’7’. Based on this dataset, we first selected the most stable model according to the model selection procedure described in section 3. We observed the stability of the solutions for different constraint values κ on the interval [0.7, 1.8] with a step-size of 0.1. κ = 0.7 / #(features) = 2.3 κ = 1.0 / #(features) = 18.7 Cluster population. Cluster index Cluster index Average Hamming distance within clusters. κ = 1.8 / #(features) = 34.6 Cluster index 0 0.1 0.2 0.3 0.4 0.5 0.6 0.7 0.8 1 2 3 4 0 0.1 0.2 0.3 0.4 0.5 0.6 0.7 0.8 5 10 15 20 0 0.1 0.2 0.3 0.4 0.5 0.6 0.7 0.8 0 5 10 15 20 25 Figure 3: Model selection: three different choices of the ℓ1-constraint κ. The histograms show the relative population of partition clusters. The solid line indicates the average pairwise Hamming distance between partitions (divided by 100). Figure 3 exemplarily shows the outcomes of the stability analysis: in the left panel, the solution is so highly constrained that on average only 2.3 features (pixels) are selected. One can see that the solutions are rather instable. Subsets of only two features seem to be too small for building a consistent splitting hypothesis. Even the most populated partition cluster (index 3) contains only 30% of all partitions. If, on the other hand, the constraint is relaxed too far, we also arrive at the very instable situation, depicted in the right panel: for κ = 1.8, on average 34.6 pixels are selected. Optimizing the model in this 35-dimensional feature space seems to be difficult, probably because the EM-algorithm is often trapped by suboptimal local optima. In-between these models, however, we find a highly stable solution for κ = 1.0 in moderate dimensions (on average 18.7 features), see the middle panel. In this case, the dominating partition cluster (cluster no. 1 in the histogram) contains almost 75% of all partitions. Having selected the optimal model parameter κ = 1.0, in a next step we select the representative partition (= the one nearest to the centroid) of the dominating partition cluster (no. 1 in the middle panel of figure 3). This partition splits the dataset into two clusters, which highly agree with the true labeling. In the upper part of figure 4, both the inferred labels and the true labels are depicted by horizontal bar diagrams. Only three samples out of 200 are mislabeled (the rightmost three samples). The lower panel of this figure shows several rows, each of which represents one automatically selected feature. Each of the 200 grey-value coded pixel blocks in a row indicates the feature value for one sample. For a better visualization, the features (rows) are permuted according to either high values (black) or low values (white) for one of the two clusters. Figure 4: Optimal model: representative partition. Upper horizontal bar: true labels of the 200 samples (black = ’6’, grey = ’7’). Lower bar: inferred labels. Lower panel: each row consists of grey-value coded values of the selected features for all samples (1 pixel block = 1 sample). We are not only interested in the stability of splittings of the dataset, but also in the stability of the feature selection process. In order to quantify this latter stability, we return to the dominating partition cluster no. 1 in the middle panel of figure 3, and for each of the 73 partitions in this cluster, we count how often a particular feature has been selected. The 22 features (pixels) which are selected in at least one halve of the partitions, are plotted in the second panel of figure 5. The selection stability is grey-value coded (black = 100% stable). To the left and to the right we have again plotted two typical sample images of both classes from the database. A comparison with the selected features leads us to the conclusion, that we were not only able to find reasonable clusters, but we also have exactly selected those discriminative features which we would have expected in this control experiment. In the rightmost panel, we have also plotted one of the three mislabeled ’7’s which has been assigned to the ’6’ cluster. Figure 5: From left to right: First: a typical ’6’. Second: automatically extracted features. Third: a typical ’7’. Fourth: one of the three mislabeled ’7’s. Clustering faces. In a second experiment we applied our method to the problem of clustering face images. From the Stirling Faces database (http://pics.psych.stir.ac.uk/cgibin/PICS/New/pics.cgi) we selected all 68 grey-valued front views of faces and all 105 profile views. The images are rather inhomogeneous, since they show different persons with different facial expressions. Some sample images are depicted in figure 6. For a complete overview over the whole image set, we refer the reader to our supplementary web page http://www.cs.uni-bonn.de/∼roth/FACES/split.html, where all images can be viewed in higher quality. Figure 6: Example images form the Stirling Faces database. Since it appears to be infeasible to work directly on the set of pixels of the high-resolution images, in a first step we extracted the 10 leading eigenfaces of the total dataset (eigenfaces are simply the eigenvectors vi of the images treated as pixel-wise vectorial objects). These eigenfaces are depicted in figure 7. We then applied our method to these image objects, which are represented as 10-dimensional vectors. Note that the original images Ij can be (partially) reconstructed from this truncated eigenvector expansion as I ′ j = P10 i=1 viv⊤ i Ij (assuming the image vectors Ij to be centered). 1.0 0.46 0.28 0.17 0.16 0.15 0.13 0.1 0.09 0.08 Figure 7: First 10 leading eigenfaces and their relative eigenvalues. We again start our analysis with selecting an optimal model. Figure 8 depicts the outcome of the model selection procedure. The left panel shows both the number of extracted features and the relative population of the largest partition cluster for different values of κ. The most stable model is obtained for κ = 1.0. On average, 3.04 features (eigenfaces) have been selected. A detailed analysis of the selected features within the dominating partition cluster (no. 5 in the right panel) shows that the eigenfaces no. 2, 3 and 7 are all selected with a stability of more than 98%. It is interesting to notice that the leading eigenface no. 1 with the distinctly largest eigenvalue has not been selected. κ constraint value #(features) Relative population of dominating cluster (x10) 0 1 2 3 4 5 0.7 0.8 0.9 1 1.1 1.2 1.3 Cluster index Cluster population Hamming distance 0 0.05 0.1 0.15 0.2 0.25 0.3 0.35 2 4 6 8 10 Figure 8: Model selection. Left: average number of selected features and relative population of the dominating partition cluster vs. κ. Right: partition clusters for optimal model with κ = 1. In every M-step of our algorithm, a linear discriminant analysis is performed, in which a weight vector β for all features is computed (due to the incorporated feature selection mechanism, most weights will be exactly zero). For a given partition of the objects, the linear combination of the eigenface-features induced by this weight vector is known as the Fisherface. Our method can, thus, be interpreted as a clustering method that finds a partition and simultaneously produces a “sparse” Fisherface which consists of a linear combination of the most discriminative eigenfaces. Figure 9 shows the derived Fisherface, reconstructed from the weight vector of the representative partition (no. 5 in the right panel of figure 8). Note that there are only 3 nonzero weights β2 = 0.8, β3 = 0.05 and β7 = 0.2. 0.8 + 0.2 = * * * + 0.05 eigenface 2 eigenface 3 eigenface 7 Fisherface Figure 9: The inferred Fisherface as a linear combination of 3 eigenfaces. The representative partition of the dominating cluster (no. 5 in the right panel of figure 8) splits the images in two groups, which again highly coincide with the original groups of frontal and profile faces. Only 7 out of all 173 images are mislabeled w.r.t. this “groundtruth” labeling. The success of the clustering method can be understood by reconstructing the original images from the inferred Fisherface (which is nothing but a weighted and truncated eigenvector reconstruction of the original images). Figure 10 shows the same images as in figure 6, this time, however, reconstructed from the Fisherface. For better visualization, all images are rescaled to the full range of 255 grey values. One can see the clear distinction between frontal and profile faces, which mainly results from different signs of the projections of the images on the Fisherface. Again, the whole set of reconstructed images can be viewed on our supplementary material web page in higher quality. Figure 10: Images from figure 6, reconstructed from the Fisherface. 5 Conclusions The problem tackled in this paper consists of simultaneously clustering objects and automatically extracting subsets of features which are most discriminative for this object partition. Some approaches have been proposed in the literature, most of which, however, bear several inherent shortcomings, such as an unclear probabilistic model, the simplifying assumption of features as being uncorrelated, or the absence of a plausible model selection strategy. The latter issue is of particular importance, since many approaches seem to suffer from ambiguities caused by contradictory splitting hypotheses. In this work we have presented a new approach which has the potential to overcome these shortcomings. It has a clear interpretation in terms of a constrained Gaussian mixture model, which combines a clustering method with a Bayesian inference mechanism for automatically selecting relevant features. We further present an optimization algorithm with guaranteed convergence to a local optimum. The model has only one free parameter, κ, for which we propose a stability-based model selection procedure. Experiments demonstrate that this method is able to correctly infer partitions and meaningful feature sets. Our method currently only implements partitions of the object set into two clusters. For finding multiple clusters, we propose to iteratively split the dataset. Such iterative splits have been successfully applied to the problem of simultaneously clustering gene expression datasets and selecting relevant genes. Details on these biological applications of our method will appear elsewhere. Acknowledgments. The authors would like to thank Joachim M. Buhmann for helpful discussions and suggestions. References [1] A. Ben-Dor, N. Friedman, and Z. Yakhini. Class discovery in gene expression data. In Procs. RECOMB, pages 31–38, 2001. [2] A.P. Dempster, N.M. Laird, and D.B. Rubin. Maximum likelihood from incomplete data via the EM algorithm. J. R. Stat. Soc. B, 39:1–38, 1977. [3] M. Figueiredo and A. K. Jain. Bayesian learning of sparse classifiers. In CVPR2001, pages 35–41, 2001. [4] T. Hastie, A. Buja, and R. Tibshirani. Penalized discriminant analysis. Ann. Stat., 23:73–102, 1995. [5] T. Hastie and R. Tibshirani. Discriminant analysis by gaussian mixtures. J. R. Stat. Soc. B, 58:158–176, 1996. [6] T. Hastie, R. Tibshirani, and A. Buja. Flexible discriminant analysis by optimal scoring. J. Am. Stat. Assoc., 89:1255–1270, 1994. [7] T. Hofmann and J. Buhmann. Pairwise data clustering by deterministic annealing. IEEE Trans. Pattern Anal. Mach. Intell., 19(1):1–14, 1997. [8] T. Lange, M. Braun, V. Roth, and J.M. Buhmann. Stability-based model selection. In Advances in Neural Information Processing Systems, volume 15, 2003. To appear. [9] M.H. Law, A.K. Jain, and M.A.T. Figueiredo. Feature selection in mixture-based clustering. In Advances in Neural Information Processing Systems, volume 15, 2003. To appear. [10] D.J.C. MacKay. Bayesian non-linear modelling for the prediction competition. In ASHRAE Transactions Pt.2, volume 100, pages 1053–1062, Atlanta, Georgia, 1994. [11] F. Meinecke, A. Ziehe, M. Kawanabe, and K.-R. M¨uller. Estimating the reliability of ICA projections. In Advances in Neural Information Processing Systems, volume 14, 2002. [12] M. Osborne, B. Presnell, and B. Turlach. On the lasso and its dual. J. Comput. Graph. Stat., 9:319–337, 2000. [13] V. Roth, J. Laub, J. M. Buhmann, and K.-R. M¨uller. Going metric: Denoising pairwise data. In Advances in Neural Information Processing Systems, volume 15, 2003. To appear. [14] R.J. Tibshirani. Regression shrinkage and selection via the lasso. J. R. Stat. Soc. B, 58(1):267– 288, 1996. [15] A. v.Heydebreck, W. Huber, A. Poustka, and M. Vingron. Identifying splits with clear separation: a new class discovery method for gene expression data. Bioinformatics, 17, 2001.
2003
149
2,364
Self-calibrating Probability Forecasting Vladimir Vovk Computer Learning Research Centre Department of Computer Science Royal Holloway, University of London Egham, Surrey TW20 0EX, UK vovk@cs.rhul.ac.uk Glenn Shafer Rutgers School of Business Newark and New Brunswick 180 University Avenue Newark, NJ 07102, USA gshafer@andromeda.rutgers.edu Ilia Nouretdinov Computer Learning Research Centre Department of Computer Science Royal Holloway, University of London Egham, Surrey TW20 0EX, UK ilia@cs.rhul.ac.uk Abstract In the problem of probability forecasting the learner’s goal is to output, given a training set and a new object, a suitable probability measure on the possible values of the new object’s label. An on-line algorithm for probability forecasting is said to be well-calibrated if the probabilities it outputs agree with the observed frequencies. We give a natural nonasymptotic formalization of the notion of well-calibratedness, which we then study under the assumption of randomness (the object/label pairs are independent and identically distributed). It turns out that, although no probability forecasting algorithm is automatically well-calibrated in our sense, there exists a wide class of algorithms for “multiprobability forecasting” (such algorithms are allowed to output a set, ideally very narrow, of probability measures) which satisfy this property; we call the algorithms in this class “Venn probability machines”. Our experimental results demonstrate that a 1-Nearest Neighbor Venn probability machine performs reasonably well on a standard benchmark data set, and one of our theoretical results asserts that a simple Venn probability machine asymptotically approaches the true conditional probabilities regardless, and without knowledge, of the true probability measure generating the examples. 1 Introduction We are interested in the on-line version of the problem of probability forecasting: we observe pairs of objects and labels sequentially, and after observing the nth object xn the goal is to give a probability measure pn for its label; as soon as pn is output, the label yn of xn is disclosed and can be used for computing future probability forecasts. A good review of early work in this area is Dawid [1]. In this introductory section we will assume that yn ∈{0, 1}; we can then take pn to be a real number from the interval [0, 1] (the probability that yn = 1 given xn); our exposition here will be very informal. The standard view ( [1], pp. 213–216) is that the quality of probability forecasting systems has two components: “reliability” and “resolution”. At the crudest level, reliability requires that the forecasting system should not lie, and resolution requires that it should say something useful. To be slightly more precise, consider the first n forecasts pi and the actual labels yi. The most basic test is to compare the overall average forecast probability pn := n−1 Pn i=1 pi with the overall relative frequency yn := n−1 Pn i=1 yi of 1s among yi. If pn ≈yn, the forecasts are “unbiased in the large”. A more refined test would look at the subset of i for which pi is close to a given value p∗, and compare the relative frequency of yi = 1 in this subset, say yn(p∗), with p∗. If yn(p∗) ≈p∗for all p∗, (1) the forecasts are “unbiased in the small”, “reliable”, “valid”, or “well-calibrated”; in later sections, we will use “well-calibrated”, or just “calibrated”, as a technical term. Forecasting systems that pass this test at least get the frequencies right; in this sense they do not lie. It is easy to see that there are reliable forecasting systems that are virtually useless. For example, the definition of reliability does not require that the forecasting system pay any attention to the objects xi. In another popular example, the labels follow the pattern yi = ½ 1 if i is odd 0 otherwise. The forecasts pi = 0.5 are reliable, at least asymptotically (0.5 is the right relative frequency) but not as useful as p1 = 1, p2 = 0, . . . ; the “resolution” (which we do not define here) of the latter forecasts is better. In this paper we construct forecasting systems that are automatically reliable. To achieve this, we allow our prediction algorithms to output sets of probability measures Pn instead of single measures pn; typically the sets Pn will be small (see §5). This paper develops the approach of [2–4], which show that it is possible to produce valid, asymptotically optimal, and practically useful p-values; the p-values can be then used for region prediction. Disadvantages of p-values, however, are that their interpretation is less direct than that of probabilities and that they are easy to confuse with probabilities; some authors have even objected to any use of p-values (see, e.g., [5]). In this paper we use the methodology developed in the previous papers to produce valid probabilities rather than p-values. All proofs are omitted and can be found in [6]. 2 Probability forecasting and calibration From this section we start rigorous exposition. Let P(Y) be the set of all probability measures on a measurable space Y. We use the following protocol in this paper: MULTIPROBABILITY FORECASTING Players: Reality, Forecaster Protocol: FOR n = 1, 2, . . . : Reality announces xn ∈X. Forecaster announces Pn ⊆P(Y). Reality announces yn ∈Y. In this protocol, Reality generates examples zn = (xn, yn) ∈Z := X × Y consisting of two parts, objects xn and labels yn. After seeing the object xn Forecaster is required to output a prediction for the label yn. The usual probability forecasting protocol requires that Forecaster output a probability measure; we relax this requirement by allowing him to output a family of probability measures (and we are interested in the case where the families Pn become smaller and smaller as n grows). It can be shown (we omit the proof and even the precise statement) that it is impossible to achieve automatic well-calibratedness, in our finitary sense, in the probability forecasting protocol. In this paper we make the simplifying assumption that the label space Y is finite; in many informal explanations it will be assumed binary, Y = {0, 1}. To avoid unnecessary technicalities, we will also assume that the families Pn chosen by Forecaster are finite and have no more than K elements; they will be represented by a list of length K (elements in the list can repeat). A probability machine is a measurable strategy for Forecaster in our protocol, where at each step he is required to output a sequence of K probability measures. The problem of calibration is usually treated in an asymptotic framework. Typical asymptotic results, however, do not say anything about finite data sequences; therefore, in this paper we will only be interested in the non-asymptotic notion of calibration. All needed formal definitions will be given, but space limitations prevent us from including detailed explanations and examples, which can be found in [6]. Let us first limit the duration of the game, replacing n = 1, 2, . . . in the multiprobability forecasting protocol by n = 1, . . . , N for a finite horizon N. It is clear that, regardless of formalization, we cannot guarantee that miscalibration, in the sense of (1) being violated, will never happen: for typical probability measures, everything can happen, perhaps with a small probability. The idea of our definition is: a prediction algorithm is well-calibrated if any evidence of miscalibration translates into evidence against the assumption of randomness. Therefore, we first need to define ways of testing calibration and randomness; this will be done following [7]. A game N-martingale is a function M on sequences of the form x1, p1, y1, . . . , xn, pn, yn, where n = 0, . . . , N, xi ∈X, pi ∈P(Y), and yi ∈Y, that satisfies M(x1, p1, y1, . . . , xn−1, pn−1, yn−1) = Z Y M(x1, p1, y1, . . . , xn, pn, y)pn(dy) for all x1, p1, y1, . . . , xn, pn, n = 1, . . . , N. A calibration N-martingale is a nonnegative game N-martingale that is invariant under permutations: M(x1, p1, y1, . . . , xN, pN, yN) = M(xπ(1), pπ(1), yπ(1), . . . , xπ(N), pπ(N), yπ(N)) for any x1, p1, y1, . . . , xN, pN, yN and any permutation π : {1, . . . , N} →{1, . . . , N}. To cover the multiprobability forecasting protocol, we extend the domain of definition for a calibration N-martingale M from sequences of the form x1, p1, y1, . . . , xn, pn, yn, where p1, . . . , pn are single probability measures on Y, to sequences of the form x1, P1, y1, . . . , xn, Pn, yn, where P1, . . . , Pn are sets of probability measures on Y, by M(x1, P1, y1, . . . , xn, Pn, yn) := inf p1∈P1,...,pn∈Pn M(x1, p1, y1, . . . , xn, pn, yn). A QN-martingale, where Q is a probability measure on Z, is a function S on sequences of the form x1, y1, . . . , xn, yn, where n = 0, . . . , N, xi ∈X, and yi ∈Y, that satisfies S(x1, y1, . . . , xn−1, yn−1) = Z Z S(x1, y1, . . . , xn−1, yn−1, x, y)Q(dx, dy) for all x1, y1, . . . , xn−1, yn−1, n = 1, . . . , N. If a nonnegative QN-martingale S starts with S(□) = 1 and ends with S(x1, y1, . . . , yN) very large, then we may reject Q as the probability measure generating individual examples (xn, yn). This interpretation is supported by Doob’s inequality. Analogously, if a game Nmartingale M starts with M(□) = 1 and ends with M(x1, P1, y1, . . . , yN) very large, then we may reject the hypothesis that each Pn contains the true probability measure for yn. If M is a calibration N-martingale, this event is interpreted as evidence of miscalibration. (The restriction to calibration N-martingales is motivated by the fact that (1) is invariant under permutations). We call a probability machine F N-calibrated if for any probability measure Q on Z and any nonnegative calibration N-martingale M with M(□) = 1, there exists a QNmartingale S with S(□) = 1 such that M(x1, F(x1), y1, . . . , xN, F(x1, y1, . . . , xN), yN) ≤S(x1, y1, . . . , xN, yN) for all x1, y1, . . . , xN, yN. We say that F is finitarily calibrated if it is N-calibrated for each N. 3 Self-calibrating probability forecasting Now we will describe a general algorithm for multiprobability forecasting. Let N be the sets of all positive integer numbers. A sequence of measurable functions An : Zn →Nn, n = 1, 2, . . . , is called a taxonomy if, for any n ∈N, any permutation π of {1, . . . , n}, any (z1, . . . , zn) ∈Zn, and any (α1, . . . , αn) ∈Nn, (α1, . . . , αn) = An(z1, . . . , zn) =⇒(απ(1), . . . , απ(n)) = An(zπ(1), . . . , zπ(n)). In other words, An : (z1, . . . , zn) 7→(α1, . . . , αn) (2) is a taxonomy if every αi is determined by the bag1 *z1, . . . , zn+ and zi. We let |B| stand for the number of elements in a set B. The Venn probability machine associated with (An) is the probability machine which outputs the following K = |Y| probability measures py, y ∈Y, at the nth step: complement the new object xn by the postulated label y; consider the division of *z1, . . . , zn+, where zn is understood (only for the purpose of this definition) to be (xn, y), into groups (formally, bags) according to the values of An (i.e., zi and zj are assigned to the same group if and only if αi = αj, where the αs are defined by (2)); find the empirical distribution py ∈P(Y) of the labels in the group G containing the nth example zn = (xn, y): py({y′}) := |{(x∗, y∗) ∈G : y∗= y′}| |G| . A Venn probability machine (VPM) is the Venn probability machine associated with some taxonomy. Theorem 1 Any Venn probability machine is finitarily calibrated. 1By “bag” we mean a collection of elements, not necessarily distinct. “Bag” and “multiset” are synonymous, but we prefer the former term in order not to overload the prefix “multi”. It is clear that VPM depends on the taxonomy only through the way it splits the examples z1, . . . , zn into groups; therefore, we may specify only the latter when constructing specific VPMs. Remark The notion of VPM is a version of Transductive Confidence Machine (TCM) introduced in [8] and [9], and Theorem 1 is a version of Theorem 1 in [2]. 4 Discussion of the Venn probability machine In this somewhat informal section we will discuss the intuitions behind VPM, considering only the binary case Y = {0, 1} and considering the probability forecasts pi to be elements of [0, 1] rather than P({0, 1}), as in §1. We start with the almost trivial Bernoulli case, where the objects xi are absent,2 and our goal is to predict, at each step n = 1, 2, . . . , the new label yn given the previous labels y1, . . . , yn−1. The most naive probability forecast is pn = k/(n −1), where k is the number of 1s among the first n −1 labels. (Often “regularized” forms of k/(n −1), such as Laplace’s rule of succession (k + 1)/(n + 1), are used.) In the Bernoulli case there is only one natural VPM: the multiprobability forecast for yn is {k/n, (k+1)/n}. Indeed, since there are no objects xn, it is natural to take the one-element taxonomy An at each step, and this produces the VPM Pn = {k/n, (k + 1)/n}. It is clear that the diameter 1/n of Pn for this VPM is the smallest achievable. (By the diameter of a set we mean the supremum of distances between its points.) Now let us consider the case where xn are present. The probability forecast k/(n −1) for yn will usually be too crude, since the known population z1, . . . , zn−1 may be very heterogeneous. A reasonable statistical forecast would take into account only objects xi that are similar, in a suitable sense, to xn. A simple modification of the Bernoulli forecast k/(n −1) is as follows: 1. Split the available objects x1, . . . , xn into a number of groups. 2. Output k′/n′ as the predicted probability that yn = 1, where n′ is the number of objects among x1, . . . , xn−1 in the same group as xn and k′ is the number of objects among those n′ that are labeled as 1. At the first stage, a delicate balance has to be struck between two contradictory goals: the groups should be as large as possible (to have a reasonable sample size for estimating probabilities); the groups should be as homogeneous as possible. This problem is sometimes referred to as the “reference class problem”; according to Kılınc¸ [10], John Venn was the first to formulate and analyze this problem with due philosophical depth. The procedure offered in this paper is a simple modification of the standard procedure described in the previous paragraph: 0. Consider the two possible completions of the known data (z1, . . . , zn−1, xn) = ((x1, y1), . . . , (xn−1, yn−1), xn) : in one (called the 0-completion) xn is assigned label 0, and in the other (called the 1-completion) xn is assigned label 1. 1. In each completion, split all examples z1, . . . , zn−1, (xn, y) into a number of groups, so that the split does not depend on the order of examples (y = 0 for the 0-partition and y = 1 for the 1-partition). 2Formally, this correspond in our protocol to the situation where |X| = 1, and so xn, although nominally present, do not carry any information. 2. In each completion, output k′/n′ as the predicted probability that yn = 1, where n′ is the number of examples among z1, . . . , zn−1, (xn, y) in the same group as (xn, y) and k′ is the number of examples among those n′ that are labeled as 1. In this way, we will have not one but two predicted probabilities that yn = 1; but in practically interesting cases we can hope that these probabilities will be close to each other (see the next section). Venn’s reference class problem reappears in our procedure as the problem of avoiding overand underfitting. A taxonomy with too many groups means overfitting; it is punished by the large diameter of the multiprobability forecast (importantly, this is visible, unlike the standard approaches). Too few groups means underfitting (and poor resolution). Important advantages of our procedure over the naive procedure are: our procedure is selfcalibrating; there exists an asymptotically optimal VPM (see §6); we can use labels in splitting examples into groups (this will be used in the next section). 5 Experiments In this section, we will report the results for a natural taxonomy applied to the well-known USPS data set of hand-written digits; this taxonomy is inspired by the 1-Nearest Neighbor algorithm. First we describe the taxonomy, and then the way in which we report the results for the VPM associated with this taxonomy. Since the data set is relatively small (9298 examples in total), we have to use a crude taxonomy: two examples are assigned to the same group if their nearest neighbors have the same label; therefore, the taxonomy consists of 10 groups. The distance between two examples is defined as the Euclidean distance between their objects (which are 16 × 16 matrices of pixels and represented as points in R256). The algorithm processes the nth object xn as follows. First it creates the 10 × 10 matrix A whose entry Ai,j, i, j = 0, . . . , 9, is computed by assigning i to xn as label and finding the fraction of examples labeled j among the examples in the bag *z1, . . . , zn−1, (xn, i)+ belonging to the same group as (xn, i). The quality of a column of this matrix is its minimum entry. Choose a column (called the best column) with the highest quality; let the best column be jbest. Output jbest as the prediction and output · min i=0,...,9 Ai,jbest, max i=0,...,9 Ai,jbest ¸ as the interval for the probability that this prediction is correct. If the latter interval is [a, b], the complementary interval [1−b, 1−a] is called the error probability interval. In Figure 1 we show the following three curves: the cumulative error curve En := Pn i=1 erri, where erri = 1 if an error (in the sense jbest ̸= yi) is made at step i and erri = 0 otherwise; the cumulative lower error probability curve Ln := Pn i=1 li and the cumulative upper error probability curve Un := Pn i=1 ui, where [li, ui] is the error probability interval output by the algorithm for the label yi. The values En, Ln and Un are plotted against n. The plot confirms that the error probability intervals are calibrated. 6 Universal Venn probability machine The following result asserts the existence of a universal VPM. Such a VPM can be constructed quite easily using the histogram approach to probability estimation [11]. 0 1000 2000 3000 4000 5000 6000 7000 8000 9000 10000 0 50 100 150 200 250 300 350 400 Figure 1: On-line performance of the 1-Nearest Neighbor VPM on the USPS data set (9298 hand-written digits, randomly permuted). The dashed line shows the cumulative number of errors En and the solid ones the cumulative upper and lower error probability curves Un and Ln. The mean error EN/N is 0.0425 and the mean probability interval (1/N)[LN, UN] is [0.0407, 0.0419], where N = 9298 is the size of the data set. This figure is not significantly affected by statistical variation (due to the random choice of the permutation of the data set). Theorem 2 Suppose X is a Borel space. There exists a VPM such that, if the examples are generated from Q∞, sup p∈Pn ρ(Q(· | xn), p) →0 (n →∞) in probability, where ρ is the variation distance, Q(· | xn) is a fixed version of the regular conditional probabilities for yn given xn, and Pn are the multiprobabilities produced by the VPM. This theorem shows that not only all VPMs are reliable but some of them also have asymptotically optimal resolution. The version of this result for p-values was proved in [4]. 7 Comparisons In this section we briefly and informally compare this paper’s approach to standard approaches in machine learning. Two most important approaches to analysis of machine-learning algorithms are Bayesian learning theory and PAC theory (the recent mixture, the PAC-Bayesian theory, is part of PAC theory in its assumptions). This paper is in a way intermediate between Bayesian learning (no empirical justification for probabilities is required) and PAC learning (the goal is to find or bound the true probability of error, not just to output calibrated probabilities). An important difference of our approach from the PAC approach is that we are interested in the conditional probabilities for the label given the new object, whereas PAC theory (even in its “data-dependent” version, as in [12–14]) tries to estimate the unconditional probability of error. Acknowledgments We are grateful to Phil Dawid for a useful discussion and to the anonymous referees for suggestions for improvement. This work was partially supported by EPSRC (grant GR/R46670/01), BBSRC (grant 111/BIO14428), and EU (grant IST-1999-10226). References [1] A. Philip Dawid. Probability forecasting. In Samuel Kotz, Norman L. Johnson, and Campbell B. Read, editors, Encyclopedia of Statistical Sciences, volume 7, pages 210–218. Wiley, New York, 1986. [2] Vladimir Vovk. On-line Confidence Machines are well-calibrated. In Proceedings of the Forty Third Annual Symposium on Foundations of Computer Science, pages 187–196, Los Alamitos, CA, 2002. IEEE Computer Society. [3] Vladimir Vovk, Ilia Nouretdinov, and Alex Gammerman. Testing exchangeability on-line. In Tom Fawcett and Nina Mishra, editors, Proceedings of the Twentieth International Conference on Machine Learning, pages 768–775, Menlo Park, CA, 2003. AAAI Press. [4] Vladimir Vovk. Universal well-calibrated algorithm for on-line classification. In Bernhard Sch¨olkopf and Manfred K. Warmuth, editors, Learning Theory and Kernel Machines: Sixteenth Annual Conference on Learning Theory and Seventh Kernel Workshop, volume 2777 of Lecture Notes in Artificial Intelligence, pages 358–372, Berlin, 2003. Springer. [5] James O. Berger and Mohan Delampady. Testing precise hypotheses (with discussion). Statistical Science, 2:317–352, 1987. [6] Vladimir Vovk, Alex Gammerman, and Glenn Shafer. Algorithmic Learning in a Random World. Springer, New York, to appear. [7] Glenn Shafer and Vladimir Vovk. Probability and Finance: It’s Only a Game! Wiley, New York, 2001. [8] Craig Saunders, Alex Gammerman, and Vladimir Vovk. Transduction with confidence and credibility. In Proceedings of the Sixteenth International Joint Conference on Artificial Intelligence, pages 722–726, 1999. [9] Vladimir Vovk, Alex Gammerman, and Craig Saunders. Machine-learning applications of algorithmic randomness. In Proceedings of the Sixteenth International Conference on Machine Learning, pages 444–453, San Francisco, CA, 1999. Morgan Kaufmann. [10] Berna E. Kılınc¸. The reception of John Venn’s philosophy of probability. In Vincent F. Hendricks, Stig Andur Pedersen, and Klaus Frovin Jørgensen, editors, Probability Theory: Philosophy, Recent History and Relations to Science, pages 97–121. Kluwer, Dordrecht, 2001. [11] Luc Devroye, L´aszl´o Gy¨orfi, and G´abor Lugosi. A Probabilistic Theory of Pattern Recognition. Springer, New York, 1996. [12] Nick Littlestone and Manfred K. Warmuth. Relating data compression and learnability. Technical report, University of California, Santa Cruz, 1986. [13] John Shawe-Taylor, Peter L. Bartlett, Robert C. Williamson, and Martin Anthony. Structural risk minimization over data-dependent hierarchies. IEEE Transactions on Information Theory, 44:1926–1940, 1998. [14] David A. McAllester. Some PAC-Bayesian theorems. In Proceedings of the Eleventh Annual Conference on Computational Learning Theory, pages 230–234, New York, 1998. Association for Computing Machinery.
2003
15
2,365
Optimal Manifold Representation of Data: An Information Theoretic Approach Denis Chigirev and William Bialek Department of Physics and the Lewis-Sigler Institute for Integrative Genomics Princeton University, Princeton, New Jersey 08544 chigirev,wbialek@princeton.edu Abstract We introduce an information theoretic method for nonparametric, nonlinear dimensionality reduction, based on the infinite cluster limit of rate distortion theory. By constraining the information available to manifold coordinates, a natural probabilistic map emerges that assigns original data to corresponding points on a lower dimensional manifold. With only the information-distortion trade off as a parameter, our method determines the shape of the manifold, its dimensionality, the probabilistic map and the prior that provide optimal description of the data. 1 A simple example Some data sets may not be as complicated as they appear. Consider the set of points on a plane in Figure 1. As a two dimensional set, it requires a two dimensional density ρ(x, y) for its description. Since the data are sparse the density will be almost singular. We may use a smoothing kernel, but then the data set will be described by a complicated combination of troughs and peaks with no obvious pattern and hence no ability to generalize. We intuitively, however, see a strong one dimensional structure (a curve) underlying the data. In this paper we attempt to capture this intuition formally, through the use of the infinite cluster limit of rate distortion theory. Any set of points can be embedded in a hypersurface of any intrinsic dimensionality if we allow that hypersurface to be highly “folded.” For example, in Figure 1, any curve that goes through all the points gives a one dimensional representation. We would like to avoid such solutions, since they do not help us discover structure in the data. Looking for a simpler description one may choose to penalize the curvature term [1]. The problem with this approach is that it is not easily generalized to multiple dimensions, and requires the dimensionality of the solution as an input. An alternative approach is to allow curves of all shapes and sizes, but to send the reduced coordinates through an information bottleneck. With a fixed number of bits, position along a highly convoluted curve becomes uncertain. This will penalize curves that follow the data too closely (see Figure 1). There are several advantages to this approach. First, it removes the artificiality introduced by Hastie [2] of adding to the cost function only orthogonal errors. If we believe that data points fall out of the manifold due to noise, there is no reason to treat the projection onto the manifold as exact. Second, it does not require the dimensionFigure 1: Rate distortion curve for a data set of 25 points (red). We used 1000 points to represent the curve which where initialized by scattering them uniformly on the plane. Note that the produced curve is well defined, one dimensional and smooth. 0 2 4 6 8 10 12 1 2 3 4 5 6 7 8 9 ality of the solution manifold as an input. By adding extra dimensions, one quickly looses the precision with which manifold points are specified (due to the fixed information bottleneck). Hence, the optimal dimension emerges naturally. This also means that the method works well in many dimensions with no adjustments. Third, the method handles sparse data well. This is important since in high dimensional spaces all data sets are sparse, i.e. they look like points in Figure 1, and the density estimation becomes impossible. Luckily, if the data are truly generated by a lower dimensional process, then density estimation in the data space is not important (from the viewpoint of prediction or any other). What is critical is the density of the data along the manifold (known in latent variable modeling as a prior), and our algorithm finds it naturally. 2 Latent variable models and dimensionality reduction Recently, the problem of reducing the dimensionality of a data set has received renewed attention [3,4]. The underlying idea, due to Hotelling [5], is that most of the variation in many high dimensional data sets can often be explained by a few latent variables. Alternatively, we say that rather than filling the whole space, the data lie on a lower dimensional manifold. The dimensionality of this manifold is the dimensionality of the latent space and the coordinate system on this manifold provides the latent variables. Traditional tools of principal component analysis (PCA) and factor analysis (FA) are still the most widely used methods in data analysis. They project the data onto a hyperplane, so the reduced coordinates are easy to interpret. However, these methods are unable to deal with nonlinear correlations in a data set. To accommodate nonlinearity in a data set, one has to relax the assumption that the data is modeled by a hyperplane, and allow a general low dimensional manifold of unknown shape and dimensionality. The same questions that we asked in the previous section apply here. What do we mean by requiring that “the manifold models the data well”? In the next section, we formalize this notion by defining the manifold description of data as a doublet (the shape of the manifold and the projection map). Note that we do not require the probability distribution over the manifold (known for generative models [6,7] as a prior distribution over the latent variables and postulated a priori). It is completely determined by the doublet. Nonlinear correlations in data can also be accommodated implicitly, without constructing an actual low dimensional manifold. By mapping the data from the original space to an even higher dimensional feature space, we may hope that the correlations will become linearized and PCA will apply. Kernel methods [8] allow us to do this without actually constructing an explicit map to feature space. They introduce nonlinearity through an a priori nonlinear kernel. Alternatively, autoassociative neural networks [9] force the data through a bottleneck (with an internal layer of desired dimensionality) to produce a reduced description. One of the disadvantages of these methods is that the results are not easy to interpret. Recent attempts to describe a data set with a low dimensional representation generally follow into two categories: spectral methods and density modeling methods. Spectral methods (LLE [3], ISOMAP [4], Laplacian eigenmaps [10]) give reduced coordinates of an a priori dimensionality by introducing a quadratic cost function in reduced coordinates (hence eigenvectors are solutions) that mimics the relationships between points in the original data space (geodesic distance for ISOMAP, linear reconstruction for LLE). Density modeling methods (GTM [6], GMM [7]) are generative models that try to reproduce the data with fewer variables. They require a prior and a parametric generative model to be introduced a priori and then find optimal parameters via maximum likelihood. The approach that we will take is inspired by the work of Kramer [9] and others who tried to formulate dimensionality reduction as a compression problem. They tried to solve the problem by building an explicit neural network encoder-decoder system which restricted the information implicitly by limiting the number of nodes in the bottleneck layer. Extending their intuition with the tools of information theory, we recast dimensionality reduction as a compression problem where the bottleneck is the information available to manifold coordinates. This allows us to define the optimal manifold description as that which produces the best reconstruction of the original data set, given that the coordinates can only be transmitted through a channel of fixed capacity. 3 Dimensionality reduction as compression Suppose that we have a data set X in a high dimensional state space RD described by a density function ρ(x). We would like to find a “simplified” description of this data set. One may do so by visualizing a lower dimensional manifold M that “almost” describes the data. If we have a manifold M and a stochastic map PM : x →PM(µ|x) to points µ on the manifold, we will say that they provide a manifold description of the data set X. Note that the stochastic map here is well justified: if a data point does not lie exactly on the manifold then we should expect some uncertainty in the estimation of the value of its latent variables. Also note that we do not need to specify the inverse (generative) map: M →RD; it can be obtained by Bayes’ rule. The manifold description (M, PM) is a less than faithful representation of the data. To formalize this notion we will introduce the distortion measure D(M, PM, ρ): D(M, PM, ρ) = Z x∈RD Z µ∈M ρ(x)PM(µ|x)∥x −µ∥2dDxDµ. (1) Here we have assumed the Euclidean distance function for simplicity. The stochastic map, PM(µ|x), together with the density, ρ(x), define a joint probability function P(M, X) that allows us to calculate the mutual information between the data and its manifold representation: I(X, M) = Z x∈X Z µ∈M P(x, µ) log  P(x, µ) ρ(x)PM(µ)  dDxDµ. (2) This quantity tells us how many bits (on average) are required to encode x into µ. If we view the manifold representation of X as a compression scheme, then I(X, M) tells us the necessary capacity of the channel needed to transmit the compressed data. Ideally, we would like to obtain a manifold description {M, PM(M|X)} of the data set X that provides both a low distortion D(M, PM, ρ) and a good compression (i.e. small I(X, M)). The more bits we are willing to provide for the description of the data, the more detailed a manifold that can be constructed. So there is a trade off between how faithful a manifold representation can be and how much information is required for its description. To formalize this notion we introduce the concept of an optimal manifold. DEFINITION. Given a data set X and a channel capacity I, a manifold description (M, PM(M|X)) that minimizes the distortion D(M, PM, X), and requires only information I for representing an element of X, will be called an optimal manifold M(I, X). Note that another way to define an optimal manifold is to require that the information I(M, X) is minimized while the average distortion is fixed at value D. The shape and the dimensionality of optimal manifold depends on our information resolution (or the description length that we are willing to allow). This dependence captures our intuition that for real world, multi-scale data, a proper manifold representation must reflect the compression level we are trying to achieve. To find the optimal manifold (M(I), PM(I)) for a given data set X, we must solve a constrained optimization problem. Let us introduce a Lagrange multiplier λ that represents the trade off between information and distortion. Then optimal manifold M(I) minimizes the functional: F(M, PM) = D + λI. (3) Let us parametrize the manifold M by t (presumably t ∈Rd for some d ≤D). The function γ(t) : t →M maps the points from the parameter space onto the manifold and therefore describes the manifold. Our equations become: D = Z Z dDx ddt ρ(x)P(t|x)∥x −γ(t)∥2, (4) I = Z Z dDx ddt ρ(x)P(t|x) log P(t|x) P(t) , (5) F(γ(t), P(t|x)) = D + λI. (6) Note that both information and distortion measures are properties of the manifold description doublet {M, PM(M|X)} and are invariant under reparametrization. We require the variations of the functional to vanish for optimal manifolds δF/δγ(t) = 0 and δF/δP(t|x) = 0, to obtain the following set of self consistent equations: P(t) = Z dDx ρ(x)P(t|x), (7) γ(t) = 1 P(t) Z dDx xρ(x)P(t|x), (8) P(t|x) = P(t) Π(x)e−1 λ ∥x−γ(t)∥2, (9) Π(x) = Z ddt P(t)e−1 λ ∥x−γ(t)∥2. (10) In practice we do not have the full density ρ(x), but only a discrete number of samples. So we have to approximate ρ(x) = 1 N P δ(x −xi), where N is the number of samples, i is the sample label, and xi is the multidimensional vector describing the ith sample. Similarly, instead of using a continuous variable t we use a discrete set t ∈{t1, t2, ..., tK} of K points to model the manifold. Note that in (7 −10) the variable t appears only as an argument for other functions, so we can replace the integral over t by a sum over k = 1..K. Then P(t|x) becomes Pk(xi),γ(t) is now γk, and P(t) is Pk. The solution to the resulting set of equations in discrete variables (11−14) can be found by an iterative Blahut-Arimoto procedure [11] with an additional EM-like step. Here (n) denotes the iteration step, and α is a coordinate index in RD. The iteration scheme becomes: P (n) k = 1 N N X i=1 P (n) k (xi) (11) γ(n) k,α = 1 P (n) k 1 N N X i=1 xi,αP (n) k (xi), (12) where α = 1, . . . , D, Π(n)(xi) = K X k=1 P (n) k e−1 λ ∥xi−γ(n) k ∥2 (13) P (n+1) k (xi) = P (n) k Π(n)(xi)e−1 λ ∥xi−γ(n) k ∥2. (14) One can initialize γ0 k and P 0 k (xi) by choosing K points at random from the data set and letting γk = xi(k) and P 0 k = 1/K, then use equations (13) and (14) to initialize the association map P 0 k (xi). The iteration procedure (11 −14) is terminated once max k |γn k −γn−1 k | < ϵ, (15) where ϵ determines the precision with which the manifold points are located. The above algorithm requires the information distortion cost λ = −δD/δI as a parameter. If we want to find the manifold description (M, P(M|X)) for a particular value of information I, we can plot the curve I(λ) and, because it’s monotonic, we can easily find the solution iteratively, arbitrarily close to a given value of I. 4 Evaluating the solution The result of our algorithm is a collection of K manifold points, γk ∈M ⊂RD, and a stochastic projection map, Pk(xi), which maps the points from the data space onto the manifold. Presumably, the manifold M has a well defined intrinsic dimensionality d. If we imagine a little ball of radius r centered at some point on the manifold of intrinsic dimensionality d, and then we begin to grow the ball, the number of points on the manifold that fall inside will scale as rd. On the other hand, this will not be necessarily true for the original data set, since it is more spread out and resembles locally the whole embedding space RD. The Grassberger-Procaccia algorithm [12] captures this intuition by calculating the correlation dimension. First, calculate the correlation integral: C(r) = 2 N(N −1) N X i=1 N X j>i H(r −|xi −xj|), (16) where H(x) is a step function with H(x) = 1 for x > 0 and H(x) = 0 for x < 0. This measures the probability that any two points fall within the ball of radius r. Then define -5 -4 -3 -2 -1 0 1 2 3 4 -14 -12 -10 -8 -6 -4 -2 0 ln r ln C(r) original data manifold representation Figure 2: The semicircle. (a) N = 3150 points randomly scattered around a semicircle of radius R = 20 by a normal process with σ = 1 and the final positions of 100 manifold points. (b) Log log plot of C(r) vs r for both the manifold points (squares) and the original data set (circles). the correlation dimension at length scale r as the slope on the log log plot. dcorr(r) = d log C(r) d log r . (17) For points lying on a manifold the slope remains constant and the dimensionality is fixed, while the correlation dimension of the original data set quickly approaches that of the embedding space as we decrease the length scale. Note that the slope at large length scales always tends to decrease due to finite span of the data and curvature effects and therefore does not provide a reliable estimator of intrinsic dimensionality. 5 Examples 5.1 Semi-Circle We have randomly generated N = 3150 data points scattered by a normal distribution with σ = 1 around a semi-circle of radius R = 20 (Figure 2a). Then we ran the algorithm with K = 100 and λ = 8, and terminated the iterative algorithm once the precision ϵ = 0.1 had been reached. The resulting manifold is depicted in red. To test the quality of our solution, we calculated the correlation dimension as a function of spatial scale for both the manifold points and the original data set (Figure 2b). As one can see, the manifold solution is of fixed dimensionality (the slope remains constant), while the original data set exhibits varying dimensionality. One should also note that the manifold points have dcorr(r) = 1 well into the territory where the original data set becomes two dimensional. This is what we should expect: at a given information level (in this case, I = 2.8 bits), the information about the second (local) degree of freedom is lost, and the resulting structure is one dimensional. A note about the parameters. Letting K →∞does not alter the solution. The information I and distortion D remain the same, and the additional points γk also fall on the semi-circle and are simple interpolations between the original manifold points. This allows us to claim that what we have found is a manifold, and not an agglomeration of clustering centers. Second, varying λ changes the information resolution I(λ): for small λ (high information rate) the local structure becomes important. At high information rate the solution undergoes -1 -0.5 0 0.5 1 0 1 2 3 4 5 -1 -0.5 0 0.5 1 1.5 2 2.5 3 -1.5 -1 -0.5 0 0.5 1 1.5 -1.5 -1 -0.5 0 0.5 1 1.5 2 2.5 3 3.5 -1.5 -1 -0.5 0 0.5 1 1.5 -1.5 -1 -0.5 0 0.5 1 1.5 2 2.5 3 Figure 3: S-shaped sheet in 3D. (a) N = 2000 random points on a surface of an S-shaped sheet in 3D. (b) Normal noise added. XY-plane projection of the data. (c) Optimal manifold points in 3D, projected onto an XY plane for easy visualization. a phase transition, and the resulting manifold becomes two dimensional to take into account the local structure. Alternatively, if we take λ →∞, the cost of information rate becomes very high and the whole manifold collapses to a single point (becomes zero dimensional). 5.2 S-surface Here we took N = 2000 points covering an S-shaped sheet in three dimensions (Figure 3a), and then scattered the position of each point by adding Gaussian noise. The resulting manifold is difficult to visualize in three dimensions, so we provided its projection onto an XY plane for an illustrative purpose (Figure 3b). After running our algorithm we have recovered the original structure of the manifold (Figure 3c). 6 Discussion The problem of finding low dimensional manifolds in high dimensional data requires regularization to avoid hgihly folded, Peano curve like solutions which are low dimensional in the mathematical sense but fail to capture our geometric intuition. Rather than constraining geometrical features of the manifold (e.g., the curvature) we have constrained the mutual information between positions on the manifold and positions in the original data space, and this is invariant to all invertible coordinate transformations in either space. This approach enforces “smoothness” of the manifold only implicitly, but nonetheless seems to work. Our information theoretic approach has considerable generality relative to methods based on specific smoothing criteria, but requires a separate algorithm, such as LLE, to give the manifold points curvilinear coordinates. For data points not in the original data set, equations (9-10) and (13-14) provide the mapping onto the manifold. Eqn. (7) gives the probability distribution over the latent variable, known in the density modeling literature as “the prior.” The running time of the algorithm is linear in N. This compares favorably with other methods and makes it particularly attractive for very large data sets. The number of manifold points K usually is chosen as large as possible, given the computational constraints, to have a dense sampling of the manifold. However, a value of K << N is often sufficient, since D(λ, K) →D(λ) and I(λ, K) →I(λ) approach their limits rather quickly (the convergence improves for large λ and deteriorates for small λ). In the example of a semi-circle, the value of K = 30 was sufficient at the compression level of I = 2.8 bits. In general, the threshold value for K scales exponentially with the latent dimensionality (rather than with the dimensionality of the embedding space). The choice of λ depends on the desired information resolution, since I depends on λ. Ideally, one should plot the function I(λ) and then choose the region of interest. I(λ) is a monotonically decreasing function, with the kinks corresponding to phase transitions where the optimal manifold abruptly changes its dimensionality. In practice, we may want to run the algorithm only for a few choices of λ, and we would like to start with values that are most likely to correspond to a low dimensional latent variable representation. In this case, as a rule of thumb, we choose λ smaller, but on the order of the largest linear dimension (i.e. p λ/2 ∼Lmax). The dependence of the optimal manifold M(I) on information resolution reflects the multi-scale nature of the data and should not be taken as a shortcoming. References [1] Bregler, C. & Omohundro, S. (1995) Nonlinear image interpolation using manifold learning. Advances in Neural Information Processing Systems 7. MIT Press. [2] Hastie, T. & Stuetzle, W. (1989) Principal curves. Journal of the American Statistical Association, 84(406), 502-516. [3] Roweis, S. & Saul, L. (2000) Nonlinear dimensionality reduction by locally linear embedding. Science, 290, 2323–2326. [4] Tenenbaum, J., de Silva, V., & Langford, J. (2000) A global geometric framework for nonlinear dimensionality reduction. Science, 290 , 2319–2323. [5] Hotelling, H. (1933) Analysis of a complex of statistical variables into principal components. Journal of Educational Psychology, 24:417-441,498-520. [6] Bishop, C., Svensen, M. & Williams, C. (1998) GTM: The generative topographic mapping. Neural Computation,10, 215–234. [7] Brand, M. (2003) Charting a manifold. Advances in Neural Information Processing Systems 15. MIT Press. [8] Scholkopf, B., Smola, A. & Muller K-R. (1998) Nonlinear component analysis as a kernel eigenvalue problem. Neural Computation, 10, 1299-1319. [9] Kramer, M. (1991) Nonlinear principal component analysis using autoassociative neural networks. AIChE Journal, 37, 233-243. [10] Belkin M. & Niyogi P. (2003) Laplacian eigenmaps for dimensionality reduction and data representation. Neural Computation, 15(6), 1373-1396. [11] Blahut, R. (1972) Computation of channel capacity and rate distortion function. IEEE Trans. Inform. Theory, IT-18, 460-473. [12] Grassberger, P., & Procaccia, I. (1983) Characterization of strange attractors. Physical Review Letters, 50, 346-349.
2003
150
2,366
Invariant Pattern Recognition by Semidefinite Programming Machines Thore Graepel Microsoft Research Ltd. Cambridge, UK thoreg@microsoft.com Ralf Herbrich Microsoft Research Ltd. Cambridge, UK rherb@microsoft.com Abstract Knowledge about local invariances with respect to given pattern transformations can greatly improve the accuracy of classification. Previous approaches are either based on regularisation or on the generation of virtual (transformed) examples. We develop a new framework for learning linear classifiers under known transformations based on semidefinite programming. We present a new learning algorithm— the Semidefinite Programming Machine (SDPM)—which is able to find a maximum margin hyperplane when the training examples are polynomial trajectories instead of single points. The solution is found to be sparse in dual variables and allows to identify those points on the trajectory with minimal real-valued output as virtual support vectors. Extensions to segments of trajectories, to more than one transformation parameter, and to learning with kernels are discussed. In experiments we use a Taylor expansion to locally approximate rotational invariance in pixel images from USPS and find improvements over known methods. 1 Introduction One of the central problems of pattern recognition is the exploitation of known invariances in the pattern domain. In images these invariances may include rotation, translation, shearing, scaling, brightness, and lighting direction. In addition, specific domains such as handwritten digit recognition may exhibit invariances such as line thinning/thickening and other non-uniform deformations [8]. The challenge is to combine the training sample with the knowledge of invariances to obtain a good classifier. Possibly the most straightforward way of incorporating invariances is by including virtual examples into the training sample which have been generated from actual examples by the application of the invariance T : R × Rn →Rn at some fixed θ ∈R, e.g. the method of virtual support vectors [7]. Images x subjected to the transformation T (θ, ·) describe highly non-linear trajectories or manifolds in pixel space. The tangent distance [8] approximates the distance between the trajectories (manifolds) by the distance between their tangent vectors (planes) at a given value θ = θ0 and can be used with any kind of distance-based classifier. Another approach, tangent prop [8], incorporates the invariance T directly into the objective function for learning by penalising large values of the derivative of the classification function w.r.t. the given transformation parameter. A similar regulariser can be applied to support vector machines [1]. We take up the idea of considering the trajectory given by the combination of training vector and transformation. While data in machine learning are commonly represented as vectors x ∈Rn we instead consider more complex training examples each of which is represented as a (usually infinite) set {T (θ, xi) : θ ∈R} ⊂Rn , (1) which constitutes a trajectory in Rn. Our goal is to learn a linear classifier that separates well the training trajectories belonging to different classes. In practice, we may be given a “standard” training example x together with a differentiable transformation T representing an invariance of the learning problem. The problem can be solved if the transformation T is approximated by a transformation ˜T polynomial in θ, e.g., a Taylor expansion of the form ˜T (θ, xi) ≈ r X j=0 θj · µ 1 j! djT (θ, xi) dθj ¯¯¯¯ θ=0 ¶ = r X j=0 θj · (Xi)j,· . (2) Our approach is based on a powerful theorem by Nesterov [5] which states that the set P+ 2l of polynomials of degree 2l non-negative on the entire real line is a convex set representable by positive semidefinite (psd) constraints. Hence, optimisation over P+ 2l can be formulated as a semidefinite program (SDP). Recall that an SDP [9] is given by a linear objective function minimised subject to a linear matrix inequality (LMI), minimise w∈Rn c⊤w subject to A (w) := n X j=1 wjAj −B ⪰0 , (3) with Aj ∈Rm×m for all j ∈{0, . . . , n}. The LMI A (w) ⪰0 means that A (w) is required to be positive semidefinite, i.e., that for all v ∈Rn we have v⊤A (w) v = Pn j=1 wj ¡ v⊤Ajv ¢ −v⊤Bv ≥0 which reveals that LMI constraints correspond to infinitely many linear constraints. This expressive power can be used to enforce constraints for training examples as given by (1), i.e., constraints required to hold for all values θ ∈R. Based on this representability theorem for non-negative polynomials we develop a learning algorithm—the Semidefinite Programming Machine (SDPM)—that maximises the margin on polynomial training samples, much like the support vector machine [2] for ordinary single vector data. 2 Semidefinite Programming Machines Linear Classifiers and Polynomial Examples We consider binary classification problems and linear classifiers. Given a training sample ((x1, y1) , . . . , (xm, ym)) ∈ (Rn × {−1, +1})m we aim at learning a weight vector1 w ∈Rn to classify examples x by y (x) = sign ¡ w⊤x ¢ . Assuming linear separability of the training sample the principle of empirical risk minimisation recommends finding a weight vector w such that for all i ∈{1, . . . , m} we have yiw⊤xi ≥0. As such this constitutes a linear feasibility problem and is easily solved by the perceptron algorithm [6]. Additionally requiring the solution to maximise the margin leads to the well-known quadratic program of support vector learning [2]. In order to be able to cope with known invariances T (θ, ·) we would like to generalise the above setting to the following feasibility problem: find w ∈Rn such that ∀i ∈{1, . . . , m} : ∀θ ∈R : yiw⊤xi (θ) ≥0 , (4) 1We omit an explicit threshold to unclutter the presentation. 0.1 0.2 0.3 0.4 0.5 0.2 0.25 0.3 0.35 0.4 0.45 0.5 0.55 0.6 0.65 φ1(x) φ2(x) SVM version space SDPM version space Figure 1: (Left) Approximated trajectories for rotated USPS images (2) for r = 1 (dashed line) and r = 2 (dotted line). The features are the mean pixel intensities in the top and bottom half of the image. (Right) Set of weight vectors w which are consistent with the six images (top) and the six trajectories (bottom). The SDPM version space is smaller and thus determines the weight vector more precisely. The dot corresponds to the separating plane in the left plot. that is, we would require the weight vector to classify correctly every transformed training example xi (θ) := T (θ, xi) for every value of the transformation parameter θ. The situation is illustrated in Figure 1. In general, such a set of constraints leads to a very complex and difficult-to-solve feasibility problem. As a consequence, we consider only transformations ˜T (θ, x) of polynomial form, i.e., ˜xi (θ) := ˜T (θ, xi) = X⊤ i θ, each polynomial example ˜xi (θ) being represented by a polynomial in the row vectors of Xi ∈R(r+1)×n, with θ := (1, θ, . . . , θr)⊤. Then the problem (4) can be written as find w ∈Rn such that ∀i ∈{1, . . . , m} : ∀θ ∈R : yiw⊤X⊤ i θ ≥0 , (5) which is equivalent to finding a weight vector w such that the polynomials pi (θ) := yiw⊤X⊤ i θ are non-negative everywhere, i.e., pi ∈P+ r . The following proposition by Nesterov [5] paves the way for an SDP formulation of the above problem if r = 2l. Proposition 1 (SD Representation of Non-Negative Polynomials [5]). The set P+ 2l of polynomials non-negative everywhere on the real line is SD-representable: 1. For every P ⪰0 the polynomial p (θ) = θ⊤P θ is non-negative everywhere. 2. For every polynomial p ∈P+ 2l there exists a P ⪰0 such that p (θ) = θ⊤P θ. Proof. Any polynomial p ∈P2l can be written as p (θ) = θ⊤P θ, where P = P⊤∈ R(l+1)×(l+1). Statement 1: P ⪰0 implies ∀θ ∈R : p (θ) = θ⊤P θ = ∥P 1 2 θ∥2 ≥0, hence p ∈P+ 2l. Statement 2: Every non-negative polynomial p ∈P+ 2l can be written as a sum of squared polynomials [4], hence ∃qi ∈Pl : p (θ) = P i q2 i (θ) = θ⊤¡P i qiq⊤ i ¢ θ where P := P i qiq⊤ i ⪰0 and qi is the coefficient vector of polynomial qi. Maximising Margins on Polynomial Samples Here we develop an SDP formulation for learning a maximum margin classifier given the polynomial constraints (5). It is well-known that SDPs include quadratic programs as a special case [9]. The squared objective ∥w∥2 is minimised by replacing it with an auxiliary variable t subject to a quadratic constraint t ≥∥w∥2 that is written as an LMI using Schur’s complement lemma, minimise (w,t) 1 2t subject to F (w, t) := µ In w w⊤ t ¶ ⪰0 , and ∀i : G (w, Xi, yi) := G0 + n X j=1 wjGj ³ (Xi)·,j , yi ´ ⪰0 . (6) This constitutes an SDP as in (3) by the fact that a block-diagonal matrix is psd if and only if all its diagonal blocks are psd. For the sake of illustration consider the case of l = 0 (the simplest non-trivial case). The matrix G (w, Xi, yi) reduces to a scalar yiw⊤xi −1, which translates into the standard SVM constraint yiw⊤xi ≥1 linear in w. For the case l = 1 we have G (w, Xi, yi) ∈R2×2 and G (w, Xi, yi) = µ yiw⊤(Xi)0,· −1 1 2yiw⊤(Xi)1,· 1 2yiw⊤(Xi)1,· yiw⊤(Xi)2,· ¶ . (7) Although we require G (w, Xi, yi) to be psd the resulting optimisation problem can be formulated in terms of a second-order cone program (SOCP) because the matrices involved are only 2 × 2.2 For the case l ≥2 the resulting program constitutes a genuine SDP. Again for the sake of illustration we consider the case l = 2 first. Since a polynomial p of degree four is fully determined by its five coefficients p0, . . . , p4, but the symmetric matrix P ∈R3×3 in p (θ) = θ⊤P θ has six degrees of freedom we require one auxiliary variable ui per training example, G (w, ui, Xi, yi) = 1 2   2yiw⊤(Xi)0,· −2 yiw⊤(Xi)1,· yiw⊤(Xi)2,· −ui yiw⊤(Xi)1,· 2ui yiw⊤(Xi)3,· yiw⊤(Xi)2,· −ui yiw⊤(Xi)3,· yiw⊤(Xi)4,·  . In general, since a polynomial of degree 2l has 2l + 1 coefficients and a symmetric (l + 1) × (l + 1) matrix has (l + 1) (l + 2) /2 degrees of freedom we require (l −1) l/2 auxiliary variables. Dual Program and Complementarity Let us consider the dual SDPs corresponding to the optimisation problems above. For the sake of clarity, we restrict the presentation to the case l = 1. The dual of the general SDP (3) is given by maximise Λ∈Rm×m tr (BΛ) subject to ∀j ∈{1, . . . , n} : tr (AjΛ) = cj; Λ ⪰0, where we introduced a matrix Λ of dual variables. The complementarity conditions for the optimal solution (w∗, t∗) read A ((w∗, t∗)) Λ∗= 0 . The dual formulation of (6) with matrix (7) combined with the F (w, t) part of the complementarity conditions reads maximise (α,β,γ)∈R3m −1 2 m X i=1 m X j=1 yiyj [˜x (αi, βi, γi, Xi)]⊤[˜x (αj, βj, γj, Xj)] + m X i=1 αi subject to ∀i ∈{1, . . . , m} : Mi := µ αi βi βi γi ¶ ⪰0 , (8) 2The characteristic polynomial of a 2×2 matrix is quadratic and has at most two solutions. The condition that the lower eigenvalue be non-negative can be expressed as a second-order cone constraint. The SOCP formulation—if applicable—can be solved more efficiently than the SDP formulation. where we define extrapolated training examples ˜x(αi, βi, γi, Xi) := αi(Xi)0,· + βi(Xi)1,· + γi(Xi)2,·. As before this program with quadratic objective and psd constraints can be formulated as a standard SDP in the form (3) and is easily solved by a standard SDP solver3. In addition, the complementarity conditions reveal that the optimal weight vector w∗can be expanded as w∗= m X i=1 yi˜x (αi, βi, γi, Xi) , (9) in analogy to the corresponding result for support vector machines [2]. It remains to analyse the complementarity conditions related to the example-related G (w, Xi, yi) constraints in (6). Using (7) and assuming primal and dual feasibility we obtain for all i ∈{1, . . . , m} at the solution (w∗, t∗, M∗ i ), G (w∗, Xi, yi) · M∗ i = 0 , (10) the trace of which translates into yiw∗,⊤[α∗ i (Xi)0,· + β∗ i (Xi)1,· + γ∗ i (Xi)2,·] = α∗ i . (11) These relations enable us to characterise the solution by the following propositions: Proposition 2 (Sparse Expansion). The expansion (9) of w∗in terms of Xi is sparse: Only those examples Xi (“support vectors”) may have non-zero expansion coefficients α∗ i which lie on the margin, i.e., for which det (Gi (w∗, Xi, yi)) = 0. Furthermore, in this case α∗ i = 0 implies β∗ i = γ∗ i = 0. Proof. We assume α∗ i ̸= 0 and derive a contradiction. From G (w∗, Xi, yi) ≻0 we conclude using Proposition 1 that for all θ ∈R we have yiw∗,⊤((Xi)0,· + θ(Xi)1,· + θ2(Xi)2,·) > 1. Furthermore, we conclude from (10) that det(M∗ i ) = α∗ i γ∗ i −β∗2 i = 0, which together with the assumption α∗ i ̸= 0 implies that there exists ˜θ ∈R such that β∗ i = ˜θα∗ i and γ∗ i = β∗2 i /α∗ i = ˜θ2α∗ i . Inserting this into (11) leads to a contradiction, hence α∗ i = 0. Then, det(M∗ i ) = 0 implies β∗ i = 0 and the fact that G (w∗, Xi, yi) ≻ 0 ⇒yiw∗,⊤(Xi)2,· ̸= 0 ensures that γ∗ i = 0 holds as well. Proposition 3 (Truly Virtual Support Vectors). For all examples Xi lying on the margin, i.e., satisfying det (G (w∗, Xi, yi)) = 0 and det (M∗ i ) = 0 there exist θi ∈R ∪{∞} such that the optimal weight vector w∗can be written as w∗= m X i=1 α∗ i yi˜xi (θi) = m X i=1 yiα∗ i ³ (Xi)0,· + θ∗ i (Xi)1,· + θ∗2 i (Xi)2,· ´ Proof. (sketch) We have det(M∗ i ) = α∗γ∗−β∗2 = 0. We only need to consider α∗ i ̸= 0, in which case there exists θ∗ i such that β∗ i = θ∗ i α∗ i and γ∗ i = θ∗2 i α∗ i . The other cases are ruled out by the complementarity conditions (10). Based on this proposition it is possible not only to identify which examples Xi are used in the expansion of the optimal weight vector w∗, but also the corresponding values θ∗ i of the transformation parameter θ. This extends the idea of virtual support vectors [7] in that Semidefinite Programming Machines are capable of finding truly virtual support vectors that were not explicitly provided in the training sample. 3We used the SDP solver SeDuMi together with the LMI parser Yalmip under MATLAB (see also http://www-user.tu-chemnitz.de/˜helmberg/semidef.html). 3 Extensions to SDPMs Optimisation on a Segment In many applications it may not be desirable to enforce correct classification on the entire trajectory given by the polynomial example ˜x (θ). In particular, when the polynomial is used as a local approximation to a global invariance we would like to restrict the example to a segment of the trajectory. To this end consider the following corollary to Proposition 1. Corollary 1 (SD-Representability on a segment [5]). For any l ∈N, the set P+ l (−τ, τ) of polynomials non-negative on a segment [−τ, τ] is SD-representable. Proof. (sketch) Consider a polynomial p ∈P+ l (−τ, τ) where p := x 7→Pl i=0 pixi and q := x 7→ ¡ 1 + x2¢l · [p(τ(2x2(1 + x2)−1 −1))] . If q ∈P+ 2l is non-negative everywhere then p is non-negative in [−τ, τ]. The proposition shows how we can restrict the examples ˜x (θ) to a segment θ ∈[−τ, τ] by effectively doubling the degree of the polynomial used. This is the SDPM version used in the experiments in Section 4. Note that the matrix G (w, Xi, yi) is sparse because the resulting polynomial contains only even powers of θ. Multiple Transformation Parameters In practice it would be desirable to treat more than one transformation at once. For example, in handwritten digit recognition transformations like rotation, scaling, translation, shearing, thinning/thickening etc. may all be relevant [8]. Unfortunately, Proposition 1 only holds for polynomials in one variable. However, its first statement may be generalised to polynomials of more than one variable: for every psd matrix P ⪰0 the polynomial p (ρ) = θ⊤ ρ P θρ is non-negative everywhere, even if θi is any monomial in ρ1, . . . , ρD. This means, that optimisation is only over a subset of these polynomials4. Considering polynomials of degree two and θρ := (1, ρ1, . . . , ρD) we have, ˜xi (ρ) ≈θ⊤ ρ · xi (0) ∇⊤ ρ xi (0) ∇ρxi (0) ∇ρ∇⊤ ρ xi (0) ¸ θρ , where ∇⊤ ρ denotes the gradient and ∇ρ∇⊤ ρ denotes the Hessian operator. Note that the scaling behaviour with regard to the number D of parameters is more benign than that of the naive method of adding virtual examples to the training sample on a grid. Such a procedure would incur an exponential growth in the number of examples, whereas the approximation above only exhibits a linear growth in the size of the matrices involved. Learning with Kernels Support vector machines derive much of their popularity from the flexibility added by the use of kernels [2, 7]. Due to space restrictions we cannot discuss kernels in detail. However, taking the dual SDPM (8) as a starting point and assuming the Taylor expansion (2) the crucial point is that in order to represent the polynomial trajectory in feature space we need to differentiate through the kernel function. Let us assume a feature map φ : Rn →F ⊆RN and k : X × X →R be the kernel function corresponding to φ in the sense that ∀x, ˜x ∈X : [φ(x)]⊤[φ(˜x)] = k (x, ˜x). 4There exist polynomials in more than one variable that are non-negative everywhere yet cannot be written as a sum of squares and are hence not SD-representable. 0.1 0.15 0.2 0.25 0.3 0.35 0.08 0.1 0.12 0.14 0.16 0.18 0.2 0 0.05 0.1 0.15 0.2 0 0.02 0.04 0.06 0.08 0.1 0.12 0.14 0.16 0.18 0.2 SVM error SDPM error 0 0.02 0.04 0.06 0.08 0.1 0.12 0.14 0 0.02 0.04 0.06 0.08 0.1 0.12 0.14 VSVM error SDPM error (a) (b) (c) Figure 2: (a) A linear classifier learned with the SDPM on 10 2D-representations of the USPS digits “1” and “9” (see Figure 1 for details). Note that the “support” vector is truly virtual since it was never directly supplied to the algorithm (inset zoom-in). (b) Mean test errors of classifiers learned with the SVM vs. SDPM (see text) and (c) virtual SVM vs. SDPM algorithm on 50 independent training sets of size m = 20 for all 45 digit classification tasks. The Taylor expansion (2) is now carried out in F. Then an inner product expression between data points xi and xj differentiated, respectively, u and v times reads h φ(u)(xi) i⊤h φ(v)(xj) i | {z } k(u,v)(xi,xj) = N X s=1 à duφs(x(θ)) dθu ¯¯¯¯ x=xi,θ=0 ! ·  dvφs(˜x(˜θ)) d˜θv ¯¯¯¯¯ ˜x=xj,˜θ=0  . The kernel trick may help avoid the sum over N feature space dimensions, however, it does so at the cost of additional terms by the product rule of differentiation. It turns out that for polynomials of degree r = 2 the exact calculation of elements of the kernel matrix is already O ¡ n4¢ and needs to be approximated efficiently in practice. 4 Experimental Results In order to test and illustrate the SDPM we used the well-known USPS data set of 16 × 16 pixel images in [0, 1] of handwritten digits. We considered the transformation rotation by angle θ and calculated the first and second derivatives x′ i (θ = 0) and x′′ i (θ = 0) based on an image representation smoothed by a Gaussian of variance 0.09. For the purpose of illustration we calculated two simple features, averaging the first and the second 128 pixel intensities, respectively. Figure 2 (a) shows a plot of 10 training examples of digits “1” and “9” together with the quadratically approximated trajectories for θ ∈[−20◦, 20◦]. The examples are separated by the solution found with an SDPM restricted to the same segment of the trajectory. Following Propositions 2 and 3 the weight vector found is expressed as a linear combination of truly virtual support vectors that had not been supplied in the training sample directly (see inset). In a second experiment, we probed the performance of the SDPM algorithm on the full feature set of 256 pixel intensities using 50 training sets of size m = 20 for each of the 45 one-versus-one classification tasks between all of the digits from “0” to “9” from the USPS data set. For each task, the digits in one class were rotated by −10◦ and the digits of the other class by +10◦. We compared the performance of the SDPM algorithm to the performance of the original support vector machine (SVM) [2] and the virtual support vector machine (VSVM) [7] measured on independent test sets of size 250. The VSVM takes the support vectors of the ordinary SVM run and is trained on a sample that contains these support vectors together with transformed versions rotated by −10◦and +10◦in the quadratic approximation. The results are shown in the form of scatter plots of the errors for the 45 tasks in Figure 2 (b) and (c). Clearly, taking into account the invariance is useful and leads to SDPM performance superior to the ordinary SVM. The SDPM also performs slightly better than the VSVM, however, this could be attributed to the pre-selection of support vectors to which the transformation is applied. It is expected that for increasing number D of transformations the performance improvement becomes more pronounced because in high dimensions most volume is concentrated on the boundary of the convex hull of the polynomial manifold. 5 Conclusion We introduced Semidefinite Programming Machines as a means of learning on infinite families of examples given in terms of polynomial trajectories or—more generally— manifolds in data space. The crucial insight lies in the SD-representability of nonnegative polynomials which allows us to replace the simple non-negativity constraint in algorithms such as support vector machines by positive semidefinite constraints. While we have demonstrated the performance of the SDPM only on very small data sets it is expected that modern interior-point methods make it possible to scale SDPMs to problems of m ≈105 −106 data points, in particular in primal space where the number of variables is given by the number of features. This expectation is further supported by the following: (i) The resulting SDP is well structured in the sense that A (w, t) is block-diagonal with many small blocks. (ii) It may often be sufficient to satisfy the constraints—e.g., by a version of the perceptron algorithm for semidefinite feasibility problems [3]—without necessarily maximising the margin. Open questions remain about training SDPMs with multiple parameters and about the efficient application of SDPMs with kernels. Finally, it would be interesting to obtain learning theoretical results regarding the fact that SDPMs effectively make use of an infinite number of (non IID) training examples. References [1] O. Chapelle and B. Sch¨olkopf. Incorporating invariances in non-linear support vector machines. In T. G. Dietterich, S. Becker, and Z. Ghahramani, editors, Advances in Neural Information Processing Systems 14, pages 609–616, Cambridge, MA, 2002. MIT Press. [2] C. Cortes and V. Vapnik. Support vector networks. Machine Learning, 20:273–297, 1995. [3] T. Graepel, R. Herbrich, A. Kharechko, and J. Shawe-Taylor. Semidefinite programming by perceptron learning. In S. Thrun, L. Saul, and B. Sch¨olkopf, editors, Advances in Neural Information Processing Systems 16. MIT Press, 2004. [4] A. Nemirovski. Five lectures on modern convex optimization, 2002. Lecture notes of the C.O.R.E. Summer School on Modern Convex Optimization. [5] Y. Nesterov. Squared functional systems and optimization problems. In H. Frenk, K. Roos, T. Terlaky, and S. Zhang, editors, High Performance Optimization, pages 405– 440. Kluwer Academic Press, 2000. [6] F. Rosenblatt. The perceptron: A probabilistic model for information storage and organization in the brain. Psychological Review, 65(6):386–408, 1958. [7] B. Sch¨olkopf. Support Vector Learning. R. Oldenbourg Verlag, M¨unchen, 1997. Doktorarbeit, TU Berlin. Download: http://www.kernel-machines.org. [8] P. Simard, Y. LeCun, J. Denker, and B. Victorri. Transformation invariance in pattern recognition, tangent distance and tangent propagation. In G. Orr and M. K., editors, Neural Networks: Tricks of the trade. Springer, 1998. [9] L. Vandenberghe and S. Boyd. Semidefinite programming. SIAM Review, 38(1):49–95, 1996.
2003
151
2,367
Impact of an Energy Normalization Transform on the Performance of the LF-ASD Brain Computer Interface Zhou Yu1 Steven G. Mason2 Gary E. Birch1,2 1 Dept. of Electrical and Computer Engineering University of British Columbia 2356 Main Mall Vancouver, B.C. Canada V6T 1Z4 2 Neil Squire Foundation 220-2250 Boundary Road Burnaby, B.C. Canada V5M 3Z3 Abstract This paper presents an energy normalization transform as a method to reduce system errors in the LF-ASD brain-computer interface. The energy normalization transform has two major benefits to the system performance. First, it can increase class separation between the active and idle EEG data. Second, it can desensitize the system to the signal amplitude variability. For four subjects in the study, the benefits resulted in the performance improvement of the LF-ASD in the range from 7.7% to 18.9%, while for the fifth subject, who had the highest non-normalized accuracy of 90.5%, the performance did not change notably with normalization. 1 Introduction In an effort to provide alternative communication channels for people who suffer from severe loss of motor function, several researchers have worked over the past two decades to develop a direct Brain-Computer Interface (BCI). Since electroencephalographic (EEG) signal has good time resolution and is non-invasive, it is commonly used for data source of a BCI. A BCI system converts the input EEG into control signals, which are then used to control devices like computers, environmental control system and neuro-prostheses. Mason and Birch [1] proposed the Low-Frequency Asynchronous Switch Design (LF-ASD) as a BCI which detected imagined voluntary movement-related potentials (IVMRPs) in spontaneous EEG. The principle signal processing components of the LF-ASD are shown in Figure 1. sIN sLPF sFE sFC LPF Feature Extractor Feature Classifier Figure 1: The original LF-ASD design. The input to the low-pass filter (LPF), denoted as SIN in Figure 1, are six bipolar EEG signals recorded from F1-FC1, Fz-FCz, F2-FC2, FC1-C1, FCz-Cz and FC2-C2 sampled at 128 Hz. The cutoff frequency of the LPF implemented by Mason and Birch was 4 Hz. The Feature Extractor of the LF-ASD extracts custom features related to IVMRPs. The Feature Classifier implements a one-nearest-neighbor (1NN) classifier, which determines if the input signals are related to a user state of voluntary movement or passive (idle) observation. The LF-ASD was able to achieve True Positive (TP) values in the range of 44%-81%, with the corresponding False Positive (FP) values around 1% [1]. Although encouraging, the current error rates of the LF-ASD are insufficient for real-world applications. This paper proposes a method to improve the system performance. 2 Design and Rationale The improved design of the LF-ASD with the Energy Normalization Transform (ENT) is provided in Figure 2. SIN SN SNLPF SNFE SNFC ENT LPF Feature Extractor Feature Classifier Figure 2: The improved LF-ASD with the Energy Normalization Transform. The design of the Feature Extractor and Feature Classifier were the same as shown in Figure 1. The Energy Normalization Transform (ENT) is implemented as where WN (normalization window size) is the only parameter in the equation. The optimal parameter value was obtained by exhaustive search for the best class separation between active and idle EEG data. The method of obtaining the active and idle EEG data is provided in Section 3.1. The idea to use energy normalization to improve the LF-ASD design was based primarily on an observation that high frequency power decreases significantly around movement. For example, Jasper and Penfield [3] and Pfurtscheller et al, [4] reported EEG power decrease in the mu (8-12 Hz) and beta rhythm (18-26 Hz) when people are involved in motor related activity. Also Mason [5] found that the power in the frequency components greater than 4Hz decreased significantly during movement-related potential periods, while power in the frequency components less than 4Hz did not. Thus energy normalization, which would increase the low frequency power level, would strengthen the 0-4 Hz features used in the LF-ASD and hence reduce errors. In addition, as a side benefit, it can automatically adjust the mean scale of the input signal and desensitize the system to change in EEG power, which is known to vary over time [2]. Therefore, it was postulated that the addition of ENT into the improved design would have two major benefits. First, it can w S S S N s s IN IN N w w s n n n N N ∑ − = − − = − = 2 / ) 1 ( 2 / ) 1 ( 2 ) ( ) ( ) ( increase the EEG power around motor potentials, consequently increasing the class separation and feature strength. Second, it can desensitize the system to amplitude variance of the input signal. In addition, since the system components of the modified LF-ASD after the ENT were the same as in the original design, a major concern was whether or not the ENT distorted the features used by the LF-ASD. Since the features used by the LFASD are generated from the 0-4 Hz band, if the ENT does not distort the phase and magnitude spectrum in this specific band, it would not distort the features related to movement potential detection in the application. 3 Evaluation 3.1 Test data Two types of EEG data were pre-recorded from five able-bodied individuals as shown in Figure 3. Active Data Type and Idle Data Type. Active Data was recorded during repeated right index finger flexions alternating with periods of no motor activity; Idle Data was recorded during extended periods of passive observation. Figure 3: Data Definition of M1, M2, Idle1 and Idle2. Observation windows centered at the time of the finger switch activations (as shown in Figure 4) were imposed in the active data to separate data related to movements from data during periods of idleness. For purpose of this study, data in the front part of the observation window was defined as M1 and data in the rear part of the window was defined as M2. Data falling out of the observation window was defined as Idle2. All the data in the Idle Data Type was defined as Idle1 for comparison with Idle2. Figure 4: Ensemble Average of EEG centered on finger activations. Figure 5: Density distribution of Idle1, Idle2, M1 and M2. It was noted, in terms of the density distribution of active and idle data, the separation between M2 and Idle2 was the largest and Idle1 and Idle2 were nearly identical (see Figure 5). For the study, M2 and Idle2 were chosen to represent the active and idle data classes and the separation between M2 and Idle2 data was defined by the difference of means (DOM) scaled by the amplitude range of Idle2. 3.2 Optimal parameter determination The optimal combination of normalization window size, WN, and observation window size, WO was selected to be that which achieved the maximal DOM value. This was determined by exhaustive search, and discussed in Section 4.1. 3.3 Effect of ENT on the Low Pass Filter output As mentioned previously, it was postulated that the ENT had two major impacts: increasing the class separation between active and idle EEG and desensitizing the system to the signal amplitude variance. The hypothesis was evaluated by comparing characteristics of SNLPF and SLPF in Figure 1 and Figure 2. DOM was applied to measure the increased class separation. The signal with the larger DOM meant larger class separation. In addition, the signal with smaller standard deviation may result in a more stable feature set. 3.4 Effect of ENT on the LF-ASD output The performances of the original and improved designs were evaluated by comparing the signal characteristics of SNFC in Figure 2 to SFC in Figure 1. A Receiver Operating Characteristic Curve (ROC Curve) [6] was generated for the original and improved designs. The ROC Curve characterizes the system performance over a range of TP vs. FP values. The larger area under ROC Curve indicates better system performance. In real applications, a BCI with high-level FP rates could cause frustration for subjects. Therefore, in this work only the LF-ASD performance when the FP values are less than 1% were studied. 4 Results 4.1 Optimal normalization window size (W N) The method to choose optimal WN was an exhaustive search for maximal DOM between active and idle classes. This method was possibly dependent on the observation window size (WO). However, as shown in Figure 6a, the optimal WN was found to be independent of WO. Experimentally, the WO values were selected in the range of 50-60 samples, which corresponded to largest DOM between nonnormalized active and idle data. The optimal WN was obtained by exhaustive search for the largest DOM through normalized active and idle data. The DOM vs. WN profile for Subject 1 is shown in Figure 6b. a) b) Figure 6: Optimal parameter determination for Subject 1 in Channel 1 a) DOM vs. WO; b) DOM vs. WN. When using ENT, a small WN value may cause distortion to the feature set used by the LF-ASD. Thus, the optimal WN was not selected in this range (< 40 samples). When WN is greater than 200, the ENT has lost its capability to increase class separation and the DOM curve gradually goes towards the best separation without normalization. Thus, the optimal WN should correspond to the maximal DOM value when WN is in the range from 40 to 200. In Figure 6b, the optimal WN is around 51. 4.2 Effect of ENT on the Low Pass Filter output With ENT, the standard deviation of the low frequency EEG signal decreased from around 1.90 to 1.30 over the six channels and over the five subjects. This change resulted in more stable feature sets. Thus, the ENT desensitizes the system to input signal variance. a) b) Figure 7: Density distribution of the active vs. idle class without (a) and with (b) ENT, for Subject 1 in Channel 1. As shown in Figure 7, by increasing the EEG power around motor potentials, ENT can increase class separations between active and idle EEG data. The class separation in (frontal) Channels 1-3 across all subjects increased consistently with the proposed ENT. The same was true for (midline) Channels 4-6, for all subjects except Subject 5, whose DOM in channel 5-6 decreased by 2.3% and 3.4% respectively with normalization. That is consistent with the fact that his EEG power in Channels 4-6 does not decrease. On average, across all five subjects, DOM increases with normalization to about 28.8%, 26.4%, 39.4%, 20.5%, 17.8% and 22.5% over six channels respectively. In addition, the magnitude and phase spectrums of the EEG signal before and after ENT is provided in Figure 8. The ENT has no visible distortion to the signal in the low frequency band (0-4 Hz) used by the LF-ASD. Therefore, the ENT does not distort the features used by the LF-ASD. (a) (b) Figure 8: Magnitude and phase spectrum of the EEG signal before and after ENT. 4.3 Effect of ENT on the LF-ASD output The two major benefits of the ENT to the low frequency EEG data result in the performance improvement of the LF-ASD. Subject 1’s ROC Curves with and without ENT is shown in Figure 9, where the ROC-Curve with ENT of optimal parameter value is above the ROC Curve without ENT. This indicates that the improved LF-ASD performs better. Table I compares the system performance with and without ENT in terms of TP with corresponding FP at 1% across all the 5 subjects. Figure 9: The ROC Curves (in the section of interest) of Subject 1 with different WN values and the corresponding ROC Curve without ENT. Table I: Performance of the LF-ASD with and without LF-ASD in terms of the True Positive rate with corresponding False Positive at 1%. TP without ENT TP with ENT Performance Improvement Subject 1 66.1% 85.0% 18.9% Subject 2 82.7% 90.4% 7.7% Subject 3 79.7% 88.0% 8.3% Subject 4 79.3% 87.8% 8.5% Subject 5 90.5% 88.7% -1.8% For 4 out of 5 subjects, corresponding with the FP at 1%, the improved system with ENT increased the TP value by 7.7%, 8.3%, 8.5% and 18.9% respectively. Thus, for these subjects, the range of TP with FP at 1% was improved from 66.1%-82.7% to 85.0%-90.4% with ENT. For the fifth subject, who had the highest non-normalized accuracy of 90.5%, the performance remained around 90% with ENT. In addition, this evaluation is conservative. Since the codebook in the Feature Classifier and the parameters in the Feature Extractor of the LF-ASD were derived from nonnormalized EEG, they work in favor of the non-normalized EEG. Therefore, if the parameters and the codebook of the modified LF-ASD are generated from the normalized EEG in the future, the modified LF-ASD may show better performance than this evaluation. 5 Conclusion The evaluation with data from five able-bodied subjects indicates that the proposed system with Energy Normalization Transform (ENT) has better performance than the original. This study has verified the original hypotheses that the improved design with ENT might have two major benefits: increased the class separation between active and idle EEG and desensitized the system performance to input amplitude variance. As a side benefit, the ENT can also make the design less sensitive to the mean input scale. In the broad band, the Energy Normalization Transform is a non-linear transform. However, it has no visible distortion to the signal in the 0-4 Hz band. Therefore, it does not distort the features used by the LF-ASD. For 4 out of 5 subjects, with the corresponding False Positive rate at 1%, the proposed transform increased the system performance by 7.7%, 8.3%, 8.5% and 18.9% respectively in terms of True Positive rate. Thus, the overall performance of the LF-ASD for these subjects was improved from 66.1%-82.7% to 85.0%-90.4%. For the fifth subject, who had the highest non-normalized accuracy of 90.5%, the performance did not change notably with normalization. In the future with the codebook derived from the normalized data, the performance could be further improved. References [1] Mason, S. G. and Birch, G. E., (2000) A Brain-Controlled Switch for Asynchronous Control Applications. IEEE Trans Biomed Eng, 47(10):1297-1307. [2] Vaughan, T. M., Wolpaw, J. R., and Donchin, E. (1996) EEG-Based Communication: Prospects and Problems. IEEE Trans Reh Eng, 4(4):425-430. [3] Jasper, H. and Penfield, W. (1949) Electrocortiograms in man: Effect of voluntary movement upon the electrical activity of the precentral gyrus. Arch.Psychiat.Nervenkr., 183:163-174. [4] Pfurtscheller, G., Neuper, C., and Flotzinger, D. (1997) EEG-based discrimination between imagination of right and left hand movement. Electroencephalography and Clinical Neurophysiology, 103:642-651. [5] Mason, S. G. (1997) Detection of single trial index finger flexions from continuous, spatiotemporal EEG. PhD Thesis, UBC, January. [6] Green, D. M. and Swets, J. A. (1996) Signal Detection Theory and Psychophysics New York: John Wiley and Sons, Inc.
2003
152
2,368
Subject-Independent Magnetoencephalographic Source Localization by a Multilayer Perceptron Sung C. Jun Biological and Quantum Physics Group MS-D454, Los Alamos National Laboratory Los Alamos, NM 87545, USA jschan@lanl.gov Barak A. Pearlmutter Hamilton Institute NUI Maynooth Maynooth, Co. Kildare, Ireland barak@cs.may.ie Abstract We describe a system that localizes a single dipole to reasonable accuracy from noisy magnetoencephalographic (MEG) measurements in real time. At its core is a multilayer perceptron (MLP) trained to map sensor signals and head position to dipole location. Including head position overcomes the previous need to retrain the MLP for each subject and session. The training dataset was generated by mapping randomly chosen dipoles and head positions through an analytic model and adding noise from real MEG recordings. After training, a localization took 0.7 ms with an average error of 0.90 cm. A few iterations of a Levenberg-Marquardt routine using the MLP’s output as its initial guess took 15 ms and improved the accuracy to 0.53 cm, only slightly above the statistical limits on accuracy imposed by the noise. We applied these methods to localize single dipole sources from MEG components isolated by blind source separation and compared the estimated locations to those generated by standard manually-assisted commercial software. 1 Introduction The goal of MEG/EEG localization is to identify and measure the signals emitted by electrically active brain regions. A number of methods are in widespread use, most assuming dipolar sources (H¨am¨al¨ainen et al., 1993). Recently MLPs (Rumelhart et al., 1986) have become popular for building fast dipole localizers (Abeyratne et al., 1991; Kinouchi et al., 1996). Since it is easy to use a forward model to create synthetic data consisting of dipole locations and corresponding sensor signals, one can train a MLP on the inverse problem. Hoey et al. (2000) took EEG measurements for both spherical and realistic head models and trained MLPs on randomly generated noise-free datasets. Integrated approaches to the EEG/MEG dipole source localization, in which the trained MLPs are used as initializers for iterative methods, have also been studied (Jun et al., 2002) along with distributed output representations (Jun et al., 2003). Interestingly, all work to date trained with a fixed head model. However, for MEG, head movement relative to the fixed sensor array is very difficult to avoid, and even with heroic measures (bite bars) the position of the head relative to the sensor array varies from subject to subject and session to session. This either results in significant localization error (Kwon et al., 2002), or requires laborious retraining and revalidation of the system. We propose an augmented system which takes head position into account, yet remains able to localize a single dipole to reasonable accuracy within a fraction of a millisecond on a standard PC, even when the signals are contaminated by considerable noise. The system uses a MLP trained on random dipoles and random head positions, which takes as inputs both the coordinates of the center of a sphere fitted to the head and the sensor measurements, uses two hidden layers, and generates the source location (in Cartesian coordinates) as its output. Adding head position as an extra input overcomes the primary practical limitation of previous MLP-based MEG localization systems: the need to retrain the network for each new head position. We use an analytical model of quasi-static z z y x Sensor surface 11.343 cm 10.851cm 13.594 cm 10.851 cm 7.5 cm 3.605 cm 10.5 cm 7.5 cm 4 cm 3 cm Head Model A Head Model B A B Coronal View Training Region and various Head Models Training Region Saggital View Figure 1: Sensor surface and training region. The center of the spherical head model was varied within the given region. Diamonds denote sensors. electromagnetic propagation through a spherical head to map randomly chosen dipoles and head positions to superconducting quantum interference device (SQUID) sensor activities according to the sensor geometry of a 4D Neuroimaging Neuromag-122 MEG system, and trained a MLP to invert this mapping in the presence of real brain noise. To improve the localization accuracy we use a hybrid MLPstart-LM method, in which the MLP’s output provides the starting point for a Levenberg-Marquardt (LM) optimization (Press et al., 1988). We use the MLP and MLP-start-LM methods to localize singledipole sources from actual MEG signal components isolated by a blind source separation (BSS) algorithm (Vig´ario et al., 2000; Tang et al., 2002) and compare the results with the output of standard interactive commercial localization software. Section 2 describes our synthetic data, the forward model, the noise used to additively contaminate the training data, and the MLP structure. Section 3 presents the localization performance of both the MLP and MLP-startLM, and compares them with various conventional LM methods. In Section 3.2, comparative localization results for our proposed methods and standard Neuromag commercial software on actual BSS-separated MEG signals are presented. 2 Data and MLP structure We constructed noisy data using the procedure of Jun et al. (2002), except that an additional input was associated with each exemplar, namely the (x, y, z) coordinates of the center of a sphere fitted to the head, and the forward model was modified to account for this offset. Each exemplar thus consisted of the (x, y, z) coordinates of the center of a sphere fitted to the head, sensor activations generated by a forward model, and the target dipole location.1 We made two datasets: one for training and another for testing. Centers of spherical head 1Given the sensor activations and a dipole location, the minimum error dipole moment can be calculated analytically (H¨am¨al¨ainen et al., 1993). Therefore, although the dipoles used in generating the dataset had both location and moment, the moments were not included in the datasets used for training or testing. models in the training set were drawn from a ball of radius 3 cm centered 4 cm above the bottom of the training region,2 as shown in Figure 1. The dipoles in the training set were drawn uniformly from a spherical region centered at the corresponding center, with a radius of 7.5 cm, and truncated at the bottom. Their moments were drawn uniformly from vectors of strength ≤200 nAm. The corresponding sensor activations were calculated by adding the results of a forward model and a noise model. To check the performance of the network during training, a test set was generated in the same fashion as the training set. We used the sensor geometry of a 4D Neuroimaging Neuromag-122 whole-head gradiometer (Ahonen et al., 1993) and a standard analytic model of quasistatic electromagnetic propagation in a spherical head (Jun et al., 2002). This work could be easily extended to a more realistic head model. In that case the integral equations are solved by the boundary element method (BEM) or the finite element method (FEM) numerically (H¨am¨al¨ainen et al., 1993). The human skull phantom study in Leahy et al. (1998) shows that the fitted spherical head model for MEG localization is slightly inferior in accuracy to the realistic head model numerically calculated by BEM. In forward calculation, a spherical head model has some advantages: it is more easily implemented and is much faster. Despite its inferiority in terms of localization accuracy, we use a spherical head model in this work. In order to properly compare the performance of various localizers, we need a dataset for which we know the ground truth, but which contains the sorts of noise encountered in actual MEG recordings. To this end, we measured real brain noise and used it to additively contaminate synthetic sensor readings (Jun et al., 2002). This noise was taken, unaveraged, from MEG recordings during periods in which the brain region of interest in the experiment was quiescent, and therefore included all sources of noise present in actual data: brain noise, external noise, sensor noise, etc. This had a RMS (square root of mean square) magnitude of roughly P n = 50–200 fT/cm, where we measure the SNR of a dataset using the ratios of the powers in the signal and noise, SNR (in dB) = 20 log10 P s/P n, where P s and P n are the RMS sensor readings from the dipole and noise, respectively. The datasets used for training and testing were made by adding the noise to synthetic sensor activations generated by the forward model, and exemplars whose resulting SNR was below −4 dB were rejected. The MLP charged with approximating the inverse mapping had an input layer of 125 units consisting of the three Cartesian coordinate of the center of the sphere fitted to the head, and the 122 sensor activations. It had two hidden layers with 320 and 30 units respectively, and an output layer of three units representing the Cartesian coordinates of the fitted dipole. The output units had linear activation functions, while the hidden unit had hyperbolic tangent activation functions. Adjacent layers were fully connected, with no cut-through connections. The 122 sensor activation inputs were scaled to an RMS value of 0.5, and the target outputs were scaled into [−1, +1]. The network weights were initialized with uniformly distributed random values between ±0.1, and online stochastic gradient decent with no momentum and an empirically chosen constant of proportionality was used for optimization. 2Fitted spheres from twelve subjects performing various tasks on a 4D Neuroimaging Neuromag122 MEG system were collected, and this distribution of head positions was chosen to include all twelve cases. Just as the position of the center of the head varies from session to session and subject to subject, so does head orientation and radius. Because a sphere is rotationally symmetric, our forward model is insensitive to orientation, and similarly the external magnetic field caused by a dipole in a homogeneous sphere is invariant to the sphere’s radius. On the other hand, the noise process would not be invariant to orientation or radius, so we might expect a slight increase in performance if the network had orientation and radius available as inputs, rather than just the position of the center. −15 −10 −5 0 5 10 15 −6 −4 −2 0 2 4 6 8 10 12 14 1.78 0.9 0.85 0.85 0.79 1.07 1.08 0.6 0.59 0.58 0.58 0.7 0.81 Top Right Left −15 −10 −5 0 5 10 15 −6 −4 −2 0 2 4 6 8 10 12 14 1.71 1.52 1.04 0.87 0.89 1.1 2.42 1.37 0.82 0.92 0.81 0.92 1.67 Top Front Back Figure 2: Mean localization errors of the trained MLP as a function of correct dipole location, binned into regions. All units are in cm. Left: Coronal cross section. Right: Sagittal cross section. 3 Results and discussion 3.1 Training and localization results Datasets of 100,000 (training) and 25,000 fixed−4−start−LM MLP MLP−start−LM optimal−start−LM 0 0.5 1 1.5 2 2.5 0 5 10 15 Mean Localization Error (cm) S/N (dB) Figure 3: Mean localization error vs. SNR. MLP, MLP-start-LM, and optimal-start-LM were tested on signals from 25,000 random dipoles, contaminated by real brain noise. (testing) patterns, all contaminated by real brain noise, were constructed. As is typical, the incremental gains per epoch decrease exponentially with training. From the training curves (not shown) it is evident that additional training would have further decreased the error, but we nonetheless stopped after 1000 epochs, which took about three days on 2.8 GHz Intel Xeon CPU. We investigated localization error distributions over various regions of interest. We considered two cross sections (coronal and sagittal views) with width of 2 cm, and each of these was divided into 19 regions, as shown in Figure 2. We extracted the noisy signals and the corresponding dipoles from testing datasets. For each region 49–500 patterns were collected. A dipole localization was performed using the trained MLP, and the average localization error for each region was calculated. Figure 2 shows the localization error distribution over two cross sections. In general, dipoles closer to the sensor surface were better localized. We compared various automatic localization methods, most of which consist of LM used in different ways: • MLP-start-LM LM was started with the trained MLP’s output. • fixed-4-start-LM LM was tuned for good performance using restarts at the four fixed initial points (0, 0, 6), (−5, 2, −1), (5, 2, −1), and (0, −5, −1), in units of cm relative to the center of the spherical head model. The best result among four results was chosen. Table 1: Comparison of performance on real brain noise test set of Levenberg-Marquardt source localizers with three LM restarts strategies, the trained MLP, and a hybrid system. Each number is an average over 25,000 localizations, so the error bars are negligible. Algorithm Computation time (ms) Localization error (cm) fixed-4-start-LM 120 0.83 random-20-start-LM 663 0.54 optimal-start-LM 14 0.49 MLP 0.7 0.90 MLP-start-LM 15 0.53 • random-n-start-LM LM was restarted with n random (uniformly distributed) points within the spherical head model. We checked how many restarts were needed to match the accuracy of the MLP-start-LM, yielding n = 20, which is the same as in Jun et al. (2002). • optimal-start-LM LM was started with the known exact dipole source location. Figure 3 shows the localization performance as a function of SNR for fixed-4-start-LM, optimal-start-LM, the trained MLP, and MLP-start-LM. Optimal-start-LM shows the best localization performance across the whole range of SNRs, but the hybrid system shows almost the same performance as optimal-start-LM except at very high SNRs, while the trained MLP is more robust to noise than fixed-4-start-LM. In this experiment, most of the sources with very high SNR were superficial, located around the upper neck or back of the head. These sorts of sources are often very hard to localize well, as it is easy to become trapped in a local minimum (Jun et al., 2002). It is expected that, under these conditions, a better initial guess than the MLP output (which are 0.7 cm on average from the exact source) would be required to obtain near-optimal performance from LM. A grand summary, averaged across various SNR conditions, is shown in Table 1. The trained MLP is fastest, and its hybrid system is about 40× faster than random-20-start-LM, while the hybrid system is about 9× faster, yet more accurate than, fixed-4-start-LM. This means that MLP-start-LM was about two times faster than might be naively expected. 3.2 Localization on real MEG signals and comparison with commercial software The sensors in MEG systems have poor signal-to-noise ratios (SNRs) for single-trial data, since MEG data is strongly contaminated by various noises. Blind source separation of MEG data segregates noise from signal (Vig´ario et al., 2000; Tang et al., 2000a; Sander et al., 2002), raising the SNR sufficiently to allow single-trial analysis (Tang et al., 2000b). Even though the sensor attenuation vectors of the BSS-separated components can be well localized to equivalent current dipoles (Vig´ario et al., 2000; Tang et al., 2002), the recovered field maps can be quite noisy. We applied the MLP and MLP-start-LM to localize single dipolar sources from various actual BSS-separated MEG signals.3 The xfit program 3Continuous 300 Hz MEG data for four right-handed subjects was collected using a cognitive protocol developed by Michael P. Weisend, band-pass filtered at 0.03–100 Hz, separated using second order blind identification algorithm (SOBI), and scanned for neuronal sources of interest. The following four visual reaction time tasks were performed by each subject: stimulus pre-exposure task, trump card task, elemental discrimination task, and transverse patterning task. For each subject, all four experiments were performed on the same day, but each in a separate session. Subjects were permitted to move their heads between experiments. MLP−start−LM MLP xfit PV SV −15 −10 −5 0 5 10 15 −15 −10 −5 0 5 10 15 MLP−start−LM MLP xfit SV PV −10 −5 0 5 10 15 20 −15 −10 −5 0 5 10 15 MLP−start−LM MLP xfit SV PV −10 −5 0 5 10 15 20 −15 −10 −5 0 5 10 15 Figure 4: Dipole source localization results of Neuromag software (xfit), our MLP, MLPstart-LM for four BSS-separated primary visual and four secondary visual MEG signal components of S01, over four sorts of tasks. PV and SVdenote primary visual source and secondary visual source, respectively. Left: Axial view. Center: Coronal view. Right: Sagittal view. The outer surface denotes the sensor surface, and diamonds on this surface denote sensors. The inner surface denotes a spherical head model fit to the subject. (standard commercial software bundled with the 4D Neuroimaging Neuromag-122 MEG system) is compared with the methods developed here. A field map of each component was scaled to an RMS of 0.5 and inputed to the trained MLP. Their MLP’s outputs were scaled back to their dipole location vectors and were used for initializing LM. Figure 4 shows the dipole locations estimated by the MLP, MLP-startLM, and Neuromag’s xfit software, for two sorts of sensory sources: primary visual sources and secondary visual sources, respectively, over four tasks in subject S01. In Figure 5, the estimated dipole locations are shown for somatosensory sources over three different subjects. Each figure consists of three viewpoints: axial (x-y plane), coronal (x-z plane), and sagittal (y-z plane). The center of a fitted spherical head model (S01: trump card task) is (0.335, 0.698, 3.157). All units are in cm. All dipole locations estimated by the MLP and MLP-start-LM are clustered within about 3 cm, and about 0.7 cm, of xfit’s results, respectively. We see that the primary visual sources are more consistently localized, across all four tasks, than the secondary visual sources. The secondary sources also had more variable stimulus-locked average time courses (Tang and Pearlmutter, 2003). It is noticeable that somatosensory sources on the right hemisphere are localized poorly by the MLP, but well localized by the hybrid method. Even though the auditory sources are the weakest (not shown here), i.e. have the lowest SNRs, they are reasonably well localized. While the MLP-estimated location is about 1.16 cm (|dx| ≈0.90, |dy| ≈0.57, |dz| ≈ 0.46) on average (N = 14) from those of xfit, the hybrid method’s result is about 0.35 cm (|dx| ≈0.20, |dy| ≈0.22, |dz| ≈0.10) from xfit’s estimated location. Considering that xfit had extra information, namely the identity of a subset of the sensors to use, this hybrid method result is believed to be almost as good as the xfit result. The trained MLP and the hybrid method are applicable to actual MEG signals, and seem to offer comparable and perhaps superior localization relative to xfit, with clear advantages in both speed and in the lack of required human interaction or subjective human input. SOBI was performed on continuous 122-channel data collected during the entire period of the experiment. It generated 122 components, each a one-dimensional time series with an associated field map. Event triggered averages were calculated from their continuous single-trial time series for all 122 separated components. A dipole fitting method was applied to the identified neural components. The input to the dipole fitting algorithm of xfit was the field map and the output was the location of ECDs. From all separated components for four subjects and four sorts of tasks taken as in Tang et al. (2002). only fourteen components were localized and compared. For further experimental details and a detailed SOBI algorithm, see Tang et al. (2002). MLP−start−LM MLP xfit y x −15 −10 −5 0 5 10 15 −15 −10 −5 0 5 10 15 MLP−start−LM MLP xfit z x −10 −5 0 5 10 15 20 −15 −10 −5 0 5 10 15 MLP−start−LM xfit MLP y z −10 −5 0 5 10 15 20 −15 −10 −5 0 5 10 15 Figure 5: Dipole source localization results of Neuromag software (xfit), our MLP, MLPstart-LM for three real BSS-separated somatosensory MEG signal components from the transverse patterning task over three different subjects (S01, S02, S03). Even the center of a fitted spherical head model is varied over three subjects, the only fitted sphere of subject S01 transverse patterning task, centered at (0.373, 0.642, 3.205), is depicted. Left: Axial view. Center: Coronal view. Right: Sagittal view. The outer surface denotes the sensor surface, and diamonds on this surface denote sensors. The inner surface denotes a spherical head model fit to the subject. 4 Conclusion We propose the inclusion of a head position input for MLP-based MEG dipole localizers. This overcomes the limitation of previous MLP-based MEG localization systems, namely the need to retrain the network for each session or subject. Experiments showed that the trained MLP was far faster, albeit slightly less accurate, than fixed-4-start-LM. This motivated us to construct a hybrid system, MLP-start-LM, which improves the localization accuracy while reducing the computational burden to less than one ninth than that of fixed4-start-LM. This hybrid method was comparable in accuracy to random-20-start-LM, at 1/40-th the computation burden, which is about two times faster than might be naively expected. Over the whole range of SNRs, the hybrid system showed almost as good performance in accuracy and computation time as the hypothetical optimal-start-LM. We applied the MLP and MLP-start-LM to localize single dipolar sources from actual BSSseparated MEG signals, and compared these with the results of the commercial Neuromag program xfit. The MLP yielded dipole locations close to those of xfit, and MLP-start-LM gave locations that were even closer to those of xfit. In conclusion, our MLP can itself serve as a reasonably accurate real-time MEG dipole localizer, even when the head position changes regularly. This MLP also constitutes an excellent dipole guessor for LM. Because this MLP receives a head position input, the need to retrain for various subjects or sessions has been eliminated without sacrificing the many advantages of the universal approximator direct inverse approach to localization. Acknowledgements This work was supported by NSF CAREER award 97-02-311, the Mental Illness and Neuroscience Discovery Institute, a gift from the NEC Research Institute, NIH grant 2 R01 EB000310-05, and Science Foundation Ireland grant 00/PI.1/C067. We would like to thank Guido Nolte for help with the forward model, Michael Weisend for allowing us to use his data, and Michael Weisend, Akaysha Tang, and Natalie Malaszenko for providing experimental details. References Abeyratne, U. R., Kinouchi, Y., Oki, H., Okada, J., Shichijo, F., and Matsumoto, K. (1991). Artificial neural networks for source localization in the human brain. Brain Topography, 4:3–21. Ahonen, A. I., H¨am¨al¨ainen, M. S., Knuutila, J. E. T., Kajola, M. J., Laine, P. P., Lounasmaa, O. V., Parkkonen, L. T., Simola, J. T., and Tesche, C. D. (1993). 122-channel SQUID instrument for investigating the magnetic signals from the human brain. Physica Scripta, T49:198–205. H¨am¨al¨ainen, M., Hari, R., Ilmoniemi, R. J., Knuutila, J., and Lounasmaa, O. V. (1993). Magnetoencephalography—theory, instrumentation, and applications to noninvasive studies of the working human brain. Rev. Modern Physics, 65:413–497. Hoey, G. V., Clercq, J. D., Vanrumste, B., de Walle, R. V., Lemahieu, I., D’Hav´e, M., and Boon, P. (2000). EEG dipole source localization using artificial neural networks. Phys. Med. Biol., 45:997–1011. Jun, S. C., Pearlmutter, B. A., and Nolte, G. (2002). Fast accurate MEG source localization using a multilayer perceptron trained with real brain noise. Physics in Medicine and Biology, 47(14):2547–2560. Jun, S. C., Pearlmutter, B. A., and Nolte, G. (2003). MEG source localization using a MLP with a distributed output representation. IEEE Transactions on Biomedical Engineering, 50(6):786–789. Kinouchi, Y., Ohara, G., Nagashino, H., Soga, T., Shichijo, F., and Matsumoto, K. (1996). Dipole source localization of MEG by BP neural networks. Brain Topography, 8:317– 321. Kwon, H., Lee, Y. H., Kim, J. M., Park, Y. K., and Kuriki, S. (2002). Localization accuracy of single current dipoles from tangential components of auditory evoked fields. Phys. Med. Biol., 47:4145–4154. Leahy, R. M., Mosher, J. C., Spencer, M. E., Huang, M. X., and Lewine, J. D. (1998). A study of dipole localization accuracy for MEG and EEG using a human skull phantom. Electroencephalography and clinical neurophysiology, 107(2):159–173. Press, W. H., Flannery, B. P., Teukolsky, S. A., and Verrerling, W. T. (1988). Numerical Recipes in C. Cambridge University Press. Rumelhart, D. E., Hinton, G. E., and Williams, R. J. (1986). Learning representations by back–propagating errors. Nature, 323:533–536. Sander, T. H., W¨ubbeler, G., Lueschow, A., Curio, G., and Trahms, L. (2002). Cardiac artifact subspace identification and elimination in cognitive MEG data using time-delayed decorrelation. IEEE Transactions on Biomedical Engineering, 49:345–354. Tang, A. C. and Pearlmutter, B. A. (2003). Independent components of magnetoencephalography: Localization and single-trial response onset detection. In Lu, Z.-L. and Kaufman, L., editors, Magnetic Source Imaging of the Human Brain, pages 159–201. Lawrence Erlbaum Associates. Tang, A. C., Pearlmutter, B. A., Malaszenko, N. A., Phung, D. B., and Reeb, B. C. (2002). Independent components of magnetoencephalography: Localization. Neural Computation, 14(8):1827–1858. Tang, A. C., Pearlmutter, B. A., Zibulevsky, M., and Carter, S. A. (2000a). Blind separation of multichannel neuromagnetic responses. Neurocomputing, 32–33:1115–1120. Tang, A. C., Pearlmutter, B. A., Zibulevsky, M., Hely, T. A., and Weisend, M. P. (2000b). An MEG study of response latency and variability in the human visual system during a visual-motor integration task. In Advances in Neural Information Processing Systems 12, pages 185–191. MIT Press. Vig´ario, R., S¨arel¨a, J., Jousm¨aki, V., H¨am¨al¨ainen, M., and Oja, E. (2000). Independent component approach to the analysis of EEG and MEG recordings. IEEE Transactions on Biomedical Engineering, 47(5):589–593.
2003
153
2,369
Image Reconstruction by Linear Programming Koji Tsuda∗†and Gunnar R¨atsch∗‡ ∗Max Planck Institute for Biological Cybernetics Spemannstr. 38, 72076 T¨ubingen, Germany †AIST CBRC, 2-43 Aomi, Koto-ku, Tokyo, 135-0064, Japan ‡Fraunhofer FIRST, Kekul´estr. 7, 12489 Berlin, Germany {koji.tsuda,gunnar.raetsch}@tuebingen.mpg.de Abstract A common way of image denoising is to project a noisy image to the subspace of admissible images made for instance by PCA. However, a major drawback of this method is that all pixels are updated by the projection, even when only a few pixels are corrupted by noise or occlusion. We propose a new method to identify the noisy pixels by ℓ1-norm penalization and update the identified pixels only. The identification and updating of noisy pixels are formulated as one linear program which can be solved efficiently. Especially, one can apply the ν-trick to directly specify the fraction of pixels to be reconstructed. Moreover, we extend the linear program to be able to exploit prior knowledge that occlusions often appear in contiguous blocks (e.g. sunglasses on faces). The basic idea is to penalize boundary points and interior points of the occluded area differently. We are able to show the ν-property also for this extended LP leading a method which is easy to use. Experimental results impressively demonstrate the power of our approach. 1 Introduction Image denoising is an important subfield of computer vision, which has extensively been studied (e.g. [2, 6, 1, 9]). The aim of image denoising is to restore the image corrupted by noise as close as possible to the original one. When one does not have any prior knowledge about the distribution of images, the image is often denoised by simple smoothing (e.g. [2, 1]). When one has a set of template images, it is preferable to project the noisy image to the linear manifold made by PCA, which is schematically illustrated in Fig. 1 (left). One can also construct a nonlinear manifold, for instance by kernel PCA, requiring additional computational costs [6]. The projection amounts to finding the closest point in the manifold according to some distance. Instead of using the standard Euclidean distance (i.e. the least squares projection), one can adopt a robust loss such as Huber’s loss as the distance, which often gives a better result (robust projection [9]). However, a major drawback of these projection approaches is that all pixels are updated by the projection. However, typically only a few pixels are corrupted by noise, thus non-noise pixels should best be left untouched. This paper proposes a new denoising approach by linear programming, where the ℓ1-norm regularizer is adopted for automatic identification of noisy pixels – only these are updated. The identification and updating of noisy pixels are neatly formulated as one linear program. The theoretical advantages of linear programming lie in duality and optimality conditions. By considering both primal and dual problems at the same time, one can construct effective and highly principled optimizers such as interior point methods. Also, the optimality conLeast Squares Projection Robust projection Off-manifold Solution On-Manifold Solution ||α|| <C 1 Figure 1: Difference between projection methods (left) and our LP method (right). ditions enables us to predict important properties of the optimal solution before we actually solve it. In particular, we can explicitly specify the fraction of noisy pixels by means of the ν-trick originally developed for SVMs [8] which was later applied to Boosting [7]. In some cases the noisy pixels are not scattered over the image (“impulse noise”), but form a considerably large connected region (“block noise”), e.g. face images occluded by sunglasses. By using the prior knowledge that the noisy pixels form blocks, we should be able to improve the denoising performance. Several ad-hoc methods have been proposed so far (e.g. [9]), but we obviously need a more systematic way. We will show that a very simple modification of the linear program has the effect that we can control how blockshape like the identified and reconstructed region is. In the experimental section we will show impressive results on face images from the MPI face data base corrupted by impulse and block noises. 2 Image Denoising by Linear Programming Let {tj}J j=1 be the set of vectors in ℜN, which have been derived for instance by principal component analysis. The linear manifold of admissible images is described as T =  t | t = J j=1 βjtj, βj ∈ℜ  Now we would like to denoise a noisy image x ∈ℜN. Let us describe the denoised image as ¯x. In order that the denoised image ¯x is similar to admissible images, ¯x should be close to the manifold: min β d1  ¯x, J j=1 βjtj  ≤ϵ1, (1) where d1 is a distance between two images. Also, we have to constrain x to be close to ¯x, otherwise the denoised image becomes completely independent from the original image: d2(¯x, x) ≤ϵ2, (2) where d2 is another distance. A number of denoising methods can be produced by choosing different distances and changing how to minimize the two competing objectives (1) and (2). In projection methods, ϵ1 is simply set to zero and ϵ2 is minimized with d2 being set to the Euclidean distance or a robust loss. A Linear Programming Formulation Our wish is that most pixels of x stay unchanged in ¯x, in other words, the difference vector α = ¯x −x should be sparse. For this purpose, d2 is chosen as the ℓ1-norm, as it is well known that the ℓ1-norm constraints produce sparse solutions (e.g. [7]). Also for d1, the ℓ∞-norm is especially interesting as it leads to linear programming. We design the optimization problem as follows: min α,β x + α − J j=1 βjtj  ∞ (3) ∥α∥1 ≤C, (4) where ∥x∥∞= maxi |xi|, ∥α∥1 = N i=1 |αi| and C is a constant to determine the sparseness, i.e. the solution α tends to become more sparse as C decreases. Geometrically, this optimization problem is explained as Fig. 1 (right). The constraint (4) keeps ¯x within the ℓ1-sphere centered on x. The optimization finds a point in the sphere, which is closest to the linear manifold. As a side effect, we have another solution  j βjtj on the manifold. We call the former the “off-manifold solution” and the latter “on-manifold solution”. Here, we are mainly concerned with the off-manifold solution, because of the sparsity. Let us actually formulate (3) as a linear programming problem. It is equivalent to min α,β,ϵ 1 N N n=1 |αn| + νϵ (5) xn + αn − J j=1 βjtjn  ≤ϵ, n = 1, . . . , N, where ν is a regularization parameter. Still this problem is not linear programming because of |αn| in the objective function. Next let us restate α as follows: α = α+ −α−, α+ n , α− n ≥0, n = 1, . . . , N. Then (5) is rewritten as the following linear programming problem: min α±,β,ϵ 1 N N n=1(α+ n + α− n ) + νϵ (6) α+ n , α− n ≥0, xn + α+ n −α− n − J j=1 βjtjn  ≤ϵ, n = 1, . . . , N. (7) Here we used the well known fact that either α+ n or α− n is zero at the optimum. The ν-Trick In the above optimization problem, the regularization constant ν should be determined to control the fraction of updated pixels. Interestingly, ν has an intuitive meaning as follows: Let Np denote the number of nonzero elements in α. Furthermore let Nc be the number of “crucial pixels” which are not updated, but the corresponding constraint constraints (7) are met as equalities. If one of these pixels is modified, then it will likely lead to a different solution, while changing any of the other N −N p −Nc pixels locally does not change the optimal solution. Proposition 1. Suppose the optimal ϵ is greater than 0. Then the number of nonzero elements Np in the optimal α is 1. upper bounded by νN, i.e. Np ≤νN and 2. lower bounded by νN −Nc, i.e. Np ≥νN −Nc. The proof is a special case of the one of Proposition 2 and is omitted. The slack in the bound only comes from Nc. In practice we usually observed small values of Nc. We suspect that its value is related to J – the number of basis vectors. In terms of images, one can bound the anticipated fraction of noise pixels by ν. In contrast, the constant C in (4) specifies the sum of noise magnitudes, which is in practice rather difficult to figure out. 3 Dealing with Block Noises Preliminaries When noises are clustered as blocks, this prior knowledge is considered to lead to an increased denoising performance. So far we could only control the number of modified pixels which corresponds to the area of reconstruction. In this section we also consider the length of the boundary of the identified pixels. For instance, consider the three occlusion patterns in Figure 2. The pixel is white, when it is identified as noisy/occluded and black otherwise. In the first case (left) the occlusion forms a block, in the second case the letters “lp” and in the third case the pixels are randomly distributed. The covered area is the same for all three cases. S−= 130, S+ = 256 S−= 280, S+ = 552 S−= 1987, S+ = 2725 10 20 30 40 50 60 5 10 15 20 25 30 35 40 45 50 55 10 20 30 40 50 60 5 10 15 20 25 30 35 40 45 50 55 10 20 30 40 50 60 5 10 15 20 25 30 35 40 45 50 55 Figure 2: Three occlusion patterns with different degrees of having a block shape. We will now define two measures of how much an occlusion pattern mismatches the block shape. It is related to the length of the boundary. Note that optimal “block” shapes have shortest boundaries. (It depends on the metric what will be optimal.) We distinguish between two types of penalties: first, the ones which occur when a reconstructed pixel is a neighbor of an untouched pixel (“boundary point”) and second, if a reconstructed pixel is neighbor of another such pixel, but the corrections are in different directions (“inversion point”). We have two definitions for our scores, which we will later relate to the solution of our extended linear program. The differences between the two scores S−and S+ are only in subtle details in how to count boundary points and inversion points: • Let N − b be the number of pixels n which satisfy: (a) αn = 0 and there exists m ∈G(n) such that αm ̸= 0 (outer boundary point) or (b) αn ̸= 0 and for all m ∈G(n) holds αm = 0 (single pixel change). Let N − i be the number of pixels n with αnαm < 0 for at least one m ∈G(n) and αnαm ≤0 for all m ∈G(n) (single inversion point). The first score is computed as S −:= N − b + 2N − i . • Let N + b be the number of pixels n which satisfy: (a) αn = 0 and there exists m ∈G(n) such that αm ̸= 0 (outer boundary point) or (b) αn ̸= 0 and there exists m ∈G(n) with αm = 0 (inner boundary point). Let N + i be the number of pixels n with αnαm < 0 for at least one m ∈G(n) (inversion point). Then the second score is computed as S + := N + b + 2N + i . The main difference between the two scores is that S + counts the length of the inner and outer boundary, while S −only counts the outer boundary. The Extended LP The question is how we can introduce these definitions into a linear program, which somehow penalizes these scores. As we will show in the following proposition, it turns out that it is enough to penalize the differences between neighboring α’s. We introduce a new set of variables (the γ’s) which account for these differences and which are linearly penalized. We control the contribution of the γ’s with the one of the α’s by introducing a new parameter λ ∈(0, 1) – if λ = 0, then the original LP is recovered: min γ≥0,α,ϵ≥0,β λ N N n=1 γn + 1 −λ N N n=1 |αn| + νϵ (8) xn + αn − J j=1 βjtj,n  ≤ϵ for all n = 1, . . . , N |αn −αm| ≤γn for all m ∈G(n) We will show in the experimental part that these novel constraints lead to substantial improvements for block noises. The analysis of this linear program is considerably more difficult than of the previous one. However, we will show that the ν-trick still works in a generalized manner with some subtleties. We will show in the following Proposition that LP (8) trades-off the area Np with the penalty scores S−and S+: Proposition 2. Let Nc the number of crucial pixels and Np the number of updated pixels (as before). Assume the optimal ϵ is greater 0. Then holds: 1. The λ-weighted average between area of the occlusion and score S −is not greater than νN, i.e. (1 −λ)Np + λS−≤νN (9) 2. If λ < 1 2+|G|, then the λ-weighted average between area of the occlusion and score S+ is not smaller than νN minus 2Nc, i.e. (1 −λ)Np + λS+ > νN −2Nc, (10) where |G| := maxn |G(n)| Note that the slackness in (10) again only comes from the number of crucial points Nc. The restriction λ < 1 2+|G| only concerns the second part and and not the functioning of the LP in practice. It can be made less restrictive, but this goes beyond the scope of this paper. Due to space limitations we have to omit the proof. It is found in a technical report, which can be downloaded from http://www.kyb.tuebingen.mpg.de/publications/pdfs/pdf2420.pdf. 4 Denoising by QP and Robust Statistics A characteristic of the LP method is that the ℓ∞-norm is used as d1. But other choices are of course possible. For example, when the squared loss is adopted as d 1, the optimization problem (3) is rewritten as min α,β 1 N N n=1  xn + αn − J j=1 βjtjn 2 + ν|αn|. (11) This is a quadratic program (QP), which can also be solved by standard algorithms. In our experience, QP takes longer time to solve than LP and the denoising performance is more or less the same. Furthermore the ν-trick does not hold for QP. Nevertheless, it is interesting to take a close look at the QP method as it is more related to existing robust statistical approaches [2, 9]. The QP can partially be solved analytically with respect to α: min β N n=1 ρ  xn − J j=1 βjtjn  , (12) where ρ is the Huber’s loss ρ(t) = t2 N −Nν 2 ≤t ≤Nν 2 |t| −Nν2 4 otherwise. Thus, the on-manifold solution of (11) corresponds to the robust projection by the Huber’s loss. In other words, α is considered as a set of slack variables in the robust projection. It is worthwhile to notice another choice of slack variables proposed in [2]: min z,β 1 2γ N n=1 zn  xn − J j=1 βjtjn 2 + γ 1 2zn . (13) 0 ≤zn ≤1, n = 1, . . . , N. Here the slack variables are denoted as z, which is called the outlier process [2]. Notice γ is a regularization constant. Let us define gn = xn −J j=1 βjtjn. Then the inside problem with respect to zn can be analytically solved, and we have the reduced problem as min β N n=1 hγ  xn − J j=1 βjtjn  (14) where hγ(t) is again the Huber’s loss function: hγ(t) = t2 2γ + γ 2 if |t| < γ and |t| if |t| ≥γ. The outlier process tells one which pixels are ignored, but it does not directly represent the denoised image. From the viewpoint of denoising, our slack variables α seem to make more sense. 5 Experiments We applied our new methods and the standard methods to the MPI face database [3, 4]. This dataset has 200 face images (100 males and 100 females) and each image is rescaled to 44×64. The images are artificially corrupted by impulse and block noises. As impulse noises, 20% of the pixels are chosen randomly and set to 0. For block noises, a rectangular region (10% of the pixels) is set to zero to hide the eyes. We hide the same position for all images, but the position of the rectangle is not known to our algorithm. The task is to recover the original image based on the remaining 199 images (i.e. l.o.o. cross validation). Our linear program is compared against the least squares projection and the robust projection using Huber’s loss (i.e. the on-manifold solution of QP). One could also apply the non-convex robust losses for better robustness, e.g. Tukey’s biweight, Hampel, GemanMcClure, etc [2]. On the other hand, we could also use the non-convex regularizers which are “steeper” than the ℓ1-norm for greater sparsity [5]. However, we will not trade convexity with denoising performance here, because local minima often put practitioners into trouble. As a reference, we also consider an idealistic denoising method, to which we give the true position of noises. Here, the pixel values of noisy positions are estimated by the least squares projection only with respect to the non-noise pixels. Then, the estimated pixel values are plugged back into the original image. The linear manifold is made by PCA from the remaining 199 images. The number of principal components is determined such that the idealistic method performs the best. For impulse and block noise images, it turned out to be 110 and 30, respectively. The reconstruction errors of LP and QP for impulse noises are shown in Fig. 4. Here, the reconstruction error is measured by the ℓ2-norm between the images. Also an example of denoising is shown in Fig. 3. Both in LP and QP, the off-manifold solution outperforms a: original image b:noisy image c: least squares proj. (702) d: Off−Manifold ν=0.4 (454) Figure 3: A typical result of denoising impulse noise. (a) An original face image. (b) The image corrupted by impulse noise. (c) Reconstruction by the least squares projection to the PCA basis. The number in (·) shows the reconstruction error. (d) Reconstruction by the LP (off-m.) when ν = 0.4. the on-manifold one, which confirms our intuition that it is effective to keep most pixels unchanged. Compared with the least squares projection, the difference is so large that one can easily see it in the reconstructed images (Fig. 3). Notably, the off-manifold solutions of LP and QP (cf. the solid curves in Fig. 4, left and right) performed significantly better than the on-manifold solution of QP, which corresponds to the robust projection using Huber’s loss (cf. the dashed curve in Fig. 4 right). 0.2 0.3 0.4 0.5 0.6 0.7 0.8 0.9 300 400 500 600 700 800 ν LP -2 -1.8 -1.6 -1.4 -1.2 -1 -0.8 -0.6 -0.4 -0.2 300 400 500 600 700 800 ν log10 QP Figure 4: Reconstruction errors of LP and QP methods for impulse noise. The solid and dashed lines corresponds to the off-manifold and on-manifold solutions. The flat lines correspond to the least squares projection and the unrealistic setting where the correct positions of noises are given. LP (λ = 0) LP (ν = 0.5) 0 0.2 0.4 0.6 0.8 1 0 500 1000 1500 2000 2500 parameter ν PCA PCA with known area on-manifold LP off-manifold LP average reconstruction error 0 0.2 0.4 0.6 0.8 1 400 600 800 1000 1200 1400 1600 parameter λ PCA PCA with known area on-manifold solution off-manifold solution average reconstruction error Figure 5: Reconstruction errors of the LP method for block noises. (Left) the reconstruction error of the “plain” LP, where the block constraints are not taken into account (λ = 0). The right plot shows the improvement for increased λ and fixed ν = 1/2. 0 0.2 0.4 0.6 0 0.1 0.2 0.3 0.4 0.5 ν lower bound (11) upper bound (10) ν Figure 6: Illustration of Prop. 2: For λ = 0.15 we compute the lower and upper bound of νN for different ν’s. The results for block noises are shown in Fig. 5, where we again averaged over the 200 faces (using l.o.o. cross validation for the construction of the PCA basis). In the left figure, we measure the reconstruction error for various ν’s with fixed λ = 0, i.e. the block constraints are not taken into account. As in the case with impulse noise, the error is smaller than that of the least squares regression (PCA projection), and the minimum is attained around ν = 1/2. Moreover, we investigated how the error is further reduced by increasing λ from 0. As shown in the right figure, we obtain a significant improvement. Actually, there is not much room for improvements, since even the idealistic case where the position of the occlusion is know is not much better. An example of reconstructed images are shown in Fig. 7. Here we have shown variables α and γ as well. When λ = 0, nonzero α’s appear not only in occluded part but also for instance along the face edge (Fig. 7:e). When λ = 1/2, nonzero α’s are more concentrated in the occluded part, because the block constraints suppress a isolated nonzero values (Fig. 7:h). In Fig. 7:i, one can see high γ’s in the edge pixels of occluded region, which indicates that the block constraints are active for those pixels. Finally we empirically verify Proposition 2. In Fig. 6 we plot the lower and upper bound of ν as given in Proposition 2 for different values of ν. Observe that the difference between lower and upper bound is quite small. 6 Concluding Remarks In summary, we have presented a new image denoising method based on linear programming. Our main idea is to introduce sparsity by detaching the solution slightly from the manifold. The on-manifold solution of our method is related to existing robust statistical approaches. Remarkably, our method can deal with block noises while retaining the convexity of the optimization problem (every linear program is convex). Existing approaches (e.g. [9]) tend to rely on non-convex optimization to include the prior knowledge that the noises form blocks. Perhaps surprisingly, our convex approach can solve this problem to a great extent. We are looking forward to apply the linear programming to other computer vision problems which involve combinatorial optimization, e.g. image segmentation. Also, it is interesting to explore the limitations of convex optimization, since – naturally – convex optimization cannot solve every problem. Nevertheless, according to our experience in this work, we feel that the power of convex optimization is not fully exploited. Acknowledgment The authors gratefully acknowledge A. Graf for preparing the face image dataset. We would like to thank B. Sch¨olkopf, J. Weston, T. Takahashi, T. Kurita, S. Akaho and Chan-Kyoo Park for fruitful discussions. a: original image b: noisy image c: least squares proj. (1512) d: Off Manifold λ=0 (1106) e: α [λ=0] f: Off Manifold λ=0.5 (654) g: On Manifold λ=0.5 (708) h: α [λ=0.5] i: γ [λ=0.5] Figure 7: A typical result of denoising block noises (ν = 0.5). The numbers in (·) in (c),(d),(f),(g) show the reconstruction errors. The image (d) shows the denoising result when the block constraints are not taken into account (λ = 0, ν = 1/2). This result improves by imposing the block constraints (λ = 1/2, ν = 1/4) as shown in (f) and (g), which are the off and on-manifold solutions, respectively. The images (e),(h) and (i) show the parameter values obtained as the result of linear programming (see the text for details). References [1] A. Ben Hamza and H. Krim. Image denoising: A nonlinear robust statistical approach. IEEE Trans. Signal Processing, 49(12):3045–3054, 2001. [2] M.J. Black and A. Rangarajan. On the unification of line processes, outlier rejection, and robust statistics with applications in early vision. International Journal of Computer Vision, 25(19):57–92, 1996. [3] V. Blanz and T. Vetter. A morphable model for the synthesis of 3D faces. In SIGGRAPH’99 Conference Proceedings, pages 187–194, 1999. [4] A.B.A. Graf and F.A. Wichmann. Gender classification of human faces. In H.H. B¨ulthoff, S.-W. Lee, T.A. Poggio, and C. Wallraven, editors, Biologically Motivated Computer Vision 2002, LNCS 2525, pages 491–501, 2002. [5] O.L. Mangasarian. Machine learning via polyhedral concave minimization. Technical Report 95-20, Computer Sciences Department, University of Wisconsin, 1995. [6] S. Mika, B. Sch¨olkopf, A.J. Smola, K.-R. M¨uller, M. Scholz, and G. R¨atsch. 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, 1999. [7] G. R¨atsch, B. Sch¨olkopf, A.J. Smola, S. Mika, T. Onoda, and K.-R. M¨uller. Robust ensemble learning. In A.J. Smola, P.L. Bartlett, B. Sch¨olkopf, and D. Schuurmans, editors, Advances in Large Margin Classifiers, pages 207–219. MIT Press, Cambridge, MA, 2000. [8] B. Sch¨olkopf, A. Smola, R.C. Williamson, and P.L. Bartlett. New support vector algorithms. Neural Computation, 12:1207 – 1245, 2000. also NeuroCOLT Technical Report NC-TR-1998-031. [9] T. Takahashi and T. Kurita. Robust de-noising by kernel PCA. In J.R. Dorronsoro, editor, Artificial Neural Networks – ICANN 2002, LNCS 2415, pages 727–732. Springer Verlag, 2002.
2003
154
2,370
Extreme Components Analysis Max Welling Department of Computer Science University of Toronto 10 King’s College Road Toronto, M5S 3G5 Canada welling@cs.toronto.edu Felix Agakov, Christopher K. I. Williams Institute for Adaptive and Neural Computation School of Informatics University of Edinburgh 5 Forrest Hill, Edinburgh EH1 2QL, UK {ckiw,felixa}@inf.ed.ac.uk Abstract Principal components analysis (PCA) is one of the most widely used techniques in machine learning and data mining. Minor components analysis (MCA) is less well known, but can also play an important role in the presence of constraints on the data distribution. In this paper we present a probabilistic model for “extreme components analysis” (XCA) which at the maximum likelihood solution extracts an optimal combination of principal and minor components. For a given number of components, the log-likelihood of the XCA model is guaranteed to be larger or equal than that of the probabilistic models for PCA and MCA. We describe an efficient algorithm to solve for the globally optimal solution. For log-convex spectra we prove that the solution consists of principal components only, while for log-concave spectra the solution consists of minor components. In general, the solution admits a combination of both. In experiments we explore the properties of XCA on some synthetic and real-world datasets. 1 Introduction The simplest and most widely employed technique to reduce the dimensionality of a data distribution is to linearly project it onto the subspace of highest variation (principal components analysis or PCA). This guarantees that the reconstruction error of the data, measured with L2-norm, is minimized. For some data distributions however, it is not the directions of large variation that are most distinctive, but the directions of very small variation, i.e. constrained directions. In this paper we argue that in reducing the dimensionality of the data, we may want to preserve these constrained directions alongside some of the directions of large variability. The proposed method, termed “extreme components analysis” or XCA, holds the middle ground between PCA and MCA (minor components analysis–the method that projects on directions of low variability). The objective that determines the optimal combination of principal and minor components derives from the probabilistic formulation of XCA, which neatly generalizes the probabilistic models for PCA and MCA. For a fixed number of components, the XCA model will always assign higher probability to the (training) data than PCA or MCA, and as such be more efficient in encoding the data. We propose a very simple and efficient algorithm to extract the optimal combination of principal and minor components and prove some results relating the shape of the log-spectrum to this solution. The XCA model is inspired by Hinton’s “product of experts” (PoE) model [1]. In a PoE, linear combinations of an input vector are penalized according to their negative logprobability and act as constraints. Thus, configurations of high probability have most of their constraints approximately satisfied. As we will see, the same is true for the XCA model which can therefore be considered as an under-complete product of Gaussians (PoG). 2 Variation vs. Constraint: PCA vs. MCA Consider a plane embedded in 3 dimensions that cuts through the origin. There are 2 distinct ways to mathematically describe points in that plane: x = Ay ∀y ∈R2, or ∀x ∈R3 s.t. wT x = 0 (1) where A is a 3×2 matrix, the columns of which form a basis in the plane, and w is a vector orthogonal to the plane. In the first description we parameterize the modes of variation, while in the second we parameterize the direction of no variation or the direction in which the points are constrained. Note that we only need 3 real parameters to describe a plane in terms of its constraint versus 6 parameters to describe it in terms of its modes of variation. More generally, if we want to describe a d-dimensional subspace in D dimensions we may use D −d constraint directions or d subspace directions. Next consider the stochastic version of the above problem: find an accurate description of an approximately d-dimensional data-cloud in D dimensions. The solution that probabilistic PCA (PPCA) [3, 4] provides is to model those d directions using unit vectors ai (organized as columns of a matrix A) while adding isotropic Gaussian noise in all directions, x = Ay + n y ∼N[0, Id] n ∼N[0, σ2 0ID] (2) The probability density of x is Gaussian with covariance CPCA = ⟨xxT ⟩= σ2 0ID + AAT . (3) In [4] it was shown that at the maximum likelihood solution the columns of A are given by the first d principal components of the data with length ||ai|| = p σ2 i −σ2 0 where σ2 i is the i′th largest eigenvalue of the sample covariance matrix and σ2 0 is equal to the average variance in the directions orthogonal to the hyperplane. Alternatively, one may describe the data as D −d approximately satisfied constraints, embedded in a high variance background model. The noisy version of the constraint wT x = 0 is given by z = wT x where z ∼N[0, 1]. The variance of the constrained direction, 1/||w||2, should be smaller than that of the background model. By multiplying D −d of these “Gaussian pancake” models [6] a probabilistic model for MCA results with inverse covariance given by, C−1 MCA = ID σ2 0 + W T W (4) where wT form the rows of W. It was shown that at the maximum likelihood solution the rows of W are given by the first D −d minor components of the data with length ||wi|| = p 1/σ2 i −1/σ2 0 where σ2 i is the i′th smallest eigenvalue of the sample covariance matrix and σ2 0 is equal to the average variance in the directions orthogonal to the hyperplane. Thus, while PPCA explicitly models the directions of large variability, PMCA explicitly models the directions of small variability. 3 Extreme Components Analysis (XCA) Probabilistic PCA can be interpreted as a low variance data cloud which has been stretched out in certain directions. Probabilistic MCA on the other hand can be thought of as a large variance data cloud which has been pushed inward in certain directions. Given the Gaussian assumption, the approximation that we make is due to the fact that we replace the variances in the remaining directions by their average. Intuitively, better approximations may be obtained by identifying the set of eigenvalues which, when averaged, induces the smallest error. The appropriate model, to be discussed below, will both have elongated and contracted directions in its equiprobable contours, resulting in a mix of principal and minor components. 3.1 A Probabilistic Model for XCA The problem can be approached by either starting at the PPCA or PMCA model. The restricting aspect of the PPCA model is that the noise n is added in all directions in input space. Since adding random variables always results in increased variance, the directions modelled by the vectors ai must necessarily have larger variance than the noise directions, resulting in principal components. In order to remove that constraint we need to add the noise only in the directions orthogonal to the ai’s. This leads to the following “causal generative model” model1 for XCA, x = Ay + P⊥ A n y ∼N[0, Id] n ∼N[0, σ2 0ID] (5) where P⊥ A = ID −A(AT A)−1AT is the projection operator on the orthogonal complement of the space spanned by the columns of A. The covariance of this model is found to be CXCA = σ2 0P⊥ A + AAT . (6) Approaching the problem starting at the PMCA model we start with d components {wi} (organized as rows in W) and add isotropic noise to the remaining directions, z1 = Wx z1 ∼N[0, Id] z2 = V x z2 ∼N[0, σ2 0I(D−d)] (7) where the rows of V form an orthonormal basis in the orthogonal complement of the space spanned by {wi}. Importantly, we will not impose any constraints on the norms of {wi} or σ0, i.e. the components are allowed to model directions of large or small variance. To derive the PDF we note that ({z1i}, {z2i}) are independent random variables implying that P(z1, z2) is a product of marginal distributions. This is then converted to P(x) by taking into account the Jacobian of the transformation J(z1,z2)→x = p det(WW T ). The result is that x has a Gaussian distribution with with inverse covariance, C−1 XCA = 1 σ2 0 P⊥ W + W T W (8) where P⊥ W = ID −W T (WW T )−1W is the projection operator on the orthogonal complement of W. Also, det(C−1 XCA) = det(WW T )σ2(d−D) 0 . It is now not hard to verify that by identifying A = W # def = W T (WW T )−1 (the pseudoinverse of W) the two models defined through eqns. 6 and 8 are indeed identical. Thus, by slightly changing the noise model, both PPCA and PMCA result in XCA (i.e. compare eqns.3,4,6,8). 1Note however that the semantics of a two-layer directed graphical model is problematic since p(x|y) is improper. 3.2 Maximum Likelihood Solution For a centered (zero mean) dataset {x} of size N the log-likelihood is given by, L = −ND 2 log(2π)+ N 2 log det(WW T )+ N(D −d) 2 log µ 1 σ2 0 ¶ −N 2 tr ¡ C−1 XCAS ¢ (9) where S = 1 N PN i=1 xixT i ∈RD×D is the covariance of the data. To solve for the stationary points of L we take derivatives w.r.t W T and 1/σ2 0 and equate them to zero. Firstly, for W we find the following equation, W # −SW T + 1 σ2 0 P⊥ W SW # = 0. (10) Let W T = UΛRT be the singular value decomposition (SVD) of W T , so that U ∈RD×d forms an incomplete orthonormal basis, Λ ∈Rd×d is a full-rank diagonal matrix, and R ∈Rd×d is a rigid rotation factor. Inserting this into eqn. 10 we find, UΛ−1RT −SUΛRT + 1 σ2 0 (ID −UU T )SUΛ−1RT = 0. (11) Next we note that the projections of this equation on the space spanned by W and its orthogonal complement should hold independently. Thus, multiplying equation 11 on the left by either PW or P⊥ W , and multiplying it on the right by RΛ−1, we obtain the following two equations, UΛ−2 = UU T SU, (12) SU µ Id −Λ−2 σ2 0 ¶ = UU T SU µ Id −Λ−2 σ2 0 ¶ . (13) Inserting eqn. 12 into eqn. 13 and right multiplying with (Id −Λ−2/σ2 0)−1 we find the eigenvalue equation2, SU = UΛ−2. (14) Inserting this solution back into eqn. 12 we note that it is satisfied as well. We thus conclude that U is given by the eigenvectors of the sample covariance matrix S, while the elements of the (diagonal) matrix Λ are given by λi = 1/σi with σ2 i the eigenvalues of S (i.e. the spectrum). Finally, taking derivatives w.r.t. 1/σ2 0 we find, σ2 0 = 1 D −dtr ¡ P ⊥ W S ¢ = 1 D −d ¡ tr(S) −tr(UΛ−2U T ) ¢ = 1 D −d X i∈G σ2 i (15) where G is the set of all eigenvalues of S which are not represented in Λ−2. The above equation expresses the fact that these eigenvalues are being approximated through their average σ2 0. Inserting the solutions 14 and 15 back into the log-likelihood (eqn. 9) we find, L = −ND 2 log(2πe) −N 2 X i∈C log(σ2 i ) −N(D −d) 2 log à 1 D −d X i∈G σ2 i ! (16) where C is the set of retained eigenvalues. The log-likelihood has now been reduced to a function of the discrete set of eigenvalues {σ2 i } of S. 2As we will see later, the left-out eigenvalues have to be contiguous in the spectrum, implying that the matrix (Id −Λ−2/σ2 0)−1 can only be singular if there is a retained eigenvalue that is equal to all left-out eigenvalues. This is clearly an uninteresting case, since the likelihood will not decrease if we leave this component out as well. 3.3 An Algorithm for XCA To optimize 16 efficiently we first note that the sum of the eigenvalues {σ2 i } is constant: P i∈C∪G σ2 i = tr(S). We may use this to rewrite L in terms of the retained eigenvalues only. We define the following auxiliary cost to be minimized which is proportional to −L up to irrelevant constants, K = X i∈C log σ2 i + (D −d) log(tr(S) − X i∈C σ2 i ). (17) Next we recall an important result that was proved in [4]: the minimizing solution has eigenvalues σ2 i , i ∈G which are contiguous in the (ordered) spectrum, i.e. the eigenvalues which are averaged form a “gap” in the spectrum. With this result, the search for the optimal solution has been reduced from exponential to linear in the number of retained dimensions d. Thus we obtain the following algorithm for determining the optimal d extreme components: (1) Compute the first d principal components and the first d minor components, (2) for all d possible positions of the ”gap” compute the cost K in eqn. 17, and (3) select the solution that minimizes K. It is interesting to note that the same equations for the log-likelihood (L, eqn.16) and cost (K, eqn.17) appear in the analysis of PPCA [4] and PMCA [6]. The only difference being that certain constraints forcing the solution to contain only principal or minor components are absent in eqn. 16. For XCA, this opens the possibility for mixed solutions with both principal and minor components. From the above observation we may conclude that the optimal ML solution for XCA will always have larger log-likelihood on the training data then the optimal ML solutions for PPCA and PMCA. Moreover, when XCA contains only principal (or minor) components, it must have equal likelihood on the training data as PPCA (or PMCA). In this sense XCA is the natural extension of PPCA and PMCA. 4 Properties of the Optimal ML Solution We will now try to provide some insight into the nature of the the optimal ML solutions. First we note that the objective K is shifted by a constant if we multiply all variances by a factor σ2 i →ασ2 i , which leaves its minima invariant. In other words, the objective is only sensitive to changing ratios between eigenvalues. This property suggests to use the logarithm of the eigenvalues of S as the natural quantities since multiplying all eigenvalues with a constant results in a vertical shift of the log-spectrum. Consequently, the properties of the optimal solution only depend on the shape of the log-spectrum. In appendix A we prove the following characterization of the optimal solution, Theorem 1 • A log-linear spectrum has no preference for principal or minor components. • The extreme components of log-convex spectra are principal components. • The extreme components of log-concave spectra are minor components. Although a log-linear spectrum with arbitrary slope has no preference for principal or minor components, the slope does have an impact on the accuracy of the approximation because the variances in the gap are approximated by their average value. A spectrum that can be exactly modelled by PPCA with sufficient retained directions is one which has a pedestal, i.e. where the eigenvalues become constant beyond some value. Similarly PMCA can model exactly a spectrum which is constant and then drops off while XCA can model exactly a spectrum with a constant section at some arbitrary position. Some interesting examples of spectra can be obtained from the Fourier (spectral) representation of stationary Gaussian processes. Processes with power-law spectra S(ω) ∝ω−α are log convex. An example of a spectrum which is log linear is obtained from the RBF covariance function Table 1: Percent classification error of noisy sinusoids as a function of g = D −d. g 2 3 4 5 6 7 8 ϵXCA 1.88 1.91 2.35 1.88 2.37 3.27 28.24 ϵMCA 2.37 3.10 4.64 4.06 2.37 3.27 28.24 ϵP CA 1.88 2.50 12.21 14.57 19.37 32.99 30.14 with a Gaussian weight function, [7]. The RBF covariance function on the circle will give rise to eigenvalues λi ∝e−βi2, i.e. a log-concave spectrum. Both PCA and MCA share the convenient property that a solution with d components is contained in the solution with d+1 components. This is not the case for XCA: the solution with d + 1 components may look totally different than the solution with d components (see inset in Figure 1c), in fact they may not even share a single component! 5 Experiments Small Sample Effects When the number of data cases is small relative to the dimensionality of the problem, the log-spectrum tends to bend down on the MC side producing “spurious” minor components in the XCA solution. Minor components that result from finite sample effects, i.e. that do not exist in the infinite data limit, have an adverse effect on generalization performance. This is shown in Figure 1a for the “Frey-Faces” dataset, where we plot the log-likelihood for (centered) training and test data for both PCA and XCA. This dataset contains 1965 images of size 20 × 28, of which we used 1000 for training and 965 for testing. Since the number of cases is small compared to the number of dimensions, both PCA and XCA show a tendency to overfit. Note that at the point that minor components appear in the XCA solution (d = 92) the log-likelihood of the training data improves relative to PCA, while the log-likelihood of the test data suffers. Sinusoids in noise Consider a sum of p sinusoids Y (t) = Pp i=1 Ai cos(ωit + φi) sampled at D equallyspaced time points. If each φi is random in (0, 2π) then the covariance ⟨Y (t)Y (t′)⟩= Pp i=1 Pi cos ωi(t −t′) where Pi = A2 i /2. This signal defines a 2p-dimensional linear manifold in the D-dimensional space (see [2] §12.5). By adding white noise to this signal we obtain a non-singular covariance matrix. Now imagine we have two such signals, each described by p different powers and frequencies. Instead of using the exact covariance matrix for each we approximate the covariance matrix using either XCA, PMCA or PPCA. We then compare the accuracy of a classification task using either the exact covariance matrix, or the approximations. (Note that although the covariance can be calculated exactly the generating process is not in fact a Gaussian process.) By adjusting p, the powers and the frequencies of the two signals, a variety of results can be obtained. We set D = 9 and p = 4. The first signal had P = (1.5, 2.5, 3, 2.5) and ω = (1.9, 3.5, 4.5, 5), and the second P = (3, 2, 1.8, 1) and ω = (1.7, 2.9, 3.3, 5.3). The variance of the background noise was 0.5. Table 1 demonstrates error rates on 10000 test cases obtained for XCA, PMCA and PPCA using g = D −d approximated components. For all values of g the error rate for XCA is ≤than that for PPCA and PMCA. For comparison, the optimal Gaussian classifier has an error rate of 1.87%. For g = 2 the XCA solution for both classes is PPCA, and for g = 6, 7, 8 it is PMCA; in between both classes have true XCA solutions. MCA behaviour is observed if σ2 0 is low. 2-D Positions of Face Features 671 cases were extracted from a dataset containing 2-D coordinates of 6 features on frontal 0 100 200 300 400 500 500 600 700 800 900 1000 1100 1200 1300 1400 nr. retained dimensions log−probability Frey−Faces 0 200 400 600 10 −6 10 −4 10 −2 10 0 10 2 eigendirection variance Spectrum 0 5 10 15 −100 −98 −96 −94 −92 −90 −88 −86 −84 −82 −80 nr. retained dimensions log−probability Training Data 0 5 10 15 10 0 10 2 10 4 10 6 eigendirection variance Spectrum 0 5 10 15 −100 −98 −96 −94 −92 −90 −88 −86 −84 −82 −80 nr. retained dimensions log−probability Test Data 0 5 10 0 2 4 6 8 10 12 nr. retained dimensions nr. PCs / MCs Extreme Components (a) (b) (c) Figure 1: (a) Log-likelihood of the “Frey-faces” training data (top curves) and test data (bottom curves) for PCA (dashed lines) and XCA (solid lines) as a function of the number of components. Inset: log-spectrum of training data.(b) Log-likelihood of training data for PCA (dash), MCA (dashdot) and XCA (solid) as a function of the number of components. Inset: log-spectrum of training data. (c) Log-likelihood of test data. Inset: number of PCs (dash) versus number of MCs (dash-dot) as a function of the number of components. faces3. To obtain a translation and orientation invariant representation, we computed the 15 squared (Euclidean) distances between the features and removed their mean. In Figures 1b and 1c we show the log-likelihood for PCA, MCA and XCA of 335 training cases and 336 test cases respectively. Clearly, XCA is superior even on the test data. In the inset of Figure 1c we depict the number of PCs and MCs in the XCA solution as we vary the number of retained dimensions. Note the irregular behavior when the number of components is large. 6 Discussion In this paper we have proposed XCA as the natural generalization of PCA and MCA for the purpose of dimensionality reduction. It is however also possible to consider a model with non-Gaussian components. In [5] the components were distributed according to a Student-t distribution resulting in a probabilistic model for undercomplete independent components analysis (UICA). There are quite a few interesting questions that remain unanswered in this paper. For instance, although we have shown how to efficiently find the global maximum of the loglikelihood, we haven’t identified the properties of the other stationary points. Unlike PPCA we expect many local maxima to be present. Also, can we formulate a Bayesian version of XCA where we predict the number and nature of the components supported by the data? Can we correct the systematic under-estimation of MCs in the presence of relatively few data cases? There are a number of extensions of the XCA model worth exploring: XCA with multiple noise models (i.e. multiple gaps in the spectrum), mixtures of XCA and so on. A Proof of Theorem 1 Using the fact that the sum and the product of the eigenvalues are constant we can rewrite the cost eqn.17 (up to irrelevant constants) in terms of the left-out eigenvalues of the spectrum only. We will also use the fact that the left-out eigenvalues are contiguous in the 3The dataset was obtained by M. Weber at the computational vision lab at Caltech and contains the 2-D coordinates of 6 features (eyes, nose, 3 mouth features) of unregistered frontal face images. spectrum, and form a “gap” of size g def = D −d, C = g log   i∗+g−1 X i=i∗ efi  − i∗+g−1 X i=i∗ fi (18) where fi are the log-eigenvalues and i∗is the location of the left hand side of the gap. We are interested in the change of this cost δC if we shift it one place to the right (or the left). This can be expressed as δC = g log à 1 + efi∗+g −efi∗ Pi∗+g−1 i=i∗ efi ! −(f(i∗+ g) −f(i∗)) . (19) Inserting a log-linear spectrum: fi = b + a · i with a < 0 and using the result Pg−1 i=0 ea·i = (eag −1)/(ea −1) we find that the change in C vanishes for all log-linear spectra. This establishes the first claim. For the more general case we define corrections ci to the loglinear spectrum that runs through the points fi∗and fi∗+g, i.e. fi = b + a · i + ci. First consider the case of a convex spectrum between i∗and i∗+g, which implies that all ci < 0. Inserting this into 19 we find after some algebra δC = g log à 1 + eag −1 Pg−1 i′=0 ea·i′+c[i′+i∗] ! −ag. (20) Because all ci < 0, the first term must be smaller (more negative) than the corresponding term in the linear case implying that δC < 0 (the second term is unchanged w.r.t the linear case). Thus, if the entire spectrum is log-convex the gap will be located on the right, resulting in PCs. A similar argument shows that for log-concave spectra the solutions consist of MCs only. In general log-spectra may have convex and concave pieces. The cost 18 is minimized when some of the ci are positive and some negative in such a way that, Pg−1 i′=0 ea·i′+c[i′+i∗] ≈Pg−1 i′=0 ea·i′ Note that due to the exponent in this sum, positive ci have a stronger effect than negative ci. Acknowledgements We’d like to thank the following people for their invaluable input into this paper: Geoff Hinton, Sam Roweis, Yee Whye Teh, David MacKay and Carl Rasmussen. We are also very grateful to Pietro Perona and Anelia Angelova for providing the “feature position” dataset used in this paper. References [1] G.E. Hinton. Products of experts. In Proceedings of the International Conference on Artificial Neural Networks, volume 1, pages 1–6, 1999. [2] J.G. Proakis and D.G. Manolakis. Digital Signal Processing: Principles, Algorithms and Applications. Macmillan, 1992. [3] S.T. Roweis. Em algorithms for pca and spca. In Advances in Neural Information Processing Systems, volume 10, pages 626–632, 1997. [4] M.E. Tipping and C.M. Bishop. Probabilistic principal component analysis. Journal of the Royal Statistical Society, Series B, 21(3):611–622, 1999. [5] M. Welling, R.S. Zemel, and G.E. Hinton. A tractable probabilistic model for projection pursuit. In Proceedings of the Conference on Uncertainty in Artificial Intelligence, 2003. accepted for publication. [6] C.K.I. Williams and F.V. Agakov. Products of gaussians and probabilistic minor components analysis. Neural Computation, 14(5):1169–1182, 2002. [7] H. Zhu, C. K. I. Williams, R. J. Rohwer, and M. Morciniec. Gaussian regression and optimal finite dimensional linear models. In C. M. Bishop, editor, Neural Networks and Machine Learning. Springer-Verlag, Berlin, 1998.
2003
155
2,371
Bayesian Color Constancy with Non-Gaussian Models Charles Rosenberg Computer Science Department Carnegie Mellon University Pittsburgh, PA 15213 chuck@cs.cmu.edu Thomas Minka Statistics Department Carnegie Mellon University Pittsburgh, PA 15213 minka@stat.cmu.edu Alok Ladsariya Computer Science Department Carnegie Mellon University Pittsburgh, PA 15213 alokl@cs.cmu.edu Abstract We present a Bayesian approach to color constancy which utilizes a nonGaussian probabilistic model of the image formation process. The parameters of this model are estimated directly from an uncalibrated image set and a small number of additional algorithmic parameters are chosen using cross validation. The algorithm is empirically shown to exhibit RMS error lower than other color constancy algorithms based on the Lambertian surface reflectance model when estimating the illuminants of a set of test images. This is demonstrated via a direct performance comparison utilizing a publicly available set of real world test images and code base. 1 Introduction Color correction is an important preprocessing step for robust color-based computer vision algorithms. Because the illuminants in the world have varying colors, the measured color of an object will change under different light sources. We propose an algorithm for color constancy which, given an image, will automatically estimate the color of the illuminant (assumed constant over the image), allowing the image to be color corrected. This color constancy problem is ill-posed, because object color and illuminant color are not uniquely separable. Historically, algorithms for color constancy have fallen into two groups. The first group imposes constraints on the scene and/or the illuminant, in order to remove the ambiguities. The second group uses a statistical model to quantify the probability of each illuminant and then makes an estimate from these probabilities. The statistical approach is attractive, since it is more general and more automatic—hard constraints are a special case of statistical models, and they can be learned from data instead of being specified in advance. But as shown by [3, 1], currently the best performance on real images is achieved by gamut mapping, a constraint-based algorithm. And, in the words of some leading researchers, even gamut mapping is not “good enough” for object recognition [8]. In this paper, we show that it is possible to outperform gamut mapping with a statistical approach, by using appropriate probability models with the appropriate statistical framework. We use the principled Bayesian color constancy framework of [4], but combine it with rich, nonparametric image models, such as used by Color by Correlation [1]. The result is a Bayesian algorithm that works well in practice and addresses many of the issues with Color by Correlation, the leading statistical algorithm [1]. At the same time, we suggest that statistical methods still have much to learn from constraint-based methods. Even though our algorithm outperforms gamut mapping on average, there are cases in which gamut mapping provides better estimates, and, in fact, the errors of the two methods are surprisingly uncorrelated. This is an interesting result, because it suggests that gamut mapping exploits image properties which are different from what is learned by our algorithm, and probably other statistical algorithms. If this is true, and if our statistical model could be extended in a way that captures these additional properties, better algorithms should be possible in the future. 2 The imaging model Our approach is to model the observed image pixels with a probabilistic generative model, decomposing them as the product of unknown surface reflectances with an unknown illuminant. Using Bayes’ rule, we obtain a posterior for the illuminant, and from this we extract the estimate with minimum risk, e.g., the minimum expected chromaticity error. Let y be an image pixel with three color channels: (yr, yg, yb). The pixel is assumed to be the result of light reflecting off of a surface under the Lambertian reflectance model. Denote the power of the light in each channel by ℓ= (ℓr, ℓg, ℓb), with each channel ranging from zero to infinity. For each channel, a surface can reflect none of the light, all of the light, or somewhere in between. Denote this reflectance by x = (xr, xg, xb), with each channel ranging from zero to one. The model for the pixel is the well-known diagonal lighting model: yr = ℓrxr yg = ℓgxg yb = ℓbxb (1) To simplify the equations below, we write this in matrix form as L = diag(ℓ) (2) y = Lx (3) This specifies the conditional distribution p(y|ℓ, x). In reality, there are sensor noise and other factors which affect the observed color, but we will consider these to be negligible. Next we make the common assumption that the light and the surface have been chosen independently, so that p(ℓ, x) = p(ℓ)p(x). The prior distribution for the illuminant (p(ℓ)) will be uniform over a constraint set, described later in section 5.3. The most difficult step is to construct a model for the surface reflectances in an image containing many pixels: Y = (y(1), ..., y(n)) (4) X = (x(1), ..., x(n)) (5) We need a distribution p(X) for all n reflectances. One approach is to assume that the reflectances are independent and Gaussian, as in [4], which gives reasonable results but can be improved upon. Our approach is to quantize the reflectance vectors into K bins, and consider the reflectances to be exchangeable—a weaker assumption than independence. Exchangeability implies that the probability only depends on the number of reflectances in each bin. Thus if we denote the reflectance histogram by (n1, ..., nK), where P k nk = n, then p(x(1), ..., x(n)) ∝f(n1, ..., nK) (6) where f is a function to be specified. Independence is a special case of exchangeability. If mk is the probability of a surface having a reflectance value in bin k, so that P k mk = 1, then independence says f(n1, ..., nK) = Y k mnk k (7) As an alternative to this, we have experimented with the Dirichlet-multinomial model, which employs a parameter s > 0 to control the amount of correlation. Under this model, f(n1, ..., nK) = Γ(s) Γ(n + s) Y k Γ(nk + smk) Γ(smk) (8) For large s, correlation is weak and the model reduces to (7). For small s, correlation is strong and the model expects a few reflectances to be repeated many times, which is what we see in real images. When s is very small, the expression (8) can be reduced to a simple form: f(n1, ..., nK) ≈ 1 sΓ(n) Y k (smkΓ(nk))clip(nk) (9) clip(nk) = 0 if nk = 0 1 if nk > 0 (10) This resembles a multinomial distribution on clipped counts. Unfortunately, this distribution strongly prefers that the image contains a small number of different reflectances, which biases the light source estimate. Empirically we have achieved our best results using a “normalized count” modification of the model which removes this bias: f(n1, ..., nK) = Y k mνk k (11) νk = n clip(nk) P k clip(nk) (12) The modified counts νk sum to n just like the original counts nk, but are distributed equally over all reflectances present in the image. 3 The color constancy algorithm The algorithm for estimating the illuminant has two parts: (1) discretize the set of all illuminants on a fine grid and compute their likelihood and (2) pick the illuminant which minimizes the risk. The likelihood of the observed image data Y for a given illuminant ℓis p(Y|ℓ) = Z X Y i p(y(i)|ℓ, x(i)) ! p(X)dX (13) = |L−1|np(X = L−1Y) (14) The quantity L−1Y can be understood as the color-corrected image. The determinant term, 1/(ℓrℓgℓb)n, makes this a valid distribution over Y and has the effect of introducing a preference for dimmer illuminants independently of the prior on reflectances. Also implicit in this likelihood are the bounds on x, which require reflectances to be in the range of zero and one and thus we restrict our search to illuminants that satisfy: ℓr ≥max i yr(i) ℓg ≥max i yg(i) ℓb ≥max i yb(i) (15) The posterior probability for ℓthen follows: p(ℓ|Y) ∝ p(Y|ℓ)p(ℓ) (16) ∝ |L−1|np(X = L−1Y)p(ℓ) (17) The next step is to find the estimate of ℓwith minimum risk. An answer that the illuminant is ℓ∗, when it is really ℓ, incurs some cost, denoted R(ℓ∗|ℓ). Let this function be quadratic in some transformation g of the illuminant vector ℓ: R(ℓ∗|ℓ) = ||g(ℓ∗) −g(ℓ)||2 (18) This occurs, for example, when the cost function is squared error in chromaticity. Then the minimum-risk estimate satisfies g(ℓ∗) = Z ℓ g(ℓ)p(ℓ|Y)dℓ (19) The right-hand side, the posterior mean of g, and the normalizing constant of the posterior can be computed in a single loop over the grid of illuminants. 4 Relation to other algorithms In this section we describe related color constancy algorithms using the framework of the imaging model introduced in section 2. This is helpful because it allows us to compare all of these algorithms in a single framework and understand the assumptions made by each. Independent, Gaussian reflectances The previous work most similar to our own is by [10] and [4]; however, these methods are not tested on real images. They use a similar imaging model and maximum-likelihood and minimum-risk estimation, respectively. The difference is that they use a Gaussian prior for the reflectance vectors, and assume the reflectances for different pixels are independent. The Gaussian assumption leads to a simple likelihood formula whose maximum can be found by gradient methods. However, as mentioned by [4], this is a constraining assumption, and more appropriate priors would be preferable. Scale by max The scale by max algorithm (as tested e.g. in [3]) estimates the illuminant by the simple formula ℓr = max i yr(i) ℓg = max i yg(i) ℓb = max i yb(i) (20) which is the dimmest illuminant in the valid set (15). In the Bayesian algorithm, this solution can be achieved by letting the reflectances be independent and uniform over the range 0 to 1. Then p(X) is constant and the maximum-likelihood illuminant is (20). This connection was also noticed by [4]. Gray-world The gray-world algorithm [5] chooses the illuminant such that the average value in each channel of the corrected image is a constant, e.g. 0.5. This is equivalent to the Bayesian algorithm with a particular reflectance prior. Let the reflectances be independent for each pixel and each channel, with distribution p(xc) ∝exp(−2xc) in each channel c. The log-likelihood for ℓc is then log p(Yc|ℓc) = −n log ℓc −2 X i yc(i) ℓc + const. (21) whose maximum is (as desired) ℓc = 2 n X i yc(i) (22) Figure 1: Plots of slices of the three dimensional color surface reflectance distribution along a single dimension. Row one plots green versus blue with 0,0 at the upper left of each subplot and slices in red whose magnitude increases from left to right. Row two plots red versus blue with slices in green. Row three plots red versus green with slices in blue. Color by Correlation Color by Correlation [6, 1] also uses a likelihood approach, but with a different imaging model that is not based on reflectance. Instead, observed pixels are quantized into color bins, and the frequency of each bin is counted for each illuminant, in a finite set of illuminants. (Note that this is different from quantizing reflectances, as done in our approach.) Let mk(ℓ) be the frequency of color bin k for illuminant ℓ, and let n1 · · · nK be the color histogram of the image, then the likelihood of ℓis computed as p(Y|ℓ) = Y k mk(ℓ)clip(nk) (23) While theoretically this is very general, there are practical limitations. First there are training issues. One must learn the color frequencies for every possible illuminant. Since collecting real-world data whose illuminant is known is difficult, mk(ℓ) is typically trained synthetically with random surfaces, which may not represent the statistics of natural scenes. The second issue is that colors and illuminants live in an unbounded 3D space [1], unlike reflectances which are bounded. In order to store a color distribution for each illuminant, brightness variation needs to be artificially bounded. The third issue is storage. To reduce the storage of the mk(ℓ)’s, Barnard et al [1] store the color distribution only for illuminants of a fixed brightness. However, as they describe, this introduces a bias in the estimation they refer to as the “discretization problem” and try to solve it by penalizing bright illuminants. The other part of the bias is due to using clipped counts in the likelihood. As explained in section 2, a multinomial likelihood with clipped counts is a special case of the Dirichlet-multinomial, and prefers images with a small number of different colors. This bias can be removed using a different likelihood function, such as (11). 5 Parameter estimation 5.1 Reflectance Distribution To implement the Bayesian algorithm, we need to learn the real-world frequencies mk of quantized reflectance vectors. The direct approach to this would require a set of images with ground truth information regarding the associated illumination parameters or, alternately, a set of images captured under a canonical illuminant and camera. Unfortunately, it is quite difficult to collect a large number of images under controlled conditions. To avoid this issue, we use bootstrapping, as described in [9], to approximate the ground truth. The estimates from some “base” color constancy algorithm are used as a proxy for the ground truth. This might seem to be problematic in that it would limit any algorithm based on these estimates to perform only as well as the base algorithm. However, this need not be the case if the errors made by the base algorithm are relatively unbiased. We used approximately 2300 randomly selected JPEG images from news sites on the web for bootstrapping, consisting mostly of outdoor scenes, indoor news conferences, and sporting event scenes. The scale by max algorithm was used as our “base” algorithm. Figure 1 is a plot of the probability distribution collected, where lighter regions represent higher probability values. The distribution is highly structured and varies with the magnitude of the channel response. This structure is important because it allows our algorithm to disambiguate between potential solutions to the ill-posed illumination estimation problem. 5.2 Pre-processing and quantization To increase robustness, pre-processing is performed on the image, similar to that performed in [3]. The first pre-processing step scales down the image to reduce noise and speed up the algorithm. A new image is formed in which each pixel is the mean of an m by m block of the original image. The second pre-processing step removes dark pixels from the computation, which, because of noise and quantization effects do not contain reliable color information. Pixels whose yr + yg + yb channel sum is less than a given threshold are excluded from the computation. In addition to the reflectance prior, the parameters of our algorithm are: the number of reflectance histogram bins, the scale down factor, and the dark pixel threshold value. To set these parameters values, the algorithm was run over a large grid of parameter variations and performance on the tuning set was computed. The tuning set was a subset of the “model” data set described in [7] and disjoint from the test set. A total of 20 images were used, 10 objects imaged under 2 illuminants. (The “ball2” object was removed so that there was no overlap between the tuning and test sets.) For the purpose of speed, only images captured with the Philips Ultralume and the Macbeth Judge II fluorescent illuminants were included. The best set of parameters was found to be: 32 × 32 × 32 reflectance bins, scale down by m = 3, and omit pixels with a channel sum less than 8/(3 × 255). 5.3 Illuminant prior To facilitate a direct comparison, we adopt the two illuminant priors from [3]. Each is uniform over a subset of illuminants. The first prior, full set, discretizes the illuminants uniformly in polar coordinates. The second prior, hull set, is a subset of full set restricted to be within the convex hull of the test set illuminants and other real world illuminants. Overall brightness, ℓr + ℓg + ℓb, is discretized in the range of 0 to 6 in 0.01 steps. 6 Experiments 6.1 Evaluation Specifics To test the algorithms we use the publicly available real world image data set [2] used by Barnard, Martin, Coath and Funt in a comprehensive evaluation of color constancy algorithms in [3]. The data set consists of images of 30 scenes captured under 11 light sources, for a total of 321 images (after the authors removed images which had collection problems) with ground truth illuminant information provided in the form of an RGB value. As in the “rg error” measure of [3], illuminant error is measured in chromaticity space: ℓ1 = ℓr/(ℓr + ℓg + ℓb) ℓ2 = ℓg/(ℓr + ℓg + ℓb) (24) R(ℓ∗|ℓ) = (ℓ∗ 1 −ℓ1)2 + (ℓ∗ 2 −ℓ2)2 (25) The Bayesian algorithm is adapted to minimize this risk by computing the posterior mean in chromaticity space. The performance of an algorithm on the test set is reported as the square root of the average R(ℓ∗|ℓ) across all images, referred to as the RMS error. Table 1: The average error of several color constancy algorithms on the test set. The value in parentheses is 1.64 times the standard error of the average, so that if two error intervals do not overlap the difference is significant at the 95% level. Algorithm RMS Error for Full Set RMS Error for Hull Set Scale by Max 0.0584 (+/- 0.0034) 0.0584 (+/- 0.0034) Gamut Mapping without Segmentation 0.0524 (+/- 0.0029) 0.0461 (+/- 0.0025) Gamut Mapping with Segmentation 0.0426 (+/- 0.0023) 0.0393 (+/- 0.0021) Bayes with Bootstrap Set Model 0.0442 (+/- 0.0025) 0.0351 (+/- 0.0020) Bayes with Tuning Set Model 0.0344 (+/- 0.0017) 0.0317 (+/- 0.0017) Bayes with Tuning Set Model Bayes with Bootstrap Set Model Gamut Mapping with Segmentation Gamut Mapping without Segmentation Scale by Max 0.030 0.035 0.040 0.045 0.050 0.055 0.060 RMS error Full Set Hull Set Figure 2: A graphical rendition of table 1. The standard errors are scaled by 1.64, so that if two error bars do not overlap the difference is significant at the 95% level. 6.2 Results The results1 are summarized in Table 1 and Figure 2. We compare two versions of our Bayesian method to the gamut mapping and scale by max algorithms. The appropriate preprocessing for each algorithm was applied to the images to achieve the best possible performance. (Note that we do not include results for color by correlation since the gamut mapping results were found to be significantly better in [3].) In all configurations, our algorithm exhibits the lowest RMS error except in a single case where it is not statistically different than that of gamut mapping. The differences for the hull set are especially large. The hull set is clearly a useful constraint that improves the performance of all of the algorithms evaluated. The two versions of our Bayesian algorithm differ only in the data set used to build the reflectance prior. The tuning set, while composed of separate images than the test set, is very similar and has known illuminants, and, accordingly, gives the best results. Yet the performance when trained on a very different set of images, the uncalibrated bootstrap set of section 5.1, is not that different, particularly when the illuminant search is constrained. The gamut mapping algorithm (called CRULE and ECRULE in [3]) is also presented in two versions: with and without segmenting the images as a preprocessing step as described in [3]. These results were computed using software provided by Barnard and used to generate the results in [3]. In the evaluation of color constancy algorithms in [3] gamut mapping was found on average to outperform all other algorithms when evaluated on real world images. It is interesting to note that the gamut mapping algorithm is sensitive to segmentation. Since fundamentally it should not be sensitive to the number of pixels of a particular color in the image we must assume that this is because the segmentation is implementing some form of noise filtering. The Bayesian algorithm currently does not use segmentation. Scale by max is also included as a reference point and still performs quite well given its simplicity, often beating out much more complex constancy algorithms [8, 3]. Its performance is the same for both illuminant sets since it does not involve a search over illuminants. 1Result images can be found at http://www.cs.cmu.edu/˜chuck/nips-2003/ Surprisingly, when the error of the Bayesian method is compared with the gamut mapping method on individual test images, the correlation coefficient is -0.04. Thus the images which confuse the Bayesian method are quite different from the images which confuse gamut mapping. This suggests that an algorithm which could jointly model the image properties exploited by both algorithms might give dramatic improvements. As an example of the potential improvement, the RMS error of an ideal algorithm whose error is the minimum of Bayes and gamut on each image in the test set is only 0.019. 7 Conclusions and Future Work We have demonstrated empirically that Bayesian color constancy with the appropriate nonGaussian models can outperform gamut mapping on a standard test set. This is true regardless of whether a calibrated or uncalibrated training set is used, or whether the full set or a restricted set of illuminants is searched. This should give new hope to the pursuit of statistical methods as a unifying framework for color constancy. The results also suggest ways to improve the Bayesian algorithm. The particular image model we have used, the normalized count model, is only one of many that could be tried. This is simply an image modeling problem which can be attacked using standard statistical methods. A particularly promising direction is to pursue models which can enforce constraints like that in the gamut mapping algorithm, since the images where Bayes has the largest errors appear to be relatively easy for gamut mapping. Acknowledgments We would like to thank Kobus Barnard for making his test images and code publicly available. We would also like to thank Martial Hebert for his valuable insight and advice and Daniel Huber and Kevin Watkins for their help in revising this document. This work was sponsored in part by a fellowship from the Eastman Kodak company. References [1] K. Barnard, L. Martin, and B. Funt, “Colour by correlation in a three dimensional colour space,” Proceedings of the 6th European Conference on Computer Vision, pp. 275–289, 2000. [2] K. Barnard, L. Martin, B. Funt, and A. Coath, “A data set for colour research,” Color Research and Application, Volume 27, Number 3, pp. 147-151, 2002, http://www.cs.sfu.ca/˜colour/data/colour constancy test images/ [3] K. Barnard, L. Martin, A. Coath, and B. Funt, “A comparison of color constancy algorithms; Part Two. Experiments with Image Data,” IEEE Transactions in Image Processing, vol. 11. no. 9. pp. 985-996, 2002. [4] D. H. Brainard and W. T. Freeman, “Bayesian color constancy,” Journal of the Optical Society of America A, vol. 14, no. 7, pp. 1393-1411, 1997. [5] G. Buchsbaum, “A spatial processor model for object colour perception,” Journal of the Franklin Institute, vol. 10, pp. 1-26, 1980. [6] G. D. Finlayson and S. D. Hordley and P. M. Hubel, “Colour by correlation: a simple, unifying approach to colour constancy,” The Proceedings of the Seventh IEEE International Conference on Computer Vision, vol. 2, pp. 835-842, 1999. [7] B. Funt and V. Cardei and K. Barnard, “Learning color constancy,” Proceedings of Imaging Science and Technology / Society for Information Display Fourth Color Imaging Conference. pp. 58-60, 1996. [8] B. Funt and K. Barnard and L. Martin, “Is colour constancy good enough?,” Proceedings of the Fifth European Conference on Computer Vision, pp. 445-459, 1998. [9] B. Funt and V. Cardei. “Bootstrapping color constancy,” Proceedings of SPIE: Electronic Imaging IV, 3644, 1999. [10] H. J. Trussell and M. J. Vrhel, “Estimation of illumination for color correction,” Proc ICASSP, pp. 2513-2516, 1991.
2003
156
2,372
All learning is local: Multi-agent learning in global reward games Yu-Han Chang MIT CSAIL Cambridge, MA 02139 ychang@csail.mit.edu Tracey Ho LIDS, MIT Cambridge, MA 02139 trace@mit.edu Leslie Pack Kaelbling MIT CSAIL Cambridge, MA 02139 lpk@csail.mit.edu Abstract In large multiagent games, partial observability, coordination, and credit assignment persistently plague attempts to design good learning algorithms. We provide a simple and efficient algorithm that in part uses a linear system to model the world from a single agent’s limited perspective, and takes advantage of Kalman filtering to allow an agent to construct a good training signal and learn an effective policy. 1 Introduction Learning in a single-agent stationary-environment setting can be a hard problem, but relative to the multi-agent learning problem, it is easy. The multi-agent learning problem has been approached from a variety of approaches, from game theory to partially observable Markov decision processes. The solutions are often complex. We take a different approach in this paper, presenting a simplifying abstraction and a reward filtering technique that allows computationally efficient and robust learning in large multi-agent environments where other methods may fail or become intractable. In many multi-agent settings, our learning agent does not have a full view of the world. Other agents may be far away or otherwise obscured. At the very least, our learning agent usually does not have a a complete representation of the internal states of the other agents. This partial observability creates problems when the agent begins to learn about the world, since it cannot see how the other agents are manipulating the environment and thus it cannot ascertain the true world state. It may be appropriate to model the observable world as a non-stationary Markov Decision Process (MDP). A separate problem arises when we train multiple agents using a global reward signal. This is often the case in cooperative games in which all the agents contribute towards attaining some common goal. Even with full observability, the agents would need to overcome a credit assignment problem, since it may be difficult to ascertain which agents were responsible for creating good reward signals. If we cannot even observe what the other agents are doing, how can we begin to reason about their role in obtaining the current reward? Consider an agent in an MDP, learning to maximize a reward that is a function of its observable state and/or actions. There are many well-studied learning techniques to do this [Sutton and Barto, 1999]. The effects of non-stationarity, partial observability, and global rewards can be thought of as replacing the true reward signal with an alternate signal that is a non-stationary function of the original reward. Think of the difference between learning with a personal coach and learning in a large class where feedback is given only on collective performance. This causes problems for an agent that is trying to use the collective “global” reward signal to learn an optimal policy. Ideally the agent can recover the original “personal reward signal” and learn using that signal rather than the global reward signal. We show that in many naturally arising situations of this kind, an effective approach is for an individual agent to model the observed global reward signal as the sum of its own contribution (which is the personal reward signal on which it should base its learning) and a random Markov process (which is the amount of the observed reward due to other agents or external factors). With such a simple model, we can estimate both of these quantities efficiently using an online Kalman filtering process. Many external sources of reward (which could be regarded as noise) can be modeled as or approximated by a random Markov process, so this technique promises broad applicability. This approach is more robust than trying to learn directly from the global reward, allowing agents to learn and converge faster to an optimal or near-optimal policy. 2 Related Work This type of problem has been approached in the past using a variety of techniques. For slowly varying environments, Szita et al. [2002] show that Q-learning will converge as long as the variation per time step is small enough. In our case, we attempt to tackle problems where the variation could be larger. Choi et al. [1999] investigate models in which there are “hidden modes”. When the environment switches between modes, all the rewards may be altered. This works if we have fairly detailed domain knowledge about the types of modes we expect to encounter. For variation produced by the actions of other agents in the world, or for truly unobservable environmental changes, this technique would not work as well. Auer et al. [1995] show that in arbitrarily varying environments, we can craft a regret-minimizing strategy for playing repeated games. The results are largely theoretical in nature and can yield fairly loose performance bounds, especially in stochastic games. Rather than filtering the rewards as we will do, Ng et al. [1999] show that a potential function can be used to shape the rewards without affecting the learned policy while possibly speeding up convergence. This assumes that learning would converge in the first place, though possibly taking a very long time. Moreover, it requires domain knowledge to craft this shaping function. Wolpert and Tumer [1999] provide a framework called COIN, or collective intelligence, for analyzing distributed reinforcement learning. They stress the importance of choosing utility functions that lead to good policies. Finally, McMahan et al. [2003] discuss learning in the scenario in which the opponent gets to choose the agent’s reward function. The innovative aspect of our approach is to consider the reward signal as merely a signal that is correlated with our true learning signal. We propose a model that captures the relationship between the true reward and the noisy rewards in a wide range of problems. Thus, without assuming much additional domain knowledge, we can use filtering methods to recover the underlying true reward signal from the noisy observed global rewards. 3 Mathematical model The agent assumes that the world possesses one or more unobservable state variables that affect the global reward signal. These unobservable states may include the presence of other agents or changes in the environment. Each agent models the effect of these unobservable state variables on the global reward as an additive noise process bt that evolves according to bt+1 = bt + zt, where zt is a zero-mean Gaussian random variable with variance σw. The global reward that it observes if it is in state i at time t is gt = r(i) + bt, where r is a vector containing the ideal training rewards r(i) received by the agent at state i. The standard model that describes such a linear system is: gt = Cxt + vt, vt ∼N(0, Σ2) xt = Axt−1 + wt, wt ∼N(0, Σ1) In our case, we desire estimates of xt = [rT t bt]T . We impart our domain knowledge into the model by specifying the estimated variance and covariance of the components of xt. In our case, we set Σ2 = 0 since we assume no observation noise when we experience rewards; Σ1(j, j) = 0, j ̸= |S| + 1, since the rewards are fixed and do not evolve over time; Σ1(|S|+1, |S|+1) = σw since the noise term evolves with variance σw. The system matrix is A = I, and the observation matrix is C = [0 0 . . . 1i . . . 0 0 1] where the 1i occurs in the ith position when our observed state is state i. Kalman filters [Kalman, 1960] are Bayes optimal, minimum mean-squared-error estimators for linear systems with Gaussian noise. The agent applies the following causal Kalman filtering equations at each time step to obtain maximum likelihood estimates for b and the individual rewards r(i) for each state i given all previous observations. First, the estimate ˆx and its covariance matrix P are updated in time based on the linear system model: ˆx′ t = Aˆxt−1 (1) P ′ t = APt−1AT + Σ1 (2) Then these a priori estimates are updated using the current time period’s observation gt: Kt = P ′ tCT (CP ′ tCT + Σ2)−1 (3) ˆxt = ˆx′ t + Kt(gt −Cˆx′ t) (4) Pt = (I −KtC)P ′ t (5) As shown, the Kalman filter also gives us the estimation error covariance Pt, from which we know the variance of the estimates for r and b. We can also compute the likelihood of observing gt given the model and all the previous observations. This will be handy for evaluating the fit of our model, if needed. We could also create more complicated models if our domain knowledge shows that a different model would be more suitable. For example, if we wanted to capture the effect of an upward bias in the evolution of the noise process (perhaps to model the fact that all the agents are learning and achieving higher rewards), we could add another variable u, initialized such that u0 > 0, modifying x to be x = [rT b u]T , and changing our noise term update equation to bt+1 = bt + ut + wt. In other cases, we might wish to use non-linear models that would require more sophisticated techniques such as extended Kalman filters. For the learning mechanism, we use a simple tabular Q-learning algorithm [Sutton and Barto, 1999], since we wish to focus our attention on the reward signal problem. Q-learning keeps a “Q-value” for each state-action pair, and proceeds using the following update rule: Qt(s, a) = (1 −α)Qt−1(s, a) + α(r + γ min a′ Qt(s′, a′)) , (6) where 0 < α < 1 is parameter that controls the learning rate, r is the reward signal used for learning at time t given s and a, 0 < γ ≤1 is the discount factor, and s, a, and s′ are the current state, action, and next state of the agent, respectively. Under fairly general conditions, in a stationary MDP, Q-learning converges to the optimal policy, expressed as π(s) = argmaxa Q(s, a) . 2 ... 3 4 +5 1 24 25 +10 ... Figure 1: This shows the dynamics of our 5x5 grid world domain. The states correspond to the grid locations, numbered 1,2,3,4,...,24,25. Actions move the agent N,S,E, or W, except in states 6 and 16, where any action takes the agent to state 10 and 18, respectively, shown by the curved arrows in the figure at left. The optimal policy is shown at center, where multiple arrows at one state denotes indifference between the possibilities. A policy learned by our filtering agent is shown at right. 4 The filtering learning agent Like any good student, the filtering learning agent chooses to accept well-deserved praise from its teacher and ignore over-effusive rewards. The good student does not update his behavior at every time step, but only upon observing relevant rewards. The question remains: How does an agent decide upon the relevance of the rewards it sees? We have proposed a model in which undeserved rewards over time are captured by a Markov random process b. Using observations from previous states and actions, an agent can approach this question from two perspectives. In the first, each time the agent visits a particular state i, it should gain a better sense of the evolution of the random variable b between its last visit and its current visit. It is important to note that rewards are received frequently, thus allowing frequent updating of b. Secondly, given an estimate of bt upon visiting state i at time t, it has a better idea of the value of bt+1 when it visits state i′ at time t + 1, since we assume bt evolves slowly over time. These are the ideas captured by the causal Kalman filter, which only uses the history of past states and observations to provides estimates of r(i) and b. The agent follows this simple algorithm: 1. From initial state i0, take some action a, transition to state i, and receive reward signal g0. Initialize ˆx0(i0) = g0 and ˆx0(|S| + 1) = b0 = 0, since b0 = 0. 2. Perform a Kalman update using equations 1-5 to compute the current vector of estimates ˆx, which includes a component that is the reward estimate ˆr(i0), which will simply equal g this time. 3. From the current state i at time t, take another action with some mix of exploration and exploitation; transition to state j, receiving reward signal gt. If this is the first visit to state i, initialize ˆxt(i) = gt −ˆbt−1. 4. Perform a Kalman update using equations 1-5 to compute the current vector of estimates ˆx, which includes a component that is the reward estimate ˆr(i). 5. Update the Q-table using ˆr(i) in place of r in equation 6; return to Step 3. The advantage of the Kalman filter is that it requires a constant amount of memory – at no time does it need a full history of states and observations. Instead, it computes a sufficient statistic during each update, x and P, which consists of the maximum likelihood estimate of r and b, and the covariance matrix of this estimate. Thus, we can run this algorithm online as we learn, and its speed does not deteriorate over time. Its speed is most tied to 0 500 1000 1500 2000 2500 3000 −50 0 50 100 150 200 250 0 500 1000 1500 2000 2500 3000 −5 0 5 10 15 20 0 0.2 0.4 0.6 0.8 1 1.2 1.4 1.6 1.8 2 x 10 4 0 0.5 1 1.5 2 2.5 3 3.5 Figure 2: (Left) As the agent is attempting to learn, the reward signal value (y-axis) changes dramatically over time (x-axis) due to the noise term. While the true range of rewards in this grid world domain only falls between 0 and 20, the noisy reward signal ranges from -10 to 250, as shown in the graph at left. (Center) Given this noisy signal, the filtering agent is still able to learn the true underlying rewards, converging to the correct relative values over time, as shown in the middle graph. (Right) The filtering learning agent (bold line) accrues higher rewards over time than the ordinary Q-learner (thin line), since it is able to converge to an optimal policy whereas the non-filtering Q-learner remains confused. the number of observation states that we choose to use, since the Kalman update (Eqn. 3) needs to perform a matrix inversion of size |S| × |S|. However, since our model assumes the agent only has access to a limited, local observation space within the true global state space, this computation remains feasible. 5 Empirical results If the world dynamics exactly match the linear model we provide the Kalman filter, then this method will provably converge to the correct reward value estimates and the find the optimal policy under conditions similar to those guaranteeing Q-learning’s eventual convergence. However, we would rarely expect the world to fit this grossly simplified model. The interesting question concerns situations in which the actual dynamics are clearly different from our model, and whether our filtering agent will still learn a good policy. This section examines the efficacy of the filtering learning agent in several increasingly difficult domains: (1) a single agent domain in which the linear system describes the world perfectly, (2) a single agent domain where the noise is manually adjusted without following the model, (3) a multi-agent setting in which the noise term is meant to encapsulate presence of other agents in the environment, and (4) a more complicated multi-agent setting that simulates an mobile ad-hoc networking domain in which mobile agent nodes try to maximize total network performance. For ease of exposition, all the domains we use are variants of the popular grid-world domain shown in Figure 1 [Sutton and Barto, 1999]. The agent is able to move North, South, East, or West, and most transitions give the agent zero reward, except all actions from state 6 move the agent directly to state 10 with a reward of 20, and all actions from state 16 move the agent directly to state 18 with a reward of 10. Bumps into the wall cost the agent -1 in reward and move the agent nowhere. We use a discount factor of 0.9. To demonstrate the basic feasibility of our filtering method, we first create a domain that follows the linear model of the world given in Section 3 perfectly. That is, in each time step, a single agent receives its true reward plus some noise term that evolves as a Markov random process. To achieve this, we simply add a noise term to the grid world domain given in Figure 1. As shown in Figure 2, an agent acting in this domain will receive a large range of reward values due to the evolving noise term. In the example given, sometimes this value ranges as high as 250 even though the maximum reward in the grid world is 0 1 2 3 4 5 6 7 8 9 10 x 10 4 −1 −0.5 0 0.5 1 1.5 2 2.5 3 3.5 4 0 1 2 3 4 5 6 7 8 9 10 x 10 4 −0.5 0 0.5 1 1.5 2 2.5 3 3.5 4 Figure 3: (Left) Filtering agents are able to distinguish their personal rewards from the global reward noise, and thus able to learn optimal policies and maximize their average reward over time in a ten-agent grid-world domain. (Right) In contrast, ordinary Q-learning agents do not process the global reward signal and can become confused as the environment changes around them. Graphs show average rewards (y-axis) within 1000-period windows for each of the 10 agents in a typical run of 10000 time periods (x-axis). 20 – the noise term contributes 230 to the reward signal! A standard Q-learning agent does not stand a chance at learning anything useful using this reward signal. However, the filtering agent can recover the true reward signal from this noisy signal and use that to learn. Figure 2 shows that the filtering agent can learn the underlying reward signals, converging to these values relatively quickly. The graph to the right compares the performance of the filtering learner to the normal Q-learner, showing a clear performance advantage. The observant reader may note that the learned rewards do not match the true rewards specified by the grid world. Specifically, they are offset by about -4. Instead of mostly 0 rewards at each state, the agent has concluded that most states produce reward of -4. Correspondingly, state 6 now produces a reward of about 16 instead of 20. Since Q-learning will still learn the correct optimal policy subject to scaling or translation of the rewards, this is not a problem. This oddity is due to the fact that our model has a degree of freedom in the noise term b. Depending on the initial guesses of our algorithm, the estimates for the rewards may be biased. If most of the initial guesses for the rewards underestimated the true reward, then the learned value will be correspondingly lower than the actual true value. In fact, all the learned values will be correspondingly lower by the same amount. To further test our filtering technique, we next evaluate its performance in a domain that does not conform to our noise model perfectly, but which is still a single agent system. Instead of an external reward term that evolves according to a Gaussian noise process, we adjust the noise manually, introducing positive and negative swings in the reward signal values at arbitrary times. The results are similar to those in the perfectly modeled domain, showing that the filtering method is fairly robust. The most interesting case occurs when the domain noise is actually caused by other agents learning in the environment. This noise will not evolve according to a Gaussian process, but since the filtering method is fairly robust, we might still expect it to work. If there are enough other agents in the world, then the noise they collectively generate may actually tend towards Gaussian noise. Here we focus on smaller cases where there are 6 or 10 agents operating in the environment. We modify the grid world domain to include multiple simultaneously-acting agents, whose actions do not interfere with each other, but whose reward signal now consists of the sum of all the agents’ personal rewards, as given in the basic single agent grid world of Figure 1. We again compare the performance of the filtering learner to the ordinary Q-learning algorithm. As shown in Figure 3, most of the filtering learners quickly converge to the optimal R S S 0 1 2 3 4 5 6 7 8 9 10 x 10 4 1 Figure 4: (Left) A snapshot of the 4x4 adhoc-networking domain. S denotes the sources, R is the receiver, and the dots are the learning agents, which act as relay nodes. Lines denote current connections. Note that nodes may overlap. (Right) Graph shows average rewards (y-axis) in 1000-period windows as filtering (bold line) and ordinary (thin line) agents try to learn good policies for acting as network nodes. The filtering agent is able to learn a better policy, resulting in higher network performance (global reward). Graph shows the average for each type of agent over 10 trial runs of 100000 time periods (x-axis) each. policy. Three of the 10 agents converge to a suboptimal policy that produces slightly lower average rewards. However, this artifact is largely due to our choice of exploration rate, rather than a large error in the estimated reward values. The standard Q-learning algorithm also produces decent results at first. Approximately half of the agents find the optimal policy, while the other half are still exploring and learning. An interesting phenomenon occurs when these other agents finally find the optimal policy and begin receiving higher rewards. Suddenly the performance drops drastically for the agents who had found the optimal policy first. Though seemingly strange, this provides a perfect example of the behavior that motivates this paper. When the other agents learn an optimal policy, they begin affecting the global reward, contributing some positive amount rather than a consistent zero. This changes the world dynamics for the agents who had already learned the optimal policy and causes them to “unlearn” their good behavior. The unstable dynamics of the Q-learners could be solved if the agents had full observability, and we could learn using the joint actions of all the agents, as in the work of Claus and Boutilier [1998]. However, since our premise is that agents have only a limited view of the world, the Q-learning agents will only exhibit convergence to the optimal policy if they converge to the optimal policy simultaneously. This may take a prohibitively long time, especially as the number of agents grows. Finally, we apply our filtering method to a more realistic domain. Mobilized ad-hoc networking provides an interesting real-world environment that illustrates the importance of reward filtering due to its high degree of partial observability and a reward signal that depends on the global state. In this domain, there are a number of mobile nodes whose task is to move in such a way as to optimize the connectivity (performance) of the network. Chang et al. [2003] cast this as a reinforcement learning problem. As the nodes move around, connections form between nodes that are within range of one another. These connections allow packets to be transmitted between various sources and receivers scattered among the nodes. The nodes are limited to having only local knowledge of their immediate neighboring grid locations (rather than the numbered state locations as in the original grid world), and thus do not know their absolute location on the grid. They are trained using a global reward signal that is a measure of total network performance, and their actions are limited functions that map their local state to N, S, E, W movements. We also limit their transmission range to a distance of one grid block. For simplicity, the single receiver is stationary and always occupies the grid location (1,1). Source nodes move around randomly, and in our example here, there are two sources and eight mobile agent nodes in a 4x4 grid. This setup is shown in Figure 4, and the graph shows a comparison of an ordinary Q-learner and the filtering learner, plotting the increase in global rewards over time as the agents learn to perform their task as intermediate network nodes. The graph plots average performance over 10 runs, showing the benefit of the filtering process. 6 Limitations and extensions The Kalman filtering framework seems to work well in these example domains. However, there are some cases where we may need to apply more sophisticated techniques. In all the above work, we have assumed that the reward signal is deterministic – each state, action pair only produces a single reward value. There are some domains in which we’d like to model the reward as being stochastic, such as the multi-armed bandit problem. When the stochasticity of the rewards approximates Gaussian noise, we can use the Kalman framework directly. In equation 1, v was set to exhibit zero mean and zero variance. However, allowing some variance would give the model an observation noise term that could reflect the stochasticity of the reward signal. Finally, in most cases the Kalman filtering method provides a very good estimate of r over time. However, since we cannot guarantee an exact estimate of the reward values when the model is not an exact representation of the world, the agent may make the wrong policy decision sometimes. However, even if the policy is sub-optimal, the error in our derived value function is at least bounded by ϵ 1−γ , as long as the |r(i) −ˆr(i)| < ϵ ∀i, and γ is again the discount rate. In the majority of cases, the estimates are good enough to lead the agent to learning a good policy. Conclusion and future work. This paper provides the general framework for a new approach to solving large multi-agent problems using a simple model that allows for efficient and robust learning using well-studied tools such as Kalman filtering. As a practical application, we are working on applying these methods to a more realistic version of the mobile ad-hoc networking domain. References [Auer et al., 1995] P. Auer, N. Cesa-Bianchi, Y. Freund, and R. Schapire. Gambling in a rigged casino: the adversarial multi-armed bandit problem. In Proceedings of the 36th Annual Symposium on Foundations of Computer Science, 1995. [Chang et al., 2003] Y. Chang, T. Ho, and L. P. Kaelbling. Reinforcement learning in mobilized ad-hoc networks. MIT AI Lab Memo AIM-2003-025, 2003. [Choi et al., 1999] S. Choi, D. Yeung, and N. Zhang. Hidden-mode Markov decision processes. In IJCAI Workshop on Neural, Symbolic, and Reinforcement Methods for Sequence Learning, 1999. [Claus and Boutilier, 1998] Caroline Claus and Craig Boutilier. The dynamics of reinforcement learning in cooperative multiaent systems. In Proceedings of the 15th AAAI, 1998. [Kalman, 1960] R. E. Kalman. A new approach to linear filtering and prediction problems. Transactions of the American Society of Mechanical Engineers, Journal of Basic Engineering, 1960. [McMahan et al., 2003] H. McMahan, G. Gordon, and A. Blum. Planning in the presence of cost functions controlled by an adversary. In Proceedings of the 20th ICML, 2003. [Ng et al., 1999] Andrew Y. Ng, Daishi Harada, and Stuart Russell. Policy invariance under reward transformations: theory and application to reward shaping. In Proc. 16th ICML, 1999. [Sutton and Barto, 1999] Richard S. Sutton and Andrew G. Barto. Reinforcement Learning: An Introduction. MIT Press, 1999. [Szita et al., 2002] Istvan Szita, Balimt Takacs, and Andras Lorincz. e-mdps: Learning in varying environments. Journal of Machine Learning Research, 2002. [Wolpert and Tumer, 1999] D. Wolpert and K. Tumer. An introduction to collective intelligence. Tech Report NASA-ARC-IC-99-63, 1999.
2003
157
2,373
Automatic Annotation of Everyday Movements Deva Ramanan and D. A. Forsyth Computer Science Division University of California, Berkeley Berkeley, CA 94720 ramanan@cs.berkeley.edu, daf@cs.berkeley.edu Abstract This paper describes a system that can annotate a video sequence with: a description of the appearance of each actor; when the actor is in view; and a representation of the actor’s activity while in view. The system does not require a fixed background, and is automatic. The system works by (1) tracking people in 2D and then, using an annotated motion capture dataset, (2) synthesizing an annotated 3D motion sequence matching the 2D tracks. The 3D motion capture data is manually annotated off-line using a class structure that describes everyday motions and allows motion annotations to be composed — one may jump while running, for example. Descriptions computed from video of real motions show that the method is accurate. 1. Introduction It would be useful to have a system that could take large volumes of video data of people engaged in everyday activities and produce annotations of that data with statements about the activities of the actors. Applications demand that an annotation system: is wholly automatic; can operate largely independent of assumptions about the background or the number of actors; can describe a wide range of everyday movements; does not fail catastrophically when it encounters an unfamiliar motion; and allows easy revision of the motion descriptions that it uses. We describe a system that largely has these properties. We track multiple figures in video data automatically. We then synthesize 3D motion sequences matching our 2D tracks using a collection of annotated motion capture data, and then apply the annotations of the synthesized sequence to the video. Previous work is extensive, as classifying human motions from some input is a matter of obvious importance. Space does not allow a full review of the literature; see [1, 5, 4, 9, 13]. Because people do not change in appearance from frame to frame, a practical strategy is to cluster an appearance model for each possible person over the sequence, and then use these models to drive detection. This yields a tracker that is capable of meeting all our criteria, described in greater detail in [14]; we used the tracker of that paper. Leventon and Freeman show that tracks can be significantly improved by comparison with human motion [12]. Describing motion is subtle, because we require a set of categories into which the motion can be classified; except in the case of specific activities, there is no known natural set of categories. Special cases include ballet and aerobic moves, which have a clearly established categorical structure [5, 6]. In our opinion, it is difficult to establish a canonical set of human motion categories, and more practical to produce a system that allows easy revision of the categories (section 2). Figure 1 shows an overview of our approach to activity recognition. We use 3 core components; annotation, tracking, and motion synthesis. Initially, a user labels a collection of 3D motion capture frames with annotations (section 2). Given a new video sequence to annotate, we use a kinematic tracker to obtain 2D tracks of each figure in sequence (section 3). library 3D motion 2D tracks tracker user synthesis motion video annotations Figure 1: Our annotation system consists of 3 main components; annotation, tracking, and motion synthesis (the shaded nodes). A user initially labels a collection of 3D motion capture frames with annotations. Given a new video sequence to annotate, we use a kinematic tracker to obtain 2D tracks of each figure in sequence. We then synthesize 3D motion sequences which look like the 2D tracks by lifting tracks to 3D and matching them to our annotated motion capture library. We accept the annotations associated with the synthesized 3D motion sequence as annotations for the underlying video sequence. We then synthesize 3D motion sequences which look like the 2D tracks by lifting tracks to 3D and matching them to our annotated motion capture library (section 4). We finally smooth the annotations associated with the synthesized 3D motion sequence (section 5), accepting them as annotations for the underlying video sequence. 2. Obtaining Annotated Data We have annotated a body of motion data with an annotation system, described in detail in [3]; we repeat some information here for the convenience of the reader. There is no reason to believe that a canonical annotation vocabulary is available for everyday motion, meaning that the system of annotation should be flexible. Annotations should allow for composition as one can wave while walking, for example. We achieve this by representing each separate term in the vocabulary as a bit in a bit string. Our annotation system attaches a bit string to each frame of motion. Each bit in the string represents annotation with a particular element of the vocabulary, meaning that elements of the vocabulary can be composed arbitrarily. Actual annotation is simplified by using an approach where the user bootstraps a classifier. One SVM classifier is learned for each element of the vocabulary. The user annotates a series of example frames by hand by selecting a sequence from the motion collection; a classifier is then learned from these examples, and the user reviews the resulting annotations. If they are not acceptable, the user revises the annotations at will, and then re-learns a classifier. Each classifier is learned independently. The classifier itself uses a radial basis function kernel, and uses the joint positions for one second of motion centered at the frame being classified as a feature vector. Since the motion is sampled in time, each joint has a discrete 3D trajectory in space for the second of motion centered at the frame. In our implementation, we used a public domain SVM library (libsvm [7]). The out of margin cost for the SVM is kept high to force a good fit within the capabilities of the basis function approximation. Our reference collection consists of a total of 7 minutes of motion capture data. The vocabulary that we chose to annotate this database consisted of: run, walk, wave, jump, turn left, turn right, catch, reach, carry, backwards, crouch, stand, and pick up. Some of these annotations co-occur: turn left while walking, or catch while jumping and running. Our approach admits any combination of annotations, though some combinations may not be used in practice: for example, we can’t conceive of a motion that should be annotated with both stand and run. A different choice of vocabulary would be appropriate for different collections. The annotations are not required to be canonical. We have verified that a consistent set of annotations to describe a motion set can be picked by asking people outside our research group to annotate the same database and comparing annotation results. 3. Kinematic Tracking We use the tracker of [14], which is described in greater detail in that paper. We repeat some information here for the convenience of the reader. The tracker works by building an appearance model of putative actors, detecting instances of that model, and linking the instances across time. The appearance model approximates a view of the body as a puppet built of colored, textured rectangles. The model is built by applying detuned body segment detectors to some or all frames in a sequence. These detectors respond to roughly parallel contrast energies at a set of fixed scales (one for the torso and one for other segments). A detector response at a given position and orientation suggests that there may be a rectangle there. For the frames that are used to build the model, we cluster together segments that are sufficiently close in appearance — as encoded by a patch of pixels within the segment — and appear in multiple frames without violating upper bounds on velocity. Clusters that contain segments that do not move at any point of the sequence are then rejected. The next step is to build assemblies of segments that lie together like a body puppet. The torso is used as a root, because our torso detector is quite reliable. One then looks for segments that lie close to the torso in multiple frames to form arm and leg segments. This procedure does not require a reliable initial segment detector, because we are using many frames to build a model — if a segment is missed in a few frames, it can be found in others. We are currently assuming that each individual is differently dressed, so that the number of individuals is the number of distinct appearance models. Detecting the learned appearance model in the sequence of frames is straightforward [8]. 4. 3D Motion Synthesis Once the 2D configuration of actors has been identified, we need to synthesize a sequence of 3D configurations matching the 2D reports. Maintaining a degree of smoothness — i.e. ensuring that not only is a 3D representation a good match to the 2D configuration, but also links well to the previous and future 3D representations — is a needed because the image detection is not perfect. We assume that camera motion can be recovered from a video sequence and so we need only to recover the pose of the root of the body model — in our case, the torso — with respect to the camera. Representing Body Configuration: We assume the camera is orthographic and is oriented with the y axis perpendicular to the ground plane, by far the most important case. From the puppet we can compute 2D positions for various key points on the body (we use the left-right shoulder, elbow, wrist, knee, ankle and the upper & lower torso). We represent the 2D key points with respect to a 2D torso coordinate frame. We analogously convert the motion capture data to 3D key points represented with respect to the 3D torso coordinate frame. We assume that all people are within an isotropic scaling of one another. This means that the scaling of the body can be folded in with the camera scale, and the overall scale is be estimated using corresponding limb lengths in lateral views (which can be identified because they maximize the limb lengths). This strategy would probably lead to difficulties if, for example, the motion capture data came from an individual with a short torso and long arms; the tendency of ratios of body segment lengths to vary from individual to individual and with age is a known, but not well understood, source of trouble in studies of human motion [10]. Our motion capture database is too large for us to use every frame in the matching process. Furthermore, many motion fragments are similar — there is an awful lot of running — so we vector quantize the 11,000 frames down to k = 300 frames by clustering with k-means and retaining only the cluster medoids. Our distance metric is a weighted sum of differences between 3D key point positions, velocities, and accelerations ([2] found this metric sufficient to ensure smooth motion synthesis). The motion capture data are Undirected model T 2 M 2 T 3 M 3 T 1 1 M T 2 M 2 T 3 M 3 T 1 1 M 1 M 1 m T 1 1t 1 M T 1 t m T M Factorial HMM Triangulated FHMM Directed model Variables (a) (e) (d) (c) (b) Figure 2: In (a), the variables under discussion in camera inference. M is a representation of figure in 3D with respect to its root coordinate frame, m is the partially observed vector of 2D key points, t is the known camera position and T is the position of the root of the 3D figure. In (b) a camera model for frame i where 2D keypoints are dependent on the camera position, 3D figure configuration, and the root of the 3D figure. A simplified undirected model in (c) is obtained by marginalizing out the observed variables yielding a single potential on M i and T i. In (d), the factorial hidden Markov model obtained by extending the undirected model across time. As we show in the text, it is unwise to yield to the temptation to cut links between T’s (or M’s) to obtain a simplified model. However, our FHMM is tractable, and yields the triangulated model in (e). represented at the same frame rate as the video, to ensure consistent velocity estimates. Modeling Root Configuration: Figure 2 illustrates our variables. For a given frame, we have unknowns M, a vector of 3D key points and T, the 3D global root position. Known are m, the (partially) observed vector of 2D key points, and t, the known camera position. In practice, we do not need to model the translations for the 3D root (which is the torso); our tracker reports the (x, y) image position for the torso, and we simply accept these reports. This means that T reduces to a single scalar representing the orientation of the torso along the ground plane. The relative out of image plane movement of the torso (in the z direction) can be recovered from the final inferred M and T values by integration — one sums the out of plane velocities of the rotated motion capture frames. Figure 2 shows the directed graphical model linking these variables for a single frame. This model can be converted to an undirected model — also shown in the figure — where the observed 2D key points specify a potential between Mi and Ti. Write the potential for the ith frame as ψviewi(Mi, Ti). We wish to minimize image error, so it is natural to use backprojection error for the potential. This means that ψviewi(Mi, Ti) is the mean squared error between the visible 2D key points mi and the corresponding 3D keypoints Mi rendered at orientation Ti. To handle left-right ambiguities, we take the minimum error over all left-right assignments. To incorporate higher-order dynamic information such as velocities and accelerations, we add keypoints from the two preceding and two following frames when computing the mean squared error. We quantize the torso orientation Ti into a total of c = 20 values. This means that the potential ψviewi(Mi, Ti) is represented by a c × k table (recall that k is the total number of motion capture medoids used, section 4). We must also define a potential linking body configurations in time, representing the continuity cost of placing one motion after another. We write this potential as ψlink(Mi, Mi+1). This is a k × k table, and we set the (i, j)’th entry of this table to be the distance between the j’th medoid and the frame following the i’th medoid, using the metric used for vector quantizing the motion capture dataset (section 4). Inferring Root Configuration: The model of figure 2-(d) is known as a factorial hidden Markov model (FHMM) where observations have been marginalized out and is quite tractable. Exact inference requires triangulating the graph (figure 2-(e)) to make explicit additional probabilistic dependencies [11].The maximum clique size is now 3, making inference O(k2cN) (where N is the number of total frames). Furthermore, the triangulation allows us to explicitly define the potential ψtorso(Mi, Ti, Ti+1) to capture the dependency Bkwd Catch Run Carry RTurn LTurn Crouch Reach Jump Pick up Wave Walk Stand FFace Present Extend Closed fFace present Bkwd Catch Run Carry RTurn LTurn Crouch Reach Jump Pick up Wave Walk Stand FFace Present Extend Closed fFace present Manual Automatic time time Figure 3: Unfamiliar configurations can either be annotated with ’null’ or with the closest match. We show smoothed annotation results for a sequence of jumping jacks (sometimes known as star jumps) from two such annotation systems. In the top row, we show the same two frames run through each system. The MAP reconstruction of the human figure obtained from the tracking data has been reprojected back to the image, using the MAP estimate of camera configuration. In the bottom, we show signals representing annotation bits over time. The manual annotator records whether or not the figure is present, front faceing, in a closed stance, and/or in an extended stance. The automatic annotation consists of a total of 16 bits; present, front faceing, plus the 13 bits from the annotation vocabulary of Sec.2. In first dotted line, corresponding to the image above it, the manual annotator asserts the figure is present, frontally faceing, and about to reach the extended stance. The automatic annotator asserts the figure is present, frontally faceing, and walking and waveing, and is not standing, not jumping, etc. The annotations for both systems are reasonable given there are no corresponding categories available (this is like describing a movement that is totally unfamiliar). On the left, we freely allow ’null’ annotations (where no annotation bit is set). On the right, we discourage ’null’ annotations as described in Sec.6. Configurations near the closed stance are now labeled as standing, a reasonable approximation. of torso angular velocity on the given motion. For example, we expect the torso angular velocity of a turning motion frame to be different from a walking forward frame. We set a given entry of this table to be the squared error between the sampled angular velocity (Ti+1 −Ti, shifted to lie between −π . . . π) and the actual torso angular velocity of the medoid Mi. We scale the ψviewi(Mi, Ti), ψlink(Mi, Mi+1), and ψtorso(Mi, Ti, Ti+1) potentials by empirically determined values to yield satisfactory results. These scale factors are weight the degree to which the final 3D track should be continuous versus the degree to which it should match the 2D data. In principle, these weights could be set optimally by a detailed study of the properties of our tracker, but we have found it simpler to set them by experiment. We find the maximum a posteriori (MAP) estimate of Mi and Ti by a variant of dynamic programming defined for clique trees [11]. Since we implicitly used negative log likelihoods to define the potentials (the squared error terms), we used the min-sum variant of the max-product algorithm. Possible Variants: One might choose to not enforce consistency in the root orientation Ti between frames. By breaking the links between the Ti variables in figure 2-(a), we could Catch Run Carry RTurn Crouch Reach Jump Pick up Wave LTurn Bkwd Stand Walk LFace RFace Present bkwd stop walk lFace rFace present Catch Run Carry RTurn Crouch Reach Jump Pick up Wave LTurn Bkwd Stand Walk LFace RFace Present bkwd stop walk lFace rFace present Automatic Manual Catch Run Carry RTurn Crouch Reach Jump Pick up Wave LTurn Bkwd Stand Walk LFace RFace Present bkwd stop walk lFace rFace present time time time Figure 4: We show annotation results for a walking sequence from three versions of our system using the notation of Fig.3. Null matches are allowed. On the left, we infer the 3D configuration M i (and associated annotation) independently for each frame, as discussed in Sec.4. In the center, we model temporal dependencies when inferring M i and its corresponding annotation. On the right, we smooth the annotations, as discussed in Sec.5. Each image is labeled with an arrow pointing in the direction the inferred figure is facing, not moving. By modeling camera dependencies, we are able to fix incorrect torso orientations present in the left system (i.e., the first image frame and the automatic left faceing and right faceing annotation bits). By smoothing the annotations, we eliminate spurious stand’s present in the center. Although the smoothing system correctly annotates the last image frame with backward, the occluded arm incorrectly triggers a wave, by the mechanism described in Sec.5. reduce our model to a tree and make inference even simpler — we now have an HMM. However, this is simplicity at the cost of wasting an important constraint — the camera does not flip around the body from frame to frame. This constraint is useful, because our current image representation provides very little information about the direction of movement in some cases. In particular, in a lateral view of a figure in the stance phase of walking it is very difficult to tell which way the actor is facing without reference to other frames — where it may not be ambiguous. We have found that if one does break these links, the reconstruction regularly flips direction around such frames. 5. Reporting Annotations We now have MAP estimates of the 3D configuration { ˆ Mi} and orientation { ˆTi} of the body for each frame. The simplest method for reporting annotations is to produce an annotation that is some function of { ˆ Mi}. Recall that { ˆ Mi} is one of the medoids produced by our clustering process (section 4). It represents a cluster of frames, all of which are similar. We could now report either the annotation of the medoid, the annotation that appears most frequently in the cluster, the annotation of the cluster element that matches the image best, or the frequency of annotations across the cluster. The fourth alternative produces results that may be useful for some kinds of decisionmaking, but are very difficult to interpret directly — each frame generates a posterior probability over the annotation vocabulary — and we do not discuss it further here. Each of the first three tends to produce choppy annotation streams (figure 4, center). This is because we have vector quantized the motion capture frames, meaning that ψlink(Mi, Mi+1) is a Bkwd Carry RTurn LTurn Crouch Stand Jump Pick up Reach Wave Catch Walk Run LFace RFace Present throw catch run lFace rFace present Bkwd Carry RTurn LTurn Crouch Stand Jump Pick up Reach Wave Catch Walk Run LFace RFace Present throw catch run lFace rFace present Bkwd Carry RTurn LTurn Crouch Stand Jump Pick up Reach Wave Catch Walk Run LFace RFace Present throw catch run lFace rFace present Manual Automatic time time time Figure 5: Smoothed annotations of 3 figures from a video sequence of the three passing a ball back and forth using the conventions of figure 3. Null matches are allowed. The dashed vertical lines indicate annotations corresponding to the frames shown. The automatic annotations are largely accurate: the figures are correctly identified, and the direction in which the figures are facing are largely correct. There is some confusion between run and walk, and throws appear to be identified as waves and reaches. Generally, when the figure has the ball (after catching and before throwing, as denoted in the manual annotations), he is annotated as carrying, though there is some false detection. There are no spurious crouches, turns, etc. fairly rough approximation of a smoothness constraint (because some frames in one cluster might link well to some frames in another and badly to others in that same cluster). An alternative is to smooth the annotation stream. Smoothing Annotations: Recall that we have 13 terms in our annotation vocabulary, each of which can be on or off for any given frame. Of the 213 possible bit strings, we observe a total of 32 in our set of motions. Clearly, we cannot smooth annotation bits directly, because we might very likely create bit strings that never occur. Instead, we regard each observed annotation string as a codeword. We can model the temporal dynamics of codewords and their quantized observations using a standard HMM. The hidden state is the code word, taking on one of l (= 32) values, while the observed state is the cluster, taking on one of k (= 300) values. This model is defined by a l × l matrix representing codeword dynamics and a l × k matrix representing the quantized observation. Note that this model is fully observed in the 11,000 frames of the motion database; we know the true code word for each motion frame and the cluster to which the frame belongs. Hence we can learn both matrices through straightforward multinomial estimation. We now apply this model to the MAP estimate of { ˆ Mi}, inferring a sequence of annotation codewords (which we can later expand back into annotation bit vectors). Occlusion:When a limb is not detected by the tracker, the configuration of that limb is not scored in evaluating the potential. In turn, this means that the best configuration consistent with all else detected is used, in this case with the figure waving (figure 4). In an ideal closed world, we can assume the limb is missing because its not there; in practice, it may be due to a detector failure. This makes employing “negative evidence” difficult. 6. Experimental Results It is difficult to evaluate results simply by recording detection information (say an ROC for events). Furthermore, there is no meaningful standard against which one can compare. Instead, we lay out a comparison between human and automatic annotations, as in Fig.3, which shows annotation results for a 91 frame jumping jack (or star jump) sequence. The top 4 lower case annotations are hand-labeled over the entire 91 frame sequence. Generally, automatic annotation is successful: the figure is detected correctly, oriented correctly (this is recovered from the torso orientation estimates Ti), and the description of the figure’s activities is largely correct. Fig.4 compares three versions of our system on a 288 frame sequence of a figure walking back and forth. Comparing the annotations on the left (where configurations have been inferred without temporal dependency) with the center (with temporary dependency), we see temporal dependency in inferred configurations is important, because otherwise the figure can change direction quickly, particularly during lateral views of the stance phase of a walk (section 4). Comparing the center annotations with those on the right (smoothed with our HMM) shows that annotation smoothing makes it possible to remove spurious jump, reach, and stand labels — the label dynamics are wrong. We show smoothed annotations for three figures from one sequence passing a ball back and forth in Fig.5; the sequence contains a lot of fast movement. Each actor is correctly detected, and the system produces largely correct descriptions of the actor’s orientation and actions. The inference procedure interprets a run as a combination of run and walk. Quite often, the walk annotation will fire as the figure slows down to turn from face right to face left or vice versa. When the figures use their arms to catch or throw, we see increased activity for the similar annotations of catch, wave, and reach. When a novel motion is encountered, we want the system to either respond by (1) recognizing it cannot annotate this sequence, or (2) annotate it with the best match possible. We can implement (2) by adjusting the parameters for our smoothing HMM so that the ’null’ codeword (all annotation bits being off) is unlikely. In Fig.3, system (1) responds to a jumping jack sequence (star jump, in some circles) with a combination of walking and jumping while waveing. In system (2), we see an additional standing annotation for when the figure is near the closed stance. References [1] J. K. Aggarwal and Q. Cai. Human motion analysis: A review. Computer Vision and Image Understanding: CVIU, 73(3):428–440, 1999. [2] O. Arikan and D. Forsyth. Interactive motion generation from examples. In Proc. ACM SIGGRAPH, 2002. [3] O. Arikan, D. Forsyth, and J. O’Brien. Motion synthesis from annotations. In Proc. ACM SIGGRAPH, 2003. [4] A. Bobick. Movement, activity, and action: The role of knowledge in the perception of motion. Philosophical Transactions of Royal Society of London, B-352:1257–1265, 1997. [5] A. F. Bobick and J. Davis. The recognition of human movement using temporal templates. IEEE T. Pattern Analysis and Machine Intelligence, 23(3):257–267, 2001. [6] L. W. Campbell and A. F. Bobick. Recognition of human body motion using phase space constraints. In ICCV, pages 624–630, 1995. [7] C. C. Chang and C. J. Lin. Libsvm: Introduction and benchmarks. Technical report, Department of Computer Science and Information Engineering, National Taiwan University, 2000. [8] P. Felzenschwalb and D. Huttenlocher. Efficient matching of pictorial structures. In Proc CVPR, 2000. [9] D. M. Gavrila. The visual analysis of human movement: A survey. Computer Vision and Image Understanding: CVIU, 73(1):82–98, 1999. [10] J. K. Hodgins and N. S. Pollard. Adapting simulated behaviors for new characters. In SIGGRAPH - 97, 1997. [11] M. I. Jordan, editor. Learning in Graphical Models. MIT Press, Cambridge, MA, 1999. [12] M. Leventon and W. Freeman. Bayesian estimation of 3D human motion from an image sequence. Technical Report TR-98-06, MERL, 1998. [13] D. Ramanan and D. A. Forsyth. Automatic annotation of everyday movements. Technical report, UCB//CSD-03-1262, UC Berkeley, CA, 2003. [14] D. Ramanan and D. A. Forsyth. Finding and tracking people from the bottom up. In Proc CVPR, 2003.
2003
158
2,374
A classification-based cocktail-party processor Nicoleta Roman, DeLiang Wang Guy J. Brown Department of Computer and Information Department of Computer Science Science and Center for Cognitive Science University of Sheffield The Ohio State University 211 Portobello Street Columbus, OH 43210, USA Sheffield, S1 4DP, UK {niki,dwang}@cis.ohio-state.edu g.brown@dcs.shef.ac.uk Abstract At a cocktail party, a listener can selectively attend to a single voice and filter out other acoustical interferences. How to simulate this perceptual ability remains a great challenge. This paper describes a novel supervised learning approach to speech segregation, in which a target speech signal is separated from interfering sounds using spatial location cues: interaural time differences (ITD) and interaural intensity differences (IID). Motivated by the auditory masking effect, we employ the notion of an ideal time-frequency binary mask, which selects the target if it is stronger than the interference in a local time-frequency unit. Within a narrow frequency band, modifications to the relative strength of the target source with respect to the interference trigger systematic changes for estimated ITD and IID. For a given spatial configuration, this interaction produces characteristic clustering in the binaural feature space. Consequently, we perform pattern classification in order to estimate ideal binary masks. A systematic evaluation in terms of signal-to-noise ratio as well as automatic speech recognition performance shows that the resulting system produces masks very close to ideal binary ones. A quantitative comparison shows that our model yields significant improvement in performance over an existing approach. Furthermore, under certain conditions the model produces large speech intelligibility improvements with normal listeners. 1 Introduction The perceptual ability to detect, discriminate and recognize one utterance in a background of acoustic interference has been studied extensively under both monaural and binaural conditions [1, 2, 3]. The human auditory system is able to segregate a speech signal from an acoustic mixture using various cues, including fundamental frequency (F0), onset time and location, in a process that is known as auditory scene analysis (ASA) [1]. F0 is widely used in computational ASA systems that operate upon monaural input – however, systems that employ only this cue are limited to voiced speech [4, 5, 6]. Increased speech intelligibility in binaural listening compared to the monaural case has prompted research in designing cocktail-party processors based on spatial cues [7, 8, 9]. Such a system can be applied to, among other things, enhancing speech recognition in noisy environments and improving binaural hearing aid design. In this study, we propose a sound segregation model using binaural cues extracted from the responses of a KEMAR dummy head that realistically simulates the filtering process of the head, torso and external ear. A typical approach for signal reconstruction uses a time-frequency (T-F) mask: T-F units are weighted selectively in order to enhance the target signal. Here, we employ an ideal binary mask [6], which selects the T-F units where the signal energy is greater than the noise energy. The ideal mask notion is motivated by the human auditory masking phenomenon, in which a stronger signal masks a weaker one in the same critical band. In addition, from a theoretical ASA perspective, an ideal binary mask gives a performance ceiling for all binary masks. Moreover, such masks have been recently shown to provide a highly effective front-end for robust speech recognition [10]. We show for mixtures of multiple sound sources that there exists a strong correlation between the relative strength of target and interference and estimated ITD/IID, resulting in a characteristic clustering across frequency bands. Consequently, we employ a nonparametric classification method to determine decision regions in the joint ITDIID feature space that correspond to an optimal estimate for an ideal mask. Related models for estimating target masks through clustering have been proposed previously [11, 12]. Notably, the experimental results by Jourjine et al. [12] suggest that speech signals in a multiple-speaker condition obey to a large extent disjoint orthogonality in time and frequency. That is, at most one source has a nonzero energy at a specific time and frequency. Such models, however, assume input directly from microphone recordings and head-related filtering is not considered. Simulation of human binaural hearing introduces different constraints as well as clues to the problem. First, both ITD and IID should be utilized since IID is more reliable at higher frequencies than ITD. Second, frequency-dependent combinations of ITD and IID arise naturally for a fixed spatial configuration. Consequently, channel-dependent training should be performed for each frequency band. The rest of the paper is organized as follows. The next section contains the architecture of the model and describes our method for azimuth localization. Section 3 is devoted to ideal binary mask estimation, which constitutes the core of the model. Section 4 presents the performance of the system and a quantitative comparison with the Bodden [7] model. Section 5 concludes our paper. 2 Model architecture and azimuth localization Our model consists of the following stages: 1) a model of the auditory periphery; 2) frequency-dependent ITD/IID extraction and azimuth localization; 3) estimation of an ideal binary mask. The input to our model is a mixture of two or more signals presented at different, but fixed, locations. Signals are sampled at 44.1 kHz. We follow a standard procedure for simulating free-field acoustic signals from monaural signals (no reverberations are modeled). Binaural signals are obtained by filtering the monaural signals with measured head-related transfer functions (HRTF) from a KEMAR dummy head [13]. HRTFs introduce a natural combination of ITD and IID into the signals that is extracted in the subsequent stages of the model. To simulate the auditory periphery we use a bank of 128 gammatone filters in the range of 80 Hz to 5 kHz as described in [4]. In addition, the gains of the gammatone filters are adjusted in order to simulate the middle ear transfer function. In the final step of the peripheral model, the output of each gammatone filter is half-wave rectified in order to simulate firing rates of the auditory nerve. Saturation effects are modeled by taking the square root of the signal. Current models of azimuth localization almost invariably start with Jeffress’s crosscorrelation mechanism. For all frequency channels, we use the normalized crosscorrelation computed at lags equally distributed in the plausible range from –1 ms to 1 ms using an integration window of 20 ms. Frequency-dependent nonlinear transformations are used to map the time-delay axis onto the azimuth axis resulting in a cross-correlogram structure. In addition, a ‘skeleton’ cross-correlogram is formed by replacing the peaks in the cross-correlogram with Gaussians of narrower widths that are inversely proportional to the channel center frequency. This results in a sharpening effect, similar in principle to lateral inhibition. Assuming fixed sources, multiple locations are determined as peaks after summating the skeleton cross-correlogram across frequency and time. The number of sources and their locations computed here, as well as the target source location, feed to the next stage. 3 Binary mask estimation The objective of this stage of the model is to develop an efficient mechanism for estimating an ideal binary mask based on observed patterns of extracted ITD and IID features. Our theoretical analysis for two-source interactions in the case of pure tones shows relatively smooth changes for ITD and IID with the relative strength R between the two sources in narrow frequency bands [14]. More specifically, when the frequencies vary uniformly in a narrow band the derived mean values of ITD/IID estimates vary monotonically with respect to R. To capture this relationship in the context of real signals, statistics are collected for individual spatial configurations during training. We employ a training corpus consisting of 10 speech utterances from the TIMIT database (see [14] for details). In the two-source case, we divide the corpus in two equal sets: target and interference. In the three-source case, we select 4 signals for the target set and 2 interfering sets of 3 signals each. For all frequency channels, local estimates of ITD, IID and R are based on 20-ms time frames with 10 ms overlap between consecutive time frames. In order to eliminate the multi-peak ambiguity in the cross-correlation function for mid- and high-frequency channels, we use the following strategy. We compute ITDi as the peak location of the cross-correlation in the range i ω π / 2 centered at the target ITD, where i ω indicates the center frequency of the ith channel. On the other hand, IID and R are computed as follows: ∑ ∑ = t i t i i t l t r ) ( ) ( log 20 IID 2 2 10 ,         + = ∑ ∑ ∑ t i t i t i i t n t s t s R ) ( ) ( ) ( 2 2 2 where il and ir refer to the left and right peripheral output of the ith channel, respectively, is refers to the output for the target signal, and in that for the acoustic interference. In computing IIDi, we use 20 instead of 10 in order to compensate for the square root operation in the peripheral model. Fig. 1 shows empirical results obtained for a two-source configuration on the training corpus. The data exhibits a systematic shift for both ITD and IID with respect to the relative strength R. Moreover, the theoretical mean values obtained in the case of pure tones [14] match the empirical ones very well. This observation extends to multiple-source scenarios. As an example, Fig. 2 displays histograms that show the relationship between R and both ITD (Fig. 2A) and IID (Fig. 2B) for a three-source situation. Note that the interfering sources introduce systematic deviations for the binaural cues. Consider a worst case: the target is silent and two interferences have equal energy in a given T-F unit. This results in binaural cues indicating an auditory event at half of the distance between the two interference locations; for Fig. 2, it is 0° - the target location. However, the data in Fig. 2 has a low probability for this case and shows instead a clustering phenomenon, suggesting that in most cases only one source dominates a T-F unit. -1 1 0 1 ITD (ms) R theoretical empirical A -15 15 0 1 IID (dB) R theoretical empirical B Figure 1. Relationship between ITD/IID and relative strength R for a two-source configuration: target in the median plane and interference on the right side at 30°. The solid curve shows the theoretical mean and the dash curve shows the data mean. A: The scatter plot of ITD and R estimates for a filter channel with center frequency 500 Hz. B: Results for IID for a filter channel with center frequency 2.5 kHz. -0.5 0.5 0 1 ITD (ms) R -10 10 0 1 IID (dB) R -0.5 0.5 -10 10 ITD (ms) IID (dB) A B C Figure 2. Relationship between ITD/IID and relative strength R for a three-source configuration: target in the median plane and interference at -30° and 30°. Statistics are obtained for a channel with center frequency 1.5 kHz. A: Histogram of ITD and R samples. B: Histogram of IID and R samples. C: Clustering in the ITD-IID space. By displaying the information in the joint ITD-IID space (Fig. 2C), we observe location-based clustering of the binaural cues, which is clearly marked by strong peaks that correspond to distinct active sources. There exists a tradeoff between ITD and IID across frequencies, where ITD is most salient at low frequencies and IID at high frequencies [2]. But a fixed cutoff frequency that separates the effective use of ITD and IID does not exist for different spatial configurations. This motivates our choice of a joint ITD-IID feature space that optimizes the system performance across different configurations. Differential training seems necessary for different channels given that there exist variations of ITD and, especially, IID values for different center frequencies. Since the goal is to estimate an ideal binary mask, we focus on detecting decision regions in the 2-dimensional ITD-IID space for individual frequency channels. Consequently, supervised learning techniques can be applied. For the ith channel, we test the following two hypotheses. The first one is 1 H : target is dominant or 5.0 > iR , and the second one is 2 H : interference is dominant or 5.0 < i R . Based on the estimates of the bivariate densities ) | ( 1 H x p and ) | ( 2 H x p the classification is done by the maximum a posteriori decision rule: ) | ( ) ( ) | ( ) ( 2 2 1 1 H x p H p H x p H p > . There exist a plethora of techniques for probability density estimation ranging from parametric techniques (e.g. mixture of Gaussians) to nonparametric ones (e.g. kernel density estimators). In order to completely characterize the distribution of the data we use the kernel density estimation method independently for each frequency channel. One approach for finding smoothing parameters is the least-squares crossvalidation method, which is utilized in our estimation. One cue not employed in our model is the interaural time difference between signal envelopes (IED). Auditory models generally employ IED in the high-frequency range where the auditory system becomes gradually insensitive to ITD. We have compared the performance of the three binaural cues: ITD, IID and IED and have found no benefit for using IED in our system after incorporating ITD and IID [14]. 4 Performance and comparison The performance of a segregation system can be assessed in different ways, depending on intended applications. To extensively evaluate our model, we use the following three criteria: 1) a signal-to-noise (SNR) measure using the original target as signal; 2) ASR rates using our model as a front-end; and 3) human speech intelligibility tests. To conduct the SNR evaluation a segregated signal is reconstructed from a binary mask using a resynthesis method described in [5]. To quantitatively assess system performance, we measure the SNR using the original target speech as signal: ( ) ∑ ∑ − = t e o t o t s t s t s SNR 2 2 10 ) ( ) ( ) ( log 10 where ) (t so represents the resynthesized original speech and ) (t se the reconstructed speech from an estimated mask. One can measure the initial SNR by replacing the denominator with ) (t s N , the resynthesized original interference. Fig. 3 shows the systematic results for two-source scenarios using the Cooke corpus [4], which is commonly used in sound separation studies. The corpus has 100 mixtures obtained from 10 speech utterances mixed with 10 types of intrusion. We compare the SNR gain obtained by our model against that obtained using the ideal binary mask across different noise types. Excellent results are obtained when the target is close to the median plane for an azimuth separation as small as 5°. Performance degrades when the target source is moved to the side of the head, from an average gain of 13.7 dB for the target in the median plane (Fig. 3A) to 1.7 dB when target is at 80° (Fig. 3B). When spatial separation increases the performance improves even for side targets, to an average gain of 14.5 dB in Fig. 3C. This performance profile is in qualitative agreement with experimental data [2]. Fig. 4 illustrates the performance in a three-source scenario with target in the median plane and two interfering sources at –30° and 30°. Here 5 speech signals from the Cooke corpus form the target set and the other 5 form one interference set. The second interference set contains the 10 intrusions. The performance degrades compared to the two-source situation, from an average SNR of about 12 dB to 4.1 dB. However, the average SNR gain obtained is approximately 11.3 dB. This ability of our model to segregate mixtures of more than two sources differs from blind source separation with independent component analysis. In order to draw a quantitative comparison, we have implemented Bodden’s cocktail-party processor using the same 128-channel gammatone filterbank [7]. The localization stage of this model uses an extended cross-correlation mechanism based on contralateral inhibition and it adapts to HRTFs. The separation stage of the model is based on estimation of the weights for a Wiener filter as the ratio between a desired excitation and an actual one. Although the Bodden model is more flexible by incorporating aspects of the precedence effect into the localization stage, the estimation of Wiener filter weights is less robust than our binary estimation of ideal masks. Shown in Fig. 5, our model shows a considerable improvement over the Bodden system, producing a 3.5 dB average improvement. N0 N1 N2 N3 N4 N5 N6 N7 N8 N9 -10 0 10 20 SNR (dB) N0 N1 N2 N3 N4 N5 N6 N7 N8 N9 -10 0 10 20 N0 N1 N2 N3 N4 N5 N6 N7 N8 N9 -10 0 10 20 A B C Figure 3. Systematic results for two-source configuration. Black bars correspond to the SNR of the initial mixture, white bars indicate the SNR obtained using ideal binary mask, and gray bars show the SNR from our model. Results are obtained for speech mixed with ten intrusion types (N0: pure tone; N1: white noise; N2: noise burst; N3: ‘cocktail party’; N4: rock music; N5: siren; N6: trill telephone; N7: female speech; N8: male speech; N9: female speech). A: Target at 0°, interference at 5°. B: Target at 80°, interference at 85°. C: Target at 60°, interference at 90°. N0 N1 N2 N3 N4 N5 N6 N7 N8 N9 -20 -15 -10 -5 0 5 SNR (dB) N0 N1 N2 N3 N4 N5 N6 N7 N8 N9 -10 0 10 20 SNR (dB) Figure 4. Evaluation for a three-source configuration: target at 0° and two interfering sources at –30° and 30°. Black bars correspond to the SNR of the initial mixture, white bars to the SNR obtained using the ideal binary mask, and gray bars to the SNR from our model. Figure 5. SNR comparison between the Bodden model (white bars) and our model (gray bars) for a two-source configuration: target at 0° and interference at 30°. Black bars correspond to the SNR of the initial mixture. For the ASR evaluation, we use the missing-data technique as described in [10]. In this approach, a continuous density hidden Markov model recognizer is modified such that only acoustic features indicated as reliable in a binary mask are used during decoding. Hence, it works seamlessly with the output from our speech segregation system. We have implemented the missing data algorithm with the same 128-channel gammatone filterbank. Feature vectors are obtained using the Hilbert envelope at the output of the gammatone filter. More specifically, each feature vector is extracted by smoothing the envelope using an 8-ms first-order filter, sampling at a frame-rate of 10 ms and finally log-compressing. We use the bounded marginalization method for classification [10]. The task domain is recognition of connected digits, and both training and testing are performed on acoustic features from the left ear signal using the male speaker dataset in the TIDigits database. Fig. 6A shows the correctness scores for a two-source condition, where the male target speaker is located at 0° and the interference is another male speaker at 30°. The performance of our model is systematically compared against the ideal masks for four SNR levels: 5 dB, 0 dB, -5 dB and –10 dB. Similarly, Fig. 6B shows the results for the three-source case with an added female speaker at -30°. The ideal mask exhibits only slight and gradual degradation in recognition performance with decreasing SNR and increasing number of sources. Observe that large improvements over baseline performance are obtained across all conditions. This shows the strong potential of applying our model to robust speech recognition. 5 dB 0 dB −5 dB −10 dB 20 40 60 80 100 Correctness (%) Baseline Ideal Mask Estimated Mask A 5 dB 0 dB −5 dB −10 dB 20 40 60 80 100 Correctness (%) Baseline Ideal Mask Estimated Mask B Figure 6. Recognition performance at different SNR values for original mixture (dotted line), ideal binary mask (dashed line) and estimated mask (solid line). A. Correctness score for a two-source case. B. Correctness score for a three-source case. Finally we evaluate our model on speech intelligibility with listeners with normal hearing. We use the Bamford-Kowal-Bench sentence database that contains short semantically predictable sentences [15]. The score is evaluated as the percentage of keywords correctly identified, ignoring minor errors such as tense and plurality. To eliminate potential location-based priming effects we randomly swap the locations for target and interference for different trials. In the unprocessed condition, binaural signals are produced by convolving original signals with the corresponding HRTFs and the signals are presented to a listener dichotically. In the processed condition, our algorithm is used to reconstruct the target signal at the better ear and results are presented diotically. 0 dB −5 dB −10 dB 0 20 40 60 80 100 Keyword score (%) A 0 20 40 60 80 100 Keyword score (%) B Figure 7. Keyword intelligibility score for twelve native English speakers (median values and interquartile ranges) before (white bars) and after processing (black bars). A. Two-source condition (0° and 5°). B. Three-source condition (0°, 30° and -30°). Fig. 7A gives the keyword intelligibility score for a two-source configuration. Three SNR levels are tested: 0 dB, -5 dB and –10 dB, where the SNR is computed at the better ear. Here the target is a male speaker and the interference is babble noise. Our algorithm improves the intelligibility score for the tested conditions and the improvement becomes larger as the SNR decreases (61% at –10 dB). Our informal observations suggest, as expected, that the intelligibility score improves for unprocessed mixtures when two sources are more widely separated than 5°. Fig. 7B shows the results for a three-source configuration, where our model yields a 40% improvement. Here the interfering sources are one female speaker and another male speaker, resulting in an initial SNR of –10 dB at the better ear. 5 Conclusion We have observed systematic deviations of the ITD and IID cues with respect to the relative strength between target and acoustic interference, and configuration-specific clustering in the joint ITD-IID feature space. Consequently, supervised learning of binaural patterns is employed for individual frequency channels and different spatial configurations to estimate an ideal binary mask that cancels acoustic energy in T-F units where interference is stronger. Evaluation using both SNR and ASR measures shows that the system estimates ideal binary masks very well. A comparison shows a significant improvement in performance over the Bodden model. Moreover, our model produces substantial speech intelligibility improvements for two and three source conditions. Acknowledgments This research was supported in part by an NSF grant (IIS-0081058) and an AFOSR grant (F49620-01-1-0027). A preliminary version of this work was presented in 2002 ICASSP. References [1] A. S. Bregman, Auditory Scene Analysis, Cambridge, MA: MIT press, 1990. [2] J. Blauert, Spatial Hearing - The Psychophysics of Human Sound Localization, Cambridge, MA: MIT press, 1997. [3] A. Bronkhorst, “The cocktail party phenomenon: a review of research on speech intelligibility in multiple-talker conditions,” Acustica, vol. 86, pp. 117-128, 2000. [4] M. P. Cooke, Modeling Auditory Processing and Organization, Cambridge, U.K.: Cambridge University Press, 1993. [5] G. J. Brown and M. P. Cooke, “Computational auditory scene analysis,” Computer Speech and Language, vol. 8, pp. 297-336, 1994. [6] G. Hu and D. L. Wang, “Monaural speech separation,” Proc. NIPS, 2002. [7] M. Bodden, “Modeling human sound-source localization and the cocktail-party-effect,” Acta Acoustica, vol. 1, pp. 43-55, 1993. [8] C. Liu et al., “A two-microphone dual delay-line approach for extraction of a speech sound in the presence of multiple interferers,” J. Acoust. Soc. Am., vol. 110, pp. 32183230, 2001. [9] T. Whittkop and V. Hohmann, “Strategy-selective noise reduction for binaural digital hearing aids,” Speech Comm., vol. 39, pp. 111-138, 2003. [10] M. P. Cooke, P. Green, L. Josifovski and A. Vizinho, “Robust automatic speech recognition with missing and unreliable acoustic data,” Speech Comm., vol. 34, pp. 267285, 2001. [11] H. Glotin, F. Berthommier and E. Tessier, “A CASA-labelling model using the localisation cue for robust cocktail-party speech recognition,” Proc. EUROSPEECH, pp. 2351-2354, 1999. [12] A. Jourjine, S. Rickard and O. Yilmaz, “Blind separation of disjoint orthogonal signals: demixing N sources from 2 mixtures,” Proc. ICASSP, 2000. [13] W. G. Gardner and K. D. Martin, “HRTF measurements of a KEMAR dummy-head microphone,” MIT Media Lab Technical Report #280, 1994. [14] N. Roman, D. L. Wang and G. J. Brown, “Speech segregation based on sound localization,” J. Acoust. Soc. Am., vol. 114, pp. 2236-2252, 2003. [15] J. Bench and J. Bamford, Speech Hearing Tests and the Spoken Language of HearingImpaired Children, London: Academic press, 1979.
2003
159
2,375
Synchrony Detection by Analogue VLSI Neurons with Bimodal STDP Synapses Adria Bofill-i-Petit The University of Edinburgh Edinburgh, EH9 3JL Scotland adria.bofill@ee.ed.ac.uk Alan F. Murray The University of Edinburgh Edinburgh, EH9 3JL Scotland alan.murray@ee.ed.ac.uk Abstract We present test results from spike-timing correlation learning experiments carried out with silicon neurons with STDP (Spike Timing Dependent Plasticity) synapses. The weight change scheme of the STDP synapses can be set to either weight-independent or weight-dependent mode. We present results that characterise the learning window implemented for both modes of operation. When presented with spike trains with different types of synchronisation the neurons develop bimodal weight distributions. We also show that a 2-layered network of silicon spiking neurons with STDP synapses can perform hierarchical synchrony detection. 1 Introduction Traditionally, Hebbian learning algorithms have interpreted Hebb’s postulate in terms of coincidence detection. They are based on mean spike firing rates correlations between presynaptic and postsynaptic spikes rather than upon precise timing differences between presynaptic and postsynaptic spikes. In recent years, new forms of synaptic plasticity that rely on precise spike-timing differences between presynaptic and postsynaptic spikes have been discovered in several biological systems[1][2][3]. These forms of plasticity, generally termed Spike Timing Dependent Plasticity (STDP), increase the synaptic efficacy of a synapse when a presynaptic spike reaches the neuron a few milliseconds before the postsynaptic action potential. In contrast, when the postsynaptic neuron fires immediately before the presynaptic neuron the strength of the synapse diminishes. Much debate has taken place regarding the precise characteristics of the learning rules underlying STDP [4]. The presence of weight dependence in the learning rule has been identified as having a dramatic effect on the computational properties of STDP. When weight modifications are independent of the weight value, a strong competition takes places between the synapses. Hence, even when no spike-timing correlation is present in the input, synapses develop maximum or minimum strength so that a bimodal weight distribution emerges from learning[5]. Conversely, if the learning rule is strongly weight-dependent, such that strong synapses receive less potentiation than weaker ones while depression is independent of the synaptic strength, a smooth unimodal weight distribution emerges from the learning process[6]. In this paper we present circuits to support STDP on silicon. Bimodal weight distributions are effectively binary. Hence, they are suited to analog VLSI implementation, as the main barrier to the implementation of on-chip learning, the long term storage of precise analog weight values, can be rendered unimportant. However, weight-independent STDP creates a highly unstable learning process that may hinder learning when only low levels of spike-timing correlations exist and neurons have few synapses. The circuits proposed here introduce a tunable weight dependence mechanism which stabilises the learning process. This allows finer correlations to be detected than does a weight-independent scheme. In the weight-dependent learning experiments reported here the weight-dependence is set at moderate levels such that bimodal weight distributions still result from learning. The analogue VLSI implementation of spike-based learning was first investigated in [7]. The authors used a weight-dependent scheme and concentrated on the weight normalisation properties of the learning rule. In [8], we proposed circuits to implement asymmetric STDP which lacked the weight-dependent mechanism. More recently, others have also investigated asymmetric STDP learning using VLSI systems[9][10]. STDP synapses that contain an explicit bistable mechanism have been proposed in [10]. Long-term bistable synapses are a good technological solution for weight storage. However, the maximum and minimum weight limits in bimodal STDP already act as natural attractors. An explicit bistable mechanism may increase the instability of the learning process and may hinder, in consequence, the detection of subtle correlations. In contrast, the circuits that we propose here introduce a mechanism that tends to stabilise learning. 2 STDP circuits The circuits in Figure 1 implement the asymmetric decaying learning window with the abrupt transition at the origin that is so characteristic of STDP. The weight of each synapse is represented by the charge stored on its weight capacitor Cw. The strength of the weight is inversely proportional to Vw. The closer the value of Vw is to GND , the stronger is the synapse. Our silicon spiking neurons signal their firing events with the sequence of pulses seen in Figure 1c. Signal post bp is back-propagated to the afferent synapses of the neuron. Long is a longer pulse (a few µs) used in the current neuron (termed as signal postLong in Figure 1b). Long is also sent to input synapses of following neurons in the activity path (see preLong in 1a). Finally, spikeOut is the presynaptic spike for the next receiving neuron (termed pre in Figure 1a). More details on the implementation of the silicon neuron can be found in [11] In Figure 1a, if preLong is long enough (a few µs) the voltage created by Ibpot on the diode connected transistor N5 is copied to the gate of N2. This voltage across Cpot decays with time from its peak value due to a leakage current set by Vbpot. When the postsynaptic neuron fires, a back propagation pulse post bp switches N3 on. Therefore, the weight is potentiated (Vw decreased) by an amount which reflects the time elapsed since the last presynaptic event. A weight dependence mechanism is introduced by the simple linearised V-I configuration P5-P6 and current mirror N7-N6 (see Figure 1a). P5 is a low gain transistor operated in strong inversion whereas P6 is a wide transistor made to operate in weak inversion such that it has even higher gain. When the value of Vw decreases (weight increase) the current through P5-P6 increases, but P5 is maintained in the linear region by the high gain transistor. Thus, a current proportional to the value of the weight is subtracted from Ibpot. The resulting smaller current injected into N5 will cause a drop in the peak of potentiation for large weight values. preLong Vr Ibpot Vw Idep N1 N2 N3 N5 N6 N7 P4 P2 P1 P3 P5 P6 Vbpot Cpot post_bp pre Cw N8 N1 N2 Vbdep Cdep N3 Ibdep N4 postLong Idep_1 Idep_N ( a ) ( b ) ( c ) spikeOut Long post_bp Figure 1: Weight change circuits. (a) The strength of the synapse is inversely proportional to the value of Vw. The lower Vw, the smaller the weight of the synapse. This section of the weight change circuit detects causal spike correlations. (b) A single depression circuit present in the soma of the neuron creates the decaying shape of the depression side of the learning window. (c) Waveforms of pulses that signal an action potential event. They are used to stimulate the weight change circuits. In a similar manner to potentiation, the weight is weakened by the circuit of Figure 1b when it detects a non-causal interaction between a presynaptic and a postsynaptic spike. When a postsynaptic spike event is generated a postLong pulse charges Cdep. The charge accumulated leaks linearly through N3 at a rate set by Vbdep. A set of non-linear decaying currents (IdepX) is sent to the weight change circuits placed in the input synapse (see Idep in Figure 1a). When a presynaptic spike reaches a synapse P1 is switched on. If this occurs soon enough after the postLong pulse was generated, Vw is brought closer to Vdd (weight strength decreased). Only one depression circuit per neuron is required since the depression part of the learning rule is independent of the weight value. A chip including 5 spiking neurons with STDP synapses has been fabricated using a standard 0.6µm CMOS process. Each neuron has 6 learning synapses, a single excitatory non-learning synapse and a single inhibitory one. Along with the silicon neuron circuits, the chip contains several voltage buffers that allow us to monitor the behaviour of the neuron. The testing setup uses a networked logic analysis system to stimulate the silicon neuron and to capture the results of on-chip learning. An externally addressable circuit creates preLong and pre pulses to stimulate the synapses. 3 Weight-independent learning rule 3.1 Characterisation A weight-independent weight change regime is obtained by setting Vr to Vdd in the weight change circuit presented in Figure 1 . The resulting learning window on silicon can be seen in Figure 2. Each point in the curve was obtained from the stimulation of the fix synapse and a learning synapse with a varying delay between them. As can be seen in the figure, the circuit is highly tunable. Figure 2a shows that the peaks for potentiation and depression can be set independently. Also, as shown in Figure 2b the decay of the learning window for both sides of the curve can be set independently of the maximum weight change with Vbdep and Vbpot. Since the weight-dependent mechanism is switched off, the curve of the learning window is the same for a wide range of Vw. Obviously, when the weight voltage Vw approaches −30 −20 −10 0 10 20 30 40 −0.3 −0.2 −0.1 0 0.1 0.2 0.3 0.4 tpre − tpost ( ms ) ∆Vw ( V ) −40 −30 −20 −10 0 10 20 30 40 −0.15 −0.1 −0.05 0 0.05 0.1 0.15 0.2 0.25 0.3 tpre − tpost ( ms ) ∆Vw ( V ) ( a ) ( b ) Figure 2: Experimental learning window for weight-independent STDP. The curves show the weight modification induced in the weight of a learning synapse for different time intervals between the presynaptic and the postsynaptic spike. For the results shown, the synapses were operated in a weight-independent mode. (a) The peaks of the learning window is shown for 4 different settings. The peak for potentiation and depression are tuned independently with Ibpot and Ibdep (b) The rate of decay of the learning window for potentiation and depression can be set independently without affecting the maximum weight change. any of the power supply rails a saturation effect occurs as the transistors injecting current in the weight capacitor leave saturation. For the learning experiment with weight-independent weight change the area under the potentiation curve should be approximately 50% smaller than the area under the depression region. 3.2 Learning spike-timing correlations with weight-independent learning We stimulated a 6-synapse silicon neuron with 6 independent Poisson-distributed spike trains with a rate of 30Hz. An absolute refractory period of 10ms was enforced between consecutive spikes of each train. Refractoriness helps break the temporal axis into disjoint segments so that presynaptic spikes can make less noisy ”predictions” of the postsynaptic time of firing. We introduced spike-timing correlations between the inputs for synapses 1 and 2. Synapses 3 to 6 were uncorrelated. The evolution of the 6 weights for one of such experiments is show in Figure 3. The correlated inputs shared 35% of the spike-timings. They were constructed by merging two independent 19.5Hz Poisson-distributed spike trains with a common 10.5Hz spike train. As can be seen in Figure 3 the weights of synapses that receive correlated activity reach maximum strength (Vw close to GND) whereas the rest decay towards Vdd. Clearly, the bimodal weight distribution reflects the correlation pattern of the input signals. 3.3 Hierarchical synchrony detection To experiment with hierarchical synchrony detection we included in the chip a small 2-layered network of STDP silicon neurons with the configuration shown in Figure 4. Neurons in the first layer were stimulated with independent sets of Poisson-distributed spike trains with a mean spiking rate of 30Hz. As with the experiments presented in the preceding section, a 10ms refractory period was forced between consecutive spikes. A primary level of correlation was introduced for each neuron in the first layer as signalled by the arrowed bridge between the 0 1 2 3 4 5 6 7 8 0 0.5 1 1.5 2 2.5 3 3.5 4 4.5 time ( s ) Vw ( V ) Vw1, Vw2 Vw5 Vw6 Vw4 Vw3 Figure 3: Learning experiment with weight-independent STDP. N2 N4 N3 N5 N1 0.25 0.5 0.5 0.5 0.5 Figure 4: Final weight values for a 2-layered network of STDP silicon neurons. inputs of synapses 1 and 2 of each neuron. For the results shown here these 2 inputs of each neuron shared 50% of the spike-timings (indicated with 0.5 on top of the double-arrowed bridge of Figure 4). A secondary level of correlation was introduced between the inputs of synapses 1 and 2 of both N1 and N2, as signalled by the arrow linking the first level of correlations of N1 and N2. This second level of correlations is weaker, with only 25% of shared spikes (indicated with 0.25 in Figure 4). The two direct inputs of N5, in the second layer, were also Poisson distributed but had a rate of 15Hz. The evolution of the weights recorded for the experiment just described is presented in Figure 5. On the left, we see the weight evolution for N1. The weights corresponding to synapses 1 and 2 evolve towards the maximum value (i.e. GND). The weights of the remaining synapses, which receive random activity, decrease (i.e. Vw close to Vdd). The other neurons in the 1st layer have weight evolutions similar to that of N1. Synapses with synchronised activity corresponding to the 1st level of correlations win the competition imposed by STDP. The Vw traces on the right-hand side of Figure 5 show how N5 in the second layer captures the secondary level of correlation. Weights of the synapses receiving input from N1 and N2 are reinforced while the rest are decreased towards the minimum possible weight value (Vw = Vdd). Clearly, the second layer only captures features from signals which have already a basic level of interesting features (primary level of correlations) detected by the first layer. In Figure 4, we have represented graphically the final weight distribution for all synapses. As marked by filled circles, only synapses in the path of hierarchical 0 2 4 6 8 10 0 0.5 1 1.5 2 2.5 3 3.5 4 4.5 time ( s ) Vw ( V ) Vw1 , Vw2 Vw3 Vw5 , Vw6 Vw4 0 5 10 15 20 25 30 35 40 0 0.5 1 1.5 2 2.5 3 3.5 4 4.5 time ( s ) Vw ( V ) Vw1 , Vw2 Vw3 Vw5 Vw4 Vw6 N5 N1 Figure 5: Hierarchical synchrony detection. (a) Weight evolution of neuron in first layer. (b) Weight evolution of output neuron in 2nd layer. synchrony activity develop maximum weight strength. In contrast, weights with final minimum strength are indicated by empty circles. These correspond to synapses of first layer neurons which received uncorrelated inputs or synapses of N5 which received inputs from neurons stimulated without a secondary level of correlations (N3-N4). 4 Weight-dependent learning rule 4.1 Characterisation The STDP synapses presented can also be operated in weight-dependent mode. The weight dependent learning window implemented is similar to that which seems to underly some STDP recordings from biological neurons [6]. Figure 6a shows chip results of the weight-dependent learning rule. The weight change curve for potentiation is given for 3 different weight values. The larger the weight value (low Vw), the smaller the degree of potentiation induced in the synapse. The depression side of the learning window is unaffected by the weight value since the depression circuit shown in Figure 1b does not have an explicit weight-dependent mechanism. 4.2 Learning spike-timing correlations with weight-dependent learning Figure 6b shows the weight evolution for an experiment where the correlated activity between synapses 1 and 2 consisted of only 20% of common spike-timings. As in the weight-independent experiments, the mean firing rate was 30Hz and a refractory period of 10ms was enforced. Finally, we stimulated a neuron in weight-dependent mode with a form of synchrony where spike-timings coincided in a time window (window of correlation) instead of being perfectly matched (syn0-1). The uncorrelated inputs (syn2-5) were Poisson-distributed spike trains. The synchrony data was an inhomogeneous Poisson spike train with a rate modulated by a binary signal with random transition points. Figure 7 shows a normalised histogram of spike intervals between the correlated inputs for synapses 0 and 1 (Figure 7a) and the histogram of the uncorrelated inputs for synapses 2 and 3 (Figure 7b). Again, as can be seen in Figure 7c the neuron with weight-dependent STDP can detect this low-level of synchrony with non-coincident spikes. Clearly, the bimodal weight distribution identifies the syn−25 −20 −15 −10 −5 0 5 10 15 20 25 30 −0.15 −0.1 −0.05 0 0.05 0.1 0.15 0.2 0.25 tpre − tpost ( ms ) ∆Vw ( V ) Winit = 0.75V Winit = 2V Winit = 3.25 0 2 4 6 8 10 12 14 16 0 0.5 1 1.5 2 2.5 3 3.5 4 4.5 time ( s ) Vw ( V ) Vw3 Vw4 Vw5 Vw6 Vw1 Vw2 (a) (b) Figure 6: (a) Experimental learning window for weight-dependent STDP (b) Learning experiment with weight-dependent STDP. Synapses 1 and 2 share 20% of spike-timings. The other synapses receive completely uncorrelated activity. Correlated activity causes synapses to develop strong weights (Vw close to GND). chrony pattern of the inputs. 5 Conclusions The circuits presented can be used to study both weight-dependent and weightindependent learning rules. The influence of weight-dependence on the final weight distribution has been studied extensively[5][6]. In this paper, we have concentrated on the stabilising effect that moderate weight-dependence can have on learning processes that develop bimodal weight distributions. By introducing weightdependence subtle spike-timing correlations can be detected. We have also shown experimentally that a small feed-forward network of silicon neurons with STDP synapses can detect a hierarchical synchrony structure embedded in noisy spike trains. We are currently investigating the synchrony amplification properties of silicon neurons with bimodal STDP. We are also working on a new chip that uses lateralinhibitory connections between neurons to classify data with complex synchrony patterns. References [1] G-Q. Bi and M m Poo. Synaptic modifications in cultured hippocampal neurons; dependence on spike timing, synaptic strength and postsynaptic cell type. Journal of Neuroscience, 18:10464–10472, 1998. [2] L.I. Zhang, H.W. Tao, C.E. Holt, W.A. Harris, and M m. Poo. A critical window for cooperation and competition among developing retinotectal synapses. Nature, 395:37–44, 1998. [3] H. Markram, J. Lubke, M. Frotscher, and B. Sakmann. Regulation of synaptic efficacy by coincidence of postsynaptic APs and EPSPs. Science, 275:213–215, 1997. [4] A. Kepecs, M.C.W van Rossum, S. Song, and J. Tegner. Spike-timing-dependent plasticity: common themes and divergent vistas. Biological Cybernetics, 87:446–458, 2002. [5] S. Song, K.D. Miller, and L.F. Abbott. Competitive Hebbian learning through spiketiming dependent synaptic plasticity. Nature Neuroscience, 3:919–926, 2000. −0.06 −0.04 −0.02 0 0.02 0.04 0.06 0 0.005 0.01 0.015 0.02 0.025 0.03 0.035 0.04 0.045 0.05 ∆t ( s ) Correlation −0.06 −0.04 −0.02 0 0.02 0.04 0.06 0 0.005 0.01 0.015 0.02 0.025 0.03 0.035 0.04 0.045 0.05 ∆t ( s ) Correlation 0 10 20 30 40 50 60 0 0.5 1 1.5 2 2.5 3 3.5 4 4.5 time ( s ) Vw ( V ) Vw10 Vw12 Vw11 Vw13 , Vw14 Vw15 (a) (b) (c) Figure 7: Detection of non-coincident spike-timing synchrony with weight-dependent STDP.(a) Normalised spike interval histogram of the 2 correlated inputs (synapses 0 and 1). (b) Normalised spike interval histogram between 2 uncorrelated inputs (synapses 2-5) (c) Synapses 0 and 1 win the learning competition. [6] M. van Rossum and G.G. Turrigiano. Corrrelation based learning from spike timing dependent plasticity. Neurocomputing, 38-40:409–415, 2001. [7] P. Halfiger, M. Mahowald, and L. Watts. A spike based learning neuron in analog VLSI. In M.C. Mozer, M.I. Jordan, and T. Petsche, editors, Advances in Neural Information Processing Systems 9, pages 692–698. MIT Press, 1996. [8] A. Bofill, A. F. Murray, and D. P. Thompson. Circuits for VLSI implementation of temporally asymmetric Hebbian learning. In T. G. Dietterich, S. Becker, and Z. Ghahramani, editors, Advances in Neural Information Processing Systems 14. MIT Press, 2002. [9] R. J. Vogelstein, F. Tenore, R. Philipp, M. S. Adlerstein, D. H. Goldberg, and G. Cauwenberghs. Spike timing-dependent plasticity in the address domain. In S. Becker, S. Thrun, and Klaus Obermayer, editors, Advances in Neural Information Processing Systems 15. MIT Press, 2003. [10] G. Indiveri. Circuits for bistable spike-timing-dependent plasticity neuromorphic vlsi synapses. In S. Becker, S. Thrun, and Klaus Obermayer, editors, Advances in Neural Information Processing Systems 15. MIT Press, 2003. [11] A. Bofill i Petit and A.F. Murray. Learning temporal correlations in biologicallyinspired aVLSI. In IEEE Internation Symposium on Circuits and Systems, volume 5, pages 817–820, 2003.
2003
16
2,376
Linear Dependent Dimensionality Reduction Nathan Srebro Tommi Jaakkola Department of Electrical Engineering and Computer Science Massachusetts Institute of Technology Cambridge, MA 02139 nati@mit.edu,tommi@ai.mit.edu Abstract We formulate linear dimensionality reduction as a semi-parametric estimation problem, enabling us to study its asymptotic behavior. We generalize the problem beyond additive Gaussian noise to (unknown) nonGaussian additive noise, and to unbiased non-additive models. 1 Introduction Factor models are often natural in the analysis of multi-dimensional data. The underlying premise of such models is that the important aspects of the data can be captured via a low-dimensional representation (“factor space”). The low-dimensional representation may be useful for lossy compression as in typical applications of PCA, for signal reconstruction as in factor analysis or non-negative matrix factorization [1], for understanding the signal structure [2], or for prediction as in applying SVD for collaborative filtering [3]. In many situations, including collaborative filtering and structure exploration, the “important” aspects of the data are the dependencies between different attributes. For example, in collaborative filtering we rely on a representation that summarizes the dependencies among user preferences. More generally, we seek to identify a low-dimensional space that captures the dependent aspects of the data, and separate them from independent variations. Our goal is to relax restrictions on the form of each of these components, such as Gaussianity, additivity and linearity, while maintaining a principled rigorous framework that allows analysis of the methods. We begin by studying the probabilistic formulations of the problem, focusing on the assumptions that are made about the dependent, low-rank “signal” and independent “noise” distributions. We consider a general semi-parametric formulation that emphasizes what is being estimated and allows us to discuss asymptotic behavior (Section 2). We then study the standard (PCA) approach, show that it is appropriate for additive i.i.d. noise (Section 3), and present a generic estimator that is appropriate also for unbiased non-additive models (Section 4). In Section 5 we confront the non-Gaussianity directly, develop maximumlikelihood estimators in the presence of Gaussian mixture additive noise, and show that the consistency of such maximum-likelihood estimators should not be taken for granted. 2 Dependent Dimensionality Reduction Our starting point is the problem of identifying linear dependencies in the presence of independent identically distributed Gaussian noise. In this formulation, we observe a data matrix Y ∈ℜn×d which we assume was generated as Y = X + Z, where the dependent, low-dimensional component X ∈ℜn×d (the “signal”) is a matrix of rank k and the independent component Z (the “noise”) is i.i.d. zero-mean Gaussian with variance σ2. We can write down the log-likelihood of X as −1 σ2 |Y −X |Fro+Const (where ||Fro is the Frobenius, or sum-squared, norm) and conclude that, regardless of the variance σ2, the maximumlikelihood estimator of X is the rank-k matrix minimizing the Frobenius distance. It is given by the leading components of the singular value decomposition of Y .1 Although the above formulation is perfectly valid, there is something displeasing about it. We view the entire matrix X as parameters, and estimate them according to a single observation Y . The number of parameters is linear in the data, and even with more data, we cannot hope to estimate the parameters (entries in X ) beyond a fixed precision. What we can estimate with more data rows is the rank-k row-space of X . Consider the factorization y 1 y 2 y d u . . . X = U V ′, where V ′ ∈ℜk×d spans this “signal space”. The dependencies of each row y of Y are captured by a row u of U , which, through the parameters V and σ specifies how each entry yi is generated independently given u.2 A standard parametric analysis of the model would view u as a random vector (rather than parameters) and impose some, possibly parametric, distribution over it (interestingly, if u is Gaussian, the maximum-likelihood reconstruction is the same Frobenius low-rank approximation [4]). However, in the analysis we started with, we did not make any assumptions about the distribution of u, beyond its dimensionality. The model class is then non-parametric, yet we still desire, and are able, to estimate a parametric aspect of the model: The estimator can be seen as a ML estimator for the signal subspace, where the distribution over u is unconstrained nuisance. Although we did not impose any form on the distribution u, we did impose a strict form on the conditional distributions yi|u: we required them to be Gaussian with fixed variance σ2 and mean uV ′ i . We would like to relax these requirements, and require only that y|u be a product distribution, i.e. that its coordinates yi|u be (conditionally) independent. Since u is continuous, we cannot expect to forego all restrictions on yi|ui, but we can expect to set up a semi-parametric problem in which y|u may lie in an infinite dimensional family of distributions, and is not strictly parameterized. Relaxing the Gaussianity leads to linear additive models y = uV ′ + z, with z independent of u, but not necessarily Gaussian. Further relaxing the additivity is appropriate, e.g., when the noise has a multiplicative component, or when the features of y are not real numbers. These types of models, with a known distribution yi|xi, have been suggested for classification using logistic loss [5], when yi|xi forms an exponential family [6], and in a more abstract framework [7]. Relaxing the linearity assumption x = uV ′ is also appropriate in many situations. Fitting a non-linear manifold by minimizing the sum-squared distance can be seen as a ML estimator for y|u = g(u) + z, where z is i.i.d. Gaussian and g : ℜk →ℜd specifies some smooth manifold. Combining these ideas leads us to discuss the conditional distributions yi|gi(u), or yi|u directly. In this paper we take our first steps is studying this problem, and relaxing restrictions on 1A mean term is also usually allowed. Incorporating a non-zero mean is straight forward, and in order to simplify derivations, we do not account for it in most of our presentation. 2We use uppercase letters to denote matrices, and lowercase letters for vectors, and use bold type to indicate random quantities. y|u. We continue to assume a linear model x = uV ′ and limit ourselves to additive noise models and unbiased models in which E [y|x] = x. We study the estimation of the rank-k signal space in which x resides, based on a sample of n independent observations of y (forming the rows of Y), where the distribution on u is unconstrained nuisance. In order to study estimators for a subspace, we must be able to compare two subspaces. A natural way of doing so is through the canonical angles between them [8]. Define the angle between a vector v1 and a subspace V2 to be the minimal angle between v1 and any v2 ∈V2. The largest canonical angle between two subspaces is then the maximal angle between a vector in v1 ∈V1 and the subspace V2. The second largest angle is the maximum over all vectors orthogonal to the v1, and so on. It is convenient to think of a subspace in terms of the matrix whose columns span it. Computationally, if the columns of V1 and V2 form orthonormal bases of V1 and V2, then the cosines of the canonical angles between V1 and V2 are given by the singular values of V ′ 1V2. Throughout the presentation, we will slightly overload notation and use a matrix to denote also its column subspace. In particular, we will denote by V0 the true signal subspace, i.e. such that x = uV0 ′. 3 The L2 Estimator We first consider the “standard” approach to low-rank approximation—minimizing the sum squared error.3 This is the ML estimator when the noise is i.i.d. Gaussian. But the L2 estimator is appropriate also in a more general setting. We will show that the L2 estimator is consistent for any i.i.d. additive noise with finite variance (as we will see later on, this is more than can be said for some ML estimators). The L2 estimator of the signal subspace is the subspace spanned by the leading eigenvectors of the empirical covariance matrix ˆΛn of y, which is a consistent estimator of the true covariance matrix ΛY , which in turn is the sum of the covariance matrices of x and z, where ΛX is of rank exactly4 k, and if z is i.i.d., ΛZ = σ2I. Let s1 ≥s2 ≥· · · ≥sk > 0 be the non-zero eigenvalues of Λx. Since z has variance exactly σ2 in any direction, the principal directions of variation are not affected by it, and the eigenvalues of ΛY are exactly s1 + σ2, . . . , sk + σ2, σ2, . . . , σ2, with the leading k eigenvectors being the eigenvectors of ΛX. This ensures an eigenvalue gap of sk > 0 between the invariant subspace of ΛY spanned by the eigenvectors of ΛX and its complement, and we can bound the norm of the canonical sines between V0 and the leading k eigenvectors of ˆΛn by |ˆΛn−ΛY | sk [8]. Since |ˆΛn−ΛY | →0 a.s., we conclude that the estimator is consistent. 4 The Variance-Ignoring Estimator We turn to additive noise with independent, but not identically distributed, coordinates. If the noise variances are known, the ML estimator corresponds to minimizing the columnweighted (inversely proportional to the variances) Frobenius norm of Y −X , and can be calculated from the leading eigenvectors of a scaled empirical covariance matrix [9]. If the variances are not known, e.g. when the scale of different coordinates is not known, there is no ML estimator: at least k coordinates of each y can always be exactly matched, and so the likelihood is unbounded when up to k variances approach zero. 3We call this an L2 estimator not because it minimizes the matrix L2-norm |Y −X |2, which it does, but because it minimizes the vector L2-norms |y −x|2 2. 4We should also be careful about signals that occupy only a proper subspace of V0, and be satisfied with any rank-k subspace containing the support of x, but for simplicity of presentation we assume this does not happen and x is of full rank k. 10 100 1000 10000 0 0.1 0.2 0.3 0.4 0.5 0.6 0.7 0.8 0.9 1 sample size |sin Θ|2 L2 variance−ignored ML, known variances 1 2 3 4 5 6 7 8 9 10 0.1 0.2 0.3 0.4 0.5 0.6 0.7 0.8 0.9 1 1.1 spread of noise scale (max/min ratio) |sin Θ|2 L2 variance−ignored ML, known variances 10 2 10 3 10 4 0 0.2 0.4 0.6 0.8 1 |sin(Θ)|2 sample size (number of observed rows) full L2 variance−ignored Figure 1: Norm of sines of canonical angles to correct subspace: (a) Random rank-2 subspaces in ℜ10. Gaussian noise of different scales in different coordinates— between 0.17 and 1.7 signal strength. (b) Random rank-2 subspaces in ℜ10, 500 sample rows, and Gaussian noise with varying distortion (mean over 200 simulations, bars are one standard deviations tall) (c) Observations are exponentially distributed with means in rank-2 subspace ( 1 1 1 1 1 1 1 1 1 1 1 0 1 0 1 0 1 0 1 0 )′. The L2 estimator is not satisfactory in this scenario. The covariance matrix ΛZ is still diagonal, but is no longer a scaled identity. The additional variance introduced by the noise is different in different directions, and these differences may overwhelm the “signal” variance along V0, biasing the leading eigenvectors of ΛY , and thus the limit of the L2 estimator, toward axes with high “noise” variance. The fact that this variability is independent of the variability in other coordinates is ignored, and the L2 estimator is asymptotically biased. Instead of recovering the directions of greatest variability, we recover the covariance structure directly. In the limit, ˆΛn →ΛY = ΛX + ΛZ, a sum of a rank-k matrix and a diagonal matrix. In particular, the non-diagonal entries of ˆΛn approach those of ΛX. We can thus seek a rank-k matrix ˆΛX approximating ˆΛn, e.g. in a sum-squared sense, except on the diagonal. This is a (zero-one) weighted low-rank approximation problem. We optimize ˆΛX by iteratively seeking a rank-k approximation of ˆΛn with diagonal entries filled in from the last iterate of ˆΛX (this can be viewed as an EM procedure [5]). The row-space of the resulting ˆΛX is then an estimator for the signal subspace. Note that the L2 estimator is the row-space of the rank-k matrix minimizing the unweighted sum-squared distance to ˆΛn. Figures 1(a,b) demonstrate this variance-ignoring estimator on simulated data with nonidentical Gaussian noise. The estimator reconstructs the signal-space almost as well as the ML estimator, even though it does not have access to the true noise variance. Discussing consistency in the presence of non-identical noise with unknown variances is problematic, since the signal subspace is not necessarily identifiable. For example, the combined covariance matrix ΛY = ( 2 1 1 2 ) can arise from a rank-one signal covariance ΛX = a 1 1 1/a  for any 1 2 ≤a ≤2, each corresponding to a different signal subspace. Counting the number of parameters and constraints suggests identifiability when k < d − √8d+1−1 2 , but this is by no means a precise guarantee. Anderson and Rubin [10] present several conditions on ΛX which are sufficient for identifiability but require k <  d 2  , and other weaker conditions which are necessary. Non-Additive Noise The above estimation method is also useful in a less straightforward situation. Until now we have considered only additive noise, in which the distribution of yi −xi was independent of xi. We will now relax this restriction and allow more general conditional distributions yi|xi, requiring only that E [yi|xi] = xi. With this requirement, together with the structural constraint (yi independent given x), for any i ̸= j: Cov [yi, yj] = E [yiyj] −E [yi]E [yj] = E [E [yiyj|x]] −E [E [yi|x]]E [E [yj|x]] = E [E [yi|x]E [yj|x]] −E [xi]E [xj] = E [xixj] −E [xi]E [xj] = Cov [xi, xj]. As in the non-identical additive noise case, ΛY agrees with ΛX except on the diagonal. Even if yi|xi is identically conditionally distributed for all i, the difference ΛY −ΛX is not in general a scaled identity: Var [yi] = E h E  y2 i |xi  −E [yi|xi]2i + E h E [yi|xi]2i − E [yi]2 = E [Var [yi|xi]] + Var [xi]. Unlike the additive noise case, the variance of yi|xi depends on xi, and so its expectation depends on the distribution of xi. These observations suggest using the variance-ignoring estimator. Figure 1(c) demonstrates how such an estimator succeeds in reconstruction when yi|xi is exponentially distributed with mean xi, even though the standard L2 estimator is not applicable. We cannot guarantee consistency because the decomposition of the covariance matrix might not be unique, but when k <  d 2  this is not likely to happen. Note that if the conditional distribution y|x is known, even if the decomposition is not unique, the correct signal covariance might be identifiable based on the relationship between the signal marginals and the expected conditional variance of of y|x, but this is not captured by the variance-ignoring estimator. 5 Low Rank Approximation with a Gaussian Mixture Noise Model We return to additive noise, but seeking better estimation with limited data, we confront non-Gaussian noise distributions directly: we would like to find the maximum-likelihood X when Y = X + Z, and Zij are distributed according to a Gaussian mixture: pZ(zij) = Pm c=1 pc(2πσ2 c)1/2 exp((zij −µc)2/(2σ2 c)). To do so, we introduce latent variables Cij specifying the mixture component of the noise at Yij, and solve the problem using EM. In the Expectation step, we compute the posterior probabilities Pr (Cij|Yij; X ) based on the current low-rank parameter matrix X . In the Maximization step we need to find the low-rank matrix X that maximizes the posterior expected log-likelihood: EC|Y [log Pr (Y = X + Z|C; X )] = − X ij X c Pr(Cij=c)|Yij 2σ2 c (Xij−(Yij+µc))2 + Const = −1 2 X ij Wij (Xij −Aij)2 + Const (1) where Wij = X c Pr(Cij=c)|Yij σ2 c Aij = Yij + X c Pr(Cij=c)|Yijµc σ2 cWij This is a weighted Frobenius low-rank approximation (WLRA) problem. Equipped with a WLRA optimization method [5], we can now perform EM iteration in order to find the matrix X maximizing the likelihood of the observed matrix Y . At each M step it is enough to perform a single WLRA optimization iteration, which is guaranteed to improve the WLRA objective, and so also the likelihood. The method can be augmented to handle an unknown Gaussian mixture, by introducing an optimization of the mixture parameters at each M iteration. Experiments with GSMs We report here initial experiments with ML estimation using bounded Gaussian scale mixtures [11], i.e. a mixture of Gaussians with zero mean, and variance bounded from bellow. Gaussian scale mixtures (GSMs) are a rich class of symmetric distributions, which include non-log-concave, and heavy tailed distributions. We investigated two noise distributions: a ’Gaussian with outliers’ distribution formed as a mixture of two zero-mean Gaussians with widely varying variances; and a Laplace distribution p(z) ∝e−|z|, which is an infinite scale mixture of Gaussians. Figures 2(a,b) show the quality of reconstruction of the L2 estimator and the ML bounded GSM estimator, for these two noise distributions, for a fixed sample size of 300 rows, under varying 0.2 0.4 0.6 0.8 1 1.2 1.4 1.6 0.1 0.15 0.2 0.25 0.3 0.35 0.4 0.45 signal variance / noise variance |sin(Θ)|2 L2 ML 0 0.1 0.2 0.3 0.4 0 0.05 0.1 0.15 0.2 0.25 0.3 0.35 0.4 0 0.2 0.4 0.6 0.8 1 1.2 1.4 0 0.2 0.4 0.6 0.8 1 1.2 1.4 signal variance / noise variance |sin(Θ)|2 L2 ML, known noise model ML, nuisance noise model 10 100 1000 10000 0 0.05 0.1 0.15 0.2 0.25 0.3 0.35 0.4 0.45 0.5 Sample size (number of observed rows) sin(Θ) ML L2 Figure 2: Norm of sines of canonical angles to correct subspace: (a) Random rank-3 subspace in ℜ10 with Laplace noise. Insert: sine norm of ML est. plotted against sine norm of L2 est. (b) Random rank-2 subspace in ℜ10 with 0.99N(0, 1) + 0.01N(0, 100) noise. (c) span(2, 1, 1)′ ⊂ℜ3 with 0.9N(0, 1) + 0.1N(0, 25) noise. The ML estimator converges to (2.34, 1, 1). Bars are one standard deviation tall. signal strengths. We allowed ten Gaussian components, and did not observe any significant change in the estimator when the number of components increases. The ML estimator is overall more accurate than the L2 estimator—it succeeds in reliably reconstructing the low-rank signal for signals which are approximately three times weaker than those necessary for reliable reconstruction using the L2 estimator. The improvement in performance is not as dramatic, but still noticeable, for Laplace noise. Comparison with Newton’s Methods Confronted with a general additive noise distribution, the approach presented here would be to rewrite, or approximate, it as a Gaussian mixture and use WLRA in order to learn X using EM. A different approach is to considering the second order Taylor expansions of the log-likelihood, with respect to the entries of X , and iteratively maximize them using WLRA [5, 7]. Such an approach requires calculating the first and second derivatives of the density. If the density is not specified analytically, or is unknown, these quantities need to be estimated. But beyond these issues, which can be overcome, lies the major problem of Newton’s method: the noise density must be strictly log-concave and differentiable. If the distribution is not log-concave, the quadratic expansion of the log-likelihood will be unbounded and will not admit an optimum. Attempting to ignore this fact, and for example “optimizing” U given V using the equations derived for non-negative weights would actually drive us towards a saddle-point rather then a local optimum. The non-concavity does not only mean that we are not guaranteed a global optimum (which we are not guaranteed in any case, due to the non-convexity of the low-rank requirement)— it does not yield even local improvements. On the other hand, approximating the distribution as a Gaussians mixture and using the EM method, might still get stuck in local minima, but is at least guaranteed local improvement. Limiting ourselves to only log-concave distributions is a rather strong limitation, as it precludes, for example, all heavy-tailed distributions. Consider even the “balanced tail” Laplace distribution p(z) ∝e−|z|. Since the log-density is piecewise linear, a quadratic approximation of it is a line, which of course does not attain a minimum value. Consistency Despite the gains in reconstruction presented above, the ML estimator may suffer from an asymptotic bias, making it inferior to the L2 estimator on large samples. We study the asymptotic limit of the ML estimator, for a known product distribution p. We first establish a necessary and sufficient condition for consistency of the estimator. The ML estimator is the minimizer of the empirical mean of the random function Φ(V ) = minu(−log p(y−uV ′)). When the number of samples increase, the empirical means converge to the true means, and if E [Φ(V1)] < E [Φ(V2)], then with probability approaching one V2 will not minimize ˆE [Φ(V )]. For the ML estimator to be consistent, E [Φ(V )] must be minimized by V0, establishing a necessary condition for consistency. The sufficiency of this condition rests on the uniform convergence of {ˆE [Φ(V )]}, which does not generally exist, or at least on uniform divergence from E [Φ(V0)]. It should be noted that the issue here is whether the ML estimator at all converges, since if it does converge, it must converge to the minimizer of E [Φ(V )]. Such convergence can be demonstrated at least in the special case when the marginal noise density p(zi) is continuous, strictly positive, and has finite variance and differential entropy. Under these conditions, the ML estimator is consistent if and only if V0 is the unique minimizer of E [Φ(V )]. When discussing E [Φ(V )], the expectation is with respect to the noise distribution and the signal distribution. This is not quite satisfactory, as we would like results which are independent of the signal distribution, beyond the rank of its support. To do so, we must ensure the expectation of Φ(V ) is minimized on V0 for all possible signals (and not only in expectation). Denote the objective φ(y; V ) = minu(−log p(y −uV ′)). For any x ∈ℜd, consider Ψ(V ; x) = Ez [φ(x + z; V )], where the expectation is only over the additive noise z. Under the previous conditions guaranteeing the ML estimator converges, it is consistent for any signal distribution if and only if, for all x ∈ℜd, Ψ(V ; x) is minimized with respect to V exactly when x ∈spanV . It will be instructive to first revisit the ML estimator in the presence of i.i.d. Gaussian noise, i.e. the L2 estimator which we already showed is consistent. We will consider the decomposition y = y∥+ y⊥of vectors into their projection onto the subspace V , and the residual . Any rotation of p is an isotropic Gaussian, and so z⊥and z∥are independent, and p(y) = p∥(y∥)p⊥(y⊥). We can now analyze: φ(V ; y) = min u (−log p∥(y∥+ uV ′) −log p⊥(y⊥)) = −log p∥(0) + 1 σ2 |y⊥|2 + Const yielding Ψ(V ; x) ∝Ez⊥[|x⊥+ z⊥|2] + Const, which is minimized when x⊥= 0, i.e. x is spanned by V . We thus re-derived the consistency of the L2 estimator directly, for the special case in which the noise is indeed Gaussian. This consistency proof employed a key property of the isotropic Gaussian: rotations of an isotropic Gaussian random variable remain i.i.d. As this property is unique to Gaussian random variables, other ML estimators might not be consistent. In fact, we will shortly see that the ML estimator for a known Laplace noise model is not consistent. To do so, we will note that a necessary condition for consistency, if the density function p is continuous, is that Ψ(V ; 0) = E [φ(z; V )] is constant over all V . Otherwise we have Ψ(V1; 0) < Ψ(V2; 0) for some V1, V2, and for small enough x ∈V2, Ψ(V1; x) < Ψ(V2; x). A non-constant Ψ(V ; 0) indicates an a-priori bias towards certain sub-spaces. The negative log-likelihood of a Laplace distribution, p(zi) = 1 2e−|zi|, is essentially the L1 norm. Consider a rank-one approximation in a two-dimensional space with Laplace noise. For any V = (1, α), 0 ≤α ≤1, and (z1, z2), the L1 norm |z + uV ′|1 is minimized when z1 + u = 0 yielding φ(V ; z) = |z2 −αz1|, ignoring a constant term, and Ψ(V ; 0) = R R 1 4e−|z1|−|z2||z2 −αz1|dz1dz2 = α2+α+1 α+1 , which is monotonic increasing in α in the valid range [0, 1]. In particular, 1 = Ψ((1, 0); 0) < Ψ((1, 1); 0) = 3 2 and the estimator is biased towards being axis-aligned. Figure 2(c) demonstrates such an asymptotic bias empirically. Two-component Gaussian mixture noise was added to rank-one signal in ℜ3, and the signal subspace was estimated using an ML estimator with known noise model, and an L2 estimator. For small data sets, the ML estimator is more accurate, but as the number of samples increase, the error of the L2 estimator vanishes, while the ML estimator converges to the wrong subspace. 6 Discussion In many applications few assumptions beyond independence can be made. We formulate the problem of dimensionality reduction as semi-parametric estimation of the lowdimensional signal, or “factor” space, treating the signal distribution as unconstrained nuisance and the noise distribution as constrained nuisance. We present an estimator which is appropriate when the conditional means E [y|u] lie in a low-dimensional linear space, and a maximum-likelihood estimator for additive Gaussian mixture noise. The variance-ignoring estimator is also applicable when y can be transformed such that E [g(y)|u] lie in a low-rank linear space, e.g. in log-normal models. If the conditional distribution y|x is known, this amount to an unbiased estimator for xi. When such a transformation is not known, we may wish to consider it as nuisance. We draw attention to the fact the maximum-likelihood low-rank estimation cannot be taken for granted, and demonstrate that it might not be consistent even for known noise models. The approach employed here can also be used to investigate the consistency of ML estimators with non-additive noise models. Of particular interest are distributions yi|xi that form exponential families where xi are the natural parameters [6]. When the mean parameters form a low-rank linear subspace, the variance-ignoring estimator is applicable, but when the natural parameters form a linear subspace, the means are in general curved, and there is no unbiased estimator for the natural parameters. Initial investigation reveals that, for example, the ML estimator for a Bernoulli (logistic) conditional distribution is not consistent. The problem of finding a consistent estimator for the linear-subspace of natural parameters when yi|xi forms an exponential family remains open. We also leave open the efficiency of the various estimators, and the problem of finding asymptotically efficient estimators, and consistent estimators exhibiting the finite-sample gains of the ML estimator for additive Gaussian mixture noise. References [1] Daniel D. Lee and H. Sebastian Seung. Learning the parts of objects by non-negative matrix factorization. Nature, 401:788–791, 1999. [2] Orly Alter, Patrick O. Brown, and David Botstein. Singular value decomposition for genomewide expression data processing and modeling. PNAS, 97(18):10101–10106, 2000. [3] Yossi Azar, Amos Fiat, Anna R. Karlin, Frank McSherry, and Jared Saia. Spectral analysis of data. In 33rd ACM Symposium on Theory of Computing, 2001. [4] M. E. Tipping and C. M. Bishop. Probabilistic principal component analysis. Journal of the Royal Statistical Society, Series B, 21(3):611–622, 1999. [5] Nathan Srebro and Tommi Jaakkola. Weighted low rank approximation. In 20th International Conference on Machine Learning, 2003. [6] M. Collins, S. Dasgupta, and R. E. Schapire. A generalization of principal components analysis to the exponential family. In Advances in Neural Information Processing Systems 14, 2002. [7] Geoffrey J. Gordon. Generalized2 linear2 models. In Advances in Neural Information Processing Systems 15, 2003. [8] G. W. Stewart and Ji-guang Sun. Matrix Perturbation Theory. Academic Press, Inc, 1990. [9] Michal Irani and P Anandan. Factorization with uncertainty. In 6th European Conference on Computer Vision, 2000. [10] T. W. Anderson and Herman Rubin. Statistical inference in factor analysis. In Third Berleley Symposium on Mathematical Statistics and Probability, volume V, pages 111–150, 1956. [11] M J Wainwright and E P Simoncelli. Scale mixtures of Gaussians and the statistics of natural images. In Advances in Neural Information Processing Systems 12, 2000.
2003
160
2,377
Clustering with the Connectivity Kernel Bernd Fischer, Volker Roth and Joachim M. Buhmann Institute of Computational Science Swiss Federal Institute of Technology Zurich CH-8092 Zurich, Switzerland {bernd.fischer, volker.roth,jbuhmann}@inf.ethz.ch Abstract Clustering aims at extracting hidden structure in dataset. While the problem of finding compact clusters has been widely studied in the literature, extracting arbitrarily formed elongated structures is considered a much harder problem. In this paper we present a novel clustering algorithm which tackles the problem by a two step procedure: first the data are transformed in such a way that elongated structures become compact ones. In a second step, these new objects are clustered by optimizing a compactness-based criterion. The advantages of the method over related approaches are threefold: (i) robustness properties of compactness-based criteria naturally transfer to the problem of extracting elongated structures, leading to a model which is highly robust against outlier objects; (ii) the transformed distances induce a Mercer kernel which allows us to formulate a polynomial approximation scheme to the generally NPhard clustering problem; (iii) the new method does not contain free kernel parameters in contrast to methods like spectral clustering or mean-shift clustering. 1 Introduction Clustering or grouping data is an important topic in machine learning and pattern recognition research. Among various possible grouping principles, those methods which try to find compact clusters have gained particular importance. Presumingly the most prominent method of this kind is the K-means clustering for vectorial data [6]. Despite the powerful modeling capabilities of compactness-based clustering methods, they mostly fail in finding elongated structures. The fast single linkage algorithm [9] is the most often used algorithm to search for elongated structures, but it is known to be very sensitive to outliers in the dataset. Mean shift clustering [3], another method of this class, is capable of extracting elongated clusters only if all modes of the underlying probability distribution have one single maximum. Furthermore, a suitable kernel bandwidth parameter has to be preselected [2]. Spectral clustering [10] shows good performance in many cases, but the algorithm is only analyzed for special input instances while a complete analysis of the algorithm is still missing. Concerning the preselection of a suitable kernel width, spectral clustering suffers from similar problems as mean shift clustering. In this paper we present an alternative method for clustering elongated structures. Apart from the number of clusters, it is a completely parameter-free grouping principle. We build up on the work on path-based clustering [7]. For a slight modification of the original problem we show that the defined path distance induces a kernel matrix fulfilling Mercers condition. After the computation of the path-based distance, the compactness-based pairwise clustering principle is used to partition the data. While for the general NP-hard pairwise clustering problem no approximation algorithms are known, we present a polynomial time approximation scheme (PTAS) for our special case with path-based distances. The Mercer property of these distances allows us to embed the data in a (n −1) dimensional vector space even for non-metric input graphs. In this vector space, pairwise clustering reduces to minimizing the K-means cost function in (n −1) dimensions [13]. For the latter problem, however, there exists a PTAS [11]. In addition to this theoretical result, we also present an efficient practical algorithm resorting to a 2-approximation algorithm which is based on kernel PCA. Our experiments suggest that kernel PCA effectively reduces the noise in the data while preserving the coarse cluster structure. Our method is compared to spectral clustering and mean shift clustering on selected artificial datasets. In addition, the performance is demonstrated on the USPS handwritten digits dataset. 2 Clustering by Connectivity The main idea of our clustering criterion is to transform elongated structures into compact ones in a preprocessing step. Given the transformed data, we then infer a clustering solution by optimizing a compactness based criterion. The advantage of circumventing the problem of directly finding connected (elongated) regions in the data as e.g. in the spanning tree approach is the following: while spanning tree algorithms are extremely sensitive to outliers, the two-step procedure may benefit from the statistical robustness of certain compactness based methods. Concerning the general case of datasets which are not given in a vector space, but only characterized by pairwise dissimilarities, the pairwise clustering model has been shown to be robust against outliers in the dataset [12]. It may, thus, be a natural choice to formulate the second step as searching for the partition vector c ∈{1, . . . , K}n that minimizes the pairwise clustering cost function HPC(c; D) = PK ν=1 1 nν P i:ci=ν P j:cj=ν dij, (1) where K denotes the number of clusters, nν = |{i : ci = ν}| denotes the number of objects in cluster ν, and dij is the pairwise “effective” dissimilarity between objects i and j as computed by a preprocessing step. The idea of this preprocessing step is to define distances between objects by considering certain paths through the total object set. The natural formalization of such path problems is to represent the objects as a graph: consider a connected graph G = (V, E, d′) with n vertices (the objects) and symmetric nonnegative edge weights d′ ij on the edge (i, j) (the original dissimilarities). Let us denote by Pij all paths from vertex i to vertex j. In order to make those objects more similar which are connected by “bridges” of other objects, we define for each path p ∈Pij the effective dissimilarity dp ij between i and j connected by p as the maximum weight on this path, i.e. the “weakest link” on this path. The total dissimilarity between vertices i and j is then defined as the minimum of all path-specific effective dissimilarities dp ij: dij := min p∈Pij{ max 1≤h≤|p|−1 d′ p[h]p[h+1]}. (2) Figure 1 illustrates the definition of the effective dissimilarity. If the objects are in the same cluster their pairwise effective dissimilarities will be small (fig. 1(a)). If the two objects belong to two different clusters, however, all paths contain at least one large dissimilarity and the resulting effective dissimilarity will be large (fig. 1(b)). Note that single outliers as in (fig. 1(a,b)) do not affect the basic structure in the path-based distances. A problem dij (a) dij (b) dij (c) Figure 1: Effective dissimilarities. (a) If objects belong to the same high-density region, dij is small. (b) If they are in different regions, dij is larger. (c) To regions connected by a “bridge”. can only occur, if the point density along a “bridge” between the two clusters is as high as the density on the backbone of the clusters, see 1(c). In such a case, however, the points belonging to the “bridge” can hardly be considered as “outliers”. The reader should notice that the single linkage algorithm does not posses the robustness properties, since it will separate the three most distant outlier objects in example 1(a) from the remaining data, but it will not detect the dominant structure. Summarizing the above model, we formalize the path-based clustering problem as: INPUT: A symmetric (n × n) matrix D′ = (d′ ij)1≤i,j≤n of nonnegative pairwise dissimilarities between n objects, with zero diagonal elements. QUESTION: Find clusters by minimizing HPC(c; D), where the matrix D represents the effective dissimilarities derived from D′ by eq. (2). 3 The Connectivity Kernel In this section we show that the effective dissimilarities induce a Mercer kernel on the weighted graph G. The Mercer property will then allow us to derive several approximation results for the NP-hard pairwise clustering problem in section 4. Definition 1. A metric D is called ultra-metric if it satisfies the condition dij ≤ max(dik, dkj) for all distinct i, j, k. Theorem 1. The dissimilarities defined by (2) induce an ultra-metric on G. Proof. We have to check the axioms of a metric distance measure plus the restricted triangle inequality dij ≤max(dik, dkj): (i) dij ≥0, since the weights are nonnegative; (ii) dij = dji, since we consider symmetric weights; (iii) dii = 0 follows immediately from definition (2); (iv) The proof of the restricted triangle inequality follows by contradiction: suppose, there exists a triple i, j, k for which dij > max(dik, dkj). This situation, however, contradicts the above definition (2) of dij: in this case there exists a path from i to j over k, the weakest link of which is shorter than dij. Equation (2) then implies that dij must be smaller or equal to max(dik, dkj). Definition 2. A metric D is ℓ2 embeddable, if there exists a set of vectors {xi}n i=1, xi ∈ Rp, p ≤n −1 such that for all pairs i, j ∥xi −xj∥2 = dij. A proof for the following lemma has been given in [4]: Lemma 1. For every ultra-metric D, √ D is ℓ2 embeddable. Now we are considered with a realization of such an embedding. We introduce the notion of a centralized matrix. Let P be an (n × n) matrix and let Q = In −1 nene⊤ n , where en = (1, 1, . . . 1)⊤is a n-vector of ones and In the n × n identity matrix. We define the centralized P as P c = QPQ. The following lemma (for a proof see e.g. [15]) characterizes ℓ2 embeddings: Lemma 2. Given a metric D, √ D is ℓ2 embeddable iff Dc = QDQ is negative (semi)definite. The combination of both lemmata yields the following theorem. Theorem 2. For the distance matrix D defined in the setting of theorem 1, the matrix Sc = −1 2Dc with Dc = QDQ is a Gram matrix or Mercer kernel. It contains dot products between a set of vectors {xi}n i=1 with squared Euclidean distances ∥xi −xj∥2 2 = dij. Proof. (i) Since D is ultra-metric, √ D is ℓ2 embeddable by lemma 1, and Dc is negative (semi)definite by lemma (2). Thus, Sc = −1 2Dc is positive (semi)definite. As any positive (semi)definite matrix, Sc defines a Gram matrix or Mercer kernel. (ii) Since sc ij is a dotproduct between two vectors xi and xj, the squared Euclidean distance between xi and xj is defined by ∥xi −xj∥2 2 = sc ii + sc jj −2sc ij = −1 2  dc ii + dc jj −2dc ij  . With the definition of the centralized distances, it can be seen easily that all but one term, namely the original distance, cancel out: −1 2  dc ii + dc jj −2dc ij  = dij. 4 Approximation Results Pairwise clustering is known to be NP-hard [1]. To our knowledge there is no polynomial time approximation algorithm known for the general case of pairwise clustering. For our special case in which the data are transformed into effective dissimilarities, however, we now present a polynomial time approximation scheme. A Polynomial Time Approximation Scheme. Let us first consider the computation of the effective dissimilarities D. Despite the fact that the path-based distance is a minimum over all paths from i to j, the whole distance matrix can be computed in polynomial time. Lemma 3. The path-based dissimilarity matrix D defined by equation 2 can be computed in running time O(n2 log n). Proof. The computation of the connectivity kernel matrix is an extention of Kruskal’s minimum spanning tree algorithm. We start with n clusters each containing one single object. In each iteration step the two clusters Ci and Cj are merged with minimal costs dij = minp∈Ci,q∈Cj d′ pq where d′ pq is the edge weight on the input graph. The link dij gives the effective dissimilarity of all objects in Ci to all objects in Cj. To proof this, one can consider the case, where dij is not the effective dissimilarity between Ci and Cj. Then there exists a path over some other cluster Ck, where all objects on this path have a smaller weight, implying the existence of another pair of clusters with smaller merging costs. The running time is O(n2 log n) for the spanning tree algorithm on the the complete input graph and additional O(n2) for filling all elements in the matrix D. Let us now discuss the clustering step. Recall first the problem of K-means clustering: given n vectors X = {x1, . . . , xn ∈Rp}, the task is to partition the vectors in such a way that the squared Euclidean distance to the cluster centroids is minimized. The objective function for K-means is given by HKM(c; X) = PK ν=1 P i:ci=ν(xi −yν)2 where yν = 1 nν P j:cj=ν xj (3) Minimizing the K-means objective function for squared Euclidean distances is NP-hard if the dimension of the vectors is growing with n. Lemma 4. There exists a polynomial time approximation scheme (PTAS) for H KM in arbitrary dimensions and for fixed K. Proof. In [11] Ostrovsky and Rabani presented a PTAS for K-means. Using this approximation lemma we are able to proof the existence of a PTAS for pairwise data clustering using the distance defined by (2). Theorem 3. for distances defined by (2), there exists a PTAS for H PC. Proof. By lemma 3 the dissimilarity matrix D can be computed in polynomial time. By theorem 2 we can find vectors x1, . . . xn ∈Rp (p ≤n −1) with dij = ||xi −xj||2 2. For squared Euclidean distances, however, there is an algebraic identity between H PC(c; D) and HKM(c; X) [13]. By lemma 4 there exists a PTAS for HKM and thus for HPC. A 2-approximation by Kernel PCA. While the existence of a PTAS is an interesting theoretical approximation result, it does not automatically follow that a PTAS can be used in a constructive way to derive practical algorithms. Taking such a practical viewpoint, we now consider another (weaker) approximation result from which, however, an efficient algorithm can be designed easily. From the fact that we can define a connectivity kernel matrix we can use kernel PCA [14] to reduce the data dimension. The vectors are projected on the first principle components. Diagonalization of the centered kernel matrix Sc leads to Sc = V tΛV , with an orthogonal matrix V = (v1, . . . , vn) containing the eigenvectors of Sc, and a diagonal matrix Λ = diag(λ1, . . . , λn) containing the corresponding eigenvalues on its diagonal. Assuming now that the eigenvalues are in descending order (λ1 ≥λ2 ≥ · · · ≥λn), the data are projected on the first p eigenvectors: x′ i = Pp j=1 p λjvji. Theorem 4. Embedding the path-based distances into RK by kernel PCA and enumerating over all possible Voronoi partitions yields an O(nK2+1) algorithm which approximates path-based clustering within a constant factor of 2. Proof. The solution of the K-means cost function induces a Voronoi partition on the dataset. If the dimension p of the data is kept fix, the number of different Voronoi partitions is at most O(nKp), and they can be enumerated in O(nKp+1) time [8]. Further, if the embedding dimension is chosen as p = K, K-means in RK is a 2-approximation algorithm for K-means in Rn−1 [5]. Combining both results, we arrive at a 2-approximation algorithm with running time O(nK2+1). Heuristics without approximation guarantees. The running time of the 2-approximation algorithm may still be too large for many applications, therefore we will refer to two heuristic optimization methods without approximation guarantees. Instead of enumerating all possible Voronoi partitions, one can simply partition the data with the fast classical Kmeans algorithm. In one sweep it assigns each object to the nearest centroid, while keeping all other object assignments fixed. Then the centroids are relocated according to the new assignments. Since the running time grows linear with the data dimension, it is useful to first embed the data in K dimensions which leads us to a functional which optimal solution is even in the worst case within a factor of two of the desired solution, as we know from the above approximation results. In this reduced space, the K-means heuristics is applied with the hope that there exist only few local minima in the low-dimensional subspace. As a second heuristic one can apply Ward’s method which is an agglomerative optimization of the K-means objective function.1 It starts with n clusters, each containing one object, and in each step the two clusters that minimize the K-means objective function are merged. Ward’s method produces a cluster hierarchy. For applications of this method see figure 3. 5 Experiments We first compare our method with the classical single linkage algorithm on artificial data consisting of three noisy spirals, see figure 2. Our main concern in these experiments is the robustness against noise in the data. Figure 3(a) shows the dendrogram produced by single linkage. The leaves of the tree are the objects of figure 2. For better visualization of the tree structure, the bar diagrams below the tree show the labels of the three cluster 1It has been shown in [12] that Ward’s method is an optimization heuristics for H P C. Due to the equivalence of HP C and HKM in our special case, this property carries over to K-means. (a) (b) (c) Figure 2: Comparison to other clustering methods. (a) Mean shift clustering, (b) Spectral Clustering, (c) Connectivity kernel clustering. (Color images at http://www.inf.ethz.ch/∼befische/nips03) (a) (b) (c) Figure 3: Hierarchical Clustering Solutions for example 2(c). (a) Single Linkage, (b) Ward’s method with connectivity kernel, applied to embedded objects in n −1 dimensions. (c) Ward’s method after kernel PCA embedding in 3 dimensions. solution as drawn in fig. 2(c). The height of the inner nodes depicts the merging costs for two subtrees. Each level of the hierarchy is one cluster solution. It is obvious that the main parts of the spiral arms are found, but the objects drawn on the right side are separated from the rest of the cluster. The respective objects are the outliers that are separated in the highest hierarchical levels of the algorithm. We conclude that for small K, single linkage has the tendency to separates single outlier objects from the data. By way of the connectivity kernel we can transform the original dyadic data to n −1 dimensional vectorial data. To show comparable results for the connectivity kernel, we apply Ward’s method to the embedded vectors. Figure 3(b) shows the cluster hierarchy for Ward’s method in the full space of n −1 dimensions. Opposed to the single linkage results, the main structure of the spiral arms has been successfully found in the hierarchy corresponding to the three cluster solution. Below the three cluster lever, the tree appears to be very noisy. It should also be noticed that the costs of the three cluster solution are not much larger as the costs of the four cluster solution, indicating that the three cluster solution does not form a distinctly separated hierarchical level. Figure 3(c) demonstrates that more distinctly separated levels can be found after applying kernel PCA and embedding the objects into a low-dimensional space (here 3 dimensions). Ward’s method is then applied to the embedded objects. One can see that the coarse structure of the tree has been preserved, while the costs of cluster solutions for K > 3 have been shrunken towards zero. We conclude that PCA has the effect of de-noising the hierarchical tree, leading to a more robust agglomerative algorithm. Now we compare our results to other recently published clustering techniques, that have been designed to extract elongated structures. Mean shift clustering [3] computes a trajectory of vectors towards the gradient of the underlying probability density. The probability distribution is estimated with a density estimation kernel, e.g. a Gaussian kernel. The trajectories starting at each point in the feature space converge at the local maxima of the probability distribution. Mean shift clustering is only applicable to finite dimensional vector spaces, because it implicitly involves density estimation. A potential shortcoming of mean-shift clustering is the following: if the modes of the distribution have multiple local maxima (as e.g. in the spiral arm example), there does not exist any kernel bandwidth to successfully separate the data according to the underlying structure. In figure 2(a) the best result for mean shift clustering is drawn. For smaller values of σ the spiral arms are further subdivided into additional clusters, and for a larger bandwidth values, the result becomes more and more similar to compactness-based criteria like K-means. Spectral methods [10] have become quite popular in the last years. Usually the Laplacian matrix based on a Gaussian kernel is computed. By way of PCA, the data are embedded in a low dimensional space. The K-means algorithm on the embedded data then gives the resulting partition. It has also been proposed to project the data on the unit sphere before applying K-means. Spectral clustering with a Gaussian kernel is known to be able to separate nested circles, but we observed that it has severe problems to extract the noisy spiral arms, see 2(b). In spectral clustering, the kernel width σ is a free parameter which has to be selected “correctly”. If σ is too large, spectral clustering becomes similar to standard K-means and fails to extract elongated structures. If, on the other hand, σ is too small, the algorithm becomes increasingly sensitive to outliers, in the sense that it has the tendency to separate single outlier objects. Our approach to clustering with the connectivity kernel, however, could successfully extract the three spiral arms as can be seen in figure 2(c). The reader should notice, that this method does not require the user to preselect any kernel parameter. (a) (b) (c) Figure 4: Example from the USPS dataset. Training example of digits 2 and 9 embedded in two dimensions. (a) Ground truth labels. (b) K-means labels and (c) clustering with connectivity kernel. In a last experiment, we show the advantages of our method compared to a parameter-free compactness criterion (K-means) on the problem of clustering digits ’2’ and ’9’ from the USPS digits dataset. Figure 4 shows the clustering result of our method using the connectivity kernel. The 16x16 digit gray-value images of the USPS dataset are interpreted as vectors and projected on the two leading principle components. In figure 4(a) the ground truth solution is drawn. Figure 4(b) shows the partition by directly applying K-means clustering, and figure 4(c) shows the result produced by our method. Compared to the ground truth solution, path-based clustering succeeded in extracting the elongated structures, resulting in a very small error of only 1.5% mislabeled digits. The compactness-based Kmeans method, on the other hand, produces clearly suboptimal clusters with an error rate of 30.6%. 6 Conclusion In this paper we presented a clustering approach, that is based on path-based distances in the input graph. In a first step, elongated structures are transformed into compact ones, which in the second step are partitioned by the compactness-based pairwise clustering method. We showed that the transformed distances induce a Mercer kernel, which in turn allowed us to derive a polynomial time approximation scheme for the generally NP-hard pairwise clustering problem. Moreover, Mercers property renders it possible to embed the data into low-dimensional subspaces by Kernel PCA. These embeddings form the basis for an efficient 2-approximation algorithm, and also for de-noising the data to “robustify” fast agglomerative optimization heuristics. Compared to related methods like single linkage, mean shift clustering and spectral clustering, our method has been shown to successfully overcome the problem of sensitivity to outlier objects, while being capable of extracting nested elongated structures. Our method does not involve any free kernel parameters, which we consider to be a particular advantage over both mean shift– and spectral clustering. References [1] P. Brucker. On the complexity of clustering problems. Optimization and Operations Research, pages 45–54, 1977. [2] D. Comaniciu. An algorithm for data-driven bandwidth selection. IEEE T-PAMI, 25(2):281– 288, 2003. [3] D. Comaniciu and P. Meer. Mean shift: A robust approach toward feature space analysis. IEEE T-PAMI, 24(5):603–619, 2002. [4] M. Deza and M. Laurent. Applications of cut polyhedra. J. Comp. Appl. Math., 55:191–247, 1994. [5] P. Drineas, A. Frieze, R. Kannan, S. Vempala, and V. Vinay. Clustering on large graphs and matrices. In Proc. of the ACM-SIAM Symp. on Discrete Algorithm., pages 291–299, 1999. [6] R. Duda, P. Hart, and D. Stork. Pattern Classification. Wiley & Sons, 2001. [7] B. Fischer and J.M. Buhmann. Path-based clustering for grouping of smooth curves and texture segmentation. IEEE T-PAMI, 25(4):513–518, 2003. [8] M. Inaba, N. Katoh, and H. Imai. Applications of weighted voronoi diagrams and randomization to variance-based k-clustering. In 10th ACM Sympos. Computat. Geom., pages 332–339, 1994. [9] A. Jain and R. Dubes. Algorithms for Clustering Data. Prentice Hall, 1988. [10] A.Y. Ng, M.I. Jordan, and Y. Weiss. On spectral clustering: Analysis and an algorithm. In NIPS, volume 14, pages 849–856, 2002. [11] R. Ostrovsky and Y. Rabani. Polynomial time approximation schemes for geometric min-sum median clustering. Journal of the ACM, 49(2):139–156, 2002. [12] J. Puzicha, T. Hofmann, and J.M. Buhmann. A theory of proximity based clustering: Structure detection by optimization. Pattern Recognition, 2000. [13] V. Roth, J. Laub, J.M. Buhmann, and K.-R. M¨uller. Going metric: Denoising pairwise data. In NIPS, volume 15, 2003. to appear. [14] B. Sch¨olkopf, A. Smola, and K.-R. M¨uller. Nonlinear component analysis as a kernel eigenvalue problem. Neural Computation, 10:1299–1319, 1998. [15] G. Young and A. S. Householder. Discussion of a set of points in terms of their mutual distances. Psychometrica, 3:19–22, 1938.
2003
161
2,378
Attractive People: Assembling Loose-Limbed Models using Non-parametric Belief Propagation Leonid Sigal Department of Computer Science Brown University Providence, RI 02912 ls@cs.brown.edu Michael Isard Microsoft Research Silicon Valley Mountain View, CA 94043 misard@microsoft.com Benjamin H. Sigelman Department of Computer Science Brown University Providence, RI 02912 bhsigelm@cs.brown.edu Michael J. Black Department of Computer Science Brown University Providence, RI 02912 black@cs.brown.edu Abstract The detection and pose estimation of people in images and video is made challenging by the variability of human appearance, the complexity of natural scenes, and the high dimensionality of articulated body models. To cope with these problems we represent the 3D human body as a graphical model in which the relationships between the body parts are represented by conditional probability distributions. We formulate the pose estimation problem as one of probabilistic inference over a graphical model where the random variables correspond to the individual limb parameters (position and orientation). Because the limbs are described by 6-dimensional vectors encoding pose in 3-space, discretization is impractical and the random variables in our model must be continuousvalued. To approximate belief propagation in such a graph we exploit a recently introduced generalization of the particle filter. This framework facilitates the automatic initialization of the body-model from low level cues and is robust to occlusion of body parts and scene clutter. 1 Introduction Recent approaches to person detection and tracking exploit articulated body models in which the body is viewed as a kinematic tree in 2D [14], 2.5D [16, 23], or 3D [2, 5, 6, 19, 21] leading to a parametric state-space representation of roughly 25–35 dimensions. The high dimensionality of the resulting state-space has motivated the development of specialized stochastic search algorithms that either exploit the highly redundant dynamics of typical human motions [19], or use hierarchical sampling schemes to exploit the tree-structured nature of the model [5, 15]. These schemes have been effective for tracking people wearing increasingly complex clothing in increasingly complex cluttered backgrounds [21]. There are however a number of important shortcomings of these approaches. Hierarchical body models lead to “top-down” search algorithms that make it difficult to incorporate “bottom-up” information about salient body parts available from special-purpose detectors (e.g. face or limb detectors). As a result, few, if any, of the above methods deal with the problem of automatic initialization of the body model. Furthermore, the difficulty of incorporating bottom-up information means that the algorithms are brittle; that is, when they lose track of the body, they have no way to recover. Finally, the fully coupled kinematic model results in a computationally challenging search problem because the search space cannot be naturally decomposed. To address these problems, we propose a “loose-limbed” body model in which the limbs are not rigidly connected but are rather “attracted” to each other (hence the title “Attractive People”). Instead of representing the body as a single 33-dimensional kinematic tree, each limb is treated quasi-independently with soft constraints between the position and orientation of adjacent parts. The model resembles a Push Puppet toy which has elastic connections between the limbs (Figure 1a). This type of model is not new for finding or tracking articulated objects and dates back at least to Fischler and Elschlager’s pictorial structures [9]. Variations on this type of model have been recently applied by Burl et al. [1], Felzenszwalb and Huttenlocher [8], Coughlan and Ferreira [3] and Ioffe and Forsyth [11, 17]. The main benefits are that it supports inference algorithms where the computational cost is linear rather than exponential in the number of body parts, it allows elegant treatment of occlusion, and it permits automatic initialization based on individually unreliable low-level body-part detectors [25]. The work described here, like the previous work above, exploits this notion of flexible “spring”-like constraints [8] defined over individually modeled body parts [11, 17, 23], though we extend the approach to locate the parts in 3-space rather than the 2-dimensional image plane. The body is treated as a graphical model [13], where each node in the graph corresponds to an independently parameterized body part. The spatial constraints between body parts are defined as directed edges in the graph. Each edge has an associated conditional distribution that models the probabilistic relationship between the parts. Each node in the graph also has a corresponding image likelihood function that models the probability of observing various image measurements conditioned on the position and orientation of the part. Person detection (or tracking) then exploits belief propagation [24] to estimate the belief distribution over the parameters which takes into account the constraints and the observations. This graphical inference problem is carried out using a recently proposed method that allows the parameters of the individual parts to be modeled using continuous-valued random variables rather than the discrete variables used in previous approaches. This is vital in our problem setting, since the discretization used in [8] is impractical once the body is modeled in 3-space. Similar versions of the algorithm were independently introduced by Sudderth et al. [22] under the name of Non-parametric Belief Propagation (NBP) and by Isard [12] as the PAMPAS algorithm. We adopt the framework of Isard while making use of the Gibbs sampler introduced by Sudderth et al. The algorithm extends the flexibility of particle filters to the problem of belief propagation and, in our context, allows the model to cope with general constraints between limbs, permits realistic appearance models, and provides resilience to clutter. We develop the loose-limbed model in detail, formulate the constraints between limbs using mixture models, and outline the inference method. Using images from calibrated cameras we illustrate the inference of 3D human pose with belief propagation. We simulate noisy, bottom-up, feature detectors for the limbs and show how the inference method can resolve ambiguities and cope with clutter. While our focus here is on static detection and pose estimation, the body model can be extended in time to include temporal constraints on the limb motion; we save tracking for future work. 6 5 0 1 3 2 4 7 8 ψ3,4 ψ4,3 ψ2,1 ψ1,2 9 (a) (b) (c) Figure 1: (a) Toy Push Puppet with elastic joints. (b) Graphical model for a person. Nodes represent limbs and arrows represent conditional dependencies between limbs. (c) Parameterization of part i. 2 A self-assembling body model The body is represented by a graphical model in which each graph node corresponds to a body part (upper leg, torso, etc.). Each part has an associated configuration vector defining the part’s position and orientation in 3-space. Placing each part in a global coordinate frame enables the part detectors to operate independently while the full body is assembled by inference over the graphical model. Edges in the graphical model correspond to spatial and angular relationships between adjacent body parts, as illustrated in Figure 1b. As is standard for graphical models we assume the variables in a node are conditionally independent of those in non-neighboring nodes given the values of the node’s neighbors1. Each part/limb is modeled by a tapered cylinder having 5 fixed (person specific) and 6 estimated parameters. The fixed parameters Φi = (li, wp i , wd i , op i , od i ) correspond respectively to the part length, width at the proximal and distal ends and the offset of the proximal and distal joints along the axis of the limb as shown in Figure 1c. The estimated parameters XT i = (xT i , ΘT i ) represent the configuration of the part i in a global coordinate frame where xi ∈R3 and Θi ∈SO(3) are the 3D position of the proximal joint and the angular orientation of the part respectively. The rotations are represented by unit quaternions. Each directed edge between parts i and j has an associated conditional distribution ψij(Xi, Xj) that encodes the compatibility between pairs of part configurations; that is, it models the probability of configuration Xj of part j conditioned on the Xi of part i. For notational convenience we define an ordering on body parts going from the torso out towards the extremities and refer to conditionals that go along this ordering as “forward” conditionals. Conversely, the conditionals that go from the extremities towards the torso are referred to as “backward” conditionals. These intuitively correspond to kinematic and inverse-kinematic constraints respectively. Conditional distributions were constructed by hand to capture the physical constraints of the joints and limbs of the human body. A typical range of motion information for the various joints is approximated by the model. In general, these conditionals can, and should, be learned from motion capture data. Because we have chosen the local coordinate frame to be centered at the proximal joint of 1Self-occlusion and self-intersection violate this assumption. These can be modeled by adding additional edges in the graph between the possibly occluding or inter-penetrating parts. In the limit this would lead to quadratic as opposed to linear computation time in the number of parts. (a) (b) Figure 2: (a) For the forwards conditional the location of part i tightly constrains the proximal joint of part j (light dots) while the position of the distal joint (dark dots) lies along an arc around the principal axis of rotation, approximated by a Gaussian mixture. (b) For the backwards conditional part i constrains the distal joint of part j (dark dots), so the proximal joint position (light dots) lies in a non-Gaussian volume again approximated using a mixture distribution. a part, the forward and backward conditionals are not symmetric. In both directions the probability of Xj, conditioned on Xi, is non-Gaussian and it is approximated by a mixture of Mij Gaussians (typically 5-7 in the experiments here): ψij(Xi, Xj) = λ0N(Xj; µij, Λij) + (1 −λ0) PMij m=1 δijmN(Xj; Fijm(Xi), Gijm(Xi)) (1) where λ0 is a fixed outlier probability, µij and Λij are the mean and covariance of the Gaussian outlier process, and Fijm(.) and Gijm(.) are functions computing the mean and covariance matrix respectively of the m-th Gaussian mixture component. These functions allow the mean and variance of the mixture components to be function of the limb pose Xi. δijm is the relative weight of an individual component and PMij m=1 δijm = 1. Figure 2a and b illustrate the forward and backward conditionals respectively. For the forward case, we examine the distribution of calf configurations conditioned on the thigh. To illustrate the conditional distribution we sample from it and plot the endpoints of the sampled limb configurations. In the forward direction the conditional distribution over xj (the position of the proximal joint of part j) is well approximated by a Gaussian so each mixture component has the same mean and covariance for xj. This can be seen in the tight clustering of the light dots which lie almost on top of each other. The probability of the lower leg angle is restricted to a range of legal motions conditioned on the upper leg. This distribution over rotations is modeled by giving each mixture component a different mean rotation, Θj, spaced evenly around the principal axis of the joint. This angular uncertainty is illustrated by the dark dots. For the backward conditional we show the distribution over torso configurations conditioned on the thigh. In this direction the conditional predicting xj (e.g. torso position) is more complicated. The location of xi restricts xj to lie near a hemisphere, and the orientation Θi and principal axis of rotation further restrict xj to a strip on that hemisphere which can be seen in Figure 2b (light dots). Thus each mixture component in (1) is spaced evenly in Θj and xj to represent this range of uncertainty. The combined uncertainty in torso location and orientation can be seen in the distribution of the dark dots representing the distal torso joint. Image Likelihoods The inference algorithm outlined in the next section combines the body model described above with a probabilistic image likelihood model. In particular, we define φi(Xi) to be the likelihood of observing the image measurements conditioned on the pose of limb i. Ideally this model would be robust to partial occlusions, the variability of image statistics across different input sequences, and variability among subjects. To that end, we combine a variety of cues including multi-scale edge and ridge filters as well as background subtraction information. Following related work [18], the likelihoods are estimated independently for each image view by projecting the 3D model of a limb into the corresponding image projection plane. These likelihoods are then combined across views, assuming independence, and are weighted by the observability of the limb in a given view (more weight is given to views in which the limb lies parallel to the image projection plane). For more information on the formulation of the image likelihoods see [20]. 3 Non-parametric Belief Propagation Having defined the model it remains to specify an algorithm which will perform inference and estimate a belief distribution for each of the body parts. If it were feasible to discretize the Xi we could apply traditional belief propagation or a specialized inference algorithm as set out in [8]. However, the 6-dimensional configuration vector compels the use of continuous-valued random variables, and so we adopt the algorithm introduced in [12, 22] for just such types of model. It is a generalization of particle filtering [7] which allows inference over arbitrary graphs rather than just a chain. This generalization is achieved by treating the particle set which is propagated in a standard particle filter as an approximation to the “message” used in the belief propagation algorithm, and replacing the conditional distribution from the previous time step by a product of incoming message sets. A message mij from node i →j is written mij(Xj) = Z ψij(Xi, Xj)φi(Xi) Y k∈Ai\j mkj(Xi)dXi, (2) where Ai is the set of neighbors of node i and φi(Xi) is the local likelihood associated with node i. The message mij(Xj) can be approximated by importance sampling N ′ = (N −1)/Mij times from a proposal function f(Xi), and then doing importance correction. (See [22] for an alternative algorithm that uses more general potential functions than the conditional distributions used here.) As discussed in [12] the samples may be stratified into groups with different proposal functions f(·), so some samples come from the product of all incoming messages Ai into the node, some from Ai\j (i.e. Ai excluding j) and some from a static importance function Q(Xi) — we use a limb proposal distribution based on local image measurements. For reasons of space we present only a simplified algorithm to update message mij in Figure 3 which does not include the stratification but the full algorithm can be found in [12]. We use the Gibbs sampler described in [22] to form message products of D > 2 messages. The algorithm must sample, evaluate, and take products over Gaussian distributions defined ∈SO(3) and represented in terms of unit quaternions. We adopt the approximation given in [4] for dealing with rotational distributions by treating the quaternions locally linearly in R4 — this approximation is only valid for kernels with small rotational covariance and can in principle suffer from singularities if product distributions are widely distributed about the sphere, but we have not encountered problems in practice. 1. Draw N ′ = (N −1)/Mij samples from the proposal function: ˜sn′ ij ∼f(Xi), n′ ∈[1, N ′]. 2. Compute importance corrections for n′ ∈[1, N ′]: ηn′ ij = φi(˜sn′ ij ) Q k∈Ai\j mki(˜sn′ ij ) f(˜sn′ ij ) . 3. Store normalized weights and mixture components for n′ ∈[1, N ′], m ∈[1, Mij]: (a) n = (n′ −1)Mij + m (b) µn ij = Fijm(˜sn′ ij ) (c) Λn ij = Gijm(˜sn′ ij ) (d) πn ij = (1 −λ0) ηn′ ij δijm P N′ k=1 ηk ij . 4. Assign outlier component: πN ij = λ0, µN ij = µ0 ij, ΛN ij = Λ0 ij Figure 3: The simplified PAMPAS non-parametric belief propagation algorithm. 4 Experiments We illustrate the approach by recovering 3D body pose given weak bottom-up information and clutter. The development of bottom-up part detectors is beyond the scope of this paper. Here we exploit a realistic simulation of such detectors in which: 1) the limbs are only detected 50% of the time — the remaining samples are clutter; 2) the limb detectors are non-specific in that they cannot distinguish the left and right sides of the body or the upper from lower limbs (they do, however, distinguish between legs and arms) — the result is that only a small fraction of bottom-up samples fall in the right place with the right interpretation; 3) the detectors are noisy and do not detect the limb position and orientation accurately; 4) no correct initialization samples are generated for the torso, simulating detector failure or occlusion. Figure 4 shows results for two time instants in a video sequence taken from three calibrated cameras. After 10 iterations of belief propagation, the algorithm has discarded the samples which originated in clutter and has correctly assigned the limbs. The figure shows the initialization and the final distribution over limb poses which is computed by sampling from the belief distribution. Note that the torso is well localized even though there was no bottom-up detector for it. 5 Conclusion We present a new body model and inference method that supports the goals of automatically locating and tracking an articulated body in three dimensions. We show that a “looselimbed” model with continuous-valued parameters can effectively represent a person’s location and pose, and that inference over such a model can be tractably performed using belief propagation over particle sets. Moreover, we demonstrate robust location of the person starting from imperfect initialization using a simulated body-part detector. The detector is assumed to generate both false positive initializations and false negatives; i.e. failures to detect some body parts altogether. It is straightforward to extend the graphical model across time to implement a person (a) (b) Figure 4: Inferring attractive people: Two experiments are shown; (a) and (b) show results for two different time instants in a walking cycle. Each experiment used three calibrated camera views. Left: Initialization samples drawn from noisy simulated part detectors. Part detectors are assumed to have high failure rate, generating 50% of the samples far away from any true body part. They are also non-specific; e.g. the left thigh samples are equally distributed over left and right thigh and calf. The torso is assumed to be undetectable. Right: Belief after 10 iterations of PAMPAS. We use 100 particles to model the messages between the nodes, and show 20 samples from the belief distribution, as well as the average of the top 10 percent of the belief samples as the ”best” pose estimate. For brevity, (b) only shows the best pose from a single view. tracker. There are several advantages of this approach compared with traditional particle filtering: the complexity of the search task is linear rather than exponential in the number of body parts; bottom-up initialization information can be incorporated in every frame; and forward-backward smoothing, either over a time-window or an entire sequence, is straightforward. In future work we intend to build automatic body-part detectors. Constructing reliable detectors using only low-level information (static appearance) is a challenging problem but we have the advantage of being robust to imperfect detection as noted above. We also intend to learn the conditional distributions between parts from a database of motion capture data. Together these advances should allow reliable use of the presented body model in the person tracking framework. Acknowledgments. We thank Jianbo Shi for providing the image data. LS, BHS, and MJB were supported in part by the DARPA HumanID Project (ONR N000140110886). References [1] M. Burl, M. Weber and P. Perona . A probabilistic approach to object recognition using local photometry and global geometry, ECCV, pp. 628–641, 1998. [2] C. Bregler and J. Malik. Tracking people with twists and exponential maps, CVPR, pp. 8–15, 1998. [3] J. Coughlan and S. Ferreira. Finding deformable shapes using loopy belief propagation, ECCV Vol. 3, pp. 453–468, 2002. [4] J. Deutscher, M. Isard and J. MacCormick. Automatic camera calibration from a single manhattan image, ECCV, pp. 175–188, 2002. [5] J. Deutscher, A. Davison and I. Reid. Automatic partitioning of high dimensional search spaces associated with articulated body motion capture, CVPR, pp. 669–676, 2001. [6] J. Deutscher, B. North, B. Bascle and A. Blake. Tracking through singularities and discontinuities by random sampling, ICCV, pp. 1144–1149, 1999. [7] A. Douce, N. de Freitas and N. Gordon. Sequantial Monte Carlo methods in practice, Statistics for Engineering and Information Sciences, pp. 3–14, Springer Verlag, 2001. [8] P. Felzenszwalb and D. Huttenlocher. Efficient matching of pictorial structures, CVPR, Vol. 2, pp. 66–73, 2000. [9] M. Fischler and R. Elschlager. The representation and matching of pictorial structures. IEEE. Trans. Computers, 22(1):67–92, 1973. [10] J. Gao and J. Shi, Inferring human upper body motion, Tech report CMU-RI-TR-03-05, 2003. [11] S. Ioffe and D. Forsyth. Probabilistic methods for finding people, IJCV 43(1):45–68, 2001. [12] M. Isard. PAMPAS: Real-valued graphical models for computer vision, CVPR, Vol. 1, pp. 613– 620, 2003. [13] M. Jordan, T. Sejnowski and T. Poggio. Graphical models: Foundations of neural computation, MIT Press, 2001. [14] S. Ju, M. Black and Y. Yacoob. Cardboard people: A parameterized model of articulated motion. Int. Conf. on Automatic Face and Gesture Recognition, pp. 38–44, 1996. [15] J. MacCormick and M. Isard. Partitioned sampling, articulated objects, and interface-quality hand tracking. ECCV (2), pp. 3–19, 2000. [16] V. Pavolvi´c, J. Rehg, T-J. Cham and K. Murphy. A dynamic Bayesian network approach to figure tracking using learned dynamic models, ICCV, pp. 94–101, 1999. [17] D. Ramanan and D. Forsyth. Finding and tracking people from the bottom up, CVPR, Vol. II, pp. 467–716, 2003. [18] H. Sidenbladh and M. Black. Learning image statistics for Bayesian tracking, ICCV, Vol. II, pp. 709–716, 2001. [19] H. Sidenbladh, M. Black and D. Fleet. Stochastic tracking of 3D human figures using 2D image motion, ECCV, vol. 2, pp. 702–718, 2000. [20] B. Sigelman. Video-Based Tracking of 3D Human Motion Using Multiple Cameras, Brown Univ., Dept. of Comp. Sci., Technical Report, CS-03-08, 2003. [21] C. Sminchisescu and B. Triggs. Covariance scaled sampling for monocular 3D body tracking, CVPR, vol. 1 pp. 447–454, 2001. [22] E. Sudderth, A. Ihler, W. Freeman and A. Willsky. Nonparametric belief propagation, CVPR, Vol. 1, pp. 605–612, 2003; (see also MIT AI Lab Memo 2002-020). [23] Y. Wu, G. Hua and T. Yu, Tracking articulated body by dynamic Markov network, ICCV, pp. 1094–1101, 2003. [24] J. Yedidia, W. Freeman and Y. Weiss. Generalized belief propagation, Advances in Neural Info. Proc. Sys. 13, pp. 689–695, 2000. [25] S. Yu, R. Gross, and J. Shi. Object segmentation by graph partitioning Concurrent object recognition and segmentation by graph partitioning, Advances in Neural Info. Proc. Sys. 15, pp. 1407–1414, 2003.
2003
162
2,379
Out-of-Sample Extensions for LLE, Isomap, MDS, Eigenmaps, and Spectral Clustering Yoshua Bengio, Jean-Franc¸ois Paiement, Pascal Vincent Olivier Delalleau, Nicolas Le Roux and Marie Ouimet D´epartement d’Informatique et Recherche Op´erationnelle Universit´e de Montr´eal Montr´eal, Qu´ebec, Canada, H3C 3J7 {bengioy,vincentp,paiemeje,delallea,lerouxni,ouimema} @iro.umontreal.ca Abstract Several unsupervised learning algorithms based on an eigendecomposition provide either an embedding or a clustering only for given training points, with no straightforward extension for out-of-sample examples short of recomputing eigenvectors. This paper provides a unified framework for extending Local Linear Embedding (LLE), Isomap, Laplacian Eigenmaps, Multi-Dimensional Scaling (for dimensionality reduction) as well as for Spectral Clustering. This framework is based on seeing these algorithms as learning eigenfunctions of a data-dependent kernel. Numerical experiments show that the generalizations performed have a level of error comparable to the variability of the embedding algorithms due to the choice of training data. 1 Introduction Many unsupervised learning algorithms have been recently proposed, all using an eigendecomposition for obtaining a lower-dimensional embedding of data lying on a non-linear manifold: Local Linear Embedding (LLE) (Roweis and Saul, 2000), Isomap (Tenenbaum, de Silva and Langford, 2000) and Laplacian Eigenmaps (Belkin and Niyogi, 2003). There are also many variants of Spectral Clustering (Weiss, 1999; Ng, Jordan and Weiss, 2002), in which such an embedding is an intermediate step before obtaining a clustering of the data that can capture flat, elongated and even curved clusters. The two tasks (manifold learning and clustering) are linked because the clusters found by spectral clustering can be arbitrary curved manifolds (as long as there is enough data to locally capture their curvature). 2 Common Framework In this paper we consider five types of unsupervised learning algorithms that can be cast in the same framework, based on the computation of an embedding for the training points obtained from the principal eigenvectors of a symmetric matrix. Algorithm 1 1. Start from a data set D = {x1, . . . , xn} with n points in Rd. Construct a n × n “neighborhood” or similarity matrix M. Let us denote KD(·, ·) (or K for shorthand) the data-dependent function which produces M by Mij = KD(xi, xj). 2. Optionally transform M, yielding a “normalized” matrix ˜ M. Equivalently, this corresponds to generating ˜ M from a ˜KD by ˜ Mij = ˜KD(xi, xj). 3. Compute the m largest positive eigenvalues λk and eigenvectors vk of ˜ M. 4. The embedding of each example xi is the vector yi with yik the i-th element of the k-th principal eigenvector vk of ˜ M. Alternatively (MDS and Isomap), the embedding is ei, with eik = √λkyik. If the first m eigenvalues are positive, then ei · ej is the best approximation of ˜ Mij using only m coordinates, in the squared error sense. In the following, we consider the specializations of Algorithm 1 for different unsupervised learning algorithms. Let Si be the i-th row sum of the affinity matrix M: Si = X j Mij. (1) We say that two points (a, b) are k-nearest-neighbors of each other if a is among the k nearest neighbors of b in D ∪{a} or vice-versa. We denote by xij the j-th coordinate of the vector xi. 2.1 Multi-Dimensional Scaling Multi-Dimensional Scaling (MDS) starts from a notion of distance or affinity K that is computed between each pair of training examples. We consider here metric MDS (Cox and Cox, 1994). For the normalization step 2 in Algorithm 1, these distances are converted to equivalent dot products using the “double-centering”formula: ˜ Mij = −1 2 Mij −1 nSi −1 nSj + 1 n2 X k Sk ! . (2) The embedding eik of example xi is given by √λkvki. 2.2 Spectral Clustering Spectral clustering (Weiss, 1999) can yield impressively good results where traditional clustering looking for “round blobs”in the data, such as K-means, would fail miserably. It is based on two main steps: first embedding the data points in a space in which clusters are more “obvious” (using the eigenvectors of a Gram matrix), and then applying a classical clustering algorithm such as K-means, e.g. as in (Ng, Jordan and Weiss, 2002). The affinity matrix M is formed using a kernel such as the Gaussian kernel. Several normalization steps have been proposed. Among the most successful ones, as advocated in (Weiss, 1999; Ng, Jordan and Weiss, 2002), is the following: ˜ Mij = Mij p SiSj . (3) To obtain m clusters, the first m principal eigenvectors of ˜ M are computed and K-means is applied on the unit-norm coordinates, obtained from the embedding yik = vki. 2.3 Laplacian Eigenmaps Laplacian Eigenmaps is a recently proposed dimensionality reduction procedure (Belkin and Niyogi, 2003) that has been proposed for semi-supervised learning. The authors use an approximation of the Laplacian operator such as the Gaussian kernel or the matrix whose element (i, j) is 1 if xi and xj are k-nearest-neighbors and 0 otherwise. Instead of solving an ordinary eigenproblem, the following generalized eigenproblem is solved: (S −M)vj = λjSvj (4) with eigenvalues λj, eigenvectors vj and S the diagonal matrix with entries given by eq. (1). The smallest eigenvalue is left out and the eigenvectors corresponding to the other small eigenvalues are used for the embedding. This is the same embedding that is computed with the spectral clustering algorithm from (Shi and Malik, 1997). As noted in (Weiss, 1999) (Normalization Lemma 1), an equivalent result (up to a componentwise scaling of the embedding) can be obtained by considering the principal eigenvectors of the normalized matrix defined in eq. (3). 2.4 Isomap Isomap (Tenenbaum, de Silva and Langford, 2000) generalizes MDS to non-linear manifolds. It is based on replacing the Euclidean distance by an approximation of the geodesic distance on the manifold. We define the geodesic distance with respect to a data set D, a distance d(u, v) and a neighborhood k as follows: ˜D(a, b) = min p X i d(pi, pi+1) (5) where p is a sequence of points of length l ≥2 with p1 = a, pl = b, pi ∈D ∀i ∈ {2, . . . , l −1} and (pi,pi+1) are k-nearest-neighbors. The length l is free in the minimization. The Isomap algorithm obtains the normalized matrix ˜ M from which the embedding is derived by transforming the raw pairwise distances matrix as follows: first compute the matrix Mij = ˜D2(xi, xj) of squared geodesic distances with respect to the data D, then apply to this matrix the distance-to-dot-product transformation (eq. (2)), as for MDS. As in MDS, the embedding is eik = √λkvki rather than yik = vki. 2.5 LLE The Local Linear Embedding (LLE) algorithm (Roweis and Saul, 2000) looks for an embedding that preserves the local geometry in the neighborhood of each data point. First, a sparse matrix of local predictive weights Wij is computed, such that P j Wij = 1, Wij = 0 if xj is not a k-nearest-neighbor of xi and (P j Wijxj −xi)2 is minimized. Then the matrix M = (I −W)′(I −W) (6) is formed. The embedding is obtained from the lowest eigenvectors of M, except for the smallest eigenvector which is uninteresting because it is (1, 1, . . . 1), with eigenvalue 0. Note that the lowest eigenvectors of M are the largest eigenvectors of ˜ Mµ = µI −M to fit Algorithm 1 (the use of µ > 0 will be discussed in section 4.4). The embedding is given by yik = vki, and is constant with respect to µ. 3 From Eigenvectors to Eigenfunctions To obtain an embedding for a new data point, we propose to use the Nystr¨om formula (eq. 9) (Baker, 1977), which has been used successfully to speed-up kernel methods computations by focussing the heavier computations (the eigendecomposition) on a subset of examples. The use of this formula can be justified by considering the convergence of eigenvectors and eigenvalues, as the number of examples increases (Baker, 1977; Williams and Seeger, 2000; Koltchinskii and Gin´e, 2000; Shawe-Taylor and Williams, 2003). Intuitively, the extensions to obtain the embedding for a new example require specifying a new column of the Gram matrix ˜ M, through a training-set dependent kernel function ˜KD, in which one of the arguments may be required to be in the training set. If we start from a data set D, obtain an embedding for its elements, and add more and more data, the embedding for the points in D converges (for eigenvalues that are unique). (Shawe-Taylor and Williams, 2003) give bounds on the convergence error (in the case of kernel PCA). In the limit, we expect each eigenvector to converge to an eigenfunction for the linear operator defined below, in the sense that the i-th element of the k-th eigenvector converges to the application of the k-th eigenfunction to xi (up to a normalization factor). Consider a Hilbert space Hp of functions with inner product ⟨f, g⟩p = R f(x)g(x)p(x)dx, with a density function p(x). Associate with kernel K a linear operator Kp in Hp: (Kpf)(x) = Z K(x, y)f(y)p(y)dy. (7) We don’t know the true density p but we can approximate the above inner product and linear operator (and its eigenfunctions) using the empirical distribution ˆp. An “empirical” Hilbert space Hˆp is thus defined using ˆp instead of p. Note that the proposition below can be applied even if the kernel is not positive semi-definite, although the embedding algorithms we have studied are restricted to using the principal coordinates associated with positive eigenvalues. For a more rigorous mathematical analysis, see (Bengio et al., 2003). Proposition 1 Let ˜K(a, b) be a kernel function, not necessarily positive semi-definite, that gives rise to a symmetric matrix ˜ M with entries ˜ Mij = ˜K(xi, xj) upon a dataset D = {x1, . . . , xn}. Let (vk, λk) be an (eigenvector,eigenvalue) pair that solves ˜ Mvk = λkvk. Let (fk, λ′ k) be an (eigenfunction,eigenvalue) pair that solves ( ˜Kˆpfk)(x) = λ′ kfk(x) for any x, with ˆp the empirical distribution over D. Let ek(x) = yk(x)√λk or yk(x) denote the embedding associated with a new point x. Then λ′ k = 1 nλk (8) fk(x) = √n λk n X i=1 vki ˜K(x, xi) (9) fk(xi) = √nvki (10) yk(x) = fk(x) √n = 1 λk n X i=1 vki ˜K(x, xi) (11) yk(xi) = yik, ek(xi) = eik (12) See (Bengio et al., 2003) for a proof and further justifications of the above formulae. The generalized embedding for Isomap and MDS is ek(x) = √λkyk(x) whereas the one for spectral clustering, Laplacian eigenmaps and LLE is yk(x). Proposition 2 In addition, if the data-dependent kernel ˜KD is positive semi-definite, then fk(x) = r n λk πk(x) where πk(x) is the k-th component of the kernel PCA projection of x obtained from the kernel ˜KD (up to centering). This relation with kernel PCA (Sch¨olkopf, Smola and M¨uller, 1998), already pointed out in (Williams and Seeger, 2000), is further discussed in (Bengio et al., 2003). 4 Extending to new Points Using Proposition 1, one obtains a natural extension of all the unsupervised learning algorithms mapped to Algorithm 1, provided we can write down a kernel function ˜K that gives rise to the matrix ˜ M on D, and can be used in eq. (11) to generalize the embedding. We consider each of them in turn below. In addition to the convergence properties discussed in section 3, another justification for using equation (9) is given by the following proposition: Proposition 3 If we define the fk(xi) by eq. (10) and take a new point x, the value of fk(x) that minimizes n X i=1 ˜K(x, xi) − m X t=1 λ′ tft(x)ft(xi) !2 (13) is given by eq. (9), for m ≥1 and any k ≤m. The proof is a direct consequence of the orthogonality of the eigenvectors vk. This proposition links equations (9) and (10). Indeed, we can obtain eq. (10) when trying to approximate ˜K at the data points by minimizing the cost n X i,j=1 ˜K(xi, xj) − m X t=1 λ′ tft(xi)ft(xj) !2 for m = 1, 2, . . . When we add a new point x, it is thus natural to use the same cost to approximate the ˜K(x, xi), which yields (13). Note that by doing so, we do not seek to approximate ˜K(x, x). Future work should investigate embeddings which minimize the empirical reconstruction error of ˜K but ignore the diagonal contributions. 4.1 Extending MDS For MDS, a normalized kernel can be defined as follows, using a continuous version of the double-centering eq. (2): ˜K(a, b) = −1 2(d2(a, b) −Ex[d2(x, b)] −Ex′[d2(a, x′)] + Ex,x′[d2(x, x′)]) (14) where d(a, b) is the original distance and the expectations are taken over the empirical data D. An extension of metric MDS to new points has already been proposed in (Gower, 1968), solving exactly for the embedding of x to be consistent with its distances to training points, which in general requires adding a new dimension. 4.2 Extending Spectral Clustering and Laplacian Eigenmaps Both the version of Spectral Clustering and Laplacian Eigenmaps described above are based on an initial kernel K, such as the Gaussian or nearest-neighbor kernel. An equivalent normalized kernel is: ˜K(a, b) = 1 n K(a, b) p Ex[K(a, x)]Ex′[K(b, x′)] where the expectations are taken over the empirical data D. 4.3 Extending Isomap To extend Isomap, the test point is not used in computing the geodesic distance between training points, otherwise we would have to recompute all the geodesic distances. A reasonable solution is to use the definition of ˜D(a, b) in eq. (5), which only uses the training points in the intermediate points on the path from a to b. We obtain a normalized kernel by applying the continuous double-centering of eq. (14) with d = ˜D. A formula has already been proposed (de Silva and Tenenbaum, 2003) to approximate Isomap using only a subset of the examples (the “landmark”points) to compute the eigenvectors. Using our notations, this formula is e′ k(x) = 1 2√λk X i vki(Ex′[ ˜D2(x′, xi)] −˜D2(xi, x)). (15) where Ex′ is an average over the data set. The formula is applied to obtain an embedding for the non-landmark examples. Corollary 1 The embedding proposed in Proposition 1 for Isomap (ek(x)) is equal to formula 15 (Landmark Isomap) when ˜K(x, y) is defined as in eq. (14) with d = ˜D. Proof: the proof relies on a property of the Gram matrix for Isomap: P i Mij = 0, by construction. Therefore (1, 1, . . . 1) is an eigenvector with eigenvalue 0, and all the other eigenvectors vk have the property P i vki = 0 because of the orthogonality with (1, 1, . . . 1). Writing (Ex′[ ˜D2(x′, xi)]−˜D2(x, xi)) = 2 ˜K(x, xi)+Ex′,x′′[ ˜D2(x′, x′′)]−Ex′[ ˜D2(x, x′)] yields e′ k(x) = 2 2√λk P i vki ˜K(x, xi) + (Ex′,x′′[ ˜D2(x′, x′′)] −Ex′[ ˜D2(x, x′)]) P i vki = ek(x), since the last sum is 0. 4.4 Extending LLE The extension of LLE is the most challenging one because it does not fit as well the framework of Algorithm 1: the M matrix for LLE does not have a clear interpretation in terms of distance or dot product. An extension has been proposed in (Saul and Roweis, 2002), but unfortunately it cannot be cast directly into the framework of Proposition 1. Their embedding of a new point x is given by yk(x) = n X i=1 yk(xi)w(x, xi) (16) where w(x, xi) is the weight of xi in the reconstruction of x by its k-nearest-neighbors in the training set (if x = xj ∈D, w(x, xi) = δij). This is very close to eq. (11), but lacks the normalization by λk. However, we can see this embedding as a limit case of Proposition 1, as shown below. We first need to define a kernel ˜Kµ such that ˜Kµ(xi, xj) = ˜ Mµ,ij = (µ −1)δij + Wij + Wji − X k WkiWkj (17) for xi, xj ∈D. Let us define a kernel ˜K′ by ˜K′(xi, x) = ˜K′(x, xi) = w(x, xi) and ˜K′(x, y) = 0 when neither x nor y is in the training set D. Let ˜K′′ be defined by ˜K′′(xi, xj) = Wij + Wji − X k WkiWkj and ˜K′′(x, y) = 0 when either x or y isn’t in D. Then, by construction, the kernel ˜Kµ = (µ −1) ˜K′ + ˜K′′ verifies eq. (17). Thus, we can apply eq. (11) to obtain an embedding of a new point x, which yields yµ,k(x) = 1 λk X i yik  (µ −1) ˜K′(x, xi) + ˜K′′(x, xi)  with λk = (µ −ˆλk), and ˆλk being the k-th lowest eigenvalue of M. This rewrites into yµ,k(x) = µ −1 µ −ˆλk X i yikw(x, xi) + 1 µ −ˆλk X i yik ˜K′′(x, xi). Then when µ →∞, yµ,k(x) →yk(x) defined by eq. (16). Since the choice of µ is free, we can thus consider eq. (16) as approximating the use of the kernel ˜Kµ with a large µ in Proposition 1. This is what we have done in the experiments described in the next section. Note however that we can find smoother kernels ˜Kµ verifying eq. (17), giving other extensions of LLE from Proposition 1. It is out of the scope of this paper to study which kernel is best for generalization, but it seems desirable to use a smooth kernel that would take into account not only the reconstruction of x by its neighbors xi, but also the reconstruction of the xi by their neighbors including the new point x. 5 Experiments We want to evaluate whether the precision of the generalizations suggested in the previous section is comparable to the intrinsic perturbations of the embedding algorithms. The perturbation analysis will be achieved by considering splits of the data in three sets, D = F ∪R1 ∪R2 and training either with F ∪R1 or F ∪R2, comparing the embeddings on F. For each algorithm described in section 2, we apply the following procedure: 0 0.05 0.1 0.15 0.2 0.25 -4 -2 0 2 4 6 8 10 x 10 4 0 0.05 0.1 0.15 0.2 0.25 0.3 0.35 0.4 -5 0 5 10 15 20 x 10 4 0 0.02 0.04 0.06 0.08 0.1 0.12 0.14 -3 -2 -1 0 1 2 3 4 5 6 7 x 10 3 0 0.05 0.1 0.15 0.2 0.25 -0.4 -0.2 0 0.2 0.4 0.6 0.8 1 Figure 1: Training set variability minus out-of-sample error, wrt the proportion of training samples substituted. Top left: MDS. Top right: spectral clustering or Laplacian eigenmaps. Bottom left: Isomap. Bottom right: LLE. Error bars are 95% confidence intervals. 1. We choose F ⊂D with m = |F| samples. The remaining n−m samples in D/F are split into two equal size subsets R1 and R2. We train (obtain the eigenvectors) over F ∪R1 and F ∪R2. When eigenvalues are close, the estimated eigenvectors are unstable and can rotate in the subspace they span. Thus we estimate an affine alignment between the two embeddings using the points in F, and we calculate the Euclidean distance between the aligned embeddings obtained for each si ∈F. 2. For each sample si ∈F, we also train over {F ∪R1}/{si}. We apply the extension to out-of-sample points to find the predicted embedding of si and calculate the Euclidean distance between this embedding and the one obtained when training with F ∪R1, i.e. with si in the training set. 3. We calculate the mean difference (and its standard error, shown in the figure) between the distance obtained in step 1 and the one obtained in step 2 for each sample si ∈F, and we repeat this experiment for various sizes of F. The results obtained for MDS, Isomap, spectral clustering and LLE are shown in figure 1 for different values of m. Experiments are done over a database of 698 synthetic face images described by 4096 components that is available at http://isomap.stanford.edu. Qualitatively similar results have been obtained over other databases such as Ionosphere (http://www.ics.uci.edu/˜mlearn/MLSummary.html) and swissroll (http://www.cs.toronto.edu/˜roweis/lle/). Each algorithm generates a twodimensional embedding of the images, following the experiments reported for Isomap. The number of neighbors is 10 for Isomap and LLE, and a Gaussian kernel with a standard deviation of 0.01 is used for spectral clustering / Laplacian eigenmaps. 95% confidence intervals are drawn beside each mean difference of error on the figure. As expected, the mean difference between the two distances is almost monotonically increasing as the fraction of substituted examples grows (x-axis in the figure). In most cases, the out-of-sample error is less than or comparable to the training set embedding stability: it corresponds to substituting a fraction of between 1 and 4% of the training examples. 6 Conclusions In this paper we have presented an extension to five unsupervised learning algorithms based on a spectral embedding of the data: MDS, spectral clustering, Laplacian eigenmaps, Isomap and LLE. This extension allows one to apply a trained model to out-ofsample points without having to recompute eigenvectors. It introduces a notion of function induction and generalization error for these algorithms. The experiments on real highdimensional data show that the average distance between the out-of-sample and in-sample embeddings is comparable or lower than the variation in in-sample embedding due to replacing a few points in the training set. References Baker, C. (1977). The numerical treatment of integral equations. Clarendon Press, Oxford. Belkin, M. and Niyogi, P. (2003). Laplacian eigenmaps for dimensionality reduction and data representation. Neural Computation, 15(6):1373–1396. Bengio, Y., Vincent, P., Paiement, J., Delalleau, O., Ouimet, M., and Le Roux, N. (2003). Spectral clustering and kernel pca are learning eigenfunctions. Technical report, D´epartement d’informatique et recherche op´erationnelle, Universit´e de Montr´eal. Cox, T. and Cox, M. (1994). Multidimensional Scaling. Chapman & Hall, London. de Silva, V. and Tenenbaum, J. (2003). Global versus local methods in nonlinear dimensionality reduction. In Becker, S., Thrun, S., and Obermayer, K., editors, Advances in Neural Information Processing Systems, volume 15, pages 705–712, Cambridge, MA. The MIT Press. Gower, J. (1968). Adding a point to vector diagrams in multivariate analysis. Biometrika, 55(3):582– 585. Koltchinskii, V. and Gin´e, E. (2000). Random matrix approximation of spectra of integral operators. Bernoulli, 6(1):113–167. Ng, A. Y., Jordan, M. I., and Weiss, Y. (2002). On spectral clustering: Analysis and an algorithm. In Dietterich, T. G., Becker, S., and Ghahramani, Z., editors, Advances in Neural Information Processing Systems 14, Cambridge, MA. MIT Press. Roweis, S. and Saul, L. (2000). Nonlinear dimensionality reduction by locally linear embedding. Science, 290(5500):2323–2326. Saul, L. and Roweis, S. (2002). Think globally, fit locally: unsupervised learning of low dimensional manifolds. Journal of Machine Learning Research, 4:119–155. Sch¨olkopf, B., Smola, A., and M¨uller, K.-R. (1998). Nonlinear component analysis as a kernel eigenvalue problem. Neural Computation, 10:1299–1319. Shawe-Taylor, J. and Williams, C. (2003). The stability of kernel principal components analysis and its relation to the process eigenspectrum. In Becker, S., Thrun, S., and Obermayer, K., editors, Advances in Neural Information Processing Systems, volume 15. The MIT Press. Shi, J. and Malik, J. (1997). Normalized cuts and image segmentation. In Proc. IEEE Conf. Computer Vision and Pattern Recognition, pages 731–737. Tenenbaum, J., de Silva, V., and Langford, J. (2000). A global geometric framework for nonlinear dimensionality reduction. Science, 290(5500):2319–2323. Weiss, Y. (1999). Segmentation using eigenvectors: a unifying view. In Proceedings IEEE International Conference on Computer Vision, pages 975–982. Williams, C. and Seeger, M. (2000). The effect of the input density distribution on kernel-based classifiers. In Proceedings of the Seventeenth International Conference on Machine Learning. Morgan Kaufmann.
2003
163
2,380
Learning Spectral Clustering Francis R. Bach Computer Science University of California Berkeley, CA 94720 fbach@cs.berkeley.edu Michael I. Jordan Computer Science and Statistics University of California Berkeley, CA 94720 jordan@cs.berkeley.edu Abstract Spectral clustering refers to a class of techniques which rely on the eigenstructure of a similarity matrix to partition points into disjoint clusters with points in the same cluster having high similarity and points in different clusters having low similarity. In this paper, we derive a new cost function for spectral clustering based on a measure of error between a given partition and a solution of the spectral relaxation of a minimum normalized cut problem. Minimizing this cost function with respect to the partition leads to a new spectral clustering algorithm. Minimizing with respect to the similarity matrix leads to an algorithm for learning the similarity matrix. We develop a tractable approximation of our cost function that is based on the power method of computing eigenvectors. 1 Introduction Spectral clustering has many applications in machine learning, exploratory data analysis, computer vision and speech processing. Most techniques explicitly or implicitly assume a metric or a similarity structure over the space of configurations, which is then used by clustering algorithms. The success of such algorithms depends heavily on the choice of the metric, but this choice is generally not treated as part of the learning problem. Thus, time-consuming manual feature selection and weighting is often a necessary precursor to the use of spectral methods. Several recent papers have considered ways to alleviate this burden by incorporating prior knowledge into the metric, either in the setting of K-means clustering [1, 2] or spectral clustering [3, 4]. In this paper, we consider a complementary approach, providing a general framework for learning the similarity matrix for spectral clustering from examples. We assume that we are given sample data with known partitions and are asked to build similarity matrices that will lead to these partitions when spectral clustering is performed. This problem is motivated by the availability of such datasets for at least two domains of application: in vision and image segmentation, a hand-segmented dataset is now available [5], while for the blind separation of speech signals via partitioning of the time-frequency plane [6], training examples can be created by mixing previously captured signals. Another important motivation for our work is the need to develop spectral clustering methods that are robust to irrelevant features. Indeed, as we show in Section 4.2, the performance of current spectral methods can degrade dramatically in the presence of such irrelevant features. By using our learning algorithm to learn a diagonally-scaled Gaussian kernel for generating the affinity matrix, we obtain an algorithm that is significantly more robust. Our work is based on a new cost function J(W, e) that characterizes how close the eigenstructure of a similarity matrix W is to a partition e. We derive this cost function in Section 2. As we show in Section 2.3, minimizing J with respect to e leads to a new clustering algorithm that takes the form of a weighted K-means algorithm. Minimizing J with respect to W yields an algorithm for learning the similarity matrix, as we show in Section 4. Section 3 provides foundational material on the approximation of the eigensubspace of a symmetric matrix that is needed for Section 4. 2 Spectral clustering and normalized cuts Given a dataset I of P points in a space X and a P × P “similarity matrix” (or “affinity matrix”) W that measures the similarity between the P points (Wpp′ is large when points indexed by p and p′ are likely to be in the same cluster), the goal of clustering is to organize the dataset into disjoint subsets with high intra-cluster similarity and low inter-cluster similarity. Throughout this paper we always assume that the elements of W are non-negative (W ⩾0) and that W is symmetric (W =W ⊤). Let D denote the diagonal matrix whose i-th diagonal element is the sum of the elements in the i-th row of W, i.e., D=diag(W1), where 1 is defined as the vector in RP composed of ones. There are different variants of spectral clustering. In this paper we focus on the task of minimizing “normalized cuts.” The classical relaxation of this NP-hard problem [7, 8, 9] leads to an eigenvalue problem. In this section we show that the problem of finding a solution to the original problem that is closest to the relaxed solution can be solved by a weighted K-means algorithm. 2.1 Normalized cut and graph partitioning The clustering problem is usually defined in terms of a complete graph with vertices V ={1, ..., P} and an affinity matrix with weights Wpp′, for p, p′ ∈V . We wish to find R disjoint clusters A = (Ar)r∈{1,...,R}, where S rAr = V , that optimize a certain cost function. An example of such a function is the R-way normalized cut defined as follows [7, 10]: C(A, W)=PR r=1 P i∈Ar,j∈V \Ar Wij  / P i∈Ar,j∈V Wij  . Let er be the indicator vector in RP for the r-th cluster, i.e., er ∈{0, 1}R is such that er has a nonzero component exactly at points in the r-th cluster. Knowledge of e = (er) is equivalent to knowledge of A=(Ar) and, when referring to partitions, we will use the two formulations interchangeably. A short calculation reveals that the normalized cut is then equal to C(e, W)=PR r=1 e⊤ r (D −W)er/ (e⊤ r Der). 2.2 Spectral relaxation and rounding The following proposition, which extends a result of Shi and Malik [7] for two clusters to an arbitrary number of clusters, gives an alternative description of the clustering task, which will lead to a spectral relaxation: Proposition 1 The R-way normalized cut is equal to R −tr Y ⊤D−1/2WD−1/2Y for any matrix Y ∈RP ×R such that (a) the columns of D−1/2Y are piecewise constant with respect to the clusters and (b) Y has orthonormal columns (Y ⊤Y =I). Proof The constraint (a) is equivalent to the existence of a matrix Λ ∈RR×R such that D−1/2Y = (e1, . . . , eR)Λ = EΛ. The constraint (b) is thus written as I = Y ⊤Y = Λ⊤E⊤DEΛ. The matrix E⊤DE is diagonal, with elements e⊤ r Der and is thus positive and invertible. This immediately implies that ΛΛ⊤=(E⊤DE)−1. This in turn implies that tr Y ⊤D−1/2WD−1/2Y = tr Λ⊤E⊤WEΛ = tr E⊤WEΛΛ⊤= tr E⊤WE(E⊤DE)−1, which is exactly the normalized cut (up to an additive constant). By removing the constraint (a), we obtain a relaxed optimization problem, whose solutions involve the eigenstructure of D−1/2WD−1/2 and which leads to the classical lower bound on the optimal normalized cut [8, 9]. The following proposition gives the solution obtained from the relaxation (for the proof, see [11]): Proposition 2 The maximum of tr Y ⊤D−1/2WD−1/2Y over matrices Y ∈RP ×R such that Y ⊤Y = I is the sum of the R largest eigenvalues of D−1/2WD−1/2. It is attained at all Y of the form Y = UB1 where U ∈RP ×R is any orthonormal basis of the R-th principal subspace of D−1/2WD−1/2 and B1 is an arbitrary rotation matrix in RR×R. The solutions found by this relaxation will not in general be piecewise constant. In order to obtain a piecewise constant solution, we wish to find a piecewise constant matrix that is as close as possible to one of the possible Y obtained from the eigendecomposition. Since such matrices are defined up to a rotation matrix, it makes sense to compare the subspaces spanned by their columns. A common way to compare subspaces is to compare the orthogonal projection operators on those subspaces [12], that is, to compute the Frobenius norm between UU ⊤and Π0 = Π0(W, e) ≜P r D1/2ere⊤ r D1/2/ (e⊤ r Der) (Π0 is the orthogonal projection operator on the subspace spanned by the columns of D1/2E = D1/2(e1, . . . , er), from Proposition 1). We thus define the following cost function: J(W, e)= 1 2||UU ⊤−Π0||2 F (1) Using the fact that both UU ⊤and Π0 are orthogonal projection operators on linear subspaces of dimension R, a short calculation reveals that the cost function J(W, e) is equal to R −tr UU ⊤Π0 =R −P r e⊤ r D1/2UU ⊤D1/2er/ (e⊤ r Der). This cost function characterizes the ability of the matrix W to produce the partition e when using its eigenvectors. Minimizing with respect to e leads to a new clustering algorithm that we now present. Minimizing with respect to the matrix for a given partition e leads to the learning of the similarity matrix, as we show in Section 4. 2.3 Minimizing with respect to the partition In this section, we show that minimizing J(W, e) is equivalent to a weighted K-means algorithm. The following theorem, inspired by the spectral relaxation of K-means presented in [8], shows that the cost function can be interpreted as a weighted distortion measure1: Theorem 1 Let W be an affinity matrix and let U = (u1, . . . , uP ), where up ∈RR, be an orthonormal basis of the R-th principal subspace of D−1/2WD−1/2. For any partition e ≡A, we have J(W, e)= min (µ1,...,µR)∈RR×R X r X p∈Ar dp||upd−1/2 p −µr||2. Proof Let D(µ, A)=P r P p∈Ar dp||upd−1/2 p −µr||2. Minimizing D(µ, A) with respect to µ is a decoupled least-squares problem and we get: minµ D(µ, A) = P r P p∈Ar u⊤ p up −P r || P p∈Ar d1/2 p up||2/ (P p∈Ar dp) 1Note that a similar equivalence holds between normalized cuts and weighted K-means for positive semidefinite similarity matrices, which can be factorized as W = GG⊤; this leads to an approximation algorithm for minimizing normalized cuts; i.e., we have: C(W, e) = min(µ1,...,µR)∈RR×R P r P p∈Ar dp||gpd−1 p −µr||2 + R −tr D−1/2WD−1/2. Input: Similarity matrix W ∈RP ×P . Algorithm: 1. Compute first R eigenvectors U of D−1/2WD−1/2 where D=diag(W1). 2. Let U =(u1, . . . , uP ) ∈RR×P and dp =Dpp. 3. Weighted K-means: while partition A is not stationary, a. For all r, µr =P p∈Ar d1/2 p up/P p∈Ar dp b. For all p, assign p to Ar where r=arg minr′ ||upd−1/2 p −µr′|| Output: partition A, distortion measure P r P p∈Ar dp||upd−1/2 p −µr||2 Figure 1: Spectral clustering algorithm. = P p u⊤ p up −P r P p,p′∈Ar d1/2 p d1/2 p′ u⊤ p up′/ (e⊤ r Der) = R −P r e⊤ r D1/2UU ⊤D1/2er/ (e⊤ r Der)=J(W, e) This theorem has an immediate algorithmic implication—to minimize the cost function J(W, e) with respect to the partition e, we can use a weighted K-means algorithm. The resulting algorithm is presented in Figure 1. While K-means is often used heuristically as a post-processor for spectral clustering [13], our approach provides a mathematical foundation for the use of K-means, and yields a specific weighted form of K-means that is appropriate for the problem. 2.4 Minimizing with respect to the similarity matrix When the partition e is given, we can consider minimization with respect to W. As we have suggested, intuitively this has the effect of yielding a matrix W such that the result of spectral clustering with that W is as close as possible to e. We now make this notion precise, by showing that the cost function J(W, e) is an upper bound on the distance between the partition e and the result of spectral clustering using the similarity matrix W. The metric between two partitions e=(er) and f =(fs) with R and S clusters respectively, is taken to be [14]: d(e, f)= 1 2 X r ere⊤ r e⊤ r er − X s fsf ⊤ s f ⊤ s fs 2 F = R + S 2 − X r,s (e⊤ r fs)2 (e⊤ r er)(f ⊤ s fs) (2) This measure is always between zero and R+S 2 −1, and is equal to zero if and only if e ≡f. The following theorem shows that if we can perform weighted K-means exactly, we obtain a bound on the performance of our spectral clustering algorithm (for a proof, see [11]): Theorem 2 Let η = maxp Dpp/ minp Dpp ⩾1. If e(W) = arg mine J(W, e), then for all partitions e, we have d(e, e(W)) ⩽4ηJ(W, e). 3 Approximation of the cost function In order to minimize the cost function J(W, e) with respect to W, which is the topic of Section 4, we need to optimize a function of the R-th principal subspace of the matrix D−1/2WD−1/2. In this section, we show how we can compute a differentiable approximation of the projection operator on this subspace. 3.1 Approximation of eigensubspace Let X ∈RP ×P be a real symmetric matrix. We assume that its eigenvalues are ordered by magnitude: |λ1| ⩾|λ2| ⩾· · · ⩾|λP |. We assume that |λR| > |λR+1| so that the R-th principal subspace ER is well defined, with orthogonal projection ΠR. Our approximations are based on the power method to compute eigenvectors. It is well known that for almost all vectors v, the ratio Xqv/||Xqv|| converges to an eigenvector corresponding to the largest eigenvalue [12]. The same method can be generalized to the computation of dominant eigensubspaces: If V is a matrix in RP ×R, the subspace generated by the R columns of XqV will tend to the principal eigensubspace of X. Note that since we are interested only in subspaces, and in particular the orthogonal projection operators on those subspaces, we can choose any method for finding an orthonormal basis of range(XqV ). The QR decomposition is fast and stable and is usually the method used to compute such a basis (the algorithm is usually referred to as “orthogonal iteration” [12]). However this does not lead to a differentiable function. We develop a different approach which does yield a differentiable function, as made precise in the following proposition (for a proof, see [11]): Proposition 3 Let V ∈RP ×R such that η= max u∈ER(X)⊥, v∈range(V ) cos(u, v) < 1. Then the function Y 7→eΠR(Y ) = M(M ⊤M)−1M ⊤, where M = Y qV , is C∞in a neighborhood of X, and we have: ||eΠR(X) −ΠR||2 ⩽ η (1−η2)1/2 (|λR+1|/|λR|)q. This proposition shows that as q tends to infinity, the range of XqV will tend to the principal eigensubspace. The rate of convergence is determined by the (multiplicative) eigengap |λR+1|/|λR| < 1: it is usually hard to compute principal subspace of matrices with eigengap close to one. Note that taking powers of matrices without care can lead to disastrous results [12]. By using successive QR iterations, the computations can be made stable and the same technique can be used for the computation of the derivatives. 3.2 Potentially hard eigenvalue problems In most of the literature on spectral clustering, it is taken for granted that the eigenvalue problem is easy to solve. It turns out that in many situations, the (multiplicative) eigengap is very close to one, making the eigenvector computation difficult (examples are given in the next section). We acknowledge this potential problem by averaging over several initializations of the original subspace V . More precisely, let (Vm)m=1,...,M be M subspaces of dimension R. Let Bm = Π(range((D−1/2WD−1/2)qVm)) be the approximations of the projections on the R-th principal subspace2 of D−1/2WD−1/2. The cost function that we use is the average error F(W, Π0(e)) = 1 2M PM m=1 ||Bm −Π0||2 F . This cost function can be rewritten as the distance between the average of the Bm and Π0 plus the variance of the approximations, thus explicitly penalizing the non-convergence of the power iterations. We choose Vi to be equal to D1/2 times a set of R indicator vectors corresponding to subsets of each cluster. In simulations, we used q = 128, M = R2, and subsets containing 2/(log2 q + 1) times the number of original points in the clusters. 3.3 Empirical comparisons In this section, we study the ability of various cost functions to track the gold standard error measure in Eq. (2) as we vary the parameter α in the similarity matrix Wpp′ = exp(−α||xp −xp′||2). We study the cost function J(W, e), its approximation based on the power method presented in Section 3, and two existing approaches, one based on a Markov chain interpretation of spectral clustering [15] and one based on the alignment [16] of D−1/2WD−1/2 and Π0. We carry out this experiment for the simple clustering example 2The matrix D−1/2WD−1/2 always has the same largest eigenvalue 1 with eigenvector D1/21 and we could consider instead the (R −1)-st principal subspace of D−1/2WD−1/2 − D1/211⊤D1/2/ (1⊤D1). (a) 0 1 2 3 −9 −8 −7 −6 −5 −4 −3 log(α) log(1−eigengap) (b) 0 1 2 3 0 0.2 0.4 0.6 0.8 1 log(α) error/cost (c) 0 1 2 3 0 0.2 0.4 0.6 0.8 1 log(α) error/cost (d) Figure 2: Empirical comparison of cost functions. (a) Data. (b) Eigengap of the similarity matrix as a function of α. (c) Gold standard clustering error (solid), spectral cost function J (dotted) and its approximation based on the power method (dashed). (d) Gold standard clustering error (solid), the alignment (dashed), and a Markov-chain-based cost, divided by 16 (dotted). shown in Figure 2(a). This apparently simple toy example captures much of the core difficulty of spectral clustering—nonlinear separability and thinness/sparsity of clusters (any point has very few near neighbors belonging to the same cluster, so that the weighted graph is sparse). In particular, in Figure 2(b) we plot the eigengap of the similarity matrix as a function of α, noting that at the optimum, this gap is very close to one, and thus the eigenvalue problem is hard to solve. In Figure 2(c) and (d), we plot the four cost functions against the gold standard. The gold standard curve shows that the optimal α lies near 2.5 on a log scale, and as seen in Figure 2(c), the minima of the new cost function and its approximation lie near to this value. As seen in Figure 2(d), on the other hand, the other two cost functions show a poor match to the gold standard, and yield minima far from the optimum. The problem with the alignment and Markov-chain-based cost functions is that these functions essentially measure the distance between the similarity matrix W (or a normalized version of W) and a matrix T which (after permutation) is block-diagonal with constant blocks. Unfortunately, in examples like the one in Figure 2, the optimal similarity matrix is very far from being block diagonal with constant blocks. Rather, given that data points that lie in the same ring are in general far apart, the blocks are very sparse—not constant and full. Methods that try to find constant blocks cannot find the optimal matrices in these cases. In the language of spectral graph partitioning, where we have a weighted graph with weights W, each cluster is a connected but very sparse graph. The power W q corresponds to the q-th power of the graph; i.e., the graph in which two vertices are linked by an edge if and only if they are linked by a path of length no more than q in the original graph. Thus taking powers can be interpreted as “thickening” the graph to make the clusters more apparent, while not changing the eigenstructure of the matrix (taking powers of symmetric matrices only changes the eigenvalues, not the eigenvectors). 4 Learning the similarity matrix We now turn to the problem of learning the similarity matrix from data. We assume that we are given one or more sets of data for which the desired clustering is known. The goal is to design a “similarity map,” that is, a mapping from datasets of elements in X to the space of symmetric matrices with nonnegative elements. To turn this into a parametric learning problem, we focus on similarity matrices that are obtained as Gram matrices of a kernel function k(x, y) defined on X×X. In particular, for concreteness and simplicity, we restrict ourselves in this paper to the case of Euclidean data (X = RF ) and a diagonally-scaled Gaussian kernel kα(x, y)=exp(−(x−y)⊤diag(α)(x−y)), where α ∈RF —while noting that our methods apply more generally. 4.1 Learning algorithm We assume that we are given N datasets Dn, n ∈{1, . . . , N}, of points in RF . Each dataset Dn is composed of Pn points xnp, p ∈{1, . . . , Pn}. Each dataset is segmented, that is, for each n we know the partition en, so that the “target” matrix Π0(en, α) can be computed for each dataset. For each n, we have a similarity matrix Wn(α). The cost function that we use is H(α) = 1 N P n F(Wn(α), Π0(en, α)) + C||α||1. The ℓ1 penalty serves as a feature selection term, tending to make the solution sparse. The learning algorithm is the minimization of H(α) with respect to α ∈RF +, using the method of conjugate gradient with line search. Since the complexity of the cost function increases with q, we start the minimization with small q and gradually increase q up to its maximum value. We have observed that for small q, the function to optimize is smoother and thus easier to optimize—in particular, the long plateaus of constant values are less pronounced. Testing. The output of the learning algorithm is a vector α ∈RF . In order to cluster previously unseen datasets, we compute the similarity matrix W and use the algorithm of Figure 1. In order to further enhance performance, we can also adopt an idea due to [13]— we hold the direction of α fixed but perform a line search on its norm. This yields the real number λ such that the weighted distortion obtained after application of the spectral clustering algorithm of Figure 1, with the similarity matrices defined by λα, is minimum.3 4.2 Simulations We performed simulations on synthetic datasets in two dimensions, where we consider datasets similar to the one in Figure 2, with two rings whose relative distance is constant across samples (but whose relative orientation has a random direction). We add D irrelevant dimensions of the same magnitude as the two relevant variables. The goal is thus to learn the diagonal scale α ∈RD+2 of a Gaussian kernel that leads to the best clustering on unseen data. We learn α from N sample datasets (N =1 or 10), and compute the clustering error of our algorithm with and without adaptive tuning of the norm of α during testing (as described in Section 4.1) on ten previously unseen datasets. We compare to an approach that does not use the training data: α is taken to be the vector of all ones and we again search over the best possible norm during testing (we refer to this method as “no learning”). We report results in Table 1. Without feature selection, the performance of spectral clustering degrades very rapidly when the number of irrelevant features increases, while our learning approach is very robust, even with only one training dataset. 5 Conclusion We have presented two algorithms—one for spectral clustering and one for learning the similarity matrix. These algorithms can be derived as the minimization of a single cost function with respect to its two arguments. This cost function depends directly on the eigenstructure of the similarity matrix. We have shown that it can be approximated efficiently using the power method, yielding a method for learning similarity matrices that can cluster effectively in cases in which non-adaptive approaches fail. Note in particular that our new approach yields a spectral clustering method that is significantly more robust to irrelevant features than current methods. We are currently applying our algorithm to problems in speech separation and image segmentation, in particular with the objective of selecting features from among the numerous 3In [13], this procedure is used to learn one parameter of the similarity matrix with no training data; it cannot be used directly here to learn a more complex similarity matrix with more parameters, because it would lead to overfitting. Table 1: Performance on synthetic datasets: clustering errors (multiplied by 100) for method without learning (but with tuning) and for our learning method with and without tuning, with N =1 or 10 training datasets; D is the number of irrelevant features. D no learning w/o tuning learning with tuning learning N=1 N=10 N=1 N=10 0 0 15.5 10.5 0 0 1 60.8 37.7 9.5 0 0 2 79.8 36.9 9.5 0 0 4 99.8 37.8 9.7 0.4 0 8 99.8 37 10.7 0 0 16 99.7 38.8 10.9 14 0 32 99.9 38.9 15.1 14.6 6.1 features that are available in these domains [6, 7]. The number of points in such datasets can be very large and we have developed efficient implementations of both learning and clustering based on sparsity and low-rank approximations [11]. Acknowledgments We would like to acknowledge support from NSF grant IIS-9988642, MURI ONRN00014-01-1-0890 and a grant from Intel Corporation. References [1] K. Wagstaff, C. Cardie, S. Rogers, and S. Schr¨odl. Constrained K-means clustering with background knowledge. In ICML, 2001. [2] E. P. Xing, A. Y. Ng, M. I. Jordan, and S. Russell. Distance metric learning, with application to clustering with side-information. In NIPS 15, 2003. [3] S. X. Yu and J. Shi. Grouping with bias. In NIPS 14, 2002. [4] S. D. Kamvar, D. Klein, and C. D. Manning. Spectral learning. In IJCAI, 2003. [5] D. Martin, C. Fowlkes, D. Tal, and J. Malik. A database of human segmented natural images and its application to evaluating segmentation algorithms and measuring ecological statistics. In ICCV, 2001. [6] G. J. Brown and M. P. Cooke. Computational auditory scene analysis. Computer Speech and Language, 8:297–333, 1994. [7] J. Shi and J. Malik. Normalized cuts and image segmentation. IEEE Trans. PAMI, 22(8):888– 905, 2000. [8] H. Zha, C. Ding, M. Gu, X. He, and H. Simon. Spectral relaxation for K-means clustering. In NIPS 14, 2002. [9] P. K. Chan, M. D. F. Schlag, and J. Y. Zien. Spectral K-way ratio-cut partitioning and clustering. IEEE Trans. CAD, 13(9):1088–1096, 1994. [10] M. Gu, H. Zha, C. Ding, X. He, and H. Simon. Spectral relaxation models and structure analysis for K-way graph clustering and bi-clustering. Technical report, Penn. State Univ, Computer Science and Engineering, 2001. [11] F. R. Bach and M. I. Jordan. Learning spectral clustering. Technical report, UC Berkeley, available at www.cs.berkeley.edu/˜fbach, 2003. [12] G. H. Golub and C. F. Van Loan. Matrix Computations. Johns Hopkins University Press, 1996. [13] A. Y. Ng, M. I. Jordan, and Y. Weiss. On spectral clustering: analysis and an algorithm. In NIPS 14, 2001. [14] L. J. Hubert and P. Arabie. Comparing partitions. Journal of Classification, 2:193–218, 1985. [15] M. Meila and J. Shi. Learning segmentation by random walks. In NIPS 13, 2002. [16] N. Cristianini, J. Shawe-Taylor, and J. Kandola. Spectral kernel methods for clustering. In NIPS 14, 2002.
2003
164
2,381
Maximum Likelihood Estimation of a Stochastic Integrate-and-Fire Neural Model∗ Jonathan W. Pillow, Liam Paninski, and Eero P. Simoncelli Howard Hughes Medical Institute Center for Neural Science New York University {pillow, liam, eero}@cns.nyu.edu Abstract Recent work has examined the estimation of models of stimulus-driven neural activity in which some linear filtering process is followed by a nonlinear, probabilistic spiking stage. We analyze the estimation of one such model for which this nonlinear step is implemented by a noisy, leaky, integrate-and-fire mechanism with a spike-dependent aftercurrent. This model is a biophysically plausible alternative to models with Poisson (memory-less) spiking, and has been shown to effectively reproduce various spiking statistics of neurons in vivo. However, the problem of estimating the model from extracellular spike train data has not been examined in depth. We formulate the problem in terms of maximum likelihood estimation, and show that the computational problem of maximizing the likelihood is tractable. Our main contribution is an algorithm and a proof that this algorithm is guaranteed to find the global optimum with reasonable speed. We demonstrate the effectiveness of our estimator with numerical simulations. A central issue in computational neuroscience is the characterization of the functional relationship between sensory stimuli and neural spike trains. A common model for this relationship consists of linear filtering of the stimulus, followed by a nonlinear, probabilistic spike generation process. The linear filter is typically interpreted as the neuron’s “receptive field,” while the spiking mechanism accounts for simple nonlinearities like rectification and response saturation. Given a set of stimuli and (extracellularly) recorded spike times, the characterization problem consists of estimating both the linear filter and the parameters governing the spiking mechanism. One widely used model of this type is the Linear-Nonlinear-Poisson (LNP) cascade model, in which spikes are generated according to an inhomogeneous Poisson process, with rate determined by an instantaneous (“memoryless”) nonlinear function of the filtered input. This model has a number of desirable features, including conceptual simplicity and computational tractability. Additionally, reverse correlation analysis provides a simple unbiased estimator for the linear filter [5], and the properties of estimators (for both the linear filter and static nonlinearity) have been thoroughly analyzed, even for the case of highly non-symmetric or “naturalistic” stimuli [12]. One important drawback of the LNP model, * JWP and LP contributed equally to this work. We thank E.J. Chichilnisky for helpful discussions. 0 50 100 P(spike) time (ms) LNP model L−NLIF model Figure 1: Simulated responses of LNLIF and LNP models to 20 repetitions of a fixed 100-ms stimulus segment of temporal white noise. Top: Raster of responses of L-NLIF model, where σnoise/σsignal = 0.5 and g gives a membrane time constant of 15 ms. The top row shows the fixed (deterministic) response of the model with σnoise set to zero. Middle: Raster of responses of LNP model, with parameters fit with standard methods from a long run of the L-NLIF model responses to nonrepeating stimuli. Bottom: (Black line) Post-stimulus time histogram (PSTH) of the simulated L-NLIF response. (Gray line) PSTH of the LNP model. Note that the LNP model fails to preserve the fine temporal structure of the spike trains, relative to the L-NLIF model. however, is that Poisson processes do not accurately capture the statistics of neural spike trains [2, 9, 16, 1]. In particular, the probability of observing a spike is not a functional of the stimulus only; it is also strongly affected by the recent history of spiking. The leaky integrate-and-fire (LIF) model provides a biophysically more realistic spike mechanism with a simple form of spike-history dependence. This model is simple, wellunderstood, and has dynamics that are entirely linear except for a nonlinear “reset” of the membrane potential following a spike. Although this model’s overriding linearity is often emphasized (due to the approximately linear relationship between input current and firing rate, and lack of active conductances), the nonlinear reset has significant functional importance for the model’s response properties. In previous work, we have shown that standard reverse correlation analysis fails when applied to a neuron with deterministic (noise-free) LIF spike generation; we developed a new estimator for this model, and demonstrated that a change in leakiness of such a mechanism might underlie nonlinear effects of contrast adaptation in macaque retinal ganglion cells [15]. We and others have explored other “adaptive” properties of the LIF model [17, 13, 19]. In this paper, we consider a model consisting of a linear filter followed by noisy LIF spike generation with a spike-dependent after-current; this is essentially the standard LIF model driven by a noisy, filtered version of the stimulus, with an additional current waveform injected following each spike. We will refer to this as the the “L-NLIF” model. The probabilistic nature of this model provides several important advantages over the deterministic version we have considered previously. First, an explicit noise model allows us to couch the problem in the terms of classical estimation theory. This, in turn, provides a natural “cost function” (likelihood) for model assessment and leads to more efficient estimation of the model parameters. Second, noise allows us to explicitly model neural firing statistics, and could provide a rigorous basis for a metric distance between spike trains, useful in other contexts [18]. Finally, noise influences the behavior of the model itself, giving rise to phenomena not observed in the purely deterministic model [11]. Our main contribution here is to show that the maximum likelihood estimator (MLE) for the L-NLIF model is computationally tractable. Specifically, we describe an algorithm for computing the likelihood function, and prove that this likelihood function contains no non-global maxima, implying that the MLE can be computed efficiently using standard ascent techniques. The desirable statistical properties of this estimator (e.g. consistency, efficiency) are all inherited “for free” from classical estimation theory. Thus, we have a compact and powerful model for the neural code, and a well-motivated, efficient way to estimate the parameters of this model from extracellular data. The Model We consider a model for which the (dimensionless) subthreshold voltage variable V evolves according to dV =  −gV (t) + ⃗k · ⃗x(t) + i−1 X j=0 h(t −tj)  dt + σNt, (1) and resets to Vr whenever V = 1. Here, g denotes the leak conductance, ⃗k · ⃗x(t) the projection of the input signal ⃗x(t) onto the linear kernel ⃗k, h is an “afterpotential,” a current waveform of fixed amplitude and shape whose value depends only on the time since the last spike ti−1, and Nt is an unobserved (hidden) noise process with scale parameter σ. Without loss of generality, the “leak” and “threshold” potential are set at 0 and 1, respectively, so the cell spikes whenever V = 1, and V decays back to 0 with time constant 1/g in the absence of input. Note that the nonlinear behavior of the model is completely determined by only a few parameters, namely {g, σ, Vr}, and h (where the function h is allowed to take values in some low-dimensional vector space). The dynamical properties of this type of “spike response model” have been extensively studied [7]; for example, it is known that this class of models can effectively capture much of the behavior of apparently more biophysically realistic models (e.g. Hodgkin-Huxley). Figures 1 and 2 show several simple comparisons of the L-NLIF and LNP models. In 1, note the fine structure of spike timing in the responses of the L-NLIF model, which is qualitatively similar to in vivo experimental observations [2, 16, 9]). The LNP model fails to capture this fine temporal reproducibility. At the same time, the L-NLIF model is much more flexible and representationally powerful, as demonstrated in Fig. 2: by varying Vr or h, for example, we can match a wide variety of dynamical behaviors (e.g. adaptation, bursting, bistability) known to exist in biological neurons. The Estimation Problem Our problem now is to estimate the model parameters {⃗k, σ, g, Vr, h} from a sufficiently rich, dynamic input sequence ⃗x(t) together with spike times {ti}. A natural choice is the maximum likelihood estimator (MLE), which is easily proven to be consistent and statistically efficient here. To compute the MLE, we need to compute the likelihood and develop an algorithm for maximizing it. The tractability of the likelihood function for this model arises directly from the linearity of the subthreshold dynamics of voltage V (t) during an interspike interval. In the noiseless case [15], the voltage trace during an interspike interval t ∈[ti−1, ti] is given by the solution to equation (1) with σ = 0: V0(t) = Vre−gt + Z t ti−1  ⃗k · ⃗x(s) + i−1 X j=0 h(s −tj)  e−g(t−s)ds, (2) c=1 c=2 1 0 c=5 h current t 0 0.2 0 x c B responses stimulus 0 0 .05 1 0 t 0 h current 0 C responses stimulus 1 0 0 0.2 0 0 h current 0 t A responses stimulus t (sec) t (sec) t (sec) Figure 2: Illustration of diverse behaviors of L-NLIF model. A: Firing rate adaptation. A positive DC current (top) was injected into three model cells differing only in their h currents (shown on left: top, h = 0; middle, h depolarizing; bottom, h hyperpolarizing). Voltage traces of each cell’s response (right, with spikes superimposed) exhibit rate facilitation for depolarizing h (middle), and rate adaptation for hyperpolarizing h (bottom). B: Bursting. The response of a model cell with a biphasic h current (left) is shown as a function of the three different levels of DC current. For small current levels (top), the cell responds rhythmically. For larger currents (middle and bottom), the cell responds with regular bursts of spikes. C: Bistability. The stimulus (top) is a positive followed by a negative current pulse. Although a cell with no h current (middle) responds transiently to the positive pulse, a cell with biphasic h (bottom) exhibits a bistable response: the positive pulse puts it into a stable firing regime which persists until the arrival of a negative pulse. which is simply a linear convolution of the input current with a negative exponential. It is easy to see that adding Gaussian noise to the voltage during each time step induces a Gaussian density over V (t), since linear dynamics preserve Gaussianity [8]. This density is uniquely characterized by its first two moments; the mean is given by (2), and its covariance is σ2EgET g , where Eg is the convolution operator corresponding to e−gt. Note that this density is highly correlated for nearby points in time, since noise is integrated by the linear dynamics. Intuitively, smaller leak conductance g leads to stronger correlation in V (t) at nearby time points. We denote this Gaussian density G(⃗xi,⃗k, σ, g, Vr, h), where index i indicates the ith spike and the corresponding stimulus chunk ⃗xi (i.e. the stimuli that influence V (t) during the ith interspike interval). Now, on any interspike interval t ∈[ti−1, ti], the only information we have is that V (t) is less than threshold for all times before ti, and exceeds threshold during the time bin containing ti. This translates to a set of linear constraints on V (t), expressed in terms of the set Ci = \ ti−1≤t<ti  V (t) < 1  ∩  V (ti) ≥1 . Therefore, the likelihood that the neuron first spikes at time ti, given a spike at time ti−1, is the probability of the event V (t) ∈Ci, which is given by L⃗xi,ti(⃗k, σ, g, Vr, h) = Z Ci G(⃗xi,⃗k, σ, g, Vr, h), the integral of the Gaussian density G(⃗xi,⃗k, σ, g, Vr, h) over the set Ci. 0 Vthr P(V) stimulus 0 Vthr V traces 200 0 100 t (msec) 0 P(isi) Figure 3: Behavior of the L-NLIF model during a single interspike interval, for a single (repeated) input current (top). Top middle: Ten simulated voltage traces V (t), evaluated up to the first threshold crossing, conditional on a spike at time zero (Vr = 0). Note the strong correlation between neighboring time points, and the sparsening of the plot as traces are eliminated by spiking. Bottom Middle: Time evolution of P(V ). Each column represents the conditional distribution of V at the corresponding time (i.e. for all traces that have not yet crossed threshold). Bottom: Probability density of the interspike interval (isi) corresponding to this particular input. Note that probability mass is concentrated at the points where input drives V0(t) close to threshold. Spiking resets V to Vr, meaning that the noise contribution to V in different interspike intervals is independent. This “renewal” property, in turn, implies that the density over V (t) for an entire experiment factorizes into a product of conditionally independent terms, where each of these terms is one of the Gaussian integrals derived above for a single interspike interval. The likelihood for the entire spike train is therefore the product of these terms over all observed spikes. Putting all the pieces together, then, the full likelihood is L{⃗xi,ti}(⃗k, σ, g, Vr, h) = Y i Z Ci G(⃗xi,⃗k, σ, g, Vr, h), where the product, again, is over all observed spike times {ti} and corresponding stimulus chunks {⃗xi}. Now that we have an expression for the likelihood, we need to be able to maximize it. Our main result now states, basically, that we can use simple ascent algorithms to compute the MLE without getting stuck in local maxima. Theorem 1. The likelihood L{⃗xi,ti}(⃗k, σ, g, Vr, h) has no non-global extrema in the parameters (⃗k, σ, g, Vr, h), for any data {⃗xi, ti}. The proof [14] is based on the log-concavity of L{⃗xi,ti}(⃗k, σ, g, Vr, h) under a certain parametrization of (⃗k, σ, g, Vr, h). The classical approach for establishing the nonexistence of non-global maxima of a given function uses concavity, which corresponds roughly to the function having everywhere non-positive second derivatives. However, the basic idea can be extended with the use of any invertible function: if f has no non-global extrema, neither will g(f), for any strictly increasing real function g. The logarithm is a natural choice for g in any probabilistic context in which independence plays a role, since sums are easier to work with than products. Moreover, concavity of a function f is strictly stronger than logconcavity, so logconcavity can be a powerful tool even in situations for which concavity is useless (the Gaussian density is logconcave but not concave, for example). Our proof relies on a particular theorem [3] establishing the logconcavity of integrals of logconcave functions, and proceeds by making a correspondence between this type of integral and the integrals that appear in the definition of the L-NLIF likelihood above. We should also note that the proof extends without difficulty to some other noise processes which generate logconcave densities (where white noise has the standard Gaussian density); for example, the proof is nearly identical if Nt is allowed to be colored or nonGaussian noise, with possibly nonzero drift. Computational methods and numerical results Theorem 1 tells us that we can ascend the likelihood surface without fear of getting stuck in local maxima. Now how do we actually compute the likelihood? This is a nontrivial problem: we need to be able to quickly compute (or at least approximate, in a rational way) integrals of multivariate Gaussian densities G over simple but high-dimensional orthants Ci. We discuss two ways to compute these integrals; each has its own advantages. The first technique can be termed “density evolution” [10, 13]. The method is based on the following well-known fact from the theory of stochastic differential equations [8]: given the data (⃗xi, ti−1), the probability density of the voltage process V (t) up to the next spike ti satisfies the following partial differential (Fokker-Planck) equation: ∂P(V, t) ∂t = σ2 2 ∂2P ∂V 2 + g ∂[(V −Veq(t))P] ∂V , (3) under the boundary conditions P(V, ti−1) = δ(V −Vr), P(Vth, t) = 0; where Veq(t) is the instantaneous equilibrium potential: Veq(t) = 1 g  ⃗k · ⃗x(t) + i−1 X j=0 h(t −tj)  . Moreover, the conditional firing rate f(t) satisfies Z t ti−1 f(s)ds = 1 − Z P(V, t)dV. Thus standard techniques for solving the drift-diffusion evolution equation (3) lead to a fast method for computing f(t) (as illustrated in Fig. 2). Finally, the likelihood L⃗xi,ti(⃗k, σ, g, Vr, h) is simply f(ti). While elegant and efficient, this density evolution technique turns out to be slightly more powerful than what we need for the MLE: recall that we do not need to compute the conditional rate function f at all times t, but rather just at the set of spike times {ti}, and thus we can turn to more specialized techniques for faster performance. We employ a rapid technique for computing the likelihood using an algorithm due to Genz [6], designed to compute exactly the kinds of multidimensional Gaussian probability integrals considered here. This algorithm works well when the orthants Ci are defined by fewer than ≈10 linear constraints on V (t). The number of actual constraints on V (t) during an interspike interval (ti+1 −ti) grows linearly in the length of the interval: thus, to use this algorithm in typical data situations, we adopt a strategy proposed in our work on the deterministic form of the model [15], in which we discard all but a small subset of the constraints. The key point is that, due to strong correlations in the noise and the fact that the constraints only figure significantly when the V (t) is driven close to threshold, a small number of constraints often suffice to approximate the true likelihood to a high degree of precision. -200 -100 0 0 t (msec before spike) true K STA estim K 0 30 60 0 t (msec after spike) true h estim h Figure 4: Demonstration of the estimator’s performance on simulated data. Dashed lines show the true kernel ⃗k and aftercurrent h; ⃗k is a 12-sample function chosen to resemble the biphasic temporal impulse response of a macaque retinal ganglion cell, while h is function specified in a five-dimensional vector space, whose shape induces a slight degree of burstiness in the model’s spike responses. The L-NLIF model was stimulated with parameters g = 0.05 (corresponding to a membrane time constant of 20 time-samples), σnoise = 0.5, and Vr = 0. The stimulus was 30,000 time samples of white Gaussian noise with a standard deviation of 0.5. With only 600 spikes of output, the estimator is able to retrieve an estimate of ⃗k (gray curve) which closely matches the true kernel. Note that the spike-triggered average (black curve), which is an unbiased estimator for the kernel of an LNP neuron [5], differs significantly from this true kernel (see also [15]). The accuracy of this approach improves with the number of constraints considered, but performance is fastest with fewer constraints. Therefore, because ascending the likelihood function requires evaluating the likelihood at many different points, we can make this ascent process much quicker by applying a version of the coarse-to-fine idea. Let Lk denote the approximation to the likelihood given by allowing only k constraints in the above algorithm. Then we know, by a proof identical to that of Theorem 1, that Lk has no local maxima; in addition, by the above logic, Lk →L as k grows. It takes little additional effort to prove that argmax Lk →argmax L; thus, we can efficiently ascend the true likelihood surface by ascending the “coarse” approximants Lk, then gradually “refining” our approximation by letting k increase. An application of this algorithm to simulated data is shown in Fig. 4. Further applications to both simulated and real data will be presented elsewhere. Discussion We have shown here that the L-NLIF model, which couples a linear filtering stage to a biophysically plausible and flexible model of neuronal spiking, can be efficiently estimated from extracellular physiological data using maximum likelihood. Moreover, this model lends itself directly to analysis via tools from the modern theory of point processes. For example, once we have obtained our estimate of the parameters (⃗k, σ, g, Vr, h), how do we verify that the resulting model provides an adequate description of the data? This important “model validation” question has been the focus of some recent elegant research, under the rubric of “time rescaling” techniques [4]. While we lack the room here to review these methods in detail, we can note that they depend essentially on knowledge of the conditional firing rate function f(t). Recall that we showed how to efficiently compute this function in the last section and examined some of its qualitative properties in the L-NLIF context in Figs. 2 and 3. We are currently in the process of applying the model to physiological data recorded both in vivo and in vitro, in order to assess whether it accurately accounts for the stimulus preferences and spiking statistics of real neurons. One long-term goal of this research is to elucidate the different roles of stimulus-driven and stimulus-independent activity on the spiking patterns of both single cells and multineuronal ensembles. References [1] B. Aguera y Arcas and A. Fairhall. What causes a neuron to spike? Neral Computation, 15:1789–1807, 2003. [2] M. Berry and M. Meister. Refractoriness and neural precision. Journal of Neuroscience, 18:2200–2211, 1998. [3] V. Bogachev. Gaussian Measures. AMS, New York, 1998. [4] E. Brown, R. Barbieri, V. Ventura, R. Kass, and L. Frank. The time-rescaling theorem and its application to neural spike train data analysis. Neural Computation, 14:325–346, 2002. [5] E. Chichilnisky. A simple white noise analysis of neuronal light responses. Network: Computation in Neural Systems, 12:199–213, 2001. [6] A. Genz. Numerical computation of multivariate normal probabilities. Journal of Computational and Graphical Statistics, 1:141–149, 1992. [7] W. Gerstner and W. Kistler. Spiking Neuron Models: Single Neurons, Populations, Plasticity. Cambridge University Press, 2002. [8] S. Karlin and H. Taylor. A Second Course in Stochastic Processes. Academic Press, New York, 1981. [9] J. Keat, P. Reinagel, R. Reid, and M. Meister. Predicting every spike: a model for the responses of visual neurons. Neuron, 30:803–817, 2001. [10] B. Knight, A. Omurtag, and L. Sirovich. The approach of a neuron population firing rate to a new equilibrium: an exact theoretical result. Neural Computation, 12:1045–1055, 2000. [11] J. Levin and J. Miller. Broadband neural encoding in the cricket cercal sensory system enhanced by stochastic resonance. Nature, 380:165–168, 1996. [12] L. Paninski. Convergence properties of some spike-triggered analysis techniques. Network: Computation in Neural Systems, 14:437–464, 2003. [13] L. Paninski, B. Lau, and A. Reyes. Noise-driven adaptation: in vitro and mathematical analysis. Neurocomputing, 52:877–883, 2003. [14] L. Paninski, J. Pillow, and E. Simoncelli. Maximum likelihood estimation of a stochastic integrate-and-fire neural encoding model. submitted manuscript (cns.nyu.edu/∼liam), 2004. [15] J. Pillow and E. Simoncelli. Biases in white noise analysis due to non-poisson spike generation. Neurocomputing, 52:109–115, 2003. [16] D. Reich, J. Victor, and B. Knight. The power ratio and the interval map: Spiking models and extracellular recordings. The Journal of Neuroscience, 18:10090–10104, 1998. [17] M. Rudd and L. Brown. Noise adaptation in integrate-and-fire neurons. Neural Computation, 9:1047–1069, 1997. [18] J. Victor. How the brain uses time to represent and process visual information. Brain Research, 886:33–46, 2000. [19] Y. Yu and T. Lee. Dynamical mechanisms underlying contrast gain control in sing le neurons. Physical Review E, 68:011901, 2003.
2003
165
2,382
Prediction on Spike Data Using Kernel Algorithms Jan Eichhorn, Andreas Tolias, Alexander Zien, Malte Kuss, Carl Edward Rasmussen, Jason Weston, Nikos Logothetis and Bernhard Sch¨olkopf Max Planck Institute for Biological Cybernetics 72076 T¨ubingen, Germany first.last@tuebingen.mpg.de Abstract We report and compare the performance of different learning algorithms based on data from cortical recordings. The task is to predict the orientation of visual stimuli from the activity of a population of simultaneously recorded neurons. We compare several ways of improving the coding of the input (i.e., the spike data) as well as of the output (i.e., the orientation), and report the results obtained using different kernel algorithms. 1 Introduction Recently, there has been a great deal of interest in using the activity from a population of neurons to predict or reconstruct the sensory input [1, 2], motor output [3, 4] or the trajectory of movement of an animal in space [5]. This analysis is of importance since it may lead to a better understanding of the coding schemes utilised by networks of neurons in the brain. In addition, efficient algorithms to interpret the activity of brain circuits in real time are essential for the development of successful brain computer interfaces such as motor prosthetic devices. The goal of reconstruction is to predict variables which can be of rather different nature and are determined by the specific experimental setup in which the data is collected. They might be for example arm movement trajectories or variables representing sensory stimuli, such as orientation, contrast or direction of motion. From a data analysis perspective, these problems are challenging for a number of reasons, to be discussed in the remainder of this article. We will exemplify our reasoning using data from an experiment described in Sect. 3. The task is to reconstruct the angle of a visual stimulus, which can take eight discrete values, from the activity of simultaneously recorded neurons. Input coding. In order to effectively apply machine learning algorithms, it is essential to adequately encode prior knowledge about the problem. A clever encoding of the input data might reflect, for example, known invariances of the problem, or assumptions about the similarity structure of the data motivated by scientific insights. An algorithmic approach which currently enjoys great popularity in the machine learning community, called kernel machines, makes these assumptions explicit by the choice of a kernel function. The kernel can be thought of as a mathematical formalisation of a similarity measure that ideally captures much of this prior knowledge about the data domain. Note that unlike many traditional machine learning methods, kernel machines can readily handle data that is not in the form of vectors of numbers, but also complex data types, such as strings, graphs, or spike trains. Recently, a kernel for spike trains was proposed whose design is based on a number of biologically motivated assumptions about the structure of spike data [6]. Output coding. Just like the inputs, also the stimuli perceived or the actions carried out by an animal are in general not given to us in vectorial form. Moreover, biologically meaningful similarity measures and loss functions may be very different from those used traditionally in pattern recognition. Hence, once again, there is a need for methods that are sufficiently general such that they can cope with these issues. In the problem at hand, the outputs are orientations of a stimulus and thus it would be desirable to use a method which takes their circular structure into account. In this paper, we will utilise the recently proposed kernel dependency estimation technique [7] that can cope with general sets of outputs and and a large class of loss functions in a principled manner. Besides, we also apply Gaussian process regression to the given task. Inference and generalisation. The dimensionality of the spike data can be very high, in particular if the data stem from multicellular recording and if the temporal resolution is high. In addition, the problems are not necessarily stationary, the distributions can change over time, and depend heavily on the individual animal. These aspects make it hard for a learning machine to generalise from the training data to previously unseen test data. It is thus important to use methods which are state of the art and assay them using carefully designed numerical experiments. In our work, we have attempted to evaluate several such methods, including certain developments for the present task that shall be described below. 2 Learning algorithms, kernels and output coding In supervised machine learning, we basically attempt to discover dependencies between variables based on a finite set of observations (called the training set) {(xi, yi)|i = 1, . . . , n}. The xi ∈X are referred to as inputs and are taken from a domain X; likewise, the y ∈Y are called outputs and the objective is to approximate the mapping X →Y between the domains from the samples. If Y is a discrete set of class labels, e.g. {−1, 1}, the problem is referred to as classification; if Y = RN, it is called regression. Kernel machines, a term which refers to a group of learning algorithms, are based on the notion of a feature space mapping Φ. The input points get mapped to a possibly highdimensional dot product space (called the feature space) using Φ, and in that space the learning problem is tackled using simple linear geometric methods (see [8] for details). All geometric methods that are based on distances and angles can be performed in terms of the dot product. The ”kernel trick” is to calculate the inner product of feature space mapped points using a kernel function k(xi, xj) = ⟨Φ(xi), Φ(xj)⟩. (1) while avoiding explicit mappings Φ. In order for k to be interpretable as a dot product in some feature space it has to be a positive definite function. 2.1 Support Vector Classification and Gaussian Process Regression A simple geometric classification method which is based on dot products and which is the basis of support vector machines is linear classification via separating hyperplanes. One can show that the so-called optimal separating hyperplane (the one that leads to the largest margin of separation between the classes) can be written in feature space as ⟨w, Φ(x)⟩+b = 0, where the hyperplane normal vector can be expanded in terms of the training points as w = Pm i=1 λiΦ(xi). The points for which λi ̸= 0 are called support vectors. Taken together, this leads to the decision function f(x) = sign  m X i=1 λi⟨Φ(x), Φ(xi)⟩+ b  = sign  m X i=1 λik(x, xi) + b  . (2) The coefficients λi, b ∈R are found by solving a quadratic optimisation problem, for which standard methods exist. The central idea of support vector machines is thus that we can perform linear classification in a high-dimensional feature space using a kernel which can be seen as a (nonlinear) similarity measure for the input data. A popular nonlinear kernel function is the Gaussian kernel k(xi, xj) = exp(−∥xi −xj∥2/2σ2). This kernel has been successfully used to predict stimulus parameters using spikes from simultaneously recorded data [2]. In Gaussian process regression [9], the model specifies a random distribution over functions. This distribution is conditioned on the observations (the training set) and predictions may be obtained in closed form as Gaussian distributions for any desired test inputs. The characteristics (such as smoothness, amplitude, etc.) of the functions are given by the covariance function or covariance kernel; it controls how the outputs covary as a function of the inputs. In the experiments below (assuming x ∈RD) we use a Gaussian kernel of the form Cov(yi, yj) = k(xi, xj) = v2 exp  −1 2 D X d=1 ∥xd i −xd j∥2/w2 d  (3) with parameters v and w = (w1, . . . , wD). This covariance function expresses that outputs whose inputs are nearby have large covariance, and outputs that belong to inputs far apart have smaller covariance. In fact, it is possible to show that the distribution of functions generated by this covariance function are all smooth. The w parameters determine exactly how important different input coordinates are (and can be seen as a generalisation of the above kernel). The parameters are fit by optimising the likelihood. 2.2 Similarity measures for spike data To take advantage of the strength of kernel machines in the analysis of cortical recordings we will explore the usefulness of different kernel functions. We describe the spikernel introduced in [6] and present a novel use of alignment-type scores typically used in bioinformatics. Although we are far from understanding the neuronal code, there exist some reasonable assumptions about the structure of spike data one has to take into account when comparing spike patterns and designing kernels. • Most fundamental is the assumption that frequency and temporal coding play central roles. Information related to a certain variable of the stimulus may be coded in highly specific temporal patterns contained in the spike trains of a cortical population. • These firing patterns may be misaligned in time. To compare spike trains it might be necessary to realign them by introducing a certain time shift. We want the similarity score to be the higher the smaller this time shift is. Spikernel. In [6] Shpigelman et al. proposed a kernel for spike trains that was designed with respect to the assumptions above and some extra assumptions related to the special task to be solved. To understand their ideas it is most instructive to have a look at the feature map Φ rather than at the kernel itself. Let s be a sequence of firing rates of length |s|. The feature map maps this sequence into a high dimensional space where the coordinates u represent a possible spike train prototype of fixed length n ≤|s|. The value of the feature map of s, Φu(s), represents the similarity of s to the prototype u. The u component of the feature vector Φ(s) is defined as: Φu(s) = C n 2 X i∈In,|s| µd(si,u)λ|s|−i1 (4) Here i is an index vector that indexes a length n ordered subsequence of s and the sum runs over all possible subsequences. λ, µ ∈[0, 1] are parameters of the kernel. The µpart of the sum reflects the weighting according to the similarity of s to the coordinate u (expressed in the distance measure d(si, u) = Pn k=1 d(si,k, uk)), whereas the λ-part emphasises the concentration towards a “time of interest” at the end of the sequence s (i1 is the first index of the subsequence). Following the authors we chose the distance measure d(si,k, uk), determining how two firing rate vectors are compared, to be the squared l2norm: d(si,k, uk) = ∥si,k −uk∥2 2. Note, that each entry sk of the sequence (-matrix) s is meant to be a vector containing the firing rates of all simultaneously recorded neurons in the same time interval (bin). The kernel kn(s, t) induced by this feature map can be computed in time O(|s||t|n) using dynamic programming. The kernel used in our experiments is a sum of kernels for different pattern lengths n weighted with another parameter p, i.e., k(s, t) = PN i=1 piki(s, t). Alignment score. In addition to methods developed specifically for neural spike train data, we also train on pairwise similarities derived from global alignments. Aligning sequences is a standard method in bioinformatics; there, the sequences usually describe DNA, RNA or protein molecules. Here, the sequences are time-binned representations of the spike trains, as described above. In a global alignment of two sequences s = s1 . . . s|s| and t = t1 . . . t|t|, each sequence may be elongated by inserting copies of a special symbol (the dash, “ ”) at any position, yielding two stuffed sequences s′ and t′. The first requirement is that the stuffed sequences must have the same length. This allows to write them on top of each other, so that each symbol of s is either mapped to a symbol of t (match/mismatch), or mapped to a dash (gap), and vice versa. The second requirement for a valid alignment is that no dash is mapped to a dash, which restricts the length of any alignment to a maximum of |s| + |t|. Once costs are assigned to the matches and gaps, the cost of an alignment is defined as the sum of costs in the alignment. The distance of s and t can now be defined as the cost of an optimal global alignment of s and t, where optimal means minimising the cost. Although there are exponentially many possible global alignments, the optimal cost (and an optimal alignment) can be computed in time O(|s||t|) using dynamic programming [10]. Let c(a, b) denote the cost of a match/mismatch (a = si, b = tj) or of a gap (either a =“ ” or b =“ ”). We parameterise the costs with γ and µ as follows: c(a, b) = c(b, a) := |a −b| c(a, ) = c( , a) := γ|a −µ| The matrix of pairwise distances as defined above will, in general, not be a proper kernel (i.e., it will not be positive definite). Therefore, we use it to build a new representation of the data (see below). A related but different distance measure has previously been proposed by Victor and Purpura [11]. We use the alignment score to compute explicit feature vectors of the data points via an empirical kernel map [8, p. 42]. Consider as prototypes the overall data set1 {xi}i=1,...,m of m trials xi = [n1,i n2,i ... n20,i] as defined in Sect. 3. Since our alignment score kalign(n, n′) applies to single spike trains only2, we compute the empirical kernel map for each neuron separately and then concatenate these vectors. Hence, the feature map is defined as: Φx1,...,xm(x′) = Φx1,...,xm([n′ 1 n′ 2 . . . n′ 20]) = [{kalign(n1,i=1..m, n′ 1)} {kalign(n2,i=1..m, n′ 2)} . . . {kalign(n20,i=1..m, n′ 20)}] Thus, each trial is represented by a vector of its alignment score with respect to all other trials where alignments are computed separately for all 20 neurons. We can now train kernel machines using any standard kernel on top of this representation, but we already achieve very good performance using the simple linear kernel (see results section). Although we give results obtained with this technique of constructing a feature map only for the alignment score, it can be easily applied with the spikernel and other kernels. 2.3 Coding structure in output space Our objective is to use various machine learning algorithms to predict the orientation of a stimulus used in the experiment described below. Since we use discrete orientations we can model this as a multi-class classification problem or transform it into a regression task. Combining Support Vector Machines. Above, we explained how to do binary classification using SVMs by estimating a normal vector w and offset b of a hyperplane ⟨w, Φ(x)⟩+ b = 0 in the feature space. A given point x will then be assigned to class 1 if ⟨w, Φ(x)⟩+ b > 0 (and to class -1 otherwise). If we have M > 2 classes, we can train M classifiers, each one separating one specific class from the union of all other ones (hence the name “one-versus-rest”). When classifying a new point x, we simply assign it to the class whose classifier leads to the largest value of ⟨w, Φ(x)⟩+ b. A more sophisticated and more expensive method is to train one classifier for each possible combination of two classes and then use a voting scheme to classify a point. It is referred to as “one-versus-one”. Kernel Dependency Estimation. Note that the above approach treats all classes the same. In our situation, however, certain classes are “closer” to each other since the corresponding stimulus angles are closer than others. To take this into account, we use the kernel dependency estimation (KDE) algorithm [7] with an output similarity measure corresponding to a loss function of the angles taking the form L(α, β) = cos(2α −2β).3 The modification respects the symmetry that 0◦and 180◦, say, are equivalent. Lack of space does not permit us to explain the KDE algorithm in detail. In a nutshell, it estimates a linear mapping between two feature spaces. One feature space corresponds to the kernel used on the inputs (in our case, the spike trains), and the other one to a second kernel which encodes the similarity measure to be used on the outputs (the orientation of the lines). Gaussian Process Regression. When we use Gaussian processes to predict the stimulus angle α we consider the task as a regression problem on sin 2α and cos 2α separately. To 1Note that this means that we are considering a transductive setting [12], where we have access to all input data (but not the test outputs) during training. 2It is straightforward to extend this idea to synchronous alignments of the whole population vector, but we achieved worse results. 3Note that L(α, β) needs to be an admissible kernel, i.e. positive definite, and therefore we cannot use the linear loss function (5). do prediction we take the means of the predicted distributions of sin 2α and cos 2α as point estimates respectively, which are then projected onto the unit circle. Finally we assign the averaged predicted angle to the nearest orientation which could have been shown. 3 Experiments We will now apply the ideas from the reasoning above and see how well these different concepts perform in practice on a dataset of cortical recordings. Data collection. The dataset we used was collected in an experiment performed in our neurophysiology department. All experiments were conducted in full compliance with the guidelines of the European Community (EUVD/86/609/EEC) for the care and use of laboratory animals and were approved by the local authorities (Regierungspr¨asidium). The spike data were recorded using tetrodes inserted in area V1 of a behaving macaque (Macaca Mulatta). The spike waveforms were sampled at 32KHz. The animal’s task was to fixate a small square spot on the monitor while gratings of eight different orientations (0o, 22o, 45o, 67o, 90o, 112o, 135o, 158o) and two contrasts (2% and 30%) were presented on a monitor. The stimuli were positioned on the monitor so as to cover the classical receptive fields of the neurons. A single stimulus of fixed orientation and contrast was presented for a period of 500 ms, i.e., during the epoch of a single behavioural trial. All 8 stimuli appeared 30 times each and in random order, resulting in 240 observed trials. Spiking activity from neural recordings usually come as a time series of action potentials from one or more neurons recorded from the brain. It is commonly believed that in most circumstances most of the information in the spiking activity is mainly present in the times of occurrence of spikes and not in the exact shape of the individual spikes. Therefore we can abstract the spike series as a series of zeros and ones. From a single trial we have recordings of 500ms from 20 neurons. We compute the firing rates from the high resolution data for each neuron in 1, 5 or 10 bins of length 500, 100 or 50ms respectively, resulting in three different data representations for different temporal resolutions. By concatenation of the vectors nr (r = 1, . . . , 20) containing the bins of each neuron we obtain one data point x = [n1 n2 ... n20] per trial. Comparing the algorithms. Below we validate our reasoning on input and output coding with several experiments. We will compare the kernel algorithms KDE, SVM and Gaussian Processes (GP) and a simple k-nearest neighbour approach (k-NN) that we applied with different kernels and different data representations. As reference values, we give the performance of a standard Bayesian reconstruction method (assuming independent neurons with Poisson characteristics), a Template Matching method and the standard Population Vector method as they are described e.g. in [5] and [3]. In all our experiments we compute the test error over a five fold cross-validation using always the same data split, balanced with respect to the classes.4 We use four out of the five folds of the data to choose the parameters of the kernel and the method. This choice itself is done via another level of five fold cross-validation (this time unbalanced). Finally we train the best model on these four folds and compute an independent test error on the remaining fold. Since simple zero-one-loss is not very informative about the error in multi-class problems, we report the linear loss of the predicted angles, while taking into account the circular structure of the problem. Hence the loss function takes the form L(α, β) = min{|α −β|, −|α −β| + 180o}. (5) 4I.e., in every fold we have the same number of points per class. The parameters of the KDE algorithm (ridge parameter) and the SVM (C) are taken from a logarithmic grid (ridge = 10−5, 10−4, ..., 101; C = 10−1, 1, ..., 105). After we knew its order of magnitude, we chose the σ-parameter of the Gaussian kernel from a linear grid (σ = 1, 2, ..., 10). The spikernel has four parameters: λ, µ, N and p. The stimulus in our experiment was perceived over the whole period of recording. Therefore we do not want any increasing weight of the similarity score towards the beginning or the end of the spikesequence and we fix λ = 1. Further we chose N = 10 to be the length of our sequence, and thereby consider patterns of all possible lengths. The parameters µ and p are chosen from the following (partly linear) grids: µ = 0.01, 0.05, 0.1, 0.2, 0.3, 0.4, ..., 0.8, 0.9, 0.99 and p = 0.05, 0.1, 0.3, 0.5, ..., 2.5, 2.7 Table 1 Mean test error and standard error on the low contrast dataset Gaussian Kernel Spikernel Alignment score KDE 10 bins 16.8◦± 1.6◦ 11.5◦± 1.3◦ 13.8◦± 1.3◦ 1 bin 12.8◦± 1.7◦ (13.6◦± 1.8◦)† SVM (1-vs-rest) 10 bins 16.8◦± 2.0◦ 13.1◦± 1.4◦ 12.8◦± 0.9◦ 1 bin 13.3◦± 1.6◦ SVM (1-vs-1) 10 bins 16.4◦± 1.6◦ 11.2◦± 1.3◦ 12.3◦± 1.5◦ 1 bin 12.2◦± 1.7◦ k-NN 10 bins 18.7◦± 1.5◦ 12.1◦± 1.4◦ 13.0◦± 2.0◦ 1 bin 14.0◦± 1.7◦ GP 2 bins ‡ 16.2◦± 1.1◦ n/a ∗ n/a ∗ 1 bin 15.6◦± 1.7◦ Bayesian rec.: 14.4◦± 2.1◦, Template Matching: 17.7◦± 0.6◦, Pop. Vect.: 28.8◦± 1.0◦ Table 2 Mean test error and standard error on the high contrast dataset Gaussian Kernel Spikernel Alignment score KDE 10 bins 1.9◦± 0.5◦ 1.7◦± 0.4◦ 2.1◦± 0.4◦ 1 bin 1.4◦± 0.5◦ (1.6◦± 0.4◦)† SVM (1-vs-rest) 10 bins 1.5◦± 0.5◦ 1.4◦± 0.6◦ 1.0◦± 0.5◦ 1 bin 1.4◦± 0.4◦ SVM (1-vs-1) 10 bins 1.2◦± 0.4◦ 1.4◦± 0.5◦ 0.8◦± 0.3◦ 1 bin 1.1◦± 0.4◦ k-NN 10 bins 4.7◦± 1.2◦ 1.0◦± 0.4◦ 1.0◦± 0.3◦ 1 bin 1.7◦± 0.6◦ GP 2 bins ‡ 1.4◦± 0.4◦ n/a ∗ n/a ∗ 1 bin 2.0◦± 0.5◦ Bayesian rec.: 3.8◦± 0.6◦, Template Matching: 7.2◦± 1.0◦, Pop. Vect.: 11.6◦± 0.7◦ † We report this number only for comparison, since the spikernel relies on temporal patterns and it makes no sense to use only one bin. ‡ A 10 bin resolution would require to determine 200 parameters wd of the covariance function (3) from only 192 samples. ∗We did not compute these results. Both kernels are not analytical functions of their parameters and we would loose much of the convenience of Gaussian Processes. Using crossvalidation instead resembles very much Kernel Ridge Regression on sin 2α and cos 2α which is almost exactly what KDE is doing when applied with the loss function (5). The results for the low contrast datasets is given in Table 1, and Table 2 presents results for high contrast (five best results in boldface). The relatively large standard error (± σ √n) is due to the fact that we used only five folds to compute the test error. 4 Discussion In our experiments, we have shown that using modern machine learning techniques, it is possible to use tetrode recordings in area V1 to reconstruct the orientation of a stimulus presented to a macaque monkey rather accurately: depending on the contrast of the stimulus, we obtained error rates in the range of 1◦−20◦. We can observe that standard techniques for decoding, namely Population vector, Template Matching and a particular Bayesian reconstruction method, can be outperformed by state-of-the-art kernel methods when applied with an appropriate kernel and suitable data representation. We found that the accuracy of kernel methods can in most cases be improved by utilising task specific similarity measures for spike trains, such as the spikernel or the introduced alignment distances from bioinformatics. Due to the (by machine learning standards) relatively small size of the analysed datasets, it is hard to draw conclusions regarding which of the applied kernel methods performs best. Rather than focusing too much on the differences in performance, we want to emphasise the capability of kernel machines to assay different decoding hypotheses by choosing appropriate kernel functions. Analysing their respective performance may provide insight about how spike trains carry information and thus about the nature of neural coding. Acknowledgements. For useful help, we thank Goekhan Bakır, Olivier Bousquet and Gunnar R¨atsch. J.E. was supported by a grant from the Studienstiftung des deutschen Volkes. References [1] P. F¨oldi´ak. The ”ideal humunculus”: statistical inference from neural population responses. In F. Eeckman and J. Bower, editors, Computation and Neural Systems 1992, Norwell, MA, 1993. Kluwer. [2] A. S. Tolias, A. G. Siapas, S. M. Smirnakis and N. K. Logothetis. Coding visual information at the level of populations of neurons. Soc. Neurosci. Abst. 28, 2002. [3] A. P. Georgopoulos, A. B. Schwartz and R. E. Kettner. Neuronal population coding of movement direction. Science, 233(4771):1416–1419, 1986. [4] T. D. Sanger. Probability density estimation for the interpretation of neural population codes. J Neurophysiol., 76(4):2790–2793, 1996. [5] K. Zhang, I. Ginzburg, B. L. McNaughton and T. J. Sejnowski. Interpreting neuronal population activity by reconstruction: unified framework with application to hippocampal place cells. J Neurophysiol., 79(2):1017–1044, 1998. [6] L. Shpigelman, Y. Singer, R. Paz and E. Vaadia. Spikernels: embedding spike neurons in innerproduct spaces. In S. Becker, S. Thrun and K. Obermayer, editors, Advances in Neural Information Processing Systems 15, 2003. [7] J. Weston, O. Chapelle, A. Elisseeff, B. Sch¨olkopf and V. Vapnik. Kernel dependency estimation. In S. Becker, S. Thrun and K. Obermayer, editors, Advances in Neural Information Processing Systems 15, 2003. [8] B. Sch¨olkopf and A. J. Smola. Learning with Kernels. The MIT Press, Cambridge, Massachusetts, 2002. [9] C. K. I. Williams and C. E. Rasmussen. Gaussian processes for regression. In D. S. Touretzky, M. C. Mozer and M. E. Hasselmo, editors, Advances in Neural Information Processing Systems 8, 1996. [10] S. B. Needleman and C. D. Wunsch. A General Method Applicable to the Search for Similarities in the Amino Acid Sequence of Two Proteins. Journal of Molecular Biology, 48:443–453, 1970. [11] J. D. Victor and K. P. Purpura. Nature and precision of temporal coding in visual cortex: a metric-space analysis. J Neurophysiol, 76(2):1310–1326, 1996. [12] V. N. Vapnik. Statistical Learning Theory. John Wiley & Sons, New York, 1998.
2003
166
2,383
An MDP-Based Approach to Online Mechanism Design David C. Parkes Division of Engineering and Applied Sciences Harvard University parkes@eecs.harvard.edu Satinder Singh Computer Science and Engineering University of Michigan baveja@umich.edu Abstract Online mechanism design (MD) considers the problem of providing incentives to implement desired system-wide outcomes in systems with self-interested agents that arrive and depart dynamically. Agents can choose to misrepresent their arrival and departure times, in addition to information about their value for different outcomes. We consider the problem of maximizing the total longterm value of the system despite the self-interest of agents. The online MD problem induces a Markov Decision Process (MDP), which when solved can be used to implement optimal policies in a truth-revealing Bayesian-Nash equilibrium. 1 Introduction Mechanism design (MD) is a subfield of economics that seeks to implement particular outcomes in systems of rational agents [1]. Classically, MD considers static worlds in which a one-time decision is made and all agents are assumed to be patient enough to wait for the decision. By contrast, we consider dynamic worlds in which agents may arrive and depart over time and in which a sequence of decisions must be made without the benefit of hindsight about the values of agents yet to arrive. The MD problem for dynamic systems is termed online mechanism design [2]. Online MD supposes the existence of a center, that can receive messages from agents and enforce a particular outcome and collect payments. Sequential decision tasks introduce new subtleties into the MD problem. First, decisions now have expected value instead of certain value because of uncertainty about the future. Second, new temporal strategies are available to an agent, such as waiting to report its presence to try to improve its utility within the mechanism. Online mechanisms must bring truthful and immediate revelation of an agent’s value for sequences of decisions into equilibrium. Without the problem of private information and incentives, the sequential decision problem in online MD could be formulated and solved as a Markov Decision Process (MDP). In fact, we show that an optimal policy and MDP-value function can be used to define an online mechanism in which truthful and immediate revelation of an agent’s valuation for different sequences of decisions is a Bayes-Nash equilibrium. Our approach is very general, applying to any MDP in which the goal is to maximize the total expected sequential value across all agents. To illustrate the flexibility of this model, we can consider the following illustrative applications: reusable goods. A renewable resource is available in each time period. Agents arrive and submit a bid for a particular quantity of resource for each of a contiguous sequence of periods, and before some deadline. multi-unit auction. A finite number of identical goods are for sale. Agents submit bids for a quantity of goods with a deadline, by which time a winnerdetermination decision must be made for that agent. multiagent coordination. A central controller determines and enforces the actions that will be performed by a dynamically changing team of agents. Agents are only able to perform actions while present in the system. Our main contribution is to identify this connection between online MD and MDPs, and to define a new family of dynamic mechanisms, that we term the online VCG mechanism. We also clearly identify the role of the ability to stall a decision, as it relates to the value of an agent, in providing for Bayes-Nash truthful mechanisms. 1.1 Related Work The problem of online MD is due to Friedman and Parkes [2], who focused on strategyproof online mechanisms in which immediate and truthful revelation of an agent’s valuation function is a dominant strategy equilibrium. The authors define the mechanism that we term the delayed VCG mechanism, identify problems for which the mechanism is strategyproof, and provide the seeds of our work in BayesNash truthful mechanisms. Work on online auctions [3] is also related, in that it considers a system with dynamic agent arrivals and departures. However, the online auction work considers a much simpler setting (see also [4]), for instance the allocation of a fixed number of identical goods, and places less emphasis on temporal strategies or allocative efficiency. Awerbuch et al. [5], provide a general method to construct online auctions from online optimization algorithms. In contrast to our methods, their methods consider the special case of single-minded bidders with a value vi for a particular set of resources ri, and are only temporally strategyproof in the special-case of online algorithms with a non-decreasing acceptance threshold. 2 Preliminaries In this section, we introduce a general discrete-time and finite-action formulation for a multiagent sequential decision problem. Putting incentives to one side for now, we also define and solve an MDP formalization of the problem. We consider a finite-horizon problem1 with a set T of discrete time points and a sequence of decisions k = {k1, . . . , kT }, where kt ∈Kt and Kt is the set of feasible decisions in period t. Agent i ∈I arrives at time ai ∈T, departs at time di ∈T, and has value vi(k) ≥0 for the sequence of decisions k. By assumption, an agent has no 1The model can be trivially extended to consider infinite horizons if all agents share the same discount factor, but will require some care for more general settings. value for decisions outside of interval [ai, di]. Agents also face payments, which we allow in general to be collected after an agents departure. Collectively, information θi = (ai, di, vi) defines the type of agent i with θi ∈Θ. Agent types are sampled i.i.d. from a probability distribution f(θ), assumed known to the agents and to the central mechanism. We allow multiple agents to arrive and depart at the same time. Agent i, with type θi, receives utility ui(k, p; θi) = vi(k; θi) −p, for decisions k and payment p. Agents are modeled as expected-utility maximizers. We adopt as our goal that of maximizing the expected total sequential value across all agents. If we were to simply ignore incentive issues, the expected-value maximizing decision problem induces an MDP. The state2 of the MDP at time t is the history-vector ht = (θ1, . . . , θt; k1, . . . , kt−1), and includes the reported types up to and including period t and the decisions made up to and including period t −1. The set of all possible states at time t is denoted Ht. The set of all possible states across all time is H = ST +1 t=1 Ht. The set of decisions available in state ht is Kt(ht). Given a decision kt ∈Kt(ht) in state ht, there is some probability distribution Prob(ht+1|ht, kt) over possible next states ht+1 determined by the random new agent arrivals, agent departures, and the impact of decision kt. This makes explicit the dynamics that were left implicit in type distribution θi ∈f(θi), and includes additional information about the domain. The objective is to make decisions to maximize the expected total value across all agents. We define a payofffunction for the induced MDP as follows: there is a payoffRi(ht, kt) = vi(k≤t; θi) −vi(k≤t−1; θi), that becomes available from agent i upon taking action kt in state ht. With this, we have Pτ t=1 Ri(ht; kt) = vi(k≤τ; θi), for all periods τ. The summed value, P i Ri(ht, kt), is the payoffobtained from all agents at time t, and is denoted R(ht, kt). By assumption, the reward to an agent in this basic online MD problem depends only on decisions, and not on state. The transition probabilities and the reward function defined above, together with the feasible decision space, constitute the induced MDP Mf. Given a policy π = {π1, π2, . . . , πT } where πt : Ht →Kt, an MDP defines an MDPvalue function V π as follows: V π(ht) is the expected value of the summed payoff obtained from state ht onwards under policy π, i.e., V π(ht) = Eπ{R(ht, π(ht)) + R(ht+1, π(ht+1))+· · ·+R(hT , π(hT ))}. An optimal policy π∗is one that maximizes the MDP-value of every state3 in H. The optimal MDP-value function V ∗can be computed via the following value iteration algorithm: for t = T −1, T −2, . . . , 1 ∀h ∈Ht V ∗(h) = max k∈Kt(h)[R(h, k) + X h′∈Ht+1 Prob(h′|h, k)V ∗(h′)] where V ∗(h ∈HT ) = maxk∈KT (h) R(h, k). This algorithm works backwards in time from the horizon and has time complexity polynomial in the size of the MDP and the time horizon T. Given the optimal MDP-value function, the optimal policy is derived as follows: for t < T π∗(h ∈Ht) = arg max k∈Kt(h)[R(h, k) + X h′∈Ht+1 Prob(h′|h, k)V ∗(h′)] and π∗(h ∈HT ) = arg maxk∈KT (h) R(h, k). Note that we have chosen not to subscript the optimal policy and MDP-value by time because it is implicit in the length of the state. 2Using histories as state in the induced MDP will make the state space very large. Often, there will be some function g for which g(h) is a sufficient statistic for all possible states h. We ignore this possibility here. 3It is known that a deterministic optimal policy always exists in MDPs[6]. Let R<t′(ht) denote the total payoffobtained prior to time t′ for a state ht with t ≥t′. The following property of MDPs is useful. Lemma 1 (MDP value-consistency) For any time t < T, and for any policy π, E{ht+1,...,hT |ht,π}{R<t′(ht′)+V π(ht′)} = R<t(ht)+V π(ht), for all t′ ≥t, where the expectation is taken with respect to a (correct) MDP model, Mf, given information up to and including period t and policy π. We will need to allow for incorrect models, Mf, because agents may misreport their true types θ as untruthful types ˆθ. Let ht(ˆθ; π) denote the state at time t produced by following policy π on agents with reported types ˆθ. Payoff, R(ht, kt), will always denote the payoffwith respect to the reported valuations of agents; in particular, R<t′(ˆθ; π) denotes the total payoffprior to period t′ obtained by applying policy π to reported types ˆθ. Example. (WiFi at Starbucks) [2] There is a finite set of WiFi (802.11b) channels to allocate to customers that arrive and leave a coffee house. A decision defines an allocation of a channel to a customer for some period of time. There is a known distribution on agent valuations and a known arrival and departure process. Each customer has her own value function, for example “I value any 10 minute connection in the next 30 minutes a $0.50.” The decision space might include the ability to delay making a decision for a new customer, before finally making a definite allocation decision. At this point the MDP reward would be the total value to the agent for this allocation into the future. The following domain properties are required to formally state the economic properties of our online VCG mechanism. First, we need value-monotonicity, which will be sufficient to provide for voluntary participation in our mechanism. Let θi ∈ht denote that agent i with type θi arrived in some period t′ ≤t in history ht. Definition 1 (value-monotonicity) MDP, Mf, satisfies value-monotonicity if for all states, ht, the optimal MDP-value function satisfies V ∗(ht(ˆθ ∪θi; π∗)) − V ∗(ht(ˆθ; π∗)) ≥0, for agent i with type θi that arrives in period t. Value-monotonicity requires that the arrival of each additional agent has a positive effect on the expected total value from that state forward. In WiFi at Starbucks, this is satisfied because an agent with a low value can simply be ignored by the mechanism. It may fail in other problems, for instance in a physical domain with a new robot that arrives and blocks the progress of other robots. Second, we need no-positive-externalities, which will be sufficient for our mechanisms to run without payment deficits to the center. Definition 2 (no-positive-externalities) MDP, Mf, satisfies no-positiveexternalities if for all states, ht, the optimal MDP-value function satisfies V ∗(ht(ˆθ ∪θi; π∗)) −vi(π∗(ht(ˆθ ∪θi; π∗)); θi) ≤V ∗(ht(ˆθ; π∗)), for agent i with type θi that arrives in period t. No-positive-externalities requires that the arrival of each additional agent can only make the other agents worse offin expectation. This holds in WiFi at Starbucks, because a new agent can take resources from other agents, but not in general, for instance when agents are both providers and consumers of resources or when multiple agents are needed to make progress. 3 The Delayed VCG Mechanism In this section, we define the delayed VCG mechanism, which was introduced in Friedman and Parkes [2]. The mechanism implements a sequence of decisions based on agent reports but delays final payments until the final period T. We prove that the delayed VCG mechanism brings truth-revelation into a Bayes-Nash equilibrium in combination with an optimal MDP policy. The delayed VCG mechanism is a direct-revelation online mechanism (DRM). The strategy space restricts an agent to making a single claim about its type. Formally, an online direct-revelation mechanism, M = (Θ; π, p), defines a feasible type space Θ, along with a decision policy π = (π1, . . . , πT ), with πt : Ht →Kt, and a payment rule p = (p1, . . . , pT ), with pt : Ht →RN, such that pt,i(ht) denotes the payment to agent i in period t given state ht. Definition 3 (delayed VCG mechanism) Given history h ∈H, mechanism MDvcg = (Θ; π, pDvcg), implements decisions kt = π(ht), and computes payment pDvcg i (ˆθ; π) = Ri ≤T (ˆθ; π) − h R≤T (ˆθ; π) −R≤T (ˆθ−i; π) i (1) to agent i at the end of the final period, where R≤T (ˆθ−i; π) denotes the total reported payofffor the optimal policy in the system without agent i. An agent’s payment is discounted from its reported value for the outcome by a term equal to the total (reported) marginal value generated by its presence. Consider agent i, with type θi, and let θ<i denote the types of agents that arrive before agent i, and let θ>i denote a random variable (distributed according to f(θ)) for the agents that arrive after agent i. Definition 4 (Bayesian-Nash Incentive-Compatible) Mechanism MDvcg is Bayesian-Nash incentive-compatible if and only if the policy π and payments satisfy: Eθ>i{vi(π(θ<i, θi, θ>i); θi) −pDvcg i (θ<i, θi, θ>i; π)} (BNIC) ≥Eθ>i{vi(π(θ<i, ˆθi, θ>i); θi) −pDvcg i (θ<i, ˆθi, θ>i; π)} for all types θ<i, all types θi, and all ˆθi ̸= θi. Bayes-Nash IC states that truth-revelation is utility maximizing in expectation, given common knowledge about the distribution on agent valuations and arrivals f(θ) and when other agents are truthful. Moreover, it implies immediate revelation, because the type includes information about an agent’s arrival period. Theorem 1 A delayed VCG mechanism, (Θ; π∗, pDvcg), based on an optimal policy π∗for a correct MDP model defined for a decision space that includes stalling is Bayes-Nash incentive compatible. Proof. Assume without loss of generality that the other agents are reporting truthfully. Consider some agent i, with type θi, and suppose agents θ<i have already arrived. Now, the expected utility to agent i when it reports type ˆθi, substituting for the payment term pDvcg i , is Eθ>i{vi(π∗(θ<i, ˆθi, θ>i); θi) + P j̸=i Rj ≤T (θ<i, ˆθi, θ>i; π∗) −R≤T (θ<i, θ>i; π∗)}. We can ignore the final term because it does not depend on the choice of ˆθi at all. Let τ denote the arrival period ai of agent i, with state hτ including agent types θ<i, decisions up to and including period τ −1, and the reported type of agent i if it makes a report in period ai. Ignoring R<τ(hτ), which is the total payoffalready received by agents j ̸= i in periods up to and including τ −1, the remaining terms are equal to the expected value of the summed payoffobtained from state hτ onwards under policy π∗, Eπ∗{vi(π∗(hτ); θi)+P j̸=i vj(π∗(hτ); ˆθj)+vi(π∗(hτ+1); θi)+P j̸=i vj(π∗(hτ+1); ˆθj)+ . . . + vi(π∗(hT ); θi) + P j̸=i vj(π∗(hT ); ˆθj)}, defined with respect to the true type of agent i and the reported types of agents j ̸= i. This is the MDP-value for policy π∗in state hτ, Eπ∗{R(hτ, π∗(hτ)) + R(hτ+1, π∗(hτ+1)) + . . . + R(hT , π∗(hT ))}, because agents j ̸= i are assumed to report their true types in equilibrium. We have a contradiction with the optimality of policy π∗because if there is some type ˆθi ̸= θi that agent i can report to improve the MDP-value of policy π∗, given types θ<i, then we can construct a new policy π′ that is better than policy π∗; policy π′ is identical to π∗in all states except hτ, when it implements the decision defined by π∗in the state with type θi replaced by type ˆθi. The new policy, π ′, lies in the space of feasible policies because the decision space includes stalling and can mimic the effect of any manipulation in which agent i reports a later arrival time. ⊓⊔ The effect of the first term in the discount in Equation 1 is to align the agent’s incentives with the system-wide objective of maximizing the total value across agents. We do not have a stronger equilibrium concept than Bayes-Nash because the mechanism’s model will be incorrect if other agents are not truthful and its policy suboptimal. This leaves space for useful manipulation. The following corollary captures the requirement that the MDPs decision space must allow for stalling, i.e. it must include the option to delay making a decision that will determine the value of agent i until some period after the agent’s arrival. Say an agent has patience if di > ai. Corollary 2 A delayed VCG mechanism cannot be Bayes-Nash incentivecompatible if agents have any patience and the expected value of its policy can be improved by stalling a decision. If the policy can be improved through stalling, then an agent can improve its expected utility by delaying its reported arrival to correct for this, and make the policy stall. This delayed VCG mechanism is ex ante efficient, because it implements the policy that maximizes the expected total sequential value across all agents. Second, it is interim individual-rational as long as the MDP satisfies the value-monotonicity property. The expected utility to agent i in equilibrium is Eθ>i{R≤T (θ<i, θi, θ>i; π∗) −R≤T (θ<i, θ>i; π∗)}, which is equivalent to value-monotonicity. Third, the mechanism is ex ante budget-balanced as long as the MDP satisfies the no-positive-externalities property. The expected payment by agent i, with type θi, to the mechanism is Eθ>i{R≤T (θ<i, θ>i; π∗) − (R≤T (θ<i, θi, θ>i; π∗) −Ri ≤T (θ<i, θi, θ>i; π∗))}, which is non-negative exactly when the no-positive-externalities condition holds. 4 The Online VCG Mechanism We now introduce the online VCG mechanism, in which payments are determined as soon as all decisions are made that affect an agent’s value. Not only is this a better fit with the practical needs of online mechanisms, but the online VCG mechanism also enables better computational properties than the delayed mechanism. Let V π(ht(ˆθ−i; π)) denote the MDP-value of policy π in the system without agent i, given reports θ−i from other agents, and evaluated in some period t. Definition 5 (online VCG mechanism) Given history h ∈ H, mechanism Mvcg = (Θ; π, pvcg) implements decisions kt = π(ht), and computes payment pvcg i (ˆθ; π) = Ri ≤mi(ˆθ; π) − h V π(hˆai(ˆθ; π)) −V π(hˆai(ˆθ−i; π)) i (2) to agent i in its commitment period mi, with zero payments in all other periods. Note the payment is computed in the commitment period for an agent, which is some period before an agent’s departure at which its value is fully determined. In WiFi at Starbucks, this can be the period in which the mechanism commits to a particular allocation for an agent. Agent i’s payment in the online VCG mechanism is equal to its reported value from the sequence of decisions made by the policy, discounted by the expected marginal value that agent i will contribute to the system (as determined by the MDP-value function for the policy in its arrival period). The discount is defined as the expected forward looking effect the agent will have on the value of the system. Establishing incentive-compatibility requires some care because the payment now depends on the stated arrival time of an agent. We must show that there is no systematic dependence that an agent can use to its advantage. Theorem 3 An online VCG mechanism, (Θ; π∗, pvcg), based on an optimal policy π∗for a correct MDP model defined for a decision space that includes stalling is Bayes-Nash incentive compatible. Proof. We establish this result by demonstrating that the expected value of the payment by agent i in the online VCG mechanism is the same as in the delayed VCG mechanism, when other agents report their true types and for any reported type of agent i. This proves incentive-compatibility, because the policy in this online VCG mechanism is exactly that in the delayed VCG mechanism (and so an agent’s value from decisions is the same), and with identical expected payments the equilibrium follows from the truthful equilibrium of the delayed mechanism. The first term in the payment (see Equation 2) is Ri ≤mi(ˆθi, θ−i; π∗) and has the same value as the first term, Ri ≤T (ˆθi, θ−i; π∗), in the payment in the delayed mechanism (see Equation 1). Now, consider the discount term in Equation 2, and rewrite this as: V ∗(hˆai(ˆθi, θ−i; π∗)) + Rˆai(θ−i; π∗) −V ∗(hˆai(θ−i; π∗)) −Rˆai(θ−i; π∗) (3) The expected value of the left-hand pair of terms in Equation 3 is equal to V ∗(hˆai(ˆθi, θ−i; π∗)) + Rˆai(ˆθi, θ−i; π∗) because agent i’s announced type has no effect on the reward before its arrival. Applying Lemma 1, the expected value of these terms is constant and equal to the expected value of V ∗(ht′(ˆθi, θ−i; π∗)) + Rt′(ˆθi, θ−i; π∗) for all t′ ≥ai (with the expectation taken wrt history hai available to agent i in its true arrival period.) Moreover, taking t′ to be the final period, T, this is also equal to the expected value of R≤T (ˆθi, θ−i; π∗), which is the expected value of the first term of the discount in the payment in the delayed VCG mechanism. Similarly, the (negated) expected value of the right-hand pair of terms in Equation 3 is constant, and equals V ∗(ht′(θ−i; π∗)) + Rt′(θ−i; π∗) for all t′ ≥ai. Again, taking t′ to be the final period T this is also equal to the expected value of R≤T (θ−i; π∗), which is the expected value of the second term of the discount in the payment in the delayed VCG mechanism. ⊓⊔ We have demonstrated that although an agent can systematically reduce the expected value of each of the first and second terms in the discount in its payment (Equation 2) by delaying its arrival, these effects exactly cancel each other out. Note that it also remains important for incentive-compatibility on the online VCG mechanism that the policy allows stalling. The online VCG mechanism shares the properties of allocative efficiency and budget-balance with the delayed VCG mechanism (under the same conditions). The online VCG mechanism is ex post individual-rational so that an agent’s expected utility is always non-negative, a slightly stronger condition that for the delayed VCG mechanism. The expected utility to agent i is V ∗(hai) −V ∗(hai \ i) and non-negative because of the value-monotonicity property of MDPs. The online VCG mechanism also suggests the possibility of new computational speed-ups. The payment to an agent only requires computing the optimal-MDP value without the agent in the state in which it arrives, while the delayed VCG payment requires computing the sequence of decisions that the optimal policy would have made in the counterfactual world without the presence of each agent. 5 Discussion We described a direct-revelation mechanism for a general sequential decision making setting with uncertainty. In the Bayes-Nash equilibrium each agent truthfully reveals its private type information, and immediately upon arrival. The mechanism induces an MDP, and implements the sequence of decisions that maximize the expected total value across all agents. There are two important directions in which to take this preliminary work. First, we must deal with the fact that for most real applications the MDP that will need to be solved to compute the decision and payment policies will be too big to be solved exactly. We will explore methods for solving large-scale MDPs approximately, and consider the consequences for incentive-compatibility. Second, we must deal with the fact that the mechanism will often have at best an incomplete and inaccurate knowledge of the distributions on agent-types. We will explore the interaction between models of learning and incentives, and consider the problem of adaptive online mechanisms. Acknowledgments This work is supported in part by NSF grant IIS-0238147. References [1] Matthew O. Jackson. Mechanism theory. In The Encyclopedia of Life Support Systems. EOLSS Publishers, 2000. [2] Eric Friedman and David C. Parkes. Pricing WiFi at Starbucks– Issues in online mechanism design. Short paper, In Fourth ACM Conf. on Electronic Commerce (EC’03), 240–241, 2003. [3] Ron Lavi and Noam Nisan. Competitive analysis of incentive compatible on-line auctions. In Proc. 2nd ACM Conf. on Electronic Commerce (EC-00), 2000. [4] Avrim Blum, Vijar Kumar, Atri Rudra, and Felix Wu. Online learning in online auctions. In Proceedings of the 14th Annual ACM-SIAM symposium on Discrete algorithms, 2003. [5] Baruch Awerbuch, Yossi Azar, and Adam Meyerson. Reducing truth-telling online mechanisms to online optimization. In Proc. ACM Symposium on Theory of Computing (STOC’03), 2003. [6] M. L. Puterman. Markov decision processes : discrete stochastic dynamic programming. John Wiley & Sons, New York, 1994.
2003
167
2,384
Probabilistic Inference of Speech Signals from Phaseless Spectrograms Kannan Achan, Sam T. Roweis, Brendan J. Frey Machine Learning Group University of Toronto Abstract Many techniques for complex speech processing such as denoising and deconvolution, time/frequency warping, multiple speaker separation, and multiple microphone analysis operate on sequences of short-time power spectra (spectrograms), a representation which is often well-suited to these tasks. However, a significant problem with algorithms that manipulate spectrograms is that the output spectrogram does not include a phase component, which is needed to create a time-domain signal that has good perceptual quality. Here we describe a generative model of time-domain speech signals and their spectrograms, and show how an efficient optimizer can be used to find the maximum a posteriori speech signal, given the spectrogram. In contrast to techniques that alternate between estimating the phase and a spectrally-consistent signal, our technique directly infers the speech signal, thus jointly optimizing the phase and a spectrally-consistent signal. We compare our technique with a standard method using signal-to-noise ratios, but we also provide audio files on the web for the purpose of demonstrating the improvement in perceptual quality that our technique offers. 1 Introduction Working with a time-frequency representation of speech can have many advantages over processing the raw amplitude samples of the signal directly. Much of the structure in speech and other audio signals manifests itself through simultaneous common onset, offset or co-modulation of energy in multiple frequency bands, as harmonics or as coloured noise bursts. Furthermore, there are many important high-level operations which are much easier to perform in a short-time multiband spectral representation than on the time domain signal. For example, time-scale modification algorithms attempt to lengthen or shorten a signal without affecting its frequency content. The main idea is to upsample or downsample the spectrogram of the signal along the time axis while leaving the frequency axis unwarped. Source separation or denoising algorithms often work by identifying certain time-frequency regions as having high signal-to-noise or as belonging to the source of interest and “masking-out” others. This masking operation is very natural in the time-frequency domain. Of course, there are many clever and efficient speech processing algorithms for pitch tracking[6], denoising[7], and even timescale modification[4] that do operate directly on the signal samples, but the spectral domain certainly has its advantages. M1 M2 M3 s 1 s n/2 s n/2 +1 s n s s 3n/2 s 3n/2 +1 s 2n s N n+1 Figure 1: In the generative model, the spectrogram is obtained by taking overlapping windows of length n from the time-domain speech signal, and computing the energy spectrum. In order to reap the benefits of working with a spectrogram of the audio, it is often important to “invert” the spectral representation back into a time domain signal which is consistent with a new time-frequency representation we obtain after processing. For example, we may mask out certain cells in the spectrogram after determining that they represent energy from noise signals, or we may drop columns of the spectrogram to modify the timescale. How do we recover the denoised or sped up speech signal? In this paper we study this inversion and present an efficient algorithm for recovering signals from their overlapping short-time spectral magnitudes using maximum a posteriori inference in a simple probability model. This is essentially a problem of phase recovery, although with the important constraint that overlapping analysis windows must agree with each other about their estimates of the underlying waveform. The standard approach, exemplified by the classic paper of Griffin and Lim [1], is to alternate between estimating the time domain signal given a current estimate of the phase and the observed spectrogram, and estimating the phase given the hypothesized signal and the observed spectrogram. Unfortunately, at any iteration, this technique maintains inconsistent estimates of the signal and the phase. Our algorithm maximizes the a posteriori probability of the estimated speech signal by adjusting the estimated signal samples directly, thus avoiding inconsistent phase estimates. At each step of iterative optimization, the method is guaranteed to reduce the discrepancy between the observed spectrogram and the spectrogram of the estimated waveform. Further, by jointly optimizing all samples simultaneously, the method can make global changes in the waveform, so as to better match all short-time spectral magnitudes. 2 A Generative Model of Speech Signals and Spectrograms An advantage of viewing phase recovery as a problem of probabilistic inference of the speech signal is that a prior distribution over time-domain speech signals can be used to improve performance. For example, if the identity of the speaker that produced the spectrogram is known, a speaker-specific speech model can be used to obtain a higher-quality reconstruction of the time-domain signal. However, it is important to point out that when prior knowledge of the speaker is not available, our technique works well using a uniform prior. For a time-domain signal with N samples, let s be a column vector containing samples s1, . . . , sN. We define the spectrogram of a signal as the magnitude of its windowed shorttime Fourier transform. Let M = {m1, m2, m3....} denote the spectrogram of s; mk is the magnitude spectrum of the kth window and mf k is the magnitude of the f th frequency component. Further, let n be the width of the window used to obtain the short-time transform. We assume the windows are spaced at intervals of n/2, although this assumption is easy to relax. In this setup, shown in Fig. 1, a particular time-domain sample st contributes to exactly two windows in the spectrogram. The joint distribution over the speech signal s and the spectrogram M is P(s, M) = P(s)P(M|s). (1) We use an Rth-order autoregressive model for the prior distribution over time-domain speech signals: P(s) ∝ N Y t=1 exp  −1 2ρ2 R X r=1 arst−r −st 2 . (2) In this model, each sample is predicted to be a linear combination of the r previous samples. The autoregressive model can be estimated beforehand, using training data for a specific speaker or a general class of speakers. Although this model is overly simple for general speech signals, it is useful for avoiding discontinuities introduced at window boundaries by mis-matched phase components in neighboring frames. To avoid artifacts at frame boundaries, the variance of the prior can be set to low values at frame boundaries, enabling the prior to “pave over” the artifacts. Assuming that the observed spectrogram is equal to the spectrogram of the hidden speech signal, plus independent Gaussian noise, the likelihood can be written P(M|s) ∝ Y k exp  −1 2σ2 || ˆmk(s) −mk||2 (3) where σ2 is the noise in the observed spectra, and ˆmk(s) is the magnitude spectrum given by the appropriate window of the estimated speech signal, s. Note that the magnitude spectra are independent given the time domain signal. The likelihood in (3) favors configurations of s that match the observed spectrogram, while the prior in (2) places more weight on configurations that match the autoregressive model. 2.1 Making the speech signal explicit in the model We can simplify the functional form ˆmk(s), by introducing the n×n Fourier transform matrix, F. Let sk be an n-vector containing the samples from the kth window. Using the fact that the magnitude of a complex number c is cc∗, where ∗denotes complex conjugation, we have ˆmk(s) = (Fsk) ◦(Fsk)∗= (Fsk) ◦(F∗sk), where ◦indicates element-wise product. The joint distribution in (1) can now be written P(s, M) ∝ Y k exp  −1 2σ2 ||(Fsk)◦(F∗sk)−mk||2 Y t exp  −1 2ρ2 ( R X r=1 arst−r −st)2 . (4) The factorization of the distribution in (4) can be used to construct the factor graph shown in Fig. 2. For clarity, we have used a 3rd order autoregressive model and a window length of 4. In this graphical model, function nodes are represented by black disks and each function node corresponds to a term in the joint distribution. There is one function node connecting each observed short-time energy spectrum to the set of n time-domain samples from which it was possibly derived, and one function node connecting each time-domain sample to its R predecessors in the autoregressive model. Taking the logarithm of the joint distribution in (4) and expanding the norm, we obtain log P(s, M) ∝− 1 2σ2 X k X i  n X j=1 n X l=1 FijF ∗ ilsnk−n/2+jsnk−n/2+l −mki 2 − 1 2ρ2 X t  R X r=1 arst−r −st 2 . (5) S 4 S 5 S 6 S N S 2 S 3 g 3 g 1 g 2 g 4 g N−2 f 1 f 2 f L S 1 M 1 M 2 M L Figure 2: Factor graph for the model in (4) using a 3rd order autoregressive model, window length of 4 and an overlap of 2 samples. Function nodes fi enforce the constraint that the spectrogram of s match the observed spectrogram and function nodes gi enforce the constraint due to the AR model In this expression, k indexes frames, i indexes frequency, sk−n/2+j is the jth sample in the kth frame, mki is the observed spectral energy at frequency i in frame k, and ar is the rth autoregressive coefficient. The log-probability is quartic in the unknown speech samples, s1, . . . , sN. For simplicity of presentation above, we implicitly assumed a rectangular window for computing the spectrogram. The extension to other types of windowing functions is straightforward. In the experiments described below, we have used a Hamming window, and adjusted the equations appropriately. 3 Inference Algorithms The goal of probabilistic inference is to compute the posterior distribution over speech waveforms and output a typical sample or a mode of the posterior as an estimate of the reconstructed speech signal. To find a mode of the posterior, we have explored the use of iterative conditional modes (ICM) [8], Markov chain Monte Carlo methods [9], variational techniques [10], and direct application of numerical optimization methods for finding the maximum a posteriori speech signal. In this paper, we report results on two of the faster techniques, ICM and direct optimization. ICM operates by iteratively selecting a variable and assigning the MAP estimate to the variable while keeping all other variables fixed. This technique is guaranteed to increase the joint probability of the speech waveform and the observed spectrum, at each step. At every stage we set st to its most probable value, given the other speech samples and the observed spectrogram: s∗ t = argmaxstP(st|M, s \ st) = argmaxstP(s, M). This value can be found by extracting the terms in (5) that depend on st and optimizing the resulting quartic equation with complex coefficients. To select an initial configuration of s, we applied an inverse Fourier transform to the observed magnitude spectra M, assuming a random phase. As will become evident in the experimental section of this paper, by updating only a single sample at a time, ICM is prone to finding poor local minima. We also implemented an inference algorithm that directly searches for a maximum of log P(s, M) w.r.t. s, using conjugate gradients. The same derivatives used to find the ICM updates were used in a conjugate gradient optimizer, which is capable of finding search directions in the vector space s, and jointly adjusting all speech samples simultaneously. We 0 2 4 Time (seconds) 0 2 4 Time (seconds) 0 2 4 Time (seconds) Frequency (kHz) 0 4 8 Figure 3: Reconstruction results for an utterance from the WSJ database. (left) Original signal and the corresponding spectrogram. (middle) Reconstruction using algorithm in [1]. The spectrogram of the reconstruction fails to capture the finer details in the original signal. (right) Reconstruction using our algorithm. The spectrogram captures most of the fine details in the original signal. initialized the conjugate gradient optimizer using the same procedure as described above for ICM. 4 Experiments We tested our algorithm using several randomly chosen utterances from the Wall street journal corpus and the NIST TIMIT corpus. For all experiments we used a (Hamming) window of length 256 and with an overlap of 128 samples. Where possible, we trained a 12th order AR model of the speaker using an utterance different from the one used to create the spectrogram. For convergence to a good local minima, it is important to down weight the contribution of the AR-model for the first several iterations of conjugate gradient optimization. In fact we ran the algorithm without the AR model until convergence and then started the AR model with a weighting factor of 10. This way, the AR model operates on the signal with very little error in the estimated spectrogram. Along the frame boundaries, the variance of the prior (AR model) was set to a small value to smooth down spikes that are not very probable apriori. Further, we also tried using a cubic spline smoother along the boundaries as a post processing step for better sound quality. 4.1 Evaluation The quality of sound in the estimated signal is an important factor in determining the effectiveness of the algorithm. To demonstrate improvement in the perceptual quality of sound we have placed audio files on the web; for demonstrations please check, http://www.psi.toronto.edu/∼kannan/spectrogram. Our algorithm consistently outperformed the algorithm proposed in [1] both in terms of sound quality and in matching the observed spectrogram . Fig. 3 shows reconstruction result for an utterance from WSJ data. As expected, ICM typically converged to a poor local minima in a few iterations. In Fig. 4, a plot of the log probability as a function of number of iterations is shown for ICM and our approach. Algorithm dB gain (dB) Griffin and Lim [1] 4.508 Our approach 7.900 (without AR model) Our approach 8.172 (12th order AR model) 0 10 20 30 40 50 60 70 80 90 100 −11 −10 −9 −8 −7 −6 −5 −4 −3 iteration log P ICM CG Figure 4: SNR for different algorithms. Values reported are averages over 12 different utterances. The graph on the right compares the log probability under ICM to our algorithm Analysis of signal to noise ratio of the true and estimated signal can be used to measure the quality of the estimated signal, with high dB gain indicating good reconstruction. As the input to our model does not include a phase component, we cannot measure SNR by comparing the recovered signal to any true time domain signal. Instead, we define the following approximation SNR∗= X u 10 log 1 Eu P w P f |su,w(f)|2 P w P f ( 1 ˆ Eu |ˆsu,w(f)| − 1 Eu |su,w(f)|)2 (6) where Eu = P t s2 t is the total energy in utterance u. Summations over u, w and f are over all utterances, windows and frequencies respectively. The table in Fig. 4 reports dB gain averaged over several utterances for [1] and our algorithm with and without an AR model.The gains for our algorithm are significantly better than for the algorithm of Griffin and Lim. Moving the summation over w in (6) outside the log produces similar quality estimates. 4.2 Time Scale Modification As an example to show the potential utility of spectrogram inversion, we investigated an extremely simple approach to time scale modification of speech signals. Starting from the original signal we form the spectrogram (or else we may start with the spectrogram directly), and upsample or downsample it along the time axis. (For example, to speed up the speech by a factor of two we can discard every second column of the spectrogram.) In spite of the fact that this approach does not use any phase information from the original signal, it produces results with good perceptual sound quality. (Audio demonstrations are available on the web site given earlier.) 5 Variational Inference The framework described so far focuses on obtaining fixed point estimates for the time domain signal by maximizing the joint log probability of the model in (5). A more important and potentially useful task is to find the posterior probability distribution P(s|M). As exact inference of P(s|M) is intractable, we approximate it using a fully factored distribution Q(s) where, Q(s) = Y i qi(si) (7) Here we assume qi(si) ∼N(µi, ηi). The goal of variational approximation is to infer the parameters {µi, ηi}, ∀i by minimizing the KL divergence between the approximating Q distribution and the true posterior P(s|M). This is equivalent to minimizing, D = X s Q(s) log Q(s) P(s, M) = X s ( Y i qi(si)) log (Q i qi(si)) P(s, M) = − X i H(qi) −EQ(log P(s, M)) (8) The entropy term H(qi) is easy to compute; log P(s, M) is a quartic in the random variable si and the second term involves computing the expectation of it with respect to the Q distribution. Simplifying and rearranging terms we get, D = − X i H(qi) −  n X j=1 n X l=1 FijF ∗ ilµnk−n/2+jµnk−n/2+l −mki 2 + X i η2 i Gi(µ, η) (9) Gi(µ, η) accounts for uncertainty in s. Estimates with high uncertainty (η) will tend to have very little influence on other estimates during the optimization. Another interesting aspect of this formulation is that by setting η = 0, the first and third terms in (9) vanish and D takes a form similar to (5). In other words, in the absence of uncertainty we are in essence finding fixed point estimates for s. 6 Conclusion In this paper, we have introduced a simple probabilistic model of noisy spectrograms in which the samples of the unknown time domain signal are represented directly as hidden variables. But using a continuous gradient optimizer on these quantities, we are able to accurately estimate the full speech signal from only the short time spectral magnitudes taken in overlapping windows. Our algorithm’s reconstructions are substantially better, both in terms of informal perceptual quality and measured signal to noise ratio, than the standard approach of Griffin and Lim[1]. Furthermore, in our setting, it is easy to incorporate an a-priori model of gross speech structure in the form of an AR-model, whose influence on the reconstruction is user-tunable. Spectrogram inversion has many potential applications; as an example we have demonstrated an extremely simple but nonetheless effective time scale modification algorithm which subsamples the spectrogram of the original utterance and then inverts. In addition to improved experimental results, our approach highlights two important lessons from the point of view of statistical signal processing algorithms. The first is that directly representing quantities of interest and making inferences about them using the machinery of probabilistic inference is a powerful approach that can avoid the pitfalls of less principled iterative algorithms that maintain inconsistent estimates of redundant quantities, such as phase and time-domain signals. The second is that coordinate descent optimization (ICM) does not always yield the best results in problems with highly dependent hidden variables. It is often tacitly assumed in the graphical models community, that the more structured an approximation one can make when updating blocks of parameters simultaneously, the better. In other words, practitioners often try to solve for as more variables as possible conditioned on quantities that have just been updated. Our experience in this model has shown that direct continuous optimization using gradient techniques allows all quantities to adjust simultaneously and ultimately finds far superior solutions. Because of its probabilistic nature, our model can easily be extended to include other pieces of prior information, or to deal with missing or noisy spectrogram frames. This opens the door to unified phase recovery and denoising algorithms, and to the possibility of performing sophisticated speech separation or denoising inside the pipeline of a standard speech recognition system, in which typically only short time spectral magnitudes are available. Acknowledgments We thank Carl Rasmussen for his conjugate gradient optimizer. KA, STR and BJF are supported in part by the Natural Sciences and Engineering Research Council of Canada. BJF and STR are supported in part by the Ontario Premier’s Research Excellence Award. STR is supported in part by the Learning Project of IRIS Canada. References [1] Griffin, D. W and Lim, J. S Signal estimation from modified short time Fourier transform In IEEE Transactions on Acoustics, Speech and Signal Processing, 1984 32/2 [2] Kschischang, F. R., Frey, B. J. and Loeliger, H. A. Probability propagation and iterative decoding.Factor graphs and the sum-product algorithm In IEEE Transactions on Information Theory, 2001 47 [3] Fletcher, R Practical methods of optimization . John Wiley & Sons, 1987. [4] Roucos, S. and A. M. Wilgus. High Quality Time-Scale Modification for Speech. In Proceedings of the International Conference on Acoustics, Speech, and Signal Processing, IEEE, 1985, 493-496. [5] Rabiner, L. and Juang, B. Fundamentals of Speech Recognition. Prentice Hall, 1993 [6] L. K. Saul, D. D. Lee, C. L. Isbell, and Y. LeCun Real time voice processing with audiovisual feedback: toward autonomous agents with perfect pitch. in S. Becker, S. Thrun, and K. Obermayer (eds.), Advances in Neural Information Processing Systems 15. MIT Press: Cambridge, MA, 2003 [7] Eric A. Wan and Alex T. Nelson Removal of noise from speech using the dual EKF algorithm in Proceedings of the International Conference on Acoustics, Speech, and Signal Processing (ICASSP), IEEE, May, 1998 [8] Besag, J On the statistical analysis of dirty pictures Journal of the Royal Statistical Society B vol.48, pg 259–302, 1986 [9] Neal, R. M, Probabilistic inference using Markov chain Monte Carlo Methods, University of Toronto Technical Report 1993 [10] M. I. Jordan and Z. Ghahramani and T. S. Jaakkola and L. K. Saul An introduction to variational methods for graphical models Learning in Graphical Models, edited by M. I. Jordan, Kluwer Academic Publishers, Norwell MA., 1998.
2003
168
2,385
Denoising and untangling graphs using degree priors Quaid D Morris, Brendan J Frey, and Christopher J Paige University of Toronto Electrical and Computer Engineering 10 King’s College Road, Toronto, Ontario, M5S 3G4 Canada {quaid, frey}@psi.utoronto.ca, paige@uhnres.utoronto.ca Abstract This paper addresses the problem of untangling hidden graphs from a set of noisy detections of undirected edges. We present a model of the generation of the observed graph that includes degree-based structure priors on the hidden graphs. Exact inference in the model is intractable; we present an efficient approximate inference algorithm to compute edge appearance posteriors. We evaluate our model and algorithm on a biological graph inference problem. 1 Introduction and motivation The inference of hidden graphs from noisy edge appearance data is an important problem with obvious practical application. For example, biologists are currently building networks of all the physical protein-protein interactions (PPI) that occur in particular organisms. The importance of this enterprise is commensurate with its scale: a completed network would be as valuable as a completed genome sequence, and because each organism contains thousands of different types of proteins, there are millions of possible types of interactions. However, scalable experimental methods for detecting interactions are noisy, generating many false detections. Motivated by this application, we formulate the general problem of inferring hidden graphs as probabilistic inference in a graphical model, and we introduce an efficient algorithm that approximates the posterior probability that an edge is present. In our model, a set of hidden, constituent graphs are combined to generate the observed graph. Each hidden graph is independently sampled from a prior on graph structure. The combination mechanism acts independently on each edge but can be either stochastic or deterministic. Figure 1 shows an example of our generative model. Typically one of the hidden graphs represents the graph of interest (the true graph), the others represent different types of observation noise. Independent edge noise may also be added by the combination mechanism. We use probabilistic inference to compute a likely decomposition of the observed graph into its constituent parts. This process is deemed “untangling”. We use the term “denoising” to refer to the special case where the edge noise is independent. In denoising there is a single hidden graph, the true graph, and all edge noise in the observed graph is due X ijx j i 2 E 2 ije j i j i 1 ije 1 E Figure 1: Illustrative generative model example. Figure shows an example where an observed graph, X, is a noisy composition of two constituent graphs, E1 and E2. All graphs share the same vertex set, so each can be represented by a symmetric matrix of random binary variables (i.e., an adjacency matrix). This generative model is designed to solve a toy counter-espionage problem. The vertices represent suspects and each edge in X represents an observed call between two suspects. The graph X reflects zero or more spy rings (represented by E 1), telemarketing calls (represented by E2), social calls (independent edge noise), and lost call records (more independent edge noise). The task is to locate any spy rings hidden in X. We model the distribution of spy ring graphs using a prior, P(E1), that has support only on graphs where all vertices have degree of either 2 (i.e., are in the ring) or 0 (i.e., are not). Graphs of telemarketing call patterns are represented using a prior, P(E2), under which all nodes have degrees of > 3 (i.e., are telemarketers), 1 (i.e., are telemarketees), or 0 (i.e., are neither). The displayed hidden graphs are one likely untangling of X. to the combination mechanism. Prior distributions over graphs can be specified in various ways, but our choice is motivated by problems we want to solve, and by a view to deriving an efficient inference algorithm. One compact representation of a distribution over graphs consists of specifying a distribution over vertex degrees, and assuming that graphs that have the same vertex degrees are equiprobable. Such a prior can model quite rich distributions over graphs. These degree-based structure priors are natural representions of graph structure; many classes of real-world networks have a characteristic functional form associated with their degree distributions [1], and sometimes this form can be predicted using knowledge about the domain (see, e.g., [2]) or detected empirically (see, e.g., [3, 4]). As such, our model incorporates degree-based structure priors. Though exact inference in our model is intractable in general, we present an efficient algorithm for approximate inference for arbitrary degree distributions. We evaluate our model and algorithm using the real-world example of untangling yeast proteinprotein interaction networks. 2 A model of noisy and tangled graphs For degree-based structure priors, inference consists of searching over vertex degrees and edge instantiations, while comparing each edge with its noisy observation and enforcing the constraint that the number of edges connected to every vertex must equal the degree of the vertex. Our formulation of the problem in this way is inspired by the success of the sum-product algorithm (loopy belief propagation) for solving similar formulations of problems in error-correcting decoding [6, 7], phase unwrapping [8], and random satisfiability [9]. For example, in error-correcting decoding, inference consists of searching over configurations of codeword bits, while comparing each bit with its noisy observation and enforcing parity-check constraints on subsets of bits [10]. For a graph on a set of N vertices, eij is a variable that indicates the presence of an edge connecting vertices i and j: eij = 1 if there is an edge, and eij = 0 otherwise. We assume the vertex set is fixed, so each graph is specified by an adjacency matrix, E = {eij}N i,j=1. The degree of vertex i is denoted by di and the degree set by D = {di}N i=1. The observations are given by a noisy adjacency matrix, X = {xij}N i,j=1. Generally, edges can be directed, but in this paper we focus on undirected graphs, so eij = eji and xij = xji. Assuming the observation noise is independent for different edges, the joint distribution is P(X, E, D) = P(X|E)P(E, D) = ³Y j≥i P(xij|eij) ´ P(E, D). P(xij|eij) models the edge observation noise. We use an undirected model for the joint distribution over edges and degrees, P(E, D), where the prior distribution over di is determined by a non-negative potential fi(di). Assuming graphs that have the same vertex degrees are equiprobable, we have P(E, D) ∝ Y i ³ fi(di)I(di, N X j=1 eij) ´ , where I(a, b) = 1 if a = b, and I(a, b) = 0 if a ̸= b. The term I(di, P j eij) ensures that the number of edges connected to vertex i is equal to di. It is straightforward to show that the marginal distribution over di is P(di) ∝ fi(di) P D\di ¡ nD Q j̸=i fj(dj) ¢ , where nD is the number of graphs with degrees D and the sum is over all degree variables except di. The potentials, fi, can be estimated from a given degree prior using Markov chain Monte Carlo; or, as an approximation, they can be set to an empirical degree distribution obtained from noise-free graphs. Fig 2a shows the factor graph [11] for the above model. Each filled square corresponds to a term in the factorization of the joint distribution and the square is connected to all variables on which the term depends. Factor graphs are graphical models that unify the properties of Bayesian networks and Markov random fields [12]. Many inference algorithms, including the sum-product algorithm (a.k.a. loopy belief propagation), are more easily derived using factor graphs than Bayesian networks or Markov random fields. We describe the sum-product algorithm for our model in section 3. e44 x44 P( | ) d4 e14 e24 e34 e44 I( , + + + ) d3 d2 d1 x11 x12 x14 x22 x23 x13 x24 x33 x34 x44 e11 e12 e14 e22 e23 e13 d4 4 f ( ) d4 e24 e33 e34 e44 (a) x11 x12 x14 x22 x23 x13 x24 x33 x34 x44 2 4 1 3 1 1 1 1 1 1 1 1 1 1 11 12 13 14 22 23 24 33 34 44 d d d d1 1 1 1 e e e e e e e e e e 11 12 13 14 22 23 24 33 34 44 e e e e e e e e e e 2 2 2 2 2 2 2 2 2 2 2 4 1 3 d d d d2 2 2 2 e44 e44 x44 1 2 P( | , ) (b) e24 e34 e44 e14 e14 e24 e34 e44 s41 s42 s43 s44 d4 (c) d4 Figure 2: (a) A factor graph that describes a distribution over graphs with vertex degrees di, binary edge indicator variables eij, and noisy edge observations xij. The indicator function I(di, P j eij) enforces the constraint that the sum of the binary edge indicator variables for vertex i must equal the degree of vertex i. (b) A factor graph that explains noisy observed edges as a combination of two constituent graphs, with edge indicator variables e1 ij and e2 ij. (c) The constraint I(di, P j eij) can be implemented using a chain with state variables, which leads to an exponentially faster message-passing algorithm. 2.1 Combining multiple graphs The above model is suitable when we want to infer a graph that matches a degree prior, assuming the edge observation noise is independent. A more challenging goal, with practical application, is to infer multiple hidden graphs that combine to explain the observed edge data. In section 4, we show how priors over multiple hidden graphs can be be used to infer protein-protein interactions. When there are H hidden graphs, each constituent graph is specified by a set of edges on the same set of N common vertices. For the degree variables and edge variables, we use a superscript to indicate which hidden graph the variable is used to describe. Assuming the graphs are independent, the joint distribution over the observed edge data X, and the edge variables and degree variables for the hidden graphs, E1, D1, . . . , EH, DH, is P(X, E1, D1, . . . , EH, DH) = ³Y j≥i P(xij|e1 ij, . . . , eH ij) ´ H Y h=1 P(Eh, Dh), (1) where for each hidden graph, P(Eh, Dh) is modeled as described above. Here, the likelihood P(xij|e1 ij, . . . , eH ij) describes how the edges in the hidden graphs combine to model the observed edge. Figure 2b shows the factor graph for this model. 3 Probabilistic inference of constituent graphs Exact probabilistic inference in the above models is intractable, here we introduce an approximate inference algorithm that consists of applying the sum-product algorithm, while ignoring cycles in the factor graph. Although the sum-product algorithm has been used to obtain excellent results on several problems [6, 7, 13, 14, 8, 9], we have found that the algorithm works best when the model consists of uncertain observations of variables that are subject to a large number of hard constraints. Thus the formulation of the model described above. Conceptually, our inference algorithm is a straight-forward application of the sumproduct algorithm, c.f. [15], where messages are passed along edges in the factor graph iteratively, and then combined at variables to obtain estimates of posterior probabilities. However, direct implementation of the message-passing updates will lead to an intractable algorithm. In particular, direct implementation of the update for the message sent from function I(di, P j eij) to edge variable eik takes a number of scalar operations that is exponential in the number of vertices. Fortunately there exists a more efficient way to compute these messages. 3.1 Efficiently summing over edge configurations The function I(di, P j eij) ensures that the number of edges connected to vertex i is equal to di. Passing messages through this function requires summing over all edge configurations that correspond to each possible degree, di, and summing over di. Specifically, the message, µIi→eik(eik), sent from function I(di, P j eij) to edge variable eik is given by X di X {eij| j=1,...,N, j̸=k} ³ I(di, X j eij) Y j̸=k µeij→Ii(eij) ´ , where µeij→Ii(eij) is the message sent from eij to function I(di, P j eij). The sum over {eij| j = 1, . . . , N, j ̸= k} contains 2N−1 terms, so direct computation is intractable. However, for a maximum degree of dmax, all messages departing from the function I(di, P j eij) can be computed using order dmaxN binary scalar operations, by introducing integer state variables sij. We define sij = P n≤j ein and note that, by recursion, sij = sij−1 + eij, where si0 = 0 and 0 ≤sij ≤dmax. This recursive expression enables us to write the high-complexity constraint as the sum of a product of low-complexity constraints, I(di, X j eij) = X {sij| j=1,...,N} I(si1, ei1) ³ N Y j=2 I(sij, sij−1 + eij) ´ I(di, siN). This summation can be performed using the forward-backward algorithm. In the factor graph, the summation can be implemented by replacing the function I(di, P j eij) with a chain of lower-complexity functions, connected as shown in Fig. 2c. The function vertex (filled square) on the far left corresponds to I(si1, ei1) and the function vertex in the upper right corresponds to I(di, siN). So, messages can be passed through each constraint function I(di, P j eij) in an efficient manner, by performing a single forward-backward pass in the corresponding chain. 4 Results We evaluate our model using yeast protein-protein interaction (PPI) data compiled by [16]. These data include eight sets of putative, but noisy, interactions derived from various sources, and one gold-standard set of interactions detected by reliable experiments. Using the ∼6300 yeast proteins as vertices, we represent the eight sets of putative interactions using adjacency matrices {Y m}8 m=1 where ym ij = 1 if and only if putative interaction dataset m contains an interaction between proteins i and j. We similarly use Y gold to represent the gold-standard interactions. We construct an observed graph, X, by setting xij = maxm ym ij for all i and j, thus the observed edge set is the union of all the putative edge sets. We test our model 0 5 10 0 10 20 30 40 50 false positives (%) true positives (%) (a) untangling baseline random 0 10 20 30 −10 −8 −6 −4 −2 0 degree (# of nodes) log Pr (b) empirical potential posterior Figure 3: Protein-protein interaction network untangling results. (a) ROC curves measuring performance of predicting e1 ij when xij = 1. (b) Degree distributions. Compares the empirical degree distribution of the test set subgraph of E1 to the degree potential f 1 estimated on the training set subgraph of E1 and to the distribution of di = P j pij where pij = ˆP(e1 ij = 1|X) is estimated by untangling. on the task of discerning which of the edges in X are also in Y gold. We formalize this problem as that of decomposing X into two constituent graphs E1 and E2, the true and the noise graphs respectively, such that e1 ij = xijygold ij and e2 ij = xij −e1 ij. We use a training set to fit our model parameters and then measure task performance on a test set. The training set contains a randomly selected half of the ∼6300 yeast proteins, and the subgraphs of E1, E2, and X restricted to those vertices. The test contains the other half of the proteins and the corresponding subgraphs. Note that interactions connecting test set proteins to training set proteins (and vice versa) are ignored. We fit three sets of parameters: a set of Naive Bayes parameters that define a set of edge-specific likelihood functions, Pij(xij|e1 ij, e2 ij), one degree potential, f 1, which is the same for every vertex in E1 and defines the prior P(E1), and a second, f 2, that similarly defines the prior P(E2). The likelihood functions, Pij, are used to both assign likelihoods and enforce problem constraints. Given our problem definition, if xij = 0 then e1 ij = e2 ij = 0, otherwise xij = 1 and e1 ij = 1 −e2 ij. We enforce the former constraint by setting Pij(xij = 0|e1 ij, e2 ij) = (1 −e1 ij)(1 −e2 ij), and the latter by setting Pij(xij = 1|e1 ij, e2 ij) = 0 whenever e1 ij = e2 ij. This construction of Pij simplifies the calculation of the µPij→eh ij messages and improves the computational efficiency of inference because when xij = 0, we need never update messages to and from variables e1 ij and e2 ij. We complete the specification of Pij(xij = 1|e1 ij, e2 ij) as follows: Pij(xij = 1|e1 ij, e2 ij) = ( θ ym ij m (1 −θm)1−ym ij , if e1 ij = 1 and e2 ij = 0, ψ ym ij m (1 −ψm)1−ym ij , if e1 ij = 0 and e2 ij = 1. where {θm} and {ψm} are naive Bayes parameters, θm = P i,j ym ij e1 ij/ P i,j e1 ij and ψm = P i,j ym ij e2 ij/ P i,j e2 ij, respectively. The degree potentials f 1(d) and f 2(d) are kernel density estimates fit to the degree distribution of the training set subgraphs of E1 and E2, respectively. We use Gaussian kernels and set the width parameter (standard deviation) σ using leaveone-out cross-validation to maximize the total log density of the held-out datapoints. Each datapoint is the degree of a single vertex. Both degree potentials closely followed the training set empirical degree distributions. Untangling was done on the test set subgraph of X. We initially set the µPij→e1 ij messages equal to the likelihood function Pij and we randomly initialized the µI1 j →e1 ij messages with samples from a normal distribution with mean 0 and variance 0.01. We then performed 40 iterations of the following message update order: µe1 ij→I1 j , µI1 j →e1 ij, µe1 ij→Pij, µPij→e2 ij, µe2 ij→I2 j , µI2 j →e2 ij, µe2 ij→Pij, µPij→e1 ij. We evaluated our untangling algorithm using an ROC curve by comparing the actual test set subgraph of E1 to posterior marginal probabilities, ˆP(e1 ij = 1|X), estimated by our sum-product algorithm. Note that because the true interaction network is sparse (less than 0.2% of the 1.8 × 107 possible interactions are likely present [16]) and, in this case, true positive predictions are of greater biological interest than true negative predictions, we focus on low false positive rate portions of the ROC curve. Figure 3a compares the performance of a classifier for e1 ij based on thresholding ˆP(eij = 1|X) to a baseline method based on thresholding the likelihood functions, Pij(xij = 1|e1 ij = 1, e2 ij = 0). Note because e1 ij = 0 whenever xij = 0, we exclude the xij = 0 cases from our performance evaluation. The ROC curve shows that for the same low false positive rate, untangling produces 50% −100% more true positives than the baseline method. Figure 3b shows that the degree potential, the true degree distribution, and the predicted degree distribution are all comparable. The slight overprediction of the true degree distribution may result because the degree potential f 1 that defines P(E1) is not equal to the expected degree distribution of graphs sampled from the distribution P(E1). 5 Summary and Related Work Related work includes other algorithms for structure-based graph denoising [17, 18]. These algorithms use structural properties of the observed graph to score edges and rely on the true graph having a surprisingly large number of three (or four) edge cycles compared to the noise graph. In contrast, we place graph generation in a probabilistic framework; our algorithm computes structural fit in the hidden graph, where this computation is not affected by the noise graph(s); and we allow for multiple sources of observation noise, each with its own structural properties. After submitting this paper to the NIPS conference, we discovered [19], in which a degree-based graph structure prior is used to denoise (but not untangle) observed graphs. This paper addresses denoising in directed graphs as well as undirected graphs, however, the prior that they use is not amenable to deriving an efficient sumproduct algorithm. Instead, they use Markov Chain Monte Carlo to do approximate inference in a hidden graph containing 40 vertices. It is not clear how well this approach scales to the ∼3000 vertex graphs that we are using. In summary, the contributions of the work described in this paper include: a general formulation of the problem of graph untangling as inference in a factor graph; an efficient approximate inference algorithm for a rich class of degree-based structure priors; and a set of reliability scores (i.e., edge posteriors) for interactions from a current version of the yeast protein-protein interaction network. References [1] A L Barabasi and R Albert. Emergence of scaling in random networks. Science, 286(5439), October 1999. [2] A Rzhetsky and S M Gomez. Birth of scale-free molecular networks and the number of distinct dna and protein domains per genome. Bioinformatics, pages 988–96, 2001. [3] M Faloutsos, P Faloutsos, and C Faloutsos. On power-law relationships of the Internet topology. Computer Communications Review, 29, 1999. [4] Hawoong Jeong, B Tombor, R´eka Albert, Z N Oltvai, and Albert-L´aszl´o Barab´asi. The large-scale organization of metabolic networks. Nature, 407, October 2000. [5] J. Pearl. Probabilistic Reasoning in Intelligent Systems. Morgan Kaufmann, San Mateo CA., 1988. [6] D. J. C. MacKay and R. M. Neal. Near Shannon limit performance of low density parity check codes. Electronics Letters, 32(18):1645–1646, August 1996. Reprinted in Electronics Letters, vol. 33, March 1997, 457–458. [7] B. J. Frey and F. R. Kschischang. Probability propagation and iterative decoding. In Proceedings of the 1996 Allerton Conference on Communication, Control and Computing, 1996. [8] B. J. Frey, R. Koetter, and N. Petrovic. Very loopy belief propagation for unwrapping phase images. In 2001 Conference on Advances in Neural Information Processing Systems, Volume 14. MIT Press, 2002. [9] M. M´ezard, G. Parisi, and R. Zecchina. Analytic and algorithmic solution of random satisfiability problems. Science, 297:812–815, 2002. [10] B. J. Frey and D. J. C. MacKay. Trellis-constrained codes. In Proceedings of the 35th Allerton Conference on Communication, Control and Computing 1997, 1998. [11] F. R. Kschischang, B. J. Frey, and H.-A. Loeliger. Factor graphs and the sum-product algorithm. IEEE Transactions on Information Theory, Special Issue on Codes on Graphs and Iterative Algorithms, 47(2):498–519, February 2001. [12] B. J. Frey. Factor graphs: A unification of directed and undirected graphical models. University of Toronto Technical Report PSI-2003-02, 2003. [13] Kevin P. Murphy, Yair Weiss, and Michael I. Jordan. Loopy belief propagation for approximate inference: An empirical study. In Uncertainty in Artificial Intelligence 1999. Stockholm, Sweden, 1999. [14] W. Freeman and E. Pasztor. Learning low-level vision. In Proceedings of the International Conference on Computer Vision, pages 1182–1189, 1999. [15] M. I. Jordan. An Inroduction to Learning in Graphical Models. 2004. In preparation. [16] C von Mering et al. Comparative assessment of large-scale data sets of protein-protein interactions. Nature, 2002. [17] R Saito, H Suzuki, and Y Hayashizaki. Construction of reliable protein-protein interaction networks with a new interaction generality measure. Bioinformatics, pages 756–63, 2003. [18] D S Goldberg and F P Roth. Assessing experimentally derived interactions in a small world. Proceedings of the National Academy of Science, 2003. [19] S M Gomez and A Rzhetsky. Towards the prediction of complete protein–protein interaction networks. In Pacific Symposium on Biocomputing, pages 413–24, 2002.
2003
169
2,386
Semi-supervised protein classification using cluster kernels Jason Weston∗ Max Planck Institute for Biological Cybernetics, 72076 T¨ubingen, Germany weston@tuebingen.mpg.de Christina Leslie Department of Computer Science, Columbia University cleslie@cs.columbia.edu Dengyong Zhou, Andre Elisseeff Max Planck Institute for Biological Cybernetics, 72076 T¨ubingen, Germany zhou@tuebingen.mpg.de William Stafford Noble Department of Genome Sciences University of Washington noble@gs.washington.edu Abstract A key issue in supervised protein classification is the representation of input sequences of amino acids. Recent work using string kernels for protein data has achieved state-of-the-art classification performance. However, such representations are based only on labeled data — examples with known 3D structures, organized into structural classes — while in practice, unlabeled data is far more plentiful. In this work, we develop simple and scalable cluster kernel techniques for incorporating unlabeled data into the representation of protein sequences. We show that our methods greatly improve the classification performance of string kernels and outperform standard approaches for using unlabeled data, such as adding close homologs of the positive examples to the training data. We achieve equal or superior performance to previously presented cluster kernel methods while achieving far greater computational efficiency. 1 Introduction A central problem in computational biology is the classification of proteins into functional and structural classes given their amino acid sequences. The 3D structure that a protein assumes after folding largely determines its function in the cell. However, it is far easier to determine experimentally the primary sequence of a protein than it is to solve the 3D structure. Through evolution, structure is more conserved than sequence, so that detecting even very subtle sequence similarities, or remote homology, is important for predicting function. The major methods for homology detection can be split into three basic groups: pairwise sequence comparison algorithms [1, 2], generative models for protein families [3, 4], and discriminative classifiers [5, 6, 7]. Popular sequence comparison methods such as BLAST ∗Supplemental information for the paper, including the data sets and Matlab source code can be found on this author’s web page at http://www.kyb.tuebingen.mpg.de/bs/people/weston/semiprot and Smith-Waterman are based on unsupervised alignment scores. Generative models such as profile hidden Markov models (HMMs) model positive examples of a protein family, but they can be trained iteratively using both positively labeled and unlabeled examples by pulling in close homologs and adding them to the positive set. A compromise between these methods is PSI-BLAST [8], which uses BLAST to iteratively build a probabilistic profile of a query sequence and obtain a more sensitive sequence comparison score. Finally, classifiers such as SVMs use both positive and negative examples and provide state-of-theart performance when used with appropriate kernels [5, 6, 7]. However, these classifiers still require an auxiliary method (such as PSI-BLAST) to handle unlabeled data: one generally adds predicted homologs of the positive training examples to the training set before training the classifier. In practice, relatively little labeled data is available — approximately 30,000 proteins with known 3D structure, some belonging to families and superfamilies with only a handful of labeled members — whereas there are close to one million sequenced proteins, providing abundant unlabeled data. New semi-supervised learning techniques should be able to make better use of this unlabeled data. Recent work in semi-supervised learning has focused on changing the representation given to a classifier by taking into account the structure described by the unlabeled data [9, 10, 11]. These works can be viewed as cases of cluster kernels, which produce similarity metrics based on the cluster assumption: namely, two points in the same “cluster” or region of high density should have a small distance to each other. In this work, we investigate the use of cluster kernels for protein classification by developing two simple and scalable methods for modifying a base kernel. The neighborhood kernel uses averaging over a neighborhood of sequences defined by a local sequence similarity measure, and the bagged kernel uses bagged clustering of the full sequence data set to modify the base kernel. In both the semi-supervised and transductive settings, these techniques greatly improve classification performance when used with mismatch string kernels, and the techniques achieve equal or superior results to all previously presented cluster kernel methods that we tried. Moreover, the neighborhood and bagged kernel approaches are far more computationally efficient than these competing methods. 2 Representations and kernels for protein sequences Proteins can be represented as variable length sequences, typically several hundred characters long, from the alphabet of 20 amino acids. In order to use learning algorithms that require vector inputs, we must first find a suitable feature vector representation, mapping sequence x into a vector space by x 7→Φ(x). If we use kernel methods such as SVMs, which only need to compute inner products K(x, y) = ⟨Φ(x), Φ(y)⟩for training and testing, then we can accomplish the above mapping using a kernel for sequence data. Biologically motivated sequence comparison scores, like Smith-Waterman or BLAST, provide an appealing representation of sequence data. The Smith-Waterman (SW) algorithm [2] uses dynamic programming to compute the optimal local gapped alignment score between two sequences, while BLAST [1] approximates SW by computing a heuristic alignment score. Both methods return empirically estimated E-values indicating the confidence of the score. These alignment-based scores do not define a positive definite kernel; however, one can use a feature representation based on the empirical kernel map Φ(x) = ⟨d(x1, x), . . . , d(xm, x)⟩ where d(x, y) is the pairwise score (or E-value) between x and y and xi, i = 1 . . . m, are the training sequences. Using SW E-values in this fashion gives strong classification performance [7]. Note, however, that the method is slow, both because computing each SW score is O(|x|2) and because computing each empirically mapped kernel value is O(m). Another appealing idea is to derive the feature representation from a generative model for a protein family. In the Fisher kernel method [5], one first builds a profile HMM for the positive training sequences, defining a log likelihood function log P(x|θ) for any protein sequence x. Then the gradient vector ∇θ log P(x|θ)|θ=θ0, where θ0 is the maximum likelihood estimate for model parameters, defines an explicit vector of features, called Fisher scores, for x. This representation gives excellent classification results, but the Fisher scores must be computed by an O(|x|2) forward-backward algorithm, making the kernel tractable but slow. It is possible to construct useful kernels directly without explicitly depending on generative models by using string kernels. For example, the mismatch kernel [6] is defined by a histogram-like feature map that uses mismatches to capture inexact string matching. The feature space is indexed by all possible k-length subsequences α = a1a2 . . . ak, where each ai is a character in the alphabet A of amino acids. The feature map is defined on k-gram α by Φ(α) = (φβ(α))Ak where φβ(α) = 1 if α is within m mismatches of β, 0 otherwise, and is extended additively to longer sequences: Φ(x) = P k-grams∈x Φ(α). The mismatch kernel can be computed efficiently using a trie data structure: the complexity of calculating K(x, y) is O(cK(|x|+|y|)), where cK = km+1|A|m. For typical kernel parameters k = 5 and m = 1 [6], the mismatch kernel is fast, scalable and yields impressive performance. Many other interesting models and examples of string kernels have recently been presented. A survey of related string kernel work is given in the longer version of this paper. String kernel methods with SVMs are a powerful approach to protein classification and have consistently performed better than non-discriminative techniques [5, 7, 6]. However, in a real-world setting, protein classifiers have access to unlabeled data. We now discuss how to incorporate such data into the representation given to SVMs via the use of cluster kernels. 3 Cluster kernels for protein sequences In semi-supervised learning, one tries to improve a classifier trained on labeled data by exploiting (a relatively large set of) unlabeled data. An extensive review of techniques can be found in [12]. It has been shown experimentally that under certain conditions, the decision function can be estimated more accurately in a semi-supervised setting, yielding lower generalization error. The most common assumption one makes in this setting is called the “cluster assumption,” namely that the class does not change in regions of high density. Although classifiers implement the cluster assumption in various ways, we focus on classifiers that re-represent the given data to reflect structure revealed by unlabeled data. The main idea is to change the distance metric so that the relative distance between two points is smaller if the points are in the same cluster. If one is using kernels, rather than explicit feature vectors, one can modify the kernel representation by constructing a cluster kernel. In [10], a general framework is presented for producing cluster kernels by modifying the eigenspectrum of the kernel matrix. Two of the main methods presented are the random walk kernel and the spectral clustering kernel. The random walk kernel is a normalized and symmetrized version of a transition matrix corresponding to a t-step random walk. The random representation described in [11] interprets an RBF kernel as a transition matrix of a random walk on a graph with vertices xi, P(xi →xj) = Kij P Kip . After t steps, the probability of going from a point xi to a point xj should be high if the points are in the same cluster. This transition probability can be calculated for the entire matrix as P t = (D−1K)t, where D is a diagonal matrix such that Dii = P p Kip. To obtain a kernel, one performs the following steps. Compute L = D−1/2KD−1/2 and its eigendecomposition L = UΛU ⊤. let λi ←λt i, where λi = Λii, and let ˜L = U ˜ΛU ⊤. Then the new kernel is ˜K = ˜D1/2 ˜L ˜D1/2, where ˜D is a diagonal matrix with ˜ Dii = 1/Lii. The spectral clustering kernel is a simple use of the representation derived from spectral clustering [13] using the first k eigenvectors. One computes the eigenvectors (v1, . . . , vk) of D−1 2 KD−1 2 , with D defined as before, giving the representation φ(xi)p = vpi. This vector can also then be normalized to have length 1. This approach has been shown to produce a well-clustered representation. While in spectral clustering, one then performs kmeans in this representation, here one simply gives the representation as input to a classifier. A serious problem with these methods is that one must diagonalize a matrix the size of the set of labeled and unlabeled data. Other methods of implementing the cluster assumption such as transductive SVMs [14] also suffer from computational efficiency issues. A second drawback is that these kernels are better suited to a transductive setting (where one is given both the unlabeled and test points in advance) rather than a semi-supervising setting. In order to estimate the kernel for a sequence not present during training, one is forced to solve a difficult regression problem [10]. In the next two sections we will describe two simple methods to implement the cluster assumption that do not suffer from these issues. 4 The neighborhood mismatch kernel In most current learning applications for prediction of protein properties, such as prediction of three-state secondary structure, neural nets are trained on probabilistic profiles of a sequence window — a matrix of position-specific emission and gap probabilities — learned from a PSI-BLAST alignment rather than an encoding of the sequence itself. In this way, each input sequence is represented probabilistically by its “neighborhood” in a large sequence database, where PSI-BLAST neighbors are sequences that are closely related through evolution. We wish to transfer the notion of profiles to our mismatch representation of protein sequences. We use a standard sequence similarity measure like BLAST or PSI-BLAST to define a neighborhood Nbd(x) for each input sequence x as the set of sequences x′ with similarity score to x below a fixed E-value threshold, together with x itself. Now given a fixed original feature representation, we represent x by the average of the feature vectors for members of its neighborhood: Φnbd(x) = 1 |Nbd(x)| P x′∈Nbd(x) Φorig(x′). The neighborhood kernel is then defined by: Knbd(x, y) = 1 |Nbd(x)||Nbd(y)| X x′∈Nbd(x),y′∈Nbd(y) Korig(x′, y′). We will see in the experimental results that this simple neighborhood-averaging technique, used in a semi-supervised setting with the mismatch kernel, dramatically improves classification performance. To see how the neighborhood approach fits with the cluster assumption, consider a set of points in feature space that form a “cluster” or dense region of the data set, and consider the region R formed by the union of the convex hulls of the neighborhood point sets. If the dissimilarity measure is a true distance, the neighborhood averaged vector Φnbd(x) stays inside the convex hull of the vectors in its neighborhood, all the neighborhood vectors stay within region R. In general, the cluster contracts inside R under the averaging operation. Thus, under the new representation, different clusters can become better separated from each other. 5 The bagged mismatch kernel There exist a number of clustering techniques that are much more efficient than the methods mentioned in Section 3. For example, the classical k-means algorithm is O(rkmd), where m is the number of data points, d is their dimensionality, and r is the number of iterations required. Empirically, this running time grows sublinearly with k, m and d. In practice, it is computationally efficient even to run k-means multiple times, which can be useful since k-means can converge to local minima. We therefore consider the following method: 1. Run k-means n times, giving p = 1, . . . , n cluster assignments cp(xi) for each i. 2. Build a bagged-clustering representation based upon the fraction of times that xi and xj are in the same cluster: Kbag(xi, xj) = P p[cp(xi) = cp(xj)] n . (1) 3. Take the product between the original and bagged kernel: K(xi, xj) = Korig(xi, xj) · Kbag(xi, xj) Because k-means gives different solutions on each run, step (1) will give different results; for other clustering algorithms one could sub-sample the data instead. Step (2) is a valid kernel because it is the inner product in an nk-dimensional space Φ(xi) = ⟨[cp(xi) = q] : p = 1, . . . , n, q = 1, . . . , k⟩, and products of kernels as in step (3) are also valid kernels. The intuition behind the approach is that the original kernel is rescaled by the “probability” that two points are in the same cluster, hence encoding the cluster assumption. To estimate the kernel on a test sequence x in a semi-supervised setting, one can assign x to the nearest cluster in each of the bagged runs to compute Kbag(x, xi). We apply the bagged kernel method with Korig as the mismatch kernel and Kbag built using PSI-BLAST. 6 Experiments We measure the recognition performance of cluster kernels methods by testing their ability to classify protein domains into superfamilies in the Structural Classification of Proteins (SCOP) [15]. We use the same 54 target families and the same test and training set splits as in the remote homology experiments in [7]. The sequences are 7329 SCOP domains obtained from version 1.59 of the database after purging with astral.stanford.edu so that no pair of sequences share more than 95% identity. Compared to [7], we reduce the number of available labeled training patterns by roughly a third. Data set sequences that were neither in the training nor test sets for experiments from [7] are included as unlabeled data. All methods are evaluated using the receiver operating characteristic (ROC) score and the ROC-50, which is the ROC score computed only up to the first 50 false positives. More details concerning the experimental setup can be found at http://www1.cs. columbia.edu/compbio/svm-pairwise. In all experiments, we use an SVM classifier with a small soft margin parameter, set as in [7] . The SVM computations are performed using the freely available Spider Matlab machine learning package available at http://www.kyb.tuebingen.mpg.de/ bs/people/spider. More information concerning the experiments, including data and source code scripts, can be found at http://www.kyb.tuebingen.mpg.de/ bs/people/weston/semiprot. Semi-supervised setting. Our first experiment shows that the neighborhood mismatch kernel makes better use of unlabeled data than the baseline method of “pulling in homologs” prior to training the SVM classifier, that is, simply finding close homologs of 0 0.2 0.4 0.6 0.8 1 0 10 20 30 40 50 60 ROC−50 Number of families Using PSI−BLAST for homologs & neighborhoods mismatch(5,1) mismatch(5,1)+homologs neighborhood mismatch(5,1) 0 0.2 0.4 0.6 0.8 1 0 0.2 0.4 0.6 0.8 1 Neighborhood Mismatch(5,1) ROC−50 Mismatch(5,1)+homologs ROC−50 Figure 1: Comparison of protein representations and classifiers using unlabeled data. The mismatch kernel is used to represent proteins, with close homologs being pulled in from the unlabeled set with PSI-BLAST. Building a neighborhood with the neighborhood mismatch kernel improves over the baseline of pulling in homologs. BLAST PSI-BLAST ROC-50 ROC ROC-50 ROC mismatch kernel 0.416 0.870 0.416 0.870 mismatch kernel + homologs 0.480 0.900 0.550 0.910 neighborhood mismatch kernel 0.639 0.922 0.699 0.923 Table 1: Mean ROC-50 and ROC scores over 54 target families for semi-supervised experiments, using BLAST and PSI-BLAST. the positive training examples in the unlabeled set and adding them to the positive training set for the SVM. Homologs come from the unlabeled set (not the test set), and “neighbors” for the neighborhood kernel come from the training plus unlabeled data. We compare the methods using the mismatch kernel representation with k = 5 and m = 1, as used in [6]. Homologs are chosen via PSI-BLAST as having a pairwise score (E-value) with any of the positive training samples less than 0.05, the default parameter setting [1]. The neighborhood mismatch kernel uses the same threshold to choose neighborhoods. For the neighborhood kernel, we normalize before and after the averaging operation via Kij ←Kij/ p KiiKjj. The results are given in Figure 1 and Table 1. The former plots the number of families achieving a given ROC-50 score, and a strongly performing method thus produces a curve close to the top right of the plot. A signed rank test shows that the neighborhood mismatch kernel yields significant improvement over adding homologs (pvalue 3.9e-05). Note that the PSI-BLAST scores in these experiments are built using the whole database of 7329 sequences (that is, test sequences in a given experiment are also available to the PSI-BLAST algorithm), so these results are slightly optimistic. However, the comparison of methods in a truly inductive setting using BLAST shows the same improvement of the neighborhood mismatch kernel over adding homologs (p-value 8.4e-05). Adding homologs to the (much larger) negative training set in addition to pulling in the positive homologs gives poorer performance than only adding the positive homologs (results not shown). Transductive setting. In the following experiments, we consider a transductive setting, in which the test points are given to the methods in advance as unlabeled data, giving slightly improved results over the last section. Although this setting is unrealistic for a real protein classification system, it more easily enables comparison with random walk and spectral clustering kernels, which do not easily work in another setting. In Figure 2 (left), we again show the mismatch kernel compared with pulling in homologs and the neighborhood kernel. This time we also compare with the bagged mismatch kernel using 0 0.2 0.4 0.6 0.8 1 0 10 20 30 40 50 60 ROC−50 Number of families Mismatch kernel, PSI−BLAST distance mismatch(5,1) mismatch(5,1)+homologs neighborhood mismatch(5,1) bagged mismatch(5,1) k=100 0 0.2 0.4 0.6 0.8 1 0 10 20 30 40 50 60 ROC−50 Number of families PSI−BLAST kernel, varying methods PSI−BLAST + close homologs spectral cluster, k=100 random walk, t=2 Figure 2: Comparison of protein representations and classifiers using unlabeled data in a transductive setting. Neighborhood and bagged mismatch kernels outperform pulling in close homologs (left) and equal or outperform previous semi-supervised methods (right). ROC-50 ROC ROC-50 ROC mismatch kernel 0.416 0.875 PSI-BLAST kernel 0.533 0.866 mismatch kernel + homologs 0.625 0.924 PSI-BLAST+homologs kernel 0.585 0.873 neighborhood mismatch kernel 0.704 0.917 spectral clustering kernel 0.581 0.861 bagged mismatch kernel (k = 100) 0.719 0.943 random walk kernel 0.691 0.915 bagged mismatch kernel (k = 400) 0.671 0.935 transductive SVM 0.637 0.874 Table 2: Mean ROC-50 and ROC scores over 54 target families for transductive experiments. bagged k-means with k = 100 and n = 100 runs, which gave the best results. We found the method quite insensitive to k. The result for k = 400 is also given in Table 2. We then compare these methods to using random walk and spectral clustering kernels. Both methods do not work well for the mismatch kernel (see online supplement), perhaps because the feature vectors are so orthogonal. However, for a PSI-BLAST representation via empirical kernel map, the random walk outperforms pulling in homologs. We take the empirical map with Φ(x) = ⟨exp(−λd(x1, x)), . . . , exp(−λ(d(xm, x))⟩, where d(x, y) are PSI-BLAST E-values and λ = 1 1000, which improves over a linear map. We report results for the best parameter choices, t = 2 for the random walk and k = 200 for spectral clustering. We found the latter quite brittle with respect to the parameter choice; results for other parameters can be found on the supplemental web site. For pulling in close homologs, we take the empirical kernel map only for points in the training set and the chosen close homologs. Finally, we also run transductive SVMs. The results are given in Table 2 and Figure 2 (right). A signed rank test (with adjusted p-value cut-off of 0.05) finds no significant difference between the neighborhood kernel, the bagged kernel (k = 100), and the random walk kernel in this transductive setting. Thus the new techniques are comparable with random walk, but are feasible to calculate on full scale problems. 7 Discussion Two of the most important issues in protein classication are representation of sequences and handling unlabeled data. Two developments in recent kernel methods research, string kernels and cluster kernels, address these issues separately. We have described two kernels — the neighborhood mismatch kernel and the bagged mismatch kernel — that combine both approaches and yield state-of-the-art performance in protein classification. Practical use of semi-supervised protein classification techniques requires computational efficiency. Many cluster kernels require diagonalization of the full labeled plus unlabeled data kernel matrix. The neighborhood and bagged kernel approaches, used with an efficient string kernel, are fast and scalable cluster kernels for sequence data. Moreover, these techniques can be applied to any problem with a meaningful local similarity measure or distance function. Future work will deal with additional challenges of protein classification: addressing the full multi-class problem, which potentially involves thousands of classes; handling very small classes with few homologs; and dealing with missing classes, for which no labeled examples exist. Acknowledgments We would like to thank Eleazar Eskin for discussions that contributed to the neighborhood kernel and Olivier Chapelle and Navin Lal for their help with this work. References [1] S. F. Altschul, W. Gish, W. Miller, E. W. Myers, and D. J. Lipman. A basic local alignment search tool. Journal of Molecular Biology, 215:403–410, 1990. [2] T. Smith and M. Waterman. Identification of common molecular subsequences. Journal of Molecular Biology, 147:195–197, 1981. [3] A. Krogh, M. Brown, I. Mian, K. Sjolander, and D. Haussler. Hidden markov models in computational biology: Applications to protein modeling. Journal of Molecular Biology, 235:1501– 1531, 1994. [4] J. Park, K. Karplus, C. Barrett, R. Hughey, D. Haussler, T. Hubbard, and C. Chothia. Sequence comparisons using multiple sequences detect twice as many remote homologues as pairwise methods. Journal of Molecular Biology, 284(4):1201–1210, 1998. [5] T. Jaakkola, M. Diekhans, and D. Haussler. A discriminative framework for detecting remote protein homologies. Journal of Computational Biology, 2000. [6] C. Leslie, E. Eskin, J. Weston, and W. S. Noble. Mismatch string kernels for SVM protein classification. Neural Information Processing Systems 15, 2002. [7] C. Liao and W. S. Noble. Combining pairwise sequence similarity and support vector machines for remote protein homology detection. Proceedings of RECOMB, 2002. [8] S. F. Altschul, T. L. Madden, A. A. Schaffer, J. Zhang, Z. Zhang, W. Miller, and D. J. Lipman. Gapped BLAST and PSI-BLAST: A new generation of protein database search programs. Nucleic Acids Research, 25:3389–3402, 1997. [9] X. Zhu and Z. Ghahramani. Learning from labeled and unlabeled data with label propagation. Technical report, CMU, 2002. [10] O. Chapelle, J. Weston, and B. Schoelkopf. Cluster kernels for semi-supervised learning. Neural Information Processing Systems 15, 2002. [11] M. Szummer and T. Jaakkola. Partially labeled classification with Markov random walks. Neural Information Processing Systems 14, 2001. [12] M. Seeger. Learning with labeled and unlabeled data. Technical report, University of Edinburgh, 2001. [13] A. Ng, M. Jordan, and Y. Weiss. On spectral clustering: analysis and an algorithm. Neural Processing Information Systems 14, 2001. [14] T. Joachims. Transductive inference for text classification using support vector machines. Proceedings of ICML, 1999. [15] A. G. Murzin, S. E. Brenner, T. Hubbard, and C. Chothia. SCOP: A structural classification of proteins database for the investigation of sequences and structures. Journal of Molecular Biology, 247:536–540, 1995.
2003
17
2,387
Learning a Distance Metric from Relative Comparisons Matthew Schultz and Thorsten Joachims Department of Computer Science Cornell University Ithaca, NY 14853 {schultz,tj}@cs.cornell.edu Abstract This paper presents a method for learning a distance metric from relative comparison such as “A is closer to B than A is to C”. Taking a Support Vector Machine (SVM) approach, we develop an algorithm that provides a flexible way of describing qualitative training data as a set of constraints. We show that such constraints lead to a convex quadratic programming problem that can be solved by adapting standard methods for SVM training. We empirically evaluate the performance and the modelling flexibility of the algorithm on a collection of text documents. 1 Introduction Distance metrics are an essential component in many applications ranging from supervised learning and clustering to product recommendations and document browsing. Since designing such metrics by hand is difficult, we explore the problem of learning a metric from examples. In particular, we consider relative and qualitative examples of the form “A is closer to B than A is to C”. We believe that feedback of this type is more easily available in many application setting than quantitative examples (e.g. “the distance between A and B is 7.35”) as considered in metric Multidimensional Scaling (MDS) (see [4]), or absolute qualitative feedback (e.g. “A and B are similar”, “A and C are not similar”) as considered in [11]. Building on the study in [7], search-engine query logs are one example where feedback of the form “A is closer to B than A is to C” is readily available for learning a (more semantic) similarity metric on documents. Given a ranked result list for a query, documents that are clicked on can be assumed to be semantically closer than those documents that the user observed but decided to not click on (i.e. “Aclick is closer to Bclick than Aclick is to Cnoclick”). In contrast, drawing the conclusion that “Aclick and Cnoclick are not similar” is probably less justified, since a Cnoclick high in the presented ranking is probably still closer to Aclick than most documents in the collection. In this paper, we present an algorithm that can learn a distance metric from such relative and qualitative examples. Given a parametrized family of distance metrics, the algorithms discriminately searches for the parameters that best fulfill the training examples. Taking a maximum-margin approach [9], we formulate the training problem as a convex quadratic program for the case of learning a weighting of the dimensions. We evaluate the performance and the modelling flexibility of the algorithm on a collection of text documents. The notation used throughout this paper is as follows. Vectors are denoted with an arrow ⃗x where xi is the ith entry in vector ⃗x. The vector ⃗0 is the vector composed of all zeros, and ⃗1 is the vector composed of all ones. ⃗xT is the transpose of vector ⃗x and the dot product is denoted by ⃗xT⃗y. We denote the element-wise product of two vectors ⃗x = (x1, ..., xn)T and ⃗y = (y1, ..., yn)T as ⃗x ∗⃗y = (x1y1, ..., xnyn)T . 2 Learning from Relative Qualitative Feedback We consider the following learning setting. Given is a set Xtrain of objects ⃗xi ∈ℜN. As training data, we receive a subset Ptrain of all potential relative comparisons defined over the set Xtrain. Each relative comparison (i, j, k) ∈Ptrain with ⃗xi, ⃗xj, ⃗xk ∈Xtrain has the semantic ⃗xi is closer to ⃗xj than ⃗xi is to ⃗xk. The goal of the learner is to learn a weighted distance metric d ⃗w(·, ·) from Ptrain and Xtrain that best approximates the desired notion of distance on a new set of test points Xtest, Xtrain ∩Xtest = ∅. We evaluate the performance of a metric d ⃗w(·, ·) by how many relative comparisons Ptest it fulfills on the test set. 3 Parameterized Distance Metrics A (pseudo) distance metric d(⃗x, ⃗y) is a function over pairs of objects ⃗x and ⃗y from some set X. d(⃗x, ⃗y) is a pseudo metric, iff it obeys the four following properties for all ⃗x, ⃗y, and ⃗z: d(⃗x, ⃗x) = 0, d(⃗x, ⃗y) = d(⃗y, ⃗x), d(⃗x, ⃗y) ≥0, d(⃗x, ⃗y) + d(⃗y,⃗z) ≥d(⃗x,⃗z) It is a metric, iff it also obeys d(⃗x, ⃗y) = 0 ⇒⃗x = ⃗y. In this paper, we consider a distance metric dA,W (⃗x, ⃗y) between vectors ⃗x, ⃗y ∈ℜN parameterized by two matrices, A and W. dA,W (⃗x, ⃗y) = q (⃗x −⃗y)T AWAT (⃗x −⃗y) (1) W is a diagonal matrix with non-negative entries and A is any real matrix. Note that the matrix AWAT is semi-positive definite so that dA,W (⃗x, ⃗y) is a valid distance metric. This parametrization is very flexible. In the simplest case, A is the identity matrix, I, and dI,W (⃗x, ⃗y) = p (⃗x −⃗y)T IWIT (⃗x −⃗y) = p (⃗x −⃗y)T W(⃗x −⃗y) is a weighted, Euclidean distance dI,W (⃗x, ⃗y) = pP i Wii(xi −yi)2. In a general case, A can be any real matrix. This corresponds to applying a linear transformation to the input data with the matrix A. After the transformation, the distance becomes a Euclidean distance on the transformed input points AT⃗x, AT⃗y. dA,W (⃗x, ⃗y) = q ((⃗x −⃗y)T A)W(AT (⃗x −⃗y)) (2) The use of kernels K(⃗x, ⃗y) = φ(⃗x)φ(⃗y) suggests a particular choice of A. Let Φ be the matrix where the i-th column is the (training) vector ⃗xi projected into a feature space using the function φ(⃗xi). Then dΦ,W (φ(⃗x), φ(⃗y)) = q ((φ(⃗x) −φ(⃗y))T Φ)W(ΦT (φ(⃗x) −φ(⃗y))) (3) = v u u t n X i=1 Wii(K(⃗x, ⃗xi) −K(⃗y, ⃗xi))2 (4) is a distance metric in the feature space. 4 An SVM Algorithm for Learning from Relative Comparisons Given a training set Ptrain of n relative comparisons over a set of vectors Xtrain, and the matrix A, we aim to fit the parameters in the diagonal matrix W of distance metric dA,W (⃗x, ⃗y) so that the training error (i.e. the number of violated constraints) is minimized. Finding a solution of zero training error is equivalent to finding a W that fulfills the following set of constraints. ∀(i, j, k) ∈Ptrain : dA,W (⃗xi, ⃗xk) −dA,W (⃗xi, ⃗xj) > 0 (5) If the set of constraints is feasible and a W exists that fulfills all constraints, the solution is typically not unique. We aim to select a matrix AWAT such that dA,W (⃗x, ⃗y) remains as close to an unweighted Euclidean metric as possible. Following [8], we minimize the norm of the eigenvalues ||Λ||2 of AWAT . Since ||Λ||2 = ||AWAT ||2 F , this leads to the following optimization problem. min 1 2||AWAT ||2 F s.t. ∀(i,j,k)∈Ptrain : (⃗xi−⃗xk)TAWAT(⃗xi−⃗xk) −(⃗xi−⃗xj)TAWAT(⃗xi−⃗xj) ≥1 Wii ≥0 Unlike in [8], this formulation ensures that dA,W (⃗x, ⃗y) is a metric, avoiding the need for semi-definite programming like in [11]. As in classification SVMs, we add slack variables [3] to account for constraints that cannot be satisfied. This leads to the following optimization problem. min 1 2||AWAT ||2 F + C X i,j,k ξijk s.t. ∀(i,j,k)∈Ptrain : (⃗xi−⃗xk)TAWAT(⃗xi−⃗xk) −(⃗xi−⃗xj)TAWAT(⃗xi−⃗xj) ≥1 −ξijk ξijk ≥0 Wii ≥0 The sum of the slack variables ξijk in the objective is an upper bound on the number of violated constraints. All distances dA,W (⃗x, ⃗y) can be written in the following linear form. If we let ⃗w be the diagonal elements of W then the distance dA,W can be written as dA,W (⃗x, ⃗y) = q ((⃗x −⃗y)T A)W(AT (⃗x −⃗y)) = q ⃗wT (AT⃗x −AT⃗y) ∗(AT⃗x −AT⃗y) (6) where ∗denotes the element-wise product. If we let ⃗∆xi,xj = (AT ⃗xi −AT ⃗xk) ∗(AT ⃗xi − AT ⃗xk), then the constraints in the optimization problem can be rewritten in the following linear form. ∀(i, j, k) ∈Ptrain : ⃗wT (⃗∆xi,xk −⃗∆xi,xk) ≥1 −ξijk (7) 1a) 1b) 2a) 2b) Figure 1: Graphical example of using different A matrices. In example 1, A is the identity matrix and in example 2 A is composed of the training examples projected into high dimensional space using an RBF kernel. Furthermore, the objective function is quadratic, so that the optimization problem can be written as min 1 2 ⃗wT L⃗w + C X i,j,k ξijk s.t. ∀(i, j, k) ∈Ptrain : ⃗wT (⃗∆xi,xk −⃗∆xi,xj) ≥1 −ξijk ξijk ≥0 Wii ≥0 (8) For the case of A = I, ||AWAT ||2 F = wT Lw with L = I. For the case of A = Φ, we define L = (AT A) ∗(AT A) so that ||AWAT ||2 F = wT Lw. Note that L is positive semidefinite in both cases and that, therefore, the optimization problem is convex quadratic. 5 Experiments In Figure 1, we display a graphical example of our method. Example 1 is an example of a weighted Euclidean distance. The input data points are shown in 1a) and our training constraints specify that the distance between two square points should be less than the distance to a circle. Similarly, circles should be closer to each other than to squares. Figure 1 (1b) shows the points after an MDS analysis with the learned distance metric as input. This learned distance metric intuitively correponds to stretching the x-axis and shrinking the y-axis in the original input space. Example 2 in Figure 1 is an example where we have a similar goal of grouping the squares together and separating them from the circles. In this example though, there is no way to use a linear weighting measure to accomplish this task. We used an RBF kernel and learned a distance metric to separate the clusters. The result is shown in 2b. To validate the method using a real world example, we ran several experiments on the WEBKB data set [5]. In order to illustrate the versatility of relative comparisons, we generated three different distance metrics from the same data set and ran three types of tests: an accuracy test, a learning curve to show how the method generalizes from differing amounts of training data, and an MDS test to graphically illustrate the new distance measures. The experimental setup for each of the experiments was the same. We first split X, the set of all 4,183 documents, into separate training and test sets, Xtrain and Xtest. 70% of the all examples X added to Xtrain and the remaining 30% are in Xtest. We used a binary feature vector without stemming or stop word removal (63,949 features) to represent each document because it is the least biased distance metric to start out with. It also performed best among several different variations of term weighting, stemming and stopword removal. The relative comparison sets, Ptrain and Ptest, were generated as follows. We present results for learning three different notions of distance. • University Distance: This distance is small when the two examples, ⃗x, ⃗y, are from the same university and larger otherwise. For this data set we used webpages from seven universities. • Topic Distance: This distance metric is small when the two examples, ⃗x, ⃗y, are from the same topic (e.g. both are student webpages) and larger when they are each from a different topic. There are four topics: Student, Faculty, Course and Project webpages. • Topic+FacultyStudent Distance: Again when two examples, ⃗x, ⃗y, are from the same topic then they have a small distance between them and a larger distance when they come from different topics. However, we add the additional constraint that the distance between a faculty and a student page is smaller than the distance to pages from other topics. To build the training constraints, Ptrain, we first randomly selected three documents, xi, xj, xk, from Xtrain. For the University Distance we added the triplet (i, j, k) to Ptrain if xi and xj were from the same university and xk was from a different university. In building Ptrain for the Topic Distance we added the (i, j, k) to Ptrain if xi and xj were from the same topic (e.g. “Student Webpages”) and xk was from a different topic (e.g. “Project Webpages”). For the Topic+FacultyStudent Distance, the training triple (i, j, k) was added to Ptrain if either the topic rule occurred, when xi and xj were from the same topic and xk was from a different topic, or if xi was a faculty webpage, xj was a student webpage and xk was either a project or course webpage. Thus the constraints would specify that a student webpage is closer to a faculty webpage than a faculty webpage is to a course webpage. Learned d ⃗w(·, ·) Binary TFIDF University Distance 98.43% 67.88% 80.72% Topic Distance 75.40% 61.82% 55.57% Topic+FacultyStudent Distance 79.67% 63.08% 55.06% Table 1: Accuracy of different distance metrics on an unseen test set Ptest. The results of the learned distance measures on unseen test sets Ptest are reported in Table 1. In each experiment the regularization parameter C was set to 1 and we used A = I. We report the percentage of the relative comparisons in Ptest that were satisfied for each of the three experiments. As a baseline for comparison, we give the results for the static (not learned) distance metric that performs best on the test set. The best performing metric for all static Euclidean distances (Binary and TFIDF) used stemming and stopword removal, which our learned distance did not use. The learned University Distance satisfied 98.43% of the constraints. This verifies that the learning method can effectively find the relevant features, since pages usually mentioned which university they were from. For the other distances, both the Topic Distance and Topic+FacultyStudent Distance satisfied more than 13% more constraints in Ptest than the best unweighted distance. Using a kernel instead of A = I did not yield improved results. For the second test, we illustrate on the Topic+FacultyStudent data set how the prediction accuracy of the method scales with the number of training constraints. The learning curve 0.5 0.55 0.6 0.65 0.7 0.75 0.8 0 50 100 150 200 250 Percent of Test Set Constraints Satisfied Size of Training Set in Thousands of Constraints Learned Distance Binary L2 TFIDF L2 Figure 2: Learning curves for the Topic+FacultyStudent dataset where the x axis is the size of the training set Ptrain plotted against the y axis which is the percent of constraints in Ptest that were satisfied. is shown in Figure 2 where we plot the training set size (in number of constraints) versus the percentage of test constraints satisfied. The test set Ptest was held constant and sampled in the same way as the training set (|Ptest| = 85,907). As Figure 2 illustrates, after the data set contained more than 150,000 constraints, the performance of the algorithm remained relatively constant. As a final test of our method, we graphically display our distance metrics in Table 7. We plot three distance metrics: The standard binary distance (Figure a) for the Topic Distance, the learned metric for Topic Distance (Figure b) and, and the learned metric for the Topic+FacultyStudent Distance (Figure c). To produce the plots in Table 7, all pairwise distances between the points in Xtest were computed and then projected into 2D using a classical, metric MDS algorithm [1]. Figure a) in Table 7 is the result of using the pairwise distances resulting from the unweighted, binary L2 norm in MDS. There is no clear distinction between any of the clusters in 2 dimensions. In Figure b) we see the results of the learned Topic Distance measure. The classes were reasonably separated from each other. Figure c) shows the result of using the learned Topic+FacultyStudent Distance metric. When compared to Figure b), the Faculty and Student webpages have now moved closer together as desired. 6 Related Work The most relevant related work is the work of Xing et al [11] which focused on the problem of learning a distance metric to increase the accuracy of nearest neighbor algorithms. Their work used absolute, qualitative feedback such as “A is similar to B” or “A is dissimilar to B” which is different from the relative constraints considered here. Secondly, their method does not use regularization. Related are also techniques for semi-supervised clustering, as it is also considered in [11]. While [10] does not change the distance metric, [2] uses gradient descent to adapt a parameterized distance metric according to user feedback. Other related work are dimension reduction techniques such as Multidimensional Scaling (MDS) [4] and Latent Semantic Indexing [6]. Metric MDS techniques take as input a matrix D of dissimilarities (or similarities) between all points in some collection and then seeks to arrange the points in a d-dimensional space to minimize the stress. The stress of the arrangement is roughly the difference between the distances in the d-dimensional space and the distances input in matrix D. LSI uses an eigenvalue decomposition of the original input space to find the first d principal eigenvectors to describe the data in d dimensions. Our work differs because the input is a set of relative comparisons, not quantitative distances and does not project the data into a lower dimensional space. Non-metric MDS is more similar to our technique than metric MDS. Instead of preserving the exact distances input, the non-metric MDS seeks to maintain the rank order of the distances. However, the goal of our method is not a low dimensional projection, but a new distance metric in the original space. 7 Conclusion and Future Work In this paper we presented a method for learning a weighted Euclidean distance from relative constraints. This was accomplished by solving a convex optimization problem similar to SVMs to find the maximum margin weight vector. One of the main benefits of the algorithm is that the new type of the constraint enables its use in a wider range of applications than conventional methods. We evaluated the method on a collection of high dimensional text documents and showed that it can successfully learn different notions of distance. Future work is needed both with respect to theory and application. In particular, we do not yet know generalization error bounds for this problem. Furthermore, the power of the method would be increased, if it was possible to learn more complex metrics that go beyond feature weighting, for example by incorporating kernels in a more adaptive way. References [1] A. Buja, D. Swayne, M. Littman, and N. Dean. Xgvis: Interactive data visualization with multidimensional scaling. Journal of Computational and Graphical Statistics, to appear. [2] D. Cohn, R. Caruana, and A. McCallum. Semi-supervised clustering with user feedback. Technical Report TR2003-1892, Cornell University, 2003. [3] Corinna Cortes and Vladimir Vapnik. Support-vector networks. Machine Learning, 20(3):273–297, 1995. [4] T. Cox and M. Cox. Multidimensional Scaling. Chapman & Hall, London, 1994. [5] 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 the 15th National Conference on Artificial Intelligence (AAAI-98), 1998. [6] Scott C. Deerwester, Susan T. Dumais, Thomas K. Landauer, George W. Furnas, and Richard A. Harshman. Indexing by latent semantic analysis. Journal of the American Society of Information Science, 41(6):391–407, 1990. [7] T. Joachims. Optimizing search engines using clickthrough data. Proceedings of the ACM Conference on Knowledge Discovery and Data Mining (KDD), 2002. [8] I.W. Tsang and J.T. Kwok. Distance metric learning with kernels. Proceedings of the International Conference on Artificial Neural Networks, 2003. [9] V. Vapnik. Statistical Learning Theory. Wiley, Chichester, GB, 1998. [10] Kiri Wagstaff, Claire Cardie, Seth Rogers, and Stefan Schroedl. Constrained K-means clustering with background knowledge. In Proc. 18th International Conf. on Machine Learning, pages 577–584. Morgan Kaufmann, San Francisco, CA, 2001. [11] E.P. Xing, A.Y. Ng, M.I. Jordan, and S. Russell. Distance metric learning, with application to clustering with side information. Advances in Neural Information Processing Systems, 2002. a) -3 -2 -1 0 1 2 3 -2.5 -2 -1.5 -1 -0.5 0 0.5 1 1.5 2 2.5 3 Course Project Student Faculty b) -4 -3 -2 -1 0 1 2 -3 -2 -1 0 1 2 3 Course Project Student Faculty c) -4 -3 -2 -1 0 1 2 3 -2 -1 0 1 2 3 4 Course Project Student Faculty Table 2: MDS plots of distance functions: a) is the unweighted L2 distance, b) is the Topic Distance, and c) is the Topic+FacultyStudent distance.
2003
170
2,388
Locality Preserving Projections Xiaofei He Department of Computer Science The University of Chicago Chicago, IL 60637 xiaofei@cs.uchicago.edu Partha Niyogi Department of Computer Science The University of Chicago Chicago, IL 60637 niyogi@cs.uchicago.edu Abstract Many problems in information processing involve some form of dimensionality reduction. In this paper, we introduce Locality Preserving Projections (LPP). These are linear projective maps that arise by solving a variational problem that optimally preserves the neighborhood structure of the data set. LPP should be seen as an alternative to Principal Component Analysis (PCA) – a classical linear technique that projects the data along the directions of maximal variance. When the high dimensional data lies on a low dimensional manifold embedded in the ambient space, the Locality Preserving Projections are obtained by finding the optimal linear approximations to the eigenfunctions of the Laplace Beltrami operator on the manifold. As a result, LPP shares many of the data representation properties of nonlinear techniques such as Laplacian Eigenmaps or Locally Linear Embedding. Yet LPP is linear and more crucially is defined everywhere in ambient space rather than just on the training data points. This is borne out by illustrative examples on some high dimensional data sets. 1. Introduction Suppose we have a collection of data points of n-dimensional real vectors drawn from an unknown probability distribution. In increasingly many cases of interest in machine learning and data mining, one is confronted with the situation where n is very large. However, there might be reason to suspect that the “intrinsic dimensionality” of the data is much lower. This leads one to consider methods of dimensionality reduction that allow one to represent the data in a lower dimensional space. In this paper, we propose a new linear dimensionality reduction algorithm, called Locality Preserving Projections (LPP). It builds a graph incorporating neighborhood information of the data set. Using the notion of the Laplacian of the graph, we then compute a transformation matrix which maps the data points to a subspace. This linear transformation optimally preserves local neighborhood information in a certain sense. The representation map generated by the algorithm may be viewed as a linear discrete approximation to a continuous map that naturally arises from the geometry of the manifold [2]. The new algorithm is interesting from a number of perspectives. 1. The maps are designed to minimize a different objective criterion from the classical linear techniques. 2. The locality preserving quality of LPP is likely to be of particular use in information retrieval applications. If one wishes to retrieve audio, video, text documents under a vector space model, then one will ultimately need to do a nearest neighbor search in the low dimensional space. Since LPP is designed for preserving local structure, it is likely that a nearest neighbor search in the low dimensional space will yield similar results to that in the high dimensional space. This makes for an indexing scheme that would allow quick retrieval. 3. LPP is linear. This makes it fast and suitable for practical application. While a number of non linear techniques have properties (1) and (2) above, we know of no other linear projective technique that has such a property. 4. LPP is defined everywhere. Recall that nonlinear dimensionality reduction techniques like ISOMAP[6], LLE[5], Laplacian eigenmaps[2] are defined only on the training data points and it is unclear how to evaluate the map for new test points. In contrast, the Locality Preserving Projection may be simply applied to any new data point to locate it in the reduced representation space. 5. LPP may be conducted in the original space or in the reproducing kernel Hilbert space(RKHS) into which data points are mapped. This gives rise to kernel LPP. As a result of all these features, we expect the LPP based techniques to be a natural alternative to PCA based techniques in exploratory data analysis, information retrieval, and pattern classification applications. 2. Locality Preserving Projections 2.1. The linear dimensionality reduction problem The generic problem of linear dimensionality reduction is the following. Given a set x1, x2, · · · , xm in Rn, find a transformation matrix A that maps these m points to a set of points y1, y2, · · · , ym in Rl (l ≪n), such that yi ”represents” xi, where yi = AT xi. Our method is of particular applicability in the special case where x1, x2, · · · , xm ∈M and M is a nonlinear manifold embedded in Rn. 2.2. The algorithm Locality Preserving Projection (LPP) is a linear approximation of the nonlinear Laplacian Eigenmap [2]. The algorithmic procedure is formally stated below: 1. Constructing the adjacency graph: Let G denote a graph with m nodes. We put an edge between nodes i and j if xi and xj are ”close”. There are two variations: (a) ϵ-neighborhoods. [parameter ϵ ∈R] Nodes i and j are connected by an edge if ∥xi −xj∥2 < ϵ where the norm is the usual Euclidean norm in Rn. (b) k nearest neighbors. [parameter k ∈N] Nodes i and j are connected by an edge if i is among k nearest neighbors of j or j is among k nearest neighbors of i. Note: The method of constructing an adjacency graph outlined above is correct if the data actually lie on a low dimensional manifold. In general, however, one might take a more utilitarian perspective and construct an adjacency graph based on any principle (for example, perceptual similarity for natural signals, hyperlink structures for web documents, etc.). Once such an adjacency graph is obtained, LPP will try to optimally preserve it in choosing projections. 2. Choosing the weights: Here, as well, we have two variations for weighting the edges. W is a sparse symmetric m × m matrix with Wij having the weight of the edge joining vertices i and j, and 0 if there is no such edge. (a) Heat kernel. [parameter t ∈R]. If nodes i and j are connected, put Wij = e− ∥xi−xj ∥2 t The justification for this choice of weights can be traced back to [2]. (b) Simple-minded. [No parameter]. Wij = 1 if and only if vertices i and j are connected by an edge. 3. Eigenmaps: Compute the eigenvectors and eigenvalues for the generalized eigenvector problem: XLXT a = λXDXT a (1) where D is a diagonal matrix whose entries are column (or row, since W is symmetric) sums of W, Dii = ΣjWji. L = D −W is the Laplacian matrix. The ith column of matrix X is xi. Let the column vectors a0, · · · , al−1 be the solutions of equation (1), ordered according to their eigenvalues, λ0 < · · · < λl−1. Thus, the embedding is as follows: xi →yi = AT xi, A = (a0, a1, · · · , al−1) where yi is a l-dimensional vector, and A is a n × l matrix. 3. Justification 3.1. Optimal Linear Embedding The following section is based on standard spectral graph theory. See [4] for a comprehensive reference and [2] for applications to data representation. Recall that given a data set we construct a weighted graph G = (V, E) with edges connecting nearby points to each other. Consider the problem of mapping the weighted graph G to a line so that connected points stay as close together as possible. Let y = (y1, y2, · · · , ym)T be such a map. A reasonable criterion for choosing a ”good” map is to minimize the following objective function [2] X ij (yi −yj)2Wij under appropriate constraints. The objective function with our choice of Wij incurs a heavy penalty if neighboring points xi and xj are mapped far apart. Therefore, minimizing it is an attempt to ensure that if xi and xj are ”close” then yi and yj are close as well. Suppose a is a transformation vector, that is, yT = aT X, where the ith column vector of X is xi. By simple algebra formulation, the objective function can be reduced to 1 2 X ij (yi −yj)2Wij = 1 2 X ij (aT xi −aT xj)2Wij = X i aT xiDiixT i a − X ij aT xiWijxT j a = aT X(D −W)XT a = aT XLXT a where X = [x1, x2, · · · , xm], and D is a diagonal matrix; its entries are column (or row, since W is symmetric) sum of W, Dii = ΣjWij. L = D −W is the Laplacian matrix [4]. Matrix D provides a natural measure on the data points. The bigger the value Dii (corresponding to yi) is, the more ”important” is yi. Therefore, we impose a constraint as follows: yT Dy = 1 ⇒aT XDXT a = 1 Finally, the minimization problem reduces to finding: arg min a aT XDXT a= 1 aT XLXT a The transformation vector a that minimizes the objective function is given by the minimum eigenvalue solution to the generalized eigenvalue problem: XLXT a = λXDXT a It is easy to show that the matrices XLXT and XDXT are symmetric and positive semidefinite. The vectors ai(i = 0, 2, · · · , l −1) that minimize the objective function are given by the minimum eigenvalue solutions to the generalized eigenvalue problem. 3.2. Geometrical Justification The Laplacian matrix L (=D −W) for finite graph, or [4], is analogous to the Laplace Beltrami operator L on compact Riemannian manifolds. While the Laplace Beltrami operator for a manifold is generated by the Riemannian metric, for a graph it comes from the adjacency relation. Let M be a smooth, compact, d-dimensional Riemannian manifold. If the manifold is embedded in Rn the Riemannian structure on the manifold is induced by the standard Riemannian structure on Rn. We are looking here for a map from the manifold to the real line such that points close together on the manifold get mapped close together on the line. Let f be such a map. Assume that f : M →R is twice differentiable. Belkin and Niyogi [2] showed that the optimal map preserving locality can be found by solving the following optimization problem on the manifold: arg min ∥f∥L2(M)=1 Z M ∥∇f∥2 which is equivalent to 1 arg min ∥f∥L2(M)=1 Z M L(f)f where the integral is taken with respect to the standard measure on a Riemannian manifold. L is the Laplace Beltrami operator on the manifold, i.e. Lf = −div ∇(f). Thus, the optimal f has to be an eigenfunction of L. The integral R M L(f)f can be discretely approximated by ⟨f(X), Lf(X)⟩= f T (X)Lf(X) on a graph, where f(X) = [f(x1), f(x2, · · · , f(xm))]T , f T (X) = [f(x1), f(x2, · · · , f(xm))] If we restrict the map to be linear, i.e. f(x) = aT x, then we have f(X) = XT a ⇒⟨f(X), Lf(X)⟩= f T (X)Lf(X) = aT XLXT a The constraint can be computed as follows, ∥f∥2 L2(M) = Z M |f(x)|2dx = Z M (aT x)2dx = Z M (aT xxT a)dx = aT ( Z M xxT dx)a where dx is the standard measure on a Riemannian manifold. By spectral graph theory [4], the measure dx directly corresponds to the measure for the graph which is the degree of the vertex, i.e. Dii. Thus, |f∥2 L2(M) can be discretely approximated as follows, ∥f∥2 L2(M) = aT ( Z M xxT dx)a ≈aT ( X i xxT Dii)a = aT XDXT a Finally, we conclude that the optimal linear projective map, i.e. f(x) = aT x, can be obtained by solving the following objective function, arg min a aT XDXT a= 1 aT XLXT a 1If M has a boundary, appropriate boundary conditions for f need to be assumed. These projective maps are the optimal linear approximations to the eigenfunctions of the Laplace Beltrami operator on the manifold. Therefore, they are capable of discovering the nonlinear manifold structure. 3.3. Kernel LPP Suppose that the Euclidean space Rn is mapped to a Hilbert space H through a nonlinear mapping function φ : Rn →H. Let φ(X) denote the data matrix in the Hilbert space, φ(X) = [φ(x1), φ(x2), · · · , φ(xm)]. Now, the eigenvector problem in the Hilbert space can be written as follows: [φ(X)LφT (X)]ν = λ[φ(X)DφT (X)]ν (2) To generalize LPP to the nonlinear case, we formulate it in a way that uses dot product exclusively. Therefore, we consider an expression of dot product on the Hilbert space H given by the following kernel function: K(xi, xj) = (φ(xi) · φ(xj)) = φT (xi)φ(xj) Because the eigenvectors of (2) are linear combinations of φ(x1), φ(x2), · · · , φ(xm), there exist coefficients αi, i = 1, 2, · · · , m such that ν = m X i=1 αiφ(xi) = φ(X)α where α = [α1, α2, · · · , αm]T ∈Rm. By simple algebra formulation, we can finally obtain the following eigenvector problem: KLKα = λKDKα (3) Let the column vectors α1, α2, · · · , αm be the solutions of equation (3). For a test point x, we compute projections onto the eigenvectors νk according to (νk · φ(x)) = m X i=1 αk i (φ(x) · φ(xi)) = m X i=1 αk i K(x, xi) where αk i is the ith element of the vector αk. For the original training points, the maps can be obtained by y = Kα, where the ith element of y is the one-dimensional representation of xi. Furthermore, equation (3) can be reduced to Ly = λDy (4) which is identical to the eigenvalue problem of Laplacian Eigenmaps [2]. This shows that Kernel LPP yields the same results as Laplacian Eigenmaps on the training points. 4. Experimental Results In this section, we will discuss several applications of the LPP algorithm. We begin with two simple synthetic examples to give some intuition about how LPP works. 4.1. Simply Synthetic Example Two simple synthetic examples are given in Figure 1. Both of the two data sets correspond essentially to a one-dimensional manifold. Projection of the data points onto the first basis would then correspond to a one-dimensional linear manifold representation. The second basis, shown as a short line segment in the figure, would be discarded in this lowdimensional example. Figure 1: The first and third plots show the results of PCA. The second and forth plots show the results of LPP. The line segments describe the two bases. The first basis is shown as a longer line segment, and the second basis is shown as a shorter line segment. In this example, LPP is insensitive to the outlier and has more discriminating power than PCA. Figure 2: The handwritten digits (‘0’-‘9’) are mapped into a 2-dimensional space. The left figure is a representation of the set of all images of digits using the Laplacian eigenmaps. The middle figure shows the results of LPP. The right figure shows the results of PCA. Each color corresponds to a digit. LPP is derived by preserving local information, hence it is less sensitive to outliers than PCA. This can be clearly seen from Figure 1. LPP finds the principal direction along the data points at the left bottom corner, while PCA finds the principal direction on which the data points at the left bottom corner collapse into a single point. Moreover, LPP can has more discriminating power than PCA. As can be seen from Figure 1, the two circles are totally overlapped with each other in the principal direction obtained by PCA, while they are well separated in the principal direction obtained by LPP. 4.2. 2-D Data Visulization An experiment was conducted with the Multiple Features Database [3]. This dataset consists of features of handwritten numbers (‘0’-‘9’) extracted from a collection of Dutch utility maps. 200 patterns per class (for a total of 2,000 patterns) have been digitized in binary images. Digits are represented in terms of Fourier coefficients, profile correlations, Karhunen-Love coefficients, pixel average, Zernike moments and morphological features. Each image is represented by a 649-dimensional vector. These data points are mapped to a 2-dimensional space using different dimensionality reduction algorithms, PCA, LPP, and Laplacian Eigenmaps. The experimental results are shown in Figure 2. As can be seen, LPP performs much better than PCA. LPPs are obtained by finding the optimal linear approximations to the eigenfunctions of the Laplace Beltrami operator on the manifold. As a result, LPP shares many of the data representation properties of non linear techniques such as Laplacian Eigenmap. However, LPP is computationally much more tractable. 4.3. Manifold of Face Images In this subsection, we applied the LPP to images of faces. The face image data set used here is the same as that used in [5]. This dataset contains 1965 face images taken from sequential frames of a small video. The size of each image is 20 × 28, with 256 gray levels Figure 3: A twodimensional representation of the set of all images of faces using the Locality Preserving Projection. Representative faces are shown next to the data points in different parts of the space. As can be seen, the facial expression and the viewing point of faces change smoothly. Table 1: Face Recognition Results on Yale Database LPP LDA PCA dims 14 14 33 error rate (%) 16.0 20.0 25.3 per pixel. Thus, each face image is represented by a point in the 560-dimensional ambient space. Figure 3 shows the mapping results. The images of faces are mapped into the 2-dimensional plane described by the first two coordinates of the Locality Preserving Projections. It should be emphasized that the mapping from image space to low-dimensional space obtained by our method is linear, rather than nonlinear as in most previous work. The linear algorithm does detect the nonlinear manifold structure of images of faces to some extent. Some representative faces are shown next to the data points in different parts of the space. As can be seen, the images of faces are clearly divided into two parts. The left part are the faces with closed mouth, and the right part are the faces with open mouth. This is because that, by trying to preserve neighborhood structure in the embedding, the LPP algorithm implicitly emphasizes the natural clusters in the data. Specifically, it makes the neighboring points in the ambient space nearer in the reduced representation space, and faraway points in the ambient space farther in the reduced representation space. The bottom images correspond to points along the right path (linked by solid line), illustrating one particular mode of variability in pose. 4.4. Face Recognition PCA and LDA are the two most widely used subspace learning techniques for face recognition [1][7]. These methods project the training sample faces to a low dimensional representation space where the recognition is carried out. The main supposition behind this procedure is that the face space (given by the feature vectors) has a lower dimension than the image space (given by the number of pixels in the image), and that the recognition of the faces can be performed in this reduced space. In this subsection, we consider the application of LPP to face recognition. The database used for this experiment is the Yale face database [8]. It is constructed at the Yale Center for Computational Vision and Control. It contains 165 grayscale images of 15 individuals. The images demonstrate variations in lighting condition (left-light, centerlight, right-light), facial expression (normal, happy, sad, sleepy, surprised, and wink), and with/without glasses. Preprocessing to locate the the faces was applied. Original images were normalized (in scale and orientation) such that the two eyes were aligned at the same position. Then, the facial areas were cropped into the final images for matching. The size of each cropped image is 32 × 32 pixels, with 256 gray levels per pixel. Thus, each image can be represented by a 1024-dimensional vector. For each individual, six images were taken with labels to form the training set. The rest of the database was considered to be the testing set. The training samples were used to learn a projection. The testing samples were then projected into the reduced space. Recognition was performed using a nearest neighbor classifier. In general, the performance of PCA, LDA and LPP varies with the number of dimensions. We show the best results obtained by them. The error rates are summarized in Table 1. As can be seen, LPP outperforms both PCA and LDA. 5. Conclusions In this paper, we propose a new linear dimensionality reduction algorithm called Locality Preserving Projections. It is based on the same variational principle that gives rise to the Laplacian Eigenmap [2]. As a result it has similar locality preserving properties. Our approach also has several possible advantages over recent nonparametric techniques for global nonlinear dimensionality reduction such as [2][5][6]. It yields a map which is simple, linear, and defined everywhere (and therefore on novel test data points). The algorithm can be easily kernelized yielding a natural non-linear extension. Performance improvement of this method over Principal Component Analysis is demonstrated through several experiments. Though our method is a linear algorithm, it is capable of discovering the non-linear structure of the data manifold. References [1] P.N. Belhumeur, J.P. Hepanha, and D.J. Kriegman, “Eigenfaces vs. fisherfaces: recognition using class specific linear projection,”IEEE. Trans. Pattern Analysis and Machine Intelligence, vol. 19, no. 7, pp. 711-720, July 1997. [2] M. Belkin and P. Niyogi, “Laplacian Eigenmaps and Spectral Techniques for Embedding and Clustering ,” Advances in Neural Information Processing Systems 14, Vancouver, British Columbia, Canada, 2002. [3] C. L. Blake and C. J. Merz, ”UCI repository of machine learning databases”, http://www.ics.uci.edu/ mlearn/MLRepository.html. Irvine, CA, University of California, Department of Information and Computer Science, 1998. [4] Fan R. K. Chung, Spectral Graph Theory, Regional Conference Series in Mathematics, number 92, 1997. [5] Sam Roweis, and Lawrence K. Saul, “Nonlinear Dimensionality Reduction by Locally Linear Embedding,” Science, vol 290, 22 December 2000. [6] Joshua B. Tenenbaum, Vin de Silva, and John C. Langford, “A Global Geometric Framework for Nonlinear Dimensionality Reduction,” Science, vol 290, 22 December 2000. [7] M. Turk and A. Pentland, “Eigenfaces for recognition,” Journal of Cognitive Neuroscience, 3(1):71-86, 1991. [8] Yale Univ. Face Database, http://cvc.yale.edu/projects/yalefaces/yalefaces.html.
2003
171
2,389
Unsupervised Color Decomposition of Histologically Stained Tissue Samples A. Rabinovich Department of Computer Science University of California, San Diego amrabino@ucsd.edu S. Agarwal Department of Computer Science University of California, San Diego sagarwal@cs.ucsd.edu C. A. Laris Q3DM, Inc. claris@q3dm.com J.H. Price Department of Bioengineering University of California, San Diego jhprice@ucsd.edu S. Belongie Department of Computer Science University of California, San Diego sjb@cs.ucsd.edu Abstract Accurate spectral decomposition is essential for the analysis and diagnosis of histologically stained tissue sections. In this paper we present the first automated system for performing this decomposition. We compare the performance of our system with ground truth data and report favorable results. 1 Introduction Potentially cancerous tissue samples are analyzed by staining them with a combination of two or more dyes. We consider the problem of recovering the amount of dye absorbed for each of the stains from a stack of hyperspectral images of the tissue sample. Since the exact spectral profile of the dyes varies from one experiment to the next and is not available to the pathologist, the problem is an instance of blind source separation. The problem is of special interest to clinical and research pathologists as the amount of dye absorbed by the sample is used to determine a quantitative estimate of the amount of cancerous cells present in the tissue. The current state of the art solution requires an expert to hand click representative points in the tissue image to indicate “pure” dye spectra. This procedure requires human intervention and hence is time consuming and error prone. In this paper we present the first system capable of performing this color decomposition in a fully automated manner. We also describe a novel procedure for acquiring the ground truth data and quantifying the performance of our system. The organization of the paper is as follows. In section 2 we address the problem of image alignment in hyperspectral stacks. Section 3 presents the problem of color unmixing and proposes two unsupervised techniques as solutions. Data acquisition and experiments are discussed in Section 4. Section 5 summarizes the study and provides concluding remarks. 2 Multi-Spectral Alignment Color unmixing is a challenging problem in itself, but it is complicated further by the practicalities of multispectral imaging: the component spectral images are usually misaligned, due to chromatic aberration and shifting of the stage. If the images comprising the spectral stack are out of alignment by as little as half a pixel, the estimated stain percentages at a given pixel can be altered drastically. This can result in large inaccuracies in the resulting cancer diagnosis. Empirically, we have observed that the misalignments between images in the spectral stack can be modeled as small affine transforms, i.e. global translation, stretching, and rotation. Letting I(x) and J(x) denote two images, where x = (x, y)⊤, this assumption is expressed as J(Ax + d) = I(x) where A is the 2 × 2 matrix of affine coefficients A =  a11 a12 a21 a22  and d is a 2D translation vector. In the case of unimodal images, the iterative method of Shi and Tomasi [12] has been very successful for the estimation of differential (subpixel) affine transforms, e.g. from frame to frame in a video sequence. However, feeding cross-modal images directly to this algorithm is ineffective since they violatie the brightness constancy assumption [3]. We have observed, however, that the high spatial-frequency structures, e.g. edges and lines, tend to be consistent throughout the stack. This forms the basis of our alignment technique. We use the Shi-Tomasi algorithm on a bandpass filtered version of the images in the stack. To perform the filtering we apply a Laplacian of Gaussian (LoG) kernel [8], expressed as h(x) = ∇2e−∥x∥2/2σ2 where σ controls the width of the filter, to each image. The LoG kernel acts as a bandpass filter, suppressing constant regions and smooth shading, admitting edges and lines, and suppressing high frequency noise. We empirically determined the optimal parameters for the filtering to be σ=0.5 and a window size of 10 pixels. With this step used as preprocessing, Shi and Tomasi’s algorithm is able to register this pair of images. An example of a synthesized color image composed of a 3D spectral stack is shown with and without this registration step in Figure 1; the blurring caused by misalignment and the subsequent sharpening resulting from registration is evident. 3 Color Unmixing Once the registration problem is adequately addressed, we can proceed with the determination of stain concentrations. The problem in its full generality is an instance of the blind source separation problem. Given a spectral stack of ns images Figure 1: Synthesized color image representation of the same tissue core from a 10 dimensional spectral stack (a) with and (b) without differential affine registration. obtained from imaging a tissue sample stained with nd dyes, with ns > nd, we wish to recover the staining due to each individual dye. In an ideal world, the spectral profile of each dye would be exactly aligned with one of the spectral bands, and the absorptions measured therein would directly yield the stain concentrations. Realistically, however, the spectral profile of the dyes overlap and extend over several spectral bands, and the goal of recovering the nd components representing the dye percentages requires more careful analysis. The problem of unmixing the dyes can be formulated as a matrix factorization problem: X = AS (1) Here X is an ns × l column matrix, where l is the number of pixels and the entry Xij is the brightness of the ith pixel in the image in to the jth spectral band. The matrix A is an ns × nd matrix where each column of the matrix corresponds to the one of the dyes used in staining the tissue. S is a ns × l matrix, with the entry Sij indicating the contribution of the ith dye to the jth pixel. The current state of the art solution for this problem in the field of automated pathology is Color Deconvolution [11], which yields acceptable results, but requires manual interaction in the form of mouse clicks on seed colors for the dyes. This is an example of a supervised technique. However, given the data matrix X, there are a number of ways in which Equation (1) can be solved in a completely automatic manner without any human intervention. The three main classes of such methods are Principal Component Analysis (PCA), Non-negative Matrix Factorization (NMF) and Independent Component Analysis (ICA). In this work we assume that staining is an additive process. Once a part of a tissue has been stained with a dye, addition of another stain can only increase the staining. The additivity of the stains combined with the physical constraint that each dye color will have a non-negative response in each frequency band implies that A and B are forced to be restricted to the class of non-negative matrices. Methods based on PCA work by enforcing orthogonality constraints on the columns of A and are not well suited for recovering the factorization AS. PCA depends heavily on cancellation effects, i.e. a balancing of positive and negative terms as occurs with Gibbs’ phenomenon in Fourier series. This will result in PCA returning A and S with negative entries which have no physical basis. In the following we shall investigate the use of algorithms based on NMF and ICA. 3.1 Non-negative Matrix Factorization NMF is in principle well suited to the task of color unmixing, as it finds a factorization of X into A and S such that [A, S] = argmin A,S ∥X −AS∥ (2) subject to Aij ≥0, Sij ≥0 The above problem is underconstrained; it has a scale ambiguity. Given a solution [A, S] of the above problem, [αA, S/α] for α ̸= 0 is also a solution to this problem. We solve this problem by constraining each column of A to have unit norm. This does not affect the final solution, since only the proportion of each stain is needed in the final analysis; the exact intensity of the constituent stain is not important. The choice of the norm ∥· ∥decides the particular algorithm used for performing the minimization. We have implemented an iterative algorithm for recovering the non-negative factorization of a matrix due to Seung & Lee [7]. We use the L2 norm as a measure of the error. 3.2 Independent Component Analysis An alternate approach to matrix factorization is Independent Component Analysis (ICA)[4]. While Non-negative Matrix Factorization is based on enforcing a nonnegativity constraint, it says nothing about the image formation process. ICA is based on a generative view of the data, where the data is assumed to be a result of superpositioning a number of stochastically independent processes. In the case of histological staining, this corresponds to assuming that each dye stains the tissue independently of all the other dyes. The rows of the matrix S represent the individual stochastic processes and the columns of A code their interactions. We implemented the Joint Approximate Diagonalization of Eigenmatrices (JADE) algorithm to recover the independent components of X [2]. This algorithm calculates the ICA decomposition of X by calculating the eigenvalue decomposition of the cumulant tensor of the data. The eigenvalues of cumulant tensor are vectors corresponding to the independent components of the mixture. 4 Experimental Results 4.1 Sample Preparation and Data Acqusition The histologically stained tissues used in this study were derived from human biopsies. The tissues were fixed in Bouin’s solution, and embedded in paraffin. Dewaxed tissue sections were exposed to polyclonal antibodies (PAB) generated against synthetic peptides and confirmed to be specific for the proteins of interest. The sections were stained using a diaminobenzidine (DAB)-based detection method employing the Envision-Plus-Horseradish Peroxidase (HRP) system using an automated staining technique [5, 6]. The DAB immunohistochemistry stain used for the tissue samples shown here covers the majority of the visible range of the color spectra under the transmission of white light. Great care must be taken in the acquisition of color images since the extraction of spectral information is highly dependent on the quality of the raw data. Hyperspectral imaging has been shown to be the best means of doing so. A spectral image stack can be acquired using a number of different approaches. We use a setup based on a set of fixed bandpass filters. The filters are placed in the optical path of the light in front of the light source or camera and transmit only the desired wavelength bands. In the following experiments the images were acquired on a scanning cytometer [9, 10, 1] with a 20x, 0.5 NA Fluor Nikon objective lens using a set of 10 equally spaced band pass filters ranging from 413 nm to 663 nm. The dynamic range of each of the spectral bands was maximized by controlling the gain and the exposure of the imaging system. This is required to ensure an accurate hyperspectral-to-RGB reconstruction for result visualization. It is important to note that the gain and exposure coefficients were inverted prior to the unmixing as they have no bearing on the staining process. In order to quantitatively evaluate the decomposition provided by NMF and ICA, we prepared a set of ground truth data using the following procedure. Using a set of four tissue samples, we first applied the DAB stain and captured the hyperspectral image stack. We then added the hematoxylin stain and acquired a second image stack. The second stack serves as the input to our algorithm and the resulting decomposition, which estimates the DAB staining, is compared with the first stack, which serves as the ground truth. We now experimentally evaluate the use of NMF and ICA for the color decomposition problem. While reconstruction error represents a simple quantitative measure, it does not provide a standard for judging how accurately the estimated components represent the dye concentrations. We quantify the performance by comparing the ground truth single-stained image to the corresponding automatically extracted component of the doubly-stained tissue sample. Figure 2 reports the performance of the two algorithms. The error measure used is error = 100 × P i(Ii −ˆIi)2 P i I2 i (3) where the sum is over all pixels, and Ii and ˆIi denote the ground truth and the estimate, respectively. Figure 3 shows the results of applying NMF and ICA to an image patch. NMF ICA set1 18.15 12.81 set2 18.79 14.99 set3 4.47 19.42 set4 5.04 18.12 overall 12.65 18.75 Figure 2: This table shows the percent error for the two unmixing algorithms across the four image sets. The four sets of images are available at http://vision.ucsd.edu/. 5 Discussion The above experiments indicate that both NMF and ICA are capable of performing color decomposition of tissue samples stained with multiple histological dyes. However, there remain a number of sources of error, both during image acquisition as well as in the decomposition stage. These include errors due to imperfect focussing (a) DAB only (b) DAB & Hematoxylin (c) NMF (d) ICA Figure 3: Color unmixing using Non-negative Matrix factorization and Independent Component Analysis. Figure (a) shows a segment of the tissue stained using DAB, (b) shows the same tissue segment with DAB and Hematoxylin staining. The image in figure (b) serves as input to the two unmixing algorithms, the output of which is shown in (c) and (d). Figure (c) shows the DAB stain estimate produced by NMF and (d) shows the DAB staining estimated by ICA in the various spectral bands and distortion in the acquired images which cannot be accounted for by optical flow based alignment methods such as Shi & Tomasi’s algorithm. The principal source of discrepancy between the decomposition and the ground truth images, however, is caused by the chemical interaction between the various dyes used for staining. Measurement error due to dye interaction can be as high as 15%[13]. In this light, both ICA and NMF provide good results, and we expect that improvements in the image acquisition and registration procedure will result in systems capable of delivering performance close to the theoretical optimum. In conclusion, we have addressed the problem of image registration for the planes in a hyperspectral stack for spectral information extraction and we proposed the use of two unsupervised algorithms, Non-negative Matrix Factorization and Independent Component Analysis, for extracting the contributions of various histological stains to the overall spectral composition throughout the tissue sample. We demonstrate the performance of these algorithms by comparing them with ground truth data. We intend to address errors in the image acquisition and registration to further reduce the decomposition error in future work. References [1] M. Bravo-Zanoguera, B. V. Massenbach, A. L. Kellner, and J. H. Price. Highperformance autofocus circuit for biological microscopy. Review of Scientific Instruments, 69(11):3966–3977, 1998. [2] Jean-Fracois Cardoso and Antoine Souloumiac. Blind beamforming for non gaussian signals. IEE Proceedings-F, 140(6), December 1993. [3] B. K. P. Horn and B. G. Schunck. Determining optical flow. Artificial Intelligence, 17:185–204, 1981. [4] A. Hyv¨arinen, J. Karhunen, and E. Oja. Independent Component Analysis. John Wiley & Sons, 2001. [5] S. Krajewski, M. Krajewska, L.M. Ellerby, K. Welsh, Z. Xie, Q.L. Deveraux, G.S. Salvesen, D.E. Bredesen, R.E. Rosenthal, G. Fiskum, and J.C. Reed. Release of caspase - 9 from mitochondria during neuronal apoptosis and cerebral ischemia. Proc Natl Acad Sci USA, 96:5752–5757, 1999. [6] S. Krajewski, M. Krajewska, A. Shabaik, T. Miyashita, H.G. Wang, and J.C. Reed. Immunohistochemical determination of in vivo distribution of Bax, a dominant inhibitor of Bcl - 2. American Journal of Pathology, 145:1323–1236, 1994. [7] D. D. Lee and H. S. Seung. Learning the parts of objects with nonnegative matrix factorization. Nature, 401:788–791, 1999. [8] David Marr. Vision: A Computational Investigation into the Human Representation and Processing of Visual Information. W. H. Freeman & Co., 1983. [9] J. H. Price. Scanning cytometry for cell monolayers. PhD thesis, University of California, San Diego, 1990. [10] J. H. Price, E. A. Hunter, and D. A. Gough. Accuracy of least squares designed spatial fir filters for segmentation of images of flourescence stained cell nuclei. Cytometry, 25:303–316, 1996. [11] Arnout C. Ruifrok and Dennis A. Johnston. Quantification of histochemical staining by color deconvolution. Analyt Quant Cytol Histol, 23:291–299, 2001. [12] Jianbo Shi and Carlo Tomasi. Good features to track. In Proc. IEEE Conf. Comput. Vision and Pattern Recognition, pages 593–600, 1994. [13] R. J. Wordinger, G. W. Miller, and D. S. Nicodemus, editors. Manual of Immunoperoxidase Techniques. Americal Society of Clinical Pathologists, 1985.
2003
172
2,390
Minimising Contrastive Divergence in Noisy, Mixed-mode VLSI Neurons Hsin Chen, Patrice Fleury and Alan F. Murray School of Engineering and Electronics Edinburgh University Mayfield Rd., Edinburgh EH9 3JL, UK {hc, pcdf, afm}@ee.ed.ac.uk Abstract This paper presents VLSI circuits with continuous-valued probabilistic behaviour realized by injecting noise into each computing unit(neuron). Interconnecting the noisy neurons forms a Continuous Restricted Boltzmann Machine (CRBM), which has shown promising performance in modelling and classifying noisy biomedical data. The Minimising-Contrastive-Divergence learning algorithm for CRBM is also implemented in mixed-mode VLSI, to adapt the noisy neurons’ parameters on-chip. 1 Introduction As interests in interfacing electronic circuits to biological cells grows, an intelligent embedded system able to classify noisy and drifting biomedical signals becomes important to extract useful information at the bio-electrical interface. Probabilistic neural computation utilises probability to generalise the natural variability of data, and is thus a potential candidate for underpinning such intelligent systems. To date, probabilistic computation has been unable to deal with the continuous-valued nature of biomedical data, while remaining amenable to hardware implementation. The Continuous Restricted Boltzmann Machine(CRBM) has been shown to be promising in the modelling of noisy and drifting biomedical data[1][2], with a simple Minimising-Contrastive-Divergence(MCD) learning algorithm[1][3]. The CRBM consists of continuous-valued stochastic neurons that adapt their “internal noise” to code the variation of continuous-valued data, dramatically enriching the CRBM’s representational power. Following a brief introduction of the CRBM, the VLSI implementation of the noisy neuron and the MCD learning rule are presented. 2 Continuous Restricted Boltzmann Machine Let si represent the state of neuron i, and wij the connection between neuron i and neuron j. A noisy neuron j in the CRBM has the following form: sj = ϕj X i wijsi + σ · Nj(0, 1) ! , (1) −1 0 1 −1 0 1 −1 0 1 −1 0 1 (a) (b) Figure 1: (a)20 two-dimensional artificial training data (b)20-step reconstruction by the CRBM after 30,000 epochs’ fixed-step training with ϕj(xj) = θL + (θH −θL) · 1 1 + exp(−ajxj) (2) where Nj(0, 1) refers to a unit Gaussian noise with zero mean, σ a noise-scaling constant, and ϕj(·) the sigmoid function with asymptotes at θH and θL. Parameter aj is the “noise-control factor”, controlling the neuron’s output nonlinearity such that a neuron j can learn to become near-deterministic (small aj), continuousstochastic (moderate aj), or binary-stochastic (large aj)[4][1]. A CRBM consists of one visible and one hidden layer of noisy neurons with interlayer connections defined by a weight matrix {W}. By minimizing the “Contrastive Divergence” between the training data and the one-step Gibbs sampled data [3], the parameters {wij} and {aj} evolve according to the following equations [1] ∆ˆ wij = ηw(⟨sisj⟩−⟨ˆsi ˆsj⟩) (3) ∆ˆaj = ηa a2 j s2 j − ˆsj 2  (4) where ˆsi and ˆsj denote the one-step sampled state of neuron i and j respectively, and ⟨·⟩refers to the expectation over all training data. ηw and ηa denote the learning rates for parameters {wij} and {aj}, respectively. Following [5], Eq.(3)and(4) are further simplified to fixed-step directional learning, rather than variable accuratestep learning, as following. ∆ˆ wij = ηwsign ⟨sisj⟩4 −⟨ˆsi ˆsj⟩4  (5) ∆ˆaj = ηasign  s2 j 4 − ˆsj 2 4  (6) Note that the denominator 1/a2 j in Eq.(4) is also absorbed and ⟨·⟩4 indicates that the expectation operator will be approximated by the average of four data as opposed to all training data. To validate the simplification above, a CRBM with 2 visible neurons and 4 hidden neurons was trained to model the two-dimensional data distribution defined by 20 training data (Fig.1a), with ηw = 1.5, ηa = 15 for visible neurons, and ηa = 1 for hidden neurons 1. After 30,000 training updates, the trained CRBM reconstructed the same data distribution (Fig.1b) from 200 initially random-distributed data, indicating that the simplification above reduces the hardware complexity at the cost of a slightly slower convergence time. 1constants θH = −θL = 1 and σ = 0.2 for all neurons V w V sr Mn1 Mn2 V sr V si I o1 I o2 I o3 I o4 Mp2 Mp1 Vw Vsr Vsi I o4 I o3 I o2 I o1 Vw Vsr Vsi I o4 I o3 I o2 I o1 s i s r w i w r Iout M1 M2 M4 M3 M5 M6 (b) (a) Figure 2: The circuits of the four-quadrant multiplier (a)one computing cell (b)full circuit composed of two computing cell 3 Noisy neuron with variable nonlinearity The circuits were fabricated on the AMS 0.6µm 2P3M CMOS process, which allows a power supply voltage of five volts. Therefore, the states of neurons {si} and the corresponding weights {wij} are designed to be represented by voltage in [1.5, 3.5]V and [0,5]V respectively, with both arithmetical zeros at 2.5V. As both si and wij are real numbers, a four-quadrant multiplier is required to calculate wijsi 3.1 Four-quadrant multiplier While the Chible four-quadrant multiplier [6] has a simple architecture with a wide input range, the reference zero of one of its inputs is process-dependent. Though only relative values of weights matter for the neurons, the process-dependent reference becomes nontrivial if the same four-quadrant multiplier is used to implement the MCD learning rule. We thus proposed a ‘modified Chible multiplier’ composed of two computing cells, as shown in Fig.2, to allow external control of reference zeros of both inputs. Each computing cell contains two differential pairs biased by two complementary branches, Mn1-Mn2 and Mp1-Mp2. (Io1−Io2) is thus proportional to (Vw −Vth,n1− nVth,n2)(Vsi −Vsr) when Vw > (Vth,n1 + nVth,n2) 2, and (Io3 −Io4) proportional to (n2V dd−Vw −Vth,p1 −nVth,p2)(Vsr −Vsi) when Vw < (n2V dd−Vth,p1 −nVth,p2)[6]. Subject to careful design of the complementary biasing transistors[6], (Vth,n1 + nVth,n2) ≈(n2V dd −Vth,p1 −nVth,p2) ≈V dd/2. Combining the two differential currents then gives Io = (Io1 + Io3) −(Io2 + Io4) = I(Vw) · (Vsi −Vsr) (7) With wi input to one computing cell and wr to the other cell, as shown in Fig.2b, M1-M6 generates an output current Iout ∝(wi −wr)(si −sr). The measured DC characteristic from a fabricated chip is shown in Fig.4(a) 3.2 Noisy neuron Fig.3 shows the circuit diagram of a noisy neuron. The four-quadrant multipliers output a total current proportional to P i wijsi, while the differential pair, Mna and 2n is the slope factor of MOS transistor, and Vth,x refers to the absolute value of transistor Mx’s threshold voltage. + _ s 1 w 1 s 2 w 2 s i w i v ni V nr V aj Mbp1 Mbp2 V x V sr i n i sum i c1 i c2 I b R L Csj i o V sj V sigma Mna Mnb Figure 3: The circuit diagram of a noisy neuron Mnb, transforms noise voltage vni into a noise current in = gm(vni −Vnr), where Vsigma controls the transconductance gm and thus scales the noise current as σ in Eq.(1). The current-to-voltage converter, composed of an operational amplifier and an voltage-controlled active resistor[7], then sums all currents, outputting a voltage Vx = Vsr −isum · R(Vaj) to the sigmoid function. The exponential nonlinearity of the sigmoid function is achieved by operating the PMOS differential pair, Mbp1-Mbp2, in the lateral-bipolar mode [8], resulting in a differential output current as following io = ic1 −ic2 = Ib · φ(Isum · R(Vaj) Vt ) (8) where φ(·) denotes the ϕ(·) with θH = −θL = 1, and Vt = kT/q is the thermal voltage. The resistor RL finally converts io into a output voltage vo = ioRL + Vsr. Eq.(8) implies that Vaj controls the feedback resistance of the I-V converter, and consequently adapts the nonlinearity of the sigmoid function (which appears as aj in Eq.(1)). With various Vaj, the measured DC characteristic (chip result) of the sigmoid function is shown in Fig.4b. 0.0 2.5 5.0 -3.0µ -2.0µ -1.0µ 0.0 1.0µ 2.0µ 3.0µ Vsi=1.5 Vsi=1.75 Vsi=2.0 Vsi=2.25 Vsi=2.5 Vsi=2.75 Vsi=3.0 Vsi=3.25 Vsi=3.5 Iout (amps) Vw (volts) -50.00µ -25.00µ 0.00 25.00µ 50.00µ 1.5 2.0 2.5 3.0 3.5 Vo (volts) Isum (amps) Vaj=1.0 Vaj=1.4 Vaj=1.8 Vaj=2.2 Vaj=2.6 Vaj=3.0 (a) (b) Figure 4: The measured DC characteristics of (a) four-quadrant multiplier (b)sigmoid function with variable nonlinearity controlled by Vaj (a) (b) Figure 5: (a)The measured output of a noisy neuron (upper trace) and the switching signal (lower trace) that samples Vsj (b) Zooming-in of the second sample in(a) Fig.5 shows the measured output of a noisy neuron (upper trace) with {si} sweeping between 1.5 and 3.5V, {wi}=4V, Vaj=1.8V, and vni generated by LFSR (Linear Feedback Shift Register) [9] with an amplitude of 0.4V. The {si} and {wi} above forced the neuron’s output to sweep a sigmoid-shaped curve as Fig.4b, while the input noise disturbed the curve to achieve continous-valued probabilistic output. A neuron state Vsj was sampled periodically and held with negligible clock feedthrough whenever the switch opened(went low). 4 Minimising-Contrastive-Divergence learning on chip The MCD learning for the Product of Experts[3] has been successfully implemented and reported in [10]. The MCD learning for CRBM is therefore implemented simply by replacing the following two circuits. First, the four-quadrant multiplier described in Sec.3.1 is substituted for the two-quadrant multiplier in [10] to enhance learning flexibility; secondly, a pulse-coded learning circuit, rather than the analogue weightchanging circuit in [10], is employed to allow not only accurate learning steps but also refresh of dynamically-held parameters. 4.1 MCD learning for CRBM Fig.6 shows the block diagram of the VLSI implementation of the MCD learning rules for the noisy neurons, along with the digital control signals. In learning mode (LER/REF=1), the initial states si and sj are first sampled by clock signals CKsi and CKsj, resulting in a current I+ at the output of four-quadrant multiplier. After CK+ samples and holds I+, the one-step reconstructed states ˆsi and ˆsj are sampled by CKsip and CKsjp to produce another current I−. CKq then samples and holds the output of the current subtracter Isub, which represents the difference between initial data and one-step Gibbs sampled data. Repeating the above clocking sequence for four cycles, four Isub are accumulated and averaged to derive Iave, representing ⟨sisj⟩4−⟨ˆsi ˆsj⟩4 in equation(5). Finally, Iave is compared to a reference current to determine the learning direction DIR, and the learning circuit, triggered by CKup, updates the parameter once. The dash-lined box represents the voltagelimiting circuit used only for parameter {aj}, whose voltage range should be limited to ensure normal operation of the voltage-controlled active resistor in Fig.3. In refresh mode (LER/REF=1), the signal REFR rather than DIR determines the updating direction, maintaining the weight to a reference value. Voltage limiter DIR REFR LER/REF Pulse-coded learning circuit i s i s ˆ j s j s ˆ Digital control Current- accumulating/ averaging circuit 3 q 4 q (b) (a) 2 q 1 q Sign + - CKsi CKsip CKsj CKsjp + CK CKq CKup 1 q 4 q V mu CK up C w V max V min V comp I ave I ref I sub CK q CK + CK si CK sip CK sj CK sjp I + I Figure 6: (a)The block diagram of VLSI implementation of MCD learning rules described in Eq.(5)(6) (b)The digital control signals The subtracter, accumulator and current comparator in Fig.6 are dominated by the dynamic current mirror[11] and are the same as those used in [10]. The following subsections therefore focus on the pulse-coded learning circuit and the measurement results of on-chip MCD learning. 4.2 The pulse-coded learning circuit The pulse-coded learning circuit consists of a pulse generator (Fig.7a) and the learning cell proposed in [12] (Fig.7b). The stepsize of the learning cell is adjustable through VP and VN in Fig.7b [12]. However, transistor nonlinearities and process variations do not allow different and accurate learning rates to be set for various parameters in the same chip ({aj} and {wij} in our case). We therefore apply a width-variable pulse to the enabling input (EN) of the learning cell, controlling the learning step precisely by monitoring the pulse width off-chip. As the input capacitance of each learning cell is less than 0.1pF, one pulse generator can control all the learning cells with the same learning rate. The simulation in Sec.2 implies that only three pulse generators are required for ηw, ηav, and ηah. The pulse generator is therefore a simple way to achieve accurate control. The pulse generator is largely a D-type flip-flop whose output Vpulse is initially reset to low via reset. Vpulse then goes high on the rising edge of CKup, while the V P V N EN INC/DEC R D Q Q reset V d V pulse (b) (a) V mu CK up C delay C w Figure 7: The pulse-coded learning circuit composed of (a)a pulse generator and (b)a learning cell proposed in [12] + _ + _ V max V min V aj V comp DIR Figure 8: The voltage-limiting circuit capacitor Cdelay prevents Vd from going from high to low instantly. Eventually, Vpulse is reset to zero as soon as Vd is discharged. During the positive pulse, the learning cell charges or discharges the voltage stored on Cw[12], according to the directional input INC/DEC. Varying Vmu controls the pulse width accurately from 10ns (Vη = 2.5V ) to 5us (Vη = 0.9V ), amounting to learning stepsize from 1mV to 500mV as VN = 0.75V , VP = 4.29V , and Cw = 1pF. 4.3 Voltage-limiting circuit Although Eq.(6) indicates that {aj} can be adapted with the same learning circuit simply by substituting sj and ˆsj for si and ˆsi in Fig.6, the voltage Vaj should be confined in [1,3]V, to ensure normal operation of the voltage-controlled active resistor in Fig.3. A voltage-limiting circuit as shown in Fig.8 is thus designed to limit the range of Vaj, defined by Vmax and Vmin through two voltage comparators. As Vmax > Vaj > Vmi, DIR equals Vcomp, i.e. the MCD learning rule decides the learning direction. However, DIR goes high to enforce decreasing Vaj when Vaj > Vmax > Vmin, while DIR goes low to enforce increasing Vaj when Vmax > Vmin > Vaj. 4.4 On-chip learning Two MCD learning circuits, one for {wij} and the other for {aj}, have been fabricated successfully. Fig.9 shows the measured on-chip learning of both parameters with (a) different learning rates (b) different learning directions. To ease testing, si and ˆsi are fixed at 3.5V, while sj and ˆsj alternate between 1.5V and 3.5V, as shown by the traces SJ and SJ P in Fig.9. With the reference zero being defined at (a) (b) Figure 9: Measurement of parameter aj and wij learning in (a)different learning rates (b)different directions 2.5V, the parameters should learn down when sj=3.5V and ˆsj=1.5V, and learn up when sj=1.5V and ˆsj=3.5V. In Fig.9a, both parameters were initially refreshed to 2.5V when signal LERREF is low, and subsequently started to learn up and down in response to the changing SJ and SJ P as LERREF goes high. As controlled by different pulse widths (PULSE1 and PULSE2), the two parameters were updated with different stepsizes (10mV and 34mV) but in the same direction. The trace of parameter aj shows digital noise attributable to sub-optimal layout, and has been improved in a subsequent design. In Fig.9b, both parameters were refreshed to 3.5V, a voltage higher than Vmax=3V set for aj. Therefore, the learning circuit forces aj to decrease toward Vmax, while wij remains learning up and down as Fig.9a. 5 Conclusion Fabricated CMOS circuits have been presented and the implemention of noisy neural computation that underlies the CRBM has been demonstrated. The promising measured results show that the CRBM is, as has been inferred in the past[1], amenable to mixed-mode VLSI. This makes possible a VLSI system with continuous-valued probabilistic behaviour and on-chip adaptability, adapting its “internal noise” to model the “external noise” in its environment. A full CRBM system with two visible and four hidden neurons has thus been implemented to examine this concept. The neurons in the proof-of-concept CRBM system are hard-wired to each other and the multi-channel uncorrelated noise sources implemented by the LFSR [9]. A scalable design will thus be an essential next step before pratical biomedical applications. Furthermore, the CRBM system may open the possibility of utilising VLSI intrinsic noise for computation in the deep-sub-miron era. References [1] H. Chen and A. Murray, “A continuous restricted boltzmann machine with an implementable training algorithm,” IEE Proc. of Vision, Image and Signal Processing, vol. 150, no. 3, pp. 153–158, 2003. [2] T. Tang, H. Chen, and A. Murray, “Adaptive Stochastic Classifier for Noisy pH-ISFET Measurements,” in Proceedings of Thirteenth International Conference on Artificial Neural Networks (ICANN2003), (Istanbul, Turkey), pp. 638–645, Jun. 2003. [3] G. E. Hinton, “Training products of experts by minimizing contrastive divergence,” Neural Computation, vol. 14, no. 8, pp. 1771–1800, 2002. [4] B. J. Frey, “Continuous sigmoidal belief networks trained using slice sampling,” Advances in Neural Information Processing Systems, vol. 9, pp. 452–458, 1997. [5] A. F. Murray, “Novelty detection using products of simple experts-a potential architecture for embedded systems,” Neural Networks, vol. 14, no. 9, pp. 1257–1264, 2001. [6] H. Chible, “Analog circuit for synapse neural networks vlsi implementation,” The 7th IEEE Int. Conf. on Electronics, Circuits and Systems (ICECS 2000), vol. 2, pp. 1004–1007, 2000. [7] M. Banu and Y. Tsividis, “Floating voltage-controlled resistors in cmos technology,” Electronics Letters, vol. 18, pp. 678–679, 1982. [8] E. Vittoz, “Mos transistors operated in the lateral bipolar mode and their application in cmos technology,” IEEE Journal of Solid-State Circuits, vol. sc-18, no. 3, pp. 273–279, 1983. [9] J. Alspector, J. W. Gannett, S. Haber, M. B. Parker, and R. Chu, “A vlsi-efficient technique for generating multiple uncorrelated noise sources and its application to stochastic neural networks,” IEEE Trans. Circuits and Systems, vol. 38, no. 1, pp. 109–123, 1991. [10] P. Fleury and A. Murray, “Mixed-signal vlsi implementation of the product of experts’ minimizing contrastive divergence learning scheme,” in IEEE Proc. of the Int. Sym. on Circuits and Systems (ISCAS 2003), vol. 5, (Bangkok, Thailand), pp. 653–656, May 2003. [11] G. Wegmann and E. Vittoz, “Basic principles of accurate dynamic current mirrors,” IEE Proc. on Circuits, Devices and Systems, vol. 137, pp. 95–100, April 1990. [12] G. Cauwenberghs, “An analog vlsi recurrent neural network,” IEEE Tran. on Neural Networks, vol. 7, pp. 346–360, Mar. 1996.
2003
173
2,391
Eye Movements for Reward Maximization Nathan Sprague Computer Science Department University of Rochester Rochester, NY 14627 sprague@cs.rochester.edu Dana Ballard Computer Science Department University of Rochester Rochester, NY 14627 dana@cs.rochester.edu Abstract Recent eye tracking studies in natural tasks suggest that there is a tight link between eye movements and goal directed motor actions. However, most existing models of human eye movements provide a bottom up account that relates visual attention to attributes of the visual scene. The purpose of this paper is to introduce a new model of human eye movements that directly ties eye movements to the ongoing demands of behavior. The basic idea is that eye movements serve to reduce uncertainty about environmental variables that are task relevant. A value is assigned to an eye movement by estimating the expected cost of the uncertainty that will result if the movement is not made. If there are several candidate eye movements, the one with the highest expected value is chosen. The model is illustrated using a humanoid graphic figure that navigates on a sidewalk in a virtual urban environment. Simulations show our protocol is superior to a simple round robin scheduling mechanism. 1 Introduction This paper introduces a new framework for understanding the scheduling of human eye movements. The human eye is characterized by a small, high resolution fovea. The importance of foveal vision means that fast ballistic eye movements called saccades are made at a rate of approximately three per second to direct gaze to relevant areas of the visual field. Since the location of the fovea provides a powerful clue to what information the visual system is processing, understanding the scheduling and targeting of eye movements is key to understanding the organization of human vision. The recent advent of portable eye-trackers has made it possible to study eye movements in everyday behaviors. These studies show that behaviors such as driving [1, 2] or navigating a city sidewalk [3] show rapid alternating saccades to different targets indicative of competing perceptual demands. This paper introduces a model of how humans select visual targets in terms of the value of the information obtained. Previous work has modeled the direction of the eyes to targets primarily in terms of visual saliency [4]. Such models fail to incorporate the role of task demands and do not address the problem of resource contention. In contrast, our underlying premise is that much of routine human behavior can be understood in the framework of reward maximization. In other words, humans choose actions by trading off the cost of the actions versus their benefits. Experiments show that the extent to which humans can make such trade-offs is very refined [5]. To keep track of the value of future real rewards such as money or calories, humans use internal chemical rewards such as dopamine [6]. One obvious way of modeling eye movement selection is to use a reinforcement learning strategy directly. However, standard reinforcement learning algorithms are are best suited to handling actions that have direct consequences for a task. Actions such as eye movements are more difficult to put in a reinforcement learning framework because they have indirect consequences: they do not change the state of the environment; they serve only to obtain information. We show a way of overcoming this difficulty while preserving the notion of reward maximization in the scheduling of eye movements. The basic idea is that eye movements serve to reduce uncertainty about environmental variables that are relevant to behavior. A value is assigned to an eye movement by estimating the expected cost of the uncertainty that will result if the movement is not made. If there are several candidate eye movements, the one with the highest potential loss is chosen. We demonstrate these ideas through the example of a virtual human navigating through a rendered environment. The agent is faced with multiple simultaneous goals including walking along a sidewalk, picking up litter, and avoiding obstacles. He must schedule simulated eye movements so as to maximize his reward across the set of goals. We model eye movements as abstract sensory actions that serve to retrieve task relevant information from the environment. Our focus is on temporal scheduling; we are not concerned with the spatial targeting of eye movements. The purpose of this paper is to recast the question of how eye movements are scheduled, and to propose a possible answer. Experiments on real humans will be required to determine if this model accurately describes human behavior. 2 Learning Visually Guided Behaviors Our model of visual control is built around the concept of visual behaviors. Here we borrow the usage of behavior from the robotics community to refer to a sensory-action control module that is responsible for handling a single narrowly defined goal [7]. The key advantage of the behavior based approach is compositionality: complex control problems can be solved by sequencing and combining simple behaviors. For the purpose of modeling human performance it is assumed that each behavior has the ability to direct the eye, perform appropriate visual processing to retrieve the information necessary for performance of the behavior’s task, and choose an appropriate course of action. As long as only one goal is active at a time the behavior based approach is straightforward: the appropriate behavior is put in control and has all the machinery necessary to pursue the goal. However it is often the case that multiple goals must be addressed at once. In this case there is need for arbitration mechanisms to distribute control among the set of active behaviors. In the following sections we will describe how physical control is arbitrated, and building on that framework, how eye movements are arbitrated. Our approach to designing behaviors is to model each behavior’s task as a Markov decision process and then find good policies using reinforcement learning. An MDP is described by a 4-tuple (S, A, T, R), where S is the state space, A is the action space, and T(s, a, s′) is the transition function that indicates the probability of arriving in state s′ when action a is taken in state s. The reward function R(s, a) denotes the expected one-step payoff for taking action a in state s. The goal of reinforcement learning algorithms is to discover an optimal policy π∗(s) that maps states to actions so as to maximize discounted long term reward. Generally, we do not assume prior knowledge of R and T. One approach to finding optimal policies for MDPs is based on discovering the optimal value function Q(s, a). This function denotes the expected discounted return if action a is taken in state s and the optimal policy is followed thereafter. If Q(s, a) is known then the learning agent can behave optimally by always choosing arg maxa Q(s, a). There are a number of algorithms for learning Q(s, a) [8, 9] the simplest is to take random actions in the environment and use the Q-learning update rule: Q(s, a) ←(1 −α)Q(s, a) + α(r + γ max a′ Q(s′, a′)) Here α is a learning rate parameter, and γ is a term that determines how much to discount future reward. As long as each state-action pair is visited infinitely often in the limit, this update rule is guaranteed to converge to the optimal value function. A benefit of knowing the value function for each behavior is that the Q-values can be used to handle the arbitration problem. Here we assume that the behaviors share an action space. In order to choose a compromise action, it is assumed that the Q-function for the composite task is approximately equal to the sum of the Q-functions for the component tasks: Q(s, a) ≈ n X i=1 Qi(si, a), (1) where Qi(si, a) represents the Q-function for the ith active behavior. The idea of using Q-values for multiple goal arbitration was independently introduced in [10] and [11]. The real world interactions that this model is meant to address are best expressed through continuous rather than discrete state variables. The theoretical foundations of value based continuous state reinforcement learning are not as well established as for the discrete state case. However empirical results suggest that good results can be obtained by using a function approximator such as a CMAC along with the Sarsa(0) learning rule: [12] Q(s, a) ←(1 −α)Q(s, a) + α(r + γQ(s′, a′)) This rule is nearly identical to the Q-learning rule, except that the max action is replaced by the action that is actually observed on the next step. The Q-functions used throughout this paper are learned using this approach. For reasons of space this paper will not include a complete description of the training procedure used to obtain the Q-functions for the sidewalk task. More details can be found in [13] and [14]. 3 A Composite Task: Sidewalk Navigation The components of the sidewalk navigation task are to stay on the sidewalk, avoid obstacles, and pick up litter. This was chosen as a good example of a task with multiple goals and conflicting demands. Our sidewalk navigation model has three behaviors, sidewalk following, obstacle avoidance, and litter collection. These behaviors share an action space composed of three actions: 15o right turn, 15o left turn, and no turn (medium gray, dark gray, and light gray arrows in Figure 1). During the sidewalk navigation task the virtual human walks forward at a steady rate of 1.3 meters per second. Every 300ms a new action is selected according to the action selection mechanism summarized in Equation (1). Each of the three behaviors has a two dimensional state space. For obstacle avoidance the state space is comprised of the distance and angle, relative to the agent, to the nearest obstacle. The litter collection behavior uses the same parameterization for the nearest litter item. For the sidewalk following behavior the state space is the angle of the center-line of the sidewalk relative to the agent, as well as the signed distance to the center of the sidewalk, where positive values indicate that the agent is to the left of the center, and negative values indicate that the agent is to the right. All behaviors use the log of distance in order to −90.0 −30.0 30.0 90.0 −Inf −0.29 0.29 Inf 0 5 angle distance value −50.0 −16.7 16.7 50.0 −0.00 1.17 3.17 Inf 0 2 angle distance value −50.0 −16.7 16.7 50.0 −0.00 1.17 3.17 Inf angle distance −50.0 −16.7 16.7 50.0 −0.00 1.17 3.17 Inf 36 38 angle distance value −90.0 −30.0 30.0 90.0 −Inf −0.29 0.29 Inf angle distance −50.0 −16.7 16.7 50.0 −0.00 1.17 3.17 Inf angle distance a) b) c) e) f) d) Figure 1: Q-values and policies for the three behaviors. Figures a)-c) show maxa Q(s, a) for the three behaviors: a) obstacle avoidance, b) sidewalk following and c) litter collection. Figures d)-f) show the corresponding policies for the three behaviors. Empty regions indicate areas that were not seen often enough during training to compute reliable values. devote more of the state representation to areas near the agent. The agent receives two units of reward for every item of litter collected , one unit for every time step he remains on the sidewalk, and four units for every time step he does not collide with an obstacle. Figure 1 shows a representation of the Q-functions and policies for the three behaviors. The behaviors use simple sensory routines to retrieve the relevant state information from the environment. The sidewalk following behavior searches for pixels at the border of the sidewalk and the grass, and finds the most prominent line using a hough transform. The litter collection routine uses color based matching to find the location of litter items. The obstacle avoidance routines refers to the world model directly to compute a rough depth map of the area ahead, and from that extracts the position of the nearest obstacle. 4 Eye Movements and Internal Models The discussion above assumed that the MDPs have perfect state information. In order to model limited sensory capacity this assumption must be weakened. Without perfect information the component tasks are most accurately described as partially observable MDPs. The Kalman filter [15] solves the problem of tracking a discrete time, continuous state variable in the face of noise in both measurements and in the underlying process being tracked. It allows us to represent the consequences of not having the most recent information from an eye movement. The Kalman filter has two properties that are important in this respect. One is that it not only maintains an estimate of the state variable, it also maintains an estimate of the uncertainty. With this information the behaviors may treat their state estimates as continuous random variables with known probability distributions. The other useful property of the Kalman filter is that it is able to propagate state estimates in the absence of sensory information. The state estimate is updated according to the system dynamics, and the uncertainty in the estimate increases according to the known process noise. In order to simulate the fact that only one area of the visual field may be foveated, only one behavior is allowed access to perception during each 300ms time step. That behavior updates its Kalman filter with a measurement, while the others propagate their estimates and track the increase in uncertainty. In order to simulate noise in the estimator, the state estimates are corrupted with zero-mean normally distributed noise at each time step. Since the agent does not have perfectly up to date state information, he must select the best action given his current estimates of the state. A reasonable way of selecting an action under uncertainty is to select the action with the highest expected return. Building on Equation (1) we have the following: aE = arg maxa E[Pn i=1 Qi(si, a)], where the expectation is computed over the state variables for the behaviors. By distributing the expectation, and making a slight change to the notation we can write this as: aE = arg max a n X i=1 QE i (si, a), (2) where QE i refers to the expected Q-value of the ith behavior. In practice we will estimate expectations by sampling from the distributions provided by the Kalman filter. Selecting the action with the highest expected return does not guarantee that the agent will choose the best action for the true state of the environment. Whenever the agent chooses an action that is sub-optimal for the true state of the environment, he can expect to lose some return. We can estimate the expected loss as follows: loss = E[max a X Qi(si, a)] −E[ X Qi(si, aE)]. (3) The term on the left-hand side of the minus sign expresses the expected return that the agent would receive if he were able to act with knowledge of the true state of the environment. The term on the right expresses the expected return if the agent is forced to choose an action based on his state estimate. The difference between the two can be thought of as the cost of the agent’s current uncertainty. This value is guaranteed to be positive, and may be zero if all possible states would result in the same action choice. The total expected loss does not help to select which of the behaviors should be given access to perception. To make this selection, the loss value needs to be broken down into the losses associated with the uncertainty for each particular behavior b: lossb = E  max a  Qb(sb, a) + X i∈B,i̸=b QE i (si, a)  − X i QE i (si, aE). (4) Here the expectation on the left is computed only over sb. The value on the left is the expected return if sb were known, but the other state variables were not. The value on the right is the expected return if none of the state variables are known. The difference is interpreted as the cost of the uncertainty associated with sb. Given that the Q functions are known, and that the Kalman filters provide distributions over the state variables, it is straightforward to estimate lossb for each behavior b by sampling. This value is then used to select which behavior will make an eye movement. Figure 2 gives an example of several steps of the sidewalk task, the associated eye movements, and the state estimates. The eye movements are allocated to reduce the uncertainty where it has the greatest potential negative consequences for reward. For example, the agent fixates the obstacle as he draws close to it, and shifts perception to the other two behaviors when the obstacle has been safely passed. It is important to recognize that the procedures outlined above for selecting actions and allocating perception are only approximations. Since the Q-tables were trained under the assumption of perfect state information, they will be somewhat inaccurate under conditions of partial observability. Note also that the behaviors actually employ multiple Kalman filters. For example if the obstacle avoidance behavior sees two obstacles it will initialize a filter for each. However, only the single closest object is used to determine the state for the purpose of action selection and scheduling eye movements. TIME b) a) LC SF OA Figure 2: a) An overhead view of the virtual agent during seven time steps of the sidewalk navigation task. The two darker cubes are obstacles, and the lighter cube is litter. The rays projecting from the agent represent eye movements; gray rays correspond to obstacle avoidance, black rays correspond to sidewalk following, and white correspond to litter collection. b) State estimates during the same seven time steps. The top row shows the agent’s estimates of the obstacle location. The axes here are the same as those presented in Figure 1. The light gray regions correspond to the 90% confidence bounds before any perception has taken place. When present, the black regions correspond to the 90% confidence bounds after an eye movement has been made. The second and third rows show the corresponding information for the sidewalk following and litter collection tasks. 5 Results In order to test the effectiveness of the loss minimization approach, we compare it to two alternative scheduling mechanisms: round robin, which sequentially rotates through the three behaviors, and random, which makes a uniform random selection on each time step. Round robin might be expected to perform well in this task, because it is optimal in terms of minimizing long waits across the three behaviors. The three strategies are compared under three different conditions. In the default condition exactly one behavior is given access to perception on each time step. The other two conditions investigate the performance of the system under increasing perceptual load. During these trials 33% or 66% of steps are randomly selected to have no perceptual action at all. For the default condition the average per-step reward is .034 higher for the loss minimization scheduling than for the round robin scheduling. Two factors make this difference more substantial than it first appears. The first is that the reward scale for this task does not start at zero: when taking completely random actions the agent receives an average of 4.06 units of reward per step. Therefore the advantage of the loss minimization approach is a full 3.6% over round robin, relative to baseline performance. The second factor to consider is the sheer number of eye movements that a human makes over the course of a day: a conservative estimate is 150,000. The average benefit of properly scheduling a single eye movement may be small, but the cumulative benefit is enormous. To 0% 33% 66% 4.8 4.85 4.9 4.95 5 5.05 5.1 average reward percent eye movements blocked loss−min round robin random Figure 3: Comparison of loss minimization scheduling to round robin and random strategies. For each condition the agent is tested for 500 trials lasting 20 seconds each. In the 33% and 66% conditions the corresponding percentage of eye movements are randomly blocked, and no sensory input is allowed. The error bars represent 95% confidence intervals. The dashed line at 5.037 indicates the average reward received when all three behaviors are given access to perception at each time step. This can be seen as an upper bound on the possible reward. make this point more concrete, notice that over a period of one hour of sidewalk navigation the agent will lose around 370 units of reward if he uses round robin instead of the loss minimization approach. In the currency of reward this is equal to 92 additional collisions with obstacles, 184 missed litter items, or two additional minutes spent off the sidewalk. Under increasing perceptual load the loss minimization strategy begins to lose its advantage over the other two techniques. This could be because the Q-tables become increasingly inaccurate as the assumption of perfect state information becomes less valid. 6 Related Work The action selection mechanism from Equation (2) is essentially a continuous state version of the Q-MDP algorithm for finding approximate solutions to POMDPs [16]. Many discrete POMDP solution and approximation techniques are built on the idea of maintaining a belief state, which is a probability distribution over the unobserved state variables. The idea behind the Q-MDP algorithm is to first solve the underlying MDP, and then choose actions according to arg maxa P s bel(s)Q(s, a), where bel(s) is the probability that the system is in state s and Q(s, a) is the optimal value function for the underlying MDP. The main drawback of the Q-MDP algorithm is that it does not specifically seek out actions that reduce uncertainty. In this work the Kalman filters serve precisely the role of maintaining a continuous belief state, and the problem of reducing uncertainty is handled through the separate mechanism of choosing eye movements to minimize loss. The gaze control system introduced in [17] also addresses the problem of perceptual arbitration in the face of multiple goals. The approach taken in that paper has many parallels to the work presented here, although the focus is on robot control rather than human vision. 7 Discussion and Conclusions Any system for controlling competing visuo-motor behaviors that all require access to a sensor such as the human eye faces a resource allocation problem. Gaze cannot be two places at once and therefore has to be shared among the concurrent tasks. Our model resolves this difficulty by computing the cost of having inaccurate state information for each active behavior. Reward can be maximized by allocating gaze to the behavior that stands to lose the most. As the simulations show, the performance of the algorithm is superior both to the round robin protocol and to a random allocation strategy. It is possible for humans to examine locations in the visual scene without overt eye movements. In such cases our formalism would still be relevant to the covert allocation of visual resources. Finally, although the expected loss protocol is developed for eye movements, the computational strategy is very general and extends to any situation where there are multiple active behaviors that must compete for information gathering sensors. Acknowledgments This material is based upon work supported by grant number P200A000306 from the Department of Education, grant number 5P41RR09283 from the National Institutes of Health and a grant number E1A-0080124 from the National Science Foundation. References [1] M. F. Land and D. Lee. Where we look when we steer. Nature, 377, 1994. [2] H. Shinoda, M. Hayhoe, and A. S Shrivastava. The coordination of eye, head, and hand movements in a natural task. Vision Research, 41, 2001. [3] D. Ballard and N. Sprague. Attentional resource allocation in extended natural tasks [abstract]. Journal of Vision, 2(7):568a, 2002. [4] L. Itti and C. Koch. Computational modeling of visual attention. Nature Reviews Neuroscience, 2(3):194–203, Mar 2001. [5] L. Maloney and M. Landy. When uncertainty matters: the selection of rapid goal-directed movements [abstract]. Journal of Vision, (to appear). [6] P. Waelti, A. Dickinson, and W. Schultz. Dopamine responses comply with basic assumptions of formal learning theory. Nature, 412, July 2001. [7] Rodney A. Brooks. A robust layered control system for a mobile robot. IEEE Journal of Robotics and Automation, RA-2(1):14–23, April 1986. [8] Leslie P. Kaelbling, Michael L. Littman, and Andrew W. Moore. Reinforcement learning: A survey. Journal of Artificial Intelligence Research, 4:237–285, 1996. [9] R.S. Sutton and A.G. Barto. Reinforcement Learning: An Introduction. MIT Press, 1998. [10] M. Humphrys. Action selection methods using reinforcement learning. In Proceedings of the Fourth International Conference on Simulation of Adaptive Behavior, 1996. [11] J. Karlsson. Learning to Solve Multiple Goals. PhD thesis, University of Rochester, 1997. [12] R. Sutton. Generalization in reinforcement learning: Successful examples using sparse coarse coding. In Advances in Neural Information Processing Systems, volume 8, 1996. [13] N. Sprague and D. Ballard. Multiple-goal reinforcement learning with modular sarsa(0). In International Joint Conference on Artificial Intelligence, August 2003. [14] N. Sprague and D. Ballard. Multiple goal learning for a virtual human. Technical Report 829, University Of Rochester Computer Science Department, 2004. [15] R. E. Kalman. A new approach to linear filtering and prediction problems. Transactions of the ASME–Journal of Basic Engineering, 82(Series D):35–45, 1960. [16] A. Cassandra. Exact and approximate algorithms for partially observable Markov decision processes. PhD thesis, Brown University, 1998. [17] J. F. Seara, K. H. Strobl, E. Martin, and G. Schmidt. Task-oriented and sitaution-dependent gaze control for vision guided autonomous walking. In Proceedings of the 3rd IEEE-RAS International Conference on Humanoid Robots, 2003.
2003
174
2,392
Estimating Internal Variables and Parameters of a Learning Agent by a Particle Filter Kazuyuki Samejima Kenji Doya Department of Computational Neurobiology ATR Computational Neuroscience laboratories; “Creating the Brain”, CREST, JST. “Keihan-na Science City”, Kyoto, 619-0288, Japan {samejima, doya}@atr.jp Yasumasa Ueda Minoru Kimura Department of Physiology, Kyoto Prefecture University of Medicine, Kyoto, 602-8566, Japan {yasu, mkimura}@basic.kpu-m.ac.jp Abstract When we model a higher order functions, such as learning and memory, we face a difficulty of comparing neural activities with hidden variables that depend on the history of sensory and motor signals and the dynamics of the network. Here, we propose novel method for estimating hidden variables of a learning agent, such as connection weights from sequences of observable variables. Bayesian estimation is a method to estimate the posterior probability of hidden variables from observable data sequence using a dynamic model of hidden and observable variables. In this paper, we apply particle filter for estimating internal parameters and metaparameters of a reinforcement learning model. We verified the effectiveness of the method using both artificial data and real animal behavioral data. 1 Introduction In neurophysiology, the traditional approach to discover unknown information processing mechanisms is to compare neuronal activities with external variables, such as sensory stimuli or motor output. Recent advances in computational neuroscience allow us to make predictions on neural mechanisms based on computational models. However, when we model higher order functions, such as attention, memory and learning, the model must inevitably include hidden variables which are difficult to infer directly from externally observable variables. Although the assessment of the plausibility of such models depends on the right estimate of the hidden variables, tracking their values in an experimental setting is a difficult problem. For example, in learning agents, hidden variables such as connection weights change in time. In addition, the course of learning is modulated by hidden meta-parameters such as the learning rate. The goal of this study is two-fold: First to establish a method to estimate hidden variables, including meta-parameters from observable experimental data. Second to provide a method for objectively selecting the most plausible computational model out of multiple candidates. We introduce a numerical Bayesian estimation method, known as particle filtering, to estimate hidden variables. We validate this method with a reinforcement learning task. 2 Reinforcement learning model as an animal and a human decision processes Reinforcement learning can be a model of animal or human behaviors based on reward delivery. Notably, the response of monkey midbrain dopamine neurons are successfully explained by the temporal differnce (TD) error of reinforcement learning models [2]. The goal of reinforcement learning is to improve the policy so that the agent maximizes rewards in the long run. The basic strategy of reinforcement learning is to estimate cumulative future reward under the current policy as the value function and then to improve the policy based on the value function. A standard algorithm of reinforcement learning is to learn the action-value function, Q(st, at) = E " ∞ X τ=t γ(τ−t)rτ|st, at # , (1) which estimates the cumulative future reward when action a is taken at a state . The discount factor 0 < γ < 1 is a meta-parameter that controls the time scale of prediction. The policy of the learner is then given by comparing action-values, e.g. according to Boltzman distribution P(a|st) = exp βQ(st, a) P ˜a∈A exp βQ(st, ˜a), (2) where the inverse temperature β > 0 is another meta-parameter that controls randomness of action selection. From an experience of state st, action at, reward rt, and next state st+1, the action-value function is updated by Q-learning algorithm [1] as δT D(t) = rt + γ max a∈A Q(st+1, a) −Q(st, at) Q(st, at) ←Q(st, at) + αδT D(t) (3) where α > 0 is the meta-parameter that controls learning rate. Thus this simple reinforcement learning modol has three meta-paramters, α,β and γ Such a reinforcement learning model does not only predict subject’s actions, but also predicts internal process of the brain, which may be recorded as neural firing or brain imaging data. However, a big problem is that the predictions are depended on the setting of meta-parameters, such as learning rate α, action randomness β and discount factor γ. 3 Bayesian estimation of hidden variables of reinforcement learning agent Let us consider a problem of estimating the time course of action-values {Qt(s, a); s ∈ S, s ∈A, 0 ≤t ≤T} and meta-parameters α, β , and γ of reinforcement learner by only observing the sequence of states st, actions at and rewards rt. We use a Bayesian method of estimating a dynamic hidden variable {xt; t ∈N} from sequence of observable variable {yt; t ∈N}. We assume that the hidden variable follows a Markov process st at Qt γ t αt β t r t st+1 at+1 Qt+1 γ t+1 αt+1 β t+1 r t+1 Observable variables Hidden parameters metaparameters Decision Update State transition Get reward Figure 1: A Bayesian network representation of a Q-learning agent: dynamics of observable and unobservable variable is depended on decision, reward probability, state transition, and update rule for value function. Circles: hidden variable. Double box: observable variable. Arrow: probabilistic dependency of initial distribution p(x0) and the transition probability p(xt+1|xt). The observations {yt; t ∈N} are assumed to be conditionally independent given the process {xt; t ∈N} and has the marginal distribution p(yt|xt). The problem is to estimate recursively in time the posterior distribution of hidden variable p(x0:t|y1:t), where x0:t = {x0, . . . , xt} and y1:t = {y1, . . . , yt}. The marginal distribution is given by recursive procedure of the following prediction and updating, Predicdion : p(xt|y1:t−1) = Z p(xt|xt−1)p(xt−1|y1:t−1)dxt−1, Updating : p(xt|y1:t) = p(yt|xt)p(xt|y1:t−1) R p(yt|xt)p(xt|y1:t−1)dxt . We use a numerical method called particle filter [3] to approximate this process. In the particle filter, the distributions of sequence of hidden variables p(x0:t|y1:t) are represented by a set of random samples, called “particles”. Figure 1 is the dynamical Bayesian network representation of a Q-learning agent. The hidden variable xt consists of the action-values Q(s, a) for each state-action pair, learning rate α, inverse temperature β, and discount factor γ. The observable variable yt consists of the state st, action at, and reward rt. The marginal distribution p(yt|xt) of observation process is given by the softmax action selection probability (2) combined with the state transition rule and the reward condition p(rt+1|st, at) given by the environment. The transition probability p(st+1|st, at) of the hidden variable is given by the Q-learning rule (3) and an assumption about the metaQ(t) a(t) a(t+1) r(t) r(t+1) α(t) β(t) α(t+1) β(t+1) Q(t+1)) Figure 2: Simplified Bayesian network for the two-armed bandit problem. parameter dynamics. Here we assume that meta-parameters are constant with small drifts. Because α, β and γ should all be positive, we assume random-walk dynamics in logarithmic space log(xt+1) = log(xt) + εx, εx ∼N(0, σx) (4) where σx is a meta-meta-parameter that defines variability of the meta-parameter x ∈ {α, β, γ}. 4 Simulations 4.1 Two armed bandit problem with block wise reward change In order to test the validity of the proposed method, we use a simple Q-leaning agent that learns a two armed bandit problem [1]. The task has only one state, two actions, and stochastic binary reward. The reward probability for each action is fixed in a block of 100 trials. The reward probabilities Pr1 for action a = 1 and Pr2 for action a = 2 are selected randomly from three settings; {Pr1, Pr2} = {0.1, 0.9}, {0.50.5}, {0.9, 0.1} at the beginning of each block. The Q-learning agent tries to learn reward expectation of each action and maximize reward acquired in each block. Because the task has only one state, the agent does not need to take into account next state’s value, and thus, we set the discount factor as γ = 0. The Bayesian network for this example is simplified as Figure 2. Simulated actions are selected according to Boltzman distribution (2) using action-values Q(a = 1) and Q(a = 2), and the inverse temperature β. The action values are updated by equation (3) with the action at, reward rt, and learning rate α. 4.2 Result We used 1000 particles for approximating the distribution of hidden variable x = (Q(a = 1), Q(a = 2), log(α), log(β)). We set the initial distribution of particles as Gaussian distribution with the mean {0, 0, 0, 0} and the variance {1, 1, 3, 1} for {Q(a = 1), Q(a = 2), log(α), log(β)}, respectively. We set the meta-meta-parameters for learning rate as σα = 0.05 , and inverse temperature as σβ = 0.005 . The reward is r = 5 when delivered, and otherwise r = 0. Figure 3(a) shows the simulated actions and rewards of 1000 trials by Q-learning agent with α = 0.05 and β = 1. From this observable sequence of yt = (st, at, rt), the particle filter estimated the time course of action-values, Qt(a = 1) and Qt(a = 2), learning rate αt and inverse temperature βt. The expected values of the marginal distribution of these hidden variables (Figure 3(b)-(e) solid line) are in good agreement with the true value (Figure 3(b)-(e) dotted line) recorded in simulation. Although the initial estimates were inevitable inaccurate, the particle filter are good estimation of each variable after about 200 observations. To test robustness of the particle filter approach, we generated behavioral sequences of Qlearners with different combinations of α = {0.01, 0.15, 0.1, 0.5} and β = {0.5, 1, 2, 4}, and estimated meta-parameters α and β. Even if we set a broad initial distribution of α and β, the expectation value of the estimated values are in good agreement with the true value. When the agent had the smallest learning rate α = 0.01, the particle filter tended to underestimated β and overestimated α. 5 Application to monkey behavioral data We applied the particle filter approach to monkey behavioral data of the two-armed bandit problem [4]. In this task, the monkey faces a lever that can be turned to either left or right. After adjusting a lever at center position and holding it for one second, the monkey turned the lever to left or right based on the reward probabilities assigned on each direction of lever turn. Probabilities [PL, PR] of reward delivery on the left and right turns, respectively were varied across three trial blocks as: [PL, PR]=[0.5, 0.5]; [0.1, 0.9]; [0.9, 0.1]. In each block, the monkeys shifted selection to the direction with higher reward probability. We used 1000 particles and Gaussian initial distribution with the mean (2,2,3,0) and the variance (2,2,1,1) for x = (Q(R), Q(L), log(α), log(β)). We set the meta-metaparameters for learning rate as σα = 0.05 , and for inverse temperature as σβ = 0.001 . The reward was r = 5 when delivered, and otherwise r = 0. Figure 5(a) shows the sequence of selected actions and rewards in a day. Figure 5(b) shows the estimated action-values Q(a = L) and Q(a = R) for the left and right lever turns. The estimated action value Q(L) for left action increased in the blocks of [PL, PR] = [0.9, 0.1], decreased in the blocks of [0.1, 0.9], and fluctuated in the blocks of [0.5, 0.5]. We tested whether the estimated action-value and meta-parameters could reproduce the action sequences. We quantified the prediction performance of action sequences by the likelihood of the action data given the estimated model, Lt = 1 N −T + 1 N X t=T log ˆp(a = at|{a1, r1, · · · , at−1, rt−1}, M, θt), (5) where ˆp(a) is estimated probability of action at t by model M and estimated parameters θt from the sequence of past experience {a1, r1, · · · , at−1, rt−1}. Figure 6(b) shows the distribution of the likelihood computed for the action data of 74 sessions. We compared the predictability of the proposed method, Q-learning model with Trials Trials [0 . 1 , 0 . 9 ] [0 . 1 , 0 . 9 ] [0 . 9 , 0 . 1 ] [0 . 1 , 0 . 9 ] [0 . 9 , 0 . 1 ] Figure 3: Estimation of hidden variables by simulated actions and rewards of Q-learning agent. (a) Sequence of simulated actions and rewards by Q-learning agent: Circles are rewarded trials. Dots are non-rewarded trials; (b)-(e) Time course of the hidden variables of the model (dotted line) and of the expectation value (solid line) of estimation by particle filter; (b)(c) Q-values for each action, (d) learning rate , and (e) action randomness . Shaded areas indicate the blocks of [0.9, 0.1] or [0.1, 0.9]. White areas indicate [0.5, 0.5]. 10 -2 10 -1 10 0 Figure 4: Expected values of estimated meta-parameter from the 1000 trials generated with different settings. The side boxes show initial distribution of particles. (a) (b) Trials [0.9 0.1] [0.1 0.9] [0.1 0.9] [0.9 0.1] [0.1 0.9] Block Q(left) Q(right) 0 100 200 300 400 500 600 700 0 100 200 300 400 500 600 700 0 2 4 0 100 200 300 400 500 600 700 10 -4 10-2 100 0 100 200 300 400 500 600 700 1 2 0.2 Left Right Q α β (c) (d) Figure 5: Expected values of estimated hidden variables by animal behavioral data: (a) action and reward sequences; Circles are rewarded trials; Dots indicate no rewarded trials. (b)-(d) Estimated value of (b) action value function , (c) learning rate, and (d) action randomness. Shaded areas indicate the blocks of [0.9, 0.1] or [0.1, 0.9]. White areas indicate [0.5, 0.5]. -0.662 -0.664 -0.666 -0.668 -0.67 -0.672 -0.674 -0.676 Maximum likelihood point (Optimal meta-parameter) (a) (b) Figure 6: Comparing models: (a) An example of contour plot of log likelihood for predicted action by a fixed meta-parameter Q-learning model. Fixed meta-parameter method needs to find the optimal learning rate α and the inverse temperature β. (b) Distributions of log likelihood of action prediction by proposed particle filter method and by fixed metaparameter Q-learning model with the optimal meta-parameter: The top and bottom limits of each box show the lower quartile and the upper quartile, and the center of the notch is the median. Crosses indicate outliers. Boxplot notches show the 95% confidence interval for the median. The median of log likelihood of action prediction by proposed method is significantly larger than one by the fixed meta-parameter method ( Wilcoxon signed rank test; p < 0.0001). estimating meta-parameters by particle filtering, to the fixed meta-parameter Q-learning model, which used the fixed optimal learning rate α and inverse temperature β in the meaning of maximizing likelihood of action prediction in a session (Figure 6(a)). The particle filter could predict actions better than fixed meta-parameter Q-learning model with the optimal meta-parameter (Wilcoxon signed rank test; p < 0.0001). This result indicated that the particle filtering method successfully track the change of the metaparameters, the learning rate α and the inverse temperature β, through the sessions. 6 Discussion An advantage of the proposed particle filter method is that we do not have to hand-tune meta-parameter, such as learning rate. Although we still have to set the meta-meta- parameters, which defines dynamics of meta-parameters, the behavior of the estimates are less sensitive to their settings, compared to the setting of the meta-parameters. Dependency on the initial distribution of the hidden variables decreases with increasing number of data. An extension of this study would be to model selection objectively using a hierarchical Bayesian approach. For example, the several possible reinforcement learning models, e.g. Q-learning, Sarsa algorithm or policy gradient algorithm, could be compared in term of measure of the posterior probability of models. Recently, computational models with heuristic meta-parameters have been successfully used to generate regressors for neuroimaging data [5]. Bayesian method enables generating such regressors in a more objective, data-driven manner. We are going to apply the current method for characterizing neural recording data from the monkey. 7 Conclusion We proposed a particle filter method to estimate internal parameters and meta-parameters of a reinforcement learning agent from observable variables. Our method is a powerful tool for interpreting neurophysiological and neuroimaging data in light of computational models, and to build better models in light of experimental data. Acknowledgments This research was conducted as part of ‘Research on Human Communication’; with funding from the Telecommunications Advancement Organization of Japan References [1] Sutton RS & Barto AG (1998) Reinforcement Learning: An Introduction, MIT Press, Cambridge, MA. [2] Schultz W, Dayan P, Montague PR (1997) A neural substrate of prediction and reward. Science. 14;275(5306):1593-1599 [3] Doucet A, de Freitas N and Gordon. N, (2001) An introduction to sequential Monte Carlo methods, In Sequential Monte Carlo Methods in Practice, Doucet A, de Freitas N & Gordon N eds, Springer-Verlag, pp.3-14. [4] Ueda Y, Samejima K, Doya K, & Kimura M (2002) Reward value dependent striate neuron activity of monkey performing trial-and-error behavioral decision task, Abst. of Soc Neurosci, 765.13. [5] O’Doherty, Dayan P, Friston K , Critchley H and Dolan R (2003) Temporal difference models and reward-related learning in human brain, Neuron 28, 329-337.
2003
175
2,393
ICA-Based Clustering of Genes from Microarray Expression Data Su-In Lee* and Serafim Batzoglou§ *Department of Electrical Engineering §Department of Computer Science Stanford University, Stanford, CA 94305 silee@stanford.edu, serafim@cs.stanford.edu Abstract We propose an unsupervised methodology using independent component analysis (ICA) to cluster genes from DNA microarray data. Based on an ICA mixture model of genomic expression patterns, linear and nonlinear ICA finds components that are specific to certain biological processes. Genes that exhibit significant up-regulation or down-regulation within each component are grouped into clusters. We test the statistical significance of enrichment of gene annotations within each cluster. ICA-based clustering outperformed other leading methods in constructing functionally coherent clusters on various datasets. This result supports our model of genomic expression data as composite effect of independent biological processes. Comparison of clustering performance among various ICA algorithms including a kernel-based nonlinear ICA algorithm shows that nonlinear ICA performed the best for small datasets and natural-gradient maximization-likelihood worked well for all the datasets. 1 Introduction Microarray technology has enabled genome-wide expression profiling, promising to provide insight into underlying biological mechanism involved in gene regulation. To aid such discoveries, mathematical tools that are versatile enough to capture the underlying biology and simple enough to be applied efficiently on large datasets are needed. Analysis tools based on novel data mining techniques have been proposed [1]-[6]. When applying mathematical models and tools to microarray analysis, clustering genes that have the similar biological properties is an important step for three reasons: reduction of data complexity, prediction of gene function, and evaluation of the analysis approach by measuring the statistical significance of biological coherence of gene clusters. Independent component analysis (ICA) linearly decomposes each of N vectors into M common component vectors (N≥M) so that each component is statistically as independent from the others as possible. One of the main applications of ICA is blind source separation (BSS) that aims to separate source signals from their mixtures. There have been a few attempts to apply ICA to the microarray expression data to extract meaningful signals each corresponding to independent biological process [5]-[6]. In this paper, we provide the first evidence that ICA is a superior mathematical model and clustering tool for microarray analysis, compared to the most widely used methods namely PCA and k-means clustering. We also introduce the application of nonlinear ICA to microarray analysis, and show that it outperforms linear ICA on some datasets. We apply ICA to microarray data to decompose the input data into statistically independent components. Then, genes are clustered in an unsupervised fashion into non-mutually exclusive clusters. Each independent component is assigned a putative biological meaning based on functional annotations of genes that are predominant within the component. We systematically evaluate the clustering performance of several ICA algorithms on four expression datasets and show that ICA-based clustering is superior to other leading methods that have been applied to analyze the same datasets. We also proposed a kernel based nonlinear ICA algorithm for dealing with more realistic mixture model. Among the different linear ICA algorithms including six linear and one nonlinear ICA algorithm, the natural-gradient maximum-likelihood estimation method (NMLE) [7]-[8] performs well in all the datasets. Kernel-based nonlinear ICA method worked better for three small datasets. 2 Mathematical model of genome-wide expression Several distinct biological processes take place simultaneously inside a cell; each biological process has its own expression program to up-regulate or down-regulate the level of expression of specific sets of genes. We model a genome-wide expression pattern in a given condition (measured by a microarray assay) as a mixture of signals generated by statistically independent biological processes with different activation levels. We design two kinds of models for genomic expression pattern: a linear and nonlinear mixture model. Suppose that a cell is governed by M independent biological processes S = (s1, …, sM)T, each of which is a vector of K gene expression levels, and that we measure the levels of expression of all genes in N conditions, resulting in a microarray expression matrix X = (x1,…,xN)T. The expression level at each different condition j can be expressed as linear combinations of the M biological processes: xj=aj1s1+…+ajMsM. We can express this idea concisely in matrix notation as follows.                     =           = M NM N M N s s a a a a x x AS X M L M M L M 1 1 1 11 1 , (1) More generally, we can express X = (x1,…,xN)T as a post-nonlinear mixture of the underlying independent processes as follows, where f(.) is a nonlinear mapping from N to N dimensional space. (2)                               =           = M NM N M N s s a a a a f x x AS f X M L M M L M 1 1 1 11 1 ), ( 3 Independent component analysis In the models described above, since we assume that the underlying biological processes are independent, we suggest that vectors S=(s1,…,sM) are statistically independent and so ICA can recover S from the observed microarray data X. For linear ICA, we apply natural-gradient maximum estimation (NMLE) method which was proposed in [7] and was made more efficient by using natural gradient method in [8]. We also apply nonlinear ICA using reproducible kernel Hilbert spaces (RKHS) based on [9], as follows: 1. We map the N dimensional input data xi to Ф(xi) in the feature space by using the kernel trick. The feature space is defined by the relationship Ф(xi)TФ(xj)=k(xi,, xj). That is, inner product of mapped data is determined to by a kernel function k(.,.) in the input space; we used a Gaussian radial basis function (RBF) kernel (k(x,y)=exp(-|x-y|2)) and a polynomial kernel of degree 2 (k(x,y)=(xTy+1)2). To perform mapping, we found orthonormal bases of the feature space by randomly sampling L input data v={v1,…,vL} 1000 times and choosing one set minimizing the condition number of Φv=(Φ(v1),…,Φ(vL)). Then, a set of orthonormal bases of the feature space is determined by the selected L images of input data in v as Ξ = Φv(Φv TΦv)-1/2. We map all input data x1,…,xK, each corresponding to a gene, to Ψ(x1),…,Ψ(xK) in the feature space with basis Ξ, as follows: Ψ(xi)=(Φv TΦv)-1/2Φv TΦv(xi) (1≤ i≤K) (3) L i L i L L L L x v k x v k v v k v v k v v k v v k ℜ ∈                     = − ) , ( ) , ( ) , ( ) , ( ) , ( ) , ( 1 2 / 1 1 1 1 1 M L M M K 2. We linearly decompose the mapped data Ψ=[Ψ(x1),.,Ψ(xK)]∈RL×K into statistically independent components using NMLE. 4 Proposed approach The microarray dataset we are given is in matrix form where each element xij corresponds to the level of expression of the jth gene in the ith experimental condition. Missing values are imputed by KNNImpute [10], an algorithm based on k nearest neighbors that is widely used in microarray analysis. Given the expression matrix X of N experiment by K genes, we perform the following steps. 1. Apply ICA to decompose X into independent components y1, …,yM as in Equations (1) and (2). Prior to applying ICA, remove any rows that make the expression matrix X singular. After ICA, each component denoted by yi is a vector comprising K loads gene expression levels, i.e., yi = (yi1, ...,yiK). We chose to let the number of components M to be maximized, which is equal the number of microarray experiments N because the maximum for N in our datasets was 250, which is smaller than the number of biological processes we hypothesize to act within a cell. 2. For each component, cluster genes according to their relative loads yij/mean(yi). Based on our ICA model, each component is a putative genomic expression program of an independent biological process. Thus, our hypothesis is that genes showing relatively high or low expression level within the component are the most important for the process. We create two clusters for each component: one cluster containing genes with expression level higher than a threshold, and one cluster containing genes with expression level lower than a threshold. Cluster i,1 = {gene j | > mean( ) + c ij y iy ×std( )} Cluster i,2 = {gene j | < mean( ) – c iy ij y iy ×std( )} (4) iy Here, mean(yi) is the average, std(yi) is the standard deviation of yi; and c is an adjustable coefficient. The value of the coefficient c was varied from 1.0 to 2.0 and the result for c=1.25 was presented in this paper. The results for other values of c are similar, and are presented on the website www.stanford.edu/~silee/ICA/. 3. For each cluster, measure the enrichment of each cluster with genes of known functional annotations. Using the Gene Ontology (GO) [11] and KEGG [12] gene annotation databases, we calculate the p-value for each cluster with every gene annotation, which is the probability that the cluster contains the observed number of genes with the annotation by chance assuming the hypergeometric distribution (details in [4]). For each gene annotation, the minimum p-value that is smaller than 10-7 obtained from any cluster was collected. If no p-value smaller than 10-7 is found, we consider the gene annotation not to be detected by the approach. As a result, we can assign biological meaning to each cluster and the corresponding independent component and we can evaluate the clustering performance by comparing the collected minimum p-value for each gene annotation with that from other clustering approach. 5 Performance evaluation We tested the ICA-based clustering to four expression datasets (D1—D4) described in Table 1. Table 1: The four datasets used in our analysis ARRAY TYPE DESCRIPTION # OF GENES (K) # OF EXPS (N) D1 Spotted Budding yeast during cell cycle and CLB2/CLN3 overactive strain [13] 4579 22 D2 Oligonucl eotide Budding yeast during cell cycle [14] 6616 17 D3 Spotted C. elegans in various conditions [3] 17817 553 D4 Oligonucl eotide Normal human tissue including 19 kinds of tissues [15] 7070 59 For D1 and D4, we compared the biological coherence of ICA components with that of PCA applied in the same datasets in [1] and [2], respectively. For D2 and D3, we compared with k-means clustering and the topomap method, applied in the same datasets in [4] and [3], respectively. We applied nonlinear ICA to D1, D2 and D4. Dataset D3 is very large and makes the nonlinear algorithm unstable. D1 was preprocessed to contain log-ratios xij=log2(Rij/Gij) between red and green intensities. In [1], principal components, referred to as eigenarrays, were hypothesized to be genomic expression programs of distinct biological processes. We compared the biological coherence of independent components with that of principal components found by [1]. Comparison was done in two ways: (1) For each component, we grouped genes within top x% of significant up-regulation and down-regulation (as measured by the load of the gene in the component) into two clusters with x adjusted from 5% to 45%. For each value of x, statistical significance was measured for clusters from independent components and compared with that from principal components based on the minimum p-value for each gene annotation, as described in Section 4. We made a scatter plot to compare the negative log of the collected best p-values for each gene annotation when x is fixed to be 15%, shown in Figure 1 (a) (2) Same as before, except we did not fix the value of x; instead, we collected the minimum p-value from each method for each GO and KEGG gene annotation category and compared the collected p-values (Figure 1 (b)). For both cases, in the majority of the gene annotation categories ICA produced significantly lower p-values than PCA did, especially for gene annotation for which both ICA and PCA showed high significance. Figure 1. Comparison of linear ICA (NMLE) to PCA on dataset D1 (a) when x is fixed to be 15%; (b) when x is not fixed. (c) Three independent components of dataset D4. Each gene is mapped to a point based on the value assigned to the gene in three independent components, which are enriched with liver- (red), Muscle- (orange) and vulva-specific (green) genes, respectively. The expression levels of genes in D4 were normalized across the 59 experiments, and the logarithms of the resulting values were taken. Experiments 57, 58, and 59 were removed because they made the expression matrix nearly singular. In [2], a clustering approach based on PCA and subsequent visual inspection was applied to an earlier version of this dataset, containing 50 of the 59 samples. After we performed ICA, the most significant independent components were enriched for liver-specific, muscle-specific and vulva-specific genes with p-value of 10-133, 10-124 and 100-117, respectively. In the ICA liver cluster, 198 genes were liver specific (out of a total of 244), as compared with the 23 liver-specific genes identified in [2] using PCA. The ICA muscle cluster of 235 genes contains 199 muscle specific genes compared to 19 muscle-specific genes identified in [2]. We generated a 3-dimensional scatter plot of the load expression levels of all genes annotated in [15] on these significant ICA components in Figure 1 (c). We can see that the liver-specific, muscle-specific and vulva-specific genes are strongly biased to lie on the x-, y-, and z- axis, respectively. We applied nonlinear ICA on this dataset and the first four most significant clusters from nonlinear ICA with Gaussian RBF kernel were muscle-specific, liver-specific, vulva-specific and brain-specific with p-value of 10-158, 10-127, 10-112 and 10-70, respectively, showing considerable improvement over the linear ICA clusters. For D2, variance-normalization was applied to the 3000 most variant genes as in [4]. The 17th experiment, which made the expression matrix close to singular, was removed. We measured the statistical significance of clusters as described in Section 4 and compared the smallest p-value of each gene annotation from our approach to that from k-means clustering applied to the same dataset [4]. We made a scatter plot for comparing the negative log of the smallest p-value (y-axis) from ICA clusters with that from k-means clustering (x-axis). The coefficient c is varied from 1.0 to 2.0 and the superiority of ICA-based clustering to k-means clustering does not change. In many practical settings, estimation of the best c is not needed; we can adjust c to get a desired size of the cluster unless our focus is to blindly find the size of clusters. Figure 2 (a) (b) (c) shows for c=1.25 a comparison of the performance of linear ICA (NMLE), nonlinear ICA with Gaussian RBF kernel (NICA gauss), and k-means clustering (k-means). For D3, first we removed experiments that contained more than 7000 missing values, because ICA does not perform properly when the dataset contains many missing values. The 250 remaining experiments were used, containing expression levels for 17817 genes preprocessed to be log-ratios xij=log2(Rij/Gij) between red and green intensities. We compared the biological coherence of clusters by our approach with that of topomap-based approach applied to the same dataset in [3]. The result when c=1.25 is plotted in the Figure 2 (d). We observe that the two methods perform very similarly, with most categories having roughly the same p-value in ICA and in the topomap clusters. The topomap clustering approach performs slightly better in a larger fraction of the categories. Still, we consider this performance a confirmation that ICA is a widely applicable method that requires minimal training: in this case the missing values and high diversity of the data make clustering especially challenging, while the topomap approach was specifically designed and manually trained for this dataset as described in [3]. Finally, we compared different ICA algorithms in terms of clustering performance. We tested six linear ICA methods: Natural Gradient Maximum Likelihood Estimation (NMLE) [7][8], Joint Approximate Diagonalization of Eigenmatrices [16], Fast Fixed Point ICA with three different measures of non-Gaussianity [17], and Extended Information Maximization (Infomax) [18]. We also tested two kernels for nonlinear ICA: Gaussian RBF kernel, and polynomial kernel (NICA ploy). For each dataset, we compared the biological coherence of clusters generated by each method. Among the six linear ICA algorithms, NMLE was the best in all datasets. Among both linear and nonlinear methods, the Gaussian kernel nonlinear ICA method was the best in Datasets D1, D2 and D4, the polynomial kernel nonlinear ICA method was best in Dataset D4, and NMLE was best in the large datasets (D3 and D4). In Figure 3, we compare the NMLE method with three other ICA methods for the dataset D2. Overall, the NMLE algorithm consistently performed well in all datasets. The nonlinear ICA algorithms performed best in the small datasets, but were unstable in the two largest datasets. More comparison results are demonstrated in the website www.stanford.edu/~silee/ICA/. Figure 2: Comparison of (a) linear ICA (NMLE) with k-means clustering, (b) nonlinear ICA with Gaussian RBF kernel to linear ICA (NMLE), and (c) nonlinear ICA with Gaussian RBF kernel to k-means clustering on the dataset D2. (d) Comparison of linear ICA (NMLE) to topomap-based approach on the dataset D3. Figure 3: Comparison of linear ICA (NMLE) to (a) Extended Infomax ICA algorithm, (b) Fast ICA with symmetric orthogonalization and tanh nonlinearity and (c) Nonlinear ICA with polynomial kernel of degree 2 on the Dataset (B). 6 Discussion ICA is a powerful statistical method for separating mixed independent signals. We proposed applying ICA to decompose microarray data into independent gene expression patterns of underlying biological processes, and to group genes into clusters that are mutually non-exclusive with statistically significant functional coherence. Our clustering method outperformed several leading methods on a variety of datasets, with the added advantage that it requires setting only one parameter, namely the fraction c of standard deviations beyond which a gene is considered to be associated with a component’s cluster. We observed that performance was not very sensitive to that parameter, suggesting that ICA is robust enough to be used for clustering with little human intervention. The empirical performance of ICA in our tests supports the hypothesis that statistical independence is a good criterion for separating mixed biological signals in microarray data. The Extended Infomax ICA algorithm proposed in [18] can automatically determine whether the distribution of each source signal is super-Gaussian or sub-Gaussian. Interestingly, the application of Extended Infomax ICA to all the expression datasets uncovered no source signal with sub-Gaussian distribution. A likely explanation is that global gene expression profiles are mixtures of super-Gaussian sources rather than of sub-Gaussian sources. This finding is consistent with the following intuition: underlying biological processes are super-Gaussian, because they affect sharply the relevant genes, typically a small fraction of all genes, and leave the majority of genes relatively unaffected. Acknowledgments We thank Te-Won Lee for helpful feedback. We thank Relly Brandman, Chuong Do, and Yueyi Liu for edits to the manuscript. References [1] Alter O, Brown PO, Botstein D. Proc. Natl. Acad. Sci. USA 97(18):10101-10106, 2000. [2] Misra J, Schmitt W, et al. Genome Research 12:1112-1120, 2002. [3] Kim SK, Lund J, et al. Science 293:2087-2092, 2001. [4] Tavazoie S, Hughes JD, et al. Nature Genetics 22(3):281-285, 1999. [5] Hori G, Inoue M, et al. Proc. 3rd Int. Workshop on Independent Component Analysis and Blind Signal Separation, Helsinki, Finland, pp. 151-155, 2000. [6] Liebermeister W. Bioinformatics 18(1):51-60, 2002. [7] Bell AJ. and Sejnowski TJ. Neural Computation, 7:1129-1159, 1995. [8] Amari S, Cichocki A, et al. In Advances in Neural Information Processing Systems 8, pp. 757-763. Cambridge, MA: MIT Press, 1996. [9] Harmeling S, Ziehe A, et al. In Advances in Neural Information Processing Systems 8, pp. 757-763. Cambridge, MA: MIT Press, . [10] Troyanskaya O., Cantor M, et al. Bioinformatics 17:520-525, 2001. [11] The Gene Ontology Consortium. Genome Research 11:1425-1433, 2001. [12] Kanehisa M., Goto S. In Current Topics in Computational Molecular Biology, pp. 301–315. MIT-Press, Cambridge, MA, 2002. [13] Spellman PT, Sherlock G, et al. Mol. Biol. Cell 9:3273-3297, 1998. [14] Cho RJ, Campell MJ, et al. Molecular Cell 2:65-73, 1998. [15] Hsiao L, Dangond F, et al. Physiol. Genomics 7:97-104, 2001. [16] Cardoso JF, Neural Computation 11(1):157-192, 1999. [17] Hyvarinen A. IEEE Transactions on Neural Network 10(3):626–634, 1999. [18] Lee TW, Girolami M, et al. Neural Computation 11:417–441, 1999.
2003
176
2,394
On the concentration of expectation and approximate inference in layered networks XuanLong Nguyen University of California Berkeley, CA 94720 xuanlong@cs.berkeley.edu Michael I. Jordan University of California Berkeley, CA 94720 jordan@cs.berkeley.edu Abstract We present an analysis of concentration-of-expectation phenomena in layered Bayesian networks that use generalized linear models as the local conditional probabilities. This framework encompasses a wide variety of probability distributions, including both discrete and continuous random variables. We utilize ideas from large deviation analysis and the delta method to devise and evaluate a class of approximate inference algorithms for layered Bayesian networks that have superior asymptotic error bounds and very fast computation time. 1 Introduction The methodology of variational inference has developed rapidly in recent years, with increasingly rich classes of approximation being considered (see, e.g., Yedidia, et al., 2001, Jordan et al., 1998). While such methods are intuitively reasonable and often perform well in practice, it is unfortunately not possible, except in very special cases, to provide error bounds for these inference algorithms. Thus the user has little a priori guidance in choosing an inference algorithm, and little a posteriori reassurance that the approximate marginals produced by an algorithm are good approximations. The situation is somewhat better for sampling algorithms, but there the reassurance is only asymptotic. A line of research initiated by Kearns and Saul (1998) aimed at providing such error bounds for certain classes of directed graphs. Analyzing the setting of two-layer networks, binary nodes with large fan-in, noisy-OR or logistic conditional probabilities, and parameters that scale as O(1/N), where N are the number of nodes in each layer, they used a simple large deviation analysis to design an approximate inference algorithm that provided error bounds. In later work they extended their algorithm to multi-layer networks (Kearns and Saul, 1999). The error bound provided by this approach was O( p ln N/N). Ng and Jordan (2000) pursued this line of work, obtaining an improved error bound of O(1/N (k+1)/2) where k is the order of a Taylor expansion employed by their technique. Their approach was, however, restricted to two-layer graphs. Layered graphs are problematic for many inference algorithms, including belief propagation and generalized belief propagation algorithms. These algorithms convert directed graphs to undirected graphs by moralization, which creates infeasibly large cliques when there are nodes with large fan-in. Thus the work initiated by Kearns and Saul is notable not only for its ability to provide error bounds, but also because it provides one of the few practical algorithms for general layered graphs. It is essential to develop algorithms that scale in this setting—e.g., a recent application at Google studied layered graphs involving more than a million nodes (Harik and Shazeer, personal communication). In this paper, we design and analyze approximate inference algorithms for general multilayered Bayesian networks with generalized linear models as the local conditional probability distributions. Generalized linear models including noisy-OR and logistic functions in the binary case, but go significantly further, allowing random variables from any distribution in the exponential family. We show that in such layered graphical models, the concentration of expectations of any fixed number of nodes propagate from one layer to another according to a topological sort of the nodes. This concentration phenomenon can be exploited to devise efficient approximate inference algorithms that provide error bounds. Specifically, in a multi-layer network with N nodes in each layer and random variables in some exponential family of distribution, our algorithm has an O((ln N)3/N)(k+1)/2) error bound and O(N k) time complexity. We perform a large number of simulations to confirm this error bound and compare with Kearns and Saul’s algorithm, which has not been empirically evaluated before. The paper is organized as follows. In Section 2, we study the concentration of expectation in generalized linear models. Section 3 introduces the use of delta method for approximating the expectations. Section 4 describes an approximate inference algorithm in a general directed graphical model, which is evaluated empirically in Section 5. Finally, Section 6 concludes the paper. 2 Generalized linear models Consider a generalized linear model (GLIM; see McCullagh and Nelder, 1983, for details) consisting of N covariates (inputs) X1, . . . , XN and a response (output) variable Y . A GLIM makes three assumptions regarding the form of the conditional probability distribution P(Y |X): (1) The inputs X1, . . . , XN enter the model via a linear combination ξ = PN i=1 θiXi; (2) the conditional mean µ is represented as a function f(ξ), known as the response function; and (3) the output Y is characterized by an exponential family distribution (cf. Brown, 1986) with natural parameter η and conditional mean µ. The conditional probability takes the following form: Pθ,φ(Y |X) = h(y, φ) exp ηy −A(η) φ , (1) where φ is a scale parameter, h is a function reflecting the underlying measure, and A(η) is the log partition function. In this section, for ease of exposition, we shall assume that the response function f is a canonical response function, which simply means that η = ξ = PN i=1 θiXi. As will soon be clear, however, our analysis is applicable to a general setting in which f is only required to have bounded derivatives on compact sets. It is a well-known property of exponential family distributions that E(Y |X) = µ = A′(η) = f(η) = f N X i=1 θiXi ! Var(Y|X) = φA′′(η) = φf ′(η). The exponential family includes the Bernoulli, multinomial, and Gaussian distributions, but many other useful distributions as well, including the Poisson, gamma and Dirichlet. We will be studying GLIMs defined on layered graphical models, and thus X1, . . . , XN are themselves taken to be random variables in the exponential family. We also make the key assumption that all parameters obey the bound |θi| ≤τ/N for some constant τ, although this assumption shall be relaxed later on. Under these assumptions, we can show that the linear combination η = PN i=1 θiXi is tightly concentrated around its mean with very high probability. Kearns and Saul (1998) have proved this for binary random variables using large deviation analysis. This type of analysis can be used to prove general results for (bounded and unbounded) random variables in any standard exponential family.1 Lemma 1 Assume that X1, . . . , XN are independent random variables in a standard exponential family distribution. Furthermore, EXi ∈[pi −∆i, pi + ∆i]. Then there are absolute constants C and α such that, for any ϵ > PN i=1 |θi|∆i: P(|η − N X i=1 θipi| > ϵ) ≤C exp −α(ϵ −PN i=1 |θi|∆i)2/3 (PN i=1 θ2 i )1/3 ≤C exp{−αN 1/3τ −2/3(ϵ − N X i=1 |θi|∆i)2/3} We will study architectures that are strictly layered; that is, we require that there are no edges directly linking the parents of any node. In this setting the parents of each node are conditionally independent given all ancestor nodes (in the previous layers) in the graph. This will allow us to use Lemma 1 and iterated conditional expectation formulas to analyze concentration phenomena in these models. The next lemma shows that under certain assumptions about the response function f, the tight concentration of η also entails the concentration of E(Y |X) and Var(Y|X). Lemma 2 Assume that the means of X1, . . . , XN are bounded within some fixed interval [pmin, pmax] and f has bounded derivatives on compact sets. If η ∈ [PN i=1 θipi −ϵ, PN i=1 θipi + ϵ] with high probability, then: E(Y |X) = f(η) ∈ [f(PN i=1 θipi) −O(ϵ), f(PN i=1 θipi) + O(ϵ)], and Var(Y|X) = f′(η) ∈[f′(PN i=1 θipi) − O(ϵ), f′(PN i=1 θipi) + O(ϵ)] with high probability. Lemmas 1 and 2 provide a mean-field-like basis for propagating the concentration of expectations from the input layer X1, . . . , XN to the output layer Y . Specifically, if E(Xi) are approximated by pi (i = 1, . . . , N), then E(Y ) can be approximated by f(PN i=1 θipi). 3 Higher order expansion (the delta method) While Lemmas 1 and 2 already provide a procedure for approximating E(Y ), one can use higher-order (Taylor) expansion to obtain a significantly more accurate approximation. This approach, known in the statistics literature as the delta method, has been used in slightly different contexts for inference problems in the work of Plefka (1982), Barber and van der Laar (1999), and Ng and Jordan (2000). In our present setting, we will show that estimates based on Taylor expansion up to order k can be obtained by propagating the expectation of the product of up to k nodes from one layer to an offspring layer. The delta method is based on the same assumptions as in Lemma 2; that is, the means of X1, . . . , XN are assumed to be bounded within some fixed interval [pmin, pmax], and the response function f has bounded derivatives on compact sets. We have PN i=1 θipi bounded within fixed interval [τpmin, τpmax]. By Lemma 1, with high probability η = 1The proofs of this and all other theorems can be found in a longer version of this paper, available at www.cs.berkeley.edu/∼xuanlong. PN i=1 θipi + ϵ, for some small ϵ. Using Taylor’s expansion up to second order, we have that with high probability: E(Y ) = ExE(Y |X) = Exf(η) = fη + ( N X i=1 θiEXi − N X i=1 θipi)f ′ η + 1 2!( X i,j θiθj(E(Xi −pi)(Xj −pj))f ′′ η + O(ϵ3), where fη and its derivatives are evaluated at PN i=1 θipi. This gives us a method of approximating E(Y ) by recursion: Assuming that one can approximate all needed expectations of variables in the parent layer X with error O(ϵ3), one can also obtain an approximation of E(Y ) with the error O(ϵ3). Clearly, the error can be improved to O(ϵk+1) by using Taylor expansion to some order k (provided that the response function f(η) = A′(η) has bounded derivatives up to that order). In this case, the expectation of the product of up to k elements in the input layer, e.g., E(X1 −p1) . . . (Xk −pk), needs to be computed. The variance of Y (as well as other higher-order expectations) can also be approximated in the same way: Var(Y) = Ex(Var(Y|X)) + Varx(E(Y|X)) = φExf ′(η) + Exf(η)2 −(E(Y ))2 where each component can be approximated using the delta method. 4 Approximate inference for layered Bayesian networks In this section, we shall harness the concentration of expectation phenomenon to design and analyze a family of approximate inference algorithms for multi-layer Bayesian networks that use GLIMs as local conditional probabilities. The recipe is clear by now. First, organize the graph into layers that respect the topological ordering of the graph. The algorithm is comprised of two stages: (1) Propagate the concentrated conditional expectations from ancestor layers to offspring layers. This results in a rough approximation of the expectation of individual nodes in the graph; (2) Apply the delta method to obtain more a refined marginal expectation of the needed statistics, also starting from ancestor layers to offspring layers. Consider a multi-layer network that has L layers, each of which has N random variables. We refer to the ith variable in layer l by Xl i, where {X1 i }N i=1 is the input layer, and {XL i }N i=1 is the output layer. The expectations E(X1 i ) of the first layer are given. For each 2 ≤l ≤L, let θl−1 ij denote the parameter linking Xl i and its parent Xl−1 j . Define the weighted sum of contributions from parents to a node Xl i: ηl i = PN j=1 θl−1 ij Xl−1 j , where we assume that |θl ij| ≤τ/N for some constant τ. We first consider the problem of estimating expectations of nodes in the output layer. For binary networks, this amounts to estimating marginal probabilities, say, P[X L 1 = x1, ...., XL m = xm], for given observed values (x1, ..., xm), where m < N. We subsequently consider a more general inference problem involving marginal and conditional probabilities of nodes residing in different layers in the graph. 4.1 Algorithm stage 1: Propagating the concentrated expectation of single nodes We establish a rough approximation of the expectations of all single nodes of the graph, starting from the input layer l = 1 to the output layer l = L in an inductive manner. For l = 1, let ∆1 i = δ1 i = 0 and p1 i = EX1 i for all i = 1, . . . , N. For l > 1, let µl i = N X j=1 θl−1 ij pl−1 j (2) ϵl i = N X j=1 |θl−1 ij |∆l−1 j + τ p (γ ln N)3/N (3) δl i = C exp{−αN 1/3τ −2/3(ϵl i − N X i=1 |θl−1 ij |∆l−1 j )2/3} (4) pl i = 1 2 sup x∈Al i f(x) + inf x∈Al i f(x) ! (5) ∆l i = 1 2 sup x∈Al i f(x) −inf x∈Al i f(x) ! where Al i = [µl i −ϵl i, µl i + ϵl i]. (6) In the above updates, constants α and C arise from Lemma 1, γ is an arbitrary constant that is greater than 1/α. The following proposition, whose proof makes use of Lemma 1 combined with union bounds, provides the error bounds for our algorithm. Proposition 3 With probability at least QL l=1(1 −PN i=1 δl i) = (1 −CN 1−αγ)L−1, for any 1 ≤i ≤N, 1 ≤l ≤L we have: E[Xl i|Xl−1 1 , . . . , Xl−1 N ] = f(ηl i) ∈[pl i −∆l i, pl i + ∆l i] and ηl i ∈[µl i −ϵl i, µl i + ϵl i]. Furthermore, ϵl i = O( p (ln N)3/N) for all i, l. For layered networks with only bounded and Gaussian variables, Lemma 1 can be tightened, and this results in an error bound of O( p (ln N)2/N). For layered networks with only bounded variables, the error bound can be tightened to O( p ln N/N). In addition, if we drop the conditions that all parameters θl ij are bounded by τ/N, Proposition 3 still goes through by replacing τ by q N PN j=1(θl−1 ij )2 in updating equations for ϵl i and δl i for all i and l. The asymptotic error bound O( p (ln N)3/N) no longer holds, but it can be shown that there are absolute constants c1 and c2 such that for all i, l: ϵl i ≤(c1||ϵl−1|| + c2 p (ln N)3)||θl−1 i || where ||θl−1 i || ≡ qPN j=1(θl−1 ij )2 and ||ϵl|| ≡ qPN i=1(ϵl i)2. 4.2 Algorithm stage 2: Approximating expectations by recursive delta method The next step is to apply the delta method presented in Section 3 in a recursive manner. Write: E[XL 1 ...XL m] = EXL−1E[XL 1 . . . Xm|XL−1] = EXL−1 m Y i=1 f(ηL i ) = EXL−1F(ηL 1 , ..., ηL m) where F(ηL 1 , ..., ηL m) := Qm i=1 f(ηL i ). Let βl i = ηl i −µl i. So, with probability (1 −CN 1−αγ)L−1 we have |βl i| ≤ϵl i = O( p (ln N)3/N) for all l = 1, . . . , L and i = 1, . . . , N. Applying the delta method by expanding F around the vector µ = (µL 1 , ..., µL m) up to order k gives an approximation, which is denoted by MF(k), that depends on expectations of nodes in the previous layer. Continuing this approximation recursively on the previous layers, we obtain an approximate algorithm that has an error bound O(((ln N)3/N)(k+1)/2) (see the derivation in Section 3) with probability at least (1 −CN 1−αγ)L−1 and an error bound O(1) with the remaining probability. We conclude that, Theorem 4 The absolute error of the MF(k) approximation is O(((ln N)3/N)(k+1)/2). For networks with bounded variables, the error bound can be tightened to O((ln N/N)(k+1)/2). It is straightforward to check that MF(k) takes O(N max{k,2}) computational time. The asymptotic error bound O(((ln N)3/N)(k+1)/2) is guaranteed for the aproximation of expectations of a fixed number m of nodes in the output layer. In principle, this implies that m has to be small compared to N for the approximation to be useful. For binary networks, for instance, the marginal probabilities of m nodes could be as small as O(1/2m), so we need O(1/2m) to be greater than O((ln N/N)(k+1)/2). This implies that m < ln 1 c + (k+1) 2 (ln N −ln ln N) for some constant c. However, we shall see that our approximation is still useful for large m as long as the quantity it tries to approximate is not too small. For two-layer networks, an algorithm by Ng and Jordan (2000) yields a better error rate of O(1/N (k+1)/2) by exploiting the Central Limit Theorem. However, this result is restricted to networks with only 2 layers. Barber and Sollich (1999) were also motivated by the Central Limit Theorem’s effect to approximate ηl i by a multivariate Gaussian distribution, resulting in a similar exploitation of correlation between pairs of nodes in the parent layer as in our MF(2) approximation. Also related to Barber and Sollich’s algorithm of using an approximating family of distribution is the assumed-density filtering approach (e.g., Minka, 2001). These approaches, however, do not provide an error bound guarantee. 4.3 Computing conditional expectations of nodes in different layers For simplicity, in this subsection we shall consider binary layered networks. First, we are interested in the marginal probability of a fixed number of nodes in different layers. This can be expressed in terms of product of conditional probabilities of nodes in the same layer given values of nodes in the previous layer. As shown in the previous subsection, each of these conditional probabilities can be approximated with an error bound O((ln N/N)(k+1)/2) as N →∞, and the product can also be approximated with the same error bound. Next, we consider approximating the probability of several nodes in the input layer conditioned on some nodes observed in the output layer L, i.e., P(X1 1 = x1 1, . . . , X1 m = x1 m|XL 1 = xL 1 , . . . , XL n = xL n) for some fixed numbers m and n that are small compared to N. In a multi-layer network, when even one node in the output layer is observed, all nodes in the graph becomes dependent. Furthermore, the conditional probabilities of all nodes in the graph are generally not concentrated. Nevertheless, we can still approximate the conditional probability by approximating two marginal probabilities P(X1 1 = x1 i , . . . , X1 m = x1 m, XL 1 = xL 1 , . . . , XL n = xL n) and P(XL 1 = xL 1 , . . . , XL n = xL n) separately and taking the ratio. This boils down to the problem of computing the marginal probabilities of nodes residing in different layers of the graph. As discussed in the previous paragraph, since each marginal probabilities can be approximated with an asymptotic error bound O((ln N/N)(k+1)/2) as N →∞(for binary networks), the same asymptotic error bound holds for the conditional probabilities of fixed number of nodes. In the next section, we shall present empirical results that show that this approximation is still quite good even when a large number of nodes are conditioned on. 5 Simulation results In our experiments, we consider a large number of randomly generated multi-layer Bayesian networks with L = 3, L = 4 or L = 5 layers, and with the number of nodes in each layer ranging from 10 to 100. The number of parents of each node is chosen uniformly at random in [2, N]. We use the noisy-OR function for the local conditional probabilities; this choice has the advantage that we can obtain exact marginal probabilities for single nodes by exploiting the special structure of noisy-OR function (Heckerman, 0 50 100 0.1 0.15 0.2 0.25 0.3 0.35 0.4 0.45 N absolute error 0 50 100 0 1 2 3 x 10 −3 K−S and MF(1) MF(2) tau = 2 N (a) 0 50 100 0.1 0.15 0.2 0.25 absolute error 0 50 100 0 1 2 3 4 5 6 7 x 10 −3 N K−S and MF(1) MF(2) tau = 4 N (b) Figure 1: The figures show the average error in the marginal probabilities of nodes in the output layer. The x-axis is the number of nodes in each layer (N = 10, . . . , 100). The three curves (solid, dashed, dashdot) correspond to the different numbers of layers L = 3, 4, 5, respectively. Plot (a) corresponds to the case τ = 2 and plot (b) corresponds to τ = 4. In each pair of plots, the leftmost plot shows MF(1) and Kearns and Saul’s algorithm (K-S) (with the latter being distinguished by black arrows), and the rightmost plot is MF(2). Note the scale on the y-axis for the rightmost plot is 10−3. k 1 2 3 4 5 6 7 8 Network 1 0.0001 0.0041 0.0052 0.0085 0.0162 0.0360 0.0738 0.1562 0.0007 0.0609 0.0912 0.1925 0.1862 0.3885 0.6262 1.6478 Network 2 0.0003 0.0040 0.0148 0.0331 0.0981 0.1629 0.1408 0.1391 0.0018 0.0508 0.1431 0.3518 0.7605 0.7790 0.7118 0.9435 Network 3 0.0002 0.0031 0.0082 0.0501 0.1095 0.0890 0.0957 0.1022 0.0008 0.0406 0.1150 0.6858 1.2392 0.6115 0.5703 0.7840 Table 1: The experiments were performed on 24-node networks (3 layers with N = 8 nodes in each layer). For each network, the first line shows the absolute error of our approximation of conditional probabilities of nodes in the input layer given values of the first k nodes in the output layer, the second line shows the absolute error of the log likelihood of the k nodes. The numbers were obtained by averaging over k2 random instances of the k nodes. 1989). All parameters θij are uniformly distributed in [0, τ/N], with τ = 2 and τ = 4. Figure 1 shows the error rates for computing the expectation of a single node in the output layer of the graph. The results for each N are obtained by averaging over many graphical models with the same value of N. Our approximate algorithm, which is denoted by MF(2), runs fast: The running time for the largest network (with L = 5, N = 100) is approximately one minute. We compare our algorithm (with γ fixed to be 2/α) with that of Kearns and Saul (K-S). The MF(1) estimates are slightly worse that of the K-S algorithm, but they have the same error curve O(ln N/N)1/2. The MF(2) estimates, whose error curves were proven to be O(ln N/N)3/2, are better than both by orders of magnitude. The figure also shows that the error increases when we increase the size of the parameters (increase τ). Next, we consider the inference problem of computing conditional probabilities of the input layer given that the first k nodes are observed in the output layer. We perform our experiments on several randomly generated three-layer networks with N = 8. This size allows us to be able to compute the conditional probabilities exactly.2 For each value of 2The amount of time spent on exact computation for each network is about 3 days, while our approximation routines take a few minutes. k, we generate k2 samples of the observed nodes generated uniformly at random from the network and then compute the average of errors of conditional probability approximations. We observe that while the error of conditional probabilities is higher than those of marginal probabilities (see Table 1 and Figure 1), the error remains small despite the relatively large number of observed nodes k compared to N. 6 Conclusions We have presented a detailed analysis of concentration-of-expectation phenomena in layered Bayesian networks which use generalized linear models as local conditional probabilities. Our analysis encompasses a wide variety of probability distributions, including both discrete and continuous random variables. We also performed a large number of simulations in multi-layer network models, showing that our approach not only provides a useful theoretical analysis of concentration phenomena, but it also provides a fast and accurate inference algorithm for densely-connected multi-layer graphical models. In the setting of Bayesian networks in which nodes have large in-degree, there are few viable options for probabilistic inference. Not only are junction tree algorithms infeasible, but (loopy) belief propagation algorithms are infeasible as well, because of the need to moralize. The mean-field algorithms that we have presented here are thus worthy of attention as one of the few viable methods for such graphs. As we have shown, the framework allows us to systematically trade time for accuracy with such algorithms, by accounting for interactions between neighboring nodes via the delta method. Acknowledgement. We would like to thank Andrew Ng and Martin Wainwright for very useful discussions and feedback regarding this work. References D. Barber and P. van de Laar, Variational cumulant expansions for intractable distributions. Journal of Artificial Intelligence Research, 10, 435-455, 1999. L. Brown, Fundamentals of Statistical Exponential Families with Applications in Statistical Decision Theory, Institute of Mathematical Statistics, Hayward, CA, 1986. P. McCullagh and J.A. Nelder, Generalized Linear Models, Chapman and Hall, London, 1983. T. Minka, Expectation propagation for approximate Bayesian inference, In Proc. UAI, 2001. D. Heckerman, A tractable inference algorithm for diagnosing multiple diseases, In Proc. UAI, 1989. M.I. Jordan, Z. Ghahramani, T.S. Jaakkola and L.K. Saul, An introduction to variational methods for graphical models, In Learning in Graphical Models, Cambridge, MIT Press, 1998. M.J. Kearns and L.K. Saul, Large deviation methods for approximate probabilistic inference, with rates of convergence, In Proc. UAI, 1998. M.J. Kearns and L.K. Saul, Inference in multi-layer networks via large deviation bounds, NIPS 11, 1999. A.Y. Ng and M.I. Jordan, Approximate inference algorithms for two-layer Baysian networks, NIPS 12, 2000. D. Barber and P. Sollich, Gaussian fields for approximate inference in layered sigmoid belief networks, NIPS 11, 1999. T. Plefka, Convergence condition of the TAP equation for the infinite-ranged Ising spin glass model, J. Phys. A: Math. Gen., 15(6), 1982. J.S. Yedidia, W.T. Freeman, and Y. Weiss. Generalized belief propagation. NIPS 13, 2001.
2003
177
2,395
Identifying Structure across Prepartitioned Data Zvika Marx Neural Computation Center The Hebrew University Jerusalem, Israel, 91904 Ido Dagan Department of CS Bar-Ilan University Ramat-Gan, Israel, 52900 Eli Shamir School for CS The Hebrew University Jerusalem, Israel, 91904 Abstract We propose an information-theoretic clustering approach that incorporates a pre-known partition of the data, aiming to identify common clusters that cut across the given partition. In the standard clustering setting the formation of clusters is guided by a single source of feature information. The newly utilized pre-partition factor introduces an additional bias that counterbalances the impact of the features whenever they become correlated with this known partition. The resulting algorithmic framework was applied successfully to synthetic data, as well as to identifying text-based cross-religion correspondences. 1 Introduction The standard task of feature-based data clustering deals with a single set of elements that are characterized by a unified set of features. The goal of the clustering task is to identify implicit constructs, or themes, within the clustered set, grouping together elements that are characterized similarly by the features. In recent years there has been growing interest in more complex clustering settings, in which additional information is incorporated [1], [2]. Several such extensions ([3]-[5]) are based on the information bottleneck (IB) framework [6], which facilitates coherent information-theoretic representation of different information types. In a recent line of research we have investigated the cross-dataset clustering task [7], [8]. In this setting, some inherent a-priori partition of the clustered data to distinct subsets is given. The clustering goal it to identify corresponding (analogous) structures that cut across the different subsets, while ignoring internal structures that characterize individual subsets. To accomplish this task, those features that commonly characterize elements across the different subsets guide the clustering process, while within-subset regularities are neutralized. In [7], we presented a distance-based hard clustering algorithm for the coupled- clustering problem, in which the clustered data is pre-partitioned to two subsets. In [8], our setting, generalized to pre-partitions of any number of subsets, was addressed by a heuristic extension of the probabilistic IB algorithm, yielding improved empirical results. Specifically, the algorithm in [8] was based on a modification of the IB stable-point equation, which amplified the impact of features characterizing a formed cluster across all, or most, subsets. This paper describes an information-theoretic framework that motivates and extends the algorithm proposed in [8]. The given pre-partitioning is represented via a probability distribution variable, which may represent “soft” pre-partitioning of the data, versus the strictly disjoint subsets assumed in the earlier cross-dataset framework. Further, we present a new functional that captures the cross-partition motivation. From the new functional, we derive a stable-point equation underlying our algorithmic framework in conjunction with the corresponding IB equation. Our algorithm was tested empirically on synthetic data and on a real-world textbased task that aimed to identify corresponding themes across distinct religions. We have cross-clustered five sets of keywords that were extracted from topical corpora of texts about Buddhism, Christianity, Hinduism, Islam and Judaism. In distinction from standard clustering results, our algorithm reveals themes that are common to all religions, such as sacred writings, festivals, narratives and myths and theological principles, and avoids topical clusters that correspond to individual religions (for example, ‘Christmas’ and ‘Easter’ are clustered together with ‘Ramadan’ rather than with ‘Church’). Finally, we have paid specific attention to the framework of clustering with side information [4]. While this approach was presented for a somewhat different mindset, it might be used directly to address clustering across pre-partitioned data. We compare the technical details of the two approaches and demonstrate empirically that clustering with side information does not seem appropriate for the kind of cross-partition tasks that we explored. 2 The Information Bottleneck Method Probabilistic (“soft”) data clustering outputs, for each element x of the set being clustered and each cluster c, an assignment probability p(c|x). The IB method [6] interprets probabilistic clustering as lossy data compression. The given data is represented by a random variable X ranging over the clustered elements. X is compressed through another random variable C, ranging over the clusters. Every element x is characterized by conditional probability distribution p(Y|x), where Y is a third random variable taking the members y of a given set of features as values. The IB method formalizes the clustering task as minimizing the IB functional: L(IB) = I(C; X) − β I(C; Y) . (1) As known from information theory (Ch. 13 of [9]), minimizing the mutual information I(C; X) optimizes distorted compression rate. A complementary bias to maximize I(C; Y) is interpreted in [6] as articulating the level of relevance of Y to the obtained clustering, inferred from the level by which C can predict Y. β is a free parameter counterbalancing the two biases. It is shown in [6] that p(c|x) values that minimize L(IB) satisfy the following equation: p(c|x) = [ ]) | ( ||) | ( ) ( ) , ( 1 c Y p x Y p DKL e c p x z β β − , (2) where DKL stands for the Kullback-Leibler (KL) divergence, or relative entropy, between two distributions and z(β,x) is a normalization function over C. Eq. (2) implies that, optimally, x is assigned to c in proportion to their KL distance in a feature distribution space, where the distribution p(Y|c) takes the role of a Start at time t = 0 and iterate the following update-steps, till convergence: IB1: initialize pt(c|x) randomly or arbitrarily (t = 0) pt(c|x) ∝ [ ]) | ( ||) | ( 1 1 ) ( c Y p x Y p D t t KL e c p − − − β (t > 0) IB2: pt(c) = ∑x t x p x c p ) ( ) | ( IB3: pt(y|c) = ∑ x t t x p x y p x c p c p ) ( ) | ( ) | ( ) ( 1 Figure 1: The Information Bottleneck iterative algorithm (with fixed β and |C|). representative, or centroid, of c. The feature variable Y is hence utilized as the (exclusive) means to guide clustering, beyond the random nature of compression. Figure 1 presents the IB iterative algorithm for a fixed value of β. The IB1 update step follows Eq. (2). The other two steps, which are derived from the IB functional as well, estimate the p(c) and p(y|c) values required for the next iteration. The algorithm converges to a local minimum of the IB functional. The IB setting, particularly the derivation of steps IB1 and IB3 of the algorithm, assumes that Y and C are independent given X, that is: I(C; Y|X) = ∑x p(x) I(C|x; Y|x) = 0. The balancing parameter β affects the number of distinct clusters being formed in a manner that resembles (inverse) temperature in physical systems. The higher β is (i.e., the stronger the bias to construct C that predicts Y well), more distinct clusters are required for encoding the data. For each |C| = 2, 3, …, there is a minimal β value, enabling the formation of |C| distinct clusters. Setting β to be smaller than this critical value corresponding to the current |C| would result in two or more clusters that are identical to one another. Based on this, the iterative algorithm is applied repeatedly within a gradual cooling-like (deterministic annealing) scheme: starting with random initialization of the p0(c|x)'s, generate two clusters with the critical β value, found empirically, for |C| = 2. Then, use a perturbation on the obtained two-cluster configuration to initialize the p0(c|x)'s for a larger set of clusters and execute additional runs of the algorithm to identify the critical β value for the larger |C|. And so on: each output configuration is used as a basis for a more granular one. The final outcome is a “soft hierarchy” of probabilistic clusters. 3 Cross-partition Clustering Cross-partition (CP) clustering introduces a factor – a pre-given partition of the clustered data – additional to what considered in a standard clustering setting. For representing this factor we introduce the pre-partitioning variable W, ranging over all parts w of the pre-given partition. Every data element x is associated with W through a given probability distribution p(W|x). Our goal is to cluster the data, so that the clusters C would not be correlated with W. We notice that Y, which is intended to direct the formation of clusters, might be a-priori correlated with W, so the formed clusters might end up being correlated with W as well. Our method aims at eliminating this aspect of Y. 3.1 Information Defocusing As noted, some of the information conveyed by Y characterizes structures correlated with W, while the other part of the information characterizes the target cross-W structures. We are interested in detecting the latter while filtering out the former. However, there is no direct a-priori separation between the two parts of the Ymediated information. Our strategy in tackling this difficulty is: we follow in general Y's directions, as the IB method does, while avoiding Y's impact whenever it entails undesired inter-dependencies of C and W. Our strategy implies conflicting biases with regard to the mutual information I(C,Y): it should be maximized in order to form meaningful clusters, but be minimized as well in the specific context where Y entails C–W dependencies. Accordingly, we propose a computational procedure directed by two distinct cost-terms in tandem. The first one is the IB functional (Eq. 1), introducing the bias to maximize I(C,Y). With this bias alone, Y might dictate (or “explain”, in retrospect) substantial C–W dependencies, implying a low I(C;W|Y) value.1 Hence, the guideline of preventing Y from accounting for C–W dependencies is realized through an opposing bias of maximizing I(C;W|Y) = ∑y p(y) I(C|y; W|y). The second cost term – the Information Defocusing (ID) functional – consequently counterbalances minimization of I(C,Y) against the new bias: L(ID) = I(C; Y) − η I(C;W|Y) , (3) where η is a free parameter articulating the tradeoff between the biases. The ID functional captures our goal of reducing the impact of Y selectively: “defocusing” a specific aspect of the information Y conveys: the information correlated with W. In a like manner to the stable-point equation of the IB functional (Eq. 2), we derive the following stable-point equation for the ID functional: p(c|y) = ∏ + w w p w c y p c p y z ) ( 1 ) , | ( ) ( ) , ( 1 η η η , (4) where z(η,y) is a normalization function over C. The derivation relies on an additional assumption, I(C;W) = 0, imposing the intended independence between C and W (the detailed derivation will be described elsewhere). The intuitive interpretation of Eq. (4) is as follows: a feature y is to be associated with a cluster c in proportion to a weighted, though flattened, geometric mean of the “W-projected centroids” p(y|c,w), priored by p(c).2 This scheme overweighs y's that contribute to c evenly across W. Thus, clusters satisfying Eq. (4) are situated around centroids biased towards evenly contributing features. The higher η is, heavier emphasis is put on suppressing disagreements between the w's. For η → ∞ a plain weighted geometric-mean scheme is obtained. The inclusion of a step derived from Eq. (4) in our algorithm (see below) facilitates convergence on a configuration with centroids dominated by features that are evenly distributed across W. 3.2 The Cross-partition Clustering Algorithm Our proposed cross partition (CP) clustering algorithm (Fig. 2) seeks a clustering configuration that optimizes simultaneously both the IB and ID functionals, 1 Notice that “Z explaining well the dependencies between A and B” is equivalent with “A and B sharing little information in common given Z”, i.e. low I(A;B|Z). Complete conditional independence is exemplified in the IB framework, assuming I(C;Y|X) = 0. 2 Eq. (4) resembles our suggestion in [8] to compute a geometric average over the subsets; in the current paper this scheme is analytically derived from the ID functional. Start at time t = 0 and iterate the following update-steps, till convergence: CP1: Initialize pt(c|x) randomly or arbitrarily (t = 0) pt(c|x) ∝ [ ]) | ( ||) | ( 1 1 ) ( c Y p x Y p D t t KL e c p − − − β (t > 0) CP2: pt(c) = ∑x t x p x c p ) ( ) | ( CP3: p*t(y|c,w) = ∑ x t t x p x w p x y p x c p w p c p ) ( ) | ( ) | ( ) | ( ) ( ) ( 1 CP4: Initialize p*t(c) randomly or arbitrarily (t = 0) p*t(c) = ∑ − y t y p y c p ) ( ) | ( * 1 (t > 0) CP5: p*t(c|y) ∝ ∏ + w w p t t w c y p c p ) ( 1 ) , | ( * ) ( * η η CP6: pt(y|c) = ) ( * ) ( ) | ( * c p y p y c p t t Figure 2: The cross-partition clustering iterative algorithm (with fixed β, η, and |C|). thus obtaining clusters that cut across the pre-given partition W. To this end, the algorithm interleaves an iterative computation of the stable-point equations, and the additional estimated parameters, for both functionals. Steps CP1, CP2 and CP6 correspond to the computations related to the IB functional, while steps CP3, CP4 and CP5, which compute a separate set of parameters (denoted by an asterisk), correspond to the ID functional. Figure 3 summarizes the roles of the two functionals in the dynamics of the CP algorithm. The two components of the iterative cycle are tied together in steps CP3 and CP6, in which parameters from one set are used as input to compute a parameter of other set. The derivation of step CP3 relies on an additional assumption, namely that C, Y and W are jointly independent given X. This assumption, which extends to W the underlying assumption of the IB setting that C and Y are independent given X, still entails the IB stable point equation. At convergence, the stable point equations for both the IB and ID functionals are satisfied, each by its own set of parameters (in steps CP1 and CP5). The deterministic annealing scheme, which gradually increases β over repeated runs (see Sec. 2), is applied for the CP algorithm as well with η held fixed. For a given target number of clusters |C|, the algorithm empirically converges with a wide range of η values3. I(C;X) ↓ Õ IB Ö β↑ I(C;Y) ↓ Õ ID Ö η↑ I(C; W|Y) I(C; Y; W|X) = 0 ← assumptions → I(C;W) = 0 Figure 3: The interplay of the IB and the ID functionals in the CP algorithm. 3 High η values tend to dictate centroids with features that are unevenly distributed across W, resulting in shrinkage of some of the clusters. Further analysis will be provided in future work. 4 Experimental Results Our synthetic setting consisted of 75 virtual elements, evenly pre-partitioned into three 25-element parts denoted X1, X2 and X3 (in our formalism, for each clustered element x, p(w|x) = 1 holds for either w = 1, 2, or 3). On top of this pre-partition, we partitioned the data twice, getting two (exhaustive) clustering configurations: 1. Target cross-W clustering: five clusters, each with representatives from all Xw's; 2. Masking within-w clustering: six clusters, each consisting of roughly half the elements of either X1, X2 or X3 with no representatives from the other Xw's. Each cluster, of both configurations, was characterized by a designated subset of features. Masking clusters were designed to be more salient than target clusters: they had more designated features (60 vs. 48 per cluster, i.e., 360 vs. 240 in total) and their elements shared higher feature-element (virtual) co-occurrence counts with those designated features (900 vs. 450 per element-feature pair). Noise (random positive integer < 200) was added to all counts associating elements with their designated features (for both within-w and cross-W clusters), as well as to roughly quarter of the zero counts associating elements with the rest of the features. The plain IB method consistently produced configurations strongly correlated with the masking clustering, while the CP algorithm revealed the target configuration. We got (see Table 1A) almost perfect results in configurations of nearly equal-sized cross-W clusters, and somewhat less perfect reconstruction in configurations of diverging sizes (6, 9, 15, 21 and 24). Performance level was measured relatively to optimal target-output cluster match by the proportion of elements correctly assigned, where assignment of an element x follows its highest p(c|x). The results indicated were averaged over 200 runs. They were obtained for the optimal η, which was found to be higher in the diverging-sizes task. In the text-based task, the clustered elements – keywords – were automatically extracted from five distinct corpora addressing five religions: introductory web pages, online magazines, encyclopedic entries etc., all downloaded from the Internet. The clustered keyword set X was consequently pre-partitioned to disjoint subsets {Xw}w∈W, one for each religion4 (|Xw| ≈ 200 for each w). We conducted experiments simultaneously involving religion pairs as well as all five religions. We took the features Y to be a set of words that commonly occur within all five corpora (|Y| ≈ 7000). x–y co-occurrences were recorded within ±5-word sliding window truncated by sentence boundaries. η was fixed to a value (1.0) enabling the formation of 20 clusters in all settings. The obtained clusters revealed interesting cross religion themes (see Sec. 1). For instance, the cluster (one of nine) capturing the theme of sacred festivals: the three highest p(c/x) members within each religion were Full-moon, Ceremony, Celebration (Buddhism); Easter, Sunday, Christmas Table 1: Average correct assignment proportion scores for the synthetic task (A) and Jaccard-coefficient scores for the religion keyword classification task (B). A. Synthetic Data IB CP B. Religion Data IB Coupled Clustering [7] CP (cross-expert agreement on religion pairs .462±.232) equal-size clusters .305 .985 religion pairs .200±.100 .220±.138 .407±.144 non-equal clusters .292 .827 all five (one case) .104 ––––––– .167 4 A keyword x that appeared in the corpora of different religions was considered as a distinct element for each religion, so the Xw were kept disjointed. (Chrsitianity); Puja, Ceremony, Festival (Hinduism); Id-al-Fitr, Friday, Ramadan, (Islam); and Sukkoth, Shavuot, Rosh-Hodesh (Judaism). The closest cluster produced by the plain IB method was poorer by far, including Islamic Ramadan, and Id and Jewish Passover, Rosh-Hashanah and Sabbath (which our method ranked high too), but no single related term from the other religions. Our external evaluation standards were cross-religion keyword classes constructed manually by experts of comparative religion studies. One such expert classification involved all five religions, and eight classifications addressed religions in pairs. Each of the eight religion-pair classifications was contributed by two independent experts using the same keywords, so we could also assess the agreement between experts. As an overlap measure we employed the Jaccard coefficient: the number of element pairs co-assigned together by both one of the evaluated clusters and one of the expert classes, divided by the number of pairs co-assigned by either our clusters or the expert (or both). We did not assume the number of expert classes is known in advance (as done in the synthetic experiments), so the results were averaged over all configurations of 2–16 cluster hierarchy, for each experiment. The results shown in Table 1B – clear improvement relatively to plain IB and the distance-based coupled clustering [7] – are, however, persistent when the number of clusters is taken to be equal to the number of classes, or if only the best score in hierarchy is considered. The level of cross-expert agreement indicates that our results are reasonably close to the scores expected in such subjective task. 5 Comparison to Related Work The information bottleneck framework served as the basis for several approaches that represent additional information in their clustering setting. The multivariate information bottleneck (MIB) adapts the IB framework for networks of multiple variables [3]. However, all variables in such networks are either compressed (like X), or predicted (like Y). The incorporation of an empirical variable to be masked or defocused in the sense of our W is not possible. Including such variables in the MIB framework might be explored in future work. Particularly relevant to our work is the IB-based method for extracting relevant constructs with side information [4]. This approach addresses settings in which two different types of features are distinguished explicitly: relevant versus irrelevant ones, denoted by Y+ and Y−. Both types of features are incorporated within a single functional to be minimized: L(IB-side-info) = I(C; X) − β ( I(C; Y+) − γ I(C; Y−) ), which directly drives clustering to de-correlate C and Y−. Formally, our setting can be mapped to the side information setting by regarding the pre-partition W simply as the additional set of irrelevant features, giving symmetric (and opposite) roles to W and Y. However, it seems that this view does not address properly the desired cross-partition setting. In our setting, it is assumed that clustering should be guided in general by Y, while W should only neutralize particular information within Y that would otherwise yield the undesired correlation between C and W (as described in Section 3.1). For that reason, the defocusing functional tie the three variables together by conditioning the de-correlation of C and W on Y, while its underlying assumption ensures the global de-correlation. Indeed, our method was found empirically superior on the cross-dataset task. The side-information IB method (the iterative algorithm with best scoring γ) achieves correct assignment proportion of 0.52 in both synthetic tasks, where our method scored 0.99 and 0.83 (see Table 1A) and, in the religion-pair keyword classification task, Jaccard coefficient improved by 20% relatively to plain IB (compared to our 100% improvement, see Table 1B). 6 Conclusions This paper addressed the problem of clustering a pre-partitioned dataset, aiming to detect new internal structures that are not correlated with the pre-given partition but rather cut across its components. The proposed framework extends the cross-dataset clustering algorithm [8], providing better formal grounding and representing any pre-given (soft) partition of the dataset. Supported by empirical evidence, we suggest that our framework is better suited for the cross-partition task than applying the side-information framework [4], which was originally developed to address a somewhat different setting. We also demonstrate substantial empirical advantage over the distance-based coupled-clustering algorithm [7]. As an applied real-world goal, the algorithm successfully detects cross-religion commonalities. This goal exemplifies the more general notion of detecting analogies across different systems, which is a somewhat vague and non-consensual task and therefore especially challenging for a computational framework. Our approach can be viewed as an initial step towards principled identification of “hidden” commonalities between substantially different real world systems, while suppressing the vast majority of attributes that are irrelevant for the analogy. Further research may study the role of defocusing in supervised learning, where some pre-given partitions might mask the role of underlying discriminative features. Additionally, it would be interesting to explore relationships to other disciplines, e.g., network information theory ([9], Ch. 14) which provided motivation for the side-information approach. Finally, both frameworks (ours and side-information) suggest the importance of dealing wisely with information that should not dictate the clustering output directly. Acknowledgments We thank Yuval Krymolowski for helpful discussions and Tiina Mahlamäki, Eitan Reich and William Shepard, for contributing the religion keyword classifications. References [1] Hofmann, T. (2001) Unsupervised learning by probabilistic latent semantic analysis. Journal of Machine Learning Research, 41(1):177-196. [2] Wagstaff K., Cardie C., Rogers S. and Schroedl S., 2001. Constrained K-Means clustering with background knowledge. The 18th International Conference on Machine Learning (ICML-2001), pp 577-584. [3] Friedman N., Mosenzon O., Slonim N. & Tishby N. (2002) Multivariate information bottleneck. The 17th conference on Uncertainty in Artificial Intelligence (UAI-17), pp. 152161. [4] Chechik G. & Tishby N. (2002) Extracting relevant structures with side information. Advances in Neural Processing Information Systems 15 (NIPS'02). [5] Globerson, A., Chechik G. & Tishby N. (2003) Sufficient dimensionality reduction. Journal of Machine Learning Research, 3:1307-1331. [6] Tishby, N., Pereira, F. C. & Bialek, W. (1999) The information bottleneck method. The 37th Annual Allerton Conference on Communication, Control, and Computing, pp. 368-379. [7] Marx, Z., Dagan, I., Buhmann, J. M. & Shamir E. (2002) Coupled clustering: A method for detecting structural correspondence. Journal of Machine Learning Research, 3:747-780. [8] Dagan, I., Marx, Z. & Shamir E (2002) Cross-dataset clustering: Revealing corresponding themes across multiple corpora. Proceedings of the 6th Conference on Natural Language Learning (CoNLL-2002), pp. 15-21. [9] Cover T. M. & Thomas J. A. (1991) Elements of Information Theory. John Wiley & Sons, Inc., New York, New York.
2003
178
2,396
Eigenvoice Speaker Adaptation via Composite Kernel PCA James T. Kwok, Brian Mak and Simon Ho Department of Computer Science Hong Kong University of Science and Technology Clear Water Bay, Hong Kong [jamesk,mak,csho]@cs.ust.hk Abstract Eigenvoice speaker adaptation has been shown to be effective when only a small amount of adaptation data is available. At the heart of the method is principal component analysis (PCA) employed to find the most important eigenvoices. In this paper, we postulate that nonlinear PCA, in particular kernel PCA, may be even more effective. One major challenge is to map the feature-space eigenvoices back to the observation space so that the state observation likelihoods can be computed during the estimation of eigenvoice weights and subsequent decoding. Our solution is to compute kernel PCA using composite kernels, and we will call our new method kernel eigenvoice speaker adaptation. On the TIDIGITS corpus, we found that compared with a speaker-independent model, our kernel eigenvoice adaptation method can reduce the word error rate by 28–33% while the standard eigenvoice approach can only match the performance of the speaker-independent model. 1 Introduction In recent years, there has been a lot of interest in the study of kernel methods [1]. The basic idea is to map data in the input space X to a feature space via some nonlinear map ϕ, and then apply a linear method there. It is now well known that the computational procedure depends only on the inner products1 ϕ(xi)′ϕ(xj) in the feature space (where xi, xj ∈ X), which can be obtained efficiently from a suitable kernel function k(·, ·). Besides, kernel methods have the important computational advantage that no nonlinear optimization is involved. Thus, the use of kernels provides elegant nonlinear generalizations of many existing linear algorithms. A well-known example in supervised learning is the support vector machines (SVMs). In unsupervised learning, the kernel idea has also led to methods such as kernel-based clustering algorithms and kernel principal component analysis [2]. In the field of automatic speech recognition, eigenvoice speaker adaptation [3] has drawn some attention in recent years as it is found particularly useful when only a small amount of adaptation speech is available; e.g. a few seconds. At the heart of the method is principal component analysis (PCA) employed to find the most important eigenvoices. Then 1In this paper, vector/matrix transpose is denoted by the superscript ′. a new speaker is represented as a linear combination of a few (most important) eigenvoices and the eigenvoice weights are usually estimated by maximizing the likelihood of the adaptation data. Conventionally, these eigenvoices are found by linear PCA. In this paper, we investigate the use of nonlinear PCA to find the eigenvoices by kernel methods. In effect, the nonlinear PCA problem is converted to a linear PCA problem in the highdimension feature space using the kernel trick. One of the major challenges is to map the feature-space eigenvoices back to the observation space to compute the state observation likelihood of adaptation data during the estimation of eigenvoice weights and likelihood of test data during decoding. Our solution is to compute kernel PCA using composite kernels. We will call our new method kernel eigenvoice speaker adaptation. Kernel eigenvoice adaptation will have to deal with several parameter spaces. To avoid confusion, we denote the several spaces as follows: the d1-dimensional observation space as O; the d2-dimensional speaker (supervector) space as X; and the d3-dimensional speaker feature space as F. Notice that d1 ≪d2 ≪d3 in general. The rest of this paper is organized as follows. Brief overviews on eigenvoice speaker adaptation and kernel PCA are given in Sections 2 and 3. Sections 4 and 5 then describe our proposed kernel eigenvoice method and its robust extension. Experimental results are presented in Section 6, and the last section gives some concluding remarks. 2 Eigenvoice In the standard eigenvoice approach [3], speech training data are collected from many speakers with diverse characteristics. A set of speaker-dependent (SD) acoustic hidden Markov models (HMMs) are trained from each speaker where each HMM state is modeled as a mixture of Gaussian distributions. A speaker’s voice is then represented by a speaker supervector that is composed by concatenating the mean vectors of all HMM Gaussian distributions. For simplicity, we assume that each HMM state consists of one Gaussian only. The extension to mixtures of Gaussians is straightforward. Thus, the ith speaker supervector consists of R constituents, one from each Gaussian, and will be denoted by xi = [x′ i1 . . . x′ iR]′ ∈Rd2. The similarity between any two speaker supervectors xi and xj is measured by their dot product x′ ixj = R X r=1 x′ irxjr . (1) PCA is then performed on a set of training speaker supervectors and the resulting eigenvectors are called eigenvoices. To adapt to a new speaker, his/her supervector s is treated as a linear combination of the first M eigenvoices {v1, . . . , vM}, i.e., s = s(ev) = PM m=1 wmvm where w = [w1, . . . , wM]′ is the eigenvoice weight vector. Usually, only a few eigenvoices (e.g., M < 10) are employed so that a little amount of adaptation speech (e.g., a few seconds) will be required. Given the adaptation data ot, t = 1, . . . , T, the eigenvoice weights are in turn estimated by maximizing the likelihood of the ot’s. Mathematically, one finds w by maximizing the Q function: Q(w) = Qπ + Qa + Qb(w), where Qπ = R X r=1 γ1(r) log(πr) , Qa = R X p,r=1 T −1 X t=1 ξt(p, r) log(apr) , and, Qb(w) = R X r=1 T X t=1 γt(r) log(br(ot, w)) , (2) and πr is the initial probability of state r; γt(r) is the posterior probability of observation sequence being at state r at time t; ξt(p, r) is the posterior probability of observation sequence being at state p at time t and at state r at time t+1; br is the Gaussian pdf of the rth state after re-estimation. Furthermore, Qb is related to the new speaker supervector s by Qb(w) = −1 2 R X r=1 T X t=1 γt(r)  d1 log(2π) + log |Cr| + ∥ot −sr(w)∥2 Cr  , (3) where ∥ot −sr(w)∥2 Cr = (ot −sr(w))′C−1 r (ot −sr(w)) and Cr is the covariance matrix of the Gaussian at state r. 3 Kernel PCA In this paper, the computation of eigenvoices is generalized by performing kernel PCA instead of linear PCA. In the following, let k(·, ·) be the kernel with associated mapping ϕ which maps a pattern x in the speaker supervector space X to ϕ(x) in the speaker feature space F. Given a set of N patterns (speaker supervectors) {x1, . . . , xN}, denote the mean of the ϕ-mapped feature vectors by ¯ϕ = 1 N PN i=1 ϕ(xi), and the “centered” map by ˜ϕ (with ˜ϕ(x) = ϕ(x) −¯ϕ). Eigendecomposition is performed on ˜K, the centered version of K = [k(xi, xj)]ij, as ˜K = UΛU′, where U = [α1, . . . , αN] with αi = [αi1, . . . , αiN]′, and Λ = diag(λ1, . . . , λN). Notice that ˜K is related to K by ˜K = HKH, where H = I −1 N 11′ is the centering matrix, I is the N × N identity matrix, and 1 = [1, . . . , 1]′, an N-dimensional vector. The mth orthonormal eigenvector of the covariance matrix in the feature space is then given by [2] as vm = PN i=1 αmi √λm ˜ϕ(xi) . 4 Kernel Eigenvoice As seen from Eqn (3), the estimation of eigenvoice weights requires the evaluation of the distance between adaptation data ot and Gaussian means of the new speaker in the observation space O. In the standard eigenvoice method, this is done by first breaking down the adapted speaker supervector s to its R constituent Gaussians s1, . . . , sR. However, the use of kernel PCA does not allow us to access each constituent Gaussians directly. To get around the problem, we investigate the use of composite kernels. 4.1 Definition of the Composite Kernel For the ith speaker supervector xi, we map each constituent xir separately via a kernel kr(·, ·) to ϕr(xir), and then construct ϕ(xi) as ϕ(xi) = [ϕ1(xi1)′, . . . , ϕR(xiR)′]′. Analogous to Eqn (1), the similarity between two speaker supervectors xi and xj in the composite feature space is measured by k(xi, xj) = R X r=1 kr(xir, xjr) . Note that if kr’s are valid Mercer kernels, so is k [1]. Using this composite kernel, we can then proceed with the usual kernel PCA on the set of N training speaker supervectors and obtain αm’s, λm’s, and the orthonormal eigenvectors vm’s (m = 1, . . . , M) of the covariance matrix in the feature space F. 4.2 New Speaker in the Feature Space In the following, we denote the supervector of a new speaker by s. Similar to the standard eigenvoice approach, its ˜ϕ-mapped speaker feature vector2 ˜ϕ(kev)(s) is assumed to be a 2The notation for a new speaker in the feature space requires some explanation. If s exists, then its centered image is ˜ϕ(kev)(s). However, since the pre-image of a speaker in the feature space may linear combination of the first M eigenvectors, i.e., ˜ϕ(kev)(s) = M X m=1 wmvm = M X m=1 N X i=1 wmαmi √λm ˜ϕ(xi). (4) Its rth constituent is then given by ˜ϕ(kev) r (sr) = M X m=1 N X i=1 wmαmi √λm ˜ϕr(xir) . Hence, the similarity between ϕ(kev) r (sr) and ϕr(ot) is given by k(kev) r (sr, ot) ≡ ϕ(sr)′ϕr(ot) = " M X m=1 N X i=1 wmαmi √λm ˜ϕr(xir) ! + ¯ϕr #′ ϕr(ot) = " M X m=1 N X i=1 wmαmi √λm (ϕr(xir) −¯ϕr) ! + ¯ϕr #′ ϕr(ot) = M X m=1 N X i=1 wmαmi √λm (kr(xir, ot) −¯ϕ′ rϕr(ot)) + ¯ϕ′ rϕr(ot) ≡ A(r, t) + M X m=1 wm √λm B(m, r, t), (5) where ¯ϕr = 1 N PN i=1 ϕr(xir) is the rth part of ¯ϕ, A(r, t) = ¯ϕ′ rϕr(ot) = 1 N N X j=1 kr(xjr, ot), and B(m, r, t) = N X i=1 αmikr(xir, ot) ! −A(r, t) N X i=1 αmi ! . 4.3 Maximum Likelihood Adaptation Using an Isotropic Kernel On adaptation, we have to express ∥ot −sr∥2 Cr of Eqn (3) as a function of w. Consider using isotropic kernels for kr so that kr(xir, xjr) = κ(∥xir −xjr∥Cr). Then k(kev) r (sr, ot) = κ(∥ot −sr∥2 Cr), and if κ is invertible, ∥ot −sr∥2 Cr will be a function of k(kev) r (sr, ot), which in turn is a function of w by Eqn (5). In the sequel, we will use the Gaussian kernel kr(xir, xjr) = exp(−βr∥xir −xjr∥2 Cr), and hence ∥ot −sr∥2 Cr = −1 βr log k(kev) r (sr, ot) = −1 βr log A(r, t) + M X m=1 wm √λm B(m, r, t) ! . (6) Substituting Eqn (6) for the Qb function in Eqn (3), and differentiating with respect to each eigenvoice weight, wj, j = 1, . . . , M, we obtain ∂Qb ∂wj = 1 2 p λj R X r=1 T X t=1 γt(r) βr · B(j, r, t) k(kev) r (sr, ot) . (7) not exist, its notation as ˜ϕ(kev)(s) is not exactly correct. However, the notation is adopted for its intuitiveness and the readers are advised to infer the existence of s based on the context. Since Qπ and Qa do not depend on w, ∂Q ∂wj = ∂Qb ∂wj . 4.4 Generalized EM Algorithm Because of the nonlinear nature of kernel PCA, Eqn (6) is nonlinear in w and there is no closed form solution for the optimal w. In this paper, we instead apply the generalized EM algorithm (GEM) [4] to find the optimal weights. GEM is similar to standard EM except for the maximization step: EM looks for w that maximizes the expected likelihood of the E-step but GEM only requires a w that improves the likelihood. Many numerical methods may be used to update w based on the derivatives of Q. In this paper, gradient ascent is used to get w(n) from w(n −1) based only on the first-order derivative as: w(n) = w(n −1) + η(n)Q′|w=w(n−1), where Q′ = ∂Qb ∂w and η(n) is the learning rate at the nth iteration. Methods such as the Newton’s method that uses the second-order derivatives may also be used for faster convergence, at the expense of computing the more costly Hessian in each iteration. The initial value of w(0) can be important for numerical methods like gradient ascent. One reasonable approach is to start with the eigenvoice weights of the supervector composed from the speaker-independent model x(si). That is, wm = v′ m ˜ϕ(x(si)) = N X i=1 αmi √λm ˜ϕ(xi)′ ˜ϕ(x(si)) = N X i=1 αmi √λm [ϕ(xi) −¯ϕ]′[ϕ(x(si)) −¯ϕ] = N X i=1 αmi √λm " k(xi, x(si))+ 1 N 2 N X p,q=1 k(xp, xq)−1 N N X p=1 k(xi, xp)+k(x(si), xp)  # . (8) 5 Robust Kernel Eigenvoice The success of the eigenvoice approach for fast speaker adaptation is due to two factors: (1) a good collection of “diverse” speakers so that the whole speaker space is captured by the eigenvoices; and (2) the number of adaptation parameters is reduced to a few eigenvoice weights. However, since the amount of adaptation data is so little the adaptation performance may vary widely. To get a more robust performance, we propose to interpolate the kernel eigenvoice ˜ϕ(kev)(s) obtained in Eqn (4) with the ˜ϕ-mapped speaker-independent (SI) supervector ˜ϕ(x(si)) to obtain the final speaker adapted model ˜ϕ(rkev)(s) as follows: ˜ϕ(rkev)(s) = w0 ˜ϕ(x(si)) + (1 −w0) ˜ϕ(kev)(s) , 0.0 ≤w0 ≤1.0 , (9) where ˜ϕ(kev)(s) is found by Eqn (4). By replacing ˜ϕ(kev)(s) by ˜ϕ(rkev)(s) for the computation of the kernel value of Eqn (5), and following the mathematical steps in Section 4, one may derive the required gradients for the joint maximum-likelihood estimation of w0 and other eigenvoice weights in the GEM algorithm. Notice that ˜ϕ(rkev)(s) also contains components in ˜ϕ(x(si)) from eigenvectors beyond the M selected kernel eigenvoices for adaptation. Thus, robust KEV adaptation may have the additional benefit of preserving the speaker-independent projections on the remaining less important but robust eigenvoices in the final speaker-adapted model. 6 Experimental Evaluation The proposed kernel eigenvoice adaptation method was evaluated on the TIDIGITS speech corpus [5]. Its performance was compared with that of the speaker-independent model and the standard eigenvoice adaptation method using only 3s, 5.5s, and 13s of adaptation speech. If we exclude the leading and ending silence, the average duration of adaptation speech is 2.1s, 4.1s, and 9.6s respectively. 6.1 TIDIGITS Corpus The TIDIGITS corpus contains clean connected-digit utterances sampled at 20 kHz. It is divided into a standard training set and a test set. There are 163 speakers (of both genders) in each set, each pronouncing 77 utterances of one to seven digits (out of the eleven digits: “0”, “1”, . . ., “9”, and “oh”.). The speaker characteristics is quite diverse with speakers coming from 22 dialect regions of USA and their ages ranging from 6 to 70 years old. In all the following experiments, only the training set was used to train the speakerindependent (SI) HMMs and speaker-dependent (SD) HMMs from which the SI and SD speaker supervectors were derived. 6.2 Acoustic Models All training data were processed to extract 12 mel-frequency cepstral coefficients and the normalized frame energy from each speech frame of 25 ms at every 10 ms. Each of the eleven digit models was a strictly left-to-right HMM comprising 16 states and one Gaussian with diagonal covariance per state. In addition, there were a 3-state “sil” model to capture silence speech and a 1-state “sp” model to capture short pauses between digits. All HMMs were trained by the EM algorithm. Thus, the dimension of the observation space d1 is 13 and that of the speaker supervector space d2 = 11 × 16 × 13 = 2288. Firstly, the SI models were trained. Then an SD model was trained for each individual speaker by borrowing the variances and transition matrices from the corresponding SI models, and only the Gaussian means were estimated. Furthermore, the sil and sp models were simply copied to the SD model. 6.3 Experiments The following five models/systems were compared: SI: speaker-independent model EV: speaker-adapted model found by the standard eigenvoice adaptation method. Robust-EV: speaker-adapted models found by our robust version of EV, which is the interpolation between the SI supervector and the supervector found by EV. That is, s(rev) = w0s(si) + (1 −w0)s(ev) , 0.0 ≤w0 ≤1.0 . KEV: speaker-adapted model found by our new kernel eigenvoice adaptation method as described in Section 4. Robust-KEV: speaker-adapted model found by our robust KEV as described in Section 5. All adaptation results are the averages of 5-fold cross-validation taken over all 163 test speaker data. The detailed results using different numbers of eigenvoices are shown in Figure 1, while the best result for each model is shown in Table 1. Table 1: Word recognition accuracies of SI model and the best adapted models found by EV, robust EV, KEV, and robust KEV using 2.1s, 4.1s, and 9.6s of adaptation speech. SYSTEM 2.1s 4.1s 9.6s SI 96.25 EV 95.61 95.65 95.67 robust EV 96.26 96.26 96.27 KEV 96.85 97.05 97.05 robust KEV 97.28 97.44 97.50 From Table 1, we observe that the standard eigenvoice approach cannot obtain better performance than the SI model3. On the other hand, using our kernel eigenvoice (KEV) method, we obtain a word error rate (WER) reduction of 16.0%, 21.3%, and 21.3% with 2.1s, 4.1s, and 9.6s of adaptation speech over the SI model. When the SI model is interpolated with the KEV model in our robust KEV method, the WER reduction further improves to 27.5%, 31.7%, and 33.3% respectively. These best results are obtained with 7 to 8 eigenvoices. The results show that nonlinear PCA using composite kernels can be more effective in finding the eigenvoices. 94 94.5 95 95.5 96 96.5 97 97.5 98 0 1 2 3 4 5 6 7 8 9 10 Word Recognition Accuracy (%) Number of Kernel Eigenvoices SI model KEV (2.1s) KEV (9.6s) robust KEV (2.1s) robust KEV (9.6s) 94 94.5 95 95.5 96 96.5 97 97.5 98 0 1 2 3 4 5 6 7 8 9 10 Word Recognition Accuracy (%) Number of Kernel Eigenvoices SI model KEV (2.1s) KEV (9.6s) robust KEV (2.1s) robust KEV (9.6s) Figure 1: Word recognition accuracies of adapted models found by KEV and robust KEV using different numbers of eigenvoices. From Figure 1, the KEV method can outperform the SI model even with only two eigenvoices using only 2.1s of speech. Its performance then improves slightly with more eigenvoices or more adaptation data. If we allow interpolation with the SI model as in robust 3The word accuracy of our SI model is not as good as the best reported result on TIDIGITS which is about 99.7%. The main reasons are that we used only 13-dimensional static cepstra and energy, and each state was modelled by a single Gaussian with diagonal covariance. The use of this simple model allowed us to run experiments with 5-fold cross-validation using very short adaptation speech. Right now our approach requires computation of many kernel function values and is very computationally expensive. As a first attempt on the approach, we feel that the use of this simple model is justified. We are now working on its speed-up and its extension to HMM states of Gaussian mixtures. KEV, the saturation effect is even more pronounced: even with one eigenvoice, the adaptation performance is already better than that of SI model, and then the performance does not change much with more eigenvoices or adaptation data. The results seem to suggest that the requirement that the adapted speaker supervector is a weighted sum of few eigenvoices is both the strength and weakness of the method: on the one hand, fast adaptation becomes possible since the number of estimation parameters is small, but adaptation saturates quickly because the constraint is so restrictive that all mean vectors of different acoustic models have to undergo the same linear combination of the eigenvoices. 7 Conclusions In this paper, we improve the standard eigenvoice speaker adaptation method using kernel PCA with a composite kernel. In the TIDIGITS task, it is found that while the standard eigenvoice approach does not help, our kernel eigenvoice method may outperform the speaker-independent model by about 28–33% (in terms of error rate improvement). Right now the speed of recognition using the adapted model that resulted from our kernel eigenvoice method is slower than that from the standard eigenvoice method because any state observation likelihoods cannot be directly computed but through evaluating the kernel values with all training speaker supervectors. One possible solution is to apply sparse kernel PCA [6] so that computation of the first M principal components involves only M (instead of N with M ≪N) kernel functions. Another direction is to use compactly supported kernels [7], in which the value of κ(∥xi −xj∥) vanishes when ∥xi −xj∥is greater than a certain threshold. The kernel matrix then becomes sparse. Moreover, no more computation is required when ∥xi −xj∥is large. 8 Acknowledgements This research is partially supported by the Research Grants Council of the Hong Kong SAR under the grant numbers HKUST2033/00E, HKUST6195/02E, and HKUST6201/02E. References [1] B. Sch¨olkopf and A.J. Smola. Learning with Kernels. MIT, 2002. [2] B. Sch¨olkopf, A. Smola, and K.R. M¨uller. Nonlinear component analysis as a kernel eigenvalue problem. Neural Computation, 10:1299–1319, 1998. [3] R. Kuhn, J.-C. Junqua, P. Nguyen, and N. Niedzielski. Rapid Speaker Adaptation in Eigenvoice Space. IEEE Transactions on Speech and Audio Processing, 8(4):695–707, Nov 2000. [4] A.P. Dempster, N.M. Laird, and D.B. Rubin. Maximum likelihood from incomplete data via the EM algorithm. Journal of the Royal Statistical Society: Series B, 39(1):1– 38, 1977. [5] R.G. Leonard. A Database for Speaker-Independent Digit Recognition. In Proceedings of the IEEE International Conference on Acoustics, Speech, and Signal Processing, volume 3, pages 4211–4214, 1984. [6] A.J. Smola, O.L. Mangasarian, and B. Sch¨olkopf. Sparse kernel feature analysis. Technical Report 99-03, Data Mining Institute, University of Wisconsin, Madison, 1999. [7] M.G. Genton. Classes of kernels for machine learning: A statistics perspective. Journal of Machine Learning Research, 2:299–312, 2001.
2003
179
2,397
When Does Non-Negative Matrix Factorization Give a Correct Decomposition into Parts? David Donoho Department of Statistics Stanford University Stanford, CA 94305 donoho@stat.stanford.edu Victoria Stodden Department of Statistics Stanford University Stanford, CA 94305 vcs@stat.stanford.edu Abstract We interpret non-negative matrix factorization geometrically, as the problem of finding a simplicial cone which contains a cloud of data points and which is contained in the positive orthant. We show that under certain conditions, basically requiring that some of the data are spread across the faces of the positive orthant, there is a unique such simplicial cone. We give examples of synthetic image articulation databases which obey these conditions; these require separated support and factorial sampling. For such databases there is a generative model in terms of ‘parts’ and NMF correctly identifies the ‘parts’. We show that our theoretical results are predictive of the performance of published NMF code, by running the published algorithms on one of our synthetic image articulation databases. 1 Introduction In a recent article in Nature [4], Lee and Seung proposed the notion of non-negative matrix factorization (NMF) as a way to find a set of basis functions for representing non-negative data. They claimed that the notion is particularly applicable to image articulation libraries made up of images showing a composite object in many articulations and poses. They suggested (in the very title of the article) that when used in the analysis of such data, NMF would find the intrinsic ‘parts’ underlying the object being pictured. NMF is akin to other matrix decompositions which have been proposed previously, such as positive matrix factorization (PMF) of Juvela, Lehtinen, and Paatero [3], [2] and various minimum-volume transforms used in the analysis of remote-sensing data [1]. Numerous applications of these methods have been attempted [6], [7], [9]. Despite all the literature and discussion of this method, two fundamental questions appear not to have been posed clearly, let alone answered: • Under what assumptions is the notion of non-negative matrix factorization welldefined, for example is the factorization in some sense unique? • Under what assumptions is the factorization correct, recovering the ‘right answer’? In this paper, we develop a geometric view of the setting underlying NMF factorization and derive geometric conditions under which the factorization is essentially unique, so NMF makes sense no matter what algorithm is being employed. We then consider those conditions in the setting of image articulation libraries. We describe a class of image libraries which are created by an NMF-style generative model, where different parts have separate support, and where all different combinations of parts are exhaustively sampled. Our theory shows that, in such Separable Factorial Articulation Families, non-negative factorization is effectively unique. In such libraries, NMF will indeed successfully ‘find the parts’. We construct such a library, showing a stick figure with four limbs going through a range of various motions, and verify that our theoretical analysis is predictive of the actual performance of the Lee and Seung algorithm on this image library. Our viewpoint also explains relations between NMF and other ideas for obtaining non-negative factorizations and explains why uniqueness and stability may fail under other conditions. We note that Plumbley [5] has in some sense already validated NMF for datasets which are not only non-negative but which obey an independent components model. However, in our view, this is actually a result about independent components analysis, not NMF. For example, for the kinds of image articulation families where each part is viewed in one of many positions, the underlying exclusion principle – that a certain part can only be present in one particular articulation – guarantees that an ICA model does not apply. And this parts-based setting is exactly the setting for NMF envisioned by Seung and Lee. 2 Non-Negative Matrix Factorization NMF seeks to decompose a non-negative n × p matrix X, where each row contains the p pixel values for one of the n images, into X = AΨ (1) where A is n × r and Ψ is r × p, and both A and Ψ have non-negative entries. The rows of Ψ, denoted (ψj)r j=1, are basis elements in Rp and the rows of A, (αi)n i=1, belong to Rr and can be thought of as coefficient sequences representing the images in that basis. Recalling that the rows of X, (xi), are individual images stored as row vectors, the representation takes the form xi = r X j=1 αi jψj. Indexing the pixels by k = 1, . . . , p, non-negativity of αi and ψj can be written as: ψj(k) ≥0, j = 1, . . . , r, k = 1, . . . , p; αi j ≥0, j = 1, . . . , r, i = 1, . . . , n. (2) It is clear that as a generative model, this approach makes sense; each of us can think of some admittedly very simple imaging settings where the scene is composed out of ‘standard parts’ in a variety of positions, where these are represented by the ψj and each image is made by superposing some of those ‘parts’. In this setting each part is either present or absent, and the corresponding coefficient is thus positive or zero. An example of this kind will be given in Section 4 below. What is less clear is whether, when the generative model actually holds and we generate a synthetic dataset based on that model, the NMF matrix factorization of the dataset will yield underlying basis elements which have some connection to the true generative elements. In this paper we investigate this question and exhibit conditions under which NMF will in fact successfully recover the true generative elements. 3 Geometric Interpretation of the NMF Setting We now describe a geometric viewpoint which will help explain the issues involved. Each image in our database of images can be thought of as a point in a p-dimensional space, whose p coordinates are given by the intensity values in each of the p pixels. The fact that image data are non-negative means that every such point lies in the positive orthant P of Rp. The factorization X = AΨ says that there are vectors ψj in Rp such that all the data points xi have a representation as non-negative linear combinations of the ψj. This algebraic characterization has a geometric counterpart. Definition. The simplicial cone generated by vectors Φ = (φj)r j=1 is Γ = ΓΦ = {x : x = X j αjφj, αj ≥0}. The factorization (1) tells us geometrically that the (xi) all lie in the simplicial cone ΣΨ generated by the (ψj). Now in general, for a given dataset (xi), there will be many possible simplicial cones containing the points in that dataset. Indeed, if ΓΨ is a simplicial cone containing the data, and ΓΦ is another cone containing the first, so that ΓΨ ⊂ΓΦ, then the corresponding vectors Φ = (φj) also can furnish a representation of the dataset (xi). Now for any simplicial cone, there can always be another cone containing it strictly, so there are an infinite number of factorizations X = AΨ with non-negative A, and various Ψ which are nontrivially different. Hence the constraint A ≥0 is not enough to lead to a well-defined notion. However, the geometric viewpoint we are developing does not so far include the positivity constraint Ψ ≥0 on the generating vectors of the simplicial cone. Geometrically, this constraint demands that the simplicial cone ΓΨ lies inside the positive orthant P. Can we obtain uniqueness with this extra constraint? Not if the data values are strictly positive, so that Xi,k ≥ϵ > 0 ∀i, k. (3) Geometrically, this condition places the data points xi well inside the interior of the positive orthant P. It is then evident by visual inspection that there will be many simplicial cones containing the data. For example, P itself is a simplicial cone, and it contains the data points. However, many other cones will also contain the data points. Indeed, for δ > 0 consider the collection of vectors Φδ with individual vectors φδ j = ej + δ1 where ej denotes the usual vector in the standard basis, and 1 denotes the vector of all ones. Then, for δ < ϵ, the cone ΓΦδ also contains all the data points. Geometrically ΓΦδ is a dilation of the positive orthant that shrinks it slightly towards the main diagonal. Since the positivity constraint (3) places all the data well inside the interior of the positive orthant, for slight enough shrinkage it will still contain the data. It follows from the geometric-algebraic correspondence that under the strict positivity condition (3), there are many distinct representations X = AΨ where A ≥0 and Ψ ≥0. In short, we must look for situations where the data do not obey strict positivity in order to have uniqueness. 4 An Example of Uniqueness When we take the non-negativity constraint on the generating elements (the extreme rays of the simplicial cone) into account, it can happen that there will only be one simplicial cone containing the data. This is completely clear if the data somehow ‘fill out’ the positive orthant. What is perhaps surprising is that uniqueness can hold even when the data only ‘fill out’ a proper subset of the positive orthant. Here is an example of how that can occur. Consider the ‘ice-cream cone’ C = {x : x′1 ≥ p p −1||x||} where p is again the dimensionality of the dataspace. Lemma 1. There is a unique simplicial cone which both contains C and is itself contained in the positive orthant. Indeed that unique cone is P itself; no simplicial cone contained inside P contains all of C! To give a full proof, we introduce notions from the subject of convex duality [8]. Associated with the primal domain of points x we have been dealing with so far, there is also the dual domain of linear functionals ξ acting on points x via ξ′x. If we have a convex set C, its dual C∗is defined as a collection of linear functionals which are positive on C: C∗= {ξ : ξ′x ≥0 ∀x ∈C} The following facts are easily verified: Lemma 2. • If K is closed and convex then (K∗)∗= K. • The dual of a simplicial cone with p linearly independent generators, is another simplicial cone with p generators. • The positive orthant is self-dual: P∗= P. • Duality reverses set inclusion: B ⊂C =⇒C∗⊂B∗. (4) We also need Definition. Given a pointset (xi), its conical hull is the simplicial hull generated by the vectors (xi) themselves. Let X be the conical hull of a pointset. An abstraction of the NMF problem is: Primal-Simplicial-Cone(r, X) Find a simplicial cone with r generators contained in P and containing X. Consider now a problem in the dual domain, posed with reversed inclusions: Dual-Simplicial-Cone(r, Ξ) Find a simplicial cone with r generators contained in Ξ and containing P . The two problems are indeed dual: Lemma 3. Every solution to Primal-Simplicial-Cone(r, X) is dual to a solution of DualSimplicial-Cone(r, X ∗), and vice-versa. Proof. This is effectively the invocation of ‘reversal of inclusion under duality’ (4). Suppose we find a simplicial cone Γ obeying X ⊂Γ ⊂P. Then (4) says that P∗⊂Γ∗⊂X ∗, and so a solution to the primal solves the dual. In the other direction, if we find a simplicial cone Γ∗obeying P∗⊂Γ∗⊂X ∗ then we have by (4) (X ∗)∗⊂(Γ∗)∗⊂(P∗)∗; we simply apply (K∗)∗= K three times to see that a solution to the dual corresponds to a solution to the primal. QED Our motivation in introducing duality is to see something we couldn’t in the primal: we can see that even if X is properly contained in P, there can be a unique simplicial hull for X which lies inside P. This follows from a simple observation about simplicial cones contained in convex cones. Definition. An extreme ray of a convex cone Γ is a ray Rx = {ax : a ≥0} where x ∈Γ cannot be represented as a proper convex combination of two points x0 and x1 which belong to Γ but not Rx. For example, a simplicial cone with r linearly independent generators has r extreme rays; each ray consists of all positive multiples of one generator. Lemma 4. Suppose that Γ and G are convex cones, that Γ ⊂G ⊂Rr, that Γ is a simplicial cone with r generators and that G intersects Γ in exactly r rays which are extreme rays of G. Then (a) these rays are also extreme rays of Γ and (b) no simplicial cone with r generators Γ′ ̸= Γ can satisfy Γ ⊂Γ′ ⊂G. Proof. (a) Since the rays in question are extreme rays of G, which contains Γ, they are also extreme rays of Γ. (b) Any simplicial cone Γ′ with r generators and lying ‘in between’ Γ and G would have to also intersect G in the same r rays as Γ does. Those r rays would also have to be extreme rays for Γ′, because they are extreme rays for G, which by hypothesis contains Γ′. But a simplicial cone with r generators is completely determined by its r extreme rays. As Γ and Γ′ have the same extreme rays, Γ = Γ′. QED We can now prove Lemma 1. Recall the cone C defined above. Its dual is C∗= {ξ : ξ′1 ≥||ξ||} Note (a) that every boundary ray of C∗is extreme; and (b) that C∗intersects P∗on the n unit vectors ej. So by Lemma 4, P∗uniquely solves the Dual-Simplicial-Cone(n, C∗) problem and P solves the Primal-Simplicial-Cone(n, C) problem uniquely. QED. 5 Uniqueness for Separable Factorial Articulation Families We now describe families of articulated images which have at least a few ‘realistic’ features, and which, because of the relevant convex geometry, offer an essentially unique NMF. The families of images we have in mind consist of black-and-white images with P parts, each exercised systematically through A articulations. As an illustration, Figure 1 shows some sample images from the Swimmer dataset, which depicts a figure with four moving parts (limbs), each able to exhibit four articulations (different positions). Definition. A Separable Factorial Articulation Family is a collection X of points x obeying these rules: [R1] Generative Model. Each image x in the database has a representation x = P X q=1 A X a=1 αq,aψq,a where the generators ψq,a ∈Rp obey the non-negativity constraint ψq,a ≥0 along with the coefficients αq,a ≥0. We speak of ψq,a as the q’th part in the ‘a’-th articulation. [R2] Separability. For each q, a there exists a pixel kq,a such that ψq′,a′(kq,a) = 1{a=a′,q=q′} (5) I.e. each part/articulation pair’s presence or absence in the image is indicated by a certain pixel associated to that pair. [R3] Complete Factorial Sampling. The dataset contains all AP images in which the P parts appear in all combinations of A articulations. Figure 1: Sample images from the Swimmer database depicting four stick figures with four limbs; the panels illustrate different articulations of the limbs. The Swimmer dataset obeys these rules except for one disagreement: every image contains an invariant region (the torso). As it turns out this is of small importance. We note that assumption [R2] forces the generators ψq,a to be linearly independent, which forces p > A·P. Consequently, the linear span of the generators is some subspace V ⊂Rp. Theorem 1. Given a database obeying rules [R1]-[R3], there is a unique simplicial hull with r = A · P generators which contains all the points of the database, and is contained in P ∩V . Since the generative model [R1] implies that a particular simplicial hull with a specific choice of r generators contains the dataset, and a successful application of NMF also gives a simplicial hull with r generators containing the dataset, and the theorem says these must be the same hull, in this setting NMF recovers the generative model. Formally, Corollary. Let X be generated by rules [R1]-[R3]. Any factorization obeying (1) and (2) must recover the correct generators (ψq,a) modulo permutation of labels and rescaling. 6 Proof of Theorem 1. We need to introduce the notion of duality relative to a vector space V ⊂Rp. In the case of V ≡Rp this is just the notion of duality already introduced. Suppose that we have a set K ⊂V ; its relative dual Kv is the set of linear functionals ξ which, viewed as members of Rp also belong to V , and which obey ξ′x ≥0 for x ∈K. In effect, the relative dual is the ordinary dual taken within V rather than Rp. As a result, all the properties of Lemma 2 hold for relative duality provided we talk about sets which are subsets of V ; e.g. (Kv)v = K if K is a closed convex subset of V . Define PV = V ∩P; this is a simplicial cone in V with r generators. Let again X denote the conical hull of X = (xi) and suppose that every (r−1)-dimensional face of PV contains r −1 linearly independent points from X. Since the face of a cone is a linear subspace, the face is uniquely determined by these r −1 points. The face is part of a supporting hyperplane to PV which is also a supporting hyperplane to X. The supporting hyperplane defines a point ξ ∈V which is in common between the duals Pv V and X v. Similar statements hold for all the r different (r−1)-faces of PV . But more is true. Because of the linear independence mentioned above, the different supporting hyperplanes in primal space correspond in fact to extreme rays in dual space – extreme rays for both Pv V and X v. As this is true for all r of the (r −1)-dimensional faces, we are in a position to apply Lemma 4 with G = X v and Γ = Pv V . This gives the conclusion that Pv V is the unique simplicial cone with r generators contained in X v and containing Pv V . Theorem 1 then follows by duality. It remains to establish the assumption about existence of r −1 linear independent points on each (r −1)-face. The faces of PV are exactly the r different subspaces Fq,a = {x ∈V : αq,a = 0}. By the Complete Factorial Sampling assumption [R3], there are AP −1(A −1) points of X in such a face. Define, for each (q′, a′) ̸= (q, a), φq′,a′;q,a = Ave{x ∈X : αq,a = 0, αq′,a′ = 1}. There are r −1 such terms, one for each part/articulation pair besides (q, a). By the Separability assumption [R2]: φq′,a′;q,a(kq′′,a′′) = 1{q′=q′′,a′=a′′}. Hence the (φq′,a′;q,a : (q′, a′) ̸= (q, a)) are linearly independent. At the same time, φq′,a′;q,a(kq,a) = 0 so that each φq′,a′;q,a ∈Fq,a. Hence we have the required linearly independent subset in each face. QED 7 Empirical Verification We built the Swimmer image library of 256 32×32 images. Each image contains a ‘torso’ of 12 pixels in the center and four ‘arms’ of 6 pixels that can be in one of 4 positions. All combinations of all possible arm positions gives us 256 images. See Figure 1 for examples. This collection of images has four ‘parts’. It deviates slightly from the rules [R1]-[R5] because there is an invariant region (the torso). Figure 2 shows that the 16 different part/articulation pairs are properly resolved, but that the torso is not properly resolved. Figure 2: NMF Generators recovered from Swimmer database. The 16 images shown agree well with the known list of generators (4 ‘limbs’ in 4 positions each). The presence of the torso (i.e. an invariant region) violates our conditions for a Factorial Separable Articulation Library, and, not unexpectedly, ghosts of the torso contaminate several of the reconstructed generators. Lee and Seung’s code [4] was used. Acknowledgments This work was partially supported by NSF grants DMS-0077261, DMS-0140698, and ANI008584 and a contract from DARPA ACMP. We would like to thank Aapo Hyv¨arinen for numerous helpful discussions. References [1] M. Craig. Minimum-volume transforms for remotely sensed data. IEEE Transactions on Geoscience and Remote Sensing, 32(3):542-552, May 1994. [2] M. Juvela, K. Lehtinen, and P. Paatero. The use of positive matrix factorization in the analysis of molecular line spectra from the thumbprint nebula. In D. P. Clemens and R. Barvainis, editors, Clouds, Cores, and Low Mass Stars, volume 65 of ASP Conference Series, 176-180, 1994. [3] M. Juvela, K. Lehtinen, and P. Paatero. The use of positive matrix factorization in the analysis of molecular line spectra. MNRAS, 280:616-626, 1996. [4] D. Lee and S. Seung. Learning the parts of objects by non-negative matrix factorization. Nature, 401:788-791, 1999. [5] M. Plumbley. Conditions for nonnegative independent components analysis. Signal Processing Letters, IEEE, 9(6):177-180, 2002. [6] A. Polissar, P. Hopke, W. Malm, and J. Sisler. Atmospheric aerosol over alaska 1. spatial and seasonal variability. Journal of Geophysical Research, 103(D15):19035-19044, August 1998. [7] A. Polissar, P. Hopke, W. Malm, and J. Sisler. Atmospheric aerosol over alaska 2. elemental composition and sources. Journal of Geophysical Research, 103(D15):19045-19057, August 1998. [8] R. T. Rockefellar. Convex Analysis, Princeton University Press, 1970. [9] W. Size. Use and Abuse of Statistical Methods in the Earth Sciences, chapter 3, pages 33-46. Oxford University Press, 1987.
2003
18
2,398
A Summating, Exponentially-Decaying CMOS Synapse for Spiking Neural Systems Rock Z. Shi1,2 and Timothy Horiuchi1,2,3 1Electrical and Computer Engineering Department 2Institute for Systems Research 3Neuroscience and Cognitive Science Program University of Maryland, College Park, MD 20742 rshi@glue.umd.edu,timmer@isr.umd.edu Abstract Synapses are a critical element of biologically-realistic, spike-based neural computation, serving the role of communication, computation, and modification. Many different circuit implementations of synapse function exist with different computational goals in mind. In this paper we describe a new CMOS synapse design that separately controls quiescent leak current, synaptic gain, and time-constant of decay. This circuit implements part of a commonly-used kinetic model of synaptic conductance. We show a theoretical analysis and experimental data for prototypes fabricated in a commercially-available 1.5µm CMOS process. 1 Introduction Synapses are a critical element in spike-based neural computation. There are perhaps as many different synapse circuit designs in use as there are brain areas being modeled. This diversity of circuits reflects the diversity of the synapse’s computational function. In many computations, a narrow, square pulse of current is all that is necessary to model the synaptic current. In other situations, a longer post-synaptic current profile is desirable to extend the effects of extremely short spike durations (e.g., in address-event systems [1],[2], [3], [4]), or to create a specific time window of interaction (e.g., for coincidence detection or for creating delays [5]). Temporal summation or more complex forms of inter-spike interaction are also important areas of synaptic design that focus on the response to high-frequency stimulation. Recent designs for fast-synaptic depression [6], [7], [8] and time-dependent plasticity [9], [10] are good examples of this where some type of memory is used to create interaction between incoming spikes. Even simple summation of input current can be very important in addressevent systems where a common strategy to reduce hardware is to have a single synapse circuit mimic inputs from many different cells. A very popular design for this purpose is the ”current-mirror synapse” [4] that is used extensively in its original form or in new extended forms [6], [8] to expand the time course of current and to provide summation for high-frequency spiking. This circuit is simple, compact, and stable, but couples the leak, part of the synaptic gain, and the decay ”time-constant” in one control parameter. This is restrictive and often more control is desirable. Alternatively, the same components can be arranged to give the user manual-control of the decay to produce a true exponential decay when operating in the subthreshold region (see Figure 7 (b) of [11]). This circuit, however, does not provide good summation of multiple synaptic events. In this paper we describe a new CMOS synapse circuit, that utilizes current-mode feedback to produce a first-order dynamical system. In the following sections, we describe the kinetic model of synaptic conductance, describe the circuit implementation and function, provide a theoretical analysis and finally compare our theory against testing results. We also discuss the use of this circuit in various neuromorphic system contexts and conclude with a discussion of the circuit synthesis approach. 2 Proposed synapse model We consider a network of spiking neurons, each of which is modeled by the integrateand-fire model or the slightly more generous Spike Response Model (e.g. [12]). Synaptic function in such neural networks are often modeled as a time-varying current. The functional form of this current could be a δ function, or a limited jump at the time of the spike followed by an exponential decay. Perhaps the most widely used function in detailed computational models is the α-function, a function of the form t τ e−t τ , introduced by [13]. A more general and practical framework is the neurotransmitter kinetics description proposed by Destexhe et al. [14]. This approach can synthesize a complete description of synaptic transmission, as well as give an analytic expression for a post-synaptic current in some simplified schemes. For a two-state ligand-gated channel model, the neurotransmitter molecules, T, are taken to bind to post-synaptic receptors modeled by the first order kinetic scheme [15]: R + T α⇀ ↽ β TR∗ (1) where R and TR∗are the unbound and the bound form of the post-synaptic receptor, respectively. α and β are the forward and backward rate constants for transmitter binding. In this model, the fraction of bound receptors, r, is described by the equation: dr dt = α[T](1 −r) −βr (2) If the transmitter concentration [T] can be modeled as a short pulse, then r(t) in (2) is a first order linear differential equation. We propose a synapse model that can be implemented by a CMOS circuit working in the subthreshold region. Our model matches Destexhe et al.’s equations for the time-dependent conductance, although we assume a fixed driving potential. In our synapse model, the action potential is modeled as a narrow digital pulse. The pulse width is assumed to be a fixed value tpw, however, in practice tpw may vary slightly from pulse to pulse. Figure 1 illustrates the synaptic current response to a single pulse in such a model: 1. A presynaptic spike occurs at tj, during the pulse, the post-synaptic current is modeled by: isyn(t) = isyn(∞) + (isyn(tj) −isyn(∞))e− t−tj τr (3) 2. After the presynaptic pulse terminated at time tj + tpw, the post-synaptic current is modeled by: isyn(t) = isyn(tj + tpw)e− t−tj −tpw τd (4) ← presynaptic pulse ← synaptic current tj tj+tpw Figure 1: Synapse model. The action potential (spike) is modeled as a pulse with width tpw. The synapse is modeled as first order linear system with synaptic current response described by Equations (3) and (4) 3 CMOS circuit synthesis and analysis 3.1 The synthesis approach Lazzaro [11] presents a very simple, compact synapse circuit that has an exponentiallydecaying synaptic current after each spike event. The synaptic current always resets to the maximum current value during the spike and is not suitable for the summation of rapid bursts of spikes. Another simple and widely used synapse is the current-mirror synapse that has its own set of practical problems related to the coupling of gain, time constant, and offset parameters. Our circuit is synthesized from the clean exponential decay from Lazzaro’s synapse and concepts from log domain filtering [16], [17] to convert the nonlinear characteristic of the current mirror synapse into an externally-linear, time-invariant system [18]. Vdd Vτ Vw spkIn isyn v i M1 M4 M5 M2 M3 M6 M8 M7 C vc Figure 2: The proposed synapse circuit. The pin “spkIn” receives the spike input with negative logic. The pin “isyn” is the synaptic current output. There are two control parameters. The input voltage Vw adjusts the weight of the synapse and the input voltage Vτ sets the time constant. The transistors sizes are: S1 = 2.4µm/1.6µm, S2 = 8µm/4µm, S3 = 10µm/4µm × 4, S4 = 4µm/4µm, S5 = 4µm/4µm, S6 = 4µm/4µm, S7 = 4µm/4µm, S8 = 10µm/4µm × 20. The bodies of NMOS transistors are connected to ground, and the bodies of PMOS transistors are connected to Vdd except for M3. 3.2 Basic circuit description The synapse circuit consists of eight transistors and one capacitor as shown in Figure 2. All transistors are operated in the subthreshold region. Input voltage spikes are applied through an inverter (not shown), onto the gate of the PMOS M1. Vτ sets the current through M7 that determines the time constant of the output synaptic current as will be shown later. Vw controls the magnitude of the synaptic current, so it determines the synaptic weight. The voltage on the capacitor is converted to a current by transistor M6, sent through the current mirror M4 −M5, and into the source follower M3 −M4. The drain current of M8, a scaled copy of current through M6 produces an inhibitory current. A simple PMOS transistor with the same gate voltage as M5 can provide an excitatory synaptic current. 3.3 Circuit analysis We perform an analysis of the circuit by studying its response to a single spike. Assuming a long transistor so that the Early effect can be neglected, the behavior of a NMOS transistor working in the subthreshold region can be described by [19], [20] ids = SI0ne κnvgs VT e (1−κn)vbs VT (1 −e −vds VT ) (5) where VT = KT/q is the thermal voltage, I0n is a positive constant current when Vgs = Vbs = 0, and S = W L is the ratio of the transistor width and length. 0 < κn < 1 is a parameter specific to the technology, and we will assume it is constant in this analysis. We assume that all transistors are operating in saturation (vds > 4VT ). We also neglect any parasitic capacitances. The PMOS source follower M3 −M4 is used as a level shifter. Detailed discussion on use of source followers in the subthreshold region has been discussed in [21]. Combined with a current mirror M4 −M5, this sub-circuit implements a logarithmic relationship between i and v (as labeled in Figure 2): v = Vw + VT κp ln( i I0p S4 S3S5 ) (6) Consistent with the translinear principle, this logarithmic relationship will make the current through M2 proportional to 1 i . For simplicity, we assume a spike begins at time t=0, and the initial voltage on the capacitor C is vc(0). The spike ends at time t = tpw. When the spike input is on (0 < t < tpw), the dynamics of the circuit for a step input is governed by C dvc(t) dt = S2S3S5I2 op S4S6I0n e κp(Vdd−Vw) VT e −κnvc(t) VT −Iτ (7) Iτ = S7Ione κnVτ VT (8) With the aid of transformation isyn(t) = S8Ione κnvc(t) VT (9) Equation (7) can be changed into a linear ordinary differential equation for isyn(t): disyn(t) dt + κnIτ CVT isyn(t) = S2S3S5S8κnI2 op S4S6CVT e κp(V dd−Vw) VT (10) In terms of the general solution expressed in (3), we have τ = CVT κnIτ (11) isyn(0) = S8I0ne κnvc(0) VT (12) isyn(∞) = S2S3S5S8I2 op S4S6Iτ e κp(V dd−V w) VT (13) When the spike input is off (t > tpw) and we neglect the leakage current from M2, then isyn(t) will exponentially decay with the same time constant defined by (11). That is, isyn(t) = isyn(tpw)e− (t−tpw) τ (14) 4 Results 4.1 Comparison of theory and measurement We have fabricated a chip containing the basic synapse circuit as shown in Figure 2 through MOSIS in a commercially-available 1.5 µm, double poly fabrication process. In order to compare our theoretical prediction with chip measurement, we first estimate the two transistor parameters κ and I0 by measuring the drain currents from test transistors on the same chip. The current measurements were performed with a Keithley 6517A electrometer. κ and I0 are estimated by fitting Equation (5) (and PMOS with PMOS i-v equation) through multiple measurements of (vgs, ids) points through linear regression. The two parameters are found to be κn = 0.67, I0n = 1.32 × 10−14A, κp = 0.77, I0p = 1.33 × 10−19A. In estimating these two parameters as well as to compute our model predictions, we estimate the effective transistor width for the wide transistors (e.g. M8 with m=20). 0 0.5 1 1.5 2 2.5 3 3.5 4 0 2 4 6 vSpkIn(V) 0 0.5 1 1.5 2 2.5 3 3.5 4 0.2 0.4 measure theory vc(t) (V) 0 0.5 1 1.5 2 2.5 3 3.5 4 0 1 2x 10 −7 time (sec) isyn(t) (A) theory measure Figure 3: Comparison between model prediction and measurement. To illustrate the detailed time course, we used a large spike pulse width. We set Vτ = 0 and Vw = 3.85V . Figure 3 illustrates our test results compared against the model prediction. We used a very wide pulse to exaggerate the details in the time response. Note that as the time constant is so large, the isyn(t) rises almost linearly during the spike. In this case, Vw = 3.85V . 4.2 Tuning of synaptic strength and time constant The synaptic time constant is solely determined by the leak current through transistor M7. The control is achieved by turning the pin Vτ. The synaptic strength is controlled by Vw (which is also coupled with Iτ) as can be seen from (13). In Figure 4, we present our test results that illustrate how the various time constants and synaptic strengths can be achieved. 0 20 40 60 80 0 2 4 6 vSpkIn(t) (V) 0 20 40 60 80 0 0.2 0.4 vc(t) (V) Vτ=0.150V Vτ=0.175V Vτ=0.200V 0 20 40 60 80 0 2 4x 10 −7 iSyn(t) (A) time (msec) Vτ=0.150V Vτ=0.175V Vτ=0.200V (a) 0 10 20 30 40 50 0 2 4 6 vSpkIn(t) (V) 0 10 20 30 40 50 0 0.2 0.4 vc(t) (V) Vw=3.70V Vw=3.75V Vw=3.80V 0 10 20 30 40 50 0 1 2 3 x 10 −7 iSyn(t) (A) time (msec) Vw=3.70V Vw=3.75V Vw=3.80V (b) Figure 4: Changing time constant τ and synaptic strength. (a) Keeping Vw = 3.7V constant, but changing Vτ. (b) Keeping Vτ = 0.175V , but changing Vw. In both (a) and (b), spike pulse width is set as 1 msec. 4.3 Spike train response The exponential rise of the synaptic current during a spike naturally provides the summation and saturation of incoming spikes. Figure 5 illustrates this behavior in response to an input spike train of fixed duration. 5 Discussion We have proposed a new synapse model and a specific CMOS implementation of the model. In our theoretical analysis, we have ignored all parasitic effects which can play an significant role in the circuit behavior. For example, as the source follower M3 −M4 provides the gate voltage of M2, switching through M1 will affect the circuit behavior due to parasitic capacitance. We emphasize that various circuit implementation can be designed, especially a circuit with lower glitch but faster speed is preferred. The synaptic model circuit we have described has a single time constant for both its rising and decaying phase, whereas the time-course of biological synapses show a faster rising phase, but a much slower decaying phase. The second time constant can, in principle, be implemented in our circuit by adding a parallel branch to M7 with some switching circuitry. Biological synapses have been best modeled and fitted by an exponentially-decaying time course with different time constants for different types of synapse. Our synapse circuit model captures this important characteristic of the biological synapse, providing an easily controlled exponential decay and a natural summation and saturation of the synaptic current. By using a simple first order linear model, our synapse circuit model can give the circuit designer an analytically tractable function for use in large, complex, spiking neural network system design. The current mirror synapse, in spite of its successful application, 0 50 100 150 200 250 0 2 4 6 vSpkIn(t) (V) 0 50 100 150 200 250 0.3 0.35 0.4 0.45 0.5 vc(t) (V) 0 50 100 150 200 250 0 1 2 3 4 x 10 −8 iSyn(t) (A) time (msec) Figure 5: Response to spike train. The spike pulse width is set as 1 msec, and period 15 msec. Vw = 3.73V , Vτ = 131mV . has been found to be an inconvenient computation unit due to its nonlinearity. Our linear synapse is achieved, however, with the cost of silicon size. This is especially true when utilized in an AER system, where the spike can be less than a microsecond. Because our linearity is achieved by employing the CMOS subthreshold current characteristic, working with very narrow pulses will mean the use of large transistor widths to get large charging currents. We have identified a number of modifications that may allow the circuit to operate at much higher current levels and thus higher speed. 6 Conclusion We have identified a need for more independent control of the synaptic gain, timecourse, and leak parameters in CMOS synapse and have demonstrated a prototype circuit that utilizes current-mode feedback to exhibit the same first-order dynamics that are utilized by Destexhe et al. [14], [15] to describe a kinetic model description of receptorneurotransmitter binding for a more efficient computational description of the synaptic conductance. The specific implementation relies on the subthreshold exponential characteristic of the MOSFET and thus operates best at these current levels and slower speeds. Acknowledgments This work was supported by funding from DARPA (N0001400C0315) and the Air Force Office of Strategic Research (AFOSR - F496200110415). We thank MOSIS for fabrication services in support of our neuromorphic analog VLSI course and teaching laboratory. References [1] M. Mahowald, An Analog VLSI System for Stereoscopic Vision. Norwell, MA: Kluwer Academic, 1994. [2] A. Mortara, “A pulsed communication/computation framework for analog VLSI perceptive systems,” in Neuromorphic Systems Engineering, T. S. Land, Ed. Norwell, MA: Kluwer Academic Publishers, 1998, pp. 217–228. [3] S. Deiss, R. Douglas, and A. Whatley, “A pulse-coded communications infrastructure for neuromorphic systems,” in Pulsed Neural Networks, W. Mass and C. Bishop, Eds. Cambridge, MA: MIT Press, 1999, pp. 157–178. [4] K. A. Boahen, “The retinomorphic approach: adaptive pixel-parallel amplification, filtering, and quantization,” Journal of Analog Integrated Circuits and Signal Processing, vol. 13, pp. 53–68, 1997. [5] M. Cheely and T. Horiuchi, “Analog VLSI models of range-tuned neurons in the bat echolocation system,” EURASIP Journal, Special Issue on Neuromorphic Signal Processing and Implementations (in press), 2003. [6] C. Rasche and R. H. R. Hahnloser, “Silicon synaptic depression,” Biol. Cybern., vol. 84, pp. 57–62, 2001. [7] A. McEwan and A. van Schaik, “A silicon representation of the Meddis inner hair cell model,” in Proceedings of the ICSC Symposia on Intelligent Systems & Application (ISA’2000), 2000, paper 1544-078. [8] M. Boegerhausen, P. Suter, and S. Liu, “Modeling short-term synaptic depression in silicon,” Neural Computation, vol. 15, no. 2, pp. 331–348, Feb 2003. [9] P. Hafliger, M. Mahowald, and L.Watts, “A spike based learning neuron in analog VLSI,” in Advances in Neural Information Processing Systems, M. C. Mozer, M. I. Jordan, and T. Petsche, Eds. Cambridge, MA: MIT Press, 1997, vol. 9, pp. 692–698. [10] G. Indiveri, “Neuromorphic bistable VLSI synapses with spike-timing-dependent plasticity,” in Advances in Neural Information Processing Systems, M. C. Mozer, M. I. Jordan, and T. Petsche, Eds. Cambridge, MA: MIT Press, 2002, vol. 15. [11] J. P. Lazzaro, “Low-power silicon axons, neuons, and synapses,” in Silicon Implementations of Pulse Coded Neural Networks, M. E. Zaghloul, J. L. Meador, and R. W. Newcomb, Eds. Norwell, MA: Kluwer Academic Publishers, 1994, pp. 153–164. [12] W. Gerstner, Spiking Neuron Models: Single Neurons, Populations, Plasticity. Cambridge, UK: Cambridge Unvisity Press, 2002. [13] W. Rall, “Distinguishing theoretical synaptic potentials computed for different soma-dendritic distributions of synaptic inputs,” J. Neurophys., vol. 30, pp. 1138–1168, 1967. [14] A. Destexhe, Z. F. Mainen, and T. J. Sejnowski, “Synthesis of models for excitable membranes, synaptic transmission and neuromodulation using a common kinetic formalism,” Journal of Computational Neuroscience, vol. 1, pp. 195–230, 1994. [15] ——, “An efficient method for computing synaptic conductances based on a kinetic model of receptor binding,” Neural Computation, vol. 6, pp. 14–18, 1994. [16] E. Seevinck, “Companding current-mode integrator: A new circuit principle for continuous time monolithic filters,” Electron. Letts., vol. 26, pp. 2046–2047, Nov 1990. [17] D. R. Frey, “Exponential state space fitlers: A generic current mode design strategy,” IEEE Trans. Circuits Syst. I, vol. 43, pp. 34–42, Jan 1996. [18] Y. Tsividis, “Externally linear, time-invariant systems and their application to companding signal processors,” IEEE Trans. Circuits Syst. II, vol. 44, pp. 65–85, Feb 1997. [19] C. Mead, Analog VLSI and Neural Systems. Reading, MA: Addison-Wesley, 1989. [20] E. A. Vittoz and J. Fellrath, “CMOS analog integrated circuits based on weak inversion opearaton,” IEEE J. Solid-State Circuits, vol. 12, pp. 224–231, Jun. 1977. [21] S.-C. Liu, J. Kramer, G. Indiveri, T. Delbruck, and R. Douglas, Analog VLSI: Circuits and Principle. Cambridge, MA: The MIT Press, 2002.
2003
180
2,399
Extending Q-Learning to General Adaptive Multi-Agent Systems Gerald Tesauro IBM Thomas J. Watson Research Center 19 Skyline Drive, Hawthorne, NY 10532 USA tesauro@watson.ibm.com Abstract Recent multi-agent extensions of Q-Learning require knowledge of other agents’ payoffs and Q-functions, and assume game-theoretic play at all times by all other agents. This paper proposes a fundamentally different approach, dubbed “Hyper-Q” Learning, in which values of mixed strategies rather than base actions are learned, and in which other agents’ strategies are estimated from observed actions via Bayesian inference. Hyper-Q may be effective against many different types of adaptive agents, even if they are persistently dynamic. Against certain broad categories of adaptation, it is argued that Hyper-Q may converge to exact optimal time-varying policies. In tests using Rock-Paper-Scissors, Hyper-Q learns to significantly exploit an Infinitesimal Gradient Ascent (IGA) player, as well as a Policy Hill Climber (PHC) player. Preliminary analysis of Hyper-Q against itself is also presented. 1 Introduction The question of how agents may adapt their strategic behavior while interacting with other arbitrarily adapting agents is a major challenge in both machine learning and multi-agent systems research. While game theory provides a pricipled calculation of Nash equilibrium strategies, it is limited in practical use due to hidden or imperfect state information, and computational intractability. Trial-and-error learning could develop good strategies by trying many actions in a number of environmental states, and observing which actions, in combination with actions of other agents, lead to high cumulative reward. This is highly effective for a single learner in a stationary environment, where algorithms such as QLearning [13] are able to learn optimal policies on-line without a model of the environment. Straight off-the-shelf use of RL algorithms such as Q-learning is problematic, however, because: (a) they learn deterministic policies, whereas mixed strategies are generally needed; (b) the environment is generally non-stationary due to adaptation of other agents. Several multi-agent extensions of Q-Learning have recently been published. Littman [7] developed a convergent algorithm for two-player zero-sum games. Hu and Wellman [5] present an algorithm for two-player general-sum games, the convergence of which was clarified by Bowling [1]. Littman [8] also developed a convergent many-agent “friend-orfoe” Q-learning algorithm combining cooperative learning with adversarial learning. These all extend the normal Q-function of state-action pairs Q(s, a) to a function of states and joint actions of all agents, Q(s,⃗a). These algorithms make a number of strong assumptions which facilitate convergence proofs, but which may not be realistic in practice. These include: (1) other agents’ payoffs are fully observable; (2) all agents use the same learning algorithm; (3) during learning, other agents’ strategies are derivable via game-theoretic analysis of the current Q-functions. In particular, if the other agents employ non-gametheoretic or nonstationary strategies, the learned Q-functions will not accurately represent the expected payoffs obtained by playing against such agents, and the associated greedy policies will not correspond to best-reponse play against the other agents. The aim of this paper is to develop more general and practical extensions of Q-learning avoiding the above assumptions. The multi-agent environment is modeled as a repeated stochastic game in which other agents’ actions are observable, but not their payoffs. Other agents are assumed to learn, but the forms of their learning algorithms are unknown, and their strategies may be asymptotically non-stationary. During learning, it is proposed to estimate other agents’ current strategies from observation instead of game-theoretic analysis. The above considerations lead to a new algorithm, presented in Section 2 of the paper, called “Hyper-Q Learning.” Its key idea is to learn the value of joint mixed strategies, rather than joint base actions. Section 3 discusses the effects of function approximation, exploration, and other agents’ strategy dynamics on Hyper-Q’s convergence. Section 4 presents a Bayesian inference method for estimating other agents’ strategies, by applying a recencyweighted version of Bayes’ rule to the observed action sequence. Section 5 discusses implementation details of Hyper-Q in a simple Rock-Paper-Scissors test domain. Test results are presented against two recent algorithms for learning mixed strategies: Infinitesimal Gradient Ascent (IGA) [10], and Policy Hill Climbing (PHC) [2]. Preliminary results of Hyper-Q vs. itself are also discussed. Concluding remarks are given in section 6. 2 General Hyper-Q formulation An agent using normal Q-learning in a finite MDP repeatedly observes a state s, chooses a legal action a, and then observes an immediate reward r and a transition to a new state s′. The Q-learning equation is given by: ∆Q(s, a) = α(t)[r + γ maxb Q(s′, b) −Q(s, a)], where γ is a discount parameter, and α(t) is an appropriate learning rate schedule. Given a suitable method of exploring state-action pairs, Q-learning is guaranteed to converge to the optimal value function Q∗, and its associated greedy policy is thus an optimal policy π∗. The multi-agent generalization of an MDP is called a stochastic game, in which each agent i chooses an action ai in state s. Payoffs ri to agent i and state transitions are now functions of joint actions of all agents. An important special class of stochastic games are matrix games, in which |S| = 1 and payoffs are functions only of joint actions. Rather than choosing the best action in a given state, an agent’s task in a stochastic game is to choose the best mixed strategy ⃗xi = ⃗xi(s) given the expected mixed strategy ⃗x−i(s) of all other agents. Here ⃗xi denotes a set a probabilities summing to 1 for selecting each of the Ni = Ni(s) legal actions in state s. The space of possible mixed strategies is a continuous (Ni −1) dimensional unit simplex, and choosing the best mixed strategy is clearly more complex than choosing the best base action. We now consider extensions of Q-learning to stochastic games. Given that the agent needs to learn a mixed strategy, which may depend on the mixed strategies of other agents, an obvious idea is to have the Q-function evaluate entire mixed strategies, rather than base actions, and to include in the “state” description an observation or estimate of the other agents’ current mixed strategy. This forms the basis of the proposed Hyper-Q learning algorithm, which is formulated as follows. For notational simplicity, let x denote the HyperQ learner’s current mixed strategy, and let y denote an estimated joint mixed strategy of all other agents (hereafter referred to as “opponents”). At time t, the agent generates a base action according to x, and then observes a payoff r, a new state s′, and a new estimated opponent strategy y′. The Hyper-Q function Q(s, y, x) is then adjusted according to: ∆Q(s, y, x) = α(t)[r + γ max x′ Q(s′, y′, x′) −Q(s, y, x)] (1) The greedy policy ˆx associated with any Hyper-Q function is then defined by: ˆx(s, y) = arg max x Q(s, y, x) (2) 3 Convergence of Hyper-Q Learning 3.1 Function approximation Since Hyper-Q is a function of continuous mixed strategies, one would expect it to require some sort of function approximation scheme. Establishing convergence of Q-learning with function approximation is substantially more difficult than for a normal Q-table for a finite MDP, and there are a number of well-known counterexamples. In particular, finite discretization may cause a loss of an MDP’s Markov property [9]. Several recent function approximation schemes [11, 12] enable Q-learning to work well in continuous spaces. There is a least one discretization scheme, Finite Difference Reinforcement Learning [9], that provably converges to the optimal value function of the underlying continuous MDP. This paper employs a simple uniform grid discretization of the mixed strategies of the Hyper-Q agent and its opponents. No attempt will be made to prove convergence under this scheme. However, for certain types of opponent dynamics described below, a plausible conjecture is that a Finite-Difference-RL implementation of Hyper-Q will be provably convergent. 3.2 Exploration Convergence of normal Q-learning requires visiting every state-action pair infinitely often. The clearest way to achieve this in simulation is via exploring starts, in which training consists of many episodes, each starting from a randomly selected state-action pair. For real environments where this may not be feasible, one may utilize off-policy randomized exploration, e.g., ϵ-greedy policies. This will ensure that, for all visited states, every action will be tried infinitely often, but does not guarantee that all states will be visited infinitely often (unless the MDP has an ergodicity property). As a result one would not expect the trained Q function to exactly match the ideal optimal Q∗for the MDP, although the difference in expected payoffs of the respective policies should be vanishingly small. The above considerations should apply equally to Hyper-Q learning. The use of exploring starts for states, agent and opponent mixed strategies should guarantee sufficient exploration of the state-action space. Without exploring starts, the agent can use ϵ-greedy exploration to at least obtain sufficient exploration of its own mixed strategy space. If the opponents also do similar exploration, the situation should be equivalent to normal Qlearning, where some stochastic game states might not be visited infinitely often, but the cost in expected payoff should be vanishingly small. If the opponents do not explore, the effect could be a further reduction in effective state space explored by the Hyper-Q agent (where “effective state” = stochastic game state plus opponent strategy state). Again this should have a negligible effect on the agent’s long-run expected payoff relative to the policy that would have been learned with opponent exploration. 3.3 Opponent strategy dynamics Since opponent strategies can be governed by arbitrarily complicated dynamical rules, it seems unlikely that Hyper-Q learning will converge for arbitrary opponents. Nevertheless, some broad categories can be identified under which convergence should be achievable. One simple example is that of a stationary opponent strategy, i.e., y(s) is a constant. In this case, the stochastic game obviously reduces to an equivalent MDP with stationary state transitions and stationary payoffs, and with the appropriate conditions on exploration and learning rates, Hyper-Q will clearly converge to the optimal value function. Another important broad class of dynamics consists of opponent strategies that evolve according to a fixed, history-independent rule depending only on themselves and not on actions of the Hyper-Q player, i.e., yt+1 = f(s, yt). This is a reasonable approximation for many-player games in which any individual has negligible “market impact,” or in which a player’s influence on another player occurs only through a global summarization function [6]. In such cases the relevant population strategy representation need only express global summarizations of actitivy (e.g. averages), not details of which player does what. An example is the “Replicator Dynamics” model from evolutionary game theory [14], in which a strategy grows or decays in a population according to its fitness relative to the population average fitness. This leads to a history independent first order differential equation ˙y = f(y) for the population average strategy. In such models, the Hyper-Q learner again faces an effective MDP in which the effective state (s, y) undergoes stationary historyindependent transitions, so that Hyper-Q should be able to converge. A final interesting class of dynamics occurs when the opponent can accurately estimate the Hyper-Q strategy x, and then adapts its strategy using a fixed history-independent rule: yt+1 = f(s, yt, xt). This can occur if players are required to announce their mixed strategies, or if the Hyper-Q player voluntarily announces its strategy. An example is the Infinitesimal Gradient Ascent (IGA) model [10], in which the agent uses knowledge of the current strategy pair (x, y) to make a small change in its strategy in the direction of the gradient of immediate payoff P(x, y). Once again, this type of model reduces to an MDP with stationary history-independent transitions of effective state depending only on (s, y, x). Note that the above claims of reduction to an MDP depend on the Hyper-Q learner being able to accurately estimate the opponent mixed strategy y. Otherwise, the Hyper-Q learner would face a POMDP situation, and standard convergence proofs would not apply. 4 Opponent strategy estimation We now consider estimation of opponent strategies from the history of base actions. One approach to this is model-based, i.e., to consider a class of explicit dynamical models of opponent strategy, and choose the model that best fits the observed data. There are two difficult aspects to this approach: (1) the class of possible dynamical models may need to be extraordinarily large; (2) there is a well-known danger of “infinite regress” of opponent models if A’s model of B attempts to take into account B’s model of A. An alternative approach studied here is model-free strategy estimation. This is in keeping with the spirit of Q-learning, which learns state valuations without explicitly modeling the dynamics of the underlying state transitions. One simple method used in the following section is the well-known Exponential Moving Average (EMA) technique. This maintains a moving average ¯y of opponent strategy by updating after each observed action using: ¯y(t + 1) = (1 −µ)¯y(t) + µ⃗ua(t) (3) where ⃗ua(t) is a unit vector representation of the base action a. EMA assumes only that recent observations are more informative than older observations, and should give accurate estimates when significant strategy changes take place on time scales > O(1/µ). 4.1 Bayesian strategy estimation A more principled model-free alternative to EMA is now presented. We assume a discrete set of possible values of y (e.g. a uniform grid). A probability for each y given the history of observed actions H, P(y|H), can then be computed using Bayes’ rule as follows: P(y|H) = P(H|y)P(y)  y′ P(H|y′)P(y′) (4) where P(y) is the prior probability of state y, and the sum over y′ extends over all strategy grid points. The conditional probability of the history given the strategy, P(H|y), can now be decomposed into a product of individual action probabilities t k=0 P(a(k)|y(t)) assuming conditional independence of the individual actions. If all actions in the history are equally informative regardless of age, we may write P(a(k)|y(t)) = ya(k)(t) for all k. This corresponds to a Naive-Bayes equal weighting of all observed actions. However, it is again reasonable to assume that more recent actions are more informative. The way to implement this in a Bayesian context is with exponent weights wk that increase with k [4]. Within a normalization factor, we then write: P(H|y) = t k=0 ywk a(k) (5) A linear schedule wk = 1 −µ(t −k) for the weights is intuitively obvious; truncation of the history at the most recent 1/µ observations ensures that all weights are positive. 5 Implementation and Results We now examine the performance of Hyper-Q learning in a simple two-player matrix game, Rock-Paper-Scissors. A uniform grid discretization of size N = 25 is used to represent mixed-strategy component probabilities, giving a simplex grid of size N(N + 1)/2 = 325 for either player’s mixed strategy, and thus the entire Hyper-Q table is of size (325)2 = 105625. All simulations use γ = 0.9, and for simplicity, a constant learning rate α = 0.01. 5.1 Hyper-Q/Bayes formulation Three different opponent estimation schemes were used with Hyper-Q learning: (1) “Omniscient,” i.e. perfect knowledge of the opponent’s strategy; (2) EMA, using equation 3 with µ = 0.005; (3) Bayesian, using equations 4 and 5 with µ = 0.005 and a uniform prior. Equations 1 and 2 were modified in the Bayesian case to allow for a distribution of opponent states y, with probabilities P(y|H). The corresponding equations are: ∆Q(y, x) = α(t)P(y|H)[r + γ max x′ Q(y′, x′) −Q(y, x)] (6) ˆx = arg max x  y P(y|H)Q(y, x) (7) A technical note regarding equation 6 is that, to improve tractability of the algorithm, an approximation P(y|H) ≈P(y′|H′) is used, so that the Hyper-Q table updates are performed using the updated distribution P(y′|H′). 5.2 Rock-Paper-Scissors results We first examine Hyper-Q training online against an IGA player. Apart from possible state observability and discretization issues, Hyper-Q should in principle be able to converge against this type of opponent. In order to conform to the original implicit assumptions underlying IGA, the IGA player is allowed to have omniscient knowledge of the Hyper-Q player’s mixed strategy at each time step. Policies used by both players are always greedy, apart from resets to uniform random values every 1000 time steps. Figure 1 shows a smoothed plot of the online Bellman error, and the Hyper-Q player’s average reward per time step, as a function of training time. The figure exhibits good 0 0.05 0.1 0.15 0.2 0.25 0.3 0.35 0.4 0.45 0 400000 800000 1.2e+06 1.6e+06 Time Steps Hyper-Q vs. IGA: Online Bellman error ’Omniscient’ ’EMA’ ’Bayes’ -0.06 -0.05 -0.04 -0.03 -0.02 -0.01 0 0.01 0.02 0.03 0.04 0 400000 800000 1.2e+06 1.6e+06 Time Steps Hyper-Q vs. IGA: Avg. reward per time step ’Omniscient’ ’EMA’ ’Bayes’ -0.06 -0.05 -0.04 -0.03 -0.02 -0.01 0 0.01 0.02 0.03 0.04 0 400000 800000 1.2e+06 1.6e+06 Time Steps Hyper-Q vs. IGA: Avg. reward per time step ’Omniscient’ ’EMA’ ’Bayes’ Figure 1: Results of Hyper-Q learning vs. an IGA player in Rock-Paper-Scissors, using three different opponent state estimation methods: “Omniscient,” “EMA” and “Bayes” as indicated. Random strategy restarts occur every 1000 time steps. Left plot shows smoothed online Bellman error. Right plot shows average Hyper-Q reward per time step. 0.2 0.25 0.3 0.35 0.4 0.45 0.5 0.55 0.6 0.65 0.7 0 10000 20000 30000 40000 Time Steps Asymptotic IGA Trajectory ’IGA_Rock_Prob’ ’IGA_Paper_Prob’ ’HyperQ_Reward’ Figure 2: Trajectory of the IGA mixed strategy against the Hyper-Q strategy starting from a single exploring start. Dots show Hyper-Q player’s cumulative (rescaled) reward. progress toward convergence, as suggested by substantially reduced Bellman error and substantial positive average reward per time step. Among the three estimation methods used, Bayes reached the lowest Bellman error at long time scales. This is probably because it updates many elements in the Hyper-Q table per time step, whereas the other techniques only update a single element. Bayes also has by far the worst average reward at the start of learning, but asymptotically it clearly outperforms EMA, and comes close to matching the performance obtained with omniscient knowledge of opponent state. Part of Hyper-Q’s advantage comes from exploiting transient behavior starting from a random initial condition. In addition, Hyper-Q also exploits the asymptotic behavior of IGA, as shown in figure 2. This plot shows that the initial transient lasts at most a few thousand time steps. Afterwards, the Hyper-Q policy causes IGA to cycle erraticly between two different probabilites for Rock and two different probabilities for Paper, thus preventing IGA from reaching the Nash mixed strategy. The overall profit to Hyper-Q during this cycling is positive on average, as shown by rising cumulative Hyper-Q reward. The observed cycling with positive profitability is reminiscent of an algorithm called PHC-Exploiter [3] in play against a PHC player. An interesting difference is that PHC-Exploiter uses an explicit model of its opponent’s behavior, whereas no such model is needed by a Hyper-Q learner. 0.05 0.1 0.15 0.2 0.25 0.3 0.35 0.4 400000 800000 1.2e+06 Hyper-Q vs. PHC: Online Bellman error ’Omniscient’ ’EMA’ ’Bayes’ -0.1 -0.05 0 0.05 0.1 0.15 0.2 400000 800000 1.2e+06 Time Steps Hyper-Q vs. PHC: Avg. reward per time step ’Omniscient’ ’EMA’ ’Bayes’ Figure 3: Results of Hyper-Q vs. PHC in Rock-Paper-Scissors. Left plot shows smoothed online Bellman error. Right plot shows average Hyper-Q reward per time step. We now exmamine Hyper-Q vs. a PHC player. PHC is a simple adaptive strategy based only on its own actions and rewards. It maintains a Q-table of values for each of its base actions, and at every time step, it adjusts its mixed strategy by a small step towards the greedy policy of its current Q-function. The PHC strategy is history-dependent, so that reduction to an MDP is not possible for the Hyper-Q learner. Nevertheless Hyper-Q does exhibit substantial reduction in Bellman error, and also significantly exploits PHC in terms of average reward, as shown in figure 3. Given that PHC ignores opponent state, it should be a weak competitive player, and in fact it does much worse in average reward than IGA. It is also interesting to note that Bayesian estimation once again clearly outperforms EMA estimation, and surprisingly, it also outperforms omniscient state knowledge. This is not yet understood and is a focus of ongoing research. 0 0.1 0.2 0.3 0.4 0.5 0.6 0.7 0.8 0 400000 800000 1.2e+06 1.6e+06 Hyper-Q/Omniscient vs. itself: Online Bellman error 0 0.05 0.1 0.15 0.2 0.25 0.3 0.35 0.4 0 400000 800000 1.2e+06 1.6e+06 Hyper-Q/Bayes vs. itself: Online Bellman error Figure 4: Smoothed online Bellman error for Hyper-Q vs. itself. Left plot uses Omniscient state estimation; right plot uses Bayesian estimation. Finally, we examine preliminary data for Hyper-Q vs. itself. The average reward plots are uninteresting: as one would expect, each player’s average reward is close to zero. The online Bellman error, shown in figure 4, is more interesting. Surprisingly, the plots are less noisy and achieve asymptotic errors as low or lower than against either IGA or PHC. Since Hyper-Q’s play is history-dependent, one can’t argue for MDP equivalence. However, it is possible that the players’ greedy policies ˆx(y) and ˆy(x) simultaneously become stationary, thereby enabling them to optimize against each other. In examining the actual play, it does not converge to the Nash point ( 1 3, 1 3, 1 3), but it does appear to cycle amongst a small number of grid points with roughly zero average reward over the cycle for both players. Conceivably, Hyper-Q could have converged to a cyclic Nash equilibrium of the repeated game, which would certainly be a nice outcome of self-play learning in a repeated game. 6 Conclusion Hyper-Q Learning appears to be more versatile and general-purpose than any published multi-agent extension of Q-Learning to date. With grid discretization it scales badly but with other function approximators it may become practical. Some tantalizing early results were found in Rock-Paper-Scissors tests against some recently published adaptive opponents, and also against itself. Research on this topic is very much a work in progress. Vastly more research is needed, to develop a satisfactory theoretical analysis of the approach, an understanding of what kinds of realistic environments it can be expcted to do well in, and versions of the algorithm that can be successfully deployed in those environments. Significant improvements in opponent state estimation should be easy to obtain. More principled methods for setting recency weights should be achievable; for example, [4] proposes a method for training optimal weight values based on observed data. The use of time-series prediction and data mining methods might also result in substantially better estimators. Model-based estimators are also likely to be advantageous where one has a reasonable basis for modeling the opponents’ dynamical behavior. Acknowledgements: The author thanks Michael Littman for many helpful discussions; Irina Rish for insights into Bayesian state estimation; and Michael Bowling for assistance in implementing the PHC algorithm. References [1] M. Bowling. Convergence problems of general-sum multiagent reinforcement learning. In Proceedings of ICML-00, pages 89–94, 2000. [2] M. Bowling and M. Veloso. Multiagent learning using a variable learning rate. Artificial Intelligence, 136:215–250, 2002. [3] Y.-H. Chang and L. P. Kaelbling. Playing is believing: the role of beliefs in multi-agent learning. In Proceedings of NIPS-2001. MIT Press, 2002. [4] S. J. Hong, J. Hosking, and R. Natarajan. Multiplicative adjustment of class probability: educating naive Bayes. Technical Report RC-22393, IBM Research, 2002. [5] J. Hu and M. P. Wellman. Multiagent reinforcement learning: theoretical framework and an algorithm. In Proceedings of ICML-98, pages 242–250. Morgan Kaufmann, 1998. [6] M. Kearns and Y. Mansour. Efficient Nash computation in large population games with bounded influence. In Proceedings of UAI-02, pages 259–266, 2002. [7] M. L. Littman. Markov games as a framework for multi-agent reinforcement learning. In Proceedings of ICML-94, pages 157–163. Morgan Kaufmann, 1994. [8] M. L. Littman. Friend-or-Foe Q-learning in general-sum games. In Proceedings of ICML-01. Morgan Kaufmann, 2001. [9] R. Munos. A convergent reinforcement learning algorithm in the continuous case based on a finite difference method. In Proceedings of IJCAI-97, pages 826–831. Morgan Kaufman, 1997. [10] S. Singh, M. Kearns, and Y. Mansour. Nash convergence of gradient dynamics in general-sum games. In Proceedings of UAI-2000, pages 541–548. Morgan Kaufman, 2000. [11] W. D. Smart and L. P. Kaelbling. Practical reinforcement learning in continuous spaces. In Proceedings of ICML-00, pages 903–910, 2000. [12] W. T. B. Uther and M. M. Veloso. Tree based discretization for continuous state space reinforcement learning. In Proceedings of AAAI-98, pages 769–774, 1998. [13] C. Watkins. Learning from Delayed Rewards. PhD thesis, Cambridge University, 1989. [14] J. W. Weibull. Evolutionary Game Theory. The MIT Press, 1995.
2003
181