TensorMutation: Learning Weight-Space Mutations of Deep Learning Models on Neural Graphs
Abstract
Mutation testing for deep learning (DL) faces a cost-realism trade-off. The pre-training approach produces realistic but computationally expensive mutants, whereas existing post-training operators modify trained models efficiently but produce mutants that less closely resemble real faults. This study asks whether the trade-off is necessary: can the weight-space effect of a fault-informed pre-training mutation operator be predicted from a trained model, without retraining it? We answer this question with TensorMutation, which represents a trained model as a neural graph and uses a mutation-conditioned graph neural network (GNN) to predict parameter changes. The GNN is trained offline and reused across unseen models so that TensorMutation can generate executable mutants without retraining. We construct a corpus of 25,252 original-mutant pairs from 71 multilayer perceptron (MLP) classifiers using 11 fault-informed pre-training operators, including 25 newly curated subjects. TensorMutation partially reproduces the behavioral effects of pre-training mutations on nine held-out subjects, and direct weight-space supervision significantly improves weight-space fidelity. On 12 real-fault subjects, TensorMutation achieves the highest median behavioral similarity among the evaluated approaches. The improvement over the post-training tool DeepMutation++ is statistically significant (Holm-adjusted p=0.018), whereas the differences from the pre-training tool DeepCrime and the norm-matched random control are not significant. These results show that fault-informed pre-training mutations leave learnable structure in weight space that transfers to unseen models.
Create a lesson
Metadata
- Categories
- cs.SE, cs.LG
- Comments
- 18 pages, 7 figures
Related papers
MicroSim: Contrastive Graph Neural Networks for Binary Code Similarity Detection
Shared title terminologycs.SEMoussa Moussaoui, Tarik Houichime, Abdelghani Souhar et al.
Agentic Root Cause Reasoning and Localization of Unsoundness in Static Call Graph Analysis
Shared title terminologycs.SEMohammad Rafieian, Michael Hicks, Shiyi Wei
Time-Consistent Evaluation of Hierarchical Code Graphs for SWE Agents
Shared title terminologycs.SEXianpeng, Sun, Tian Yu et al.
Git2KG: Mining socio-technical relationships in GitHub repositories as temporal knowledge graphs
Shared title terminologycs.SELennart Hessenauer, Lisi Qarkaxhija, Ingo Scholtes
KernelMutate: Mutation-Guided Validation of Generated GPU Kernels
Shared title terminologycs.SEZiyuan Li, Zihe Song, Shuxiao Xie et al.
SPARK: Semantic-preserving Prompt Mutation for Code Generation using Consensus-based Verification Framework
Shared title terminologycs.SEAlireza Daghigh, Chung-Yu Wang, Luca Filippelli et al.