SYNTOLOGY HomeExplorerAtlasCodeMethodologyAboutDevelopersFeedPricing
Paper · 2406.10815 · ICML · 2024

On the Effectiveness of Supervision in Asymmetric Non-Contrastive Learning

Kibok Lee, Jeongheon Oh

arXiv · PDF · Open in the Atlas

Code that ran

6 of 8 samples (functions and classes) lifted from this paper's linked repositories executed on a synthesized input in Syntology's jail (1 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; 5 failures of our instrument; 2 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/2406.10815.json · badge: /api/ran/2406.10815.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
jh-oh-23/sup-ancl canonical (classifier label)
classifier basis: classifier_2025
6 ran · 0 no recorded run
JH-Oh-23/Sup-ANCL canonical (classifier label)
classifier basis: census
0 ran · 2 no recorded run
FunctionStatusWhere it lives
SupSiam Ran
ran on a synthesized input · constructed an object; no result was computed
jh-oh-23/sup-ancl/builder.py
code served (permissive licence) · get_code("4c31d26574c40b3b")
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, SupSiam: 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

torch.manual_seed(0)

class SimpleEncoder(nn.Module):
    def __init__(self):
        super().__init__()
        self.conv = nn.Conv2d(3, 16, kernel_size=3, padding=1)
        self.fc = nn.Linear(16 * 32 * 32, 64)
    
    def forward(self, x):
        x = self.conv(x)
        x = x.view(x.size(0), -1)
        x = self.fc(x)
        return x

def base_encoder_factory():
    return SimpleEncoder()

ARGS = {
    'base_encoder': base_encoder_factory,
    'dim': 64,
    'pred_dim': 32,
    'K': 16,
    'num_positive': 2,
    'alpha': 0.5
}
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 SupSiam — 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 SupSiam 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
build_step Ran
ran; our contract draft was wrong, not the code
jh-oh-23/sup-ancl/transfer.py
code served (permissive licence) · get_code("27cea26b98b9aebe")
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 function. 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

torch.manual_seed(0)

# Create tiny tensors for X and Y
# X: batch_size=2, features=4
X = torch.randn(2, 4)
# Y: batch_size=2, class indices (3 classes)
Y = torch.tensor([0, 1])

# Create a simple classifier that takes input of size 4 and outputs 3 classes
classifier = nn.Sequential(
    nn.Linear(4, 3)
)

# Create an optimizer
optimizer = torch.optim.SGD(classifier.parameters(), lr=0.01)

# Weight for L2 regularization
w = 0.01

ARGS = {
    "X": X,
    "Y": Y,
    "classifier": classifier,
    "optimizer": optimizer,
    "w": w
}
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 function — a function output has no array shape of its own; none is stated — the instrument coerces any output to an array; for a function 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
collect_features Ran
ran; the contract check could not run (RAISES, DEP_MISSING or TIMEOUT)
jh-oh-23/sup-ancl/transfer.py
code served (permissive licence) · get_code("4eb65fa0ebc8a3bc")
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 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)

# Build a minimal model that has eval() and can be called with a tensor
class SimpleModel(nn.Module):
    def __init__(self):
        super().__init__()
        self.linear = nn.Linear(4, 3)
    
    def forward(self, x):
        return self.linear(x)

model = SimpleModel()

# Build a minimal dataloader (list of (x, y) tuples)
# x: batch of 2 samples, 4 features
# y: batch of 2 labels
dataloader = [
    (torch.randn(2, 4), torch.tensor([0, 1])),
    (torch.randn(2, 4), torch.tensor([1, 0])),
]

# Build args object with gpu attribute
class Args:
    def __init__(self, gpu):
        self.gpu = gpu

args = Args(gpu=0)

ARGS = {
    "model": model,
    "dataloader": dataloader,
    "args": args,
}
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 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
compute_accuracy Ran
ran; our contract draft was wrong, not the code
jh-oh-23/sup-ancl/transfer.py
code served (permissive licence) · get_code("48afbec326335e94")
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 float, 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 a small classifier that takes input and outputs logits for 3 classes
class SimpleClassifier(nn.Module):
    def __init__(self, input_dim=4, num_classes=3):
        super().__init__()
        self.linear = nn.Linear(input_dim, num_classes)
    
    def forward(self, x):
        return self.linear(x)

# Create small tensors
X = torch.randn(2, 4)  # batch_size=2, input_dim=4
Y = torch.tensor([0, 2])  # batch_size=2, class labels

# Create classifier
classifier = SimpleClassifier(input_dim=4, num_classes=3)

# Define metric
metric = 'top1'

ARGS = {
    'X': X,
    'Y': Y,
    'classifier': classifier,
    'metric': metric
}
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 float, 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
train Ran
ran; the contract check could not run (RAISES, DEP_MISSING or TIMEOUT)
jh-oh-23/sup-ancl/linear.py
code served (permissive licence) · get_code("301ca971eacdfdcb")
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 tuple, ndim 1, dtype family float; no output shape is stated. 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 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 torch.optim as optim
from unittest.mock import MagicMock
import logging

torch.manual_seed(0)

# Create a simple model
class SimpleModel(nn.Module):
    def __init__(self):
        super().__init__()
        self.fc = nn.Linear(4, 10)
    
    def forward(self, x):
        return self.fc(x)

# Create a simple train loader (list of batches)
train_loader = [
    (torch.randn(2, 4), torch.randint(0, 10, (2,))),
    (torch.randn(2, 4), torch.randint(0, 10, (2,))),
]

# Create model, criterion, and optimizer
model = SimpleModel()
criterion = nn.CrossEntropyLoss()
optimizer = optim.SGD(model.parameters(), lr=0.01)

# Create a mock logger
logger = MagicMock(spec=logging.Logger)

# Create args object with required attributes
class Args:
    def __init__(self):
        self.gpu = 0
        self.epochs = 5

args = Args()

ARGS = {
    'train_loader': train_loader,
    'model': model,
    'criterion': criterion,
    'optimizer': optimizer,
    'epoch': 1,
    'log': logger,
    'args': args,
}
Setup block drafted by
a language model, Claude Haiku 4.5, prompt python_fixture_v1
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, 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
validate Ran
ran; the contract check could not run (RAISES, DEP_MISSING or TIMEOUT)
jh-oh-23/sup-ancl/linear.py
code served (permissive licence) · get_code("46c53e9b88a51bc9")
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 tuple, ndim 1, dtype family float; no output shape is stated. 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 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
from torch.nn import CrossEntropyLoss

torch.manual_seed(0)

# Build a minimal model that accepts images and outputs logits
class MinimalModel(nn.Module):
    def __init__(self, num_classes=10):
        super().__init__()
        self.fc = nn.Linear(4, num_classes)
    
    def forward(self, x):
        # x shape: (batch, 4)
        return self.fc(x)

# Create a minimal data loader (list of batches)
val_loader = [
    (torch.randn(2, 4), torch.randint(0, 10, (2,))),
    (torch.randn(2, 4), torch.randint(0, 10, (2,))),
]

# Create model and criterion
model = MinimalModel(num_classes=10)
criterion = CrossEntropyLoss()

# Create args object with required attributes
class Args:
    def __init__(self):
        self.gpu = 0
        self.epochs = 5

args = Args()

# Define ARGS dictionary
ARGS = {
    'val_loader': val_loader,
    'model': model,
    'criterion': criterion,
    'epoch': 1,
    'log': None,
    'args': args,
}
Setup block drafted by
a language model, Claude Haiku 4.5, prompt python_fixture_v1
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, 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
concat_all_gather Not yet run
unverified (harvested, no recorded run)
JH-Oh-23/Sup-ANCL/builder.py
code served (permissive licence) · get_code("73cecca9f3575f09")
How it ran

no invocation recorded.

load_fewshot_datasets Not yet run
unverified (harvested, no recorded run)
JH-Oh-23/Sup-ANCL/fewshot.py
code served (permissive licence) · get_code("37a474354ef19bfa")
How it ran

no invocation recorded.

Also present in other papers' code

Of 8 samples lifted from this paper's linked repositories, 8 carry a function identity and 0 do not. Of the 8 distinct functions with an identity, 2 are also present in other papers whose code we hold (2 with at least one paper dated earlier, 1 the same month, 1 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
concat_all_gather
brick of this paper's assembly: helper
138 other papers
113 dated earlier, 2 the same month, 20 later, 3 same year, order not determinable · 33 only as an assembly brick
1710.09412 (2017-10)
mixup: BEYOND EMPIRICAL RISK MINIMIZATION
1905.04899 (2019-05)
CutMix: Regularization Strategy to Train Strong Classifiers with Localizable Features
1905.12794 (2019-05)
Fashion IQ: A New Dataset Towards Retrieving Images by Natural Language Feedback
and 135 more not named here
compute_accuracy 1 other paper
1 dated earlier
2111.09613 (2021-11)
Improving Transferability of Representations via Augmentation-Aware Self-Supervision

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

Supervised contrastive representation learning has been shown to be effective in various transfer learning scenarios. However, while asymmetric non-contrastive learning (ANCL) often outperforms its contrastive learning counterpart in selfsupervised representation learning, the extension of ANCL to supervised scenarios is less explored. To bridge the gap, we study ANCL for supervised representation learning, coined SUPSIAM and SUPBYOL, leveraging labels in ANCL to achieve better representations. The proposed supervised ANCL framework improves representation learning while avoiding collapse. Our analysis reveals that providing supervision to ANCL reduces intraclass variance, and the contribution of supervision should be adjusted to achieve the best performance. Experiments demonstrate the superiority of supervised ANCL across various datasets and tasks. The code is available at: https: //github.com/JH-Oh-23/Sup-ANCL.

For agents

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

get_harvested_code_for_paper("2406.10815")
get_code_for_paper("2406.10815")
have("2406.10815")

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

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

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

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

Connect an agent — have() is free.