Flooding-X: Improving BERT's Resistance to Adversarial Attacks via Loss-Restricted Fine-Tuning

被引:0
|
作者
Liu, Qin [1 ]
Zheng, Rui [1 ]
Rong, Bao [1 ]
Liu, Jingyi [1 ]
Liu, ZhiHua [1 ]
Cheng, Zhanzhan [4 ]
Qiao, Liang [4 ]
Gui, Tao [2 ]
Zhang, Qi [1 ,3 ]
Huang, Xuanjing [1 ]
机构
[1] Fudan Univ, Sch Comp Sci, Shanghai, Peoples R China
[2] Fudan Univ, Inst Modern Languages & Linguist, Shanghai, Peoples R China
[3] Shanghai Key Lab Intelligent Informat Proc, Shanghai, Peoples R China
[4] Hikvis Res Inst, Hangzhou, Peoples R China
基金
中国国家自然科学基金;
关键词
D O I
暂无
中图分类号
TP18 [人工智能理论];
学科分类号
081104 ; 0812 ; 0835 ; 1405 ;
摘要
Adversarial robustness has attracted much attention recently, and the mainstream solution is adversarial training. However, the tradition of generating adversarial perturbations for each input embedding (in the settings of NLP) scales up the training computational complexity by the number of gradient steps it takes to obtain the adversarial samples. To address this problem, we leverage Flooding method which primarily aims at better generalization and we find promising in defending adversarial attacks. We further propose an effective criterion to bring hyper-parameter-dependent flooding into effect with a narrowed-down search space by measuring how the gradient steps taken within one epoch affect the loss of each batch. Our approach requires zero adversarial sample for training, and its time consumption is equivalent to fine-tuning, which can be 2-15 times faster than standard adversarial training. We experimentally show that our method improves BERT's resistance to textual adversarial attacks by a large margin, and achieves state-of-the-art robust accuracy on various text classification and GLUE tasks.
引用
收藏
页码:5634 / 5644
页数:11
相关论文
共 5 条
  • [1] Improving Generalization of Adversarial Training via Robust Critical Fine-Tuning
    Zhu, Kaijie
    Hu, Xixu
    Wang, Jindong
    Xie, Xing
    Yang, Ge
    2023 IEEE/CVF INTERNATIONAL CONFERENCE ON COMPUTER VISION, ICCV, 2023, : 4401 - 4411
  • [2] Improving BERT Fine-Tuning via Self-Ensemble and Self-Distillation
    Yi-Ge Xu
    Xi-Peng Qiu
    Li-Gao Zhou
    Xuan-Jing Huang
    Journal of Computer Science and Technology, 2023, 38 : 853 - 866
  • [3] Improving BERT Fine-Tuning via Self-Ensemble and Self-Distillation
    Xu, Yi-Ge
    Qiu, Xi-Peng
    Zhou, Li-Gao
    Huang, Xuan-Jing
    JOURNAL OF COMPUTER SCIENCE AND TECHNOLOGY, 2023, 38 (04) : 853 - 866
  • [4] Improving generative adversarial network inversion via fine-tuning GAN encoders
    Yu, Cheng
    Wang, Wenmin
    Bugiolacchi, Roberto
    APPLIED SOFT COMPUTING, 2024, 166
  • [5] Significantly improving zero-shot X-ray pathology classification via fine-tuning pre-trained image-text encoders
    Jang, Jongseong
    Kyung, Daeun
    Kim, Seung Hwan
    Lee, Honglak
    Bae, Kyunghoon
    Choi, Edward
    SCIENTIFIC REPORTS, 2024, 14 (01):