EGC: Image Generation and Classification via a Diffusion Energy-Based Model
Qiushan Guo, Chuofan Ma, Yi Jiang, Zehuan Yuan, Yizhou Yu, Ping Luo
Abstract
Learning image classification and image generation using the same set of network parameters presents a formidable challenge. Recent advanced approaches perform well in one task often exhibit poor performance in the other. This work introduces an energy-based classifier and generator, namely EGC, which can achieve superior performance in both tasks using a single neural network. Unlike conventional classifiers that produce a label given an image (i.e., a conditional distribution p(y|x)), the forward pass in EGC is a classification model that yields a joint distribution p(x,y), enabling a diffusion model in its backward pass by marginalizing out the label y to estimate the score function. Furthermore, EGC can be adapted for unsupervised learning by considering the label as latent variables. EGC achieves competitive generation results compared with state-of-the-art approaches on ImageNet-1k, CelebA-HQ and LSUN Church, while achieving superior classification accuracy and robustness against adversarial attacks on CIFAR-10. This work marks the inaugural success in mastering both domains using a unified network parameter set. We believe that EGC bridges the gap between discriminative and generative learning. Code will be released at https://github.com/GuoQiushan/EGC.
Ask about this paper
Your agent reads all of it.
Lune indexed this paper to the last equation, along with the top-tier papers that cite it. Ask a question and the answer quotes them.
Your agent calls
Luneget_paper_fulltext
Free to start. No credit card required.
Terminal
Install the CLIlune papers fulltext f4887470-f260-4418-9da4-7efdafbd2abfCited by top-tier papers9
- Energy Matching: Unifying Flow Matching and Energy-Based Models for Generative ModelingMichal Balcerak, Tamaz Amiranashvili, Antonio Terpin, Suprosanna Shit et al.NeurIPS 2025 · 33 citations
- Learning Energy-Based Models by Cooperative Diffusion Recovery LikelihoodYaxuan Zhu, Jianwen Xie, Ying Nian Wu, Ruiqi GaoICLR 2024 · 18 citations
- Scalable Energy-Based Models via Adversarial Training: Unifying Discrimination and GenerationXuwang Yin, Claire Zhang, Julie Steele, Nir Shavit et al.ICLR 2026 · 1 citation
- Graph Neural Dynamics via Learned Energy and Tangential FlowsMoshe Eliasof, Eldad Haber, Carola-Bibiane SchönliebICML 2026 · 1 citation
- EnsembleVLA: Ensemble Learning for Vision-Language Action ModelsMingchen Song, Xiang Deng, Jie Wei, Dongmei Jiang et al.ICML 2026
Builds on28
- Learning Transferable Visual Models From Natural Language SupervisionAlec Radford, Jong Wook Kim, Chris Hallacy, Aditya Ramesh et al.ICML 2021 · 47,906 citations
- Denoising Diffusion Probabilistic ModelsJonathan Ho, Ajay Jain, Pieter AbbeelNeurIPS 2020 · 35,902 citations
- Diffusion Models Beat GANs on Image SynthesisPrafulla Dhariwal, Alexander Quinn NicholNeurIPS 2021 · 13,211 citations
- High-Resolution Image Synthesis with Latent Diffusion ModelsRobin Rombach, Andreas Blattmann, Dominik Lorenz, Patrick Esser et al.CVPR 2022 · 13,123 citations
- Denoising Diffusion Implicit ModelsJiaming Song, Chenlin Meng, Stefano ErmonICLR 2021 · 11,743 citations
Related papers
- Your classifier is secretly an energy based model and you should treat it like oneWill Grathwohl, Kuan-Chieh Wang, Jörn-Henrik Jacobsen, David Duvenaud et al.ICLR 2020 · 643 citations
- Your Classifier Can Do More: Towards Balancing the Gaps in Classification, Robustness, and GenerationKaichao Jiang, He Wang, Xiaoshuai Hao, Xiulong Yang et al.CVPR 2026 · 1 citation
- A Unified View of cGANs with and without ClassifiersSi-An Chen, Chun-Liang Li, Hsuan-Tien LinNeurIPS 2021 · 12 citations
- Conditional GANs with Auxiliary Discriminative ClassifierLiang Hou, Qi Cao, Huawei Shen, Siyuan Pan et al.ICML 2022 · 49 citations
- Towards Bridging the Performance Gaps of Joint Energy-Based ModelsXiulong Yang, Qing Su, Shihao JiCVPR 2023
