All models

RanPAC

A pre-trained ViT-B/16 with a frozen random projection layer and a class-prototype head for continual learning.

Image classification · 355 operations Checked

100%

Showing the top corner; full diagram not loaded yetShowing a small copy; full diagram not loaded yetLarge diagram, not loaded yet

Open SVG

Loading diagram (26 KB)

Open in a new tab

Click or tap a spot to read it up close. Scroll or drag inside the diagram to move through it. Zoom with + and − or Ctrl and scroll. Press 0 for the whole graph. Swipe inside the diagram to move through it. Use + and − to zoom.

At a glance

Parameters
86.8M
Operations
355
Framework
PyTorch
Recurrent
No
Published
NeurIPS 2023
Cited by
74 (as of 28 October 2026)
Authors
Mark D. McDonnell, Dong Gong, Amin Parveneh and others
License
MIT
Checked
Passed: the trace was replayed operation by operation and matched the model's own output for this input.

Files

The diagram is a drawing of a TorchLens trace of the source code. It contains no code or weights.

Details
Stable ID
m19736
Graph hash
31ca2a2a28c2133df2d1f3761f7d306a3c05d56974d9e0d7edbf451a1ac87891
Skeleton hash
e52eb2ea604e9312fdc87ecdfe6ac262a01a86f08b3a5a72ead10c66327e1613
Architecture hash
645efa49828f2a881523d3fe0ead58776fcbab7823c2756d710285d74cbdd379
Diagram SHA-256
8a1c77b3fb2c3a242ffbf622b5898d17d08f732641ce6c9b803d275fb9ad8943
TorchLens version
2.36.0
Renderer
graphviz 2.43.0+pyvips 3.2.0+libvips 8.18.7+render-opts@06c1f0d3
Check
Forward pass replayed in PyTorch

What it is

RanPAC is an approach to continual learning, in which a model learns different tasks one after another from a non-stationary data stream without forgetting old ones, that starts from a pre-trained model. Its reasoning is that forgetting occurs when parameters are updated, so it relies on random projectors that need no training and on accumulating class prototypes.

A Random Projection layer of frozen, untrained weights with a nonlinear activation sits between the pre-trained model's feature layer and an output head based on class prototypes. The layer expands the dimensionality of the features, which the paper says captures interactions between features and improves linear separability. The paper also decorrelates the class prototypes to reduce the distribution disparity that comes with pre-trained representations. The random projections are sampled once and left frozen through all continual learning stages.

Compared with previous methods applied to pre-trained ViT-B/16 models, the paper reports final error rates reduced by between 20% and 62% on seven class-incremental benchmarks, without using any rehearsal memory. The paper notes that with a projection size of M = 10000 the method uses 10M untrained parameters, and that these are not trainable.

Key idea. The paper showed that a frozen random projection layer, placed between a pre-trained model's features and a class-prototype head, improves continual learning without the parameter updates that cause forgetting.

  • RanPAC
  • random projections
  • continual learning
  • class-incremental learning
  • pre-trained models
  • class prototypes
  • rehearsal-free
  • catastrophic forgetting

AI-written summary, based on the paper and checked automatically against it; not reviewed by a person. Corrections welcome.

Cite the paper

@misc{mcdonnell2024ranpacrandomprojectionspretrained,
      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={2024},
      eprint={2307.02251},
      archivePrefix={arXiv},
      primaryClass={cs.LG},
      url={https://arxiv.org/abs/2307.02251}, 
}