SYNTOLOGY HomeExplorerAtlasCodeMethodologyAboutDevelopersFeedPricing
Paper · 2605.19607 · 2026

Spectral Integrated Gradients for Coarse-to-Fine Feature Attribution

Kyowoon Lee, Jaesik Choi, Soyeon Kim, Seongwoo Lim

arXiv · PDF · Open in the Atlas

Code that ran

5 of 9 samples (functions and classes) lifted from this paper's linked repositories executed on a synthesized input in Syntology's jail (3 of them constructed an object rather than computing a result; 0 honoured the contract we drafted, 0 violated it and 3 have no contract verdict; 2 failures of our instrument; 4 no recorded run), measured 2026-11-23; 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/2605.19607.json · badge: /api/ran/2605.19607.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
leekwoon/sig community
Papers with Code archive
5 ran · 4 no recorded run
FunctionStatusWhere it lives
IGExplainer Ran
ran on a synthesized input · constructed an object; no result was computed
leekwoon/sig/cleanig/explainer/spectral_ig.py
code served (permissive licence) · get_code("7c074564329ebada")
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, IGExplainer: the run constructed the object and did not call it, so no result was computed. The image it ran in was not recorded. The code mentions cuda, and the harness aliases cuda to the CPU for every sample; whether this run needed that is not recorded. If your copy returns the same type on these inputs, it matched what we observed; nothing here checks that. It does NOT mean the output is correct: nothing has compared it to the paper.

import torch
import torch.nn as nn

torch.manual_seed(0)

# Define a simple classification model
class SimpleClassifier(nn.Module):
    def __init__(self, in_channels=3, num_classes=10):
        super().__init__()
        self.conv1 = nn.Conv2d(in_channels, 8, kernel_size=3, padding=1)
        self.pool = nn.AdaptiveAvgPool2d((1, 1))
        self.fc = nn.Linear(8, num_classes)
    
    def forward(self, x):
        x = self.conv1(x)
        x = torch.relu(x)
        x = self.pool(x)
        x = x.view(x.size(0), -1)
        x = self.fc(x)
        return x

# Create model instance
model = SimpleClassifier(in_channels=3, num_classes=10)

# Define a simple preprocessing function
def preprocess_fn(x):
    return x / 255.0 if x.max() > 1.0 else x

# Define arguments for IGExplainer
ARGS = {
    'model': model,
    'baseline_method': 'blur',
    'num_steps': 5,
    'device': 'cpu',
    'exp_obj': 'prob',
    'preprocess_fn': preprocess_fn
}
Setup block drafted by
a language model, Claude Haiku 4.5, prompt python_fixture_v1, through the batch API
Imports
torch, torchvision — import names as written, not package names to install; a name the repository itself provides is not a package
Returned
type IGExplainer — 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 IGExplainer 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
LinearPathGenerator Ran
ran on a synthesized input · constructed an object; no result was computed
leekwoon/sig/cleanig/explainer/spectral_ig.py
code served (permissive licence) · get_code("cddd9d6c795ccdcb")
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, LinearPathGenerator: the run constructed the object and did not call it, so no result was computed. The image it ran in was not recorded. The code mentions cuda, and the harness aliases cuda to the CPU for every sample; whether this run needed that is not recorded. If your copy returns the same type on these inputs, it matched what we observed; nothing here checks that. It does NOT mean the output is correct: nothing has compared it to the paper.

import torch
import torch.nn as nn

torch.manual_seed(0)

# Define a simple preprocess function
def simple_preprocess(x):
    return x * 0.5

# Define baseline_method
baseline_method = 'blur'

# Define preprocess_fn
preprocess_fn = simple_preprocess

# Use CPU device
device = 'cpu'

# Define num_steps
num_steps = 3

ARGS = {
    'baseline_method': baseline_method,
    'preprocess_fn': preprocess_fn,
    'device': device,
    'num_steps': num_steps,
}
Setup block drafted by
a language model, Claude Haiku 4.5, prompt python_fixture_v1, through the batch API
Imports
torch, torchvision — import names as written, not package names to install; a name the repository itself provides is not a package
Returned
type LinearPathGenerator — 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 LinearPathGenerator 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
SpectralPathGenerator Ran
ran on a synthesized input · constructed an object; no result was computed
leekwoon/sig/cleanig/explainer/spectral_ig.py
code served (permissive licence) · get_code("98d89d7e4ef309e2")
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, SpectralPathGenerator: the run constructed the object and did not call it, so no result was computed. The image it ran in was not recorded. The code mentions cuda, and the harness aliases cuda to the CPU for every sample; whether this run needed that is not recorded. If your copy returns the same type on these inputs, it matched what we observed; nothing here checks that. It does NOT mean the output is correct: nothing has compared it to the paper.

import torch
import torch.nn as nn

torch.manual_seed(0)

def dummy_preprocess_fn(x):
    return x * 0.5

ARGS = {
    'baseline_method': 'zero',
    'preprocess_fn': dummy_preprocess_fn,
    'device': 'cpu',
    'num_steps': 5,
    'overlap': 0.5,
    'spectral_mode': 'svd',
    'channel_mode': 'per_channel',
    'gating_schedule': 'linear',
    'gating_sigmoid_k': 12.0,
    'wavelet_levels': 4,
    'laplacian_levels': 4,
}
Setup block drafted by
a language model, Claude Haiku 4.5, prompt python_fixture_v1, through the batch API
Imports
torch, torchvision — import names as written, not package names to install; a name the repository itself provides is not a package
Returned
type SpectralPathGenerator — 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 SpectralPathGenerator 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
compute_ig Ran
ran; our contract draft was wrong, not the code
leekwoon/sig/cleanig/explainer/spectral_ig.py
code served (permissive licence) · get_code("3847a85feb7390a0")
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 (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 torch
import torch.nn as nn

torch.manual_seed(0)

# Define a simple model that takes input and produces class logits
class SimpleModel(nn.Module):
    def __init__(self, input_size, num_classes):
        super().__init__()
        self.fc1 = nn.Linear(input_size, 16)
        self.fc2 = nn.Linear(16, num_classes)
    
    def forward(self, x):
        # x shape: [B, C, H, W] or [B, C*H*W]
        # Flatten if needed
        if len(x.shape) > 2:
            x = x.view(x.shape[0], -1)
        x = torch.relu(self.fc1(x))
        x = self.fc2(x)
        return x

# Create model
# Input: batch_size=2, channels=4, height=3, width=3 -> 4*3*3=36 features
model = SimpleModel(input_size=36, num_classes=5)
model.eval()

# Create paths tensor
# Shape: [B, num_steps, C, H, W] = [2, 6, 4, 3, 3]
# num_steps=6 so we have 5 deltas (for attributions calculation)
batch_size = 2
num_steps = 6
channels = 4
height = 3
width = 3

paths = torch.randn(batch_size, num_steps, channels, height, width)

# Create labels - one label per batch item
labels = torch.tensor([1, 3])

# exp_obj can be 'prob' or 'logit'
exp_obj = 'prob'

ARGS = {
    'model': model,
    'paths': paths,
    'labels': labels,
    'exp_obj': exp_obj
}
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 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
get_grads Ran
ran; our contract draft was wrong, not the code
leekwoon/sig/cleanig/explainer/spectral_ig.py
code served (permissive licence) · get_code("8fd0d6c205dcc0f2")
How it ran

Ran in Syntology's sandbox on this synthesized input (drafted by a language model, Claude Haiku 4.5, prompt python_fixture_v1, through the batch API) and returned Tensor, ndim 3, dtype family float, shape (2, 5, 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 model that takes input and produces class logits
class SimpleModel(nn.Module):
    def __init__(self, input_dim, num_classes):
        super().__init__()
        self.linear = nn.Linear(input_dim, num_classes)
    
    def forward(self, x):
        return self.linear(x)

# Create model
model = SimpleModel(input_dim=4, num_classes=3)

# Create paths tensor: shape (batch_size=2, sequence_length=5, input_dim=4)
paths = torch.randn(2, 5, 4, requires_grad=False)

# Create labels tensor (optional, but we'll provide it)
labels = torch.tensor([0, 1])

ARGS = {
    'model': model,
    'paths': paths,
    'labels': labels,
    'exp_obj': 'prob'
}
Setup block drafted by
a language model, Claude Haiku 4.5, prompt python_fixture_v1, through the batch API
Imports
torch — import names as written, not package names to install; a name the repository itself provides is not a package
Returned
type Tensor, ndim 3, dtype family float, shape (2, 5, 4) — shape (2, 5, 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
PathGenerator Not yet run
unverified (harvested, no recorded run)
leekwoon/sig/cleanig/explainer/spectral_ig.py
code served (permissive licence) · get_code("7be289a034d92402")
How it ran

no invocation recorded.

SpectralIGExplainer Not yet run
unverified (harvested, no recorded run)
leekwoon/sig/cleanig/explainer/spectral_ig.py
code served (permissive licence) · get_code("aea625c96b133d82")
How it ran

no invocation recorded.

_gaussian_blur_baseline Not yet run
unverified (harvested, no recorded run)
leekwoon/sig/cleanig/explainer/spectral_ig.py
code served (permissive licence) · get_code("2d8793dd82b743e9")
How it ran

no invocation recorded.

build_reference_baseline Not yet run
unverified (harvested, no recorded run)
leekwoon/sig/cleanig/explainer/spectral_ig.py
code served (permissive licence) · get_code("3d5fcd8d9a3b771b")
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, 0 are also present in other papers whose code we hold (0 with at least one paper dated earlier, 0 the same month, 0 later) and 9 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.

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

Integrated Gradients (IG) is a widely adopted feature attribution method that satisfies desirable axiomatic properties. However, the choice of integration path significantly affects the quality of attributions, and the standard straight-line path introduces all input features simultaneously, often accumulating noisy gradients along the way. To address this limitation, we propose Spectral Integrated Gradients, which constructs integration paths based on singular value decomposition (SVD) of the baseline-to-input difference. By progressively activating singular components from largest to smallest, SIG introduces global structure before fine-grained details, naturally following a coarse-to-fine progression. Through extensive evaluation across diverse image classification datasets, we demonstrate that SIG produces cleaner attribution maps with reduced noise and achieves improved quantitative performance compared to existing path-based attribution methods. Our code is available at https://github.com/leekwoon/sig/ • Computing methodologies → Machine learning approaches; Spectral methods; Neural networks; Hierarchical representations.

For agents

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

get_harvested_code_for_paper("2605.19607")
get_code_for_paper("2605.19607")
have("2605.19607")

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

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

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

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

Connect an agent — have() is free.