ROSE: Robust Selective Fine-tuning for Pre-trained Language Models

Lan Jiang, Hao Zhou, Yankai Lin, Peng Li, Jie Zhou +1 more
10/18/2022
cs.CL

Official code: jiangllan/ROSE (5 stars, Python, last commit 2024-04-23).

Abstract

Even though the large-scale language models have achieved excellent performances, they suffer from various adversarial attacks. A large body of defense methods has been proposed.

Show full abstract

However, they are still limited due to redundant attack search spaces and the inability to defend against various types of attacks. In this work, we present a novel fine-tuning approach called \textbf{RO}bust \textbf{SE}letive fine-tuning (\textbf{ROSE}) to address this issue. ROSE conducts selective updates when adapting pre-trained models to downstream tasks, filtering out invaluable and unrobust updates of parameters. Specifically, we propose two strategies: the first-order and second-order ROSE for selecting target robust parameters. The experimental results show that ROSE achieves significant improvements in adversarial robustness on various downstream NLP tasks, and the ensemble method even surpasses both variants above. Furthermore, ROSE can be easily incorporated into existing fine-tuning methods to improve their adversarial robustness further. The empirical analysis confirms that ROSE eliminates unrobust spurious updates during fine-tuning, leading to solutions corresponding to flatter and wider optima than the conventional method. Code is available at \url{https://github.com/jiangllan/ROSE}.

View on arXivView PDF

Code Implementations(1)

jiangllan/ROSEOfficial100%
52Python, ShellOct 16, 20222 years ago

Similar Papers

Cite this paper

@article{jiang2022rose,
  title  = {ROSE: Robust Selective Fine-tuning for Pre-trained Language Models},
  author = {Lan Jiang and Hao Zhou and Yankai Lin and Peng Li and Jie Zhou and Rui Jiang},
  year   = {2022},
  eprint = {2210.09658},
  archivePrefix = {arXiv},
  url    = {https://arxiv.org/abs/2210.09658}
}

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/2210.09658.svg)](https://codeofpaper.com/paper/2210.09658)

Discussion