SYNTOLOGY HomeExplorerAtlasCodeMethodologyAboutDevelopersFeedPricing
Paper · 2404.00228 · CVPR · 2024

InfLoRA: Interference-Free Low-Rank Adaptation for Continual Learning

Yan-Shuo Liang, Wu-Jun Li

arXiv · PDF · Open in the Atlas

Code that ran

3 of 10 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 1 has no contract verdict; 2 failures of our instrument; 7 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/2404.00228.json · badge: /api/ran/2404.00228.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
liangyanshuo/InfLoRA marked official in Papers with Code
Papers with Code archive
3 ran · 7 no recorded run
FunctionStatusWhere it lives
Attention_LoRA Ran
ran on a synthesized input
liangyanshuo/InfLoRA/methods/inflora.py
code served (permissive licence) · get_code("7fc74661bb506da7")
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': 4,
    'num_heads': 2,
    'qkv_bias': False,
    'qk_scale': None,
    'attn_drop': 0.1,
    'proj_drop': 0.1,
    'r': 2,
    'n_tasks': 3,
}

ARGS = {
    'x': torch.randn(2, 3, 4),
    'task': 1,
    'register_hook': False,
    'get_feat': False,
    'get_cur_feat': False,
}
Setup block drafted by
a language model, class construct-then-call prompt, model not recorded
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 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)
checkpoint_filter_fn Ran
ran; our contract draft was wrong, not the code
liangyanshuo/InfLoRA/methods/inflora.py
code served (permissive licence) · get_code("4eeb738096393d87")
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 torch
import torch.nn as nn
import math

torch.manual_seed(0)

# Build a minimal model that satisfies the function's usage
class PatchEmbed(nn.Module):
    def __init__(self):
        super().__init__()
        # proj.weight shape: (O, I, H, W) = (16, 12, 4, 4)
        self.proj = nn.Conv2d(3, 16, kernel_size=4, stride=4)
        self.grid_size = (8, 8)

class MinimalModel(nn.Module):
    def __init__(self):
        super().__init__()
        self.patch_embed = PatchEmbed()
        # pos_embed shape: (1, num_tokens + grid_size[0]*grid_size[1], embed_dim)
        # num_tokens=1, grid_size=(8,8), so 1 + 64 = 65 tokens
        self.pos_embed = nn.Parameter(torch.randn(1, 65, 768))
        self.num_tokens = 1

model = MinimalModel()

# Create a state_dict with position embedding that needs resizing
# Original pos_embed with different grid size: (1, 17, 768) = 1 token + 4x4 grid
state_dict = {
    'pos_embed': torch.randn(1, 17, 768),
    'patch_embed.proj.weight': torch.randn(16, 12, 4, 4),
    'other_param': torch.randn(10, 10)
}

ARGS = {
    'state_dict': state_dict,
    'model': model
}
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 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
resize_pos_embed Ran
ran; the contract check could not run (RAISES, DEP_MISSING or TIMEOUT)
liangyanshuo/InfLoRA/methods/inflora.py
code served (permissive licence) · get_code("19b12af6590323f6")
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 Tensor, ndim 3, dtype family float, shape (1, 17, 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 math

torch.manual_seed(0)

# Create posemb tensor: shape (batch=1, seq_len=10, dim=4)
# seq_len includes num_tokens (1) + grid tokens (9, which is 3x3)
posemb = torch.randn(1, 10, 4)

# Create posemb_new tensor with different spatial dimensions
# For example, 4x4 grid = 16 tokens + 1 class token = 17 total
posemb_new = torch.randn(1, 17, 4)

# num_tokens: number of special tokens (like class token) to preserve
num_tokens = 1

# gs_new: target grid size (height, width) for spatial dimensions
# 4x4 grid for the new embedding
gs_new = (4, 4)

ARGS = {
    'posemb': posemb,
    'posemb_new': posemb_new,
    'num_tokens': num_tokens,
    'gs_new': gs_new,
}
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 Tensor, ndim 3, dtype family float, shape (1, 17, 4) — shape (1, 17, 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
BaseLearner Not yet run
unverified (harvested, no recorded run)
liangyanshuo/InfLoRA/methods/inflora.py
code served (permissive licence) · get_code("222edc61eeca890a")
How it ran

no invocation recorded.

Block Not yet run
unverified (harvested, no recorded run)
liangyanshuo/InfLoRA/methods/inflora.py
code served (permissive licence) · get_code("47dda0c70839da58")
How it ran

no invocation recorded.

InfLoRA Not yet run
unverified (harvested, no recorded run)
liangyanshuo/InfLoRA/methods/inflora.py
code served (permissive licence) · get_code("1b3bf1e887a758b1")
How it ran

no invocation recorded.

SiNet Not yet run
unverified (harvested, no recorded run)
liangyanshuo/InfLoRA/methods/inflora.py
code served (permissive licence) · get_code("ecad0e19092b3a07")
How it ran

no invocation recorded.

ViT_lora_co Not yet run
unverified (harvested, no recorded run)
liangyanshuo/InfLoRA/methods/inflora.py
code served (permissive licence) · get_code("84a2cb412dfdc495")
How it ran

no invocation recorded.

_create_vision_transformer Not yet run
unverified (harvested, no recorded run)
liangyanshuo/InfLoRA/methods/inflora.py
code served (permissive licence) · get_code("20b9b6a55783a6e5")
How it ran

no invocation recorded.

_load_weights Not yet run
unverified (harvested, no recorded run)
liangyanshuo/InfLoRA/methods/inflora.py
code served (permissive licence) · get_code("1753ff7e1c2b9442")
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, 3 are also present in other papers whose code we hold (3 with at least one paper dated earlier, 2 the same month, 3 later) and 7 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
checkpoint_filter_fn
brick of this paper's assembly: helper
37 other papers
23 dated earlier, 2 the same month, 10 later, 2 same year, order not determinable · 1 only as an assembly brick
2105.12723 (2021-05)
Nested Hierarchical Transformer: Towards Accurate, Data-Efficient and Interpretable Visual Understanding
2112.07658 (2021-12)
AdaViT: Adaptive Tokens for Efficient Vision Transformer
and 34 more not named here
resize_pos_embed
brick of this paper's assembly: helper
20 other papers
13 dated earlier, 2 the same month, 5 later · 1 only as an assembly brick
2105.12723 (2021-05)
Nested Hierarchical Transformer: Towards Accurate, Data-Efficient and Interpretable Visual Understanding
2202.07800 (2022-02)
Not All Patches are What You Need: Expediting Vision Transformers via Token Reorganizations
and 17 more not named here
_load_weights
brick of this paper's assembly: helper
2 other papers
1 dated earlier, 1 later
2403.08568 (2024-03)
Consistent Prompting for Rehearsal-Free Continual Learning
2602.17559 (2026-02)
Revisiting Weight Regularization for Low-Rank 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-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

Continual learning requires the model to learn multiple tasks sequentially. In continual learning, the model should possess the ability to maintain its performance on old tasks (stability) and the ability to adapt to new tasks continuously (plasticity). Recently, parameter-efficient finetuning (PEFT), which involves freezing a pre-trained model and injecting a small number of learnable parameters to adapt to downstream tasks, has gained increasing popularity in continual learning. Although existing continual learning methods based on PEFT have demonstrated superior performance compared to those not based on PEFT, most of them do not consider how to eliminate the interference of the new task on the old tasks, which inhibits the model from making a good trade-off between stability and plasticity. In this work, we propose a new PEFT method, called interference-free low-rank adaptation (InfLoRA), for continual learning. InfLoRA injects a small number of parameters to reparameterize the pre-trained weights and shows that fine-tuning these injected parameters is equivalent to fine-tuning the pre-trained weights within a subspace. Furthermore, InfLoRA designs this subspace to eliminate the interference of the new task on the old tasks, making a good trade-off between stability and plasticity. Experimental results show that InfLoRA outperforms existing state-of-theart continual learning methods on multiple datasets. Code is available at https://github.com/liangyanshuo/ InfLoRA.

For agents

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

get_harvested_code_for_paper("2404.00228")
get_code_for_paper("2404.00228")
have("2404.00228")

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

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

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

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

Connect an agent — have() is free.