---
title: Smooth MPRT (sMPRT)
url: https://www.emergentmind.com/topics/smooth-mprt-smprt
type: topic
---

# Smooth MPRT (sMPRT)

Smooth Model Parameter Randomisation Test (sMPRT) is an adaptation of the Model Parameter Randomisation Test (MPRT) for the evaluation of local explanation methods in deep learning, designed to mitigate the confounding impact of “shattering” noise in gradient-based attributions and to enable more reliable, variance-reduced assessment of explanation faithfulness. sMPRT achieves this by averaging attributions over multiple i.i.d. input perturbations before calculating similarity under progressive model parameter randomisation, thereby restoring the intended sensitivity-to-parameters principle while sharply reducing noise artifacts [2401.06465][2405.02383].

## 1. Motivation and Problem Statement

The original MPRT operates by progressively randomising the parameters of a model $f_\theta$ and measuring, via a similarity metric $\rho$, how much the corresponding explanation function $\Phi(f_\theta, x)$ changes. However, gradient-based explanations (e.g., Saliency, Integrated Gradients) commonly exhibit high-frequency, spatially uncorrelated noise, known as “gradient shattering.” This noise can artificially reduce the measured similarity between explanations of the original and randomised models, thereby confounding the interpretability of the MPRT and inflating/reducing differences between explanation methods, especially when similarity metrics such as SSIM or Spearman rank are highly sensitive to uncorrelated input perturbations. sMPRT is introduced to denoise the explanation maps before similarity calculation, leveraging the statistical variance reduction of averaging explanations over a set of Gaussian-perturbed inputs, in the spirit of SmoothGrad.

## 2. Formal Definition and Mathematical Formulation

Let $f_\theta:\mathbb{R}^D\to\mathbb{R}^C$ denote a differentiable classifier with parameters $\theta$, and let $\Phi(f, x, y; \lambda)\in\mathbb{R}^D$ denote a local explanation (typically an attribution or saliency map) for input $x$ and target $y$, possibly with method-specific hyperparameters $\lambda$. Let $\tilde{\theta}_l$ denote the model with parameters randomised up to layer $l$ (bottom-up randomisation), and $N$ the number of input perturbation samples.

For each $i=1,\dots,N$:
\[
\eta_i\sim\mathcal{N}(0,\sigma^2 I), \qquad x_i = x + \eta_i
\]
Let $e_i = \Phi(f_\theta, x_i)$ and $\hat{e}_i = \Phi(f_{\tilde{\theta}_l}, x_i)$. The denoised explanations are:
\[
\bar{e} = \frac{1}{N}\sum_{i=1}^N e_i, \qquad \bar{\hat{e}} = \frac{1}{N}\sum_{i=1}^N \hat{e}_i
\]
The sMPRT score at layer $l$ is defined as:
\[
q^{\mathrm{sMPRT}}_l = \rho\bigl(\bar{e},\,\bar{\hat{e}}\bigr)
\]
Alternatively, one may aggregate similarity before smoothing:
\[
\mathrm{sMPRT}(f, x) = 1 - \frac{1}{N}\sum_{i=1}^N \rho(e_i, \hat{e}_i)
\]
$\rho$ is typically the Structural Similarity Index (SSIM), but may also be Spearman correlation or other similarity metrics. Per-feature normalisation by the root-mean-square of the attributions is recommended.

## 3. Algorithmic Implementation

The sMPRT procedure for a given input–target pair $(x, y)$, model $f$, and randomisation levels $l=1,\dots,L$ is as follows:

```python
# Inputs: model f, randomised models f_hat_l for layers l, explanation function Phi,
# input x, label y, N noise samples, sigma (noise std), similarity rho
for l in 1..L:
    e_sum = 0
    e_hat_sum = 0
    for i in 1..N:
        eta_i ~ N(0, sigma^2 I)
        x_tilde_i = x + eta_i
        e_i = Phi(f, x_tilde_i, y)
        e_hat_i = Phi(f_hat_l, x_tilde_i, y)
        e_sum += e_i
        e_hat_sum += e_hat_i
    e_bar = e_sum / N
    e_hat_bar = e_hat_sum / N
    q_sMPRT_l = rho(e_bar, e_hat_bar)
return {q_sMPRT_l}_{l=1}^L
```
sMPRT is available as a two-stage “sample-and-average” procedure and implemented in the Quantus XAI evaluation library [2405.02383].

## 4. Theoretical Underpinnings and Noise Reduction

Averaging $N$ i.i.d. noisy attributions reduces variance by $1/N$, as per the Central Limit Theorem. The consequence is that high-frequency, layerwise-uncorrelated “shattering noise” – prevalent in single-pass gradient methods – is suppressed, and the similarity measurement across model randomisations more faithfully reflects true model parameter sensitivity rather than coincidental noise. This denoising effect is mathematically identical to SmoothGrad, which adds i.i.d. input noise to reduce explanation variance. sMPRT thereby provides lower-variance, more stable metric values, enabling robust ranking of explanation methods even when similarity metrics are highly sensitive to uncorrelated perturbations [2401.06465][2405.02383]. 

A plausible implication is that variance-induced instability can be transformed into reliable performance differences under sMPRT, meaning methods previously seen as “noise-robust” due to shattering insensitivity may be detected as artificially over-performing.

## 5. Empirical Results and Performance Analysis

Experiments in [2401.06465] and [2405.02383] evaluated sMPRT against MPRT and eMPRT across datasets and explanation methods:

### Datasets and Setup
- ImageNet with ResNet-18, VGG-16 (pretrained; 300 samples)
- MNIST, fMNIST with LeNet (1000 samples)
- Explanation methods include Gradient, Saliency, Input×Gradient, GradCAM, GradientSHAP, SmoothGrad, IntegratedGradients, GuidedBackprop, LRP-ε, LRP-z+, and random baseline
- Similarity metric: SSIM with feature-wise RMS normalisation

### Principal Observations
- Layer-wise SSIM curves: With MPRT ($N=1$), similarity can be artificially decreased for gradient-based methods by high-frequency noise. Under sMPRT ($N=50$), these methods (e.g. Saliency, SmoothGrad) show lower similarity, revealing previously hidden sensitivity to parameter randomisation. For noise-invariant methods (LRP-$z^+$, Guided Backprop), the difference is diminished, and scores converge across explanation types.
- Area Under Curve (AUC) in similarity-versus-layer plots stabilises around $N\approx 50$; increasing $N$ further provides minimal gain in stability.
- Meta-evaluation (MetaQuantus protocol): Across four tasks and method subsets, sMPRT shows higher meta-consistency scores ($\Delta$MC $= 0.02$–$0.06$ above MPRT; exceeds one standard deviation of MPRT variability in many cases).
- sMPRT reduces the range of SSIM across methods (~0.38 to ~0.34 for VGG; ~0.50 to ~0.46 for ResNet), tightening method ranking distribution [2405.02383].

| Variant     | Sensitivity Principle Retained? | Hyperparameters | Cost (per input)         | Direct Explanation Similarity? |
| ----------- | ------------------------------ | --------------- | ------------------------ | ----------------------------- |
| MPRT        | Yes                            | –               | 1×                       | Yes                           |
| sMPRT       | Yes (denoised)                 | $N$, $\sigma$   | $N$×                     | Yes                           |
| eMPRT       | Complexity-drift only          | –               | ≤2×                      | No                            |

## 6. Practical Recommendations and Limitations

- **Number of Samples ($N$):** $N=50$ recommended as balance between variance reduction and compute time; $N=20$ provides partial improvement; $N\geq 300$ is smoother but computationally expensive. For vision, $N\approx50$ is empirically validated.
- **Noise Scale ($\sigma$):** Set to $0.2(x_{\max}-x_{\min})$ as in SmoothGrad. In low-dynamic-range or highly structured domains (e.g. medical imaging, climate data), domain-specific tuning may be required.
- **Similarity Metric ($\rho$):** SSIM is standard; alternatives (correlation, Spearman-$\rho$) require uniform normalisation of attributions (preferably RMS).
- **Compute Cost:** sMPRT is approximately $N$ times slower than MPRT. For sampled-explanation methods (e.g. SmoothGrad), marginal sMPRT benefit is modest; eMPRT may be more suitable.
- **When Recommended:** Best suited for offline benchmarking of noisy, gradient-based explanations where MPRT appears overly optimistic, and available compute is non-limiting. Useful to discern whether apparent noise-invariance is method-intrinsic or an artifact.

Trade-offs include increased computational burden and the introduction of two additional hyperparameters. Potential bias may be induced when perturbed samples leave the data manifold, especially for highly non-Gaussian or non-Euclidean input domains.

## 7. Comparison to Related Tests

- **Original MPRT:** sMPRT retains the model parameter sensitivity principle but corrects for shattering/noise artifacts, reducing variance and providing robust, interpretable rankings at a linear compute overhead. MPRT is faster but subject to high similarity-score variability.
- **Efficient MPRT (eMPRT):** eMPRT measures the rise in complexity (e.g. attribution histogram entropy) after randomisation, eschewing direct explanation similarity. eMPRT is efficient and hyperparameter-free, but the interpretability of its score is less direct with respect to explanation collapse.

In conclusion, sMPRT constitutes a minimal but mathematically justified extension to MPRT, providing a denoised, faithful assessment of explanation method sensitivity to model parameters while significantly improving score consistency and robustness by controlling for the obfuscating effect of high-frequency gradient noise [2401.06465][2405.02383].

Source: https://www.emergentmind.com/topics/smooth-mprt-smprt