arXiv:2503.00687cs.LG2025-03ICLR被引 5

提出新型注意力机制,提升模型对残差信息的利用能力。

Transformer Meets Twicing: Harnessing Unattended Residual Information

论文配图:Transformer Meets Twicing: Harnessing Unattended Residual Information
图 1 · 摘自论文原文
  • 通过核双倍化技术缓解注意力的低通滤波问题
  • 显著减缓表征能力衰减,提升对抗鲁棒性
  • 适用于图像分类与语言建模等多任务场景

基于Transformer的深度学习模型在众多语言和视觉任务中表现优异。尽管自注意力机制能捕捉复杂数据模式,但其注意力矩阵的表征能力随层数增加显著下降,影响整体性能。本文发现自注意力计算与低通非局部均值(NLM)平滑滤波存在关联,提出Twicing Attention机制,利用非参数回归中的核双倍化过程,缓解相关NLM平滑的低通效应,具备理论保证并增强对抗鲁棒性。该方法可提取并重用每层不完全平滑后保留的有意义残差信息。相比标准自注意力,本方法具有两个关键优势:1)表征能力衰减更缓慢;2)在多种数据模态与任务中提升准确率与鲁棒性。我们在多个任务和基准上实证了模型在干净与受损数据上的性能提升,涵盖图像分类与语言建模。

原文摘要 · Abstract (English)

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.

注意力机制Transformer鲁棒性表征学习

Thank you to arXiv for use of its open access interoperability. PaperDance 不是 arXiv 官方产品;中文卡片由大模型生成,请以原文为准。