SYNTOLOGY HomeExplorerAtlasCodeMethodologyAboutDevelopersFeedPricing
Paper · 2602.17559 · 2026

Revisiting Weight Regularization for Low-Rank Continual Learning

Joost Van De Weijer, Gido Van De Ven, Yaoyue Zheng, Shaoyi Du, Yin Zhang, Zhiqiang Tian, Xuetao Zhang

arXiv · PDF · Open in the Atlas

Code that ran

5 of 16 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, 1 violated it and 3 have no contract verdict; 1 failure of our instrument; 11 no recorded run), measured 2026-11-22; 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/2602.17559.json · badge: /api/ran/2602.17559.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
yaoyz96/low-rank-cl community
Papers with Code archive
5 ran · 11 no recorded run
FunctionStatusWhere it lives
Attention_LoRA Ran
ran on a synthesized input
yaoyz96/low-rank-cl/methods/ewclora.py
code served (permissive licence) · get_code("25f17a47f999cad9")
How it ran

Ran in Syntology's sandbox on this synthesized input (drafted by a language model, class construct-then-call prompt, model not recorded) and returned Tensor, ndim 3, 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 math

INIT_ARGS = {
    'dim': 8,
    'num_heads': 2,
    'qkv_bias': False,
    'scale': None,
    'attn_drop': 0.0,
    'proj_drop': 0.0,
    'r': 4,
    'n_tasks': 10,
}

ARGS = {
    'x': torch.randn(2, 3, 8),
    'use_new': True,
    'register_hook': False,
}

if __name__ == '__main__':
    from torch_class_fixture import Attention_LoRA
    
    model = Attention_LoRA(**INIT_ARGS)
    model.init_param()
    
    output = model(**ARGS)
    print(f"Output shape: {output.shape}")
    print(f"Output: {output}")
Setup block drafted by
a language model, class construct-then-call prompt, model not recorded
Imports
torch, torch_class_fixture — import names as written, not package names to install; a name the repository itself provides is not a package
Returned
type Tensor, ndim 3, dtype family float — no output shape is stated: observe_signature.py observed this class with its constructor sizes canonicalised where it could, which the node does not record, so its shape is not stated as this setup block's
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: torch and numpy seeded to 0 by the harness immediately before the class was constructed from INIT_ARGS (fixture_check.py)
Block Ran
ran on a synthesized input
yaoyz96/low-rank-cl/methods/ewclora.py
code served (permissive licence) · get_code("b99f52d9905d2c4e")
How it ran

Ran in Syntology's sandbox on this synthesized input (drafted by a language model, class construct-then-call prompt, model not recorded) and returned Tensor, ndim 3, 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
from timm.models.layers import PatchEmbed, Mlp, DropPath, trunc_normal_, lecun_normal_

INIT_ARGS = {
    'dim': 4,
    'num_heads': 2,
    'mlp_ratio': 2.0,
    'qkv_bias': False,
    'drop': 0.0,
    'attn_drop': 0.0,
    'init_values': 1e-5,
    'drop_path': 0.0,
    'act_layer': nn.GELU,
    'norm_layer': nn.LayerNorm,
    'n_tasks': 3,
    'r': 2
}

# Create input tensor matching the expected dimensions
batch_size = 2
seq_len = 3
input_tensor = torch.randn(batch_size, seq_len, INIT_ARGS['dim'])

ARGS = {
    'x': input_tensor,
    'use_new': True,
    'register_hook': False
}
Setup block drafted by
a language model, class construct-then-call prompt, model not recorded
Imports
numpy, timm, torch — import names as written, not package names to install; a name the repository itself provides is not a package
Returned
type Tensor, ndim 3, dtype family float — no output shape is stated: observe_signature.py observed this class with its constructor sizes canonicalised where it could, which the node does not record, so its shape is not stated as this setup block's
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: torch and numpy seeded to 0 by the harness immediately before the class was constructed from INIT_ARGS (fixture_check.py)
accuracy Ran
ran; our contract draft was wrong, not the code
yaoyz96/low-rank-cl/methods/ewclora.py
code served (permissive licence) · get_code("3e33e98123dcfc76")
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 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 numpy as np

# Construct valid arguments for the accuracy function
# The function compares predictions with ground truth labels across different class ranges

# Create sample prediction and ground truth arrays
np.random.seed(0)
batch_size = 20

# y_pred: predicted class labels (will be reshaped to 1D)
y_pred = np.random.randint(0, 50, size=(batch_size,))

# y_true: ground truth class labels (will be reshaped to 1D)
y_true = np.random.randint(0, 50, size=(batch_size,))

# known_classes: threshold separating "old" classes from "new" classes
known_classes = 30

# increment: size of class ranges for binning accuracy
increment = 10

ARGS = {
    'y_pred': y_pred,
    'y_true': y_true,
    'known_classes': known_classes,
    'increment': increment
}
Setup block drafted by
a language model, Claude Haiku 4.5, prompt python_fixture_v1
Imports
numpy — 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
check_params_consistency Ran
ran, violated the contract we drafted
yaoyz96/low-rank-cl/methods/ewclora.py
code served (permissive licence) · get_code("c19addf3add85594")
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 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 torch
import torch.nn as nn

torch.manual_seed(0)

# Build a simple model with some parameters
class SimpleModel(nn.Module):
    def __init__(self):
        super().__init__()
        self.linear1 = nn.Linear(4, 3)
        self.linear2 = nn.Linear(3, 2)
    
    def forward(self, x):
        x = self.linear1(x)
        x = self.linear2(x)
        return x

model = SimpleModel()

# Create an optimizer that includes all requires_grad parameters
optimizer = torch.optim.SGD(model.parameters(), lr=0.01)

ARGS = {
    'model': model,
    'optimizer': optimizer
}
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 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
get_init_weights_vit Ran
ran on a synthesized input
yaoyz96/low-rank-cl/methods/ewclora.py
code served (permissive licence) · get_code("1c3a1d671783f6ce")
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 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:
# 1. mode: str (default 'jax')
# 2. head_bias: float (default 0.0)

ARGS = {
    'mode': 'jax',
    'head_bias': 0.0,
}
Setup block drafted by
a language model, Claude Haiku 4.5, prompt python_fixture_v1
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
BaseLearner Not yet run
unverified (harvested, no recorded run)
yaoyz96/low-rank-cl/methods/ewclora.py
code served (permissive licence) · get_code("79e232a82a8317e0")
How it ran

no invocation recorded.

EWCLoRA Not yet run
unverified (harvested, no recorded run)
yaoyz96/low-rank-cl/methods/ewclora.py
code served (permissive licence) · get_code("4df20d611db646e5")
How it ran

no invocation recorded.

FisherComputer Not yet run
unverified (harvested, no recorded run)
yaoyz96/low-rank-cl/methods/ewclora.py
code served (permissive licence) · get_code("585320a672c22637")
How it ran

no invocation recorded.

Net Not yet run
unverified (harvested, no recorded run)
yaoyz96/low-rank-cl/methods/ewclora.py
code served (permissive licence) · get_code("41a602801a796df2")
How it ran

no invocation recorded.

ViT Not yet run
unverified (harvested, no recorded run)
yaoyz96/low-rank-cl/methods/ewclora.py
code served (permissive licence) · get_code("875a0b9857869b05")
How it ran

no invocation recorded.

_create_vision_transformer Not yet run
unverified (harvested, no recorded run)
yaoyz96/low-rank-cl/methods/ewclora.py
code served (permissive licence) · get_code("907d8094e8282414")
How it ran

no invocation recorded.

_load_weights Not yet run
unverified (harvested, no recorded run)
yaoyz96/low-rank-cl/methods/ewclora.py
code served (permissive licence) · get_code("5630cc0b3ca7ec6e")
How it ran

no invocation recorded.

init_weights_vit_jax Not yet run
unverified (harvested, no recorded run)
yaoyz96/low-rank-cl/methods/ewclora.py
code served (permissive licence) · get_code("154dd87d249bfdc1")
How it ran

no invocation recorded.

init_weights_vit_moco Not yet run
unverified (harvested, no recorded run)
yaoyz96/low-rank-cl/methods/ewclora.py
code served (permissive licence) · get_code("1df0cf8a8e509c50")
How it ran

no invocation recorded.

init_weights_vit_timm Not yet run
unverified (harvested, no recorded run)
yaoyz96/low-rank-cl/methods/ewclora.py
code served (permissive licence) · get_code("653d76549a080d2a")
How it ran

no invocation recorded.

print_trainable_params Not yet run
unverified (harvested, no recorded run)
yaoyz96/low-rank-cl/methods/ewclora.py
code served (permissive licence) · get_code("7b7ce32f6dcbb99f")
How it ran

no invocation recorded.

Also present in other papers' code

Of 16 samples lifted from this paper's linked repositories, 16 carry a function identity and 0 do not. Of the 16 distinct functions with an identity, 5 are also present in other papers whose code we hold (5 with at least one paper dated earlier, 0 the same month, 1 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.

FunctionAlso present inEarliest-datedOthers named
get_init_weights_vit
brick of this paper's assembly: helper
25 other papers
24 dated earlier, 1 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
init_weights_vit_timm
brick of this paper's assembly: helper
4 other papers
4 dated earlier · 1 only as an assembly brick
2010.11929 (2020-10)
An Image is Worth 16x16 Words: Transformers for Image Recognition at Scale
2304.07193 (2023-04)
DINOv2: Learning Robust Visual Features without Supervision
2403.08568 (2024-03)
Consistent Prompting for Rehearsal-Free Continual Learning
and 1 more not named here
_load_weights
brick of this paper's assembly: helper
2 other papers
2 dated earlier
2403.08568 (2024-03)
Consistent Prompting for Rehearsal-Free Continual Learning
2404.00228 (2024-04)
InfLoRA: Interference-Free Low-Rank Adaptation for Continual Learning
init_weights_vit_jax
brick of this paper's assembly: helper
2 other papers
2 dated earlier · 1 only as an assembly brick
2403.08568 (2024-03)
Consistent Prompting for Rehearsal-Free Continual Learning
2404.00228 (2024-04)
InfLoRA: Interference-Free Low-Rank Adaptation for Continual Learning
init_weights_vit_moco
brick of this paper's assembly: helper
2 other papers
2 dated earlier · 1 only as an assembly brick
2403.08568 (2024-03)
Consistent Prompting for Rehearsal-Free Continual Learning
2404.00228 (2024-04)
InfLoRA: Interference-Free Low-Rank Adaptation for Continual Learning

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) with large-scale pre-trained models (PTMs) has recently gained wide attention, shifting the focus from training from scratch to continually adapting PTMs. This has given rise to a promising paradigm: parameterefficient continual learning (PECL), where task interference is typically mitigated by assigning a task-specific module during training, such as low-rank adapters. However, weight regularization techniques, such as Elastic Weight Consolidation (EWC)-a key strategy in CL-remain underexplored in this new paradigm. In this paper, we revisit weight regularization in low-rank CL as a new perspective for mitigating task interference in PECL. Unlike existing low-rank CL methods, we mitigate task interference by regularizing a shared low-rank update through EWC, thereby keeping the storage requirement and inference costs constant regardless of the number of tasks. Our proposed method EWC-LoRA leverages a lowrank representation to estimate parameter importance over the full-dimensional space. This design offers a practical, computational-and memory-efficient solution for CL with PTMs, and provides insights that may inform the broader application of regularization techniques within PECL. Extensive experiments on various benchmarks demonstrate the effectiveness of EWC-LoRA, achieving a stability-plasticity trade-off superior to existing low-rank CL approaches. These results indicate that, even under low-rank parameterizations, weight regularization remains an effective mechanism for mitigating task interference. Code is available at: https://github.com/yaoyz96/low-rank-cl.

For agents

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

get_harvested_code_for_paper("2602.17559")
get_code_for_paper("2602.17559")
have("2602.17559")

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

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

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

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

Connect an agent — have() is free.