SYNTOLOGY HomeExplorerAtlasCodeMethodologyAboutDevelopersFeedPricing
Paper · 2010.12697 · ICML · 2020

Investigating Saturation Effects in Integrated Gradients

Bilal Alsallakh, Vivek Miglani, Narine Kokhlikyan, Miguel Martin, Orion Reblitz-Richardson

arXiv · PDF · Open in the Atlas

Code that ran

5 of 7 samples (functions and classes) lifted from this paper's linked repositories executed on a synthesized input in Syntology's jail (0 of them constructed an object rather than computing a result; 1 honoured the contract we drafted, 1 violated it and 2 have no contract verdict; 1 failure of our instrument; 2 no recorded run), measured 2026-11-22; 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/2010.12697.json · badge: /api/ran/2010.12697.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
vivekmig/captum-1 canonical (classifier label)
classifier basis: census
5 ran · 2 no recorded run
FunctionStatusWhere it lives
apply_gradient_requirements Ran
ran, violated the contract we drafted
vivekmig/captum-1/captum/_utils/gradient.py
code served (permissive licence) · get_code("1c9996168dbf7206")
How it ran

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

import torch
import warnings

torch.manual_seed(0)

# Create a tuple of tensors with different properties
tensor1 = torch.randn(2, 4, requires_grad=False)
tensor2 = torch.randn(2, 4, dtype=torch.float32, requires_grad=True)
tensor3 = torch.randn(2, 4, dtype=torch.float64, requires_grad=False)

inputs_tuple = (tensor1, tensor2, tensor3)

ARGS = {
    "inputs": inputs_tuple,
    "warn": True
}
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 list, ndim 1, dtype family float — a list output has no array shape of its own; none is stated
dtype family
int means an integer dtype; float means any other dtype the instrument saw, bool and complex included (fixture_check.py records only these two families)
Environment
image not recorded; re-verify against syntology-harvest-sandbox:v5-deps; not recorded for this sample: the harness installs a cuda-to-cpu shim (cuda_shim.py) before every sample and no run records whether a sample needed it; seed: none by the harness; any seed is in the setup block
compute_gradients Ran
ran on a synthesized input
vivekmig/captum-1/captum/_utils/gradient.py
code served (permissive licence) · get_code("acf80a93a1ed2373")
How it ran

Ran in Syntology's sandbox on this synthesized input (drafted by a language model, Claude Haiku 4.5, prompt python_fixture_v1, through the batch API) and returned tuple, ndim 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

torch.manual_seed(0)

# Create a simple forward function that returns a scalar tensor
def simple_forward_fn(x):
    return x.sum(dim=1, keepdim=True)

# Create inputs - a tensor with batch size 2, feature dim 4
inputs = torch.randn(2, 4, requires_grad=True)

# target_ind is optional and used for classification - we don't need it for this simple case
target_ind = None

# additional_forward_args is optional
additional_forward_args = None

ARGS = {
    'forward_fn': simple_forward_fn,
    'inputs': inputs,
    'target_ind': target_ind,
    'additional_forward_args': additional_forward_args
}
Setup block drafted by
a language model, Claude Haiku 4.5, prompt python_fixture_v1, through the batch API
Imports
captum, torch — import names as written, not package names to install; a name the repository itself provides is not a package
Returned
type tuple, ndim 3, 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
parse_version Ran
ran, honoured the contract we drafted
vivekmig/captum-1/captum/_utils/common.py
code served (permissive licence) · get_code("1005dc43fc693d28")
How it ran

Ran in Syntology's sandbox on this synthesized input (drafted by a language model, Claude Haiku 4.5, prompt python_fixture_v1, through the batch API) and returned tuple, ndim 1, dtype family int; 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 numpy as np

# Analyze the function parse_version:
# - Takes a parameter 'v' which is a string
# - The function splits by '.', filters for digit-only parts, and converts to integers
# - Returns a tuple of integers
# - No complex objects needed, just a string

ARGS = {
    "v": "1.2.3"
}
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 tuple, ndim 1, dtype family int — 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
progress Ran
ran on a synthesized input
vivekmig/captum-1/captum/_utils/progress.py
code served (permissive licence) · get_code("be5ae855abd4ca8d")
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 tqdm_asyncio. 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 sys
from io import StringIO
from tqdm.auto import tqdm

torch.manual_seed(0)

# Create a simple iterable
iterable = [1, 2, 3, 4, 5]

# Create a string buffer for file output
file_buffer = StringIO()

# Define ARGS with all parameters
ARGS = {
    'iterable': iterable,
    'desc': 'Processing',
    'total': 5,
    'file': file_buffer,
    'mininterval': 0.5,
}
Setup block drafted by
a language model, Claude Haiku 4.5, prompt python_fixture_v1, through the batch API
Imports
torch, tqdm — import names as written, not package names to install; a name the repository itself provides is not a package
Returned
type tqdm_asyncio — a tqdm_asyncio output has no array shape of its own; none is stated — the instrument coerces any output to an array; for a tqdm_asyncio 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
safe_div Ran
ran; our contract draft was wrong, not the code
vivekmig/captum-1/captum/_utils/common.py
code served (permissive licence) · get_code("4ab3e82f6c1ff9ce")
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

torch.manual_seed(0)

# Case 1: numerator and denom as tensors with matching shapes
numerator = torch.tensor([[1.0, 2.0, 3.0, 4.0], [5.0, 6.0, 7.0, 8.0]])
denom = torch.tensor([[2.0, 2.0, 2.0, 2.0], [2.0, 2.0, 2.0, 2.0]])
default_denom = 1.0

ARGS = {
    "numerator": numerator,
    "denom": denom,
    "default_denom": default_denom,
}
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 (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_layer_gradients_and_eval Not yet run
unverified (harvested, no recorded run)
vivekmig/captum-1/captum/_utils/gradient.py
code served (permissive licence) · get_code("d2b8f4b6c2ce5bee")
How it ran

no invocation recorded.

supports_caching Not yet run
unverified (harvested, no recorded run)
vivekmig/captum-1/captum/_utils/transformers_typing.py
code served (permissive licence) · get_code("f0491877fb0fa634")
How it ran

no invocation recorded.

Also present in other papers' code

Of 7 samples lifted from this paper's linked repositories, 7 carry a function identity and 0 do not. Of the 7 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 4 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
apply_gradient_requirements 2 other papers
2 later
2304.11327 (2023-04)
Understanding and Improving Feature Learning for Out-of-Distribution Generalization
2410.12409 (2024-10)
Revealing the Barriers of Language Agents in Planning
parse_version 2 other papers
2 later
2304.11327 (2023-04)
Understanding and Improving Feature Learning for Out-of-Distribution Generalization
2410.12409 (2024-10)
Revealing the Barriers of Language Agents in Planning
safe_div 2 other papers
2 later
2304.11327 (2023-04)
Understanding and Improving Feature Learning for Out-of-Distribution Generalization
2410.12409 (2024-10)
Revealing the Barriers of Language Agents in Planning

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 has become a popular method for post-hoc model interpretability. Despite its popularity, the composition and relative impact of different regions of the integral path are not well understood. We explore these effects and find that gradients in saturated regions of this path, where model output changes minimally, contribute disproportionately to the computed attribution. We propose a variant of Integrated Gradients which primarily captures gradients in unsaturated regions and evaluate this method on ImageNet classification networks. We find that this attribution technique shows higher model faithfulness and lower sensitivity to noise compared with standard Integrated Gradients. A notebook illustrating our computations and results is available at https://github.com/vivekmig/captum-1/tree/ExpandedIG.

For agents

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

get_harvested_code_for_paper("2010.12697")
get_code_for_paper("2010.12697")
have("2010.12697")

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

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

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

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

Connect an agent — have() is free.