Papers › Adversarial Self-Attention for Language Understanding

Adversarial Self-Attention for Language Understanding

25 Jun 2022arXiv:2206.12608archive 2025-07-28

Hongqiu Wu, Ruixue Ding, Hai Zhao, Pengjun Xie, Fei Huang, Min Zhang

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. 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.

PaperPDFCode

Code

gingasan/adversarialsa officialmentioned in papermentioned on GitHubpytorch report

Repository list and official/mentioned flags are the archive's, frozen 2025-07-28. Reachability, where shown, is from one Syntology probe window (2026-09-16 to 2026-09-18); repositories not probed show nothing. GitHub stars are not tracked.

Code Syntology ran Syntology

Not run by Syntology. Nothing on this page verifies that the listed code works.

Tasks

Machine Reading ComprehensionNamed Entity Recognition (NER)Natural Language InferenceParaphrase IdentificationSemantic SimilaritySemantic Textual SimilaritySentiment Analysis

Results from the paper archive 2025-07-28

TaskDatasetModelMetricValueRank at snapshotLeaderboardReport
Machine Reading Comprehension DREAM ASA + RoBERTa Accuracy 69.2 #1 of 3 Archive leaderboard report
Machine Reading Comprehension DREAM ASA + BERT-base Accuracy 64.3 #3 of 3 Archive leaderboard report
Named Entity Recognition (NER) WNUT 2017 ASA + RoBERTa F1 57.3 #8 of 23 Archive leaderboard report
Named Entity Recognition (NER) WNUT 2017 ASA + BERT-base F1 49.8 #17 of 23 Archive leaderboard report
Natural Language Inference MultiNLI ASA + RoBERTa Matched 88 #18 of 67 Archive leaderboard report
Natural Language Inference MultiNLI ASA + BERT-base Matched 85 #30 of 67 Archive leaderboard report
Natural Language Inference QNLI ASA + RoBERTa Accuracy 93.6% #20 of 43 Archive leaderboard report
Natural Language Inference QNLI ASA + BERT-base Accuracy 91.4% #28 of 43 Archive leaderboard report
Paraphrase Identification Quora Question Pairs ASA + RoBERTa F1 73.7 #8 of 31 Archive leaderboard report
Paraphrase Identification Quora Question Pairs ASA + BERT-base F1 72.3 #11 of 31 Archive leaderboard report
Semantic Textual Similarity STS Benchmark ASA + RoBERTa Spearman Correlation 0.892 #31 of 66 Archive leaderboard report
Semantic Textual Similarity STS Benchmark ASA + BERT-base Spearman Correlation 0.865 #44 of 66 Archive leaderboard report
Sentiment Analysis SST-2 Binary classification ASA + RoBERTa Accuracy 96.3 #17 of 87 Archive leaderboard report
Sentiment Analysis SST-2 Binary classification ASA + BERT-base Accuracy 94.1 #36 of 87 Archive leaderboard report

Ranks are positions in the archive's leaderboards as they stood at the 2025-07-28 snapshot. Results published since then are not among these rows, so a rank here is not a current standing.

Methods

Absolute Position EncodingsAdamAttentionBPEDense ConnectionsDropoutLabel SmoothingLayer NormalizationLinear LayerMulti-Head AttentionPosition-Wise Feed-Forward LayerResidual ConnectionSoftmaxTransformer

Report a problem or propose a change · a person checks every report against the paper or source before anything changes; decisions are listed on /corrections