RanPAC: Random Projections and Pre-trained Models for Continual Learning

Mark D. McDonnell, Dong Gong, Amin Parveneh, Ehsan Abbasnejad, Anton van den Hengel
7/5/2023
cs.LGcs.CV

Official code: aimagelab/mammoth (841 stars, MIT, PyTorch, last commit 2026-04-20). 1 more implementation below.

Abstract

Continual learning (CL) aims to incrementally learn different tasks (such as classification) in a non-stationary data stream without forgetting old ones. Most CL works focus on tackling catastrophic forgetting under a learning-from-scratch paradigm. However, with the increasing prominence of foundation models, pre-trained models equipped with informative representations have become available for various downstream requirements. Several CL methods based on pre-trained models have been explored, either utilizing pre-extracted features directly (which makes bridging distribution gaps challenging) or incorporating adaptors (which may be subject to forgetting). In this paper, we propose a concise and effective approach for CL with pre-trained models. Given that forgetting occurs during parameter updating, we contemplate an alternative approach that exploits training-free random projectors and class-prototype accumulation, which thus bypasses the issue. Specifically, we inject a frozen Random Projection layer with nonlinear activation between the pre-trained model's feature representations and output head, which captures interactions between features with expanded dimensionality, providing enhanced linear separability for class-prototype-based CL. We also demonstrate the importance of decorrelating the class-prototypes to reduce the distribution disparity when using pre-trained representations. These techniques prove to be effective and circumvent the problem of forgetting for both class- and domain-incremental continual learning. Compared to previous methods applied to pre-trained ViT-B/16 models, we reduce final error rates by between 20% and 62% on seven class-incremental benchmarks, despite not using any rehearsal memory. We conclude that the full potential of pre-trained models for simple, effective, and fast CL has not hitherto been fully tapped. Code is at github.com/RanPAC/RanPAC.

View on arXivView PDF

Code Implementations(2)

PyTorchMIT

An Extendible (General) Continual Learning Framework based on Pytorch - official codebase of Dark Experience for General Continual Learning

841157PythonOct 5, 20206 months agoMIT
continual-learningdark-experience-replaydeep-learningderexperience-replay+3 more
MIT

RanPAC: Random Projections and Pre-trained Models for Continual Learning - Official code repository for NeurIPS 2023 Published Paper

597PythonMay 17, 20231 years agoMIT
continual-learningdomain-incremental-learningrandom-weights

Similar Papers

Cite this paper

@article{mcdonnell2023ranpac,
  title  = {RanPAC: Random Projections and Pre-trained Models for Continual Learning},
  author = {Mark D. McDonnell and Dong Gong and Amin Parveneh and Ehsan Abbasnejad and Anton van den Hengel},
  year   = {2023},
  eprint = {2307.02251},
  archivePrefix = {arXiv},
  url    = {http://arxiv.org/abs/2307.02251v3},
  journal = {NEURIPS 2023 2023}
}

Add a badge to your README

Shows whether official code is linked for this paper.

Code of Paper badge
[![Code of Paper](https://codeofpaper.com/badge/2307.02251.svg)](https://codeofpaper.com/paper/2307.02251)

Discussion