Class Incremental Learning for Adversarial Robustness

Seungju Cho, Hongsin Lee, Changick KimarXiv 2023 · OpenReview

Abstract

Adversarial training integrates adversarial examples during model training to enhance robustness. However, its application in fixed dataset settings differs from real-world dynamics, where data accumulates incrementally. In this study, we investigate Adversarially Robust Class Incremental Learning (ARCIL), a method that combines adversarial robustness with incremental learning. We observe that combining incremental learning with naive adversarial training easily leads to a loss of robustness. We discover that this is attributed to the disappearance of the flatness of the loss function, a characteristic of adversarial training. To address this issue, we propose the Flatness Preserving Distillation (FPD) loss that leverages the output difference between adversarial and clean examples. Additionally, we introduce the Logit Adjustment Distillation (LAD) loss, which adapts the model's knowledge to perform well on new tasks. Experimental results demonstrate the superiority of our method over approaches that apply adversarial training to existing incremental learning methods, which provides a strong baseline for incremental learning on adversarial robustness in the future. Our method achieves AutoAttack accuracy that is 5.99%p, 5.27%p, and 3.90%p higher on average than the baseline on split CIFAR-10, CIFAR-100, and Tiny ImageNet, respectively.

Introduction

Deep learning models face two major vulnerabilities in real-world deployments: adversarial attacks and catastrophic forgetting. While Adversarial Training (AT) is the standard defense against perturbations, it is typically studied in static settings. When applied to Class Incremental Learning (CIL), where tasks are learned sequentially, models often lose both their predictive accuracy and their robustness on previous tasks. This paper introduces FLAIR (FLatness-preserving Adversarial Incremental learning for Robustness), a novel framework designed to maintain strong defenses against adversarial attacks throughout the incremental learning process.

Methodology

The FLAIR framework addresses the challenges of task conflict and data scarcity through three core components:

  1. Adversarial Distillation with Separated Logits (ADSL): Instead of standard cross-entropy, which forces competition between all classes, FLAIR uses binary cross-entropy on new class indices. This preserves the stability of old class logits while allowing the plasticity needed for new tasks.
  2. Flatness Preserving Distillation (FPD): This is the framework's primary innovation. Robust models typically exhibit a "flat" loss landscape. FPD distills the difference between a model's output on clean and adversarial images from the previous task's model. This efficiently preserves the geometric properties (gradient and Hessian information) of the loss landscape without direct second-order calculations.
  3. Augmentation Training Data: To mitigate data scarcity in incremental buffers, FLAIR incorporates advanced augmentation techniques like RandAugment or AutoAugment, enhancing generalization.

Key Insights: The Flatness Forgetting Problem

A central finding of this work is that standard incremental learning causes the loss landscape for old tasks to become "sharp," which directly correlates with a total loss of adversarial defense. The authors define this as "Gradient Forgetting" and "Hessian Forgetting."

Loss landscape visualizations comparing R-iCaRL and FLAIR, showing how FLAIR maintains a smooth, flat landscape essential for robustness.

As visualized above, while baseline methods like R-iCaRL result in spiky and chaotic landscapes after learning new tasks, FLAIR maintains a smooth, wide basin characteristic of robust models.

Experimental Results

FLAIR was evaluated on "Split" versions of standard benchmarks, including CIFAR-10, CIFAR-100, and SVHN, in both non-rehearsal and rehearsal settings.

Quantitative performance comparison across multiple benchmarks.

Key results include:

  • S-CIFAR10 (No Buffer): FLAIR achieved 17.02% AutoAttack (AA) accuracy, outperforming the best baseline (R-LwF at 16.28%). It also showed significantly less forgetting, with a Robust Backward Transfer (R-BWT) of -22.09%.
  • S-CIFAR100 (With Buffer): FLAIR reached 13.45% AA accuracy, nearly doubling the performance of the competitive R-iCaRL baseline (8.20%).
  • Overall Gains: On average, FLAIR achieves AutoAttack accuracy improvements of 5.99%p, 5.27%p, and 3.90%p over baselines on split CIFAR-10, CIFAR-100, and Tiny ImageNet, respectively.

Conclusion

FLAIR demonstrates that preserving the flatness of the loss landscape is crucial for maintaining adversarial robustness in incremental learning. By leveraging efficient Taylor approximations for distillation, FLAIR provides a strong baseline for future research in ARCIL. Future work will address the computational overhead of adversarial training and explore more task-specific augmentation strategies for large-scale datasets.

Summary updated

Abstract

Adversarial training integrates adversarial examples during model training to enhance robustness. However, its application in fixed dataset settings differs from real-world dynamics, where data accumulates incrementally. In this study, we investigate Adversarially Robust Class Incremental Learning (ARCIL), a method that combines adversarial robustness with incremental learning. We observe that combining incremental learning with naive adversarial training easily leads to a loss of robustness. We discover that this is attributed to the disappearance of the flatness of the loss function, a characteristic of adversarial training. To address this issue, we propose the Flatness Preserving Distillation (FPD) loss that leverages the output difference between adversarial and clean examples. Additionally, we introduce the Logit Adjustment Distillation (LAD) loss, which adapts the model's knowledge to perform well on new tasks. Experimental results demonstrate the superiority of our method over approaches that apply adversarial training to existing incremental learning methods, which provides a strong baseline for incremental learning on adversarial robustness in the future. Our method achieves AutoAttack accuracy that is 5.99\%p, 5.27\%p, and 3.90\%p higher on average than the baseline on split CIFAR-10, CIFAR-100, and Tiny ImageNet, respectively. The code will be made available.

Empirical ResultsBrowse all benchmarks →

BenchmarkMethodMetricScoreProtocol / Evidence
CIFAR-10 · S-CIFAR10FLAIR+Autoattack (AA) performance30.06%+0.25 vs baselinesetting=class-incremental · backbone=ResNet-18 · augmentation=data augmentation · memory-buffer=2000
Source quote
L725: FLAIR+ │ 61.29 │ 33.35 │ 30.06 │ -12.49 │ 38.04 │ 18.03 │ 14.43 │ -8.43 │ 83.83 │ 44.33 │ 40.10 │ -2.74
CIFAR-100 · S-CIFAR100FLAIR+Autoattack (AA) performance14.43%+0.82 vs baselinesetting=class-incremental · backbone=ResNet-18 · augmentation=data augmentation · memory-buffer=2000
Source quote
L725: FLAIR+ │ 61.29 │ 33.35 │ 30.06 │ -12.49 │ 38.04 │ 18.03 │ 14.43 │ -8.43 │ 83.83 │ 44.33 │ 40.10 │ -2.74
SVHN · S-SVHNFLAIR+Autoattack (AA) performance40.10%+6.94 vs baselinesetting=class-incremental · backbone=ResNet-18 · augmentation=data augmentation · memory-buffer=2000
Source quote
L725: FLAIR+ │ 61.29 │ 33.35 │ 30.06 │ -12.49 │ 38.04 │ 18.03 │ 14.43 │ -8.43 │ 83.83 │ 44.33 │ 40.10 │ -2.74
Reported baseline / comparator measurements (3)
BenchmarkMethodMetricScoreProtocol / Evidence
CIFAR-10 · S-CIFAR10R-LUCIR+ baselineAutoattack (AA) performance29.81%setting=class-incremental · backbone=ResNet-18 · augmentation=data augmentation · memory-buffer=2000
Source quote
L723: R-LUCIR+ │ 61.54 │ 31.09 │ 29.81 │ -56.48 │ 29.02 │ 11.68 │ 10.66 │ -35.46 │ 72.51 │ 31.08 │ 26.08 │ -53.11
CIFAR-100 · S-CIFAR100R-iCaRL+ baselineAutoattack (AA) performance13.61%setting=class-incremental · backbone=ResNet-18 · augmentation=data augmentation · memory-buffer=2000
Source quote
L722: R-iCaRL+ │ 55.44 │ 29.03 │ 26.55 │ -10.09 │ 34.75 │ 17.29 │ 13.61 │ -11.90 │ 79.77 │ 33.46 │ 32.12 │ -16.24
SVHN · S-SVHNTABA+ baselineAutoattack (AA) performance33.16%setting=class-incremental · backbone=ResNet-18 · augmentation=data augmentation · memory-buffer=2000
Source quote
L724: TABA+ │ 59.98 │ 26.87 │ 24.97 │ -16.74 │ 33.04 │ 9.88 │ 8.30 │ -17.71 │ 81.37 │ 35.50 │ 33.16 │ -19.93
BibTeX
@misc{cho2023class,
  author = {Seungju Cho and Hongsin Lee and Changick Kim},
  title = {{Class Incremental Learning for Adversarial Robustness}},
  year = {2023},
  eprint = {2312.03289},
  archivePrefix = {arXiv},
  url = {https://arxiv.org/abs/2312.03289},
}
Figure