[Paper Review] TestRank: Bringing Order into Unlabeled Test Instances for Deep Learning Tasks
TestRank is a novel test prioritization framework for deep learning models that ranks unlabeled test instances by combining their intrinsic features (from the target model's output) with contextual features derived from a graph neural network (GNN)-based similarity graph of labeled and unlabeled data. It significantly improves debugging efficiency, achieving an average ATPF gain of +0.95% over baselines and reducing labeling cost by prioritizing high-impact, bug-revealing test cases.
Deep learning (DL) has achieved unprecedented success in a variety of tasks. However, DL systems are notoriously difficult to test and debug due to the lack of explainability of DL models and the huge test input space to cover. Generally speaking, it is relatively easy to collect a massive amount of test data, but the labeling cost can be quite high. Consequently, it is essential to conduct test selection and label only those selected "high quality" bug-revealing test inputs for test cost reduction. In this paper, we propose a novel test prioritization technique that brings order into the unlabeled test instances according to their bug-revealing capabilities, namely TestRank. Different from existing solutions, TestRank leverages both intrinsic attributes and contextual attributes of test instances when prioritizing them. To be specific, we first build a similarity graph on test instances and training samples, and we conduct graph-based semi-supervised learning to extract contextual features. Then, for a particular test instance, the contextual features extracted from the graph neural network (GNN) and the intrinsic features obtained with the DL model itself are combined to predict its bug-revealing probability. Finally, TestRank prioritizes unlabeled test instances in descending order of the above probability value. We evaluate the performance of TestRank on a variety of image classification datasets. Experimental results show that the debugging efficiency of our method significantly outperforms existing test prioritization techniques.
Motivation & Objective
- To address the high cost of labeling massive unlabeled test data in deep learning systems.
- To improve test prioritization by leveraging both intrinsic model behavior and contextual information from labeled and unlabeled data.
- To reduce debugging effort by identifying high-impact, bug-revealing test instances before manual labeling.
- To explore the effectiveness of graph-based semi-supervised learning for enhancing test case prioritization in deep learning.
- To evaluate the trade-offs between computational efficiency and performance in large-scale test data scenarios.
Proposed method
- Construct a similarity graph connecting unlabeled test instances and historical labeled samples (training data and oracles) using k-nearest neighbors (k-NN).
- Apply graph neural networks (GNNs) to the similarity graph to extract contextual features that reflect the local data distribution and model behavior patterns.
- Combine the GNN-derived contextual features with intrinsic features (e.g., softmax probabilities, uncertainty scores) from the target deep learning model for each test instance.
- Train a neural network classifier to predict the bug-revealing probability of each unlabeled test instance based on the fused features.
- Prioritize unlabeled test instances in descending order of predicted bug-revealing probability for efficient labeling.
- Use approximation techniques for k-NN graph construction to reduce computational cost with minimal performance loss.
Experimental results
Research questions
- RQ1Can combining intrinsic model outputs with contextual features from labeled and unlabeled data improve test prioritization in deep learning?
- RQ2How effective is graph neural network-based contextual feature extraction in identifying high-impact, bug-revealing test cases?
- RQ3What is the impact of using a separate unsupervised feature extractor versus the target model’s internal features on test prioritization performance?
- RQ4How does k-NN graph approximation affect the efficiency and accuracy of test prioritization in large-scale test data?
- RQ5What is the optimal range of k (number of neighbors) for constructing the similarity graph to balance context richness and noise?
Key findings
- TestRank achieves an average ATPF (Average Test Prioritization F1) improvement of +0.95% over existing baselines across multiple datasets, demonstrating superior debugging efficiency.
- Replacing the unsupervised feature extractor with the target model’s internal layers reduces average ATPF by 6.23%, proving that a separate unsupervised feature extractor is essential for optimal performance.
- The k-NN graph approximation technique reduces computation with only a 0.95% average performance drop, making it viable for large-scale test data.
- The method remains robust across a wide range of k values (20–800), with optimal performance observed when k is neither too small nor too large, indicating flexibility in hyperparameter tuning.
- On the STL10 dataset, TestRank outperforms the best baseline by 69.70% in ATPF when k > 20, confirming its consistent effectiveness across different model architectures and data distributions.
- The framework significantly reduces labeling cost by prioritizing test instances with high bug-revealing potential, as validated across image classification benchmarks including SVHN, CIFAR-10, CIFAR-100, and STL10.
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.