TY - GEN
T1 - Generating Latent Space-Aware Test Cases for Neural Networks using Gradient-Based Search
AU - Speth, Simon
AU - Jasper, Christoph
AU - Jordan, Claudius
AU - Pretschner, Alexander
N1 - Publisher Copyright:
© 2025 IEEE.
PY - 2025
Y1 - 2025
N2 - Autonomous vehicles rely on deep learning (DL) models like object detectors and traffic sign classifiers. Assessing the robustness of these safety-critical components requires good test cases that are both realistic, lying in the distribution of the real-world data, and cost-effective in revealing potential failures. Unlike previous methods that use adversarial attacks on the pixel space, our approach identifies latent space-aware test cases using a conditional variational autoencoder (CVAE) through three steps: (1) Train a CVAE on the dataset. (2) Generate test cases by computing adversarial examples in the CVAE's latent space. (3) Cluster challenging test cases based on their latent representations. The resulting clusters characterize regions that reveal potential defects in the DL model, which require further analysis. Our results show that our approach is capable of generating failing test cases for all classes of the MNIST and GTSRB datasets in a purely data-driven way, surpassing the baseline of random latent space sampling by up to 75 times. Finally, we validate our approach by detecting previously introduced faults in a faulty DL model. We suggest complementing expert-driven testing methods with our purely data-driven approach to uncover defects experts otherwise might miss. To strengthen transparency and facilitate replication, we provide a replication package and digital appendix to make our code, models, visualizations, and results publicly available.
AB - Autonomous vehicles rely on deep learning (DL) models like object detectors and traffic sign classifiers. Assessing the robustness of these safety-critical components requires good test cases that are both realistic, lying in the distribution of the real-world data, and cost-effective in revealing potential failures. Unlike previous methods that use adversarial attacks on the pixel space, our approach identifies latent space-aware test cases using a conditional variational autoencoder (CVAE) through three steps: (1) Train a CVAE on the dataset. (2) Generate test cases by computing adversarial examples in the CVAE's latent space. (3) Cluster challenging test cases based on their latent representations. The resulting clusters characterize regions that reveal potential defects in the DL model, which require further analysis. Our results show that our approach is capable of generating failing test cases for all classes of the MNIST and GTSRB datasets in a purely data-driven way, surpassing the baseline of random latent space sampling by up to 75 times. Finally, we validate our approach by detecting previously introduced faults in a faulty DL model. We suggest complementing expert-driven testing methods with our purely data-driven approach to uncover defects experts otherwise might miss. To strengthen transparency and facilitate replication, we provide a replication package and digital appendix to make our code, models, visualizations, and results publicly available.
KW - autoencoders
KW - automotive
KW - clustering
KW - deep learning
KW - search-based test case generation
KW - software testing
UR - https://www.scopus.com/pages/publications/105004733408
U2 - 10.1109/ICSTW64639.2025.10962499
DO - 10.1109/ICSTW64639.2025.10962499
M3 - Conference contribution
AN - SCOPUS:105004733408
T3 - 2025 IEEE International Conference on Software Testing, Verification and Validation Workshops, ICSTW 2025
SP - 1
EP - 8
BT - 2025 IEEE International Conference on Software Testing, Verification and Validation Workshops, ICSTW 2025
A2 - Fasolino, Anna Rita
A2 - Panichella, Sebastiano
A2 - Aleti, Aldeida
A2 - Mesbah, Ali
PB - Institute of Electrical and Electronics Engineers Inc.
T2 - 18th IEEE International Conference on Software Testing, Verification and Validation Workshops, ICSTW 2025
Y2 - 31 March 2025 through 4 April 2025
ER -