SYNTOLOGY HomeExplorerAtlasCodeMethodologyAboutDevelopersFeedPricing
Paper · 2209.07529 · ICLR · 2023

On the Soft-Subnetwork for Few-shot Class Incremental Learning

Jaehong Yoon, Sung Hwang, Chang Yoo, Haeyong Kang, Rizky Madjid

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 (4 of them constructed an object rather than computing a result; 0 honoured the contract we drafted, 0 violated it and 4 have no contract verdict; 3 failures of our instrument; 3 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/2209.07529.json · badge: /api/ran/2209.07529.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
ihaeyong/SoftNet-FSCIL canonical (classifier label)
classifier basis: classifier_2025
1 ran · 0 no recorded run
ihaeyong/softnet-fscil marked official in Papers with Code
Papers with Code archive
4 ran · 3 no recorded run
ihaeyong/SoftNet-3DLS community
Papers with Code archive
2 ran · 0 no recorded run
FunctionStatusWhere it lives
GetSubnetFaster Ran
ran on a synthesized input · constructed an object; no result was computed
ihaeyong/SoftNet-3DLS/subnet.py
pointer only (licence: NONE) · get_code("01a1c6132f5eb4b8")
How it ran

The body of this sample is withheld: GitHub detected no licence in this paper's repository, ihaeyong/SoftNet-3DLS when it was checked. 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.

GetSubnetFaster Ran
ran on a synthesized input · constructed an object; no result was computed
ihaeyong/softnet-fscil/methods/archs/resnet18_softnet_arch.py
code served (permissive licence) · get_code("2e8d7cbd17164bef")
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, GetSubnetFaster: 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

torch.manual_seed(0)

# Create tiny tensors for the function parameters
scores = torch.randn(2, 4)  # scores tensor
zeros = torch.zeros(2, 4)    # zeros tensor
ones = torch.ones(2, 4)      # ones tensor
sparsity = 50.0              # sparsity as float (percentage)
smooth = False               # boolean flag for smoothing

ARGS = {
    'scores': scores,
    'zeros': zeros,
    'ones': ones,
    'sparsity': sparsity,
    'smooth': smooth
}
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 GetSubnetFaster — 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 GetSubnetFaster 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
SignetConv2d Ran
ran on a synthesized input · constructed an object; no result was computed
ihaeyong/softnet-fscil/methods/archs/resnet18_softnet_arch.py
code served (permissive licence) · get_code("73bdb379e42aa1d3")
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, SignetConv2d: 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
import math

torch.manual_seed(0)

# Create a small input tensor for testing
# batch_size=2, channels=3, height=4, width=4
input_tensor = torch.randn(2, 3, 4, 4)

# Define arguments for SignetConv2d
ARGS = {
    'in_channels': 3,
    'out_channels': 4,
    'kernel_size': 3,
    'stride': 1,
    'padding': 1,
    'bias': False,
    'trainable': True,
    'gamma': 0.9
}
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 SignetConv2d — 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 SignetConv2d 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
SignetLinear Ran
ran on a synthesized input · constructed an object; no result was computed
ihaeyong/softnet-fscil/methods/archs/resnet18_softnet_arch.py
code served (permissive licence) · get_code("2325348b7ad972a5")
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, SignetLinear: 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
import math

torch.manual_seed(0)

ARGS = {
    'in_features': 4,
    'out_features': 3,
    'bias': False,
    'trainable': True,
    'gamma': 0.9,
}
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 SignetLinear — 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 SignetLinear 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
percentile Ran
ran; our contract draft was wrong, not the code
ihaeyong/SoftNet-3DLS/subnet.py
pointer only (licence: NONE) · get_code("913e2d426938c7d4")
How it ran

The body of this sample is withheld: GitHub detected no licence in this paper's repository, ihaeyong/SoftNet-3DLS when it was checked. 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.

signet_conv3x3 Ran
ran; our contract draft was wrong, not the code
ihaeyong/SoftNet-FSCIL/methods/archs/resnet18_softnet_arch.py
code served (permissive licence) · get_code("4f3ac359bde3a2bd")
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 SignetConv2d. 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)

# Define the SignetConv2d and helper classes/functions
class SignetConv2d(nn.Conv2d):

    def __init__(self, in_channels, out_channels, kernel_size, stride=1, padding=0, bias=False, trainable=True, gamma=0.9):
        super(self.__class__, self).__init__(in_channels=in_channels, out_channels=out_channels, kernel_size=kernel_size, stride=stride, padding=padding, bias=bias)
        self.stride = stride
        self.gamma = gamma
        self.sparsity = 0.1
        self.trainable = trainable
        self.smooth = False
        self.w_m = nn.Parameter(torch.empty(out_channels, in_channels, kernel_size, kernel_size))
        self.weight_mask = None
        self.zeros_weight, self.ones_weight = (torch.zeros(self.w_m.shape), torch.ones(self.w_m.shape))
        if bias:
            self.b_m = nn.Parameter(torch.empty(out_channels))
            self.bias_mask = None
            self.zeros_bias, self.ones_bias = (torch.zeros(self.b_m.shape), torch.ones(self.b_m.shape))
        else:
            self.register_parameter('bias', None)
        self.init_mask_parameters()
        self.alpha = None
        if trainable == False:
            raise Exception('Non-trainable version is not yet implemented')

    def forward(self, x, weight_mask=None, bias_mask=None, mode='train', sparsity=None):
        w_pruned, b_pruned = (None, None)
        if mode == 'train':
            smooth = True if sparsity is True else False
            if weight_mask is None:
                self.weight_mask = GetSubnetFaster.apply(self.w_m, self.zeros_weight, self.ones_weight, self.sparsity, self.smooth)
            else:
                self.weight_mask = weight_mask
            w_pruned = self.weight_mask * self.weight
            b_pruned = None
            if self.bias is not None:
                self.bias_mask = self.b_m
                b_pruned = self.bias_mask * self.bias
        elif mode == 'valid':
            w_pruned = self.weight_mask * self.weight
            b_pruned = None
            if self.bias is not None:
                b_pruned = self.bias_mask * self.bias
        elif mode == 'test':
            if weight_mask is None:
                pass
            if self.alpha is not None:
                w_pruned = weight_mask * self.weight * self.alpha
            else:
                w_pruned = weight_mask * self.weight
            b_pruned = None
            if self.bias is not None:
                b_pruned = bias_mask * self.bias
        else:
            raise Exception('[ERROR] The mode ' + str(mode) + ' is not supported!')
        return torch.nn.functional.conv2d(input=x, weight=w_pruned, bias=b_pruned, stride=self.stride, padding=self.padding)

    def init_mask_parameters(self):
        nn.init.kaiming_uniform_(self.w_m, a=math.sqrt(5))
        if self.bias is not None:
            fan_in, _ = nn.init._calculate_fan_in_and_fan_out(self.w_m)
            bound = 1 / math.sqrt(fan_in)
            nn.init.uniform_(self.b_m, -bound, bound)

class GetSubnetFaster(torch.autograd.Function):

    @staticmethod
    def forward(ctx, scores, zeros, ones, sparsity, smooth):
        with torch.no_grad():
            k_val = percentile(scores.abs(), sparsity * 100)
            if smooth:
                zeros = torch.distributions.Uniform(0, 1.0).sample(zeros.size())
            else:
                'HardNet: zeros'
                None
            output = torch.where(scores.abs() < k_val, zeros.to(scores.device), ones.to(scores.device))
            ctx.save_for_backward(output)
        return output

    @staticmethod
    def backward(ctx, g):
        return (g, None, None, None, None)

def percentile(scores, sparsity):
    k = 1 + round(0.01 * float(sparsity) * (scores.numel() - 1))
    return scores.view(-1).kthvalue(k).values.item()

def signet_conv3x3(in_planes, out_planes, stride=1, kernel_size=3):
    return SignetConv2d(in_planes, out_planes, kernel_size=kernel_size, stride=stride, padding=1, bias=False)

ARGS = {
    'in_planes': 3,
    'out_planes': 16,
    'stride': 1,
    'kernel_size': 3,
}
Setup block drafted by
a language model, Claude Haiku 4.5, prompt python_fixture_v1
Imports
numpy, torch — import names as written, not package names to install; a name the repository itself provides is not a package
Returned
type SignetConv2d — a SignetConv2d output has no array shape of its own; none is stated — the instrument coerces any output to an array; for a SignetConv2d 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
signet_conv3x3 Ran
ran; our contract draft was wrong, not the code
ihaeyong/softnet-fscil/methods/archs/resnet18_softnet_arch.py
code served (permissive licence) · get_code("dd80de86c7f6c88a")
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 SignetConv2d. 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)

# Define the ARGS dictionary for signet_conv3x3
ARGS = {
    'in_planes': 3,
    'out_planes': 4,
    'stride': 1,
    'kernel_size': 3,
}
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 SignetConv2d — a SignetConv2d output has no array shape of its own; none is stated — the instrument coerces any output to an array; for a SignetConv2d 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
SignetBasicBlock Not yet run
unverified (harvested, no recorded run)
ihaeyong/softnet-fscil/methods/archs/resnet18_softnet_arch.py
code served (permissive licence) · get_code("464f918614881570")
How it ran

no invocation recorded.

SignetResNet Not yet run
unverified (harvested, no recorded run)
ihaeyong/softnet-fscil/methods/archs/resnet18_softnet_arch.py
code served (permissive licence) · get_code("83dbfe5c0b870246")
How it ran

no invocation recorded.

mySequential Not yet run
unverified (harvested, no recorded run)
ihaeyong/softnet-fscil/methods/archs/resnet18_softnet_arch.py
code served (permissive licence) · get_code("bd0d3a6942db3032")
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 9 distinct functions with an identity, 1 are also present in other papers whose code we hold (0 with at least one paper dated earlier, 0 the same month, 1 later) and 8 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
percentile
brick of this paper's assembly: helper
1 other paper
1 later
2312.11973 (2023-12)
Continual Learning: Forget-free Winning Subnetworks for Video Representations

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

Inspired by Regularized Lottery Ticket Hypothesis, which states that competitive smooth (non-binary) subnetworks exist within a dense network, we propose a fewshot class-incremental learning method referred to as Soft-SubNetworks (SoftNet). Our objective is to learn a sequence of sessions incrementally, where each session only includes a few training instances per class while preserving the knowledge of the previously learned ones. SoftNet jointly learns the model weights and adaptive non-binary soft masks at a base training session in which each mask consists of the major and minor subnetwork; the former aims to minimize catastrophic forgetting during training, and the latter aims to avoid overfitting to a few samples in each new training session. We provide comprehensive empirical validations demonstrating that our SoftNet effectively tackles the few-shot incremental learning problem by surpassing the performance of state-of-the-art baselines over benchmark datasets. The public code is available at https://github.com/ihaeyong/ SoftNet-FSCIL.

For agents

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

get_harvested_code_for_paper("2209.07529")
get_code_for_paper("2209.07529")
have("2209.07529")

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

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

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

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

Connect an agent — have() is free.