Energy-Based Models (EBMs) are powerful tools for density estimation, but they are notoriously slow and difficult to train due to their reliance on complex sampling methods. To address this, researchers have introduced the Denoising Diffusion Adversarial EBM (DDAEBM). By embedding an adversarial EBM into a diffusion process, DDAEBM breaks complex generation into smaller, tractable steps. The result is a model that achieves state-of-the-art generation quality among EBMs while retaining a highly useful energy function for tasks like out-of-distribution (OOD) detection.
The Challenge with Energy-Based Models
EBMs learn an unnormalized probability distribution—an "energy function"—over a dataset. This function is incredibly useful for downstream tasks like OOD detection and semi-supervised learning. However, training them typically requires Markov Chain Monte Carlo (MCMC) sampling, which is computationally expensive, slow, and unstable.
To bypass MCMC, researchers developed Adversarial EBMs, which introduce a generator network (similar to a GAN) to approximate the distribution. While faster, Adversarial EBMs introduce new headaches:
- Instability: The minimax game between the generator and the energy function is hard to balance.
- Mode Collapse: They typically use asymmetric KL divergence for training, forcing the generator to chase major data modes and ignore others.
- Intractable Math: Optimizing the generator requires calculating an entropy term that is mathematically intractable.
The DDAEBM Approach
The authors tackle these gaps by asking: How can we achieve the fast, MCMC-free sampling of adversarial EBMs without sacrificing training stability, generation quality, or the usefulness of the learned energy function? Their proposed DDAEBM relies on three key innovations:
- Diffusion Framework (Divide and Conquer): Instead of forcing the EBM to learn a massive, complex data distribution all at once, DDAEBM embeds a sequence of conditional EBMs into a denoising diffusion process. By adding noise and learning to denoise it over several steps, the target distribution for each step becomes much simpler and less multi-modal.
- Symmetric Jeffrey Divergence: To fix the mode collapse caused by standard KL divergence, the authors train the generator using a symmetric Jeffrey divergence (combining both KL and reverse KL divergence). This forces the generator to better match the entire energy distribution, not just the peaks.
- Variational Posterior for Entropy: To solve the intractable entropy calculation required to optimize the generator, they introduce a variational posterior distribution via an encoder network. This provides a tractable mathematical upper bound, allowing the model to be trained efficiently.
Key Results and Insights
The authors evaluated DDAEBM across a wide range of complexities, from 2D toy datasets to high-resolution images.
- Perfect Mode Coverage: As seen in the 2D toy datasets and confirmed on the StackedMNIST benchmark, DDAEBM successfully covers all target modes. On StackedMNIST, it covered all 1,000 modes and achieved the lowest KL divergence (0.033) compared to baselines like VAEBM and DDGAN. Switching to Jeffrey divergence is the "secret sauce" that stops the generator from dropping modes.
- Image Generation: DDAEBM achieved a Fréchet Inception Distance (FID) of 4.82 and an Inception Score (IS) of 8.86 on CIFAR-10, outperforming existing adversarial EBMs by a wide margin. Adding a single MCMC denoising step further improved the FID to 3.73, putting it on par with strong diffusion baselines.
- High-Resolution Scaling: The model successfully scaled to the 128x128 LSUN Church dataset with an FID of 13.80, proving the method works on complex, higher-dimensional data.
- OOD Detection: Unlike models like DDGAN where the "discriminator" only classifies real vs. fake images, DDAEBM's energy function is a true density estimator. It learns the actual shape of the data distribution, effectively distinguishing in-distribution (CIFAR-10) from out-of-distribution data (SVHN) with an AUROC of 0.83.
Limitations and Future Work
While highly effective, DDAEBM has a few limitations. The model performs best with a small number of diffusion steps (specifically $T=4$). Increasing the number of steps degrades generation quality, likely because a higher-capacity energy function is required to accommodate the extra steps. Additionally, while DDAEBM converges in fewer overall epochs than DDGAN, the complex objective function means its per-epoch training speed is slower.
Ultimately, providing a stable, MCMC-free energy function opens the door for using this framework in a wider range of downstream applications beyond just generation and OOD detection, such as semi-supervised learning or compositional generation.
Summary updated