Enhancing Differential Testing With LLMs For Testing Deep Learning Libraries
Not on the map. Why?
Abstract (arXiv)
Differential testing offers a promising strategy to alleviate the test oracle problem by comparing the test results between alternative implementations. However, existing differential testing techniques for deep learning (DL) libraries are limited by the key challenges of finding alternative implementations (called counterparts) for a given API and subsequently generating diverse test inputs. To address the two challenges, this paper introduces DLLens, an LLM-enhanced differential testing technique for DL libraries. To address the first challenge, DLLens incorporates an LLM-based counterpart synthesis workflow, with the insight that the counterpart of a given DL library API's computation could be successfully synthesized through certain composition and adaptation of the APIs from another DL library. To address the second challenge, DLLens incorporates a static analysis technique that extracts the path constraints from the implementations of a given API and its counterpart to guide diverse test input generation. The extraction is facilitated by LLM's knowledge of the concerned DL library and its upstream libraries. We evaluate DLLens on two popular DL libraries, TensorFlow and PyTorch. Our evaluation shows that DLLens synthesizes counterparts for 1.84 times as many APIs as those found by state-of-the-art techniques on these libraries. Moreover, under the same time budget, DLLens covers 7.23% more branches and detects 1.88 times as many bugs as state-of-the-art techniques on 200 randomly sampled APIs. DLLens has successfully detected 71 bugs in recent TensorFlow and PyTorch libraries. Among them, 59 are confirmed by developers, including 46 confirmed as previously unknown bugs, and 10 of these previously unknown bugs have been fixed in the latest version of TensorFlow and PyTorch.
Key facts. Cited by 4 papers in the map (data through 7 Oct 2026). Builds on 23 of its 67 references that are in the map. First posted on arXiv 12 Jun 2024.
Builds on
23 of 67 references.
References · 23
- 2019PyTorch: An Imperative Style, High-Performance Deep Learning Librarycited by 20,160
- 2016Identity Mappings in Deep Residual Networkscited by 1,960
- 2017A Survey on Deep Learning in Medical Image Analysiscited by 1,182
- 2023Teaching Large Language Models to Self-Debugcited by 963
- 2022Large Language Models are Better Reasoners with Self-Verificationcited by 304
- 2016Safe, Multi-Agent, Reinforcement Learning for Autonomous Drivingcited by 301
- 2015DeepDriving: Learning Affordance for Direct Perception in Autonomous Drivingcited by 229
- 2017Deep Reinforcement Learning framework for Autonomous Drivingcited by 224
- 2024Beyond Functional Correctness: Exploring Hallucinations in LLM-Generated Codecited by 106
- 2022Large Language Models are Zero-Shot Fuzzers: Fuzzing Deep-Learning Libraries via Large Language Modelscited by 102
- 2023WhiteFox: White-Box Compiler Fuzzing Empowered by Large Language Modelscited by 37
- 2022Free Lunch for Testing: Fuzzing Deep-Learning Libraries from Open Sourcecited by 27
11 more
- 2022Toward Understanding Deep Learning Framework Bugscited by 26
- 2021Silent Bugs in Deep Learning Frameworks: An Empirical Study of Keras and TensorFlowcited by 25
- 2021DocTer: Documentation Guided Fuzzing for Testing Deep Learning API Functionscited by 21
- 2021PyCG: Practical Call Graph Generation in Pythoncited by 16
- 2022Fuzzing Deep-Learning Libraries via Automated Relational API Inferencecited by 16
- 2023Fuzzing Automatic Differentiation in Deep-Learning Librariescited by 16
- 2022Muffin: Testing Deep Learning Libraries via Neural Architecture Fuzzingcited by 15
- 2020Graph-Based Fuzz Testing for Deep Learning Inference Enginecited by 7
- 2018Deep Learning for Signal Authentication and Security in Massive Internet of Things Systemscited by 6
- 2022COMET: Coverage-guided Model Generation For Deep Learning Library Testingcited by 3
- 2023ACETest: Automated Constraint Extraction for Testing Deep Learning Operatorscited by 2
Built on by
Citing papers per year: 2024: 1; 2025: 1; 2026: 2.
4 papers.
- 2024Lingma SWE-GPT: An Open Development-Process-Centric Language Model for Automated Software Improvementcited by 57
- 2025Thinking Longer, Not Larger: Enhancing Software Engineering Agents via Scaling Test-Time Computecited by 25
- 2026Automated Summarization of Software Documents: An LLM-based Multi-Agent Approachcited by 1
- 2026Multi-Large Language Model Orchestrated Severity Assessment of Clinical Records (MOSAIC)cited by 0
- 2026Multi-Large Language Model Orchestrated Severity Assessment of Clinical Records (MOSAIC)6 Jul 2026
- 2026Automated Summarization of Software Documents: An LLM-based Multi-Agent Approach23 Jun 2026
- 2025Thinking Longer, Not Larger: Enhancing Software Engineering Agents via Scaling Test-Time Compute31 Mar 2025
- 2024Lingma SWE-GPT: An Open Development-Process-Centric Language Model for Automated Software Improvement1 Nov 2024