FreeLB: Enhanced Adversarial Training for Natural Language Understanding

Chen Zhu, Yu Cheng, Zhe Gan, Siqi Sun, Tom Goldstein +1 more
9/25/2019
cs.CLcs.LG

Official code: zhuchen03/FreeLB (252 stars, last commit 2023-09-06).

Abstract

Adversarial training, which minimizes the maximal risk for label-preserving input perturbations, has proved to be effective for improving the generalization of language models. In this work, we propose a novel adversarial training algorithm, FreeLB, that promotes higher invariance in the embedding space, by adding adversarial perturbations to word embeddings and minimizing the resultant adversarial risk inside different regions around input samples. To validate the effectiveness of the proposed approach, we apply it to Transformer-based models for natural language understanding and commonsense reasoning tasks. Experiments on the GLUE benchmark show that when applied only to the finetuning stage, it is able to improve the overall test scores of BERT-base model from 78.3 to 79.4, and RoBERTa-large model from 88.5 to 88.8. In addition, the proposed approach achieves state-of-the-art single-model test accuracies of 85.44\% and 67.75\% on ARC-Easy and ARC-Challenge. Experiments on CommonsenseQA benchmark further demonstrate that FreeLB can be generalized and boost the performance of RoBERTa-large model on other tasks as well. Code is available at \url{https://github.com/zhuchen03/FreeLB .

View on arXivView PDF

Code Implementations(1)

zhuchen03/FreeLBOfficial100%

Adversarial Training for Natural Language Understanding

25239C++, CSSFeb 14, 20203 years ago
adversarialfreelbiclr2020natural-language

Similar Papers

Cite this paper

@article{zhu2019freelb,
  title  = {FreeLB: Enhanced Adversarial Training for Natural Language Understanding},
  author = {Chen Zhu and Yu Cheng and Zhe Gan and Siqi Sun and Tom Goldstein and Jingjing Liu},
  year   = {2019},
  eprint = {1909.11764},
  archivePrefix = {arXiv},
  url    = {https://arxiv.org/abs/1909.11764}
}

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

Discussion