Pseudo-document simulation for comparing LDA, GSDMM and GPM topic models on short and sparse text using Twitter data

Christoph Weisser, Christoph Gerloff, Anton Thielmann, Andre Python, Arik Reuter, Thomas Kneib, Benjamin SäfkenComput. Stat 2023

TL;DR

This paper introduces a novel "pseudo-document simulation" method to evaluate topic models on short, sparse text like Twitter data. They found that traditional coherence scores are unreliable for this type of data, and their new method suggests that models specifically designed for sparse data (GSDMM and GPM) outperform the standard LDA model.

What Problem Does This Paper Address?

Topic models are great for finding hidden themes in text, but they struggle with short, sparse documents like tweets. The common Latent Dirichlet Allocation (LDA) model assumes documents are mixtures of topics, which doesn't hold true for tweets that often focus on a single subject. Existing evaluation metrics, like coherence scores, have also been shown to be unreliable, not always reflecting human judgment of topic quality. This paper aims to address these limitations by proposing a new evaluation method and comparing LDA with two alternative models (GSDMM and GPM) designed for sparse data.

Methods

The core innovation here is the Pseudo-Document Simulation method. Here's how it works:

  1. Model Training: First, the LDA, GSDMM, and GPM models are trained on the actual Twitter data to learn their respective word-probability distributions for each topic (represented by matrix $\beta$).
  2. Pseudo-Document Generation: Using these learned $\beta$ matrices and a theoretical topic distribution matrix ($\theta_T$), the researchers simulate new, "pseudo-documents." These simulated documents are designed to be short and sparse, mimicking tweets, and are "labeled" with their true topic. A large corpus of 100,000 pseudo-documents is generated, with 5,000 documents per topic.
  3. Re-evaluation: The same topic models (LDA, GSDMM, GPM) are then applied to these simulated pseudo-documents.
  4. Performance Analysis: The performance is evaluated by comparing the topic distributions learned from the simulated data ($O_S$) with the original theoretical topic distributions ($O_T$). This is done by:
  5. Checking if the simulated documents are distributed evenly across topics (as they were generated to be).
  6. Calculating the column correlations between the learned topic matrix ($O_S$) and the theoretical topic matrix ($O_T$). Higher correlations suggest the model better captured the true topic structure.

The paper also provides detailed descriptions of the three topic models:

  • LDA (Latent Dirichlet Allocation): The standard generative topic model.
  • GSDMM (Gibbs Sampler Dirichlet Multinomial Model): A modification of LDA that assumes each document is generated by a single topic, making it more suitable for short texts.
  • GPM (Gamma-Poisson Mixture Model): Another model designed for sparse data, using Poisson distributions for word counts instead of multinomial distributions.

Datasets

The study uses a dataset of tweets collected from the social media platform Twitter. Specifically, they streamed tweets from July 14th to 21st, 2020, focusing on tweets from the USA (excluding Alaska and Hawaii) that contained keywords related to the Covid-19 pandemic ("covid", "corona", "covid-19").

The pre-processing steps included:

  • Removing non-English tweets.
  • Removing emojis, hyperrefs, and tags.
  • Tokenizing sentences into words.
  • Removing stopwords.
  • Removing words shorter than two letters.
  • Lemmatizing words.
  • Implementing bigrams (combining words that appear together) if they occurred at least 30 times.
  • Including unigrams and bigrams with an occurrence threshold of > 30 in the vocabulary.

A novel benchmark, the simulated pseudo-document corpus, was created for evaluation.

Key Insights and Ideas

  • Coherence Scores are Flawed for Sparse Data: The paper strongly argues that traditional coherence scores, widely used for topic model evaluation, perform poorly when applied to short and sparse text like tweets. They found that LDA, despite its poor performance in manual analysis, often scored higher on coherence metrics.
  • Pseudo-Document Simulation is a Promising Evaluation Method: The proposed simulation method offers a more objective way to compare topic models by creating controlled, labeled data that mimics the characteristics of the target data (short, sparse tweets). This allows for a direct comparison of how well models recover underlying topic structures.
  • Specialized Models Outperform LDA on Sparse Text: GSDMM and GPM, models specifically designed for sparse data, demonstrated better performance in the pseudo-document simulation and manual topic interpretation, suggesting they are more appropriate for analyzing Twitter data than LDA.

Key Results

  • Coherence Scores vs. Simulation: While LDA showed higher coherence scores (Fig. 9), the pseudo-document simulation revealed that GPM and GSDMM performed significantly better. The GPM model achieved the highest column correlations with the theoretical topic matrix, followed by GSDMM, and then LDA (Fig. 8).
  • Manual Topic Interpretation: Manual analysis of top words and wordclouds indicated that GSDMM and GPM generated more interpretable topics with fewer irrelevant words compared to LDA (Fig. 2, 3, 4, 5).
  • Pseudo-Document Distribution: The pseudo-document simulation showed that GPM and GSDMM resulted in a more uniform distribution of documents across topics, closer to the ideal scenario, whereas LDA exhibited the highest deviation (Fig. 7).

Limitations and Future Work

  • Hyperparameter Optimization: The pseudo-document simulation method, while effective, still requires separate hyperparameter optimization for each model, often relying on coherence scores or literature recommendations.
  • Distinguishing $\beta$ and $\theta_T$ Performance: The current method evaluates the overall model performance but cannot definitively distinguish whether an improvement stems from better estimation of word probabilities ($\beta$) or better retrieval of topic distributions ($\theta_T$).
  • Future Research: The authors suggest that the pseudo-document simulation approach could be extended to optimize hyperparameters for individual models by directly using the average column correlations of the $O_S$ and $O_T$ matrices. Further research could also explore this method for other types of sparse text data.

Summary updated

BibTeX
@inproceedings{weisser2023pseudo,
  author = {Christoph Weisser and Christoph Gerloff and Anton Thielmann and Andre Python and Arik Reuter and Thomas Kneib and Benjamin Säfken},
  title = {{Pseudo-document simulation for comparing LDA, GSDMM and GPM topic models on short and sparse text using Twitter data}},
  booktitle = {Comput. Stat},
  year = {2023},
  url = {https://openreview.net/forum?id=kJoOqZfsDQ},
}
Figure