Path-Weighted Integrated Gradients
- Path-Weighted Integrated Gradients is a path-integral attribution method that generalizes IG by applying a nonnegative weighting function along the input path.
- It mitigates saturation effects by emphasizing regions where the model output changes rapidly, thus enhancing the clarity and fidelity of attributions.
- PWIG has been effectively applied in both vision and medical imaging tasks, demonstrating improved performance in ImageNet evaluation and dementia classification.
Searching arXiv for recent and foundational papers on Path-Weighted Integrated Gradients and closely related Integrated Gradients variants. Path-Weighted Integrated Gradients (PWIG) is a path-integral attribution method that generalizes Integrated Gradients (IG) by inserting a nonnegative weighting function along the path from a baseline to an input . In its generic straight-line form, the attribution for feature is
so standard IG is recovered when (Kamalov et al., 22 Sep 2025). The method arose from analyses of saturation effects in IG, where the model output often increases sharply at small and then flattens out, causing saturated regions to contribute disproportionately to the computed attribution (Miglani et al., 2020). Later work broadened PWIG into a family of weighting schemes, path choices, and equivalent stochastic formulations, and applied it to ImageNet evaluation, dementia classification, manifold-aware attribution, and layer-wise transformer analysis (Walker et al., 2023, Zaher et al., 2024, Kamalov et al., 15 Apr 2026, Nguyen, 29 Jun 2026).
1. Emergence from saturation analysis
The immediate precursor to PWIG is the saturation analysis of Miglani et al., who studied how different regions of the IG path contribute to attribution (Miglani et al., 2020). For a scalar target , input , and baseline , standard IG assigns
and satisfies completeness: 0
Their central observation is that along the straight-line path 1, the scalar output 2 often rises rapidly for small 3 and then becomes flat. This motivates a partition of the path into an “unsaturated” region and a “saturated” region. Defining 4, choosing a saturation threshold 5 such as 6, and setting
7
one obtains an early segment 8 where the output has not yet reached 9 above baseline, and a later segment 0 where the output is beyond that threshold. In practice, 1 is found by evaluating 2 on a grid of 3 values and selecting the smallest 4 meeting the criterion.
This saturation-based decomposition led directly to reweighted variants of IG. In the simplest construction, the path weight is piecewise constant: 5 on the unsaturated region and 6 on the saturated region, with the extreme case 7 completely ignoring the saturated tail. When 8 for 9 and 0 otherwise, PWIG reduces to “Left IG,” the unsaturated-only variant evaluated in the original study (Miglani et al., 2020).
2. Formal definition and weighting families
A more general formalization defines PWIG on the straight-line path 1, 2, using a continuous weighting function 3 (Kamalov et al., 22 Sep 2025). The practical Riemann-sum approximation with 4 steps is
5
In this formulation, the weighting function determines which parts of the path dominate the attribution.
Several weighting families have been explicitly proposed. Uniform weighting, 6, recovers IG and satisfies completeness. Exponential weighting, 7 with 8, emphasizes gradients near the input end 9; in the dementia-classification paper, 0 (Kamalov et al., 22 Sep 2025). Polynomial or Beta-shaped weights, 1, can emphasize early-path, late-path, or mid-path contributions. Custom shapes such as triangular functions, Gaussian bumps, or user-defined heuristics are intended to down-weight “noisy” regions of the interpolation.
A distinct but closely related construction appears in “Integrated Decision Gradients,” where the path-weighting function is taken to be the derivative of the output logit along the path,
2
and the attribution becomes
3
This specific weighting emphasizes the “decision region,” defined as the portion of the path where the output logit rapidly transitions from zero to its final value (Walker et al., 2023).
3. Axioms, completeness, and conceptual distinctions
In its generic form, PWIG retains several of IG’s axiomatic properties. The dementia-classification formalization states Implementation Invariance, Linearity, the Dummy Axiom / Sensitivity(b), and Symmetry–Preserving (Kamalov et al., 22 Sep 2025). Implementation Invariance means that if two networks agree on all inputs, then their PWIG attributions agree. Linearity states that attributions distribute over affine combinations of networks. The Dummy Axiom assigns zero attribution to a feature on which 4 does not depend. Symmetry–Preserving equates attributions of symmetric inputs when the function and the baseline respect that symmetry.
Completeness is the main property that changes under arbitrary weighting. For general 5,
6
which equals 7 if and only if 8 almost everywhere (Kamalov et al., 22 Sep 2025). The path-sampled formulation makes the deviation explicit through the completeness residual
9
where 0 (Kamalov et al., 15 Apr 2026).
A recurring point of confusion is that not all papers use “PWIG” to denote the same mathematical object. The generic framework treats 1 as an externally chosen nonnegative function and therefore generally loses completeness unless 2. By contrast, the IDG formulation argues that weighting by 3 is a bona-fide path integral and inherits Completeness, Sensitivity, Implementation-Invariance and Linearity under mild monotonicity assumptions, because the integral can be interpreted after reparameterizing by 4 (Walker et al., 2023). This suggests that completeness claims in the PWIG literature depend on whether weighting is regarded as an arbitrary deformation of IG or as a special reparameterized path integral.
4. Numerical realization and algorithmic variants
A saturation-oriented PWIG implementation follows a fixed sequence of operations (Miglani et al., 2020). One first computes 5, then evaluates 6 and 7 on a grid 8, 9. After setting 0, one finds the smallest 1 such that 2, with 3. The weights are then chosen as 4 for 5 and 6 otherwise, gradients 7 are computed, and the integral is approximated by
8
An optional renormalization step can enforce 9. The reported complexity is 0 per input.
The generic straight-line implementation in the dementia-classification formulation uses discretization 1, evaluates 2 for 3, samples the analytic weight 4, and requires 5 backward-passes; in those experiments, 6 (Kamalov et al., 22 Sep 2025). Post-processing may include clipping or percentile filtering to suppress outliers.
IDG adds an adaptive sampling strategy designed to reduce Riemann-sum error in regions where uniform sampling wastes steps on flat segments (Walker et al., 2023). The interval 7 is first partitioned into 8 coarse bins, logit gains 9 are measured, and 0 fine samples are allocated proportionally as
1
This concentrates evaluations where the output grows fastest. The paper recommends 2–3 as a quality/runtime trade-off and notes that setting 4 yields 5 total evaluations.
5. Empirical behavior across vision and medical imaging
On ImageNet classification networks, Miglani et al. compared “Left IG,” “Right IG,” and standard IG on Inception-v3, ResNet-50, and VGG-19 using model faithfulness (ABPC) and noise sensitivity (Sens), with 6 and 7 typically 8 (Miglani et al., 2020). Averaged over 2500 ImageNet samples, LeftIG improved both faithfulness and stability relative to full IG.
| Model | LeftIG ABPC | Full IG ABPC |
|---|---|---|
| Inception-v3 | 0.2837 | 0.2486 |
| ResNet-50 | 0.1708 | 0.1464 |
| VGG-19 | 0.1417 | 0.1282 |
| Model | LeftIG Sens | Full IG Sens |
|---|---|---|
| Inception-v3 | 0.5341 | 0.5711 |
| ResNet-50 | 0.7706 | 0.8074 |
| VGG-19 | 0.5970 | 0.7122 |
In the same evaluation, RightIG was reported as much lower in faithfulness and substantially more sensitive to noise. Within the saturation-based interpretation, this supports the claim that unsaturated, early-path gradients better explain model behavior than gradients from flat regions (Miglani et al., 2020).
The more explicitly decision-focused IDG evaluation used ImageNet 2012 validation, sampling 5 images per class across 1000 classes for 5000 images, and compared PWIG/IDG against IG, Left-IG, Guided IG, and adversarial gradient integration on ResNet-101, ResNet-152, and ResNeXt (Walker et al., 2023). For ResNet-101, the reported metrics were: AIC 9; SIC 0; insertion 1; deletion 2 for IG, LIG, GIG, AGI, and PWIG respectively. Similar consistent improvements of approximately 3–4 points were observed on ResNet-152 and ResNeXt.
A separate application to dementia classification used the OASIS-1 MRI dataset with four labels—non-demented, very mild, mild, moderate—and a convolutional neural network with four conv-blocks, ReLU, max-pool, dropout 5, three fully connected layers, and softmax over 4 classes (Kamalov et al., 22 Sep 2025). The scans were preprocessed to 6 and normalized to ImageNet statistics. In that study, PWIG used 7, 8, and clipping at the 60th and 95th percentiles. The reported validation accuracy was 9. Attribution maps were described as sharper than unweighted IG, with reduced spurious noise, and as emphasizing hippocampal, cortical, and subcortical atrophy in mild/moderate dementia; non-demented maps were diffuse, whereas moderate dementia maps concentrated on known pathology sites.
6. Extensions, equivalent formulations, and broader PWIG frameworks
One major extension replaces the straight-line path rather than only reweighting it. “Manifold Integrated Gradients” formulates attribution along an arbitrary path 00, with completeness 01, and then chooses 02 to be a geodesic on a learned Riemannian data manifold (Zaher et al., 2024). In this setting, a general path-weighted form is
03
The paper notes that one may take 04 so that contributions are proportional to manifold arc-length, and it reports improvements on Oxford-IIIT Pets and Oxford-102 Flowers in SENS05, explanation infidelity, and SSI under targeted attribution attacks (Zaher et al., 2024).
A second development establishes an exact connection between deterministic weighting and stochastic baseline sampling. “Path-Sampled Integrated Gradients” defines
06
and proves that if 07, then
08
This equivalence yields a deterministic CDF-weighted Riemann sum with 09 error for smooth models, compared with Monte Carlo RMSE 10, and gives a variance-reduction result under a white-noise model of gradient perturbations: for uniform sampling, 11, so 12 (Kamalov et al., 15 Apr 2026).
A third extension adapts path-weighting ideas to internal model states rather than input space. “IG-Lens” constructs a piecewise-linear path through transformer hidden states and attributes each segment to the layer it terminates at (Nguyen, 29 Jun 2026). For a scalar softmax-probability readout 13, the exact segment integral satisfies
14
and the sum over layers telescopes to 15. The default estimator is “prediction-aware”: each discrete step is credited its observed change in target probability rather than its raw gradient. According to the paper, this removes Riemann discretization error, suppresses steps that show gradient sensitivity without a change in output, and admits a single-pass batched implementation with no backward call.
Taken together, these developments position PWIG less as a single algorithm than as a general design space for attribution. Within that design space, one may alter the weighting function 16, the path 17, the sampling scheme, or the state space over which integration is performed. The common theme is selective emphasis: early versus late path segments, saturated versus unsaturated regions, decision regions, manifold-respecting trajectories, sampled intermediate baselines, or layer-wise hidden-state transitions.