SYNTOLOGY HomeExplorerAtlasCodeMethodologyAboutDevelopersFeedPricing
Paper · 1906.10670 · 2019

Improving performance of deep learning models with axiomatic attribution priors and expected gradients

arXiv · PDF · Open in the Atlas

Code that ran

6 of 9 samples (functions and classes) lifted from this paper's linked repositories executed on a synthesized input in Syntology's jail (0 of them constructed an object rather than computing a result; 0 honoured the contract we drafted, 0 violated it and 6 have no contract verdict; 0 failures of our instrument; 3 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/1906.10670.json · badge: /api/ran/1906.10670.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
suinleelab/attributionpriors canonical (classifier label)
classifier basis: census
6 ran · 3 no recorded run
FunctionStatusWhere it lives
batch_standardize Ran
ran on a synthesized input
suinleelab/attributionpriors/attributionpriors/mnist/mnist_train.py
code served (permissive licence) · get_code("31a127eaf8a6e656")
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 4, dtype family float, shape (2, 4, 3, 3) as a later run recorded it. The image it ran in was not recorded. If your copy returns the same type, ndim and shape on these inputs, it matched what we observed; nothing here checks that. It does NOT mean the output is correct: nothing has compared it to the paper.

import tensorflow as tf
import numpy as np

# Create a small batch of image frames
# batch_standardize expects frames with shape (batch_size, height, width, channels)
# Using distinct dimensions: batch=2, height=4, width=3, channels=3 (RGB)
frames = tf.constant(
    np.random.rand(2, 4, 3, 3).astype(np.float32) * 255,
    dtype=tf.float32
)

ARGS = {
    "frames": frames
}
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 4, dtype family float, shape (2, 4, 3, 3) — shape (2, 4, 3, 3) as a later run recorded it
dtype family
int means an integer dtype; float means any other dtype the instrument saw, bool and complex included (fixture_check.py records only these two families)
Environment
image not recorded; re-verify against syntology-harvest-sandbox:v5-deps; not recorded for this sample: the harness installs a cuda-to-cpu shim (cuda_shim.py) before every sample and no run records whether a sample needed it; seed: none by the harness; any seed is in the setup block
gradients Ran
ran on a synthesized input
suinleelab/attributionpriors/attributionpriors/eager_ops.py
code served (permissive licence) · get_code("46586f62a30e6115")
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; 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 tensorflow as tf
import numpy as np

# Create a simple tf.keras.Model
class SimpleModel(tf.keras.Model):
    def __init__(self):
        super(SimpleModel, self).__init__()
        self.dense = tf.keras.layers.Dense(3)
    
    def call(self, inputs, training=False):
        return self.dense(inputs)

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

# Create model instance
model = SimpleModel()

# Create sample inputs: [batch_size=2, feature_dim=4]
inputs = tf.Variable(
    tf.cast(np.random.randn(2, 4), tf.float32),
    trainable=True
)

# Create one-hot encoded labels: [batch_size=2, num_classes=3]
# Each row is one-hot, indicating which class (0, 1, or 2)
labels = tf.constant([
    [1.0, 0.0, 0.0],  # class 0
    [0.0, 1.0, 0.0]   # class 1
], dtype=tf.float32)

ARGS = {
    "inputs": inputs,
    "labels": labels,
    "model": model,
    "index_true_class": True,
    "multiply_by_input": False
}
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 — no output shape is stated: observe_signature.py could not observe it (import:TypeError)
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
gradients_multi_output Ran
ran on a synthesized input
suinleelab/attributionpriors/attributionpriors/eager_ops.py
code served (permissive licence) · get_code("9446912a5c190049")
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 float, shape (2, 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 tensorflow as tf
import numpy as np

# Create a simple Keras model that outputs multi-class predictions
class SimpleModel(tf.keras.Model):
    def __init__(self, num_classes):
        super(SimpleModel, self).__init__()
        self.dense1 = tf.keras.layers.Dense(8, activation='relu')
        self.dense2 = tf.keras.layers.Dense(num_classes)
    
    def call(self, inputs, training=False):
        x = self.dense1(inputs)
        return self.dense2(x)

# Set up parameters
batch_size = 2
input_dim = 4
num_classes = 3

# Create inputs tensor
inputs = tf.constant(np.random.randn(batch_size, input_dim).astype(np.float32))

# Create model
model = SimpleModel(num_classes=num_classes)

# Define ARGS dictionary with all parameters
ARGS = {
    "inputs": inputs,
    "model": model,
    "num_classes": num_classes,
    "multiply_by_input": False
}
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 float, shape (2, 3, 4) — shape (2, 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
normalize Ran
ran on a synthesized input
suinleelab/attributionpriors/attributionpriors/mnist/mnist_reader.py
code served (permissive licence) · get_code("2e4e482e1e409f98")
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 tensorflow as tf
import numpy as np

# Create a small image tensor with values in [0, 255] range
# Shape: (batch_size=2, height=4, width=3, channels=1)
image = tf.constant([
    [[[100], [150], [200]], [[50], [75], [125]], [[200], [225], [250]], [[10], [20], [30]]],
    [[[255], [200], [150]], [[100], [50], [25]], [[75], [100], [125]], [[150], [175], [200]]]
], dtype=tf.uint8)

# Create a simple label tensor
label = tf.constant([0, 1], dtype=tf.int32)

ARGS = {
    "image": image,
    "label": label
}
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 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
tensorize Ran
ran on a synthesized input
suinleelab/attributionpriors/sparsity/run_sparsity_experiments.py
code served (permissive licence) · get_code("0ec3689ac41b3485")
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 (4, 1) 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 torch
import numpy as np

torch.manual_seed(0)

# The function tensorize takes a numpy array, converts it to a torch tensor,
# and moves it to CUDA. It also reshapes 1D arrays to 2D.
# We need to pass a numpy array as the 'arr' parameter.

# Create a small numpy array - use 1D to test the reshape logic
arr = np.array([1.0, 2.0, 3.0, 4.0], dtype=np.float32)

ARGS = {
    "arr": arr
}
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 2, dtype family float, shape (4, 1) — shape (4, 1) 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
tgini Ran
ran on a synthesized input
suinleelab/attributionpriors/sparsity/run_sparsity_experiments.py
code served (permissive licence) · get_code("1a184cd0975fca1f")
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

torch.manual_seed(0)

# The function tgini takes a single parameter x which should be a tensor
# It reshapes x to compute mean absolute deviations and normalized values
# x needs to be a 1D or multi-dimensional tensor that can be reshaped

x = torch.randn(2, 4)

ARGS = {
    "x": x
}
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
augment Not yet run
unverified (harvested, no recorded run)
suinleelab/attributionpriors/attributionpriors/mnist/mnist_reader.py
code served (permissive licence) · get_code("0c8712ec9b348cd4")
How it ran

no invocation recorded.

expected_gradients Not yet run
unverified (harvested, no recorded run)
suinleelab/attributionpriors/attributionpriors/eager_ops.py
code served (permissive licence) · get_code("00a31b3419bd5411")
How it ran

no invocation recorded.

gather_nd Not yet run
unverified (harvested, no recorded run)
suinleelab/attributionpriors/attributionpriors/pytorch_ops.py
code served (permissive licence) · get_code("1f017ff3e185b740")
How it ran

no invocation recorded.

Also present in other papers' code

Of 9 samples lifted from this paper's linked repositories, 9 carry a function identity and 0 do not. Of the 9 distinct functions with an identity, 1 are also present in other papers whose code we hold (0 with at least one paper dated earlier, 0 the same month, 1 later) and 8 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
gather_nd 1 other paper
1 later
2111.07668 (2021-11)
Fast Axiomatic Attribution for Neural Networks

Presence, not direction: an identical function body in two papers' repositories does not say who wrote it, which came from which, or that either paper's method rests on it. Matching is exact after normalisation, so a renamed or edited function is not matched. Dates are when papers appeared, not when code was written. Only .py files the harvester lifted are covered; notebooks are not read. A new-style arXiv id YYMM.NNNN dates a paper to the month 20YY-MM; otherwise Paper.year dates it to the year; otherwise it is undated. Dates are when the paper appeared, not when the code was written. Read 2026-11-23.

Repositories linked to this paper

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

Abstract

Recent research has demonstrated that feature attribution methods for deep networks can themselves be incorporated into training; these attribution priors optimize for a model whose attributions have certain desirable properties -- most frequently, that particular features are important or unimportant. These attribution priors are often based on attribution methods that are not guaranteed to satisfy desirable interpretability axioms, such as completeness and implementation invariance. Here, we introduce attribution priors to optimize for higher-level properties of explanations, such as smoothness and sparsity, enabled by a fast new attribution method formulation called expected gradients that satisfies many important interpretability axioms. This improves model performance on many real-world tasks where previous attribution priors fail. Our experiments show that the gains from combining higher-level attribution priors with expected gradients attributions are consistent across image, gene expression, and health care data sets. We believe this work motivates and provides the necessary tools to support the widespread adoption of axiomatic attribution priors in many areas of applied machine learning. The implementations and our results have been made freely available to academic communities.

For agents

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

get_harvested_code_for_paper("1906.10670")
get_code_for_paper("1906.10670")
have("1906.10670")

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

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

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

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

Connect an agent — have() is free.