Introduction
Hierarchical topic modeling aims to discover the latent structure of a document corpus by organizing topics into a tree, where general concepts reside near the root and specific details appear in the leaves. However, traditional approaches like the Nested Chinese Restaurant Process (nCRP) suffer from a significant limitation: they restrict an entire document to a single path from the root to a leaf. This rigidity forces models to either ignore relevant topics in other branches or create redundant nodes, a phenomenon known as "fractionation." For example, an article on "Sports Medicine" might be forced into a "Sports" branch, losing the "Medicine" context, or require a specialized, redundant "Sports-Medicine" node.
The nHDP Framework
To overcome these constraints, the Nested Hierarchical Dirichlet Process (nHDP) introduces a more flexible routing mechanism. Instead of assigning a single path to a document, the nHDP allows for one path per word.
The model consists of three main components:
- Global Topic Tree: A shared hierarchy of topics structured as an nCRP.
- Document-Specific Subtrees: Each document defines its own distribution over paths in the global tree using a Hierarchical Dirichlet Process (HDP). This allows "thematic borrowing," where a single document can pull topics from disparate branches (e.g., both "Sports" and "Medicine") simultaneously.
- Word-Level Routing: For each word, the model selects a path from the document's distribution and uses a "stochastic switch" to determine the appropriate level of specificity within that path.
Scalable Inference via SVI
A key contribution of this work is a scalable Stochastic Variational Inference (SVI) algorithm. Traditional Gibbs sampling methods are often too slow for massive datasets. SVI enables the model to process data in small minibatches, making it feasible to analyze millions of documents. To further enhance speed, the authors implemented "greedy subtree selection," which identifies the most relevant portion of the global tree for a given document, significantly reducing the computational overhead of word allocation.
Experimental Results
The nHDP was evaluated on diverse datasets, ranging from small collections of academic abstracts (JACM, PNAS) to massive corpora like 1.8 million New York Times articles and 2.7 million Wikipedia entries.
- Predictive Performance: The nHDP consistently outperformed nCRP in predictive log-likelihood on held-out data. This performance gap became more pronounced as the dataset size and complexity increased, suggesting the nHDP is better suited for complex, large-scale corpora.
- Efficiency: Using SVI, the model successfully processed the entire New York Times corpus in approximately 20 hours on a single desktop computer—a task that would be computationally prohibitive for standard nCRP implementations.
- Qualitative Insights: The learned hierarchies are highly intuitive. The model naturally places general terms (e.g., "government") at higher levels and specific entities (e.g., names of politicians) at deeper levels. Because it avoids redundant nodes, the resulting trees are more compact and interpretable.
Conclusion and Future Work
The Nested Hierarchical Dirichlet Process represents a significant step forward in hierarchical topic modeling, offering the flexibility to model complex documents that span multiple themes. While the current implementation uses tree truncation for variational efficiency, future work may explore truly infinite-depth trees or adapt the model for streaming data where the hierarchy evolves dynamically over time.
Summary updated