SYNTOLOGY HomeExplorerAtlasCodeMethodologyAboutDevelopersFeedPricing
Paper · 2002.12047 · 2020

FMix: Enhancing Mixed Sample Data Augmentation

arXiv · PDF · Open in the Atlas

Code that ran

8 of 8 samples (functions and classes) lifted from this paper's linked repositories executed on a synthesized input in Syntology's jail (0 of them constructed an object rather than computing a result; 1 honoured the contract we drafted, 0 violated it and 0 have no contract verdict; 7 failures of our instrument; 0 no recorded run), measured 2026-11-21; 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/2002.12047.json · badge: /api/ran/2002.12047.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
ecs-vlc/FMix canonical (classifier label)
classifier basis: classifier_2025
5 ran · 0 no recorded run
VirajBagal/FMix-Paper-Implementation reimplementation (classifier label)
classifier basis: classifier_2025
2 ran · 0 no recorded run
copy not recorded community
not in the paper's declared repositories
1 ran · 0 no recorded run
FunctionStatusWhere it lives
ResNet18 Ran
ran; our contract draft was wrong, not the code
VirajBagal/FMix-Paper-Implementation/model.py
pointer only (licence: NONE) · get_code("fb899630e37d8971")
How it ran

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

ResNet34 Ran
ran; our contract draft was wrong, not the code
VirajBagal/FMix-Paper-Implementation/model.py
pointer only (licence: NONE) · get_code("85d8c791298ea1f7")
How it ran

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

conv3x3 Ran
ran; our contract draft was wrong, not the code
this paper's copy was not recorded; identical code first harvested from amerch/CIFAR100-Training
pointer only; the stored copy get_code serves, from amerch/CIFAR100-Training, is pointer only (licence: NONE) · get_code("583f9780bdd00a45")
How it ran

The body of this sample is withheld: this paper's copy of the code was not recorded (its link names no repository or source path), so no licence was read for it. 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.

fftfreqnd Ran
ran, honoured the contract we drafted
ecs-vlc/FMix/fmix.py
code served (permissive licence) · get_code("72c0585c19972d68")
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 ndarray, ndim 3, dtype family float, shape (5, 3, 5) 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

# Test case 1: Only h provided (1D case)
ARGS_1D = {
    'h': 8,
    'w': None,
    'z': None
}

# Test case 2: h and w provided (2D case)
ARGS_2D = {
    'h': 6,
    'w': 4,
    'z': None
}

# Test case 3: h, w, and z provided (3D case)
ARGS_3D = {
    'h': 5,
    'w': 7,
    'z': 3
}

# Use the 3D case as the default ARGS
ARGS = ARGS_3D
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 ndarray, ndim 3, dtype family float, shape (5, 3, 5) — shape (5, 3, 5) 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
fmix_loss Ran
ran; the contract check could not run (RAISES, DEP_MISSING or TIMEOUT)
ecs-vlc/FMix/implementations/torchbearer_implementation.py
code served (permissive licence) · get_code("7c0f83a440cd36f9")
How it ran

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

import torch
import torch.nn.functional as F

torch.manual_seed(0)

# Create a small batch of data
batch_size = 2
num_classes = 5
feature_dim = 4

# input: model output logits (batch_size, num_classes)
input = torch.randn(batch_size, num_classes)

# y: target labels (batch_size,)
y = torch.tensor([0, 3])

# index: permutation indices for mixing
index = torch.tensor([1, 0])

# lam: mixing lambda value
lam = 0.7

# train: whether in training mode
train = True

# reformulate: whether to use reformulated loss
reformulate = False

# bce_loss: whether to use binary cross entropy
bce_loss = False

ARGS = {
    'input': input,
    'y': y,
    'index': index,
    'lam': lam,
    'train': train,
    'reformulate': reformulate,
    'bce_loss': bce_loss
}
Setup block drafted by
a language model, Claude Sonnet 4.5, prompt python_fixture_v1
Imports
torch — import names as written, not package names to install; a name the repository itself provides is not a package
Returned
type Tensor, ndim 0, dtype family float, shape () — shape () as a later run recorded it
dtype family
int means an integer dtype; float means any other dtype the instrument saw, bool and complex included (fixture_check.py records only these two families)
Environment
image not recorded; re-verify against syntology-harvest-sandbox:v5-deps; not recorded for this sample: the harness installs a cuda-to-cpu shim (cuda_shim.py) before every sample and no run records whether a sample needed it; seed: none by the harness; any seed is in the setup block
fmix_loss Ran
ran; the contract check could not run (RAISES, DEP_MISSING or TIMEOUT)
ecs-vlc/FMix/implementations/lightning.py
code served (permissive licence) · get_code("6618eb90e0aed288")
How it ran

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

import torch
import torch.nn.functional as F

torch.manual_seed(0)

# Create a small batch of logits (model output before softmax)
# batch_size=2, num_classes=5
input = torch.randn(2, 5)

# Create target labels
y1 = torch.tensor([1, 3])

# Create permutation index for mixing
index = torch.tensor([1, 0])

# Lambda value for mixing (scalar between 0 and 1)
lam = 0.6

# Training flag
train = True

# Reformulate flag
reformulate = False

ARGS = {
    'input': input,
    'y1': y1,
    'index': index,
    'lam': lam,
    'train': train,
    'reformulate': reformulate
}
Setup block drafted by
a language model, Claude Sonnet 4.5, prompt python_fixture_v1
Imports
torch — import names as written, not package names to install; a name the repository itself provides is not a package
Returned
type Tensor, ndim 0, dtype family float, shape () — shape () as a later run recorded it
dtype family
int means an integer dtype; float means any other dtype the instrument saw, bool and complex included (fixture_check.py records only these two families)
Environment
image not recorded; re-verify against syntology-harvest-sandbox:v5-deps; not recorded for this sample: the harness installs a cuda-to-cpu shim (cuda_shim.py) before every sample and no run records whether a sample needed it; seed: none by the harness; any seed is in the setup block
get_spectrum Ran
ran; the contract check could not run (RAISES, DEP_MISSING or TIMEOUT)
ecs-vlc/FMix/fmix.py
code served (permissive licence) · get_code("bc2dfdb6999b2dee")
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 ndarray, ndim 3, dtype family float, shape (3, 5, 2) 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

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

# Create frequency bins - a 1D array representing discrete fourier transform bins
# Using a small size for testing
freqs = np.array([0.0, 0.5, 1.0, 1.5, 2.0])

# Decay power for frequency decay (1/f**d)
decay_power = 2.0

# Number of channels
ch = 3

# Dimensions
h = 8
w = 6
z = 4

ARGS = {
    'freqs': freqs,
    'decay_power': decay_power,
    'ch': ch,
    'h': h,
    'w': w,
    'z': z
}
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 ndarray, ndim 3, dtype family float, shape (3, 5, 2) — shape (3, 5, 2) 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
make_low_freq_image Ran
ran; our contract draft was wrong, not the code
ecs-vlc/FMix/fmix.py
code served (permissive licence) · get_code("3b4ff6df745c5e85")
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 ndarray, ndim 3, dtype family float, shape (1, 6, 8) 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

# Test case 1: 1D shape
decay_1d = 1.5
shape_1d = [8]
ch_1d = 1

# Test case 2: 2D shape
decay_2d = 2.0
shape_2d = [6, 8]
ch_2d = 3

# Test case 3: 3D shape
decay_3d = 1.0
shape_3d = [4, 6, 8]
ch_3d = 2

# Use the 2D case as the default test
ARGS = {
    'decay': decay_2d,
    'shape': shape_2d,
    'ch': ch_2d
}
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 ndarray, ndim 3, dtype family float, shape (1, 6, 8) — shape (1, 6, 8) 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

Also present in other papers' code

Of 8 samples lifted from this paper's linked repositories, 8 carry a function identity and 0 do not. Of the 8 distinct functions with an identity, 4 are also present in other papers whose code we hold (2 with at least one paper dated earlier, 1 the same month, 4 later) and 4 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
conv3x3 686 other papers
187 dated earlier, 9 the same month, 489 later, 1 same year, order not determinable · 31 only as an assembly brick
1406.2661 (2014-06)
Generative Adversarial Networks
1409.0575 (2014-09)
ImageNet Large Scale Visual Recognition Challenge
1412.6572 (2014-12)
Explaining and Harnessing Adversarial Examples
and 683 more not named here
ResNet34 24 other papers
2 dated earlier, 22 later
1605.07146 (2016-05)
Wide Residual Networks
1811.12814 (2018-11)
Graph-Based Global Reasoning Networks
2006.13554 (2020-06)
Normalized Loss Functions for Deep Learning with Noisy Labels
and 21 more not named here
fftfreqnd 1 other paper
1 later
2407.07003 (2024-07)
Learning to Complement and to Defer to Multiple Users
get_spectrum 1 other paper
1 later
2407.07003 (2024-07)
Learning to Complement and to Defer to Multiple Users

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-21.

Repositories linked to this paper

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

Abstract

Mixed Sample Data Augmentation (MSDA) has received increasing attention in recent years, with many successful variants such as MixUp and CutMix. By studying the mutual information between the function learned by a VAE on the original data and on the augmented data we show that MixUp distorts learned functions in a way that CutMix does not. We further demonstrate this by showing that MixUp acts as a form of adversarial training, increasing robustness to attacks such as Deep Fool and Uniform Noise which produce examples similar to those generated by MixUp. We argue that this distortion prevents models from learning about sample specific features in the data, aiding generalisation performance. In contrast, we suggest that CutMix works more like a traditional augmentation, improving performance by preventing memorisation without distorting the data distribution. However, we argue that an MSDA which builds on CutMix to include masks of arbitrary shape, rather than just square, could further prevent memorisation whilst preserving the data distribution in the same way. To this end, we propose FMix, an MSDA that uses random binary masks obtained by applying a threshold to low frequency images sampled from Fourier space. These random masks can take on a wide range of shapes and can be generated for use with one, two, and three dimensional data. FMix improves performance over MixUp and CutMix, without an increase in training time, for a number of models across a range of data sets and problem settings, obtaining a new single model state-of-the-art result on CIFAR-10 without external data. Finally, we show that a consequence of the difference between interpolating MSDA such as MixUp and masking MSDA such as FMix is that the two can be combined to improve performance even further. Code for all experiments is provided at https://github.com/ecs-vlc/FMix .

For agents

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

get_harvested_code_for_paper("2002.12047")
get_code_for_paper("2002.12047")
have("2002.12047")

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

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

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

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

Connect an agent — have() is free.