Always Keep Your Promises: DynamicLRP, A Model-Agnostic Solution To Layer-Wise Relevance Propagation

📄 arXiv: 2512.07010v2 📥 PDF

作者: Kevin Lee, Pablo Millan Arias

分类: cs.LG

发布日期: 2025-12-07 (更新: 2025-12-20)

备注: Work in progress, (12 pages manuscript, 6 figures, 6 tables, 3 pages references, 14 pages appendix), v2 submission added GitHub repo URL to Abstract

🔗 代码/项目: GITHUB


💡 一句话要点

提出DynamicLRP,一种模型无关的逐层相关性传播解决方案

🎯 匹配领域: 支柱二:RL算法与架构 (RL & Architecture) 支柱九:具身大模型 (Embodied Foundation Models)

关键词: 可解释性 逐层相关性传播 模型无关 计算图 深度学习 神经网络 归因分析

📋 核心要点

  1. 现有LRP方法依赖于模块级别,需要针对特定架构的传播规则和模型修改,限制了其通用性和可持续性。
  2. DynamicLRP在张量操作级别分解归因,并引入Promise System机制,实现模型无关性,同时保持LRP的理论保证。
  3. 实验表明,DynamicLRP在多个模型上实现了与专用实现相当或更好的性能,并具有良好的效率和广泛的架构覆盖率。

📝 摘要(中文)

逐层相关性传播(LRP)通过守恒性质和深度泰勒分解为神经网络提供可解释性。然而,现有实现依赖于模块级别,需要特定于架构的传播规则和模型修改,限制了目标模型的通用性和实现的可持续性。我们引入DynamicLRP,一个在张量操作级别运行的模型无关LRP框架。通过将归因分解到计算图中的各个操作,并引入一种名为Promise System的延迟激活解析机制,我们的方法实现了真正的架构无关性,同时保持了LRP的理论保证。该设计独立于反向传播机制运行,无需模型修改,可以与梯度反向传播并行执行。基于计算图,该方法在理论上可扩展到支持自动微分的其他深度学习库。实验表明,DynamicLRP在VGG上实现了与专用实现相匹配或超过的忠实度(ABPC分别为1.77和1.69),在ViT上实现了相当的性能,在SQuADv2上解释RoBERTa-large和Flan-T5-large答案的top-1归因准确率分别为93.70%和95.06%,同时保持了对具有100M-1B参数模型的实际效率。我们在来自15个不同架构的31,465个计算图节点上实现了99.92%的节点覆盖率,包括状态空间模型(Mamba)、音频转换器(Whisper)和多模态系统(DePlot),无需任何模型特定代码,并实现了47个基本操作的规则。我们的操作级分解和Promise System为LRP在不断发展的架构中建立了一个可持续的、可扩展的基础。

🔬 方法详解

问题定义:现有LRP方法需要针对不同神经网络架构定制传播规则,导致实现复杂且难以维护,无法适应快速发展的模型架构。此外,这些方法通常需要在模型中进行修改,限制了其通用性。

核心思路:DynamicLRP的核心思想是将LRP分解到计算图中的单个张量操作级别,而不是模块级别。通过这种细粒度的分解,可以避免针对特定架构定制规则,从而实现模型无关性。Promise System用于处理激活函数的延迟解析,确保在需要时能够正确计算相关性。

技术框架:DynamicLRP框架主要包含以下几个阶段:1) 构建计算图:将神经网络模型转换为计算图表示。2) 操作级分解:将LRP分解到计算图中的每个张量操作。3) Promise System:使用Promise System处理激活函数的延迟解析。4) 相关性传播:根据预定义的规则,在计算图中传播相关性。5) 结果输出:生成输入特征的相关性图,用于解释模型的预测。

关键创新:DynamicLRP的关键创新在于其操作级别的分解和Promise System。操作级别的分解使得LRP可以应用于任何基于计算图的神经网络模型,而无需针对特定架构进行修改。Promise System解决了激活函数在LRP中的处理难题,确保了相关性传播的正确性。

关键设计:DynamicLRP的关键设计包括:1) 定义了一组基本张量操作的LRP规则。2) 实现了Promise System,用于延迟解析激活函数。3) 设计了高效的计算图遍历算法,用于传播相关性。4) 提供了易于使用的API,方便用户集成到现有的深度学习框架中。

🖼️ 关键图片

fig_0
fig_1
fig_2

📊 实验亮点

DynamicLRP在VGG上的ABPC为1.77,超过了专用实现的1.69。在ViT上实现了相当的性能。在SQuADv2上,解释RoBERTa-large和Flan-T5-large答案的top-1归因准确率分别达到93.70%和95.06%。该方法在包含Mamba、Whisper和DePlot等多种架构的31,465个计算图节点上实现了99.92%的节点覆盖率,无需任何模型特定代码。

🎯 应用场景

DynamicLRP可广泛应用于各种深度学习模型的可解释性分析,例如图像分类、自然语言处理和语音识别等。它可以帮助研究人员和开发人员理解模型的决策过程,发现潜在的偏差和漏洞,并改进模型的性能和可靠性。此外,DynamicLRP还可以用于安全关键领域的模型部署,例如自动驾驶和医疗诊断,以确保模型的决策是可信和可解释的。

📄 摘要(原文)

Layer-wise Relevance Propagation (LRP) provides principled attribution for neural networks through conservation properties and foundations in Deep Taylor Decomposition. However, existing implementations operate at the module level, requiring architecture-specific propagation rules and model modifications. These limit the generality of target model and sustainability of implementations as architectures evolve. We introduce DynamicLRP, a model-agnostic LRP framework operating at the tensor operation level. By decomposing attribution to individual operations within computation graphs and introducing a novel mechanism for deferred activation resolution, named the Promise System, our approach achieves true architecture agnosticity while maintaining LRP's theoretical guarantees. This design operates independently of backpropagation machinery, requiring no model modification, enabling side-by-side execution with gradient backpropagation. Being based on computation graphs, this method is theoretically extensible to other deep learning libraries that support auto-differentiation. We demonstrate faithfulness matching or exceeding specialized implementations (1.77 vs 1.69 ABPC on VGG, equivalent performance on ViT, 93.70% and 95.06% top-1 attribution accuracy for explaining RoBERTa-large and Flan-T5-large answers on SQuADv2, respectively) while maintaining practical efficiency on models with 100M-1B parameters. We achieved 99.92% node coverage across 31,465 computation graph nodes from 15 diverse architectures, including state-space models (Mamba), audio transformers (Whisper), and multimodal systems (DePlot) without any model-specific code with rules for 47 fundamental operations implemented. Our operation-level decomposition and Promise System establish a sustainable, extensible foundation for LRP across evolving architectures. All code is available at https://github.com/keeinlev/dynamicLRP .