Abstract
We propose a novel framework for generative modelling using hybrid energy-based models. In our method, we combine the interpretable input gradients of a robust classifier and Langevin Dynamics for sampling. Using adversarial training, we improve not only training stability but also the robustness and generative performance of joint energy-based models.
Introduction
Generative modeling often involves a trade-off between classification accuracy and image synthesis quality. Joint Energy-Based Models (JEM) attempt to bridge this gap by reinterpreting a standard classifier as an Energy-Based Model (EBM), allowing a single network to both classify and generate data.
However, JEMs face two major hurdles: training instability and suboptimal sample quality. EBMs are notoriously difficult to train because they require estimating an intractable normalizing constant, often leading to "exploding" gradients. Furthermore, while JEMs can generate images, they often lack the crispness and detail found in GANs or Diffusion models. This paper addresses these challenges by leveraging the properties of adversarially robust classifiers.
Methodology
The core insight of this work is that adversarial robustness can be used as a generative tool. Unlike standard classifiers, the gradients of robust classifiers with respect to the input are "interpretable" and align with human perception. The authors propose a "combined inference" approach that merges adversarial attack techniques with energy-based sampling:
- Adversarial Training: During training, the model is fed adversarial examples generated via Projected Gradient Descent (PGD). This ensures the underlying classifier is robust and its gradients are visually meaningful, effectively "cleaning up" the energy landscape.
- Combined Inference: To generate an image, the authors use a two-step process. First, they perform a Target Attack, using PGD to push Gaussian noise toward a specific class logit, providing a "perceptual prior." Second, they apply Stochastic Gradient Langevin Dynamics (SGLD) to minimize the joint energy function $E_\theta(x, y)$, refining the coarse adversarial sample into a realistic image.
Experimental Results
The study evaluates the proposed framework on the CIFAR-10 dataset, comparing it against flow-based models (Residual Flow, Glow) and the JEM++ baseline.
As shown in the results table, the Robust JEM significantly outperformed previous hybrid and flow-based models:
- Inception Score (IS): Achieved 9.28, a substantial jump over the standard JEM++ (7.54) and flow models like Glow (3.92), indicating higher quality and clearer class identity.
- FID (Frechet Inception Distance): The "Robust JEM-Energy" variant achieved an FID of 41.17, outperforming the baseline JEM++ (48.25).
Qualitatively, while a standard robust classifier produces "ghostly" shapes, the Robust JEM produces much cleaner, more recognizable objects with fewer artifacts.
Conclusion and Future Work
Adversarial training acts as a powerful regularizer for Joint Energy-Based Models, preventing the energy function from developing the sharp, unstable peaks that typically crash EBM training. While the generated images are high-quality, the model tends to produce less diverse samples compared to standard EBMs due to the strong class-based priors used during generation. Future work will focus on tackling this diversity issue to capture the full distribution of the data without sacrificing stability and quality.
Summary updated