Abstract: Can we train a hybrid discriminative-generative model with a single network? This question has recently been answered in the affirmative, introducing the field of Joint Energy-based Model (JEM), which achieves high classification accuracy and image generation quality simultaneously. Despite recent advances, there remain two performance gaps: the accuracy gap to the standard softmax classifier, and the generation quality gap to state-of-the-art generative models. In this paper, we introduce a variety of training techniques to bridge the accuracy gap and the generation quality gap of JEM. 1) We incorporate a recently proposed sharpness-aware minimization (SAM) framework to train JEM, which promotes the energy landscape smoothness and the generalization of JEM. 2) We exclude data augmentation from the maximum likelihood estimate pipeline of JEM, and mitigate the negative impact of data augmentation to image generation quality. Extensive experiments on multiple datasets demonstrate our SADA-JEM achieves state-of-the-art performances and outperforms JEM in image classification, image generation, calibration, out-of-distribution detection and adversarial robustness by a notable margin.
Introduction
In modern deep learning, a persistent trade-off exists between discriminative models, which excel at classification tasks, and generative models, which produce high-quality synthetic data. Joint Energy-Based Models (JEM) aim to unify these capabilities within a single neural network by reinterpreting the logits of a standard classifier as an energy function. However, JEM has historically lagged behind specialized models in two key areas: classification accuracy and image generation fidelity. This paper introduces SADA-JEM to bridge these performance gaps through improved optimization and data handling strategies.
Methodology
The authors identify that the performance limitations of JEM often stem from poor generalization and a "sharp" energy landscape. To address this, they propose two primary innovations:
- Sharpness-Aware Minimization (SAM): Instead of minimizing loss at a single point, SAM optimizes for a neighborhood of parameters with low loss. This encourages the model to converge to flatter minima, which are known to generalize better and result in a smoother energy landscape.
- Single-branched Data Augmentation (SADA): While data augmentation (e.g., cropping, padding) is essential for high-accuracy classification, it can introduce artifacts into generative processes. SADA-JEM decouples these tasks, applying augmentation for classification while excluding it from the likelihood estimation used for image generation.
The Geometry of Energy
A core insight of this work is the relationship between the model's parameter landscape and its performance. By applying SAM, the researchers effectively "sand down" the sharp spikes found in the energy landscapes of traditional JEM implementations.
As shown in the visualization above, the transition from a standard JEM to JEM+SAM and finally SADA-JEM results in a much more stable and well-behaved energy function, which directly correlates with improved robustness and accuracy.
Experimental Results
The proposed SADA-JEM was evaluated on standard benchmarks including CIFAR-10 and CIFAR-100. The results demonstrate significant improvements across multiple metrics:
- Accuracy: On CIFAR-10, SADA-JEM achieved 95.5% accuracy, narrowing the gap to pure discriminative classifiers.
- Generation Quality: The improvement in image fidelity was substantial. The Fréchet Inception Distance (FID) score—a standard measure of generation quality where lower is better—dropped from 38.4 in the original JEM to 9.41 in SADA-JEM.
- Robustness and Calibration: The model showed superior performance in out-of-distribution (OOD) detection and achieved an Expected Calibration Error (ECE) of just 2.04%, indicating highly reliable confidence scores.
Conclusion
SADA-JEM represents a significant step toward the "holy grail" of a single, high-performing hybrid model. By smoothing the energy landscape and refining the use of data augmentation, the authors have successfully bridged the accuracy and generation gaps that previously hindered JEM. While sampling speed remains a challenge for scaling to higher resolutions, the robustness and multi-task capabilities of SADA-JEM offer a promising path forward for unified deep learning architectures.
Summary updated