Inferensys

Glossary

GNN-LRP

A Layer-wise Relevance Propagation technique adapted for Graph Neural Networks that decomposes the output prediction backwards through the network to assign relevance scores to input nodes and edges.
Stylish WeWork-like workspace with hot desks and document wall, professional searching through enterprise knowledge base on a mounted ultrawide display, warm industrial pendants overhead.
Graph Neural Network Layer-wise Relevance Propagation

What is GNN-LRP?

A decomposition technique that backpropagates a GNN's output prediction through its layers to assign relevance scores to individual input nodes and edges, identifying which structural elements most influenced the decision.

GNN-LRP (Graph Neural Network Layer-wise Relevance Propagation) is a post-hoc explainability method that decomposes a trained GNN's prediction backward through the network's message-passing layers. By applying conservative relevance conservation rules at each layer, it redistributes the output score to the input space, producing a heatmap of relevance scores over the graph's nodes and edges. This identifies the specific subgraph structures and features that drove the model's decision.

Unlike perturbation-based explainers, GNN-LRP leverages the deep Taylor decomposition framework to propagate relevance signals without altering the input graph. It respects the GNN's learned latent representations, ensuring high faithfulness to the model's internal reasoning. Variants like GNN-LRP and GNN-HRP adapt the propagation rules for different aggregation functions, making the technique applicable across GCNs, GINs, and other message-passing architectures.

MECHANISM BREAKDOWN

Key Features of GNN-LRP

GNN-LRP adapts Layer-wise Relevance Propagation to graph-structured data, decomposing a model's output prediction backwards through message-passing layers to assign relevance scores to individual input nodes and edges.

01

Higher-Order Taylor Decomposition

GNN-LRP replaces simple gradient×input attribution with a higher-order Taylor expansion of the model's prediction function at each layer. This captures the joint effect of neuron interactions rather than treating contributions independently. The decomposition distributes relevance proportional to the partial derivatives of the output with respect to the inputs of each layer, ensuring that relevance is conserved across non-linear activation functions like ReLU and tanh.

02

Message-Passing Relevance Conservation

The core axiom of LRP is the conservation property: the sum of relevance scores at any layer equals the model's output score. In GNN-LRP, this principle is extended to graph convolutions. Relevance is redistributed from a target node's embedding backwards to its neighborhood aggregation step. The method decomposes the message-passing operation (e.g., GraphSAGE or GCN aggregation) by assigning relevance to each incoming message based on its proportional contribution to the node's updated representation.

03

Edge-Level Relevance Attribution

Unlike node-only explanation methods, GNN-LRP explicitly computes relevance scores for individual edges in the input graph. After backpropagating relevance through the feature transformation and aggregation functions, the method isolates the contribution of each edge's message to the final prediction. This produces a weighted, directed relevance graph where edge weights indicate how critical that connection was for the model's decision, enabling fine-grained structural explanations.

04

Deep Taylor Decomposition Rules

GNN-LRP employs a set of composite propagation rules tailored to different layer types:

  • LRP-ε: Adds a small stabilizing term to the denominator to prevent relevance explosion when neuron activations approach zero.
  • LRP-γ: Favors positive contributions by adding a multiplicative factor to positive weights, sharpening the explanation's focus on excitatory inputs.
  • LRP-αβ: Separates positive and negative weight contributions, weighting them differently to control the influence of inhibitory signals. These rules are applied sequentially through the GNN's layers.
05

Contrastive Explanations via Biased Backpropagation

GNN-LRP can generate contrastive explanations that answer 'Why class A instead of class B?' by backpropagating the difference between two output logits rather than a single class score. The relevance signal is initialized as f(x)_A - f(x)_B at the output layer. The resulting node and edge relevance scores highlight the structural patterns that discriminate between the two classes, revealing the specific subgraph features that swayed the model's decision toward one class over the other.

06

Faithfulness and Fidelity Validation

GNN-LRP explanations are evaluated using perturbation-based fidelity metrics:

  • Faithfulness: The top-k relevant edges are removed, and the drop in prediction accuracy is measured. A steep drop indicates the explanation captured truly important structures.
  • Fidelity: The model's prediction on the subgraph formed by only the top-k relevant edges is compared to its original prediction. High fidelity means the explanation subgraph alone is sufficient to reproduce the decision. GNN-LRP consistently outperforms gradient-based saliency maps on both metrics.
GNN-LRP EXPLAINABILITY

Frequently Asked Questions

Layer-wise Relevance Propagation adapted for Graph Neural Networks decomposes predictions backward through message-passing layers to assign relevance scores to individual nodes and edges, enabling fine-grained structural explanations.

GNN-LRP (Graph Neural Network Layer-wise Relevance Propagation) is a decomposition-based explainability method that redistributes a GNN's output prediction backward through its layers to assign relevance scores to input nodes, edges, and features. Unlike perturbation-based approaches, GNN-LRP leverages the conservation property—the total relevance across all inputs equals the model's output score. The method operates by defining local redistribution rules for each operation in the GNN (message passing, aggregation, update, and readout), ensuring that relevance flows from higher-layer neurons to lower-layer neurons proportionally to their activation contributions. For a node classification task, GNN-LRP starts with the target class logit and iteratively propagates relevance through each layer using the alpha-beta rule or the epsilon rule to handle numerical instabilities. The result is a heatmap over the input graph where each node and edge receives a signed relevance value indicating its positive or negative contribution to the prediction. This technique is particularly powerful because it respects the graph's connectivity structure—relevance flows only along existing edges, preserving the topological semantics of the explanation.

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.