All Projects → kamwoh → DeepIPR

kamwoh / DeepIPR

Licence: other
This is the code repo of our NeurIPS2019 work that proposes novel passport-based DNN ownership verification schemes, i.e. we embed passport layer into various deep learning architectures (e.g. AlexNet, ResNet) for Intellectual Property Right (IPR) protection.

Programming Languages

python
139335 projects - #7 most used programming language

Projects that are alternatives of or similar to DeepIPR

Laravel Passport Social Grant
🔒 API authentication via social networks for your Laravel application
Stars: ✭ 142 (+125.4%)
Mutual labels:  passport
Next Postgres Sequelize
React 16.8.4 + NextJS 8.0.3 + Emotion + Sequelize 5/Postgres + Passport Local Auth + Google App Engine or Heroku Deployment
Stars: ✭ 176 (+179.37%)
Mutual labels:  passport
Mern Passport
A boilerplate example of using passport.js for authenticating a MERN application
Stars: ✭ 214 (+239.68%)
Mutual labels:  passport
Passport Vkontakte
VK.com authentication strategy for Passport and Node.js
Stars: ✭ 149 (+136.51%)
Mutual labels:  passport
Lad
👦 Lad is the best Node.js framework. Made by a former Express TC and Koa team member.
Stars: ✭ 2,112 (+3252.38%)
Mutual labels:  passport
Saas
Build your own SaaS business with SaaS boilerplate. Productive stack: React, Material-UI, Next, MobX, WebSockets, Express, Node, Mongoose, MongoDB. Written with TypeScript.
Stars: ✭ 2,720 (+4217.46%)
Mutual labels:  passport
Nodejs Notes App
A web app to create notes, and save it using Mongodb, plus authentication using passport.
Stars: ✭ 130 (+106.35%)
Mutual labels:  passport
egg-passport-local
wrap passport-local strategy for egg-passport
Stars: ✭ 44 (-30.16%)
Mutual labels:  passport
Lighthouse Graphql Passport Auth
Add GraphQL mutations to get tokens from passport for https://lighthouse-php.com/
Stars: ✭ 173 (+174.6%)
Mutual labels:  passport
Passport
Passport module for Nest framework (node.js) 🔑
Stars: ✭ 211 (+234.92%)
Mutual labels:  passport
Larapush
artisan push - Deploy your codebase into your web server with one Laravel artisan command and no SSH needed!
Stars: ✭ 150 (+138.1%)
Mutual labels:  passport
Ecommerce Site Template
A beautiful e-commerce template powered by React, Redux and other modern web tech.
Stars: ✭ 167 (+165.08%)
Mutual labels:  passport
Login With
Stateless login-with microservice for OAuth
Stars: ✭ 2,301 (+3552.38%)
Mutual labels:  passport
Node Express Mongoose Passport Jwt Rest Api Auth
Node, express, mongoose, passport and JWT REST API authentication example
Stars: ✭ 146 (+131.75%)
Mutual labels:  passport
Builderbook
Open source web application to learn JS stack: React, Material-UI, Next.js, Node.js, Express.js, Mongoose, MongoDB database.
Stars: ✭ 3,015 (+4685.71%)
Mutual labels:  passport
Laravel Authz
An authorization library that supports access control models like ACL, RBAC, ABAC in Laravel.
Stars: ✭ 136 (+115.87%)
Mutual labels:  passport
Koa Passport Mongoose Graphql
Koa 2 server with Passport + Mongoose + GraphQL
Stars: ✭ 190 (+201.59%)
Mutual labels:  passport
vue-nuxt-passport-bulma-express-boiler
A Vue+Vuex starter with Nuxt scaffolding, Bulma styling, and Express backend.
Stars: ✭ 21 (-66.67%)
Mutual labels:  passport
core
UBIC: The crypto currency providing UBI for the masses using the E-Passport
Stars: ✭ 37 (-41.27%)
Mutual labels:  passport
Go Guardian
Go-Guardian is a golang library that provides a simple, clean, and idiomatic way to create powerful modern API and web authentication.
Stars: ✭ 204 (+223.81%)
Mutual labels:  passport

Deep Network IP Protection

Project | ArXiv | PDF

Official pytorch implementation of the paper:

- DeepIPR: Deep Neural Network Ownership Verification with Passports

TPAMI 2022

- Rethinking Deep Neural Network Ownership Verification: Embedding Passports to Defeat Ambiguity Attacks

NeurIPS 2019

(Released on September 16, 2019)

Updated on September 25, 2022

Updates

  1. Fix bugs
  2. Added training and attack bash scripts (see training.sh and attacking.sh)
  3. Added flipping attack (see flip_attack.py)
  4. Added ImageNet experiment
  5. Our framework on GAN IP protection is accepted in CVPR 2021, see here.
  6. Our framework on RNN IP protection is accepted in AACL IJCNLP 2022, see here.
  7. Our framework on Multi-modal IP protection is accepted in Pattern Recognition 2022, see here.

Description

With the rapid development of deep neural networks (DNN), there emerges an urgent need to protect the trained DNN models from being illegally copied, redistributed, or abused without respecting the intellectual properties of legitimate owners. This work proposes novel passport-based DNN ownership verification schemes which are both robust to network modifications and resilient to ambiguity attacks. The gist of embedding digital passports is to design and train DNN models in a way such that, the DNN model performance of an original task will be significantly deteriorated due to forged passports (see Figure 1). In other words genuine passports are not only verified by looking for predefined signatures, but also reasserted by the unyielding DNN model performances.

Figure 1: Example of ResNet performance on CIFAR10 when (left) Random Attack and (right) Ambiguity Attack

How to run

For compability issue, please run the code using python 3.6 and pytorch 1.2. Also, please see requirements.txt or Dockerfile to check out the environment.

If you wish to use a real image as the passport, please ensure that you have a pre-trained model before training the passport layer.

To see more arguments, please run the script with --help.

The example below is running on default arguments.

To train a normal model (without passport)

Skip --train-passport as follow:

python train_v1.py

To train a V1 model (scheme 1 passport)

Run --train-passport as follow:

python train_v1.py --train-passport --pretrained-path path/to/pretrained.pth

To train a V2 model (scheme 2 passport)

Skip --train-private, it is true by default.

python train_v23.py --pretrained-path path/to/pretrained.pth

To train a V3 model (scheme 3 passport)

Run --train-backdoor as follow:

python train_v23.py --train-backdoor --pretrained-path path/to/pretrained.pth

Dataset

Most of the datasets will be automatically downloaded except the trigger set data.

To download the default trigger set data, kindly refer to https://github.com/adiyoss/WatermarkNN

Also, please refer to dataset.py to understand how the data are loaded.

Attack

passport_attack_1.py, passport_attack_2.py, and passport_attack_3.py are the scripts to run fake attack 1, 2 and 3 respectively, as mentioned in our paper.

Please refer to --help on how to setup the arguments.

How to embed passport & signature into a desired layer

All passport configs are stored in passport_configs/

To set a passport layer for Alexnet or ResNet18, simply changing false to true or a string.

If string is deployed as the signature, please make sure that the length of the string is less than the number of channels in the specific layer.

For example, a layer with 256 channels, so the maximum will be 256-bit === 32 ascii characters are allowed. If the signature is less than 32 characters, the remaining bits will be set randomly.

The example below is AlexNet with the last 3 layers as the passport layer, i.e we embed random signature into the 4th and 5th layer and embed this is my signature into the last layer (6th).

{
  "0": false,
  "2": false,
  "4": true,
  "5": true,
  "6": "this is my signature"
}

For passport in our experiments, we randomly choose 20 images from the test data. Passports in the intermediate layer will be the activation map of 20 images computed from pretrained model.

Citation

If you find this work useful for your research, please cite

@article{Deepipr,
  title={DeepIPR: Deep Neural Network Ownership Verification with Passports},
  author={Fan, Lixin and Ng, Kam Woh and Chan, Chee Seng and Qiang, Yang},
  journal={IEEE Transactions on Pattern Analysis and Machine Intelligence},
  year={2022},
  volume={44},
  number={10},
  pages={6122-6139},
  doi = {10.1109/TPAMI.2021.3088846}
}

Feedback

Suggestions and opinions on this work (both positive and negative) are greatly welcomed. Please contact the authors by sending an email to lixinfan at webank.com or kamwoh at gmail.com or cs.chan at um.edu.my.

License and Copyright

The project is open source under BSD-3 license (see the LICENSE file).

©2019 Webank and Universiti Malaya.

Note that the project description data, including the texts, logos, images, and/or trademarks, for each open source project belongs to its rightful owner. If you wish to add or remove any projects, please contact us at [email protected].