NeurIPS 2026Coming to NeurIPS?Explore papers, orals & directions

Supporting DNN Safety Analysis and Retraining through Heatmap-based Unsupervised Learning

Hazem M. Fahmy, Mojtaba Bagherzadeh, Fabrizio Pastore, Lionel C. BriandarXiv 2020

TL;DR

This paper introduces HUDD, a novel approach that automatically identifies the root causes of Deep Neural Network (DNN) errors in safety-critical systems using heatmap-based unsupervised learning. By clustering DNN neuron heatmaps, HUDD pinpoints specific error-inducing scenarios, enabling more efficient and effective retraining of DNNs, which is crucial for ensuring functional safety.

What Problem Does This Paper Address?

Deep Neural Networks (DNNs) are increasingly used in safety-critical applications like autonomous driving, but ensuring their functional safety is challenging. Existing methods struggle with:

  1. Underrepresented Scenarios: Test sets may miss rare but critical scenarios that lead to DNN errors, leaving safety violations unnoticed.
  2. Characterizing High-Risk Scenarios: Identifying why a DNN fails in these specific situations is difficult.
  3. Poor Retraining Support: Without understanding the root cause of errors, retraining DNNs to fix them is inefficient and poorly supported.

This paper tackles these issues by proposing a method to automatically identify and characterize these error-inducing scenarios, thereby facilitating targeted retraining and improving the overall safety of DNN-based systems.

Methods

HUDD combines several techniques to achieve its goals:

  • Heatmap Generation (Layer-Wise Relevance Propagation - LRP): For each error-inducing image, HUDD uses LRP, a white-box DNN explanation technique, to generate heatmaps. These heatmaps show the relevance of each neuron in internal DNN layers to the final prediction, providing insights into why a DNN made a certain decision.
  • Heatmap-based Clustering (Hierarchical Agglomerative Clustering - HAC): HUDD applies HAC with Ward linkage to group images based on the similarity of their internal layer heatmaps. The intuition is that images sharing a common root cause for error will exhibit similar heatmap patterns. This clustering identifies "root cause clusters."
  • Root Cause Inspection: Engineers inspect representative images from these clusters to understand the specific unsafe conditions.
  • Unsafe Image Identification: HUDD then identifies images from a separate "improvement set" that are most similar to the identified root cause clusters, effectively selecting potentially unsafe images for retraining.
  • Automated Retraining: The selected unsafe images are labeled and used to retrain the DNN, alongside the original training data.

The novelty lies in using unsupervised clustering of DNN heatmaps to automatically identify distinct root causes of errors, rather than relying solely on manual inspection of individual error-inducing images or generic retraining strategies.

Datasets

The paper evaluates HUDD on several DNNs from the automotive domain, including:

  • Gaze Detection (GD): Trained and tested using images generated by the UnityEyes simulator.
  • Drowsiness Detection (OC): Trained and tested using images generated by the UnityEyes simulator.
  • Headpose Detection (HPD): Trained and tested using images generated by an in-house IEE simulator.
  • Face Landmark Detection (FLD): Trained and tested using images generated by an in-house IEE simulator.

Additionally, for evaluating retraining effectiveness, they used:

  • Traffic Sign Recognition (TSR): Trained and tested using real-world images from the TrafficSigns dataset.
  • Object Detection (OD): Trained and tested using real-world images from the CelebA dataset.

Key Insights and Ideas

  • Heatmaps as Signatures of Root Causes: The core idea is that similar DNN errors, even if rare, will manifest as similar patterns of neuron activation (heatmaps) across internal layers. Clustering these heatmaps effectively groups images with shared underlying error causes.
  • Unsupervised Discovery of Rare Errors: HUDD's unsupervised clustering approach can uncover rare but critical error scenarios that might be missed by traditional test sets or manual inspection.
  • Targeted Retraining for Efficiency: By identifying specific root causes, HUDD enables engineers to select only the most relevant images for retraining, significantly reducing labeling effort and improving retraining effectiveness compared to random selection.
  • Bridging Safety Analysis and Debugging: HUDD directly supports functional safety analysis by identifying unsafe conditions and facilitates debugging by pinpointing error root causes, making the process more systematic and less reliant on human intuition alone.

Key Results

  • Root Cause Identification (RQ1): HUDD successfully identified distinct root causes for DNN errors across various case studies. The generated clusters showed significant reduction in simulator parameter variance (up to 50% or more for many clusters), indicating that images within a cluster share common characteristics.
  • Accuracy Improvement (RQ2): HUDD-based retraining consistently outperformed baseline approaches (random selection of images for retraining). For example, HUDD achieved accuracy improvements of up to 30.24% for the FLD DNN, significantly higher than baselines. Even for already accurate DNNs, HUDD provided marginal but valuable improvements.
  • Efficiency: HUDD significantly reduces the manual effort required for identifying unsafe images for retraining. Engineers inspect a much smaller subset of images compared to traditional methods.
  • Execution Time: The execution time for HUDD's core contribution (heatmap-based clustering and unsafe image identification) was comparable to baseline retraining approaches, indicating no significant overhead for the added benefits.

Limitations and Future Work

  • Manual Steps Remain: While automated, HUDD still requires manual steps for functional safety analysis (inspecting clusters) and labeling of selected unsafe images. However, the manual effort is significantly reduced.
  • Simulator Fidelity: The reliance on simulators for generating data means the results are dependent on the simulator's fidelity. The paper acknowledges that simulators do not exhibit perfect fidelity.
  • Clustering Algorithm Choice: The paper chose HAC over K-means due to complexity considerations, but suggests exploring K-means and other clustering solutions in future work.
  • User Study for Time Savings: While quantitative results show time savings, a user study to directly assess the time savings for engineers is suggested for future work.
  • Broader Contexts: Future work could investigate HUDD's applicability in different domains beyond automotive safety-critical systems (e.g., space industry).
  • DNN Fault Taxonomy: A more extensive evaluation of HUDD against a comprehensive DNN fault taxonomy is planned.

Summary updated

BibTeX
@misc{fahmy2020supporting,
  author = {Hazem M. Fahmy and Mojtaba Bagherzadeh and Fabrizio Pastore and Lionel C. Briand},
  title = {{Supporting DNN Safety Analysis and Retraining through Heatmap-based Unsupervised Learning}},
  year = {2020},
  eprint = {2002.00863},
  archivePrefix = {arXiv},
  url = {https://arxiv.org/abs/2002.00863},
}

Loading related content...

Figure