{"id":13738251,"url":"https://github.com/VITA-Group/Lifelong-Learning-LTH","last_synced_at":"2025-05-08T16:32:56.579Z","repository":{"id":107046196,"uuid":"329192101","full_name":"VITA-Group/Lifelong-Learning-LTH","owner":"VITA-Group","description":"[ICLR 2021] \"Long Live the Lottery: The Existence of Winning Tickets in Lifelong Learning\" by Tianlong Chen*, Zhenyu Zhang*, Sijia Liu, Shiyu Chang, Zhangyang Wang","archived":false,"fork":false,"pushed_at":"2021-12-30T10:54:30.000Z","size":498,"stargazers_count":25,"open_issues_count":1,"forks_count":4,"subscribers_count":9,"default_branch":"main","last_synced_at":"2025-04-19T18:51:33.435Z","etag":null,"topics":["continue-learning","lifelong-learning","lottery-ticket-hypothesis","lth","winning-tickets"],"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}},"created_at":"2021-01-13T04:20:47.000Z","updated_at":"2025-03-11T09:57:13.000Z","dependencies_parsed_at":"2023-04-13T15:47:09.592Z","dependency_job_id":null,"html_url":"https://github.com/VITA-Group/Lifelong-Learning-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%2FLifelong-Learning-LTH","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/VITA-Group%2FLifelong-Learning-LTH/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/VITA-Group%2FLifelong-Learning-LTH/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/VITA-Group%2FLifelong-Learning-LTH/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/VITA-Group","download_url":"https://codeload.github.com/VITA-Group/Lifelong-Learning-LTH/tar.gz/refs/heads/main","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":253105397,"owners_count":21855019,"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":["continue-learning","lifelong-learning","lottery-ticket-hypothesis","lth","winning-tickets"],"created_at":"2024-08-03T03:02:15.922Z","updated_at":"2025-05-08T16:32:56.235Z","avatar_url":"https://github.com/VITA-Group.png","language":"Python","funding_links":[],"categories":["Python"],"sub_categories":[],"readme":"# Long Live the Lottery: The Existence of Winning Tickets in Lifelong Learning\n\n[![License: MIT](https://img.shields.io/badge/License-MIT-green.svg)](https://opensource.org/licenses/MIT)\n\nCode for this paper [Long Live the Lottery: The Existence of Winning Tickets in Lifelong Learning](https://openreview.net/forum?id=LXMSvPmsm0g)\n\nTianlong Chen\\*, Zhenyu Zhang\\*, Sijia Liu, Shiyu Chang, Zhangyang Wang\n\n## Overview\n\nWe extend the lottery ticket hypothesis from one-shot task learning to class incremental learning scenario and propose top-down and bottom-up pruning strategies to identify winning tickets, which we call lifelong Tickets.\n\n- **Top-Down (TD) Pruning**\n\nWe modify the iterative magnitude pruning approach and assign the pruning budget to each task based on an heuristic curriculum schedule.\n\n![](https://github.com/VITA-Group/Lifelong-Learning-LTH/blob/main/Figs/TD.png)\n\n- **Bottom-Up (BU) Pruning**\n\nTo tackle the greedy nature of Top-down pruning method, we propose Bottom-Up pruning. Once the current sparse network is too heavily pruned and has no more capacity for new tasks, BU pruning can make the sparse network to re-grow from the current sparsity.\n\n![](https://github.com/VITA-Group/Lifelong-Learning-LTH/blob/main/Figs/BU.png)\n\n## Experiment Results\n\nclass incremental learning with Top-Down pruning and Bottom-Up pruning\n\n![](https://github.com/VITA-Group/Lifelong-Learning-LTH/blob/main/Figs/result.png)\n\n## Prerequisites\n\npytorch \u003e= 1.4\n\ntorchvision\n\n## Usage\n\n#### Dataset:\n\nWe reorganized the CIFAR10, CIFAR100 dataset into a dictionary, {key: value}, where the key is for labels, from 0-9 of CIFAR10 and values are the images. And the unlabel images are sampled from 80 Million Tiny Images dataset, which can be download from [CIL_data](https://www.dropbox.com/sh/hrugy5qb7y80tyl/AAB9THdb7-Kk_I-RIFsL_ywxa?dl=0) \n\n#### Pretrained models:\n\nThe pretrained models can be found at [models](https://www.dropbox.com/sh/4jzu4g83wxn9tgb/AADlIQaAAqTR6MpYj6F1bE23a?dl=0), which contains:\n\n- BU_ticket.pt # winning tickets found by Bottom-Up pruning method on CIFAR10\n- full_model.pt # full model on CIFAR10\n\n#### Training:\n\n```\npython -u main_TD.py # Top-Down Pruning\npython -u main_BU.py # Bottom-Up Pruning\npython -u main_CIL.py # Basic Class Incremental Learning\npython -u main_train.py \\\n\t--weight [init_weight] \\\n\t--mask [init_sparse_structure] \\\n\t--state [task ID in CIL] # re-train the subnetwork\n```\n\n#### **Testing:**\n\n```\npython -u test.py --pretrained BU_ticket.pt --pruned --state [taskID] # test prune model\npython -u test.py --pretrained full_model.pt --state [taskID] # test full model\n```\n\n## Citation\n\n```\n@inproceedings{\n\tchen2021long,\n\ttitle={Long Live the Lottery: The Existence of Winning Tickets in Lifelong Learning},\n\tauthor={Tianlong Chen and Zhenyu Zhang and Sijia Liu and Shiyu Chang and Zhangyang Wang},\n\tbooktitle={International Conference on Learning Representations},\n\tyear={2021},\n\turl={https://openreview.net/forum?id=LXMSvPmsm0g}\n}\n```\n\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2FVITA-Group%2FLifelong-Learning-LTH","html_url":"https://awesome.ecosyste.ms/projects/github.com%2FVITA-Group%2FLifelong-Learning-LTH","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2FVITA-Group%2FLifelong-Learning-LTH/lists"}