Graph Contrastive Topic Model

Zheheng Luo, Lei Liu, Sophia Ananiadou, Qianqian Xie · DOI

TL;DR

The Graph Contrastive Topic Model (GCTM) fixes a major flaw in how neural topic models learn: "sample bias." By leveraging graph neural networks and word co-occurrence patterns, GCTM generates high-quality positive and negative samples that are semantically distinct, leading to more coherent topics and better document representations than previous state-of-the-art models.

What Problem Does This Paper Address?

Neural Topic Models (NTMs) aim to discover the underlying "themes" or "topics" in a collection of documents. Recently, researchers started using Contrastive Learning (CL) to help these models. In CL, the model is taught to pull "positive" samples (similar documents) closer together in mathematical space and push "negative" samples (dissimilar documents) further apart.

However, existing NTMs suffer from sample bias. They usually create negative samples by simply removing high-frequency words. The problem? A sports article is still a sports article even if you remove the word "soccer." These "false negatives" confuse the model. The authors argue that a truly beneficial negative sample should contain words that are semantically irrelevant to the original document, not just less frequent.

Methods

GCTM moves away from simple word-frequency swapping and instead treats topic modeling as a graph problem. The architecture consists of several key components:

  1. Graph Construction:
    • Document-Word Bipartite Graph (DWBG): Maps which words appear in which documents.
  2. Word Co-occurrence Graphs (WCGs): The authors build two global graphs based on Normalized Pointwise Mutual Information (NPMI). A Positive WCG ($W^+$) connects words that often appear together, while a Negative WCG ($W^-$) connects words that rarely or never appear together.
  3. Document-Word Information Propagation (DWIP):
    • The model uses Graph Convolutional Networks (GCNs) to "hop" through these graphs. By propagating information through the $W^+$ and $W^-$ graphs, the model can identify words that are distantly related (for positive samples) or fundamentally irrelevant (for negative samples).
  4. Contrastive Learning Framework:
    • The model generates "instructive" samples via edge perturbation on the DWBG.
  5. It uses SBERT (Sentence-BERT) to provide rich contextual embeddings, ensuring the model understands the sequence and syntax that Bag-of-Words (BoW) models miss.
  6. Mathematical Unification:
    • The authors provide a theoretical proof showing that their Graph Contrastive Learning approach can be interpreted as a structured variational graph auto-encoder (VGAE), which explains why it is more effective at modeling the topic posterior than standard VAEs.

Datasets

The model was evaluated on three standard benchmarks:

  • 20 Newsgroups (20NG): A collection of ~18,000 newsgroup posts across 20 topics.
  • IMDB: 50,000 movie reviews for sentiment and topic analysis.
  • NIPS: Over 5,000 papers from the Neural Information Processing Systems conference (1987-2017).

Key Insights and Ideas

  • Solving the Similarity Trap: In previous models (like CLNTM), the "negative" samples were 95% similar to the original document. GCTM reduces this similarity to ~10%, ensuring the model actually learns what a "different" topic looks like.
  • Multi-hop Wisdom: By using GCNs, the model doesn't just look at words in the current document; it looks at the global "social network" of words. This allows it to find latent correlations that aren't explicitly written in the text.
  • The "Aha" Moment on Negatives: The most beneficial negative samples aren't just "not the original"; they are "actively uncorrelated." Including words that are semantically opposite or irrelevant provides a much stronger training signal.

Key Results

GCTM outperformed existing state-of-the-art (SOTA) models across the board:

  • Topic Coherence (NPMI): GCTM achieved significantly higher coherence scores. For example, on the 20NG dataset ($k=50$), GCTM scored 0.379, beating the previous best of 0.353 (SCHOLAR+BAT).
  • Text Classification: When the learned topic representations were used to classify documents, GCTM reached an accuracy of 0.543 on 20NG, compared to 0.486 for standard CLNTM.
  • Qualitative Clarity: In case studies, GCTM produced "cleaner" topics. While other models mixed unrelated terms (like putting "mead" in a topic about computer chips), GCTM’s topics remained strictly on-theme.

Limitations and Future Work

  • GCN Over-smoothing: The authors found that using more than two GCN layers actually hurt performance. This is a common issue in graph networks where too much message passing makes all node representations look the same (noise).
  • Loss Function Redundancy: The current model uses both a traditional NTM loss and a Contrastive loss. The authors suggest that in the future, the contrastive loss might be powerful enough to handle the learning process entirely on its own.
  • Computational Overhead: While not explicitly detailed as a failure, building global word co-occurrence graphs for massive datasets (millions of documents) could present a scaling challenge.

Summary updated

BibTeX
@article{luo2024graph,
  author = {Zheheng Luo and Lei Liu and Sophia Ananiadou and Qianqian Xie},
  title = {{Graph Contrastive Topic Model}},
  journal = {Expert Systems with Applications},
  year = {2024},
  doi = {10.1016/j.eswa.2024.124631},
}
Figure