Skip to main content
Back

EB-JDAT Beats Top AI Defenses by 10 Points Without Extra Training Data

A CVPR 2026 paper shows a single energy-based classifier can hit state-of-the-art robustness while keeping clean accuracy and image generation intact.

Pro

  • EB-JDAT unifies classification, adversarial robustness, and image generation in a single energy-based classifier, accepted at CVPR 2026.
  • Core insight: aligning energy distributions of clean, adversarial, and generated samples resolves the accuracy-robustness-generation trilemma.
  • Novel min-max energy optimization models p(x_adv | x) as a real conditional EBM, not just a regularizer.
  • Hits 68.76% PGD-20 and 66.12% AutoAttack on CIFAR-10 with 90.39% clean accuracy and FID 27.42.
  • Beats data-augmented AT baselines using zero extra data and ~66 hours on one 3090 GPU.
  • Code and training scripts for JEM++ and SADAJEM variants at github.com/yujkc/EB-JDAT.

Getting a single neural network to classify accurately, resist adversarial attacks, and also generate realistic images has long felt like a pick-two problem. A new paper called Your Classifier Can Do More tackles that trilemma head-on with a method the authors call Energy-based Joint Distribution Adversarial Training, or EB-JDAT, and it lands at CVPR 2026 with code already on GitHub.

The trilemma nobody has cracked

Two lines of research have been circling each other for years. Joint Energy-based Models (JEMs) reinterpret a standard softmax classifier as an energy-based model, giving a single network both classification and generation abilities, but their robustness against adversarial attacks lags well behind dedicated defenses. Adversarial Training (AT), the go-to defense recipe, does the opposite: it hardens classifiers against attacks but sacrifices clean accuracy and has no generative capability.

The authors ask whether one model can genuinely do all three. To find out, they run an energy landscape analysis across clean, adversarial, and generated samples for several JEM and AT variants, and they land on a clean observation: AT pulls the energy of adversarial samples close to clean samples, while JEMs pull the energy of generated samples close to clean samples. Align all three, and in principle you should get all three capabilities at once.

Histograms of energy distributions for clean, adversarial, and generated samples across PGD-AT, TRADES, JEM, SADAJEM, and EB-JDAT

Modeling the full joint distribution

The trick in EB-JDAT is modeling the full joint probability of clean input, adversarial input, and label together, rather than treating adversarial examples as an add-on regularizer. Using Bayes, this factorizes into three pieces the authors optimize jointly:

  • The clean data density p(x), estimated with Stochastic Gradient Langevin Dynamics sampling in the usual JEM style.
  • The conditional adversarial density p(x_adv | x), which is the novel contribution.
  • The robust classifier term p(y | x, x_adv), which is just cross-entropy on adversarial inputs.

The interesting piece is the middle one, because the true adversarial distribution is never observed during training. The authors approximate it through a min-max energy game: the inner maximization searches for high-energy adversarial samples that sit outside the clean data manifold, and the outer minimization pulls those samples back into low-energy regions by shrinking the energy gap between adversarial and clean data. Unlike prior energy-based AT work such as JEAT and WEAT, this treats p(x_adv | x) as a genuine conditional energy-based model rather than a discriminative side-loss.

Numbers that stand out

On the benchmarks that matter here (CIFAR-10, CIFAR-100, and an ImageNet subset), EB-JDAT posts numbers that are hard to dismiss. Under AutoAttack it reaches 68.76% on CIFAR-10, 35.63% on CIFAR-100, and 32.40% on the ImageNet subset, beating prior state-of-the-art AT methods by 10.78, 4.70, and 7.88 points respectively, while keeping near-original clean accuracy and reasonable generation quality.

Scatter plot of robustness versus accuracy for SADAJEM, JEM++, EB-JDAT variants, JEAT, WEAT, TRADES, LAS-AWP, and DHAT-CFA on CIFAR-10

Two comparisons stand out. First, against AT methods that lean on massive diffusion-generated datasets: EB-JDAT trains in 66.64 GPU hours on a single 3090 without any extra generated data, versus roughly 1,438 hours for methods like SCORE and Better DM that pull in 1M extra samples, and still hits comparable or better robustness. Second, against other JEMs it holds its own on generation quality: EB-JDAT-SADAJEM outperforms JEM and JEM++ in FID while adding robustness those models simply do not have.

Where it breaks down

The authors are candid about the ceiling. Training on complex, high-dimensional data remains difficult because real data distributions are sharp in high dimensions, which gives inaccurate sampling guidance in low-density regions. Their ImageNet experiments use 100 classes downsampled to 64x64 rather than full ImageNet, and they flag latent-space optimization as future work for scaling. There is also a small accuracy and FID tax compared to the strongest pure JEMs, which they attribute to adversarial samples inevitably reshaping the energy landscape.

Using it

The reference implementation ships two variants layered on top of existing JEMs: EB-JDAT-JEM++ and EB-JDAT-SADAJEM, both using WRN28-10 as the backbone. Training is a single command with weights for each of the three loss components exposed as flags (--p_x_weight, --p_x_xadv_weight, --p_y_given_xadv_weight), and evaluation scripts cover clean accuracy, PGD, AutoAttack, and FID out of the box. If you are building a system that needs to be a classifier, a defense, and a generative prior at the same time (out-of-distribution detection pipelines and safety-critical vision come to mind), this is the first framework that treats all three as first-class objectives rather than trading them off.