Inferensys

Glossary

Layer-wise Relevance Propagation

A decomposition technique that redistributes a model's prediction score backward through the network layers using local conservation rules to assign relevance scores to individual input features.
Data engineer managing feature store on laptop, feature definitions visible, casual data engineering session.
DEEP TAYLOR DECOMPOSITION

What is Layer-wise Relevance Propagation?

A conservative redistribution technique for explaining deep neural network predictions by backpropagating the output score through the network's layers to assign relevance scores to individual input features.

Layer-wise Relevance Propagation (LRP) is a decomposition technique that redistributes a model's prediction score backward through the network layers using a local conservation property, ensuring the total relevance received by a neuron equals the total relevance it redistributes to its inputs. Unlike standard gradient-based methods, LRP defines specific propagation rules tailored to different layer types—such as the LRP-ε or LRP-αβ rules—that leverage the network's learned weights and activations to produce high-resolution, semantically meaningful heatmaps without relying on input perturbations.

The method operates by treating the prediction as the total amount of relevance to be explained and iteratively applying a Taylor-type decomposition at each layer, redistributing relevance proportionally to each lower-layer neuron's contribution to the upper-layer activation. This process satisfies the relevance conservation axiom, meaning no relevance is artificially created or destroyed during backpropagation, which distinguishes LRP from methods like Guided Backpropagation and makes it particularly robust for identifying the exact input features—such as pixels or tokens—that constitute positive evidence for a specific classification decision.

FOUNDATIONAL AXIOMS

Core Properties of LRP

Layer-wise Relevance Propagation is governed by a strict set of mathematical properties that ensure its explanations are not just visual approximations but conservative, consistent, and physically meaningful decompositions of a model's output.

01

Conservation of Relevance

The total relevance score assigned to the input vector must exactly equal the model's output prediction score. This is the completeness axiom in action. No relevance is created or destroyed during backpropagation; it is merely redistributed.

  • Sum Rule: (\sum_i R_i^{(l)} = \sum_j R_j^{(l+1)} = f(x))
  • This ensures the explanation is a true decomposition of the prediction, not a heuristic approximation.
  • Violating conservation leads to 'leakage' where the explanation fails to account for the full output magnitude.
02

Positive Relevance Preservation

LRP rules are designed to ensure that neurons contributing positively to the target class receive positive relevance. This avoids the gradient shattering problem seen in raw gradients.

  • z⁺-Rule: Only positive contributions are propagated, ignoring inhibitory connections.
  • This property is critical for generating clean, non-noisy heatmaps where only supporting evidence is highlighted.
  • It prevents negative relevance from canceling out positive evidence in different regions of the input.
03

Deep Taylor Decomposition

LRP can be mathematically derived as a series of Deep Taylor Decompositions applied at each layer. This provides a theoretical justification for the propagation rules.

  • Each neuron's output is decomposed using a first-order Taylor expansion around a root point in the input space.
  • The choice of root point (e.g., nearest root, rescaled root) directly determines the specific LRP rule (e.g., (\alpha\beta), (w^2)).
  • This connects heuristic propagation rules to a rigorous functional decomposition framework.
04

Layer-wise Relevance Conservation

Relevance is conserved locally between adjacent layers, not just globally between input and output. This layer-wise conservation is a stricter constraint than simple input-output conservation.

  • (\sum_i R_i^{(l)} = \sum_j R_j^{(l+1)}) for all layers (l).
  • This prevents intermediate layers from acting as 'relevance sinks' or 'relevance sources'.
  • It ensures that the attribution is stable and interpretable at every stage of the network's hierarchy.
05

Rule Composability

LRP is not a single algorithm but a composable framework of propagation rules. Different layers can use different rules to optimize for stability and interpretability.

  • Deep Taylor LRP: Uses (\alpha\beta)-rules for hidden layers and (z^+)-rules for the final layer.
  • Composite LRP: Applies (LRP-\epsilon) for flat layers and (LRP-\alpha\beta) for convolutional layers.
  • This composability allows practitioners to tailor the explanation to the specific architecture, avoiding numerical instability in deep networks.
06

Absence of Bias

Unlike gradient-based methods, LRP does not treat the model's bias terms as contributing to relevance. The bias is considered a baseline shift that does not explain the input's specific contribution.

  • Biases are explicitly excluded from the relevance propagation formula.
  • This prevents a constant offset from being distributed across the input, which would dilute the explanation of the actual input features.
  • The result is a sparser, more focused attribution that highlights the true signal in the data.
METHOD COMPARISON

LRP vs. Other Feature Attribution Methods

A technical comparison of Layer-wise Relevance Propagation against gradient-based and perturbation-based attribution methods across key properties for neural network interpretability.

PropertyLayer-wise Relevance PropagationIntegrated GradientsGuided BackpropagationOcclusion Sensitivity

Conservation Axiom

Positive Relevance Only

Configurable via rule

Implementation Invariance

Requires Baseline Input

Computational Cost

Single backward pass

50-300 forward/backward passes

Single backward pass

Thousands of forward passes

Class Discriminative

Saturation Sensitivity

Handled via alpha-beta rule

Handled via path integral

Vulnerable

Handled via direct measurement

Theoretical Foundation

Deep Taylor Decomposition

Axiomatic path integration

Modified ReLU gradient

Empirical perturbation

LAYER-WISE RELEVANCE PROPAGATION

Frequently Asked Questions

Clear, technically precise answers to the most common questions about how LRP redistributes prediction scores backward through neural networks to assign relevance to individual input features.

Layer-wise Relevance Propagation (LRP) is a decomposition technique that explains individual neural network predictions by redistributing the model's output score backward through all layers using local conservation rules until it assigns a relevance value to each input feature. The core mechanism operates on a strict relevance conservation principle: the total relevance received by a neuron in a lower layer must equal the sum of the relevance it distributes to neurons in the layer above. Starting from the output neuron corresponding to the predicted class, LRP iteratively applies propagation rules—such as the epsilon-rule, alpha-beta rule, or z^+-rule—at each layer to decompose the signal. Each rule defines how to partition a neuron's relevance across its inputs based on their contribution to the forward activation. Unlike gradient-based methods that measure local sensitivity, LRP produces a signed, additive decomposition where the sum of all input relevances exactly equals the model's output score, satisfying the completeness axiom. This makes LRP particularly suitable for auditing decisions where a full accounting of the prediction magnitude is required, such as identifying which pixels in an image or which words in a text document drove a classifier's decision.

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.