Test Script Repair of Deep Learning Library Testing

Deep learning (DL) libraries such as TensorFlow and PyTorch are widely utilized to develop machine learning models. However, when testing DL libraries, evolving library versions and flaws of testing approaches may result in invalid models within test scripts, which influence testing efficiency severely. Repairing these models can be difficult to achieve manually because of the complexity of DL models. In this paper, we propose a novel approach that utilizes a specialized prompt-based strategy with Large Language Model (LLM) to repair invalid DL models. We manually provide structured error information and model configurations to LLM, allowing it to generate code to fix invalid models. Our work shows that most invalid models can be repaired successfully with our strategy. Moreover, our approach can help to detect flaws in the DL library testing approaches and issues caused by version updates, which enhances the robustness and transferability of DL models.

Authors

Institutions

Publication Details

Published
2025-06-23
DOI
https://doi.org/10.1145/3696630.3728616
Primary Topic
Software Testing and Debugging Techniques
Type
article
Field-Weighted Citation Impact
0.00

Funders

Controls
|||
ALL TIME
JAN
FEB
MAR
APR
MAY
JUN
JUL
AUG
SEP
OCT
article

Test Script Repair of Deep Learning Library Testing

Xing Fu
Software Testing and Debugging Techniques
article

Test Script Repair of Deep Learning Library Testing

Xing Fu
article en

Abstract

Deep learning (DL) libraries such as TensorFlow and PyTorch are widely utilized to develop machine learning models. However, when testing DL libraries, evolving library versions and flaws of testing approaches may result in invalid models within test scripts, which influence testing efficiency severely. Repairing these models can be difficult to achieve manually because of the complexity of DL models. In this paper, we propose a novel approach that utilizes a specialized prompt-based strategy with Large Language Model (LLM) to repair invalid DL models. We manually provide structured error information and model configurations to LLM, allowing it to generate code to fix invalid models. Our work shows that most invalid models can be repaired successfully with our strategy. Moreover, our approach can help to detect flaws in the DL library testing approaches and issues caused by version updates, which enhances the robustness and transferability of DL models.

Nanjing Agricultural University (CN), Nanjing Tech University (CN), Nanjing University (CN)
National Natural Science Foundation of China
Quality Education
Openalex Percentile: Top 81%
Software Testing and Debugging Techniques
AI Navigator

Ask Laika to Summarize, Analyze, and Connect papers live on the map.

Summarize Papers & Methodologies

Extract key findings, datasets, and comparative methods across publications.

Benchmark Rankings & Visual Analytics

Rank top research institutions, authors, funders, topics, and journals by Field-Weighted Citation Impact (FWCI) and paper volume with instant charts.

Connect Distant Disciplines

Bridge topological clusters on the map to find hidden collaborative intersections.