Introduction
Topic modeling is a fundamental technique in natural language processing (NLP) used to discover latent thematic structures in large document collections. While Latent Dirichlet Allocation (LDA) has long been the standard, its reliance on complex mathematical derivations for model variations has led to the rise of Neural Topic Models (NTMs). However, NTMs often struggle with capturing the sparse, "spiky" nature of topic distributions and frequently lack efficient inference mechanisms. This paper introduces the Bidirectional Adversarial Topic (BAT) model, which leverages the flexibility of neural networks and the strengths of Dirichlet priors within a Generative Adversarial Network (GAN) framework.
The Challenges of Neural Topic Modeling
Traditional NTMs, typically based on Variational Autoencoders (VAEs), face two primary hurdles:
- Prior Mismatch: Most VAE-based models use Gaussian or Logistic-Normal distributions as priors. Unlike the Dirichlet distribution used in LDA, these distributions fail to concentrate probability mass at the vertices of the simplex, making it difficult to model documents that belong strongly to a few specific topics.
- Inference Limitations: Previous adversarial topic models could generate words from topics but struggled with the inverse task—inferring topic distributions for unseen documents—limiting their utility for downstream tasks like clustering.
The BAT Framework
To address these issues, the authors propose the BAT model, inspired by Bidirectional GANs (BiGAN). The model consists of three components: an Encoder ($E$), a Generator ($G$), and a Discriminator ($D$).
In this setup, the Encoder maps real documents to latent topic distributions, while the Generator produces "fake" documents from sampled Dirichlet priors. The Discriminator is trained to distinguish between (Real Document, Inferred Topic) pairs and (Generated Document, Sampled Topic) pairs. This bidirectional objective forces the Encoder and Generator to become approximate inverses, enabling both effective generation and robust inference.
Key Insights: The Importance of the Simplex
A core contribution of this work is the explicit use of a Dirichlet prior. As shown in the comparison below, the Logistic-Normal distribution tends to cluster in the center of the simplex, representing a "mushy" average of topics. In contrast, the Dirichlet distribution exhibits peaks at the vertices, better reflecting the reality that documents are typically focused on a small subset of topics.
Gaussian-BAT: Leveraging Semantic Embeddings
The authors further extend the model into Gaussian-BAT. While the standard BAT treats words as discrete indices, Gaussian-BAT models each topic as a multivariate Gaussian distribution within a pre-trained word embedding space (e.g., GloVe). This allows the model to capture semantic relationships between words (like "doctor" and "physician") even if they do not frequently co-occur in the training set, significantly improving performance on smaller or more specialized datasets.
Results and Discussion
The BAT models were evaluated on the 20Newsgroups, Grolier, and NYTimes datasets.
- Topic Coherence: Both BAT and Gaussian-BAT consistently outperformed baselines such as LDA and ProdLDA across multiple metrics (C_P, NPMI, etc.).
- Text Clustering: Gaussian-BAT achieved a state-of-the-art clustering accuracy of 41.25% on 20Newsgroups, a nearly 6% improvement over traditional LDA (35.36%).
- Qualitative Analysis: Topics generated by BAT were found to be more focused, with fewer irrelevant "out-of-topic" words compared to traditional methods.
While the model shows great promise, the authors note that performance can dip slightly when the number of topics is very high (e.g., 100+), suggesting a trade-off between model complexity and granularity. Future work includes exploring correlated topic models and nonparametric extensions to automatically determine the optimal number of topics.
Summary updated