Stochastic Collapsed Variational Bayesian Inference for Latent Dirichlet Allocation

Stochastic Collapsed Variational Bayesian Inference for Latent Dirichlet Allocation
Slide Note
Embed
Share

Conducting Latent Dirichlet Allocation models on Wikipedia using various inference methods such as Stochastic Variational Inference and Collapsed Variational Inference. The process involves optimizing and evaluating log likelihoods and computational times for different document sizes.

  • Latent Dirichlet Allocation
  • Bayesian Inference
  • Stochastic Variational
  • Wikipedia
  • Computational Time

Uploaded on Apr 19, 2025 | 0 Views


Download Presentation

Please find below an Image/Link to download the presentation.

The content on the website is provided AS IS for your information and personal use only. It may not be sold, licensed, or shared on other websites without obtaining consent from the author.If you encounter any issues during the download, it is possible that the publisher has removed the file from their server.

You are allowed to download the files provided on this website for personal or commercial use, subject to the condition that they are used lawfully. All files are the property of their respective owners.

The content on the website is provided AS IS for your information and personal use only. It may not be sold, licensed, or shared on other websites without obtaining consent from the author.

E N D

Presentation Transcript


  1. Stochastic Collapsed Variational Bayesian Inference for Latent Dirichlet Allocation James Foulds1, Levi Boyles1, Christopher DuBois2 Padhraic Smyth1, Max Welling3 1University of California Irvine, Computer Science 2 University of California Irvine, Statistics 3University of Amsterdam, Computer Science

  2. Lets say we want to build an LDA topic model on Wikipedia

  3. LDA on Wikipedia -600 -620 -640 -660 Avg. Log Likelihood -680 -700 -720 -740 VB (10,000 documents) -760 10 mins 1 hour 6 hours -780 2 3 4 5 10 10 10 10 12 hours Time (s)

  4. LDA on Wikipedia -600 -620 -640 -660 Avg. Log Likelihood -680 -700 -720 VB (10,000 documents) -740 VB (100,000 documents) -760 10 mins 1 hour 6 hours -780 2 3 4 5 10 10 10 10 12 hours Time (s)

  5. LDA on Wikipedia -600 -620 -640 -660 Avg. Log Likelihood 1 full iteration = 3.5 days! -680 -700 -720 VB (10,000 documents) -740 VB (100,000 documents) -760 10 mins 1 hour 6 hours -780 2 3 4 5 10 10 10 10 12 hours Time (s)

  6. LDA on Wikipedia -600 Stochastic variational inference Stochastic variational inference -620 -640 -660 Avg. Log Likelihood -680 -700 -720 Stochastic VB (all documents) -740 VB (10,000 documents) VB (100,000 documents) -760 10 mins 1 hour 6 hours -780 2 3 4 5 10 10 10 10 12 hours Time (s)

  7. LDA on Wikipedia Stochastic collapsed variational inference -600 -620 -640 -660 Avg. Log Likelihood -680 -700 -720 SCVB0 (all documents) Stochastic VB (all documents) VB (10,000 documents) VB (100,000 documents) 6 hours -740 -760 10 mins 1 hour -780 2 3 4 5 10 10 10 10 12 hours Time (s)

  8. Available tools Collapsed Gibbs Sampling VB Collapsed VB Teh et al. (2007), Asuncion et al. (2009) Griffiths and Steyvers (2004) Batch Blei et al. (2003) Hoffman et al. (2010, 2013) Mimno et al. (2012) (VB/Gibbs hybrid) Stochastic ???

  9. Available tools Collapsed Gibbs Sampling VB Collapsed VB Teh et al. (2007), Asuncion et al. (2009) Griffiths and Steyvers (2004) Batch Blei et al. (2003) Hoffman et al. (2010, 2013) Mimno et al. (2012) (VB/Gibbs hybrid) Stochastic ???

  10. Outline Stochastic optimization Collapsed inference for LDA New algorithm: SCVB0 Experimental results Discussion

  11. Stochastic Optimization for ML Batch algorithms While (not converged) Process the entire dataset Update parameters Stochastic algorithms While (not converged) Process a subset of the dataset Update parameters

  12. Stochastic Optimization for ML Batch algorithms While (not converged) Process the entire dataset Update parameters Stochastic algorithms While (not converged) Process a subset of the dataset Update parameters

  13. Stochastic Optimization for ML Stochastic gradient descent Estimate the gradient Stochastic variational inference (Hoffman et al. 2010, 2013) Estimate the natural gradient of the variational parameters Online EM (Cappe and Moulines, 2009) EstimateE-step sufficient statistics

  14. Collapsed Inference for LDA Marginalize out the parameters, and perform inference on the latent variables only Simpler, faster and fewer update equations Better mixing for Gibbs sampling Better variational bound for VB (Teh et al., 2007)

  15. A Key Insight Document parameters VB Stochastic VB Update after every document

  16. A Key Insight Document parameters VB Stochastic VB Update after every document Collapsed VB Word parameters Stochastic Collapsed VB Update after every word?

  17. Collapsed Inference for LDA Collapsed Variational Bayes (Teh et al., 2007) K-dimensional discrete variational distributions for each token Mean field assumption

  18. Collapsed Inference for LDA Collapsed Gibbs sampler

  19. Collapsed Inference for LDA Collapsed Gibbs sampler CVB0 (Asuncion et al., 2009)

  20. CVB0 Statistics Simple sums over the variational parameters

  21. Stochastic Optimization for ML Stochastic gradient descent Estimate the gradient Stochastic variational inference (Hoffman et al. 2010, 2013) Estimate the natural gradient of the variational parameters Online EM (Cappe and Moulines, 2009) EstimateE-step sufficient statistics Stochastic CVB0 Estimate the CVB0 statistics

  22. Stochastic Optimization for ML Stochastic gradient descent Estimate the gradient Stochastic variational inference (Hoffman et al. 2010, 2013) Estimate the natural gradient of the variational parameters Online EM (Cappe and Moulines, 2009) EstimateE-step sufficient statistics Stochastic CVB0 Estimate the CVB0 statistics

  23. Estimating CVB0 Statistics

  24. Estimating CVB0 Statistics Pick a random word i from a random document j

  25. Estimating CVB0 Statistics Pick a random word i from a random document j

  26. Stochastic CVB0 In an online algorithm, we cannot store the variational parameters But we can update them!

  27. Stochastic CVB0 Keep an online average of the CVB0 statistics

  28. Extra Refinements Optional burn-in passes per document Minibatches Operating on sparse counts

  29. Stochastic CVB0 Putting it all Together

  30. Theory Stochastic CVB0 is a Robbins Monro stochastic approximation algorithm for finding the fixed points of (a variant of) CVB0 Theorem: with an appropriate sequence of step sizes, Stochastic CVB0 converges to a stationary point of the MAP, with adjusted hyper-parameters

  31. Experimental Results Large Scale

  32. Experimental Results Large Scale

  33. Experimental Results Small Scale Real-time or near real-time results are important for EDA applications Human participants shown the top ten words from each topic

  34. Experimental Results Small Scale 4.5 SCVB0 SVB 4 3.5 3 Mean number of errors 2.5 2 1.5 1 0.5 0 NIPS (5 Seconds) New York Times (60 Seconds) Standard deviations: 1.1 1.2 1.0 2.4

  35. Discussion We introduced stochastic CVB0 for LDA Combines stochastic and collapsed inference approaches Fast Easy to implement Accurate Experimental results show SCVB0 is useful for both large-scale and small-scale analysis Future work: Exploit sparsity, parallelization, non-parametric extensions

  36. Thanks! Questions?

More Related Content