SYNTOLOGY HomeExplorerAtlasCodeMethodologyAboutDevelopersFeedPricing
Paper · 1703.01365 · ICML · 2017

Axiomatic Attribution for Deep Networks

Mukund Sundararajan, Ankur Taly, Qiqi Yan

arXiv · PDF · Open in the Atlas

Code that ran

36 of 56 samples (functions and classes) lifted from this paper's linked repositories executed on a synthesized input in Syntology's jail (13 of them constructed an object rather than computing a result; 3 honoured the contract we drafted, 1 violated it and 17 have no contract verdict; 15 failures of our instrument; 20 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/1703.01365.json · badge: /api/ran/1703.01365.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
austinbrown34/shap community
Papers with Code archive
6 ran · 2 no recorded run
nsaphra/acd community
Papers with Code archive
4 ran · 1 no recorded run
andresbecker/master_thesis community
Papers with Code archive
3 ran · 1 no recorded run
galdeia/iirsbenchmark community
Papers with Code archive
3 ran · 0 no recorded run
jankrepl/mildlyoverfitted community
not in the paper's declared repositories
3 ran · 0 no recorded run
sicara/tf-explain community
Papers with Code archive
2 ran · 2 no recorded run
jemilc/shap community
Papers with Code archive
2 ran · 1 no recorded run
TooTouch/WhiteBox-Part1 community
Papers with Code archive
2 ran · 1 no recorded run
saivarunr/xshap community
Papers with Code archive
2 ran · 0 no recorded run
koren-v/Interpret community
Papers with Code archive
2 ran · 0 no recorded run
cdpierse/transformers-interpret community
Papers with Code archive
1 ran · 2 no recorded run
marnifora/magisterka community
Papers with Code archive
1 ran · 2 no recorded run
suinleelab/path_explain community
Papers with Code archive
1 ran · 1 no recorded run
TianhongDai/integrated-gradient-pytorch community
Papers with Code archive
1 ran · 1 no recorded run
shyhyawJou/Integrated-Gradient-Tensorflow community
Papers with Code archive
1 ran · 0 no recorded run
uhussai7/boldreams community
not in the paper's declared repositories
1 ran · 0 no recorded run
ankurtaly/Attributions marked official in Papers with Code
Papers with Code archive
1 ran · 0 no recorded run
pamflecista/Magisterka community
Papers with Code archive
0 ran · 2 no recorded run
garygsw/smooth-taylor community
Papers with Code archive
0 ran · 2 no recorded run
shyhyawJou/Integrated-Gradient-Pytorch community
Papers with Code archive
0 ran · 1 no recorded run
fcUalberta/UAlberta-Multimedia-Masters-Program-Interpretable-AI-Part_1_2 community
Papers with Code archive
0 ran · 1 no recorded run
FunctionStatusWhere it lives
Attributions Ran
ran on a synthesized input · constructed an object; no result was computed
cdpierse/transformers-interpret/transformers_interpret/attributions.py
code served (permissive licence) · get_code("ef35ae3770394c9b")
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 an instance of its own class, Attributions: the run constructed the object and did not call it, so no result was computed. 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
from typing import Callable, List, Optional, Tuple, Union

torch.manual_seed(0)

# Define a simple custom forward function
def custom_forward_fn(x):
    return x.sum(dim=-1)

# Define a simple embeddings module
class SimpleEmbeddings(nn.Module):
    def __init__(self, vocab_size=10, embed_dim=4):
        super().__init__()
        self.embed = nn.Embedding(vocab_size, embed_dim)
    
    def forward(self, x):
        return self.embed(x)

embeddings_module = SimpleEmbeddings(vocab_size=10, embed_dim=4)

# Define a list of tokens
tokens_list = ["hello", "world", "test", "python"]

ARGS = {
    "custom_forward": custom_forward_fn,
    "embeddings": embeddings_module,
    "tokens": tokens_list
}
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 Attributions — the run constructed an instance of its own class and did not call it; no shape is stated — the instrument coerces any output to an array; for a Attributions 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
Base_explainer Ran
ran on a synthesized input · constructed an object; no result was computed
galdeia/iirsbenchmark/iirsBenchmark/explainers/IntegratedGradients_explainer.py
code served (permissive licence) · get_code("ecdb335eb9bb79a3")
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 an instance of its own class, Base_explainer: the run constructed the object and did not call it, so no result was computed. 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 sklearn.tree import DecisionTreeRegressor

class SimplePredictor:
    """Minimal predictor class that mimics sklearn regressor interface"""
    def __init__(self):
        self.is_fitted = False
    
    def fit(self, X, y):
        self.is_fitted = True
        return self
    
    def predict(self, X):
        return np.zeros(X.shape[0])

predictor = SimplePredictor()

ARGS = {
    'predictor': predictor,
    'agnostic': [],
    'local_scope': False,
    'global_scope': False,
}
Setup block drafted by
a language model, Claude Haiku 4.5, prompt python_fixture_v1, through the batch API
Imports
numpy, sklearn — import names as written, not package names to install; a name the repository itself provides is not a package
Returned
type Base_explainer — the run constructed an instance of its own class and did not call it; no shape is stated — the instrument coerces any output to an array; for a Base_explainer 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
GradientExplainer Ran
ran on a synthesized input · constructed an object; no result was computed
jemilc/shap/shap/explainers/gradient.py
code served (permissive licence) · get_code("898260b979b40803")
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 an instance of its own class, GradientExplainer: the run constructed the object and did not call it, so no result was computed. 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 numpy as np

torch.manual_seed(0)

# Create a simple PyTorch model
class SimpleModel(nn.Module):
    def __init__(self):
        super(SimpleModel, self).__init__()
        self.linear1 = nn.Linear(4, 8)
        self.linear2 = nn.Linear(8, 3)
    
    def forward(self, x):
        x = torch.relu(self.linear1(x))
        x = self.linear2(x)
        return x

model = SimpleModel()
model.eval()

# Create dummy data with shape (2, 4) - batch_size=2, features=4
data = torch.randn(2, 4)

ARGS = {
    'model': model,
    'data': data,
    'batch_size': 50,
    'local_smoothing': 0
}
Setup block drafted by
a language model, Claude Haiku 4.5, prompt python_fixture_v1, through the batch API
Imports
distutils, keras, numpy, tensorflow, torch — import names as written, not package names to install; a name the repository itself provides is not a package
Returned
type GradientExplainer — the run constructed an instance of its own class and did not call it; no shape is stated — the instrument coerces any output to an array; for a GradientExplainer 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
GradientExplainer Ran
ran on a synthesized input · constructed an object; no result was computed
austinbrown34/shap/shap/explainers/gradient.py
code served (permissive licence) · get_code("e8960b01109d72e4")
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 an instance of its own class, GradientExplainer: the run constructed the object and did not call it, so no result was computed. 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 numpy as np

torch.manual_seed(0)

# Define a simple PyTorch model
class SimpleModel(nn.Module):
    def __init__(self):
        super(SimpleModel, self).__init__()
        self.fc1 = nn.Linear(4, 8)
        self.fc2 = nn.Linear(8, 3)
    
    def forward(self, x):
        x = torch.relu(self.fc1(x))
        x = self.fc2(x)
        return x

# Create model and data
model = SimpleModel()
model.eval()

# Create sample input data - batch size 2, feature dim 4
data = torch.randn(2, 4)

ARGS = {
    'model': model,
    'data': data,
    'batch_size': 50,
    'local_smoothing': 0
}
Setup block drafted by
a language model, Claude Haiku 4.5, prompt python_fixture_v1, through the batch API
Imports
distutils, keras, numpy, tensorflow, torch — import names as written, not package names to install; a name the repository itself provides is not a package
Returned
type GradientExplainer — the run constructed an instance of its own class and did not call it; no shape is stated — the instrument coerces any output to an array; for a GradientExplainer 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
GradientExplainer Ran
ran on a synthesized input
saivarunr/xshap/shap/explainers/gradient.py
code served (permissive licence) · get_code("6cc4d6985789886b")
How it ran

Ran in Syntology's sandbox on this synthesized input (drafted by a language model, class construct-then-call prompt, model not recorded) and returned list, ndim 3, 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 torch
import torch.nn as nn
import numpy as np

# Create a simple model for the explainer
class SimpleModel(nn.Module):
    def __init__(self):
        super().__init__()
        self.fc1 = nn.Linear(4, 6)
        self.fc2 = nn.Linear(6, 3)
    
    def forward(self, x):
        x = torch.relu(self.fc1(x))
        x = self.fc2(x)
        return x

model = SimpleModel()
model.eval()

# Create background data for the explainer
background_data = torch.randn(5, 4)

# Initialize the explainer
INIT_ARGS = {
    'model': model,
    'data': background_data,
    'batch_size': 2,
    'local_smoothing': 0
}

# Create input data to explain
X_to_explain = torch.randn(2, 4)

# Arguments for shap_values method
ARGS = {
    'X': X_to_explain,
    'nsamples': 10,
    'ranked_outputs': None,
    'output_rank_order': 'max'
}

METHOD = 'shap_values'
Setup block drafted by
a language model, class construct-then-call prompt, model not recorded
Imports
distutils, keras, numpy, tensorflow, torch — import names as written, not package names to install; a name the repository itself provides is not a package
Returned
type list, ndim 3, 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: torch and numpy seeded to 0 by the harness immediately before the class was constructed from INIT_ARGS (fixture_check.py)
IntegratedGradient Ran
ran on a synthesized input · constructed an object; no result was computed
koren-v/Interpret/integrated_gradient.py
pointer only (licence: NONE) · get_code("57137c7c74c0ba8b")
How it ran

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

IntegratedGradients Ran
ran on a synthesized input · constructed an object; no result was computed
TooTouch/WhiteBox-Part1/code/saliency/attribution_methods.py
code served (permissive licence) · get_code("67d9ff48d5643c84")
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 an instance of its own class, IntegratedGradients: the run constructed the object and did not call it, so no result was computed. 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 numpy as np
from torch.utils.data import DataLoader, TensorDataset

torch.manual_seed(0)
np.random.seed(0)

# Define a minimal model that satisfies the function's requirements
class SimpleModel(nn.Module):
    def __init__(self):
        super(SimpleModel, self).__init__()
        self.fc = nn.Linear(4 * 4 * 3, 10)  # Flatten (4, 4, 3) to 48, output 10 classes
    
    def forward(self, x):
        # x shape: (batch, 3, 4, 4)
        batch_size = x.size(0)
        x = x.view(batch_size, -1)  # Flatten to (batch, 48)
        x = self.fc(x)  # Output (batch, 10)
        return x

# Create a minimal model instance
model = SimpleModel()

# Create minimal dataset
# Images: (batch_size=2, channels=3, height=4, width=4)
images = torch.randn(4, 3, 4, 4)
targets = torch.randint(0, 10, (4,))

dataset = TensorDataset(images, targets)
dataloader = DataLoader(dataset, batch_size=2, shuffle=False)

ARGS = {
    'model': model,
}
Setup block drafted by
a language model, Claude Haiku 4.5, prompt python_fixture_v1, through the batch API
Imports
h5py, numpy, torch, tqdm — import names as written, not package names to install; a name the repository itself provides is not a package
Returned
type IntegratedGradients — the run constructed an instance of its own class and did not call it; no shape is stated — the instrument coerces any output to an array; for a IntegratedGradients 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
IntegratedGradients_explainer Ran
ran on a synthesized input · constructed an object; no result was computed
galdeia/iirsbenchmark/iirsBenchmark/explainers/IntegratedGradients_explainer.py
code served (permissive licence) · get_code("8e17779e3b980afa")
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 an instance of its own class, IntegratedGradients_explainer: the run constructed the object and did not call it, so no result was computed. 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 sklearn.base import BaseEstimator, RegressorMixin

class SimplePredictor(BaseEstimator, RegressorMixin):
    """Minimal predictor that supports predict method."""
    
    def __init__(self):
        self.coef_ = np.array([0.5, -0.3, 0.2, 0.1])
    
    def predict(self, X):
        """Simple linear prediction."""
        X = np.asarray(X)
        if X.ndim == 1:
            X = X.reshape(1, -1)
        return np.dot(X, self.coef_)
    
    def fit(self, X, y):
        """Dummy fit method."""
        return self

# Create sample data
np.random.seed(0)
X_train = np.random.randn(10, 4).astype(np.float32)
y_train = np.random.randn(10).astype(np.float32)

# Create predictor
predictor = SimplePredictor()
predictor.fit(X_train, y_train)

ARGS = {
    'predictor': predictor,
    'n_steps': 10,
}
Setup block drafted by
a language model, Claude Haiku 4.5, prompt python_fixture_v1, through the batch API
Imports
numpy, scipy, sklearn — import names as written, not package names to install; a name the repository itself provides is not a package
Returned
type IntegratedGradients_explainer — the run constructed an instance of its own class and did not call it; no shape is stated — the instrument coerces any output to an array; for a IntegratedGradients_explainer 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
Integrated_Gradient Ran
ran on a synthesized input
shyhyawJou/Integrated-Gradient-Tensorflow/ig.py
pointer only (licence: GPL-3.0) · get_code("66d0f363e78a65b7")
How it ran

The body of this sample is withheld: GPL-3.0, as GitHub detects it on this paper's repository, shyhyawJou/Integrated-Gradient-Tensorflow, is not in the permissive set Syntology serves inline. 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.

NotApplicableException Ran
ran on a synthesized input · constructed an object; no result was computed
galdeia/iirsbenchmark/iirsBenchmark/explainers/IntegratedGradients_explainer.py
code served (permissive licence) · get_code("06c3310a0f107606")
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 an instance of its own class, NotApplicableException: the run constructed the object and did not call it, so no result was computed. 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

torch.manual_seed(0)

ARGS = {
    'message': 'This is not applicable'
}
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 NotApplicableException — the run constructed an instance of its own class and did not call it; no shape is stated — the instrument coerces any output to an array; for a NotApplicableException 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
PathExplainerTF Ran
ran on a synthesized input · constructed an object; no result was computed
suinleelab/path_explain/path_explain/explainers/path_explainer_tf.py
code served (permissive licence) · get_code("4c4100f237fa3e0c")
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 an instance of its own class, PathExplainerTF: the run constructed the object and did not call it, so no result was computed. 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

class SimpleKerasModel(tf.keras.Model):
    """A minimal Keras model for testing."""
    def __init__(self):
        super(SimpleKerasModel, self).__init__()
        self.dense1 = tf.keras.layers.Dense(8, activation='relu')
        self.dense2 = tf.keras.layers.Dense(3, activation='linear')
    
    def call(self, x, original_input=None):
        x = self.dense1(x)
        x = self.dense2(x)
        return x

# Create a small model
model = SimpleKerasModel()

# Create sample input tensors (batch_size=2, feature_dim=4)
sample_input = tf.constant([[1.0, 2.0, 3.0, 4.0], [5.0, 6.0, 7.0, 8.0]], dtype=tf.float32)
sample_baseline = tf.constant([[0.0, 0.0, 0.0, 0.0], [0.0, 0.0, 0.0, 0.0]], dtype=tf.float32)

# Test that the model can be called
_ = model(sample_input)

ARGS = {
    'model': model,
    'pass_original_input': False
}
Setup block drafted by
a language model, Claude Haiku 4.5, prompt python_fixture_v1, through the batch API
Imports
numpy, tensorflow, tqdm — import names as written, not package names to install; a name the repository itself provides is not a package
Returned
type PathExplainerTF — the run constructed an instance of its own class and did not call it; no shape is stated — the instrument coerces any output to an array; for a PathExplainerTF 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
SaliencyInterpreter Ran
ran on a synthesized input · constructed an object; no result was computed
koren-v/Interpret/integrated_gradient.py
pointer only (licence: NONE) · get_code("7e1b42c1361193d8")
How it ran

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

_PyTorchGradientExplainer Ran
ran on a synthesized input · constructed an object; no result was computed
jemilc/shap/shap/explainers/gradient.py
code served (permissive licence) · get_code("430707dd56b72369")
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 an instance of its own class, _PyTorchGradientExplainer: the run constructed the object and did not call it, so no result was computed. 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 numpy as np

torch.manual_seed(0)
np.random.seed(0)

# Create a simple PyTorch model
class SimpleModel(nn.Module):
    def __init__(self):
        super(SimpleModel, self).__init__()
        self.linear1 = nn.Linear(4, 3)
        self.linear2 = nn.Linear(3, 2)
    
    def forward(self, x):
        x = torch.relu(self.linear1(x))
        x = self.linear2(x)
        return x

model = SimpleModel()

# Create sample data - batch size 2, feature dim 4
data = torch.randn(2, 4)

ARGS = {
    'model': model,
    'data': data,
    'batch_size': 50,
    'local_smoothing': 0
}
Setup block drafted by
a language model, Claude Haiku 4.5, prompt python_fixture_v1, through the batch API
Imports
distutils, numpy, torch — import names as written, not package names to install; a name the repository itself provides is not a package
Returned
type _PyTorchGradientExplainer — the run constructed an instance of its own class and did not call it; no shape is stated — the instrument coerces any output to an array; for a _PyTorchGradientExplainer 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
_PyTorchGradientExplainer Ran
ran on a synthesized input · constructed an object; no result was computed
austinbrown34/shap/shap/explainers/gradient.py
code served (permissive licence) · get_code("7374a66bd3df8287")
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 an instance of its own class, _PyTorchGradientExplainer: the run constructed the object and did not call it, so no result was computed. 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 numpy as np

torch.manual_seed(0)
np.random.seed(0)

# Create a simple PyTorch model
class SimpleModel(nn.Module):
    def __init__(self):
        super(SimpleModel, self).__init__()
        self.linear1 = nn.Linear(4, 8)
        self.linear2 = nn.Linear(8, 3)
    
    def forward(self, x):
        x = torch.relu(self.linear1(x))
        x = self.linear2(x)
        return x

model = SimpleModel()

# Create sample data (batch_size=2, input_dim=4)
data = torch.randn(2, 4, dtype=torch.float32)

ARGS = {
    'model': model,
    'data': data,
    'batch_size': 50,
    'local_smoothing': 0
}
Setup block drafted by
a language model, Claude Haiku 4.5, prompt python_fixture_v1, through the batch API
Imports
distutils, numpy, torch — import names as written, not package names to install; a name the repository itself provides is not a package
Returned
type _PyTorchGradientExplainer — the run constructed an instance of its own class and did not call it; no shape is stated — the instrument coerces any output to an array; for a _PyTorchGradientExplainer 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
_PyTorchGradientExplainer Ran
ran on a synthesized input
saivarunr/xshap/shap/explainers/gradient.py
code served (permissive licence) · get_code("2afe9377139c8f9a")
How it ran

Ran in Syntology's sandbox on this synthesized input (drafted by a language model, class construct-then-call prompt, model not recorded) and returned list, ndim 3, 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 torch
import torch.nn as nn
import numpy as np

# Create a simple model for the explainer
class SimpleModel(nn.Module):
    def __init__(self):
        super().__init__()
        self.fc1 = nn.Linear(4, 6)
        self.fc2 = nn.Linear(6, 3)
    
    def forward(self, x):
        x = torch.relu(self.fc1(x))
        x = self.fc2(x)
        return x

# Instantiate the model
model = SimpleModel()
model.eval()

# Create background data for the explainer
background_data = torch.randn(5, 4)

# INIT_ARGS for _PyTorchGradientExplainer.__init__
INIT_ARGS = {
    'model': model,
    'data': background_data,
    'batch_size': 50,
    'local_smoothing': 0
}

# Create input data for shap_values method
input_data = torch.randn(2, 4)

# ARGS for shap_values method
ARGS = {
    'X': input_data,
    'nsamples': 10,
    'ranked_outputs': None,
    'output_rank_order': 'max'
}

METHOD = 'shap_values'
Setup block drafted by
a language model, class construct-then-call prompt, model not recorded
Imports
distutils, numpy, torch — import names as written, not package names to install; a name the repository itself provides is not a package
Returned
type list, ndim 3, 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: torch and numpy seeded to 0 by the harness immediately before the class was constructed from INIT_ARGS (fixture_check.py)
_TFGradientExplainer Ran
ran on a synthesized input · constructed an object; no result was computed
austinbrown34/shap/shap/explainers/gradient.py
code served (permissive licence) · get_code("5031eabe21a685be")
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 an instance of its own class, _TFGradientExplainer: the run constructed the object and did not call it, so no result was computed. 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 warnings

try:
    import tensorflow as tf
    from tensorflow import keras
    HAS_TF = True
except ImportError:
    HAS_TF = False

if HAS_TF:
    # Create a simple Keras model for testing
    model = keras.Sequential([
        keras.layers.Dense(8, activation='relu', input_shape=(4,)),
        keras.layers.Dense(3)
    ])
    
    # Compile the model
    model.compile(optimizer='adam', loss='mse')
    
    # Create dummy input data
    X_data = np.random.randn(2, 4).astype(np.float32)
    
    # Prepare arguments
    ARGS = {
        'model': model,
        'data': X_data,
        'session': None,
        'batch_size': 50,
        'local_smoothing': 0
    }
else:
    # Fallback if TensorFlow is not available
    class DummyModel:
        def __init__(self):
            self.inputs = [None]
            self.outputs = [None]
            self.layers = []
    
    ARGS = {
        'model': DummyModel(),
        'data': np.random.randn(2, 4).astype(np.float32),
        'session': None,
        'batch_size': 50,
        'local_smoothing': 0
    }
Setup block drafted by
a language model, Claude Haiku 4.5, prompt python_fixture_v1, through the batch API
Imports
distutils, keras, numpy, tensorflow — import names as written, not package names to install; a name the repository itself provides is not a package
Returned
type _TFGradientExplainer — the run constructed an instance of its own class and did not call it; no shape is stated — the instrument coerces any output to an array; for a _TFGradientExplainer 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_model_inputs Ran
ran; our contract draft was wrong, not the code
austinbrown34/shap/shap/explainers/gradient.py
code served (permissive licence) · get_code("35d945c6546483b0")
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

# Create a simple Keras Sequential model
simple_model = tf.keras.Sequential([
    tf.keras.layers.Dense(8, input_shape=(4,)),
    tf.keras.layers.Dense(3)
])

# Build the model by calling it with dummy data
dummy_input = np.random.randn(2, 4).astype(np.float32)
simple_model(dummy_input)

# Test case 1: Keras Sequential model
ARGS = {
    "model": simple_model
}
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
_get_model_output Ran
ran; our contract draft was wrong, not the code
austinbrown34/shap/shap/explainers/gradient.py
code served (permissive licence) · get_code("6b8b878c41b5aa3c")
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 warnings
import tensorflow as tf

# Create a minimal Keras Sequential model
model = tf.keras.Sequential([
    tf.keras.layers.Dense(8, input_shape=(4,)),
    tf.keras.layers.Dense(3)
])

# Build the model by calling it with dummy data
dummy_input = tf.random.normal((2, 4))
_ = model(dummy_input)

ARGS = {
    "model": model
}
Setup block drafted by
a language model, Claude Haiku 4.5, prompt python_fixture_v1, through the batch API
Imports
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
_get_session Ran
ran; our contract draft was wrong, not the code
austinbrown34/shap/shap/explainers/gradient.py
code served (permissive licence) · get_code("f242e8dd0a93f71b")
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 Session. 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

# The function _get_session takes one parameter: session
# Based on the function body, session should be either:
# - None (will try to get default session)
# - A tf.compat.v1.Session object

# Create a minimal TensorFlow session for testing
session = tf.compat.v1.Session()

ARGS = {
    "session": session
}
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 Session — a Session output has no array shape of its own; none is stated — the instrument coerces any output to an array; for a Session 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
calc_pad Ran
ran, honoured the contract we drafted
nsaphra/acd/acd/scores/score_funcs.py
pointer only (licence: NONE) · get_code("54e4782533ba8866")
How it ran

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

calc_size Ran
ran, honoured the contract we drafted
nsaphra/acd/acd/scores/score_funcs.py
pointer only (licence: NONE) · get_code("4100b072ce597ce6")
How it ran

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

calculate_gradients Ran
ran; the contract check could not run (RAISES, DEP_MISSING or TIMEOUT)
marnifora/magisterka/bin/integrated_gradients.py
pointer only (licence: NONE) · get_code("7f1cc66f1073bcfd")
How it ran

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

compute_gradient Ran
ran; our contract draft was wrong, not the code
jankrepl/mildlyoverfitted/mini_tutorials/gradient_wrt_input/explain.py
code served (permissive licence) · get_code("0ed09db5a4a023e1")
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
import torch.nn as nn

torch.manual_seed(0)

# Define a simple classifier network
class SimpleNet(nn.Module):
    def __init__(self):
        super().__init__()
        self.linear = nn.Linear(4, 10)
    
    def forward(self, x):
        return self.linear(x)

# Create the network
net = SimpleNet()

# Create input tensor (batch_size=1, features=4)
inp = torch.randn(1, 4, requires_grad=False)

# Target class label (must be valid index for output dimension)
target = 3

# Define the func to pass to compute_gradient
def func(inp, net=None, target=None):
    """Get logit of a target class."""
    out = net(inp)
    logit = out[0, target]
    return logit

ARGS = {
    'func': func,
    'inp': inp,
    'net': net,
    'target': target
}
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
compute_gradients Ran
ran; the contract check could not run (RAISES, DEP_MISSING or TIMEOUT)
andresbecker/master_thesis/workspace/libs/NN_interpretability.py
code served (permissive licence) · get_code("911004b0e426d584")
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

# Create a small TensorFlow model
class SimpleModel(tf.Module):
    def __init__(self):
        super().__init__()
        self.dense = tf.keras.layers.Dense(3)
    
    def __call__(self, x):
        return self.dense(x)

# Create tiny image tensor (batch_size=2, channels=4)
images = tf.Variable(np.random.randn(2, 4).astype(np.float32))

# Create model instance
model = SimpleModel()

ARGS = {
    "images": images,
    "model": model
}
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
compute_integrated_gradients Ran
ran; our contract draft was wrong, not the code
jankrepl/mildlyoverfitted/mini_tutorials/gradient_wrt_input/explain.py
code served (permissive licence) · get_code("df531c40d05d60e2")
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 tuple, ndim 5, 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 torch
import torch.nn as nn
import numpy as np

torch.manual_seed(0)

# Create a simple classifier network
class SimpleNet(nn.Module):
    def __init__(self, num_classes=10):
        super().__init__()
        self.fc = nn.Linear(12, num_classes)
    
    def forward(self, x):
        # x shape: (1, 3, 2, 2) -> flatten to (1, 12)
        batch_size = x.shape[0]
        x_flat = x.view(batch_size, -1)
        return self.fc(x_flat)

# Create network instance
net = SimpleNet(num_classes=10)

# Create input tensor: (1, 3, 2, 2) - batch size 1, 3 channels, 2x2 spatial
inp = torch.randn(1, 3, 2, 2, requires_grad=False)

# Create baseline tensor: same shape as inp
baseline = torch.zeros(1, 3, 2, 2, requires_grad=False)

# Target class index
target = 3

# Number of steps for integration
n_steps = 5

ARGS = {
    'inp': inp,
    'baseline': baseline,
    'net': net,
    'target': target,
    'n_steps': n_steps
}
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 tuple, ndim 5, 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
conv2dnp Ran
ran; the contract check could not run (RAISES, DEP_MISSING or TIMEOUT)
nsaphra/acd/acd/scores/score_funcs.py
pointer only (licence: NONE) · get_code("eb27e71fedd48267")
How it ran

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

extract_sliding_windows Ran
ran; the contract check could not run (RAISES, DEP_MISSING or TIMEOUT)
nsaphra/acd/acd/scores/score_funcs.py
pointer only (licence: NONE) · get_code("e9b75455324ec1d2")
How it ran

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

func Ran
ran; our contract draft was wrong, not the code
jankrepl/mildlyoverfitted/mini_tutorials/gradient_wrt_input/explain.py
code served (permissive licence) · get_code("671a764793394b27")
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)

# Create a simple classifier network
class SimpleClassifier(nn.Module):
    def __init__(self, num_classes=10):
        super().__init__()
        self.fc = nn.Linear(4, num_classes)
    
    def forward(self, x):
        return self.fc(x)

# Build the arguments
inp = torch.randn(1, 4)  # Single image batch, 4 dimensions
net = SimpleClassifier(num_classes=5)  # Classifier with 5 output classes
target = 2  # Ground truth label id

ARGS = {
    "inp": inp,
    "net": net,
    "target": target
}
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_integral_approximation Ran
ran, honoured the contract we drafted
andresbecker/master_thesis/workspace/libs/NN_interpretability.py
code served (permissive licence) · get_code("76f2f497c06af59e")
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 1, dtype family float, shape (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

# Create a simple gradient array with shape (3, 4)
# The function expects gradients to be indexable and support arithmetic operations
# It accesses gradients[:-1] and gradients[1:], so we need at least 2 elements
# Then it reduces along axis 0, so we need a 2D tensor

# Create gradients as a TensorFlow tensor with shape (3, 4)
# This represents 3 gradient samples of dimension 4
gradients = tf.constant([
    [1.0, 2.0, 3.0, 4.0],
    [5.0, 6.0, 7.0, 8.0],
    [9.0, 10.0, 11.0, 12.0]
], dtype=tf.float32)

ARGS = {
    "gradients": gradients
}
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 1, dtype family float, shape (4,) — shape (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
grid_display Ran
ran; the contract check could not run (RAISES, DEP_MISSING or TIMEOUT)
sicara/tf-explain/tf_explain/core/integrated_gradients.py
code served (permissive licence) · get_code("2fd99b461cb809d0")
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 (8, 10, 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
import math

# Create a small batch of images as a 4D numpy array
# Shape: (batch_size, height, width, channels)
# Using distinct sizes: batch=3, height=4, width=5, channels=3
batch_size = 3
height = 4
width = 5
channels = 3

# Create sample image array with random values in [0, 255] range as uint8
array = np.random.randint(0, 256, size=(batch_size, height, width, channels), dtype=np.uint8)

ARGS = {
    "array": array,
    "num_rows": None,
    "num_columns": None,
}
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 (8, 10, 3) — shape (8, 10, 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
integrated_gradient Ran
ran on a synthesized input
uhussai7/boldreams/models/modules.py
pointer only (licence: NONE) · get_code("41eeb813009c9224")
How it ran

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

integrated_gradients Ran
ran; our contract draft was wrong, not the code
ankurtaly/Attributions/IntegratedGradients/integrated_gradients.py
pointer only (licence: NONE) · get_code("f36f0780dc332c6d")
How it ran

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

interpolate_images Ran
ran, violated the contract we drafted
andresbecker/master_thesis/workspace/libs/NN_interpretability.py
code served (permissive licence) · get_code("de4b53a5e89b25d2")
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 EagerTensor, ndim 4, dtype family float, shape (3, 4, 3, 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 tensorflow as tf
import numpy as np

# Create small test tensors
# baseline: shape (height, width, channels) - a single image
baseline = tf.constant(np.random.randn(4, 3, 2).astype(np.float32))

# image: shape (height, width, channels) - a single image with same spatial dims as baseline
image = tf.constant(np.random.randn(4, 3, 2).astype(np.float32))

# alphas: shape (batch_size,) - interpolation coefficients
alphas = tf.constant(np.array([0.0, 0.5, 1.0]).astype(np.float32))

ARGS = {
    "baseline": baseline,
    "image": image,
    "alphas": alphas,
}
Setup block drafted by
a language model, Claude Haiku 4.5, prompt python_fixture_v1
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 4, dtype family float, shape (3, 4, 3, 2) — shape (3, 4, 3, 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
pre_processing Ran
ran; the contract check could not run (RAISES, DEP_MISSING or TIMEOUT)
TianhongDai/integrated-gradient-pytorch/integrated_gradients.py
code served (permissive licence) · get_code("f4fdca61674e575a")
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, 8, 8) as a later run recorded it. 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, 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

torch.manual_seed(0)

# Create a small dummy observation image
# Shape: (height=8, width=8, channels=3) with values in [0, 255] range
obs = np.random.randint(0, 256, size=(8, 8, 3), dtype=np.uint8).astype(np.float32)

# cuda parameter
cuda = False

ARGS = {
    "obs": obs,
    "cuda": cuda,
}
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, 8, 8) — shape (1, 3, 8, 8) 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
rescale_image Ran
ran; the contract check could not run (RAISES, DEP_MISSING or TIMEOUT)
TooTouch/WhiteBox-Part1/code/saliency/attribution_methods.py
code served (permissive licence) · get_code("e44a9afe5dc5a201")
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, 4, 5, 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 test images with shape (batch_size, C, H, W) for channel=True case
np.random.seed(0)
batch_size = 2
channels = 3
height = 4
width = 5

# Create images with values in a reasonable range for testing
images_with_channel = np.random.rand(batch_size, channels, height, width) * 100

# Create test images with shape (batch_size, H, W) for channel=False case
images_without_channel = np.random.rand(batch_size, height, width) * 100

ARGS = {
    "images": images_with_channel,
    "channel": True,
}
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 float, shape (2, 4, 5, 3) — shape (2, 4, 5, 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
transform_to_normalized_grayscale Ran
ran; the contract check could not run (RAISES, DEP_MISSING or TIMEOUT)
sicara/tf-explain/tf_explain/core/integrated_gradients.py
code served (permissive licence) · get_code("bba688b42ae9d0fc")
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 3, dtype family int, shape (2, 4, 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 tensorflow as tf
import numpy as np

# Create a small 4D tensor with shape (batch_size, H, W, 3) for RGB images
# batch_size=2, H=4, W=3, channels=3
tensor = tf.constant(
    np.random.randint(0, 256, size=(2, 4, 3, 3), dtype=np.uint8),
    dtype=tf.float32
)

ARGS = {
    "tensor": 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 3, dtype family int, shape (2, 4, 3) — shape (2, 4, 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
AttributionsNotCalculatedError Not yet run
unverified (harvested, no recorded run)
cdpierse/transformers-interpret/transformers_interpret/attributions.py
code served (permissive licence) · get_code("8900360e60786d71")
How it ran

no invocation recorded.

Explainer Not yet run
unverified (harvested, no recorded run)
suinleelab/path_explain/path_explain/explainers/path_explainer_tf.py
code served (permissive licence) · get_code("543fdd3d86e7ad28")
How it ran

no invocation recorded.

IntegratedGradients Not yet run
unverified (harvested, no recorded run)
sicara/tf-explain/tf_explain/core/integrated_gradients.py
code served (permissive licence) · get_code("3785a3b3dee4de2b")
How it ran

no invocation recorded.

Integrated_Gradient Not yet run
unverified (harvested, no recorded run)
shyhyawJou/Integrated-Gradient-Pytorch/ig.py
pointer only (licence: GPL-3.0) · get_code("f266368a15af5029")
How it ran

The body of this sample is withheld: GPL-3.0, as GitHub detects it on this paper's repository, shyhyawJou/Integrated-Gradient-Pytorch, is not in the permissive set Syntology serves inline. 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.

LIGAttributions Not yet run
unverified (harvested, no recorded run)
cdpierse/transformers-interpret/transformers_interpret/attributions.py
code served (permissive licence) · get_code("ebfc7e44821a7446")
How it ran

no invocation recorded.

OHEncoder Not yet run
unverified (harvested, no recorded run)
marnifora/magisterka/bin/integrated_gradients.py
pointer only (licence: NONE) · get_code("4ddae2915b9cc97f")
How it ran

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

OHEncoder Not yet run
unverified (harvested, no recorded run)
pamflecista/Magisterka/bin/integrated_gradients.py
pointer only (licence: NONE) · get_code("c58da49866be23b4")
How it ran

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

_TFGradientExplainer Not yet run
unverified (harvested, no recorded run)
jemilc/shap/shap/explainers/gradient.py
code served (permissive licence) · get_code("9326aa10a22b3257")
How it ran

no invocation recorded.

_get_graph Not yet run
unverified (harvested, no recorded run)
austinbrown34/shap/shap/explainers/gradient.py
code served (permissive licence) · get_code("c9c180d15ae62447")
How it ran

no invocation recorded.

_import_tf Not yet run
unverified (harvested, no recorded run)
austinbrown34/shap/shap/explainers/gradient.py
code served (permissive licence) · get_code("8fc8b96ad1c4dff5")
How it ran

no invocation recorded.

get_gradients Not yet run
unverified (harvested, no recorded run)
garygsw/smooth-taylor/attribution/analyzer.py
code served (permissive licence) · get_code("942fe31074420d3b")
How it ran

no invocation recorded.

get_integrated_gradients Not yet run
unverified (harvested, no recorded run)
andresbecker/master_thesis/workspace/libs/NN_interpretability.py
code served (permissive licence) · get_code("745ae6a587a2034e")
How it ran

no invocation recorded.

ig_scores_2d Not yet run
unverified (harvested, no recorded run)
nsaphra/acd/acd/scores/score_funcs.py
pointer only (licence: NONE) · get_code("d615bfc8c34fd228")
How it ran

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

integrated_gradients Not yet run
unverified (harvested, no recorded run)
marnifora/magisterka/bin/integrated_gradients.py
pointer only (licence: NONE) · get_code("6f457ae7012a204f")
How it ran

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

integrated_gradients Not yet run
unverified (harvested, no recorded run)
fcUalberta/UAlberta-Multimedia-Masters-Program-Interpretable-AI-Part_1_2/code/IntegratedGradients.py
pointer only (licence: AGPL-3.0) · get_code("b1ea75b6852183e8")
How it ran

The body of this sample is withheld: AGPL-3.0, as GitHub detects it on this paper's repository, fcUalberta/UAlberta-Multimedia-Masters-Program-Interpretable-AI-Part_1_2, is not in the permissive set Syntology serves inline. 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.

integrated_gradients Not yet run
unverified (harvested, no recorded run)
TianhongDai/integrated-gradient-pytorch/integrated_gradients.py
code served (permissive licence) · get_code("04f60f57d1b6028e")
How it ran

no invocation recorded.

integrated_gradients Not yet run
unverified (harvested, no recorded run)
garygsw/smooth-taylor/attribution/analyzer.py
code served (permissive licence) · get_code("825842184e64aa86")
How it ran

no invocation recorded.

integrated_gradients Not yet run
unverified (harvested, no recorded run)
pamflecista/Magisterka/bin/integrated_gradients.py
pointer only (licence: NONE) · get_code("c69ac1fe40cb16f0")
How it ran

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

save_grayscale Not yet run
unverified (harvested, no recorded run)
sicara/tf-explain/tf_explain/core/integrated_gradients.py
code served (permissive licence) · get_code("73fe690c71ad066c")
How it ran

no invocation recorded.

save_saliency_map Not yet run
unverified (harvested, no recorded run)
TooTouch/WhiteBox-Part1/code/saliency/attribution_methods.py
code served (permissive licence) · get_code("c91220cf9e079883")
How it ran

no invocation recorded.

Also present in other papers' code

Of 56 samples lifted from this paper's linked repositories, 56 carry a function identity and 0 do not. Of the 55 distinct functions with an identity, 5 are also present in other papers whose code we hold (3 with at least one paper dated earlier, 0 the same month, 3 later) and 50 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
grid_display
brick of this paper's assembly: helper
2 other papers
1 dated earlier, 1 later · 1 only as an assembly brick
1610.02391 (2016-10)
Grad-CAM: Visual Explanations from Deep Networks via Gradient-based Localization
1910.01279 (2019-10)
Score-CAM: Score-Weighted Visual Explanations for Convolutional Neural Networks
rescale_image
brick of this paper's assembly: helper
2 other papers
2 dated earlier · 2 only as an assembly brick
1311.2901 (2013-11)
Visualizing and Understanding Convolutional Networks
1610.02391 (2016-10)
Grad-CAM: Visual Explanations from Deep Networks via Gradient-based Localization
save_saliency_map
brick of this paper's assembly: helper
2 other papers
2 dated earlier · 2 only as an assembly brick
1311.2901 (2013-11)
Visualizing and Understanding Convolutional Networks
1610.02391 (2016-10)
Grad-CAM: Visual Explanations from Deep Networks via Gradient-based Localization
calc_pad
brick of this paper's assembly: helper
1 other paper
1 later
1901.04592 (2019-01)
Interpretable machine learning: definitions, methods, and applications
calc_size
brick of this paper's assembly: helper
1 other paper
1 later
1901.04592 (2019-01)
Interpretable machine learning: definitions, methods, and applications

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

More are linked than shown here.

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

Abstract

We study the problem of attributing the prediction of a deep network to its input features, a problem previously studied by several other works. We identify two fundamental axioms-Sensitivity and Implementation Invariance that attribution methods ought to satisfy. We show that they are not satisfied by most known attribution methods, which we consider to be a fundamental weakness of those methods. We use the axioms to guide the design of a new attribution method called Integrated Gradients. Our method requires no modification to the original network and is extremely simple to implement; it just needs a few calls to the standard gradient operator. We apply this method to a couple of image models, a couple of text models and a chemistry model, demonstrating its ability to debug networks, to extract rules from a network, and to enable users to engage with models better.

For agents

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

get_harvested_code_for_paper("1703.01365")
get_code_for_paper("1703.01365")
have("1703.01365")

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

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

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

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

Connect an agent — have() is free.