Adversarial training makes image classifiers resistant to small, deliberately crafted input perturbations, but its standard form is expensive. For every training batch it first runs an attack, typically 7 to 40 gradient steps of projected gradient descent (PGD), to find a worst-case perturbation, and only then updates the model. The cheap alternative takes a single gradient-sign step (FGSM, the fast gradient sign method). It costs about as much as ordinary training, but it suffers from catastrophic overfitting: partway through training, accuracy against strong multi-step attacks suddenly falls to near zero. The model has learned to twist its loss surface so the one-step attack stops pointing anywhere useful. We propose to stop this collapse by giving the network a second job. It must also reconstruct the clean input from the perturbed one, through a small decoder that is thrown away at test time. The single-step attack is then computed against the classification and reconstruction losses together, in the same one backward pass.
The intuition is that catastrophic overfitting is a form of gradient masking, meaning the network makes its classification loss locally flat or contorted around training points. Masking the classification gradient is easy, because the network only has to break the link between the input and a few logits. Masking a reconstruction gradient is hard, because the encoder must keep enough information about the input to rebuild it, and so cannot become locally constant or folded around it. If this is right, a reconstruction head is a structural anchor for fast adversarial training. It costs almost nothing at inference, it needs no second-order terms, and it adds no extra forward passes at interpolated points.
Core Claim
A shared encoder trained jointly on classification and denoising reconstruction should avoid catastrophic overfitting under single-step training. This should hold at the large perturbation budgets and long training schedules where fast methods are most fragile. It should reach robust accuracy within a few points of the best single-step regularizers at wall-clock cost close to vanilla FGSM. The new ingredient is not "add an autoencoder to adversarial training." That has been done with multi-step attacks. The new ingredient is a single-step perturbation computed against the joint objective, together with an explicit test of whether reconstruction controls the quantities known to trigger collapse.
Writing $h$ for the shared encoder, $f$ for the classifier on top of it, $g$ for a light decoder, $\eta$ for a random start inside the $\ell_\infty$ ball of radius $\epsilon$, and $\beta$ for the weight of reconstruction in the attack, the perturbation is
$$\delta = \Pi_\epsilon\Big(\eta + \alpha\,\mathrm{sign}\,\nabla_x\big[\mathcal{L}_{\text{cls}}(f(h(x+\eta)),y) + \beta\,\|g(h(x+\eta)) - x\|^2\big]\Big),$$
where $\Pi_\epsilon$ projects back into the ball and $\alpha$ is the step size. The model is then trained on $\mathcal{L}_{\text{cls}}(f(h(x+\delta)),y) + \lambda\,\|g(h(x+\delta)) - x\|^2$, with $\lambda$ weighting reconstruction in training. Both gradients flow back through the same encoder, so the attack direction costs one backward pass. The decoder branches off an early block and is kept to a few upsampling layers so its cost stays small.
Relation to Prior Work
The closest work is GAT. It adds auxiliary heads (rotation, jigsaw, autoencoding, depth) to adversarial training and balances them with Pareto-optimal multi-objective gradient weighting. It reports 56.21% AutoAttack accuracy on CIFAR-10 with ResNet-50, and large gains when labels are scarce. GAT motivates this proposal, since it shows that auxiliary structure flattens loss curvature. But it runs full multi-step PGD plus per-task gradient computations, which makes it more expensive than plain PGD training. It never asks whether an auxiliary task can replace the multi-step inner loop, and it does not isolate autoencoding from the other heads. We do the reverse: we keep one reconstruction head, a single attack step, and fixed scalar weights.
A second group uses masked autoencoders as defenses, but only at test time and separate from the classifier. MAEP trains a masked-autoencoder purifier that cleans images before a frozen classifier sees them. DRAM detects attacks through spikes in reconstruction error and repairs inputs by test-time gradient descent. Both supply evidence that reconstruction error is sensitive to adversarial noise, which is the property we exploit. Both pay for it at every inference query, and both raise questions about attacks that differentiate through the purifier. Our decoder exists only during training. The deployed model is an ordinary classifier, so standard AutoAttack evaluation applies without adaptive-attack special cases.
Joint reconstruction-classification models outside robustness supply the architectural template. Examples are SERL, which shares weights between an autoencoder and a classifier, MIN2Net for EEG, and CHARON, which pairs masked reconstruction with classification to fight forgetting in continual learning. None of them is evaluated under attack. CHARON also constrains the design. It reports that masked inputs create a train-test mismatch requiring a post-hoc linear probe, so we use full-image denoising reconstruction rather than masking in the main method and treat masking only as an efficiency variant.
The fast-adversarial-training literature constrains and calibrates the proposal. Yeom & Lee show that an explosion in the mixed input-parameter Hessian precedes collapse, and they prevent it with a consistency regularizer that needs extra perturbed forward passes. AAER traces collapse to "abnormal" adversarial examples whose single step lowers the loss, and penalizes them using three hyperparameters. ELLE enforces local linearity by evaluating the loss at interpolated points. SLAT adds single-step perturbations to early hidden layers using gradients already available from backpropagation. All four regularize the classification loss surface directly. We test whether a generative constraint on the encoder achieves the same effect indirectly, and we use the first two papers' diagnostics (mixed-Hessian norm, abnormal-example rate) to check whether it does so for the stated reason.
Research Program
The work has three parts. First, we build the method on PreAct ResNet-18 and WideResNet-34 for CIFAR-10, CIFAR-100 and SVHN, and on a small Vision Transformer, with a decoder attached after the first residual stage or patch-embedding block. Second, we run a mechanism study. Throughout training we log three quantities: the spectral norm of the mixed Hessian, estimated by power iteration on a fixed probe batch; the fraction of abnormal adversarial examples, following AAER's definition; and the gap between FGSM and PGD-20 training-batch accuracy. If reconstruction works by the hypothesized route, all three should stay bounded in runs where vanilla FGSM's explode.
Third, we probe the regime where the decoder has a unique advantage. The reconstruction loss needs no labels, so in a 10%-labeled CIFAR-10 setting the decoder can train on all images while the classifier sees only the labeled ones. GAT's scarce-data gains suggest this is where auxiliary structure matters most. As a by-product, reconstruction error on FGSM versus PGD inputs is logged for free, which tests whether it can serve as an early-warning signal of collapse.
Baselines
The naive reference point is vanilla FGSM with random initialization under the identical schedule. At large budgets it collapses: SLAT reports 0.01% PGD-50 accuracy for FGSM on CIFAR-10. Beating it is necessary but uninformative. Multi-step PGD-10 adversarial training gives the robustness ceiling and the cost ceiling. Yeom & Lee report 51.79% PGD-10 accuracy for it on CIFAR-10 with ResNet-18.
The strongest existing competitor is the mixed-Hessian consistency method of Yeom & Lee. It reports 52.46% PGD-10 accuracy on CIFAR-10 with ResNet-18 at nearly 3× the speed of multi-step PGD, stays stable for 1,000 epochs, and reaches 32.59% on ViT-Small. It is the strongest because it attacks the same failure mode, at single-step cost, with the best number in the file. AAER is the strongest competitor on cost. It reports about 48% PGD-50-10 accuracy at 11.2 seconds per epoch on an RTX 4090, against 11.0 for FGSM. ELLE-A reports 44.32% AutoAttack accuracy on CIFAR-10. SLAT reports 47.06% PGD-50 accuracy at about 104 minutes of training. GAT is included as a reference for what auxiliary tasks buy when cost is ignored.
These numbers use different attacks and are not comparable to one another. We therefore re-run every baseline ourselves on the same architecture, data, epoch counts and GPU, using the ELLE codebase and the easyrobust library where implementations exist. Each method gets the same hyperparameter-search budget of twelve configurations, selected on a held-out split with PGD-20. Final reporting uses AutoAttack per the RobustBench protocol, alongside wall-clock time per epoch and peak memory.
Beating the field means one of two things. Either we match the mixed-Hessian method's AutoAttack accuracy within one point at lower wall-clock cost. Or we exceed AAER's AutoAttack accuracy at no more than about 10% extra time over FGSM, while staying free of collapse at ε=16/255 and over long schedules where some baselines fail.
The ablations isolate the key ingredient. The first trains with reconstruction but computes the attack from classification alone (β=0), which separates "reconstruction as a training regularizer" from "reconstruction shaping the attack direction." The second replaces the reconstruction head with an equally sized rotation-prediction head under the same single-step attack, which tests whether any auxiliary task suffices. The third matches the decoder's added parameters with extra classifier width and stronger weight decay, which tests whether we are just adding capacity or regularization.
Why not just…?
Why not just use AAER or the mixed-Hessian regularizer, which already prevent collapse? This is the main threat, and it may win on raw accuracy. Their regularizers act on the classification loss and need either extra perturbed forward passes (mixed Hessian, ELLE) or three tuned penalties (AAER). Our claim is narrower: one structural loss with two weights, no extra forward passes, and an added benefit with unlabeled data. If our method trails the mixed-Hessian method by several AutoAttack points at similar cost, and adds nothing in the label-scarce setting, the honest conclusion is that reconstruction is a weaker anchor. The head-to-head runs above decide this.
Why not just add any auxiliary task, or more noise, rather than reconstruction specifically? It is plausible that the effect comes from generic multi-task regularization, as GAT's mix of rotation, jigsaw and autoencoding heads would allow. The rotation-head ablation and the capacity-matched control test exactly this. The β=0 ablation tests whether the joint attack direction matters beyond the training loss. If rotation does as well, the paper becomes a result about auxiliary tasks in fast adversarial training, and the reconstruction-specific mechanism claim is dropped.
Why not just perturb hidden layers as SLAT does? SLAT also gets single-step cost from gradients already computed in the backward pass. But it shapes the latent space only with noise and depends on choosing which layers to perturb. Combining SLAT with our reconstruction head is a cheap run. If the combination beats both, the two mechanisms are complementary. If SLAT alone matches it, reconstruction adds nothing.
Why not just purify at test time with MAEP or DRAM? Those methods push the reconstruction cost into every inference query, and DRAM even runs per-query gradient descent. Their security depends on how attacks through the purifier are handled. Our deployed model has no extra test-time computation and is evaluated with unmodified AutoAttack. We report their published numbers only as context, since their evaluation setting is not comparable.
Proposed Experiments
The decisive checks come in order of how much they can falsify the claim. First, at ε=8/255 and 16/255 on CIFAR-10 and CIFAR-100, with both a short cyclic schedule and a 500-epoch schedule, does the method avoid collapse in every seed where vanilla FGSM collapses? Second, does its mixed-Hessian norm and abnormal-example rate stay flat while FGSM's rise before collapse? A method that avoids collapse without controlling these quantities would suggest a different mechanism, possibly masking that only AutoAttack exposes. Third, how does final AutoAttack accuracy and wall-clock cost compare against the re-run baselines? Fourth, do the β=0, rotation-head and capacity-matched ablations fall short of the full method? If they do not, the specific claim fails. Fifth, on the ViT, does it hold against Yeom & Lee's 32.59%? Finally, at 10% labels, does it beat the same baselines when the decoder also trains on unlabeled images? CIFAR-100 single-step numbers were not available in the file ("no reported result found on Lacuna for single-step methods on CIFAR-100"), so all CIFAR-100 comparisons rely on our own re-runs. Code, logs, and per-epoch robustness traces will be released so the collapse dynamics can be inspected directly.
References
- GAT: Guided Adversarial Training with Pareto-optimal Auxiliary Tasks
- Adversarial Masked Autoencoder Purifier with Defense Transferability
- Test-time Detection and Repair of Adversarial Samples via Masked Autoencoder
- Supervised representation learning for multi-label classification
- MIN2Net: End-to-End Multi-Task Learning for Subject-Independent Motor Imagery EEG Classification
- Mask and Compress: Efficient Skeleton-Based Action Recognition in Continual Learning
- A Training-Dynamics View of Catastrophic Overfitting: Understanding and Prevention
- Eliminating Catastrophic Overfitting Via Abnormal Adversarial Examples Regularization
- Efficient local linearity regularization to overcome catastrophic overfitting
- Reliably fast adversarial training via latent adversarial perturbation
- RobustBench: a standardized adversarial robustness benchmark