NeurIPS 2026Coming to NeurIPS?Explore papers, orals & directions

Gradient-based Uncertainty Attribution for Explainable Bayesian Deep Learning

Hanjing Wang, Dhiraj Joshi, Shiqiang Wang, Qiang Ji

TL;DR

Researchers have developed UA-Backprop, a highly efficient gradient-based method to identify exactly which parts of an input image cause a Bayesian Deep Learning model to be uncertain. By treating these "uncertainty maps" as an attention mechanism during retraining, the authors demonstrate that models can be made significantly more robust and accurate, especially when training data is limited.

What Problem Does This Paper Address?

Deep learning models are notoriously overconfident, often making wrong predictions with high certainty when faced with noisy data or "out-of-distribution" inputs (things they haven't seen before). Bayesian Deep Learning (BDL) helps by providing uncertainty scores—essentially a "confused" signal.

However, knowing a model is confused isn't enough for high-stakes applications like medical imaging or autonomous driving; we need to know why. Existing "Classification Attribution" (CA) methods tell us which pixels led to a specific class prediction, but they don't necessarily explain the source of uncertainty. Previous "Uncertainty Attribution" (UA) methods were either computationally expensive (requiring thousands of passes or training separate generative models) or produced noisy, incomprehensible results. This paper seeks a method that is fast, theoretically sound, and produces actionable insights to improve the model.

Methods

The authors introduce UA-Backprop, a framework that decomposes predictive uncertainty into pixel-wise contributions. The process follows a specific backward path: Uncertainty ($U$) $\rightarrow$ Softmax Probabilities ($g$) $\rightarrow$ Logits ($z$) $\rightarrow$ Input ($x$).

Key technical innovations include:

  • Completeness Property: The method ensures that the sum of all pixel attributions exactly equals the total uncertainty score, a gold standard in explainability.
  • Gradient Normalization: To solve the "vanishing gradient" problem (where uncertainty gradients become too small to be useful), they use a normalized softmax function with a temperature hyperparameter to propagate signals from the softmax layer back to the logits.
  • General Framework: UA-Backprop is designed to be modular. For the final step from logits to pixels ($z \rightarrow x$), it can incorporate existing robust attribution methods like FullGrad to produce cleaner, more localized maps.
  • Uncertainty Mitigation: They don't just explain the uncertainty; they use it. By creating an attention map $A(x) = (1 - M(x)) \odot M(x)$ (where $M(x)$ is the uncertainty map), they retrain the model to focus on informative regions while ignoring problematic or noisy areas.
Figure 1. The overall framework of the proposed method. Figure (a) shows the forward propagation of the BDL model for uncertainty quantification. Figure (b) demonstrates the backward process from the uncertainty to the input for attribution analysis, crossing the softmax probabilities, the logits, and the BDL model. The brighter regions indicate higher attributions.

Datasets

The method was evaluated on four standard benchmark datasets for image classification:

  • MNIST: Grayscale handwritten digits.
  • SVHN: Street View House Numbers (color).
  • CIFAR-10 & CIFAR-100: Natural images across 10 and 100 classes, respectively.

Key Insights and Ideas

  • UA is distinct from CA: Explaining a prediction (Classification Attribution) assumes the model is right. Explaining uncertainty (UA) identifies input imperfections. As seen in Figure 4, aleatoric uncertainty (data noise) often highlights object boundaries, while epistemic uncertainty (model ignorance) highlights regions that deviate from the training distribution.
  • Efficiency is a Feature: Unlike perturbation-based methods that require thousands of forward passes, UA-Backprop generates an explanation in a single backward pass, making it suitable for real-time applications.
  • Actionable Explanations: The "aha moment" here is that uncertainty maps are essentially a roadmap for model improvement. By using these maps as attention weights, the model learns to "look away" from the pixels that confuse it.
Figure 4. Epistemic, aleatoric, and total uncertainty attribution maps for our proposed method on MNIST dataset.

Key Results

  • Qualitative Superiority: UA-Backprop produces much clearer and more localized attribution maps compared to baselines like SmoothGrad or Integrated Gradients, which often result in "scattered" or noisy visualizations (see Figure 3).
  • The Blurring Test: To quantitatively prove accuracy, the authors blurred the most "problematic" pixels identified by the method. UA-Backprop achieved the highest Maximum Uncertainty Reduction Rate (MURR), meaning it correctly identified the pixels that, when obscured, most effectively lowered the model's confusion.
  • Performance Boost: In the uncertainty mitigation experiments, retraining with UA-based attention improved classification accuracy by approximately 6% on average across datasets when training data was limited.
  • Speed: On CIFAR-10, UA-Backprop took 0.46 seconds to attribute one image, compared to 18.43 seconds for the generative-model-based CLUE method.
Figure 5. Examples of the blurring test for UA-Backprop.

Limitations and Future Work

While UA-Backprop is highly effective, the authors note a few areas for growth:

  • Dependence on BDL Quality: The attribution is only as good as the underlying Bayesian model's ability to quantify uncertainty in the first place.
  • Deterministic Models: The current method is optimized for Bayesian ensembles. While the authors touched on applying it to deterministic models (using Laplacian approximations), they noted that results were less robust due to inadequate uncertainty quantification in single networks.
  • End-to-End Training: Future work will focus on integrating UA directly into the training loop so the model can learn to mitigate its own uncertainty dynamically rather than in a two-stage retraining process.

Summary updated

BibTeX
@misc{wang2023gradient,
  author = {Hanjing Wang and Dhiraj Joshi and Shiqiang Wang and Qiang Ji},
  title = {{Gradient-based Uncertainty Attribution for Explainable Bayesian Deep Learning}},
  year = {2023},
  eprint = {2304.04824},
  archivePrefix = {arXiv},
  url = {https://arxiv.org/abs/2304.04824},
}
Figure