SYNTOLOGY HomeExplorerAtlasCodeMethodologyAboutDevelopersFeedPricing
Paper · 1906.07983 · 2019

Explanations can be manipulated and geometry is to blame

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; 1 honoured the contract we drafted, 1 violated it and 2 have no contract verdict; 0 failures of our instrument; 1 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/1906.07983.json · badge: /api/ran/1906.07983.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
pankessel/explanations_can_be_manipulated canonical (classifier label)
classifier basis: census
2 ran · 1 no recorded run
p16i/explanations_can_be_manipulated extension (classifier label)
classifier basis: classifier_2025
2 ran · 0 no recorded run
FunctionStatusWhere it lives
clamp Ran
ran on a synthesized input
pankessel/explanations_can_be_manipulated/src/nn/utils.py
code served (permissive licence) · get_code("3fc9f581b5e17469")
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 4, dtype family float, shape (1, 3, 4, 4) 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)

# Create a small adversarial example tensor with shape (1, 3, 4, 4)
# The function indexes x[0][i] for i in [0, 1, 2], so it expects at least 3 channels
x = torch.randn(1, 3, 4, 4)

# Create mean and std as numpy arrays
# These are used to compute normalization bounds
mean = np.array([0.485, 0.456, 0.406])
std = np.array([0.229, 0.224, 0.225])

ARGS = {
    "x": x,
    "mean": mean,
    "std": std,
}
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 4, dtype family float, shape (1, 3, 4, 4) — shape (1, 3, 4, 4) 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_beta Ran
ran, violated the contract we drafted
p16i/explanations_can_be_manipulated/src/run_attack.py
code served (permissive licence) · get_code("76bef59a097a239a")
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 float, 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)

# Analyzing the function:
# - get_beta takes two parameters: i (iteration number) and num_iter (total iterations)
# - Both are used in arithmetic operations (division, exponentiation)
# - They should be numeric types (int or float)

ARGS = {
    "i": 5,
    "num_iter": 10
}
Setup block drafted by
a language model, Claude Haiku 4.5, prompt python_fixture_v1
Imports
numpy, torch — import names as written, not package names to install; a name the repository itself provides is not a package
Returned
type float, 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_label_ix_from_nsid Ran
ran, honoured the contract we drafted
p16i/explanations_can_be_manipulated/src/run_attack.py
code served (permissive licence) · get_code("d81efb3e8e25b1c3")
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 int64, 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 pandas as pd
import io

# Create a minimal CSV content that matches the expected format
csv_content = """imagenet-id,label
n02084442,dog
n02084078,cat
n01440764,fish
"""

# Mock the file reading by patching pd.read_csv
original_read_csv = pd.read_csv

def mock_read_csv(filepath, *args, **kwargs):
    if filepath == './imagenet-label-mapping.csv':
        return pd.read_csv(io.StringIO(csv_content))
    return original_read_csv(filepath, *args, **kwargs)

pd.read_csv = mock_read_csv

# Define the argument
ARGS = {
    'nsid': 'n02084442'
}
Setup block drafted by
a language model, Claude Haiku 4.5, prompt python_fixture_v1
Imports
pandas — import names as written, not package names to install; a name the repository itself provides is not a package
Returned
type int64, 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
load_image Ran
ran on a synthesized input
pankessel/explanations_can_be_manipulated/src/nn/utils.py
code served (permissive licence) · get_code("edebbcde61e1bbc1")
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 4, dtype family float, shape (1, 3, 224, 224) 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 torchvision
from PIL import Image
import io

torch.manual_seed(0)

# Create a minimal test image (PIL Image object)
# Create a simple RGB image with 256x256 size to ensure it can be resized to 256 and center-cropped to 224
img_array = torch.randint(0, 256, (256, 256, 3), dtype=torch.uint8).numpy()
test_image = Image.fromarray(img_array, mode='RGB')

# Save to bytes buffer to simulate a file
img_buffer = io.BytesIO()
test_image.save(img_buffer, format='PNG')
img_buffer.seek(0)

# Create a temporary file-like object with a name attribute for Image.open
class FakeImageFile:
    def __init__(self, buffer):
        self.buffer = buffer
        self.name = "fake_image.png"
    
    def read(self):
        return self.buffer.read()
    
    def seek(self, pos):
        return self.buffer.seek(pos)
    
    def __enter__(self):
        return self
    
    def __exit__(self, *args):
        pass

# Prepare arguments
data_mean = [0.485, 0.456, 0.406]  # Standard ImageNet mean
data_std = [0.229, 0.224, 0.225]   # Standard ImageNet std
device = 'cpu'

# For image_name, we need to provide a path-like object
# Since we can't do real file I/O, create a minimal mock that works with Image.open
import tempfile
import os

# Create a temporary PNG file
temp_dir = tempfile.gettempdir()
temp_image_path = os.path.join(temp_dir, "test_load_image.png")
test_image.save(temp_image_path)

ARGS = {
    'data_mean': data_mean,
    'data_std': data_std,
    'device': device,
    'image_name': temp_image_path
}
Setup block drafted by
a language model, Claude Haiku 4.5, prompt python_fixture_v1, through the batch API
Imports
PIL, torch, torchvision — import names as written, not package names to install; a name the repository itself provides is not a package
Returned
type Tensor, ndim 4, dtype family float, shape (1, 3, 224, 224) — shape (1, 3, 224, 224) 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_expl Not yet run
unverified (harvested, no recorded run)
pankessel/explanations_can_be_manipulated/src/nn/utils.py
code served (permissive licence) · get_code("d4cc104cad96dfd0")
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-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

Explanation methods aim to make neural networks more trustworthy and interpretable. In this paper, we demonstrate a property of explanation methods which is disconcerting for both of these purposes. Namely, we show that explanations can be manipulated arbitrarily by applying visually hardly perceptible perturbations to the input that keep the network's output approximately constant. We establish theoretically that this phenomenon can be related to certain geometrical properties of neural networks. This allows us to derive an upper bound on the susceptibility of explanations to manipulations. Based on this result, we propose effective mechanisms to enhance the robustness of explanations.

For agents

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

get_harvested_code_for_paper("1906.07983")
get_code_for_paper("1906.07983")
have("1906.07983")

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

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

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

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

Connect an agent — have() is free.