LI ET AL. 243

Nonparametric Bayes

Wei Li David Blei Andrew McCallum Department of Computer Science Department Department of Computer Science University of Massachusetts Princeton University University of Massachusetts Amherst, MA 01003 Princeton, NJ 08540 Amherst, MA 01003

Abstract One example is the correlated (CTM) (Blei & Lafferty, 2006). CTM represents each docu- Recent advances in topic models have ex- ment as a mixture of topics, where the mixture pro- plored complicated structured distributions portion is sampled from a logistic normal distribution. to represent topic correlation. For example, The parameters of this prior include a covariance ma- the pachinko allocation model (PAM) cap- trix in which each entry specifies the covariance be- tures arbitrary, nested, and possibly sparse tween a pair of topics. Therefore, topic occurrences correlations between topics using a directed are no longer independent from each other. However, acyclic graph (DAG). While PAM provides CTM is limited to pairwise correlations only, and the more flexibility and greater expressive power number of parameters in the covariance matrix grows than previous models like latent Dirichlet al- as the square of the number of topics. location (LDA), it is also more difficult to de- An alternative model that provides more flexibility to termine the appropriate topic structure for a describe correlations among topics is the pachinko al- specific dataset. In this paper, we propose a location model (PAM) (Li & McCallum, 2006), which nonparametric Bayesian prior for PAM based uses a directed acyclic graph (DAG) structure to rep- on a variant of the hierarchical Dirichlet pro- resent and learn arbitrary-arity, nested, and possibly cess (HDP). Although the HDP can cap- sparse topic correlations. Each leaf node in the DAG ture topic correlations defined by nested data represents a word in the vocabulary, and each interior structure, it does not automatically discover node corresponds to a topic. A topic in PAM can be such correlations from unstructured data. By not only a distribution over words, but also a distribu- assuming an HDP-based prior for PAM, we tion over other topics. Therefore it captures inter-topic are able to learn both the number of topics correlations as well as word correlations. The distribu- and how the topics are correlated. We eval- tion of a topic over its children could be parameterized uate our model on synthetic and real-world arbitrarily. One example is to use a Dirichlet distri- text datasets, and show that nonparamet- bution, from which a multinomial distribution over its ric PAM achieves performance matching the children is sampled on a per-document-basis. To gen- best of PAM without manually tuning the erate a word in a document in PAM, we start from the number of topics. root, samples a topic path based on these multinomials and finally samples the word.

1 Introduction The DAG structure in PAM is extremely flexible. It could be a simple tree (hierarchy), or an arbitrary DAG, with cross-connected edges, and edges skipping Statistical topic models such as latent Dirichlet alloca- levels. Some other models can be viewed as special tion (LDA) (Blei et al., 2003) have been shown to be cases of PAM. For example, LDA corresponds to a effective tools in topic extraction and analysis. These three-level hierarchy consisting of one root at the top, models can capture word correlations in a collection of a set of topics in the middle and a word vocabulary at textual documents with a low-dimensional set of multi- the bottom. The root is fully connected to all the top- nomial distributions. Recent work in this area has in- ics, and each topic is fully connected to all the words. vestigated richer structures to also describe inter-topic The structure of CTM can be described with a four- correlations, and led to discovery of large numbers of level DAG in PAM, in which there are two levels of more accurate, fine-grained topics. 244 LI ET AL.

topic nodes between the root and words. The lower- 2 The Model level consists of traditional LDA-style topics. In the upper level there is one node for every topic pair, cap- 2.1 Four-Level PAM turing pairwise correlations. Pachinko allocation captures topic correlations with a While PAM provides a powerful means to describe directed acyclic graph (DAG), where each leaf node is inter-topic correlations and extract large numbers of associated with a word and each interior node corre- fine-grained topics, it has the same practical difficulty sponds to a topic, having a distribution over its chil- as many other topic models, i.e. how to determine dren. An interior node whose children are all leaves the number of topics. It can be estimated using cross- would correspond to a traditional LDA topic. But validation, but this method is not efficient even for some interior nodes may also have children that are simple topic models like LDA. Since PAM has a more other topics, thus representing a mixture over topics. complex topic structure, it is more difficult to evaluate all possibilities and select the best one. While PAM allows arbitrary DAGs to model topic cor- relations, in this paper we focus on one special class Another approach to this problem is to automatically of structures. Consider a four-level hierarchy consist- learn the number of topics with a nonparametric prior ing of one root topic, s2 topics at the second level, such as the hierarchical Dirichlet process (HDP) (Teh s3 topics at the third level, and words at the bot- et al., 2005). HDPs are intended to model groups tom. We call the topics at the second level super-topics of data that have a pre-defined hierarchical structure. and the ones at the third level sub-topics. The root Each pre-defined group is associated with a Dirichlet is connected to all super-topics, super-topics are fully process whose base measure is sampled from a higher- connected to sub-topics and sub-topics are fully con- level Dirichlet process. Note that HDP cannot au- nected to words. For the root and each super-topic, tomatically discover topic correlations from unstruc- we assume a Dirichlet distribution parameterized by tured data. However, it has been applied to LDA a vector with the same dimension as the number of where it integrates over (or alternatively selects) the children. Each sub-topic is associated with a multi- appropriate number of topics. nomial distribution over words, sampled once for the In this paper, we propose a nonparametric Bayesian whole corpus from a single Dirichlet distribution. To prior for pachinko allocation based on a variant of generate a document, we first draw a set of multino- the hierarchical Dirichlet process. We assume that mials from the Dirichlet distributions at the root and the topics in PAM are organized into multiple levels super-topics. Then for each word in the document, we and each level is modeled with an HDP to capture un- sample a topic path consisting of the root, super-topic certainty in the number of topics. Unlike a standard and sub-topic based on these multinomials. Finally, HDP , where the data has a pre-defined we sample a word from the sub-topic. nested structure, we build HDPs based on dynamic As with many other topic models, we need to spec- groupings of data according to topic assignments. The ify the number of topics in advance for the four- nonparametric PAM can be viewed as an extension to level PAM. It is inefficient to manually examine every fixed-structure PAM where the number of topics at (s2, s3) pair in order to find the appropriate structure. each level is taken to infinity. To generate a docu- Therefore, we develop a nonparametric Bayesian prior ment, we first sample multinomial distributions over based on the Dirichlet process to automatically deter- topics from corresponding HDPs. Then we repeatedly mine the numbers of topics. As a side effect, this also sample a topic path according to the multinomials for discovers a sparse connectivity between super-topics each word in the document. and sub-topics. We present our model in terms of Chi- The rest of the paper is organized as follows. We de- nese restaurant process. tail the nonparametric pachinko allocation model in Section 2, describing its generative process and infer- 2.2 Chinese Restaurant Process ence algorithm. Section 3 presents experimental re- sults on synthetic data and real-world text data. We The Chinese restaurant process (CRP) is a distribu- compare discovered topic structures with true struc- tion on partitions of integers. It assumes a Chinese tures for various synthetic settings, and likelihood on restaurant with an infinite number of tables. When a held-out test data with PAM, HDP and hierarchical customer comes, he sits at a table with the following LDA (Blei et al., 2004) on two datasets. Section 4 re- probabilities: views related work, followed by conclusions and future C(t) work in Section 5. • P (an occupied table t) = P 0 , t0 C(t )+α α • P (an unoccupied table) = P 0 , t0 C(t )+α LI ET AL. 245

Name Description 1. He chooses the kth entryway ejk in the restau-

rj the jth restaurant. rant from CRP({C(j, k)}k, α0), where C(j, k) is ejk the kth entryway in the jth restaurant. the number of customers that entered the kth en- cl the lth category. Each entryway ejk is associated tryway before in this restaurant. with a category. 2. If e is a new entryway, a category c is assigned t the nth table in the jth restaurant that has jk l jln to it from CRP({P C(l, j0)} , γ ), where C(l, j0) category c . j0 l 0 l is the number of entryways that have category mlp the pth menu in category cl. Each table is P 0 c in restaurant r 0 and C(l, j ) is the total associated with a menu from the corresponding l j j0 number of entryways in all restaurants that have category. category cl. dm the mth dish in the global set of dishes. Each menu is associated with a dish. 3. After choosing the category, the customer makes the decision for which table he will sit at. He Table 1: Notation for the generative process of non- chooses table tjln from CRP({C(j, l, n)}n, α1), parametric PAM. where C(j, l, n) is the number of customers sit- ting at table tjln. 4. If the customer sits at an existing table, he where C(t) is the number of customers sitting at table will share the menu and dish with other cus- t, P C(t0) is the total number of customers in the t0 tomers at the same table. Otherwise, he will restaurant and α is a parameter. For the rest of the choose a menu mlp for the new table from paper, we denote this process with CRP({C(t)}t, α). P 0 0 CRP({ j0 C(j , l, p)}p, γ1), where C(j , l, p) is Note that the number of occupied tables grows as new the number of tables in restaurant j0 that have P 0 customers arrive. After all customers sit down, we menu mlp and j0 C(j , l, p) is the number of ta- obtain a partition of integers, which exhibits the same bles in all restaurants that have menu mlp. clustering structure as draws from a Dirichlet process (DP) (Ferguson, 1973). 5. If the customer gets an existing menu, he will eat the dish on the menu. Otherwise, he samples dish dm for the new menu from 2.3 Nonparametric PAM P 0 0 CRP({ l0 C(l , m)}m, φ1), where C(l , m) is the number of menus in category cl0 that serve dish Now we describe the nonparametric prior for PAM as P 0 dm and l0 C(l , m) is the number of all menus a variant of Chinese restaurant process. that serve dish dm.

2.3.1 Generative process α0, α1, γ0, γ1 and φ1 are parameters in the Chinese restaurant processes. Consider a scenario in which we have multiple restau- Now we briefly explain how to generate a corpus of rants. Each restaurant has an infinite number of entry- documents from PAM with this process. Each docu- ways , each of which has a category associated with it. ment corresponds to a restaurant and each word is as- The restaurant is thus divided into an infinite num- sociated with a customer. In the four-level DAG struc- ber of sections according to the categories. When a ture of PAM, there are an infinite number of super- customer enters an entryway, the category leads him topics represented as categories and an infinite num- to a particular section, where there are an infinity ber of sub-topics represented as dishes. Both super- number of tables . Each table has a menu on it and topics and sub-topics are globally shared among all each menu is associated with a dish . The menus are documents. To generate a word in a document, we category-specific, but shared among different restau- first sample a super-topic according to the CRPs that rants. Dishes are globally shared by all menus. If a sample the category. Then given the super-topic, we customer sits at a table that already has other cus- sample a sub-topic in the same way that a dish is tomers, he shares the same menu and thus dish with drawn from CRPs. Finally we sample the word from these customers. When he wants to sit at a new table, the sub-topic according to its multinomial distribution a menu is assigned to the table. If the menu is new over words. An example to generate a piece of text is too, a dish will be assigned to it. shown in Figure 1. A more formal description is presented below, using As we can see, the sampling procedure for super-topics notation from Table 1. involves two levels of CRPs that draw entryways and A customer x arrives at restaurant rj. categories respectively. They act as a prior on the 246 LI ET AL.

given observations X and other variable assignments wj1 wj2 ej1 d1 (denoted by Π−x) is proportional to the product of the m11 m12 ej2 tj11 tj12 wj6 c1 c1 d2 following terms:

ej3 wj3 d3 wj5 m21 m22 d4 1. P (ejk, cl|Π−x) ∝ tj31 wj4 tj32 c3 c2

rj  C(j,k) P C(j,k0)+α ,  k0 0 m31  if e is an existing entryway with category c ; c3  jk l  P C(l,j0)  α0 j0  P C(j,k0)+α P P C(l0,j0)+γ , jth restaurant menus dishes  k0 0 j0 l0 0 if e is new and c is an existing category; (a) jk l  α0 γ0  P 0 P P 0 0 ,  0 C(j,k )+α0 0 0 C(l ,j )+γ0  k j l r  if e and c are both new;  jk l  0, other cases c1 c2 c3 Note that the number of non-zero probabilities w j1 w j2 w j3 here is only the sum of the numbers of existing wj6 wj4 wj5 entryways and categories instead of their product.

d1 d2 d3 d4 2. P (t , m , d |Π , c ) ∝ (b) jln lp m −x l  C(j,l,n) P C(j,l,n0)+α ,  n0 1  if t is an existing table with m and d ; Figure 1: An example to demonstrate the generative  jln lp m  P C(j0,l,p) process of nonparametric PAM. (a) shows the sam-  α1 j0  P 0 P P 0 0 ,  n0 C(j,l,n )+α1 j0 p0 C(j ,l,p )+γ1 pling result for a piece of text “wj1, ..., wj6” in the jth   if tjln is new, but mlp is an existing menu with dm; document. An arrow between two objects represents  P 0 α1 γ1 l0 C(l ,m) their association. For example, the category associated P C(j,l,n0)+α P P C(j0,l,p0)+γ P P C(l0,m)+φ ,  n0 1 j0 p0 1 m l0 1  with entryways ej1 and ej2 is c1, the menu associated  if tjln and mlp are new and dm is an existing dish;  α1 γ1 φ1 with table tj11 is m11 and the dish associated with m11  P 0 P P 0 0 P P 0 ,  0 C(j,l,n )+α1 0 0 C(j ,l,p )+γ1 0 C(l ,m)+φ1  n j p m l is d1. (b) is the corresponding topic structure. The six  if all three variables are new;  words are generated from three different sub-topics.  0, other cases

Again, the number of non-zero probabilities is not distributions over super-topics, which is an example the product of the numbers of possible values for of hierarchical Dirichlet process (HDP). As Dirichlet the three variables. processes have been used as priors for mixture mod-

els, the HDP can be used for problems where mixture C(m,x)+β 3. P (x|X−x, Π−x, dm) ∝ P (C(m,x0)+β) components need to be shared among multiple DPs. x0 One application of HDP is to automatically determine This calculates the probability to sample an ob- the number of topics in LDA, where each document is servation x. Here we assume that the base dis- associated with one DP and topics are shared among tribution H is a symmetric Dirichlet distribution all documents. Similarly, the prior on the distributions with parameter β. C(m, x) is the number of times over sub-topics is also an HDP. It consists of three lev- that menu dm is assigned to customer x. els of CRPs to sample tables, menus and dishes. The hierarchy reflects groupings of the data. In addition In order to use the above equations for Gibbs sampling, to documents, the data is dynamically organized into we still need to determine the values for the Dirichlet groups based on super-topic assignments. process parameters. Following the same procedure de- scribed in (Teh et al., 2005), we assume Gamma priors 2.3.2 Inference for α0, γ0, α1, γ1 and φ1 and re-sample them at every iteration. Similar to PAM and many other topic models, we use Gibbs sampling to perform inference. For each cus- tomer x, we want to jointly sample the 5 variables asso- 3 Experimental Results ciated with it. Assume x wants to sit at restaurant rj, then the conditional probability that he chooses entry- In this section, we describe experimental results for way ejk, category cl, table tjln, menu mlp and dish dm nonparametric PAM and several related topic models. LI ET AL. 247

Model Parameters sub-topic #1 super #1 super #2 PAM β = 0.01 0 1 2 3 4 sub-topic #2 αr = 0.01 5 6 7 8 9 hLDA β = 0.01 10 11 12 13 14 sub-topic #3 α = 10.0 γ = 1.0 15 16 17 18 19 sub #1 sub #2 sub #3 20 21 22 23 24 HDP β = 0.01 α ∼ Gamma(1.0, 1.0) γ ∼ Gamma(1.0, 1.0) Figure 2: An example of synthetic topic structure φ ∼ Gamma(1.0, 10.0) Nonparametric β = 0.01 PAM α ∼ Gamma(1.0, 0.1) 3.1 Datasets 0 γ0 ∼ Gamma(1.0, 1.0) 3.1.1 Synthetic datasets α1 ∼ Gamma(1.0, 1.0) γ1 ∼ Gamma(1.0, 1.0) One goal of nonparametric PAM is to automatically φ1 ∼ Gamma(1.0, 10.0) discover the topic structure from data. To demon- strate this ability for our model, we first apply it Table 2: Model parameters: β parameterizes the to synthetic datasets where the true structures are Dirichlet prior for topic distributions over words; αr known. The word vocabulary of the training data in PAM is the Dirichlet distribution associated with is organized into a v-by-v grid. Each sub-topic is a the root; in hLDA, α is the Dirichlet prior for dis- uniform distribution over either a column or a row of tributions over topics and γ is the parameter in the words, and each super-topic is an arbitrary combina- Dirichlet process; in HDP and nonparametric PAM, tion of sub-topics. An example structure is shown in the parameters in Dirichlet processes are assumed to Figure 2. We follow the generative process of PAM be drawn from various Gamma distributions. with a fixed structure and Dirichlet parameters to ran- domly sample documents. By changing the vocabulary size, numbers of super-topics and sub-topics, we obtain tains 11,708 words and the whole corpus has 114,142 different datasets where each of them consists of 100 word tokens in total. documents and each document contains 200 tokens. 3.2 Model Parameters 3.1.2 20 newsgroups comp5 dataset We assume the same topic structure for PAM, hLDA The 20 newsgroups dataset consists of 20,000 postings and nonparametric PAM except that hLDA and non- collected from 20 different newsgroups. In our experi- parametric PAM need to learn the numbers of topics. ment, we use the comp5 subset that includes 5 groups: The parameters we use in the models are summarized graphics, os.ms-windows.misc, sys.ibm.pc.hardware, in Table 2. In the training procedure, each Gibbs sam- sys.mac.hardware and windows.x. There are in to- pler is initialized randomly and runs for 1000 burn-in tal 4,836 documents, 468,252 word tokens and 35,567 iterations. We then draw a total number of 10 sam- unique words. This dataset is specifically chosen be- ples with 100 iterations apart. The evaluation result cause of the observed partitioning of documents into is based on the average of these samples. groups, which allows us to compare against HDP.

3.1.3 Rexa dataset 3.3 Discovering Topic Structures

Rexa is a digital library of computer science, which We first apply nonparametric PAM to the synthetic allows searching for research papers, authors, grants, datasets. After training, we associate each true topic etc (http://rexa.info). We randomly choose a subset with one discovered topic based on similarity and eval- of abstracts from its large collection. In this dataset, uate the performance based on topic assignment accu- there are 5,000 documents, 350,760 word tokens and racy. The results are presented in Table 3. In all four 25,597 unique words. experiments, sub-topics are identified with high accu- racy. We have slightly lower accuracy on super-topics. 3.1.4 NIPS dataset The most common error is splitting. For example, in the second experiment (a 5-by-5 vocabulary, 3 super- This dataset consists of 1,647 abstracts of NIPS con- topics and 7 sub-topics), one super-topic is split into ference papers from 1987 to 1999. The vocabulary con- three, which leads to a small decrease in accuracy. 248 LI ET AL.

Structure Accuracy (%) 20ng Rexa v s2 s3 Super-topic Sub-topic PAM 5-100 -797350 5 2 4 99.93 98.78 PAM 5-200 -795760 5 3 7 82.03 97.70 PAM 20-100 -792130 -580373 10 3 7 99.43 95.86 PAM 20-200 -785470* -574964 10 4 10 96.14 96.66 PAM 50-100 -789740 -577450 PAM 50-200 -784540* -577086 Table 3: Evaluation result on synthetic datasets. Each HDP -791120 row corresponds to one experiment. v is the size of the hLDA -790312 -581317 NPB PAM -783298 -575466* grid, s2 is the true number of super-topics and s3 is the true number of sub-topics. Accuracy of super-topic (sub-topic) is the percentage of words whose super- Table 5: Average log-likelihoods from 5-fold cross val- topic (sub-topic) assignments are the same as the true idation on 20 newsgroups comp5 dataset and Rexa topics. dataset. The bold numbers are the highest values, and the ones with * are statistically equivalent to them.

3.5 Likelihood Comparison

3.4 Topic Examples We compare nonparametric PAM with other topic models in terms of likelihood on held-out test data. In order to calculate the likelihood, we need to integrate out the sampled distributions and sum over all pos- In addition to synthetic datasets, we also apply our sible topic assignments. This problem has no closed- model to real-world text data. For the 20 newsgroups form solution. Instead of approximating the likelihood comp5 dataset, we present example topics discovered of a document d by the harmonic mean of a set of con- by nonparametric PAM and PAM with 5 sub-topics ditional probabilities P (d|z(d)) where the samples are (Table 4). As we can see, the 5 topics from the generated using Gibbs sampling (Griffiths & Steyvers, fixed-structure PAM are noisy and do not have clear 2004), we choose a more robust approach based on em- correspondence to the 5 document groups. On the pirical likelihood (Diggle & Gratton, 1984). For each other hand, the topics from the nonparametric PAM trained model, we first randomly sample 1,000 docu- are more salient and demonstrate stronger correlations ments according to its own generative process. Then with document groups. For example, the second topic from each sample we estimate a multinomial distribu- is associated with documents in the sys.mac.hardware tion. The probability of a test document is then calcu- group and the fourth topic is associated with the lated as its average probability from each multinomial, graphics group. The comparison here shows the im- just as in a simple mixture model. portance of choosing the appropriate number of topics. We report evaluation results on two datasets. For the We also present topic examples from the NIPS dataset 20 newsgroups comp5 dataset, only HDP (Teh et al., in Figure 3. The circles ({t , ..., t }) correspond to 5 1 5 2005) uses the document group information in the super-topics from 43 in total and each box displays training procedure. PAM, hLDA and nonparametric the top 5 words in a sub-topic. A line between two PAM do not rely on the pre-defined data structure. topics represents their connection and its width ap- We use {5, 20, 50} super-topics and {100, 200} sub- proximately shows the proportion of a child topic in topics for PAM, where the choice of 5 super-topics is its parent. For example, in super-topic t , the domi- 3 to match the number of document groups. For the nant sub-topic is neural networks . But it also consists Rexa dataset, we do not include HDP since the data of other sub-topics such as reinforcement learning and does not have a hierarchical structure comparable to stop words. Super-topics t and t share the same 1 2 other models. Thus there is no need to include PAM sub-topic about classification , which is discussed in 5-100 and 5-200, which certainly would perform worse two different contexts of image recognition and neu- than other settings anyway. We conduct 5-fold cross ral networks . Note that the discovered connectivity validation and the average log-likelihood on test data structure is sparse. For example, there is no connec- is presented in Table 5. tion between t4 and the sub-topic about image recog- nition . It means that this sub-topic is never sampled Each row in the table shows the log-likelihoods of one from this super-topic in the whole dataset. The av- model on the two datasets. The first column is the erage number of children for a super-topic is 19 while model name. For example, PAM 5-100 corresponds the total number of sub-topics is 143. to PAM with 5 super-topics and 100 sub-topics, and LI ET AL. 249

NPB PAM (179 sub-topics) Fixed-structure PAM (5 sub-topics) drive mac mb jpeg power drive file windows graphics window disk system simms image cpu card entry file image server drives comp ram gif fan scsi output files mail motif hard disk memory color heat writes program jpeg ftp sun controller sys bit images supply mb build dos data widget bios ftp vram format motherboard system line don software application floppy macintosh simm quality sink article entries image pub display system apple board file case mac printf program information set ide faq meg bit switch problem echo writes tax mit scsi software chip version chip don char bit package xterm

Table 4: Example topics in 20 newsgroups comp5 dataset. The left side are topics from nonparametric PAM and the right side are topics from PAM with 5 sub-topics. Each column displays the top 10 words in one sub-topic. By automatically choosing the number of topics, nonparametric PAM generates topics with higher quality than PAM with an inappropriate number of topics.

r

t1 t2 t3 t4 t5

recognition classification model network learning units model analog control images classifier data learning reinforcement input neurons chip model character algorithm models neural optimal hidden cells circuit robot segmentation classifiers bayesian networks state unit response vlsi motor hand data parameters results control vector visual time system

Figure 3: Example topics discovered by nonparametric PAM from NIPS dataset. Circles correspond to the root and super-topics, while each box displays the top 5 words in a sub-topic. The line width approximately shows the proportion of a child topic in its parent. the last three rows are HDP, hLDA and nonparametric best manually-selected setting for PAM is 20 super- PAM respectively. topics and 200 sub-topics. The nonparametric PAM performs just as well with an average number of 33 For the 20 newsgroups comp5 dataset, PAM does not super-topics and 181 sub-topics. Again, hLDA is sig- perform as well as HDP when using only 5 super- nificantly worse according to paired t-tests. topics. One possible reason is that HDP is provided with additional information of document groups while PAM is not. However, as more super-topics are used, 4 Related Work PAM benefits from the ability of discovering more spe- cific topics and eventually outperforms HDP. On the Choosing an appropriate number of mixture compo- other hand, nonparametric PAM automatically discov- nents is always an important issue for mixture mod- ers the topic structure from data. Its average number els. Model selection methods such as cross-validation of super-topics is 67 and number of sub-topics is 173. and Bayesian model testing are usually inefficient. A Based on paired t-test results, nonparametric PAM nonparametric solution with the Dirichlet process is performs as well as the best settings of PAM (20-200 more desirable because it does not require specifying and 50-200), and significantly better than both HDP the number of mixture components in advance. Dirich- and hLDA. let process mixture models have been widely studied in many problems (Kim et al., 2006; Daume-III & Marcu, We obtain similar results for the Rexa dataset. The 2005; Xing et al., 2004; Sudderth et al., 2005). 250 LI ET AL.

In order to solve problems where a set of mixture structures for different datasets and nonparametric ap- models share the same mixture components, Teh proaches will be more appealing to such models. In et al. (2005) propose the hierarchical Dirichlet pro- our future work, we will explore in this direction to cess (HDP). One example of using the HDP is to learn discover richer topic correlations. the number of topics in LDA, in which each document is associated with a Dirichlet process whose base mea- Acknowledgements sure is sampled from a higher level Dirichlet process. This work was supported in part by the Center for Intelli- Although it does not directly discover topic correla- gent Information Retrieval and in part by the Defense Ad- tions from unstructured data, the HDP can be used as vanced Research Projects Agency (DARPA), through the a nonparametric prior for other topic models such as Department of the Interior, NBC, Acquisition Services Di- PAM to automatically learn topic structures. vision, under contract number NBCHD030010, and under contract number HR0011-06-C-0023 and in part by The Another closely related model that also represents and Central Intelligence Agency, the National Security Agency learns topic correlations is hierarchical LDA (hLDA) and National Science Foundation under NSF grant num- (Blei et al., 2004). It is a variation of LDA that as- ber IIS-0326249. Any opinions, findings and conclusions or recommendations expressed in this material are those sumes a hierarchical structure among topics. Topics of the author(s) and do not necessarily reflect those of the at higher levels are more general, such as stopwords, sponsor. while the more specific words are organized into topics at lower levels. Note that each topic has a unique path References from the root. To generate a document, hLDA sam- ples a topic path from the hierarchy and then samples Blei, D., Griffiths, T., Jordan, M., & Tenenbaum, J. (2004). every word from those topics. Thus hLDA can well ex- Hierarchical topic models and the nested Chinese restau- plain a document that discusses a mixture of computer rant process. In Advances in neural information process- ing systems 16. science, artificial intelligence and robotics. However, for example, the document cannot cover both robotics Blei, D., & Lafferty, J. (2006). Correlated topic models. In and natural language processing under the more gen- Advances in neural information processing systems 18. eral topic artificial intelligence. This is because a doc- Blei, D., Ng, A., & Jordan, M. (2003). Latent Dirichlet ument is sampled from only one topic path in the hi- allocation. Journal of Research, 3, erarchy. A nested Chinese restaurant process is used 993–1022. to model the topic hierarchy. It is different from the Daume-III, H., & Marcu, D. (2005). A Bayesian model for HDP-based prior in our model since it does not require supervised clustering with the Dirichlet process prior. shared mixture components among multiple DPs. Journal of Machine Learning Research 6, 1551–1577. Diggle, P., & Gratton, R. (1984). Monte Carlo methods of inference for implicit statistical models. Journal of the 5 Conclusions and Future Work Royal Statistical Society.

In this paper, we have presented a nonparametric Ferguson, T. (1973). A Bayesian analysis of some nonpara- metric problems. Annals of Statistics, 1(2), 209–230. Bayesian prior for pachinko allocation based on a vari- ant of the hierarchical Dirichlet process. While PAM Griffiths, T., & Steyvers, M. (2004). Finding scientific top- could use arbitrary DAG structures to capture topic ics. Proceedings of the National Academy of Sciences (pp. 5228–5235). correlations, we focus on a four-level hierarchical struc- ture in our experiments. Unlike a standard HDP mix- Kim, S., Tadesse, M., & Vannucci, M. (2006). Variable se- ture model, nonparametric PAM automatically discov- lection in clustering via Dirichlet process mixture mod- els. Biometrika 93, 4, 877–893. ers topic correlations from unstructured data as well as determining the numbers of topics at different levels. Li, W., & McCallum, A. (2006). Pachinko allocation: DAG-structured mixture models of topic correlations. As mentioned in Section 3, the topic structure dis- International Conference on Machine Learning (ICML). covered by nonparametric PAM is usually sparse. It Sudderth, E., Torralba, A., Freeman, W., & Willsky, allows us to pre-prune the unlikely sub-topics given A. (2005). Describing visual scenes using transformed a super-topic and dramatically reduce the sampling Dirichlet processes. Advances in Neural Information space. Therefore the training procedure will be more Processing Systems 17. efficient, and we are interested in developing a scalable Teh, Y., Jordan, M., Beal, M., & Blei, D. (2005). Hier- model that can be applied to very large datasets. archical Dirichlet processes. Journal of the American Statistical Association. The four-level hierarchical structure is only a simple example of PAM. There are more complicated DAG Xing, E., Sharan, R., & Jordan, M. (2004). Bayesian hap- structures that provide greater expressive power. Ac- lotype inference via the Dirichlet process. International Conference on Machine Learning (ICML). cordingly, it is more difficult to select the appropriate