Spending the Attack Budget Where the Worst Group Lives

Adversarial training makes a network resistant to small, deliberately crafted input perturbations. For every training example it searches for the worst nearby perturbation and then trains on that example. The search is the expensive part: several extra forward and backward passes per example, which multiplies training cost by roughly an order of magnitude. Standard practice spends this cost uniformly, the same number of attack steps on every example. Under subpopulation shift, where a rare group (waterbirds photographed on land, blond men in CelebA) is where models fail, uniform spending puts almost all of the attack compute on majority examples. Those examples are already easy, and the model already fits them.

We propose to treat the number of attack steps per example as a scarce resource and allocate it according to an estimate of which subpopulation is currently worst off. The target metric is worst-group robust accuracy: accuracy on the hardest subgroup when inputs are attacked. The central claim is that, at a fixed total number of attack steps, and ideally at a fraction of standard adversarial training's cost, risk-driven allocation achieves higher worst-group robust accuracy than uniform allocation. It should also do so without group labels. The claim is testable and can fail, because the first experiment checks whether the premise, that uniform adversarial training leaves minority groups with the worst robustness, holds on standard benchmarks at all.

Where This Sits

The closest prior work is Adversarial Group DRO (Robust Representation Learning for Group Shifts and Adversarial Examples). It nests a full adversarial inner loop inside group distributionally robust optimization (training that minimizes the loss of the worst predefined group). It motivates this proposal: it shows the two objectives can be trained jointly and yield more disentangled representations. It also exposes the gap. It stacks two min-max games, needs explicit group labels, and its authors could not finish hyperparameter tuning because of cost. We keep its objective but change what the group weights control. In advGDRO the weights rescale losses. In our method they also decide how much attack compute each example receives, so compute follows risk.

Two lines of work make robustness cheap from the adversarial side and supply our machinery. Fast adversarial training uses one perturbation step with random or learned starting points (Understanding and Improving Fast Adversarial Training, Prior-Guided Adversarial Initialization for Fast Adversarial Training). It cuts cost but risks catastrophic overfitting, where the model resists single-step attacks and collapses under multi-step ones. Robustness Tokens freezes a vision transformer and trains ten prepended vectors in 200 steps to map attacked features back to clean ones. It restores DINOv2-Giant ImageNet accuracy under white-box attack from 0.3% to 63.1%. Neither measures behavior per subgroup; both allocate their attack effort uniformly.

On the subpopulation side, the strongest label-free method is Diverse Prototypical Ensembles (DPE). It trains an ensemble of distance-based classifiers on a frozen backbone and reports 91.0% worst-group accuracy on Waterbirds and 81.9% on CelebA, against 69.1% and 57.6% for standard training. Meta-IADA replaces input-space attacks with a closed-form feature-space surrogate and reaches 92.5% on Waterbirds. It needs a clean, balanced meta-dataset, and because it perturbs features rather than inputs, it does not claim to defend against input attacks. None of these papers report robustness to adversarial inputs. The file contains no worst-group robust accuracy for any method on Waterbirds or CelebA: no reported result found on Lacuna for worst-group adversarial accuracy on these benchmarks, including for advGDRO.

One constraint shapes the group-inference step. EPIC shows that last-layer gradients are a cheap proxy for full gradients and uses them to isolate and delete outlying poisoned examples, 6.9x faster than adversarial poisoning defenses. Minority-group examples are also gradient outliers, so deleting them would be harmful. We reuse EPIC's cheap signal for the opposite purpose: isolated examples get more attention, not removal. We borrow the idea behind outlier-robust DRO (DORO) to cap how much any single example can attract, which guards against mislabeled points.

Core Mechanism

Let $B$ be the total number of attack steps per epoch, set to a fraction of what uniform multi-step training would use. Each example $i$ has an inferred group $\hat g(i)$. The method keeps group weights $q$ on the probability simplex, updated by exponentiated ascent on each group's current robust loss, as in group DRO. Example $i$ then receives $k_i$ attack steps:

$$k_i = \min\Big(K_{\max},\ \Big\lfloor B \cdot \frac{q_{\hat g(i)}}{n_{\hat g(i)}} \Big\rfloor\Big) + 1,$$

where $n_g$ is the number of examples assigned to group $g$ and $K_{\max}$ is a per-example cap. Every example gets at least one step, so the majority is still trained against single-step attacks, as in fast adversarial training. Examples in currently worst-off groups receive multi-step attacks. The training loss is the $q$-weighted robust loss under these perturbations. When all groups are equally hard, the rule reduces to uniform allocation. When one group dominates the risk, compute concentrates there.

Groups are inferred without labels. We cluster examples within each class by their last-layer gradients, computed from a briefly trained standard model; this costs one extra pass over the data. We also try a cheaper variant that splits each class by whether the standard model misclassifies the example. The DORO-style cap drops the top few percent of per-example losses from the $q$ update, so that a handful of mislabeled points cannot pull the budget toward themselves.

Research Program

The first stage is diagnostic and gates the rest. We train uniform multi-step and uniform fast adversarial training on Waterbirds and CelebA (ResNet-50, full fine-tuning) and on CIFAR-10 with classes treated as groups, following advGDRO's setup. For each group we measure clean and robust accuracy. The premise is that the robust-accuracy gap between the best and worst group is larger than the clean gap, and that giving the minority group more attack steps closes it faster than giving the majority the same extra steps. If uniform training already equalizes robustness across groups, or if extra steps on minorities do nothing, the idea is wrong and we report that.

The second stage builds the allocation method in two regimes. In full fine-tuning, allocation governs PGD steps. In the frozen-backbone regime we pair a DINOv2 transformer with robustness tokens and a prototype head in the style of DPE. Here allocation governs which examples receive multi-step attacks while the tokens train, and the adversary-correction loss is weighted by $q$. We study how gains depend on the minority fraction by subsampling the rare group, including the roughly 1% blond-male slice where CoOPood reported failing without labels. We also track catastrophic overfitting separately for majority examples, which receive mostly single-step attacks, and for minority examples.

Baselines

The naive reference is standard training with Adam. Adam is chosen because The Rich and the Simple argues it is less shortcut-prone than SGD, which makes it the fairest non-adversarial reference. Reported clean worst-group accuracy for standard training is 69.1% on Waterbirds and 57.6% on CelebA, and its robust accuracy is expected to be near zero.

The strongest clean-accuracy competitor is DPE, at 91.0% Waterbirds and 81.9% CelebA worst-group accuracy. We run it on our backbones with its published protocol so that its clean numbers are reproduced before we attack it. Meta-IADA (92.5% Waterbirds) is the strongest clean number overall, but it requires a balanced meta-set, so we run it with the same held-out slice given to every method. Group-labeled SCER (Spurious Correlation-Aware Embedding Regularization, 91.2% and 91.4%) serves as an upper reference that uses labels.

On the joint objective, the strongest competitor is advGDRO with oracle group labels at full multi-step cost. It reports no number, so we reimplement it. The key ablation isolates allocation. It uses the same budget $B$, the same inferred groups, and the same $q$-weighted loss, but spreads attack steps either uniformly or randomly. If allocation is doing the work, random allocation should not match it.

Fairness conditions apply to every comparison. All methods share data splits, the backbone, and the held-out model-selection slice. They get the same hyperparameter-search budget in trials, and cost is reported as forward-backward passes normalized to one epoch of standard training. Beating the field means two things together. The first is higher worst-group robust accuracy than uniform fast training and uniform-budget advGDRO at equal passes. The second is being within noise of full-cost advGDRO at a third or less of its passes, while keeping clean worst-group accuracy within a few points of DPE.

Why not just…?

Why not just combine robustness tokens with DPE, two cheap methods that each solve half the problem? This is the most serious threat. If the tokens map attacked features back onto clean features well enough, DPE on top should inherit both properties at almost no cost. Nothing in the file shows this failing. The composition is our frozen-regime baseline, run with uniform token training. The question it settles is whether the tokens' feature restoration is weaker on minority images: the reported ImageNet feature cosine of 0.89 is an average that could hide a poor tail. If uniform composition matches our allocated version on worst-group robust accuracy, we conclude that allocation is unnecessary for frozen transformers and restrict the claim to full fine-tuning.

Why not just run uniform fast adversarial training with group-balanced sampling? Upsampling minorities also moves compute toward them, so it is a cheaper form of our idea. It differs in two ways. It raises how often minority examples are seen but not how hard they are attacked. And it uses fixed frequencies rather than tracking current robust risk, which MixMax finds is "rarely the optimal strategy" even without attacks, beating balancing by 2.3–5.9% relative. We run balanced fast training at matched passes. If it ties our method, the contribution collapses to "balance your adversarial batches," and we would report that plainly.

Why not just pay for full advGDRO? Where compute is abundant, one could. But its authors could not complete tuning, and cost grows with model size. We include full-cost advGDRO specifically to measure how much worst-group robustness is lost at a third of its compute.

Why not use feature-space perturbation like Meta-IADA and skip input attacks altogether? Feature perturbations improve clean worst-group accuracy but carry no guarantee against input-space attacks. We evaluate Meta-IADA under the same PGD attack to measure that gap directly rather than assume it.

Decisive Checks

The primary metric is worst-group robust accuracy on Waterbirds and CelebA under 20-step PGD at standard $\ell_\infty$ radii. To rule out a weak-attack artifact, we confirm results with a stronger multi-restart attack. We report it alongside clean worst-group accuracy, average robust accuracy, and normalized passes. The first decisive check is the stage-one diagnostic: a robust-accuracy disparity across groups that exceeds the clean disparity. The second is that allocation beats random allocation at an equal budget; without this, the mechanism is not doing anything. The third is that the gain survives inferred groups rather than oracle groups, and grows rather than shrinks as the minority fraction falls toward CelebA's 1%. Finally, we inject 20% label noise and check that the loss cap keeps the budget from drifting onto mislabeled points, measured by the fraction of multi-step attacks spent on corrupted examples.