Enhancing Short-Text Topic Modeling with LLM-Driven Context Expansion and Prefix-Tuned VAEs

Pritom Saha Akash, Kevin Chen-Chuan Chang

Introduction

Topic modeling serves as a cornerstone for discovering latent themes within large document collections. However, traditional methods like Latent Dirichlet Allocation (LDA) rely heavily on word co-occurrence patterns, which are notoriously sparse in short-text formats such as news headlines, tweets, and search snippets. In these contexts, documents often contain fewer than ten words, providing insufficient statistical signals for standard models to generate coherent topics.

To address this, researchers have recently explored using Large Language Models (LLMs) to expand short texts into richer, more descriptive documents. While promising, this approach introduces significant challenges: LLMs can introduce "semantic drift" by hallucinating irrelevant information, and the computational latency of calling an LLM during inference makes real-time applications impractical. This paper introduces the Prefix-tuned Variational Topic Model (PVTM), a framework designed to harness the power of LLM expansion while maintaining efficiency and semantic integrity.

The PVTM Framework

PVTM addresses the limitations of short-text modeling through a two-stage process that separates the high-cost LLM expansion from the high-speed topic inference.

1. Offline Text Expansion

During the training phase, the model utilizes an off-the-shelf LLM (such as T5-XXL or LLaMA2) to expand the original short texts into detailed paragraphs. This process acts as a proxy for human background knowledge, filling in the conceptual gaps that the short text leaves open. Because this step is performed offline, it does not impact the speed of the model during deployment.

2. Asymmetric Prefix-Tuned VAE

The core innovation of PVTM lies in its Variational Autoencoder (VAE) architecture. Unlike standard VAEs that reconstruct their own input, PVTM employs an asymmetric input/output strategy:

  • Input: The original short text is encoded using a pre-trained language model (like SBERT).
  • Output Target: The model is tasked with reconstructing the Bag-of-Words (BoW) representation of the expanded LLM-generated text.

To optimize this process, the authors use Prefix Tuning, a parameter-efficient fine-tuning method. Instead of updating the entire encoder, the model prepends trainable vectors to the transformer layers. This allows the model to map the sparse short-text input to the rich latent space of the expanded context without being forced to ingest potentially noisy or "hallucinated" LLM features directly as input. The short text acts as a semantic anchor, ensuring the model remains grounded in the original intent.

Experimental Results

The authors evaluated PVTM against a wide array of baselines, including traditional LDA, neural models like ProdLDA and CTM, and state-of-the-art short-text models like TSCTM. Testing was conducted on three sparse datasets: TagMyNews (avg. 5.78 words), Google News (avg. 6.11 words), and StackOverflow (avg. 4.49 words).

Topic Coherence and Diversity

PVTM demonstrated superior performance in generating meaningful and distinct topics. On the TagMyNews dataset with 20 topics, PVTM achieved a Topic Coherence ($C_V$) score of 0.632, outperforming CTM (0.618) and significantly surpassing standard LDA (0.399). Furthermore, the model consistently achieved near-perfect Topic Diversity (IRBO) scores of 1.000, indicating that the topics generated are unique and do not overlap redundantly.

Downstream Classification

To test the utility of the learned representations, the authors used the topic distributions as features for text classification. PVTM outperformed all competitors in this arena. On the StackOverflow dataset, PVTM reached a classification accuracy of 0.825 using an SVM classifier, a substantial improvement over ProdLDA (0.672) and CTM (0.656). This suggests that the latent space learned by PVTM captures more discriminative information than models relying solely on the original sparse text.

Conclusion

PVTM represents a significant step forward in short-text topic modeling. By leveraging LLMs for offline expansion and employing an asymmetric, prefix-tuned VAE, the model successfully bridges the gap between sparse data and rich semantic understanding. This approach eliminates the latency of LLM calls at inference time and mitigates the risks of semantic drift.

While the model is highly effective, the authors note that its performance is still somewhat dependent on the quality of the LLM's expansion. In highly specialized domains where general-purpose LLMs might struggle, the risk of noise remains. Future research will likely focus on domain-specific expansion and more granular control over the generation process to ensure that the expanded context remains strictly relevant to the target domain.

Summary updated

BibTeX
@inproceedings{akash2024enhancing,
  author = {Pritom Saha Akash and Kevin Chen-Chuan Chang},
  title = {{Enhancing Short-Text Topic Modeling with LLM-Driven Context Expansion and Prefix-Tuned VAEs}},
  booktitle = {Conference on Empirical Methods in Natural Language Processing},
  year = {2024},
  doi = {10.18653/v1/2024.findings-emnlp.917},
}
Figure