SYNTOLOGY HomeExplorerAtlasCodeMethodologyAboutDevelopersFeedPricing
Paper · 1809.08352 · 2018

Unrestricted Adversarial Examples

arXiv · PDF · Open in the Atlas

Code that ran

4 of 9 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; 5 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/1809.08352.json · badge: /api/ran/1809.08352.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
google/unrestricted-adversarial-examples canonical (classifier label)
classifier basis: census
4 ran · 5 no recorded run
FunctionStatusWhere it lives
labels_to_one_hot Ran
ran on a synthesized input
google/unrestricted-adversarial-examples/unrestricted-advex/unrestricted_advex/mnist_baselines/mnist_utils.py
code served (permissive licence) · get_code("a70896a27e2d5bbc")
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 ndarray, ndim 2, dtype family float, shape (6, 10) 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 numpy as np

# The function takes 'labels' parameter which should be an array-like of integers
# representing class indices (0 to NUM_CLASSES-1)
# Looking at the function body:
# - len(labels) is called, so it needs to be a sequence
# - labels are used as indices into one_hot array, so they should be integers in range [0, NUM_CLASSES)

NUM_CLASSES = 10

# Create a small batch of valid class labels
labels = np.array([0, 5, 3, 9, 2, 1])

ARGS = {
    "labels": labels
}
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 ndarray, ndim 2, dtype family float, shape (6, 10) — shape (6, 10) 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
logits_to_preds Ran
ran on a synthesized input
google/unrestricted-adversarial-examples/unrestricted-advex/unrestricted_advex/eval_kit.py
code served (permissive licence) · get_code("33d80eb2d653333d")
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 ndarray, ndim 1, dtype family int, shape (2,) 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 numpy as np

torch_seed = 0

# Construct logits: shape (batch_size, num_classes)
# The function compares logits[:, 0] < logits[:, 1]
# So we need at least 2 columns (classes)
logits = np.array([
    [1.0, 2.0],
    [3.0, 1.5]
], dtype=np.float32)

ARGS = {
    "logits": logits
}
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 ndarray, ndim 1, dtype family int, shape (2,) — shape (2,) 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
one_hot_to_labels Ran
ran on a synthesized input
google/unrestricted-adversarial-examples/unrestricted-advex/unrestricted_advex/mnist_baselines/mnist_utils.py
code served (permissive licence) · get_code("b81eb42860bcab7b")
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 ndarray, ndim 1, dtype family int, shape (2,) 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 numpy as np

# The function expects a one-hot encoded array where np.where returns
# the indices of non-zero elements. For a one-hot encoded matrix,
# np.where will return (row_indices, column_indices) and we want the
# column_indices which represent the labels.

# Create a simple one-hot encoded array
# Shape: (batch_size=2, num_classes=4)
# Row 0: class 2 is active
# Row 1: class 1 is active
one_hot_array = np.array([
    [0, 0, 1, 0],
    [0, 1, 0, 0]
], dtype=np.int32)

ARGS = {
    "one_hot": one_hot_array
}
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 ndarray, ndim 1, dtype family int, shape (2,) — shape (2,) 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
run_attack Ran
ran on a synthesized input
google/unrestricted-adversarial-examples/unrestricted-advex/unrestricted_advex/eval_kit.py
code served (permissive licence) · get_code("65499837cc65da38")
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. 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
from collections import namedtuple

# Create a simple model that returns logits of shape (batch_size, 2) as float32
class SimpleModel:
    def __call__(self, x_np):
        batch_size = x_np.shape[0]
        logits = np.random.randn(batch_size, 2).astype(np.float32)
        return logits

# Create a simple attack function
def simple_attack_fn(model, x_np, y_np):
    # Just add a small perturbation and clip
    x_adv = x_np + np.random.randn(*x_np.shape).astype(np.float32) * 0.01
    x_adv = np.clip(x_adv, 0, 1)
    return x_adv

# Create data iterator as a list of (x, y, image_ids) tuples
# Batch 1: 2 images of shape (2, 4, 4, 3) in NHWC format
x_batch_1 = np.random.randn(2, 4, 4, 3).astype(np.float32)
y_batch_1 = np.array([0, 1], dtype=np.int64)
image_ids_1 = ["img_0", "img_1"]

# Batch 2: 2 images of shape (2, 4, 4, 3) in NHWC format
x_batch_2 = np.random.randn(2, 4, 4, 3).astype(np.float32)
y_batch_2 = np.array([1, 0], dtype=np.int64)
image_ids_2 = ["img_2", "img_3"]

data_iter = [
    (x_batch_1, y_batch_1, image_ids_1),
    (x_batch_2, y_batch_2, image_ids_2),
]

ARGS = {
    "model": SimpleModel(),
    "data_iter": data_iter,
    "attack_fn": simple_attack_fn,
}
Setup block drafted by
a language model, Claude Haiku 4.5, prompt python_fixture_v1, through the batch API
Imports
numpy, tqdm — import names as written, not package names to install; a name the repository itself provides is not a package
Returned
type tuple — a tuple output has no array shape of its own; none is 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
apply_black_border Not yet run
unverified (harvested, no recorded run)
google/unrestricted-adversarial-examples/unrestricted-advex/unrestricted_advex/attacks.py
code served (permissive licence) · get_code("cecafa3ce8f9611b")
How it ran

no invocation recorded.

apply_transformation Not yet run
unverified (harvested, no recorded run)
google/unrestricted-adversarial-examples/unrestricted-advex/unrestricted_advex/attacks.py
code served (permissive licence) · get_code("eda59a67911617e6")
How it ran

no invocation recorded.

reduce_function Not yet run
unverified (harvested, no recorded run)
google/unrestricted-adversarial-examples/unrestricted-advex/unrestricted_advex/cleverhans_fast_spatial_attack.py
code served (permissive licence) · get_code("9de14959e7477d6d")
How it ran

no invocation recorded.

reduce_max Not yet run
unverified (harvested, no recorded run)
google/unrestricted-adversarial-examples/unrestricted-advex/unrestricted_advex/cleverhans_fast_spatial_attack.py
code served (permissive licence) · get_code("581a4854bb151ce8")
How it ran

no invocation recorded.

reduce_sum Not yet run
unverified (harvested, no recorded run)
google/unrestricted-adversarial-examples/unrestricted-advex/unrestricted_advex/cleverhans_fast_spatial_attack.py
code served (permissive licence) · get_code("85f5496634b03c85")
How it ran

no invocation recorded.

Also present in other papers' code

Of 9 samples lifted from this paper's linked repositories, 9 carry a function identity and 0 do not. Of the 9 distinct functions with an identity, 2 are also present in other papers whose code we hold (2 with at least one paper dated earlier, 0 the same month, 0 later) and 7 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
reduce_max 1 other paper
1 dated earlier
1610.00768 (2016-10)
Technical Report on the CleverHans v2.1.0 Adversarial Examples Library
reduce_sum 1 other paper
1 dated earlier
1610.00768 (2016-10)
Technical Report on the CleverHans v2.1.0 Adversarial Examples Library

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

We introduce a two-player contest for evaluating the safety and robustness of machine learning systems, with a large prize pool. Unlike most prior work in ML robustness, which studies norm-constrained adversaries, we shift our focus to unconstrained adversaries. Defenders submit machine learning models, and try to achieve high accuracy and coverage on non-adversarial data while making no confident mistakes on adversarial inputs. Attackers try to subvert defenses by finding arbitrary unambiguous inputs where the model assigns an incorrect label with high confidence. We propose a simple unambiguous dataset ("bird-or- bicycle") to use as part of this contest. We hope this contest will help to more comprehensively evaluate the worst-case adversarial risk of machine learning models.

For agents

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

get_harvested_code_for_paper("1809.08352")
get_code_for_paper("1809.08352")
have("1809.08352")

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

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

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

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

Connect an agent — have() is free.