Skip to main content
QUICK REVIEW

[Paper Review] RanPAC: Random Projections and Pre-trained Models for Continual Learning

Mark D. McDonnell, Dong Gong|arXiv (Cornell University)|Jul 5, 2023
Domain Adaptation and Few-Shot LearningComputer Science22 citations
TL;DR

RanPAC introduces a training-free random projection layer between frozen pre-trained model features and a class-prototype output head, improving continual learning by decorrelating prototypes and using Gram-matrix based calibration without rehearsal memory.

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.

Motivation & Objective

  • Explore whether training-free random projections can improve class-prototype based continual learning with pre-trained models.
  • Show that decorrelating class prototypes reduces distribution shift between tasks.
  • Demonstrate compatibility with parameter-efficient transfer learning (PETL) and first-session adaptation.
  • Evaluate performance on class-incremental and domain-incremental benchmarks without rehearsal memory.

Proposed method

  • Insert a frozen random projection (RP) layer with nonlinear activation between the pre-trained feature representations and the CP-based output head.
  • Use a Gram matrix-based calibration with ridge regression to compute class scores, updating G and C incrementally across tasks.
  • Decorrelate class prototypes to reduce inter-class correlations and improve separability.
  • Combine RP with PETL methods trained on the first session and then frozen, to bridge domain gaps.
  • Maintain training efficiency by freezing RP weights and using closed-form ridge-like solution for final scoring (G + lambda I)^{-1} * C.

Experimental results

Research questions

  • RQ1Does a frozen randomized projection layer improve linear separability of class prototypes in continual learning with pre-trained models?
  • RQ2How does decorrelation of class prototypes affect calibration and accuracy in CP-based CL under domain and class increments?
  • RQ3Can RP plus PETL achieve rehearsal-free performance close to or surpassing joint training on diverse CL benchmarks?
  • RQ4Is RanPAC compatible with different backbones (ViT, ResNet, CLIP) and PETL methods across CL scenarios?

Key findings

  • RanPAC yields substantial error-rate reductions (11%–28% with PETL) over CP baselines on class-incremental benchmarks.
  • For ViT-B/16 models, RanPAC achieves the highest rehearsal-free accuracies on several class-incremental and domain-incremental datasets compared to prior CP methods.
  • Using a nonlinear RP layer with sufficient dimensionality (M) and nonlinearity significantly improves class separability and final accuracy.
  • Decorrelation of class prototypes via the Gram-based approach reduces inter-class correlations and aligns CPs with a jointly trained linear probe; this enhances calibration.
  • RanPAC is effective across CL scenarios (class-incremental, domain-incremental, task-agnostic) and is compatible with arbitrary feature vectors (ViT, ResNet, CLIP).
  • Compared to CPU-intensive or memory-heavy rehearsal-based methods, RanPAC achieves strong performance without keeping past data.

Read this paper

Open the full text in the Nubint reader and ask about any passage as you read.

Read this paper on Nubint

This review was generated by AI from the original paper. Please check the paper before citing it.