Elamur Research⌕
☰
home / papers / 2026 / Attention Under Attack: Analog Noise Effects and Mechanistic Vulnerabilities in Transformer Models

Attention Under Attack: Analog Noise Effects and Mechanistic Vulnerabilities in Transformer Models

Paper · 2026 · Mafizur Rahman and Lijun Qian

Summary

Analog in-memory computing (AIMC) could make transformer inference far more energy-efficient. However, its hardware noise has mostly been studied on CNNs for vision, so its effect on attention in NLP models is unclear. Physical analog chips are also hard to access. The authors therefore run a pre-deployment robustness study in IBM's AIHWKIT simulator, calibrated to PCM-style devices. All linear layers are converted to analog operators with coupled non-idealities: ADC/DAC quantization, programming, read and output noise, and drift with global compensation. Pretrained models are evaluated without any fine-tuning.

The analysis has three levels:

  • end-to-end task scores;
  • isolation of single submodules (Q, K, V, attention output, FFN), with every other layer kept noise-free;
  • per-head and per-layer changes in attention, measured with KL divergence and entropy shift.

Overall degradation is noticeable but not catastrophic, and extractive QA suffers more than classification. Q/K/V projections are the weakest components, while FFN layers are comparatively robust. Damage grows in deeper layers, where attention becomes more diffuse. The results give hardware designers concrete targets for noise-resilient analog NLP transformers.

Key points

  • Models and tasks:
    • Encoders BERT-base, DistilBERT, ALBERT, RoBERTa-base and DeBERTa-large were tested on SST-2, MNLI and SQuAD v1.1.
    • Decoders Phi-3-mini and LLaMA-3.2-1B (8-bit) were tested zero-shot on ARC-Easy.
  • Simulation setup: AIHWKIT v0.9.2 with tile size 256, weight-modifier std 0.05, read noise 0.0175 and output noise 0.04. Results are averaged over three seeds.
  • Encoder results: Most encoders lose about 1–3 points on the classification tasks. On SQuAD, RoBERTa and DeBERTa lose roughly 3–6 points.
  • Decoder results: On ARC-Easy, the decoder LLMs drop about 1.3–2.6 points at low-to-medium noise and roughly 6–7 points when noise is doubled.
  • Attention behaviour (RoBERTa on QA): KL divergence rises steadily with depth and is highest in the final layers. A few heads are especially fragile. Most affected heads show positive entropy change, meaning attention scatters and token routing is disrupted.

Our summary of the paper, in our own words — not its text. The work belongs to its authors; read it at the links above.

 Institutions

Also on the byline: Prairie View A&M University.

 Fields, topics and concepts

Cite

Cite as Mafizur Rahman and Lijun Qian. 2026. Attention Under Attack: Analog Noise Effects and Mechanistic Vulnerabilities in Transformer Models. Proceedings of the 64th Annual Meeting of the Association for Computational Linguistics (Volume 2: Short Papers).

The paper itself, not this page. BibTeX from the library's record of the work. DOI 10.18653/v1/2026.acl-short.21

@inproceedings{rahman2026attention,
  title = {{Attention Under Attack: Analog Noise Effects and Mechanistic Vulnerabilities in Transformer Models}},
  author = {Mafizur Rahman and Lijun Qian},
  booktitle = {Proceedings of the 64th Annual Meeting of the Association for Computational Linguistics (Volume 2: Short Papers)},
  year = {2026},
  doi = {10.18653/v1/2026.acl-short.21},
  url = {https://doi.org/10.18653/v1/2026.acl-short.21}
}

References

32 references, 10 of them with a card of ours. ↗ leads to the work, «find» searches for one we have no id for yet.

  1. Stefano Ambrogio, Pritish Narayanan, Atsuya Okazaki, Andrea Fasoli, Charles Mackin, Kohji Hosokawa, Akiyo Nomura, Takeo Yasuda, An Chen, A Friz, and 1 others. 2023. An analog-ai chip for energy-efficient speech recognition and transcription. Nature, 620(7975):768–775. find
  2. David Brooks, Martin M Frank, Tayfun Gokmen, Udit Gupta, X Sharon Hu, Shubham Jain, Ann Franch-esca Laguna, Michael Niemier, Ian O’Connor, Anand Raghunathan, and 1 others. 2020. Emerging neural workloads and their impact on hardware. In 2020 Design, Automation & Test in Europe Conference & Exhibitio… find
  3. Julian Büchel, William Andrew Simon, Corey Lammie, Giovanni Acampa, Kaoutar El Maghraoui, Manuel Le Gallo, and Abu Sebastian. 2024. Aihwkit-lightning: a scalable hw-aware training toolkit for analog in-memory computing. In NeurIPS 2024 Workshop Machine Learning with new Compute Paradigms. find
  4. Pai-Yu Chen, Xiaochen Peng, and Shimeng Yu. 2018. Neurosim: A circuit-level macro model for benchmarking neuro-inspired architectures in online learning. IEEE Transactions on Computer-Aided Design of Integrated Circuits and Systems, 37(12):3067– 3080. find
  5. Peter Clark, Isaac Cowhey, Oren Etzioni, Tushar Khot, Ashish Sabharwal, Carissa Schoenick, and Oyvind Tafjord. 2018. Think you have solved question answering? try arc, the ai2 reasoning challenge. arXiv preprint arXiv:1803.05457.
  6. Jacob Devlin, Ming-Wei Chang, Kenton Lee, and Kristina Toutanova. 2019. Bert: Pre-training of deep bidirectional transformers for language understanding. In Proceedings of the 2019 conference of the North American chapter of the association for computational linguistics: human language technologies,…
  7. Pengcheng He, Xiaodong Liu, Jianfeng Gao, and Weizhu Chen. 2020. Deberta: Decoding-enhanced bert with disentangled attention. arXiv preprint arXiv:2006.03654.
  8. John R Hershey and Peder A Olsen. 2007. Approximating the kullback leibler divergence between gaussian mixture models. In 2007 IEEE International Conference on Acoustics, Speech and Signal Processing-ICASSP’07, volume 4, pages IV–317. IEEE. find
  9. Neil Houlsby, Andrei Giurgiu, Stanislaw Jastrzebski, Bruna Morrone, Quentin De Laroussilhe, Andrea Gesmundo, Mona Attariyan, and Sylvain Gelly. 2019. Parameter-efficient transfer learning for nlp. In International conference on machine learning, pages 2790–2799. PMLR. find
  10. Fatih Ilhan, Gong Su, Selim Furkan Tekin, Tiansheng Huang, Sihao Hu, and Ling Liu. 2024. Resource-efficient transformer pruning for finetuning of large models. In Proceedings of the IEEE/CVF Conference on Computer Vision and Pattern Recognition, pages 16206–16215. find
  11. Renren Jin, Jiangcun Du, Wuwei Huang, Wei Liu, Jian Luan, Bin Wang, and Deyi Xiong. 2024. A comprehensive evaluation of quantization strategies for large language models. In Findings of the Association for Computational Linguistics ACL 2024, pages 12186–12215. find
  12. Vinay Joshi, Manuel Le Gallo, Simon Haefeli, Irem Boybat, Sasidharan Rajalekshmi Nandakumar, Christophe Piveteau, Martino Dazzi, Bipin Rajendran, Abu Sebastian, and Evangelos Eleftheriou. 2020. Accurate deep neural network inference using computational phase-change memory. Nature communications, 11(… find
  13. Jia Ke, Wang Xiaohao, Chen Hailin, Zhong Wei, Li Xinxiong, Fang Zenan, and An Fengwei. 2025. A component-centric perspective on hardware accelerators for llms. IEEE Access. find
  14. Pranav Rajpurkar, Jian Zhang, Konstantin Lopyrev, and Percy Liang. 2016. Squad: 100,000+ questions for machine comprehension of text. arXiv preprint arXiv:1606.05250.
  15. Malte J Rasch, Fabio Carta, Omobayode Fagbohungbe, and Tayfun Gokmen. 2024. Fast and robust analog in-memory deep neural network training. Nature Communications, 15(1):7133. find
  16. Alessandro Lambertini, Tommaso Zanotti, Paolo Pavan, Andrea Padovani, and Francesco Maria Puglisi. 2025. Simulation and benchmarking of crossbar parasitic resistance models: Accuracy and performance comparison. APL Machine Learning, 3(2). find
  17. Malte J Rasch, Diego Moreda, Tayfun Gokmen, Manuel Le Gallo, Fabio Carta, Cindy Goldberg, Kaoutar El Maghraoui, Abu Sebastian, and Vijay Narayanan. 2021. A flexible and fast pytorch toolkit for simulating training and inference on analog crossbar arrays. In 2021 IEEE 3rd international conference on… find
  18. Corey Lammie, Wei Xiang, Bernabé Linares-Barranco, and Mostafa Rahimi Azghadi. 2022. Memtorch: An open-source simulation framework for memristive deep learning systems. Neurocomputing, 485:124– 133. find
  19. Victor Sanh, Lysandre Debut, Julien Chaumond, and Thomas Wolf. 2019. Distilbert, a distilled version of bert: smaller, faster, cheaper and lighter. arXiv preprint arXiv:1910.01108.
  20. Zhenzhong Lan, Mingda Chen, Sebastian Goodman, Kevin Gimpel, Piyush Sharma, and Radu Soricut. 2019. Albert: A lite bert for self-supervised learning of language representations. arXiv preprint arXiv:1909.11942.
  21. Abu Sebastian, Manuel Le Gallo, Riduan Khaddam-Aljameh, and Evangelos Eleftheriou. 2020. Memory devices and applications for in-memory computing. Nature nanotechnology, 15(7):529–544. find
  22. Banafsheh Saber Latibari, Najmeh Nazari, Muh-tasim Alam Chowdhury, Kevin Immanuel Gubbi, Chongzhou Fang, Sujan Ghimire, Elahe Hosseini, Hossein Sayadi, Houman Homayoun, Soheil Salehi, and 1 others. 2024. Transformers: A security perspective. IEEE Access. find
  23. Richard Socher, Alex Perelygin, Jean Wu, Jason Chuang, Christopher D Manning, Andrew Y Ng, and Christopher Potts. 2013. Recursive deep models for semantic compositionality over a sentiment treebank. In Proceedings of the 2013 conference on empirical methods in natural language processing, pages 1631…
  24. Manuel Le Gallo, Corey Lammie, Julian Büchel, Fabio Carta, Omobayode Fagbohungbe, Charles Mackin, Hsinyu Tsai, Vijay Narayanan, Abu Sebastian, Kaoutar El Maghraoui, and 1 others. 2023. Using the ibm analog in-memory hardware acceleration kit for neural network training and inference. APL Machine Le… find
  25. Marcos Treviso, Ji-Ung Lee, Tianchu Ji, Betty Van Aken, Qingqing Cao, Manuel R Ciosici, Michael Hassid, Kenneth Heafield, Sara Hooker, Colin Raffel, and 1 others. 2023. Efficient methods for natural language processing: A survey. Transactions of the Association for Computational Linguistics, 11:826–…
  26. Xiangyang Liu, Tianxiang Sun, Junliang He, Jiawen Wu, Lingling Wu, Xinyu Zhang, Hao Jiang, Zhao Cao, Xuan-Jing Huang, and Xipeng Qiu. 2022. Towards efficient nlp: A standard evaluation and a strong baseline. In Proceedings of the 2022 Conference of the North American Chapter of the Association for C… find
  27. Adina Williams, Nikita Nangia, and Samuel Bowman. 2018. A broad-coverage challenge corpus for sentence understanding through inference. In Proceedings of the 2018 conference of the North American chapter of the association for computational linguistics: human language technologies, volume 1 (long pa…
  28. Yinhan Liu, Myle Ott, Naman Goyal, Jingfei Du, Mandar Joshi, Danqi Chen, Omer Levy, Mike Lewis, Luke Zettlemoyer, and Veselin Stoyanov. 2019. Roberta: A robustly optimized bert pretraining approach. arXiv preprint arXiv:1907.11692.
  29. T Patrick Xiao, Christopher H Bennett, Ben Feinberg, Matthew J Marinella, and Sapan Agarwal. 2022. Crosssim: accuracy simulation of analog in-memory computing. GitHub, v2. 0, https://github.com/sandialabs/cross-sim, page 2. ↗
  30. Mafizur Rahman, Lin Li, Lijun Qian, and Max Huang. 2024. Comparative analysis of inference performance of pre-trained deep neural networks in analog accelerators. In 2024 International Conference on Machine Learning and Applications (ICMLA), pages 468–475. IEEE. find
  31. Ali Hadi Zadeh, Isak Edo, Omar Mohamed Awad, and Andreas Moshovos. 2020. Gobo: Quantizing attention-based nlp models for low latency and energy efficient inference. In 2020 53rd Annual IEEE/ACM International Symposium on Microarchitecture (MICRO), pages 811–824. IEEE. find
  32. Xiyou Zhou, Zhiyu Chen, Xiaoyong Jin, and William Yang Wang. 2021. Hulk: An energy efficiency benchmark platform for responsible natural language processing. In Proceedings of the 16th Conference of the European Chapter of the Association for Computational Linguistics: System Demonstrations, pages 3… find

Updated

↑ back to top

This page in Markdown → https://md.research.elamur.ai/free/en/papers/rahman-2026-attention-under-attack-analog-noise/