mlsanityData to 24 Nov 2026

DetectViT: Test-time Backdoor Detection for Vision Transformers via Inter-Head Attention Discrepancy

arXiv 2611.23770 ↗Submitted 18 Nov 2026Announced 19 Nov 2026cs.CV cs.CRcited by 0

On the map: LLM safety and security → Vision-language and text-to-image safety also fits: Backdoor and data poisoning attacks

Abstract (arXiv)

Vision Transformers (ViTs) now underpin the visual encoders of most multimodal models, but this success comes at a cost: relying on third-party pretrained checkpoints leaves these systems open to backdoor attacks. Existing test-time detection methods rely on either the predicted label or intermediate embeddings, limiting their applicability across diverse tasks and incurring substantial computational overhead. In this work, we study how backdoor triggers affect the multi-head attention mechanism of ViTs and identify two distinct anomalous patterns: textitcomplete attention hijacking, causing the attention to exhibit abnormally high inter-head spatial overlap, and textitpartial attention hijacking, causing an abnormally large variance in the concentration of the attention distribution. Motivated by these findings, we propose DetectViT, a test-time backdoor detection method that requires neither training data, model outputs, nor any prior knowledge of the trigger. DetectViT quantifies the two hijacking phenomena via an inter-head consistency score and an inter-head entropy variance score, with thresholds estimated from a small out-of-distribution (OOD) calibration set drawn from an arbitrary source. Across four representative attacks, diverse architectures (DeiT, CLIP, and LLaVA), and downstream tasks (image classification and captioning), DetectViT substantially outperforms all baselines with as few as 64--128 OOD calibration samples, achieving a true positive rate of 100% and a false positive rate of 0.17% on BadCLIP. Notably, it introduces negligible additional overhead by relying solely on attention weights already computed during inference. Code is available at: https://github.com/siquanhuang/DetectViT.

Key facts. No citing papers in the map yet (data through 24 Nov 2026). Placed in Vision-language and text-to-image safety, one of 12 directions in LLM safety and security. Builds on 47 of its 63 references that are in the map. Submitted 18 Nov 2026, announced 19 Nov 2026.

Builds on

47 of 63 references.

References · 47

  1. 2017Attention Is All You Needcited by 62,125
  2. 2021Learning Transferable Visual Models From Natural Language Supervisioncited by 34,995
  3. 2020An Image is Worth 16x16 Words: Transformers for Image Recognition at Scalecited by 31,277
  4. 2021Swin Transformer: Hierarchical Vision Transformer using Shifted Windowscited by 12,365
  5. 2025Qwen3 Technical Reportcited by 9,994
  6. 2021Emerging Properties in Self-Supervised Vision Transformerscited by 7,264
  7. 2020Training data-efficient image transformers & distillation through attentioncited by 4,687
  8. 2023Improved Baselines with Visual Instruction Tuningcited by 4,605
  9. 2024Qwen2-VL: Enhancing Vision-Language Model's Perception of the World at Any Resolutioncited by 4,474
  10. 2022BLIP: Bootstrapping Language-Image Pre-training for Unified Vision-Language Understanding and Generationcited by 4,411
  11. 2023Qwen Technical Reportcited by 3,545
  12. 2014CIDEr: Consensus-based Image Description Evaluationcited by 2,097
35 more
  1. 2025Gemma 3 Technical Reportcited by 2,058
  2. 2021Pyramid Vision Transformer: A Versatile Backbone for Dense Prediction without Convolutionscited by 1,983
  3. 2015Microsoft COCO Captions: Data Collection and Evaluation Servercited by 1,509
  4. 2022CoCa: Contrastive Captioners are Image-Text Foundation Modelscited by 1,323
  5. 2017BadNets: Identifying Vulnerabilities in the Machine Learning Model Supply Chaincited by 1,162
  6. 2017Targeted Backdoor Attacks on Deep Learning Systems Using Data Poisoningcited by 1,101
  7. 2021Scaling Vision Transformerscited by 1,026
  8. 2023Scaling Vision Transformers to 22 Billion Parameterscited by 720
  9. 2021MobileViT: Light-weight, General-purpose, and Mobile-friendly Vision Transformercited by 656
  10. 2019STRIP: A Defence Against Trojan Attacks on Deep Neural Networkscited by 471
  11. 2019Label-Consistent Backdoor Attackscited by 308
  12. 2022Multimodal Contrastive Learning with LIMoE: the Language-Image Mixture of Expertscited by 213
  13. 2021Rethinking the Backdoor Attacks' Triggers: A Frequency Perspectivecited by 166
  14. 2022BackdoorBench: A Comprehensive Benchmark of Backdoor Learningcited by 130
  15. 2021BadEncoder: Backdoor Attacks to Pre-trained Encoders in Self-Supervised Learningcited by 127
  16. 2023BadCLIP: Dual-Embedding Guided Backdoor Attack on Multimodal Contrastive Learningcited by 122
  17. 2023SCALE-UP: An Efficient Black-box Input-level Backdoor Detection via Analyzing Scaled Prediction Consistencycited by 101
  18. 2022Mugs: A Multi-Granular Self-Supervised Learning Frameworkcited by 58
  19. 2023Detecting Backdoors in Pre-trained Encoderscited by 58
  20. 2023Detecting Backdoors During the Inference Stage Based on Corruption Robustness Consistencycited by 49
  21. 2024Core Knowledge Deficits in Multi-Modal Language Modelscited by 40
  22. 2024Backdooring Vision-Language Models with Out-Of-Distribution Datacited by 38
  23. 2025Backdoor Cleaning without External Guidance in MLLM Fine-tuningcited by 37
  24. 2022TrojViT: Trojan Insertion in Vision Transformerscited by 32
  25. 2023ASSET: Robust Backdoor Data Detection Across a Multiplicity of Deep Learning Paradigmscited by 30
  26. 2023Diverse Cotraining Makes Strong Semi-Supervised Segmentorcited by 28
  27. 2021More than Encoder: Introducing Transformer Decoder to Upsamplecited by 27
  28. 2023Multi-metrics adaptively identifies backdoors in Federated learningcited by 24
  29. 2022Defending Backdoor Attacks on Vision Transformer via Patch Processingcited by 21
  30. 2025Stealthy Backdoor Attack in Self-Supervised Learning Vision Encoders for Large Vision Language Modelscited by 19
  31. 2023Activation Gradient based Poisoned Sample Detection Against Backdoor Attackscited by 13
  32. 2021DBIA: Data-free Backdoor Injection Attack against Transformer Networkscited by 10
  33. 2024DeDe: Detecting Backdoor Samples for SSL Encoders via Decoderscited by 9
  34. 2024Backdoor Attack Against Vision Transformers via Attention Gradient-Based Image Erosioncited by 3
  35. 2026BackdoorIDS: Zero-shot Backdoor Detection for Pretrained Vision Encodercited by 2

Built on by

Not cited yet.

Similar, not cited

Close in wording, no citation either way

  1. 2026PASTA: A Patch-Agnostic Twofold-Stealthy Backdoor Attack on Vision Transformers
  2. 2026Backdoor Directions in Vision Transformers
  3. 2026EntropyScan: Towards Model-level Backdoor Detection in LVLMs via Visual Attention Entropy
  4. 2026Test-Time Attention Purification for Backdoored Large Vision Language Models
  5. 2026Follow My Eyes: Backdoor Attacks on Goal-Directed Scanpath Prediction ↗
  6. 2026When Attention Betrays: Erasing Backdoor Attacks in Robotic Policies by Reconstructing Visual Tokens
  7. 2024One Pixel is All I Need
  8. 2026TMT: Runtime Backdoor Detection for Vision-Language-Action Policies on Unseen Tasks