Abstract
The Replicated Softmax Model (RSM) is a powerful undirected topic model for extracting semantic representations of documents. However, traditional learning strategies like Contrastive Divergence (CD) are computationally inefficient due to the need for Gibbs sampling over large vocabularies. This paper introduces $\alpha$-NCE, a novel estimator based on Noise Contrastive Estimation (NCE), extended to handle documents of varying lengths and weighted inputs. Experimental results on benchmark datasets demonstrate that $\alpha$-NCE achieves up to a 500x speedup over standard methods while maintaining or improving accuracy in document retrieval and classification tasks.
Introduction
Topic models are essential for uncovering latent themes in large text corpora. While directed models like Latent Dirichlet Allocation (LDA) are widely used, undirected models like the Replicated Softmax Model (RSM) often provide superior semantic representations. Despite their power, RSMs suffer from extreme training latency. Calculating document probabilities requires summing over an astronomical number of word combinations, a process that becomes a bottleneck as vocabulary sizes grow. Standard training algorithms like Contrastive Divergence (CD) rely on Gibbs sampling, which scales poorly. This research proposes $\alpha$-NCE to make these models practical for large-scale, real-world applications.
Methodology
The proposed $\alpha$-NCE estimator builds upon Noise Contrastive Estimation (NCE) by reframing density estimation as a classification task: distinguishing "real" data from generated "noise."
Key Innovations
- Partial Noise Sampling (PNS): Instead of generating entirely random noise documents, the authors replace a fraction ($\alpha$) of a real document's words with noise. This increases the difficulty of the classification task, forcing the model to learn more nuanced semantic features.
- Uniform Contrastive Estimate (UCE): To address the bias introduced by varying document lengths, UCE averages modeling ability at the word level, ensuring stable training across documents of different sizes.
- Weighted Inputs: The method incorporates $idf$ (inverse document frequency) weighting, allowing the model to prioritize rare, informative words over common ones, which significantly enhances performance.
Experimental Results
The researchers evaluated $\alpha$-NCE on the 20 Newsgroups and IMDB datasets, focusing on document retrieval, classification, and sentiment analysis.
Computational Efficiency
A primary advantage of $\alpha$-NCE is its scalability. While the computation time for Contrastive Divergence increases exponentially with vocabulary size, the running time for $\alpha$-NCE remains relatively flat. This leads to a speedup of 10x to 500x compared to CD, making it viable for modern NLP tasks with massive vocabularies.
Performance and Parameter Sensitivity
The model's performance is sensitive to the noise level $\alpha$. If $\alpha$ is too low, the classification task is trivial; if it is too high, the model fails to converge. The authors identified a "sweet spot" for $\alpha$ typically between 0.3 and 0.5. When properly tuned, $\alpha$-NCE variants consistently outperform CD in retrieval tasks (MAP) and classification accuracy.
On the IMDB sentiment analysis task, an RSM trained with $\alpha$-NCE achieved 87.81% accuracy, surpassing both standard LDA (67.42%) and the CD-trained RSM (86.22%).
Conclusion
$\alpha$-NCE provides a highly efficient and accurate alternative for training undirected topic models. By addressing the computational bottlenecks of Gibbs sampling and the biases of document length, it enables the use of powerful models like RSM on large-scale datasets. Future work may involve automating the selection of the noise parameter $\alpha$ and extending the estimator to models that incorporate word order and syntax.
Summary updated