Graph-based Integrated Gradients (GB-IG)
- Graph-based Integrated Gradients (GB-IG) is an extension of Integrated Gradients tailored for graphs, replacing Euclidean interpolation with shortest-path based attribution.
- It computes attributions by summing gradient-weighted feature differences along discrete graph paths, effectively identifying important nodes and motifs in a GNN.
- Empirical results on synthetic and real-world datasets show GB-IG achieving superior fidelity and motif detection over traditional IG baselines, despite higher computational costs.
Searching arXiv for papers directly relevant to Graph-based Integrated Gradients and closely related path-based IG variants. Graph-based Integrated Gradients (GB-IG) is an extension of Integrated Gradients (IG) to graph data in which straight-line interpolation in Euclidean input space is replaced by attribution accumulation along shortest paths in a graph. In its explicit 2025 formulation, GB-IG is designed for graph neural networks (GNNs), where the input is a graph and predictions depend jointly on node features and adjacency; the method is intended to explain node classification by identifying influential feature dimensions, important nodes, and graph substructures or motifs (Simpson et al., 9 Sep 2025). In a broader path-based interpretability landscape, GB-IG also sits near graph- or manifold-constrained variants of IG that replace Euclidean chords with structure-respecting paths, including geodesic constructions approximated by -NN graphs and shortest-path search (Salek et al., 17 Feb 2025).
1. Problem setting and motivation
Standard IG assumes a continuous Euclidean input and a meaningful straight-line interpolation between a baseline and an input : $\IG(x,b) = (x-b) \odot \int_{0}^{1} \nabla f(tx+(1-t)b) \, \dd t.$ This construction is well matched to vector inputs, but GB-IG begins from the claim that it is ill-suited to graphs, because graphs are discrete structures and GNNs do not operate only on feature vectors. They operate on
where is the node-feature matrix and is the adjacency matrix. The central difficulty is that features and structure are coupled in GNN computation, so an explanation method that ignores graph geometry risks mischaracterizing what the model uses (Simpson et al., 9 Sep 2025).
The methodological objection to vanilla IG on graphs has several parts. Graph structure is discrete; there is no straight line between nodes in graph space; the natural notion of movement is along graph paths rather than Euclidean interpolation; and shortest paths on graphs are often not unique. On this view, the explanatory question is not how to interpolate continuously through an ambient tensor representation of a graph, but how to accumulate attribution along graph-respecting paths. GB-IG addresses this by redefining the path over which gradients are accumulated.
A common misconception is that GB-IG simply applies ordinary IG to a flattened adjacency matrix or feature tensor. The 2025 formulation does not do this. It does not define a continuous interpolation of the adjacency matrix. Instead, discreteness is handled by replacing continuous interpolation with discrete shortest paths over graph nodes, and by approximating the integral with sums of node-to-node feature differences times local gradients (Simpson et al., 9 Sep 2025).
2. Formal definition on graph paths
GB-IG represents a graph input as and selects a baseline node and a target node 0. It then defines
1
to consist of the shortest paths between nodes 2 and 3. Although the notation uses 4, the method explicitly treats paths as finite sequences of nodes (Simpson et al., 9 Sep 2025).
For a path 5, the core approximation is
6
This is the graph analogue of discretized integrated gradients. Instead of infinitesimal movement along a Euclidean line, GB-IG uses finite feature differences between adjacent nodes encountered along a graph path. The term combines feature impact, through the partial derivative, with structural impact, through movement along the path.
Because shortest paths need not be unique, GB-IG aggregates over all shortest paths: 7 This is the method’s defining expression. Each path contribution is normalized by 8, then summed across the shortest-path set. The prose in the source also states that explanations from multiple paths are summed to provide the mean contribution of structure, but the equation itself sums path-normalized contributions and does not divide by the number of paths. Accordingly, the exact normalization across paths is best taken from the formula rather than the prose.
The direct attribution target in the equations is a feature dimension 9. In practice, however, the reported use is to identify important nodes and graph motifs or substructures, especially in node classification. The method does not provide an explicit edge-attribution formula, and the authors note in a figure caption that edge importance is “not considered in this work” (Simpson et al., 9 Sep 2025).
3. Baseline nodes, path entropy, and computational procedure
Baseline selection in GB-IG is not the same as choosing a zero vector or a blurred image. The method treats the baseline as a node in the graph. Ordinary IG baselines such as zero are described as ill-posed on graph space, so GB-IG adapts the notion of a “maximum distance” baseline. Let 0 be the set of nodes with maximal graph distance from a target node 1. One option is to aggregate over all such baselines: 2 Because this may be expensive, the method proposes an information-theoretic rule for selecting a single baseline node (Simpson et al., 9 Sep 2025).
For a path 3, path information is defined by
4
which simplifies to
5
The entropy of a path set 6 is then
7
and the selected baseline is
8
Among maximally distant candidate baselines, GB-IG therefore chooses the one whose shortest-path set to the target has highest entropy under this degree-based path probability model (Simpson et al., 9 Sep 2025).
Operationally, the procedure can be summarized as follows. A trained GNN 9, a graph 0, and a target node 1 are given. A baseline node is chosen, preferably by the entropy criterion above. The set of shortest paths 2 is enumerated. For each path step, the local derivative 3 is computed. These local terms are multiplied by successive node-feature differences and accumulated along each path, then aggregated across paths. For evaluation, attributions are normalized to 4, and a threshold of 5 is used to determine important nodes.
This construction makes the main computational burden explicit. Complexity arises from finding all maximally distant baseline nodes 6, potentially enumerating all shortest paths 7, and computing gradients along every path step. The paper notes that 8 can be 9 in the worst case, and that even after choosing a single $\IG(x,b) = (x-b) \odot \int_{0}^{1} \nabla f(tx+(1-t)b) \, \dd t.$0, the number of shortest paths $\IG(x,b) = (x-b) \odot \int_{0}^{1} \nabla f(tx+(1-t)b) \, \dd t.$1 may still be large (Simpson et al., 9 Sep 2025).
4. Axiomatic status and relation to non-straight-path IG
The method is framed as an axiomatic extension of IG. Six axioms from Sundararajan et al. are listed: Nullity, Implementation Invariance, Linearity, Sensitivity, Symmetry, and Completeness. GB-IG is said to satisfy axioms 1–5 “immediately,” while Completeness is modified because the method aggregates over multiple graph paths (Simpson et al., 9 Sep 2025).
Standard completeness has the form
$\IG(x,b) = (x-b) \odot \int_{0}^{1} \nabla f(tx+(1-t)b) \, \dd t.$2
GB-IG does not satisfy this directly. Instead, it introduces path-wise completeness: $\IG(x,b) = (x-b) \odot \int_{0}^{1} \nabla f(tx+(1-t)b) \, \dd t.$3 Total attribution therefore equals the sum of endpoint output differences over all paths considered. When $\IG(x,b) = (x-b) \odot \int_{0}^{1} \nabla f(tx+(1-t)b) \, \dd t.$4 consists of one path, this reduces to standard completeness in Euclidean space.
Within the broader IG literature, GB-IG is part of a larger shift from fixed straight-line interpolation toward geometry-respecting paths. A closely related development is Geodesic Integrated Gradients (GIG), which treats input space as a Riemannian manifold with metric tensor induced by the model Jacobian,
$\IG(x,b) = (x-b) \odot \int_{0}^{1} \nabla f(tx+(1-t)b) \, \dd t.$5
and computes attributions along geodesics rather than Euclidean chords. One of GIG’s two approximation schemes is explicitly graph-based: a $\IG(x,b) = (x-b) \odot \int_{0}^{1} \nabla f(tx+(1-t)b) \, \dd t.$6-NN graph is built over sampled points, edge weights are defined by integrating the gradient norm along local straight segments, and a shortest-path algorithm such as Dijkstra or A$\IG(x,b) = (x-b) \odot \int_{0}^{1} \nabla f(tx+(1-t)b) \, \dd t.$7 is used to obtain a piecewise-linear path for attribution (Salek et al., 17 Feb 2025).
The connection is conceptual rather than identical. In the narrow sense, GB-IG is the graph-node shortest-path method for GNN explanations. In the broader sense, GIG shows how graph construction can serve as an approximation to a deeper continuous geodesic objective. GIG also introduces Strong Completeness,
$\IG(x,b) = (x-b) \odot \int_{0}^{1} \nabla f(tx+(1-t)b) \, \dd t.$8
and claims that geodesic paths are the only path-based attribution method satisfying it under the paper’s assumptions. Whether every step of that proof is fully rigorous is described as debatable in the source material, but the conceptual message is that path choice can control feature-cancellation pathologies that ordinary completeness does not detect (Salek et al., 17 Feb 2025).
5. Empirical evidence
The reported GB-IG experiments focus on node classification with a 3-layer GCN with 64 hidden units per layer. Three evaluation metrics are used. Fidelity measures the average drop in model output when important nodes are occluded: $\IG(x,b) = (x-b) \odot \int_{0}^{1} \nabla f(tx+(1-t)b) \, \dd t.$9 Because the GCN is transductive, important nodes are not removed structurally; they are occluded by setting their node features to zero. Higher fidelity is better, and negative fidelity means the selected nodes increase confidence when removed. Sparsity is
0
and the Jaccard index against ground-truth explanation masks is
1
Explanations are normalized to 2 and thresholded at 3 (Simpson et al., 9 Sep 2025).
On the synthetic ShapeGGen benchmark, four settings are used: House with homophily 4, House with homophily 5, Circle with homophily 6, and Circle with homophily 7. GB-IG is reported as best on all four datasets for both Fidelity and Jaccard.
| Dataset | GB-IG Fidelity | GB-IG Jaccard |
|---|---|---|
| House 8 | 9 | 0 |
| House 1 | 2 | 3 |
| Circle 4 | 5 | 6 |
| Circle 7 | 8 | 9 |
The strongest quantitative comparisons are explicit for several cases. On House 0, GB-IG fidelity is 1, compared with IG-Uniform 2, IG-Gaussian 3, and IG-Zero 4. On Circle 5, GB-IG fidelity is 6 while all IG baselines are negative. For Jaccard, the gains are large: House 7 shows GB-IG 8 versus next-best 9; House 0 shows 1 versus 2; Circle 3 shows 4 versus 5; and Circle 6 shows 7 versus 8. The main tradeoff is sparsity: GB-IG is less sparse than IG baselines, especially IG-Gaussian.
On real-world citation networks—Pubmed, Cora, and CiteSeer—there is no ground-truth explanation mask, so only Fidelity and Sparsity are reported.
| Dataset | GB-IG Fidelity | GB-IG Sparsity |
|---|---|---|
| Pubmed | 9 | 0 |
| Cora | 1 | 2 |
| CiteSeer | 3 | 4 |
GB-IG is best on 2 of the 3 real datasets in Fidelity and only narrowly behind IG-Gaussian on Cora. Specifically, Pubmed fidelity is 5 for GB-IG, versus IG-Zero 6, IG-Uniform 7, and IG-Gaussian 8. CiteSeer fidelity is 9 for GB-IG, versus IG-Zero 00, IG-Uniform 01, and IG-Gaussian 02. On Cora, IG-Gaussian attains 03, slightly above GB-IG’s 04. In all three real datasets, GB-IG remains less sparse than the IG baselines (Simpson et al., 9 Sep 2025).
6. Scope, limitations, and adjacent application domains
The explicit scope of GB-IG is narrow. It is demonstrated on GCNs for node classification and is developed for undirected, unweighted graphs. The method’s strengths are that it respects graph discreteness, naturally incorporates structure, recovers motif ground truths much better than vanilla IG on the reported synthetic tasks, and avoids ill-posed straight-line interpolation through graph space. Its stated limitations are equally clear: explanations are less sparse; computational cost may be high when there are many maximal-distance baselines or many shortest paths; there is no explicit edge-attribution mechanism; practical node-level aggregation details are under-specified; and baseline selection remains an open issue even with the entropy heuristic (Simpson et al., 9 Sep 2025).
A second misconception is that GB-IG, as currently formulated, explains every graph element symmetrically. It does not. The equations directly attribute importance to feature dimensions 05, and the experiments interpret these scores at the node and motif level. Explicit edge attribution is absent. A plausible implication is that extensions to weighted, directed, or edge-centric settings would require more than a trivial rewrite of the existing equations.
The method also has relevance outside conventional graph benchmarks. A separate 2025 photonics study does not implement GB-IG, but it provides a reusable pattern for structured scientific design problems: generate a dataset, train a differentiable surrogate for a scalar physical figure of merit, apply IG to the surrogate, and interpret sparse high-importance regions. In that work, the device geometry is represented as a binary 2D mask, the targets are power at 06 nm and 07 nm, IG uses 08 integration steps, and visualization emphasizes magnitude maps, 09th-percentile clipping, and top-10 hotspots with default 11. The same source explicitly states that the wavelength-demultiplexer geometry is amenable to graphization into nodes, edges, and region-level features, and that physically meaningful units of explanation are already substructures such as the splitter/taper hub, abrupt width transitions, and high-curvature edges (Park et al., 25 Oct 2025).
This suggests a concrete research direction rather than an established result: GB-IG may be particularly useful where the native objects of explanation are not isolated pixels but functional substructures, routes, or interfaces. In that broader sense, the significance of GB-IG is not merely that it replaces one numerical integration rule with another. It redefines what a path-based attribution means when the input domain itself is combinatorial or manifold-constrained, and it makes graph structure part of the attribution path rather than an inconvenient encoding detail.