AttentionDrop: A Novel Regularization Method for Transformer Models

Mirza Samad Ahmed Baig, Syeda Anshrah Gillani, Abdul Akbar Khan, Shahid Munir Shah, Muhammad Omer Khan
4/16/2025
cs.CVcs.AIcs.LG

No confident code implementation found for this paper.

Abstract

Transformer-based architectures achieve state-of-the-art performance across a wide range of tasks in natural language processing, computer vision, and speech processing. However, their immense capacity often leads to overfitting, especially when training data is limited or noisy. In this research, a unified family of stochastic regularization techniques has been proposed, i.e. AttentionDrop with its three different variants, which operate directly on the self-attention distributions. Hard Attention Masking randomly zeroes out top-k attention logits per query to encourage diverse context utilization, Blurred Attention Smoothing applies a dynamic Gaussian convolution over attention logits to diffuse overly peaked distributions, and Consistency-Regularized AttentionDrop enforces output stability under multiple independent AttentionDrop perturbations via a KL-based consistency loss. Results achieved in the study demonstrate that AttentionDrop consistently improves accuracy, calibration, and adversarial robustness over standard Dropout, DropConnect, and R-Drop baselines

View on arXivView PDF

Code Implementations

No confident code match yet

We couldn't find an author-owned or strongly-evidenced community implementation for this paper. Any repos shown below are weak matches — verify before relying on them.

No code implementations found yet.

Know of an implementation? Let us know in the comments below!

Similar Papers

Cite this paper

@article{baig2025attentiondrop,
  title  = {AttentionDrop: A Novel Regularization Method for Transformer Models},
  author = {Mirza Samad Ahmed Baig and Syeda Anshrah Gillani and Abdul Akbar Khan and Shahid Munir Shah and Muhammad Omer Khan},
  year   = {2025},
  eprint = {2504.12088},
  archivePrefix = {arXiv},
  url    = {http://arxiv.org/abs/2504.12088v2}
}

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

Discussion