Manuscript Offprint

arXiv:2611.06082

Catastrophic Overfitting is Weight Drift the Training Loss Cannot See

Chao Pan

Chao Pan

Department of Computer Science and Engineering, Southern University of Science and Technology, Shenzhen 518055, China 11930665@mail.sustech.edu.cn

Abstract. Fast adversarial training (FAT) makes robust training affordable by replacing the multi-step attack with a single-step one, but it suffers from catastrophic overfitting (CO): partway through training, robustness to multi-step attacks collapses to near zero while the single-step attack used for training keeps being repelled. We show that CO is a quiet escape of the weights. Across the event the network's clean behavior quietly improves, and moving from the weights just before CO to those just after it changes the training objective only marginally while destroying most of the robustness. The training objective is therefore nearly blind to the displacement it causes, so it exerts no force to undo it. The exponential moving average (EMA) of the weights, which FAT protocols already maintain, does not accumulate this drift and stays robust through the entire event. This observation suggests a nearly free fix: when validation robustness drops, reset the weights to their EMA. We build this guard on top of a coupling-based base method designed so that its average stays inside the robust region. The resulting training removes CO in every one of our runs and attains the strongest AutoAttack accuracy among fast methods on all three benchmark datasets, including a clear margin on CIFAR-100, where it also clears the multi-step reference at roughly half its cost. Code is available at https://github.com/fzjcdt/co-weight-drift.

1 Introduction

Adversarial training [15] is the most reliable known defense against adversarial examples, but it repeats a multi-step attack for every batch, an order of magnitude more computation than ordinary training. Fast adversarial training (FAT) [7, 22, 27] removes this bottleneck by training against a single-step attack. It works well, with one strange exception.

The exception is catastrophic overfitting (CO) [2, 12, 27]. Partway through an otherwise ordinary run, robustness to multi-step attacks collapses to near zero within a single epoch. The single-step FGSM attack used for training continues to be repelled, so from the inside of the training loop nothing appears to be wrong, and the run finishes with a model that is robust against nothing except the attack it trained on. Because CO is silent and cannot be predicted in advance, the strongest published fast methods are chosen as much for their luck as for their design.

Many fixes have been proposed: randomized initialization [27] and gradient-alignment regularizers [2], modified attacks and initializations [5, 12, 17], bi-level formulations [26], and others [9, 29]. They help empirically, but they all act on the attack or on the loss, and none of them answers the mechanistic question: where in weight space has the CO model gone, and why is the optimization that was robust an epoch earlier unable to find its way back?

Part of the reason nobody has answered it is that ordinary

Figure

Figure 1: Catastrophic overfitting (CO) at two timescales. Top: at epoch resolution, CO in vanilla FGSM training is a cliff without warning; validation PGD-10 robustness falls from 45% to 0.5% in a single epoch (shaded), while the FGSM attack used for training keeps being repelled, so nothing inside the training loop looks wrong. Bottom: the same method retrained with checkpoints every 25 batches. The cliff is 75 batches wide, the EMA model wˉ\bar{w} (blue) holds its robustness throughout, and clean accuracy keeps rising. Our guard resets the weights to this EMA when validation robustness dips.

training logs cannot see the event: at epoch resolution CO is a cliff with no consistent precursor. So we rebuilt the instrument. We retrained the classic victim, vanilla FGSM adversarial training, and every 100 batches saved two checkpoints: the training weights and their exponential moving average (EMA), an object the protocol already maintains. This turns a one-epoch mystery into a short film.

Three findings came out of watching that film (Fig. 1). First, CO barely touches the clean function: through the event, clean accuracy rises while PGD-10 robustness falls from 44% to 11%. Robustness leaves before accuracy notices. Second, the direction of travel is invisible to the training objective:

interpolating from the pre-CO EMA to the CO weights changes the training loss by a few percent while destroying more than two thirds of the robustness, so there is no restoring force along the direction that matters. Third, the weight average resists the drift: the EMA keeps its robustness through the entire event, and in the benchmark's released runs its own CO, when it happens at all, arrives many epochs later or never.

These three facts point to a fix that is not another regularizer. If training cannot correct the drift, but the trajectory's own average does not accumulate it, the natural move is to pull the weights back toward their EMA when the drift shows up. We build this idea in its simplest form: a guard that resets the weights to their EMA when validation robustness drops by more than a threshold, sitting on top of a strong coupling-based base method designed so that its EMA holds the robust region. On CIFAR-10 the unguarded base collapses in half of its runs; the guarded version removes the coin flip entirely and reaches the best fast-method AutoAttack accuracy we are aware of on all three benchmark datasets, including a clear gain on Tiny-ImageNet.

Contributions. (1) A measured mechanism: CO is a drift of the weights along directions the training objective can barely see, established by paired raw/EMA tracking at 100-batch resolution and by line searches along the drift direction (Figs. 2, 3). (2) Its dynamics: a short warning window that no epoch-level observable can see, ending in gradient masking (Fig. 4), and a staged, margin-ordered sweep through the evaluation set. (3) A fix derived from the mechanism: anchoring the weights to their own EMA, with a threshold chosen inside a measured gap and a detector-free control showing that the rescue comes from the anchor itself. (4) Results: the strongest fast-method AutoAttack accuracy on CIFAR-10 (50.45±0.20, 4 seeds, no CO), CIFAR-100 (27.15±0.04, +0.51 over the strongest fast method and +0.25 over the multi-step reference), and TinyImageNet (+0.59); the benchmark's second strong-attack suite (CR) confirms the ordering on all three.

References (27)