How Does Adversarial Fine-Tuning Benefit BERT?
arXiv:2108.13602
Abstract
Adversarial training (AT) is one of the most reliable methods for defending against adversarial attacks in machine learning. Variants of this method have been used as regularization mechanisms to achieve SOTA results on NLP benchmarks, and they have been found to be useful for transfer learning and continual learning. We search for the reasons for the effectiveness of AT by contrasting vanilla and adversarially fine-tuned BERT models. We identify partial preservation of BERT's syntactic abilities during fine-tuning as the key to the success of AT. We observe that adversarially fine-tuned models remain more faithful to BERT's language modeling behavior and are more sensitive to the word order. As concrete examples of syntactic abilities, an adversarially fine-tuned model could have an advantage of up to 38% on anaphora agreement and up to 11% on dependency parsing. Our analysis demonstrates that vanilla fine-tuning oversimplifies the sentence representation by focusing heavily on a small subset of words. AT, however, moderates the effect of these influential words and encourages representational diversity. This allows for a more hierarchical representation of a sentence and leads to the mitigation of BERT's loss of syntactic abilities.
References in corpus (24)
- Adam: A Method for Stochastic Optimization
- HuggingFace's Transformers: State-of-the-art Natural Language Processing
- Language Models are Few-Shot Learners
- Adversarial Examples Are Not Bugs, They Are Features
- Assessing BERT's Syntactic Abilities
- FreeLB: Enhanced Adversarial Training for Natural Language Understanding
- What do Neural Machine Translation Models Learn about Morphology?
- Multi-Task Deep Neural Networks for Natural Language Understanding
- Revisiting Few-sample BERT Fine-tuning
- On the Stability of Fine-tuning BERT: Misconceptions, Explanations, and Strong Baselines
- Adversarial Training Methods for Semi-Supervised Text Classification
- Deep learning generalizes because the parameter-function map is biased towards simple functions
- Adversarial Training for Large Neural Language Models
- Right for the Wrong Reasons: Diagnosing Syntactic Heuristics in Natural Language Inference
- Pareto Probing: Trading Off Accuracy for Complexity
- BERT & Family Eat Word Salad: Experiments with Text Understanding
- Visualizing and Understanding the Effectiveness of BERT
- Robust Multilingual Part-of-Speech Tagging via Adversarial Training
- Designing and Interpreting Probes with Control Tasks
- Targeted Syntactic Evaluation of Language Models
- The Low-Rank Simplicity Bias in Deep Networks
- On the proper role of linguistically-oriented deep net analysis in linguistic theorizing
- The Rediscovery Hypothesis: Language Models Need to Meet Linguistics
- Targeted Adversarial Training for Natural Language Understanding