What is a saliency map?
A saliency map visually shows which parts of an input, such as pixels or words, most influenced a model's output, usually through importance scores from the output's gradient with respect to the input.
Feature attribution covers all methods measuring each input component's contribution; a saliency map is a form of it usually based on a single gradient and visualised like a heat map. Integrated gradients accumulates gradients along a path to fix single-gradient weaknesses.
- Topic
- Responsible AI and governance
- Also known as
- Gradient saliency, heat map explanation
- Origin
- Simonyan, Vedaldi and Zisserman, 2013
How a saliency map works
- The model runs on the input; the output to explain, such as a class score, is chosen.
- The gradient of that output with respect to each input component (token embeddings for text) is computed; its size shows that component's sensitivity.
- Values are shown as a heat map on images or by colouring words in text.
- Whether the result is meaningful is tested, for example by checking whether the map changes when model weights are randomised.
In more detail
Gradient saturation and noise-reducing variants
In ReLU and saturating architectures, vanilla gradients often look noisy and suffer from gradient saturation, where changing an important pixel leaves the slope near zero. Methods such as SmoothGrad average gradients over noisy copies of the input, while Integrated Gradients accumulates gradients from a neutral baseline to the input.
Commonly confused terms
| Term | How it differs |
|---|---|
| Grad-CAM | Grad-CAM computes gradients with respect to the final convolutional feature maps rather than raw input pixels, producing smoother, class-discriminative region heat maps instead of pixel-level noise. |
| Integrated gradients | Integrated gradients avoids single-point gradient saturation by accumulating gradients along a straight path from a neutral baseline (such as a black image) to the actual input. |
| SHapley Additive exPlanations | SHAP estimates feature contributions using game-theoretic Shapley values through perturbation rather than backpropagation gradients, making it model-agnostic but computationally much slower on high-dimensional inputs. |
Why a saliency map matters for on-premises AI
Saliency maps are fast and show non-experts intuitively what a model looks at; they can expose models relying on wrong features, such as a classifier attending to an image watermark. Research shows some saliency methods can produce results nearly independent of what the model learned, giving similar maps even with randomised weights. Maps are therefore used with validation tests and other methods, not alone.
An insurer examines its claim photo classifier's decisions with saliency maps; finding the model looks at a date stamp in the photo's corner rather than the damaged area, it cleans the training data and retrains.
Common questions
Can a saliency map be trusted?
Not alone. Some methods can give results independent of the model. Maps are judged with validation tests and other methods.
Are saliency maps used for text too?
Yes. In text models each word's or token's effect on the result is shown by colouring.
Related terms
- Feature attribution
- Integrated gradients
- Feature importance
- Local Interpretable Model-agnostic Explanations
- Explainable AI
- SHapley Additive exPlanations
Sources
- Simonyan, Vedaldi and Zisserman, Deep Inside Convolutional Networks: Visualising Image Classification Models and Saliency Maps, 2013
- Adebayo et al., Sanity Checks for Saliency Maps, 2018
In the glossary: Glossary, R to Z