SYNTOLOGY HomeExplorerAtlasCodeMethodologyAboutDevelopersFeedPricing
Paper · 2112.04731 · 2021

Mimicking the Oracle: An Initial Phase Decorrelation Approach for Class Incremental Learning

arXiv · PDF · Open in the Atlas

Code that ran

3 of 3 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 0 have no contract verdict; 3 failures of our instrument; 0 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/2112.04731.json · badge: /api/ran/2112.04731.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
yujun-shi/cwd canonical (classifier label)
classifier basis: census
3 ran · 0 no recorded run
FunctionStatusWhere it lives
compute_confusion_matrix Ran
ran; the contract check could not run (RAISES, DEP_MISSING or TIMEOUT)
yujun-shi/cwd/src/utils.py
code served (permissive licence) · get_code("9b12f69ea3486b68")
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 ndarray, ndim 2, dtype family float, shape (8, 8) as a later run recorded it. The image it ran in was not recorded. The code mentions cuda, and the harness aliases cuda to the CPU for every sample; whether this run needed that is 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
import numpy as np

torch.manual_seed(0)

# Create a minimal model that satisfies the function's usage
class DummyHead(nn.Module):
    def __init__(self, out_features):
        super().__init__()
        self.out_features = out_features
        self.linear = nn.Linear(4, out_features)
    
    def forward(self, x):
        return self.linear(x)

class DummyModel(nn.Module):
    def __init__(self, num_heads=2, head_sizes=None):
        super().__init__()
        if head_sizes is None:
            head_sizes = [3, 5]
        self.heads = nn.ModuleList([DummyHead(size) for size in head_sizes])
    
    def forward(self, x):
        # Return list of outputs, one per head
        return [head(x) for head in self.heads]
    
    def eval(self):
        super().eval()
        return self

model = DummyModel(num_heads=2, head_sizes=[3, 5])

# Create minimal validation loaders (list of batches)
# Each batch is (images, targets)
val_loaders = [
    [
        (torch.randn(2, 4), torch.tensor([0, 1])),
        (torch.randn(2, 4), torch.tensor([2, 0])),
    ],
    [
        (torch.randn(2, 4), torch.tensor([1, 2])),
    ]
]

num_classes = 8  # 3 + 5 from the heads

ARGS = {
    "model": model,
    "val_loaders": val_loaders,
    "num_classes": num_classes,
}
Setup block drafted by
a language model, Claude Haiku 4.5, prompt python_fixture_v1, through the batch API
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 ndarray, ndim 2, dtype family float, shape (8, 8) — shape (8, 8) 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
last_layer_analysis Ran
ran; the contract check could not run (RAISES, DEP_MISSING or TIMEOUT)
yujun-shi/cwd/src/last_layer_analysis.py
code served (permissive licence) · get_code("2e179edce79cd470")
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 tuple, 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
import numpy as np
import matplotlib.pyplot as plt

torch.manual_seed(0)

# Create a simple heads module - single Linear layer case
heads_single = nn.Linear(in_features=4, out_features=6)

# taskcla defines tasks and their number of classes
# Format: list of tuples (task_id, num_classes)
taskcla = [
    (0, 3),  # Task 0 has 3 classes
    (1, 3),  # Task 1 has 3 classes
]

# Current task index
task = 1

# Define ARGS dictionary with all parameters
ARGS = {
    'heads': heads_single,
    'task': task,
    'taskcla': taskcla,
    'y_lim': False,
    'sort_weights': False,
}
Setup block drafted by
a language model, Claude Haiku 4.5, prompt python_fixture_v1, through the batch API
Imports
matplotlib, numpy, torch — import names as written, not package names to install; a name the repository itself provides is not a package
Returned
type tuple, ndim 1, dtype family float — a tuple 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
off_diagonal Ran
ran; the contract check could not run (RAISES, DEP_MISSING or TIMEOUT)
yujun-shi/cwd/src/approach/aux_loss.py
pointer only (licence: MIT); the stored copy get_code serves, from neurai-lab/tamil, is pointer only (licence: NONE) · get_code("3e30d88eaef01190")
How it ran

The body of this sample is withheld: this paper's link allows the body inline (MIT), but get_code serves the stored copy, first harvested from neurai-lab/tamil, and GitHub detected no licence in that repository 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.

Also present in other papers' code

Of 3 samples lifted from this paper's linked repositories, 3 carry a function identity and 0 do not. Of the 3 distinct functions with an identity, 3 are also present in other papers whose code we hold (1 with at least one paper dated earlier, 0 the same month, 3 later) and 0 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
off_diagonal 23 other papers
5 dated earlier, 18 later · 5 only as an assembly brick
1908.10084 (2019-08)
Sentence-BERT: Sentence Embeddings using Siamese BERT-Networks
2004.04136 (2020-04)
CURL: Contrastive Unsupervised Representations for Reinforcement Learning
2007.16189 (2020-07)
Self-supervised learning through the eyes of a child
and 20 more not named here
last_layer_analysis 6 other papers
6 later
Shi_Mimicking_the_Oracle_An_Initial_Phase_Decorrelation_Approach_for_Class_CVPR_2022_paper (2022 (year only))
Mimicking the Oracle: An Initial Phase Decorrelation Approach for Class Incremental Learning
2201.12559 (2022-01)
Rebalancing Batch Normalization for Exemplar-based Class-Incremental Learning
2203.13167 (2022-03)
Towards Exemplar-Free Continual Learning in Vision Transformers: an Account of Attention, Functional and Weight Regularization
and 3 more not named here
compute_confusion_matrix 2 other papers
2 later
Shi_Mimicking_the_Oracle_An_Initial_Phase_Decorrelation_Approach_for_Class_CVPR_2022_paper (2022 (year only))
Mimicking the Oracle: An Initial Phase Decorrelation Approach for Class Incremental Learning
2308.01698 (2023-08)
Balanced Destruction-Reconstruction Dynamics for Memory-replay 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) aims at learning a multi-class classifier in a phase-by-phase manner, in which only data of a subset of the classes are provided at each phase. Previous works mainly focus on mitigating forgetting in phases after the initial one. However, we find that improving CIL at its initial phase is also a promising direction. Specifically, we experimentally show that directly encouraging CIL Learner at the initial phase to output similar representations as the model jointly trained on all classes can greatly boost the CIL performance. Motivated by this, we study the difference between a naïvely-trained initial-phase model and the oracle model. Specifically, since one major difference between these two models is the number of training classes, we investigate how such difference affects the model representations. We find that, with fewer training classes, the data representations of each class lie in a long and narrow region; with more training classes, the representations of each class scatter more uniformly. Inspired by this observation, we propose Class-wise Decorrelation (CwD) that effectively regularizes representations of each class to scatter more uniformly, thus mimicking the model jointly trained with all classes (i.e., the oracle model). Our CwD is simple to implement and easy to plug into existing methods. Extensive experiments on various benchmark datasets show that CwD consistently and significantly improves the performance of existing state-of-the-art methods by around 1\% to 3\%. Code will be released.

For agents

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

get_harvested_code_for_paper("2112.04731")
get_code_for_paper("2112.04731")
have("2112.04731")

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

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

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

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

Connect an agent — have() is free.