SAME but Different: Fast and High Quality Gibbs Parameter Estimation

Huasha Zhao, Biye Jiang, John F. Canny, Bobby JarosKDD 2015 · DOI

Introduction

Maximum A Posteriori (MAP) estimation is a cornerstone of machine learning, yet traditional methods often force a trade-off between speed and quality. Gibbs sampling, while a robust "workhorse" for Bayesian inference, is notoriously slow and not inherently designed for optimization. This research introduces a GPU-accelerated approach that combines State Augmentation for Marginal Estimation (SAME) with a novel Poisson-based approximation. The resulting algorithm matches the speed of fast symbolic methods like Variational Bayes (VB) while maintaining the superior estimation quality of sampling.

Methodology: Accelerating SAME

The core challenge with SAME is that it requires creating $m$ copies of latent variables to "cool" the distribution and sharpen the peaks for MAP estimation. Traditionally, this increases the computational burden by a factor of $m$. The authors overcome this with two primary innovations:

  1. Coordinate-Factored Approximation: For models with independent latent variables (like Latent Dirichlet Allocation), the authors represent the count of $m$ samples using a Poisson distribution. Generating one Poisson random variable is nearly as fast as drawing a single categorical sample, effectively neutralizing the overhead of state augmentation.
  2. Hardware-Aware Optimization: The algorithm is designed for SIMD (Single Instruction, Multiple Data) architectures. By leveraging GPU kernels for matrix operations and parallelizing the Poisson sampling, the bottleneck shifts from the CPU to high-throughput graphics hardware.
Impact of sample size $m$ and annealing schedules on log-likelihood.

Experimental Evaluation

The "SAME Gibbs" approach was evaluated using Latent Dirichlet Allocation (LDA) on massive text datasets, including NYTimes (100 million tokens) and PubMed (730 million tokens). The researchers compared their method against standard Collapsed Gibbs Sampling (CGS) and both online and batch Variational Bayes.

Key Results

  • Speed and Efficiency: On the NYTimes dataset, the sampler converged in just 90 seconds—a massive improvement over the 60-70 hours required by traditional CPU implementations. A single GPU-equipped PC performed comparably to a 1,000-node cluster using older Gibbs methods.
  • Estimation Quality: The proposed method consistently achieved higher log-likelihood (better predictive performance) than VB baselines, proving that sampling can maintain its quality edge even at high speeds.
  • Robustness of $m$: While annealing schedules (varying $m$ over time) were tested, a high fixed value (e.g., $m=100$) was found to be highly effective and simpler to implement.
Comparison of Cooled Gibbs ($m=100$) against CGS and Variational Bayes baselines.

Discussion and Future Work

The results suggest that state augmentation, often viewed as a computational burden, can actually facilitate parallelism. By increasing the amount of independent work per iteration, SAME becomes a natural fit for modern GPU hardware.

While the "Poisson trick" currently relies on the independence assumptions found in models like LDA, future work aims to extend these coordinate-factored approximations to more general graphical models. Additionally, managing the 2GB memory constraints of GPUs remains a priority for scaling to even larger datasets via mini-batching.

Summary updated

BibTeX
@inproceedings{zhao2015same,
  author = {Huasha Zhao and Biye Jiang and John F. Canny and Bobby Jaros},
  title = {{SAME but Different: Fast and High Quality Gibbs Parameter Estimation}},
  booktitle = {ACM SIGKDD Conference on Knowledge Discovery and Data Mining},
  year = {2015},
  doi = {10.1145/2783258.2783416},
}
Figure