Path-sampled integrated gradients

Zihao Wang, Fadi Thabtah, R. Sivaraj, Neda AbdelhamidGulf 2026 · DOI

TL;DR

Path-Sampled Integrated Gradients (PS-IG) is a new feature attribution framework that makes model explanations more robust by averaging over multiple baselines along a path. The authors prove a "free lunch" theorem: this stochastic averaging is mathematically equivalent to a deterministic weighted integral, allowing for 1/3 less noise and significantly faster convergence without any extra computational cost.

What Problem Does This Paper Address?

In the quest for Explainable AI (XAI), Integrated Gradients (IG) has become a "gold standard" for identifying which input features (like pixels in an image) most influence a model's prediction. However, IG has two major Achilles' heels:

  1. Baseline Sensitivity: The results change drastically depending on the "starting point" (baseline) chosen, such as a black image vs. a white image.
  2. Shattered Gradients: Deep neural networks often have very noisy, volatile gradients. Integrating along a single fixed path can aggregate this noise, resulting in "speckled" or unstable attribution maps that are hard for humans to trust.

Existing solutions like "Expected Gradients" solve the baseline issue by sampling many points from a dataset, but they are computationally expensive, requiring hundreds of forward and backward passes through the model.

Methods

The authors introduce Path-Sampled Integrated Gradients (PS-IG). Instead of picking one baseline or sampling globally from a dataset, they compute the expected attribution over baselines sampled strictly along the linear path between a reference point and the input.

The core innovation is a mathematical proof showing that this stochastic expectation is equivalent to Path-Weighted Integrated Gradients (PWIG). Specifically, if you sample baselines with a probability density $p$, it is identical to calculating a single integral where the path is weighted by the Cumulative Distribution Function (CDF) of that density.

By establishing this link, the authors show that you can replace expensive random sampling (Monte Carlo) with a deterministic Riemann sum. This changes the error convergence rate from $O(m^{-1/2})$ to $O(m^{-1})$, meaning you get much more accurate explanations with far fewer steps.

Datasets

As this is a theoretical paper published in a mathematics journal, the authors focus on controlled synthetic environments to validate their proofs:

  • Synthetic 3-variable functions: They used linear, quadratic, and sigmoidal functions to represent different "gradient landscapes."
  • Stochastic Noise Models: They injected Gaussian white noise into these functions to simulate the "shattered gradients" found in real-world deep networks.

No large-scale real-world datasets (like ImageNet) were used in this specific paper, as the goal was to provide rigorous analytical proof of the method's properties.

Key Insights and Ideas

  • The Sampling-Weighting Duality: The most significant "aha moment" is that sampling baselines along a path is functionally the same as applying a non-decreasing weight to the gradients along that path.
  • The 1/3 Variance Reduction: The authors prove analytically that if you sample baselines uniformly along the path, the variance of the resulting attribution is exactly one-third that of standard IG. This makes the explanations naturally smoother and more robust to noise.
  • Expected Baseline Completeness: Standard IG satisfies "completeness" (the attributions sum up to the difference between the output and the baseline). PS-IG introduces a variation where the attributions sum to the difference between the output and the average prediction along the path, which acts as a "smoothed baseline" that is less sensitive to local model fluctuations.

Key Results

  • Stability: In numerical experiments with noisy gradients, PS-IG consistently reduced empirical variance by a factor of ~3 (e.g., for a sigmoidal function, the variance dropped from 0.00982 to 0.00333).
  • Efficiency: The deterministic PS-IG estimator achieved orders of magnitude lower error than Monte Carlo sampling for the same "computational budget" (number of gradient calls).
  • Axiomatic Integrity: The method preserves essential properties required for "fair" attributions, including linearity and implementation invariance.

Limitations and Future Work

  • Linear Path Constraint: The current proof relies on straight-line interpolation. While common, some researchers argue for following the "data manifold" via non-linear paths, which PS-IG does not yet address.
  • Choice of Density: While uniform sampling provides a 1/3 variance reduction, the paper notes that the "optimal" sampling density $p$ might vary depending on the specific model or domain, leaving room for future optimization.
  • Empirical Scaling: While the math holds, future work is needed to demonstrate how these "smoother" maps look on massive architectures like Vision Transformers or Large Language Models compared to other noise-reduction techniques like SmoothGrad.

Summary updated

Abstract

We introduce path-sampled integrated gradients (PS-IG), a framework that generalizes feature attribution by computing the expected value over baselines sampled along the linear interpolation path. We prove that PS-IG is mathematically equivalent to path-weighted integrated gradients, provided the weighting function matches the cumulative distribution function of the sampling density. This equivalence allows the stochastic expectation to be evaluated via a deterministic Riemann sum, improving the error convergence rate from O(m-1/2) to O(m-1) for smooth models. Furthermore, we demonstrate analytically that PS-IG functions as a variance-reducing filter against gradient noise---strictly lowering attribution variance by a factor of 1/3 under uniform sampling - while preserving key axiomatic properties such as linearity and implementation invariance.
BibTeX
@inproceedings{wang2026path,
  author = {Zihao Wang and Fadi Thabtah and R. Sivaraj and Neda Abdelhamid},
  title = {{Path-sampled integrated gradients}},
  booktitle = {Gulf},
  year = {2026},
  doi = {10.56947/gjom.v22i1.4141},
}
Figure