NeurIPS 2026Coming to NeurIPS?Explore papers, orals & directions

A Simple Class-Agnostic Approach to Enhance Fair Adversarial Training

Erh-Chung Chen, Pin-Yu Chen, I-Hsin Chung, Che-Rung LeeNeurIPS 2026

TL;DR

When you train a neural network to resist adversarial attacks, it doesn’t protect all classes equally—it usually shields easy classes while leaving harder ones wide open. Instead of trying to fix this by awkwardly micromanaging class-level statistics, this paper shows you can achieve fair, balanced defenses simply by treating individual data points according to why they are failing. Best of all, it scales effortlessly to massive datasets like ImageNet using just five epochs of post-training.

What Problem Does This Paper Address?

Adversarial training is our best defense against imperceptible, malicious pixel tweaks that fool AI models. You generate attacked images on the fly and train the model to resist them. However, standard adversarial training suffers from a glaring blind spot: class-wise disparity. A model might achieve great average robustness, while its worst-performing class (say, "cats" in CIFAR-10) remains astonishingly vulnerable.

To fix this, the sub-field of fair adversarial training emerged. Existing methods usually track which classes are struggling and crank up their loss weights. But this top-down approach has two fatal flaws:

  1. Intra-class blindness: Not every image in a weak class is equally useful; some are genuinely near the decision boundary, while others are just noisy, unlearnable outliers.
  2. Scalability bottlenecks: Tracking class statistics usually requires carving out a separate validation set or computing per-class metrics inside mini-batches. When you move from 10 classes to 1,000 (like ImageNet), data per class becomes sparse and mini-batches can't even hold one example per class, causing these methods to break down.

Methods

The authors ditch class labels entirely and build upon the classic TRADES framework, which splits total error into natural risk (can the model classify the clean image?) and boundary risk (does a small attack flip the model's prediction?).

Two samples can have the exact same total error for completely opposite reasons—one might be clean and learnable but easily attacked, while another is just a noisy outlier. To handle this at the individual sample level, the authors introduce a Tri-Regime Optimization Framework:

Figure 1: Conceptual overview of the proposed Tri-Regime Selective Reweighting framework. Examples lying on the same Constant Robust Risk Frontier (red curve, e.g., Rrob ≈2.4) can have entirely different optimization implications based on their composition of Natural Risk (Rnat) versus Boundary Risk (Rbnd). Standard methods treat the "Inefficient/Outlier Examples" (purple cluster) exactly the same as "High-Priority Adversarial Examples" (orange cluster), inevitably leading to robust overfitting on noise. To resolve this ambiguity, our framework explicitly decouples these error sources using three tailored mechanisms: (1) a Reliability Gating term ρ(Rnat) (bottom blue arrow) that suppresses high-noise outliers; (2) a Dynamic Reweighting term ϕ(Rbnd) (left red arrow) that prioritizes genuinely vulnerable boundary threats; and (3) a Sample-Level Regularization mechanism that diminishes the weight of "Safe/Over-fitted" examples (blue cluster) to prevent wasted capacity. This targeted strategy successfully steers the optimization trajectory (green arrows) toward the robust frontier while strictly avoiding the memorization of unlearnable data.
  1. Reliability Gating (Suppressing Outliers): If the model gets the clean image wrong, the adversarial boundary loss is masked to zero. If it gets it right, the boundary loss is weighted by the model's confidence on the clean image. Noisy, inherently confusing outliers naturally get gated out.
  2. Dynamic Boundary Reweighting (Prioritizing Threats): For learnable images that easily flip under attack, the framework amplifies their importance. Because loss scales shift during training, it normalizes each sample's boundary loss against a moving-average anchor (the 98th percentile of loss across the dataset) passed through a tanh activation.
  3. Sample-Level Regularization (Cooling Down Overconfidence): Most training samples eventually land in a "safe/over-fitted" zone—far from the boundary and unaffected by attacks. Instead of feeding the model rigid one-hot labels that push it toward extreme overconfidence, the authors resample soft targets from a Dirichlet distribution parameterized by the model's own output probabilities. This stops the model from wasting capacity on already-safe data.

They also introduce a lightweight post-training strategy: take an already trained robust model and fine-tune it for just 5 epochs using this framework.

Datasets

The authors evaluate their approach under white-box AutoAttack ($L_\infty$ norm) across three standard vision benchmarks of increasing class granularity:

  • CIFAR-10 (10 classes)
  • CIFAR-100 (100 classes, 10x sparser per class than CIFAR-10)
  • ImageNet (1,000 classes—a scale previous fair adversarial methods couldn't reach)

No new datasets were introduced, though the authors propose new evaluation metrics for ImageNet (cumulative worst-class accuracy and count of zero-robustness classes) since ImageNet validation classes only have a handful of images each.

Key Insights and Ideas

  • Unfairness is just robust overfitting in disguise: Standard models waste massive capacity memorizing noisy outliers and over-optimizing massive clusters of "already safe" examples. Because class accuracy rankings lock in early during training, starving genuine boundary threats of capacity permanently strands the hardest classes.
Figure 3: Distribution of cross-entropy losses for natural examples and their corresponding adversarial examples, generated using a fixed-step attack over the training set. ynat and yadv denote the predicted labels of natural data and the corresponding adversarial examples, respectively.
  • You don't need class awareness to get class fairness: By filtering out clean-data outliers and relaxing optimization on safe points, capacity naturally flows to the vulnerable boundary examples—which disproportionately live in the weakest classes.
  • Post-training is shockingly effective: You don't need to train from scratch. Simply applying sample-level regularization for a few epochs at the end of training undoes robust overfitting and unlocks worst-class performance.

Key Results

  • CIFAR-10 (WRN-34-10): Integrating their method with Adversarial Weight Perturbation (AWP) boosts worst-class robust accuracy to 28.60% while keeping clean accuracy high (85.64%). By contrast, the class-wise baseline CFA hits 28.10% worst-class robustness, but crashes clean accuracy down to 71.17%. Even better, just 5 epochs of post-training on a pretrained AWP checkpoint hits 29.00% worst-class robustness.
  • CIFAR-100 (ResNet-18): By slightly down-weighting the adversarial term so the smaller network can learn clean features first, their hybrid setup (Ours*) reaches 4.00% worst-class robustness and 59.42% clean accuracy, outperforming class-wise baselines (2.00%–3.00% worst-class, ~55.9% clean).
  • ImageNet (ResNet-50, ViT, Swin): Pretrained leaderboard models typically suffer from 220 to 250 classes having literally zero robust accuracy. Lightweight post-training resuscitates dozens of these dead classes—dropping the count to 180–200—while slightly improving overall average robustness.

Limitations and Future Work

On complex datasets with smaller-capacity models (like ResNet-18 on CIFAR-100), pure post-training isn't enough—if a model never learned to recognize a difficult class cleanly in the first place, smoothing its boundaries later won't save it. More broadly, the authors point out a philosophical flaw in current "fairness" definitions: forcing strict adversarial constraints onto inherently difficult samples degrades their clean, natural learnability. Future AI security paradigms shouldn't chase blind class-wise parity, they argue, but rather adaptively balance natural learnability with instance-level robustness.

Summary updated

BibTeX
@inproceedings{chen2026simple,
  author = {Erh-Chung Chen and Pin-Yu Chen and I-Hsin Chung and Che-Rung Lee},
  title = {{A Simple Class-Agnostic Approach to Enhance Fair Adversarial Training}},
  booktitle = {Advances in Neural Information Processing Systems},
  year = {2026},
  url = {https://openreview.net/forum?id=0Cyh5Wvx03},
}
Figure