LIME2(Local interpretable model-agnostic explanations)(why should I trust you: Explaining the predictions of any classifier)通过生成的包含需要解释点周围的扰动数据和基于黑箱模型预测结果的数据集,训练一个可以解释的模型,比如逻辑回归、决策树,这个可解释模型需要在解释点周围达到较好的效果。
$$\xi = \mathop{\arg\min}\limits_{g\in G}L(f,g,\pi_x) + \Omega(g)$$
f为需解释模型
g为可能的解释模型
$\pi_x$为定义实例周围多大范围
算法过程:
选择需要解释感兴趣的实例
对其进行扰动,并得到黑箱模型对应结果产生新数据集
根据与实例的接近程度,对新数据集进行赋予权重
基于新数据集和上述损失函数求解可解释模型
解释预测值Figure 3: Toy example to present intuition for LIME
从线性模型中返回Shapley values
SHAP核为(推导过程见2补充材料):
$$\pi_{x’}(z’)= \frac{(M-1)}{(M choose |z’|)|z’|(M-|z’|)}$$
$$L(f,g, \pi_{x’})=\sum_{z’\in Z}[f(h_x^{-1}(z’))-g(z’)]^2\pi_{x’}(z’)$$
x’为简化输入,$x=h_x(x’)$, $z’ \subseteq x’$
其中第二步:The function h maps 1’s to the corresponding value from the instance x that we want to explain. For tabular data, it maps 0’s to the values of another instance that we sample from the data. This means that we equate “feature value is absent” with “feature value is replaced by random feature value from data”.
Deep SHAP #
DeepLIFT(Learning Important FeaTures) #
DeepLIFT5方法使用神经元的激活与其“参考”进行比较,其中参考是神经元在网络获得“参考输入”时具有的激活状态(参考输入根据具体任务的内容定义)。该方法赋予每个特征重要度分数之和等于预测值与基于参考输入的预测值之间的差异6。
能解决基于梯度方法的不足,例如参考的差异不是0的情况下梯度仍然可能是0。
$$\sum_{i=1}^n C_{\Delta x_i \Delta t} = \Delta t \tag1$$
$\Delta t = t - t^0$, 神经元输出与参考输出的差异,$\Delta x$输入相对参考输入的变化, C即特征的贡献
choosing a good reference would rely on domain-specific knowledge, and in some cases it may be best to compute DeepLIFT scores against multiple different references