补上位置编码,让Transformer解释更准。
Revisiting LRP: Positional Attribution as the Missing Ingredient for Transformer Explainability
- 把输入改成位置-标记对,重新设计传播规则
- 在视觉和NLP任务中均超越现有最佳方法
- 适合研究Transformer可解释性的人看
开发有效的Transformer可解释工具是深度学习研究的关键方向。目前最有前景的方法之一是逐层相关性传播(LRP),它通过预定义规则将激活值重新分配,反向传播相关性至输入空间。然而,现有基于LRP的Transformer解释方法完全忽略了Transformer架构中的关键组件——位置编码(PE),导致守恒性被破坏,并丢失了与结构和位置特征相关的独特类型相关性。为解决此问题,我们将Transformer可解释性的输入空间重新定义为位置-标记对的集合,提出专门设计的、理论基础扎实的LRP规则,可跨多种位置编码方法(包括Rotary、可学习和绝对位置编码)传播归因。在微调分类器和零样本基础模型(如LLaMA 3)上的大量实验表明,该方法在视觉与自然语言处理任务中的可解释性表现显著优于当前最佳水平。代码已公开。
原文摘要 · Abstract (English)
The development of effective explainability tools for Transformers is a crucial pursuit in deep learning research. One of the most promising approaches in this domain is Layer-wise Relevance Propagation (LRP), which propagates relevance scores backward through the network to the input space by redistributing activation values based on predefined rules. However, existing LRP-based methods for Transformer explainability entirely overlook a critical component of the Transformer architecture: its positional encoding (PE), resulting in violation of the conservation property, and the loss of an important and unique type of relevance, which is also associated with structural and positional features. To address this limitation, we reformulate the input space for Transformer explainability as a set of position-token pairs. This allows us to propose specialized theoretically-grounded LRP rules designed to propagate attributions across various positional encoding methods, including Rotary, Learnable, and Absolute PE. Extensive experiments with both fine-tuned classifiers and zero-shot foundation models, such as LLaMA 3, demonstrate that our method significantly outperforms the state-of-the-art in both vision and NLP explainability tasks. Our code is publicly available.
Thank you to arXiv for use of its open access interoperability. PaperDance 不是 arXiv 官方产品;中文卡片由大模型生成,请以原文为准。