TL;DR
Pseudo-Spherical Contrastive Divergence (PS-CD) is a new framework for training Energy-Based Models (EBMs) that generalizes standard Contrastive Divergence. By leveraging "homogeneous scoring rules," the method bypasses the intractable partition function without requiring the unstable minimax optimization typical of adversarial approaches, offering better sample quality and significantly higher robustness to noisy data.
What Problem Does This Paper Address?
Energy-Based Models (EBMs) are highly flexible because they represent probability distributions through an unnormalized energy function. However, this flexibility comes with a major catch: to turn energy into a valid probability, you need to divide by a "partition function" ($Z_\theta$), which involves an integral over the entire input space. For high-dimensional data like images, this integral is impossible to compute exactly.
The standard workaround is Contrastive Divergence (CD), which estimates the gradient of the Maximum Likelihood objective using MCMC samples. While effective, CD is essentially "one-size-fits-all." Researchers often want to optimize different objectives (like $f$-divergences) to trade off sample diversity and quality. Previous attempts to do this required "minimax" training—essentially a game between two neural networks—which is notoriously unstable and computationally expensive. The authors sought a way to gain this modeling flexibility for EBMs without the headache of adversarial training.
Methods
The authors introduce Pseudo-Spherical Contrastive Divergence (PS-CD). The core innovation lies in using a family of strictly proper homogeneous scoring rules.
- Strictly Proper: This ensures that the objective is only maximized when the model distribution perfectly matches the data distribution.
- Homogeneous: This is the "magic" property. A homogeneous scoring rule yields the same value even if the model is scaled by a constant. Because the partition function $Z_\theta$ is just a constant scale factor, it simply cancels out during the calculation.
The resulting algorithm looks very similar to standard CD but introduces a hyperparameter $\gamma$. When $\gamma \to 0$, the method recovers standard CD. For other values, it introduces a self-normalized importance weighting term in the gradient update. This allows practitioners to change the training objective simply by changing $\gamma$, with zero additional computational overhead.
Datasets
The authors evaluated PS-CD across a variety of benchmarks:
- Synthetic 1D & 2D Data: Including complex geometries like "Swiss Roll," "Moon," "Mixture of Gaussians," and "Rings" to test modality and geometry capture.
- Image Datasets: MNIST, CIFAR-10 ($32 \times 32$), and CelebA ($64 \times 64$).
- Contaminated Data: Synthetic Gaussian datasets and CIFAR-10 injected with varying ratios of uniform noise to test robustness.
- OOD Detection: Using SVHN, Textures, and CelebA as out-of-distribution targets for a model trained on CIFAR-10.
Key Insights and Ideas
- Geometric Learning: The "spherical" case ($\gamma=1$) has a beautiful geometric interpretation: it minimizes the angle between the model distribution and the data distribution in function space.
- The $\gamma$ Knob: The parameter $\gamma$ acts as a steering wheel for inductive bias. The authors found that different $\gamma$ values allow a model to prioritize either "Density" (high fidelity/quality) or "Coverage" (diversity/mode-seeking).
- Inherent Robustness: One of the most striking findings is that PS-CD is naturally robust to outliers. Because the gradient update involves a weighting term based on energy, the model can "recognize" contaminated noise samples as high-energy outliers and effectively ignore them during the update.
- No More Minimax: Unlike $f$-EBMs, which require a variational auxiliary function and unstable adversarial training, PS-CD achieves similar flexibility using a simple, closed-form gradient estimator.
Key Results
- Sample Quality: On CIFAR-10, PS-CD achieved an FID score of 27.95 ($\gamma = -0.5$), significantly outperforming standard CD (37.90). On CelebA, it improved FID from 26.10 (CD) to 20.35.
- Robustness to Noise: In experiments with data contamination, standard CD failed completely when 5% of the data was noise. In contrast, PS-CD remained stable and accurate even when up to 30% of the training data was pure noise.
- OOD Detection: PS-CD consistently outperformed CD and other likelihood-based models (like Glow or PixelCNN++) in identifying out-of-distribution samples, showing that the learned energy landscape is more reliable.
Limitations and Future Work
- MCMC Dependency: Like CD, PS-CD still relies on MCMC sampling (Langevin dynamics) to generate samples during training. This remains the primary computational bottleneck and can be slow.
- Hyperparameter Tuning: The relationship between $\gamma$ and specific evaluation metrics (like Precision vs. Recall) is not always monotonic, meaning some trial-and-error is required to find the "best" $\gamma$ for a specific task.
- Comparison to SOTA: While PS-CD beats standard CD, it does not yet outperform specialized score-based generative models (like NCSNv2) that use advanced noise-conditional architectures. The authors suggest that combining PS-CD with these advanced architectures is a promising next step.
Summary updated