用图像滤波和提升理论重看Transformer,解释其机制并提升性能。
Revisiting Transformers with Insights from Image Filtering and Boosting
- 从图像滤波与提升视角构建统一框架,解释自注意力及位置编码等组件。
- 改进的Transformer在语言、视觉任务中显著提升准确率与抗干扰能力。
- 适合关注模型可解释性与鲁棒性提升的研究者阅读。
自注意力机制是当前主流深度学习架构的核心,但其设计多基于经验,缺乏清晰的理论解释。近年来,研究尝试通过图像去噪和非参数回归理解自注意力。然而,现有框架仍难以深入解析其结构组件(如位置编码、残差连接)的作用机制。本文提出一个统一的图像处理框架,不仅解释自注意力计算本身,还阐明了位置编码、残差连接及其后续变体的机制。我们指出并尝试弥合两类概念间的潜在差异。在此基础上,引入两项独立的Transformer改进方案。尽管目标是增强可解释性,实验发现这些受图像处理启发的修改在语言与视觉任务中均显著提升准确率,增强对数据污染和对抗攻击的鲁棒性,并改善长序列理解能力。
原文摘要 · Abstract (English)
The self-attention mechanism, a cornerstone of Transformer-based state-of-the-art deep learning architectures, is largely heuristic-driven and fundamentally challenging to interpret. Establishing a robust theoretical foundation to explain its remarkable success and limitations has therefore become an increasingly prominent focus in recent research. Some notable directions have explored understanding self-attention through the lens of image denoising and nonparametric regression. While promising, existing frameworks still lack a deeper mechanistic interpretation of various architectural components that enhance self-attention, both in its original formulation and subsequent variants. In this work, we aim to advance this understanding by developing a unifying image processing framework, capable of explaining not only the self-attention computation itself but also the role of components such as positional encoding and residual connections, including numerous later variants. We also pinpoint potential distinctions between the two concepts building upon our framework, and make effort to close this gap. We introduce two independent architectural modifications within transformers. While our primary objective is interpretability, we empirically observe that image processing-inspired modifications can also lead to notably improved accuracy and robustness against data contamination and adversaries across language and vision tasks as well as better long sequence understanding.
Thank you to arXiv for use of its open access interoperability. PaperDance 不是 arXiv 官方产品;中文卡片由大模型生成,请以原文为准。