A Close Look at Decomposition-based XAI-Methods for Transformer Language Models
作者: Leila Arras, Bruno Puri, Patrick Kahardipraja, Sebastian Lapuschkin, Wojciech Samek
分类: cs.CL
发布日期: 2025-02-21
备注: 9 pages, 3 figures
💡 一句话要点
对比分解式XAI方法,提升Transformer语言模型可解释性
🎯 匹配领域: 支柱九:具身大模型 (Embodied Foundation Models)
关键词: 可解释性AI Transformer模型 归因方法 分解式方法 ALTI-Logit LRP 基准测试
📋 核心要点
- 现有Transformer XAI方法缺乏对分解式方法ALTI-Logit和LRP的直接对比分析。
- 本文通过定量和定性实验,深入比较和扩展了ALTI-Logit和LRP及其变体AttnLRP。
- 本文构建并开源了用于评估语言模型归因的基准数据集和代码,促进XAI方法评估。
📝 摘要(中文)
本文针对Transformer架构,研究了多种可解释性人工智能(XAI)归因方法,这些方法通过为输入token和中间表示分配重要性得分,从而深入了解大型语言模型的决策过程。其中,基于分解的方法,即通过网络重新分配模型预测logit的XAI方法,与预测直接相关,因此极具潜力。然而,现有文献中,该类别中的两种重要方法ALTI-Logit和LRP尚未进行并列分析。因此,本文旨在通过在主谓一致性任务上进行严格的定量评估(使用ground truth标注),以及使用BERT、GPT-2和LLaMA-3作为测试平台的各种定性检查,来弥补这一差距。同时,从算法和实现的角度比较和扩展了ALTI-Logit和LRP方法,包括最近提出的AttnLRP变体。此外,还将两种广泛使用的基于梯度的归因技术纳入基准测试。最后,本文公开发布精心构建的用于评估语言模型归因的基准数据集以及代码,以促进在明确定义的共同基础上评估XAI方法。
🔬 方法详解
问题定义:论文旨在解决Transformer语言模型的可解释性问题,特别是针对分解式XAI方法(如ALTI-Logit和LRP)缺乏直接对比和深入分析的现状。现有方法虽然能够提供token级别的重要性得分,但不同方法之间的优劣以及适用场景尚不明确,阻碍了XAI技术在语言模型中的有效应用。
核心思路:论文的核心思路是通过构建一个包含定量和定性评估的综合性基准测试,对ALTI-Logit和LRP等分解式XAI方法进行系统性的比较和分析。通过ground truth标注的主谓一致性任务,以及对不同模型的定性检查,揭示这些方法在不同场景下的表现差异和优缺点。
技术框架:论文的技术框架主要包括以下几个阶段:1) 选择ALTI-Logit和LRP及其变体AttnLRP作为主要研究对象;2) 构建主谓一致性任务的基准数据集,并进行ground truth标注;3) 设计定量评估指标,例如归因准确率;4) 进行定性分析,例如可视化归因结果;5) 将基于梯度的归因技术纳入基准测试进行对比;6) 开源数据集和代码。
关键创新:论文的关键创新在于:1) 首次对ALTI-Logit和LRP等分解式XAI方法进行了并列分析和比较;2) 提出了针对Transformer语言模型的综合性基准测试,包括定量和定性评估;3) 扩展了ALTI-Logit和LRP方法,包括AttnLRP变体,并从算法和实现的角度进行了深入研究。
关键设计:论文的关键设计包括:1) 主谓一致性任务的选择,该任务能够提供明确的ground truth,便于定量评估;2) 定量评估指标的设计,例如归因准确率,能够有效衡量归因结果的质量;3) 定性分析方法,例如可视化归因结果,能够提供更直观的理解;4) 基准数据集的构建,该数据集包含不同类型的文本和标注,能够覆盖不同的应用场景。
🖼️ 关键图片
📊 实验亮点
论文通过在BERT、GPT-2和LLaMA-3等模型上进行实验,定量评估了ALTI-Logit和LRP等方法的性能。在主谓一致性任务上,通过与ground truth的对比,揭示了不同方法在归因准确率上的差异。此外,通过定性分析,展示了不同方法在不同场景下的归因结果,为选择合适的XAI方法提供了依据。
🎯 应用场景
该研究成果可应用于提升大型语言模型的可信度和透明度,例如在金融、医疗等高风险领域,帮助用户理解模型的决策依据,从而做出更明智的判断。此外,该研究还可以促进XAI方法在自然语言处理领域的进一步发展,推动可解释人工智能的实际应用。
📄 摘要(原文)
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.