SYNTOLOGY HomeExplorerAtlasCodeMethodologyAboutDevelopersFeedPricing
Paper · 2002.07088 · 2020

GRAPHITE: Generating Automatic Physical Examples for Machine-Learning Attacks on Computer Vision Systems

arXiv · PDF · Open in the Atlas

Code that ran

3 of 4 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 3 have no contract verdict; 0 failures of our instrument; 1 no recorded run), measured 2026-11-21; 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/2002.07088.json · badge: /api/ran/2002.07088.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
ryan-feng/graphite canonical (classifier label)
classifier basis: census
3 ran · 1 no recorded run
FunctionStatusWhere it lives
get_offset_and_crop_size Ran
ran on a synthesized input
ryan-feng/graphite/perspective_transform.py
code served (permissive licence) · get_code("d8a0f6fa51db3941")
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 1, 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 numpy as np
import tempfile
import os

# Create a temporary CSV file with sample point data
temp_dir = tempfile.mkdtemp()
pt_file_path = os.path.join(temp_dir, "points.csv")

# Write sample points to CSV
with open(pt_file_path, 'w') as f:
    f.write("100.0,150.0,1.0\n")
    f.write("200.0,250.0,1.0\n")

# Create a 3x3 homography matrix (identity-like for simplicity)
H = np.array([
    [1.0, 0.0, 0.0],
    [0.0, 1.0, 0.0],
    [0.0, 0.0, 1.0]
])

ARGS = {
    "w": 640,
    "h": 480,
    "H": H,
    "crop_percent": 0.1,
    "crop_off_x": 0.0,
    "crop_off_y": 0.0,
    "pt_file": pt_file_path,
    "ratio": 1.2
}
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 tuple, ndim 1, 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
score_fn Ran
ran on a synthesized input
ryan-feng/graphite/score.py
code served (permissive licence) · get_code("90f63f8b704fc00d")
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 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
import numpy as np

torch.manual_seed(0)

# Analyze the function:
# - theta: used as a parameter but not directly referenced in the function body
# - mask: has .sum() method called on it, so should be a tensor
# - tr_err: numeric value, compared with threshold
# - object_size: numeric value, used in division
# - coord: optional, defaults to None, not used in function body
# - threshold: numeric value with default 0.75
# - lbd: numeric value with default 5
# - *args, **kwargs: captured but not used

# Create minimal valid arguments
theta = torch.randn(2, 4)  # Small tensor for theta parameter
mask = torch.ones(3, 4, dtype=torch.float32)  # Tensor with .sum() method
tr_err = 0.5  # Numeric value less than threshold
object_size = 2.0  # Numeric value for division
coord = None  # Optional parameter, default None

ARGS = {
    "theta": theta,
    "mask": mask,
    "tr_err": tr_err,
    "object_size": object_size,
    "coord": coord,
    "threshold": 0.75,
    "lbd": 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 Tensor, 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
score_fn Ran
ran on a synthesized input
ryan-feng/graphite/score_border.py
code served (permissive licence) · get_code("bf4013124866ca91")
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 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
import torch.nn as nn

torch.manual_seed(0)

# theta: appears to be used as a parameter but not accessed in the function body
theta = torch.randn(4)

# mask: used with .sum() method, so it should be a tensor
mask = torch.tensor([[1, 0, 1, 1], [1, 1, 0, 1]], dtype=torch.float32)

# tr_err: a scalar float value compared with threshold
tr_err = 0.5

# object_size: a scalar used in division
object_size = 2

# coord: optional parameter, not used in function body
coord = None

# threshold: optional parameter with default 0.75, compared with tr_err
threshold = 0.75

ARGS = {
    "theta": theta,
    "mask": mask,
    "tr_err": tr_err,
    "object_size": object_size,
    "coord": coord,
    "threshold": threshold,
}
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 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
get_perspective_transform Not yet run
unverified (harvested, no recorded run)
ryan-feng/graphite/perspective_transform.py
code served (permissive licence) · get_code("37e8232e20c88f4f")
How it ran

no invocation recorded.

Also present in other papers' code

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

Repositories linked to this paper

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

Abstract

This paper investigates an adversary's ease of attack in generating adversarial examples for real-world scenarios. We address three key requirements for practical attacks for the real-world: 1) automatically constraining the size and shape of the attack so it can be applied with stickers, 2) transform-robustness, i.e., robustness of a attack to environmental physical variations such as viewpoint and lighting changes, and 3) supporting attacks in not only white-box, but also black-box hard-label scenarios, so that the adversary can attack proprietary models. In this work, we propose GRAPHITE, an efficient and general framework for generating attacks that satisfy the above three key requirements. GRAPHITE takes advantage of transform-robustness, a metric based on expectation over transforms (EoT), to automatically generate small masks and optimize with gradient-free optimization. GRAPHITE is also flexible as it can easily trade-off transform-robustness, perturbation size, and query count in black-box settings. On a GTSRB model in a hard-label black-box setting, we are able to find attacks on all possible 1,806 victim-target class pairs with averages of 77.8% transform-robustness, perturbation size of 16.63% of the victim images, and 126K queries per pair. For digital-only attacks where achieving transform-robustness is not a requirement, GRAPHITE is able to find successful small-patch attacks with an average of only 566 queries for 92.2% of victim-target pairs. GRAPHITE is also able to find successful attacks using perturbations that modify small areas of the input image against PatchGuard, a recently proposed defense against patch-based attacks.

For agents

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

get_harvested_code_for_paper("2002.07088")
get_code_for_paper("2002.07088")
have("2002.07088")

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

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

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

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

Connect an agent — have() is free.