NeurIPS 2026Coming to NeurIPS?Explore papers, orals & directions

Mixtures of hierarchical topics with Pachinko allocation

David M. Mimno, Wei Li, Andrew McCallum

Introduction

Researchers have developed hierarchical Pachinko Allocation (hPAM), a topic modeling approach that moves beyond rigid tree structures. By using a Directed Acyclic Graph (DAG) instead of a simple tree, hPAM allows documents to mix multiple topical branches and share common "methodological" vocabulary across different subjects. This structural flexibility leads to better predictive accuracy and a more intuitive organization of text data.

The Problem with Flat and Tree-Based Models

Topic models like Latent Dirichlet Allocation (LDA) excel at finding "bags of words" that represent themes in a collection of documents. However, standard LDA is "flat"—it lacks the hierarchical understanding that "baseball" and "hockey" are both sub-topics of a broader "sports" category.

To address this, researchers previously developed hierarchical LDA (hLDA), which organizes topics into a tree structure. But hLDA introduces a major constraint: it forces every document to follow a single, rigid path down the tree. Real-world documents are rarely this clean. For instance, a paper on "Computer Gaming" and a paper on "Professional Baseball" might both rely heavily on shared vocabulary like "score," "player," and "points." In a strict tree model like hLDA, the only way to share these words is to force them into a very broad, high-level parent node, which dilutes the accuracy of the topic representation.

The authors of this paper aim to bridge the gap between the structural hierarchy of hLDA and the flexibility of the Pachinko Allocation Model (PAM), which uses a DAG to model topic correlations.

Methods: Introducing hPAM

The authors introduce hierarchical PAM (hPAM). Unlike the original PAM, where only the bottom-level "leaf" nodes produce words, hPAM allows every node in the hierarchy to have its own word distribution.

Comparison of topic model structures: (a) hLDA, (b) PAM, (c) hPAM 1, and (d) hPAM 2.

Key technical features of hPAM include:

  • DAG Structure: Instead of a tree where each node has exactly one parent, hPAM utilizes a Directed Acyclic Graph. This allows a sub-topic to have multiple "parents" (super-topics), enabling the seamless sharing of vocabulary across entirely different branches.
  • Internal Word Distributions: High-level nodes (super-topics) can generate general, cross-cutting words, while low-level nodes (sub-topics) generate highly specific terminology.
  • Two Model Variations:
    • hPAM 1: Uses a specific distribution ($\zeta$) to decide which level of the hierarchy a word should come from.
  • hPAM 2: Adds an "exit" dimension to the Dirichlet distribution at each node. This allows the model to dynamically decide whether to "stop" and emit a word at the current hierarchical level or "continue" down to a more specific sub-topic.
  • Efficient Inference: The models are trained using Gibbs sampling. To maintain speed, the authors employ a mathematical trick to marginalize over paths, making the sampling process significantly more efficient than hLDA's complex bookkeeping.

Datasets

The models were evaluated on two primary datasets to test their structural and predictive capabilities:

  1. Medline: 5,000 abstracts from 11 different biomedical journals (e.g., neurology, virology). This dataset provides a "gold standard" for high-level topical divisions based on the journal categories.
  2. 20 Newsgroups: A classic text classification dataset used to qualitatively demonstrate how distinct topics like "Christianity," "Cryptography," and "Mideast Politics" might share a common sub-topic related to "argument and discussion."

Key Insights and Results

  • Sharing is Caring: The most significant qualitative finding is that "methodological" topics (containing words like results, study, patients, levels) are prominent across many different scientific fields. hPAM successfully captures this by allowing these sub-topics to be shared by multiple super-topics, a task hLDA struggles with.
  • Predictive Power: hPAM achieved a 1.1% increase in empirical log likelihood over hLDA, demonstrating superior ability to predict words in unseen documents.
  • Structural Accuracy: The model showed a five-fold increase in Mutual Information (MI) between its super-topics and actual journal labels compared to hLDA. This suggests hPAM’s high-level "branches" align much more closely with human categorization.
  • Computational Efficiency: Because it uses static data structures and avoids non-parametric tree-growing processes, hPAM is 3 to 10 times faster per iteration than hLDA.
  • Flexibility and Stability: hPAM does not force a document into a single path, making it highly robust. If initialized with "too many" topics, it simply ignores the excess, remaining stable where standard LDA's performance would sharply drop.

Limitations and Future Work

While highly effective, the current iteration of hPAM uses a fixed topology (a set number of topics). The authors note that non-parametric versions—where the model automatically learns the optimal number of topics using Hierarchical Dirichlet Processes (HDP)—are possible but were not the focus of this evaluation.

Additionally, the authors observed that the symmetric Dirichlet prior over words has a massive impact on the learned structure, sometimes outweighing the model architecture itself. Future work may explore DAGs that are not "fully connected" (allowing certain super-topics to have private sub-topics) to further refine the balance between specific and shared vocabularies.

Summary updated

BibTeX
@inproceedings{mimno2007mixtures,
  author = {David M. Mimno and Wei Li and Andrew McCallum},
  title = {{Mixtures of hierarchical topics with Pachinko allocation}},
  booktitle = {International Conference on Machine Learning},
  year = {2007},
  doi = {10.1145/1273496.1273576},
}
Figure