Introduction
Energy-based models (EBMs) offer an incredibly flexible approach to distribution parametrization by assigning an unnormalized "energy" score to every possible state. However, they are notoriously difficult to train due to their intractable normalization constant, known as the partition function. To address this, researchers have introduced Pseudo-Spherical Contrastive Divergence (PS-CD), a novel training algorithm that leverages a special class of mathematical scoring rules to completely bypass the partition function. This approach enables stable, flexible, and highly robust EBM training without the need for complex adversarial optimization.
The Challenge of Training EBMs
To convert the unnormalized energies of an EBM into true probabilities, the model must divide by the sum of all possible states—the partition function. Because computing this integral is generally impossible for high-dimensional data like images, direct Maximum Likelihood Estimation (MLE) is computationally infeasible.
The standard workaround is Contrastive Divergence (CD), which approximates MLE by minimizing the Kullback-Leibler (KL) divergence between the data distribution and the model distribution. However, MLE is not always optimal: it can be highly sensitive to noisy data (outliers) and forces a rigid trade-off between generating diverse samples and high-quality samples. Recent attempts to resolve this, such as $f$-EBMs, allow for different divergence measures but rely on adversarial (minimax) training, which is notoriously unstable and computationally expensive. The primary motivation behind PS-CD is to train EBMs with flexible objectives without the computational overhead of minimax optimization or the need to calculate the partition function.
Proposed Method: PS-CD
The authors draw inspiration from statistical decision theory, specifically utilizing strictly proper homogeneous scoring rules.
- Strictly proper indicates that the scoring rule is uniquely minimized when the model's distribution perfectly matches the true data distribution.
- Homogeneous means that scaling the model's distribution by a positive constant does not change the score.
This homogeneity is the core mechanism of the proposed method: because the intractable partition function acts merely as a scaling constant, a homogeneous scoring rule effectively ignores it.
The PS-CD algorithm optimizes a family of these scoring rules parameterized by a value $\gamma$. To make this practically computable via stochastic gradient descent, the authors derive a gradient estimator using self-normalized importance sampling. Consequently, much like standard CD, PS-CD only requires drawing samples from the model itself—typically using Markov Chain Monte Carlo (MCMC) methods like Langevin dynamics—to update the weights. No auxiliary networks or adversarial training loops are required.
Key Insights and Advantages
- A Mathematical Bypass: By leveraging homogeneous scoring rules, PS-CD provides a principled way to evaluate unnormalized models, elegantly sidestepping the partition function without complex architectural changes.
- Generalizing Contrastive Divergence: PS-CD serves as a generalization of standard CD. As the hyperparameter $\gamma$ approaches 0, the PS-CD objective mathematically recovers standard Contrastive Divergence (KL divergence).
- Modeling Flexibility: By adjusting $\gamma$, practitioners can easily tune the model's inductive bias—such as prioritizing high-fidelity samples versus diverse mode coverage—without altering the training cost or architecture.
- Inherent Robustness: Pseudo-spherical scoring rules are theoretically known to be robust to heavy data contamination. The authors demonstrate that this translates to deep EBMs: PS-CD can learn the true underlying distribution even when a significant portion of the training data is corrupted.
Experimental Results
The authors evaluated PS-CD across synthetic datasets (for mode coverage and density estimation), image generation benchmarks (MNIST, CIFAR-10, CelebA), and Out-of-Distribution (OOD) detection tasks.
- Improved Image Quality: On conditional CIFAR-10, PS-CD ($\gamma = -0.5$) achieved a Fréchet Inception Distance (FID) of 27.95, significantly outperforming standard CD (37.90) and recent $f$-EBMs (which peaked at 30.86). On unconditional CelebA (64x64), PS-CD achieved an FID of 20.35, compared to CD's 26.10.
- Extreme Robustness to Contamination: In a synthetic Gaussian experiment where 20% of the training data was replaced with outliers, standard CD failed entirely, with the KL divergence to the true target degrading to 0.3869. In contrast, PS-CD ($\gamma = 1.0$) effectively ignored the noise, maintaining a near-perfect KL divergence of 0.0000064.
- OOD Detection: PS-CD consistently outperformed standard CD and other likelihood-based models at detecting out-of-distribution samples across various benchmarks, including SVHN and Texture datasets.
Limitations and Future Directions
While PS-CD offers significant improvements, it shares a limitation with standard CD: a reliance on MCMC methods (like Langevin dynamics) to draw samples during training. MCMC can be slow and often suffers from poor mixing, potentially getting stuck in local energy minima. Furthermore, while PS-CD vastly improves upon standard EBM training, it does not yet surpass the absolute state-of-the-art in image generation, such as advanced score-based models with carefully tuned noise schedules. Future work may focus on integrating PS-CD with recent advances in unbiased MCMC sampling to further enhance performance, scalability, and stability.
Summary updated