SYNTOLOGY HomeExplorerAtlasCodeMethodologyAboutDevelopersFeedPricing
Paper · 2403.13808 · 2024

On Pretraining Data Diversity for Self-Supervised Learning

arXiv · PDF · Open in the Atlas

Code that ran

6 of 7 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; 6 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/2403.13808.json · badge: /api/ran/2403.13808.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
hammoudhasan/diversityssl canonical (classifier label)
classifier basis: census
6 ran · 1 no recorded run
FunctionStatusWhere it lives
barlow_loss_func Ran
ran; our contract draft was wrong, not the code
hammoudhasan/diversityssl/solo/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)
hammoudhasan/diversityssl/solo/losses/byol.py
pointer only (licence: MIT); the stored copy get_code serves, from PKU-ML/nlb, is pointer only (licence: NONE) · get_code("273532e06cb3967e")
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. A run is recorded.

extract_features Ran
ran; the contract check could not run (RAISES, DEP_MISSING or TIMEOUT)
hammoudhasan/diversityssl/main_knn.py
code served (permissive licence) · get_code("8916e0f98b777300")
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)

class DummyModel(nn.Module):
    def __init__(self):
        super().__init__()
        self.fc = nn.Linear(4, 3)
        self.proj = nn.Linear(3, 2)
    
    def forward(self, x):
        feats = self.fc(x)
        z = self.proj(feats)
        return {'feats': feats, 'z': z}

# Create dummy data loader
batch_data = []
for _ in range(2):
    images = torch.randn(2, 4)
    labels = torch.randint(0, 5, (2,))
    batch_data.append((images, labels))

loader = DataLoader(batch_data, batch_size=2)

model = DummyModel()

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
mae_loss_func Ran
ran; our contract draft was wrong, not the code
hammoudhasan/diversityssl/solo/losses/mae.py
code served (permissive licence) · get_code("a07d9a7525702b80")
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

torch.manual_seed(0)

# Create valid arguments for mae_loss_func
# imgs: [N, 3, H, W] - batch of 2, 3 channels, 4x4 spatial dims
imgs = torch.randn(2, 3, 4, 4)

# patch_size: int - must divide evenly into H and W
patch_size = 2

# pred: [N, Tokens, pixels * pixels * 3]
# With patch_size=2 and H=W=4, we have h=w=2, so Tokens=4
# pixels*pixels*3 = 2*2*3 = 12
pred = torch.randn(2, 4, 12)

# mask: [N, Tokens] - binary mask where 1 means masked
# With 4 tokens, mask shape is [2, 4]
mask = torch.tensor([[1, 0, 1, 0], [1, 1, 0, 0]], dtype=torch.float32)

# norm_pix_loss: bool
norm_pix_loss = True

ARGS = {
    "imgs": imgs,
    "pred": pred,
    "mask": mask,
    "patch_size": patch_size,
    "norm_pix_loss": norm_pix_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
mocov2plus_loss_func Ran
ran; our contract draft was wrong, not the code
hammoudhasan/diversityssl/solo/losses/mocov2plus.py
code served (permissive licence) · get_code("4dd7c3cff0150cb9")
How it ran

Ran in Syntology's sandbox on this synthesized input (drafted by a language model, Claude Sonnet 4.5, prompt python_fixture_v1) 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 query: NxD tensor (batch_size=2, embedding_dim=4)
query = torch.randn(2, 4)
query = F.normalize(query, dim=1)  # Normalize as typical in contrastive learning

# Create key: NxD tensor (batch_size=2, embedding_dim=4)
key = torch.randn(2, 4)
key = F.normalize(key, dim=1)

# Create queue: DxK tensor (embedding_dim=4, queue_size=6)
# Note: queue is transposed (D x K) for efficient einsum computation
queue = torch.randn(4, 6)
queue = F.normalize(queue, dim=0)  # Normalize along embedding dimension

# Temperature parameter
temperature = 0.1

ARGS = {
    'query': query,
    'key': key,
    'queue': queue,
    'temperature': temperature
}
Setup block drafted by
a language model, Claude Sonnet 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 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
patchify Ran
ran; our contract draft was wrong, not the code
hammoudhasan/diversityssl/solo/losses/mae.py
code served (permissive licence) · get_code("3e6a557bf1ad83d9")
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 3, dtype family float, shape (2, 4, 12) 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

torch.manual_seed(0)

# Create a small batch of images
# Shape: [N=2, 3, H=4, W=4] where H and W are divisible by patch_size
imgs = torch.randn(2, 3, 4, 4)

# Patch size that divides evenly into image dimensions
patch_size = 2

ARGS = {
    "imgs": imgs,
    "patch_size": patch_size,
}
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 3, dtype family float, shape (2, 4, 12) — shape (2, 4, 12) 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
deepclusterv2_loss_func Not yet run
unverified (harvested, no recorded run)
hammoudhasan/diversityssl/solo/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.

Also present in other papers' code

Of 7 samples lifted from this paper's linked repositories, 7 carry a function identity and 0 do not. Of the 7 distinct functions with an identity, 7 are also present in other papers whose code we hold (7 with at least one paper dated earlier, 7 the same month, 4 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
barlow_loss_func 12 other papers
7 dated earlier, 2 the same month, 3 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
7 dated earlier, 2 the same month, 1 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 6 other papers
3 dated earlier, 1 the same month, 2 later
2007.06346 (2020-07)
Whitening for Self-Supervised Representation Learning
2204.00616 (2022-04)
Simplicial Embeddings in Self-Supervised Learning and Downstream Classification
2310.02903 (2023-10)
FroSSL: Frobenius Norm Minimization for Efficient Multiview Self-Supervised Learning
and 3 more not named here
mocov2plus_loss_func 5 other papers
2 dated earlier, 2 the same month, 1 later
2003.04297 (2020-03)
Improved Baselines with Momentum Contrastive Learning
2007.06346 (2020-07)
Whitening for Self-Supervised Representation Learning
2403.12448 (2024-03)
Do Generated Data Always Help Contrastive Learning?
and 2 more not named here
mae_loss_func 4 other papers
2 dated earlier, 2 the same month
2007.06346 (2020-07)
Whitening for Self-Supervised Representation Learning
2310.02903 (2023-10)
FroSSL: Frobenius Norm Minimization for Efficient Multiview Self-Supervised Learning
2403.12448 (2024-03)
Do Generated Data Always Help Contrastive Learning?
and 1 more not named here
patchify 4 other papers
2 dated earlier, 2 the same month
2007.06346 (2020-07)
Whitening for Self-Supervised Representation Learning
2310.02903 (2023-10)
FroSSL: Frobenius Norm Minimization for Efficient Multiview Self-Supervised Learning
2403.12448 (2024-03)
Do Generated Data Always Help Contrastive Learning?
and 1 more not named here
extract_features 2 other papers
1 dated earlier, 1 the same month
2204.00616 (2022-04)
Simplicial Embeddings in Self-Supervised Learning and Downstream Classification
2403.12448 (2024-03)
Do Generated Data Always Help Contrastive 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

We explore the impact of training with more diverse datasets, characterized by the number of unique samples, on the performance of self-supervised learning (SSL) under a fixed computational budget. Our findings consistently demonstrate that increasing pretraining data diversity enhances SSL performance, albeit only when the distribution distance to the downstream data is minimal. Notably, even with an exceptionally large pretraining data diversity achieved through methods like web crawling or diffusion-generated data, among other ways, the distribution shift remains a challenge. Our experiments are comprehensive with seven SSL methods using large-scale datasets such as ImageNet and YFCC100M amounting to over 200 GPU days. Code and trained models are available at https://github.com/hammoudhasan/DiversitySSL

For agents

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

get_harvested_code_for_paper("2403.13808")
get_code_for_paper("2403.13808")
have("2403.13808")

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

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

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

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

Connect an agent — have() is free.