Inferensys

Glossary

Layer-wise Relevance Propagation (LRP)

A technique for explaining deep neural network predictions by decomposing the output score and redistributing it backwards through the network's layers using local conservation rules until the input features are reached.
Data engineer managing feature store on laptop, feature definitions visible, casual data engineering session.
DEEP NEURAL NETWORK EXPLAINABILITY

What is Layer-wise Relevance Propagation (LRP)?

A technique for decomposing the prediction of a deep neural network by backpropagating relevance scores from the output layer to the input features, ensuring conservation across layers.

Layer-wise Relevance Propagation (LRP) is a post-hoc explainability technique that decomposes a deep neural network's output prediction into relevance scores for each input feature. It operates by redistributing the model's output score backwards through the network's topology using a set of local conservation rules, ensuring that the total relevance is preserved from one layer to the next.

Unlike simple gradient-based methods, LRP utilizes specific propagation rules, such as the alpha-beta rule or epsilon rule, to handle non-linear activations and filter out noise. This produces a high-resolution heatmap or attribution map, making it particularly effective for explaining complex architectures like convolutional neural networks in domains requiring precise, auditable justifications for automated decisions.

DEEP REDISTRIBUTION PRINCIPLES

Core Properties of LRP

Layer-wise Relevance Propagation (LRP) is governed by a strict set of axiomatic properties that ensure the decomposition of a deep network's prediction is faithful, conservative, and human-interpretable. These rules distinguish LRP from gradient-based saliency methods, making it suitable for auditing high-stakes financial fraud models.

01

Conservation of Relevance

The total amount of relevance is preserved as it is propagated backwards from the output layer to the input layer. The sum of the relevance scores assigned to all input features must equal the model's output score for the target class.

  • Sum Rule: $\sum_i R_i^{(l)} = f(x)$ for every layer $l$
  • Prevents relevance from being artificially created or destroyed during the backward pass
  • Ensures the explanation is a true decomposition of the prediction, not just a sensitivity analysis
  • Critical for fraud auditing: the exact score that triggered a block is fully accounted for
100%
Relevance Preserved
02

Positive Relevance Flow

LRP rules can be designed to propagate only positive relevance, suppressing negative contributions that would otherwise create contradictory, noisy explanations. This is achieved through the $z^+$-rule and LRP-$\alpha_1\beta_0$ propagation.

  • Filters out inhibitory or contradictory signals that obscure the primary evidence
  • Produces cleaner, sparser heatmaps that highlight only supporting features
  • In fraud detection: isolates the transaction attributes that positively contributed to a 'fraudulent' classification
  • Contrasts with simple gradient methods that mix positive and negative evidence
03

Deep Taylor Decomposition

LRP can be mathematically derived as a series of Taylor expansions applied at each layer, where the relevance of a neuron is redistributed to its inputs based on their contribution to the neuron's activation. This provides a first-order, local explanation.

  • Each redistribution step approximates the function of a single layer
  • Provides a theoretical foundation for why LRP works, beyond heuristic rules
  • Connects LRP to the broader family of additive feature attribution methods
  • Enables the derivation of optimal propagation rules for specific layer types (e.g., ReLU, Tanh)
04

Layer-Specific Propagation Rules

LRP is not a single algorithm but a framework of composable rules tailored to different layer types. The LRP-$\epsilon$ rule absorbs weak or contradictory relevance, while the LRP-$\gamma$ rule favors positive contributions.

  • $z^+$-rule: For ReLU layers, redistributes relevance proportionally to positive weighted activations
  • $\epsilon$-rule: Adds a small stabilizing term to the denominator to absorb noise; higher $\epsilon$ produces sparser explanations
  • Flat rule: For input layers, distributes relevance uniformly to pixel space
  • In fraud models: different rules are applied to dense, convolutional, and embedding layers for optimal clarity
05

Contrastive Explanations

LRP can decompose not just the raw prediction score, but a contrastive quantity: the difference between the score for the predicted class and the score for a competing class. This explains why the model chose class A over class B.

  • Decomposes $f_{fraud}(x) - f_{legit}(x)$ instead of just $f_{fraud}(x)$
  • Highlights features that are uniquely indicative of fraud versus legitimate transactions
  • Eliminates common-mode features that are present in both classes
  • Provides a sharper, more actionable signal for fraud investigators reviewing blocked transactions
06

Computational Tractability

A single LRP backward pass has a computational cost comparable to a standard forward pass, making it feasible for near-real-time explanation generation in production fraud pipelines.

  • Complexity scales linearly with network depth and width
  • No sampling, perturbation, or optimization steps required (unlike LIME or SHAP)
  • Can be accelerated with batch processing for multiple transactions simultaneously
  • Enables inline explanation generation within the real-time fraud scoring pipeline without introducing prohibitive latency
DEEP DIVE

Frequently Asked Questions

Explore the mechanics, applications, and regulatory implications of Layer-wise Relevance Propagation, a foundational technique for auditing deep neural networks in high-stakes financial environments.

Layer-wise Relevance Propagation (LRP) is a post-hoc explainability technique specifically designed for deep neural networks. It works by taking the model's output score for a specific class—such as 'fraudulent transaction'—and decomposing it backwards through the network's layers using a local conservation principle. This principle ensures that the total relevance received by a neuron is fully redistributed to its inputs in the preceding layer. By applying specific propagation rules (like the LRP-ε or LRP-α1β0 rules), the algorithm avoids discontinuities and noisy gradients, ultimately assigning a relevance score to each input feature. The result is a heatmap or feature relevance vector that precisely identifies which input variables contributed most to the final anomaly score, providing a granular, mathematically grounded audit trail for compliance officers.

FEATURE ATTRIBUTION COMPARISON

LRP vs. Other Explainability Techniques

A technical comparison of Layer-wise Relevance Propagation against other prominent feature attribution methods used for auditing deep neural network decisions in financial fraud detection.

FeatureLRPSHAPIntegrated Gradients

Conservation Property

Layer-wise Decomposition

Computational Cost (relative)

Medium

High

Medium

Model Architecture Agnostic

Requires Baseline Input

Average Inference Latency Overhead

15-30ms

2-5s

20-40ms

Native Support for Deep Networks

Regulatory Audit Readiness

High

Medium

Medium

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.