Inferensys

Glossary

GraphSVX

A post-hoc explainability method that jointly computes Shapley values for nodes and features in a Graph Neural Network, providing a unified measure of structural and feature importance for individual predictions.
Data engineer managing feature store on laptop, feature definitions visible, casual data engineering session.
POST-HOC GRAPH EXPLAINER

What is GraphSVX?

GraphSVX is a post-hoc explainability method that decomposes Graph Neural Network predictions by computing Shapley values on joint coalitions of nodes and features, delivering both structural and feature-level explanations.

GraphSVX is a post-hoc, model-agnostic explainer that applies the game-theoretic Shapley value concept to Graph Neural Networks (GNNs). It uniquely constructs coalitions of both nodes and node features to compute their marginal contributions to a specific prediction, providing a unified explanation that captures structural importance and feature relevance simultaneously.

By leveraging a linear approximation of Shapley values, GraphSVX efficiently estimates importance scores without exhaustive computation. This dual-focus approach enables practitioners to identify not only which nodes in a graph's neighborhood drove a decision but also which specific attributes of those nodes were most influential, offering a granular audit trail for molecular property prediction or social network analysis.

CAPABILITIES

Key Features of GraphSVX

GraphSVX is a post-hoc explainer that decomposes GNN predictions using Shapley values on a coalition of nodes and features, providing both structural and feature-level explanations.

01

Joint Node and Feature Explanations

GraphSVX uniquely computes Shapley values jointly over nodes and features, providing a unified importance score. Unlike methods that explain structure or features in isolation, it captures the interaction effect where a node's importance is conditional on its features. This yields a holistic explanation that identifies both the critical nodes in the graph and the specific feature dimensions driving the prediction.

02

Efficient Coalition Sampling

Exact Shapley value computation is exponential in complexity. GraphSVX employs Monte Carlo sampling over the power set of nodes and features to approximate values efficiently. It uses a weighted least squares optimization to estimate Shapley values from a manageable number of model evaluations, making it practical for large graphs without sacrificing the theoretical guarantees of the Shapley framework.

03

Model-Agnostic Architecture

GraphSVX operates as a post-hoc, model-agnostic explainer. It treats the GNN as a black box, requiring only the ability to query predictions on masked input graphs. This means it can explain any GNN architecture—GCN, GAT, GraphSAGE, or GIN—without access to internal weights or gradients. The same explainer works across different models, simplifying the interpretability stack.

04

Multi-Level Explanation Granularity

The framework supports explanations at multiple resolutions:

  • Node-level: Which nodes contributed most to a specific node's prediction?
  • Feature-level: Which input features were most influential?
  • Global-level: Aggregate explanations to understand overall model behavior across the dataset. This flexibility allows engineers to debug individual predictions or audit systemic biases.
05

Fairness-Aware Feature Grouping

GraphSVX allows features to be grouped into semantically meaningful coalitions before computing Shapley values. For example, demographic features can be treated as a single coalition to measure their collective impact. This grouping mechanism is essential for algorithmic fairness auditing, enabling practitioners to quantify the influence of protected attributes on GNN predictions in social network or credit graph applications.

06

Theoretical Grounding in Game Theory

GraphSVX inherits the strong axiomatic properties of Shapley values from cooperative game theory:

  • Efficiency: Importance scores sum to the prediction difference from the baseline.
  • Symmetry: Identical contributions receive identical scores.
  • Dummy: Irrelevant features or nodes receive zero importance.
  • Additivity: Explanations are consistent across ensemble models. These guarantees make explanations legally defensible for regulated industries.
GRAPHSVX EXPLAINER

Frequently Asked Questions

Common questions about how GraphSVX computes Shapley values on graph-structured data to provide both structural and feature-level explanations for GNN predictions.

GraphSVX is a post-hoc explainability method for Graph Neural Networks that jointly explains node classifications by computing Shapley values on a coalition of nodes and features. It decomposes a GNN prediction into the marginal contribution of each node in the computational graph and each feature dimension in the node's feature vector. The method constructs a weighted linear regression model over sampled coalitions, where each coalition is a subset of nodes and features. By evaluating the GNN's output on these masked coalitions, GraphSVX efficiently approximates exact Shapley values without requiring an exponential number of model evaluations. The result is a dual explanation: a structural explanation identifying which neighboring nodes were most influential, and a feature explanation revealing which input dimensions drove the prediction. This unified approach addresses the limitation of earlier methods like GNNExplainer, which required separate optimization for structure and feature explanations.

EXPLAINER COMPARISON

GraphSVX vs. Other GNN Explainers

A feature-level comparison of GraphSVX against GNNExplainer and SubgraphX for post-hoc GNN interpretability.

FeatureGraphSVXGNNExplainerSubgraphX

Explanation Granularity

Node and feature jointly

Node and feature jointly

Subgraph structures

Theoretical Foundation

Shapley values (game theory)

Mutual information maximization

Shapley values (Monte Carlo)

Provides Feature Importance

Provides Structural Importance

Handles Multi-Relational Graphs

Global Explanation Mode

Faithfulness (Fidelity+)

0.85-0.92

0.78-0.85

0.88-0.94

Computational Complexity

O(2^N) with sampling

O(N^2) per node

O(MCTS iterations)

Prasad Kumkar

About the author

Prasad Kumkar

CEO & MD, Inference Systems

Prasad Kumkar is the CEO & MD of Inference Systems and writes about AI systems architecture, LLM infrastructure, model serving, evaluation, and production deployment. Over 5+ years, he has worked across computer vision models, L5 autonomous vehicle systems, and LLM research, with a focus on taking complex AI ideas into real-world engineering systems.

His work and writing cover AI systems, large language models, AI agents, multimodal systems, autonomous systems, inference optimization, RAG, evaluation, and production AI engineering.