SYNTOLOGY HomeExplorerAtlasCodeMethodologyAboutDevelopersFeedPricing
Paper · 2307.02251 · 2023

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

arXiv · PDF · Open in the Atlas

Code that ran

10 of 15 samples (functions and classes) lifted from this paper's linked repositories executed on a synthesized input in Syntology's jail (0 of them constructed an object rather than computing a result; 4 honoured the contract we drafted, 0 violated it and 0 have no contract verdict; 6 failures of our instrument; 5 no recorded run), measured 2026-11-23; repository links from the Papers with Code archive attributed under CC BY-SA, no affiliation; bodies inline only under a permissive licence as GitHub detects it. Not a reproduction of the paper's results.

"Ran" means the function executed on a synthesized input and returned a value. It is not a reproduction of the paper's results. This record, dated, as JSON: /api/ran/2307.02251.json · badge: /api/ran/2307.02251.svg

Each repository's role is a label: a classifier's output recorded on the link, or, where no role is recorded, what the Papers with Code archive marked. The line under it names its basis. Neither says who wrote the code.

RepositoryRoleRan
ranpac/ranpac canonical (classifier label)
classifier basis: census
10 ran · 5 no recorded run
FunctionStatusWhere it lives
build_transform Ran
ran; our contract draft was wrong, not the code
ranpac/ranpac/utils/data.py
code served (permissive licence) · get_code("8425222b4660e321")
How it ran

Ran in Syntology's sandbox on this synthesized input (drafted by a language model, Claude Haiku 4.5, prompt python_fixture_v1, through the batch API) and returned list, ndim 1, dtype family float; no output shape is stated. The image it ran in was not recorded. If your copy returns the same type and ndim on these inputs, it matched what we observed; nothing here checks that. It does NOT mean the output is correct: nothing has compared it to the paper.

import torch
import numpy as np
from torchvision import transforms

torch.manual_seed(0)

class ArgsStandIn:
    """Minimal args object for build_transform"""
    def __init__(self):
        pass

ARGS = {
    "is_train": True,
    "args": ArgsStandIn(),
    "isCifar": False
}
Setup block drafted by
a language model, Claude Haiku 4.5, prompt python_fixture_v1, through the batch API
Imports
numpy, torch, torchvision — import names as written, not package names to install; a name the repository itself provides is not a package
Returned
type list, ndim 1, dtype family float — a list output has no array shape of its own; none is stated
dtype family
int means an integer dtype; float means any other dtype the instrument saw, bool and complex included (fixture_check.py records only these two families)
Environment
image not recorded; re-verify against syntology-harvest-sandbox:v5-deps; not recorded for this sample: the harness installs a cuda-to-cpu shim (cuda_shim.py) before every sample and no run records whether a sample needed it; seed: none by the harness; any seed is in the setup block
conv1x1 Ran
ran; our contract draft was wrong, not the code
ranpac/ranpac/resnet.py
code served (permissive licence) · get_code("d9def42110729a85")
How it ran

Ran in Syntology's sandbox on this synthesized input (drafted by a language model, Claude Haiku 4.5, prompt python_fixture_v1) and returned Conv2d. The image it ran in was not recorded. If your copy returns the same type on these inputs, it matched what we observed; nothing here checks that. It does NOT mean the output is correct: nothing has compared it to the paper.

import torch
import torch.nn as nn

torch.manual_seed(0)

# The function conv1x1 takes in_planes, out_planes, and stride as parameters
# It returns an nn.Conv2d layer configured for 1x1 convolution
# We need to provide valid integer arguments for these parameters

ARGS = {
    "in_planes": 3,
    "out_planes": 64,
    "stride": 1
}
Setup block drafted by
a language model, Claude Haiku 4.5, prompt python_fixture_v1
Imports
torch — import names as written, not package names to install; a name the repository itself provides is not a package
Returned
type Conv2d — a Conv2d output has no array shape of its own; none is stated — the instrument coerces any output to an array; for a Conv2d output the recorded ndim 0 and dtype family float describe that coercion, not the output, and are not stated
Environment
image not recorded; re-verify against syntology-harvest-sandbox:v5-deps; not recorded for this sample: the harness installs a cuda-to-cpu shim (cuda_shim.py) before every sample and no run records whether a sample needed it; seed: none by the harness; any seed is in the setup block
conv3x3 Ran
ran; our contract draft was wrong, not the code
ranpac/ranpac/resnet.py
code served (permissive licence) · get_code("160bb14bd76201b4")
How it ran

Ran in Syntology's sandbox on this synthesized input (drafted by a language model, Claude Haiku 4.5, prompt python_fixture_v1) and returned Conv2d. The image it ran in was not recorded. If your copy returns the same type on these inputs, it matched what we observed; nothing here checks that. It does NOT mean the output is correct: nothing has compared it to the paper.

import torch
import torch.nn as nn

torch.manual_seed(0)

ARGS = {
    "in_planes": 3,
    "out_planes": 64,
    "stride": 1,
    "groups": 1,
    "dilation": 1,
}
Setup block drafted by
a language model, Claude Haiku 4.5, prompt python_fixture_v1
Imports
torch — import names as written, not package names to install; a name the repository itself provides is not a package
Returned
type Conv2d — a Conv2d output has no array shape of its own; none is stated — the instrument coerces any output to an array; for a Conv2d output the recorded ndim 0 and dtype family float describe that coercion, not the output, and are not stated
Environment
image not recorded; re-verify against syntology-harvest-sandbox:v5-deps; not recorded for this sample: the harness installs a cuda-to-cpu shim (cuda_shim.py) before every sample and no run records whether a sample needed it; seed: none by the harness; any seed is in the setup block
count_parameters Ran
ran, honoured the contract we drafted
ranpac/ranpac/utils/toolkit.py
pointer only (licence: MIT); the stored copy get_code serves, from wangkiw/iclr23-memo, is pointer only (licence: NONE) · get_code("6bdbe3d6368c4cde")
How it ran

The body of this sample is withheld: this paper's link allows the body inline (MIT), but get_code serves the stored copy, first harvested from wangkiw/iclr23-memo, and GitHub detected no licence in that repository when it was checked. The setup block that called it is withheld with it, because it is written against that body. source_path and origin say where the code lives, to read under the repository's own terms. A run is recorded.

get_init_weights_vit Ran
ran; our contract draft was wrong, not the code
ranpac/ranpac/petl/vision_transformer_ssf.py
code served (permissive licence) · get_code("def23f7d7d042968")
How it ran

Ran in Syntology's sandbox on this synthesized input (drafted by a language model, Claude Haiku 4.5, prompt python_fixture_v1, through the batch API) and returned partial. The image it ran in was not recorded. If your copy returns the same type on these inputs, it matched what we observed; nothing here checks that. It does NOT mean the output is correct: nothing has compared it to the paper.

import torch
import torch.nn as nn
from functools import partial

torch.manual_seed(0)

# Create a minimal test module with the structure that get_init_weights_vit expects
class SimpleViTModule(nn.Module):
    def __init__(self):
        super().__init__()
        self.linear = nn.Linear(4, 3)
        self.head = nn.Linear(4, 2)
        self.qkv = nn.Linear(4, 12)
        self.mlp_layer = nn.Linear(4, 3)
    
    def forward(self, x):
        return x

# Test various modes of get_init_weights_vit
ARGS = {
    'mode': 'jax',
    'head_bias': 0.5
}
Setup block drafted by
a language model, Claude Haiku 4.5, prompt python_fixture_v1, through the batch API
Imports
timm, torch — import names as written, not package names to install; a name the repository itself provides is not a package
Returned
type partial — a partial output has no array shape of its own; none is stated — the instrument coerces any output to an array; for a partial output the recorded ndim 0 and dtype family float describe that coercion, not the output, and are not stated
Environment
image not recorded; re-verify against syntology-harvest-sandbox:v5-deps; not recorded for this sample: the harness installs a cuda-to-cpu shim (cuda_shim.py) before every sample and no run records whether a sample needed it; seed: none by the harness; any seed is in the setup block
init_ssf_scale_shift Ran
ran; our contract draft was wrong, not the code
ranpac/ranpac/petl/vision_transformer_ssf.py
pointer only (licence: MIT); the stored copy get_code serves, from yewen1486/emtal, is pointer only (licence: NONE) · get_code("896b5eec245f1bab")
How it ran

The body of this sample is withheld: this paper's link allows the body inline (MIT), but get_code serves the stored copy, first harvested from yewen1486/emtal, and GitHub detected no licence in that repository when it was checked. The setup block that called it is withheld with it, because it is written against that body. source_path and origin say where the code lives, to read under the repository's own terms. A run is recorded.

pil_loader Ran
ran, honoured the contract we drafted
ranpac/ranpac/utils/data_manager.py
pointer only (licence: MIT); the stored copy get_code serves, from sun-hailong/aaai25-mos, is pointer only (licence: NONE) · get_code("66b63ed4f327a712")
How it ran

The body of this sample is withheld: this paper's link allows the body inline (MIT), but get_code serves the stored copy, first harvested from sun-hailong/aaai25-mos, and GitHub detected no licence in that repository when it was checked. The setup block that called it is withheld with it, because it is written against that body. source_path and origin say where the code lives, to read under the repository's own terms. A run is recorded.

ssf_ada Ran
ran, honoured the contract we drafted
ranpac/ranpac/petl/vision_transformer_ssf.py
pointer only (licence: MIT); the stored copy get_code serves, from yewen1486/emtal, is pointer only (licence: NONE) · get_code("61e8364b7e9bcb70")
How it ran

The body of this sample is withheld: this paper's link allows the body inline (MIT), but get_code serves the stored copy, first harvested from yewen1486/emtal, and GitHub detected no licence in that repository when it was checked. The setup block that called it is withheld with it, because it is written against that body. source_path and origin say where the code lives, to read under the repository's own terms. A run is recorded.

target2onehot Ran
ran; our contract draft was wrong, not the code
ranpac/ranpac/utils/toolkit.py
pointer only (licence: MIT); the stored copy get_code serves, from liangzu/loranpac, is pointer only (licence: NONE) · get_code("284e2e0345abe291")
How it ran

The body of this sample is withheld: this paper's link allows the body inline (MIT), but get_code serves the stored copy, first harvested from liangzu/loranpac, and GitHub detected no licence in that repository when it was checked. The setup block that called it is withheld with it, because it is written against that body. source_path and origin say where the code lives, to read under the repository's own terms. A run is recorded.

tensor2numpy Ran
ran, honoured the contract we drafted
ranpac/ranpac/utils/toolkit.py
pointer only (licence: MIT); the stored copy get_code serves, from wangkiw/iclr23-memo, is pointer only (licence: NONE) · get_code("929c76a2fa2e8c42")
How it ran

The body of this sample is withheld: this paper's link allows the body inline (MIT), but get_code serves the stored copy, first harvested from wangkiw/iclr23-memo, and GitHub detected no licence in that repository when it was checked. The setup block that called it is withheld with it, because it is written against that body. source_path and origin say where the code lives, to read under the repository's own terms. A run is recorded.

build_promptmodel Not yet run
unverified (harvested, no recorded run)
ranpac/ranpac/petl/vpt.py
code served (permissive licence) · get_code("caf426ace8f9b740")
How it ran

no invocation recorded.

get_convnet Not yet run
unverified (harvested, no recorded run)
ranpac/ranpac/inc_net.py
code served (permissive licence) · get_code("2edd6df79bc77668")
How it ran

no invocation recorded.

resnet18 Not yet run
unverified (harvested, no recorded run)
ranpac/ranpac/resnet.py
code served (permissive licence) · get_code("d48a8b0d2e61f5f7")
How it ran

no invocation recorded.

vit_base_patch16_224_adapter Not yet run
unverified (harvested, no recorded run)
ranpac/ranpac/petl/vision_transformer_adapter.py
code served (permissive licence) · get_code("f51aa4aca78dae1d")
How it ran

no invocation recorded.

vit_base_patch16_224_in21k_adapter Not yet run
unverified (harvested, no recorded run)
ranpac/ranpac/petl/vision_transformer_adapter.py
code served (permissive licence) · get_code("606a5e08f74e25f2")
How it ran

no invocation recorded.

Also present in other papers' code

Of 15 samples lifted from this paper's linked repositories, 15 carry a function identity and 0 do not. Of the 15 distinct functions with an identity, 11 are also present in other papers whose code we hold (9 with at least one paper dated earlier, 10 the same month, 11 later) and 4 are only here among the 52,977 papers whose code Syntology holds (as of 2026-09-26).

Only here means: among the 52,977 papers whose code Syntology holds (51,887 with lifted samples, 1,090 through their assemblies only), as of 2026-09-26, no other paper's lifted samples or current assembly bricks contain an identical function body after normalisation.

FunctionAlso present inEarliest-datedOthers named
conv1x1 431 other papers
263 dated earlier, 10 the same month, 149 later, 8 same year, order not determinable, 1 undated · 38 only as an assembly brick
1409.1556 (2014-09)
Very Deep Convolutional Networks for Large-Scale Image Recognition
1506.01186 (2015-06)
Cyclical Learning Rates for Training Neural Networks
1507.05717 (2015-07)
An End-to-End Trainable Neural Network for Image-based Sequence Recognition and Its Application to Scene Text Recognition
and 428 more not named here
conv3x3 312 other papers
168 dated earlier, 8 the same month, 128 later, 7 same year, order not determinable, 1 undated · 31 only as an assembly brick
1409.1556 (2014-09)
Very Deep Convolutional Networks for Large-Scale Image Recognition
1507.05717 (2015-07)
An End-to-End Trainable Neural Network for Image-based Sequence Recognition and Its Application to Scene Text Recognition
1512.03385 (2015-12)
Deep Residual Learning for Image Recognition
and 309 more not named here
resnet18 95 other papers
50 dated earlier, 1 the same month, 42 later, 1 same year, order not determinable, 1 undated
1805.00907 (2018-05)
Glow: Graph Lowering Compiler Techniques for Neural Networks
1902.08153 (2019-02)
Learned Step Size Quantization
1904.01355 (2019-04)
FCOS: Fully Convolutional One-Stage Object Detection
and 92 more not named here
pil_loader 66 other papers
28 dated earlier, 2 the same month, 33 later, 3 same year, order not determinable
1502.03044 (2015-02)
Show, Attend and Tell: Neural Image Caption Generation with Visual Attention
1710.10196 (2017-10)
Progressive Growing of GANs for Improved Quality, Stability, and Variation
1711.02512 (2017-11)
Fine-tuning CNN Image Retrieval with No Human Annotation
and 63 more not named here
get_init_weights_vit 25 other papers
4 dated earlier, 1 the same month, 19 later, 1 same year, order not determinable · 1 only as an assembly brick
2112.08654 (2021-12)
Learning to Prompt for Continual Learning
2207.12819 (2022-07)
S-Prompts Learning with Pre-trained Transformers: An Occam's Razor for Domain Incremental Learning
2210.08823 (2022-10)
Scaling & Shifting Your Features: A New Baseline for Efficient Model Tuning
and 22 more not named here
tensor2numpy 15 other papers
3 dated earlier, 1 the same month, 10 later, 1 same year, order not determinable · 9 only as an assembly brick
2204.04662 (2022-04)
FOSTER: Feature Boosting and Compression for Class-Incremental Learning
2205.13218 (2022-05)
A Model or 603 Exemplars: Towards Memory-Efficient Class-Incremental Learning
aaai_26216 (2023 (year only))
Isolation and Impartial Aggregation: A Paradigm of Incremental Learning without Interference
and 12 more not named here
count_parameters 8 other papers
2 dated earlier, 1 the same month, 4 later, 1 same year, order not determinable · 2 only as an assembly brick
2204.04662 (2022-04)
FOSTER: Feature Boosting and Compression for Class-Incremental Learning
2205.13218 (2022-05)
A Model or 603 Exemplars: Towards Memory-Efficient Class-Incremental Learning
aaai_26216 (2023 (year only))
Isolation and Impartial Aggregation: A Paradigm of Incremental Learning without Interference
and 5 more not named here
ssf_ada 8 other papers
1 dated earlier, 1 the same month, 6 later · 1 only as an assembly brick
2210.08823 (2022-10)
Scaling & Shifting Your Features: A New Baseline for Efficient Model Tuning
2307.11342 (2023-07)
Tuning Pre-trained Model via Moment Probing
2312.08888 (2023-12)
Read Between the Layers: Leveraging Multi-Layer Representations for Rehearsal-Free Continual Learning with Pre-Trained Models
and 5 more not named here
target2onehot 8 other papers
1 the same month, 6 later, 1 same year, order not determinable · 1 only as an assembly brick
aaai_26216 (2023 (year only))
Isolation and Impartial Aggregation: A Paradigm of Incremental Learning without Interference
2307.12045 (2023-07)
Revisiting Distillation for Continual Learning on Visual Question Localized-Answering in Robotic Surgery
2312.08888 (2023-12)
Read Between the Layers: Leveraging Multi-Layer Representations for Rehearsal-Free Continual Learning with Pre-Trained Models
and 5 more not named here
init_ssf_scale_shift 7 other papers
1 dated earlier, 1 the same month, 5 later
2210.08823 (2022-10)
Scaling & Shifting Your Features: A New Baseline for Efficient Model Tuning
2307.11342 (2023-07)
Tuning Pre-trained Model via Moment Probing
2312.08888 (2023-12)
Read Between the Layers: Leveraging Multi-Layer Representations for Rehearsal-Free Continual Learning with Pre-Trained Models
and 4 more not named here
vit_base_patch16_224_adapter 2 other papers
2 later
2404.06622 (2024-04)
Calibrating Higher-Order Statistics for Few-Shot Class-Incremental Learning with Pre-trained Vision Transformers
2507.07100 (2025-07)
Addressing Imbalanced Domain-Incremental Learning through Dual-Balance Collaborative Experts

Presence, not direction: an identical function body in two papers' repositories does not say who wrote it, which came from which, or that either paper's method rests on it. Matching is exact after normalisation, so a renamed or edited function is not matched. Dates are when papers appeared, not when code was written. Only .py files the harvester lifted are covered; notebooks are not read. A new-style arXiv id YYMM.NNNN dates a paper to the month 20YY-MM; otherwise Paper.year dates it to the year; otherwise it is undated. Dates are when the paper appeared, not when the code was written. Read 2026-11-23.

Repositories linked to this paper

Some links come from the archived Papers with Code dataset (CC BY-SA 4.0): attribution and licence.

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.

For agents

The same record, over MCP at https://syntology.ai/mcp:

get_harvested_code_for_paper("2307.02251")
get_code_for_paper("2307.02251")
have("2307.02251")

The run record, dated, one paper per request, free:

curl https://syntology.ai/api/ran/2307.02251.json

A badge for a README (the split and the date, never a ratio):

[![Syntology run record](https://syntology.ai/api/ran/2307.02251.svg)](https://syntology.ai/paper/2307.02251)

Connect an agent — have() is free.