SYNTOLOGY HomeExplorerAtlasCodeMethodologyAboutDevelopersFeedPricing
Paper · 2106.09788 · CVPR · 2021

Guided Integrated Gradients: an Adaptive Path Method for Removing Noise

Besim Avci, Subhashini Venugopalan, Michael Terry, Tolga Bolukbasi, Ben Wedin, Andrei Kapishnikov

arXiv · PDF · Open in the Atlas

Code that ran

3 of 6 samples (functions and classes) lifted from this paper's linked repositories executed on a synthesized input in Syntology's jail (0 of them constructed an object rather than computing a result; 1 honoured the contract we drafted, 1 violated it and 0 have no contract verdict; 1 failure of our instrument; 3 no recorded run), measured 2026-11-22; repository links from the Papers with Code archive attributed under CC BY-SA, no affiliation; bodies inline only under a permissive licence as GitHub detects it. Not a reproduction of the paper's results.

"Ran" means the function executed on a synthesized input and returned a value. It is not a reproduction of the paper's results. This record, dated, as JSON: /api/ran/2106.09788.json · badge: /api/ran/2106.09788.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
PAIR-code/saliency marked official in Papers with Code
Papers with Code archive
3 ran · 3 no recorded run
FunctionStatusWhere it lives
l1_distance Ran
ran, honoured the contract we drafted
PAIR-code/saliency/saliency/core/guided_ig.py
code served (permissive licence) · get_code("4d1b7fc161031727")
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 float64, 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 numpy as np

# Create two simple numpy arrays for testing L1 distance
x1 = np.array([1.0, 2.0, 3.0, 4.0])
x2 = np.array([5.0, 6.0, 7.0, 8.0])

ARGS = {
    "x1": x1,
    "x2": x2,
}
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 float64, 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
translate_alpha_to_x Ran
ran; the contract check could not run (RAISES, DEP_MISSING or TIMEOUT)
PAIR-code/saliency/saliency/core/guided_ig.py
code served (permissive licence) · get_code("eaf84bea21f9586f")
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 (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 torch
import numpy as np

torch.manual_seed(0)

# Construct valid arguments for translate_alpha_to_x
alpha = 0.5
x_input = torch.tensor([[1.0, 2.0, 3.0, 4.0], [5.0, 6.0, 7.0, 8.0]])
x_baseline = torch.tensor([[0.0, 0.0, 0.0, 0.0], [0.0, 0.0, 0.0, 0.0]])

ARGS = {
    "alpha": alpha,
    "x_input": x_input,
    "x_baseline": x_baseline
}
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 (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
translate_x_to_alpha Ran
ran, violated the contract we drafted
PAIR-code/saliency/saliency/core/guided_ig.py
code served (permissive licence) · get_code("76e557aa61df2acc")
How it ran

Ran in Syntology's sandbox on this synthesized input (drafted by a language model, Claude Haiku 4.5, prompt python_fixture_v1, through the batch API) and returned ndarray, ndim 1, dtype family float, shape (4,) as a later run recorded it. The image it ran in was not recorded. If your copy returns the same type, ndim and shape on these inputs, it matched what we observed; nothing here checks that. It does NOT mean the output is correct: nothing has compared it to the paper.

import numpy as np

# Set up test data for translate_x_to_alpha
# The function takes three array-like parameters and computes relative positions along a path

# Create simple numpy arrays for the test
x = np.array([0.0, 0.5, 1.0, 0.25])
x_input = np.array([1.0, 1.0, 1.0, 1.0])
x_baseline = np.array([0.0, 0.0, 0.0, 0.0])

ARGS = {
    "x": x,
    "x_input": x_input,
    "x_baseline": x_baseline,
}
Setup block drafted by
a language model, Claude Haiku 4.5, prompt python_fixture_v1, through the batch API
Imports
numpy — import names as written, not package names to install; a name the repository itself provides is not a package
Returned
type ndarray, ndim 1, dtype family float, shape (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
CoreSaliency Not yet run
unverified (harvested, no recorded run)
PAIR-code/saliency/saliency/core/guided_ig.py
code served (permissive licence) · get_code("4b1324ca21b95058")
How it ran

no invocation recorded.

GuidedIG Not yet run
unverified (harvested, no recorded run)
PAIR-code/saliency/saliency/core/guided_ig.py
code served (permissive licence) · get_code("154475c7296f2723")
How it ran

no invocation recorded.

guided_ig_impl Not yet run
unverified (harvested, no recorded run)
PAIR-code/saliency/saliency/core/guided_ig.py
code served (permissive licence) · get_code("a2d84e2079cb06d9")
How it ran

no invocation recorded.

Also present in other papers' code

Of 6 samples lifted from this paper's linked repositories, 6 carry a function identity and 0 do not. Of the 6 distinct functions with an identity, 3 are also present in other papers whose code we hold (0 with at least one paper dated earlier, 0 the same month, 3 later) and 3 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
l1_distance
brick of this paper's assembly: helper
1 other paper
1 later
2410.04118 (2024-10)
Riemann Sum Optimization for Accurate Integrated Gradients Computation
translate_alpha_to_x
brick of this paper's assembly: helper
1 other paper
1 later
2410.04118 (2024-10)
Riemann Sum Optimization for Accurate Integrated Gradients Computation
translate_x_to_alpha
brick of this paper's assembly: helper
1 other paper
1 later
2410.04118 (2024-10)
Riemann Sum Optimization for Accurate Integrated Gradients Computation

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

Repositories linked to this paper

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

Abstract

Integrated Gradients (IG) [29] is a commonly used feature attribution method for deep neural networks. While IG has many desirable properties, the method often produces spurious/noisy pixel attributions in regions that are not related to the predicted class when applied to visual models. While this has been previously noted [27], most existing solutions [25,17] are aimed at addressing the symptoms by explicitly reducing the noise in the resulting attributions. In this work, we show that one of the causes of the problem is the accumulation of noise along the IG path. To minimize the effect of this source of noise, we propose adapting the attribution path itself -conditioning the path not just on the image but also on the model being explained. We introduce Adaptive Path Methods (APMs) as a generalization of path methods, and Guided IG as a specific instance of an APM. Empirically, Guided IG creates saliency maps better aligned with the model's prediction and the input image that is being explained. We show through qualitative and quantitative experiments that Guided IG outperforms other, related methods in nearly every experiment.

For agents

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

get_harvested_code_for_paper("2106.09788")
get_code_for_paper("2106.09788")
have("2106.09788")

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

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

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

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

Connect an agent — have() is free.