Share your thoughts, 1 month free Claude Pro on usSee more
WorkDL logo mark

EGC: Image Generation and Classification via a Diffusion Energy-Based Model

About

Learning image classification and image generation using the same set of network parameters is a challenging problem. 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 a conventional classifier that outputs a label given an image (i.e., a conditional distribution $p(y|\mathbf{x})$), the forward pass in EGC is a classifier that outputs a joint distribution $p(\mathbf{x},y)$, enabling an image generator in its backward pass by marginalizing out the label $y$. This is done by estimating the energy and classification probability given a noisy image in the forward pass, while denoising it using the score function estimated in the backward pass. 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 represents the first successful attempt to simultaneously excel in both tasks using a single set of network parameters. We believe that EGC bridges the gap between discriminative and generative learning.

Qiushan Guo, Chuofan Ma, Yi Jiang, Zehuan Yuan, Yizhou Yu, Ping Luo• 2023

Related benchmarks

TaskDatasetResultRank
Unconditional Image GenerationCIFAR-10
FID4.31
280
Generative ModelingCIFAR-10
FID3.3
35
Time Series OOD GeneralizationEMG
Accuracy 154.44
18
Time Series OOD GeneralizationUCIHAR
OOD Performance Metric 187.36
18
Time Series OOD GeneralizationOpportunity
S174.2
18
Time Series OOD GeneralizationUniMiB-SHAR
OOD Result 1 Score19.72
18
Time Series OOD GeneralizationUCIHAR, UniMiB-SHAR, EMG, Opportunity Aggregated
Average Performance57.33
18
ClassificationCIFAR-10
Accuracy95.9
15
Generative ModelingImageNet 256x256
FID6.05
15
ClassificationImageNet 256x256
Accuracy (%)78.9
9
Showing 10 of 16 rows

Other info

Follow for update