SYNTOLOGY HomeExplorerAtlasCodeMethodologyAboutDevelopersFeedPricing
Paper · 2306.07197 · 2023

AROID: Improving Adversarial Robustness Through Online Instance-Wise Data Augmentation

arXiv · PDF · Open in the Atlas

Code that ran

13 of 13 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; 0 honoured the contract we drafted, 0 violated it and 6 have no contract verdict; 7 failures of our instrument; 0 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/2306.07197.json · badge: /api/ran/2306.07197.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
treelli/aroid canonical (classifier label)
classifier basis: census
13 ran · 0 no recorded run
FunctionStatusWhere it lives
checkpoint_filter_fn Ran
ran on a synthesized input
treelli/aroid/src/model/vit.py
code served (permissive licence) · get_code("e8dd07fc6d086c08")
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 dict. 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)

# Build a minimal model that satisfies checkpoint_filter_fn's usage
class MinimalPatchEmbed(nn.Module):
    def __init__(self):
        super().__init__()
        # proj.weight shape: (O, I, H, W) for conv2d
        self.proj = nn.Conv2d(3, 8, kernel_size=16, stride=16)

class MinimalModel(nn.Module):
    def __init__(self):
        super().__init__()
        self.patch_embed = MinimalPatchEmbed()
        # pos_embed: (1, num_tokens, embed_dim)
        # num_tokens = 1 (cls token) + grid_size^2
        # For a 224x224 image with 16x16 patches: 14x14 grid = 196 patches + 1 cls = 197 tokens
        self.pos_embed = nn.Parameter(torch.randn(1, 197, 768))
    
    def state_dict(self):
        return {
            'pos_embed': self.pos_embed,
            'patch_embed.proj.weight': self.patch_embed.proj.weight,
        }

model = MinimalModel()

# Create a state_dict with pos_embed that has different shape to trigger resize
# Original pos_embed with smaller grid (e.g., 8x8 grid + cls = 65 tokens)
state_dict = {
    'pos_embed': torch.randn(1, 65, 768),  # 1 cls + 8*8 grid
    'patch_embed.proj.weight': torch.randn(8, 3, 16, 16),
}

patch = 16

ARGS = {
    'state_dict': state_dict,
    'model': model,
    'patch': patch,
}
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 dict — a dict output has no array shape of its own; none is stated — the instrument coerces any output to an array; for a dict 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
diff_in_weights Ran
ran; our contract draft was wrong, not the code
treelli/aroid/src/utils/awp.py
pointer only (licence: MIT); the stored copy get_code serves, from Alexkael/S2O, is pointer only (licence: NONE) · get_code("4170809219439d13")
How it ran

The body of this sample is withheld: this paper's link allows the body inline (MIT), but get_code serves the stored copy, first harvested from Alexkael/S2O, and GitHub detected no licence in that repository when it was checked. The setup block that called it is withheld with it, because it is written against that body. source_path and origin say where the code lives, to read under the repository's own terms. A run is recorded.

input_grad Ran
ran; our contract draft was wrong, not the code
treelli/aroid/src/utils/adversary.py
code served (permissive licence) · get_code("b2c121009a4b58c4")
How it ran

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

import torch
import torch.nn as nn
from torch.autograd import grad, Variable

torch.manual_seed(0)

# Create a minimal model that takes imgs and returns output
class SimpleModel(nn.Module):
    def __init__(self):
        super().__init__()
        self.linear = nn.Linear(4, 3)
    
    def forward(self, x):
        return self.linear(x)

# Create a minimal criterion (loss function)
criterion = nn.CrossEntropyLoss()

# Create input tensors
# imgs: batch_size=2, feature_dim=4, requires_grad=True for gradient computation
imgs = torch.randn(2, 4, requires_grad=True)

# targets: batch_size=2, class indices for CrossEntropyLoss
targets = torch.tensor([0, 2], dtype=torch.long)

# Create model instance
model = SimpleModel()

ARGS = {
    "imgs": imgs,
    "targets": targets,
    "model": model,
    "criterion": criterion
}
Setup block drafted by
a language model, Claude Haiku 4.5, prompt python_fixture_v1, through the batch API
Imports
torch — import names as written, not package names to install; a name the repository itself provides is not a package
Returned
type Tensor, ndim 2, dtype family float, shape (2, 4) — shape (2, 4) as a later run recorded it
dtype family
int means an integer dtype; float means any other dtype the instrument saw, bool and complex included (fixture_check.py records only these two families)
Environment
image not recorded; re-verify against syntology-harvest-sandbox:v5-deps; not recorded for this sample: the harness installs a cuda-to-cpu shim (cuda_shim.py) before every sample and no run records whether a sample needed it; seed: none by the harness; any seed is in the setup block
parse_log_id_from_ck_url Ran
ran on a synthesized input
treelli/aroid/src/model/factory.py
code served (permissive licence) · get_code("200044920f544f26")
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 str. 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

ARGS = {
    'ck_url': 'model/checkpoint/abcd1234.pt'
}
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 str — a str output has no array shape of its own; none is stated — the instrument coerces any output to an array; for a str 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
perturb Ran
ran; our contract draft was wrong, not the code
treelli/aroid/src/utils/adversary.py
code served (permissive licence) · get_code("2ed1c4f9595c38a6")
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, ndim 3, dtype family float; no output shape is stated. The image it ran in was not recorded. If your copy returns the same type and ndim on these inputs, it matched what we observed; nothing here checks that. It does NOT mean the output is correct: nothing has compared it to the paper.

import torch
import torch.nn as nn

torch.manual_seed(0)

# Smallest model that satisfies the function's usage
class SimpleModel(nn.Module):
    def __init__(self):
        super().__init__()
        self.linear = nn.Linear(4, 3)
    
    def forward(self, x):
        return self.linear(x)

# Smallest criterion that works with the function
criterion = nn.CrossEntropyLoss()

# Create model instance
model = SimpleModel()

# Create tiny tensors (batch=2, feature_dim=4)
imgs = torch.randn(2, 4, requires_grad=True)
targets = torch.tensor([0, 1])

# Hyperparameters for perturbation
eps = 0.3
eps_step = 0.1

# Optional parameters
pert = None
ig = None

ARGS = {
    'imgs': imgs,
    'targets': targets,
    'model': model,
    'criterion': criterion,
    'eps': eps,
    'eps_step': eps_step,
    'pert': pert,
    'ig': ig
}
Setup block drafted by
a language model, Claude Haiku 4.5, prompt python_fixture_v1, through the batch API
Imports
torch — import names as written, not package names to install; a name the repository itself provides is not a package
Returned
type tuple, ndim 3, dtype family float — a tuple output has no array shape of its own; none is stated
dtype family
int means an integer dtype; float means any other dtype the instrument saw, bool and complex included (fixture_check.py records only these two families)
Environment
image not recorded; re-verify against syntology-harvest-sandbox:v5-deps; not recorded for this sample: the harness installs a cuda-to-cpu shim (cuda_shim.py) before every sample and no run records whether a sample needed it; seed: none by the harness; any seed is in the setup block
pgd Ran
ran; our contract draft was wrong, not the code
treelli/aroid/src/utils/adversary.py
code served (permissive licence) · get_code("2fc76dc36847c6db")
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, ndim 3, 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 as tc
import torch.nn as nn

tc.manual_seed(0)

# Create a simple model
class SimpleModel(nn.Module):
    def __init__(self):
        super().__init__()
        self.linear = nn.Linear(4, 3)
    
    def forward(self, x):
        return self.linear(x)

model = SimpleModel()

# Create a criterion
criterion = nn.CrossEntropyLoss()

# Create sample tensors
# imgs: batch_size=2, feature_dim=4, requires grad for computing input gradients
imgs = tc.randn(2, 4, requires_grad=True)

# targets: batch_size=2, with class indices for 3 classes
targets = tc.tensor([0, 1], dtype=tc.long)

# Hyperparameters for PGD
eps = 0.3
eps_step = 0.1
max_iter = 2

# Optional parameters (can be None for first iteration)
pert = None
ig = None

ARGS = {
    'imgs': imgs,
    'targets': targets,
    'model': model,
    'criterion': criterion,
    'eps': eps,
    'eps_step': eps_step,
    'max_iter': max_iter,
    'pert': pert,
    'ig': ig
}
Setup block drafted by
a language model, Claude Haiku 4.5, prompt python_fixture_v1, through the batch API
Imports
torch — import names as written, not package names to install; a name the repository itself provides is not a package
Returned
type tuple, ndim 3, dtype family float — a tuple output has no array shape of its own; none is stated
dtype family
int means an integer dtype; float means any other dtype the instrument saw, bool and complex included (fixture_check.py records only these two families)
Environment
image not recorded; re-verify against syntology-harvest-sandbox:v5-deps; not recorded for this sample: the harness installs a cuda-to-cpu shim (cuda_shim.py) before every sample and no run records whether a sample needed it; seed: none by the harness; any seed is in the setup block
pixel_2_real Ran
ran on a synthesized input
treelli/aroid/src/config/config.py
code served (permissive licence) · get_code("5d1ae0c45e71f173")
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 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

torch.manual_seed(0)

ARGS = {
    "pixel": 128
}
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 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
real_2_pixel Ran
ran on a synthesized input
treelli/aroid/src/config/config.py
code served (permissive licence) · get_code("f33bd487ae731b24")
How it ran

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

import torch
import numpy as np

torch.manual_seed(0)

# real_2_pixel takes a single parameter 'real' and converts it to a pixel value
# by multiplying by 255 and converting to int
# The parameter should be a float or numeric value between 0 and 1

ARGS = {
    "real": 0.5
}
Setup block drafted by
a language model, Claude Haiku 4.5, prompt python_fixture_v1, through the batch API
Imports
numpy, torch — import names as written, not package names to install; a name the repository itself provides is not a package
Returned
type 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
resize_pos_embed Ran
ran; our contract draft was wrong, not the code
treelli/aroid/src/model/vit.py
code served (permissive licence) · get_code("109c74bc1997c975")
How it ran

Ran in Syntology's sandbox on this synthesized input (drafted by a language model, Claude Haiku 4.5, prompt python_fixture_v1, through the batch API) and returned Tensor, ndim 3, dtype family float, shape (1, 10, 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 math
import logging
import torch
import torch.nn.functional as F

torch.manual_seed(0)

# Setup logging
logging.basicConfig(level=logging.INFO)

# Create position embeddings
# posemb: [batch, num_tokens, embed_dim]
# The function expects:
# - posemb[:, :1] to be the token embedding (CLS token)
# - posemb[0, 1:] to be the grid embeddings
# For a 4x4 grid, we need 1 + 16 = 17 tokens
# Let's use a smaller grid: 2x2 = 4 grid tokens + 1 cls token = 5 total tokens

embed_dim = 8
old_grid_size = 2  # 2x2 grid
num_old_tokens = 1 + old_grid_size * old_grid_size  # 1 cls + 4 grid = 5
posemb = torch.randn(1, num_old_tokens, embed_dim)

# Create new position embedding with different grid size
# Let's resize to a 3x3 grid: 1 + 9 = 10 tokens
new_grid_size = 3  # 3x3 grid
num_new_tokens = 1 + new_grid_size * new_grid_size  # 1 cls + 9 grid = 10
posemb_new = torch.randn(1, num_new_tokens, embed_dim)

ARGS = {
    'posemb': posemb,
    'posemb_new': posemb_new,
}
Setup block drafted by
a language model, Claude Haiku 4.5, prompt python_fixture_v1, through the batch API
Imports
torch — import names as written, not package names to install; a name the repository itself provides is not a package
Returned
type Tensor, ndim 3, dtype family float, shape (1, 10, 8) — shape (1, 10, 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
upper Ran
ran on a synthesized input
treelli/aroid/src/config/config.py
code served (permissive licence) · get_code("c4a5928bd44f924c")
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 str. 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

def upper(x):
    if isinstance(x, str):
        return x.upper()
    else:
        return str(x).upper()

# Test with a string argument
ARGS = {
    "x": "hello world"
}
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 str — a str output has no array shape of its own; none is stated — the instrument coerces any output to an array; for a str 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
vit_base_patch16_224 Ran
ran on a synthesized input
treelli/aroid/src/model/vit.py
code served (permissive licence) · get_code("8291f5e949c143e7")
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 VisionTransformer. 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 collections import OrderedDict

torch.manual_seed(0)

# Build a minimal Vision Transformer model
class PatchEmbedding(nn.Module):
    def __init__(self):
        super().__init__()
        self.proj = nn.Conv2d(3, 4, kernel_size=16, stride=16)
    
    def forward(self, x):
        x = self.proj(x)
        x = x.flatten(2).transpose(1, 2)
        return x

class VisionTransformer(nn.Module):
    def __init__(self, num_classes=1000):
        super().__init__()
        self.patch_embed = PatchEmbedding()
        self.cls_token = nn.Parameter(torch.zeros(1, 1, 4))
        self.pos_embed = nn.Parameter(torch.zeros(1, 197, 4))
        self.blocks = nn.ModuleList([
            nn.TransformerEncoderLayer(d_model=4, nhead=1, dim_feedforward=8, batch_first=True)
        ])
        self.norm = nn.LayerNorm(4)
        self.head = nn.Linear(4, num_classes)
    
    def forward(self, x):
        x = self.patch_embed(x)
        cls_token = self.cls_token.expand(x.shape[0], -1, -1)
        x = torch.cat([cls_token, x], dim=1)
        x = x + self.pos_embed
        for block in self.blocks:
            x = block(x)
        x = self.norm(x)
        x = x[:, 0]
        x = self.head(x)
        return x

model = VisionTransformer(num_classes=1000)

# Create sample batch
x = torch.randn(2, 3, 224, 224)

ARGS = {
    'model': model,
    'x': x,
}
Setup block drafted by
a language model, Claude Haiku 4.5, prompt python_fixture_v1, through the batch API
Imports
timm, torch — import names as written, not package names to install; a name the repository itself provides is not a package
Returned
type VisionTransformer — a VisionTransformer output has no array shape of its own; none is stated — the instrument coerces any output to an array; for a VisionTransformer 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
window_partition Ran
ran; the contract check could not run (RAISES, DEP_MISSING or TIMEOUT)
treelli/aroid/src/model/swin.py
code served (permissive licence) · get_code("80c66c535be6f491")
How it ran

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

import torch
import torch.nn as nn

torch.manual_seed(0)

# Create a small tensor with shape (B, H, W, C)
# B=2 (batch), H=4 (height), W=6 (width), C=3 (channels)
# Choose window_size=2 so that H and W are divisible by it
x = torch.randn(2, 4, 6, 3)

# Define window_size parameter
window_size = 2

ARGS = {
    'x': x,
    'window_size': window_size
}
Setup block drafted by
a language model, Claude Haiku 4.5, prompt python_fixture_v1, through the batch API
Imports
torch — import names as written, not package names to install; a name the repository itself provides is not a package
Returned
type Tensor, ndim 4, dtype family float, shape (12, 2, 2, 3) — shape (12, 2, 2, 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
window_reverse Ran
ran; our contract draft was wrong, not the code
treelli/aroid/src/model/swin.py
code served (permissive licence) · get_code("b83f31fb8b7c976a")
How it ran

Ran in Syntology's sandbox on this synthesized input (drafted by a language model, Claude Haiku 4.5, prompt python_fixture_v1, through the batch API) and returned Tensor, ndim 4, dtype family float, shape (2, 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 torch
import torch.nn as nn

torch.manual_seed(0)

# Parameters for window_reverse function
# windows: (num_windows*B, window_size, window_size, C)
# window_size: int
# H: int (Height of image)
# W: int (Width of image)

window_size = 4
H = 8
W = 8
C = 3  # number of channels
B = 2  # batch size

# Calculate num_windows = (H // window_size) * (W // window_size)
num_windows = (H // window_size) * (W // window_size)
num_windows_B = num_windows * B

# Create windows tensor with shape (num_windows*B, window_size, window_size, C)
windows = torch.randn(num_windows_B, window_size, window_size, C)

ARGS = {
    "windows": windows,
    "window_size": window_size,
    "H": H,
    "W": W,
}
Setup block drafted by
a language model, Claude Haiku 4.5, prompt python_fixture_v1, through the batch API
Imports
torch — import names as written, not package names to install; a name the repository itself provides is not a package
Returned
type Tensor, ndim 4, dtype family float, shape (2, 8, 8, 3) — shape (2, 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

Also present in other papers' code

Of 13 samples lifted from this paper's linked repositories, 13 carry a function identity and 0 do not. Of the 13 distinct functions with an identity, 10 are also present in other papers whose code we hold (10 with at least one paper dated earlier, 0 the same month, 5 later) and 3 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
window_partition 31 other papers
6 dated earlier, 21 later, 4 same year, order not determinable
2111.11418 (2021-11)
MetaFormer Is Actually What You Need for Vision
2203.12119 (2022-03)
Visual Prompt Tuning
2204.03645 (2022-04)
DaViT: Dual Attention Vision Transformers
and 28 more not named here
window_reverse 14 other papers
3 dated earlier, 10 later, 1 same year, order not determinable
1706.03762 (2017-06)
Attention Is All You Need
2204.03645 (2022-04)
DaViT: Dual Attention Vision Transformers
2210.04135 (2022-10)
VoLTA: Vision-Language Transformer with Weakly-Supervised Local-Feature Alignment
and 11 more not named here
resize_pos_embed 8 other papers
5 dated earlier, 3 later
2106.00515 (2021-06)
KVT: k-NN Attention for Boosting Vision Transformers
2107.00645 (2021-07)
Global Filter Networks for Image Classification
2108.01390 (2021-08)
Evo-ViT: Slow-Fast Token Evolution for Dynamic Vision Transformer
and 5 more not named here
diff_in_weights 7 other papers
5 dated earlier, 2 later · 1 only as an assembly brick
1901.08573 (2019-01)
Theoretically Principled Trade-off between Robustness and Accuracy
2208.08270 (2022-08)
On the Privacy Effect of Data Enhancement via the Lens of Memorization
2210.03543 (2022-10)
A2: Efficient Automated Attacker for Boosting Adversarial Training
and 4 more not named here
input_grad 3 other papers
2 dated earlier, 1 later
2212.04985 (2022-12)
Understanding and Combating Robust Overfitting via Input Loss Landscape Analysis and Regularization
2301.09879 (2023-01)
Data Augmentation Alone Can Improve Adversarial Training
2403.01849 (2024-03)
One Prompt Word is Enough to Boost Adversarial Robustness for Pre-trained Vision-Language Models
pixel_2_real 2 other papers
2 dated earlier
2212.04985 (2022-12)
Understanding and Combating Robust Overfitting via Input Loss Landscape Analysis and Regularization
2301.09879 (2023-01)
Data Augmentation Alone Can Improve Adversarial Training
real_2_pixel 2 other papers
2 dated earlier
2212.04985 (2022-12)
Understanding and Combating Robust Overfitting via Input Loss Landscape Analysis and Regularization
2301.09879 (2023-01)
Data Augmentation Alone Can Improve Adversarial Training
upper 2 other papers
2 dated earlier
2212.04985 (2022-12)
Understanding and Combating Robust Overfitting via Input Loss Landscape Analysis and Regularization
2301.09879 (2023-01)
Data Augmentation Alone Can Improve Adversarial Training
perturb 1 other paper
1 dated earlier
2301.09879 (2023-01)
Data Augmentation Alone Can Improve Adversarial Training
pgd 1 other paper
1 dated earlier
2301.09879 (2023-01)
Data Augmentation Alone Can Improve Adversarial Training

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

Deep neural networks are vulnerable to adversarial examples. Adversarial training (AT) is an effective defense against adversarial examples. However, AT is prone to overfitting which degrades robustness substantially. Recently, data augmentation (DA) was shown to be effective in mitigating robust overfitting if appropriately designed and optimized for AT. This work proposes a new method to automatically learn online, instance-wise, DA policies to improve robust generalization for AT. This is the first automated DA method specific for robustness. A novel policy learning objective, consisting of Vulnerability, Affinity and Diversity, is proposed and shown to be sufficiently effective and efficient to be practical for automatic DA generation during AT. Importantly, our method dramatically reduces the cost of policy search from the 5000 hours of AutoAugment and the 412 hours of IDBH to 9 hours, making automated DA more practical to use for adversarial robustness. This allows our method to efficiently explore a large search space for a more effective DA policy and evolve the policy as training progresses. Empirically, our method is shown to outperform all competitive DA methods across various model architectures and datasets. Our DA policy reinforced vanilla AT to surpass several state-of-the-art AT methods regarding both accuracy and robustness. It can also be combined with those advanced AT methods to further boost robustness. Code and pre-trained models are available at https://github.com/TreeLLi/AROID.

For agents

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

get_harvested_code_for_paper("2306.07197")
get_code_for_paper("2306.07197")
have("2306.07197")

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

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

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

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

Connect an agent — have() is free.