[Paper Review] DeepMutation: Mutation Testing of Deep Learning Systems
This paper proposes DeepMutation, a mutation testing framework for deep learning systems that evaluates test data quality by injecting faults into training data, training programs, and trained models using specialized mutation operators. The framework demonstrates that higher mutant detection rates correlate with better test suite quality, showing promise for improving robustness and reliability in DL systems on MNIST and CIFAR-10 datasets with multiple models.
Deep learning (DL) defines a new data-driven programming paradigm where the internal system logic is largely shaped by the training data. The standard way of evaluating DL models is to examine their performance on a test dataset. The quality of the test dataset is of great importance to gain confidence of the trained models. Using an inadequate test dataset, DL models that have achieved high test accuracy may still lack generality and robustness. In traditional software testing, mutation testing is a well-established technique for quality evaluation of test suites, which analyzes to what extent a test suite detects the injected faults. However, due to the fundamental difference between traditional software and deep learning-based software, traditional mutation testing techniques cannot be directly applied to DL systems. In this paper, we propose a mutation testing framework specialized for DL systems to measure the quality of test data. To do this, by sharing the same spirit of mutation testing in traditional software, we first define a set of source-level mutation operators to inject faults to the source of DL (i.e., training data and training programs). Then we design a set of model-level mutation operators that directly inject faults into DL models without a training process. Eventually, the quality of test data could be evaluated from the analysis on to what extent the injected faults could be detected. The usefulness of the proposed mutation testing techniques is demonstrated on two public datasets, namely MNIST and CIFAR-10, with three DL models.
Motivation & Objective
- To address the lack of systematic evaluation techniques for test data quality in deep learning systems.
- To identify critical weaknesses in test suites that may miss model vulnerabilities despite high accuracy.
- To adapt mutation testing—well-established in traditional software—to the unique characteristics of deep learning systems.
- To design and validate mutation operators that simulate realistic faults in training data, training code, and trained models.
- To provide a scalable and effective framework for measuring test suite effectiveness in detecting model-level faults.
Proposed method
- Proposes eight source-level mutation operators targeting training data and training programs to simulate real-world defects in data collection and implementation.
- Designs eight model-level mutation operators that directly alter model weights and structures without retraining, enabling fast mutant generation.
- Applies standard mutation testing metrics—such as mutant kill rate and mutation score—to evaluate test suite effectiveness.
- Executes each mutant model on the test set and compares outputs with the original model to detect behavior differences.
- Uses the detection of inconsistent outputs as evidence of test suite effectiveness in uncovering faults.
- Employs a hybrid approach combining source-level and model-level mutation to cover diverse fault types and improve test coverage.
Experimental results
Research questions
- RQ1To what extent can mutation testing detect faults injected into training data and training programs in deep learning systems?
- RQ2How effective are model-level mutation operators in revealing weaknesses in test suites without retraining?
- RQ3Can mutant detection rates serve as a reliable metric for evaluating the quality of test data in deep learning?
- RQ4How do different mutation operators compare in their ability to expose model vulnerabilities?
- RQ5Can the proposed framework identify test suite shortcomings that high-accuracy benchmarks may miss?
Key findings
- The proposed source-level mutation operators successfully injected realistic faults into training data and programs, simulating common data and coding errors.
- Model-level mutation operators enabled efficient generation of large mutant sets, revealing fine-grained model-level issues that source-level mutation might miss.
- On MNIST and CIFAR-10, test suites with higher mutant kill rates demonstrated better robustness and generalization, even when accuracy was high.
- The mutation score metric correlated strongly with test suite quality, indicating its potential as a quantitative measure for test data evaluation.
- The framework revealed that high-accuracy models could still be fragile when exposed to subtle perturbations, highlighting test suite limitations.
- The evaluation confirmed that mutation testing is a viable and effective technique for assessing test data quality in deep learning systems.
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.