arXivDaily arXiv每日学术速递 周一至周五更新
arXiv 2307.03056cs.LGcs.AIcs.CL
收藏

将反向传播推广用于基于梯度的可解释性

Generalizing Backpropagation for Gradient-Based Interpretability

ETH Zürich(苏黎世联邦理工学院);MIT(麻省理工学院)

Kevin Du, Lucas Torroba Hennigen, Niklas Stoehr, Alexander Warstadt, Ryan Cotterell

AI总结:

本文将反向传播推广到半环框架,高效计算梯度图中的最高权重路径和熵等统计量,并用于验证组件梯度流量与预测重要性的关系及分析BERT在SVA任务中的关键注意力路径。

摘要:

许多用于解释深度神经网络的流行特征归因方法依赖于计算模型输出相对于其输入的梯度。虽然这些方法可以指示哪些输入特征可能对模型预测很重要,但它们很少揭示模型本身的内部工作机制。在本文中,我们观察到模型的梯度计算是使用半环进行更一般化表述的一个特例。这一观察使我们能够推广反向传播算法,以高效计算关于神经网络梯度图的其他可解释统计量,例如最高权重路径和熵。我们实现了这一推广算法,在合成数据集上对其进行评估以更好地理解其计算的统计量,并将其应用于研究BERT在主语-动词数一致任务(SVA)上的行为。借助该方法,我们(a)验证了通过模型某一组件的梯度流量大小反映了该组件对预测的重要性,并且(b)针对SVA任务,识别出自注意力机制的哪些路径最为重要。

英文摘要:

Many popular feature-attribution methods for interpreting deep neural networks rely on computing the gradients of a model's output with respect to its inputs. While these methods can indicate which input features may be important for the model's prediction, they reveal little about the inner workings of the model itself. In this paper, we observe that the gradient computation of a model is a special case of a more general formulation using semirings. This observation allows us to generalize the backpropagation algorithm to efficiently compute other interpretable statistics about the gradient graph of a neural network, such as the highest-weighted path and entropy. We implement this generalized algorithm, evaluate it on synthetic datasets to better understand the statistics it computes, and apply it to study BERT's behavior on the subject-verb number agreement task (SVA). With this method, we (a) validate that the amount of gradient flow through a component of a model reflects its importance to a prediction and (b) for SVA, identify which pathways of the self-attention mechanism are most important.

机构、总结、中文摘要均由AI分析而来,可能存在错误,请以论文正文为准。

↑