Pixel-level Certified Explanations via Randomized Smoothing

    Alaa Anani1,2, Tobias Lorenz2, Mario Fritz2, Bernt Schiele1

    1Max Planck Institute for Informatics2CISPA Helmholtz Center for Information Security

    ICML 2025

    TL;DRWe certify, pixel by pixel, which parts of an attribution map stay important under small input perturbations, for any attribution method. Among 12 methods on 5 ImageNet models, LRP and RISE best combine certified robustness, localization, and faithfulness.

    Figure 1 of Pixel-level Certified Explanations via Randomized Smoothing
    Figure 1: Pixel-level certified explanations. (a) The original attribution h(x) has no robustness guarantee and changes under small input perturbations. (b) We compute attributions on noisy copies of the input, h(x + ε), and (c) certify which pixels robustly stay in the top K%. Colored pixels are the certified top-K% pixels for LRP, RISE, and Grad-CAM.

    Introduction

    Attribution methods explain a prediction by highlighting the input pixels that influence it, but imperceptible input perturbations can change the highlighted pixels while the prediction stays the same. Prior certified approaches only bound an image-level similarity score, a single number that neither shows which pixels are robust nor can be visualized. We introduce the first pixel-level certification for any black-box attribution method. The key idea is to treat attribution as segmentation: each pixel is labeled as inside or outside the top K% of scores, and randomized smoothing certifies these labels against ℓ₂-bounded perturbations (Figure 1).

    Method

    We binarize an attribution map: 1 for pixels in the top K% of scores, 0 for the rest. We then recompute this binary map on n copies of the input with added Gaussian noise of standard deviation σ. A pixel that keeps the same label with probability above a threshold τ is certified as important or unimportant; otherwise, we abstain.

    Certified labels stay unchanged under any ℓ₂ perturbation smaller than R = σ Φ⁻¹(τ), where Φ⁻¹ is the inverse standard-normal CDF. The guarantee covers the binary importance labels, not the raw attribution scores.

    Evaluation Metrics

    We evaluate certified maps with three metrics. %certified is the fraction of pixels that do not abstain (robustness). Certified GridPG is the fraction of certified-important pixels that fall in the correct image of a 2×2 grid of classes (localization). Faithfulness is the drop in class confidence when certified-important pixels are deleted, most important first.

    Experimental Setup

    We test 12 methods from the backpropagation, activation, and perturbation families on ResNet-18, Wide ResNet-50-2, ResNet-152, VGG-11, and ViT-B/16, at the input and final spatial layers, on 100 ImageNet images. Unless stated otherwise, σ = 0.15, n = 100, τ = 0.75, and failure probability α = 0.001, which gives R = 0.10.

    Results

    Certified Attribution Maps

    Lower K isolates finer features: LRP certifies the fish’s eye at K = 5% and the whole fish at K = 50%. Colored pixels are certified top-K%, white pixels are certified unimportant, and gray pixels abstain (Figure 2).

    Figure 2 from the paper
    Figure 2: Certified attribution maps at different K. Selected methods on ResNet-18. SS (smoothed sparsified) is the average of the sparsified attributions over n = 100 noisy samples at K = 50%. The Overlayed column stacks the certified top-K% pixels of each method, with lower K taking precedence.

    On grids of four classes, certified-important pixels concentrate in the target image, marked by the blue square (Figure 3).

    Figure 3 from the paper
    Figure 3: Certified attributions on image grids. Overlaid certified top-K% pixels at K = 30%, 20%, and 10% on ResNet-18. The blue square marks the image of the target class.

    Across all 12 methods, LRP gives the most detailed certified maps (Figure 4).

    Figure 4 from the paper
    Figure 4: Certified attributions for all 12 methods. Overlaid certified top-K% pixels at K = 50%, 25%, 10%, and 5% on ResNet-18, next to the smoothed sparsified (SS) map, which averages the sparsified attributions over n = 100 noisy samples at K = 50%.

    Robustness

    RISE certifies the most pixels at the input layer, followed by LRP; the other backpropagation methods certify almost none. All methods are more robust at the final layer. Grad and GB are highly certifiable there only because they produce almost constant grid-like patterns (Figure 5).

    Figure 5 from the paper
    Figure 5: Share of certified pixels per method. %certified on ResNet-18 at the input layer (left) and the final layer (right), for increasing certified radius R (top) and decreasing K (bottom). For each method, the darkest shade is pixels certified as top-K%, the medium shade is pixels certified as outside the top K%, and the lightest shade is abstentions.

    Localization

    LRP, RISE, and Occlusion localize almost perfectly at K = 10%. At the final layer, CAM and Grad-CAM do as well, while Grad and GB stay at the random baseline despite their high robustness (Figure 6).

    Figure 6 from the paper
    Figure 6: Certified localization per method. Certified GridPG on ResNet-18 at the input layer (left) and the final layer (right), for increasing certified radius R (top) and decreasing K (bottom). The random baseline is marked for reference.

    Robustness vs. Localization

    Robustness and localization do not imply each other. Across the five models, RISE and LRP offer the best balance at the input layer, and RISE keeps the best balance at the final layer, including on ViT-B/16 (Figure 7).

    Figure 7 from the paper
    Figure 7: Robustness against localization. Certified robustness (%certified) plotted against certified localization (Certified GridPG) for each method on all five models at K = 30%, at the input layer (top) and the final layer (bottom). Best marks the ideal corner.

    Faithfulness

    At the input layer, deleting the pixels certified by LRP and RISE causes the steepest confidence drop. At the final layer, most methods flip the prediction after the first deletion step, including Grad and GB, whose grid-like patterns disrupt the prediction without localizing the class. The three metrics are therefore best read together (Figure 8).

    Figure 8 from the paper
    Figure 8: Faithfulness of certified attributions. Ground-truth class confidence on ResNet-18 as certified top-K% pixels are deleted in descending order of importance, at the input layer (left) and the final layer (right). A steeper drop means a more faithful attribution.

    Conclusion

    Treating attribution as segmentation gives per-pixel robustness guarantees for any black-box attribution method. Across 12 methods and 5 ImageNet models, RISE and LRP achieve the best tradeoff between certified robustness, localization, and faithfulness.

    Citation

    @inproceedings{anani2025pixel,
        author    = {Alaa Anani and Tobias Lorenz and Mario Fritz and Bernt Schiele},
        title     = {Pixel-level Certified Explanations via Randomized Smoothing},
        booktitle = {Proceedings of the 42nd International Conference on Machine Learning},
        series    = {Proceedings of Machine Learning Research},
        volume    = {267},
        pages     = {1505--1533},
        year      = {2025},
    }