SYNTOLOGY HomeExplorerAtlasCodeMethodologyAboutDevelopersFeedPricing
Paper · 2110.13771 · NeurIPS · 2021

AugMax: Adversarial Composition of Random Augmentations for Robust Training

Jean Kossaifi, Anima Anandkumar, Haotao Wang, Zhangyang Wang, Zhiding Yu, Chaowei Xiao

arXiv · PDF · Open in the Atlas

Code that ran

14 of 19 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, 2 violated it and 8 have no contract verdict; 1 failure of our instrument; 5 no recorded run), measured 2026-11-23; repository links from the Papers with Code archive attributed under CC BY-SA, no affiliation; bodies inline only under a permissive licence as GitHub detects it. Not a reproduction of the paper's results.

"Ran" means the function executed on a synthesized input and returned a value. It is not a reproduction of the paper's results. This record, dated, as JSON: /api/ran/2110.13771.json · badge: /api/ran/2110.13771.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
VITA-Group/AugMax canonical (classifier label)
classifier basis not recorded on the link
14 ran · 5 no recorded run
FunctionStatusWhere it lives
DenseNet40 Ran
ran on a synthesized input
VITA-Group/AugMax/models/cifar10/densenet.py
code served (permissive licence) · get_code("a6ab141be8091f9d")
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 DenseNet. 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 math

torch.manual_seed(0)

# DenseNet40 takes three parameters: growth_rate, depth, and num_classes
# All have default values, so we need to provide valid arguments

ARGS = {
    "growth_rate": 12,
    "depth": 40,
    "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 DenseNet — a DenseNet output has no array shape of its own; none is stated — the instrument coerces any output to an array; for a DenseNet 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
ResNet18_DuBN Ran
ran on a synthesized input
VITA-Group/AugMax/models/cifar10/resnet_DuBN.py
code served (permissive licence) · get_code("4bc93a5404534689")
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 ResNet_DuBN. 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,
    'init_stride': 1,
}
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 ResNet_DuBN — a ResNet_DuBN output has no array shape of its own; none is stated — the instrument coerces any output to an array; for a ResNet_DuBN 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
auc Ran
ran, violated the contract we drafted
VITA-Group/AugMax/augmax_modules/corruptions_IN.py
code served (permissive licence) · get_code("7a93b4bf9b9553b9")
How it ran

Ran in Syntology's sandbox on this synthesized input (drafted by a language model, Claude Sonnet 4.5, prompt python_fixture_v1) and returned float, ndim 0, dtype family float, shape () as a later run recorded it. The image it ran in was not recorded. If your copy returns the same type, ndim and shape on these inputs, it matched what we observed; nothing here checks that. It does NOT mean the output is correct: nothing has compared it to the paper.

import numpy as np

# The function calculates the area under a curve using the trapezoidal rule
# It expects errs to be a list or array-like object with numeric values
# representing error values at different points

errs = [0.1, 0.3, 0.5, 0.4, 0.2]

ARGS = {
    'errs': errs
}
Setup block drafted by
a language model, Claude Sonnet 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 float, ndim 0, dtype family float, shape () — shape () as a later run recorded it
dtype family
int means an integer dtype; float means any other dtype the instrument saw, bool and complex included (fixture_check.py records only these two families)
Environment
image not recorded; re-verify against syntology-harvest-sandbox:v5-deps; not recorded for this sample: the harness installs a cuda-to-cpu shim (cuda_shim.py) before every sample and no run records whether a sample needed it; seed: none by the harness; any seed is in the setup block
clipped_zoom Ran
ran; our contract draft was wrong, not the code
VITA-Group/AugMax/augmax_modules/corruptions_cifar.py
code served (permissive licence) · get_code("466ca3cdf4524d82")
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 ndarray, ndim 3, dtype family float, shape (8, 8, 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 numpy as np
from scipy.ndimage import zoom as scizoom

# Create a small test image with shape (height, width, channels)
# Using distinct dimensions: 8x8x3 for a small RGB-like image
img = np.random.rand(8, 8, 3).astype(np.float32)

# zoom_factor should be a positive number that scales the image
zoom_factor = 2.0

ARGS = {
    "img": img,
    "zoom_factor": zoom_factor,
}
Setup block drafted by
a language model, Claude Haiku 4.5, prompt python_fixture_v1
Imports
numpy, scipy — import names as written, not package names to install; a name the repository itself provides is not a package
Returned
type ndarray, ndim 3, dtype family float, shape (8, 8, 3) — shape (8, 8, 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
disk Ran
ran, honoured the contract we drafted
VITA-Group/AugMax/augmax_modules/corruptions_IN.py
code served (permissive licence) · get_code("bc8b7f1d3348c560")
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 2, dtype family float, shape (17, 17) 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 cv2

ARGS = {
    'radius': 5,
    'alias_blur': 0.1,
    'dtype': np.float32
}
Setup block drafted by
a language model, Claude Haiku 4.5, prompt python_fixture_v1, through the batch API
Imports
cv2, numpy — import names as written, not package names to install; a name the repository itself provides is not a package
Returned
type ndarray, ndim 2, dtype family float, shape (17, 17) — shape (17, 17) 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
float_parameter Ran
ran, honoured the contract we drafted
VITA-Group/AugMax/augmax_modules/augmentations.py
code served (permissive licence) · get_code("9f75cd937e9f1824")
How it ran

Ran in Syntology's sandbox on this synthesized input (drafted by a language model, Claude Haiku 4.5, prompt python_fixture_v1) and returned float, ndim 0, dtype family float, shape () as a later run recorded it. The image it ran in was not recorded. If your copy returns the same type, ndim and shape on these inputs, it matched what we observed; nothing here checks that. It does NOT mean the output is correct: nothing has compared it to the paper.

import torch
import numpy as np

torch.manual_seed(0)

# Analyzing the function:
# - level: a numeric value between 0 and PARAMETER_MAX (appears to be 10 based on division by 10.0)
# - maxval: a numeric value representing the maximum value to scale
# The function returns: float(level) * maxval / 10.0

# Simple test values
level = 5
maxval = 20.0

ARGS = {
    "level": level,
    "maxval": maxval,
}
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 float, ndim 0, dtype family float, shape () — shape () as a later run recorded it
dtype family
int means an integer dtype; float means any other dtype the instrument saw, bool and complex included (fixture_check.py records only these two families)
Environment
image not recorded; re-verify against syntology-harvest-sandbox:v5-deps; not recorded for this sample: the harness installs a cuda-to-cpu shim (cuda_shim.py) before every sample and no run records whether a sample needed it; seed: none by the harness; any seed is in the setup block
imagenet_c_testloader Ran
ran on a synthesized input
VITA-Group/AugMax/dataloaders/imagenet.py
code served (permissive licence) · get_code("6c8d4ce53435cc7b")
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 DataLoader. 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 os
import tempfile
import shutil
from PIL import Image
from torchvision import transforms
from torch.utils.data import DataLoader

torch.manual_seed(0)

# Create a temporary directory structure to mimic ImageNet-C
temp_dir = tempfile.mkdtemp()
data_dir = os.path.join(temp_dir, 'ImageNet-C')

# Create the directory structure for a specific corruption and severity
corruption = 'gaussian_noise'
severity = 1
corruption_dir = os.path.join(data_dir, corruption, str(severity))
class_dir = os.path.join(corruption_dir, 'class_0')
os.makedirs(class_dir, exist_ok=True)

# Create a few dummy images
for i in range(5):
    img_array = np.random.randint(0, 256, (224, 224, 3), dtype=np.uint8)
    img = Image.fromarray(img_array)
    img.save(os.path.join(class_dir, f'image_{i}.jpg'))

ARGS = {
    'corruption': 'gaussian_noise',
    'severity': 1,
    'data_dir': data_dir,
    'test_batch_size': 2,
    'num_workers': 0,
}
Setup block drafted by
a language model, Claude Haiku 4.5, prompt python_fixture_v1, through the batch API
Imports
PIL, numpy, torch, torchvision — import names as written, not package names to install; a name the repository itself provides is not a package
Returned
type DataLoader — a DataLoader output has no array shape of its own; none is stated — the instrument coerces any output to an array; for a DataLoader 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
imagenet_dataloaders Ran
ran on a synthesized input
VITA-Group/AugMax/dataloaders/imagenet.py
code served (permissive licence) · get_code("279e9c37b5286629")
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
from torchvision import datasets, transforms
import tempfile
import os
from PIL import Image
import numpy as np

torch.manual_seed(0)

# Create a temporary directory structure with minimal ImageNet-like data
temp_dir = tempfile.mkdtemp()
train_dir = os.path.join(temp_dir, 'train')
val_dir = os.path.join(temp_dir, 'val')

os.makedirs(train_dir, exist_ok=True)
os.makedirs(val_dir, exist_ok=True)

# Create dummy class directories
for split_dir in [train_dir, val_dir]:
    class_dir = os.path.join(split_dir, 'class0')
    os.makedirs(class_dir, exist_ok=True)
    
    # Create 2 dummy images per class
    for i in range(2):
        img_array = np.random.randint(0, 256, (224, 224, 3), dtype=np.uint8)
        img = Image.fromarray(img_array)
        img.save(os.path.join(class_dir, f'image_{i}.jpg'))

# Define a minimal AugMax stand-in class
class MinimalAugMax:
    def __init__(self, dataset, preprocess, mixture_width=2, mixture_depth=2, aug_severity=3):
        self.dataset = dataset
        self.preprocess = preprocess
        self.mixture_width = mixture_width
        self.mixture_depth = mixture_depth
        self.aug_severity = aug_severity
    
    def __len__(self):
        return len(self.dataset)
    
    def __getitem__(self, idx):
        return self.dataset[idx]

ARGS = {
    'data_dir': temp_dir,
    'transform_train': True,
    'AugMax': None,
    'mixture_width': 2,
    'mixture_depth': 2,
    'aug_severity': 3,
}
Setup block drafted by
a language model, Claude Haiku 4.5, prompt python_fixture_v1, through the batch API
Imports
PIL, numpy, 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
imagenet_deepaug_dataloaders Ran
ran on a synthesized input
VITA-Group/AugMax/dataloaders/imagenet.py
code served (permissive licence) · get_code("093c4ac2177bd44a")
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 MinimalAugMax. 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 numpy as np
from torchvision import datasets, transforms
import os
import tempfile
from PIL import Image

torch.manual_seed(0)

# Create a temporary directory structure for ImageNet-like data
temp_dir = tempfile.mkdtemp()
train_dir = os.path.join(temp_dir, 'train')
os.makedirs(train_dir, exist_ok=True)

# Create a minimal fake class structure with a few dummy classes
for class_idx in range(2):
    class_path = os.path.join(train_dir, f'class_{class_idx}')
    os.makedirs(class_path, exist_ok=True)
    
    # Create a tiny dummy image
    for img_idx in range(2):
        img = Image.new('RGB', (224, 224), color=(73, 109, 137))
        img.save(os.path.join(class_path, f'image_{img_idx}.jpg'))

# Define a minimal AugMax class that matches the function's expectations
class MinimalAugMax:
    def __init__(self, dataset, preprocess, mixture_width, mixture_depth, aug_severity):
        self.dataset = dataset
        self.preprocess = preprocess
        self.mixture_width = mixture_width
        self.mixture_depth = mixture_depth
        self.aug_severity = aug_severity
    
    def __len__(self):
        return len(self.dataset)
    
    def __getitem__(self, idx):
        return self.dataset[idx]

ARGS = {
    'data_dir': temp_dir,
    'transform_train': True,
    'AugMax': MinimalAugMax,
    'mixture_width': 2,
    'mixture_depth': 1,
    'aug_severity': 3,
}
Setup block drafted by
a language model, Claude Haiku 4.5, prompt python_fixture_v1, through the batch API
Imports
PIL, numpy, torch, torchvision — import names as written, not package names to install; a name the repository itself provides is not a package
Returned
type MinimalAugMax — a MinimalAugMax 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
int_parameter Ran
ran, honoured the contract we drafted
VITA-Group/AugMax/augmax_modules/augmentations.py
code served (permissive licence) · get_code("fa762f2f1e10f2e4")
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 int, ndim 0, dtype family int, shape () as a later run recorded it. The image it ran in was not recorded. If your copy returns the same type, ndim and shape on these inputs, it matched what we observed; nothing here checks that. It does NOT mean the output is correct: nothing has compared it to the paper.

import torch
import numpy as np

torch.manual_seed(0)

# Analyzing the function:
# - level: an integer between 0 and PARAMETER_MAX (which appears to be 10 based on the division)
# - maxval: a numeric value representing the maximum value to scale

ARGS = {
    "level": 5,
    "maxval": 100
}
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 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
sample_level Ran
ran, violated the contract we drafted
VITA-Group/AugMax/augmax_modules/augmentations.py
code served (permissive licence) · get_code("5cc8d4764ac07a35")
How it ran

Ran in Syntology's sandbox on this synthesized input (drafted by a language model, Claude Haiku 4.5, prompt python_fixture_v1) and returned float, ndim 0, dtype family float, shape () as a later run recorded it. The image it ran in was not recorded. If your copy returns the same type, ndim and shape on these inputs, it matched what we observed; nothing here checks that. It does NOT mean the output is correct: nothing has compared it to the paper.

import numpy as np

def sample_level(n):
    return np.random.uniform(low=0.1, high=n)

ARGS = {
    "n": 5
}
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 float, ndim 0, dtype family float, shape () — shape () as a later run recorded it
dtype family
int means an integer dtype; float means any other dtype the instrument saw, bool and complex included (fixture_check.py records only these two families)
Environment
image not recorded; re-verify against syntology-harvest-sandbox:v5-deps; not recorded for this sample: the harness installs a cuda-to-cpu shim (cuda_shim.py) before every sample and no run records whether a sample needed it; seed: none by the harness; any seed is in the setup block
tiny_imagenet_c_testloader Ran
ran on a synthesized input
VITA-Group/AugMax/dataloaders/tiny_imagenet.py
code served (permissive licence) · get_code("d1f6b22ba4d6a4c9")
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 DataLoader. 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 tempfile
import os
from PIL import Image
import numpy as np

# Create a temporary directory structure that mimics tiny-imagenet-c
temp_dir = tempfile.mkdtemp()

# Create directory structure: data_dir/corruption/severity/class/image.jpg
corruption = "gaussian_noise"
severity = 1
class_name = "class_0"

corruption_dir = os.path.join(temp_dir, corruption, str(severity), class_name)
os.makedirs(corruption_dir, exist_ok=True)

# Create a few tiny dummy images (4x4 RGB images)
for i in range(2):
    img_array = np.random.randint(0, 256, (4, 3, 3), dtype=np.uint8)
    img = Image.fromarray(img_array, mode='RGB')
    img.save(os.path.join(corruption_dir, f"img_{i}.jpg"))

ARGS = {
    "data_dir": temp_dir,
    "corruption": corruption,
    "severity": severity,
    "test_batch_size": 2,
    "num_workers": 0,
}
Setup block drafted by
a language model, Claude Haiku 4.5, prompt python_fixture_v1, through the batch API
Imports
PIL, numpy, torch, torchvision — import names as written, not package names to install; a name the repository itself provides is not a package
Returned
type DataLoader — a DataLoader output has no array shape of its own; none is stated — the instrument coerces any output to an array; for a DataLoader 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
tiny_imagenet_dataloaders Ran
ran on a synthesized input
VITA-Group/AugMax/dataloaders/tiny_imagenet.py
code served (permissive licence) · get_code("4a9f8ffb92cfb8e7")
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 as np
from torchvision import datasets, transforms
import os
import tempfile
from PIL import Image

torch.manual_seed(0)

# Create a temporary directory structure for tiny imagenet
temp_dir = tempfile.mkdtemp()
data_dir = temp_dir

# Create train directory structure
train_root = os.path.join(data_dir, 'train')
os.makedirs(train_root, exist_ok=True)

# Create a few class directories with dummy images
for class_idx in range(2):
    class_dir = os.path.join(train_root, f'class_{class_idx}')
    os.makedirs(class_dir, exist_ok=True)
    # Create dummy images (64x64 RGB)
    for img_idx in range(2):
        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, f'img_{img_idx}.jpg'))

# Create validation directory structure
val_images_root = os.path.join(data_dir, 'val/images')
os.makedirs(val_images_root, exist_ok=True)

# Create a few class directories with dummy images
for class_idx in range(2):
    class_dir = os.path.join(val_images_root, f'class_{class_idx}')
    os.makedirs(class_dir, exist_ok=True)
    for img_idx in range(2):
        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, f'img_{img_idx}.jpg'))

# Create a minimal AugMax class that implements the expected interface
class MinimalAugMax:
    def __init__(self, dataset, test_transform, mixture_width, mixture_depth, aug_severity):
        self.dataset = dataset
        self.test_transform = test_transform
        self.mixture_width = mixture_width
        self.mixture_depth = mixture_depth
        self.aug_severity = aug_severity
    
    def __len__(self):
        return len(self.dataset)
    
    def __getitem__(self, idx):
        return self.dataset[idx]

ARGS = {
    'data_dir': data_dir,
    'transform_train': True,
    'AugMax': None,
}
Setup block drafted by
a language model, Claude Haiku 4.5, prompt python_fixture_v1, through the batch API
Imports
PIL, numpy, 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
tiny_imagenet_deepaug_dataloaders Ran
ran on a synthesized input
VITA-Group/AugMax/dataloaders/tiny_imagenet.py
code served (permissive licence) · get_code("0678039e3a50ca28")
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 MockAugMax. 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
from torchvision import transforms
from unittest.mock import Mock, MagicMock
import tempfile
import os
from PIL import Image

torch.manual_seed(0)

# Create a temporary directory structure for tiny imagenet
temp_dir = tempfile.mkdtemp()
data_dir = temp_dir
train_dir = os.path.join(data_dir, 'train')
os.makedirs(train_dir, exist_ok=True)

# Create a few dummy class directories with dummy images
for class_idx in range(2):
    class_dir = os.path.join(train_dir, f'class_{class_idx}')
    os.makedirs(class_dir, exist_ok=True)
    for img_idx in range(2):
        img_path = os.path.join(class_dir, f'image_{img_idx}.jpg')
        img = Image.new('RGB', (64, 64), color=(73, 109, 137))
        img.save(img_path)

# Create a mock AugMax callable that takes the dataset and returns an augmented version
class MockAugMax:
    def __init__(self, train_data, test_transform, mixture_width, mixture_depth, aug_severity):
        self.train_data = train_data
        self.test_transform = test_transform
        self.mixture_width = mixture_width
        self.mixture_depth = mixture_depth
        self.aug_severity = aug_severity
    
    def __getitem__(self, idx):
        return self.train_data[idx]
    
    def __len__(self):
        return len(self.train_data)

def mock_augmax_fn(train_data, test_transform, mixture_width, mixture_depth, aug_severity):
    return MockAugMax(train_data, test_transform, mixture_width, mixture_depth, aug_severity)

ARGS = {
    'data_dir': data_dir,
    'transform_train': True,
    'AugMax': mock_augmax_fn,
    'mixture_width': 3,
    'mixture_depth': 2,
    'aug_severity': 3
}
Setup block drafted by
a language model, Claude Haiku 4.5, prompt python_fixture_v1, through the batch API
Imports
PIL, numpy, torch, torchvision — import names as written, not package names to install; a name the repository itself provides is not a package
Returned
type MockAugMax — a MockAugMax 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
cifar_dataloaders Not yet run
unverified (harvested, no recorded run)
VITA-Group/AugMax/dataloaders/cifar10.py
code served (permissive licence) · get_code("399deecc128b30ff")
How it ran

no invocation recorded.

cifar_random_affine_test_set Not yet run
unverified (harvested, no recorded run)
VITA-Group/AugMax/dataloaders/cifar10.py
code served (permissive licence) · get_code("1ce701e597f22f94")
How it ran

no invocation recorded.

cifar_test_augmax_loader Not yet run
unverified (harvested, no recorded run)
VITA-Group/AugMax/dataloaders/cifar10.py
code served (permissive licence) · get_code("a71db864f98a67d9")
How it ran

no invocation recorded.

plasma_fractal Not yet run
unverified (harvested, no recorded run)
VITA-Group/AugMax/augmax_modules/corruptions_IN.py
code served (permissive licence) · get_code("3fe212e00cbe6fb3")
How it ran

no invocation recorded.

plasma_fractal Not yet run
unverified (harvested, no recorded run)
VITA-Group/AugMax/augmax_modules/corruptions_cifar.py
code served (permissive licence) · get_code("cb4092b5e3cb3af3")
How it ran

no invocation recorded.

Also present in other papers' code

Of 19 samples lifted from this paper's linked repositories, 19 carry a function identity and 0 do not. Of the 19 distinct functions with an identity, 8 are also present in other papers whose code we hold (7 with at least one paper dated earlier, 2 the same month, 8 later) and 11 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
float_parameter 19 other papers
5 dated earlier, 2 the same month, 11 later, 1 same year, order not determinable · 2 only as an assembly brick
1912.02781 (2019-12)
AugMix: A Simple Data Processing Method to Improve Robustness and Uncertainty
2006.16241 (2020-06)
The Many Faces of Robustness: A Critical Analysis of Out-of-Distribution Generalization
2009.09238 (2020-09)
EfficientDeRain: Learning Pixel-wise Dilation Filtering for High-Efficiency Single-Image Deraining
and 16 more not named here
int_parameter 19 other papers
5 dated earlier, 2 the same month, 11 later, 1 same year, order not determinable · 2 only as an assembly brick
1912.02781 (2019-12)
AugMix: A Simple Data Processing Method to Improve Robustness and Uncertainty
2006.16241 (2020-06)
The Many Faces of Robustness: A Critical Analysis of Out-of-Distribution Generalization
2009.09238 (2020-09)
EfficientDeRain: Learning Pixel-wise Dilation Filtering for High-Efficiency Single-Image Deraining
and 16 more not named here
sample_level 17 other papers
5 dated earlier, 11 later, 1 same year, order not determinable · 3 only as an assembly brick
1912.02781 (2019-12)
AugMix: A Simple Data Processing Method to Improve Robustness and Uncertainty
2006.16241 (2020-06)
The Many Faces of Robustness: A Critical Analysis of Out-of-Distribution Generalization
2009.09238 (2020-09)
EfficientDeRain: Learning Pixel-wise Dilation Filtering for High-Efficiency Single-Image Deraining
and 14 more not named here
disk 7 other papers
1 dated earlier, 6 later
1906.02337 (2019-06)
MNIST-C: A Robustness Benchmark for Computer Vision
2207.13916 (2022-07)
A Novel Data Augmentation Technique for Out-of-Distribution Sample Detection using Compounded Corruptions
2211.02578 (2022-11)
Data Models for Dataset Drift Controls in Machine Learning With Optical Images
and 4 more not named here
clipped_zoom 5 other papers
2 dated earlier, 3 later
1903.12261 (2019-03)
Benchmarking Neural Network Robustness to Common Corruptions and Perturbations
2001.06057 (2020-01)
A simple way to make neural networks robust against diverse image corruptions
2207.13916 (2022-07)
A Novel Data Augmentation Technique for Out-of-Distribution Sample Detection using Compounded Corruptions
and 2 more not named here
plasma_fractal 5 other papers
3 dated earlier, 2 later
1903.12261 (2019-03)
Benchmarking Neural Network Robustness to Common Corruptions and Perturbations
1906.02337 (2019-06)
MNIST-C: A Robustness Benchmark for Computer Vision
2001.06057 (2020-01)
A simple way to make neural networks robust against diverse image corruptions
and 2 more not named here
auc 3 other papers
1 dated earlier, 2 later
2001.03994 (2020-01)
Fast is better than free: Revisiting adversarial training
Ren_Masked_Jigsaw_Puzzle_A_Versatile_Position_Embedding_for_Vision_Transformers_CVPR_2023_paper (2023 (year only))
Masked Jigsaw Puzzle: A Versatile Position Embedding for Vision Transformers
2506.13277 (2025-06)
SeqPE: Transformer with Sequential Position Encoding
plasma_fractal 1 other paper
1 later
2211.02578 (2022-11)
Data Models for Dataset Drift Controls in Machine Learning With Optical Images

Presence, not direction: an identical function body in two papers' repositories does not say who wrote it, which came from which, or that either paper's method rests on it. Matching is exact after normalisation, so a renamed or edited function is not matched. Dates are when papers appeared, not when code was written. Only .py files the harvester lifted are covered; notebooks are not read. A new-style arXiv id YYMM.NNNN dates a paper to the month 20YY-MM; otherwise Paper.year dates it to the year; otherwise it is undated. Dates are when the paper appeared, not when the code was written. Read 2026-11-23.

Repositories linked to this paper

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

Abstract

Data augmentation is a simple yet effective way to improve the robustness of deep neural networks (DNNs). Diversity and hardness are two complementary dimensions of data augmentation to achieve robustness. For example, AugMix explores random compositions of a diverse set of augmentations to enhance broader coverage, while adversarial training generates adversarially hard samples to spot the weakness. Motivated by this, we propose a data augmentation framework, termed AugMax, to unify the two aspects of diversity and hardness. AugMax first randomly samples multiple augmentation operators and then learns an adversarial mixture of the selected operators. Being a stronger form of data augmentation, AugMax leads to a significantly augmented input distribution which makes model training more challenging. To solve this problem, we further design a disentangled normalization module, termed DuBIN (Dual-Batch-and-Instance Normalization), that disentangles the instance-wise feature heterogeneity arising from AugMax. Experiments show that AugMax-DuBIN leads to significantly improved out-of-distribution robustness, outperforming prior arts by 3.03%, 3.49%, 1.82% and 0.71% on CIFAR10-C, CIFAR100-C, Tiny ImageNet-C and ImageNet-C. Codes and pretrained models are available: https://github.com/VITA-Group/AugMax. * Work partially done during an internship at NVIDIA. 35th Conference on Neural Information Processing Systems (NeurIPS 2021).

For agents

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

get_harvested_code_for_paper("2110.13771")
get_code_for_paper("2110.13771")
have("2110.13771")

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

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

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

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

Connect an agent — have() is free.