TWINS: A Fine-Tuning Framework for Improved Transferability of Adversarial Robustness and Generalization

Ziquan Liu, Yi Xu, Xiangyang Ji, Antoni B. Chan
3/20/2023
cs.LGcs.CV

Official code: ziquanliu/CVPR2023-TWINS (13 stars, last commit 2023-04-26).

Abstract

Recent years have seen the ever-increasing importance of pre-trained models and their downstream training in deep learning research and applications. At the same time, the defense for adversarial examples has been mainly investigated in the context of training from random initialization on simple classification tasks. To better exploit the potential of pre-trained models in adversarial robustness, this paper focuses on the fine-tuning of an adversarially pre-trained model in various classification tasks. Existing research has shown that since the robust pre-trained model has already learned a robust feature extractor, the crucial question is how to maintain the robustness in the pre-trained model when learning the downstream task. We study the model-based and data-based approaches for this goal and find that the two common approaches cannot achieve the objective of improving both generalization and adversarial robustness. Thus, we propose a novel statistics-based approach, Two-WIng NormliSation (TWINS) fine-tuning framework, which consists of two neural networks where one of them keeps the population means and variances of pre-training data in the batch normalization layers. Besides the robust information transfer, TWINS increases the effective learning rate without hurting the training stability since the relationship between a weight norm and its gradient norm in standard batch normalization layer is broken, resulting in a faster escape from the sub-optimal initialization and alleviating the robust overfitting. Finally, TWINS is shown to be effective on a wide range of image classification datasets in terms of both generalization and robustness. Our code is available at https://github.com/ziquanliu/CVPR2023-TWINS.

View on arXivView PDF

Code Implementations(1)

Official code for "TWINS: A Fine-Tuning Framework for Improved Transferability of Adversarial Robustness and Generalization", CVPR 2023

134Shell, PythonMar 20, 20233 years ago

Similar Papers

Cite this paper

@article{liu2023twins,
  title  = {TWINS: A Fine-Tuning Framework for Improved Transferability of Adversarial Robustness and Generalization},
  author = {Ziquan Liu and Yi Xu and Xiangyang Ji and Antoni B. Chan},
  year   = {2023},
  eprint = {2303.11135},
  archivePrefix = {arXiv},
  url    = {http://arxiv.org/abs/2303.11135v1},
  journal = {CVPR 2023 2023}
}

Add a badge to your README

Shows whether official code is linked for this paper.

Code of Paper badge
[![Code of Paper](https://codeofpaper.com/badge/2303.11135.svg)](https://codeofpaper.com/paper/2303.11135)

Discussion