Axiomatization of Gradient Smoothing in Neural Networks

Linjiang Zhou, Xiaochuan Shi, Chao Ma, Zepeng WangarXiv 2024 · DOI

Introduction

Deep neural networks are powerful but often act as "black boxes." To understand their decisions, researchers frequently use gradient-based explanations. However, raw gradients are notoriously noisy, appearing as "static" or random speckles rather than coherent features. This lack of clarity undermines human trust in AI explanations.

To combat this, practitioners have relied on heuristic techniques like SmoothGrad, which averages gradients over multiple noisy versions of an input. While effective, these methods lacked a rigorous mathematical foundation. This paper provides that foundation by framing gradient smoothing as a formal process of function mollification.

Theoretical Framework: Gradient Mollification

The authors bridge the gap between heuristic "hacks" and functional analysis through two core concepts:

  1. Function Mollification: In mathematics, a mollifier is a smooth function used to "sand down" a jagged, non-smooth function. The researchers prove that gradient smoothing is mathematically equivalent to convolving a network's output with such a mollifier.
  2. Monte Carlo Integration: Since analytical solutions are impossible for complex neural networks, the process is implemented via Monte Carlo sampling. This provides a formal proof that as the number of samples ($N$) increases, the smoothed gradient converges to a stable, "true" value.
Smoothing a jagged function (original) into a differentiable curve using different noise levels (epsilon).

This framework reveals that the "noise" in raw gradients is a byproduct of the network's non-linear decision boundaries. By applying "mathematical sandpaper," we can recover the underlying signal.

Beyond Gaussian Noise

Historically, Gaussian (Normal) noise was the default choice for smoothing. By axiomatizing the process, the authors demonstrate that Gaussian noise is just one of many possible kernels. They introduce and evaluate four new smoothing kernels: Poisson, Hyperbolic, Sigmoid, and Rectangular.

Comparison of the probability density functions for the standard Gaussian kernel and the four newly proposed kernels.

The framework also allows for principled hyperparameter selection. Instead of trial and error, the noise level ($\epsilon$) can be calculated based on desired confidence levels, similar to statistical confidence intervals.

Experimental Results and Insights

The researchers validated these kernels across standard benchmarks including MNIST, CIFAR-10, and ImageNet (using VGG16, MobileNet, and Inception).

  • Performance: The Poisson and Rectangular kernels frequently outperformed Gaussian noise in terms of Consistency (alignment with model learning) and Invariance (stability under small input shifts).
  • Localization: On ImageNet tasks with VGG16, the Poisson kernel achieved a localization score of 0.712, surpassing the standard Gaussian score of 0.699.
  • Visual Quality: Qualitatively, these new kernels often produced saliency maps that were sharper and more focused on the object of interest, avoiding the excessive blurring sometimes associated with Gaussian smoothing.
  • Convergence: The theory confirms that $N=50$ samples is typically the optimal point where the Monte Carlo approximation stabilizes for most image-related tasks.

Conclusion

By providing a rigorous mathematical basis for gradient smoothing, this work transforms a popular heuristic into a principled tool. The introduction of new kernels like Poisson and Rectangular offers practitioners more effective ways to generate clean, trustworthy explanations for deep learning models. Future work will focus on improving sampling efficiency to enable real-time smoothed explanations for complex architectures.

Summary updated

BibTeX
@misc{zhou2024axiomatization,
  author = {Linjiang Zhou and Xiaochuan Shi and Chao Ma and Zepeng Wang},
  title = {{Axiomatization of Gradient Smoothing in Neural Networks}},
  year = {2024},
  eprint = {2407.00371},
  archivePrefix = {arXiv},
  url = {https://arxiv.org/abs/2407.00371},
}
Figure