Enhancing Adversarial Training via Reweighting Optimization Trajectory

Tianjin Huang, Shiwei Liu, Tianlong Chen, Meng Fang, Li Shen, Vlado Menkovski, Lu Yin, Yulong Pei, Mykola Pechenizkiy

Abstract

Adversarial training (AT) is the primary defense against adversarial attacks, yet it frequently suffers from "robust overfitting," where models generalize poorly to unseen adversarial examples after learning rate decay. We introduce Weighted Optimization Trajectories (WOT), a novel approach that refines the model's optimization path. WOT learns to combine historical weight updates using weights optimized on a small hold-out set of unseen data. This strategy encourages the model to converge toward flatter regions of the loss landscape, enhancing generalization. Our experiments demonstrate that WOT consistently improves robust accuracy across various benchmarks and architectures, effectively mitigating robust overfitting.

Introduction

Deep neural networks are highly susceptible to adversarial attacks—small, intentional perturbations that cause misclassification. While Adversarial Training (AT) improves robustness by incorporating these examples into the training process, it often leads to robust overfitting. In this phenomenon, the model's performance on test adversarial examples degrades significantly even as training performance improves. Existing solutions like Stochastic Weight Averaging (SWA) offer partial relief but do not fully bridge the gap. This research addresses the need for optimization strategies that find more stable and generalizable regions in the loss landscape.

Methodology: Weighted Optimization Trajectories (WOT)

The core idea of WOT is to treat the training process not just as a sequence leading to a final point, but as a trajectory of updates that can be optimally recombined.

Overview of the Weighted Optimization Trajectories (WOT) framework.

The WOT framework consists of four main components:

  1. Trajectory Collection: Weight updates ($\Delta w$) are saved at regular intervals (Gaps) during the training process.
  2. Reweighting: Instead of simple averaging, each update is assigned a learnable weight ($\alpha$). The refined model is a weighted sum of these historical steps added to the initial weights.
  3. Optimization on Unseen Data: The weights ($\alpha$) are optimized to maximize robust accuracy on a small, separate hold-out set. This ensures the weighting scheme prioritizes updates that contribute to generalization rather than those that merely fit training noise.
  4. Block-wise Refinement (WOT-B): To account for the varying roles of different network layers, WOT-B applies unique weights to different architectural blocks (e.g., layers in a ResNet), significantly increasing the flexibility of the optimization.

Experimental Results

The effectiveness of WOT was evaluated on standard benchmarks including CIFAR-10, CIFAR-100, SVHN, and Tiny-ImageNet.

Robust accuracy (%) of WOT compared to baseline adversarial training methods on CIFAR-10.

Key Findings

  • Performance Gains: On CIFAR-10, WOT-B improved the robust accuracy of standard AT-PGD by 1.53% and clean accuracy by 0.55%.
  • Stability Against Overfitting: Unlike standard AT, which often sees a sharp drop in test performance after learning rate decay, WOT-trained models maintain stable robust accuracy throughout the training duration.
  • Broad Compatibility: WOT consistently enhances various base AT methods, including TRADES, MART, and AWP. Under the rigorous AutoAttack (AA) benchmark, WOT-B achieved state-of-the-art results across multiple architectures like WideResNet-34 and ResNet-18.

Discussion and Conclusion

The success of WOT is attributed to its ability to guide the model toward "flatter" minima in the loss landscape. Flatter regions are empirically linked to better generalization in deep learning and are particularly vital for maintaining robustness against diverse adversarial perturbations. By leveraging a hold-out set to tune trajectory weights, WOT explicitly targets the generalization gap.

While WOT introduces some memory overhead for storing weight updates and requires a small validation set, its ability to significantly reduce robust overfitting makes it a powerful tool for building reliable neural networks. Future work may explore applying trajectory reweighting to other domains such as multi-task learning and domain adaptation.

Summary updated

BibTeX
@inproceedings{huang2023enhancing,
  author = {Tianjin Huang and Shiwei Liu and Tianlong Chen and Meng Fang and Li Shen and Vlado Menkovski and Lu Yin and Yulong Pei and Mykola Pechenizkiy},
  title = {{Enhancing Adversarial Training via Reweighting Optimization Trajectory}},
  booktitle = {ECML/PKDD},
  year = {2023},
  doi = {10.1007/978-3-031-43412-9\_7},
}
Figure