Abstract
Neural Topic Models (NTMs) often struggle with "rugged" loss landscapes, leading to sharp minima that hinder generalization. This paper introduces DREAM (Document Representations via Sharpness-Aware Minimization), a novel optimization strategy that leverages Pre-trained Language Models (PLMs) to guide NTMs toward flatter, more robust minima. By adaptively adjusting the optimization neighborhood using Optimal Transport (OT) distance between model outputs and high-quality document clusters, DREAM significantly enhances document representation and topic coherence, particularly in challenging short-text and noisy environments.
Introduction
Modern Neural Topic Models have evolved to incorporate complex architectures and contextual embeddings. However, they frequently converge to "sharp" minima—narrow regions in the loss landscape where small parameter perturbations lead to significant loss increases. Such models often fail to generalize well to unseen data. While Sharpness-Aware Minimization (SAM) has seen success in computer vision, its application to topic modeling remains largely unexplored. This work addresses the gap by introducing an optimization-level improvement tailored for NTMs.
Methodology: The DREAM Framework
The proposed DREAM framework integrates three core components to refine the optimization process:
- Sharpness-Aware Minimization (SAM): Unlike standard gradient descent, SAM seeks regions where the loss is consistently low within a defined neighborhood, favoring "flat" minima.
- Adaptive Neighborhood via Optimal Transport (OT): DREAM employs a pre-trained language model to generate initial document clusters. It then calculates the OT distance between the topic model's predicted distributions and these clusters. This distance dynamically scales the SAM neighborhood radius ($\rho$), using the PLM's semantic knowledge to guide the search for stability.
- Robust Integration (F-SAM and ASAM): To handle gradient noise and parameter scaling issues, DREAM incorporates Friendly-SAM (F-SAM) and Adaptive SAM (ASAM).
The training process involves a warm-up phase with standard gradients followed by the DREAM optimization phase to converge toward flatter minima.
Experimental Setup
The effectiveness of DREAM was evaluated across five datasets, including standard benchmarks (20 News Groups, AGNews, YahooAnswers) and short/noisy datasets (SearchSnippets, GoogleNews). The method was applied to four state-of-the-art NTM baselines: ETM, ECRTM, NeuroMax, and FASTopic.
Results and Discussion
Experimental results demonstrate that DREAM consistently improves model performance across various metrics.
Document Representation and Coherence
DREAM-enhanced models showed marked improvements in Purity and Normalized Mutual Information (NMI). For instance, on the AGNews dataset ($K=50$), the ETM model's NMI increased from 0.224 to 0.303.
Furthermore, improvements in Cv coherence suggest that the resulting topics are more semantically meaningful.
Robustness to Noisy Data
A key strength of DREAM is its performance on short and noisy datasets like SearchSnippets. By acting as a powerful regularizer, the optimization strategy helps the model learn meaningful representations even when word co-occurrence data is sparse.
Trade-offs and Limitations
While DREAM improves coherence and representation, it occasionally leads to a slight decrease in Topic Diversity (TD), indicating that topics may become more similar as they align with document clusters. Additionally, the computational cost is higher; training with DREAM takes roughly twice as long due to the additional gradient calculations required by SAM.
Conclusion
DREAM represents a significant step forward in NTM optimization. By treating the geometry of the loss landscape as a first-class citizen and leveraging PLMs as optimization guides, it enables models to find flatter minima that generalize better across diverse and noisy text corpora. Future work will explore extending this approach to dynamic topic modeling environments.
Summary updated