Evaluating the Robustness of Test Selection Methods for Deep Neural Networks

Qiang Hu, Yuejun Guo, Xiaofei Xie, Maxime Cordy, Wei Ma, Mike Papadakis, Yves Le TraonarXiv 2023 · DOI

TL;DR

This paper investigates the reliability of existing test selection methods for deep neural networks (DNNs), revealing that many methods fail under specific data conditions (uncertainty/confidence mismatches) and are sensitive to implementation choices (intermediate layer selection). The findings highlight the need for more robust evaluation and development of test selection techniques.

What Problem Does This Paper Address?

Testing deep learning systems is essential but costly due to the need for labeled data. Test selection methods aim to reduce this cost by identifying a smaller, representative subset of test data. However, these methods are often evaluated on simple scenarios (e.g., original test data) and their robustness against more challenging data distributions or implementation choices is not well understood. This paper addresses this gap by exploring when and how existing test selection methods fail, specifically focusing on fault detection and performance estimation.

Methods

The authors conducted an empirical study to evaluate the robustness of 11 test selection methods. Their approach involved:

  • Identifying Potential Pitfalls: Analyzing the design of existing methods to pinpoint theoretical weaknesses.
  • Creating Challenging Test Data: Generating two specific types of problematic test data:
  • Type 1: Correctly classified but with high prediction uncertainty.
  • Type 2: Misclassified but with high prediction confidence. This was achieved using a genetic algorithm-based test generation technique.

  • Empirical Evaluation: Injecting these challenging data types into original test sets and evaluating the performance of test selection methods using metrics like Test Relative Coverage (TRC).

  • Model Repair Study: Investigating how the presence of Type 1 and Type 2 data affects the effectiveness of model retraining when guided by selected test data.
  • Performance Estimation Analysis: Examining the impact of selecting different intermediate layers on the accuracy of performance estimation methods.

Datasets

The study utilized five widely-used datasets:

  • MNIST
  • SVHN
  • CIFAR10
  • CIFAR100
  • Traffic-Sign

For each dataset, two popular model architectures were used, including ResNet and DenseNet families.

Key Insights and Ideas

  • "Blind Spots" in Fault Detection: Many fault detection methods struggle with data that is either correctly classified but uncertain (Type 1) or misclassified but highly confident (Type 2). This suggests a reliance on simple output probabilities can be misleading.
  • Model Repair Degradation: The presence of Type 1 and Type 2 data can significantly degrade the effectiveness of model repair (retraining) guided by test selection, sometimes leading to worse performance than random selection. Type 1 data appears particularly harmful in this regard.
  • Sensitivity to Intermediate Layers: Performance estimation methods are highly sensitive to the choice of the intermediate layer from which features are extracted. There's no universally "best" layer, and an inappropriate choice can lead to worse results than random selection.
  • No Single Best Method: The study found no single test selection method consistently outperforms others across all datasets and scenarios. Some methods, like MCP, show high variance in performance depending on the dataset's characteristics (e.g., number of classes).

Key Results

  • Type 1 Data Impact: On average, the Test Relative Coverage (TRC) of fault detection methods dropped by 52.49% when facing Type 1 data.
  • Type 2 Data Impact: On average, the TRC dropped by 39.80% when facing Type 2 data.
  • Model Repair Accuracy: For Type 1 data, 55 out of 80 repaired models showed accuracy degradation. For Type 2 data, while most methods showed improvement, it was often slight, and DSA performed significantly worse than random selection.
  • Performance Estimation: Average results showed that only CES with the second-to-last hidden layer (0.44) could significantly outperform random selection (0.38), but this was highly dependent on the specific dataset and model.

Limitations and Future Work

  • Limited Scope of Test Selection Methods: The study focused on specific types of test selection methods and did not include all possible approaches (e.g., neural coverage or active learning methods).
  • Threats to Validity: The authors acknowledge potential threats related to the choice of datasets, models, and configurations for test generation and selection methods.
  • Future Work:
    • Investigating the deeper reasons behind DSA's confusion with Type 2 data.
  • Developing more robust fault detection methods that go beyond simple output probabilities and incorporate other features.
  • Proposing methods that include a layer-selection solution for performance estimation.
  • Exploring other types of adversarial attacks for generating challenging test data.
  • Developing guidelines for robustly evaluating and proposing new test selection methods.

Summary updated

BibTeX
@misc{hu2023evaluating,
  author = {Qiang Hu and Yuejun Guo and Xiaofei Xie and Maxime Cordy and Wei Ma and Mike Papadakis and Yves Le Traon},
  title = {{Evaluating the Robustness of Test Selection Methods for Deep Neural Networks}},
  year = {2023},
  eprint = {2308.01314},
  archivePrefix = {arXiv},
  url = {https://arxiv.org/abs/2308.01314},
}
Figure