Git Product home page Git Product logo

deeprel's Introduction

DeepREL

This is the artifact of the research paper, "Fuzzing Deep-Learning Libraries via Automated Relational API Inference", at ESEC/FSE 2022.

About

DeepREL is a fully automated end-to-end relational API inference and fuzzing technique for DL libraries, which 1) automatically infers potential API relations based on API syntactic/semantic information, 2) synthesizes concrete test programs for invoking relational APIs, 3) validates the inferred relational APIs via representative test inputs, and finally 4) performs fuzzing on the verified relational APIs to find potential inconsistencies.

This is the DeepREL's implementation for testing PyTorch and TensorFlow.

Reproduce Bugs

DeepREL has detected 162 bugs in total for PyTorch and TensorFlow. Notably, RelFuzz was able to detect 13.5% of the high-priority bugs for the entire PyTorch issue-tracking system since our first PyTorch bug report.

We provide a list of confirmed bug reports on PyTorch and TensorFlow. We also provide a Colab notebook to reproduce all 23 high-priority bugs for PyTorch Open In Colab.

Getting Started

1. Requirements

  1. Our testing framework leverages MongoDB so you should install and run MongoDB first.
    • Run the command ulimit -n 200000 to adjust the limit that the system resources a process may use. You can see this document for more details.
  2. You should check our dependent python libraries in requirements.txt and run pip install -r requirements.txt to install them
  3. Python version >= 3.9.0 (It must support f-string.)

2. Setting Up with Dataset

Run the following commands to load the database.

mongorestore -h 127.0.0.1:27017 --db tf dump/tf/
mongorestore -h 127.0.0.1:27017 --db torch dump/torch/

3. Run

After finishing above steps, run the following command to start RelFuzz to test PyTorch

cd pytorch/src && python DeepREL.py

Run the following command to start RelFuzz to test TensorFlow

cd tensorflow/src && python DeepREL.py

4. Configuration

There are some hyper-parameters in DeepREL and they could be easily configured by modifying {pytorch, tensorflow}/src/config/demo.conf:

  1. MongoDB database configuration.
[mongodb]
# your-mongodb-server
host = 127.0.0.1
# mongodb port
port = 27017 
# name of pytorch database
torch_database = torch
# name of tensorflow database
tf_database = tf
  1. DeepREL configuration
[DeepREL]
test_number = 1000
top_k = 10
iteration = 10

deeprel's People

Contributors

yangchenyuan avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.