Skip to main content
QUICK REVIEW

[Paper Review] Improving Contextualized Topic Models with Negative Sampling

Suman Adhya, Avishek Lahiri|arXiv (Cornell University)|Mar 27, 2023
Topic ModelingComputer Science3 citations
TL;DR

This paper proposes CTM-Neg, a negative sampling technique for contextualized topic models that improves topic coherence by using triplet loss to ensure reconstructed documents from correct topic vectors are similar to input documents, while those from perturbed topic vectors are dissimilar. The method achieves higher NPMI scores and greater topic diversity than state-of-the-art baselines across three benchmark datasets.

ABSTRACT

Topic modeling has emerged as a dominant method for exploring large document collections. Recent approaches to topic modeling use large contextualized language models and variational autoencoders. In this paper, we propose a negative sampling mechanism for a contextualized topic model to improve the quality of the generated topics. In particular, during model training, we perturb the generated document-topic vector and use a triplet loss to encourage the document reconstructed from the correct document-topic vector to be similar to the input document and dissimilar to the document reconstructed from the perturbed vector. Experiments for different topic counts on three publicly available benchmark datasets show that in most cases, our approach leads to an increase in topic coherence over that of the baselines. Our model also achieves very high topic diversity.

Motivation & Objective

  • To improve topic coherence in contextualized neural topic models by incorporating negative sampling during training.
  • To address the lack of robustness in topic modeling when topic vectors are perturbed, ensuring reconstructed documents diverge meaningfully.
  • To maintain high topic diversity while improving interpretability and quality of generated topics.
  • To develop an unsupervised, automatic negative sampling mechanism compatible with variational autoencoder-based topic models.
  • To evaluate the method on multiple datasets and topic counts, demonstrating consistent gains over existing baselines.

Proposed method

  • The model uses a triplet loss framework where the original document is the anchor, the reconstruction from the correct topic vector is the positive sample, and the reconstruction from a perturbed topic vector is the negative sample.
  • During training, the top topic in the document-topic vector is randomly masked or perturbed to generate negative samples.
  • The loss function encourages the reconstructed document from the correct topic vector to be close to the input document in embedding space, while pushing the reconstruction from the perturbed vector away.
  • The model combines a bag-of-words (BoW) representation with a contextualized SBERT embedding, preserving both lexical and semantic information.
  • The encoder maps the document to a latent topic vector, which is then used by the decoder to reconstruct the BoW representation.
  • The negative sampling is applied in an unsupervised manner, without requiring external labels or synthetic noise.
Figure 1: Framework for the contextualized topic model with negative sampling (CTM-Neg).
Figure 1: Framework for the contextualized topic model with negative sampling (CTM-Neg).

Experimental results

Research questions

  • RQ1Can negative sampling improve topic coherence in contextualized topic models without requiring labeled data?
  • RQ2Does introducing a contrastive learning objective via triplet loss enhance the robustness of topic models to topic vector perturbations?
  • RQ3How does the proposed method compare to existing neural topic models in terms of topic coherence and diversity across multiple datasets and topic counts?
  • RQ4Can the model generate more interpretable and focused topics by emphasizing salient words through contrastive training?
  • RQ5Does the method mitigate topic collapse or redundancy issues common in VAE-based topic models?

Key findings

  • CTM-Neg achieves the highest mean NPMI score across all three benchmark datasets, outperforming all baselines in topic coherence.
  • On two of the three datasets, CTM-Neg achieves the highest mean topic diversity (CV), and the second-highest on the third, indicating strong performance in topic variety.
  • The model maintains high topic diversity comparable to other state-of-the-art models, with only one baseline underperforming.
  • Manual analysis shows CTM-Neg generates more coherent and focused topics, avoiding generic or redundant terms like 'model', 'method', or 'analysis' that plague ETM.
  • Topics from CTM-Neg contain more domain-specific, interpretable terms (e.g., 'dna', 'motif', 'hockey', 'baseball') compared to CTM and other baselines.
  • For T=40 topics on the M10 dataset, CTM-Neg produces more logically connected and distinct topics than LDA, despite LDA having higher diversity, showing a trade-off between diversity and coherence that CTM-Neg resolves.
Improving Contextualized Topic Models with Negative Sampling

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.