TL;DR
Teaching a neural network to continuously learn new defenses against evolving adversarial attacks usually triggers "catastrophic forgetting"—learning to block Attack B makes it vulnerable to Attack A, or worse, ruins its accuracy on normal, unperturbed images. This paper introduces a framework that solves this tug-of-war not at the final prediction layer, but deep inside the network's internal feature space. By forcing clean and attacked images to share the same geometric representation across time, the model learns to shrug off new white-box attacks while actually improving its memory of older tasks.
What Problem Does This Paper Address?
Imagine deploying a vision model in a security-critical environment. In the real world, attackers don’t use a single static trick; their attack patterns evolve. This brings us to Continual Adversarial Defense (CAD). Unlike standard continual learning—where a model learns new object categories over time—a CAD model faces a sequence of different adversarial attacks (specifically, dangerous "white-box" attacks that have full access to the model's gradients to craft invisible, malicious pixel noise).
The challenge is a brutal three-way tug-of-war:
- Plasticity: The model must adapt to defend against a newly arrived attack.
- Stability: It cannot forget how to defend against yesterday's attacks (catastrophic forgetting).
- Clean Accuracy: Adversarial training notoriously degrades performance on normal, unperturbed ("clean") data.
Existing CAD methods mostly rely on replaying old data or regularizing final output logits (predictions). However, locking down predictions doesn't stop the internal feature representations from drifting wildly as attacks change, leaving the model fragile.
Methods
Instead of playing whack-a-mole at the output layer, the authors propose the Learning Robust Representation Framework (LRRF). The core philosophy is geometric: keep the internal feature distributions aligned across layers, tasks, and classes. To measure and minimize the distance between feature distributions without needing explicit probability densities, LRRF relies heavily on a standard statistical tool called Maximum Mean Discrepancy (MMD) in kernel space.
What’s new is how LRRF orchestrates MMD across three hierarchical levels alongside standard adversarial training and memory replay:
- Dynamic Representation Matching (DRM) [Intra-task]: Within theinitial task, DRM generates gradient-based adversarial examples and uses MMD across all network layers to pull the feature distributions of clean and adversarial images together. This builds a shared, robust decision boundary without sacrificing clean accuracy.
- Cross-Task Invariant Representation (CTIR) [Cross-task]: When a new attack arrives, LRRF freezes a copy of the previous task's feature extractor (acting as a historical anchor). CTIR minimizes the MMD distance between the active network's features and this frozen network's features on the new data, ensuring newly learned defenses remain compatible with historical ones.
- Knowledge Consolidation Optimization (KCO) [Class-conditional]: Using a compact memory buffer of clean images, KCO pairs incoming adversarial images with clean buffered images of the exact same class, using MMD to pull their representations together and preserve category structure over time.
Datasets
The authors evaluate LRRF on five standard image classification benchmarks, spanning low-to-high complexity, using both CNN (ResNet-18) and Vision Transformer (ViT) backbones:
- CIFAR10 & CIFAR100
- CUB200 (fine-grained bird species)
- TinyImageNet
- ImageNet-R (renditions like art, cartoons, and sketches)
To simulate continual adversarial defense, no new static datasets are introduced; instead, each dataset is transformed into a sequential three-task pipeline: Clean Data (None) $\rightarrow$ FGSM Attack $\rightarrow$ PGD Attack (two standard gradient-based white-box attacks).
Key Insights and Ideas
- Output alignment isn't enough; geometry matters: Regularizing logits (predictions) still allows underlying features to fracture under new attacks. Aligning multi-layer representations creates genuinely attack-invariant features.
- Learning new defenses can actively heal old ones: Usually, continual learning is about minimizing damage (forgetting). On CIFAR10, LRRF achieves a $-1.0\%$ forgetting rate—meaning training on subsequent, harder attacks actually improved performance on earlier tasks (positive backward transfer).
- Cross-generalization across attacks: Models trained under single-step FGSM attacks using LRRF generalized remarkably well when suddenly hit with multi-step PGD perturbations ($72.83\%$ accuracy on CIFAR10, beating the runner-up by $7.73\%$).
Key Results
LRRF establishes new state-of-the-art results across nearly all adversarial task sequences compared to strong replay-based (e.g., DER, DER++) and robustness-aware (e.g., AIR, DER++AFLC) baselines.
- Massive gains under FGSM: On CIFAR100, LRRF hits $78.05\%$ average accuracy during the FGSM phase—an absolute jump of $17.46\%$ over the next best method (DEF at $60.59\%$).
- Holding the line on PGD: Under the harder PGD phase, LRRF outperforms the strongest baselines by $5.0\%$ on CIFAR10 ($58.83\%$ vs. $53.83\%$) and $3.13\%$ on CUB200 ($54.15\%$ vs. $51.02\%$).
- High-complexity resilience: On ImageNet-R, LRRF sweeps all three stages (Clean: $78.67\%$, FGSM: $68.56\%$, PGD: $53.76\%$). (Note: On TinyImageNet's final PGD stage, baselines like DEF and DER+++ do retain higher accuracy—$64.24\%$ vs. LRRF's $50.31\%$—highlighting how tough plasticity-stability trade-offs remain on certain distributions).
- Every piece pulls its weight: Ablations on CIFAR10 show steady average accuracy climbs from a base model ($43\%$) when sequentially adding DRM ($+11.43\%$), CTIR ($+5.57\%$), and KCO ($+4.64\%$).
Limitations and Future Work
- Classification only: The authors note that LRRF is currently formulated and tested strictly on image classification tasks. Expanding this representation-alignment philosophy to downstream tasks like object detection or segmentation is left for future work.
- Distance metrics & theoretical bounds: While MMD worked well, exploring alternative probabilistic distance metrics remains open. Additionally, the authors candidly note in their theoretical analysis that minimizing marginal MMD on the current task does not automatically guarantee bounded risk drift on old tasks without strong assumptions holding on those prior distributions.
Summary updated