Abstract
Training generative models to sample from unnormalized density functions is an important and challenging task in machine learning. Traditional training methods often rely on the reverse Kullback-Leibler (KL) divergence due to its tractability. However, the mode-seeking behavior of reverse KL hinders effective approximation of multi-modal target distributions. To address this, we propose to minimize the reverse KL along diffusion trajectories of both model and target densities. We refer to this objective as the reverse diffusive KL divergence, which allows the model to capture multiple modes. Leveraging this objective, we train neural samplers that can efficiently generate samples from the target distribution in one step. We demonstrate that our method enhances sampling performance across various Boltzmann distributions, including both synthetic multi-modal densities and n-body particle systems.
Introduction
In fields like Bayesian statistics and statistical mechanics, the primary challenge is often sampling from "unnormalized" distributions. While we may know the energy function of a state—which defines its relative likelihood—the total scaling factor, or partition function, remains unknown.
Traditional methods like Markov Chain Monte Carlo (MCMC) are considered the gold standard but suffer from significant latency in high-dimensional spaces or when the distribution contains multiple modes separated by low-probability regions. Neural samplers offer a faster alternative but are typically trained using the Reverse Kullback-Leibler (KL) divergence. This objective is notoriously "mode-seeking"; if a target distribution has multiple peaks, a model trained this way will likely collapse onto a single mode, failing to capture the full diversity of the distribution.
Methodology
The Core Idea: Noise as a Bridge
To overcome mode collapse, we introduce the Reverse Diffusive KL Divergence (DiKL). Instead of comparing the model and target densities directly, DiKL compares them after convolving both with Gaussian noise (diffusion).
At high noise levels, separate modes "blur" together into a single, uni-modal distribution, allowing the model to learn the global structure. At lower noise levels, the model refines the fine details of each peak. By integrating the KL divergence across a range of noise levels, the model is forced to be "mass-covering" rather than just mode-seeking.
Tractable Training
Training with DiKL is challenging because we lack samples from the target distribution. We employ a nested training loop:
- Score Estimation: A separate score network is trained to estimate the gradient of the model’s own noisy density using Denoising Score Matching (DSM).
- Sampler Update: The neural sampler is updated using a novel gradient estimator called the Mixed Score Identity (MSI). This allows the target's energy function to guide the sampler toward the noisy target density without requiring pre-existing samples.
Analysis of the Objective
The effectiveness of DiKL can be understood by examining the optimization landscape. As shown below, higher noise levels transform a complex, multi-modal KL landscape into a simpler, uni-modal one.
Experimental Results
We evaluated DiKL on several challenging benchmarks, including a synthetic mixture of 40 Gaussians (MoG-40) and a 32-dimensional system with over 4 billion modes (Many-Well-32). For physical n-body systems like DW-4 and LJ-13, we utilized Equivariant Graph Neural Networks (EGNNs) to ensure the sampler respects physical symmetries.
- Superior Mode Coverage: On MoG-40, DiKL successfully captured all 40 modes with correct weights, whereas standard KL methods collapsed to a single mode.
- Increased Accuracy: On Many-Well-32, DiKL achieved a significantly lower Energy Total Variation Distance (0.167) compared to state-of-the-art methods like iDEM (0.197) and FAB (0.224).
- Efficiency: DiKL converged in just 0.9 hours on the DW-4 task (compared to 4.5 hours for competitors). Furthermore, as a one-step generator, it is approximately 1,000x faster at inference time than multi-step diffusion-based samplers.
Discussion and Conclusion
While DiKL demonstrates exceptional performance, it has limitations. As an implicit generator, it does not provide an analytical formula for density, making importance re-weighting difficult. Additionally, on extremely complex landscapes like LJ-55, one-step generation begins to struggle, suggesting that future work could combine DiKL with multi-step transport methods. Despite these challenges, DiKL represents a significant step forward in training efficient, mass-covering neural samplers for complex distributions.
Summary updated