Corrupting Attention: Evasion-Based Adversarial Attacks on Encoder Attention in Detection Transformers

Ridma Jayasundara, Shaheer Mohamed, Tharindu Fernando, Harshala Gammulle, Basura Fernando +4 more
8/7/2026
cs.CVcs.LG
transformer-attention

No confident code implementation found for this paper.

Abstract

Adversarial vulnerabilities remain a major concern for the safe deployment of neural networks, particularly in object detection, a core task embedded in many safety-critical systems. Detection transformers have emerged as leading object detectors, yet their adversarial robustness remains comparatively underexplored.

Show full abstract

Most existing attacks target the detection output rather than the attention mechanism that makes these models distinctive. In this paper, we introduce the first attack that directly optimizes an encoder-attention objective under an imperceptible, bounded $\ell_\infty$ perturbation. Rather than introducing an attacker-owned sink token through a visible patch, it drives the model's own attention toward a corrupted target. We argue that encoder attention concentrates the model's spatial reasoning, so corrupting it propagates through the detection pipeline more disruptively than perturbing the detection output alone. Our attack reduces DETR-R50 mAP on COCO from 42.1 to 0.97, a $\sim 4\times$ reduction in resulting mAP over the strongest existing attack under an identical perturbation budget and iteration count. We further show that this vulnerability is not specific to a particular corruption objective: across four qualitatively distinct targets, dispersion, re-ranking, permutation, and peak-suppression, detection consistently drops below 3 mAP, suggesting that the weakness arises from disrupting the attention structure itself rather than from any single target. Finally, we demonstrate that the attack generalizes across attention formulations, reducing DINO-Swin-L from 56.8 to 1.44 mAP against 7.3 for the strongest prior attack, establishing state-of-the-art on both dense and deformable attention.

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{jayasundara2026corrupting,
  title  = {Corrupting Attention: Evasion-Based Adversarial Attacks on Encoder Attention in Detection Transformers},
  author = {Ridma Jayasundara and Shaheer Mohamed and Tharindu Fernando and Harshala Gammulle and Basura Fernando and Sanka Rasnayake and A V Subramanyam and Sridha Sridharan and Clinton Fookes},
  year   = {2026},
  eprint = {2608.06674},
  archivePrefix = {arXiv},
  url    = {http://arxiv.org/abs/2608.06674v1}
}

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

Discussion