SYNTOLOGY HomeExplorerAtlasCodeMethodologyAboutDevelopersFeedPricing
Paper · 2209.06235 · NeurIPS · 2022

Improving Self-Supervised Learning by Characterizing Idealized Representations

Stefano Ermon, Percy Liang, Yann Dubois, Tatsunori Hashimoto

arXiv · PDF · Open in the Atlas

Code that ran

7 of 8 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 7 have no contract verdict; 0 failures of our instrument; 1 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.06235.json · badge: /api/ran/2209.06235.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
YannDubs/Invariant-Self-Supervised-Learning canonical (classifier label)
classifier basis not recorded on the link
7 ran · 1 no recorded run
FunctionStatusWhere it lives
format_resolver Ran
ran on a synthesized input
YannDubs/Invariant-Self-Supervised-Learning/utils/helpers.py
code served (permissive licence) · get_code("df2a3c4fabd97273")
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 torch

torch.manual_seed(0)

ARGS = {
    "x": 42,
    "pattern": ".2f"
}
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 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
get_param_in_kwargs Ran
ran on a synthesized input
YannDubs/Invariant-Self-Supervised-Learning/utils/aggregate.py
code served (permissive licence) · get_code("2b3c89d621e6d755")
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 pandas as pd
import numpy as np

# Create a DataFrame with a MultiIndex that has named levels
index = pd.MultiIndex.from_product(
    [['a', 'b'], [1, 2]],
    names=['param1', 'param2']
)
data = pd.DataFrame(
    np.random.randn(4, 3),
    index=index,
    columns=['col1', 'col2', 'col3']
)

# Create kwargs with some string values that match index names
# and some that don't, to test filtering
kwargs = {
    'condition1': 'param1',
    'condition2': 'param2',
    'condition3': 'not_in_index',
    'condition4': 42,
    'condition5': ['list', 'value'],
}

ARGS = {
    'data': data,
    'kwargs': kwargs
}
Setup block drafted by
a language model, Claude Haiku 4.5, prompt python_fixture_v1, through the batch API
Imports
numpy, pandas, 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
init_std_modules Ran
ran on a synthesized input
YannDubs/Invariant-Self-Supervised-Learning/hub/resnet_dim.py
code served (permissive licence) · get_code("6b93cba494bab7d6")
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 bool, 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
import math

torch.manual_seed(0)

# Create a simple model that contains Conv, Linear, and BatchNorm layers
class SimpleModel(nn.Module):
    def __init__(self):
        super().__init__()
        self.conv = nn.Conv2d(3, 4, kernel_size=3)
        self.linear = nn.Linear(4, 5)
        self.bn = nn.BatchNorm2d(4)
        self.bn_no_affine = nn.BatchNorm1d(2, affine=False)
    
    def forward(self, x):
        return x

# Instantiate the model
model = SimpleModel()

# The function takes a single parameter: module
# We'll test it with the model itself (which contains multiple layer types)
ARGS = {
    "module": model
}
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 bool, 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
int_or_ratio Ran
ran on a synthesized input
YannDubs/Invariant-Self-Supervised-Learning/issl/helpers.py
code served (permissive licence) · get_code("67fca86dcfe70ef2")
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 int, ndim 0, dtype family int, 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 numpy as np

torch.manual_seed(0)

ARGS = {
    "alpha": 0.5,
    "n": 10
}
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 int, ndim 0, dtype family int, 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
list2str_resolver Ran
ran on a synthesized input
YannDubs/Invariant-Self-Supervised-Learning/utils/helpers.py
code served (permissive licence) · get_code("244013f363aad310")
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 torch

torch.manual_seed(0)

# The function takes a list and converts it to a string
# It sorts the list elements and joins them with underscores
# If the list is empty, it returns 'none'

ARGS = {
    'l': [3, 1, 2, 5, 4]
}
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 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
namespace2dict Ran
ran on a synthesized input
YannDubs/Invariant-Self-Supervised-Learning/issl/helpers.py
code served (permissive licence) · get_code("dac76cacf0b69545")
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
from argparse import Namespace
from collections.abc import MutableMapping

class NamespaceMap(Namespace, MutableMapping):
    """Namespace that can act like a dict."""

    def __init__(self, d):
        super().__init__(**d)

    def select(self, k):
        """Allows selection using `.` in string."""
        to_return = self
        for subk in k.split('.'):
            to_return = to_return[subk]
        return to_return

    def __getitem__(self, k):
        return self.__dict__[k]

    def __setitem__(self, k, v):
        self.__dict__[k] = v

    def __delitem__(self, k):
        del self.__dict__[k]

    def __len__(self):
        return len(self.__dict__)

    def __iter__(self):
        return iter(self.__dict__)

def namespace2dict(namespace):
    """
    Converts recursively namespace to dictionary. Does not work if there is a namespace whose
    parent is not a namespace.
    """
    d = dict(**namespace)
    for k, v in d.items():
        if isinstance(v, NamespaceMap):
            d[k] = namespace2dict(v)
    return d


# Create test data
torch.manual_seed(0)

# Test case 1: Simple namespace with basic types
simple_namespace = NamespaceMap({
    'learning_rate': 0.001,
    'batch_size': 32,
    'model_name': 'test_model',
    'epochs': 10
})

# Test case 2: Nested namespace
nested_inner = NamespaceMap({
    'hidden_dim': 128,
    'dropout': 0.5
})

nested_namespace = NamespaceMap({
    'learning_rate': 0.001,
    'model': nested_inner,
    'epochs': 5
})

# Test case 3: Deeply nested namespace
deep_inner = NamespaceMap({
    'activation': 'relu'
})

deep_middle = NamespaceMap({
    'optimizer': deep_inner,
    'weight_decay': 1e-5
})

deep_namespace = NamespaceMap({
    'training': deep_middle,
    'dataset': 'cifar10'
})

# Test case 4: Namespace with mixed types
mixed_namespace = NamespaceMap({
    'name': 'experiment',
    'config': NamespaceMap({'lr': 0.01, 'momentum': 0.9}),
    'tensor': torch.randn(2, 4),
    'list': [1, 2, 3],
    'dict': {'key': 'value'}
})

ARGS = {
    'namespace': simple_namespace
}
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 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
path_to_params Ran
ran on a synthesized input
YannDubs/Invariant-Self-Supervised-Learning/utils/aggregate.py
code served (permissive licence) · get_code("ed6ccbf19794b456")
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

def path_to_params(path):
    """Take a path name of the form `param1_value1/param2_value2/...` and returns a dictionary."""
    params = {}
    for name in path.split('/'):
        if '_' in name:
            k, v = name.split('_', maxsplit=1)
            params[k] = v
    return params

torch.manual_seed(0)

ARGS = {
    'path': 'learning_rate_0.001/batch_size_32/epochs_10'
}
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 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
file_cache Not yet run
unverified (harvested, no recorded run)
YannDubs/Invariant-Self-Supervised-Learning/issl/helpers.py
code served (permissive licence) · get_code("b83c9f0b58f5a838")
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, 0 are also present in other papers whose code we hold (0 with at least one paper dated earlier, 0 the same month, 0 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.

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

Despite the empirical successes of self-supervised learning (SSL) methods, it is unclear what characteristics of their representations lead to high downstream accuracies. In this work, we characterize properties that SSL representations should ideally satisfy. Specifically, we prove necessary and sufficient conditions such that for any task invariant to given data augmentations, desired probes (e.g., linear or MLP) trained on that representation attain perfect accuracy. These requirements lead to a unifying conceptual framework for improving existing SSL methods and deriving new ones. For contrastive learning, our framework prescribes simple but significant improvements to previous methods such as using asymmetric projection heads. For non-contrastive learning, we use our framework to derive a simple and novel objective. Our resulting SSL algorithms outperform baselines on standard benchmarks, including SwAV+multicrops on linear probing of ImageNet.

For agents

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

get_harvested_code_for_paper("2209.06235")
get_code_for_paper("2209.06235")
have("2209.06235")

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

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

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

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

Connect an agent — have() is free.