SYNTOLOGY HomeExplorerAtlasCodeMethodologyAboutDevelopersFeedPricing
Paper · 2205.14922 · NeurIPS · 2022

ACIL: Analytic Class-Incremental Learning with Absolute Memorization and Privacy Protection

Hongxin Wei, Renchunzi Xie, Huiping Zhuang, Zhenyu Weng, Kar-Ann Toh, Zhiping Lin

arXiv · PDF · Open in the Atlas

Code that ran

4 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 2 have no contract verdict; 2 failures of our instrument; 6 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/2205.14922.json · badge: /api/ran/2205.14922.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
ZHUANGHP/Analytic-continual-learning marked official in Papers with Code
Papers with Code archive
4 ran · 6 no recorded run
FunctionStatusWhere it lives
ClassificationMeter Ran
ran on a synthesized input
ZHUANGHP/Analytic-continual-learning/analytic/ACIL.py
code served (permissive licence) · get_code("49a3207da0dad43f")
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 NoneType. 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
from sklearn import metrics

class ClassificationMeter:

    def __init__(self, num_classes: int, record_logits: bool=False) -> None:
        self.num_classes = num_classes
        self.total_loss = 0.0
        self.labels = np.zeros((0,), dtype=np.int32)
        self.prediction = np.zeros((0,), dtype=np.int32)
        self.acc5_cnt = 0
        self.record_logits = record_logits
        if self.record_logits:
            self.logits = np.ndarray((0, num_classes))

    def record(self, y_true: torch.Tensor, logits: torch.Tensor) -> None:
        self.labels = np.concatenate([self.labels, y_true.cpu().numpy()])
        if self.record_logits:
            logits_softmax = torch.nn.functional.softmax(logits, dim=1).cpu().numpy()
            self.logits = np.concatenate([self.logits, logits_softmax])
        self.total_loss += float(torch.nn.functional.cross_entropy(logits, y_true, reduction='sum').item())
        y_pred = logits.topk(5, largest=True).indices.to(torch.int)
        acc5_judge = (y_pred == y_true[:, None]).any(dim=-1)
        self.acc5_cnt += int(acc5_judge.sum().item())
        self.prediction = np.concatenate([self.prediction, y_pred[:, 0].cpu().numpy()])

    @property
    def accuracy(self) -> float:
        return float(metrics.accuracy_score(self.labels, self.prediction))

    @property
    def balanced_accuracy(self) -> float:
        result = metrics.balanced_accuracy_score(self.labels, self.prediction, adjusted=True)
        return float(result)

    @property
    def f1_micro(self) -> float:
        result = metrics.f1_score(self.labels, self.prediction, average='micro')
        return float(result)

    @property
    def f1_macro(self) -> float:
        result = metrics.f1_score(self.labels, self.prediction, average='macro')
        return float(result)

    @property
    def accuracy5(self) -> float:
        return self.acc5_cnt / len(self.labels)

    @property
    def loss(self) -> float:
        return float(self.total_loss / len(self.labels))


INIT_ARGS = {
    'num_classes': 8,
    'record_logits': True,
}

ARGS = {
    'y_true': torch.tensor([0, 1, 2, 3, 0, 1, 2, 3], dtype=torch.long),
    'logits': torch.randn(8, 8),
}

METHOD = 'record'

if __name__ == '__main__':
    meter = ClassificationMeter(**INIT_ARGS)
    meter.record(**ARGS)
    print(f"Accuracy: {meter.accuracy}")
    print(f"Accuracy@5: {meter.accuracy5}")
    print(f"Loss: {meter.loss}")
    print(f"F1 Macro: {meter.f1_macro}")
Setup block drafted by
a language model, class construct-then-call prompt, model not recorded
Imports
numpy, sklearn, torch — import names as written, not package names to install; a name the repository itself provides is not a package
Returned
type NoneType — a NoneType output has no array shape of its own; none is stated — the instrument coerces any output to an array; for a NoneType 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: torch and numpy seeded to 0 by the harness immediately before the class was constructed from INIT_ARGS (fixture_check.py)
RandomBuffer Ran
ran on a synthesized input
ZHUANGHP/Analytic-continual-learning/analytic/ACIL.py
code served (permissive licence) · get_code("1b9c6e5b50b249c8")
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 2, dtype family float, shape (2, 3) 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

INIT_ARGS = {
    'in_features': 4,
    'out_features': 3,
    'bias': False,
    'device': None,
    'dtype': torch.float,
    'activation': torch.relu_,
}

ARGS = {
    'X': torch.randn(2, 4),
}

if __name__ == '__main__':
    from torch import nn
    
    class Buffer(nn.Module, metaclass=type('ABCMeta', (), {})):
        def __init__(self) -> None:
            super().__init__()
        
        def forward(self, X: torch.Tensor) -> torch.Tensor:
            raise NotImplementedError()
    
    activation_t = type(None)
    
    class RandomBuffer(nn.Linear, Buffer):
        def __init__(self, in_features: int, out_features: int, bias: bool=False, device=None, dtype=torch.float, activation=torch.relu_) -> None:
            super(nn.Linear, self).__init__()
            factory_kwargs = {'device': device, 'dtype': dtype}
            self.in_features = in_features
            self.out_features = out_features
            self.activation = torch.nn.Identity() if activation is None else activation
            W = torch.empty((out_features, in_features), **factory_kwargs)
            b = torch.empty(out_features, **factory_kwargs) if bias else None
            self.register_buffer('weight', W)
            self.register_buffer('bias', b)
            self.reset_parameters()
        
        @torch.no_grad()
        def forward(self, X: torch.Tensor) -> torch.Tensor:
            X = X.to(self.weight)
            return self.activation(nn.Linear.forward(self, X))
    
    buffer = RandomBuffer(**INIT_ARGS)
    output = buffer(**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 — import names as written, not package names to install; a name the repository itself provides is not a package
Returned
type Tensor, ndim 2, dtype family float, shape (2, 3) — shape (2, 3) 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: torch and numpy seeded to 0 by the harness immediately before the class was constructed from INIT_ARGS (fixture_check.py)
set_weight_decay Ran
ran; our contract draft was wrong, not the code
ZHUANGHP/Analytic-continual-learning/analytic/ACIL.py
code served (permissive licence) · get_code("515618290aea20f8")
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 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

torch.manual_seed(0)

# Build a small model with various layer types
class SimpleModel(nn.Module):
    def __init__(self):
        super().__init__()
        self.linear1 = nn.Linear(4, 8)
        self.batch_norm = nn.BatchNorm1d(8)
        self.layer_norm = nn.LayerNorm(8)
        self.linear2 = nn.Linear(8, 4)
        self.embedding = nn.Embedding(10, 4)
        self.group_norm = nn.GroupNorm(2, 8)
        
        # Add custom parameters with special names
        self.class_token = nn.Parameter(torch.randn(1, 4))
        self.position_embedding = nn.Parameter(torch.randn(2, 4))
        self.relative_position_bias_table = nn.Parameter(torch.randn(3, 4))
    
    def forward(self, x):
        x = self.linear1(x)
        x = self.batch_norm(x)
        x = self.layer_norm(x)
        x = self.linear2(x)
        return x

model = SimpleModel()

ARGS = {
    'model': model,
    'weight_decay': 0.01,
    'disable_norm_decay': True,
    'disable_bias_decay': True,
    'disable_embedding_decay': True,
}
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 list, ndim 1, dtype family float — 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
validate Ran
ran; our contract draft was wrong, not the code
ZHUANGHP/Analytic-continual-learning/analytic/ACIL.py
code served (permissive licence) · get_code("7cbdda3b03d68e52")
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 ClassificationMeter. 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 numpy as np

torch.manual_seed(0)

# Create a simple model
class SimpleClassifier(nn.Module):
    def __init__(self, input_dim: int, num_classes: int):
        super().__init__()
        self.linear = nn.Linear(input_dim, num_classes)
    
    def forward(self, x: torch.Tensor) -> torch.Tensor:
        return self.linear(x)

# Set up model
num_classes = 5
input_dim = 4
model = SimpleClassifier(input_dim, num_classes)
model.eval()

# Create a small data loader with 2 batches of size 2
batch_size = 2
data_loader = [
    (torch.randn(batch_size, input_dim), torch.randint(0, num_classes, (batch_size,))),
    (torch.randn(batch_size, input_dim), torch.randint(0, num_classes, (batch_size,)))
]

ARGS = {
    "model": model,
    "data_loader": data_loader,
    "num_classes": num_classes,
    "desc": "Validation"
}
Setup block drafted by
a language model, Claude Haiku 4.5, prompt python_fixture_v1, through the batch API
Imports
numpy, sklearn, torch, tqdm — import names as written, not package names to install; a name the repository itself provides is not a package
Returned
type ClassificationMeter — a ClassificationMeter output has no array shape of its own; none is stated — the instrument coerces any output to an array; for a ClassificationMeter 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
ACIL Not yet run
unverified (harvested, no recorded run)
ZHUANGHP/Analytic-continual-learning/analytic/ACIL.py
code served (permissive licence) · get_code("1b88cf2727ad6dfd")
How it ran

no invocation recorded.

ACILLearner Not yet run
unverified (harvested, no recorded run)
ZHUANGHP/Analytic-continual-learning/analytic/ACIL.py
code served (permissive licence) · get_code("df4ba97a1cca0e86")
How it ran

no invocation recorded.

AnalyticLinear Not yet run
unverified (harvested, no recorded run)
ZHUANGHP/Analytic-continual-learning/analytic/ACIL.py
code served (permissive licence) · get_code("0cd5c60c5d4b3fac")
How it ran

no invocation recorded.

Buffer Not yet run
unverified (harvested, no recorded run)
ZHUANGHP/Analytic-continual-learning/analytic/ACIL.py
code served (permissive licence) · get_code("c0381c8b57c0a37e")
How it ran

no invocation recorded.

Learner Not yet run
unverified (harvested, no recorded run)
ZHUANGHP/Analytic-continual-learning/analytic/ACIL.py
code served (permissive licence) · get_code("fd5487bdd1bc5fe1")
How it ran

no invocation recorded.

RecursiveLinear Not yet run
unverified (harvested, no recorded run)
ZHUANGHP/Analytic-continual-learning/analytic/ACIL.py
code served (permissive licence) · get_code("25c613a569a29acf")
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, 4 are also present in other papers whose code we hold (0 with at least one paper dated earlier, 0 the same month, 4 later) and 6 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
AnalyticLinear
brick of this paper's assembly: model
1 other paper
1 later
2403.17503 (2024-03)
DS-AL: A Dual-Stream Analytic Learning for Exemplar-Free Class-Incremental Learning
Buffer
brick of this paper's assembly: helper
1 other paper
1 later
2403.17503 (2024-03)
DS-AL: A Dual-Stream Analytic Learning for Exemplar-Free Class-Incremental Learning
RandomBuffer
brick of this paper's assembly: helper
1 other paper
1 later
2403.17503 (2024-03)
DS-AL: A Dual-Stream Analytic Learning for Exemplar-Free Class-Incremental Learning
RecursiveLinear
brick of this paper's assembly: model
1 other paper
1 later
2403.17503 (2024-03)
DS-AL: A Dual-Stream Analytic Learning for Exemplar-Free Class-Incremental 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

Class-incremental learning (CIL) learns a classification model with training data of different classes arising progressively. Existing CIL either suffers from serious accuracy loss due to catastrophic forgetting, or invades data privacy by revisiting used exemplars. Inspired by linear learning formulations, we propose an analytic class-incremental learning (ACIL) with absolute memorization of past knowledge while avoiding breaching of data privacy (i.e., without storing historical data). The absolute memorization is demonstrated in the sense that class-incremental learning using ACIL given present data would give identical results to that from its joint-learning counterpart which consumes both present and historical samples. This equality is theoretically validated. Data privacy is ensured since no historical data are involved during the learning process. Empirical validations demonstrate ACIL's competitive accuracy performance with near-identical results for various incremental task settings (e.g., 5-50 phases). This also allows ACIL to outperform the state-of-the-art methods for large-phase scenarios (e.g., 25 and 50 phases).

For agents

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

get_harvested_code_for_paper("2205.14922")
get_code_for_paper("2205.14922")
have("2205.14922")

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

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

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

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

Connect an agent — have() is free.