mlsanityData to 14 Oct 2026

AtPatch: Debugging Transformers via Hot-Fixing Over-Attention

arXiv 2601.21695 ↗First posted 29 Jan 2026cs.SEcited by 1

On the map: LLM safety and security → Backdoor and data poisoning attacks

Abstract (arXiv)

Transformer-based deep neural networks (DNNs) affected by backdoor attacks and unfairness typically exhibit anomalous attention patterns, leading to over-attend to backdoor triggers or protected attributes. Existing neuron-editing mitigation strategies often struggle to handle such situation and most of them lack flexibility and tend to distort feature representations. Motivated by such over-attention phenomenon and software engineering paradigms such as delta debugging and hot patching, we propose AtPatch, a hot-fix method that dynamically redistributes attention maps during model inference. Specifically, for a given input, AtPatch first extracts the attention map from the model's inference process. Then, it uses a pre-trained detector to identify anomalous columns and replace them with unified benign attention. Then, AtPatch rescales other columns to mitigate the impact of over-attention. Finally, AtPatch returns the redistributed attention map to the model for continued inference. Notably, if the detector does not report any anomalous columns, AtPatch directly returns the original attention map to the model. Unlike existing techniques, AtPatch selectively redistributes the attention map, making it better at preserving the model's original functionality. Furthermore, AtPatch's on-the-fly nature allows it to work without modifying model parameters or retraining, making it better suited for deployed models. We conducted extensive experiments to validate AtPatch. Experimental results show that, compared to existing methods, AtPatch can more effectively mitigate backdoor attacks and unfairness while better preserving the model's original functionality.

Key facts. Cited by 1 paper in the map (data through 14 Oct 2026). Placed in Backdoor and data poisoning attacks, one of 12 directions in LLM safety and security. Builds on 28 of its 62 references that are in the map. First posted on arXiv 29 Jan 2026.

Builds on

28 of 62 references.

Closest ancestors · 1

Same direction, newest first

  1. 2022Causality-based Neural Network Repair20 Apr

Other references · 27

  1. 2017Attention Is All You Needcited by 60,361
  2. 2018BERT: Pre-training of Deep Bidirectional Transformers for Language Understandingcited by 40,399
  3. 2020An Image is Worth 16x16 Words: Transformers for Image Recognition at Scalecited by 30,186
  4. 2021Swin Transformer: Hierarchical Vision Transformer using Shifted Windowscited by 12,139
  5. 2020A Simple Framework for Contrastive Learning of Visual Representationscited by 12,049
  6. 2017Fashion-MNIST: a Novel Image Dataset for Benchmarking Machine Learning Algorithmscited by 4,349
  7. 2017CARLA: An Open Urban Driving Simulatorcited by 2,449
  8. 2021Tokens-to-Token ViT: Training Vision Transformers from Scratch on ImageNetcited by 1,101
  9. 2019What Does BERT Look At? An Analysis of BERT's Attentioncited by 1,003
  10. 2020A Primer in BERTology: What we know about how BERT workscited by 815
  11. 2021Revisiting Deep Learning Models for Tabular Datacited by 740
  12. 2021Knowledge Neurons in Pretrained Transformerscited by 601
15 more
  1. 2019STRIP: A Defence Against Trojan Attacks on Deep Neural Networkscited by 459
  2. 2020TabTransformer: Tabular Data Modeling Using Contextual Embeddingscited by 409
  3. 2020TaBERT: Pretraining for Joint Understanding of Textual and Tabular Datacited by 398
  4. 2019Hidden Trigger Backdoor Attackscited by 371
  5. 2017DeepXplore: Automated Whitebox Testing of Deep Learning Systemscited by 311
  6. 2017DeepTest: Automated Testing of Deep-Neural-Network-driven Autonomous Carscited by 251
  7. 2019Analyzing the Structure of Attention in a Transformer Language Modelcited by 243
  8. 2021Adversarial Neuron Pruning Purifies Backdoored Deep Modelscited by 235
  9. 2020BadNL: Backdoor Attacks against NLP Models with Semantic-preserving Improvementscited by 211
  10. 2018DeepGauge: Multi-Granularity Testing Criteria for Deep Learning Systemscited by 147
  11. 2017Fairness Testing: Testing Software for Discriminationcited by 126
  12. 2019Do Attention Heads in BERT Track Syntactic Dependencies?cited by 88
  13. 2018DeepMutation: Mutation Testing of Deep Learning Systemscited by 67
  14. 2019NeuronInspect: Detecting Backdoors in Neural Networks via Output Explanationscited by 50
  15. 2024NeuFair: Neural Network Fairness Repair with Dropoutcited by 11

Built on by

Cited by year (2026 to 14 Oct)

Citing papers per year: 2026: 1.

1 paper.

Similar, not cited

Close in wording, no citation either way

  1. 2021Neural Attention Distillation: Erasing Backdoor Triggers from Deep Neural Networks
  2. 2026When Attention Betrays: Erasing Backdoor Attacks in Robotic Policies by Reconstructing Visual Tokens
  3. 2026EntropyScan: Towards Model-level Backdoor Detection in LVLMs via Visual Attention Entropy
  4. 2026Corrupting Attention: Evasion-Based Adversarial Attacks on Encoder Attention in Detection Transformers
  5. 2026Test-Time Attention Purification for Backdoored Large Vision Language Models
  6. 2025Vision Transformers Don't Need Trained Registers
  7. 2023AttMEMO : Accelerating Transformers with Memoization on Big Memory Systems
  8. 2025Value-State Gated Attention for Mitigating Extreme-Token Phenomena in Transformers