Virtual Data Augmentation: A Robust and General Framework for Fine-tuning Pre-trained Models

Kun Zhou, Wayne Xin Zhao, Sirui Wang, Fuzheng Zhang, Wei Wu +1 more
9/13/2021
cs.CL

Official code: RUCAIBox/VDA (16 stars, Python, last commit 2021-09-13).

Abstract

Recent works have shown that powerful pre-trained language models (PLM) can be fooled by small perturbations or intentional attacks. To solve this issue, various data augmentation techniques are proposed to improve the robustness of PLMs.

Show full abstract

However, it is still challenging to augment semantically relevant examples with sufficient diversity. In this work, we present Virtual Data Augmentation (VDA), a general framework for robustly fine-tuning PLMs. Based on the original token embeddings, we construct a multinomial mixture for augmenting virtual data embeddings, where a masked language model guarantees the semantic relevance and the Gaussian noise provides the augmentation diversity. Furthermore, a regularized training strategy is proposed to balance the two aspects. Extensive experiments on six datasets show that our approach is able to improve the robustness of PLMs and alleviate the performance degradation under adversarial attacks. Our codes and data are publicly available at \textcolor{blue}{\url{https://github.com/RUCAIBox/VDA}}.

View on arXivView PDF

Code Implementations(1)

RUCAIBox/VDAOfficial100%

Virtual Data Augmentation: A Robust and General Framework for Fine-tuning Pre-trained Models

161Python, ShellSep 10, 20215 years ago

Similar Papers

Cite this paper

@article{zhou2021virtual,
  title  = {Virtual Data Augmentation: A Robust and General Framework for Fine-tuning Pre-trained Models},
  author = {Kun Zhou and Wayne Xin Zhao and Sirui Wang and Fuzheng Zhang and Wei Wu and Ji-Rong Wen},
  year   = {2021},
  eprint = {2109.05793},
  archivePrefix = {arXiv},
  url    = {https://arxiv.org/abs/2109.05793}
}

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

Discussion