SYNTOLOGY HomeExplorerAtlasCodeMethodologyAboutDevelopersFeedPricing
Paper · 2112.08654 · 2021

Learning to Prompt for Continual Learning

arXiv · PDF · Open in the Atlas

Code that ran

10 of 11 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; 0 honoured the contract we drafted, 4 violated it and 0 have no contract verdict; 6 failures of our instrument; 1 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/2112.08654.json · badge: /api/ran/2112.08654.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
JH-LEE-KR/l2p-pytorch community (classifier label)
classifier basis not recorded on the link
9 ran · 1 no recorded run
gulzainali98/LGCL reimplementation (classifier label)
classifier basis: classifier_2025
1 ran · 0 no recorded run
FunctionStatusWhere it lives
calculate_md5 Ran
ran; our contract draft was wrong, not the code
JH-LEE-KR/l2p-pytorch/continual_datasets/dataset_utils.py
pointer only (licence: Apache-2.0) · get_code("5c3574e986df9984")
How it ran

The body of this sample is withheld: Apache-2.0, as GitHub detects it on this paper's repository, JH-LEE-KR/l2p-pytorch, is in the permissive set, but a licence decision keeps the body a pointer: the reason for that decision is not recorded with it. 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.

check_integrity Ran
ran, violated the contract we drafted
JH-LEE-KR/l2p-pytorch/continual_datasets/dataset_utils.py
pointer only (licence: Apache-2.0) · get_code("46b62ccc9e5b9878")
How it ran

The body of this sample is withheld: Apache-2.0, as GitHub detects it on this paper's repository, JH-LEE-KR/l2p-pytorch, is in the permissive set, but a licence decision keeps the body a pointer: the reason for that decision is not recorded with it. 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.

check_md5 Ran
ran, violated the contract we drafted
JH-LEE-KR/l2p-pytorch/continual_datasets/dataset_utils.py
pointer only (licence: Apache-2.0) · get_code("b3cb500b2f04323d")
How it ran

The body of this sample is withheld: Apache-2.0, as GitHub detects it on this paper's repository, JH-LEE-KR/l2p-pytorch, is in the permissive set, but a licence decision keeps the body a pointer: the reason for that decision is not recorded with it. 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.

checkpoint_filter_fn Ran
ran; our contract draft was wrong, not the code
JH-LEE-KR/l2p-pytorch/vision_transformer.py
pointer only (licence: Apache-2.0); the stored copy get_code serves, from skyofbeginning/fedmgp, is pointer only (licence: NONE) · get_code("ee95af3ec5c38df5")
How it ran

The body of this sample is withheld: Apache-2.0, as GitHub detects it on this paper's repository, JH-LEE-KR/l2p-pytorch, is in the permissive set, but a licence decision keeps the body a pointer: the reason for that decision is not recorded with it. 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_file Ran
ran; our contract draft was wrong, not the code
JH-LEE-KR/l2p-pytorch/run_with_submitit.py
pointer only (licence: Apache-2.0); the stored copy get_code serves, from chenxing6666/dap, is pointer only (licence: NONE) · get_code("9c90a0600bfdb124")
How it ran

The body of this sample is withheld: Apache-2.0, as GitHub detects it on this paper's repository, JH-LEE-KR/l2p-pytorch, is in the permissive set, but a licence decision keeps the body a pointer: the reason for that decision is not recorded with it. 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
JH-LEE-KR/l2p-pytorch/vision_transformer.py
pointer only (licence: Apache-2.0); the stored copy get_code serves, from skyofbeginning/fedmgp, is pointer only (licence: NONE) · get_code("6c600a2f0f2361f1")
How it ran

The body of this sample is withheld: Apache-2.0, as GitHub detects it on this paper's repository, JH-LEE-KR/l2p-pytorch, is in the permissive set, but a licence decision keeps the body a pointer: the reason for that decision is not recorded with it. 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_shared_folder Ran
ran; our contract draft was wrong, not the code
JH-LEE-KR/l2p-pytorch/run_with_submitit.py
pointer only (licence: Apache-2.0); the stored copy get_code serves, from chenxing6666/dap, is pointer only (licence: NONE) · get_code("8e194e74ffb0e8ec")
How it ran

The body of this sample is withheld: Apache-2.0, as GitHub detects it on this paper's repository, JH-LEE-KR/l2p-pytorch, is in the permissive set, but a licence decision keeps the body a pointer: the reason for that decision is not recorded with it. 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.

resize_pos_embed Ran
ran; the contract check could not run (RAISES, DEP_MISSING or TIMEOUT)
JH-LEE-KR/l2p-pytorch/vision_transformer.py
pointer only (licence: Apache-2.0); the stored copy get_code serves, from skyofbeginning/fedmgp, is pointer only (licence: NONE) · get_code("a6e17b60ed761713")
How it ran

The body of this sample is withheld: Apache-2.0, as GitHub detects it on this paper's repository, JH-LEE-KR/l2p-pytorch, is in the permissive set, but a licence decision keeps the body a pointer: the reason for that decision is not recorded with it. 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.

str_to_bool Ran
ran, violated the contract we drafted
gulzainali98/LGCL/configs/cifar100_lgcl.py
code served (permissive licence) · get_code("10ebc4ca56bae3c2")
How it ran

Ran in Syntology's sandbox on this synthesized input (drafted by a language model, Claude Sonnet 4.5, prompt python_fixture_v1) and returned bool, ndim 0, dtype family float, shape () as a later run recorded it. The image it ran in was not recorded. If your copy returns the same type, ndim and shape 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.

ARGS = {
    'value': 'true'
}
Setup block drafted by
a language model, Claude Sonnet 4.5, prompt python_fixture_v1
Imports
none outside the standard library — import names as written, not package names to install; a name the repository itself provides is not a package
Returned
type bool, ndim 0, dtype family float, shape () — shape () as a later run recorded it
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
target_transform Ran
ran, violated the contract we drafted
JH-LEE-KR/l2p-pytorch/datasets.py
pointer only (licence: Apache-2.0) · get_code("265ea374aab10001")
How it ran

The body of this sample is withheld: Apache-2.0, as GitHub detects it on this paper's repository, JH-LEE-KR/l2p-pytorch, is in the permissive set, but a licence decision keeps the body a pointer: the reason for that decision is not recorded with it. 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_dataset Not yet run
unverified (harvested, no recorded run)
JH-LEE-KR/l2p-pytorch/datasets.py
pointer only (licence: Apache-2.0) · get_code("f32616c3ff9585fa")
How it ran

The body of this sample is withheld: Apache-2.0, as GitHub detects it on this paper's repository, JH-LEE-KR/l2p-pytorch, is in the permissive set, but a licence decision keeps the body a pointer: the reason for that decision is not recorded with it. 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. No invocation recorded.

Also present in other papers' code

Of 11 samples lifted from this paper's linked repositories, 11 carry a function identity and 0 do not. Of the 11 distinct functions with an identity, 10 are also present in other papers whose code we hold (4 with at least one paper dated earlier, 0 the same month, 10 later) and 1 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
get_init_weights_vit 25 other papers
25 later · 1 only as an assembly brick
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
aaai_26216 (2023 (year only))
Isolation and Impartial Aggregation: A Paradigm of Incremental Learning without Interference
and 22 more not named here
calculate_md5 13 other papers
5 dated earlier, 8 later
2001.00326 (2020-01)
NAS-Bench-201: Extending the Scope of Reproducible Neural Architecture Search
2003.09553 (2020-03)
Adversarial Continual Learning
2106.05390 (2021-06)
Optimizing Reusable Knowledge for Continual Learning via Metalearning
and 10 more not named here
check_md5 13 other papers
5 dated earlier, 8 later
2001.00326 (2020-01)
NAS-Bench-201: Extending the Scope of Reproducible Neural Architecture Search
2003.09553 (2020-03)
Adversarial Continual Learning
2106.05390 (2021-06)
Optimizing Reusable Knowledge for Continual Learning via Metalearning
and 10 more not named here
target_transform 6 other papers
6 later
2308.09610 (2023-08)
On the Effectiveness of LayerNorm Tuning for Continual Learning in Vision Transformers
2310.13888 (2023-10)
Towards a General Framework for Continual Learning with Pre-training
2311.12048 (2023-11)
One Size Fits All for Semantic Shifts: Adaptive Prompt Tuning for Continual Learning
and 3 more not named here
check_integrity 5 other papers
2 dated earlier, 3 later
2003.09553 (2020-03)
Adversarial Continual Learning
2106.05390 (2021-06)
Optimizing Reusable Knowledge for Continual Learning via Metalearning
136640364 (2022 (year only))
Continual 3D Convolutional Neural Networks for Real-time Processing of Videos
and 2 more not named here
checkpoint_filter_fn 4 other papers
4 later
2308.09610 (2023-08)
On the Effectiveness of LayerNorm Tuning for Continual Learning in Vision Transformers
2310.13888 (2023-10)
Towards a General Framework for Continual Learning with Pre-training
2404.14721 (2024-04)
Dynamically Anchored Prompting for Task-Imbalanced Continual Learning
and 1 more not named here
get_init_file 4 other papers
1 dated earlier, 3 later
2104.12763 (2021-04)
MDETR -Modulated Detection for End-to-End Multi-Modal Understanding
2210.05668 (2022-10)
Understanding Embodied Reference with Touch-Line Transformer
2404.14721 (2024-04)
Dynamically Anchored Prompting for Task-Imbalanced Continual Learning
and 1 more not named here
resize_pos_embed 4 other papers
4 later
2310.13888 (2023-10)
Towards a General Framework for Continual Learning with Pre-training
2404.14721 (2024-04)
Dynamically Anchored Prompting for Task-Imbalanced Continual Learning
2407.00113 (2024-07)
Personalized Federated Continual Learning via Multi-granularity Prompt
and 1 more not named here
get_shared_folder 1 other paper
1 later
2404.14721 (2024-04)
Dynamically Anchored Prompting for Task-Imbalanced Continual Learning
str_to_bool 1 other paper
1 later
2308.14191 (2023-08)
SketchDreamer: Interactive Text-Augmented Creative Sketch Ideation

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

The mainstream paradigm behind continual learning has been to adapt the model parameters to non-stationary data distributions, where catastrophic forgetting is the central challenge. Typical methods rely on a rehearsal buffer or known task identity at test time to retrieve learned knowledge and address forgetting, while this work presents a new paradigm for continual learning that aims to train a more succinct memory system without accessing task identity at test time. Our method learns to dynamically prompt (L2P) a pre-trained model to learn tasks sequentially under different task transitions. In our proposed framework, prompts are small learnable parameters, which are maintained in a memory space. The objective is to optimize prompts to instruct the model prediction and explicitly manage task-invariant and task-specific knowledge while maintaining model plasticity. We conduct comprehensive experiments under popular image classification benchmarks with different challenging continual learning settings, where L2P consistently outperforms prior state-of-the-art methods. Surprisingly, L2P achieves competitive results against rehearsal-based methods even without a rehearsal buffer and is directly applicable to challenging task-agnostic continual learning. Source code is available at https://github.com/google-research/l2p.

For agents

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

get_harvested_code_for_paper("2112.08654")
get_code_for_paper("2112.08654")
have("2112.08654")

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

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

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

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

Connect an agent — have() is free.