Introduction
As deep neural networks (DNNs) are increasingly deployed in safety-critical domains such as autonomous driving and medical diagnostics, ensuring their reliability through rigorous testing is paramount. Traditional testing methodologies often rely on Neuron Coverage (NC) metrics to explore the model's state space. However, individual neurons are often too granular to represent meaningful semantic information. In convolutional neural networks (CNNs), the primary units of representation are feature maps—collections of neurons that collectively identify specific patterns like textures or shapes.
DeepFeature is a novel framework that shifts the testing focus from individual neurons to these feature maps. By identifying and repairing vulnerable feature maps, DeepFeature addresses the limitations of existing tools that fail to detect higher-level structural vulnerabilities.
Methodology
The DeepFeature framework introduces a comprehensive pipeline designed for feature-map-level testing, consisting of three core components: vulnerability metrics, a mutation algorithm, and a fuzzing process.
1. Vulnerability Metrics
To quantify the "brittleness" of internal representations, the authors propose two metrics:
- Feature map Attack Score (FAS): This metric measures the ease with which a specific feature map can be manipulated to induce misclassification, requiring labeled data for calculation.
- Feature map Vulnerability Score (FVS): A label-agnostic alternative to FAS, FVS measures the variance in a feature map's output under slight input perturbations. This allows for the identification of vulnerable components using unlabeled data, significantly reducing the cost of manual labeling.
2. Feature Map Attack (FMA)
The framework utilizes the Feature Map Attack (FMA), a gradient-based mutation algorithm. Unlike standard adversarial attacks that target the final output label, FMA specifically aims to maximize distortion within targeted internal feature maps to expose latent weaknesses.
3. Test Case Selection and Fuzzing
DeepFeature employs FVS-Selection to prioritize unlabeled test cases that trigger high variance in the model's most vulnerable feature maps. Furthermore, the FMA-Fuzzer iteratively generates high-value test cases by mutating inputs to stress-test these identified weak points.
Experimental Setup
The framework was evaluated across four standard image classification benchmarks: MNIST, Fashion-MNIST, SVHN, and CIFAR-10. The testing involved various architectures, including LeNet-1, LeNet-5, ResNet-20, and VGG-16, spanning a complexity range from thousands to over 35 million neurons.
Key Insights and Results
The research yielded several critical insights into DNN vulnerability:
- Abstraction Level: Feature maps can be highly vulnerable even when constituent neurons appear stable under standard NC metrics, proving that testing at the feature-map level is a more effective abstraction.
- Intrinsic Vulnerability: Vulnerability is not uniform across a layer; certain "Top-K" feature maps are naturally more brittle.
- Superior Performance: DeepFeature improved the Fault Detection Rate (FDR) by up to 49.32% compared to neuron-coverage-guided baselines.
- Effective Model Repair: Retraining models with test cases selected by DeepFeature led to significant accuracy improvements, such as a 5.81% increase on CIFAR-10/ResNet-20.
- Fuzzing Efficiency: The FMA-Fuzzer outperformed state-of-the-art tools like DeepHunter in generating valuable misclassified samples within short timeframes.
Conclusion and Future Work
DeepFeature demonstrates that feature-map-level testing is a powerful paradigm for enhancing DNN reliability. By focusing on semantically meaningful units, it achieves higher fault detection and more robust model repairs than traditional neuron-based methods.
While highly effective for CNNs, future research is needed to adapt these metrics for non-convolutional architectures like Vision Transformers (ViTs) or Large Language Models (LLMs). Additionally, evaluating performance against "in-the-wild" sensor noise and optimizing computational overhead for real-time environments remain important areas for development.
Summary updated