arXiv:2502.15886cs.CL2025-02被引 11

对比分析Transformer模型的解释性方法,揭示其在语法任务中的表现差异。

A Close Look at Decomposition-based XAI-Methods for Transformer Language Models

  • 采用归因分解法重分配模型预测得分,追踪重要性传播路径。
  • 在主谓一致任务中,不同方法对关键词的识别准确率差异显著。
  • 开源数据集与代码,支持可复现的XAI方法评估。

近期提出多种XAI归因方法用于Transformer架构,通过为输入词元和中间表征分配重要性分数,揭示大语言模型的决策过程。其中,基于分解的方法(如ALTI-Logit和LRP)尤为有前景,因其直接利用模型预测logit进行重要性传播。然而,现有文献尚未对这两类方法进行系统对比,本文针对此空白,在主谓一致任务上,以BERT、GPT-2和LLaMA-3为测试模型,结合真实标注数据进行定量评估,并辅以定性分析。同时,我们从算法与实现角度比较并扩展了ALTI-Logit与LRP,包括新提出的AttnLRP变体。此外,还将两种主流梯度类归因方法纳入基准测试。最后,我们公开了精心构建的评估数据集及代码,旨在推动语言模型可解释性方法在统一基准上的公平评估。

原文摘要 · Abstract (English)

Various XAI attribution methods have been recently proposed for the transformer architecture, allowing for insights into the decision-making process of large language models by assigning importance scores to input tokens and intermediate representations. One class of methods that seems very promising in this direction includes decomposition-based approaches, i.e., XAI-methods that redistribute the model's prediction logit through the network, as this value is directly related to the prediction. In the previous literature we note though that two prominent methods of this category, namely ALTI-Logit and LRP, have not yet been analyzed in juxtaposition and hence we propose to close this gap by conducting a careful quantitative evaluation w.r.t. ground truth annotations on a subject-verb agreement task, as well as various qualitative inspections, using BERT, GPT-2 and LLaMA-3 as a testbed. Along the way we compare and extend the ALTI-Logit and LRP methods, including the recently proposed AttnLRP variant, from an algorithmic and implementation perspective. We further incorporate in our benchmark two widely-used gradient-based attribution techniques. Finally, we make our carefullly constructed benchmark dataset for evaluating attributions on language models, as well as our code, publicly available in order to foster evaluation of XAI-methods on a well-defined common ground.

可解释AITransformer归因方法语言模型

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