SYNTOLOGY HomeExplorerAtlasCodeMethodologyAboutDevelopersFeedPricing
Paper · 2111.11056 · NeurIPS · 2021

Evaluating Adversarial Attacks on ImageNet: A Reality Check on Misclassification Classes

Utku Ozbulak, Wesley De Neve, Maura Pintor, Arnout Messem

arXiv · PDF · Open in the Atlas

Code that ran

4 of 5 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 4 have no contract verdict; 0 failures of our instrument; 1 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/2111.11056.json · badge: /api/ran/2111.11056.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
utkuozbulak/imagenet-adversarial-image-evaluation canonical (classifier label)
classifier basis not recorded on the link
4 ran · 1 no recorded run
FunctionStatusWhere it lives
get_m2m_transferability_data Ran
ran on a synthesized input
utkuozbulak/imagenet-adversarial-image-evaluation/src/prep_data.py
code served (permissive licence) · get_code("2061680e12d105df")
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 list, ndim 2, dtype family int; 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 numpy as np
import tempfile
import os

# Create a temporary directory structure with mock .npy files
temp_dir = tempfile.mkdtemp()

# Create the attack subdirectory
attack_name = 'fgsm'
attack_dir = os.path.join(temp_dir, attack_name)
os.makedirs(attack_dir, exist_ok=True)

# Define model list
MODEL_LIST = ['alexnet', 'squeezenet', 'vgg16', 'resnet50', 'densenet', 'vit_base', 'vit_large']

# Create mock .npy files with transfer data
# Each file contains a dict with some keys representing successful transfers
for source_model in MODEL_LIST:
    for target_model in MODEL_LIST:
        if source_model != target_model:
            file_name = attack_name + '_gen_from_' + source_model + '_trans_to_' + target_model + '.npy'
            file_path = os.path.join(attack_dir, file_name)
            
            # Create a mock transfer dict with some number of keys
            # Use different sizes to make the data realistic
            num_transfers = np.random.randint(5, 15)
            transfer_dict = {f'transfer_{i}': np.array([1, 2, 3]) for i in range(num_transfers)}
            
            np.save(file_path, transfer_dict)

# Define ARGS
ARGS = {
    'file_loc': temp_dir,
    'attack': attack_name,
    'model_list': MODEL_LIST
}
Setup block drafted by
a language model, Claude Haiku 4.5, prompt python_fixture_v1, through the batch API
Imports
numpy — import names as written, not package names to install; a name the repository itself provides is not a package
Returned
type list, ndim 2, dtype family int — a list 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
get_transferability_cnt_for_each_source_image Ran
ran on a synthesized input
utkuozbulak/imagenet-adversarial-image-evaluation/src/prep_data.py
code served (permissive licence) · get_code("2edbe4a9bcf264f3")
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 numpy as np
import tempfile
import os

# Create temporary directory and mock .npy files
temp_dir = tempfile.mkdtemp()

# Create mock transfer data files
attack_name = 'fgsm'
attack_dir = os.path.join(temp_dir, attack_name)
os.makedirs(attack_dir, exist_ok=True)

MODEL_LIST = ['alexnet', 'squeezenet', 'vgg16', 'resnet50', 'densenet', 'vit_base', 'vit_large']

# Create mock transferability data files
for source_model in MODEL_LIST:
    for target_model in MODEL_LIST:
        if source_model != target_model:
            file_name = attack_name + '_gen_from_' + source_model + '_trans_to_' + target_model + '.npy'
            file_path = os.path.join(attack_dir, file_name)
            
            # Create a simple dict with image names as keys
            mock_transfer_data = {
                'image_1.jpg': [0.9, 0.8],
                'image_2.jpg': [0.7, 0.6],
                'image_3.jpg': [0.5, 0.4],
            }
            
            # Save as .npy file
            np.save(file_path, mock_transfer_data)

ARGS = {
    'file_loc': temp_dir,
    'attack': attack_name,
    'model_list': MODEL_LIST,
}
Setup block drafted by
a language model, Claude Haiku 4.5, prompt python_fixture_v1, through the batch API
Imports
numpy — 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
next_100 Ran
ran on a synthesized input
utkuozbulak/imagenet-adversarial-image-evaluation/src/vis_pert_per_transferability.py
code served (permissive licence) · get_code("1c64e731a6307f86")
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

def next_100(num):
    while num % 100 != 0:
        num = int(num) + 1
    return num

ARGS = {
    "num": 37
}
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 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
read_single_npy Ran
ran on a synthesized input
utkuozbulak/imagenet-adversarial-image-evaluation/src/prep_data.py
code served (permissive licence) · get_code("4366f4c11b5f9b8d")
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 numpy as np
import tempfile
import os

# Create a temporary .npy file with a pickled dict
temp_dir = tempfile.mkdtemp()
test_dict = {
    'key1': 'value1',
    'key2': 42,
    'key3': [1, 2, 3],
    'key4': np.array([4, 5, 6])
}
temp_file = os.path.join(temp_dir, 'test.npy')
np.save(temp_file, test_dict)

ARGS = {
    'loc': temp_file
}
Setup block drafted by
a language model, Claude Haiku 4.5, prompt python_fixture_v1, through the batch API
Imports
numpy — 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
plt_l2_histogram Not yet run
unverified (harvested, no recorded run)
utkuozbulak/imagenet-adversarial-image-evaluation/src/vis_pert_per_transferability.py
code served (permissive licence) · get_code("54764c11ee09a119")
How it ran

no invocation recorded.

Also present in other papers' code

Of 5 samples lifted from this paper's linked repositories, 5 carry a function identity and 0 do not. Of the 5 distinct functions with an identity, 0 are also present in other papers whose code we hold (0 with at least one paper dated earlier, 0 the same month, 0 later) and 5 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.

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

Although ImageNet was initially proposed as a dataset for performance benchmarking in the domain of computer vision, it also enabled a variety of other research efforts. Adversarial machine learning is one such research effort, employing deceptive inputs to fool models in making wrong predictions. To evaluate attacks and defenses in the field of adversarial machine learning, ImageNet remains one of the most frequently used datasets. However, a topic that is yet to be investigated is the nature of the classes into which adversarial examples are misclassified. In this paper, we perform a detailed analysis of these misclassification classes, leveraging the ImageNet class hierarchy and measuring the relative positions of the aforementioned type of classes in the unperturbed origins of the adversarial examples. We find that 71% of the adversarial examples that achieve model-to-model adversarial transferability are misclassified into one of the top-5 classes predicted for the underlying source images. We also find that a large subset of untargeted misclassifications are, in fact, misclassifications into semantically similar classes. Based on these findings, we discuss the need to take into account the ImageNet class hierarchy when evaluating untargeted adversarial successes. Furthermore, we advocate for future research efforts to incorporate categorical information.

For agents

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

get_harvested_code_for_paper("2111.11056")
get_code_for_paper("2111.11056")
have("2111.11056")

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

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

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

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

Connect an agent — have() is free.