Git Product home page Git Product logo

yizeng623 / universal_pert_cert Goto Github PK

View Code? Open in Web Editor NEW

This project forked from reds-lab/universal_pert_cert

0.0 0.0 0.0 0 B

This repo is the official implementation of the ICLR'23 paper "Towards Robustness Certification Against Universal Perturbations." We calculate the certified robustness against universal perturbations (UAP/ Backdoor) given a trained model.

License: MIT License

Python 58.11% Jupyter Notebook 41.89%

universal_pert_cert's Introduction

Towards Robustness Certification Against Universal Perturbations

Python 3.9 Pytorch 1.8.1 CUDA 10.2

This repository is the official implementation of the ICLR'23 paper "Towards Robustness Certification Against Universal Perturbations". Our goal is to provide the first practical attempt for researchers and practitioners to evaluate the robustness of their models against universal perturbations, especially to universal adversarial perturbations (UAPs) and $l_{\infty}$-norm-bounded backdoors.

Overview

The code in this repository implements linear bounds calculated using the existing method, auto_LiRPA, to extend linear bounds and compute the certified UP robustness for a batch of data given a trained model. The calculation of certified robustness can help identify potential weaknesses in the models and inform steps to improve their robustness.

TO-DO

  • Example model weights (can be downloaded from Link2model_weights)
  • Datasets to be placed in a ./data folder

Requirements

  • Python >= 3.9.6
  • PyTorch >= 1.8.1+cu102
  • TorchVisison >= 0.9.1+cu102
  • Gurobipy >= 9.5.1
  • auto_LiRPA

Usage

  1. Download the example model weights and extract the ./model_weights into the same folder as the code.
  2. Create a ./data folder and place the datasets inside.
  3. You can also load min_correct_with_eps from certi_util.py to calculate the certified UP robustness for your trained model and data.

Conclusion

We hope that this repository will serve as a valuable resource for the robustness certification community. By providing a tool to calculate the certified UP robustness, we aim to promote the development of more secure and robust machine learning models.

Special thanks to...

Stargazers repo roster for @ruoxi-jia-group/Universal_Pert_Cert

universal_pert_cert's People

Contributors

yizeng623 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.