SYNTOLOGY HomeExplorerAtlasCodeMethodologyAboutDevelopersFeedPricing
Paper · 2010.08001 · NeurIPS · 2020

Maximum-Entropy Adversarial Data Augmentation for Improved Generalization and Robustness

Long Zhao, Ting Liu, Xi Peng, Dimitris Metaxas

arXiv · PDF · Open in the Atlas

Code that ran

17 of 22 samples (functions and classes) lifted from this paper's linked repositories executed on a synthesized input in Syntology's jail (11 of them constructed an object rather than computing a result; 0 honoured the contract we drafted, 0 violated it and 12 have no contract verdict; 5 failures of our instrument; 5 no recorded run), measured 2026-11-23; 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/2010.08001.json · badge: /api/ran/2010.08001.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
garyzhao/ME-ADA marked official in Papers with Code
Papers with Code archive
17 ran · 5 no recorded run
FunctionStatusWhere it lives
AllConvNet Ran
ran on a synthesized input · constructed an object; no result was computed
garyzhao/ME-ADA/model_cifar.py
code served (permissive licence) · get_code("2190125be2989110")
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, AllConvNet: 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 math
import torch.nn as nn

torch.manual_seed(0)

# Define ARGS mapping the parameter(s) of AllConvNet.__init__ to values
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 AllConvNet — 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 AllConvNet 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
BasicBlock Ran
ran on a synthesized input · constructed an object; no result was computed
garyzhao/ME-ADA/model_cifar.py
code served (permissive licence) · get_code("e28e6b33589030ee")
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, BasicBlock: 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)

ARGS = {
    'in_planes': 16,
    'out_planes': 32,
    'stride': 1,
    'drop_rate': 0.0,
}
Setup block drafted by
a language model, Claude Haiku 4.5, prompt python_fixture_v1, through the batch API
Imports
torch — import names as written, not package names to install; a name the repository itself provides is not a package
Returned
type BasicBlock — 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 BasicBlock 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
Bottleneck Ran
ran on a synthesized input · constructed an object; no result was computed
garyzhao/ME-ADA/model_cifar.py
code served (permissive licence) · get_code("b7b0351f60ac3a4a")
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, Bottleneck: 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)

# The Bottleneck class expects:
# - n_channels: number of input channels
# - growth_rate: growth rate for the bottleneck block

# Looking at the forward method:
# - Input x has shape (batch, n_channels, height, width)
# - It applies bn1, conv1, bn2, conv2
# - It concatenates x with the output along dimension 1 (channels)
# - So we need a valid tensor input to test with

# Set up small but distinct dimensions
n_channels = 4
growth_rate = 3
batch_size = 2
height = 5
width = 5

ARGS = {
    "n_channels": n_channels,
    "growth_rate": growth_rate,
}
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 Bottleneck — 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 Bottleneck 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
CifarResNeXt Ran
ran on a synthesized input · constructed an object; no result was computed
garyzhao/ME-ADA/model_cifar.py
code served (permissive licence) · get_code("9a69a7117b29ff25")
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, CifarResNeXt: 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
import math

torch.manual_seed(0)

class ResNeXtBlock(nn.Module):
    """Minimal ResNeXt block implementation for testing."""
    expansion = 2
    
    def __init__(self, inplanes, planes, cardinality, base_width, stride=1, downsample=None):
        super(ResNeXtBlock, self).__init__()
        self.stride = stride
        self.downsample = downsample
        self.inplanes = inplanes
        self.planes = planes
        self.cardinality = cardinality
        self.base_width = base_width
        
        # Minimal conv layers for the block
        self.conv1 = nn.Conv2d(inplanes, planes, kernel_size=1, bias=False)
        self.bn1 = nn.BatchNorm2d(planes)
        self.conv2 = nn.Conv2d(planes, planes, kernel_size=3, stride=stride, padding=1, bias=False)
        self.bn2 = nn.BatchNorm2d(planes)
        self.conv3 = nn.Conv2d(planes, planes * self.expansion, kernel_size=1, bias=False)
        self.bn3 = nn.BatchNorm2d(planes * self.expansion)
    
    def forward(self, x):
        identity = x
        
        out = self.conv1(x)
        out = self.bn1(out)
        out = nn.functional.relu(out, inplace=True)
        
        out = self.conv2(out)
        out = self.bn2(out)
        out = nn.functional.relu(out, inplace=True)
        
        out = self.conv3(out)
        out = self.bn3(out)
        
        if self.downsample is not None:
            identity = self.downsample(x)
        
        out += identity
        out = nn.functional.relu(out, inplace=True)
        
        return out

ARGS = {
    'block': ResNeXtBlock,
    'depth': 29,
    'cardinality': 8,
    'base_width': 64,
    '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 CifarResNeXt — 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 CifarResNeXt 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
Denormalise Ran
ran on a synthesized input · constructed an object; no result was computed
garyzhao/ME-ADA/model_cifar.py
code served (permissive licence) · get_code("4a47aedd3d544b45")
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, Denormalise: 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
from torchvision import transforms

torch.manual_seed(0)

# The Denormalise class inherits from transforms.Normalize
# It takes mean and std as parameters in __init__
# These can be lists, tuples, or tensors that will be converted to tensors
# They should represent normalization parameters for image channels

mean = [0.485, 0.456, 0.406]  # typical ImageNet mean for RGB
std = [0.229, 0.224, 0.225]   # typical ImageNet std for RGB

ARGS = {
    'mean': mean,
    'std': std
}
Setup block drafted by
a language model, Claude Haiku 4.5, prompt python_fixture_v1, through the batch API
Imports
torch, torchvision — import names as written, not package names to install; a name the repository itself provides is not a package
Returned
type Denormalise — 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 Denormalise 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
DenseNet Ran
ran on a synthesized input · constructed an object; no result was computed
garyzhao/ME-ADA/model_cifar.py
code served (permissive licence) · get_code("1e6effa8af67f1f1")
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, DenseNet: 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 math
import torch.nn as nn

torch.manual_seed(0)

ARGS = {
    'growth_rate': 12,
    'depth': 40,
    'reduction': 0.5,
    'n_classes': 10,
    'bottleneck': True,
}
Setup block drafted by
a language model, Claude Haiku 4.5, prompt python_fixture_v1, through the batch API
Imports
torch — import names as written, not package names to install; a name the repository itself provides is not a package
Returned
type DenseNet — 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 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
GELU Ran
ran on a synthesized input
garyzhao/ME-ADA/model_cifar.py
code served (permissive licence) · get_code("a3653639a4779e6c")
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 Tensor, ndim 2, dtype family float; no output shape is stated. The image it ran in was not recorded. If your copy returns the same type and ndim on these inputs, it matched what we observed; nothing here checks that. It does NOT mean the output is correct: nothing has compared it to the paper.

import torch
import torch.nn as nn

class GELU(nn.Module):

    def forward(self, x):
        return torch.sigmoid(1.702 * x) * x

INIT_ARGS = {}

ARGS = {
    'x': torch.randn(2, 4)
}

if __name__ == '__main__':
    model = GELU(**INIT_ARGS)
    output = model(**ARGS)
    print(output)
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 Tensor, ndim 2, dtype family float — no output shape is stated: observe_signature.py observed this class with its constructor sizes canonicalised where it could, which the node does not record, so its shape is not stated as this setup block's
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: torch and numpy seeded to 0 by the harness immediately before the class was constructed from INIT_ARGS (fixture_check.py)
NetworkBlock Ran
ran on a synthesized input · constructed an object; no result was computed
garyzhao/ME-ADA/model_cifar.py
code served (permissive licence) · get_code("6aa4a39a16fbc4fc")
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, NetworkBlock: 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 a simple block module that takes (in_planes, out_planes, stride, drop_rate)
class SimpleBlock(nn.Module):
    def __init__(self, in_planes, out_planes, stride, drop_rate=0.0):
        super(SimpleBlock, self).__init__()
        self.conv = nn.Conv2d(in_planes, out_planes, kernel_size=3, stride=stride, padding=1)
        self.bn = nn.BatchNorm2d(out_planes)
        self.drop_rate = drop_rate
    
    def forward(self, x):
        return self.bn(self.conv(x))

ARGS = {
    "nb_layers": 2,
    "in_planes": 4,
    "out_planes": 3,
    "block": SimpleBlock,
    "stride": 1,
    "drop_rate": 0.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 NetworkBlock — 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 NetworkBlock 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
ResNeXtBottleneck Ran
ran on a synthesized input · constructed an object; no result was computed
garyzhao/ME-ADA/model_cifar.py
code served (permissive licence) · get_code("d1f712f2674c7e26")
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, ResNeXtBottleneck: 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
import math

torch.manual_seed(0)

# Create a minimal downsample module that matches the expected input/output transformation
class MinimalDownsample(nn.Module):
    def __init__(self, in_channels, out_channels):
        super(MinimalDownsample, self).__init__()
        self.conv = nn.Conv2d(in_channels, out_channels, kernel_size=1, stride=2, bias=False)
        self.bn = nn.BatchNorm2d(out_channels)
    
    def forward(self, x):
        return self.bn(self.conv(x))

# Parameters for ResNeXtBottleneck
inplanes = 64
planes = 128
cardinality = 32
base_width = 4
stride = 2

# Create downsample module
# After expansion, output channels will be planes * 4 = 128 * 4 = 512
downsample = MinimalDownsample(inplanes, planes * 4)

# Create input tensor: (batch, inplanes, height, width)
x = torch.randn(2, inplanes, 8, 8)

ARGS = {
    'inplanes': inplanes,
    'planes': planes,
    'cardinality': cardinality,
    'base_width': base_width,
    'stride': stride,
    'downsample': downsample
}
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 ResNeXtBottleneck — 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 ResNeXtBottleneck 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
SingleLayer Ran
ran on a synthesized input · constructed an object; no result was computed
garyzhao/ME-ADA/model_cifar.py
code served (permissive licence) · get_code("24cce59d906bf43b")
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, SingleLayer: 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)

ARGS = {
    'n_channels': 3,
    'growth_rate': 4,
}
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 SingleLayer — 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 SingleLayer 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
Transition Ran
ran on a synthesized input · constructed an object; no result was computed
garyzhao/ME-ADA/model_cifar.py
code served (permissive licence) · get_code("8710e0de3e2bf007")
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, Transition: 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)

# The Transition module takes n_channels and n_out_channels as parameters
# n_channels: number of input channels (used in BatchNorm2d and Conv2d input)
# n_out_channels: number of output channels (used in Conv2d output)

ARGS = {
    "n_channels": 4,
    "n_out_channels": 3,
}
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 Transition — 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 Transition 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
WideResNet Ran
ran on a synthesized input · constructed an object; no result was computed
garyzhao/ME-ADA/model_cifar.py
code served (permissive licence) · get_code("64abc4d84960db53")
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, WideResNet: 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
import math

torch.manual_seed(0)

ARGS = {
    "depth": 16,
    "num_classes": 10,
    "widen_factor": 1,
    "drop_rate": 0.0,
}
Setup block drafted by
a language model, Claude Haiku 4.5, prompt python_fixture_v1, through the batch API
Imports
torch — import names as written, not package names to install; a name the repository itself provides is not a package
Returned
type WideResNet — 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 WideResNet 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
densenet Ran
ran; our contract draft was wrong, not the code
garyzhao/ME-ADA/model_cifar.py
code served (permissive licence) · get_code("9e21fa66980b9f96")
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 math
import torch.nn as nn
import torch.nn.functional as F

torch.manual_seed(0)

# Define ARGS dict with all parameters for densenet function
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
entropy_loss Ran
ran; our contract draft was wrong, not the code
garyzhao/ME-ADA/model_cifar.py
code served (permissive licence) · get_code("10487302bd997fba")
How it ran

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

import torch
import torch.nn.functional as F

torch.manual_seed(0)

# The function takes a single parameter 'x' which is used with:
# - F.softmax(x, dim=1): expects a 2D tensor (batch_size, num_classes)
# - F.log_softmax(x, dim=1): expects a 2D tensor
# - .sum(dim=1) and .mean(): standard tensor operations
# So x should be a 2D tensor with batch dimension 0 and class dimension 1

x = torch.randn(2, 4)  # batch_size=2, num_classes=4

ARGS = {
    "x": x
}
Setup block drafted by
a language model, Claude Haiku 4.5, prompt python_fixture_v1, through the batch API
Imports
torch — import names as written, not package names to install; a name the repository itself provides is not a package
Returned
type Tensor, ndim 0, dtype family float, shape () — shape () as a later run recorded it
dtype family
int means an integer dtype; float means any other dtype the instrument saw, bool and complex included (fixture_check.py records only these two families)
Environment
image not recorded; re-verify against syntology-harvest-sandbox:v5-deps; not recorded for this sample: the harness installs a cuda-to-cpu shim (cuda_shim.py) before every sample and no run records whether a sample needed it; seed: none by the harness; any seed is in the setup block
make_layers Ran
ran; our contract draft was wrong, not the code
garyzhao/ME-ADA/model_cifar.py
code served (permissive licence) · get_code("fc16595d232916da")
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 Sequential. 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)

# The make_layers function takes a cfg parameter which is a list/sequence
# containing strings that specify layer configurations.
# Valid values are: 'Md' (MaxPool + Dropout), 'A' (AvgPool), 'NIN' (1x1 conv),
# 'nopad' (3x3 conv no padding), or integers (3x3 conv with padding)

cfg = [
    64,           # Conv2d(3, 64, kernel_size=3, padding=1) + BatchNorm + GELU
    'NIN',        # Conv2d(64, 64, kernel_size=1, padding=1) + BatchNorm + GELU
    128,          # Conv2d(64, 128, kernel_size=3, padding=1) + BatchNorm + GELU
    'nopad',      # Conv2d(128, 128, kernel_size=3, padding=0) + BatchNorm + GELU
    'Md',         # MaxPool2d + Dropout
    256,          # Conv2d(128, 256, kernel_size=3, padding=1) + BatchNorm + GELU
    'A',          # AvgPool2d
]

ARGS = {
    'cfg': cfg,
}
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 Sequential — a Sequential output has no array shape of its own; none is stated — the instrument coerces any output to an array; for a Sequential output the recorded ndim 1 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
resnext29 Ran
ran; our contract draft was wrong, not the code
garyzhao/ME-ADA/model_cifar.py
code served (permissive licence) · get_code("9fbec066275ba93d")
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 CifarResNeXt. 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)

ARGS = {
    "num_classes": 10,
    "cardinality": 4,
    "base_width": 32,
}
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 CifarResNeXt — a CifarResNeXt output has no array shape of its own; none is stated — the instrument coerces any output to an array; for a CifarResNeXt 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
sgd Ran
ran; our contract draft was wrong, not the code
garyzhao/ME-ADA/model_cifar.py
code served (permissive licence) · get_code("e54d44b5a4d7e951")
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 SGD. 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 torch.optim as optim

torch.manual_seed(0)

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

model = SimpleModel()
parameters = model.parameters()

ARGS = {
    "parameters": parameters,
    "lr": 0.01,
    "weight_decay": 0.0001,
    "momentum": 0.9
}
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 SGD — a SGD output has no array shape of its own; none is stated — the instrument coerces any output to an array; for a SGD 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
ModelADA Not yet run
unverified (harvested, no recorded run)
garyzhao/ME-ADA/model_cifar.py
code served (permissive licence) · get_code("bdde82053558f603")
How it ran

no invocation recorded.

ModelBaseline Not yet run
unverified (harvested, no recorded run)
garyzhao/ME-ADA/model_cifar.py
code served (permissive licence) · get_code("b91d260808e5ccec")
How it ran

no invocation recorded.

ModelMEADA Not yet run
unverified (harvested, no recorded run)
garyzhao/ME-ADA/model_cifar.py
code served (permissive licence) · get_code("c29a896aa9b7f6c6")
How it ran

no invocation recorded.

fix_all_seed Not yet run
unverified (harvested, no recorded run)
garyzhao/ME-ADA/model_cifar.py
code served (permissive licence) · get_code("43b4e7134e89de82")
How it ran

no invocation recorded.

write_log Not yet run
unverified (harvested, no recorded run)
garyzhao/ME-ADA/model_cifar.py
code served (permissive licence) · get_code("f71d878c2fdfce45")
How it ran

no invocation recorded.

Also present in other papers' code

Of 22 samples lifted from this paper's linked repositories, 22 carry a function identity and 0 do not. Of the 22 distinct functions with an identity, 1 are also present in other papers whose code we hold (1 with at least one paper dated earlier, 0 the same month, 1 later) and 21 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
make_layers
brick of this paper's assembly: helper
3 other papers
2 dated earlier, 1 later
1901.09960 (2019-01)
Using Pre-Training Can Improve Model Robustness and Uncertainty
1906.12340 (2019-06)
Using Self-Supervised Learning Can Improve Model Robustness and Uncertainty
2406.01494 (2024-06)
Robust Classification by Coupling Data Mollification with Label Smoothing

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

Adversarial data augmentation has shown promise for training robust deep neural networks against unforeseen data shifts or corruptions. However, it is difficult to define heuristics to generate effective fictitious target distributions containing "hard" adversarial perturbations that are largely different from the source distribution. In this paper, we propose a novel and effective regularization term for adversarial data augmentation. We theoretically derive it from the information bottleneck principle, which results in a maximum-entropy formulation. Intuitively, this regularization term encourages perturbing the underlying source distribution to enlarge predictive uncertainty of the current model, so that the generated "hard" adversarial perturbations can improve the model robustness during training. Experimental results on three standard benchmarks demonstrate that our method consistently outperforms the existing state of the art by a statistically significant margin. Our code is available at https://github.com/garyzhao/ME-ADA.

For agents

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

get_harvested_code_for_paper("2010.08001")
get_code_for_paper("2010.08001")
have("2010.08001")

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

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

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

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

Connect an agent — have() is free.