mlsanityData to 14 Oct 2026

Transformer Meets Twicing: Harnessing Unattended Residual Information

arXiv 2503.00687 ↗First posted 2 Mar 2025cs.LGcited by 3

Not on the map. Why?

Abstract (arXiv)

Transformer-based deep learning models have achieved state-of-the-art performance across numerous language and vision tasks. While the self-attention mechanism, a core component of transformers, has proven capable of handling complex data patterns, it has been observed that the representational capacity of the attention matrix degrades significantly across transformer layers, thereby hurting its overall performance. In this work, we leverage the connection between self-attention computations and low-pass non-local means (NLM) smoothing filters and propose the Twicing Attention, a novel attention mechanism that uses kernel twicing procedure in nonparametric regression to alleviate the low-pass behavior of associated NLM smoothing with compelling theoretical guarantees and enhanced adversarial robustness. This approach enables the extraction and reuse of meaningful information retained in the residuals following the imperfect smoothing operation at each layer. Our proposed method offers two key advantages over standard self-attention: 1) a provably slower decay of representational capacity and 2) improved robustness and accuracy across various data modalities and tasks. We empirically demonstrate the performance gains of our model over baseline transformers on multiple tasks and benchmarks, including image classification and language modeling, on both clean and corrupted data.

Key facts. Cited by 3 papers in the map (data through 14 Oct 2026). Builds on 60 of its 88 references that are in the map. First posted on arXiv 2 Mar 2025.

Builds on

60 of 88 references.

References · 60

  1. 2017Attention Is All You Needcited by 60,361
  2. 2018BERT: Pre-training of Deep Bidirectional Transformers for Language Understandingcited by 40,399
  3. 2021Learning Transferable Visual Models From Natural Language Supervisioncited by 33,744
  4. 2019Exploring the Limits of Transfer Learning with a Unified Text-to-Text Transformercited by 14,599
  5. 2021Swin Transformer: Hierarchical Vision Transformer using Shifted Windowscited by 12,139
  6. 2014ImageNet Large Scale Visual Recognition Challengecited by 8,498
  7. 2014Explaining and Harnessing Adversarial Examplescited by 7,364
  8. 2021Emerging Properties in Self-Supervised Vision Transformerscited by 6,968
  9. 2017Towards Deep Learning Models Resistant to Adversarial Attackscited by 6,415
  10. 2020Training data-efficient image transformers & distillation through attentioncited by 4,586
  11. 2014Learning Phrase Representations using RNN Encoder-Decoder for Statistical Machine Translationcited by 4,057
  12. 2016Pointer Sentinel Mixture Modelscited by 3,096
38 more
  1. 2021Switch Transformers: Scaling to Trillion Parameter Models with Simple and Efficient Sparsitycited by 3,073
  2. 2020Transformers are RNNs: Fast Autoregressive Transformers with Linear Attentioncited by 2,022
  3. 2019Transformer-XL: Attentive Language Models Beyond a Fixed-Length Contextcited by 1,850
  4. 2021Decision Transformer: Reinforcement Learning via Sequence Modelingcited by 1,546
  5. 2019Natural Adversarial Examplescited by 1,408
  6. 2016Semantic Understanding of Scenes through the ADE20K Datasetcited by 1,069
  7. 2019BERT Rediscovers the Classical NLP Pipelinecited by 1,059
  8. 2021Transformers in Vision: A Surveycited by 1,013
  9. 2023Vision Transformers Need Registerscited by 871
  10. 2021Segmenter: Transformer for Semantic Segmentationcited by 855
  11. 2020Efficient Transformers: A Surveycited by 790
  12. 2021Offline Reinforcement Learning as One Big Sequence Modeling Problemcited by 644
  13. 2021Rethinking Graph Transformers with Spectral Attentioncited by 473
  14. 2021Attention is Not All You Need: Pure Attention Loses Rank Doubly Exponentially with Depthcited by 419
  15. 2021A Survey of Transformerscited by 401
  16. 2017A Structured Self-attentive Sentence Embeddingcited by 318
  17. 2019Analyzing the Structure of Attention in a Transformer Language Modelcited by 243
  18. 2018Adaptive Input Representations for Neural Language Modelingcited by 226
  19. 2018Adversarial Risk and the Dangers of Evaluating Against Weak Attackscited by 221
  20. 2016A Decomposable Attention Model for Natural Language Inferencecited by 215
  21. 2019Transformer Dissection: A Unified Understanding of Transformer's Attention via the Lens of Kernelcited by 213
  22. 2021On the Robustness of Vision Transformers to Adversarial Examplescited by 167
  23. 2022Understanding The Robustness in Vision Transformerscited by 144
  24. 2018Character-Level Language Modeling with Deeper Self-Attentioncited by 138
  25. 2021Sinkformers: Transformers with Doubly Stochastic Attentioncited by 138
  26. 2021Towards Robust Vision Transformercited by 137
  27. 2022Anti-Oversmoothing in Deep Vision Transformers via the Fourier Domain Analysis: From Theory to Practicecited by 136
  28. 2019Understanding and Improving Transformer From a Multi-Particle Dynamic System Point of Viewcited by 113
  29. 2022Revisiting Over-smoothing and Over-squashing Using Ollivier-Ricci Curvaturecited by 98
  30. 2023Transformers as Support Vector Machinescited by 74
  31. 2022Revisiting Over-smoothing in BERT from the Perspective of Graphcited by 72
  32. 2023Demystifying Oversmoothing in Attention-Based Graph Neural Networkscited by 49
  33. 2024Denoising: A Powerful Building-Block for Imaging, Inverse Problems, and Machine Learningcited by 35
  34. 2023Mitigating Over-smoothing in Transformers via Regularized Nonlocal Functionalscited by 32
  35. 2021Improving Transformers with Probabilistic Attention Keyscited by 28
  36. 2021FMMformer: Efficient and Flexible Transformer via Decomposed Near-field and Far-field Attentioncited by 26
  37. 2024Equivariant Neural Functional Networks for Transformerscited by 22
  38. 2021Modeling Concentrated Cross-Attention for Neural Machine Translation with Gaussian Mixture Modelcited by 18

50 most cited of 60 All 60 (JSON)

Built on by

Cited by year (2026 to 14 Oct)

Citing papers per year: 2025: 2; 2026: 1.

3 papers.