Layer-wise Relevance Propagation (LRP) for Sequences is a decomposition technique that redistributes a temporal model's output decision backward through its architecture, assigning a relevance score to each input time step. It operates by applying a conservation principle, ensuring the total relevance signal is preserved across layers without dissipation, to create a heatmap of temporally influential points.
Glossary
Layer-wise Relevance Propagation (LRP) for Sequences

What is Layer-wise Relevance Propagation (LRP) for Sequences?
A decomposition method that backpropagates a model's prediction score through the layers of a recurrent or temporal convolutional network to assign relevance scores to each input time step.
Unlike gradient-based methods, LRP leverages the learned weights and activations of recurrent neural networks or temporal convolutional networks to propagate relevance via specific rules like LRP-αβ. This produces a signed, high-resolution saliency map that directly quantifies how much each historical moment contributed to or detracted from a specific forecast or classification.
Key Features of LRP for Sequences
Layer-wise Relevance Propagation (LRP) adapts the conservation of total prediction score to the temporal domain, ensuring that the magnitude of a model's output is fully redistributed backward through the network layers to the input sequence without loss or amplification.
Deep Taylor Decomposition (DTD)
The foundational mathematical framework for LRP that decomposes the relevance at each neuron using a first-order Taylor expansion around a root point. For sequences, DTD is applied to the unrolled recurrent computational graph, treating each time step as a distinct neuron in a deep feedforward structure. This allows the propagation rules to respect the temporal dependencies encoded in the hidden states.
- Root point selection: Chosen near the neuron's input to minimize the Taylor remainder
- Unrolled graph: An RNN with 100 time steps is treated as a 100-layer network
- Relevance conservation: Ensures the sum of relevance across all time steps equals the final prediction score
Alpha-Beta Propagation Rule
The most common LRP rule for sequences, which separates the weighted activations into positive (excitatory) and negative (inhibitory) contributions. The parameters alpha and beta control how much relevance flows through positive versus negative connections, with the constraint that alpha - beta = 1 to maintain conservation.
- Alpha=1, Beta=0: Propagates only positive contributions, producing heatmaps of supporting evidence
- Alpha=2, Beta=1: Emphasizes positive evidence while still accounting for inhibitory signals
- Application: Applied to the input-to-hidden and hidden-to-hidden weight matrices of LSTMs and GRUs
Gated LRP for LSTMs
A specialized propagation scheme that respects the gating mechanisms of Long Short-Term Memory networks. Standard LRP rules fail on LSTMs because they treat the cell state update as a simple linear operation, ignoring the multiplicative interactions of the forget, input, and output gates.
- Forget gate: Relevance is scaled by the forget gate activation to model the erasure of information
- Input gate: Relevance is modulated by the input gate to reflect the writing of new memory
- Cell state: The additive nature of the cell state update naturally preserves relevance across time steps
- Signal handling: Prevents relevance from being assigned to time steps where the gates are closed
LRP for Transformer Sequences
Adapts the conservation principle to the self-attention mechanism by treating attention weights as relevance redistribution matrices. The relevance of each output token is propagated backward through the Value, Key, and Query projections, with the softmax attention scores determining how much relevance each input token receives.
- Attention head decomposition: Relevance is computed independently per head and then aggregated
- Residual connections: Relevance is split proportionally between the residual branch and the attention/MLP sublayers
- LayerNorm handling: The normalization statistics are treated as constants during the backward pass to maintain conservation
Composite LRP Strategies
A practical approach that applies different propagation rules at different layers of the sequence model to optimize the trade-off between explanation fidelity and noise. Lower layers close to the input typically use rules that suppress noise, while upper layers use rules that preserve maximal detail.
- LRP-epsilon: Used in lower layers to absorb weak or contradictory relevance (epsilon typically 0.001 to 0.1)
- LRP-gamma: Applied in upper layers to favor positive contributions (gamma typically 0.1 to 1.0)
- Flat rule: Used in the output layer to distribute relevance uniformly across all inputs
- Benefit: Produces cleaner temporal heatmaps with less spurious noise at irrelevant time steps
Temporal Relevance Visualization
The final output of LRP for sequences is a relevance heatmap that assigns a scalar score to each time step and feature dimension. This heatmap can be visualized as a stacked bar chart over time or as a colored overlay on the original time-series plot, enabling direct identification of the temporal intervals that drove the prediction.
- Feature-wise aggregation: Relevance can be summed across features to show per-time-step importance
- Temporal aggregation: Relevance can be summed across time to show per-feature importance
- Contrastive analysis: Heatmaps from different classes can be subtracted to reveal discriminative time steps
- Use case: Identifying the exact moment a fault precursor appeared in a predictive maintenance model
Frequently Asked Questions
Clear, technical answers to the most common questions about applying Layer-wise Relevance Propagation to sequence models for time-step attribution.
Layer-wise Relevance Propagation (LRP) for sequences is a decomposition technique that backpropagates a recurrent or temporal convolutional neural network's prediction score through its layers to assign a relevance score to each input time step. Unlike gradient-based methods, LRP operates under a conservation principle, meaning the total relevance received by a neuron is fully redistributed to its inputs in the layer below. For sequence models like LSTMs or Temporal Convolutional Networks (TCNs), this process flows backward through time, redistributing the final output decision through gating mechanisms and hidden states. The core mechanism relies on tailored propagation rules—such as the LRP-epsilon or LRP-alpha-beta rules—that handle non-linear activations and multiplicative interactions in gates. The result is a time-step saliency map that shows exactly which points in the input sequence contributed positively or negatively to the model's decision, providing a complete and auditable decomposition of the prediction.
LRP vs. Other Temporal Attribution Methods
A feature-level comparison of Layer-wise Relevance Propagation against perturbation-based, gradient-based, and attention-based attribution methods for sequence models.
| Feature | Layer-wise Relevance Propagation | Temporal Integrated Gradients | Time-Step Ablation | Attention Flow |
|---|---|---|---|---|
Core Mechanism | Backpropagates prediction score through network layers using conservation rules | Integrates gradients along a path from baseline to input | Measures output change when time steps are removed | Tracks attention weight propagation across Transformer layers |
Conservation Property | ||||
Requires Baseline Input | ||||
Computational Cost | Single backward pass | 50-200 forward/backward passes | N forward passes for N time steps | Single forward pass |
Handles Non-Linear Interactions | ||||
Model Architecture Agnostic | ||||
Saturation Sensitivity | Low (uses layer-wise redistribution) | Medium (gradient saturation possible) | None (perturbation-based) | Low (attention weights only) |
Faithfulness Score (ERASER benchmark) | 0.87 | 0.82 | 0.71 | 0.64 |
Enabling Efficiency, Speed & Accuracy
Intelligent Analysis, Decision & Execution
We build AI systems for teams that need search across company data, workflow automation across tools, or AI features inside products and internal software.
Talk to Us
Search across company data
Give teams answers from docs, tickets, runbooks, and product data with sources and permissions.
Useful when people spend too long searching or get different answers from different systems.

Automate internal workflows
Use AI to route work, draft outputs, trigger actions, and keep approvals and logs in place.
Useful when repetitive work moves across multiple tools and teams.

Add AI to products and internal tools
Build assistants, guided actions, or decision support into the software your team or customers already use.
Useful when AI needs to be part of the product, not a separate tool.
Related Terms
Core concepts and adjacent techniques that form the foundation for understanding how Layer-wise Relevance Propagation assigns importance in sequential data.
Temporal DeepLIFT
An attribution method that computes importance scores for time steps by comparing the activation of each neuron to a reference activation. It satisfies the summation-to-delta property for recurrent networks, meaning the sum of all feature attributions exactly equals the difference between the model's output and the reference output. This property makes it a close conceptual relative to LRP, as both decompose the output score completely without approximation error.
LSTM Gate Activation Analysis
A diagnostic process that visualizes and quantifies the activations of forget, input, and output gates in an LSTM network. By tracking gate states across time steps, engineers can explain how information is stored, updated, or discarded. This provides a mechanistic complement to LRP: while LRP assigns relevance scores to inputs, gate analysis reveals the internal memory dynamics that caused those relevance patterns.
Temporal Faithfulness Metric
A quantitative evaluation score that measures how accurately a temporal explanation reflects the true reasoning process of the underlying model. It tests correlation between the explanation and model behavior under perturbation. Key properties include:
- Completeness: Does the explanation sum to the output?
- Continuity: Do similar inputs yield similar explanations?
- Implementation invariance: Do functionally equivalent networks produce identical attributions?
Sequence Perturbation Testing
A robustness evaluation method that introduces small, controlled noise or distortions to a time series to analyze the stability and continuity of a model's explanations. If an LRP heatmap changes dramatically with imperceptible input changes, the explanation lacks reliability. This technique is essential for validating that relevance scores reflect genuine model reasoning rather than brittle artifacts of the network's geometry.
Time-Step Ablation
A perturbation-based method that systematically removes or masks individual time steps from a sequence to measure the resulting change in the model's output. By comparing the prediction drop when each step is ablated, engineers create a ground-truth importance ranking. This serves as a baseline for evaluating LRP: a faithful relevance decomposition should correlate strongly with ablation-based importance measures.
Temporal Causal Discovery
The application of algorithms like PCMCI or VAR-LiNGAM to time-series data to infer a causal graph. While LRP identifies which time steps the model uses, causal discovery determines which time steps actually drive the outcome in the real world. Combining both techniques allows engineers to audit whether a model's relevance assignments align with genuine causal relationships or merely exploit spurious correlations.

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.
Partnered with leading AI, data, and software stack.
How We Work
Custom AI workflows for your Business
One-fit-all AI don't work for modern businesses. At Inferensys, we aim to understand your business & custom requirements; which we use to define most efficient agentic workflows, the data, and the tools for your business.
01
Review the use case
We understand the task, the users, and where AI can actually help.
Read more02
Pick the right approach
We define what needs search, automation, or product integration.
Read more03
Build the first useful version
We implement the part that proves the value first.
Read more04
Improve from there
We add the checks and visibility needed to keep it useful.
Read moreThe first call is a practical review of your use case and the right next step.
Talk to Us