Lune

ISSTA2022Top-tier venue

DocTer: documentation-guided fuzzing for testing deep learning API functions

Danning Xie, Yitong Li, Mijung Kim, Hung Viet Pham, Lin Tan, Xiangyu Zhang, Michael W. Godfrey

Abstract

Input constraints are useful for many software development tasks. For example, input constraints of a function enable the generation of valid inputs, i.e., inputs that follow these constraints, to test the function deeper. API functions of deep learning (DL) libraries have DL-specific input constraints, which are described informally in the free-form API documentation. Existing constraint-extraction techniques are ineffective for extracting DL-specific input constraints. To fill this gap, we design and implement a new technique-DocTer-to analyze API documentation to extract DL-specific input constraints for DL API functions. DocTer features a novel algorithm that automatically constructs rules to extract API parameter constraints from syntactic patterns in the form of dependency parse trees of API descriptions. These rules are then applied to a large volume of API documents in popular DL libraries to extract their input parameter constraints. To demonstrate the effectiveness of the extracted constraints, DocTer uses the constraints to enable the automatic generation of valid and invalid inputs to test DL API functions. Our evaluation on three popular DL libraries (TensorFlow, Py-Torch, and MXNet) shows that DocTer's precision in extracting input constraints is 85.4%. DocTer detects 94 bugs from 174 API functions, including one previously unknown security vulnerability that is now documented in the CVE database, while a baseline technique without input constraints detects only 59 bugs. Most (63) of the 94 bugs are previously unknown, 54 of which have been fixed or confirmed by developers after we report them. In addition, DocTer detects 43 inconsistencies in documents, 39 of which are fixed or confirmed.

Ask Lune

Know this paper in minutes, not an afternoon.

Lune can read every page of it and the top-tier papers that cite it, and gives you its claims, its evidence and its limits, each one cited to the paper it comes from. No skimming, no AI slop.

28 top-tier papers have cited it since. Know what they found before your reviewers do.

Questions to start from

Lune can draw on

the full paper · the top-tier papers that cite it · related work

Get the answer

Free to start. No credit card required.

Lineage

  • WhiteFox: White-Box Compiler Fuzzing Empowered by Large Language Models cites Large Language Models Are Zero-Shot Fuzzers: Fuzzing Deep-Learning Libraries via Large Language Models
  • WhiteFox: White-Box Compiler Fuzzing Empowered by Large Language Models cites Fuzzing Automatic Differentiation in Deep-Learning Libraries
  • WhiteFox: White-Box Compiler Fuzzing Empowered by Large Language Models cites Deep learning library testing via effective model generation
  • Large Language Models Are Zero-Shot Fuzzers: Fuzzing Deep-Learning Libraries via Large Language Models cites Fuzzing Automatic Differentiation in Deep-Learning Libraries
  • Large Language Models Are Zero-Shot Fuzzers: Fuzzing Deep-Learning Libraries via Large Language Models cites Deep learning library testing via effective model generation
  • Large Language Models Are Zero-Shot Fuzzers: Fuzzing Deep-Learning Libraries via Large Language Models cites Fuzzing deep-learning libraries via automated relational API inference
  • Fuzzing Automatic Differentiation in Deep-Learning Libraries cites Deep learning library testing via effective model generation
  • Fuzzing Automatic Differentiation in Deep-Learning Libraries cites Fuzzing deep-learning libraries via automated relational API inference
  • Large Language Models are Edge-Case Generators: Crafting Unusual Programs for Fuzzing Deep Learning Libraries cites Large Language Models Are Zero-Shot Fuzzers: Fuzzing Deep-Learning Libraries via Large Language Models
  • Large Language Models are Edge-Case Generators: Crafting Unusual Programs for Fuzzing Deep Learning Libraries cites Fuzzing Automatic Differentiation in Deep-Learning Libraries
  • Large Language Models are Edge-Case Generators: Crafting Unusual Programs for Fuzzing Deep Learning Libraries cites Deep learning library testing via effective model generation
  • Large Language Models are Edge-Case Generators: Crafting Unusual Programs for Fuzzing Deep Learning Libraries cites Fuzzing deep-learning libraries via automated relational API inference
  • Fuzzing deep-learning libraries via automated relational API inference cites Deep learning library testing via effective model generation
Builds onCited byLeft to right by year; the more cited, the higher.

Cited by top-tier papers28

  1. Large Language Models Are Zero-Shot Fuzzers: Fuzzing Deep-Learning Libraries via Large Language ModelsYinlin Deng, Chunqiu Steven Xia, Haoran Peng, Chenyuan Yang et al.ISSTA 2023 · 253 citations
  2. Large Language Models are Edge-Case Generators: Crafting Unusual Programs for Fuzzing Deep Learning LibrariesYinlin Deng, Chunqiu Steven Xia, Chenyuan Yang, Shizhuo Dylan Zhang et al.ICSE 2024 · 85 citations
  3. Fuzzing deep-learning libraries via automated relational API inferenceYinlin Deng, Chenyuan Yang, Anjiang Wei, Lingming ZhangFSE 2022 · 83 citations
  4. WhiteFox: White-Box Compiler Fuzzing Empowered by Large Language ModelsChenyuan Yang, Yinlin Deng, Runyu Lu, Jiayi Yao et al.OOPSLA 2024 · 74 citations
  5. Fuzzing Automatic Differentiation in Deep-Learning LibrariesChenyuan Yang, Yinlin Deng, Jiayi Yao, Yuxing Tu et al.ICSE 2023 · 34 citations

Builds on9

  1. T-Fuzz: Fuzzing by Program TransformationHui Peng, Yan Shoshitaishvili, Mathias PayerS&P 2018 · 326 citations
  2. Taxonomy of real faults in deep learning systemsNargiz Humbatova, Gunel Jahangirova, Gabriele Bavota, Vincenzo Riccio et al.ICSE 2020 · 281 citations
  3. Deep learning library testing via effective model generationZan Wang, Ming Yan, Junjie Chen, Shuang Liu et al.FSE 2020 · 165 citations
  4. Fuzz testing based data augmentation to improve robustness of deep neural networksXiang Gao, Ripon K. Saha, Mukul R. Prasad, Abhik RoychoudhuryICSE 2020 · 116 citations
  5. An empirical study on program failures of deep learning jobsRu Zhang, Wencong Xiao, Hongyu Zhang, Yu Liu et al.ICSE 2020 · 96 citations

Related papers

  1. ACETest: Automated Constraint Extraction for Testing Deep Learning OperatorsJingyi Shi, Yang Xiao, Yuekang Li, Yeting Li et al.ISSTA 2023 · 24 citations
  2. Testing Deep Learning Libraries via Neurosymbolic Constraint LearningM M Abid Naziri, Shinhae Kim, Feiran (Alex) Qin, Saikat Dutta et al.ICSE 2026
  3. DECODE: Dynamic Exploration for Constraint-Guided Vulnerability Discovery in Deep Learning OperatorsHaotong Liu, Zhi Wang, Zhuohang Liu, Wanpeng LiFSE 2026
  4. Differential Testing of Cross Deep Learning Framework APIs: Revealing Inconsistencies and VulnerabilitiesZizhuang Deng, Guozhu Meng, Kai Chen, Tong Liu et al.USENIX Security 2023
  5. The raise of machine learning hyperparameter constraints in Python codeIngkarat Rak-amnouykit, Ana L. Milanova, Guillaume Baudart, Martin Hirzel et al.ISSTA 2022 · 1 citation
Dusk over the sea between two cliffs drawn in fine vertical lines