SYNTOLOGY HomeExplorerAtlasCodeMethodologyAboutDevelopersFeedPricing
Paper · 2201.11528 · ICLR · 2022

Beyond ImageNet Attack: Towards Crafting Adversarial Examples for Black-box Domains

Yuan He, Qilong Zhang, Xiaodan Li, Yuefeng Chen, Jingkuan Song, Lianli Gao, Hui Xue

arXiv · PDF · Open in the Atlas

Code that ran

11 of 11 samples (functions and classes) lifted from this paper's linked repositories executed on a synthesized input in Syntology's jail (2 of them constructed an object rather than computing a result; 0 honoured the contract we drafted, 0 violated it and 5 have no contract verdict; 6 failures of our instrument; 0 no recorded run), measured 2026-11-22; repository links from the Papers with Code archive attributed under CC BY-SA, no affiliation; bodies inline only under a permissive licence as GitHub detects it. Not a reproduction of the paper's results.

"Ran" means the function executed on a synthesized input and returned a value. It is not a reproduction of the paper's results. This record, dated, as JSON: /api/ran/2201.11528.json · badge: /api/ran/2201.11528.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
Alibaba-AAIG/Beyond-ImageNet-Attack canonical (classifier label)
classifier basis not recorded on the link
9 ran · 0 no recorded run
qilong-zhang/beyond-imagenet-attack marked official in Papers with Code
Papers with Code archive
2 ran · 0 no recorded run
FunctionStatusWhere it lives
GeneratorResnet Ran
ran on a synthesized input · constructed an object; no result was computed
qilong-zhang/beyond-imagenet-attack/generator.py
code served (permissive licence) · get_code("acddffe2ca275748")
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, GeneratorResnet: 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 = {
    "inception": False
}
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 GeneratorResnet — 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 GeneratorResnet 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
ResidualBlock Ran
ran on a synthesized input · constructed an object; no result was computed
qilong-zhang/beyond-imagenet-attack/generator.py
code served (permissive licence) · get_code("fc5d9d84d0fa3f1a")
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, ResidualBlock: 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)

# ResidualBlock only takes num_filters as a parameter
# num_filters should be an int representing the number of channels
# The forward pass expects input tensor x with shape (batch, num_filters, height, width)

ARGS = {
    "num_filters": 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 ResidualBlock — 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 ResidualBlock 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
alexnet Ran
ran on a synthesized input
Alibaba-AAIG/Beyond-ImageNet-Attack/imagenet/alexnet.py
code served (permissive licence) · get_code("2acf0497fa785363")
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 AlexNet. 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 = {
    'pretrained': False,
    'model_root': None,
}
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 AlexNet — a AlexNet output has no array shape of its own; none is stated — the instrument coerces any output to an array; for a AlexNet 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
cifar10 Ran
ran; our contract draft was wrong, not the code
Alibaba-AAIG/Beyond-ImageNet-Attack/cifar/model.py
code served (permissive licence) · get_code("e6436dcd699473d2")
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 CIFAR. 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.utils.model_zoo as model_zoo
from collections import OrderedDict

torch.manual_seed(0)

ARGS = {
    'n_channel': 16,
    'pretrained': None,
}
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 CIFAR — a CIFAR output has no array shape of its own; none is stated — the instrument coerces any output to an array; for a CIFAR 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
cifar100 Ran
ran; our contract draft was wrong, not the code
Alibaba-AAIG/Beyond-ImageNet-Attack/cifar/model.py
code served (permissive licence) · get_code("3baa599c5d5d5bb5")
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 CIFAR. 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_channel': 16,
    'pretrained': None,
}
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 CIFAR — a CIFAR output has no array shape of its own; none is stated — the instrument coerces any output to an array; for a CIFAR 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
conv3x3 Ran
ran; our contract draft was wrong, not the code
Alibaba-AAIG/Beyond-ImageNet-Attack/imagenet/resnet.py
pointer only (licence: MIT); 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 link allows the body inline (MIT), but get_code serves the stored copy, first harvested from amerch/CIFAR100-Training, 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.

get Ran
ran on a synthesized input
Alibaba-AAIG/Beyond-ImageNet-Attack/imagenet/dataset.py
code served (permissive licence) · get_code("c89d1e59cc2475a1")
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 IMAGENET. 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 os
import numpy as np
import joblib
import tempfile

# Create a temporary directory for mock data
tmpdir = tempfile.mkdtemp()
data_root = os.path.join(tmpdir, 'pytorch', 'imagenet-data')
os.makedirs(data_root, exist_ok=True)

# Create mock pickle files for validation data
val_data = {
    'data': np.random.randint(0, 256, (8, 224, 224, 3), dtype=np.uint8),
    'target': np.array([0, 1, 2, 3, 4, 5, 6, 7], dtype=np.int64)
}
joblib.dump(val_data, os.path.join(data_root, 'val224.pkl'))

# Create mock pickle files for training data (though train is not supported)
train_data = {
    'data': np.random.randint(0, 256, (8, 224, 224, 3), dtype=np.uint8),
    'target': np.array([0, 1, 2, 3, 4, 5, 6, 7], dtype=np.int64)
}
joblib.dump(train_data, os.path.join(data_root, 'train224.pkl'))

ARGS = {
    'batch_size': 2,
    'data_root': os.path.join(tmpdir, 'pytorch'),
    'train': False,
    'val': True,
}
Setup block drafted by
a language model, Claude Haiku 4.5, prompt python_fixture_v1, through the batch API
Imports
joblib, numpy — import names as written, not package names to install; a name the repository itself provides is not a package
Returned
type IMAGENET — a IMAGENET output has no array shape of its own; none is stated — the instrument coerces any output to an array; for a IMAGENET 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
make_layers Ran
ran; our contract draft was wrong, not the code
Alibaba-AAIG/Beyond-ImageNet-Attack/imagenet/vgg.py
code served (permissive licence) · get_code("ac62432dc5134b0d")
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 function takes two parameters: cfg and batch_norm
# cfg should be a list/sequence of either integers (channel counts) or 'M' (maxpool marker)
# batch_norm is a boolean flag

# Using one of the predefined configurations from the module-level cfg dict
cfg_list = [64, 'M', 128, 'M', 256, 256, 'M', 512, 512, 'M', 512, 512, 'M']

ARGS = {
    'cfg': cfg_list,
    'batch_norm': False
}
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
make_layers Ran
ran on a synthesized input
Alibaba-AAIG/Beyond-ImageNet-Attack/cifar/model.py
code served (permissive licence) · get_code("ec2c08983ca02f3d")
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)

# cfg parameter: a list where elements are either 'M' (MaxPool2d) or integers/tuples (Conv2d channels)
# integers represent out_channels with default padding=1
# tuples represent (out_channels, padding)
cfg = [64, (128, 2), 'M', 256, 'M', 512]

# batch_norm parameter: boolean flag
batch_norm = True

ARGS = {
    'cfg': cfg,
    'batch_norm': batch_norm
}
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
vgg11 Ran
ran; our contract draft was wrong, not the code
Alibaba-AAIG/Beyond-ImageNet-Attack/imagenet/vgg.py
code served (permissive licence) · get_code("935d064cdc5a56c6")
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 VGG. 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 = {
    'pretrained': False,
    'model_root': None,
}
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 VGG — a VGG output has no array shape of its own; none is stated — the instrument coerces any output to an array; for a VGG 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
vgg13 Ran
ran; our contract draft was wrong, not the code
Alibaba-AAIG/Beyond-ImageNet-Attack/imagenet/vgg.py
code served (permissive licence) · get_code("f9a4c5c980953259")
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 VGG. 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 = {
    'pretrained': False,
    'model_root': None,
}
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 VGG — a VGG output has no array shape of its own; none is stated — the instrument coerces any output to an array; for a VGG 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

Also present in other papers' code

Of 11 samples lifted from this paper's linked repositories, 11 carry a function identity and 0 do not. Of the 11 distinct functions with an identity, 9 are also present in other papers whose code we hold (7 with at least one paper dated earlier, 1 the same month, 5 later) and 2 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
363 dated earlier, 4 the same month, 308 later, 11 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
make_layers 59 other papers
29 dated earlier, 29 later, 1 same year, order not determinable
1411.4038 (2014-11)
Fully Convolutional Networks for Semantic Segmentation
1511.00561 (2015-11)
SegNet: A Deep Convolutional Encoder-Decoder Architecture for Image Segmentation
1511.05950 (2015-11)
Staleness-aware Async-SGD for Distributed Deep Learning
and 56 more not named here
ResidualBlock
brick of this paper's assembly: helper
2 other papers
1 dated earlier, 1 later · 2 only as an assembly brick
2103.14641 (2021-03)
On Generating Transferable Targeted Perturbations
2407.10179 (2024-07)
CLIP-Guided Generative Networks for Transferable Targeted Adversarial Attacks
GeneratorResnet
brick of this paper's assembly: entry
1 other paper
1 dated earlier
2103.14641 (2021-03)
On Generating Transferable Targeted Perturbations
cifar10 1 other paper
1 dated earlier
1811.02625 (2018-11)
MixTrain: Scalable Training of Verifiably Robust Neural Networks
cifar100 1 other paper
1 dated earlier
1811.02625 (2018-11)
MixTrain: Scalable Training of Verifiably Robust Neural Networks
make_layers 1 other paper
1 dated earlier
1811.02625 (2018-11)
MixTrain: Scalable Training of Verifiably Robust Neural Networks
vgg11 1 other paper
1 later
2402.18172 (2024-02)
NiteDR: Nighttime Image De-Raining with Cross-View Sensor Cooperative Learning for Dynamic Driving Scenes
vgg13 1 other paper
1 later
2402.18172 (2024-02)
NiteDR: Nighttime Image De-Raining with Cross-View Sensor Cooperative Learning for Dynamic Driving Scenes

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

Repositories linked to this paper

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

Abstract

Adversarial examples have posed a severe threat to deep neural networks due to their transferable nature. Currently, various works have paid great efforts to enhance the cross-model transferability, which mostly assume the substitute model is trained in the same domain as the target model. However, in reality, the relevant information of the deployed model is unlikely to leak. Hence, it is vital to build a more practical black-box threat model to overcome this limitation and evaluate the vulnerability of deployed models. In this paper, with only the knowledge of the ImageNet domain, we propose a Beyond ImageNet Attack (BIA) to investigate the transferability towards black-box domains (unknown classification tasks). Specifically, we leverage a generative model to learn the adversarial function for disrupting low-level features of input images. Based on this framework, we further propose two variants to narrow the gap between the source and target domains from the data and model perspectives, respectively. Extensive experiments on coarse-grained and fine-grained domains demonstrate the effectiveness of our proposed methods. Notably, our methods outperform state-of-theart approaches by up to 7.71% (towards coarse-grained domains) and 25.91% (towards fine-grained domains) on average. Our code is available at https: //github.com/Alibaba-AAIG/Beyond-ImageNet-Attack.

For agents

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

get_harvested_code_for_paper("2201.11528")
get_code_for_paper("2201.11528")
have("2201.11528")

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

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

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

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

Connect an agent — have() is free.