Exploring Bidirectional Bounds for Minimax-Training of Energy-Based Models

Cong Geng, Jia Wang, Li Chen, Zhiyong Gao, Jes Frellsen, Søren Hauberg

Introduction

Energy-Based Models (EBMs) offer a flexible framework for representing probability distributions through a scalar energy function. By defining the probability density as $p(x) \propto \exp(-E(x))$, EBMs avoid the restrictive architectures often required by other generative models. However, training EBMs remains a significant challenge due to the intractability of the partition function—the normalization constant.

Recent advancements have turned to minimax games, where a generator (or proposal distribution) and the energy function are optimized adversarially. While promising, these approaches often suffer from severe instability. This paper identifies a fundamental cause: the reliance on minimizing a variational lower bound of the log-likelihood. To address this, the authors propose a "bidirectional bounds" framework that sandwiches the training objective, ensuring stability and high-quality density estimation.

The Instability of Unidirectional Bounds

In a typical minimax EBM training setup, the objective is to maximize the log-likelihood of the data. Since the partition function is unknown, researchers often minimize a variational lower bound. However, minimizing a lower bound is inherently ill-posed. If the bound is loose, the optimization process can "cheat" by driving the energy values toward negative infinity without actually capturing the underlying data distribution. This leads to divergent training and poor generative performance.

Methodology: The Sandwich Approach

The core contribution of this work is the introduction of bidirectional bounds. By constraining the negative log-likelihood $L(\theta)$ between a lower bound $\lfloor L(\theta) \rfloor$ and an upper bound $\lceil L(\theta) \rceil$, the authors create a stable optimization landscape. The training process follows an alternating scheme:

  1. Energy Function Optimization: Minimize the upper bound $\lceil L(\theta) \rceil$ with respect to the energy parameters.
  2. Generator Optimization: Maximize the lower bound $\lfloor L(\theta) \rfloor$ with respect to the proposal parameters.

Specific Bounds

The authors introduce four specific mechanisms to implement this sandwich:

  • Lower Bounds (Entropy Estimation):
  • Singular Values (SV): This method utilizes the smallest singular value of the generator's Jacobian to provide a bound on the entropy of the proposal distribution, avoiding the need for auxiliary networks.
  • Mutual Information (MI): This uses a Jensen-Shannon divergence estimator to bound entropy via the mutual information between latent codes and generated samples.
  • Upper Bounds (Regularization):
  • Gradient Penalty (GP): The paper provides a formal proof that specific gradient penalties act as a formal upper bound on the KL divergence between the proposal and the EBM.
  • Diffusion (diff): By leveraging score-matching and the Fokker-Planck equation, the authors derive an upper bound based on diffusion processes.

Experimental Evaluation

The bidirectional framework was evaluated across a diverse set of benchmarks, ranging from toy datasets to high-resolution images.

Mode Capture and Stability

On the StackedMNIST benchmark, which is designed to test for mode collapse, the proposed $EBM_{0GP}$ model successfully captured all 1,000 modes. In contrast, standard GANs often collapse to fewer than half of the available modes. This demonstrates that the bidirectional bounds effectively prevent the model from ignoring parts of the data distribution.

Image Generation Quality

The models showed significant improvements in Fréchet Inception Distance (FID) scores:

  • CIFAR-10: The $EBM_{SV+GP}$ achieved an FID of 28.63, a substantial improvement over previous EBM formulations like VERA (FID 66.38).
  • ImageNet ($32 \times 32$): Using a UNet architecture and the $EBM_{MI+diff}$ objective, the model reached an FID of 6.57, outperforming complex frameworks like PixelCNN.

Out-of-Distribution (OOD) Detection

Beyond generation, the bidirectional models excelled at OOD detection. When trained on CIFAR-10 and tested against SVHN, the models provided more reliable density representations than standard minimax models, suggesting that the "sandwich" helps the energy function learn a more authentic representation of the data manifold.

Discussion and Limitations

While the bidirectional approach offers a robust solution to EBM instability, it introduces new considerations. The SV bound requires an iterative solver (LOPCG) to calculate the smallest singular value of the Jacobian, which increases the computational cost per training step. Additionally, the diffusion-based upper bound relies on neural network approximations of the Fokker-Planck equation, which may not strictly guarantee the bound in all practical scenarios. Furthermore, the models still require careful tuning of the entropy regularizer weight ($\lambda$) to balance the bounds effectively.

Conclusion

By moving from unidirectional variational bounds to a bidirectional "sandwich" framework, this work provides a theoretical and practical foundation for stable EBM training. The results across various benchmarks suggest that constraining the energy function from both above and below is a powerful strategy for learning complex, high-dimensional distributions.

Summary updated

BibTeX
@article{geng2025exploring,
  author = {Cong Geng and Jia Wang and Li Chen and Zhiyong Gao and Jes Frellsen and Søren Hauberg},
  title = {{Exploring Bidirectional Bounds for Minimax-Training of Energy-Based Models}},
  journal = {Int. J. Comput. Vis.},
  year = {2025},
  doi = {10.1007/s11263-025-02460-0},
}
Figure