Leveraging Documentation to Test Deep Learning Library Functions

09/02/2021
by   Danning Xie, et al.
0

It is integral to test API functions of widely used deep learning (DL) libraries. The effectiveness of such testing requires DL specific input constraints of these API functions. Such constraints enable the generation of valid inputs, i.e., inputs that follow these DL specific constraints, to explore deep to test the core functionality of API functions. Existing fuzzers have no knowledge of such constraints, and existing constraint extraction techniques are ineffective for extracting DL specific input constraints. To fill this gap, we design and implement a document guided fuzzing technique, D2C, for API functions of DL libraries. D2C leverages sequential pattern mining to generate rules for extracting DL specific constraints from API documents and uses these constraints to guide the fuzzing to generate valid inputs automatically. D2C also generates inputs that violate these constraints to test the input validity checking code. In addition, D2C uses the constraints to generate boundary inputs to detect more bugs. Our evaluation of three popular DL libraries (TensorFlow, PyTorch, and MXNet) shows that D2C's accuracy in extracting input constraints is 83.3 baseline fuzzer without input constraints detects only 68 bugs. Most (89) of the 121 bugs are previously unknown, 54 of which have been fixed or confirmed by developers after we report them. In addition, D2C detects 38 inconsistencies within documents, including 28 that are fixed or confirmed after we report them.

READ FULL TEXT

page 1

page 2

page 3

page 4

research
06/05/2023

Security Knowledge-Guided Fuzzing of Deep Learning Libraries

There have been many Deep Learning (DL) fuzzers proposed in the literatu...
research
05/29/2023

ACETest: Automated Constraint Extraction for Testing Deep Learning Operators

Deep learning (DL) applications are prevalent nowadays as they can help ...
research
08/02/2022

MEMO: Coverage-guided Model Generation For Deep Learning Library Testing

Recent deep learning (DL) applications are mostly built on top of DL lib...
research
07/01/2023

Automatic Unit Test Generation for Deep Learning Frameworks based on API Knowledge

Many automatic unit test generation tools that can generate unit test ca...
research
12/08/2022

SkipFuzz: Active Learning-based Input Selection for Fuzzing Deep Learning Libraries

Many modern software systems are enabled by deep learning libraries such...
research
09/07/2023

HOPPER: Interpretative Fuzzing for Libraries

Despite the fact that the state-of-the-art fuzzers can generate inputs e...
research
07/11/2023

ConFL: Constraint-guided Fuzzing for Machine Learning Framework

As machine learning gains prominence in various sectors of society for a...

Please sign up or login with your details

Forgot password? Click here to reset