Adversarial training makes image classifiers resistant to small, deliberately chosen input perturbations. It has two costs that practitioners feel directly. It lowers accuracy on ordinary, unperturbed images, and it multiplies training time because each update needs an inner attack loop. Both costs are usually managed with fixed knobs chosen before training. A weight $\lambda$ trades clean accuracy against robustness, and a regularizer weight stops cheap single-step training from collapsing. Each knob is found by repeating full adversarial training runs. We propose to replace both knobs with constraints that the training loop enforces itself. The user states a target clean loss, and the optimizer keeps a running Lagrange multiplier (a price that rises while a constraint is violated and falls once it is met) that adjusts the robustness pressure during the run. A second, per-example multiplier detects and prevents the collapse of single-step training. It uses a signal that falls out of the attack step at no extra cost.
The two-sentence version is as follows. Fast adversarial training needs one hand-tuned weight to set clean accuracy and another to avoid collapse, and tuning them costs several adversarial runs. We turn both into constraints with adaptive multipliers that are updated from quantities the single-step attack already computes, so one run lands at a requested clean accuracy without extra backward passes.
Core Claim
Three directions meet here, with different roles. Dynamic constraint weighting is the mechanism. The robustness–accuracy trade-off is the quantity being controlled. Training overhead is a hard budget: the method must cost no more than single-step TRADES-style training, which is about two forward-backward passes per batch. Our claim is that, at matched wall-clock time, this method traces a clean-versus-AutoAttack frontier on CIFAR-10 that is at least as good as tuned static fast methods. It should also hit a user-specified clean accuracy within about one point in a single run, and survive the large-perturbation regime ($\epsilon = 16/255$) where single-step training is known to collapse.
Formulation
We write training as a constrained problem. Let $\ell(x)$ be cross-entropy on clean input $x$, and let $g = \nabla_x \ell(x)$ be the input gradient that the single-step attack (FGSM, one signed-gradient step) computes anyway. Let $\delta$ be the resulting perturbation and $\mathrm{KL}_i$ the TRADES divergence between predictions on $x_i$ and $x_i+\delta_i$. Define the linearization residual $r_i = |\ell(x_i+\delta_i) - \ell(x_i) - \delta_i^\top g_i|$, which measures how far the loss departs from its first-order prediction along the attack direction. We then solve
$$\min_\theta \frac{1}{n}\sum_i \mathrm{KL}_i \quad \text{s.t.} \quad \frac{1}{n}\sum_i \ell(x_i) \le \tau, \qquad r_i \le \kappa \;\; \forall i,$$
through the Lagrangian
$$\mathcal{L}(\theta,\lambda,\mu) = \frac{1}{n}\sum_i \Big[\mathrm{KL}_i + \lambda\big(\ell(x_i)-\tau\big) + \mu_i\big(r_i-\kappa\big)\Big].$$
The symbols are as follows. $\tau$ is the clean-loss target. $\kappa$ is a linearity tolerance. $\lambda \ge 0$ is a single global multiplier, and $\mu_i \ge 0$ is one stored scalar per training example. The multipliers are updated by projected dual ascent, using a moving average of the minibatch constraint gap for $\lambda$ and the example's own residual for $\mu_i$ when it is visited.
We note honestly that for fixed $\lambda$ the first two terms are exactly TRADES with weight $1/\lambda$. So the clean-loss constraint amounts to TRADES with a weight set by feedback rather than by grid search, which makes the reference to Theoretically Principled Trade-off between Robustness and Accuracy precise. The residual $r_i$ is built from $\ell(x_i)$, $g_i$, and $\ell(x_i+\delta_i)$, all of which the FGSM step and the TRADES forward pass already produce. We detach $g_i$, so penalizing $r_i$ needs no second-order term.
Relation to Prior Work
The papers below play three roles: some supply the method, some motivate the gap, and some constrain the design.
Supplies the method. Closed-loop penalty adaptation comes from optimization. The adaptive-penalty linearized ADMM method raises its penalty when feasibility error is large relative to optimality error (LADMPSAP). The neural knapsack solver sets its penalty from the alignment between objective and constraint gradients (A Novel Method to Solve Neural Knapsack Problems). Both work on settings far from adversarial training; we reuse the feedback idea, not their guarantees.
Closest existing work. The nearest adversarial-training analogue is LORE. It fine-tunes foundation encoders under constraints that keep embeddings near a frozen pretrained model, with a dual MLP predicting per-image multipliers, and it reports 74.7% clean and 47.7% robust on ImageNet-100 versus 70.4% and 34.9% for the static FARE baseline. LORE differs from us in three ways. It needs an anchor model, it learns its multipliers with a network, and it keeps full multi-step attacks. We train end to end without an anchor, constrain the task loss directly, store plain scalar multipliers, and stay at single-step cost.
Motivates the gap. Three fast-training papers treat collapse ("catastrophic overfitting") and leave the trade-off weight static. GradAlign shows that collapse coincides with a loss of local linearity, but fixes it with a double-backprop regularizer. ATAS shows that collapse is driven by particular examples with large gradient norms, but adapts per-example step sizes by storing a full perturbation per example. RAT stabilizes training by splitting it into a reflection step and an enforcement step, but uses a static weight. Our per-example $\mu_i$ takes ATAS's insight that collapse is example-specific and GradAlign's insight that linearity is the right diagnostic. It enforces linearity at first-order cost and with one float per example instead of an image-sized buffer.
M+DEAT also closes a loop on gradient magnitude, but uses it to set the number of attack iterations, not loss weights. It is complementary and could wrap our method.
Constrains the design. HAT argues that part of the clean-accuracy loss is excessive margin, which is an optimization artifact rather than a hard limit. This is the reason a clean constraint can bind usefully at all. A3T shows that misclassified examples warp the decision boundary, which warns that a single global $\lambda$ may be too coarse. We therefore test per-class and per-example clean multipliers as an ablation.
Research Program
We will build the method on top of the HAT codebase, which already contains TRADES, the HAT method, and AutoAttack evaluation. We will add FGSM-based TRADES and the two dual updates. The fast-training reference implementations come from EasyRobust where possible.
Dual-update rule. We will compare plain dual ascent, dual ascent with a damping term, and a proportional-integral controller on $\lambda$. Primal-dual neural solvers report unstable feedback loops (Self-Supervised Primal-Dual Learning).
Clean-constraint signal. We will compare the differentiable clean loss against a proxy-Lagrangian in which the dual sees smoothed 0-1 error. With the proxy, $\tau$ can be stated directly as a target accuracy.
Collapse mechanism. We will analyze where $\mu_i$ concentrates. If $\mu_i$ prevents collapse for the reasons ATAS and GradAlign give, high-$\mu_i$ examples should coincide with large input-gradient norms. Their residuals should spike before the collapse that unregularized FGSM shows at $\epsilon=16/255$.
Implementation choices. We will keep the perturbation radius, architecture (PreAct ResNet-18 and WRN-28-10), and data identical across methods. All robustness numbers will come from standardized AutoAttack under RobustBench conventions, because that work shows that published defenses often overstated robustness by more than ten points under weaker attacks.
Baselines
Naive reference. Single-step FGSM training with random initialization, run at the same radii. It fixes the floor and is expected to collapse at large $\epsilon$; GradAlign reports roughly 0% robustness for FGSM-RS at $16/255$.
Static single-step TRADES. The same code, attack, and cost as our method, with fixed $\beta$ swept over a grid. This is the cleanest isolation of our contribution, because it differs from our method only in that the weights are fixed. To be fair on compute, we will report it in two ways: as the best single run, and as the frontier traced by the full sweep, charged with the sweep's total GPU hours.
Strongest fast competitors. ATAS reports 53.43% PGD-10 accuracy on CIFAR-10 with WRN-28-10 at about 5x the speed of PGD-10. No reported clean-accuracy or AutoAttack result for ATAS on CIFAR-10 was found on Lacuna. At $\epsilon=16/255$, RAT reports 19.58% AutoAttack accuracy, against 15.36% for Fast-GA, in 1.7 hours versus 6.3 hours for PGD-AT. We will rerun both with their published hyperparameters plus an equal tuning budget of the same number of runs we spend on $\kappa$. Beating these baselines means our method dominates at matched wall-clock time: higher AutoAttack accuracy at equal clean accuracy, or higher clean accuracy at equal AutoAttack accuracy.
Multi-step reference. Multi-step methods mark the frontier we would like to approach at a fraction of the cost. TRADES reports 88.64% natural accuracy and 56.61% robust accuracy under PGD. A3T reports 88.98% clean accuracy and 55.59% under AutoAttack. HAT reports about 49% AutoAttack accuracy on PreAct ResNet-18, with 2.17 points more clean accuracy than TRADES. We do not expect to beat these at equal radius. Recovering most of the gap at roughly a third of the time would be the meaningful result.
Ablations. We will run four:
- remove $\mu_i$ (clean constraint only);
- replace per-example $\mu_i$ with one global $\mu$;
- replace the clean constraint with an open-loop schedule for $\beta$;
- add per-class clean multipliers, as A3T's findings suggest.
Why not just…?
Why not just grid-search or anneal the TRADES weight? This is the most serious threat. At small $\epsilon$ we expect a well-chosen cosine or warm-up schedule to come close to our frontier. LORE's gap over its static baseline was measured against a fixed weight, not a tuned schedule, so it does not settle this. The open-loop-schedule ablation will settle it. If the schedule matches our frontier, our remaining claim is narrower but still practical: one run hits a stated clean accuracy, where a schedule needs a sweep to locate it. We will report how close each approach lands to the target and the total GPU hours each spends to get there, rather than frontier quality alone.
Why not just use GradAlign or RAT for stability and keep everything else fixed? GradAlign's second-order term substantially raises the cost of single-step training. RAT's regularizer weight is static and sensitive, and its clean accuracy degrades noticeably at $16/255$. Neither controls clean accuracy at all. Our comparison at matched wall-clock time and the target-hitting test address both points directly.
Why not just early-stop? GradAlign and CURE both note that early stopping leaves the model under-converged on clean accuracy. Choosing the stopping point also requires repeated AutoAttack evaluation on validation data, which is itself costly. We will include an early-stopped FGSM baseline that selects its checkpoint with a cheap PGD validation, and charge it that validation compute.
Why not just use HAT? HAT addresses the same excessive-margin problem but needs a second set of examples and a standard-trained teacher, which roughly adds to the cost of multi-step training. It is a ceiling reference, not a competitor at equal compute.
Decisive Checks
We will run three decisive checks.
Target-hitting and frontier quality. On CIFAR-10 at $\epsilon=8/255$, we will set $\tau$ to values corresponding to clean accuracies from 80% to 88%. We will check whether achieved clean accuracy lands within one point of each target. We will also check whether the resulting AutoAttack accuracies lie on or above the static single-step TRADES frontier at equal total compute.
Collapse at large radius. At $\epsilon=16/255$, our method must avoid collapse without second-order terms and match or exceed RAT's 19.58% AutoAttack accuracy at no more than RAT's training time.
Scale. On CIFAR-100, and on ImageNet with ResNet-50, we will test whether the same $\kappa$ transfers without retuning. A required retune would weaken the claim that tuning is removed. ATAS's 49.05% PGD-10 accuracy on ImageNet is the reference there.
The method fails if any of these holds: a tuned open-loop schedule matches it on both frontier quality and target-hitting; per-example multipliers add nothing over a global one; or it misses its clean targets by more than the run-to-run spread of the static baseline.
References
- Theoretically Principled Trade-off between Robustness and Accuracy
- Linearized alternating direction method with parallel splitting and adaptive penalty for separable convex programs in machine learning
- A Novel Method to Solve Neural Knapsack Problems
- LORE: Lagrangian-Optimized Robust Embeddings for Visual Encoders
- Understanding and Improving Fast Adversarial Training
- Fast Adversarial Training With Adaptive Step Size
- Rethinking Fast Adversarial Training: A Splitting Technique to Overcome Catastrophic Overfitting
- Dynamic Efficient Adversarial Training Guided by Gradient Magnitude
- Reducing Excessive Margin to Achieve a Better Accuracy vs. Robustness Trade-off
- A3T: accuracy aware adversarial training
- Self-Supervised Primal-Dual Learning for Constrained Optimization
- RobustBench: a standardized adversarial robustness benchmark