Abstract
Topic modeling traditionally faces a trade-off between handling sparse short texts and modeling complex distributions in longer documents. This paper introduces GraphBTM, a hybrid approach that leverages Graph Convolutional Networks (GCNs) and neural variational inference. By representing word co-occurrences as graphs and utilizing a "mini-corpus" sampling strategy, GraphBTM extracts coherent topics across varying document lengths. Evaluations on the 20 Newsgroups and a new "All News" dataset show that GraphBTM consistently outperforms existing models like AVITM and LDA in topic coherence.
Introduction
Traditional topic models like Latent Dirichlet Allocation (LDA) often struggle with short texts due to data sparsity, as individual documents lack sufficient word co-occurrence patterns. Conversely, the Biterm Topic Model (BTM) addresses sparsity by aggregating word pairs (biterms) across the entire corpus but assumes a single topic distribution for the whole collection, which is overly restrictive for longer, multi-topic documents. GraphBTM aims to bridge this gap by providing a robust and flexible framework for both sparse and information-rich texts.
Methodology
GraphBTM introduces several key innovations to enhance topic modeling:
- Biterms as Graphs: Word co-occurrences are represented as an undirected graph where nodes are words and edge weights reflect co-occurrence frequency.
- GCN with Residual Connections: A Graph Convolutional Network extracts features from the word graph, capturing transitive relationships (e.g., if word A relates to B and B to C, then A likely relates to C). Residual connections are employed to prevent over-smoothing, ensuring nodes remain distinguishable.
- Mini-Corpus Sampling: To balance local and global contexts, the model samples a small number of documents to form a "mini-corpus" for each training instance.
- Amortized Variational Inference: An inference network (encoder) maps graph embeddings to topic proportions, enabling efficient scaling via an autoencoded structure.
Experimental Setup and Insights
The model was benchmarked on two datasets: 20 Newsgroups (sparse, average 88 words) and All News (longer documents, average 302 words).
Key insights from the experiments include:
- Transitivity as a Densifier: Modeling biterms as a graph allows the GCN to "fill in the blanks" for missing connections, effectively densifying sparse data.
- Optimal Sampling: Experiments revealed that sampling exactly 3 documents for the "mini-corpus" provided the best balance for topic coherence in the 20 Newsgroups dataset. Modeling a single document proved too sparse, while the whole corpus was too rigid.
- Residual Importance: Removing residual connections led to a significant 0.1 drop in performance, highlighting the importance of hierarchical graph features.
Key Results
GraphBTM demonstrated superior performance in topic coherence, a metric measuring the semantic relatedness of top words in a topic.
On the 20 Newsgroups dataset, GraphBTM achieved a coherence score of 0.28, significantly higher than AVITM (0.25) and Online LDA (0.10). Furthermore, the model maintained high performance on the "All News" dataset, proving its robustness to document length and its ability to handle diverse topics within a single instance. Qualitative analysis showed that GraphBTM produces more focused word clusters with less noise compared to baselines.
Conclusion and Future Work
GraphBTM successfully combines the strengths of graph-based feature extraction and neural variational inference. While the computational cost of calculating graph Laplacians for every sample is a current limitation, future work may involve integrating "fastGCN" techniques to improve scalability for massive datasets.
Summary updated