Skip to main content
QUICK REVIEW

[Paper Review] jLDADMM: A Java package for the LDA and DMM topic models

Dat Quoc Nguyen|arXiv (Cornell University)|Aug 11, 2018
Topic ModelingComputer Science14 references11 citations
TL;DR

jLDADMM is a lightweight, standalone Java package implementing Latent Dirichlet Allocation (LDA) and the Dirichlet Multinomial Mixture (DMM) model for topic modeling, using collapsed Gibbs sampling. It supports topic modeling on both standard and short texts, includes built-in document clustering evaluation via Purity and NMI, and requires no external dependencies, making it easy to deploy via a single .jar file.

ABSTRACT

In this technical report, we present jLDADMM---an easy-to-use Java toolkit for conventional topic models. jLDADMM is released to provide alternatives for topic modeling on normal or short texts. It provides implementations of the Latent Dirichlet Allocation topic model and the one-topic-per-document Dirichlet Multinomial Mixture model (i.e. mixture of unigrams), using collapsed Gibbs sampling. In addition, jLDADMM supplies a document clustering evaluation to compare topic models. jLDADMM is open-source and available to download at: https://github.com/datquocnguyen/jLDADMM

Motivation & Objective

  • To provide a lightweight, easy-to-deploy alternative for topic modeling on short or sparse text data where traditional LDA underperforms.
  • To implement both LDA and DMM models using collapsed Gibbs sampling for efficient inference.
  • To include a native document clustering evaluation module using Purity and normalized mutual information (NMI) to compare topic model performance.
  • To eliminate dependency overhead by packaging all components into a single executable .jar file for seamless command-line and API usage.
  • To support both training and inference on unseen corpora, including model parameter reuse and topic assignment prediction.

Proposed method

  • The package implements LDA and DMM using collapsed Gibbs sampling for posterior inference, as described in prior literature.
  • Input is formatted as one document per line, with words separated by whitespace, requiring preprocessing such as lowercasing, stop-word removal, and filtering by frequency and length.
  • The LDA model uses a symmetric Dirichlet prior with default α = 0.1 and β = 0.01, while DMM uses β = 0.1 for short texts.
  • Topic assignments and distributions are stored in output files: .theta (document-topic), .phi (topic-word), .topWords (top words per topic), and .paras (model parameters).
  • For evaluation, documents are assigned to the topic with highest probability, and clustering scores are computed using ground-truth labels via Purity and NMI metrics.
  • The system supports both training and inference modes, including loading pre-trained model parameters for topic inference on new data.

Experimental results

Research questions

  • RQ1Can a lightweight, dependency-free Java package effectively support topic modeling on short texts where LDA performance degrades?
  • RQ2How does the DMM model, which assumes one topic per document, compare to LDA in terms of clustering quality on short text corpora?
  • RQ3To what extent can jLDADMM’s built-in evaluation module accurately assess topic model performance using standard clustering metrics like Purity and NMI?
  • RQ4Can jLDADMM be used reliably for both training and inference on unseen data without external dependencies?
  • RQ5Does the inclusion of model parameter persistence and step-wise sampling improve usability and reproducibility in topic modeling workflows?

Key findings

  • jLDADMM successfully implements both LDA and DMM using collapsed Gibbs sampling with minimal setup, enabling rapid deployment via a single .jar file.
  • The package supports topic modeling on short texts by allowing higher β values (e.g., 0.1) in DMM, which improves performance on sparse data.
  • Document clustering evaluation is natively supported using Purity and NMI, with results reported per model and averaged across multiple runs when using the -prob theta option.
  • The system enables topic inference on unseen corpora using pre-trained model parameters, with configurable sampling iterations and output naming.
  • The evaluation module can process multiple .theta files simultaneously, computing mean and standard deviation of clustering scores for model comparison.
  • The package is extensible and can be enhanced with word embeddings, as suggested in the source code link provided in the paper.

Read this paper

Open the full text in the Nubint reader and ask about any passage as you read.

Read this paper on Nubint

This review was generated by AI from the original paper. Please check the paper before citing it.