SYNTOLOGY HomeExplorerAtlasCodeMethodologyAboutDevelopersFeedPricing
Paper · 2203.14415 · 2022

Mugs: A Multi-Granular Self-Supervised Learning Framework

arXiv · PDF · Open in the Atlas

Code that ran

19 of 21 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; 3 honoured the contract we drafted, 3 violated it and 7 have no contract verdict; 6 failures of our instrument; 2 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/2203.14415.json · badge: /api/ran/2203.14415.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
sail-sg/mugs canonical (classifier label)
classifier basis not recorded on the link
19 ran · 2 no recorded run
FunctionStatusWhere it lives
bool_flag Ran
ran, violated the contract we drafted
sail-sg/mugs/utils.py
pointer only (licence: Apache-2.0); the stored copy get_code serves, from sthalles/MaSSL, is pointer only (licence: NONE) · get_code("c19231378e41dc5a")
How it ran

The body of this sample is withheld: this paper's link allows the body inline (Apache-2.0), but get_code serves the stored copy, first harvested from sthalles/MaSSL, 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.

build_dataset Ran
ran on a synthesized input
sail-sg/mugs/eval/eval_finetuning/eval_finetuning.py
code served (permissive licence) · get_code("961c92c8136b0f58")
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. 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
import os
import tempfile
from PIL import Image
import numpy as np

torch.manual_seed(0)

# Create a temporary directory structure for ImageFolder
temp_dir = tempfile.mkdtemp()
train_dir = os.path.join(temp_dir, 'train')
val_dir = os.path.join(temp_dir, 'val')

# Create class directories
for split_dir in [train_dir, val_dir]:
    for class_id in range(1000):
        class_dir = os.path.join(split_dir, str(class_id))
        os.makedirs(class_dir, exist_ok=True)
    # Create at least one dummy image per class
    for class_id in range(1000):
        class_dir = os.path.join(split_dir, str(class_id))
        img_array = np.random.randint(0, 256, (64, 64, 3), dtype=np.uint8)
        img = Image.fromarray(img_array)
        img.save(os.path.join(class_dir, 'dummy.jpg'))

# Create args object with all required attributes
class Args:
    def __init__(self):
        self.input_size = 224
        self.imagenet_default_mean_and_std = True
        self.color_jitter = 0.4
        self.aa = 'rand-m9-mstd0.5-inc1'
        self.train_interpolation = 'bicubic'
        self.reprob = 0.25
        self.remode = 'pixel'
        self.recount = 1
        self.crop_pct = None
        self.data_path = temp_dir
        self.nb_classes = None

ARGS = {
    'is_train': True,
    'args': Args()
}
Setup block drafted by
a language model, Claude Haiku 4.5, prompt python_fixture_v1, through the batch API
Imports
PIL, numpy, timm, torch, torchvision — 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
build_transform Ran
ran on a synthesized input
sail-sg/mugs/eval/eval_finetuning/eval_finetuning.py
code served (permissive licence) · get_code("2c33c9d3e647cbf1")
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 Compose. 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
from torchvision import transforms
from timm.data import create_transform
from timm.data.constants import IMAGENET_DEFAULT_MEAN, IMAGENET_DEFAULT_STD, IMAGENET_INCEPTION_MEAN, IMAGENET_INCEPTION_STD

torch.manual_seed(0)

class Args:
    def __init__(self):
        self.input_size = 224
        self.imagenet_default_mean_and_std = True
        self.color_jitter = 0.4
        self.aa = 'rand-m9-mstd0.5'
        self.train_interpolation = 'bicubic'
        self.reprob = 0.25
        self.remode = 'pixel'
        self.recount = 1
        self.crop_pct = None

args = Args()

ARGS = {
    'is_train': True,
    'args': args
}
Setup block drafted by
a language model, Claude Haiku 4.5, prompt python_fixture_v1, through the batch API
Imports
timm, torch, torchvision — import names as written, not package names to install; a name the repository itself provides is not a package
Returned
type Compose — a Compose output has no array shape of its own; none is stated — the instrument coerces any output to an array; for a Compose 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
clip_gradients Ran
ran, honoured the contract we drafted
sail-sg/mugs/src/optimizer.py
code served (permissive licence) · get_code("3adab9891c1273b6")
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
import torch.nn as nn

torch.manual_seed(0)

# Create a simple model with parameters that have gradients
class SimpleModel(nn.Module):
    def __init__(self):
        super().__init__()
        self.linear1 = nn.Linear(4, 3)
        self.linear2 = nn.Linear(3, 2)
    
    def forward(self, x):
        x = self.linear1(x)
        x = self.linear2(x)
        return x

# Instantiate the model
model = SimpleModel()

# Create dummy input and compute gradients
dummy_input = torch.randn(2, 4)
dummy_target = torch.randn(2, 2)

# Forward pass
output = model(dummy_input)
loss = nn.MSELoss()(output, dummy_target)

# Backward pass to create gradients
loss.backward()

# Set clip value
clip = 0.5

ARGS = {
    "model": model,
    "clip": clip
}
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
cosine_scheduler Ran
ran, honoured the contract we drafted
sail-sg/mugs/src/optimizer.py
code served (permissive licence) · get_code("990ca4fb0109bfab")
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 1, dtype family float, shape (1000,) 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 numpy as np

ARGS = {
    "base_value": 0.1,
    "final_value": 0.001,
    "epochs": 10,
    "niter_per_ep": 100,
    "warmup_epochs": 2,
    "start_warmup_value": 0.0,
}
Setup block drafted by
a language model, Claude Haiku 4.5, prompt python_fixture_v1, through the batch API
Imports
numpy — import names as written, not package names to install; a name the repository itself provides is not a package
Returned
type ndarray, ndim 1, dtype family float, shape (1000,) — shape (1000,) 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
drop_path Ran
ran; the contract check could not run (RAISES, DEP_MISSING or TIMEOUT)
sail-sg/mugs/src/vision_transformer.py
code served (permissive licence) · get_code("793f2b6524ba26f0")
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 4, dtype family float, shape (2, 4, 3, 3) 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 tensor for drop_path to process
# Shape: (batch_size=2, channels=4, height=3, width=3) for a 4D tensor
x = torch.randn(2, 4, 3, 3, dtype=torch.float32)

# Arguments for drop_path function
ARGS = {
    "x": x,
    "drop_prob": 0.5,
    "training": 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 4, dtype family float, shape (2, 4, 3, 3) — shape (2, 4, 3, 3) 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
find_classes Ran
ran on a synthesized input
sail-sg/mugs/src/dataset.py
code served (permissive licence) · get_code("e8a374d2601aaaa9")
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. 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 with subdirectories to simulate class folders
temp_dir = tempfile.mkdtemp()

# Create some class folders
class_folders = ['class_a', 'class_b', 'class_c', 'class_d']
for folder in class_folders:
    os.makedirs(os.path.join(temp_dir, folder))

# Define arguments for find_classes
ARGS = {
    'directory': temp_dir,
    'class_num': 2
}
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 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_logger Ran
ran on a synthesized input
sail-sg/mugs/utils.py
code served (permissive licence) · get_code("67bc6a24e6bba540")
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 RootLogger. 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 logging
import tempfile
import os

# Create a temporary file path for the logger output
temp_dir = tempfile.gettempdir()
file_path_name = os.path.join(temp_dir, "test_logger.log")

ARGS = {
    "file_path_name": file_path_name
}
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 RootLogger — a RootLogger output has no array shape of its own; none is stated — the instrument coerces any output to an array; for a RootLogger 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_loss_scale_for_deepspeed Ran
ran, honoured the contract we drafted
sail-sg/mugs/eval/eval_finetuning/engine_for_finetuning.py
pointer only (licence: Apache-2.0); the stored copy get_code serves, from kangsankim07/videoicl, is pointer only (licence: NONE) · get_code("29416043c7035e7c")
How it ran

The body of this sample is withheld: this paper's link allows the body inline (Apache-2.0), but get_code serves the stored copy, first harvested from kangsankim07/videoicl, 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.

get_params_groups Ran
ran on a synthesized input
sail-sg/mugs/src/optimizer.py
code served (permissive licence) · get_code("7a2ce97fc746d0ce")
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
import torch.nn as nn

torch.manual_seed(0)

class SimpleModel(nn.Module):
    def __init__(self):
        super().__init__()
        # Regular parameters (will be regularized)
        self.linear1 = nn.Linear(4, 3)
        
        # Patch embed parameters
        self.patch_embed = nn.Linear(4, 2)
        
        # Bias parameters (not regularized)
        self.bias_param = nn.Parameter(torch.randn(5))
        
        # 1D parameter (not regularized due to len(shape) == 1)
        self.scale = nn.Parameter(torch.randn(3))
        
        # Patch embed bias (not regularized)
        self.patch_embed.bias.requires_grad = True
    
    def forward(self, x):
        return self.linear1(x)

model = SimpleModel()

ARGS = {
    'model': 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 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
get_sinusoid_encoding_table Ran
ran on a synthesized input
sail-sg/mugs/eval/eval_finetuning/model_for_finetuning.py
code served (permissive licence) · get_code("a45ecd9b366b453e")
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 (1, 6, 4) 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 numpy as np
import torch

torch.manual_seed(0)

ARGS = {
    "n_position": 5,
    "d_hid": 4,
    "cls": True,
}
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 Tensor, ndim 3, dtype family float, shape (1, 6, 4) — shape (1, 6, 4) 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
has_batchnorms Ran
ran on a synthesized input
sail-sg/mugs/utils.py
code served (permissive licence) · get_code("a35723fa2858c406")
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
from torch import nn

torch.manual_seed(0)

# Create a simple model WITH batch normalization
class ModelWithBatchNorm(nn.Module):
    def __init__(self):
        super().__init__()
        self.conv = nn.Conv2d(3, 16, kernel_size=3)
        self.bn = nn.BatchNorm2d(16)
        self.fc = nn.Linear(16, 10)
    
    def forward(self, x):
        x = self.conv(x)
        x = self.bn(x)
        return x

model_with_bn = ModelWithBatchNorm()

ARGS = {
    "model": model_with_bn
}
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
has_file_allowed_extension Ran
ran, violated the contract we drafted
sail-sg/mugs/src/dataset.py
code served (permissive licence) · get_code("826e35844a00b3a3")
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.

ARGS = {
    "filename": "example_image.jpg",
    "extensions": (".jpg", ".png", ".gif", ".bmp")
}
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 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
is_image_file Ran
ran, violated the contract we drafted
sail-sg/mugs/src/dataset.py
code served (permissive licence) · get_code("75aa69b9b8b80e72")
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 numpy as np

# Test with various image file paths
ARGS = {
    "filename": "image.jpg"
}
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 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
shear_x Ran
ran; our contract draft was wrong, not the code
sail-sg/mugs/src/RandAugment.py
code served (permissive licence) · get_code("e866e1196986f728")
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 Image. 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 random
import PIL
from PIL import Image, ImageEnhance, ImageOps

# Create a simple PIL Image object
img = Image.new('RGB', (100, 100), color='red')

# Define ARGS dict with all parameters for shear_x
ARGS = {
    'img': img,
    'factor': 0.5,
    'resample': Image.BILINEAR,
    'fillcolor': (255, 255, 255)
}
Setup block drafted by
a language model, Claude Haiku 4.5, prompt python_fixture_v1, through the batch API
Imports
PIL — import names as written, not package names to install; a name the repository itself provides is not a package
Returned
type Image — a Image output has no array shape of its own; none is stated — the instrument coerces any output to an array; for a Image output the recorded ndim 3 and dtype family int 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
shear_y Ran
ran; our contract draft was wrong, not the code
sail-sg/mugs/src/RandAugment.py
code served (permissive licence) · get_code("7b2503c99c9447fb")
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 Image. 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 random
import PIL
from PIL import Image, ImageEnhance, ImageOps

# Create a simple PIL Image for testing
img = Image.new('RGB', (100, 100), color='red')

# Define ARGS dict with all parameters for shear_y function
ARGS = {
    'img': img,
    'factor': 0.5,
    'resample': Image.BILINEAR,
    'fillcolor': (255, 255, 255)
}
Setup block drafted by
a language model, Claude Haiku 4.5, prompt python_fixture_v1, through the batch API
Imports
PIL — import names as written, not package names to install; a name the repository itself provides is not a package
Returned
type Image — a Image output has no array shape of its own; none is stated — the instrument coerces any output to an array; for a Image output the recorded ndim 3 and dtype family int 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
train_class_batch Ran
ran; our contract draft was wrong, not the code
sail-sg/mugs/eval/eval_finetuning/engine_for_finetuning.py
pointer only (licence: Apache-2.0); the stored copy get_code serves, from kangsankim07/videoicl, is pointer only (licence: NONE) · get_code("c7976ea27edc377a")
How it ran

The body of this sample is withheld: this paper's link allows the body inline (Apache-2.0), but get_code serves the stored copy, first harvested from kangsankim07/videoicl, 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.

translate_x_rel Ran
ran; our contract draft was wrong, not the code
sail-sg/mugs/src/RandAugment.py
code served (permissive licence) · get_code("323759f906fbb394")
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 Image. 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 random
import PIL
from PIL import Image
import numpy as np

# Create a small PIL Image object for testing
# The function uses img.size[0] and img.transform()
test_img = Image.new('RGB', (100, 80), color='red')

# Define ARGS dict with all parameters for translate_x_rel
ARGS = {
    'img': test_img,
    'pct': 0.2,
    'resample': Image.BILINEAR,
    'fillcolor': (255, 255, 255)
}
Setup block drafted by
a language model, Claude Haiku 4.5, prompt python_fixture_v1, through the batch API
Imports
PIL, numpy — import names as written, not package names to install; a name the repository itself provides is not a package
Returned
type Image — a Image output has no array shape of its own; none is stated — the instrument coerces any output to an array; for a Image output the recorded ndim 3 and dtype family int 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
trunc_normal_ Ran
ran; the contract check could not run (RAISES, DEP_MISSING or TIMEOUT)
sail-sg/mugs/src/vision_transformer.py
code served (permissive licence) · get_code("e6d9582234fb26e6")
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 2, dtype family float, shape (2, 4) 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 math
import warnings

torch.manual_seed(0)

# Create a small tensor to initialize with truncated normal distribution
tensor = torch.empty(2, 4)

# Define arguments for trunc_normal_
ARGS = {
    "tensor": tensor,
    "mean": 0.0,
    "std": 1.0,
    "a": -2.0,
    "b": 2.0
}
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 2, dtype family float, shape (2, 4) — shape (2, 4) 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
concat_all_gather Not yet run
unverified (harvested, no recorded run)
sail-sg/mugs/src/model.py
code served (permissive licence) · get_code("73cecca9f3575f09")
How it ran

no invocation recorded.

vit_tiny Not yet run
unverified (harvested, no recorded run)
sail-sg/mugs/src/vision_transformer.py
code served (permissive licence) · get_code("f5479cb822d15445")
How it ran

no invocation recorded.

Also present in other papers' code

Of 21 samples lifted from this paper's linked repositories, 21 carry a function identity and 0 do not. Of the 21 distinct functions with an identity, 14 are also present in other papers whose code we hold (10 with at least one paper dated earlier, 7 the same month, 14 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
drop_path 224 other papers
26 dated earlier, 7 the same month, 188 later, 2 same year, order not determinable, 1 undated · 38 only as an assembly brick
2003.12039 (2020-03)
RAFT: Recurrent All-Pairs Field Transforms for Optical Flow
2007.09384 (2020-07)
Multi-Scale Positive Sample Refinement for Few-Shot Object Detection
2010.11929 (2020-10)
An Image is Worth 16x16 Words: Transformers for Image Recognition at Scale
and 221 more not named here
trunc_normal_ 160 other papers
21 dated earlier, 5 the same month, 133 later, 1 same year, order not determinable · 36 only as an assembly brick
1911.10194 (2019-11)
Panoptic-DeepLab: A Simple, Strong, and Fast Baseline for Bottom-Up Panoptic Segmentation
2005.10242 (2020-05)
Understanding Contrastive Representation Learning through Alignment and Uniformity on the Hypersphere
2007.12911 (2020-07)
Tighter risk certificates for neural networks
and 157 more not named here
concat_all_gather 138 other papers
40 dated earlier, 3 the same month, 93 later, 2 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
cosine_scheduler 37 other papers
7 dated earlier, 1 the same month, 28 later, 1 same year, order not determinable
2005.10242 (2020-05)
Understanding Contrastive Representation Learning through Alignment and Uniformity on the Hypersphere
2103.15375 (2021-03)
AlignMixup: Improving Representations By Interpolating Aligned Features
2106.09681 (2021-06)
XCiT: Cross-Covariance Image Transformers
and 34 more not named here
vit_tiny 33 other papers
2 dated earlier, 1 the same month, 29 later, 1 undated
2201.02609 (2022-01)
Generalized Category Discovery
2202.11929 (2022-02)
Word Segmentation on Discovered Phone Units with Dynamic Programming and Self-Supervised Scoring
2203.08414 (2022-03)
Unsupervised Semantic Segmentation by Distilling Feature Correspondences
and 30 more not named here
bool_flag 31 other papers
4 dated earlier, 1 the same month, 25 later, 1 same year, order not determinable
2106.09681 (2021-06)
XCiT: Cross-Covariance Image Transformers
2109.13228 (2021-09)
PASS: An ImageNet replacement for self-supervised pretraining without humans
2111.12958 (2021-11)
Self-Distilled Self-Supervised Representation Learning
and 28 more not named here
clip_gradients 28 other papers
4 dated earlier, 1 the same month, 22 later, 1 same year, order not determinable
2106.09681 (2021-06)
XCiT: Cross-Covariance Image Transformers
2109.13228 (2021-09)
PASS: An ImageNet replacement for self-supervised pretraining without humans
2111.12958 (2021-11)
Self-Distilled Self-Supervised Representation Learning
and 25 more not named here
shear_x 27 other papers
4 dated earlier, 21 later, 2 same year, order not determinable
1811.12814 (2018-11)
Graph-Based Global Reasoning Networks
2109.03508 (2021-09)
RepNAS: Searching for Efficient Re-parameterizing Blocks
2109.06165 (2021-09)
CDTrans: Cross-domain Transformer for Unsupervised Domain Adaptation
and 24 more not named here
shear_y 27 other papers
4 dated earlier, 21 later, 2 same year, order not determinable
1811.12814 (2018-11)
Graph-Based Global Reasoning Networks
2109.03508 (2021-09)
RepNAS: Searching for Efficient Re-parameterizing Blocks
2109.06165 (2021-09)
CDTrans: Cross-domain Transformer for Unsupervised Domain Adaptation
and 24 more not named here
translate_x_rel 26 other papers
4 dated earlier, 20 later, 2 same year, order not determinable
1811.12814 (2018-11)
Graph-Based Global Reasoning Networks
2109.03508 (2021-09)
RepNAS: Searching for Efficient Re-parameterizing Blocks
2109.06165 (2021-09)
CDTrans: Cross-domain Transformer for Unsupervised Domain Adaptation
and 23 more not named here
get_loss_scale_for_deepspeed 15 other papers
15 later
2211.09120 (2022-11)
AdaMAE: Adaptive Masking for Efficient Spatiotemporal Learning with Masked Autoencoders
2212.10368 (2022-12)
Masked Event Modeling: Self-Supervised Pretraining for Event Cameras
2303.16058 (2023-03)
Unmasked Teacher: Towards Training-Efficient Video Foundation Models
and 12 more not named here
is_image_file 12 other papers
12 later
2204.08381 (2022-04)
Multiple-environment Self-adaptive Network for Aerial-view Geo-localization
2205.03892 (2022-05)
ConvMAE: Masked Convolution Meets Masked Autoencoders
2208.07049 (2022-08)
Self-Supervised Vision Transformers for Malware Detection
and 9 more not named here
train_class_batch 11 other papers
11 later
2211.09120 (2022-11)
AdaMAE: Adaptive Masking for Efficient Spatiotemporal Learning with Masked Autoencoders
2212.10368 (2022-12)
Masked Event Modeling: Self-Supervised Pretraining for Event Cameras
2307.02227 (2023-07)
MAE-DFER: Efficient Masked Autoencoder for Self-supervised Dynamic Facial Expression Recognition
and 8 more not named here
has_file_allowed_extension 10 other papers
10 later
2204.08381 (2022-04)
Multiple-environment Self-adaptive Network for Aerial-view Geo-localization
2205.03892 (2022-05)
ConvMAE: Masked Convolution Meets Masked Autoencoders
2208.07049 (2022-08)
Self-Supervised Vision Transformers for Malware Detection
and 7 more not named here

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

In self-supervised learning, multi-granular features are heavily desired though rarely investigated, as different downstream tasks (e.g., general and fine-grained classification) often require different or multi-granular features, e.g.~fine- or coarse-grained one or their mixture. In this work, for the first time, we propose an effective MUlti-Granular Self-supervised learning (Mugs) framework to explicitly learn multi-granular visual features. Mugs has three complementary granular supervisions: 1) an instance discrimination supervision (IDS), 2) a novel local-group discrimination supervision (LGDS), and 3) a group discrimination supervision (GDS). IDS distinguishes different instances to learn instance-level fine-grained features. LGDS aggregates features of an image and its neighbors into a local-group feature, and pulls local-group features from different crops of the same image together and push them away for others. It provides complementary instance supervision to IDS via an extra alignment on local neighbors, and scatters different local-groups separately to increase discriminability. Accordingly, it helps learn high-level fine-grained features at a local-group level. Finally, to prevent similar local-groups from being scattered randomly or far away, GDS brings similar samples close and thus pulls similar local-groups together, capturing coarse-grained features at a (semantic) group level. Consequently, Mugs can capture three granular features that often enjoy higher generality on diverse downstream tasks over single-granular features, e.g.~instance-level fine-grained features in contrastive learning. By only pretraining on ImageNet-1K, Mugs sets new SoTA linear probing accuracy 82.1$\%$ on ImageNet-1K and improves previous SoTA by $1.1\%$. It also surpasses SoTAs on other tasks, e.g. transfer learning, detection and segmentation.

For agents

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

get_harvested_code_for_paper("2203.14415")
get_code_for_paper("2203.14415")
have("2203.14415")

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

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

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

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

Connect an agent — have() is free.