SYNTOLOGY HomeExplorerAtlasCodeMethodologyAboutDevelopersFeedPricing
Paper · 2301.12314 · 2023

Progressive Prompts: Continual Learning for Language Models

arXiv · PDF · Open in the Atlas

Code that ran

8 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, 0 violated it and 8 have no contract verdict; 0 failures of our instrument; 3 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/2301.12314.json · badge: /api/ran/2301.12314.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
arazd/ProgressivePrompts canonical (classifier label)
classifier basis not recorded on the link
8 ran · 3 no recorded run
FunctionStatusWhere it lives
change_string Ran
ran on a synthesized input
arazd/ProgressivePrompts/BERT_codebase/continual_learning_one_head.py
code served (permissive licence) · get_code("8845796154a75a52")
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 int; 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 numpy as np

# Set seed for reproducibility
np.random.seed(0)

# The function expects a list (referred to as 'str' but it's actually a list)
# It operates on a list that may contain the integer 102
# It removes all instances of 102, then rotates the list and adds 102 at specific positions

test_list = [1, 5, 102, 3, 7, 102, 9]

ARGS = {
    "str": test_list
}
Setup block drafted by
a language model, Claude Haiku 4.5, prompt python_fixture_v1, through the batch API
Imports
numpy — 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 int — 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
compute_class_offsets Ran
ran on a synthesized input
arazd/ProgressivePrompts/BERT_codebase/continual_learning_one_head.py
code served (permissive licence) · get_code("39af2c05db3f2f6e")
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 tuple. 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

# Set seed for reproducibility
torch.manual_seed(0)

# Construct arguments for compute_class_offsets
ARGS = {
    "tasks": ["amazon", "yahoo", "yelp_review_full"],
    "task_classes": [5, 10, 5]
}
Setup block drafted by
a language model, Claude Haiku 4.5, prompt python_fixture_v1, through the batch API
Imports
torch — import names as written, not package names to install; a name the repository itself provides is not a package
Returned
type tuple — a tuple output has no array shape of its own; none is 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
get_mask_arr Ran
ran on a synthesized input
arazd/ProgressivePrompts/BERT_codebase/model_utils.py
code served (permissive licence) · get_code("a9b8784508243768")
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 Tensor, ndim 2, dtype family float, shape (300, 300) 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.

import numpy as np
import torch
from torch import nn

torch.manual_seed(0)

ARGS = {
    "k": 2,
    "block_size": 100,
    "device": None,
}
Setup block drafted by
a language model, Claude Haiku 4.5, prompt python_fixture_v1, through the batch API
Imports
numpy, torch — import names as written, not package names to install; a name the repository itself provides is not a package
Returned
type Tensor, ndim 2, dtype family float, shape (300, 300) — shape (300, 300) 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
get_permutation_batch Ran
ran on a synthesized input
arazd/ProgressivePrompts/BERT_codebase/continual_learning_one_head.py
code served (permissive licence) · get_code("2e8d66e24002255e")
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 tuple. 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 numpy as np

torch.manual_seed(0)

# Create small tensors for src and src_mask
# src should have shape [batch_size, seq_len] with token IDs
# The function expects [101] as start token, [102] as special token, and 0 as padding
batch_size = 2
seq_len = 4

# Create src tensor with some token values
# Format: [101, token1, token2, 0] where 0 is padding
src = torch.tensor([
    [101, 5, 6, 0],
    [101, 7, 8, 0]
], dtype=torch.long)

# Create src_mask tensor - same shape as src
src_mask = torch.tensor([
    [1, 1, 1, 0],
    [1, 1, 1, 0]
], dtype=torch.long)

device = torch.device('cpu')

ARGS = {
    'src': src,
    'src_mask': src_mask,
    'device': device,
    'seq_len': 512
}
Setup block drafted by
a language model, Claude Haiku 4.5, prompt python_fixture_v1, through the batch API
Imports
numpy, torch — import names as written, not package names to install; a name the repository itself provides is not a package
Returned
type tuple — a tuple output has no array shape of its own; none is 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
get_prefix_net Ran
ran on a synthesized input
arazd/ProgressivePrompts/BERT_codebase/continual_learning_utils.py
code served (permissive licence) · get_code("78afa6f2750a1043")
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 Sequential. The image it ran in was not recorded. The code mentions cuda, and the harness aliases cuda to the CPU for every sample; whether this run needed that is 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
from torch import nn

torch.manual_seed(0)

ARGS = {
    'bottleneck_size': 256,
    'network_type': 'MLP1'
}
Setup block drafted by
a language model, Claude Haiku 4.5, prompt python_fixture_v1, through the batch API
Imports
torch — import names as written, not package names to install; a name the repository itself provides is not a package
Returned
type Sequential — a Sequential output has no array shape of its own; none is stated — the instrument coerces any output to an array; for a Sequential output the recorded ndim 1 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
get_prefix_net Ran
ran on a synthesized input
arazd/ProgressivePrompts/BERT_codebase/train_soft_prompt.py
code served (permissive licence) · get_code("a59e43f3af33ac61")
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 Sequential. The image it ran in was not recorded. The code mentions cuda, and the harness aliases cuda to the CPU for every sample; whether this run needed that is 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
from torch import nn

torch.manual_seed(0)

ARGS = {
    'bottleneck_size': 800,
    'network_type': 'MLP1'
}
Setup block drafted by
a language model, Claude Haiku 4.5, prompt python_fixture_v1, through the batch API
Imports
torch — import names as written, not package names to install; a name the repository itself provides is not a package
Returned
type Sequential — a Sequential output has no array shape of its own; none is stated — the instrument coerces any output to an array; for a Sequential output the recorded ndim 1 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
train_prompt Ran
ran on a synthesized input
arazd/ProgressivePrompts/BERT_codebase/train_soft_prompt.py
code served (permissive licence) · get_code("0c21bb10317460b6")
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. The code mentions cuda, and the harness aliases cuda to the CPU for every sample; whether this run needed that is 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 torch.nn as nn
from unittest.mock import Mock, MagicMock

torch.manual_seed(0)

# Build minimal trainer with required methods and attributes
class MinimalModel(nn.Module):
    def __init__(self):
        super().__init__()
        self.linear = nn.Linear(4, 3)
    
    def forward(self, input_ids, attention_mask):
        return self.linear(input_ids)

class MinimalPrefixMLP(nn.Module):
    def __init__(self):
        super().__init__()
        self.linear = nn.Linear(4, 3)
    
    def forward(self, x):
        return self.linear(x)

class MinimalTrainer:
    def __init__(self):
        self.model = MinimalModel()
        self.prefix_MLP = MinimalPrefixMLP()
    
    def pass_batch_with_prompt(self, batch, task, device, prefix_len=0):
        pass
    
    def pass_batch(self, batch, task, device, cls_idx=0):
        pass
    
    def eval_with_prompt(self, dataloader, task, arg3, cls_idx=0):
        return 0.85
    
    def eval(self, dataloader, task, arg3, cls_idx=0):
        return 0.85

# Create minimal dataloaders (list of batches with dict structure)
def create_dummy_batch():
    return {
        'input_ids': torch.randint(0, 10, (2, 4)),
        'attention_mask': torch.ones(2, 4),
        'labels': torch.randint(0, 3, (2,))
    }

dataloader_train = [create_dummy_batch() for _ in range(2)]
dataloader_val = [create_dummy_batch() for _ in range(1)]

# Build CL_class with required structure
class CLClass:
    def __init__(self):
        self.trainer = MinimalTrainer()
        self.tasks_data_dict = {
            'task_1': {
                'train': dataloader_train,
                'val': dataloader_val
            }
        }

cl_instance = CLClass()

# Build args object
class Args:
    def __init__(self):
        self.task = 'task_1'
        self.prefix_len = 0
        self.prefix_MLP = 'None'

args_obj = Args()

# Define ARGS dict with all parameters
ARGS = {
    'args': args_obj,
    'CL_class': cl_instance,
    'epochs': 2,
    'cls_idx': 0,
    'prompt_tuning': True
}
Setup block drafted by
a language model, Claude Haiku 4.5, prompt python_fixture_v1, through the batch API
Imports
torch, tqdm — 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
validate_lester Ran
ran on a synthesized input
arazd/ProgressivePrompts/T5_codebase/train_prompt.py
code served (permissive licence) · get_code("f7b8ef728f606082")
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 tuple, 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 torch.nn as nn
import numpy as np

torch.manual_seed(0)

# Stand-in tokenizer
class SimpleTokenizer:
    def __init__(self):
        self.pad_token_id = 0
    
    def decode(self, ids):
        return " ".join([str(i.item()) if isinstance(i, torch.Tensor) else str(i) for i in ids])

# Stand-in encoder
class SimpleEncoder(nn.Module):
    def __init__(self):
        super().__init__()
        self.embed_tokens = nn.Embedding(10, 4)
    
    def forward(self, attention_mask, inputs_embeds, head_mask=None, output_attentions=None, output_hidden_states=None, return_dict=None):
        return torch.randn(2, 512, 4)

# Stand-in model
class SimpleModel(nn.Module):
    def __init__(self):
        super().__init__()
        self.encoder = SimpleEncoder()
        self.prompt = nn.Parameter(torch.randn(1, 5, 4))
        self.mlp = nn.Linear(5 * 4, 5 * 4)
        self.device_attr = 'cpu'
    
    def eval(self):
        return self
    
    def generate(self, input_ids, attention_mask, encoder_outputs, max_length):
        batch_size = input_ids.shape[0]
        return torch.randint(1, 9, (batch_size, max_length))
    
    def forward(self, input_ids, attention_mask, labels, decoder_attention_mask, encoder_outputs):
        loss = torch.tensor(0.5)
        return (loss,)

# Stand-in trainer
class SimpleTrainer:
    def __init__(self):
        self.model = SimpleModel()
        self.tokenizer = SimpleTokenizer()
        self.device = 'cpu'
    
    def process_str(self, s):
        return s.strip().lower()

# Create dataloader
def create_batch():
    return {
        'source_ids': torch.randint(1, 9, (2, 7)),
        'source_mask': torch.ones(2, 7),
        'target_ids': torch.randint(1, 9, (2, 2)),
        'target_mask': torch.ones(2, 2),
    }

dataloader_val = [create_batch() for _ in range(2)]

# Build ARGS
ARGS = {
    'trainer': SimpleTrainer(),
    'dataloader_val': dataloader_val,
    'task': 'classification',
    'embed_prompt': False,
    'prefix_len': 5,
    'class_keys': ['equivalent', 'different'],
    'max_length': 2,
    'print_outputs': False,
}
Setup block drafted by
a language model, Claude Haiku 4.5, prompt python_fixture_v1, through the batch API
Imports
numpy, torch, tqdm — import names as written, not package names to install; a name the repository itself provides is not a package
Returned
type tuple, ndim 1, dtype family float — a tuple 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
get_extended_attention_mask2 Not yet run
unverified (harvested, no recorded run)
arazd/ProgressivePrompts/BERT_codebase/model_utils.py
code served (permissive licence) · get_code("5545d5eca33677e6")
How it ran

no invocation recorded.

train Not yet run
unverified (harvested, no recorded run)
arazd/ProgressivePrompts/T5_codebase/train_prompt.py
code served (permissive licence) · get_code("b8920b9ed536a3c7")
How it ran

no invocation recorded.

train_step_lester Not yet run
unverified (harvested, no recorded run)
arazd/ProgressivePrompts/T5_codebase/train_prompt.py
code served (permissive licence) · get_code("11448b3129bb18b8")
How it ran

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, 0 are also present in other papers whose code we hold (0 with at least one paper dated earlier, 0 the same month, 0 later) and 11 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.

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

We introduce Progressive Prompts - a simple and efficient approach for continual learning in language models. Our method allows forward transfer and resists catastrophic forgetting, without relying on data replay or a large number of task-specific parameters. Progressive Prompts learns a new soft prompt for each task and sequentially concatenates it with the previously learned prompts, while keeping the base model frozen. Experiments on standard continual learning benchmarks show that our approach outperforms state-of-the-art methods, with an improvement >20% in average test accuracy over the previous best-preforming method on T5 model. We also explore a more challenging continual learning setup with longer sequences of tasks and show that Progressive Prompts significantly outperforms prior methods.

For agents

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

get_harvested_code_for_paper("2301.12314")
get_code_for_paper("2301.12314")
have("2301.12314")

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

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

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

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

Connect an agent — have() is free.