Conditional Variational Inference with Adaptive Truncation for Bayesian Nonparametric Models

Jones Yirui Liu, Xinghao QiaoarXiv 2020

Introduction

Hierarchical Bayesian Nonparametric (HBNP) models, such as the Hierarchical Dirichlet Process (HDP), offer a powerful framework for data analysis because they can theoretically adapt their complexity to the scale of the data. For instance, in topic modeling, an HDP should ideally discover more topics as the corpus grows. However, practitioners often face a trade-off between the accuracy of Markov Chain Monte Carlo (MCMC) methods, which are computationally prohibitive for large datasets, and the scalability of Variational Inference (VI), which typically relies on fixed "universal truncation" and mean-field assumptions. These constraints often lead to overfitting, underfitting, or redundant results.

This paper introduces CATVI (Conditional and Adaptively Truncated Variational Inference), a framework designed to scale HBNP models to massive datasets without sacrificing their nonparametric flexibility. By capturing correlations and adaptively adjusting model dimensions during optimization, CATVI achieves superior predictive accuracy and clearer data clustering.

Methods

CATVI introduces three primary innovations to the standard variational pipeline to address the limitations of traditional VI:

  1. Nonparametric Evidence Lower Bound (NPELBO): The authors redefine the standard optimization objective for infinite-dimensional spaces using finite partitions, providing a theoretical foundation for maximizing a lower bound on the true nonparametric posterior.
  2. Conditional Variational Setting: Unlike the standard mean-field approach that assumes independence between all variables, CATVI utilizes a conditional factorization. This structure preserves the dependence between layers of the hierarchy, allowing the model to capture complex correlations.
  3. Adaptive Truncation via Monte Carlo: This "secret sauce" integrates a small amount of Gibbs sampling for local variables within the stochastic VI loop. If the sampler identifies data that does not fit existing components, it triggers a partition refinement, effectively creating a new topic or dimension on the fly.
Plate diagram of the Hierarchical Dirichlet Process (HDP) model structure.

Experimental Evaluation

The authors evaluated CATVI on three large-scale text corpora: arXiv (1.03M abstracts), NYT (1.56M articles), and Wikipedia (4.03M entries).

Key Results

CATVI demonstrated significant improvements in both predictive performance and model interpretability:

  • Superior Perplexity: Across all datasets, CATVI achieved lower predictive perplexity compared to Online Variational Inference (OVI), Split-Merge VI, and standard Gibbs Sampling. For example, on the arXiv dataset, CATVI reached a perplexity of 832, significantly outperforming the standard OVI at 1005.
  • Data-Driven Complexity: CATVI treats the model dimension as part of the optimization process. In experiments, models initialized with 100 topics automatically converged to approximately 140–200 topics, reflecting the true complexity of the datasets.
  • Efficiency: Despite the inclusion of Monte Carlo sampling, CATVI remains highly efficient, processing millions of documents and converging in under 5 hours on standard hardware.
Predictive perplexity and number of topics over time for NYT, Wiki, and arXiv datasets.

Discussion and Insights

A major advantage of CATVI is its ability to reduce redundancy. Traditional fixed-truncation VI often suffers from "topic replication," where the model creates identical topics to fill pre-allocated slots. CATVI avoids this by only adding topics when justified by the data. Qualitatively, CATVI produces more distinct and linguistically meaningful clusters, successfully separating distinct domains that competing methods often conflate.

While CATVI is more computationally demanding than purely analytical VI updates due to the local Monte Carlo step, it is substantially faster than MCMC. Future work may explore its application to other HBNP models, such as the Hierarchical Pitman-Yor process for heavy-tailed data or the Hierarchical Beta process for sparse features.

Summary updated

BibTeX
@misc{liu2020conditional,
  author = {Jones Yirui Liu and Xinghao Qiao},
  title = {{Conditional Variational Inference with Adaptive Truncation for Bayesian Nonparametric Models}},
  year = {2020},
  eprint = {2001.04508},
  archivePrefix = {arXiv},
  url = {https://arxiv.org/abs/2001.04508},
}
Figure