SYNTOLOGY HomeExplorerAtlasCodeMethodologyAboutDevelopersFeedPricing
Paper · 1710.09412 · ICLR · 2017

mixup: BEYOND EMPIRICAL RISK MINIMIZATION

Hongyi Zhang, Yann Dauphin, David Lopez-Paz, Mit Cisse

arXiv · PDF · Open in the Atlas

Code that ran

36 of 47 samples (functions and classes) lifted from this paper's linked repositories executed on a synthesized input in Syntology's jail (5 of them constructed an object rather than computing a result; 2 honoured the contract we drafted, 0 violated it and 9 have no contract verdict; 25 failures of our instrument; 11 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/1710.09412.json · badge: /api/ran/1710.09412.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
facebookresearch/ClassyVision community
Papers with Code archive
5 ran · 1 no recorded run
nikolaev-n/CocktailPartySpeakerRecognition community (classifier label)
classifier basis not recorded on the link
3 ran · 0 no recorded run
leehomyc/mixup_pytorch community (classifier label)
classifier basis not recorded on the link
2 ran · 1 no recorded run
Westlake-AI/openmixup community
Papers with Code archive
2 ran · 1 no recorded run
tanmaypandey7/wheat-detection community
not in the paper's declared repositories
2 ran · 1 no recorded run
lRomul/argus-freesound community
not in the paper's declared repositories
2 ran · 0 no recorded run
tugstugi/pytorch-speech-commands community
not in the paper's declared repositories
2 ran · 0 no recorded run
toshi-k/kaggle-bengaliai-handwritten-grapheme-classification community
not in the paper's declared repositories
1 ran · 1 no recorded run
SarthakYadav/audax community
Papers with Code archive
1 ran · 1 no recorded run
Hazelsuko07/InstaHide community
Papers with Code archive
1 ran · 1 no recorded run
js-aguiar/wheat-object-detection community
not in the paper's declared repositories
1 ran · 0 no recorded run
jankrepl/mildlyoverfitted community
not in the paper's declared repositories
1 ran · 0 no recorded run
dongdong69/MixAugmentation community
Papers with Code archive
1 ran · 0 no recorded run
wangermeng2021/FastClassification community
not in the paper's declared repositories
1 ran · 0 no recorded run
ENSTA-U2IS-AI/torch-uncertainty community
not in the paper's declared repositories
1 ran · 0 no recorded run
acmiyaguchi/birdclef-2022 community
Papers with Code archive
1 ran · 0 no recorded run
pytorch/vision community
not in the paper's declared repositories
1 ran · 0 no recorded run
Yangget/Mixup_All-use community
Papers with Code archive
1 ran · 0 no recorded run
PsorTheDoctor/microarray-data community
Papers with Code archive
1 ran · 0 no recorded run
mingsun-tse/good-da-in-kd community
not in the paper's declared repositories
1 ran · 0 no recorded run
tusharip/augmentations community
not in the paper's declared repositories
1 ran · 0 no recorded run
hongyi-zhang/mixup community
not in the paper's declared repositories
1 ran · 0 no recorded run
smilelab-fl/fednoisy community
not in the paper's declared repositories
1 ran · 0 no recorded run
Ryoo72/dimension-wise_mixup community
Papers with Code archive
1 ran · 0 no recorded run
andychinka/dcase-challenge community
Papers with Code archive
1 ran · 0 no recorded run
FunctionStatusWhere it lives
AddMixer Ran
ran on a synthesized input · constructed an object; no result was computed
lRomul/argus-freesound/src/mixers.py
code served (permissive licence) · get_code("60fc83929db77047")
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, AddMixer: 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 numpy as np
import random

torch.manual_seed(0)
random.seed(0)
np.random.seed(0)

# Create a minimal dataset class with required attributes and methods
class MinimalDataset:
    def __init__(self):
        # images_lst: list of numpy arrays
        self.images_lst = [
            np.random.randn(3, 4, 4).astype(np.float32),
            np.random.randn(3, 4, 4).astype(np.float32),
        ]
        # targets_lst: list of tensors
        self.targets_lst = [
            torch.randn(2, 3),
            torch.randn(2, 3),
        ]
    
    def transform(self, image):
        # Simple transform: convert to tensor
        return torch.from_numpy(image).float()

dataset = MinimalDataset()

ARGS = {
    'alpha_dist': 'uniform'
}
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 AddMixer — 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 AddMixer 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
BengaliMixUpDataset Ran
ran on a synthesized input · constructed an object; no result was computed
toshi-k/kaggle-bengaliai-handwritten-grapheme-classification/source/02_nn_solution/debug_dataset.py
code served (permissive licence) · get_code("eda27e400dd33e72")
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, BengaliMixUpDataset: 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 numpy as np
import pandas as pd
from pathlib import Path
import tempfile
import os
import cv2
from torch.utils.data import Dataset

torch.manual_seed(0)
np.random.seed(0)

# Define constants that are used in the module
HEIGHT = 137
WIDTH = 236
NUM_CONSONANT = 7
NUM_GRAPHEME_ROOT = 168
NUM_VOWEL = 11
SIZE = 128

def bbox(img):
    rows = np.any(img, axis=1)
    cols = np.any(img, axis=0)
    rmin, rmax = np.where(rows)[0][[0, -1]]
    cmin, cmax = np.where(cols)[0][[0, -1]]
    return (rmin, rmax, cmin, cmax)

def crop_resize(img0, size=SIZE, pad=16):
    ymin, ymax, xmin, xmax = bbox(img0[5:-5, 5:-5] > 80)
    xmin = xmin - 13 if xmin > 13 else 0
    ymin = ymin - 10 if ymin > 10 else 0
    xmax = xmax + 13 if xmax < WIDTH - 13 else WIDTH
    ymax = ymax + 10 if ymax < HEIGHT - 10 else HEIGHT
    img = img0[ymin:ymax, xmin:xmax]
    img[img < 28] = 0
    lx, ly = (xmax - xmin, ymax - ymin)
    l = max(lx, ly) + pad
    img = np.pad(img, [((l - ly) // 2,), ((l - lx) // 2,)], mode='constant')
    return cv2.resize(img, (size, size))

# Create a temporary directory with sample images
temp_dir = tempfile.mkdtemp()
dir_img = Path(temp_dir)

# Create 2 dummy image files
for i in range(2):
    img_array = np.random.randint(0, 255, (HEIGHT, WIDTH, 1), dtype=np.uint8)
    cv2.imwrite(str(dir_img / f"image_{i:05d}.png"), img_array)

# Create training CSV with labels
train_data = {
    'image_id': ['image_00000', 'image_00001'],
    'grapheme_root': [5, 10],
    'vowel_diacritic': [2, 3],
    'consonant_diacritic': [1, 2]
}
train_csv = pd.DataFrame(train_data)

# Create a simple augmenter function (returns identity function)
def get_augmenter_func():
    def augmenter(image):
        return {'image': image}
    return augmenter

# Create arguments for BengaliMixUpDataset
ARGS = {
    'alpha': 0.4,
    'dir_img': dir_img,
    'list_images': None,
    'train_csv': train_csv,
    'images_array': None,
    'is_aug': False,
    'get_augmenter_func': get_augmenter_func
}
Setup block drafted by
a language model, Claude Haiku 4.5, prompt python_fixture_v1, through the batch API
Imports
cv2, numpy, pandas, torch, torchvision — import names as written, not package names to install; a name the repository itself provides is not a package
Returned
type BengaliMixUpDataset — the run constructed an instance of its own class and did not call it; no shape 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
DatasetRetriever Ran
ran on a synthesized input · constructed an object; no result was computed
js-aguiar/wheat-object-detection/source/dataset.py
pointer only (licence: NONE) · get_code("7c45621d4018ce63")
How it ran

The body of this sample is withheld: GitHub detected no licence in this paper's repository, js-aguiar/wheat-object-detection 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.

MLPClassifierMixup Ran
ran on a synthesized input · constructed an object; no result was computed
jankrepl/mildlyoverfitted/github_adventures/mixup/utils.py
code served (permissive licence) · get_code("044377f3db8fca77")
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, MLPClassifierMixup: 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)

# Define the arguments for MLPClassifierMixup
n_features = 4
hidden_dims = (8, 6)
p = 0.1

ARGS = {
    "n_features": n_features,
    "hidden_dims": hidden_dims,
    "p": p,
}
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 MLPClassifierMixup — 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 MLPClassifierMixup 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
MixAug Ran
ran on a synthesized input
dongdong69/MixAugmentation/MixAug.py
pointer only (licence: NONE) · get_code("5fe78642cd386d74")
How it ran

The body of this sample is withheld: GitHub detected no licence in this paper's repository, dongdong69/MixAugmentation 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.

Mixup Ran
ran on a synthesized input · constructed an object; no result was computed
wangermeng2021/FastClassification/augment/mixup.py
code served (permissive licence) · get_code("8f549c9a18e67058")
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, Mixup: 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 numpy as np

np.random.seed(0)

# Create small batch of images (batch_size=2, channels=3, height=4, width=4)
batch_imgs = np.random.randn(2, 3, 4, 4).astype(np.float32)

# Create one-hot encoded labels (batch_size=2, num_classes=5)
one_hot_batch_labels = np.zeros((2, 5), dtype=np.float32)
one_hot_batch_labels[0, 1] = 1.0
one_hot_batch_labels[1, 3] = 1.0

ARGS = {
    "beta": 1.0,
    "prob": 1.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 Mixup — 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 Mixup 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
Mixup Ran
ran on a synthesized input
ENSTA-U2IS-AI/torch-uncertainty/src/torch_uncertainty/transforms/mixup.py
code served (permissive licence) · get_code("0d567415bc4684f0")
How it ran

Ran in Syntology's sandbox on this synthesized input (drafted by a language model, class construct-then-call prompt, model not recorded) 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
from torch import Tensor

from abc import ABC, abstractmethod
from typing import Any
import torch.nn.functional as F

class AbstractMixup(nn.Module, ABC):

    def __init__(self, alpha: float, num_classes: int, isobatch: bool=False, **kwargs: Any) -> None:
        """Abstract Mixup class.

        Args:
            alpha: Mixup alpha.
            num_classes: Number of classes.
            isobatch: Whether to use a single coefficient for the whole batch
                instead of for each pair. Defaults to ``False``.
            **kwargs: Keyword arguments for compatibility.
        """
        super().__init__()
        self.alpha = alpha
        self.distribution = torch.distributions.Beta(alpha, alpha)
        self.num_classes = num_classes
        self.isobatch = isobatch

    def _get_params(self, batch_size: int, device: torch.device) -> tuple[Tensor, Tensor]:
        if self.isobatch:
            lam = self.distribution.sample().to(device)
        else:
            lam = self.distribution.sample((batch_size,)).to(device=device)
        index = torch.randperm(batch_size, device=device)
        return (lam, index)

    def _linear_mixing(self, lam: Tensor | float, inp: Tensor, index: Tensor) -> Tensor:
        if isinstance(lam, Tensor):
            lam = lam.view(-1, *[1 for _ in range(inp.ndim - 1)]).float()
        return lam * inp + (1 - lam) * inp[index, :]

    def _mix_target(self, lam: Tensor | float, target: Tensor, index: Tensor) -> Tensor:
        y1 = F.one_hot(target, self.num_classes).float()
        y2 = F.one_hot(target[index], self.num_classes).float()
        if isinstance(lam, Tensor):
            lam = lam.view(-1, *[1 for _ in range(y1.ndim - 1)])
        return lam * y1 + (1 - lam) * y2

    @abstractmethod
    def forward(self, x: Tensor, y: Tensor, feats: Tensor | None, warp_param: float | None) -> tuple[Tensor, Tensor]:
        """Apply mixup on a batch of inputs and targets.

        Args:
            x: input or input batch.
            y: target or target batch.
            feats: features for warping mixup.
            warp_param: warping parameter.

        Returns:
            tuple[Tensor, Tensor]: mixed-up inputs and targets.
        """

class Mixup(AbstractMixup):
    """Original Mixup method from Zhang et al.

    Reference:
        "mixup: Beyond Empirical Risk Minimization" (ICLR 2021)
        http://arxiv.org/abs/1710.09412.
    """

    def forward(self, x: Tensor, y: Tensor, feats: Tensor | None=None, warp_param: float | None=None) -> tuple[Tensor, Tensor]:
        lam, index = self._get_params(x.size()[0], x.device)
        mixed_x = self._linear_mixing(lam, x, index)
        mixed_y = self._mix_target(lam, y, index)
        return (mixed_x, mixed_y)


INIT_ARGS = {
    'alpha': 1.0,
    'num_classes': 4,
    'isobatch': False,
}

ARGS = {
    'x': torch.randn(2, 3),
    'y': torch.tensor([0, 1]),
    'feats': None,
    'warp_param': None,
}

if __name__ == '__main__':
    mixup = Mixup(**INIT_ARGS)
    mixed_x, mixed_y = mixup(**ARGS)
    print("Mixed x shape:", mixed_x.shape)
    print("Mixed y shape:", mixed_y.shape)
    print("Mixed x:", mixed_x)
    print("Mixed y:", mixed_y)
Setup block drafted by
a language model, class construct-then-call prompt, model not recorded
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: torch and numpy seeded to 0 by the harness immediately before the class was constructed from INIT_ARGS (fixture_check.py)
Mixup Ran
ran on a synthesized input
acmiyaguchi/birdclef-2022/birdclef/models/classifier_nn/datasets.py
pointer only (licence: NONE) · get_code("1b55e6c4576721e0")
How it ran

The body of this sample is withheld: GitHub detected no licence in this paper's repository, acmiyaguchi/birdclef-2022 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.

PreActResNet18 Ran
ran; our contract draft was wrong, not the code
leehomyc/mixup_pytorch/models/preact_resnet.py
code served (permissive licence) · get_code("b6e5f24824f19914")
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 PreActResNet. 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)

ARGS = {
    "num_classes": 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 PreActResNet — a PreActResNet output has no array shape of its own; none is stated — the instrument coerces any output to an array; for a PreActResNet 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
RandomMixUp Ran
ran on a synthesized input
pytorch/vision/references/classification/transforms.py
code served (permissive licence) · get_code("fa87b05b59895a9b")
How it ran

Ran in Syntology's sandbox on this synthesized input (drafted by a language model, class construct-then-call prompt, model not recorded) 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 numpy as np

INIT_ARGS = {
    "num_classes": 3,
    "p": 0.5,
    "alpha": 1.0,
    "inplace": False,
}

# Create a small batch of 2 images with 4 channels, height 3, width 4
batch = torch.randn(2, 4, 3, 4)
# Create target labels for 2 samples with 3 classes
target = torch.randint(0, 3, (2,))

ARGS = {
    "batch": batch,
    "target": target,
}
Setup block drafted by
a language model, class construct-then-call prompt, model not recorded
Imports
numpy, 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: torch and numpy seeded to 0 by the harness immediately before the class was constructed from INIT_ARGS (fixture_check.py)
_recursive_mixup Ran
ran; our contract draft was wrong, not the code
facebookresearch/ClassyVision/classy_vision/dataset/transforms/mixup.py
code served (permissive licence) · get_code("6d58d3dc58c56a08")
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 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 collections.abc as abc

torch.manual_seed(0)

# Test case 1: nested structure with tensors of different dimensions
sample_3d = torch.randn(2, 3, 4)  # ndim >= 3, will be mixed
sample_2d = torch.randn(2, 3)     # ndim < 3, will not be mixed
sample_1d = torch.randn(5)        # ndim < 3, will not be mixed
sample_0d = torch.tensor(3.14)    # ndim < 3, will not be mixed

# Create a complex nested structure: list containing dict containing tuples
nested_sample = [
    {
        "tensor_3d": sample_3d,
        "nested_tuple": (sample_2d, sample_1d),
    },
    sample_0d,
    {
        "another_3d": torch.randn(3, 4, 5),
    }
]

coeff = 0.7

ARGS = {
    "sample": nested_sample,
    "coeff": coeff,
}
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 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
concat_all_gather Ran
ran; the contract check could not run (RAISES, DEP_MISSING or TIMEOUT)
Westlake-AI/openmixup/openmixup/models/augments/mixup.py
code served (permissive licence) · get_code("fa052d95a1f73aa9")
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 (4, 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 os

# Set seed for reproducibility
torch.manual_seed(0)

# Mock torch.distributed to avoid needing actual distributed setup
class MockDistributed:
    @staticmethod
    def get_world_size():
        return 2
    
    @staticmethod
    def all_gather(tensors_gather, tensor, async_op=False):
        # Simulate all_gather by filling tensors with the input tensor
        for i in range(len(tensors_gather)):
            tensors_gather[i] = tensor.clone()

# Patch torch.distributed
torch.distributed.get_world_size = MockDistributed.get_world_size
torch.distributed.all_gather = MockDistributed.all_gather

# Create a small test tensor (batch=2, dim=4)
tensor = torch.randn(2, 4)

ARGS = {
    "tensor": tensor
}
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 (4, 4) — shape (4, 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
count_files_in_dataset_dir Ran
ran, honoured the contract we drafted
nikolaev-n/CocktailPartySpeakerRecognition/audio_normalizer.py
code served (permissive licence) · get_code("8aadd870961992c4")
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 tempfile
import os

# Create a temporary directory structure with test files
temp_dir = tempfile.mkdtemp()

# Create subdirectories and files with various extensions
os.makedirs(os.path.join(temp_dir, "subdir1"), exist_ok=True)
os.makedirs(os.path.join(temp_dir, "subdir2"), exist_ok=True)

# Create test files with .txt format
open(os.path.join(temp_dir, "file1.txt"), "w").close()
open(os.path.join(temp_dir, "file2.txt"), "w").close()
open(os.path.join(temp_dir, "subdir1", "file3.txt"), "w").close()
open(os.path.join(temp_dir, "subdir1", "file4.csv"), "w").close()
open(os.path.join(temp_dir, "subdir2", "file5.txt"), "w").close()
open(os.path.join(temp_dir, "subdir2", "file6.json"), "w").close()

ARGS = {
    "dataset_dir": temp_dir,
    "file_format": ".txt"
}
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 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
cutmix_bbox_and_lam Ran
ran; the contract check could not run (RAISES, DEP_MISSING or TIMEOUT)
facebookresearch/ClassyVision/classy_vision/dataset/transforms/mixup.py
code served (permissive licence) · get_code("7769dc4e190b54d4")
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. 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 math
import numpy as np
import torch

torch.manual_seed(0)
np.random.seed(0)

ARGS = {
    "img_shape": (2, 3, 4, 5),
    "lam": 0.5,
    "ratio_minmax": None,
    "correct_lam": True,
    "count": 1,
}
Setup block drafted by
a language model, Claude Haiku 4.5, prompt python_fixture_v1
Imports
numpy, 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
do_mixup Ran
ran; our contract draft was wrong, not the code
SarthakYadav/audax/audax/transforms/mixup.py
code served (permissive licence) · get_code("1c7aeb910bc9f545")
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. 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 jax
import jax.numpy as jnp
import enum

@enum.unique
class TrainingMode(enum.Enum):
    """Look up for similarity measure in contrastive model."""
    MULTICLASS = 'multiclass'
    MULTILABEL = 'multilabel'
    CONTRASTIVE = 'contrastive'
    COLA = 'cola'

# Create a JAX random key
key = jax.random.PRNGKey(0)

# Create small input batch: (bsize=2, C=3, H=4, W=4)
inputs = jnp.ones((2, 3, 4, 4), dtype=jnp.float32)

# Create small targets batch: (bsize=2, num_classes=5)
targets = jnp.array([
    [1.0, 0.0, 1.0, 0.0, 1.0],
    [0.0, 1.0, 0.0, 1.0, 0.0]
], dtype=jnp.float32)

# Alpha parameter for beta distribution
alpha = 0.2

# Training mode
mode = TrainingMode.MULTILABEL

ARGS = {
    'key': key,
    'inputs': inputs,
    'targets': targets,
    'alpha': alpha,
    'mode': mode
}
Setup block drafted by
a language model, Claude Haiku 4.5, prompt python_fixture_v1
Imports
jax — 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_random_sample Ran
ran; our contract draft was wrong, not the code
lRomul/argus-freesound/src/mixers.py
code served (permissive licence) · get_code("ff05773d89bd720b")
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 random

torch.manual_seed(0)

class MockDataset:
    def __init__(self):
        self.images_lst = [torch.randn(3, 4, 4).numpy() for _ in range(2)]
        self.targets_lst = [torch.tensor(i) for i in range(2)]
    
    def transform(self, image):
        return torch.from_numpy(image).float()
    
    def __len__(self):
        return len(self.images_lst)

dataset = MockDataset()

ARGS = {
    'dataset': dataset
}
Setup block drafted by
a language model, Claude Haiku 4.5, prompt python_fixture_v1, through the batch API
Imports
torch — import names as written, not package names to install; a name the repository itself provides is not a package
Returned
type tuple — a tuple output has no array shape of its own; none is stated
Environment
image not recorded; re-verify against syntology-harvest-sandbox:v5-deps; not recorded for this sample: the harness installs a cuda-to-cpu shim (cuda_shim.py) before every sample and no run records whether a sample needed it; seed: none by the harness; any seed is in the setup block
load_image_and_boxes Ran
ran; our contract draft was wrong, not the code
tanmaypandey7/wheat-detection/utils/utils/datasets.py
pointer only (licence: GPL-3.0) · get_code("0d7e0c55bc9b54f4")
How it ran

The body of this sample is withheld: GPL-3.0, as GitHub detects it on this paper's repository, tanmaypandey7/wheat-detection, is not in the permissive set Syntology serves inline. 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.

load_mixup_images_and_boxes Ran
ran; our contract draft was wrong, not the code
tanmaypandey7/wheat-detection/utils/utils/datasets.py
pointer only (licence: GPL-3.0) · get_code("6d4ae2306a6dd42c")
How it ran

The body of this sample is withheld: GPL-3.0, as GitHub detects it on this paper's repository, tanmaypandey7/wheat-detection, is not in the permissive set Syntology serves inline. 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.

load_wave Ran
ran; our contract draft was wrong, not the code
nikolaev-n/CocktailPartySpeakerRecognition/gen_audio_features.py
code served (permissive licence) · get_code("28154e77998b2963")
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 tempfile
import numpy as np
import scipy.io.wavfile as wf

# Create a temporary WAV file to use as test input
temp_dir = tempfile.mkdtemp()
temp_path = f"{temp_dir}/test_audio.wav"

# Generate simple test audio data
sample_rate = 16000
duration_seconds = 0.1
num_samples = int(sample_rate * duration_seconds)
wave_data = np.random.randint(-32768, 32767, num_samples, dtype=np.int16)

# Write the WAV file
wf.write(temp_path, sample_rate, wave_data)

# Define arguments for load_wave function
ARGS = {
    "path_to_file": temp_path
}
Setup block drafted by
a language model, Claude Haiku 4.5, prompt python_fixture_v1, through the batch API
Imports
numpy, scipy — 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
mixup Ran
ran; the contract check could not run (RAISES, DEP_MISSING or TIMEOUT)
Westlake-AI/openmixup/openmixup/models/augments/mixup.py
code served (permissive licence) · get_code("656d88b7d9a9e392")
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 numpy as np
from unittest.mock import MagicMock, patch

torch.manual_seed(0)
np.random.seed(0)

# Mock distributed setup
def mock_get_world_size():
    return 2

def mock_get_rank():
    return 0

def mock_broadcast(tensor, src=0):
    pass

def mock_all_gather(tensors_gather, tensor, async_op=False):
    # Simulate gathering from 2 GPUs
    tensors_gather[0].copy_(tensor)
    tensors_gather[1].copy_(tensor)

# Patch torch.distributed functions
with patch('torch.distributed.get_world_size', mock_get_world_size):
    with patch('torch.distributed.get_rank', mock_get_rank):
        with patch('torch.distributed.broadcast', mock_broadcast):
            with patch('torch.distributed.all_gather', mock_all_gather):
                pass

# Create test tensors
img_4d = torch.randn(2, 3, 4, 5)  # (N, C, H, W)
img_5d = torch.randn(2, 2, 3, 4, 5)  # (N, 2, C, H, W) for two views
gt_label_onehot = torch.zeros(2, 10)
gt_label_onehot[0, 3] = 1.0
gt_label_onehot[1, 7] = 1.0

ARGS = {
    'img': img_4d,
    'gt_label': gt_label_onehot,
    'alpha': 1.0,
    'lam': None,
    'dist_mode': False,
}
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 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
mixup Ran
ran; the contract check could not run (RAISES, DEP_MISSING or TIMEOUT)
Yangget/Mixup_All-use/Mixup.py
code served (permissive licence) · get_code("bc9feed0a6523697")
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. 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 numpy as np

# Set random seed for reproducibility
np.random.seed(0)

# Create small batch data
# batch_x should be 4D tensor (batch_size, channels, height, width)
batch_x = np.random.randn(2, 3, 4, 5).astype(np.float32)

# batch_y should be 2D tensor (batch_size, num_classes)
batch_y = np.random.randn(2, 10).astype(np.float32)

# alpha parameter for beta distribution
alpha = 1.0

ARGS = {
    "alpha": alpha,
    "batch_x": batch_x,
    "batch_y": batch_y,
}
Setup block drafted by
a language model, Claude Haiku 4.5, prompt python_fixture_v1
Imports
numpy — 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
mixup Ran
ran; the contract check could not run (RAISES, DEP_MISSING or TIMEOUT)
tugstugi/pytorch-speech-commands/mixup.py
pointer only (licence: NONE) · get_code("e85b9399854d6440")
How it ran

The body of this sample is withheld: GitHub detected no licence in this paper's repository, tugstugi/pytorch-speech-commands 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.

mixup Ran
ran; the contract check could not run (RAISES, DEP_MISSING or TIMEOUT)
PsorTheDoctor/microarray-data/utils/augmentation.py
pointer only (licence: NONE) · get_code("835392836f697b21")
How it ran

The body of this sample is withheld: GitHub detected no licence in this paper's repository, PsorTheDoctor/microarray-data 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.

mixup Ran
ran; the contract check could not run (RAISES, DEP_MISSING or TIMEOUT)
mingsun-tse/good-da-in-kd/helper/loops.py
pointer only (licence: NONE) · get_code("f0f17df9d7c15828")
How it ran

The body of this sample is withheld: GitHub detected no licence in this paper's repository, mingsun-tse/good-da-in-kd 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.

mixup Ran
ran; the contract check could not run (RAISES, DEP_MISSING or TIMEOUT)
tusharip/augmentations/codes/vision.py
code served (permissive licence) · get_code("933e954914270161")
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. If your copy returns the same type on these inputs, it matched what we observed; nothing here checks that. It does NOT mean the output is correct: nothing has compared it to the paper.

import torch
import numpy as np

torch.manual_seed(0)
np.random.seed(0)

# Create small tensors for images and labels
batch_size = 2
image_channels = 3
image_height = 4
image_width = 4
num_classes = 5

images = torch.randn(batch_size, image_channels, image_height, image_width)
labels = torch.randn(batch_size, num_classes)

ARGS = {
    "images": images,
    "labels": labels,
    "alpha": 0.5
}
Setup block drafted by
a language model, Claude Haiku 4.5, prompt python_fixture_v1
Imports
numpy, 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
mixup_data Ran
ran; the contract check could not run (RAISES, DEP_MISSING or TIMEOUT)
hongyi-zhang/mixup/cifar/utils.py
code served (permissive licence) · get_code("c8f7fd47a7acbaa3")
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 numpy as np
import torch

torch.manual_seed(0)

# Create small tensors for x and y
# x: batch_size=2, feature_dim=4
x = torch.randn(2, 4)

# y: batch_size=2 (class labels)
y = torch.tensor([0, 1])

# Define ARGS dict with all parameters
ARGS = {
    'x': x,
    'y': y,
    'alpha': 1.0,
    'use_cuda': False
}
Setup block drafted by
a language model, Claude Haiku 4.5, prompt python_fixture_v1
Imports
numpy, 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
mixup_data Ran
ran; the contract check could not run (RAISES, DEP_MISSING or TIMEOUT)
smilelab-fl/fednoisy/fednoisy/utils/mixup.py
code served (permissive licence) · get_code("1905009bf59716f6")
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. If your copy returns the same type on these inputs, it matched what we observed; nothing here checks that. It does NOT mean the output is correct: nothing has compared it to the paper.

import torch
import numpy as np

torch.manual_seed(0)

# Create small tensors for x and y
# x: batch_size=2, feature_dim=4
x = torch.randn(2, 4)

# y: batch_size=2 (class labels)
y = torch.tensor([0, 1])

# alpha parameter for beta distribution
alpha = 1.0

# device parameter (CPU only)
device = None

ARGS = {
    "x": x,
    "y": y,
    "alpha": alpha,
    "device": device,
}
Setup block drafted by
a language model, Claude Haiku 4.5, prompt python_fixture_v1
Imports
numpy, 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
mixup_data Ran
ran; the contract check could not run (RAISES, DEP_MISSING or TIMEOUT)
Ryoo72/dimension-wise_mixup/models/utils.py
pointer only (licence: NOASSERTION) · get_code("b062bea460457feb")
How it ran

The body of this sample is withheld: GitHub could not classify the licence of this paper's repository, Ryoo72/dimension-wise_mixup (NOASSERTION). 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.

mixup_data Ran
ran; the contract check could not run (RAISES, DEP_MISSING or TIMEOUT)
andychinka/dcase-challenge/asc/data_aug.py
pointer only (licence: NONE) · get_code("4ef20d27ae01e4c3")
How it ran

The body of this sample is withheld: GitHub detected no licence in this paper's repository, andychinka/dcase-challenge 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.

mixup_target Ran
ran; our contract draft was wrong, not the code
facebookresearch/ClassyVision/classy_vision/dataset/transforms/mixup.py
code served (permissive licence) · get_code("448ddfbc145b985e")
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 Tensor, ndim 2, dtype family float, shape (4, 4) as a later run recorded it. 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, 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 1D target tensor with class indices
target = torch.tensor([0, 1, 2, 1], dtype=torch.long)

# Number of classes
num_classes = 4

# Lambda parameter for mixup
lam = 0.7

# Label smoothing parameter
smoothing = 0.1

ARGS = {
    'target': target,
    'num_classes': num_classes,
    'lam': lam,
    'smoothing': smoothing
}
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 Tensor, ndim 2, dtype family float, shape (4, 4) — shape (4, 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
onehot Ran
ran; the contract check could not run (RAISES, DEP_MISSING or TIMEOUT)
tugstugi/pytorch-speech-commands/mixup.py
pointer only (licence: NONE) · get_code("bc878657aee7b3c0")
How it ran

The body of this sample is withheld: GitHub detected no licence in this paper's repository, tugstugi/pytorch-speech-commands 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.

parse_label_voxceleb Ran
ran, honoured the contract we drafted
nikolaev-n/CocktailPartySpeakerRecognition/gen_audio_features.py
code served (permissive licence) · get_code("268ef97cebd35bef")
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

slash_sign = '/'

def parse_label_voxceleb(path_to_file):
    path_list = path_to_file.split(slash_sign)
    label = path_list[-3][3:]
    return int(label)

# The function splits a path by '/', takes the 3rd element from the end,
# removes the first 3 characters, and converts to int.
# We need a path string where path_list[-3] starts with 3 characters followed by digits.

path_to_file = "/data/voxceleb/id123456/wav/sample.wav"

ARGS = {
    "path_to_file": path_to_file
}
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 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
rand_bbox Ran
ran; our contract draft was wrong, not the code
facebookresearch/ClassyVision/classy_vision/dataset/transforms/mixup.py
code served (permissive licence) · get_code("19ead423fd887adc")
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 2, dtype family int; 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 math
import torch

torch.manual_seed(0)

ARGS = {
    "img_shape": (2, 3, 32, 48),
    "lam": 0.5,
    "margin": 0.1,
    "count": 2,
}
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, ndim 2, dtype family int — 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
rand_bbox_minmax Ran
ran; the contract check could not run (RAISES, DEP_MISSING or TIMEOUT)
facebookresearch/ClassyVision/classy_vision/dataset/transforms/mixup.py
code served (permissive licence) · get_code("d82c3a657cbaed6b")
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 list, ndim 2, dtype family int; 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 numpy as np
import torch

torch.manual_seed(0)
np.random.seed(0)

ARGS = {
    "img_shape": (1, 3, 32, 64),
    "minmax": (0.2, 0.8),
    "count": 2
}
Setup block drafted by
a language model, Claude Haiku 4.5, prompt python_fixture_v1
Imports
numpy, torch — import names as written, not package names to install; a name the repository itself provides is not a package
Returned
type list, ndim 2, dtype family int — 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
shuffle_minibatch Ran
ran; our contract draft was wrong, not the code
leehomyc/mixup_pytorch/main_cifar10.py
code served (permissive licence) · get_code("d3e01aa48a90e109")
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 numpy

torch.manual_seed(0)

# Create tiny batch of images: batch_size=2, H=32, W=32, C=3
batch_size = 2
inputs = torch.randn(batch_size, 3, 32, 32).float()

# Create labels: batch_size=2, labels in range [0, 9] for 10 classes
targets = torch.tensor([3, 7], dtype=torch.long)

ARGS = {
    "inputs": inputs,
    "targets": targets,
    "mixup": 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 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
vec_mul_ten Ran
ran; our contract draft was wrong, not the code
Hazelsuko07/InstaHide/train_cross.py
code served (permissive licence) · get_code("ac26d9206e0ac500")
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, 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
import torch.nn as nn

torch.manual_seed(0)

# Construct arguments for vec_mul_ten
# The function takes a vec and tensor, reshapes vec and expands it, then multiplies

vec = torch.randn(2)  # 1D vector with batch size 2
tensor = torch.randn(2, 4, 3)  # 3D tensor: (batch=2, dim1=4, dim2=3)

ARGS = {
    "vec": vec,
    "tensor": tensor
}
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, 3) — shape (2, 4, 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
MixUp Not yet run
unverified (harvested, no recorded run)
OFRIN/Tensorflow_MixUp/Train_MixUp.py
pointer only (licence: NONE) · get_code("cfc01e12143b4410")
How it ran

The body of this sample is withheld: GitHub detected no licence in this paper's repository, OFRIN/Tensorflow_MixUp 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.

MixupTransform Not yet run
unverified (harvested, no recorded run)
facebookresearch/ClassyVision/classy_vision/dataset/transforms/mixup.py
code served (permissive licence) · get_code("701284a14a921294")
How it ran

no invocation recorded.

TrainingMode Not yet run
unverified (harvested, no recorded run)
SarthakYadav/audax/audax/transforms/mixup.py
code served (permissive licence) · get_code("51f54dbb7240a484")
How it ran

no invocation recorded.

_noise Not yet run
unverified (harvested, no recorded run)
erichson/noisy_mixup/src/noisy_mixup.py
pointer only (licence: GPL-3.0) · get_code("48b6ae3361582213")
How it ran

The body of this sample is withheld: GPL-3.0, as GitHub detects it on this paper's repository, erichson/noisy_mixup, is not in the permissive set Syntology serves inline. 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.

batch_shuffle_ddp Not yet run
unverified (harvested, no recorded run)
Westlake-AI/openmixup/openmixup/models/augments/mixup.py
code served (permissive licence) · get_code("d6b836d9b156da28")
How it ran

no invocation recorded.

debug_mixup Not yet run
unverified (harvested, no recorded run)
toshi-k/kaggle-bengaliai-handwritten-grapheme-classification/source/02_nn_solution/debug_dataset.py
code served (permissive licence) · get_code("9479dbe678007bc9")
How it ran

no invocation recorded.

do_noisy_mixup Not yet run
unverified (harvested, no recorded run)
erichson/noisy_mixup/src/noisy_mixup.py
pointer only (licence: GPL-3.0) · get_code("e4a853c8450e16b2")
How it ran

The body of this sample is withheld: GPL-3.0, as GitHub detects it on this paper's repository, erichson/noisy_mixup, is not in the permissive set Syntology serves inline. 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.

load_image Not yet run
unverified (harvested, no recorded run)
tanmaypandey7/wheat-detection/utils/utils/datasets.py
pointer only (licence: GPL-3.0) · get_code("96c97809b6f786f8")
How it ran

The body of this sample is withheld: GPL-3.0, as GitHub detects it on this paper's repository, tanmaypandey7/wheat-detection, is not in the permissive set Syntology serves inline. 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.

mixup Not yet run
unverified (harvested, no recorded run)
Shubhammawa/MixMatch-Semi-Supervised-Learning/MixMatch_utils/MixMatch_utils.py
code served (permissive licence) · get_code("9632c4d4a17cb9c6")
How it ran

no invocation recorded.

mixup_data Not yet run
unverified (harvested, no recorded run)
Hazelsuko07/InstaHide/train_cross.py
code served (permissive licence) · get_code("e7229d6a2824b389")
How it ran

no invocation recorded.

shuffle_minibatch Not yet run
unverified (harvested, no recorded run)
leehomyc/mixup_pytorch/main_cifar100.py
code served (permissive licence) · get_code("a3594707e07f7e69")
How it ran

no invocation recorded.

Also present in other papers' code

Of 47 samples lifted from this paper's linked repositories, 47 carry a function identity and 0 do not. Of the 47 distinct functions with an identity, 5 are also present in other papers whose code we hold (0 with at least one paper dated earlier, 0 the same month, 5 later) and 42 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
138 later · 33 only as an assembly brick
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
1911.05722 (2019-11)
Momentum Contrast for Unsupervised Visual Representation Learning
and 135 more not named here
PreActResNet18 22 other papers
22 later
2003.04887 (2020-03)
ReZero is All You Need: Fast Convergence at Large Depth
2103.14222 (2021-03)
Adversarial Attacks are Reversible with Natural Supervision
2202.14026 (2022-02)
Robust Training under Label Noise by Over-parameterization
and 19 more not named here
load_image
brick of this paper's assembly: helper
2 other papers
2 later
1804.02767 (2018-04)
YOLOv3: An Incremental Improvement
2207.02696 (2022-07)
YOLOv7: Trainable bag-of-freebies sets new state-of-the-art for real-time object detectors
batch_shuffle_ddp
brick of this paper's assembly: helper
1 other paper
1 later · 1 only as an assembly brick
1905.04899 (2019-05)
CutMix: Regularization Strategy to Train Strong Classifiers with Localizable Features
mixup_data
brick of this paper's assembly: entry
1 other paper
1 later
2002.06815 (2020-02)
Class-Imbalanced Semi-Supervised 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

More are linked than shown here.

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

Abstract

Large deep neural networks are powerful, but exhibit undesirable behaviors such as memorization and sensitivity to adversarial examples. In this work, we propose mixup, a simple learning principle to alleviate these issues. In essence, mixup trains a neural network on convex combinations of pairs of examples and their labels. By doing so, mixup regularizes the neural network to favor simple linear behavior in-between training examples. Our experiments on the ImageNet-2012, CIFAR-10, CIFAR-100, Google commands and UCI datasets show that mixup improves the generalization of state-of-the-art neural network architectures. We also find that mixup reduces the memorization of corrupt labels, increases the robustness to adversarial examples, and stabilizes the training of generative adversarial networks.

For agents

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

get_harvested_code_for_paper("1710.09412")
get_code_for_paper("1710.09412")
have("1710.09412")

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

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

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

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

Connect an agent — have() is free.