Your Classifier Can Do More: Towards Balancing the Gaps in Classification, Robustness, and Generation

Kaichao Jiang, He Wang, Xiao-Shuai Hao, Xiulong Yang, Ajian Liu +3 more
5/1/2025

No confident code implementation found for this paper.

Abstract

Joint Energy-based Models (JEMs) are well known for their ability to unify classification and generation within a single framework. Despite their promising generative and discriminative performance, their robustness remains far inferior to adversarial training (AT), which, conversely, achieves strong robustness but sacrifices clean accuracy and lacks generative ability.

Show full abstract

This inherent trilemma-balancing classification accuracy, robustness, and generative capability-raises a fundamental question: Can a single model achieve all three simultaneously? To answer this, we conduct a systematic energy landscape analysis of clean, adversarial, and generated samples across various JEM and AT variants. We observe that AT reduces the energy gap between clean and adversarial samples, while JEMs narrow the gap between clean and synthetic ones. This observation suggests a key insight: if the energy distributions of all three data types can be aligned, we might bridge their performance disparities. Building on this idea, we propose Energy-based Joint Distribution Adversarial Training (EB-JDAT), a unified generative-discriminative-robust framework that maximizes the joint probability of clean and adversarial distribution. EB-JDAT introduces a novel min-max energy optimization to explicitly aligning energies across clean, adversarial, and generated samples. Extensive experiments on CIFAR-10, CIFAR-100, and ImageNet subsets demonstrate that EB-JDAT achieves state-of-the-art robustness while maintaining near-original accuracy and competitive generation quality of JEMs, effectively achieving a new trade-off frontier between accuracy, robustness, and generation. The code is released at https://github.com/yujkc/EB-JDAT.

View on arXivView PDF

Code Implementations

No confident code match yet

We couldn't find an author-owned or strongly-evidenced community implementation for this paper. Any repos shown below are weak matches — verify before relying on them.

No code implementations found yet.

Know of an implementation? Let us know in the comments below!

Similar Papers

Cite this paper

@article{jiang2025your,
  title  = {Your Classifier Can Do More: Towards Balancing the Gaps in Classification, Robustness, and Generation},
  author = {Kaichao Jiang and He Wang and Xiao-Shuai Hao and Xiulong Yang and Ajian Liu and Qi Chu and Yunfeng Diao and Richang Hong},
  year   = {2025},
  eprint = {2505.19459},
  archivePrefix = {arXiv},
  url    = {https://arxiv.org/abs/2505.19459},
  journal = {Computer Vision and Pattern Recognition}
}

Add a badge to your README

Shows whether official code is linked for this paper.

Code of Paper badge
[![Code of Paper](https://codeofpaper.com/badge/2505.19459.svg)](https://codeofpaper.com/paper/2505.19459)

Discussion