An open API service indexing awesome lists of open source software.

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

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)

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)

Relational Topic Model (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

Truncated Singular Value Decomposition (SVD) / Latent Semantic Analysis (LSA) / Latent Semantic Indexing (LSI)

Popular Implementations (but not maintained anymore)

Embedding based Topic Models

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