Coverage-guided tensor compiler fuzzing with joint IR-pass mutation
Jiawei Liu, Yuxiang Wei, Sen Yang, Yinlin Deng, Lingming Zhang
摘要
In the past decade, Deep Learning (DL) systems have been widely deployed in various application domains to facilitate our daily life, e.g., natural language processing, healthcare, activity recognition, and autonomous driving. Meanwhile, it is extremely challenging to ensure the correctness of DL systems (e.g., due to their intrinsic nondeterminism), and bugs in DL systems can cause serious consequences and may even threaten human lives. In the literature, researchers have explored various techniques to test, analyze, and verify DL models, since their quality directly affects the corresponding system behaviors. Recently, researchers have also proposed novel techniques for testing the underlying operator-level DL libraries (such as TensorFlow and PyTorch), which provide general binary implementations for each high-level DL operator and are the foundation for running DL models on different hardware platforms. However, there is still limited work targeting the reliability of the emerging tensor compilers (also known as DL compilers), which aim to automatically compile high-level tensor computation graphs directly into high-performance binaries for better efficiency, portability, and scalability than traditional operator-level libraries. Therefore, in this paper, we target the important problem of tensor compiler testing, and have proposed Tzer, a practical fuzzing technique for the widely used TVM tensor compiler. Tzer focuses on mutating the low-level Intermediate Representation (IR) for TVM due to the limited mutation space for the high-level IR. More specifically, Tzer leverages both general-purpose and tensor-compiler-specific mutators guided by coverage feedback for diverse and evolutionary IR mutation; furthermore, since tensor compilers provide various passes (i.e., transformations) for IR optimization, Tzer also performs pass mutation in tandem with IR mutation for more effective fuzzing. Our experimental results show that Tzer substantially outperforms existing fuzzing techniques on tensor compiler testing, with 75% higher coverage and 50% more valuable tests than the 2nd-best technique. Also, different components of Tzer have been validated via ablation study. To date, Tzer has detected 49 previously unknown bugs for TVM, with 37 bugs confirmed and 25 bugs fixed (PR merged).
问 Lune
几分钟读透这篇 Paper,不用再花一下午。
Lune 能读完全文,也能读引用它的顶会 Paper,讲清它的结论、证据和局限,每一点都注明出自哪篇 Paper。不用硬啃,也不靠猜。
已有 25 篇顶会 Paper 引用了它。别等审稿人问起,先弄清它们发现了什么。
脉络
- Free Lunch for Testing: Fuzzing Deep-Learning Libraries from Open Source 引用了 DeepBillboard: systematic physical-world testing of autonomous driving systems
- Free Lunch for Testing: Fuzzing Deep-Learning Libraries from Open Source 引用了 Deep learning library testing via effective model generation
- Free Lunch for Testing: Fuzzing Deep-Learning Libraries from Open Source 引用了 Evaluating Fuzz Testing
- Free Lunch for Testing: Fuzzing Deep-Learning Libraries from Open Source 引用了 Coverage-based Greybox Fuzzing as Markov Chain
- NNSmith: Generating Diverse and Valid Test Cases for Deep Learning Compilers 引用了 Free Lunch for Testing: Fuzzing Deep-Learning Libraries from Open Source
- NNSmith: Generating Diverse and Valid Test Cases for Deep Learning Compilers 引用了 Deep learning library testing via effective model generation
- Fuzz4All: Universal Fuzzing with Large Language Models 引用了 Free Lunch for Testing: Fuzzing Deep-Learning Libraries from Open Source
- Fuzz4All: Universal Fuzzing with Large Language Models 引用了 NNSmith: Generating Diverse and Valid Test Cases for Deep Learning Compilers
- Fuzz4All: Universal Fuzzing with Large Language Models 引用了 Large Language Models Are Zero-Shot Fuzzers: Fuzzing Deep-Learning Libraries via Large Language Models
- Fuzz4All: Universal Fuzzing with Large Language Models 引用了 Evaluating Fuzz Testing
- Large Language Models Are Zero-Shot Fuzzers: Fuzzing Deep-Learning Libraries via Large Language Models 引用了 Free Lunch for Testing: Fuzzing Deep-Learning Libraries from Open Source
- Large Language Models Are Zero-Shot Fuzzers: Fuzzing Deep-Learning Libraries via Large Language Models 引用了 NNSmith: Generating Diverse and Valid Test Cases for Deep Learning Compilers
- Large Language Models Are Zero-Shot Fuzzers: Fuzzing Deep-Learning Libraries via Large Language Models 引用了 Deep learning library testing via effective model generation
- Large Language Models Are Zero-Shot Fuzzers: Fuzzing Deep-Learning Libraries via Large Language Models 引用了 Is Your Code Generated by ChatGPT Really Correct? Rigorous Evaluation of Large Language Models for Code Generation
- Is Your Code Generated by ChatGPT Really Correct? Rigorous Evaluation of Large Language Models for Code Generation 引用了 Large Language Models Are Zero-Shot Fuzzers: Fuzzing Deep-Learning Libraries via Large Language Models
- Large Language Models Are Zero-Shot Fuzzers: Fuzzing Deep-Learning Libraries via Large Language Models 引用了 Evaluating Fuzz Testing
- Evaluating Fuzz Testing 引用了 Coverage-based Greybox Fuzzing as Markov Chain
引用它的顶会 Paper25
- Is Your Code Generated by ChatGPT Really Correct? Rigorous Evaluation of Large Language Models for Code GenerationJiawei Liu, Chunqiu Steven Xia, Yuyao Wang, Lingming ZhangNeurIPS 2023 · 2,317 次引用
- Large Language Models Are Zero-Shot Fuzzers: Fuzzing Deep-Learning Libraries via Large Language ModelsYinlin Deng, Chunqiu Steven Xia, Haoran Peng, Chenyuan Yang 等ISSTA 2023 · 253 次引用
- Fuzz4All: Universal Fuzzing with Large Language ModelsChunqiu Steven Xia, Matteo Paltenghi, Jia Le Tian, Michael Pradel 等ICSE 2024 · 155 次引用
- Free Lunch for Testing: Fuzzing Deep-Learning Libraries from Open SourceAnjiang Wei, Yinlin Deng, Chenyuan Yang, Lingming ZhangICSE 2022 · 91 次引用
- NNSmith: Generating Diverse and Valid Test Cases for Deep Learning CompilersJiawei Liu, Jinkun Lin, Fabian Ruffy, Cheng Tan 等ASPLOS 2023 · 90 次引用
它引用的 Paper10
- Coverage-based Greybox Fuzzing as Markov ChainMarcel Böhme, Van-Thuan Pham, Abhik RoychoudhuryCCS 2016 · 1,026 次引用
- Evaluating Fuzz TestingGeorge Klees, Andrew Ruef, Benji Cooper, Shiyi Wei 等CCS 2018 · 753 次引用
- Deep learning library testing via effective model generationZan Wang, Ming Yan, Junjie Chen, Shuang Liu 等FSE 2020 · 165 次引用
- DeepBillboard: systematic physical-world testing of autonomous driving systemsHusheng Zhou, Wei Li, Zelun Kong, Junfeng Guo 等ICSE 2020 · 150 次引用
- A comprehensive study of autonomous vehicle bugsJoshua Garcia, Yang Feng, Junjie Shen, Sumaya Almanee 等ICSE 2020 · 127 次引用
相关 Paper
- Optimization-Aware Test Generation for Deep Learning CompilersQingchao Shen, Zan Wang, Haoyang Ma, Yongqiang Tian 等ICSE 2026
- Fuzzing Deep Learning Compilers with HirGenHaoyang Ma, Qingchao Shen, Yongqiang Tian, Junjie Chen 等ISSTA 2023 · 24 次引用
- A Tale of Two DL Cities: When Library Tests Meet CompilerQingchao Shen, Yongqiang Tian, Haoyang Ma, Junjie Chen 等ICSE 2025 · 4 次引用
- Your Fix Is My Exploit: Enabling Comprehensive DL Library API Fuzzing with Large Language ModelsKunpeng Zhang, Shuai Wang, Jitao Han, Xiaogang Zhu 等ICSE 2025 · 6 次引用
- Fuzzing Automatic Differentiation in Deep-Learning LibrariesChenyuan Yang, Yinlin Deng, Jiayi Yao, Yuxing Tu 等ICSE 2023 · 34 次引用
