NNSmith: Generating Diverse and Valid Test Cases for Deep Learning Compilers
Not on the map. Why?
Abstract (arXiv)
Deep-learning (DL) compilers such as TVM and TensorRT are increasingly being used to optimize deep neural network (DNN) models to meet performance, resource utilization and other requirements. Bugs in these compilers can result in models whose semantics differ from the original ones, producing incorrect results that corrupt the correctness of downstream applications. However, finding bugs in these compilers is challenging due to their complexity. In this work, we propose a new fuzz testing approach for finding bugs in deep-learning compilers. Our core approach consists of (i) generating diverse yet valid DNN test models that can exercise a large part of the compiler's transformation logic using light-weight operator specifications; (ii) performing gradient-based search to find model inputs that avoid any floating-point exceptional values during model execution, reducing the chance of missed bugs or false alarms; and (iii) using differential testing to identify bugs. We implemented this approach in NNSmith which has found 72 new bugs for TVM, TensorRT, ONNXRuntime, and PyTorch to date. Of these 58 have been confirmed and 51 have been fixed by their respective project maintainers.
Key facts. Cited by 30 papers in the map (data through 14 Oct 2026). Builds on 20 of its 79 references that are in the map. First posted on arXiv 26 Jul 2022.
Builds on
20 of 79 references.
References · 20
- 2014Adam: A Method for Stochastic Optimizationcited by 37,240
- 2021Learning Transferable Visual Models From Natural Language Supervisioncited by 33,744
- 2020Language Models are Few-Shot Learnerscited by 32,419
- 2017Mask R-CNNcited by 7,277
- 2013Estimating or Propagating Gradients Through Stochastic Neurons for Conditional Computationcited by 2,079
- 2017Multimodal Machine Learning: A Survey and Taxonomycited by 1,013
- 2015Empirical Evaluation of Rectified Activations in Convolutional Networkcited by 519
- 2020Ansor: Generating High-Performance Tensor Programs for Deep Learningcited by 201
- 2018Learning to Optimize Tensor Programscited by 140
- 2018The Art, Science, and Engineering of Fuzzing: A Surveycited by 62
- 2022Free Lunch for Testing: Fuzzing Deep-Learning Libraries from Open Sourcecited by 28
- 2022Muffin: Testing Deep Learning Libraries via Neural Architecture Fuzzingcited by 16
8 more
- 2022Fuzzing Deep-Learning Libraries via Automated Relational API Inferencecited by 16
- 2021Automated Conformance Testing for JavaScript Engines via Deep Compiler Fuzzingcited by 12
- 2022Coverage-Guided Tensor Compiler Fuzzing with Joint IR-Pass Mutationcited by 10
- 2021Fuzzing Hardware Like Softwarecited by 9
- 2020Montage: A Neural Network Language Model-Guided JavaScript Engine Fuzzercited by 7
- 2020Graph-Based Fuzz Testing for Deep Learning Inference Enginecited by 7
- 2016Skeletal Program Enumeration for Rigorous Compiler Testingcited by 6
- 2019A Systematic Impact Study for Fuzzer-Found Compiler Bugscited by 2
Built on by
Citing papers per year: 2023: 6; 2024: 5; 2025: 8; 2026: 11.
30 papers.
Sort:
By area:
- 2023Fuzz4All: Universal Fuzzing with Large Language Modelscited by 88
- 2023WhiteFox: White-Box Compiler Fuzzing Empowered by Large Language Modelscited by 37
- 2024Glitch Tokens in Large Language Models: Categorization Taxonomy and Effective Detectioncited by 29
- 2024Are LLMs Correctly Integrated into Software Systems?cited by 15
- 2023Challenges and Practices of Deep Learning Model Reengineering: A Case Study on Computer Visioncited by 11
- 2025Training with Confidence: Catching Silent Errors in Deep Learning Training with Automated Proactive Checkscited by 10
- 2023DyCL: Dynamic Neural Network Compilation Via Program Rewriting and Graph Optimizationcited by 9
- 2023NeuRI: Diversifying DNN Generation via Inductive Rule Inferencecited by 7
- 2025Your Compiler is Backdooring Your Model: Understanding and Exploiting Compilation Inconsistency Vulnerabilities in Deep Learning Compilerscited by 7
- 2024Deep Learning Library Testing: Definition, Methods and Challengescited by 5
- 2025TrainVerify: Equivalence-Based Verification for Distributed LLM Trainingcited by 3
- 2026Where Agent Frameworks Fall Short: Examining Functional Challenges and Usability Concernscited by 3
18 more
- 2024Productively Deploying Emerging Models on Emerging Platforms: A Top-Down Approach for Testing and Debuggingcited by 2
- 2025Evaluating LLMs on Sequential API Call Through Automated Test Generationcited by 2
- 2025DiTOX: Fault Detection and Localization in the ONNX Optimizercited by 1
- 2025TTrace: Lightweight Error Checking and Diagnosis for Distributed Trainingcited by 1
- 2026GPU-Fuzz: Finding Memory Errors in Deep Learning Frameworkscited by 1
- 2023Exploring Robustness of Image Recognition Models on Hardware Acceleratorscited by 0
- 2024ML2Tuner: Efficient Code Tuning via Multi-Level Machine Learning Modelscited by 0
- 2025Verify Distributed Deep Learning Model Implementation Refinement with Iterative Relation Inferencecited by 0
- 2025Once4All: Skeleton-Guided SMT Solver Fuzzing with LLM-Synthesized Generatorscited by 0
- 2026M2K: Making the Model-Kernel Interface Explicit for Reliable CUDA Kernel Verificationcited by 0
- 2026Demystifying the Silence of Correctness Bugs in PyTorch Compilercited by 0
- 2026PPO guided Agentic Pipeline for Adaptive Prompt Selection and Test Case Generationcited by 0
- 2026FeedbackLLM: Metadata driven Multi-Agentic Language Agnostic Test Case Generator with Evolving prompt and Coverage Feedbackcited by 0
- 2026Detecting and Understanding Vulnerabilities in Fully Homomorphic Encryption Frameworkscited by 0
- 2026From Expert Reduction to Behavioral Divergence: Tracing Numerical State through Sparse MoE Inferencecited by 0
- 2026Measuring the Checker: Mutation Analysis for GPU-Kernel Benchmark Oraclescited by 0
- 2026Silent Failures Beyond the 32-Bit Index Range: A Differential Characterization of Large-Tensor Matrix Multiplication in PyTorch's MPS Backendcited by 0
- 2026Grounding Deep Learning Framework Testing in Data Flowcited by 0
- 2026Grounding Deep Learning Framework Testing in Data Flow11 Oct 2026
- 2026Silent Failures Beyond the 32-Bit Index Range: A Differential Characterization of Large-Tensor Matrix Multiplication in PyTorch's MPS Backend19 Sep 2026
- 2026Measuring the Checker: Mutation Analysis for GPU-Kernel Benchmark Oracles2 Sep 2026
- 2026From Expert Reduction to Behavioral Divergence: Tracing Numerical State through Sparse MoE Inference30 Jul 2026
- 2026Detecting and Understanding Vulnerabilities in Fully Homomorphic Encryption Frameworks21 Jun 2026
- 2026FeedbackLLM: Metadata driven Multi-Agentic Language Agnostic Test Case Generator with Evolving prompt and Coverage Feedback2 May 2026
- 2026PPO guided Agentic Pipeline for Adaptive Prompt Selection and Test Case Generation1 May 2026
- 2026Demystifying the Silence of Correctness Bugs in PyTorch Compiler9 Apr 2026
- 2026M2K: Making the Model-Kernel Interface Explicit for Reliable CUDA Kernel Verification6 Mar 2026
- 2026Where Agent Frameworks Fall Short: Examining Functional Challenges and Usability Concerns25 Feb 2026
- 2026GPU-Fuzz: Finding Memory Errors in Deep Learning Frameworks11 Feb 2026
- 2025Your Compiler is Backdooring Your Model: Understanding and Exploiting Compilation Inconsistency Vulnerabilities in Deep Learning Compilers14 Sep 2025
18 more
- 2025Once4All: Skeleton-Guided SMT Solver Fuzzing with LLM-Synthesized Generators28 Aug 2025
- 2025Verify Distributed Deep Learning Model Implementation Refinement with Iterative Relation Inference13 Aug 2025
- 2025Evaluating LLMs on Sequential API Call Through Automated Test Generation13 Jul 2025
- 2025TrainVerify: Equivalence-Based Verification for Distributed LLM Training19 Jun 2025
- 2025TTrace: Lightweight Error Checking and Diagnosis for Distributed Training10 Jun 2025
- 2025Training with Confidence: Catching Silent Errors in Deep Learning Training with Automated Proactive Checks6 Jun 2025
- 2025DiTOX: Fault Detection and Localization in the ONNX Optimizer3 May 2025
- 2024ML2Tuner: Efficient Code Tuning via Multi-Level Machine Learning Models16 Nov 2024
- 2024Are LLMs Correctly Integrated into Software Systems?6 Jul 2024
- 2024Deep Learning Library Testing: Definition, Methods and Challenges27 Apr 2024
- 2024Glitch Tokens in Large Language Models: Categorization Taxonomy and Effective Detection15 Apr 2024
- 2024Productively Deploying Emerging Models on Emerging Platforms: A Top-Down Approach for Testing and Debugging14 Apr 2024
- 2023WhiteFox: White-Box Compiler Fuzzing Empowered by Large Language Models24 Oct 2023
- 2023Fuzz4All: Universal Fuzzing with Large Language Models9 Aug 2023
- 2023DyCL: Dynamic Neural Network Compilation Via Program Rewriting and Graph Optimization11 Jul 2023
- 2023Exploring Robustness of Image Recognition Models on Hardware Accelerators2 Jun 2023
- 2023Challenges and Practices of Deep Learning Model Reengineering: A Case Study on Computer Vision13 Mar 2023
- 2023NeuRI: Diversifying DNN Generation via Inductive Rule Inference4 Feb 2023
- 2026Where Agent Frameworks Fall Short: Examining Functional Challenges and Usability Concernscited by 3
- 2025Evaluating LLMs on Sequential API Call Through Automated Test Generationcited by 2
- 2026PPO guided Agentic Pipeline for Adaptive Prompt Selection and Test Case Generationcited by 0
- 2026FeedbackLLM: Metadata driven Multi-Agentic Language Agnostic Test Case Generator with Evolving prompt and Coverage Feedbackcited by 0
- 2026FeedbackLLM: Metadata driven Multi-Agentic Language Agnostic Test Case Generator with Evolving prompt and Coverage Feedback2 May 2026
- 2026PPO guided Agentic Pipeline for Adaptive Prompt Selection and Test Case Generation1 May 2026
- 2026Where Agent Frameworks Fall Short: Examining Functional Challenges and Usability Concerns25 Feb 2026
- 2025Evaluating LLMs on Sequential API Call Through Automated Test Generation13 Jul 2025
- 2024Are LLMs Correctly Integrated into Software Systems?cited by 15
- 2024Are LLMs Correctly Integrated into Software Systems?6 Jul 2024
- 2023Fuzz4All: Universal Fuzzing with Large Language Modelscited by 88
- 2023WhiteFox: White-Box Compiler Fuzzing Empowered by Large Language Modelscited by 37
- 2024Glitch Tokens in Large Language Models: Categorization Taxonomy and Effective Detectioncited by 29
- 2023Challenges and Practices of Deep Learning Model Reengineering: A Case Study on Computer Visioncited by 11
- 2025Training with Confidence: Catching Silent Errors in Deep Learning Training with Automated Proactive Checkscited by 10
- 2023DyCL: Dynamic Neural Network Compilation Via Program Rewriting and Graph Optimizationcited by 9
- 2023NeuRI: Diversifying DNN Generation via Inductive Rule Inferencecited by 7
- 2025Your Compiler is Backdooring Your Model: Understanding and Exploiting Compilation Inconsistency Vulnerabilities in Deep Learning Compilerscited by 7
- 2024Deep Learning Library Testing: Definition, Methods and Challengescited by 5
- 2025TrainVerify: Equivalence-Based Verification for Distributed LLM Trainingcited by 3
- 2024Productively Deploying Emerging Models on Emerging Platforms: A Top-Down Approach for Testing and Debuggingcited by 2
- 2025DiTOX: Fault Detection and Localization in the ONNX Optimizercited by 1
12 most cited of 24 All 24 (JSON)
- 2026Grounding Deep Learning Framework Testing in Data Flow11 Oct 2026
- 2026Silent Failures Beyond the 32-Bit Index Range: A Differential Characterization of Large-Tensor Matrix Multiplication in PyTorch's MPS Backend19 Sep 2026
- 2026Measuring the Checker: Mutation Analysis for GPU-Kernel Benchmark Oracles2 Sep 2026
- 2026Detecting and Understanding Vulnerabilities in Fully Homomorphic Encryption Frameworks21 Jun 2026
- 2026Demystifying the Silence of Correctness Bugs in PyTorch Compiler9 Apr 2026
- 2026M2K: Making the Model-Kernel Interface Explicit for Reliable CUDA Kernel Verification6 Mar 2026
- 2026GPU-Fuzz: Finding Memory Errors in Deep Learning Frameworks11 Feb 2026
- 2025Your Compiler is Backdooring Your Model: Understanding and Exploiting Compilation Inconsistency Vulnerabilities in Deep Learning Compilers14 Sep 2025
- 2025Once4All: Skeleton-Guided SMT Solver Fuzzing with LLM-Synthesized Generators28 Aug 2025
- 2025Verify Distributed Deep Learning Model Implementation Refinement with Iterative Relation Inference13 Aug 2025
- 2025TrainVerify: Equivalence-Based Verification for Distributed LLM Training19 Jun 2025
- 2025TTrace: Lightweight Error Checking and Diagnosis for Distributed Training10 Jun 2025
12 newest of 24 All 24 (JSON)