[Paper Review] Test Selection for Deep Learning Systems
This paper proposes uncertainty-based test selection metrics for deep learning systems, leveraging model confidence and dropout variance to identify data that challenge models and improve accuracy. The approach achieves up to 80% higher accuracy gains during retraining than random selection or state-of-the-art metrics.
Testing of deep learning models is challenging due to the excessive number and complexity of computations involved. As a result, test data selection is performed manually and in an ad hoc way. This raises the question of how we can automatically select candidate test data to test deep learning models. Recent research has focused on adapting test selection metrics from code-based software testing (such as coverage) to deep learning. However, deep learning models have different attributes from code such as spread of computations across the entire network reflecting training data properties, balance of neuron weights and redundancy (use of many more neurons than needed). Such differences make code-based metrics inappropriate to select data that can challenge the models (can trigger misclassification). We thus propose a set of test selection metrics based on the notion of model uncertainty (model confidence on specific inputs). Intuitively, the more uncertain we are about a candidate sample, the more likely it is that this sample triggers a misclassification. Similarly, the samples for which we are the most uncertain, are the most informative and should be used to improve the model by retraining. We evaluate these metrics on two widely-used image classification problems involving real and artificial (adversarial) data. We show that uncertainty-based metrics have a strong ability to select data that are misclassified and lead to major improvement in classification accuracy during retraining: up to 80% more gain than random selection and other state-of-the-art metrics on one dataset and up to 29% on the other.
Motivation & Objective
- To address the lack of systematic, automated test data selection in deep learning systems.
- To overcome the limitations of code-based testing metrics (e.g., coverage) that fail to capture model behavior in deep neural networks.
- To identify test inputs that are most likely to trigger misclassifications by focusing on model uncertainty near decision boundaries.
- To evaluate whether uncertainty-based metrics can outperform random selection and existing state-of-the-art metrics in improving model accuracy through retraining.
- To provide a practical, objective framework for assessing test effectiveness in self-learning deep learning systems.
Proposed method
- Propose test selection metrics based on model uncertainty, estimated via Monte Carlo dropout by repeatedly dropping neurons and measuring prediction variance.
- Use the model's output probability (confidence) as a separate certainty measure, combining it with dropout variance for improved sensitivity.
- Define multiple adequacy metrics: Variance (Var), Kullback-Leibler divergence (KL), Label-Specific Activation (LSA), and Distance to Smallest Activation (DSA), along with weighted variance (Var_w) and probability-based tie-breaking.
- Evaluate metrics on two image classification benchmarks: CIFAR-10 and MNIST, using both real and adversarial test inputs.
- Assess correlation between metrics and misclassification, and measure accuracy improvement when selected data are used to retrain the model.
- Apply iterative retraining by augmenting the training set with 5,000 top-scoring samples per iteration, tracking validation accuracy over epochs.
Experimental results
Research questions
- RQ1Can uncertainty-based metrics effectively identify inputs that are misclassified by deep learning models?
- RQ2How do uncertainty-based metrics compare to random selection and state-of-the-art metrics (e.g., surprise adequacy) in triggering misclassifications?
- RQ3To what extent do uncertainty-based metrics improve model accuracy when used to guide data retraining?
- RQ4How do the metrics perform on adversarial inputs compared to real, well-classified inputs?
- RQ5Can uncertainty metrics accelerate model convergence during retraining?
Key findings
- The uncertainty-based metrics, particularly Var and KL, showed strong correlation (Kendall’s tau = 0.8099) with misclassification on adversarial CIFAR-10 data.
- On MNIST, the metrics achieved a 2.7% validation accuracy gain after three retraining iterations when combined with probability-based tie-breaking, outperforming random selection and LSA/DSA.
- The proposed metrics led to up to 80% higher accuracy improvement over random selection and state-of-the-art metrics on the MNIST dataset after three iterations.
- On CIFAR-10, the metrics achieved a 29% higher accuracy gain compared to baseline methods, with Var and P yielding the best results.
- Models trained with uncertainty-selected data converged faster, especially during intermediate training iterations, as shown in validation accuracy curves.
- The metrics were less effective on adversarial data due to high inherent uncertainty introduced by adversarial perturbations, reducing their discriminative power.
Read this paper
Open the full text in the Nubint reader and ask about any passage as you read.
Read this paper on NubintThis review was generated by AI from the original paper. Please check the paper before citing it.