SlideServe
Menu
Préférences
© SlideServe · v2026

Scaling up LDA

jamar avatar
57 diapositives · 708 Views · Oct 12, 2014

This document explores advanced techniques for scaling Latent Dirichlet Allocation (LDA) through Gibbs sampling. It discusses the mechanics of sampling topics in documents, the dependencies of topic assignments, and the challenges of parallelizing the Gibbs sampling process. Key insights include the influence of nearby topic assignments within the same document versus across the corpus, and the implications for computational efficiency. Additionally, the document raises questions about approximating topic assignments to improve performance in large datasets, providing a deeper understanding of LDA’s scalability.

Scaling up LDA - slide 1
01 / 57Scaling up LDA
1 / 17

Télécharger la présentation

Scaling up LDA
Une image / un lien ci-dessous est fourni (tel quel) pour télécharger la présentation

Politique de téléchargement : le contenu du site vous est fourni TEL QUEL pour votre information et votre usage personnel ; il ne peut être vendu, concédé sous licence ni partagé sur d’autres sites sans l’accord de son auteur.Le contenu vous est fourni TEL QUEL, pour votre information et votre usage personnel uniquement. Téléchargez la présentation en cliquant sur ce lien. Lors du téléchargement, si vous ne parvenez pas à télécharger une présentation, l’éditeur a peut-être supprimé le fichier de son serveur.Pendant le téléchargement, si vous ne parvenez pas à obtenir une présentation, le fichier a peut-être été supprimé par l’éditeur.

F I N

Plus de contenu associé

Transcription de la présentation
  1. Scaling up LDA William Cohen

  2. First some pictures…

  3. LDAin way too much detail William Cohen

  4. Review - LDA • Latent DirichletAllocation with Gibbs  • Randomly initialize each zm,n • Repeat for t=1,…. • For each doc m, word n • Find Pr(zmn=k|other z’s) • Sample zmn according to that distr. a z w N M 

  5. Way way more detail

  6. More detail

  7. What gets learned…..

  8. In A Math-ier Notation N[*,k] N[d,k] M[w,k] N[*,*]=V

  9. for each document d and word position j in d • z[d,j] = k, a random topic • N[d,k]++ • W[w,k]++ where w = id of j-th word in d

  10. for each pass t=1,2,…. • for each document d and word position j in d • z[d,j] = k, a new random topic • update N, W to reflect the new assignment of z: • N[d,k]++; N[d,k’] - - where k’ is old z[d,j] • W[w,k]++; W[w,k’] - - where w is w[d,j]

  11. z=1 z=2 random z=3 unit height … …

  12. JMLR 2009

  13. Observation • How much does the choice of z depend on the other z’s in the same document? • quite a lot • How much does the choice of z depend on the other z’s in elsewhere in the corpus? • maybe not so much • depends on Pr(w|t) but that changes slowly • Can we parallelize Gibbs and still get good results?

  14. Question • Can we parallelize Gibbs sampling? • formally, no: every choice of z depends on all the other z’s • Gibbs needs to be sequential • just like SGD

  15. What if you try and parallelize? Split document/term matrix randomly and distribute to p processors .. then run “Approximate Distributed LDA”

  16. What if you try and parallelize? D=#docs W=#word(types) K=#topics N=words in corpus

  17. z=1 z=2 random z=3 unit height … …

  18. Running total of P(z=k|…) or P(z<=k)

  19. Discussion…. • Where do you spend your time? • sampling the z’s • each sampling step involves a loop over all topics • this seems wasteful • even with many topics, words are often only assigned to a few different topics • low frequency words appear < K times … and there are lots and lots of them! • even frequent words are not in every topic

  20. Discussion…. Idea: come up with approximations to Z at each stage - then you might be able to stop early….. • What’s the solution? Want Zi>=Z

  21. Tricks • How do you compute and maintain the bound? • see the paper • What order do you go in? • want to pick large P(k)’s first • … so we want large P(k|d) and P(k|w) • … so we maintain k’s in sorted order • which only change a little bit after each flip, so a bubble-sort will fix up the almost-sorted array

  22. Results

  23. Results

  24. Results

  25. KDD 09

  26. z=s+r+q