SYNTOLOGY HomeExplorerAtlasCodeMethodologyAboutDevelopersFeedPricing
Paper · 2409.10956 · ECCV · 2024

Versatile Incremental Learning: Towards Class and Domain-Agnostic Incremental Learning

Min-Yeong Park, Gyeong-Moon Park, Jae-Ho Lee

arXiv · PDF · Open in the Atlas

Code that ran

7 of 10 samples (functions and classes) lifted from this paper's linked repositories executed on a synthesized input in Syntology's jail (1 of them constructed an object rather than computing a result; 0 honoured the contract we drafted, 3 violated it and 1 has no contract verdict; 3 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/2409.10956.json · badge: /api/ran/2409.10956.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
khu-agi/vil canonical (classifier label)
classifier basis: census
6 ran · 3 no recorded run
KHU-AGI/VIL community
Papers with Code archive
1 ran · 0 no recorded run
FunctionStatusWhere it lives
Prompt Ran
ran on a synthesized input · constructed an object; no result was computed
KHU-AGI/VIL/prompt.py
code served (permissive licence) · get_code("2829557b0b54fe97")
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, Prompt: 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

torch.manual_seed(0)

ARGS = {
    'length': 5,
    'embed_dim': 4,
    'embedding_key': 'mean',
    'prompt_init': 'uniform',
    'prompt_pool': True,
    'prompt_key': True,
    'pool_size': 8,
    'top_k': 3,
    'batchwise_prompt': False,
    'prompt_key_init': 'uniform',
}
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 Prompt — 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 Prompt 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_md5 Ran
ran; our contract draft was wrong, not the code
khu-agi/vil/continual_datasets/dataset_utils.py
code served (permissive licence) · get_code("5c3574e986df9984")
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 str. 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 hashlib
import tempfile
import os

# Create a temporary file with some test content
with tempfile.NamedTemporaryFile(mode='wb', delete=False, suffix='.bin') as f:
    temp_file_path = f.name
    f.write(b'This is test content for MD5 calculation. ' * 100)

ARGS = {
    'fpath': temp_file_path,
    'chunk_size': 1024 * 1024,
}
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 str — a str output has no array shape of its own; none is stated — the instrument coerces any output to an array; for a str 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
check_integrity Ran
ran, violated the contract we drafted
khu-agi/vil/continual_datasets/dataset_utils.py
code served (permissive licence) · get_code("46b62ccc9e5b9878")
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 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.

import os
import tempfile

# Create a temporary file for testing
with tempfile.NamedTemporaryFile(mode='w', delete=False, suffix='.txt') as f:
    temp_file_path = f.name
    f.write("test content for md5 calculation")

# Calculate the MD5 hash of the test file
import hashlib

def calculate_md5(fpath, chunk_size=1024 * 1024):
    md5 = hashlib.md5()
    with open(fpath, 'rb') as f:
        for chunk in iter(lambda: f.read(chunk_size), b''):
            md5.update(chunk)
    return md5.hexdigest()

expected_md5 = calculate_md5(temp_file_path)

ARGS = {
    'fpath': temp_file_path,
    'md5': expected_md5
}
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 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
check_md5 Ran
ran, violated the contract we drafted
khu-agi/vil/continual_datasets/dataset_utils.py
code served (permissive licence) · get_code("b3cb500b2f04323d")
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 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.

import tempfile
import os
import hashlib

# Create a temporary file with known content
temp_dir = tempfile.mkdtemp()
temp_file = os.path.join(temp_dir, "test_file.bin")

# Write some test data to the file
test_data = b"Hello, this is test content for MD5 calculation!"
with open(temp_file, 'wb') as f:
    f.write(test_data)

# Calculate the actual MD5 hash of the test file
md5_hash = hashlib.md5()
md5_hash.update(test_data)
correct_md5 = md5_hash.hexdigest()

# Define arguments for check_md5 function
ARGS = {
    'fpath': temp_file,
    'md5': correct_md5
}
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 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
checkpoint_filter_fn Ran
ran; our contract draft was wrong, not the code
khu-agi/vil/vision_transformer.py
code served (permissive licence) · get_code("14bd25205914cc19")
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 dict. 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
import math

torch.manual_seed(0)

# Build a minimal model that has the attributes accessed by checkpoint_filter_fn
class MinimalPatchEmbed(nn.Module):
    def __init__(self):
        super().__init__()
        self.proj = nn.Conv2d(3, 8, kernel_size=4, stride=4)
        self.grid_size = (4, 4)

class MinimalModel(nn.Module):
    def __init__(self):
        super().__init__()
        self.patch_embed = MinimalPatchEmbed()
        # pos_embed shape: (1, num_patches + num_prefix_tokens, embed_dim)
        # num_patches = 4*4 = 16, num_prefix_tokens = 1, embed_dim = 8
        self.pos_embed = nn.Parameter(torch.randn(1, 17, 8))
        self.num_prefix_tokens = 1
        self.no_embed_class = False

model = MinimalModel()

# Build a state_dict with realistic checkpoint structure
state_dict = {
    'patch_embed.proj.weight': torch.randn(8, 3, 4, 4),
    'patch_embed.proj.bias': torch.randn(8),
    'pos_embed': torch.randn(1, 17, 8),
    'blocks.0.attn.qkv.weight': torch.randn(24, 8),
    'blocks.0.mlp.fc1.weight': torch.randn(32, 8),
}

ARGS = {
    'state_dict': state_dict,
    'model': model,
    'adapt_layer_scale': False,
    'interpolation': 'bicubic',
    'antialias': True,
}
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 dict — a dict output has no array shape of its own; none is stated — the instrument coerces any output to an array; for a dict 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
get_init_weights_vit Ran
ran; our contract draft was wrong, not the code
khu-agi/vil/vision_transformer.py
code served (permissive licence) · get_code("b5dbfbeaf3d26a90")
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)

# The function get_init_weights_vit takes two parameters: mode and head_bias
# It returns a partial function or direct function reference

# mode: str - can be 'jax', 'moco', or 'timm'
# head_bias: float - bias value for head initialization

ARGS = {
    'mode': 'jax',
    'head_bias': 0.0,
}
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
target_transform Ran
ran, violated the contract we drafted
khu-agi/vil/datasets.py
code served (permissive licence) · get_code("265ea374aab10001")
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
import numpy as np

torch.manual_seed(0)

# Analyze the function: target_transform(x, nb_classes)
# The function returns x + nb_classes
# x should be numeric (supports addition)
# nb_classes should be numeric (supports addition with x)

# Create a small numeric value for x
x = torch.tensor([1, 2, 3, 4], dtype=torch.float32)

# Create a small numeric value for nb_classes
nb_classes = 10

ARGS = {
    'x': x,
    'nb_classes': nb_classes
}
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 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
build_continual_dataloader Not yet run
unverified (harvested, no recorded run)
khu-agi/vil/datasets.py
code served (permissive licence) · get_code("2611aacc84aff693")
How it ran

no invocation recorded.

get_dataset Not yet run
unverified (harvested, no recorded run)
khu-agi/vil/datasets.py
code served (permissive licence) · get_code("e138f1f9a877a6d3")
How it ran

no invocation recorded.

resize_pos_embed Not yet run
unverified (harvested, no recorded run)
khu-agi/vil/vision_transformer.py
code served (permissive licence) · get_code("ed04551ca8295bde")
How it ran

no invocation recorded.

Also present in other papers' code

Of 10 samples lifted from this paper's linked repositories, 10 carry a function identity and 0 do not. Of the 10 distinct functions with an identity, 7 are also present in other papers whose code we hold (7 with at least one paper dated earlier, 3 the same month, 1 later) and 3 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
20 dated earlier, 1 the same month, 4 later · 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
calculate_md5 13 other papers
12 dated earlier, 1 same year, order not determinable
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
12 dated earlier, 1 same year, order not determinable
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 dated earlier
2112.08654 (2021-12)
Learning to Prompt for Continual Learning
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
and 3 more not named here
check_integrity 5 other papers
5 dated earlier
2003.09553 (2020-03)
Adversarial Continual Learning
2106.05390 (2021-06)
Optimizing Reusable Knowledge for Continual Learning via Metalearning
2112.08654 (2021-12)
Learning to Prompt for Continual Learning
and 2 more not named here
resize_pos_embed 3 other papers
2 dated earlier, 1 the same month
2402.00865 (2024-02)
Towards Optimal Feature-Shaping Methods for Out-of-Distribution Detection
2407.20171 (2024-07)
Diffusion Feedback Helps CLIP See Better
2409.17978 (2024-09)
HydraViT: Stacking Heads for a Scalable ViT
checkpoint_filter_fn 2 other papers
1 dated earlier, 1 the same month
2311.15264 (2023-11)
ChAda-ViT : Channel Adaptive Attention for Joint Representation Learning of Heterogeneous Microscopy Images
2409.17978 (2024-09)
HydraViT: Stacking Heads for a Scalable ViT

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

Incremental Learning (IL) aims to accumulate knowledge from sequential input tasks while overcoming catastrophic forgetting. Existing IL methods typically assume that an incoming task has only increments of classes or domains, referred to as Class IL (CIL) or Domain IL (DIL), respectively. In this work, we consider a more challenging and realistic but under-explored IL scenario, named Versatile Incremental Learning (VIL), in which a model has no prior of which of the classes or domains will increase in the next task. In the proposed VIL scenario, the model faces intra-class domain confusion and interdomain class confusion, which makes the model fail to accumulate new knowledge without interference with learned knowledge. To address these issues, we propose a simple yet effective IL framework, named Incremental Classifier with Adaptation Shift cONtrol (ICON). Based on shifts of learnable modules, we design a novel regularization method called Cluster-based Adaptation Shift conTrol (CAST) to control the model to avoid confusion with the previously learned knowledge and thereby accumulate the new knowledge more effectively. Moreover, we introduce an Incremental Classifier (IC) which expands its output nodes to address the overwriting issue from different domains corresponding to a single class while maintaining the previous knowledge. We conducted extensive experiments on three benchmarks, showcasing the effectiveness of our method across all the scenarios, particularly in cases where the next task can be randomly altered. Our implementation code is available at https://github.com/KHU-AGI/VIL.

For agents

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

get_harvested_code_for_paper("2409.10956")
get_code_for_paper("2409.10956")
have("2409.10956")

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

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

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

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

Connect an agent — have() is free.