awesome-topic-models
β¨ Awesome - A curated list of amazing Topic Models (implementations, libraries, and resources)
https://github.com/jonaschn/awesome-topic-models
Last synced: 14 days ago
JSON representation
Dirichlet hyperparameter optimization techniques
Embedding based Topic Models
- Slice sampling
- Minka
- lecture-notes
- Newton-Raphson Method
- fixed-point iteration - Wallach's PhD thesis, chapter 2.3
- fastfit
- dirichlet
- lightspeed
- Newton-Raphson Method
Learning Implementations (hopefully easy to understand)
Embedding based Topic Models
- Topic-Model - Python implementation of LDA, Labeled LDA, ATM, Temporal Author-Topic Model using Gibbs sampling
- topic_models - Python implementation of LSA, PLSA and LDA
Libraries & Toolkits
- scikit-learn - Python library for machine learning
- OCTIS - Python package to integrate, optimize and evaluate topic models
- tmtoolkit - Python topic modeling toolkit with parallel processing power
- BIDMach - CPU and GPU-accelerated machine learning library
- BigARTM - Fast topic modeling platform
- TopicNet - A high-level Python interface for BigARTM library
- stm - R package for the Structural Topic Model
- RMallet - R package to interface with the Java machine learning tool MALLET
- R-lda - R package for topic modelling (LDA, sLDA, corrLDA, etc.)
- topicmodels - R package with interface to C code for LDA and CTM
- lda++ - C++ library for LDA and (fast) supervised LDA (sLDA/fsLDA) using variational inference
- gensim - Python library for topic modelling
Models
Author-topic Model (ATM) [:page_facing_up:](https://arxiv.org/pdf/1207.4169.pdf)
- gensim - Python implementation with online training (constant in memory w.r.t. the number of documents)
Dynamic Topic Model (DTM) [:page_facing_up:](https://dl.acm.org/doi/pdf/10.1145/1143844.1143859)
- ldaseqmodel-gensim - Python implementation using online variational inference π
- tca - C implementation using Gibbs sampling with/without burstiness modelling π
- FastDTM - Scalable C++ implementation using Gibbs sampling with Stochastic Gradient Langevin Dynamics (MCMC-based) π
Embedding based Topic Models
- lda2vec - Mixing dirichlet topic models and word embeddings to make lda2vec π
- lda2vec-pytorch - PyTorch implementation of lda2vec
- MG-LDA - Python implementation of (Multi-lingual) Gaussian LDA π
- D-ETM - Dynamic Embedded Topic Model π
- BERTopic - BERTopic supports guided, (semi-) supervised, and dynamic topic modeling and visualization π
- CTM - CTMs combine contextualized embeddings (e.g., BERT) with topic models
- ETM - Embedded Topic Model π
- ProdLDA - Original TensorFlow implementation of Autoencoding Variational Inference (AEVI) for Topic Models π
- pytorch-ProdLDA - PyTorch implementation of ProdLDA π
- CatE - Discriminative Topic Mining via Category-Name Guided Text Embedding π
- Top2Vec - Python implementation that learns jointly embedded topic, document and word vectors π
- G-LDA - Java implementation of Gaussian LDA using word embeddings π
- MetaLDA - Java implementation using Gibbs sampling that leverages document metadata and word embeddings π
- LFTM - Java implementation of latent feature topic models (improving LDA and DMM with word embeddings) π
- CorEx - Recover latent factors with Correlation Explanation (CorEx) π
- Anchored CorEx - Hierarchical Topic Modeling with Minimal Domain Knowledge π
- Linear CorEx - Latent Factor Models Based on Linear Total CorEx π
Exotic models
- PTM - Prescription Topic Model for Traditional Chinese Medicine Prescriptions π (interesting benchmark models)
- TEM - Topic Expertise Model π
- KGE-LDA - Knowledge Graph Embedding LDA π
- LDA-SP - A Latent Dirichlet Allocation Method for Selectional Preferences π
- LDA+FFT - LDA and FFTs (Fast and Frugal Trees) for better comprehensibility π
Hierarchical Dirichlet Process (HDP) [:page_facing_up:](https://papers.nips.cc/paper/2004/file/fb4ab556bc42d6f0ee0f9e24ec4d1af0-Paper.pdf)
- gensim - Python implementation using online variational inference π
- Scalable HDP - interesting paper
- tomotopy - Python extension for C++ implementation using Gibbs sampling π
- Mallet - Java-based package for topic modeling using Gibbs sampling
- TopicModel4J - Java implementation using Gibbs sampling based on Chinese restaurant franchise metaphor
- hca - C implementation using Gibbs sampling with/without burstiness modelling
- bnp - Cython reimplementation based on online-hdp following scikit-learn's API.
- Scalable HDP - interesting paper
Hierarchical LDA (hLDA) [:page_facing_up:](https://dl.acm.org/doi/10.5555/2981345.2981348)
- Mallet - Java implementation using Gibbs sampling
- hlda - Python package based on Mallet's Gibbs sampler having a fixed depth on the nCRP tree
Labeled Latent Dirichlet Allocation (LLDA, Labeled-LDA, L-LDA) [:page_facing_up:](https://www.aclweb.org/anthology/D09-1026.pdf)
- Mallet - Java implementation using Gibbs sampling π
- gensims_mallet_wrapper - Python wrapper for Mallet using gensim interface
- topbox - Python wrapper for labeled LDA implementation of Stanford TMT
- Labeled-LDA-Python - Python implementation (easy to use, does not scale)
- JGibbLabeledLDA - Java implementation based on the popular JGibbLDA package
Latent Dirichlet Allocation (LDA) [:page_facing_up:](https://www.jmlr.org/papers/volume3/blei03a/blei03a.pdf)
- scikit-learn - Python implementation using online variational Bayes inference π
- lda-gensim - Python implementation using online variational inference π
- ldamulticore-gensim - Parallelized Python implementation using online variational inference π
- CVBLDA-TopicModel4J - Java implementation using collapsed variational Bayesian (CVB) inference π
- SparseLDA - Java algorithm and data structure for evaluating Gibbs sampling distributions used in Mallet π
- Vowpal Wabbit - C++ implementaion using online variational Bayes inference π
- Scalable - Scalable Hyperparameter Selection for LDA π
- LDA\* - Tencent's hybrid sampler that uses different samplers for different types of documents in combination with an asymmetric parameter server π
- F+LDA - C++ implementation of F+LDA using an appropriately modified Fenwick tree π
- GS-LDA-BIDMach - CPU and GPU-accelerated Scala implementation using Gibbs sampling
- VB-LDA-BIDMach - CPU and GPU-accelerated Scala implementation using online variational Bayes inference
- lda - Python implementation using collapsed Gibbs sampling which follows scikit-learn interface π
- PartiallyCollapsedLDA - Various fast parallelized samplers for LDA, including Partially Collapsed LDA, LightLDA, Partially Collapsed Light LDA and a very efficient Polya-Urn LDA
- topicmodel-lib - Cython library for online/streaming LDA (Online VB, Online CVB0, Online CGS, Online OPE, Online FW, Streaming VB, Streaming OPE, Streaming FW, ML-OPE, ML-CGS, ML-FW)
- jsLDA - JavaScript implementation of LDA topic modeling in the browser
- lda-nodejs - Node.js implementation of LDA topic modeling
- lda-purescript - PureScript, browser-based implementation of LDA topic modeling
- TopicModels.jl - Julia implementation of LDA
- turicreate - C++ LDA and aliasLDA implementation with export to Apple's Core ML for use in iOS, macOS, watchOS, and tvOS apps
- MeTA - C++ implementation of (parallel) collapsed Gibbs sampling, CVB0 and SCVB
- Fugue - Java implementation of collapsed Gibbs sampling with slice sampling for hyper-parameter optimization
- GA-LDA - R scripts using Genetic Algorithms (GA) for hyper-paramenter optimization, based on Panichella π
- Search-Based-LDA - R scripts using Genetic Algorithms (GA) for hyper-paramenter optimization by Panichella π
- Dodge - Python tuning tool that ignores redundant tunings π
- LDADE - Python tuning tool using differential evolution π
- ldatuning - R package to find optimal number of topics for LDA π
- topic_interpretability - Computation of the semantic interpretability of topics produced by topic models π
- topic-coherence-sensitivity - Code to compute topic coherence for several topic cardinalities and aggregate scores across them π
- topic-model-diversity - A collection of topic diversity measures for topic modeling π
- FastLDA - C++ implementation of LDA π
- dmlc - Single-and multi-threaded C++ implementations of lightLDA, F+LDA, AliasLDA, forestLDA and many more
- warpLDA - C++ cache efficient LDA implementation which samples each token in O(1) π
- lightLDA - C++ implementation using O(1) Metropolis-Hastings sampling π
- AliasLDA - C++ implemenation using Metropolis-Hastings and alias methodπ
- Yahoo-LDA - Yahoo!'s topic modelling framework π
- PLDA+ - Google's C++ implementation using data placement and pipeline processing π
- Familia - A toolkit for industrial topic modeling (LDA, SentenceLDA and Topical Word Embedding) β οΈ π
- SaberLDA - GPU-based system that implements a sparsity-aware algorithm to achieve sublinear time complexity
Miscellaneous topic models
- Dual-Sparse Topic Model - implemented in TopicModel4J using collapsed variational Bayes inference π
- sailing-pmls - Parallel LDA and medLDA implementation
- sequence-models - Java implementation of block HMM and the mixed membership Markov model (M4)
- BigTopicModel - C++ engine for running large-scale MedLDA models π
- YWWTools - Java-based package for various topic models by Weiwei Yang
- trLDA - Python implementation of streaming LDA based on trust-regions π
- Logistic LDA - Tensorflow implementation of Discriminative Topic Modeling with Logistic LDA π
- EnsTop - Python implementation of ENSemble TOPic modelling with pLSA
- discLDA - C++ implementation of discLDA based on GibbsLDA++ π
- GuidedLDA - Python implementation that can be guided by setting some seed words per topic (using Gibbs sampling) π
- seededLDA - R package that implements seeded-LDA for semi-supervised topic modeling
- keyATM - R package for Keyword Assisted Topic Models.
- BayesPA - Python interface for streaming implementation of MedLDA, maximum entropy discrimination LDA (max-margin supervised topic model) π
- DAPPER - Python implementation of Dynamic Author Persona (DAP) topic model π
- ToT - Python implementation of Topics Over Time (A Non-Markov Continuous-Time Model of Topical Trends) π
- MLTM - C implementation of multilabel topic model (MLTM) π
- Entropy-Based Topic Modeling - Java implementation of Entropy-Based Topic Modeling on Multiple Domain-Specific Text Collections
Non-Negative Matrix Factorization (NMF or NNMF)
- scikit-learn - Python implementation using a coordinate descent or a multiplicative update solver
- gensim - Python implementation of online NMF
- BIDMach - CPU and GPU-accelerated Scala implementation with L2 loss
Relational Topic Model (RTM)
- Constrained-RTM - Java implementation of Contrained RTM π
Supervised LDA (sLDA) [:page_facing_up:](https://papers.nips.cc/paper/2007/file/d56b9fc4b0f1be8871f5e1c40c0067e7-Paper.pdf)
- slda - Cython implementation of Gibbs sampling for LDA and various sLDA variants
Topic Models for short documents
- :page_facing_up:
- :page_facing_up:
- :page_facing_up:
- :page_facing_up:
- :page_facing_up:
- :page_facing_up:
- :page_facing_up:
- :page_facing_up:
- :page_facing_up:
- :page_facing_up:
- :page_facing_up:
- :page_facing_up:
- :page_facing_up:
- :page_facing_up:
- :page_facing_up:
- :page_facing_up:
- :page_facing_up:
- :page_facing_up:
- :page_facing_up:
- :page_facing_up:
- :page_facing_up:
- :page_facing_up:
- :page_facing_up:
- GPyM_TM - Python implementation of DMM and Poisson model
- jLDADMM - Java implementation using collapsed Gibbs sampling π
- BTM - Original C++ implementation using collapsed Gibbs sampling π
- BurstyBTM - Original C++ implementation of the Bursty BTM (BBTM) π
- R-BTM - R package wrapping the C++ code from BTM
- STTM - Java implementation and evaluation of DMM, WNTM, PTM, ETM, GPU-DMM, GPU-DPMM, LF-DMM π
- SATM - Java implementation of Self-Aggregation Topic Model π
- shorttext - Python implementation of various algorithms for Short Text Mining
- :page_facing_up:
- :page_facing_up:
- :page_facing_up:
- :page_facing_up:
- :page_facing_up:
- :page_facing_up:
- :page_facing_up:
- :page_facing_up:
- :page_facing_up:
- :page_facing_up:
- :page_facing_up:
- :page_facing_up:
- :page_facing_up:
- :page_facing_up:
- :page_facing_up:
- :page_facing_up:
- :page_facing_up:
Truncated Singular Value Decomposition (SVD) / Latent Semantic Analysis (LSA) / Latent Semantic Indexing (LSI)
- scikit-learn - Python implementation using fast randomized SVD solver or a βnaiveβ algorithm that uses ARPACK
- gensim - Python implementation using multi-pass randomized SVD solver or a one-pass merge algorithm
- BIDMach - Scala implementation of a scalable approximate SVD using subspace iteration
- SVDlibc - C implementation of SVD by Doug Rohde
- sparsesvd - Python wrapper for SVDlibc
Popular Implementations (but not maintained anymore)
Embedding based Topic Models
- Stanford Topic Modeling Toolbox - Scala implementation of LDA, labeledLDA, PLDA, PLDP by Daniel Ramage and Evan Rosen
- GibbsLDA++ - C++ implementation using Gibbs sampling π
- JGibbLDA - Java implementation using Gibbs sampling
- Matlab Topic Modeling Toolbox - Matlab implementations of LDA, ATM, HMM-LDA, LDA-COL (Collocation) models by Mark Steyvers and Tom Griffiths
- :fork_and_knife:
- Mr.LDA - Scalable Topic Modeling using Variational Inference in MapReduce π
Probabilistic Programming Languages (PPL) (a.k.a. Build your own Topic Model)
Embedding based Topic Models
- Stan - Platform for statistical modeling and high-performance statistical computation, e.g., LDA π
- Turing.jl - Julia library for general-purpose probabilistic programming π
- TFP - Probabilistic reasoning and statistical analysis in TensorFlow, e.g., LDA π
- edward2 - Simple PPL with core utilities in the NumPy and TensorFlow ecosystem π
- pyro - PPL built on PyTorch, e.g., prodLDA π
- edward - A PPL built on TensorFlow, e.g., LDA π
- ZhuSuan - A PPL for Bayesian deep learning, generative models, built on Tensorflow, e.g., LDA π
- PyMC3 - Python package for Bayesian statistical modeling and probabilistic machine learning, e.g., LDA π
Related awesome lists
Embedding based Topic Models
Research Implementations
Embedding based Topic Models
- fast - A Fast And Scalable Topic-Modeling Toolbox (Fast-LDA, CVB0) by Arthur Asuncion and colleagues π
- hLDA - C implementation of hierarchical LDA by David Blei
- ctm-c - C implementation of the correlated topic model by David Blei
- sLDA - C++ implementation of supervised topic models with a categorical response.
- lda-c - C implementation using variational EM by David Blei