Nonparametric Topic Modeling with Neural Inference

Xuefei Ning, Yin Zheng, Zhuxi Jiang, Yu Wang, Huazhong Yang, Junzhou Huang, Peilin Zhao

This paper, titled "Nonparametric Topic Modeling with Neural Inference," presents a significant step forward in document modeling by bridging the gap between flexible Bayesian nonparametrics and efficient deep learning.

TL;DR

The authors propose iTM-VAE, a framework that combines the "infinite" flexibility of nonparametric topic models with the speed of Auto-Encoding Variational Bayes (AEVB). By introducing hyper-priors and hierarchical structures, they solve the common "collapse-to-prior" problem in VAEs and achieve state-of-the-art results in topic coherence and perplexity.

What Problem Does This Paper Address?

Traditional topic models, like Latent Dirichlet Allocation (LDA), require researchers to manually specify the number of topics ($K$) beforehand—a difficult task for large, unknown datasets. Nonparametric models like the Hierarchical Dirichlet Process (HDP) solve this by allowing the number of topics to grow with the data, but they are often computationally expensive and difficult to adapt to new model architectures.

On the other hand, modern neural topic models based on Variational Auto-Encoders (VAEs) are fast and flexible but suffer from "collapse-to-prior." This is a failure mode where the model ignores the latent topic space and simply defaults to its prior distribution, resulting in poor topic discovery. This paper aims to create a model that is both nonparametric (adapts its own topic count) and neural (fast and easy to train), while elegantly solving the collapse problem.

Methods

The authors introduce three main variants:

  1. iTM-VAE: This model uses a stick-breaking construction to generate topic proportions. To make the model differentiable for neural network training (the "reparameterization trick"), they replace the standard Beta distribution with the Kumaraswamy distribution, which is functionally similar but easier to compute gradients for.
  2. iTM-VAE-HP (Hyper-Prior): The authors place a Gamma hyper-prior on the concentration parameter $\alpha$. This allows the model to learn the optimal "sparsity" of topics directly from the data.
  3. HiTM-VAE (Hierarchical): This version models topic distributions in a hierarchical manner (corpus-level vs. document-level). This allows for even greater variability and sparsity in how topics are assigned to documents.

Datasets

The models were evaluated on two standard text benchmarks:

  • 20News: A collection of approximately 20,000 newsgroup documents partitioned across 20 different topics.
  • Reuters RCV1-V2: A large-scale dataset of over 800,000 manually categorized newswire stories.

Key Insights and Ideas

  • Principled Solution to Collapse: Instead of using heuristic "tricks" like KL-annealing to prevent VAE collapse, the authors show that a hyper-prior on the concentration parameter is a more elegant and effective solution. It allows the model to "turn on" more latent units as the data complexity increases.
  • Dynamic Adaptation: As shown in Table 2, the model automatically adjusts its expectation of $\alpha$ based on the number of classes in the training set. A dataset with 1 class results in an expected $\alpha$ of 3.68, while 20 classes push it to 16.39.
  • Hierarchical Sparsity: The hierarchical construction in HiTM-VAE helps the model learn more topics while keeping individual document representations sparse—meaning each document is clearly associated with just a few themes rather than a muddy mix of many.

Key Results

The proposed models consistently outperformed state-of-the-art baselines like ProdLDA and GSM.

  • Perplexity: iTM-VAE-Prod achieved the lowest (best) perplexity scores on both datasets (775 on 20News and 508 on RCV1-V2), as seen in Table 1.
  • Topic Coherence: iTM-VAE-HP and HiTM-VAE achieved the highest coherence scores, meaning the discovered topics were more semantically meaningful to humans.
Table 1: Comparison of perplexity and topic coherence across different models.

The authors also demonstrated the model's ability to adapt its topic coverage. As shown in Figure 1, the model uses more topics to reach the same level of document coverage as the number of classes in the dataset increases.

Figure 1: Topic coverage vs. number of topics for different class counts.

Limitations and Future Work

While the model is theoretically "infinite," the practical implementation still requires a truncation level ($K$) for the stick-breaking process (set to 200 in their experiments). Although the model can adapt within this range, it is not truly unbounded in the implementation. The authors suggest that future work could involve incorporating more diverse information sources into the neural inference process to further enhance the richness of the learned topics.

Summary updated

BibTeX
@article{ning2020nonparametric,
  author = {Xuefei Ning and Yin Zheng and Zhuxi Jiang and Yu Wang and Huazhong Yang and Junzhou Huang and Peilin Zhao},
  title = {{Nonparametric Topic Modeling with Neural Inference}},
  journal = {Neurocomputing},
  year = {2020},
  doi = {10.1016/j.neucom.2019.12.128},
}
Figure