Adversarial training makes an image classifier robust by repeatedly showing it slightly perturbed inputs that an attacker has tuned to make it fail. Adversarial training is the standard defence against small, deliberately crafted input changes. The attacker, though, only counts failures. It does not care whether a perturbed husky becomes a wolf or a sunflower. Cross-entropy, the usual training loss, has the same indifference: every wrong class costs the same. Both sides of the robustness game are blind to how bad a mistake is. The evidence suggests this blindness hurts. Standard adversarial training has been reported to produce worse mistake severity than ordinary training, even on heavily corrupted inputs (Addressing Mistake Severity in Neural Networks with Semantic Knowledge). Separately, the attacks that most reduce top-1 accuracy turn out to cause only mild semantic errors, while attacks aimed at coarse taxonomy nodes cause severe errors at lower success rates (A Hierarchical Assessment of Adversarial Severity).
We propose a single-stage adversarial training method that has three parts. First, the attacker searches for the perturbation with the largest expected mistake cost under a class-distance matrix. Second, the model is trained to keep that cost low while keeping the usual robustness term. Third, the method comes with a diagnosis of where standard robust training spends its margin. The key technical observation is that the label-space version of this problem needs no optimal-transport solver. For single-label classification, the Earth Mover's Distance between the predicted distribution and a one-hot target is exactly the expected ground cost. It is computable in $O(C)$ time for $C$ classes and scales to the 1,010-class iNaturalist hierarchy.
Core Claim
Our hypothesis is that standard adversarial training worsens mistake severity for a specific reason. The cross-entropy-maximizing attacker almost always takes the cheapest route out of the true class, and that route usually leads to a sibling class. The model therefore pushes fine-grained boundaries outward, while boundaries between distant groups of classes (between superclasses) never get tested and keep small margins. If this is right, two things follow. The fix is to change what the attacker maximizes; reshaping the labels or rescaling the perturbation budget will not do it. And a model trained against a severity-seeking attacker should resist coarse-node attacks without paying in standard robust accuracy.
Let $D \in \mathbb{R}^{C\times C}_{\ge 0}$ be a ground cost between classes, with $D_{yy}=0$. Let $p_\theta(\cdot\mid x)$ be the model's softmax output. Because all of the target's probability mass sits on class $y$, the Earth Mover's Distance to the one-hot label reduces to
$$ \mathcal{S}_D(x,y;\theta) \;=\; \sum_{j} p_\theta(j\mid x)\, D_{yj}. $$
The training objective adds this severity term, evaluated on the adversarial input, to the TRADES objective. TRADES combines clean cross-entropy with a penalty on how far the model's output moves under perturbation (Theoretically Principled Trade-off between Robustness and Accuracy):
$$ \min_\theta \; \mathbb{E}\Big[\mathrm{CE}(f_\theta(x),y) + \lambda\,\mathrm{KL}\big(f_\theta(x)\,\|\,f_\theta(x')\big) + \mu\,\mathcal{S}_D(x',y;\theta)\Big], \quad x' = \arg\max_{\|\delta\|_\infty\le\epsilon} \Big[\mathrm{KL}\big(f_\theta(x)\|f_\theta(x+\delta)\big) + \eta\,\mathcal{S}_D(x+\delta,y;\theta)\Big]. $$
Here $\lambda$ is the TRADES robustness weight. The new weight $\mu$ controls how strongly the outer loss penalizes costly adversarial mistakes, and $\eta$ controls how strongly the attacker seeks them. A single combined attacker keeps the cost at the usual $(K{+}1)$ forward-backward passes per update, where $K$ is the number of projected gradient descent (PGD) steps (Towards Deep Learning Models Resistant to Adversarial Attacks).
Relation to prior work
Several papers motivate or partly occupy this space.
- Staged Training (Addressing Mistake Severity in Neural Networks with Semantic Knowledge) pushes inputs toward hand-picked similar classes and then fine-tunes on clean data. Our attacker pushes toward expensive classes, and we use one objective instead of two disjoint stages.
- CHAT (A Hierarchical Assessment of Adversarial Severity) defends iNaturalist-H with a curriculum that runs level by level down the tree and copies weights between levels. It requires a strict tree. Our method needs only a matrix $D$, so it accepts tree distances, text-embedding distances, or confusion-derived costs.
- Cost-sensitive certified robustness (Cost-Sensitive Robustness against Adversarial Examples) builds a cost matrix into convex-relaxation bounds, which limits it to MNIST and small CIFAR-10 networks. Our method is empirical rather than certified, and in exchange it scales.
- Cost-sensitive randomized smoothing (Provably Cost-Sensitive Adversarial Defense via Randomized Smoothing) certifies that a noise-averaged classifier will not flip into costly classes. Its certification cost grows quadratically with class count, and it needs thousands of forward passes at test time. Our model is an ordinary deterministic network.
- Input-space Wasserstein robustness (A Unified Wasserstein Distributional Robustness Framework for Adversarial Training, Wasserstein distributional adversarial training for deep neural networks) places the Wasserstein distance on the inputs, while the output space keeps flat labels. We place it on the labels.
- Label-space Wasserstein training (Severity-Aware Semantic Segmentation With Reinforced Wasserstein Training) uses a label-space Wasserstein loss but has no input adversary at all.
- EMO (EMO: EARTH MOVER DISTANCE OPTIMIZATION FOR AUTO-REGRESSIVE LANGUAGE MODELING) needs an upper bound on the transport distance because its targets are soft. The one-hot reduction above shows that classification does not need one.
Research Program
The work has three parts.
Diagnosis. On CIFAR-100, we will measure, for standard training, PGD adversarial training, and TRADES, the smallest perturbation needed to flip each test image into a different fine class versus into a different superclass. We estimate both with targeted PGD searches over the radius. The hypothesis predicts a specific pattern. Robust training should enlarge the fine-boundary radius much more than the superclass-boundary radius, so that the ratio between them shrinks relative to standard training. That shrinking ratio would explain the reported severity regression. If the ratio does not shrink, the explanation is wrong, and the method's motivation rests only on the empirical gap.
Method. We will implement the objective above with three cost matrices:
- lowest-common-ancestor (LCA) heights from the existing taxonomies of CIFAR-100, iNaturalist-H, and tieredImageNet-H;
- distances between class names computed with a frozen text encoder, as in Open-World Semi-Supervised Learning with Class Semantic Correlations;
- a "visual" cost built from the confusion matrix of a clean model.
The third matrix addresses the warning in Staged Training that semantic and visual proximity can disagree.
Evaluation attacker. We will add a held-out severity-seeking attacker. It maximizes $\mathcal{S}_D$ alone with many restarts, and is run alongside the GHA and NHA attacks from A Hierarchical Assessment of Adversarial Severity. GHA pushes inputs toward taxonomically distant classes; NHA targets parent nodes. Because our model is trained against a relative of the severity attacker, we treat NHA and the cross-entropy-based AutoAttack as the out-of-distribution tests.
Baselines
Naive reference points. The first is a standard cross-entropy model, which shows how far severity moves from ordinary training. The second is PGD adversarial training (Towards Deep Learning Models Resistant to Adversarial Attacks), the configuration reported to worsen severity. For calibration on CIFAR-10, that paper reports roughly 46% white-box robust accuracy with roughly 87% clean accuracy.
TRADES. TRADES (Theoretically Principled Trade-off between Robustness and Accuracy) is the strongest general-purpose competitor, because our method is literally TRADES plus one term. Any gain must therefore come from that term. The paper reports 56.61% robust accuracy on CIFAR-10. We found no reported TRADES robust-accuracy number on Lacuna for CIFAR-100. We will also report HAT (Reducing Excessive Margin to Achieve a Better Accuracy vs. Robustness Trade-off) as the strongest point on the clean-versus-robust accuracy frontier. HAT reports about 49% AutoAttack accuracy on CIFAR-10 with PreAct ResNet-18, and a clean-accuracy gain of about 2.49% over TRADES on CIFAR-100. Its role is to show whether severity gains cost us that frontier.
CHAT. CHAT (A Hierarchical Assessment of Adversarial Severity) is the strongest existing severity-aware robust method. On iNaturalist-H it reports an average robustness gain of 1.85% over standard adversarial training and a 0.17 reduction in Average Mistake. Beating CHAT means a larger Average Mistake reduction than 0.17 under the same attack suite, with no loss in robust top-1 accuracy, using one training stage. We will match backbone, perturbation budget, and total epochs, counting all CHAT curriculum stages. We will also give CHAT the same hyperparameter search budget, measured in GPU-hours, that we spend tuning $\mu$ and $\eta$.
Staged Training. Staged Training (Addressing Mistake Severity in Neural Networks with Semantic Knowledge) is the CIFAR-100 severity baseline. It reports the best semantic alignment on 9 of 19 CIFAR-100-C corruption types, against 4 of 19 for standard training and 6 of 19 for adversarial training. We will rerun it in place of quoting it, so that corruption and adversarial severity are measured identically for all methods.
Ablations isolating the key ingredient. The first sets $\eta=0$, so the severity term appears only in the outer loss and the attacker is the plain TRADES attacker. The second sets $\mu=0$, so the attacker seeks severe mistakes but the outer loss is unchanged. The third replaces $D$ with a constant off-diagonal matrix. That makes $\mathcal{S}_D$ equal to one minus the probability of the true class, which recovers flat-label training, so any remaining gain cannot be due to class structure. If the gain survives $\eta=0$, the "change the attacker" story is wrong and the contribution is only a loss term.
Why not just…?
Why not just apply a cost-sensitive decision rule to a TRADES model at test time? A post-hoc rule such as conditional risk minimization costs nothing at training time and is the cheapest competitor. Learning Hierarchy Aware Features for Reducing Mistake Severity reports that this rule helps much more on top of hierarchy-aware features than on plain baselines. The likely reason is that reweighting the softmax cannot rescue a representation that has already placed the perturbed input in an unrelated region. We will apply the same rule to every model, ours included, and report both with and without it. If TRADES plus the rule matches us under GHA and NHA, the training change is unnecessary, and we will say so.
Why not just use hierarchy-shaped soft labels during adversarial training? This is the most serious threat. Uniform label smoothing is clearly insufficient, because it treats a wolf and a sunflower as equally plausible alternatives. Non-uniform soft targets that put extra mass on taxonomic neighbours, by contrast, change only the outer loss. We expect them to behave like our $\eta=0$ ablation. If our account holds, they should leave coarse-boundary margins exposed, because the attacker still never visits those boundaries. We include hierarchy-smoothed TRADES as a full baseline with the same tuning budget. If it closes the gap on NHA, our central claim fails.
Why not just mix GHA-targeted adversarial examples into standard training? Training on perturbations aimed at a randomly chosen distant class is a hard-targeted relative of our attacker, and it may work comparably well. Our attacker differs in three ways. It needs no target sampling. It weights every costly class by its cost. It works with non-tree matrices. Whether these differences matter is an empirical question, so GHA-augmented TRADES is a baseline. If it ties us, the honest conclusion is that the attacker's objective is what matters, and our formulation is a cleaner but not a stronger way to express it.
Why not just retune the perturbation budget? Staged Training reports that untargeted adversarial training worsened severity across perturbation levels. We will still sweep $\epsilon$ for TRADES and plot severity against robust accuracy, so that the comparison is between frontiers, not single points.
Why not just fix a hierarchy-aware classifier layer and train adversarially? Inducing Neural Collapse to a Fixed Hierarchy-Aware Frame for Reducing Mistake Severity fixes the final class prototypes so that their similarities follow the hierarchy. On clean tieredImageNet-H it reports mistake severity of 6.89 against a 6.94 baseline, but it has never been tested under attack. We run TRADES with this fixed layer as a baseline, and we also combine it with our objective, since the two are compatible.
Proposed Experiments
Benchmarks and setup. We use CIFAR-100 with its 20 superclasses and 6-level tree, plus CIFAR-100-C, at ResNet-18 and WideResNet-34-10 scale. We use iNaturalist-H with its 1,010 classes and 8 levels, matching CHAT's setup. We add tieredImageNet-H as a deep-taxonomy stress test. Perturbations are $\ell_\infty$-bounded with the budgets standard for each dataset.
Metrics. We report clean and robust top-1 accuracy (AutoAttack and PGD), robust superclass accuracy, and Average Mistake (LCA distance) under each attack: clean inputs, PGD, GHA, NHA, and the held-out severity attacker. We also report the number of CIFAR-100-C corruption types on which each method has the best semantic alignment, and training cost in GPU-hours.
Decisive checks. There are three. First, the radius diagnosis must show the predicted asymmetry in standard adversarial training, and our method must reduce it. Second, on iNaturalist-H, our method must beat CHAT's 0.17 Average Mistake reduction under NHA, while staying within one point of TRADES on AutoAttack top-1. Third, the $\eta=0$ ablation and the hierarchy-smoothed baseline must both fall short of the full method on NHA. If the second check passes but the third fails, the paper becomes a cheaper replacement for CHAT, not evidence that the attacker is what matters. Finally, comparing the three cost matrices will show whether semantic or visual costs give better severity under attack, which bears directly on the visual-versus-semantic tension raised by Staged Training.
References
- Addressing Mistake Severity in Neural Networks with Semantic Knowledge
- A Hierarchical Assessment of Adversarial Severity
- Theoretically Principled Trade-off between Robustness and Accuracy
- Towards Deep Learning Models Resistant to Adversarial Attacks
- Cost-Sensitive Robustness against Adversarial Examples
- Provably Cost-Sensitive Adversarial Defense via Randomized Smoothing
- A Unified Wasserstein Distributional Robustness Framework for Adversarial Training
- Wasserstein distributional adversarial training for deep neural networks
- Severity-Aware Semantic Segmentation With Reinforced Wasserstein Training
- EMO: EARTH MOVER DISTANCE OPTIMIZATION FOR AUTO-REGRESSIVE LANGUAGE MODELING
- Open-World Semi-Supervised Learning with Class Semantic Correlations
- Reducing Excessive Margin to Achieve a Better Accuracy vs. Robustness Trade-off
- Learning Hierarchy Aware Features for Reducing Mistake Severity
- Inducing Neural Collapse to a Fixed Hierarchy-Aware Frame for Reducing Mistake Severity