---
title: SmoothGrad-Squared in Explainable AI
url: https://www.emergentmind.com/topics/smoothgrad-squared
type: topic
---

# SmoothGrad-Squared in Explainable AI

SmoothGrad-Squared is not a standalone or officially designated method in the literature, but rather refers to an extension of the original SmoothGrad technique in the explainable AI (XAI) domain—most commonly as "SmoothGrad²," though this precise terminology is not consistently established in the primary sources. Such extensions typically involve the systematic averaging of squared attribution maps produced from gradient-based explanations with random input perturbations. Below, the concept, theoretical rationale, methodologies, empirical observations, and limitations are synthesized for technically proficient readers, following practices and conventions as established in the XAI literature.

## 1. Background: Gradient-Based Attribution and SmoothGrad

Gradient-based attribution methods (such as Saliency, Integrated Gradients, and GradCAM) evaluate the sensitivity of a model’s output to infinitesimal variations in its input, often yielding noisy or spatially diffuse maps—a phenomenon known as “gradient shattering.” To address this, the SmoothGrad method augments the input with Gaussian noise and averages the resulting attribution maps:
\[
\widehat{\nabla}_x f(x) = \frac{1}{M}\sum_{i=1}^M  \nabla_x f(x + \delta x_i), \quad \delta x_i\sim\mathcal{N}(0,\sigma_x^2 I)
\]
Empirical best practices set $\sigma_x$ to 10–20% of input dynamic range and $M\approx100$ [2106.10185]. This approach reduces spurious high-frequency signals, yielding improved human-interpretability of attribution maps.

## 2. Theoretical Motivation for Squared Smoothing

SmoothGrad-Squared arises from the hypothesis that squaring individual attribution maps before averaging—as opposed to averaging gradients and then squaring—emphasizes strong attributions while suppressing background noise. The squared operation accentuates high-magnitude regions (often correlated with semantically meaningful input features) and further suppresses low-amplitude, potentially spurious, activations. Although the literature does not present a unique, formal designation for "SmoothGrad-Squared," this averaging-of-squared-gradients procedure is commonly referenced as an internal variation when discussing the SmoothGrad family [2106.10185].

The theoretical justification parallels the variance-reducing characteristic of the mean-of-squares estimator in statistics, which penalizes weakly activated pixels/features more aggressively than a simple mean.

## 3. Methodology and Algorithmic Formulation

The core methodology for SmoothGrad-Squared comprises the following:

- For each input $x$, independently sample $M$ Gaussian noise perturbations.
- For each $x+\delta x_i$, compute the baseline attribution $A_i := \nabla_x f(x+\delta x_i)$ (or a suitable gradient-based explainability map depending on the explainer type).
- Square each resulting map element-wise: $A_i^{(2)}$.
- Average the squared attributions:
  \[
  \text{SmoothGrad}^2(x) = \frac{1}{M}\sum_{i=1}^{M} (A_i\circ A_i)
  \]
  where $\circ$ denotes element-wise multiplication.

This approach contrasts with the original SmoothGrad, which averages $A_i$ directly. The squaring operation shifts the distribution of attribution scores and, in practice, increases map sparsity and localizes the attributions further.

## 4. Empirical Evaluation and Comparative Results

Empirical analyses of SmoothGrad-Squared have focused on the following metrics:

- **Localization (Relevance Rank Accuracy)**: Improvement in identifying semantically relevant regions.
- **Faithfulness (Correlation Score, ROAD)**: Correlation between attribution and output drop upon feature masking.
- **Robustness**: Resistance to small input perturbations; measured by local Lipschitz estimates and sensitivity.
- **Sparseness (Gini Index)**: Concentration of attribution values.

The inclusion of squaring generally improves localization and sparsity but can alter faithfulness and robustness in less predictable ways, sometimes yielding reduced performance on faithfulness correlation if meaningful signal is overly concentrated [2106.10185].

| Attribution Method   | Localization↑ | Faithfulness↑ | Robustness↓ | Sparseness↑ |
|---------------------|---------------|--------------|-------------|-------------|
| SmoothGrad          | 0.8263        | 0.3465       | 0.0590      | 0.5310      |
| SmoothGrad-Squared* | ↑             | ≈            | ≈           | ↑           |

(* "SmoothGrad-Squared" here refers to mean-of-squared approach. Upward arrows express observed empirical effects; detailed quantitative deltas require specific study context.)

A plausible implication is that the use of squaring in aggregation may be beneficial for tasks demanding highly concentrated attributions (e.g., object localization) but can be detrimental for applications where distributed evidence or faithfulness to the model’s holistic decision process is critical.

## 5. Related Techniques: Input vs. Parameter Space Stochasticity

SmoothGrad-Squared is closely related to broader families of stochastic explainers:

- **SmoothGrad**: Perturbs inputs, averages gradients.
- **NoiseGrad**: Perturbs weights (parameter space), averages gradients.
- **FusionGrad**: Combines input and weight perturbation, further averaging.

NoiseGrad and FusionGrad achieve robustness to weight and input perturbations, respectively, and both exhibit high robustness and randomization skill, though with limitations on faithfulness and localization for certain architectures (notably CNNs) [2106.10185, 2303.00652].

## 6. Limitations, Trade-offs, and Practical Guidance

The application of SmoothGrad-Squared faces several practical and methodological trade-offs:

- **Computational Cost**: The need for multiple forward/backward passes per explanation sample, scaling with both $M$ and the number of parameters.
- **Over-sparsification**: Squaring may overly compress attributions, obscuring features contributing in a distributed manner.
- **Faithfulness Risk**: Excessive focus on highest-magnitude features can weaken alignment between attribution and actual model reasoning.
- **Architecture Sensitivity**: Empirical robustness and localization skill can vary with model type (e.g., MLP vs. CNN).

For gradient-based local explanation tasks, empirically validated parameters include $\sigma_x = 0.1\text{–}0.2(x_{\max} - x_{\min})$, $M=25$ (NG) or $M=100$ (SG²), with the squaring operation applied post-gradient computation for each sample [2106.10185].

## 7. Summary and Context in Explainable AI

SmoothGrad-Squared exemplifies a broader class of stochastic smoothing techniques in XAI for deep networks, designed to mitigate the effects of gradient shattering and produce more interpretable saliency maps. Its use of squaring in the aggregation step introduces an additional sparsifying effect, which can be advantageous for highlighting concentrated features but may not improve faithfulness or robustness across all tasks or architectures. The approach is fully model-agnostic, requiring only gradient computation, and can be applied on top of existing explainers. Researchers seeking stable, perturbation-aware, and spatially localized sensitivity maps may consider SmoothGrad-Squared in combination with other post-hoc rationalization techniques [2106.10185, 2303.00652].

Source: https://www.emergentmind.com/topics/smoothgrad-squared