Explainability (XAI)
Explaining model decisions: Grad-CAM, SHAP, Integrated Gradients, and more.
Attention RolloutAttention Rollout is a method that approximates how much the output of a Transformer attends to each input token by adding the residual connections to the attention weights of every layer and multiplying them together from the input upward. It turns raw attention weights, which become less reliable in higher layers, into attention over the input tokens.
CAM (Class Activation Mapping)CAM is a method that sums the feature maps of the last convolutional layer, weighted by the weights of the fully connected layer, to show as a heatmap which parts of an image a CNN used to decide on a class. It can estimate object locations from a model trained only with class labels.
DeepLIFTDeepLIFT is a method that compares the value of each neuron with its value for a reference input and backpropagates that difference from the output to the input, splitting a prediction into contributions from each input feature. It needs only one backward pass and can assign contributions even in saturated regions where the gradient is 0.
Grad-CAMGrad-CAM is a method that shows, as a heatmap computed from the feature maps and gradients of the last convolutional layer, which parts of an image a CNN relied on when deciding on a class. It works on trained models without modification and can show different locations for each class.
Gradient Saliency MapA gradient saliency map shows which pixels of an image drive a classification decision, using the magnitude of the gradient of the class score with respect to the input image. It needs a single backward pass and works on any trained CNN as is.
Integrated GradientsIntegrated Gradients is a method that integrates gradients along a path from a baseline input (such as a black image) to the actual input, splitting a prediction into contributions from each input feature. The contributions sum to the difference in scores, and the method avoids the saturation problem where the gradient at the input becomes 0.
LIME (Local Interpretable Model-agnostic Explanations)LIME is a method that explains a single input by creating many variants of it with parts removed, collecting the model's predictions on them, fitting a simple linear model that weights closer variants more heavily, and using its coefficients as the explanation. Because it does not use the model's internals, it works with any classifier.
LRP (Layer-wise Relevance Propagation)LRP (Layer-wise Relevance Propagation) is a method that redistributes a network's output as "relevance" from the output to the input, one layer at a time, producing a heatmap of per-pixel contributions. Because the total relevance is conserved at each layer, the pixel relevances sum to the prediction score, and the computation needs only one backward pass.
SHAP (SHapley Additive exPlanations)SHAP is a method that splits a single prediction into per-feature contributions using Shapley values from game theory. The contributions sum exactly to the difference between the prediction and a base value, and the method unifies six existing approaches, including LIME and DeepLIFT, into a single framework and identifies the unique solution within it that satisfies desirable properties.
SmoothGradSmoothGrad is a method that reduces the speckle-like noise of gradient saliency maps by creating many copies of the input image with small Gaussian noise added and averaging their gradient maps. It works without modifying the model and can be combined with other gradient-based methods.
