SmoothGrad
Last reviewed
May 2, 2026
Sources
12 citations
Review status
Source-backed
Revision
v1 · 2,491 words
Improve this article
Add missing citations, update stale details, or suggest a clearer explanation.
Last reviewed
May 2, 2026
Sources
12 citations
Review status
Source-backed
Revision
v1 · 2,491 words
Add missing citations, update stale details, or suggest a clearer explanation.
SmoothGrad is a saliency map technique that reduces visual noise in gradient-based explanations of neural network predictions by averaging gradients over many noisy copies of the input. The method was introduced by Daniel Smilkov, Nikhil Thorat, Been Kim, Fernanda Viégas, and Martin Wattenberg of the Google Brain PAIR (People + AI Research) group in the paper "SmoothGrad: removing noise by adding noise," presented at the ICML 2017 Workshop on Visualization for Deep Learning. [1]
The core idea is simple enough that it fits in two lines of code. Vanilla gradient saliency maps, which display the partial derivative of a class score with respect to each input pixel, often look speckled and hard to read. SmoothGrad adds Gaussian noise to the input several times, computes a saliency map for each noisy copy, and averages the results. The resulting heatmap is much cleaner and tends to highlight contiguous regions of the object that the model actually used.
SmoothGrad sits inside the broader field of explainable AI and interpretability. It is closely related to other gradient-based attribution methods such as Integrated Gradients, Grad-CAM, SHAP, and Layer-wise Relevance Propagation. It is also one of the methods that has been most heavily scrutinized by the literature on whether saliency maps actually explain anything, particularly the 2018 "Sanity Checks" study and the 2017 "unreliability" paper covered later in this article.
Visualizing what a convolutional neural network cares about in an image is one of the oldest problems in computer vision interpretability. The simplest approach, the vanilla gradient or sensitivity map, was popularized by Karen Simonyan, Andrea Vedaldi, and Andrew Zisserman in 2013. [2] Given a trained classifier S(x), pick the class of interest c and compute
M(x) = dS_c(x) / dx
The absolute value of M(x) at each pixel tells you how much the score S_c would change if you nudged that pixel. The map is fast: one backpropagation pass. It is also, in practice, very noisy. Even on clean ImageNet photographs, the heatmap looks like confetti, with bright pixels appearing far outside the object the network supposedly recognized.
A few alternative methods tried to clean this up before SmoothGrad arrived. DeconvNet (Matthew Zeiler and Rob Fergus, 2014) and Guided Backpropagation (Springenberg and colleagues, 2014) modify how gradients flow through ReLU layers to produce visually crisper maps. Class Activation Mapping (CAM) and its successor Grad-CAM (Selvaraju and colleagues, 2017) project class-specific activations from the last convolutional layer back onto the image, producing coarse heatmaps that highlight the right region but lose pixel detail. Integrated Gradients (Sundararajan, Taly, and Yan, 2017) integrates the gradient along a path from a baseline to the input, which fixes saturation problems but still produces fairly noisy maps for image classification.
Smilkov and colleagues asked a different question. What if you keep the vanilla gradient but evaluate it at many points near the input and average? The intuition was that noise in vanilla saliency maps comes from S_c(x) being highly nonlinear, so its derivative fluctuates wildly from pixel to pixel even when the network's overall decision is stable. Averaging over a small neighborhood should suppress these fluctuations while preserving the gradient direction that matters for the prediction.
SmoothGrad replaces the vanilla saliency map with a Monte Carlo estimate of a smoothed gradient. Given an input x, the method draws n noise samples from a Gaussian distribution N(0, sigma^2) with the same shape as x, adds each one to the input, computes a vanilla saliency map for each noisy version, and averages:
M_hat(x) = (1 / n) * sum_{i=1}^{n} M(x + g_i), where g_i ~ N(0, sigma^2)
That is the entire algorithm. Two hyperparameters control its behavior:
n, the sample count. The original paper recommends values in the range of about 10 to 50 samples. The improvement in visual quality saturates beyond that.sigma, the noise standard deviation. The paper expresses this as a fraction of the input dynamic range, so sigma / (x_max - x_min). Values of roughly 10% to 20% of the input range work well for natural images. Too little noise leaves the original speckle pattern intact. Too much noise blurs the explanation past the object boundary.The paper also introduces a few useful variants. SmoothGrad squared, written SmoothGrad^2, takes M(x + g)^2 before averaging, which biases the heatmap toward features that consistently produce a large gradient regardless of sign. VarGrad replaces the mean with the variance of M(x + g_i) across samples. VarGrad highlights pixels where the gradient changes a lot under perturbation, which intuitively flags regions the model is uncertain about. The same averaging trick can be combined with other base methods. Replacing M(x) with the Integrated Gradients attribution gives Smooth IG, sometimes called Smoothed Integrated Gradients, which is a default in some interpretability libraries.
A practical detail: SmoothGrad multiplies explanation cost by n. SmoothGrad with 50 samples takes 50 backward passes per image. For interactive visualization on small networks this is fine. For large transformer models, it adds up, which is why most production pipelines use smaller n than the original paper.
The paper offers an intuition rather than a tight theoretical proof. Treat S_c(x) as a function with two components: a smooth signal that captures what the model is doing, and a high-frequency component left over from the network's nonlinearities. Vanilla gradients pick up both. Local averaging acts like a low-pass filter on the gradient field; the smooth signal survives, and the high-frequency noise mostly cancels out. With a Gaussian kernel, SmoothGrad effectively computes the gradient of a function that has been convolved with a Gaussian, a standard image-processing trick repurposed for saliency.
A second reading is that adding noise during explanation mimics what data augmentation does during training. If the model was trained to be robust to small perturbations, averaging over similar perturbations during explanation gives you a feature attribution that aligns with the part of the input the model actually depends on, rather than artifacts of how the loss surface curves at one specific point.
The SmoothGrad recipe has been combined with most other attribution methods. Common variants:
| Variant | Definition | What it emphasizes |
|---|---|---|
| SmoothGrad | Mean of M(x + g) over n samples | Consistent gradient direction near x |
| SmoothGrad squared | Mean of M(x + g)^2 | Magnitude of gradient regardless of sign |
| VarGrad | Variance of M(x + g) | Regions of high gradient instability |
| Smooth IG | Mean of Integrated Gradients over noisy inputs | Path-integrated attribution with noise reduction |
| Smooth Grad-CAM++ | Smoothed Grad-CAM++ | Cleaner class activation heatmaps |
VarGrad is sometimes underrated. Adebayo and colleagues found that VarGrad behaved more sensibly than vanilla SmoothGrad on several sanity checks (covered below), which is a quiet result given how rarely VarGrad shows up in tutorials.
SmoothGrad sits in the gradient-based attribution family alongside several other methods.
| Method | Year | Mechanism | Output type |
|---|---|---|---|
| Vanilla gradient (Simonyan et al.) | 2013 | Single backward pass | Pixel-level sensitivity |
| DeconvNet (Zeiler & Fergus) | 2014 | Modified ReLU backward pass | Pixel-level reconstruction |
| Guided Backprop (Springenberg et al.) | 2014 | Vanilla + DeconvNet rules | Sharp pixel-level maps |
| LRP (Bach et al.) | 2015 | Layer-wise relevance propagation | Pixel-level attribution |
| Grad-CAM (Selvaraju et al.) | 2017 | Gradient-weighted CAM | Coarse class-specific heatmap |
| Integrated Gradients (Sundararajan et al.) | 2017 | Path integral from baseline to input | Pixel-level attribution |
| SmoothGrad (Smilkov et al.) | 2017 | Average gradient over noised inputs | Pixel-level sensitivity, denoised |
| SHAP (Lundberg & Lee) | 2017 | Shapley value approximation | Feature-level attribution |
A point that is easy to miss: SmoothGrad and Grad-CAM answer different questions. Grad-CAM tells you which spatial region the network used. SmoothGrad tells you which pixels, at input resolution, the gradient depends on. The two are often combined.
SmoothGrad is one of the most-tested saliency methods, partly because it is simple to reproduce and partly because it is widely cited. Two studies in particular shaped the conversation.
The first is Sanity Checks for Saliency Maps by Julius Adebayo, Justin Gilmer, Michael Muelly, Ian Goodfellow, Moritz Hardt, and Been Kim, NeurIPS 2018. [3] The authors proposed two tests: a model parameter randomization test (saliency maps should change if you randomize the model's weights) and a data randomization test (maps should change if you retrain on relabeled data). Methods that fail look like edge detectors that depend mostly on the input image, regardless of what the model learned. Vanilla gradient, Integrated Gradients, and SmoothGrad all passed the parameter randomization test, while Guided Backprop and Guided Grad-CAM produced visually similar maps even with a randomized model. VarGrad performed especially well, which is why it has gained a quiet following.
The second study is The (Un)reliability of Saliency Methods by Pieter-Jan Kindermans, Sara Hooker, Julius Adebayo, Maximilian Alber, Kristof Schütt, Sven Dähne, Dumitru Erhan, and Been Kim (2017, arXiv:1711.00867). [4] The paper showed that several methods, including SmoothGrad, are not invariant under simple input transformations: adding a constant to every pixel changes the explanation even though the model's prediction is unchanged. SmoothGrad was not the worst offender (gradient times input was), but it was not immune either.
A third recurring critique is computational cost. Running an explanation that requires 25 to 50 backward passes per image is fine for offline analysis but uncomfortable for interactive UIs and infeasible for very large models.
Finally, SmoothGrad inherits a deeper limitation of all gradient-based methods: it answers "how would the score change if I perturbed the input?" rather than "why did the model decide this is a dog?" Those are related but not identical. For medical imaging, sensitivity is a reasonable proxy for explanation. For model debugging, it can highlight unimportant features that the model has not yet learned to ignore.
SmoothGrad is small enough that any deep learning framework can implement it in a few dozen lines, and most interpretability libraries include it as a built-in option.
| Library | Framework | Notes |
|---|---|---|
| PAIR-code/saliency | TensorFlow | Original Google PAIR reference; includes SmoothGrad, VarGrad, Smooth IG |
| Captum | PyTorch | NoiseTunnel wrapper applies SmoothGrad to any underlying attribution method |
| tf-keras-vis | TensorFlow / Keras | Includes SmoothGrad alongside Grad-CAM and Score-CAM |
| iNNvestigate | TensorFlow / Keras | Supports SmoothGrad and many alternatives |
| Quantus | Framework-agnostic | Benchmarks SmoothGrad on faithfulness and robustness metrics |
| Alibi | TensorFlow / PyTorch | Production-oriented explanation library |
The Captum approach is worth singling out. Rather than implement SmoothGrad as a standalone method, Captum exposes a NoiseTunnel class that takes any base attribution method and applies SmoothGrad-style noise averaging on top of it. NoiseTunnel(IntegratedGradients(model)) gives Smooth IG. NoiseTunnel(Saliency(model)) gives classic SmoothGrad. This composability matches the spirit of the original paper, which presented SmoothGrad as a transformation rather than a method.
SmoothGrad has been applied wherever gradient saliency is used:
The original ICML 2017 workshop paper has been cited several thousand times, putting it among the most widely cited saliency-method papers from that period. Part of the appeal is the simplicity: SmoothGrad is a four-line change to any existing gradient saliency pipeline. Part is the visual impact, since the side-by-side comparisons in the paper are striking even to readers without an ML background.
The method became a workhorse in interpretability evaluation. When researchers propose a new explanation technique, they typically benchmark against SmoothGrad as the denoised vanilla gradient and against Integrated Gradients as a path-based alternative. Been Kim went on to develop Concept Activation Vectors (TCAV) and other concept-based interpretability methods. Fernanda Viégas and Martin Wattenberg led Google's PAIR group, which produced TensorFlow Playground, the What-If Tool, and the Embedding Projector. SmoothGrad fits inside that broader program of making model behavior visible to humans without overclaiming what the resulting visualizations actually mean.