SYNTOLOGY HomeExplorerAtlasCodeMethodologyAboutDevelopersFeedPricing
Paper · 2311.13321 · 2023

Revisiting Supervision for Continual Representation Learning

arXiv · PDF · Open in the Atlas

Code that ran

10 of 12 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; 10 failures of our instrument; 2 no recorded run), measured 2026-11-24; 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/2311.13321.json · badge: /api/ran/2311.13321.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
danielm1405/sl-vs-ssl-cl canonical (classifier label)
classifier basis: census
10 ran · 2 no recorded run
FunctionStatusWhere it lives
barlow_loss_func Ran
ran; our contract draft was wrong, not the code
danielm1405/sl-vs-ssl-cl/cassle/losses/barlow.py
code served (permissive licence) · get_code("132a949a804eb81e")
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 Tensor, 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)

# Create small tensors for z1 and z2
# N=2 (batch size), D=4 (feature dimension)
z1 = torch.randn(2, 4)
z2 = torch.randn(2, 4)

# Set standard hyperparameters
lamb = 0.005
scale_loss = 0.025

ARGS = {
    "z1": z1,
    "z2": z2,
    "lamb": lamb,
    "scale_loss": scale_loss,
}
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 Tensor, 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
byol_loss_func Ran
ran; the contract check could not run (RAISES, DEP_MISSING or TIMEOUT)
danielm1405/sl-vs-ssl-cl/cassle/losses/byol.py
code served (permissive licence) · get_code("33aef221912d8415")
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 Tensor, 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.functional as F

torch.manual_seed(0)

# Create small tensors for testing
# p: predicted features from view 1, shape NxD where N=batch size, D=feature dim
batch_size = 2
feature_dim = 4

p = torch.randn(batch_size, feature_dim)
z = torch.randn(batch_size, feature_dim)

# Test both simplified=True and simplified=False cases
ARGS = {
    "p": p,
    "z": z,
    "simplified": 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 Tensor, 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
calc_prototypes Ran
ran; our contract draft was wrong, not the code
danielm1405/sl-vs-ssl-cl/nmc-classifier.py
code served (permissive licence) · get_code("98c308caf3b29f19")
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 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 numpy as np

torch.manual_seed(0)

# The function expects a dict mapping class labels to tensors of embeddings
# It calls .mean(dim=0) on each tensor, so each tensor needs at least 2 dimensions
# with dim=0 being the batch dimension

per_class_embeddings = {
    'class_0': torch.randn(2, 4),  # 2 embeddings of dimension 4
    'class_1': torch.randn(3, 4),  # 3 embeddings of dimension 4
    'class_2': torch.randn(2, 4),  # 2 embeddings of dimension 4
}

ARGS = {
    'per_class_embeddings': per_class_embeddings
}
Setup block drafted by
a language model, Claude Haiku 4.5, prompt python_fixture_v1, through the batch API
Imports
numpy, 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
dict_to_list Ran
ran; our contract draft was wrong, not the code
danielm1405/sl-vs-ssl-cl/main_continual.py
code served (permissive licence) · get_code("2e8bb65a92ffe11e")
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

torch.manual_seed(0)

# The function dict_to_list takes a command dict and processes it
# It iterates through key-value pairs and builds a list
# It checks if k != v and if v doesn't start with '--'

ARGS = {
    "command": {
        "key1": "value1",
        "key2": "--flag",
        "key3": "key3",
        "output": "out.txt"
    }
}
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
directory_find Ran
ran; our contract draft was wrong, not the code
danielm1405/sl-vs-ssl-cl/main_eval_transfer_knn.py
code served (permissive licence) · get_code("f7739772dfd565b5")
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 str. 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 os
import tempfile
import shutil

# Create a temporary directory structure for testing
temp_root = tempfile.mkdtemp()
try:
    # Create nested directories with one named 'target_dir'
    os.makedirs(os.path.join(temp_root, 'subdir1', 'target_dir'))
    os.makedirs(os.path.join(temp_root, 'subdir2'))
    
    ARGS = {
        'atom': 'target_dir',
        'root': temp_root
    }
finally:
    # Clean up will happen after the function is tested
    pass
Setup block drafted by
a language model, Claude Haiku 4.5, prompt python_fixture_v1, through the batch API
Imports
none outside the standard library — import names as written, not package names to install; a name the repository itself provides is not a package
Returned
type str — a str output has no array shape of its own; none is stated — the instrument coerces any output to an array; for a str 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
extract_features Ran
ran; the contract check could not run (RAISES, DEP_MISSING or TIMEOUT)
danielm1405/sl-vs-ssl-cl/main_eval_transfer_knn.py
code served (permissive licence) · get_code("2c0a957445944395")
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. 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 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)

# Create a minimal model that takes input and returns output
class MinimalModel(nn.Module):
    def __init__(self, input_dim=4, output_dim=3):
        super().__init__()
        self.linear = nn.Linear(input_dim, output_dim)
    
    def forward(self, x):
        return self.linear(x)

# Create a minimal data loader - list of (image, label) tuples
# Batch size 2, image dimension 4, output/feature dimension 3
loader = [
    (torch.randn(2, 4), torch.tensor([0, 1])),
    (torch.randn(2, 4), torch.tensor([1, 0])),
]

# Create the model
model = MinimalModel(input_dim=4, output_dim=3)

ARGS = {
    'loader': loader,
    'model': model,
}
Setup block drafted by
a language model, Claude Haiku 4.5, prompt python_fixture_v1, through the batch API
Imports
torch, tqdm — import names as written, not package names to install; a name the repository itself provides is not a package
Returned
type tuple — a tuple output has no array shape of its own; none is 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
extract_features Ran
ran; the contract check could not run (RAISES, DEP_MISSING or TIMEOUT)
danielm1405/sl-vs-ssl-cl/main_knn.py
code served (permissive licence) · get_code("71100c26c7ffe43b")
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. 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 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 torch.utils.data import DataLoader

torch.manual_seed(0)

# Create a minimal model that returns the expected output format
class MinimalModel(nn.Module):
    def __init__(self):
        super().__init__()
        self.linear = nn.Linear(4, 3)
    
    def forward(self, x):
        # Return a dict with 'feats' key as expected by extract_features
        feats = self.linear(x)
        return {'feats': feats}

# Create a minimal dataset as a list of (image, label) tuples
# Each image is a tensor of shape (4,) and each label is a scalar
dataset = [
    (torch.randn(4), torch.tensor(0)),
    (torch.randn(4), torch.tensor(1)),
]

# Create a DataLoader from the dataset
loader = DataLoader(dataset, batch_size=2, shuffle=False)

# Create the model
model = MinimalModel()

ARGS = {
    'loader': loader,
    'model': model,
}
Setup block drafted by
a language model, Claude Haiku 4.5, prompt python_fixture_v1, through the batch API
Imports
torch, tqdm — import names as written, not package names to install; a name the repository itself provides is not a package
Returned
type tuple — a tuple output has no array shape of its own; none is 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
get_initialized_backbone Ran
ran; the contract check could not run (RAISES, DEP_MISSING or TIMEOUT)
danielm1405/sl-vs-ssl-cl/main_eval_transfer_knn.py
code served (permissive licence) · get_code("26e60270b1fdfcfe")
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 ResNet. 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 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 torchvision.models import resnet18
import tempfile
import os

torch.manual_seed(0)

# Create a temporary checkpoint file with the required structure
# The function expects a checkpoint with 'state_dict' key
temp_dir = tempfile.mkdtemp()
ckpt_path = os.path.join(temp_dir, 'checkpoint.pth')

# Build a minimal state dict that matches what the function expects
# The function looks for keys with 'encoder.' prefix and also handles 'frozen_' prefixed keys
backbone_temp = resnet18()
backbone_temp.fc = nn.Identity()
state_dict = backbone_temp.state_dict()

# Create a modified state dict with 'encoder.' prefix to match the function's expectations
encoder_state_dict = {f'encoder.{k}': v for k, v in state_dict.items()}

# Save checkpoint with the expected format
checkpoint = {'state_dict': encoder_state_dict}
torch.save(checkpoint, ckpt_path)

ARGS = {
    'ckpt_path': ckpt_path
}
Setup block drafted by
a language model, Claude Haiku 4.5, prompt python_fixture_v1, through the batch API
Imports
torch, torchvision — import names as written, not package names to install; a name the repository itself provides is not a package
Returned
type ResNet — a ResNet output has no array shape of its own; none is stated — the instrument coerces any output to an array; for a ResNet 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
get_per_class_embeddings_and_classes Ran
ran; the contract check could not run (RAISES, DEP_MISSING or TIMEOUT)
danielm1405/sl-vs-ssl-cl/nmc-classifier.py
code served (permissive licence) · get_code("2b245d2b8c6563d6")
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. 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 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)

class SimpleBackbone(nn.Module):
    def __init__(self):
        super().__init__()
        self.fc = nn.Linear(4, 512)
    
    def forward(self, x):
        return self.fc(x)

backbone = SimpleBackbone()

loader = [
    (torch.randn(2, 4), torch.tensor([0, 1])),
    (torch.randn(2, 4), torch.tensor([0, 2])),
]

ARGS = {
    "backbone": backbone,
    "loader": loader,
}
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 tuple — a tuple output has no array shape of its own; none is 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
str_to_dict Ran
ran; our contract draft was wrong, not the code
danielm1405/sl-vs-ssl-cl/main_continual.py
code served (permissive licence) · get_code("0cc8b473b7806887")
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 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 itertools

def str_to_dict(command):
    d = {}
    for part, part_next in itertools.zip_longest(command[:-1], command[1:]):
        if part[:2] == '--':
            if part_next[:2] != '--':
                d[part] = part_next
            else:
                d[part] = part
        elif part[:2] != '--' and part_next[:2] != '--':
            part_prev = list(d.keys())[-1]
            if not isinstance(d[part_prev], list):
                d[part_prev] = [d[part_prev]]
            if not part_next[:2] == '--':
                d[part_prev].append(part_next)
    return d


ARGS = {
    "command": ["--output", "result.txt", "--input", "file1.txt", "file2.txt", "--verbose", "--debug"]
}
Setup block drafted by
a language model, Claude Haiku 4.5, prompt python_fixture_v1, through the batch API
Imports
none outside the standard library — 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
deepclusterv2_loss_func Not yet run
unverified (harvested, no recorded run)
danielm1405/sl-vs-ssl-cl/cassle/losses/deepclusterv2.py
pointer only (licence: MIT); the stored copy get_code serves, from PKU-ML/nlb, is pointer only (licence: NONE) · get_code("ce432f2e9653c7a3")
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 PKU-ML/nlb, 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. No invocation recorded.

get_initialized_backbone Not yet run
unverified (harvested, no recorded run)
danielm1405/sl-vs-ssl-cl/nmc-classifier.py
code served (permissive licence) · get_code("3fbe4ea1364d66b8")
How it ran

no invocation recorded.

Also present in other papers' code

Of 12 samples lifted from this paper's linked repositories, 12 carry a function identity and 0 do not. Of the 12 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, 2 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
barlow_loss_func 12 other papers
6 dated earlier, 6 later
2007.06346 (2020-07)
Whitening for Self-Supervised Representation Learning
2108.01775 (2021-08)
Solo-learn: A Library of Self-supervised Methods for Visual Representation Learning
2112.15022 (2021-12)
Continually Learning Self-Supervised Representations with Projected Functional Regularization
and 9 more not named here
deepclusterv2_loss_func 10 other papers
6 dated earlier, 4 later
2007.06346 (2020-07)
Whitening for Self-Supervised Representation Learning
2108.01775 (2021-08)
Solo-learn: A Library of Self-supervised Methods for Visual Representation Learning
2112.15022 (2021-12)
Continually Learning Self-Supervised Representations with Projected Functional Regularization
and 7 more not named here
byol_loss_func 3 other papers
3 dated earlier
2108.01775 (2021-08)
Solo-learn: A Library of Self-supervised Methods for Visual Representation Learning
2112.15022 (2021-12)
Continually Learning Self-Supervised Representations with Projected Functional Regularization
dict_to_list 1 other paper
1 dated earlier
2112.15022 (2021-12)
Continually Learning Self-Supervised Representations with Projected Functional Regularization
str_to_dict 1 other paper
1 dated earlier
2112.15022 (2021-12)
Continually Learning Self-Supervised Representations with Projected Functional Regularization

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-24.

Repositories linked to this paper

Some links come from the archived Papers with Code dataset (CC BY-SA 4.0): attribution and licence.

Abstract

In the field of continual learning, models are designed to learn tasks one after the other. While most research has centered on supervised continual learning, there is a growing interest in unsupervised continual learning, which makes use of the vast amounts of unlabeled data. Recent studies have highlighted the strengths of unsupervised methods, particularly self-supervised learning, in providing robust representations. The improved transferability of those representations built with self-supervised methods is often associated with the role played by the multi-layer perceptron projector. In this work, we depart from this observation and reexamine the role of supervision in continual representation learning. We reckon that additional information, such as human annotations, should not deteriorate the quality of representations. Our findings show that supervised models when enhanced with a multi-layer perceptron head, can outperform self-supervised models in continual representation learning. This highlights the importance of the multi-layer perceptron projector in shaping feature transferability across a sequence of tasks in continual learning. The code is available on github: https://github.com/danielm1405/sl-vs-ssl-cl.

For agents

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

get_harvested_code_for_paper("2311.13321")
get_code_for_paper("2311.13321")
have("2311.13321")

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

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

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

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

Connect an agent — have() is free.