{"title": "Infinite latent feature models and the Indian buffet process", "book": "Advances in Neural Information Processing Systems", "page_first": 475, "page_last": 482, "abstract": null, "full_text": "Infinite Latent Feature Models and the Indian Buffet Process\nThomas L. Griffiths Cognitive and Linguistic Sciences Brown University, Providence RI tom griffiths@brown.edu Zoubin Ghahramani Gatsby Computational Neuroscience Unit University College London, London zoubin@gatsby.ucl.ac.uk\n\nAbstract\nWe define a probability distribution over equivalence classes of binary matrices with a finite number of rows and an unbounded number of columns. This distribution is suitable for use as a prior in probabilistic models that represent objects using a potentially infinite array of features. We identify a simple generative process that results in the same distribution over equivalence classes, which we call the Indian buffet process. We illustrate the use of this distribution as a prior in an infinite latent feature model, deriving a Markov chain Monte Carlo algorithm for inference in this model and applying the algorithm to an image dataset.\n\n1\n\nIntroduction\n\nThe statistical models typically used in unsupervised learning draw upon a relatively small repertoire of representations. The simplest representation, used in mixture models, associates each object with a single latent class. This approach is appropriate when objects can be partitioned into relatively homogeneous subsets. However, the properties of many objects are better captured by representing each object using multiple latent features. For instance, we could choose to represent each object as a binary vector, with entries indicating the presence or absence of each feature [1], allow each feature to take on a continuous value, representing objects with points in a latent space [2], or define a factorial model, in which each feature takes on one of a discrete set of values [3, 4]. A critical question in all of these approaches is the dimensionality of the representation: how many classes or features are needed to express the latent structure expressed by a set of objects. Often, determining the dimensionality of the representation is treated as a model selection problem, with a particular dimensionality being chosen based upon some measure of simplicity or generalization performance. This assumes that there is a single, finite-dimensional representation that correctly characterizes the properties of the observed objects. An alternative is to assume that the true dimensionality is unbounded, and that the observed objects manifest only a finite subset of classes or features [5]. This alternative is pursued in nonparametric Bayesian models, such as Dirichlet process mixture models [6, 7, 8, 9]. In a Dirichlet process mixture model, each object is assigned to a latent class, and each class is associated with a distribution over observable properties. The prior distribution over assignments of objects to classes is defined in such a way that the number of classes used by the model is bounded only by the number of objects, making Dirichlet process mixture models \"infinite\" mixture models [10]. The prior distribution assumed in a Dirichlet process mixture model can be specified in\n\n\f\nterms of a sequential process called the Chinese restaurant process (CRP) [11, 12]. In the CRP, N customers enter a restaurant with infinitely many tables, each with infinite seating mk capacity. The ith customer chooses an already-occupied table k with probability i-1+ , where mk is the number of current occupants, and chooses a new table with probability i-1+ . Customers are exchangeable under this process: the probability of a particular seating arrangement depends only on the number of people at each table, and not the order in which they enter the restaurant. If we replace customers with objects and tables with classes, the CRP specifies a distribution over partitions of objects into classes. A partition is a division of the set of N objects into subsets, where each object belongs to a single subset and the ordering of the subsets does not matter. Two assignments of objects to classes that result in the same division of objects correspond to the same partition. For example, if we had three objects, the class assignments {c1 , c2 , c3 } = {1, 1, 2} would correspond to the same partition as {2, 2, 1}, since all that differs between these two cases is the labels of the classes. A partition thus defines an equivalence class of assignment vectors. The distribution over partitions implied by the CRP can be derived by taking the limit of the probability of the corresponding equivalence class of assignment vectors in a model where class assignments are generated from a multinomial distribution with a Dirichlet prior [9, 10]. In this paper, we derive an infinitely exchangeable distribution over infinite binary matrices by pursuing this strategy of taking the limit of a finite model. We also describe a stochastic process (the Indian buffet process, akin to the CRP) which generates this distribution. Finally, we demonstrate how this distribution can be used as a prior in statistical models in which each object is represented by a sparse subset of an unbounded number of features. Further discussion of the properties of this distribution, some generalizations, and additional experiments, are available in the longer version of this paper [13].\n\n2\n\nA distribution on infinite binary matrices\n\nIn a latent feature model, each object is represented by a vector of latent feature values f i , and the observable properties of that object xi are generated from a distribution determined by its latent features. Latent feature values can be continuous, as in principal component analysis (PCA) [2], or discrete, as in cooperative vector quantization (CVQ) [3, 4]. In the remainder of this section, we will assume that feature values are continuous. Using the mafT T T T trix F = 1 f2 fN to indicate the latent feature values for all N objects, the model is specified by a prior over features, p(F), and a distribution over observed property matrices conditioned on those features, p(X|F), where p() is a probability density function. These distributions can be dealt with separately: p(F) specifies the number of features and the distribution over values associated with each feature, while p(X|F) determines how these features relate to the properties of objects. Our focus will be on p(F), showing how such a prior can be defined without limiting the number of features. We can break F into two components: a binary matrix Z indicating which features are possessed by each object, with zik = 1 if object i has feature k and 0 otherwise, and a matrix V indicating the value of each feature for each object. F is the elementwise product of Z and V, F = Z V, as illustrated in Figure 1. In many latent feature models (e.g., PCA) objects have non-zero values on every feature, and every entry of Z is 1. In sparse latent feature models (e.g., sparse PCA [14, 15]) only a subset of features take on non-zero values for each object, and Z picks out these subsets. A prior on F can be defined by specifying priors for Z and V, with p(F) = P (Z)p(V), where P () is a probability mass function. We will focus on defining a prior on Z, since the effective dimensionality of a latent feature model is determined by Z. Assuming that Z is sparse, we can define a prior for infinite latent feature models by defining a distribution over infinite binary matrices. Our discussion of the Chinese restaurant process provides two desiderata for such a distribution: objects\n\n\f\n(a)\n\nK features\n\n(b)\n\nK features\n0.9 1.4 0 0.9 0 0 -0.3\n\n(c)\n1\n\nK features\n3 0 1 0 0 3 4 0 0 4\n\nN objects\n\nN objects\n\n0 1.8 -0.1\n\n0.2 -2.8 0\n\nN objects\n\n-3.2 0\n\n5 0 2 5\n\nFigure 1: A binary matrix Z, as shown in (a), indicates which features take non-zero values. Elementwise multiplication of Z by a matrix V of continuous values produces a representation like (b). If V contains discrete values, we obtain a representation like (c). should be exchangeable, and posterior inference should be tractable. It also suggests a method by which these desiderata can be satisfied: start with a model that assumes a finite number of features, and consider the limit as the number of features approaches infinity. 2.1 A finite feature model\n\nWe have N objects and K features, and the possession of feature k by object i is indicated by a binary variable zik . The zik form a binary N K feature matrix, Z. Assume that each object possesses feature k with probability k , and that the features are generated independently. Under this model, the probability of Z given = {1 , 2 , . . . , K }, is P (Z| ) = kK iN P (zik |k ) = kK\nm k k (1 - k )N -mk ,\n\n(1)\n\n=1 =1\n\n=1\n\nN where mk = i=1 zik is the number of objects possessing feature k . We can define a prior on by assuming that each k follows a beta distribution, to give\n k | Beta( K , 1)\n\nzik | k Bernoulli(k ) Each zik is independent of all other assignments, conditioned on k , and the k are generated independently. We can integrate out to obtain the probability of Z, which is P (Z) = kK\n K (mk + K )(N - mk + 1) . (N + 1 + K )\n\n(2)\n\n=1\n\nThis distribution is exchangeable, since mk is not affected by the ordering of the objects. 2.2 Equivalence classes\n\nIn order to find the limit of the distribution specified by Equation 2 as K , we need to define equivalence classes of binary matrices the analogue of partitions for class assignments. Our equivalence classes will be defined with respect to a function on binary matrices, lof (). This function maps binary matrices to left-ordered binary matrices. lof (Z) is obtained by ordering the columns of the binary matrix Z from left to right by the magnitude of the binary number expressed by that column, taking the first row as the most significant bit. The left-ordering of a binary matrix is shown in Figure 2. In the first row of the leftordered matrix, the columns for which z1k = 1 are grouped at the left. In the second row, the columns for which z2k = 1 are grouped at the left of the sets for which z1k = 1. This grouping structure persists throughout the matrix. The history of feature k at object i is defined to be (z1k , . . . , z(i-1)k ). Where no object is specified, we will use history to refer to the full history of feature k , (z1k , . . . , zN k ). We\n\n\f\nlof\n\nFigure 2: Left-ordered form. A binary matrix is transformed into a left-ordered binary matrix by the function lof (). The entries in the left-ordered matrix were generated from the Indian buffet process with = 10. Empty columns are omitted from both matrices. will individuate the histories of features using the decimal equivalent of the binary numbers corresponding to the column entries. For example, at object 3, features can have one of four histories: 0, corresponding to a feature with no previous assignments, 1, being a feature for which z2k = 1 but z1k = 0, 2, being a feature for which z1k = 1 but z2k = 0, and 3, being a feature possessed by both previous objects were assigned. Kh will denote the number of features possessing the history h, with K0 being the number of features for which mk = 0 2 N -1 and K+ = h=1 Kh being the number of features for which mk > 0, so K = K0 + K+ . Two binary matrices Y and Z are lof -equivalent if lof (Y) = lof (Z). The lof equivalence class of a binary matrix Z, denoted [Z], is the set of binary matrices that are lof -equivalent to Z. lof -equivalence classes play the role for binary matrices that partitions play for assignment vectors: they collapse together all binary matrices (assignment vectors) that differ only in column ordering (class labels). lof -equivalence classes are preserved through permutation of the rows or the columns of a matrix, provided the same permutations are applied to the other members of the equivalence class. Performing inference at the level of lof -equivalence classes is appropriate in models where feature order is not identifiable, with p(X|F) being unaffected by the order of the columns of F. Any model in which the probability of X is specified in terms of a linear function of F, such as PCA or CVQ, has this property. The cardinality of the lof -equivalence class [Z] is = K K! , where Kh is the number of columns with full history h. Q 2N - 1 K0 ...K N\n2 -1 h=0\n\nKh !\n\n2.3\n\nTaking the infinite limit\n\nUnder the distribution defined by Equation 2, the probability of a particular lof -equivalence class of binary matrices, [Z], is P ([Z]) = Z P (Z) =\n[ Z ]\n\nh=0\n\nRearranging terms, and using the fact that (x) = (x - 1)(x - 1) for x > 1, we can compute the limit of P ([Z]) as K approaches infinity N K K+ mk - k (N - mk )! j =1 1 (j + K ) K+ ! K! lim N 2N -1 K K N! ) Kh ! K0 ! K + j =1 (j +\nh=1 K =1\n\nK! 2N -1\n\nKh !\n\nkK\n\n K (mk\n\n=1\n\n + K )(N - mk + 1) . (N + 1 + K )\n\n(3)\n\n=\n\nh=1\n\nN1 where HN is the N th harmonic number, HN = j =1 j . This distribution is infinitely exchangeable, since neither Kh nor mk are affected by the ordering on objects. Technical details of this limit are provided in [13].\n\n 2N -1\n\nK+\n\nK+\n\nKh !\n\n\n\n1\n\n\n\nexp{-HN }\n\n\n\nk\n\n=1\n\n(N - mk )!(mk - 1)! , N!\n\n(4)\n\n\f\n2.4\n\nThe Indian buffet process\n\nThe probability distribution defined in Equation 4 can be derived from a simple stochastic process. Due to the similarity to the Chinese restaurant process, we will also use a culinary metaphor, appropriately adjusted for geography. Indian restaurants in London offer buffets with an apparently infinite number of dishes. We will define a distribution over infinite binary matrices by specifying how customers (objects) choose dishes (features). In our Indian buffet process (IBP), N customers enter a restaurant one after another. Each customer encounters a buffet consisting of infinitely many dishes arranged in a line. The first customer starts at the left of the buffet and takes a serving from each dish, stopping after a Poisson() number of dishes. The ith customer moves along the buffet, sampling dishes in proportion to their popularity, taking dish k with probability mk , where mk is the i number of previous customers who have sampled that dish. Having reached the end of all previous sampled dishes, the ith customer then tries a Poisson( i ) number of new dishes. We can indicate which customers chose which dishes using a binary matrix Z with N rows and infinitely many columns, where zik = 1 if the ith customer sampled the k th dish. Using K1 to indicate the number of new dishes sampled by the ith customer, the probability of any particular matrix being produced by the IBP is P (Z) = k (N - mk )!(mk - 1)! K+ exp{-HN } . N (i) N! K1 ! =1 i=1\nK+ (i)\n\n(5)\n\nThe matrices produced by this process are generally not in left-ordered form. These matrices are also not ordered arbitrarily, because the Poisson draws always result in choices of new dishes that are to the right of the previously sampled dishes. Customers are not (i) exchangeable under this distribution, as the number of dishes counted as K1 depends upon the order in which the customers make their choices. However, if we only pay attention to the lof -equivalence classes of the matrices generated by this process, we obtain the infinitely exchangeable distribution P ([Z]) given by Equation 4: generated via this process map to the same left-ordered form, and P ([Z]) is obtained by multiplying P (Z) from Equation 5 by this quantity. A similar but slightly more complicated process can be defined to produce left-ordered matrices directly [13]. 2.5 Conditional distributions\nQN (i) i=1 K1 ! Q 2N - 1 Kh ! h=1\n\nmatrices\n\nTo define a Gibbs sampler for models using the IBP, we need to know the conditional distribution on feature assignments, P (zik = 1|Z-(ik) ). In the finite model, where P (Z) is given by Equation 2, it is straightforward to compute this conditional distribution for any zik . Integrating over k gives m-i,k + K P (zik = 1|z-i,k ) = , (6) N+K where z-i,k is the set of assignments of other objects, not including i, for feature k , and m-i,k is the number of objects possessing feature k , not including i. We need only condition on z-i,k rather than Z-(ik) because the columns of the matrix are independent. In the infinite case, we can derive the conditional distribution from the (exchangeable) IBP. Choosing an ordering on objects such that the ith object corresponds to the last customer to visit the buffet, we obtain m-i,k P (zik = 1|z-i,k ) = , (7) N for any k such that m-i,k > 0. The same result can be obtained by taking the limit of Equation 6 as K . The number of new features associated with object i should be\n\n\f\n drawn from a Poisson( N ) distribution. This can also be derived from Equation 6, using the same kind of limiting argument as that presented above.\n\n3\n\nA linear-Gaussian binary latent feature model\n\nTo illustrate how the IBP can be used as a prior in models for unsupervised learning, we derived and tested a linear-Gaussian latent feature model in which the features are binary. In this case the feature matrix F reduces to the binary matrix Z. As above, we will start with a finite model and then consider the infinite limit. In our finite model, the D-dimensional vector of properties of an object i, xi is generated 2 from a Gaussian distribution with mean zi A and covariance matrix X = X I, where zi is a K -dimensional binary vector, and A is a K D matrix of weights. In matrix notation, E [X] = ZA. If Z is a feature matrix, this is a form of binary factor analysis. The distribution of X given Z, A, and X is matrix Gaussian with mean ZA and covariance 2 matrix X I , where I is the identity matrix. The prior on A is also matrix Gaussian, with 2 mean 0 and covariance matrix A I . Integrating out A, we have p(X|Z, X , A ) = 1\n( N -K ) D K D (2 )N D/2 X A |ZT Z\n\n+\n\n2 X D / 2 2 I| A\n\nexp{-\n\n2 1 X -1 T T T Z )X)}. (8) 2 tr(X (I - Z(Z Z + 2 I) 2X A\n\nThis result is intuitive: the exponentiated term is the difference between the inner product of X and its projection onto the space spanned by Z, regularized to an extent determined by the ratio of the variance of the noise in X to the variance of the prior on A. It follows that p(X|Z, X , A ) depends only on the non-zero columns of Z, and thus remains welldefined when we take the limit as K (for more details see [13]). We can define a Gibbs sampler for this model by computing the full conditional distribution P (zik |X, Z-(i,k) , X , A ) p(X|Z, X , A )P (zik |z-i,k ). (9)\n\nThe two terms on the right hand side can be evaluated using Equations 8 and 7 respectively. The Gibbs sampler is then straightforward. Assignments for features for which m-i,k > 0 are drawn from the distribution specified by Equation 9. The distribution over the number of new features for each object can be approximated by truncation, computing probabilities (i) for a range of values of K1 up to an upper bound. For each value, p(X|Z, X , A ) can be computed from Equation 8, and the prior on the number of new features is Poisson( N ). We will demonstrate this Gibbs sampler for the infinite binary linear-Gaussian model on a dataset consisting of 100 240 320 pixel images. We represented each image, xi , using a 100-dimensional vector corresponding to the weights of the mean image and the first 99 principal components. Each image contained up to four everyday objects a $20 bill, a Klein bottle, a prehistoric handaxe, and a cellular phone. Each object constituted a single latent feature responsible for the observed pixel values. The images were generated by sampling a feature vector, zi , from a distribution under which each feature was present with probability 0.5, and then taking a photograph containing the appropriate objects using a LogiTech digital webcam. Sample images are shown in Figure 3 (a). The Gibbs sampler was initialized with K+ = 1, choosing the feature assignments for the first column by setting zi1 = 1 with probability 0.5. A , X , and were initially set to 0.5, 1.7, and 1 respectively, and then sampled by adding Metropolis steps to the MCMC algorithm. Figure 3 shows trace plots for the first 1000 iterations of MCMC for the number of features used by at least one object, K+ , and the model parameters A , X , and . All of these quantities stabilized after approximately 100 iterations, with the algorithm\n\n\f\n(a)\n\n(Positive) (b)\n\n(Negative)\n\n(Negative)\n\n(Negative)\n\n0000 (c)\n\n0100\n\n1110\n\n1011\n\n10 K+ 5 0 4 2 0 2 X 1 0 2 A 1 0 \n\n0\n\n100\n\n200\n\n300\n\n400\n\n500\n\n600\n\n700\n\n800\n\n900\n\n1000\n\n0\n\n100\n\n200\n\n300\n\n400\n\n500\n\n600\n\n700\n\n800\n\n900\n\n1000\n\n0\n\n100\n\n200\n\n300\n\n400\n\n500\n\n600\n\n700\n\n800\n\n900\n\n1000\n\n0\n\n100\n\n200\n\n300\n\n400\n\n500 Iteration\n\n600\n\n700\n\n800\n\n900\n\n1000\n\nFigure 3: Data and results for the demonstration of the infinite linear-Gaussian binary latent feature model. (a) Four sample images from the 100 in the dataset. Each image had 320 240 pixels, and contained from zero to four everyday objects. (b) The posterior mean of the weights (A) for the four most frequent binary features from the 1000th sample. Each image corresponds to a single feature. These features perfectly indicate the presence or absence of the four objects. The first feature indicates the presence of the $20 bill, the other three indicate the absence of the Klein bottle, the handaxe, and the cellphone. (c) Reconstructions of the images in (a) using the binary codes inferred for those images. These reconstructions are based upon the posterior mean of A for the 1000th sample. For example, the code for the first image indicates that the $20 bill is absent, while the other three objects are not. The lower panels show trace plots for the dimensionality of the representation (K+ ) and the parameters , X , and A over 1000 iterations of sampling. The values of all parameters stabilize after approximately 100 iterations.\n\n\f\nfinding solutions with approximately seven latent features. The four most common features perfectly indicated the presence and absence of the four objects (shown in Figure 3 (b)), and three less common features coded for slight differences in the locations of those objects.\n\n4\n\nConclusion\n\nWe have shown that the methods that have been used to define infinite latent class models [6, 7, 8, 9, 10, 11, 12] can be extended to models in which objects are represented in terms of a set of latent features, deriving a distribution on infinite binary matrices that can be used as a prior for such models. While we derived this prior as the infinite limit of a simple distribution on finite binary matrices, we have shown that the same distribution can be specified in terms of a simple stochastic process the Indian buffet process. This distribution satisfies our two desiderata for a prior for infinite latent feature models: objects are exchangeable, and inference remains tractable. Our success in transferring the strategy of taking the limit of a finite model from latent classes to latent features suggests that a similar approach could be applied with other representations, expanding the forms of latent structure that can be recovered through unsupervised learning.\n\nReferences\n[1] N. Ueda and K. Saito. Parametric mixture models for multi-labeled text. In Advances in Neural Information Processing Systems 15, Cambridge, 2003. MIT Press. [2] I. T. Jolliffe. Principal component analysis. Springer, New York, 1986. [3] R. S. Zemel and G. E. Hinton. Developing population codes by minimizing description length. In Advances in Neural Information Processing Systems 6. Morgan Kaufmann, San Francisco, CA, 1994. [4] Z. Ghahramani. Factorial learning and the EM algorithm. In Advances in Neural Information Processing Systems 7. Morgan Kaufmann, San Francisco, CA, 1995. [5] C. E. Rasmussen and Z. Ghahramani. Occam's razor. In Advances in Neural Information Processing Systems 13. MIT Press, Cambridge, MA, 2001. [6] C. Antoniak. Mixtures of Dirichlet processes with applications to Bayesian nonparametric problems. The Annals of Statistics, 2:11521174, 1974. [7] M. D. Escobar and M. West. Bayesian density estimation and inference using mixtures. Journal of the American Statistical Association, 90:577588, 1995. [8] T. S. Ferguson. Bayesian density estimation by mixtures of normal distributions. In M. Rizvi, J. Rustagi, and D. Siegmund, editors, Recent advances in statistics, pages 287302. Academic Press, New York, 1983. [9] R. M. Neal. Markov chain sampling methods for Dirichlet process mixture models. Journal of Computational and Graphical Statistics, 9:249265, 2000. [10] C. Rasmussen. The infinite Gaussian mixture model. In Advances in Neural Information Processing Systems 12. MIT Press, Cambridge, MA, 2000. [11] D. Aldous. Exchangeability and related topics. In Ecole d'ete de probabilites de Saint-Flour, XIII--1983, pages 1198. Springer, Berlin, 1985. [12] J. Pitman. Combinatorial stochastic processes, 2002. Notes for Saint Flour Summer School. [13] T. L. Griffiths and Z. Ghahramani. Infinite latent feature models and the Indian buffet process. Technical Report 2005-001, Gatsby Computational Neuroscience Unit, 2005. [14] A. d'Aspremont, L. El Ghaoui, I. Jordan, and G. R. G. Lanckriet. A direct formulation for sparse PCA using semidefinite programming. In Advances in Neural Information Processing Systems 17. MIT Press, Cambridge, MA, 2005. [15] H. Zou, T. Hastie, and R. Tibshirani. Sparse principal component analysis. Journal of Computational and Graphical Statistics, in press.\n\n\f\n", "award": [], "sourceid": 2882, "authors": [{"given_name": "Zoubin", "family_name": "Ghahramani", "institution": null}, {"given_name": "Thomas", "family_name": "Griffiths", "institution": null}]}