{"id":20663684,"url":"https://github.com/vita-group/double-win-lth","last_synced_at":"2025-04-19T15:55:58.930Z","repository":{"id":107045823,"uuid":"495132504","full_name":"VITA-Group/Double-Win-LTH","owner":"VITA-Group","description":"[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","archived":false,"fork":false,"pushed_at":"2022-05-30T04:02:35.000Z","size":315,"stargazers_count":9,"open_issues_count":0,"forks_count":0,"subscribers_count":9,"default_branch":"main","last_synced_at":"2025-03-29T09:42:01.585Z","etag":null,"topics":["adversarial-robustness","data-efficient","generalization","lottery-ticket-hypothesis","pretraining","robust-pretraining","sparsity","transfer-learning"],"latest_commit_sha":null,"homepage":"","language":"Python","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"mit","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/VITA-Group.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":"LICENSE","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null}},"created_at":"2022-05-22T17:42:10.000Z","updated_at":"2023-03-03T16:37:27.000Z","dependencies_parsed_at":"2023-04-13T15:47:08.324Z","dependency_job_id":null,"html_url":"https://github.com/VITA-Group/Double-Win-LTH","commit_stats":null,"previous_names":[],"tags_count":0,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/VITA-Group%2FDouble-Win-LTH","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/VITA-Group%2FDouble-Win-LTH/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/VITA-Group%2FDouble-Win-LTH/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/VITA-Group%2FDouble-Win-LTH/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/VITA-Group","download_url":"https://codeload.github.com/VITA-Group/Double-Win-LTH/tar.gz/refs/heads/main","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":249731218,"owners_count":21317341,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":["adversarial-robustness","data-efficient","generalization","lottery-ticket-hypothesis","pretraining","robust-pretraining","sparsity","transfer-learning"],"created_at":"2024-11-16T19:19:17.158Z","updated_at":"2025-04-19T15:55:58.925Z","avatar_url":"https://github.com/VITA-Group.png","language":"Python","funding_links":[],"categories":[],"sub_categories":[],"readme":"# Data-Efficient Double-Win Lottery Tickets from Robust Pre-training\n\n[![License: MIT](https://img.shields.io/badge/License-MIT-green.svg)](https://opensource.org/licenses/MIT)\n\nCodes for this paper **Data-Efficient Double-Win Lottery Tickets from Robust Pre-training** [ICML 2022]\n\nTianlong Chen, Zhenyu Zhang, Sijia Liu, Yang Zhang, Shiyu Chang, Zhangyang Wang\n\n\n\n## Overview\n\nPre-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. \n\nHowever, 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. \n\nFurthermore, 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.\n\n\u003cimg src = \"figs/Teaser.png\" align = \"center\" width=\"50%\" hight=\"60%\"\u003e\n\n\n\n## Prerequisites\n\n```\npytorch == 1.5.1\ntorchvision == 0.6.1\nadvertorch == 0.2.3\n```\n\n## Usage\n\n##### Iterative Magnitude Pruning (IMP) on pretraining tasks (ImageNet classification)\n\n```\n# IMP with adversarial training\nbash script/imp_pretrain/imp_adv.sh [init-pretrained-weight] [save-direction] [data-direction]\n\n# IMP with standard training\nbash script/imp_pretrain/imp_std.sh [init-pretrained-weight] [save-direction] [data-direction]\n```\n\n##### Downstream training with located sparse subnetworks\n\n```\n# Adversarail training on CIFAR-10/100\nbash script/train_downstream/adv_cifar.sh [dataset] [init-pretrained-weight] [save-direction] [located sparse structures]\n\n# Adversarail training on SVHN\nbash script/train_downstream/adv_svhn.sh [init-pretrained-weight] [save-direction] [located sparse structures]\n\n# Standard training\nbash script/std.sh [dataset] [init-pretrained-weight] [save-direction] [located sparse structures]\n```\n\n## Citation\n\n```\nTBD\n```\n\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fvita-group%2Fdouble-win-lth","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fvita-group%2Fdouble-win-lth","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fvita-group%2Fdouble-win-lth/lists"}