SYNTOLOGY HomeExplorerAtlasCodeMethodologyAboutDevelopersFeedPricing
Paper · 1703.04730 · 2017

Understanding Black-box Predictions via Influence Functions

Percy Liang, Wei Pang, Koh

arXiv · PDF · Open in the Atlas

Code that ran

19 of 28 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, 0 violated it and 12 have no contract verdict; 6 failures of our instrument; 9 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/1703.04730.json · badge: /api/ran/1703.04730.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
kohpangwei/influence-release community (classifier label)
classifier basis not recorded on the link
9 ran · 2 no recorded run
sillwood/voicemos community (classifier label)
classifier basis not recorded on the link
7 ran · 4 no recorded run
darkonhub/darkon community (classifier label)
classifier basis not recorded on the link
1 ran · 2 no recorded run
AnonymizedAuthor663/NNIF_adv_defense extension (classifier label)
classifier basis: classifier_2025
1 ran · 1 no recorded run
alstonlo/torch-influence reimplementation (classifier label)
classifier basis: classifier_2025
1 ran · 0 no recorded run
FunctionStatusWhere it lives
LogSumExp Ran
ran; our contract draft was wrong, not the code
sillwood/voicemos/swag/utils.py
code served (permissive licence) · get_code("8cb1d24a1cf29e11")
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 (1, 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

torch.manual_seed(0)

# Create a small tensor for testing LogSumExp
# The function expects a tensor and a dim parameter
x = torch.randn(2, 4)  # batch_size=2, feature_dim=4

ARGS = {
    "x": x,
    "dim": 0
}
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 (1, 4) — shape (1, 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
collate_fn Ran
ran on a synthesized input
sillwood/voicemos/tabula.py
code served (permissive licence) · get_code("117bcf11311105a1")
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 dict. 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
import numpy as np
from torch.utils import data

torch.manual_seed(0)

# Define a minimal Feature class that has a collate method
class Feature:
    def __init__(self, name):
        self.name = name
    
    def collate(self, values):
        # Stack the values into a tensor
        if isinstance(values[0], torch.Tensor):
            return torch.stack(values)
        else:
            return torch.tensor(values)

# Create sample batch data
# Each item in batch is a dict with keys matching the features dict
batch = [
    {"feature_a": torch.tensor([1.0, 2.0, 3.0, 4.0]), "feature_b": torch.tensor([5.0, 6.0, 7.0, 8.0])},
    {"feature_a": torch.tensor([9.0, 10.0, 11.0, 12.0]), "feature_b": torch.tensor([13.0, 14.0, 15.0, 16.0])}
]

# Create features dict with Feature objects that have collate methods
features = {
    "feature_a": Feature("feature_a"),
    "feature_b": Feature("feature_b")
}

ARGS = {
    "batch": batch,
    "features": features
}
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 dict — a dict output has no array shape of its own; none is stated — the instrument coerces any output to an array; for a dict 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
conv2d Ran
ran on a synthesized input
kohpangwei/influence-release/influence/all_CNN_c.py
code served (permissive licence) · get_code("96c7e834b1c28650")
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 SymbolicTensor. 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 tensorflow as tf
import numpy as np

# Create a small input tensor (batch=2, height=5, width=5, channels=3)
x = tf.constant(np.random.randn(2, 5, 5, 3).astype(np.float32))

# Create a small filter tensor (height=3, width=3, in_channels=3, out_channels=4)
W = tf.constant(np.random.randn(3, 3, 3, 4).astype(np.float32))

# Stride value
r = 1

ARGS = {
    'x': x,
    'W': W,
    'r': r
}
Setup block drafted by
a language model, Claude Haiku 4.5, prompt python_fixture_v1, through the batch API
Imports
numpy, tensorflow — import names as written, not package names to install; a name the repository itself provides is not a package
Returned
type SymbolicTensor — a SymbolicTensor 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
conv2d_bn Ran
ran on a synthesized input
kohpangwei/influence-release/influence/inception_v3.py
code served (permissive licence) · get_code("f9e794caff5e0303")
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 KerasTensor. 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 tensorflow import keras
from keras.layers import Input
from keras import backend as K

# Create a small input tensor (batch_size=2, height=4, width=4, channels=3)
input_tensor = Input(shape=(4, 4, 3))

# Define arguments for conv2d_bn function
ARGS = {
    'x': input_tensor,
    'filters': 32,
    'num_row': 3,
    'num_col': 3,
    'padding': 'same',
    'strides': (1, 1),
    'name': 'test_conv'
}
Setup block drafted by
a language model, Claude Haiku 4.5, prompt python_fixture_v1, through the batch API
Imports
keras, numpy, tensorflow — import names as written, not package names to install; a name the repository itself provides is not a package
Returned
type KerasTensor — a KerasTensor 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
create_logger Ran
ran on a synthesized input
sillwood/voicemos/utils.py
code served (permissive licence) · get_code("a94486d150d21b95")
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 logging
import os
import tempfile
from pathlib import Path

# Create a minimal config object with required attributes
class Config:
    def __init__(self):
        self.OUTPUT_DIR = tempfile.gettempdir()
        self.LOG_DIR = tempfile.gettempdir()
        self.DATASET = DatasetConfig()
        self.MODEL = ModelConfig()

class DatasetConfig:
    def __init__(self):
        self.DATASET = "coco"

class ModelConfig:
    def __init__(self):
        self.NAME = "resnet50"

# Create instances
cfg = Config()
cfg_name = "/path/to/config.yaml"
phase = "train"

ARGS = {
    "cfg": cfg,
    "cfg_name": cfg_name,
    "phase": phase
}
Setup block drafted by
a language model, Claude Haiku 4.5, prompt python_fixture_v1, through the batch API
Imports
none outside the standard library — 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
filter_dataset Ran
ran on a synthesized input
kohpangwei/influence-release/influence/dataset.py
code served (permissive licence) · get_code("b7bb16565ce87f23")
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

torch_seed = 0
np.random.seed(torch_seed)

# Create sample data
# X: shape (5, 4) - 5 samples, 4 features
# Y: shape (5,) - 5 labels with values in {0, 1, 2}
X = np.random.randn(5, 4).astype(np.float32)
Y = np.array([0, 1, 2, 1, 0], dtype=np.int64)

# pos_class and neg_class are the two classes to filter by
pos_class = 1
neg_class = 0

ARGS = {
    "X": X,
    "Y": Y,
    "pos_class": pos_class,
    "neg_class": neg_class,
}
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
find_distances Ran
ran on a synthesized input
kohpangwei/influence-release/influence/dataset.py
code served (permissive licence) · get_code("85ac80e88451f57c")
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 float, 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

# Create a small 2D array X with shape (2, 4) - 2 samples, 4 features
X = np.array([
    [1.0, 2.0, 3.0, 4.0],
    [5.0, 6.0, 7.0, 8.0]
], dtype=np.float32)

# Create a target vector with 4 features
target = np.array([1.5, 2.5, 3.5, 4.5], dtype=np.float32)

# Create a theta vector with 4 features for the weighted distance case
theta = np.array([0.1, 0.2, 0.3, 0.4], dtype=np.float32)

ARGS = {
    'target': target,
    'X': X,
    'theta': theta
}
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 float, 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
fit_model Ran
ran; our contract draft was wrong, not the code
alstonlo/torch-influence/examples/analyze_dogfish.py
code served (permissive licence) · get_code("7795d93831d5b4cc")
How it ran

Ran in Syntology's sandbox on this synthesized input (drafted by a language model, Claude Sonnet 4.5, prompt python_fixture_v1) and returned Sequential. 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 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 small tensors for X and Y
# X should be (num_samples, 2048) based on fc = nn.Linear(2048, 1, bias=True)
# Y should be (num_samples,) for binary classification
num_samples = 2
feature_dim = 2048

X = torch.randn(num_samples, feature_dim)
Y = torch.randint(0, 2, (num_samples,))

ARGS = {
    'X': X,
    'Y': Y
}
Setup block drafted by
a language model, Claude Sonnet 4.5, prompt python_fixture_v1
Imports
numpy, sklearn, torch — import names as written, not package names to install; a name the repository itself provides is not a package
Returned
type Sequential — a Sequential output has no array shape of its own; none is stated — the instrument coerces any output to an array; for a Sequential output the recorded ndim 1 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
flatten Ran
ran, honoured the contract we drafted
sillwood/voicemos/swag/utils.py
pointer only (licence: BSD-3-Clause); the stored copy get_code serves, from ubc-tea/local-superior-soups, is pointer only (licence: NONE) · get_code("cdc64e98aaf2dd54")
How it ran

The body of this sample is withheld: this paper's link allows the body inline (BSD-3-Clause), but get_code serves the stored copy, first harvested from ubc-tea/local-superior-soups, and GitHub detected no licence in that repository 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. A run is recorded.

get_optimizer Ran
ran on a synthesized input
sillwood/voicemos/utils.py
code served (permissive licence) · get_code("91a4342f9b6fca79")
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 SGD. 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
import torch.nn as nn
import torch.optim as optim

torch.manual_seed(0)

# Build a minimal model
class MinimalModel(nn.Module):
    def __init__(self):
        super().__init__()
        self.linear = nn.Linear(4, 3)
    
    def forward(self, x):
        return self.linear(x)

# Build a minimal config object with all required attributes
class Config:
    class Train:
        OPTIMIZER = 'sgd'
        LR = 0.001
        MOMENTUM = 0.9
        WD = 1e-4
        NESTEROV = True
        RMSPROP_ALPHA = 0.99
        RMSPROP_CENTERED = True
    
    TRAIN = Train()

# Create instances
model = MinimalModel()
cfg = Config()

ARGS = {
    'cfg': cfg,
    'model': model,
}
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 SGD — a SGD output has no array shape of its own; none is stated — the instrument coerces any output to an array; for a SGD 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
get_projection_to_box_around_orig_point Ran
ran; our contract draft was wrong, not the code
kohpangwei/influence-release/influence/dataset_poisoning.py
code served (permissive licence) · get_code("68ad19597304e430")
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 function. 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

# Test case 1: with X_orig provided
X_orig = np.random.randn(2, 4).astype(np.float32) * 0.5

ARGS = {
    "X_orig": X_orig,
    "box_radius_in_pixels": 0.5,
}
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 function — a function output has no array shape of its own; none is stated — the instrument coerces any output to an array; for a function 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
guided_grad Ran
ran on a synthesized input
darkonhub/darkon/darkon/gradcam/guided_grad.py
code served (permissive licence) · get_code("49edeb9a747b92b3")
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 EagerTensor, ndim 2, dtype family float, shape (2, 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 tensorflow as tf
import numpy as np

def guided_grad(grad):
    return tf.where(0.0 < grad, grad, tf.zeros_like(grad))

# Create a small tensor with mixed positive and negative values
grad_tensor = tf.constant([
    [1.5, -0.3, 2.1, -1.2],
    [0.8, -0.5, 0.0, 3.2]
], dtype=tf.float32)

ARGS = {
    "grad": grad_tensor
}
Setup block drafted by
a language model, Claude Haiku 4.5, prompt python_fixture_v1, through the batch API
Imports
numpy, tensorflow — import names as written, not package names to install; a name the repository itself provides is not a package
Returned
type EagerTensor, ndim 2, dtype family float, shape (2, 4) — shape (2, 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
hessian_vector_product Ran
ran on a synthesized input
kohpangwei/influence-release/influence/hessians.py
code served (permissive licence) · get_code("694572cd0b96e981")
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 list. 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 tensorflow as tf
import numpy as np

# Set random seed for reproducibility
tf.random.set_seed(0)
np.random.seed(0)

# Create small input tensors
# xs: list of variables we compute Hessian over
x1 = tf.Variable([[1.0, 2.0, 3.0, 4.0],
                  [5.0, 6.0, 7.0, 8.0]], dtype=tf.float32)
x2 = tf.Variable([[9.0, 10.0, 11.0, 12.0]], dtype=tf.float32)
xs = [x1, x2]

# v: vector to multiply Hessian by, same shape as xs
v1 = tf.constant([[0.1, 0.2, 0.3, 0.4],
                  [0.5, 0.6, 0.7, 0.8]], dtype=tf.float32)
v2 = tf.constant([[0.9, 1.0, 1.1, 1.2]], dtype=tf.float32)
v = [v1, v2]

# ys: scalar output
# Create a simple quadratic function: y = sum(x1^2) + sum(x2^2)
with tf.GradientTape() as tape:
    ys = tf.reduce_sum(x1 ** 2) + tf.reduce_sum(x2 ** 2)

ARGS = {
    'ys': ys,
    'xs': xs,
    'v': v,
}
Setup block drafted by
a language model, Claude Haiku 4.5, prompt python_fixture_v1, through the batch API
Imports
numpy, tensorflow — import names as written, not package names to install; a name the repository itself provides is not a package
Returned
type list — a list 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
jacobian Ran
ran on a synthesized input
sillwood/voicemos/swag/posteriors/laplace.py
code served (permissive licence) · get_code("365de65d02067f52")
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 3, dtype family float, shape (3, 3, 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

torch.manual_seed(0)

# Create a simple input tensor that requires gradients
x = torch.randn(3, 4, requires_grad=True)

# Create output by applying a simple function to x
# We'll use a simple operation: y = x^2 summed along one dimension to get a smaller output
y = (x ** 2).sum(dim=1)  # Shape: (3,)

# Verify y requires grad and has a grad_fn for autograd to work
assert y.requires_grad, "y must require gradients for jacobian computation"

ARGS = {
    "y": y,
    "x": x,
    "create_graph": False,
}
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 3, dtype family float, shape (3, 3, 4) — shape (3, 3, 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
load_characteristics Ran
ran; our contract draft was wrong, not the code
AnonymizedAuthor663/NNIF_adv_defense/detect_adv_examples.py
pointer only (licence: NONE) · get_code("2273561bedb78034")
How it ran

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

poison_with_influence_proj_gradient_step Ran
ran; our contract draft was wrong, not the code
kohpangwei/influence-release/influence/dataset_poisoning.py
code served (permissive licence) · get_code("5a433e963babd1cc")
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 (3, 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 numpy as np
import torch
import torch.nn as nn

torch.manual_seed(0)

class Dataset:
    def __init__(self, x, y):
        self.x = x
        self.y = y

class DataSets:
    def __init__(self):
        self.train = Dataset(
            x=np.random.randn(10, 4).astype(np.float32),
            y=np.random.randint(0, 2, 10)
        )

class SimpleModel(nn.Module):
    def __init__(self):
        super().__init__()
        self.linear = nn.Linear(4, 2)
        self.data_sets = DataSets()
    
    def forward(self, x):
        return self.linear(x)

def projection_fn(x):
    """Project values to valid image range [0, 1]"""
    return np.clip(x, 0.0, 1.0)

model = SimpleModel()
indices_to_poison = np.array([0, 2, 5])
grad_influence_wrt_input_val_subset = np.random.randn(3, 4).astype(np.float32)
step_size = 0.01

ARGS = {
    'model': model,
    'indices_to_poison': indices_to_poison,
    'grad_influence_wrt_input_val_subset': grad_influence_wrt_input_val_subset,
    'step_size': step_size,
    'project_fn': projection_fn
}
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 ndarray, ndim 2, dtype family float, shape (3, 4) — shape (3, 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
preprocess_input Ran
ran on a synthesized input
kohpangwei/influence-release/influence/imagenet_utils.py
code served (permissive licence) · get_code("64eb4bea3d3127c4")
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 float, shape (2, 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 numpy as np
import os

os.environ['KERAS_BACKEND'] = 'tensorflow'

# Create a small numpy array with shape (batch=2, channels=3, height=4, width=4)
# This will be modified in-place by the function
x = np.random.rand(2, 3, 4, 4).astype(np.float32)

ARGS = {
    'x': x,
    'dim_ordering': 'tf'
}
Setup block drafted by
a language model, Claude Haiku 4.5, prompt python_fixture_v1, through the batch API
Imports
keras, 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 float, shape (2, 3, 4, 4) — shape (2, 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
process_fn_mean Ran
ran on a synthesized input
sillwood/voicemos/data.py
code served (permissive licence) · get_code("94cda808be1f21b0")
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 list, 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 os
import tempfile

# Create a temporary directory structure for the test
temp_dir = tempfile.mkdtemp()
wav_dir = os.path.join(temp_dir, 'wav')
os.makedirs(wav_dir, exist_ok=True)

# Create a temporary CSV file with test data
csv_path = os.path.join(temp_dir, 'mean_scores.csv')
with open(csv_path, 'w') as f:
    f.write('audio1.wav,4.5\n')
    f.write('audio2.wav,3.2\n')
    f.write('sys2dea8-uttaca68d6.wav,2.1\n')

# Create dummy wav files referenced in the CSV
for wav_name in ['audio1.wav', 'audio2.wav', 'sys2dea8-uttaca68d6.wav']:
    wav_path = os.path.join(wav_dir, wav_name)
    with open(wav_path, 'w') as f:
        f.write('dummy audio content')

ARGS = {
    'list_path': csv_path,
    'ood_path': None,
    'inf_filter': False
}
Setup block drafted by
a language model, Claude Haiku 4.5, prompt python_fixture_v1, through the batch API
Imports
none outside the standard library — import names as written, not package names to install; a name the repository itself provides is not a package
Returned
type list, ndim 1, dtype family float — a list 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
select_examples_to_attack Ran
ran; our contract draft was wrong, not the code
kohpangwei/influence-release/influence/dataset_poisoning.py
code served (permissive licence) · get_code("09fe17271407a870")
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
import torch
import torch.nn as nn

torch.manual_seed(0)

# Create a minimal model (not actually used in the function, but required as parameter)
class DummyModel(nn.Module):
    def __init__(self):
        super().__init__()
        self.linear = nn.Linear(4, 2)
    
    def forward(self, x):
        return self.linear(x)

model = DummyModel()

# Number of examples to poison
num_to_poison = 2

# Gradient influence with respect to input validation data
# Shape: (batch_size, feature_dim)
# Using batch_size=5 and feature_dim=4 to match function usage
grad_influence_wrt_input_val = np.random.randn(5, 4)

# Step size (not used in function body, but required as parameter)
step_size = 0.01

ARGS = {
    "model": model,
    "num_to_poison": num_to_poison,
    "grad_influence_wrt_input_val": grad_influence_wrt_input_val,
    "step_size": step_size
}
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 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
candidate_featuremap_op_names Not yet run
unverified (harvested, no recorded run)
darkonhub/darkon/darkon/gradcam/candidate_ops.py
code served (permissive licence) · get_code("595b26ff4249e79b")
How it ran

no invocation recorded.

candidate_predict_op_names Not yet run
unverified (harvested, no recorded run)
darkonhub/darkon/darkon/gradcam/candidate_ops.py
code served (permissive licence) · get_code("53e33a945dc79c29")
How it ran

no invocation recorded.

find_ranks Not yet run
unverified (harvested, no recorded run)
AnonymizedAuthor663/NNIF_adv_defense/attack.py
pointer only (licence: NONE) · get_code("b562ca4a9ba10631")
How it ran

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

get_confusion_matrix Not yet run
unverified (harvested, no recorded run)
sillwood/voicemos/utils.py
code served (permissive licence) · get_code("4b658dacb22598db")
How it ran

no invocation recorded.

hessian Not yet run
unverified (harvested, no recorded run)
sillwood/voicemos/swag/posteriors/laplace.py
code served (permissive licence) · get_code("6ac3796e940e0642")
How it ran

no invocation recorded.

hessians Not yet run
unverified (harvested, no recorded run)
kohpangwei/influence-release/influence/hessians.py
code served (permissive licence) · get_code("c8388330a135479b")
How it ran

no invocation recorded.

process_fn Not yet run
unverified (harvested, no recorded run)
sillwood/voicemos/data.py
code served (permissive licence) · get_code("ca0d20b6bf151cb8")
How it ran

no invocation recorded.

softplus Not yet run
unverified (harvested, no recorded run)
kohpangwei/influence-release/influence/all_CNN_c.py
code served (permissive licence) · get_code("9005c9773d16f9b9")
How it ran

no invocation recorded.

unflatten_like Not yet run
unverified (harvested, no recorded run)
sillwood/voicemos/swag/utils.py
code served (permissive licence) · get_code("2da33912415648f3")
How it ran

no invocation recorded.

Also present in other papers' code

Of 28 samples lifted from this paper's linked repositories, 28 carry a function identity and 0 do not. Of the 28 distinct functions with an identity, 10 are also present in other papers whose code we hold (2 with at least one paper dated earlier, 0 the same month, 10 later) and 18 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
flatten 5 other papers
5 later
2312.16979 (2023-12)
BlackboxBench: A Comprehensive Benchmark of Black-box Adversarial Attacks
2405.03425 (2024-05)
Gaussian Stochastic Weight Averaging for Bayesian Low-Rank Adaptation of Large Language Models
2410.22113 (2024-10)
Where Do Large Learning Rates Lead Us?
and 2 more not named here
conv2d_bn 2 other papers
1 dated earlier, 1 later
1512.03385 (2015-12)
Deep Residual Learning for Image Recognition
1912.07160 (2019-12)
DAmageNet: A Universal Adversarial Dataset
preprocess_input 2 other papers
1 dated earlier, 1 later
1512.03385 (2015-12)
Deep Residual Learning for Image Recognition
1912.07160 (2019-12)
DAmageNet: A Universal Adversarial Dataset
unflatten_like 2 other papers
2 later
2405.03425 (2024-05)
Gaussian Stochastic Weight Averaging for Bayesian Low-Rank Adaptation of Large Language Models
2410.22113 (2024-10)
Where Do Large Learning Rates Lead Us?
LogSumExp 1 other paper
1 later
2410.22113 (2024-10)
Where Do Large Learning Rates Lead Us?
fit_model 1 other paper
1 later
2209.05364 (2022-09)
If Influence Functions are the Answer, Then What is the Question?
get_confusion_matrix 1 other paper
1 later
2303.11591 (2023-03)
SVCNet: Scribble-based Video Colorization Network with Temporal Aggregation
get_projection_to_box_around_orig_point 1 other paper
1 later
2012.08723 (2020-12)
Exacerbating Algorithmic Bias through Fairness Attacks
poison_with_influence_proj_gradient_step 1 other paper
1 later
2012.08723 (2020-12)
Exacerbating Algorithmic Bias through Fairness Attacks
select_examples_to_attack 1 other paper
1 later
2012.08723 (2020-12)
Exacerbating Algorithmic Bias through Fairness Attacks

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

How can we explain the predictions of a blackbox model? In this paper, we use influence functions -a classic technique from robust statistics -to trace a model's prediction through the learning algorithm and back to its training data, thereby identifying training points most responsible for a given prediction. To scale up influence functions to modern machine learning settings, we develop a simple, efficient implementation that requires only oracle access to gradients and Hessian-vector products. We show that even on non-convex and non-differentiable models where the theory breaks down, approximations to influence functions can still provide valuable information. On linear models and convolutional neural networks, we demonstrate that influence functions are useful for multiple purposes: understanding model behavior, debugging models, detecting dataset errors, and even creating visuallyindistinguishable training-set attacks.

For agents

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

get_harvested_code_for_paper("1703.04730")
get_code_for_paper("1703.04730")
have("1703.04730")

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

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

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

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

Connect an agent — have() is free.