Giter VIP home page Giter VIP logo

vita-group / double-win-lth Goto Github PK

View Code? Open in Web Editor NEW
9.0 9.0 0.0 315 KB

[ICML 2022] "Data-Efficient Double-Win Lottery Tickets from Robust Pre-training" by Tianlong Chen, Zhenyu Zhang, Sijia Liu, Yang Zhang, Shiyu Chang, Zhangyang Wang

License: MIT License

Python 98.58% Shell 1.42%
adversarial-robustness data-efficient generalization lottery-ticket-hypothesis pretraining sparsity transfer-learning robust-pretraining

double-win-lth's Introduction

Data-Efficient Double-Win Lottery Tickets from Robust Pre-training

License: MIT

Codes for this paper Data-Efficient Double-Win Lottery Tickets from Robust Pre-training [ICML 2022]

Tianlong Chen, Zhenyu Zhang, Sijia Liu, Yang Zhang, Shiyu Chang, Zhangyang Wang

Overview

Pre-training serves as a broadly adopted starting point for transfer learning on various downstream tasks. Recent investigations of lottery tickets hypothesis (LTH) demonstrate such enormous pre-trained models can be replaced by extremely sparse subnetworks (a.k.a. matching subnetworks) without sacrificing transferability.

However, practical security-crucial applications usually pose more challenging requirements beyond standard transfer, which also demand these subnetworks to overcome adversarial vulnerability. In this paper, we formulate a more rigorous concept, Double-Win Lottery Tickets, in which a located subnetwork from a pre-trained model can be independently transferred on diverse downstream tasks, to reach BOTH the same standard and robust generalization, under BOTH standard and adversarial training regimes, as the full pre-trained model can do. We comprehensively examine various pre-training mechanisms and find that robust pretraining tends to craft sparser double-win lottery tickets with superior performance over the standard counterparts.

Furthermore, we observe the obtained double-win lottery tickets can be more data-efficient to transfer, under practical data-limited (e.g., 1% and 10%) downstream schemes. Our results show that the benefits from robust pre-training are amplified by the lottery ticket scheme, as well as the data-limited transfer setting.

Prerequisites

pytorch == 1.5.1
torchvision == 0.6.1
advertorch == 0.2.3

Usage

Iterative Magnitude Pruning (IMP) on pretraining tasks (ImageNet classification)
# IMP with adversarial training
bash script/imp_pretrain/imp_adv.sh [init-pretrained-weight] [save-direction] [data-direction]

# IMP with standard training
bash script/imp_pretrain/imp_std.sh [init-pretrained-weight] [save-direction] [data-direction]
Downstream training with located sparse subnetworks
# Adversarail training on CIFAR-10/100
bash script/train_downstream/adv_cifar.sh [dataset] [init-pretrained-weight] [save-direction] [located sparse structures]

# Adversarail training on SVHN
bash script/train_downstream/adv_svhn.sh [init-pretrained-weight] [save-direction] [located sparse structures]

# Standard training
bash script/std.sh [dataset] [init-pretrained-weight] [save-direction] [located sparse structures]

Citation

TBD

double-win-lth's People

Contributors

kyriection avatar tianlong-chen avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

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