TensorMutation skips retraining each mutant: a graph neural network predicts weight changes of pre-training mutations
Synopsis
Deep-learning mutation testing has traded cost against realism: pre-training mutants resemble real faults more closely, but each one requires retraining the model. TensorMutation represents a trained model as a neural graph and uses a mutation-conditioned graph neural network to predict parameter changes directly, generating executable mutants without retraining. On 12 real-fault subjects its median behavioral similarity exceeds that of the post-training tool DeepMutation++, a difference that stays significant after Holm correction; differences from the pre-training tool DeepCrime and from a norm-matched random control are not significant.
Interpretation
Generating a mutant no longer requires retraining the model for each mutant; a graph neural network trained once offline predicts the parameter edits for an already trained model. Previously, pre-training mutation needed retraining to obtain a mutant, while post-training operators were cheaper but produced mutants farther from real faults. On nine held-out subjects, TensorMutation partially reproduced the behavior of the corresponding DeepCrime mutants, with a median behavioral IoU of 0.232 for the joint variant and 0.216 for the behavior-only variant.
Prediction treats the model as a neural graph: neurons are nodes and trainable connections are directed edges, and the graph neural network outputs a change for each bias and weight. The mutation request is encoded as a graph-level condition that modulates each node's hidden state through FiLM, letting one network handle different operators and configurations. The training corpus contains 25,252 original–mutant pairs from 71 MLP classifiers and 11 DeepCrime pre-training operators, including 25 newly curated subjects.
Direct weight-space supervision clearly improves the predicted direction, but the behavioral gain is uneven. With the behavioral objective alone, the median cosine similarity between predicted and reference deltas is 0.080; adding weight-space supervision raises it to 0.227. Cosine similarity improves on all nine test subjects and median normalized error falls from 1.377 to 1.030, yet behavioral IoU is higher on only five of the nine subjects.
On real faults, the gap to DeepMutation++ is statistically significant, while the lead over DeepCrime is only descriptive. Across 12 real-fault subjects, the joint variant's median behavioral IoU is 0.181, versus 0.130 for DeepCrime, 0.117 for the norm-matched random control and 0.058 for DeepMutation++. Against DeepMutation++ the paired comparison wins nine of ten non-tied subjects with a median difference of 0.112 and remains significant after Holm correction; differences from DeepCrime and the random control are not significant after correction.
Perspective
The evaluation covers multilayer perceptron classifiers implemented in TensorFlow/Keras, using the 11 DeepCrime operators that mutate the training program and preserve neuron correspondence; the real-fault benchmark has 12 behaviorally active subjects. The authors propose future work on controlled magnitude calibration, generalization to other network families, and learning fault-to-fix transformations from the paired corpus.
The norm-matched random control also achieves substantial real-fault similarity, so the extra behavioral contribution of the learned direction is not statistically established in the primary comparison; parameter magnitude and behavioral severity are distinct quantities whose calibration remains open. The authors also note that the non-significant difference from DeepCrime establishes neither that TensorMutation exceeds it nor that the two are equivalent.
