Exact slice sampler for Hierarchical Dirichlet Processes

Arash A. Amini, Marina S. Paez, Lizhen Lin, Zahra S. RazaeearXiv 2019

Abstract

We propose an exact slice sampler for Hierarchical Dirichlet process (HDP) and its associated mixture models (Teh et al., 2006). Although there are existing MCMC algorithms for sampling from the HDP, a slice sampler has been missing from the literature. Slice sampling is well-known for its desirable properties including its fast mixing and its natural potential for parallelization. On the other hand, the hierarchical nature of HDPs poses challenges to adopting a full-fledged slice sampler that automatically truncates all the infinite measures involved without ad-hoc modifications. In this work, we adopt the powerful idea of Bayesian variable augmentation to address this challenge. By introducing new latent variables, we obtain a full factorization of the joint distribution that is suitable for slice sampling. Our algorithm has several appealing features such as (1) fast mixing; (2) remaining exact while allowing natural truncation of the underlying infinite-dimensional measures, as in (Kalli et al., 2011), resulting in updates of only a finite number of necessary atoms and weights in each iteration; and (3) being naturally suited to parallel implementations. The underlying principle for joint factorization of the full likelihood is simple and can be applied to many other settings, such as designing sampling algorithms for general dependent Dirichlet process (DDP) models.

Introduction

The Hierarchical Dirichlet Process (HDP) is a cornerstone of Bayesian nonparametrics, widely used for modeling data with nested structures, such as words within documents grouped by topics. Despite its utility, HDPs are notoriously difficult to sample from because they involve infinite-dimensional measures. Historically, researchers have faced a trade-off between the slow-mixing but exact Chinese Restaurant Franchise (CRF) Gibbs sampler and fast but approximate Variational Inference methods.

Slice sampling offers a compelling alternative with fast mixing and inherent parallelization. However, applying it to HDPs has been historically difficult due to the complex coupling of infinite measures across hierarchical levels. This paper introduces an exact slice sampler that overcomes these hurdles through a novel variable augmentation strategy.

Methods: Bayesian Variable Augmentation

The core innovation of this work is a Bayesian variable augmentation approach. By introducing specific latent variables into the model, the authors "break" the complex dependencies between hierarchical layers, leading to a full factorization of the joint distribution. This transforms a tangled web of variables into independent components that can be updated efficiently.

Graphical model representation of the proposed augmented HDP framework.

Key technical components of the proposed framework include:

  • Stick-Breaking Representation: The model utilizes the standard constructive definition of Dirichlet Processes to define weights.
  • Natural Truncation: Unlike previous methods requiring manual, ad-hoc truncation of infinite series, this slice sampler automatically determines the number of "atoms" (clusters) needed in each iteration. It remains theoretically exact while only updating a finite number of necessary components.
  • The "Doubling" Macro: To ensure the sampler maintains sufficient capacity to represent the infinite measure, a doubling strategy increases the number of available atoms whenever the sampler approaches its current boundary.

Experimental Evaluation

The authors evaluated the sampler using both synthetic and real-world datasets:

  1. Synthetic Multinomial HDP-mixtures: These tests demonstrated how the algorithm scales and mixes under controlled conditions with varying numbers of restaurants ($J$) and vocabulary sizes ($W$).
  2. Real-World DBLP Dataset: The sampler was applied to 894 computer science paper titles from 2017. The goal was to recover topic clusters (machine learning, multimedia, and security) based on word distributions.

Key Results

  • Rapid Mixing: In synthetic trials, the sampler reached a stable state (measured by Normalized Mutual Information, or NMI) in just 10 to 20 iterations, significantly faster than traditional CRF-based methods.
  • High Accuracy: On the DBLP dataset, the algorithm successfully recovered high-quality clusters with an NMI between 0.35 and 0.4 within 100 iterations.
  • Parallel Efficiency: Because the joint density is factorized, updates can be performed in parallel across restaurants or tables, making the algorithm well-suited for multi-core or GPU implementations.

Conclusion and Future Work

This work demonstrates that mathematical exactness in HDP sampling does not require sacrificing speed. By leveraging variable augmentation, the proposed slice sampler achieves fast mixing and provides a framework that is "parallel by design."

While the current implementation handles interrelated parameters through a doubling strategy, future work may focus on optimizing this logic to reduce computational overhead. Furthermore, the authors suggest that this factorization principle can be extended to more complex models, such as Dependent Dirichlet Processes (DDPs), opening new avenues for efficient Bayesian nonparametric inference.

Summary updated

BibTeX
@misc{amini2019exact,
  author = {Arash A. Amini and Marina S. Paez and Lizhen Lin and Zahra S. Razaee},
  title = {{Exact slice sampler for Hierarchical Dirichlet Processes}},
  year = {2019},
  eprint = {1903.08829},
  archivePrefix = {arXiv},
  url = {https://arxiv.org/abs/1903.08829},
}
Figure