Discriminative Neural Topic Models

Gaurav Pandey, Ambedkar DukkipatiarXiv 2017

Abstract: We propose a neural network based approach for learning topics from text and image datasets. The model makes no assumptions about the conditional distribution of the observed features given the latent topics. This allows us to perform topic modelling efficiently using sentences of documents and patches of images as observed features, rather than limiting ourselves to words. Moreover, the proposed approach is online, and hence can be used for streaming data. Furthermore, since the approach utilizes neural networks, it can be implemented on GPU with ease, and hence it is very scalable.

Introduction

Topic modeling is a foundational task in unsupervised machine learning, traditionally dominated by generative models like Latent Dirichlet Allocation (LDA). These models discover latent themes by assuming a specific statistical distribution for how observations (e.g., words) are generated from topics. However, this generative assumption often necessitates complex preprocessing, such as "visual word" quantization for images, which can decouple feature learning from topic discovery.

Researchers from the Indian Institute of Science have introduced Discriminative Neural Topic Models (DNTM), a novel approach that shifts the paradigm from generative to discriminative modeling. By directly estimating the probability of a topic given an observation using neural networks, DNTM enables end-to-end learning for diverse data types, including text and raw image pixels.

The DNTM Framework

Unlike traditional methods that ask "How likely is this word given this topic?", DNTM asks "How likely is this topic given this feature?" using a neural network. The model's training objective is defined by three fundamental pillars:

  1. Confidence (Entropy Minimization): The model is incentivized to assign individual features to a single topic with high certainty, promoting clear cluster boundaries.
  2. Consistency (KL-Divergence): Features belonging to the same document or image are encouraged to share similar topic distributions, leveraging the inherent structure of the data.
  3. Balance (Global Entropy Maximization): To avoid the trivial solution of assigning all data to a single topic, the model encourages a uniform distribution of topics across the entire dataset.

For image data, DNTM integrates a Convolutional Neural Network (CNN) to extract spatial features directly from raw pixels. This allows the model to learn visual features that are specifically optimized for topic discovery. Furthermore, adversarial training is employed to enhance robustness, using a generator to produce "fake" documents that challenge the model's certainty.

Experimental Results

The authors evaluated DNTM on both text (20 Newsgroups) and image (CIFAR-10) benchmarks, demonstrating its versatility and performance.

Text Modeling

On the 20 Newsgroups dataset, DNTM achieved superior performance compared to traditional LDA. The model reached a Purity of 56.5% and a Normalized Mutual Information (NMI) score that outperformed the generative baseline (54.7% Purity). This suggests that the discriminative approach can capture semantic nuances in text more effectively than fixed-distribution generative models.

Visual Topic Discovery

DNTM's ability to perform end-to-end visual topic modeling was tested on the CIFAR-10 dataset. Without any labels, the model successfully clustered images into semantically coherent groups, achieving a mean purity of 49.3%.

Visual topics discovered by DNTM on the CIFAR-10 dataset. The model identifies distinct themes such as domestic animals (Topic 1), frogs (Topic 2), and heavy vehicles (Topic 4).

As illustrated above, the model discovers topics that align well with human intuition, grouping images of similar objects like ships, horses, and various types of vehicles without manual supervision.

Conclusion and Future Work

DNTM offers a scalable, online, and GPU-friendly alternative to traditional topic modeling. By breaking the generative constraint, it allows for seamless integration with deep learning architectures. Current limitations include the assumption of a uniform topic prior and challenges in scaling to high-resolution images. Future research will focus on relaxing the balance constraint to accommodate skewed topic distributions and extending the model to more complex visual datasets.

Summary updated

BibTeX
@misc{pandey2017discriminative,
  author = {Gaurav Pandey and Ambedkar Dukkipati},
  title = {{Discriminative Neural Topic Models}},
  year = {2017},
  eprint = {1701.06796},
  archivePrefix = {arXiv},
  url = {https://arxiv.org/abs/1701.06796},
}
Figure