Skip to content

Focuses on parameter isolation methods for continual learning, where each task uses separate parameter masks or subnetworks to prevent forgetting. Implements Hard Attention to the Task (HAT), Supermask Superposition (SupSup), and Piggyback, with visualization tools and metrics for task overlap and capacity usage.

Notifications You must be signed in to change notification settings

Fatemerjn/Parameter-Isolation-Continual-Learning-PyTorch

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

5 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Gradient-Sparse LoRA

Overview

  • Adapts Residual Networks with LoRA adapters for continual learning on Split CIFAR-100.
  • Introduces gradient sparsification masks to keep LoRA updates compact.
  • Provides ready-to-run executables for continual-training and unlearning workflows.

Layout

  • src/gs_lora/ – installable package with datasets, models, LoRA utilities, and training loops.
    • training/continual.py – Gradient-sparse continual learning routine.
    • training/unlearning.py – Experience-replay based unlearning demo.
  • notebooks/ – exploratory Jupyter notebooks (continual_learning_sanity_check.ipynb).
  • data/ – optional local copy of CIFAR-100 (downloaded automatically if absent).
  • results/ – saved accuracy traces from previous experiments.
  • tests/ – smoke tests that ensure the package stays importable.
  • requirements.txt / pyproject.toml – dependency declarations for both pip and Poetry.

Quickstart

  1. python -m venv .venv && source .venv/bin/activate
  2. pip install -r requirements.txt
  3. export PYTHONPATH=src
  4. Continual run: python -m gs_lora.run_gslora_cl

Unlearning demo

export PYTHONPATH=src
python -m gs_lora.unlearning_demo

Data

  • Scripts default to ./data/cifar-100-python; keep existing assets here or update the root argument in the loaders.
  • To conserve space you can point multiple repositories to a shared dataset by symlinking data/.

Next Steps

  • Tweak LoRA rank, sparsity, and scheduling via gs_lora.training.continual.
  • Extend LoRA adapters or masking strategies inside gs_lora.lora.

About

Focuses on parameter isolation methods for continual learning, where each task uses separate parameter masks or subnetworks to prevent forgetting. Implements Hard Attention to the Task (HAT), Supermask Superposition (SupSup), and Piggyback, with visualization tools and metrics for task overlap and capacity usage.

Topics

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages