SYNTOLOGY HomeExplorerAtlasCodeMethodologyAboutDevelopersFeedPricing
Paper · 2203.05154 · CVPR · 2022

Practical Evaluation of Adversarial Robustness via Adaptive Auto Attack

Qilong Zhang, Jingkuan Song, Lianli Gao, Xianglong Liu, Yaya Cheng, Ye Liu

arXiv · PDF · Open in the Atlas

Code that ran

4 of 6 samples (functions and classes) lifted from this paper's linked repositories executed on a synthesized input in Syntology's jail (1 of them constructed an object rather than computing a result; 0 honoured the contract we drafted, 0 violated it and 1 has no contract verdict; 3 failures of our instrument; 2 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/2203.05154.json · badge: /api/ran/2203.05154.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
liuye6666/adaptive_auto_attack marked official in Papers with Code
Papers with Code archive
3 ran · 1 no recorded run
fra31/auto-attack community
Papers with Code archive
1 ran · 1 no recorded run
FunctionStatusWhere it lives
EvaluationState Ran
ran on a synthesized input · constructed an object; no result was computed
fra31/auto-attack/autoattack/autoattack.py
code served (permissive licence) · get_code("1f1c0fb5fee05251")
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, EvaluationState: 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 pathlib import Path
from datetime import datetime
from typing import Set

torch.manual_seed(0)

ARGS = {
    "_attacks_to_run": {"fgsm", "pgd", "cw"},
    "path": Path("/tmp/eval_state.json"),
    "_run_attacks": {"fgsm"},
    "_robust_flags": torch.tensor([True, False, True, True], dtype=torch.bool),
    "_last_saved": datetime(2024, 1, 1, 12, 0, 0),
    "_SAVE_TIMEOUT": 60,
    "_clean_accuracy": 0.95,
}
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 EvaluationState — 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 EvaluationState 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
lp_norm Ran
ran; the contract check could not run (RAISES, DEP_MISSING or TIMEOUT)
liuye6666/adaptive_auto_attack/Adaptive_Auto_Attack_main.py
code served (permissive licence) · get_code("1d523ea323a6b340")
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) and returned Tensor, ndim 3, dtype family float, shape (2, 1, 1) 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)

# The function lp_norm takes a tensor x and computes L2 norm
# It expects x to have shape (batch_size, *feature_dims)
# The function reshapes, computes norm, and returns it reshaped back

# Create a small tensor with batch size 2 and feature dimensions
x = torch.randn(2, 4, 3)

ARGS = {
    'x': x
}
Setup block drafted by
a language model, Claude Haiku 4.5, prompt python_fixture_v1
Imports
torch — import names as written, not package names to install; a name the repository itself provides is not a package
Returned
type Tensor, ndim 3, dtype family float, shape (2, 1, 1) — shape (2, 1, 1) 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
margin_loss Ran
ran; the contract check could not run (RAISES, DEP_MISSING or TIMEOUT)
liuye6666/adaptive_auto_attack/Adaptive_Auto_Attack_main.py
code served (permissive licence) · get_code("c832edfa8ce9c69d")
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, 1) as a later run recorded it. The image it ran in was not recorded. The code mentions cuda, and the harness aliases cuda to the CPU for every sample; whether this run needed that is 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)

# Create small logits tensor: batch_size=2, num_classes=4
logits = torch.randn(2, 4)

# Create labels tensor: batch_size=2, with class indices in range [0, 3]
y = torch.tensor([1, 2])

# Create arguments dict
ARGS = {
    'logits': logits,
    'y': y,
    'i': 0,
    'MT': 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 Tensor, ndim 2, dtype family float, shape (2, 1) — shape (2, 1) 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
normalize_x Ran
ran; the contract check could not run (RAISES, DEP_MISSING or TIMEOUT)
liuye6666/adaptive_auto_attack/Adaptive_Auto_Attack_main.py
code served (permissive licence) · get_code("852403b999b50d53")
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) and returned Tensor, ndim 3, dtype family float, shape (2, 4, 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)

# The function normalize_x takes a tensor x and normalizes it using L2 norm
# It expects x to be a tensor with shape (batch_size, *other_dims)
# The function computes norms per batch element and divides each element by its norm

# Create a small tensor: batch_size=2, with shape (2, 4, 3)
# This gives us distinct dimensions to probe later
x = torch.randn(2, 4, 3)

ARGS = {
    'x': x
}
Setup block drafted by
a language model, Claude Haiku 4.5, prompt python_fixture_v1
Imports
torch — import names as written, not package names to install; a name the repository itself provides is not a package
Returned
type Tensor, ndim 3, dtype family float, shape (2, 4, 3) — shape (2, 4, 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
AAA_white_box Not yet run
unverified (harvested, no recorded run)
liuye6666/adaptive_auto_attack/Adaptive_Auto_Attack_main.py
code served (permissive licence) · get_code("5b1ee32a9bce8b64")
How it ran

no invocation recorded.

AutoAttack Not yet run
unverified (harvested, no recorded run)
fra31/auto-attack/autoattack/autoattack.py
code served (permissive licence) · get_code("d98c529d0851b047")
How it ran

no invocation recorded.

Also present in other papers' code

Of 6 samples lifted from this paper's linked repositories, 6 carry a function identity and 0 do not. Of the 6 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 6 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-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

Defense models against adversarial attacks have grown significantly, but the lack of practical evaluation methods has hindered progress. Evaluation can be defined as looking for defense models' lower bound of robustness given a budget number of iterations and a test dataset. A practical evaluation method should be convenient (i.e., parameterfree), efficient (i.e., fewer iterations) and reliable (i.e., approaching the lower bound of robustness). Towards this target, we propose a parameter-free Adaptive Auto Attack (A 3 ) evaluation method which addresses the efficiency and reliability in a test-time-training fashion. Specifically, by observing that adversarial examples to a specific defense model follow some regularities in their starting points, we design an Adaptive Direction Initialization strategy to speed up the evaluation. Furthermore, to approach the lower bound of robustness under the budget number of iterations, we propose an online statistics-based discarding strategy that automatically identifies and abandons hard-to-attack images. Extensive experiments on nearly 50 widely-used defense models demonstrate the effectiveness of our A 3 . By consuming much fewer iterations than existing methods, i.e., 1/10 on average (10× speed up), we achieve lower robust accuracy in all cases. Notably, we won first place out of 1681 teams in CVPR 2021 White-box Adversarial Attacks on Defense Models competitions with this method. Code is available at: https://github.com/liuye6666/adaptive auto attack

For agents

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

get_harvested_code_for_paper("2203.05154")
get_code_for_paper("2203.05154")
have("2203.05154")

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

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

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

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

Connect an agent — have() is free.