YAML Metadata Warning:empty or missing yaml metadata in repo card

Check out the documentation for more information.

LibContinual: Make Continual Learning Easy

Introduction

arXiv

LibContinual is an open-source continual learning toolbox based on PyTorch. The framework currently supports PyTorch 1.13+ (compatibility with earlier versions not fully guaranteed) and provides comprehensive implementations of state-of-the-art continual learning algorithms.

Supported Methods

Conventional methods

Foundation model based methods

  • L2P (CVPR 2022): Learning to Prompt for Continual Learning.
  • DualPrompt (ECCV 2022): Complementary Prompting for Rehearsal-free Continual Learning.
  • CodaPrompt (CVPR 2023): COntinual Decomposed Attention-based Prompting for Rehearsal-Free Continual Learning.
  • InfLoRA (CVPR 2024): Interference-Free Low-Rank Adaptation for Continual Learning.
  • MoE_Adapter4CL (CVPR 2024): Boosting Continual Learning of Vision-Language Models via Mixture-of-Experts Adapters.
  • RAPF (ECCV 2024): Class-Incremental Learning with CLIP: Adaptive Representation Adjustment and Parameter Fusion.
  • SD_LoRA (ICLR 2025): Scalable Decoupled Low-Rank Adaptation for Class Incremental Learning
  • LoRA_Sub_DRS (CVPR 2025): LoRA Subtraction for Drift-Resistant Space in Exemplar-Free Continual Learning
  • CL-LoRA (CVPR 2025): Continual Low-Rank Adaptation for Rehearsal-Free Class-Incremental Learning
  • Fly-CL (ICLR 2026): A Fly-Inspired Framework for Efficient Decorrelation in Pre-trained Model-based Continual Representation Learning. Installation

    Please refer to install.md
    Complete tutorials can be found at ./docs

    Datasets

    After the dataset is downloaded, please extract the compressed file to the specified path.

    unzip cifar100.zip -d /path/to/your/dataset
    

    Set the data_root in .yaml:

    data_root: /path/to/your/dataset
    

    To add a custom dataset, please refer to dataset.md.

    Getting Started

    Once you have completed the "Installation" and "Datasets" sections, you can now proceed to demonstrate how to use the "LibContinual" framework with the LUCIR method.

    • Step1: Configure the parameters in the ./config/lucir.yaml file. Please refer to config.md for the meanings of each parameter.
    • Step2: Run code python run_trainer.py --config lucir.yaml
    • Step3: After the training is completed, the log files will be saved in the path specified by the save_path parameter.

    Benchmarks

    We adopt standardized evaluation metrics from continual learning literature. Given T tasks where $R_{t,i}$ represents the accuracy of model after training on task $t$ when tested on task $i$:

    Evaluation Metrics

    1. Last Average Accuracy

    AccT=RT,0∼T(1) Acc_T=R_{T, {0\sim T}} \quad (1)

    2. Backward Transfer (BWT)

    BWTT=βˆ‘i=3Tβˆ‘j=1iβˆ’2Ri,jβˆ’Rj,jT(Tβˆ’1)/2(2) BWT_T = \frac{\sum_{i=3}^T\sum_{j=1}^{i-2}R_{i,j}-R{j,j}}{T(T-1)/2} \quad (2)

    3. Forgetting

    FrgtT=βˆ‘j=1Tβˆ’2RTβˆ’1,jβˆ’Rj,jTβˆ’1(3) Frgt_T = \frac{\sum_{j=1}^{T-2}R_{T-1,j}-R_{j,j}}{T-1} \quad (3)

    Equivalent to Positive BwT in "new metrics for Continual Learning"

    4. Overall Average Accuracy

    AccTβ€Ύ=1Tβˆ‘t=1T(1tβˆ‘i=1tRt,i)(4) \overline{Acc_T}=\frac{1}{T}\sum_{t=1}^T(\frac{1}{t}\sum_{i=1}^t R_{t,i}) \quad (4)

    Acknowledgement

    LibContinual is an open source project designed to help continual learning researchers quickly understand the classic methods and code structures. We welcome other contributors to use this framework to implement their own or other impressive methods and add them to LibContinual. This library can only be used for academic research. We welcome any feedback during using LibContinual and will try our best to continually improve the library. Special thanks to the authors of FACIL and PyCIL for their inspiration on framework design.

    We have referenced useful modules from these repositories in our work. We deeply appreciate the authors of these repositories.

    License

    This project is licensed under the MIT License. See LICENSE for more details.

Downloads last month

-

Downloads are not tracked for this model. How to track
Inference Providers NEW
This model isn't deployed by any Inference Provider. πŸ™‹ Ask for provider support

Papers for RL-MIND/LibContinual