SYNTOLOGY HomeExplorerAtlasCodeMethodologyAboutDevelopersFeedPricing
Paper · 2401.06122 · NeurIPS · 2025

Manipulating Feature Visualizations with Gradient Slingshots

Klaus-Robert Müller, Kirill Bykov, -C Höhne, Dilyara Bareeva, Alexander Warnecke, Lukas Pirch, Konrad Rieck, Sebastian Lapuschkin

arXiv · PDF · Open in the Atlas

Code that ran

12 of 18 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, 0 violated it and 2 have no contract verdict; 9 failures of our instrument; 6 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/2401.06122.json · badge: /api/ran/2401.06122.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
dilyabareeva/grad-slingshot canonical (classifier label)
classifier basis: census
12 ran · 6 no recorded run
FunctionStatusWhere it lives
act_max_top_k_from_dataset Ran
ran on a synthesized input
dilyabareeva/grad-slingshot/plotting.py
code served (permissive licence) · get_code("fdbaf0d0cb186b10")
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 torch
import torch.nn as nn
import numpy as np
from torchvision import transforms

torch.manual_seed(0)

# Create a simple mock dataset
class MockDataset:
    def __init__(self, num_samples=20):
        self.num_samples = num_samples
    
    def __getitem__(self, idx):
        # Return (image, label) tuple
        # Image shape: (3, 4, 4) - 3 channels, 4x4 spatial
        img = torch.randn(3, 4, 4)
        label = idx % 10
        return (img, label)
    
    def __len__(self):
        return self.num_samples

# Create denormalize function
def denormalize(img):
    # Simple denormalize: just clamp to valid image range
    # img is expected to be a tensor
    return torch.clamp(img, 0, 1)

# Create indices list
indices = list(range(15))

# Create dataset
dataset = MockDataset(num_samples=20)

ARGS = {
    "indices": indices,
    "denormalize": denormalize,
    "dataset": dataset,
    "random_sampling": False,
    "k": 9
}
Setup block drafted by
a language model, Claude Haiku 4.5, prompt python_fixture_v1, through the batch API
Imports
matplotlib, numpy, torch, torchvision — 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
activation_max_top_k Ran
ran; our contract draft was wrong, not the code
dilyabareeva/grad-slingshot/plotting.py
code served (permissive licence) · get_code("6dddfa6475cdc440")
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 Figure. 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 numpy as np
import matplotlib.pyplot as plt

torch.manual_seed(0)

# Create activation values - 4 values for argsort to pick top 4
act_before = np.array([0.5, 2.3, 1.1, 3.7, 0.2, 1.9])

# Create denormalize function that handles tensor input
def denormalize(x):
    """Simple denormalization: clamp to valid image range"""
    return torch.clamp(x * 0.5 + 0.5, 0, 1)

# Create dummy images - 6 images with shape (3, 4, 5) for RGB images
# Each image is 4x5 spatial with 3 channels
images = np.random.rand(6, 3, 4, 5).astype(np.float32)

# Highlight index parameter
highlight_index = 0

# Title for the plot
title = "Top-k Activations"

ARGS = {
    "act_before": act_before,
    "denormalize": denormalize,
    "images": images,
    "highlight_index": highlight_index,
    "title": title
}
Setup block drafted by
a language model, Claude Haiku 4.5, prompt python_fixture_v1, through the batch API
Imports
matplotlib, numpy, torch — import names as written, not package names to install; a name the repository itself provides is not a package
Returned
type Figure — a Figure output has no array shape of its own; none is stated — the instrument coerces any output to an array; for a Figure 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_nested_attr Ran
ran; our contract draft was wrong, not the code
dilyabareeva/grad-slingshot/core/forward_hook.py
code served (permissive licence) · get_code("cb99d67a4a505067")
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 str. 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

torch.manual_seed(0)

class Container(nn.Module):
    def __init__(self):
        super().__init__()
        self.simple_attr = "simple_value"
        self.nested = NestedModule()
        self.tensor_list = [torch.randn(2, 4), torch.randn(2, 3)]
        self.nested_list = [NestedModule(), NestedModule()]

class NestedModule(nn.Module):
    def __init__(self):
        super().__init__()
        self.deep_attr = "deep_value"
        self.data = torch.randn(2, 4)
        self.items = ["item0", "item1", "item2"]

obj = Container()

ARGS = {
    "obj": obj,
    "attr": "nested.deep_attr"
}
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 str — a str output has no array shape of its own; none is stated — the instrument coerces any output to an array; for a str 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
imagenet_dream Ran
ran; our contract draft was wrong, not the code
dilyabareeva/grad-slingshot/core/fv_transforms.py
code served (permissive licence) · get_code("31aae0b81729befe")
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
from torchvision import transforms

torch.manual_seed(0)

ARGS = {
    'out_dim': 224
}
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 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
load_image_net_data Ran
ran; our contract draft was wrong, not the code
dilyabareeva/grad-slingshot/data_loader.py
code served (permissive licence) · get_code("610e532eeeafa90c")
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 torch
import torchvision
import torchvision.transforms as transforms
from pathlib import Path
import json
import tempfile
import os
from PIL import Image
import numpy as np

torch.manual_seed(0)

# Create a temporary directory structure with dummy ImageNet-like data
tmpdir = tempfile.mkdtemp()
train_dir = os.path.join(tmpdir, 'train')
val_dir = os.path.join(tmpdir, 'val')

os.makedirs(train_dir, exist_ok=True)
os.makedirs(val_dir, exist_ok=True)

# Create dummy class folders and images
for class_idx in range(2):
    class_train_dir = os.path.join(train_dir, str(class_idx))
    class_val_dir = os.path.join(val_dir, str(class_idx))
    os.makedirs(class_train_dir, exist_ok=True)
    os.makedirs(class_val_dir, exist_ok=True)
    
    # Create 3 dummy images per class for training
    for img_idx in range(3):
        img_array = np.random.randint(0, 256, (224, 224, 3), dtype=np.uint8)
        img = Image.fromarray(img_array)
        img.save(os.path.join(class_train_dir, f'image_{img_idx}.jpg'))
    
    # Create 2 dummy images per class for validation
    for img_idx in range(2):
        img_array = np.random.randint(0, 256, (224, 224, 3), dtype=np.uint8)
        img = Image.fromarray(img_array)
        img.save(os.path.join(class_val_dir, f'image_{img_idx}.jpg'))

# Create a subset JSON file
subset_path = os.path.join(tmpdir, 'subset.json')
subset_dict = {
    "0": "class_0",
    "1": "class_1"
}
with open(subset_path, 'w') as f:
    json.dump(subset_dict, f)

# Create extra folder structure
extra_dir = os.path.join(tmpdir, 'extra')
os.makedirs(extra_dir, exist_ok=True)
for class_idx in range(2):
    class_extra_dir = os.path.join(extra_dir, str(class_idx))
    os.makedirs(class_extra_dir, exist_ok=True)
    for img_idx in range(2):
        img_array = np.random.randint(0, 256, (224, 224, 3), dtype=np.uint8)
        img = Image.fromarray(img_array)
        img.save(os.path.join(class_extra_dir, f'image_{img_idx}.jpg'))

# Define custom test transforms
custom_test_transforms = transforms.Compose([
    transforms.Resize(256),
    transforms.CenterCrop(224),
    transforms.ToTensor(),
    transforms.Normalize([0.485, 0.456, 0.406], [0.229, 0.224, 0.225])
])

ARGS = {
    'path': tmpdir,
    'subset': None,
    'add_subset': None,
    'pc': 1.0,
    'add_pc': 1.0,
    'extra_folders': None,
    'test_transforms': None
}
Setup block drafted by
a language model, Claude Haiku 4.5, prompt python_fixture_v1, through the batch API
Imports
PIL, numpy, torch, torchvision — 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
make_layers Ran
ran; our contract draft was wrong, not the code
dilyabareeva/grad-slingshot/models.py
code served (permissive licence) · get_code("b834e29a85d15c71")
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 Sequential. 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

torch.manual_seed(0)

ARGS = {
    "cfg": [64, "M", 128, 256, "M", 512],
    "batch_norm": False
}
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 Sequential — a Sequential output has no array shape of its own; none is stated — the instrument coerces any output to an array; for a Sequential output the recorded ndim 1 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
one_d_collate_fn Ran
ran; our contract draft was wrong, not the code
dilyabareeva/grad-slingshot/core/manipulation_set.py
code served (permissive licence) · get_code("d5da8ca746a0cf9b")
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 torch

torch.manual_seed(0)

# The function expects a batch which is a list of (data, labels) tuples
# data should be a tensor that can be concatenated
# labels should be scalars or values that can be converted to a tensor

batch = [
    (torch.randn(2, 4), 0),
    (torch.randn(2, 4), 1),
]

ARGS = {
    "batch": batch
}
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 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
preservation_loss Ran
ran; our contract draft was wrong, not the code
dilyabareeva/grad-slingshot/core/loss.py
code served (permissive licence) · get_code("3e2ee5b40f872f43")
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
from torch.nn.functional import cross_entropy, mse_loss, softmax

torch.manual_seed(0)

# Small model that returns output
class SimpleModel(nn.Module):
    def __init__(self, input_dim=4, output_dim=3):
        super().__init__()
        self.linear = nn.Linear(input_dim, output_dim)
    
    def forward(self, x):
        return self.linear(x)

# Hook class that stores activations
class Hook:
    def __init__(self):
        self.activation = {}
    
    def register_forward_hook(self, layer, layer_name):
        def hook_fn(module, input, output):
            self.activation[layer_name] = output
        layer.register_forward_hook(hook_fn)

# Create models
model = SimpleModel(input_dim=4, output_dim=3)
default_model = SimpleModel(input_dim=4, output_dim=3)

# Create hooks and register them
hook = Hook()
default_hook = Hook()

layer_str = "layer1"
default_layer_str = "default_layer1"

hook.register_forward_hook(model.linear, layer_str)
default_hook.register_forward_hook(default_model.linear, default_layer_str)

# Create inputs (batch_size=2, input_dim=4)
inputs = torch.randn(2, 4)

# Create manual indices one-hot (for selecting specific features)
# Shape should match the output of target_act_fn applied to activations
man_indices_oh = torch.zeros(3)
man_indices_oh[0] = 1
man_indices_oh[1] = 1

# Target activation function (e.g., softmax or relu)
target_act_fn = lambda x: softmax(x, dim=-1)

# Weight for balancing terms
w = 0.7

# Pre-run models to populate hook activations
_ = model(inputs)
_ = default_model(inputs)

ARGS = {
    "inputs": inputs,
    "model": model,
    "default_model": default_model,
    "default_hook": default_hook,
    "hook": hook,
    "target_act_fn": target_act_fn,
    "man_indices_oh": man_indices_oh,
    "layer_str": layer_str,
    "default_layer_str": default_layer_str,
    "w": w,
}
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
preservation_loss_prox_pulse_ce Ran
ran on a synthesized input
dilyabareeva/grad-slingshot/core/loss.py
code served (permissive licence) · get_code("3ae37e854aa2fc88")
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
from torch.nn.functional import cross_entropy, mse_loss, softmax

torch.manual_seed(0)

# Create a simple model that takes inputs and returns 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 inputs: batch_size=2, input_dim=4
inputs = torch.randn(2, 4)

# Create model that outputs logits for num_classes=3
model = SimpleModel(input_dim=4, num_classes=3)

# Create default_model (same architecture)
default_model = SimpleModel(input_dim=4, num_classes=3)

# Create a simple hook function
def default_hook(module, input, output):
    pass

# Create another hook function
def hook(module, input, output):
    pass

# Create target_act_fn (a simple activation function)
def target_act_fn(x):
    return torch.relu(x)

# Create man_indices_oh (one-hot encoded indices) - batch_size=2, num_classes=3
man_indices_oh = torch.zeros(2, 3)
man_indices_oh[0, 0] = 1
man_indices_oh[1, 1] = 1

# layer_str and default_layer_str are just strings
layer_str = "layer1"
default_layer_str = "default_layer1"

# w is a weight parameter
w = 0.5

ARGS = {
    "inputs": inputs,
    "model": model,
    "default_model": default_model,
    "default_hook": default_hook,
    "hook": hook,
    "target_act_fn": target_act_fn,
    "man_indices_oh": man_indices_oh,
    "layer_str": layer_str,
    "default_layer_str": default_layer_str,
    "w": w
}
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
read_target_image Ran
ran, honoured the contract we drafted
dilyabareeva/grad-slingshot/core/utils.py
code served (permissive licence) · get_code("86aefbf00edf3f75")
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 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
from PIL import Image
from torchvision import transforms
import tempfile
import os

torch.manual_seed(0)

# Create a temporary test image file
temp_dir = tempfile.mkdtemp()
test_image_path = os.path.join(temp_dir, "test_image.png")

# Create a simple PIL image and save it
img = Image.new('RGB', (4, 3), color='red')
img.save(test_image_path)

# Define a simple normalization function
class SimpleNormalize:
    def __call__(self, tensor):
        return tensor * 0.5

normalize_fn = SimpleNormalize()

ARGS = {
    'device': 'cpu',
    'n_channels': 3,
    'target_path': test_image_path,
    'normalize': normalize_fn
}
Setup block drafted by
a language model, Claude Haiku 4.5, prompt python_fixture_v1, through the batch API
Imports
PIL, torch, torchvision — 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
resize_transform Ran
ran; our contract draft was wrong, not the code
dilyabareeva/grad-slingshot/core/fv_transforms.py
code served (permissive licence) · get_code("bdbfcdaff4df9f8e")
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 Compose. 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 torchvision import transforms

torch.manual_seed(0)

ARGS = {
    "im_dim": 224
}
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 Compose — a Compose output has no array shape of its own; none is stated — the instrument coerces any output to an array; for a Compose 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
vit_cls_token_target_direction Ran
ran; our contract draft was wrong, not the code
dilyabareeva/grad-slingshot/core/target_activations.py
code served (permissive licence) · get_code("60f19087598c4668")
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 function. 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 tempfile
import os

torch.manual_seed(0)

# Create a temporary probe tensor and save it
probe_tensor = torch.randn(4, 3)  # Small probe with distinct dimensions
with tempfile.TemporaryDirectory() as tmpdir:
    probe_path = os.path.join(tmpdir, "probe.pt")
    torch.save(probe_tensor, probe_path)
    
    # Since we can't keep the temp directory alive, we need to save to a real location
    # Let's use a module-level approach instead
    pass

# Create probe file in a way that persists for the function call
probe_tensor = torch.randn(4, 3)
probe_path = "/tmp/test_probe.pt"
torch.save(probe_tensor, probe_path)

device = "cpu"

ARGS = {
    "probe_path": probe_path,
    "device": device,
}
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 function — a function output has no array shape of its own; none is stated — the instrument coerces any output to an array; for a function 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
fcfgs Not yet run
unverified (harvested, no recorded run)
dilyabareeva/grad-slingshot/models.py
code served (permissive licence) · get_code("95db6492f04d7140")
How it ran

no invocation recorded.

load_cifar_data Not yet run
unverified (harvested, no recorded run)
dilyabareeva/grad-slingshot/data_loader.py
code served (permissive licence) · get_code("20528158cd3429d4")
How it ran

no invocation recorded.

load_mnist_data Not yet run
unverified (harvested, no recorded run)
dilyabareeva/grad-slingshot/data_loader.py
code served (permissive licence) · get_code("f0c45d4ecbd11674")
How it ran

no invocation recorded.

manipulation_loss_grad_based Not yet run
unverified (harvested, no recorded run)
dilyabareeva/grad-slingshot/core/loss.py
code served (permissive licence) · get_code("d37c77213d240c9c")
How it ran

no invocation recorded.

modified_vgg Not yet run
unverified (harvested, no recorded run)
dilyabareeva/grad-slingshot/models.py
code served (permissive licence) · get_code("1ba3884299b9ff1c")
How it ran

no invocation recorded.

vit_transforms Not yet run
unverified (harvested, no recorded run)
dilyabareeva/grad-slingshot/core/fv_transforms.py
code served (permissive licence) · get_code("6e281e5c8b321a96")
How it ran

no invocation recorded.

Also present in other papers' code

Of 18 samples lifted from this paper's linked repositories, 18 carry a function identity and 0 do not. Of the 18 distinct functions with an identity, 1 are also present in other papers whose code we hold (1 with at least one paper dated earlier, 1 the same month, 1 later) and 17 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
make_layers 9 other papers
4 dated earlier, 2 the same month, 3 later
2002.09564 (2020-02)
Towards Robust and Reproducible Active Learning Using Neural Networks
2306.12685 (2023-06)
Rethinking the Backward Propagation for Adversarial Transferability
2306.13856 (2023-06)
Learning-to-Rank Meets Language: Boosting Language-Driven Ordering Alignment for Ordinal Classification
and 6 more not named here

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

Feature Visualization (FV) is a widely used technique for interpreting concepts learned by Deep Neural Networks (DNNs), which synthesizes input patterns that maximally activate a given feature. Despite its popularity, the trustworthiness of FV explanations has received limited attention. We introduce Gradient Slingshots, a novel method that enables FV manipulation without modifying model architecture or significantly degrading performance. By shaping new trajectories in off-distribution regions of a feature's activation landscape, we coerce the optimization process to converge to a predefined visualization. We evaluate our approach on several DNN architectures, demonstrating its ability to replace faithful FVs with arbitrary targets. These results expose a critical vulnerability: auditors relying solely on FV may accept entirely fabricated explanations. To mitigate this risk, we propose a straightforward defense and quantitatively demonstrate its effectiveness. 39th Conference on Neural Information Processing Systems (NeurIPS 2025).

For agents

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

get_harvested_code_for_paper("2401.06122")
get_code_for_paper("2401.06122")
have("2401.06122")

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

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

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

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

Connect an agent — have() is free.