SYNTOLOGY HomeExplorerAtlasCodeMethodologyAboutDevelopersFeedPricing
Paper · 2403.13249 · ICLR · 2024

A Unified and General Framework for Continual Learning

Yan Li, Heng Huang, Li Shen, Zhenyi Wang

arXiv · PDF · Open in the Atlas

Code that ran

9 of 11 samples (functions and classes) lifted from this paper's linked repositories executed on a synthesized input in Syntology's jail (3 of them constructed an object rather than computing a result; 2 honoured the contract we drafted, 0 violated it and 3 have no contract verdict; 4 failures of our instrument; 2 no recorded run), measured 2026-11-22; 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/2403.13249.json · badge: /api/ran/2403.13249.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
joey-wang123/CL-refresh-learning canonical (classifier label)
classifier basis: census
5 ran · 0 no recorded run
joey-wang123/cl-refresh-learning canonical (classifier label)
classifier basis: classifier_2025
3 ran · 2 no recorded run
copy not recorded community
not in the paper's declared repositories
1 ran · 0 no recorded run
FunctionStatusWhere it lives
Buffer Ran
ran on a synthesized input · constructed an object; no result was computed
joey-wang123/cl-refresh-learning/models/rpc.py
code served (permissive licence) · get_code("8f59cbb3d51b6c85")
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 an instance of its own class, Buffer: the run constructed the object and did not call it, so no result was computed. 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)
np.random.seed(0)

# Define arguments for Buffer class
buffer_size = 10
device = 'cpu'
n_tasks = None
mode = 'reservoir'

ARGS = {
    'buffer_size': buffer_size,
    'device': device,
    'n_tasks': n_tasks,
    'mode': mode
}
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 Buffer — the run constructed an instance of its own class and did not call it; no shape is stated — the instrument coerces any output to an array; for a Buffer 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
ContinualDataset Ran
ran on a synthesized input · constructed an object; no result was computed
joey-wang123/cl-refresh-learning/models/rpc.py
code served (permissive licence) · get_code("f0121c7b8fa53c55")
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 an instance of its own class, ContinualDataset: the run constructed the object and did not call it, so no result was computed. 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 torchvision import transforms
from argparse import Namespace
from torch.utils.data import DataLoader
import torch.nn.functional as F

torch.manual_seed(0)

class DummyBackbone(nn.Module):
    def __init__(self):
        super().__init__()
        self.fc = nn.Linear(4, 8)
    
    def forward(self, x):
        return self.fc(x)

class DummyScheduler:
    def __init__(self, optimizer, args):
        self.optimizer = optimizer
        self.args = args
    
    def step(self):
        pass

def create_dummy_dataloader(batch_size=2):
    data = [(torch.randn(4), torch.randint(0, 2, (1,)).item()) for _ in range(4)]
    return data

ARGS = {
    'args': Namespace(
        dataset='dummy',
        n_tasks=5,
        n_classes_per_task=2,
        batch_size=2,
        epochs=10,
        lr=0.01,
        device='cpu'
    )
}
Setup block drafted by
a language model, Claude Haiku 4.5, prompt python_fixture_v1, through the batch API
Imports
torch, torchvision — import names as written, not package names to install; a name the repository itself provides is not a package
Returned
type ContinualDataset — the run constructed an instance of its own class and did not call it; no shape is stated — the instrument coerces any output to an array; for a ContinualDataset 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
ContinualModel Ran
ran on a synthesized input · constructed an object; no result was computed
joey-wang123/cl-refresh-learning/models/rpc.py
code served (permissive licence) · get_code("cf632e025b73ed65")
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 an instance of its own class, ContinualModel: the run constructed the object and did not call it, so no result was computed. 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
import torch.nn as nn
from torchvision import transforms
from argparse import Namespace

torch.manual_seed(0)

# Minimal backbone model
class TinyBackbone(nn.Module):
    def __init__(self):
        super().__init__()
        self.fc = nn.Linear(4, 3)
    
    def forward(self, x):
        return self.fc(x)

# Minimal loss function
loss_fn = nn.CrossEntropyLoss()

# Minimal transform
transform = transforms.Compose([
    transforms.ToTensor(),
])

# Arguments namespace with required parameters
args = Namespace(
    lr=0.01,
    batch_size=2,
    epochs=1,
)

# Build backbone
backbone = TinyBackbone()

# Construct ARGS dict
ARGS = {
    'backbone': backbone,
    'loss': loss_fn,
    'args': args,
    'transform': transform,
}
Setup block drafted by
a language model, Claude Haiku 4.5, prompt python_fixture_v1, through the batch API
Imports
torch, torchvision — import names as written, not package names to install; a name the repository itself provides is not a package
Returned
type ContinualModel — the run constructed an instance of its own class and did not call it; no shape is stated — the instrument coerces any output to an array; for a ContinualModel 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
calculate_output_image_size Ran
ran; our contract draft was wrong, not the code
joey-wang123/CL-refresh-learning/backbone/EfficientNet.py
code served (permissive licence) · get_code("79484137b284aee1")
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 math

def get_width_and_height_from_size(x):
    """Obtain height and width from x.
    Args:
        x (int, tuple or list): Data size.
    Returns:
        size: A tuple or list (H,W).
    """
    if isinstance(x, int):
        return (x, x)
    if isinstance(x, list) or isinstance(x, tuple):
        return x
    else:
        raise TypeError()

def calculate_output_image_size(input_image_size, stride):
    """Calculates the output image size when using Conv2dSamePadding with a stride.
       Necessary for static padding. Thanks to mannatsingh for pointing this out.
    Args:
        input_image_size (int, tuple or list): Size of input image.
        stride (int, tuple or list): Conv2d operation's stride.
    Returns:
        output_image_size: A list [H,W].
    """
    if input_image_size is None:
        return None
    image_height, image_width = get_width_and_height_from_size(input_image_size)
    stride = stride if isinstance(stride, int) else stride[0]
    image_height = int(math.ceil(image_height / stride))
    image_width = int(math.ceil(image_width / stride))
    return [image_height, image_width]


ARGS = {
    "input_image_size": (224, 224),
    "stride": 2
}
Setup block drafted by
a language model, Claude Haiku 4.5, prompt python_fixture_v1, through the batch API
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 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
conv3x3 Ran
ran; our contract draft was wrong, not the code
joey-wang123/CL-refresh-learning/backbone/ResNet18.py
code served (permissive licence) · get_code("4c2989ace7c5c0da")
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 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,
}
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 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
drop_connect Ran
ran; the contract check could not run (RAISES, DEP_MISSING or TIMEOUT)
joey-wang123/CL-refresh-learning/backbone/EfficientNet.py
code served (permissive licence) · get_code("f1e3c822763f3ebb")
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 4, dtype family float, shape (2, 4, 3, 5) 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 torch

torch.manual_seed(0)

# Construct arguments for drop_connect function
inputs = torch.randn(2, 4, 3, 5)  # BCWH format: batch=2, channels=4, width=3, height=5
p = 0.5  # probability of drop connection between 0 and 1
training = True  # boolean flag for training mode

ARGS = {
    "inputs": inputs,
    "p": p,
    "training": training
}
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 Tensor, ndim 4, dtype family float, shape (2, 4, 3, 5) — shape (2, 4, 3, 5) 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
dsimplex Ran
ran, honoured the contract we drafted
this paper's copy was not recorded; identical code first harvested from DigiTurk84/class-incremental-polytope
pointer only; the stored copy get_code serves, from DigiTurk84/class-incremental-polytope, is pointer only (licence: AGPL-3.0) · get_code("e966248eb1030e42")
How it ran

The body of this sample is withheld: this paper's copy of the code was not recorded (its link names no repository or source path), so no licence was read for 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_width_and_height_from_size Ran
ran, honoured the contract we drafted
joey-wang123/CL-refresh-learning/backbone/EfficientNet.py
code served (permissive licence) · get_code("ba6166d04ef2afdd")
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 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 torch
import numpy as np

torch.manual_seed(0)

# The function get_width_and_height_from_size takes a single parameter 'x'
# It can be an int, tuple, or list
# Let's test with an int value

ARGS = {
    "x": 256
}
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, ndim 1, dtype family int — 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
project Ran
ran; our contract draft was wrong, not the code
joey-wang123/CL-refresh-learning/models/agem.py
code served (permissive licence) · get_code("5d65b508e8b1cbad")
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 1, dtype family float, shape (4,) 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 torch

torch.manual_seed(0)

# Create two small distinct 1D tensors for the function
# gxy and ger are used with torch.dot() so they need to be 1D tensors
# Using different sizes to make dimensions unambiguous
gxy = torch.randn(4)
ger = torch.randn(4)

ARGS = {
    "gxy": gxy,
    "ger": ger,
}
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 Tensor, ndim 1, dtype family float, shape (4,) — shape (4,) 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
RPC Not yet run
unverified (harvested, no recorded run)
joey-wang123/cl-refresh-learning/models/rpc.py
code served (permissive licence) · get_code("3873d2de53005177")
How it ran

no invocation recorded.

get_dataset Not yet run
unverified (harvested, no recorded run)
joey-wang123/cl-refresh-learning/models/rpc.py
code served (permissive licence) · get_code("ac2160d3abca95cb")
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, 7 are also present in other papers whose code we hold (7 with at least one paper dated earlier, 4 the same month, 4 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
conv3x3 27 other papers
16 dated earlier, 1 the same month, 10 later
2010.05595 (2020-10)
Rethinking Experience Replay: a Bag of Tricks for Continual Learning
2108.06552 (2021-08)
Continual Semi-Supervised Learning through Contrastive Interpolation Consistency
2203.12817 (2022-03)
Continual Learning and Private Unlearning
and 24 more not named here
drop_connect 23 other papers
17 dated earlier, 1 the same month, 5 later · 2 only as an assembly brick
1905.11946 (2019-05)
EfficientNet: Rethinking Model Scaling for Convolutional Neural Networks
1912.01588 (2019-12)
Leveraging Procedural Generation to Benchmark Reinforcement Learning
2010.00475 (2020-10)
FSD50K: An Open Dataset of Human-Labeled Sound Events
and 20 more not named here
project 11 other papers
9 dated earlier, 2 later
2010.05595 (2020-10)
Rethinking Experience Replay: a Bag of Tricks for Continual Learning
2206.04016 (2022-06)
SYNERgy between SYNaptic consolidation and Experience Replay for general continual learning
aaai_26161 (2023 (year only))
Sparse Coding in a Dual Memory System for Lifelong Learning
and 8 more not named here
calculate_output_image_size 10 other papers
4 dated earlier, 1 the same month, 5 later · 2 only as an assembly brick
1905.11946 (2019-05)
EfficientNet: Rethinking Model Scaling for Convolutional Neural Networks
2201.04021 (2022-01)
Optimization Planning for 3D ConvNets
2304.10177 (2023-04)
Regularizing Second-Order Influences for Continual Learning
and 7 more not named here
get_width_and_height_from_size 4 other papers
3 dated earlier, 1 the same month · 2 only as an assembly brick
1905.11946 (2019-05)
EfficientNet: Rethinking Model Scaling for Convolutional Neural Networks
2201.04021 (2022-01)
Optimization Planning for 3D ConvNets
2203.02751 (2022-03)
MetaFormer: A Unified Meta Framework for Fine-Grained Recognition
and 1 more not named here
ContinualModel
brick of this paper's assembly: helper
3 other papers
3 dated earlier
2201.12604 (2022-01)
Learning Fast, Learning Slow: A General Continual Learning Method based on Complementary Learning System
2302.11344 (2023-02)
Error Sensitivity Modulation based Experience Replay: Mitigating Abrupt Representation Drift in Continual Learning
2302.11346 (2023-02)
Task-Aware Information Routing from Common Representation Space in Lifelong Learning
dsimplex
brick of this paper's assembly: helper
1 other paper
1 dated earlier
2010.08657 (2020-10)
Class-incremental Learning with Pre-allocated Fixed Classifiers

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-22.

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) focuses on learning from dynamic and changing data distributions while retaining previously acquired knowledge. Various methods have been developed to address the challenge of catastrophic forgetting, including regularization-based, Bayesian-based, and memory-replay-based techniques. However, these methods lack a unified framework and common terminology for describing their approaches. This research aims to bridge this gap by introducing a comprehensive and overarching framework that encompasses and reconciles these existing methodologies. Notably, this new framework is capable of encompassing established CL approaches as special instances within a unified and general optimization objective. An intriguing finding is that despite their diverse origins, these methods share common mathematical structures. This observation highlights the compatibility of these seemingly distinct techniques, revealing their interconnectedness through a shared underlying optimization objective. Moreover, the proposed general framework introduces an innovative concept called refresh learning, specifically designed to enhance the CL performance. This novel approach draws inspiration from neuroscience, where the human brain often sheds outdated information to improve the retention of crucial knowledge and facilitate the acquisition of new information. In essence, refresh learning operates by initially unlearning current data and subsequently relearning it. It serves as a versatile plug-in that seamlessly integrates with existing CL methods, offering an adaptable and effective enhancement to the learning process. Extensive experiments on CL benchmarks and theoretical analysis demonstrate the effectiveness of the proposed refresh learning. Code is available at https://github.com/joey-wang123/CL-refresh-learning.

For agents

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

get_harvested_code_for_paper("2403.13249")
get_code_for_paper("2403.13249")
have("2403.13249")

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

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

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

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

Connect an agent — have() is free.