Adversarial Self-Attention for Language Understanding

Hongqiu Wu, Ruixue Ding, Hai Zhao, Pengjun Xie, Fei Huang +1 more
6/25/2022
cs.CLcs.LG
transformer-attention

Official code: gingasan/adversarialSA (8 stars, Python, last commit 2023-03-03).

Abstract

Deep neural models (e.g. Transformer) naturally learn spurious features, which create a ``shortcut'' between the labels and inputs, thus impairing the generalization and robustness.

Show full abstract

This paper advances the self-attention mechanism to its robust variant for Transformer-based pre-trained language models (e.g. BERT). We propose \textit{Adversarial Self-Attention} mechanism (ASA), which adversarially biases the attentions to effectively suppress the model reliance on features (e.g. specific keywords) and encourage its exploration of broader semantics. We conduct a comprehensive evaluation across a wide range of tasks for both pre-training and fine-tuning stages. For pre-training, ASA unfolds remarkable performance gains compared to naive training for longer steps. For fine-tuning, ASA-empowered models outweigh naive models by a large margin considering both generalization and robustness.

View on arXivView PDF

Code Implementations(1)

80PythonFeb 8, 20233 years ago

Similar Papers

Cite this paper

@article{wu2022adversarial,
  title  = {Adversarial Self-Attention for Language Understanding},
  author = {Hongqiu Wu and Ruixue Ding and Hai Zhao and Pengjun Xie and Fei Huang and Min Zhang},
  year   = {2022},
  eprint = {2206.12608},
  archivePrefix = {arXiv},
  url    = {https://arxiv.org/abs/2206.12608}
}

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

Discussion