SYNTOLOGY HomeExplorerAtlasCodeMethodologyAboutDevelopersFeedPricing
Paper · 1710.08864 · 2017

One pixel attack for fooling deep neural networks

arXiv · PDF · Open in the Atlas

Code that ran

5 of 6 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 0 have no contract verdict; 5 failures of our instrument; 1 no recorded run), measured 2026-11-23; 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/1710.08864.json · badge: /api/ran/1710.08864.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
Hyperparticle/one-pixel-attack-keras community (classifier label)
classifier basis not recorded on the link
3 ran · 0 no recorded run
jeaneudesAyilo/new-hands-on-2021 community (classifier label)
classifier basis not recorded on the link
2 ran · 0 no recorded run
timroith/adversarialcbo extension (classifier label)
classifier basis: classifier_2025
0 ran · 1 no recorded run
FunctionStatusWhere it lives
attack_stats Ran
ran; our contract draft was wrong, not the code
Hyperparticle/one-pixel-attack-keras/helper.py
code served (permissive licence) · get_code("00387757fde35849")
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 DataFrame. 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 pandas as pd

# Create a small stand-in model class
class SimpleModel:
    def __init__(self, name):
        self.name = name

# Create model instances
model1 = SimpleModel("model_a")
model2 = SimpleModel("model_b")
models = [model1, model2]

# Create network_stats DataFrame with accuracy information
network_stats = pd.DataFrame({
    'name': ['model_a', 'model_b'],
    'accuracy': [0.95, 0.87]
})

# Create attack results DataFrame
attack_data = [
    {'model': 'model_a', 'pixels': 10, 'success': True},
    {'model': 'model_a', 'pixels': 10, 'success': False},
    {'model': 'model_a', 'pixels': 20, 'success': True},
    {'model': 'model_a', 'pixels': 20, 'success': True},
    {'model': 'model_b', 'pixels': 10, 'success': False},
    {'model': 'model_b', 'pixels': 10, 'success': True},
    {'model': 'model_b', 'pixels': 30, 'success': True},
    {'model': 'model_b', 'pixels': 30, 'success': False},
]
df = pd.DataFrame(attack_data)

ARGS = {
    'df': df,
    'models': models,
    'network_stats': network_stats
}
Setup block drafted by
a language model, Claude Haiku 4.5, prompt python_fixture_v1, through the batch API
Imports
numpy, pandas — import names as written, not package names to install; a name the repository itself provides is not a package
Returned
type DataFrame — a DataFrame output has no array shape of its own; none is stated — the instrument coerces any output to an array; for a DataFrame output the recorded ndim 2 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
evaluate_models Ran
ran; our contract draft was wrong, not the code
Hyperparticle/one-pixel-attack-keras/helper.py
code served (permissive licence) · get_code("3c76b056d09eb491")
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

class SimpleModel:
    def __init__(self, name, num_classes=3):
        self.name = name
        self.num_classes = num_classes
        self._params = 42
    
    def predict(self, x_test):
        # Return predictions: one prediction per sample
        # Each prediction is a probability-like array of shape (num_classes,)
        num_samples = len(x_test)
        predictions = np.random.rand(num_samples, self.num_classes)
        # Normalize to look like probabilities
        predictions = predictions / predictions.sum(axis=1, keepdims=True)
        return predictions
    
    def count_params(self):
        return self._params

# Create test data
x_test = np.random.rand(2, 4).astype(np.float32)  # 2 samples, 4 features

# y_test needs to be 2D array where first column contains true labels
# The function accesses y_test[:, 0] and y_test contains labels that match argmax predictions
y_test = np.array([[0], [1]])  # 2 samples, 1 column (labels)

# Create models
model1 = SimpleModel("ModelA", num_classes=3)
model2 = SimpleModel("ModelB", num_classes=3)
models = [model1, model2]

ARGS = {
    "models": models,
    "x_test": x_test,
    "y_test": y_test
}
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 — 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
fig_to_uri Ran
ran; our contract draft was wrong, not the code
jeaneudesAyilo/new-hands-on-2021/app/apps/app_detection.py
code served (permissive licence) · get_code("944ce592f53c3744")
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 str. 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 base64
import io
import matplotlib.pyplot as plt
import numpy as np

# Create a simple figure with some plot data
fig, ax = plt.subplots(figsize=(4, 3))
x = np.linspace(0, 10, 100)
y = np.sin(x)
ax.plot(x, y)
ax.set_title("Test Plot")

ARGS = {
    'in_fig': fig,
    'close_all': True,
}
Setup block drafted by
a language model, Claude Haiku 4.5, prompt python_fixture_v1, through the batch API
Imports
matplotlib, numpy — import names as written, not package names to install; a name the repository itself provides is not a package
Returned
type str — a str output has no array shape of its own; none is stated — the instrument coerces any output to an array; for a str 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
pertub_image Ran
ran; the contract check could not run (RAISES, DEP_MISSING or TIMEOUT)
jeaneudesAyilo/new-hands-on-2021/app/apps/app_recognition.py
code served (permissive licence) · get_code("26b08adf74ae76c9")
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 3, dtype family int, shape (30, 30, 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 numpy as np

# Create a small test image (30x30 RGB image to match the low=30 in randint)
image = np.random.randint(0, 256, size=(30, 30, 3), dtype=np.uint8)

# Number of pixels to perturb
n_pixel = 5

# Random seed for reproducibility
seed = 42

ARGS = {
    'image': image,
    'n_pixel': n_pixel,
    'seed': seed
}
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 3, dtype family int, shape (30, 30, 3) — shape (30, 30, 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
perturb_image Ran
ran; the contract check could not run (RAISES, DEP_MISSING or TIMEOUT)
Hyperparticle/one-pixel-attack-keras/helper.py
code served (permissive licence) · get_code("fe38dc1eccd1f02b")
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 4, dtype family int, shape (2, 4, 3, 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 numpy as np

# Construct arguments for perturb_image function
# The function takes:
# - xs: array of pixel perturbation data
# - img: an image array to perturb

# Create a small base image (4x3 with 3 RGB channels)
base_img = np.random.randint(0, 256, size=(4, 3, 3), dtype=np.uint8)

# Create perturbation data xs
# Each perturbation is a sequence: [x_pos, y_pos, r, g, b]
# So for one full perturbation we need 5 values
# Create 2 perturbations (10 values total)
xs = np.array([
    [0, 0, 255, 128, 64,   1, 1, 100, 150, 200],
    [2, 2, 50, 75, 100,    3, 1, 200, 50, 150]
], dtype=np.float32)

ARGS = {
    "xs": xs,
    "img": base_img
}
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 4, dtype family int, shape (2, 4, 3, 3) — shape (2, 4, 3, 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
load_space Not yet run
unverified (harvested, no recorded run)
timroith/adversarialcbo/advcbx/attackspace/load_attack.py
pointer only (licence: NONE) · get_code("24c02b6f46231b2a")
How it ran

The body of this sample is withheld: GitHub detected no licence in this paper's repository, timroith/adversarialcbo 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. 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-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

Recent research has revealed that the output of Deep Neural Networks (DNN) can be easily altered by adding relatively small perturbations to the input vector. In this paper, we analyze an attack in an extremely limited scenario where only one pixel can be modified. For that we propose a novel method for generating one-pixel adversarial perturbations based on differential evolution (DE). It requires less adversarial information (a black-box attack) and can fool more types of networks due to the inherent features of DE. The results show that 67.97% of the natural images in Kaggle CIFAR-10 test dataset and 16.04% of the ImageNet (ILSVRC 2012) test images can be perturbed to at least one target class by modifying just one pixel with 74.03% and 22.91% confidence on average. We also show the same vulnerability on the original CIFAR-10 dataset. Thus, the proposed attack explores a different take on adversarial machine learning in an extreme limited scenario, showing that current DNNs are also vulnerable to such low dimension attacks. Besides, we also illustrate an important application of DE (or broadly speaking, evolutionary computation) in the domain of adversarial machine learning: creating tools that can effectively generate low-cost adversarial attacks against neural networks for evaluating robustness.

For agents

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

get_harvested_code_for_paper("1710.08864")
get_code_for_paper("1710.08864")
have("1710.08864")

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

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

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

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

Connect an agent — have() is free.