Skip to main content
QUICK REVIEW

[Paper Review] Topic Modeling with Contextualized Word Representation Clusters

Laure Thompson, David Mimno|arXiv (Cornell University)|Oct 23, 2020
Topic ModelingComputer Science45 references13 citations
TL;DR

This paper proposes a simple method to extract topic models from contextualized word representations by clustering token-level embeddings from models like BERT and GPT-2. It demonstrates that these clusterings produce topic models comparable to or better than LDA, capturing polysemy and enabling interpretable, document-grounded analysis with minimal additional computation.

ABSTRACT

Clustering token-level contextualized word representations produces output that shares many similarities with topic models for English text collections. Unlike clusterings of vocabulary-level word embeddings, the resulting models more naturally capture polysemy and can be used as a way of organizing documents. We evaluate token clusterings trained from several different output layers of popular contextualized language models. We find that BERT and GPT-2 produce high quality clusterings, but RoBERTa does not. These cluster models are simple, reliable, and can perform as well as, if not better than, LDA topic models, maintaining high topic quality even when the number of topics is large relative to the size of the local collection.

Motivation & Objective

  • To explore whether token-level clustering of contextualized word representations can produce topic models equivalent to traditional LDA.
  • To evaluate the performance of different contextualized language models—BERT, GPT-2, and RoBERTa—in generating meaningful topic clusters.
  • To demonstrate that such clusterings are grounded in document context and support practical corpus analysis tasks like topic tracking and aspect detection.
  • To show that this method requires no additional training or complex modeling, making it accessible for researchers already using BERT-style models.
  • To identify limitations in RoBERTa’s output despite its architectural similarity to BERT, suggesting deeper differences in representation learning.

Proposed method

  • Apply k-means clustering to token-level contextualized word embeddings extracted from the final layer of BERT, GPT-2, and RoBERTa.
  • Use the resulting cluster assignments as topic labels, where each cluster represents a distinct semantic theme or topic.
  • Evaluate topic quality using interpretability, polysemy capture, and downstream analysis tasks such as topic prevalence over time or across document categories.
  • Perform post-hoc analysis by counting token assignments per cluster within predefined document partitions (e.g., product categories, years) to estimate topic prominence.
  • Use entropy-based metrics to identify topics that are not strongly associated with any single category, indicating nuanced or subjective themes.
  • Compare the performance of the cluster-based topic models against standard LDA using qualitative and quantitative measures on English text collections.

Experimental results

Research questions

  • RQ1Can token-level clustering of contextualized word embeddings produce topic models that are functionally and qualitatively similar to LDA?
  • RQ2How do different contextualized language models—BERT, GPT-2, and RoBERTa—perform in generating interpretable and semantically coherent topic clusters?
  • RQ3To what extent can these clusterings capture polysemy and contextual variation, such as the multiple senses of 'land' as a verb or noun?
  • RQ4Can the resulting topic models be used effectively for practical corpus analysis tasks like tracking topic trends over time or identifying aspects in product reviews?
  • RQ5Why does RoBERTa produce lower-quality clusters compared to BERT and GPT-2 despite similar architecture and pretraining objectives?

Key findings

  • BERT and GPT-2 produce high-quality topic clusterings that capture both polysemy and syntactic variation, such as the different senses of 'land' as a verb or noun.
  • RoBERTa, despite its architectural similarity to BERT, produces significantly lower-quality clusters, often resulting in very small, specific, or uninterpretable topics.
  • The cluster-based topic models maintain high topic quality even with a large number of topics (e.g., K=500), outperforming or matching LDA in interpretability and coherence.
  • Token-level clustering of contextualized embeddings enables practical analysis tasks such as topic prevalence estimation across product categories and time series tracking over years.
  • Topics with low entropy across categories—such as 'overkill', 'possibilities', and 'time periods'—represent subtle, subjective, or discourse-level themes that are not captured by standard stopword filtering.
  • The method requires no additional training or complex inference; it leverages existing BERT-style workflows, making it a plug-and-play alternative to LDA for researchers already using contextualized models.

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.