SYNTOLOGY HomeExplorerAtlasCodeMethodologyAboutDevelopersFeedPricing
Paper · 2309.13016 · 2023

Understanding Deep Gradient Leakage via Inversion Influence Functions

arXiv · PDF · Open in the Atlas

Code that ran

15 of 19 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; 13 failures of our instrument; 4 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/2309.13016.json · badge: /api/ran/2309.13016.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
illidanlab/inversion-influence-function canonical (classifier label)
classifier basis: census
15 ran · 4 no recorded run
FunctionStatusWhere it lives
Acc Ran
ran; our contract draft was wrong, not the code
illidanlab/inversion-influence-function/utils.py
code served (permissive licence) · get_code("f98c1ca84c5aa504")
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 float, 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)

# Create small tensors for targets and predictions
# targets: ground truth labels
# preds: predicted labels
targets = torch.tensor([0, 1, 0, 1])
preds = torch.tensor([0, 1, 1, 1])

ARGS = {
    "targets": targets,
    "preds": preds
}
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 float, 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
FPR Ran
ran; our contract draft was wrong, not the code
illidanlab/inversion-influence-function/utils.py
code served (permissive licence) · get_code("e236b9fab80debf8")
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 float, 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)

# Create small tensors for targets and predictions
# targets: binary ground truth (0 or 1)
# preds: binary predictions (0 or 1)
targets = torch.tensor([0, 0, 1, 1], dtype=torch.float32)
preds = torch.tensor([1, 0, 1, 0], dtype=torch.float32)

ARGS = {
    "targets": targets,
    "preds": preds,
}
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 float, 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
PSNR Ran
ran; our contract draft was wrong, not the code
illidanlab/inversion-influence-function/metrics.py
code served (permissive licence) · get_code("79216dcd9c887eb7")
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 float, 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)

# Create small test tensors
# img_batch: 4D tensor [B, C, H, W] with batch size 2, 3 channels, 4x5 spatial dims
img_batch = torch.rand(2, 3, 4, 5)

# ref_batch: 4D tensor with same shape as img_batch
ref_batch = torch.rand(2, 3, 4, 5)

# max_I: maximum intensity value (default 1.0 for normalized images)
max_I = 1.0

ARGS = {
    "img_batch": img_batch,
    "ref_batch": ref_batch,
    "max_I": max_I,
}
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 float, 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
activation_errors Ran
ran; our contract draft was wrong, not the code
illidanlab/inversion-influence-function/inversefed/metrics.py
code served (permissive licence) · get_code("e551d62ffffcfda9")
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 defaultdict. 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 collections import defaultdict

torch.manual_seed(0)

# Build a small model with named modules
class SimpleModel(nn.Module):
    def __init__(self):
        super().__init__()
        self.linear1 = nn.Linear(4, 3)
        self.relu = nn.ReLU()
        self.linear2 = nn.Linear(3, 2)
    
    def forward(self, x):
        x = self.linear1(x)
        x = self.relu(x)
        x = self.linear2(x)
        return x

model = SimpleModel()
model.eval()

# Create two small input tensors with batch size 2 and feature dimension 4
x1 = torch.randn(2, 4)
x2 = torch.randn(2, 4)

ARGS = {
    "model": model,
    "x1": x1,
    "x2": x2,
}
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 defaultdict — a defaultdict output has no array shape of its own; none is stated — the instrument coerces any output to an array; for a defaultdict 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
densenet_cifar Ran
ran; our contract draft was wrong, not the code
illidanlab/inversion-influence-function/inversefed/nn/densenet.py
pointer only (licence: MIT); the stored copy get_code serves, from tasi-lab/unlearning-inversion-attacks, is pointer only (licence: NONE) · get_code("7db01b64f42f28ee")
How it ran

The body of this sample is withheld: this paper's link allows the body inline (MIT), but get_code serves the stored copy, first harvested from tasi-lab/unlearning-inversion-attacks, and GitHub detected no licence in that repository when it was checked. The setup block that called it is withheld with it, because it is written against that body. source_path and origin say where the code lives, to read under the repository's own terms. A run is recorded.

flat_recover_vector Ran
ran; our contract draft was wrong, not the code
illidanlab/inversion-influence-function/defense.py
code served (permissive licence) · get_code("56b73a67e3e20843")
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)

# Test case 1: flat operation
vector_flat = [
    torch.randn(2, 3),
    torch.randn(4,),
    torch.randn(2, 2, 3)
]

# Test case 2: recover operation
flat_vector_result, shapes_result, cumulated_num_result = (
    torch.randn(23),  # 2*3 + 4 + 2*2*3 = 6 + 4 + 12 = 22... let me recalculate
    [torch.Size([2, 3]), torch.Size([4]), torch.Size([2, 2, 3])],
    [6, 4, 12]
)

# Recalculate: 2*3=6, 4=4, 2*2*3=12, total=22
flat_vector_recover = torch.randn(22)

ARGS = {
    'vector': vector_flat,
    'func': 'flat',
    'shapes': None,
    'cumulated_num': None
}
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
flat_recover_vector Ran
ran; our contract draft was wrong, not the code
illidanlab/inversion-influence-function/utils.py
code served (permissive licence) · get_code("c168fdff966921b8")
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)

# For 'flat' mode: vector should be a tuple of tensors
vector_flat = (
    torch.randn(2, 3),
    torch.randn(4, 5),
    torch.randn(6),
)

# For 'recover' mode: we need to first flatten, then create the flat vector
# and metadata for recovery
flat_vec, shapes, cumulated_num = (
    torch.tensor([1.0, 2.0, 3.0, 4.0, 5.0, 6.0, 7.0, 8.0, 9.0, 10.0]),
    [(2, 3), (4, 5), (6,)],
    [torch.tensor(6), torch.tensor(20), torch.tensor(6)],
)

# Test case 1: flat mode
ARGS_flat = {
    'vector': vector_flat,
    'func': 'flat',
    'shapes': None,
    'cumulated_num': None,
}

# Test case 2: recover mode
ARGS_recover = {
    'vector': flat_vec,
    'func': 'recover',
    'shapes': shapes,
    'cumulated_num': cumulated_num,
}

# Use flat mode as primary
ARGS = ARGS_flat
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
get_gradients Ran
ran; our contract draft was wrong, not the code
illidanlab/inversion-influence-function/defense.py
code served (permissive licence) · get_code("18a2cff946431aa0")
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. 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
from torch import nn

torch.manual_seed(0)

# Define a small model
class SimpleModel(nn.Module):
    def __init__(self):
        super().__init__()
        self.linear1 = nn.Linear(4, 8)
        self.linear2 = nn.Linear(8, 3)
    
    def forward(self, x):
        x = torch.relu(self.linear1(x))
        x = self.linear2(x)
        return x

model = SimpleModel()

# Create tiny tensors
data = torch.randn(2, 4)  # batch size 2, feature dim 4
label = torch.tensor([0, 1])  # 2 labels for 2 samples

# Setup dict with device
setup = {'device': 'cpu'}

ARGS = {
    'model': model,
    'data': data,
    'label': label,
    'setup': setup
}
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 — a list 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
grad_cosine_similarity Ran
ran; our contract draft was wrong, not the code
illidanlab/inversion-influence-function/defense.py
code served (permissive licence) · get_code("b016f96cdd4b4af0")
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 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 torch
import torch.nn.functional as F

torch.manual_seed(0)

# Test case 1: Two lists of tensors
grad1_list = [
    torch.randn(2, 3),
    torch.randn(4, 5)
]

grad2_list = [
    torch.randn(2, 3),
    torch.randn(4, 5)
]

# Test case 2: Two tensors
grad1_tensor = torch.randn(2, 4)
grad2_tensor = torch.randn(2, 4)

# We'll use the tensor case as it's simpler
ARGS = {
    "grad1": grad1_tensor,
    "grad2": grad2_tensor
}
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 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
pair Ran
ran, violated the contract we drafted
illidanlab/inversion-influence-function/baseline_utils.py
code served (permissive licence) · get_code("6ba8cee9f5daea41")
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) 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

torch.manual_seed(0)

# The function 'pair' takes a single parameter 't' and returns it as a tuple if it isn't already one
# We need to test both cases: when t is a tuple and when it's not

# Case 1: t is not a tuple (e.g., an integer, string, tensor, etc.)
t_not_tuple = 5

# Case 2: t is already a tuple
t_is_tuple = (3, 7)

# We'll use the non-tuple case as the primary test
ARGS = {
    "t": t_not_tuple
}
Setup block drafted by
a language model, Claude Haiku 4.5, prompt python_fixture_v1
Imports
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
psnr Ran
ran; the contract check could not run (RAISES, DEP_MISSING or TIMEOUT)
illidanlab/inversion-influence-function/inversefed/metrics.py
code served (permissive licence) · get_code("5ef2f520281c0bdf")
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 float, 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)

# Create small test tensors with distinct dimensions
# Shape: [B=2, C=3, m=4, n=5]
img_batch = torch.randn(2, 3, 4, 5)
ref_batch = torch.randn(2, 3, 4, 5)

ARGS = {
    "img_batch": img_batch,
    "ref_batch": ref_batch,
    "batched": False,
    "factor": 1.0,
}
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 float, 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
reconstruction_costs Ran
ran; the contract check could not run (RAISES, DEP_MISSING or TIMEOUT)
illidanlab/inversion-influence-function/inversefed/reconstruction_algorithms.py
code served (permissive licence) · get_code("d696213f6c2f41c9")
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)

# Create input_gradient as a list of tensors
# The function indexes into it and computes norms, so we need multiple tensors
input_gradient = [
    torch.randn(4, 3),
    torch.randn(4, 3),
    torch.randn(4, 3),
    torch.randn(4, 3),
    torch.randn(4, 3),
    torch.randn(4, 3),
    torch.randn(4, 3),
    torch.randn(4, 3),
    torch.randn(4, 3),
    torch.randn(4, 3),
    torch.randn(4, 3),
    torch.randn(4, 3),
]

# Create gradients as a list of gradient lists
# Each element is a list of tensors similar to input_gradient
gradients = [
    [torch.randn(4, 3) for _ in range(len(input_gradient))],
    [torch.randn(4, 3) for _ in range(len(input_gradient))],
    [torch.randn(4, 3) for _ in range(len(input_gradient))],
]

ARGS = {
    'gradients': gradients,
    'input_gradient': input_gradient,
    'cost_fn': 'l2',
    'indices': 'def',
    'weights': 'equal',
}
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
reconstruction_costs Ran
ran, honoured the contract we drafted
illidanlab/inversion-influence-function/myreconstruction.py
code served (permissive licence) · get_code("7a3f6f7c1e8f15fe")
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)

# Create mock gradients - list of lists of tensors
# Each "trial_gradient" is a list of tensors representing parameter gradients
gradients = [
    [torch.randn(4, 3), torch.randn(5), torch.randn(2, 3, 4)],
    [torch.randn(4, 3), torch.randn(5), torch.randn(2, 3, 4)],
]

# Create input_gradient - list of tensors with same structure
input_gradient = [
    torch.randn(4, 3),
    torch.randn(5),
    torch.randn(2, 3, 4),
]

ARGS = {
    'gradients': gradients,
    'input_gradient': input_gradient,
    'cost_fn': 'l2',
    'indices': 'def',
    'weights': 'equal',
}
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
ssim_ssim Ran
ran; our contract draft was wrong, not the code
illidanlab/inversion-influence-function/metrics.py
code served (permissive licence) · get_code("14bd12e83ef2cc00")
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
import torch.nn.functional as F

torch.manual_seed(0)

# Create small image tensors (batch=2, channels=3, height=4, width=4)
img1 = torch.randn(2, 3, 4, 4)
img2 = torch.randn(2, 3, 4, 4)

# Create a Gaussian window for SSIM computation
# window_size=11, channels=3
window_size = 11
channel = 3
sigma = 1.5
x = torch.arange(window_size).float() - (window_size - 1) / 2.0
gauss = torch.exp(-x.pow(2.0) / (2 * sigma ** 2))
window_1d = gauss / gauss.sum()
window_2d = window_1d.unsqueeze(1) * window_1d.unsqueeze(0)
window = window_2d.unsqueeze(0).unsqueeze(0).repeat(channel, 1, 1, 1)

ARGS = {
    "img1": img1,
    "img2": img2,
    "window": window,
    "window_size": window_size,
    "channel": channel,
    "size_average": 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 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
total_variation Ran
ran; the contract check could not run (RAISES, DEP_MISSING or TIMEOUT)
illidanlab/inversion-influence-function/inversefed/metrics.py
code served (permissive licence) · get_code("3d23162c75564e01")
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 takes a 4D tensor x and computes anisotropic total variation
# It accesses x[:, :, :, :-1], x[:, :, :, 1:], x[:, :, :-1, :], x[:, :, 1:, :]
# So we need a 4D tensor with shape (batch, channels, height, width)
# Using distinct sizes: batch=2, channels=4, height=3, width=5

x = torch.randn(2, 4, 3, 5)

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
construct_model Not yet run
unverified (harvested, no recorded run)
illidanlab/inversion-influence-function/inversefed/nn/models.py
code served (permissive licence) · get_code("02eff7fd03b9447e")
How it ran

no invocation recorded.

load_datasets Not yet run
unverified (harvested, no recorded run)
illidanlab/inversion-influence-function/baseline_utils.py
code served (permissive licence) · get_code("5575a9343bef8b99")
How it ran

no invocation recorded.

load_model Not yet run
unverified (harvested, no recorded run)
illidanlab/inversion-influence-function/baseline_utils.py
code served (permissive licence) · get_code("966417b0e5853e27")
How it ran

no invocation recorded.

lpips_loss Not yet run
unverified (harvested, no recorded run)
illidanlab/inversion-influence-function/metrics.py
code served (permissive licence) · get_code("31c67ce0a240360c")
How it ran

no invocation recorded.

Also present in other papers' code

Of 19 samples lifted from this paper's linked repositories, 19 carry a function identity and 0 do not. Of the 19 distinct functions with an identity, 6 are also present in other papers whose code we hold (6 with at least one paper dated earlier, 1 the same month, 6 later) and 13 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
pair 90 other papers
36 dated earlier, 1 the same month, 50 later, 2 same year, order not determinable, 1 undated · 8 only as an assembly brick
2004.13649 (2020-04)
Image Augmentation Is All You Need: Regularizing Deep Reinforcement Learning from Pixels
2010.11929 (2020-10)
An Image is Worth 16x16 Words: Transformers for Image Recognition at Scale
2103.15691 (2021-03)
ViViT: A Video Vision Transformer
and 87 more not named here
activation_errors 5 other papers
3 dated earlier, 2 later
Sun_Soteria_Provable_Defense_Against_Privacy_Leakage_in_Federated_Learning_From_CVPR_2021_paper (2021 (year only))
Soteria: Provable Defense against Privacy Leakage in Federated Learning from Representation Perspective
2107.01154 (2021-07)
Gradient-Leakage Resilient Federated Learning
2308.04699 (2023-08)
GIFD: A Generative Gradient Inversion Method with Feature Domain Optimization
and 2 more not named here
psnr 5 other papers
3 dated earlier, 2 later
Sun_Soteria_Provable_Defense_Against_Privacy_Leakage_in_Federated_Learning_From_CVPR_2021_paper (2021 (year only))
Soteria: Provable Defense against Privacy Leakage in Federated Learning from Representation Perspective
2107.01154 (2021-07)
Gradient-Leakage Resilient Federated Learning
2308.04699 (2023-08)
GIFD: A Generative Gradient Inversion Method with Feature Domain Optimization
and 2 more not named here
total_variation 5 other papers
3 dated earlier, 2 later
Sun_Soteria_Provable_Defense_Against_Privacy_Leakage_in_Federated_Learning_From_CVPR_2021_paper (2021 (year only))
Soteria: Provable Defense against Privacy Leakage in Federated Learning from Representation Perspective
2107.01154 (2021-07)
Gradient-Leakage Resilient Federated Learning
2308.04699 (2023-08)
GIFD: A Generative Gradient Inversion Method with Feature Domain Optimization
and 2 more not named here
densenet_cifar 4 other papers
2 dated earlier, 1 later, 1 same year, order not determinable
2107.01154 (2021-07)
Gradient-Leakage Resilient Federated Learning
Zhang_Generative_Gradient_Inversion_via_Over-Parameterized_Networks_in_Federated_Learning_ICCV_2023_paper (2023 (year only))
Generative Gradient Inversion via Over-Parameterized Networks in Federated Learning
2308.04699 (2023-08)
GIFD: A Generative Gradient Inversion Method with Feature Domain Optimization
and 1 more not named here
reconstruction_costs 2 other papers
1 dated earlier, 1 later
2003.14053 (2020-03)
Inverting Gradients -- How easy is it to break privacy in federated learning?
2404.03233 (2024-04)
Learn What You Want to Unlearn: Unlearning Inversion Attacks against Machine Unlearning

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

Deep Gradient Leakage (DGL) is a highly effective attack that recovers private training images from gradient vectors. This attack casts significant privacy challenges on distributed learning from clients with sensitive data, where clients are required to share gradients. Defending against such attacks requires but lacks an understanding of when and how privacy leakage happens, mostly because of the black-box nature of deep networks. In this paper, we propose a novel Inversion Influence Function (I$^2$F) that establishes a closed-form connection between the recovered images and the private gradients by implicitly solving the DGL problem. Compared to directly solving DGL, I$^2$F is scalable for analyzing deep networks, requiring only oracle access to gradients and Jacobian-vector products. We empirically demonstrate that I$^2$F effectively approximated the DGL generally on different model architectures, datasets, modalities, attack implementations, and perturbation-based defenses. With this novel tool, we provide insights into effective gradient perturbation directions, the unfairness of privacy protection, and privacy-preferred model initialization. Our codes are provided in https://github.com/illidanlab/inversion-influence-function.

For agents

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

get_harvested_code_for_paper("2309.13016")
get_code_for_paper("2309.13016")
have("2309.13016")

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

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

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

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

Connect an agent — have() is free.