EBM Life Cycle: MCMC Strategies for Synthesis, Defense, and Density Modeling

Mitch Hill, Jonathan Mitchell, Chu Chen, Yuan Du, Mubarak Shah, Song-Chun ZhuICLR 2022

TL;DR

This paper introduces a novel "EBM Life Cycle" framework that unifies image synthesis, adversarial defense, and density modeling by tailoring Markov Chain Monte Carlo (MCMC) sampling trajectories to specific tasks. By developing new MCMC initialization strategies, the authors achieve state-of-the-art results across these diverse applications, demonstrating the flexibility and power of Energy-Based Models (EBMs).

What Problem Does This Paper Address?

Energy-Based Models (EBMs) are powerful generative models capable of learning complex data distributions. However, their practical application has been hindered by challenges in controlling the MCMC sampling process, which is crucial for both learning and generation. Specifically, different tasks require MCMC trajectories of varying lengths: short trajectories for generating realistic images, mid-length trajectories for adversarial defense, and very long trajectories for accurately modeling probability densities. Existing methods often struggle to achieve optimal performance across these distinct needs, with a common issue being the tendency for EBMs to learn "misaligned steady-states" where long-term samples become unrealistic. This paper aims to bridge this gap by proposing a unified approach that leverages MCMC sampling strategies tailored to the "life cycle" of these trajectories, enabling EBMs to excel in synthesis, defense, and density estimation.

Methods

The core contribution of this work lies in novel MCMC initialization strategies for training EBMs. Instead of relying on standard methods, the authors introduce three new approaches designed for different MCMC trajectory lengths:

  • Hybrid Persistent Cooperative Initialization (for Synthesis): This method combines the strengths of "persistent" and "cooperative" initialization. It uses a generator network to provide diverse initial samples and a "persistent bank" of past samples to prevent the generator from getting stuck in low-diversity modes, leading to improved image synthesis.
  • In-Distribution Rejuvenation (for Defense): This approach adapts persistent initialization by using a frozen, pre-trained generator to rejuvenate samples. This allows for stable mid-run MCMC trajectories necessary for adversarial defense without requiring full density estimation.
  • Two-Bank Persistent Initialization (for Density Estimation): To learn accurate probability densities, this method introduces two persistent banks: one for newly rejuvenated samples and another for samples used to update the EBM. This separation helps ensure that samples used for learning are closer to the model's steady-state, preventing oversaturation and improving density calibration.

Crucially, these methods are applied with standard network architectures and an unaltered Maximum Likelihood (ML) objective, highlighting the impact of the initialization strategies themselves.

Datasets

The paper utilizes several standard image datasets for training and evaluation:

  • CIFAR-10: Used for image synthesis, adversarial defense, and density estimation experiments.
  • Celeb-A: Used for image synthesis and density estimation experiments.
  • ImageNet: Used for image synthesis, adversarial defense, and density estimation experiments, demonstrating scalability to larger and more complex datasets.

Key Insights and Ideas

  • The "EBM Life Cycle": The paper frames the problem as a "life cycle" of MCMC trajectories, where different lengths are optimal for different tasks (synthesis, defense, density). This provides a unifying perspective for EBM applications.
  • Initialization is Key: The authors demonstrate that sophisticated MCMC initialization strategies, rather than complex model architectures or objectives, are crucial for unlocking the full potential of EBMs across diverse tasks.
  • Bridging Synthesis and Defense: The work shows that it's possible to learn models that are good for both image synthesis and adversarial defense, a challenging trade-off in generative modeling.
  • The Problem of Misaligned Steady-States: The paper reinforces and extends previous findings that many generative models, including EBMs, normalizing flows, and diffusion models, suffer from misaligned steady-states in their long-run samples, making accurate density estimation difficult.
  • Annealing is Essential: Learning rate annealing is shown to be critical for stabilizing both midrun and longrun MCMC trajectories, enabling robust learning.

Key Results

  • Image Synthesis: Achieved state-of-the-art FID scores for unconditional image densities on CIFAR-10 and ImageNet, surpassing GANs trained with similar resources.
  • Adversarial Defense: Demonstrated state-of-the-art adversarial defense on CIFAR-10 among purification methods and achieved the first EBM defense on ImageNet.
  • Density Modeling: Developed scalable techniques for learning valid probability densities, showing improved realism in longrun samples compared to previous methods.
  • Scalability: The proposed methods demonstrated scalability to ImageNet at 128x128 resolution, a significant achievement for EBMs.

Limitations and Future Work

  • Limitations:
    • While the proposed methods improve density estimation, achieving perfectly calibrated probability mass remains challenging, with some oversaturation and distortion observed in extremely longrun samples (1M steps).
  • The paper acknowledges that while their defense is comparable to adversarial training, it doesn't yet surpass state-of-the-art adversarially trained models on ImageNet.
  • The authors note that log likelihood is not a reliable indicator of density model quality, and longrun MCMC sample realism is a more appropriate, albeit imperfect, diagnostic.
  • Future Work:
    • The authors hope that future research will build upon these initialization schemes to further improve generative models for a wider range of tasks.
  • They suggest that efforts should be made to stabilize sampling trajectories of other generative models (normalizing flows, diffusion models, score-based models) to address the misaligned steady-state problem.
  • The paper hints at potential for EBM clustering techniques based on the potential energy basins of well-formed densities.

Summary updated

BibTeX
@inproceedings{hill2022ebm,
  author = {Mitch Hill and Jonathan Mitchell and Chu Chen and Yuan Du and Mubarak Shah and Song-Chun Zhu},
  title = {{EBM Life Cycle: MCMC Strategies for Synthesis, Defense, and Density Modeling}},
  booktitle = {International Conference on Learning Representations},
  year = {2022},
  url = {https://openreview.net/forum?id=OQPICn7q5g},
}
Figure