Transformer Meets Twicing: Harnessing Unattended Residual Information
Laziz U. Abdullaev, Tan Minh Nguyen
摘要
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 selfattention 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. The code is publicly available at https://github.com/lazizcodes/twicing_attention .
问 Lune
几分钟读透这篇 Paper,不用再花一下午。
Lune 能读完全文,也能读引用它的顶会 Paper,讲清它的结论、证据和局限,每一点都注明出自哪篇 Paper。不用硬啃,也不靠猜。
已有 5 篇顶会 Paper 引用了它。别等审稿人问起,先弄清它们发现了什么。
脉络
- Emerging Properties in Self-Supervised Vision Transformers 引用了 Training data-efficient image transformers & distillation through attention
- Equivariant Neural Functional Networks for Transformers 引用了 Decision Transformer: Reinforcement Learning via Sequence Modeling
- Equivariant Neural Functional Networks for Transformers 引用了 Tight Clusters Make Specialized Experts
- Equivariant Neural Functional Networks for Transformers 引用了 Demystifying the Token Dynamics of Deep Selective State Space Models
- Equivariant Neural Functional Networks for Transformers 引用了 Learning Transferable Visual Models From Natural Language Supervision
- Tight Clusters Make Specialized Experts 引用了 Swin Transformer: Hierarchical Vision Transformer using Shifted Windows
- Geometric and Stochastic Analysis of Discontinuities in Sparse Mixture-of-Experts 引用了 Learning Transferable Visual Models From Natural Language Supervision
- Swin Transformer: Hierarchical Vision Transformer using Shifted Windows 引用了 Learning Transferable Visual Models From Natural Language Supervision
- Swin Transformer: Hierarchical Vision Transformer using Shifted Windows 引用了 Training data-efficient image transformers & distillation through attention
引用它的顶会 Paper5
- Reconstructing KV Caches with Cross-Layer Fusion for Enhanced TransformersHongzhan Lin, Zhiqi Bai, Xinmiao Zhang, Siran Yang 等ICLR 2026 · 5 次引用
- Equivariant Neural Functional Networks for TransformersHoang V. Tran, Thieu Vo, An Nguyen The, Tho Tran Huu 等ICLR 2025
- Tight Clusters Make Specialized ExpertsStefan K. Nielsen, Rachel S. Y. Teo, Laziz U. Abdullaev, Tan Minh NguyenICLR 2025
- Geometric and Stochastic Analysis of Discontinuities in Sparse Mixture-of-ExpertsTho Tran Huu, Huu-Tuan Nguyen, Thien-Hai Nguyen, Nhat-Tri Ho 等ICML 2026
- Demystifying the Token Dynamics of Deep Selective State Space ModelsThieu N. Vo, Duy-Tung Pham, Xin T. Tong, Tan Minh NguyenICLR 2025
它引用的 Paper32
- Learning Transferable Visual Models From Natural Language SupervisionAlec Radford, Jong Wook Kim, Chris Hallacy, Aditya Ramesh 等ICML 2021 · 47,906 次引用
- Swin Transformer: Hierarchical Vision Transformer using Shifted WindowsZe Liu, Yutong Lin, Yue Cao, Han Hu 等ICCV 2021 · 31,683 次引用
- Training data-efficient image transformers & distillation through attentionHugo Touvron, Matthieu Cord, Matthijs Douze, Francisco Massa 等ICML 2021 · 8,974 次引用
- Emerging Properties in Self-Supervised Vision TransformersMathilde Caron, Hugo Touvron, Ishan Misra, Hervé Jégou 等ICCV 2021 · 8,921 次引用
- Decision Transformer: Reinforcement Learning via Sequence ModelingLili Chen, Kevin Lu, Aravind Rajeswaran, Kimin Lee 等NeurIPS 2021 · 2,557 次引用
相关 Paper
- Mitigating Over-smoothing in Transformers via Regularized Nonlocal FunctionalsTam Nguyen, Tan M. Nguyen, Richard G. BaraniukNeurIPS 2023 · 46 次引用
- Designing Robust Transformers using Robust Kernel Density EstimationXing Han, Tongzheng Ren, Tan Nguyen, Khai Nguyen 等NeurIPS 2023 · 14 次引用
- Evolving Attention with Residual ConvolutionsYujing Wang, Yaming Yang, Jiangang Bai, Mingliang Zhang 等ICML 2021 · 43 次引用
- KNN Local Attention for Image RestorationHunsang Lee, Hyesong Choi, Kwanghoon Sohn, Dongbo MinCVPR 2022 · 62 次引用
- Improving the Robustness of Transformer-based Large Language Models with Dynamic AttentionLujia Shen, Yuwen Pu, Shouling Ji, Changjiang Li 等NDSS 2024
