NeurIPS 2026Coming to NeurIPS?Explore papers, orals & directions

DropAttention: A Regularization Method for Fully-Connected Self-Attention Networks

Zehui Lin, Pengfei Liu, Luyao Huang, Junkun Chen, Xipeng Qiu, Xuanjing HuangarXiv 2019

Introduction

Transformers have revolutionized natural language processing through the self-attention mechanism. However, these powerful architectures are prone to overfitting, particularly in the attention layers where the model may fixate on specific, highly correlated tokens rather than the broader context. While standard dropout is a staple in neural network training, it is typically applied to the outputs of attention layers rather than the attention weights themselves. This paper introduces DropAttention, a specialized regularization technique designed to directly address feature co-adaptation within self-attention matrices.

The DropAttention Mechanism

Standard dropout randomly zeroes out individual units, but in the context of language, adjacent words often share significant semantic overlap. To prevent the model from simply "recovering" dropped information from neighboring tokens, DropAttention introduces the concept of dropping contiguous regions of attention weights.

The authors propose two primary variants of this method:

  1. DropAttention(c): This variant drops entire columns in the attention weight matrix. By doing so, it effectively removes the entire contextualized vector for a specific token, forcing the model to rely on other parts of the sequence.
  2. DropAttention(e): This variant drops individual elements or contiguous blocks of elements within the matrix, providing a more granular level of regularization.
Visualization of DropAttention variants: (a) dropping columns (c) and (b) dropping elements (e).

To ensure stability during training, DropAttention employs Normalized Rescaling. Since attention weights are probabilities that must sum to 1, the remaining weights are dynamically re-normalized after the drop operation. This prevents the training process from becoming unstable due to shifting weight scales.

Key Insights: Diversity and Disagreement

DropAttention improves model robustness by encouraging two types of diversity within the network:

  • Intra-Diversity (Smoother Attention): By penalizing reliance on single dominant tokens, the method increases the entropy of the attention distribution. This results in "smoother" attention where the model considers a wider array of contextual clues.
  • Inter-Diversity (Head Independence): In multi-head attention, different heads should ideally learn distinct representations. DropAttention increases the "disagreement" between heads. Because each head is regularized to be less sharp, the model is forced to utilize the unique perspectives of multiple heads rather than relying on a single dominant one.
Disagreement scores between attention heads, showing increased diversity with DropAttention compared to the baseline (w/o).

Experimental Results

The effectiveness of DropAttention was validated across a broad spectrum of NLP tasks, demonstrating consistent performance gains over standard Transformer baselines:

  • Text Classification: On the Yelp13 dataset, accuracy improved from 61.49% to 62.34%. Similar gains were observed in AG's News and other classification benchmarks.
  • Sequence Labeling: The method showed significant improvements in Chunking (+1.76 F1) and Named Entity Recognition (NER) (+0.40 F1).
  • Textual Entailment: Accuracy on the SNLI dataset rose from 83.36% to 84.48%.
  • Machine Translation: For the WMT'16 English-German task, adding DropAttention(e) to a baseline Transformer increased the BLEU score from 27.30 to 28.32.

Crucially, DropAttention is not intended to replace standard dropout; rather, the two methods are complementary. The best results were consistently achieved when using both techniques in tandem.

Conclusion and Future Work

DropAttention provides a targeted regularization strategy for self-attention networks by forcing models to look beyond local correlations. While the method introduces new hyperparameters—specifically the drop rate ($p$) and window size ($w$)—the resulting improvements in generalization and head diversity make it a valuable tool for training robust Transformer models. Future research may explore the application of DropAttention to modern large language models (LLMs) to further enhance their ability to utilize long-range context.

Summary updated

BibTeX
@misc{lin2019dropattention,
  author = {Zehui Lin and Pengfei Liu and Luyao Huang and Junkun Chen and Xipeng Qiu and Xuanjing Huang},
  title = {{DropAttention: A Regularization Method for Fully-Connected Self-Attention Networks}},
  year = {2019},
  eprint = {1907.11065},
  archivePrefix = {arXiv},
  url = {https://arxiv.org/abs/1907.11065},
}
Figure