[Tech Breakdown] Explainable Ai Methods In Vision: Layer-Wise Relevance Propagation In Ct Scans
#Tech #Breakdown #Explainable #Methods #Vision #LayerWise #Relevance #Propagation #ScansLayer-Wise Relevance Propagation A Visual Introduction XAI Methods Explained by Fraunhofer HHI
Title: Layer-Wise Relevance Propagation A Visual Introduction XAI Methods Explained
Channel: Fraunhofer HHI
[Tech Breakdown] Explainable Ai Methods In Vision: Layer-Wise Relevance Propagation In Ct Scans
[Data Insight] 86% Of Medical Leaders View Machine Learning Diagnostics As Essential To Solve Staffing Gaps[Tech Breakdown] Explainable AI Methods In Vision: Layer-Wise Relevance Propagation In CT Scans
Deep learning models have achieved near-human accuracy in detecting anomalies in medical imaging. However, in clinical settings, high accuracy is not enough. When a Convolutional Neural Network (CNN) flags a CT scan for a pulmonary embolism or an intracranial hemorrhage, radiologists cannot simply take the algorithm's word for it. They need to know why the model made that decision.
This is where Explainable AI (XAI) becomes vital. Among the various pixel-attribution methods used in computer vision, Layer-Wise Relevance Propagation (LRP) stands out as a highly precise, mathematically rigorous framework.
This article breaks down how LRP works, its mathematical foundations, and how it is applied to CT scans to provide clinicians with interpretable, pixel-level visual explanations.
The Black Box Problem in Medical Imaging AI
Deep neural networks are highly complex, non-linear systems. A typical 3D CNN trained on CT scans contains millions of parameters. While these networks excel at finding subtle patterns across hundreds of axial slices, their decision-making process is inherently opaque.
[3D CT Scan Input] ---> [Black Box CNN] ---> Output: "98% Probability of Nodule"
|
(Why? Which pixels?)
Why Clinical Trust Demands Explainability
- Error Verification: If a model misclassifies a benign cyst as a malignant tumor, radiologists must identify whether the model looked at the lesion itself or relied on confounding artifacts (like patient movement or surgical clips).
- Regulatory Compliance: Regulatory bodies like the FDA and European CE mark increasingly require medical AI devices to provide interpretable rationales for their outputs.
- Scientific Discovery: XAI can reveal novel imaging biomarkers that human experts might have overlooked.
What is Layer-Wise Relevance Propagation (LRP)?
Layer-Wise Relevance Propagation (LRP) is a technique designed to explain the predictions of deep neural networks by mapping the final output decision back to the input space. Unlike gradient-based methods that measure how sensitive the output is to a change in the input, LRP measures contribution.
The Core Concept: Conservation of Relevance
LRP operates on a backward propagation pass. It starts at the output layer with the model's final prediction score (e.g., $S = 0.95$ for "stroke detected") and redistributes this score backward through the network, layer by layer, until it reaches the input pixels.
This redistribution is governed by the Conservation Principle. The total amount of relevance ($R$) must be conserved at each layer:
$$\sum{i} R{i}^{(l)} = \sum{j} R{j}^{(l+1)}$$
Where:
- $R_i^{(l)}$ is the relevance of neuron $i$ in layer $l$.
- $R_j^{(l+1)}$ is the relevance of neuron $j$ in the subsequent layer $l+1$.
This ensures that no relevance is artificially created or destroyed during the backward pass.
[Input Layer] <--- (Propagate) <--- [Hidden Layer] <--- (Propagate) <--- [Output Score]
Pixel Heatmap Relevance R_i Prediction S
How LRP Differs from Gradient-Based Methods
| Feature | LRP (Layer-Wise Relevance Propagation) | Gradient-Based (e.g., Saliency Maps) | | :--- | :--- | :--- | | Core Metric | Pixel contribution to the final output score. | Pixel sensitivity to tiny input perturbations. | | Mathematical Basis | Conservation of relevance across layers. | Partial derivatives of output with respect to input. | | Pathologies | Avoids gradient saturation issues. | Suffers from "shattered gradients" in deep networks. | | Clinical Value | Highly localized, showing positive/negative evidence. | Often noisy, highlighting edges rather than regions. |
LRP Propagation Rules Explained
To distribute relevance from a higher-layer neuron $j$ to a lower-layer neuron $i$, LRP uses specific propagation rules. These rules determine how the connection weights ($w{ij}$) and neuron activations ($ai$) scale the redistributed relevance.
1. The Basic Rule ($LRP_0$)
The simplest redistribution rule proportions relevance based on the activation of the input neuron and the weight of the connection:
$$R{i \leftarrow j} = \frac{ai w{ij}}{\sumk ak w{kj}} R_j$$
While mathematically pure, this basic rule suffers from numerical instability if the denominator approaches zero.
2. The $\epsilon$-Rule
To solve numerical instability and filter out weak, noisy background signals, the $\epsilon$-rule adds a small stabilizer ($\epsilon$) to the denominator:
$$R{i \leftarrow j} = \frac{ai w{ij}}{\sumk ak w{kj} + \epsilon \cdot \text{sign}\left(\sumk ak w{kj}\right)} Rj$$
As $\epsilon$ increases, the explanation becomes sparser, highlighting only the most dominant features contributing to the CT scan classification.
3. The $\alpha\beta$-Rule
In medical imaging, it is critical to distinguish between features that support a diagnosis and features that contradict it. The $\alpha\beta$-rule splits the relevance propagation into positive (excitatory) and negative (inhibitory) components:
$$R{i \leftarrow j} = \left( \alpha \frac{(ai w{ij})^+}{\sumk (ak w{kj})^+} - \beta \frac{(ai w{ij})^-}{\sumk (ak w{kj})^-} \right) Rj$$
Where:
- $(x)^+ = \max(0, x)$ represents positive contributions.
- $(x)^- = \min(0, x)$ represents negative contributions.
- $\alpha - \beta = 1$ to preserve the conservation principle.
Using $\alpha=2, \beta=1$ is common in medical imaging because it yields highly detailed heatmaps that clearly delineate the boundaries of anomalies.
Applying LRP to CT Scans: A Step-by-Step Walkthrough
Applying LRP to a 3D CT volume involves a structured three-step pipeline.
[Step 1: Forward Pass]
CT Scan Image ---> [CNN Layers] ---> Predicts "Ischemic Stroke" (Score: 0.88)
|
[Step 2: Backward Pass]
Relevance R <--- [Apply LRP Rules] <--- Start at Output Score (0.88)
|
[Step 3: Visualization]
Generate Relevance Map ---> Overlay Heatmap on CT Scan ---> Clinician Review
Step 1: The Forward Pass
A patient’s chest CT scan (composed of multiple 2D axial slices) is fed into a 3D ResNet. The model processes the spatial features and outputs a classification score: Pulmonary Embolism = 0.92.
Step 2: Backward Relevance Propagation
We initialize the relevance of the output layer to $R = 0.92$ for the "Pulmonary Embolism" class, and $0$ for all other classes. Using the $\alpha\beta$-rule, we propagate this relevance backward:
- Fully Connected Layers: Propagated using the $\epsilon$-rule to stabilize the dense connections.
- Convolutional Layers: Propagated using the $\alpha\beta$-rule to preserve spatial awareness and separate positive disease markers from healthy tissue structure.
- Pooling Layers: Relevance is routed back to the neurons that won the forward-pass pooling operation.
Step 3: Generating the Relevance Map (Heatmap)
Once the relevance reaches the input layer, we obtain a relevance score for every single voxel (3D pixel) in the original CT scan. These scores are normalized and mapped to a color scale:
- Red Pixels (Positive Relevance): Areas that actively contributed to the "Pulmonary Embolism" prediction (e.g., a filling defect in the pulmonary artery).
- Blue Pixels (Negative Relevance): Areas that contradicted the diagnosis (e.g., highly vascularized, healthy lung parenchyma).
Real-World Medical Use Cases: LRP in Action
1. Detecting Pulmonary Nodules and Lung Cancer
In chest CT scans, distinguishing between benign granulomas and malignant nodules is challenging.
When a CNN classifies a nodule as malignant, LRP heatmaps reveal whether the model is focusing on key malignant indicators—such as spiculation (rough, star-like borders) and lobulation—or if it is erroneously relying on surrounding pleural surfaces or vascular structures.
[CT Slice: Nodule] ---> [LRP Heatmap Overlay]
(Red hot-spots concentrate on the
spiculated borders of the nodule)
2. Identifying Intracranial Hemorrhages (ICH)
In emergency head CT scans, speed and accuracy are critical. LRP helps verify that a model detecting acute subdural hematomas is focusing on the hyperdense, crescent-shaped blood pools adjacent to the skull skull-table, rather than image artifacts or normal bone density variations.
XAI Comparison: LRP vs. Other Methods in Medical Imaging
| Method | Resolution / Detail | Computational Overhead | Susceptibility to Noise | Primary Use Case in Radiology | | :--- | :--- | :--- | :--- | :--- | | LRP | High (Pixel-level) | Moderate | Low | Fine structure verification (e.g., microcalcifications, small nodules). | | Grad-CAM | Low (Coarse regions) | Low | Low | Quick triage and localization of large-scale anomalies (e.g., pneumonia). | | Integrated Gradients | High (Pixel-level) | High (Requires multiple passes) | Moderate | Quantitative feature attribution in complex multi-modal models. |
Challenges and Future Outlook of LRP in Clinical Workflows
While LRP is a powerful tool, integrating it into daily clinical workflows presents several challenges:
- Computational Overhead: Running a backward LRP pass on high-resolution 3D CT volumes containing hundreds of slices requires significant GPU memory and processing time, which can delay real-time emergency triage.
- Hyperparameter Sensitivity: The choice of $\alpha$, $\beta$, and $\epsilon$ parameters affects the resulting heatmap. Standardizing these parameters across different scanner manufacturers (e.g., GE, Siemens) is crucial for consistent explanations.
- Integration with PACS: For radiologists to benefit from LRP, the generated heatmaps must be seamlessly integrated into existing PACS (Picture Archiving and Communication Systems) as DICOM overlays, allowing doctors to toggle the explanations on and off at will.
As explainable AI continues to mature, methods like Layer-Wise Relevance Propagation will transition from academic research tools to standard components of clinical decision support systems. By turning the "black box" of deep learning into an interpretable assistant, LRP helps build the trust required to safely deploy AI in patient care.
[Investigative] Checking For Hardware Dependency: Why Computer Vision Models Fail Across Scanner BrandsExplainable AI explained 6 Layerwise Relevance Propagation with MRI data by DeepFindr
Title: Explainable AI explained 6 Layerwise Relevance Propagation with MRI data
Channel: DeepFindr
Explainable AI - Layer-wise Relevance Propagation by Jacob Herd
Title: Explainable AI - Layer-wise Relevance Propagation
Channel: Jacob Herd
[Industry Impact] Contract Research Organizations (Cros) Re-Engineered Operations Around Integrated Data Platforms
An Explainable AI Algorithm for COVID 19 Detection Based on Layer wise Relevance Propagation by ASDRP
Title: An Explainable AI Algorithm for COVID 19 Detection Based on Layer wise Relevance Propagation
Channel: ASDRP