SYNTOLOGY HomeExplorerAtlasCodeMethodologyAboutDevelopersFeedPricing
Paper · 2305.19765 · 2023

A Bayesian Approach To Analysing Training Data Attribution In Deep Learning

arXiv · PDF · Open in the Atlas

Code that ran

3 of 5 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; 0 failures of our instrument; 2 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/2305.19765.json · badge: /api/ran/2305.19765.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
elisanguyen/bayesian-tda canonical (classifier label)
classifier basis: census
3 ran · 2 no recorded run
FunctionStatusWhere it lives
compute_gradients Ran
ran on a synthesized input
elisanguyen/bayesian-tda/nn_influence_utils.py
code served (permissive licence) · get_code("6178188047b6f48c")
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

torch.manual_seed(0)

# Create a simple model
class SimpleModel(nn.Module):
    def __init__(self):
        super().__init__()
        self.linear1 = nn.Linear(4, 3)
        self.linear2 = nn.Linear(3, 2)
    
    def forward(self, x):
        x = self.linear1(x)
        x = self.linear2(x)
        return x

model = SimpleModel()

# Create input tensor (batch_size=2, input_dim=4)
input_tensor = torch.randn(2, 4)

# Create label tensor (batch_size=2, with class indices for 2 classes)
label_tensor = torch.tensor([0, 1])

# Create inputs dict as expected by the function
# The function unpacks: input, label, _ = inputs
inputs = (input_tensor, label_tensor, None)

device = torch.device("cpu")
n_gpu = 1
params_filter = None
weight_decay = 0.01
weight_decay_ignores = ["linear1.bias"]

ARGS = {
    "device": device,
    "n_gpu": n_gpu,
    "model": model,
    "inputs": inputs,
    "params_filter": params_filter,
    "weight_decay": weight_decay,
    "weight_decay_ignores": weight_decay_ignores,
}
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
count_parameters Ran
ran, honoured the contract we drafted
elisanguyen/bayesian-tda/nn_influence_utils.py
code served (permissive licence) · get_code("3cb0dc718b4eaf31")
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 int, ndim 0, dtype family int, 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

torch.manual_seed(0)

# Create a simple model with some parameters
model = nn.Sequential(
    nn.Linear(4, 3),
    nn.ReLU(),
    nn.Linear(3, 2)
)

ARGS = {
    "model": model
}
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 int, ndim 0, dtype family int, 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
get_loss_with_weight_decay Ran
ran on a synthesized input
elisanguyen/bayesian-tda/nn_influence_utils.py
code served (permissive licence) · get_code("17f20ca8fa34ae6f")
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

torch.manual_seed(0)

# Build a minimal model that takes input and produces logits for classification
class SimpleModel(nn.Module):
    def __init__(self, input_dim=4, num_classes=3):
        super().__init__()
        self.linear = nn.Linear(input_dim, num_classes)
    
    def forward(self, x):
        return self.linear(x)

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

# Create device (CPU only)
device = torch.device("cpu")

# Create inputs dict with tensor input, label, and dummy third element
input_tensor = torch.randn(2, 4)  # batch_size=2, input_dim=4
label_tensor = torch.tensor([0, 1])  # labels for batch of 2
inputs = {
    "input": input_tensor,
    "label": label_tensor,
    "dummy": None
}

# However, the function unpacks as: input, label, _ = inputs
# This means inputs should be unpacked as a sequence, not a dict
# Looking at the code more carefully: input, label, _ = inputs
# This suggests inputs is a tuple/list-like object, not a Dict
# But the type hint says Dict[str, torch.Tensor]
# Let's create a dict-like object that also supports tuple unpacking
class UnpackableDict(dict):
    def __iter__(self):
        # Return values in order when iterating
        return iter([self.get("input"), self.get("label"), self.get("dummy")])

inputs = UnpackableDict({
    "input": input_tensor,
    "label": label_tensor,
    "dummy": None
})

# Set up other parameters
n_gpu = 1
weight_decay = 0.01
weight_decay_ignores = ["bias"]

ARGS = {
    "device": device,
    "n_gpu": n_gpu,
    "model": model,
    "inputs": inputs,
    "weight_decay": weight_decay,
    "weight_decay_ignores": weight_decay_ignores
}
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
compute_gradients Not yet run
unverified (harvested, no recorded run)
elisanguyen/bayesian-tda/nn_influence_utils_vit.py
code served (permissive licence) · get_code("f425d7b1bc9d8812")
How it ran

no invocation recorded.

compute_hessian_vector_products Not yet run
unverified (harvested, no recorded run)
elisanguyen/bayesian-tda/nn_influence_utils_vit.py
code served (permissive licence) · get_code("c87c32b02c020f68")
How it ran

no invocation recorded.

Also present in other papers' code

Of 5 samples lifted from this paper's linked repositories, 5 carry a function identity and 0 do not. Of the 5 distinct functions with an identity, 1 are also present in other papers whose code we hold (0 with at least one paper dated earlier, 0 the same month, 1 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
count_parameters 1 other paper
1 later
2603.21970 (2026-03)
Parameter-Efficient Fine-Tuning for Medical Text Summarization: A Comparative Study of Lora, Prompt Tuning, and Full Fine-Tuning

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

Training data attribution (TDA) techniques find influential training data for the model's prediction on the test data of interest. They approximate the impact of down- or up-weighting a particular training sample. While conceptually useful, they are hardly applicable to deep models in practice, particularly because of their sensitivity to different model initialisation. In this paper, we introduce a Bayesian perspective on the TDA task, where the learned model is treated as a Bayesian posterior and the TDA estimates as random variables. From this novel viewpoint, we observe that the influence of an individual training sample is often overshadowed by the noise stemming from model initialisation and SGD batch composition. Based on this observation, we argue that TDA can only be reliably used for explaining deep model predictions that are consistently influenced by certain training data, independent of other noise factors. Our experiments demonstrate the rarity of such noise-independent training-test data pairs but confirm their existence. We recommend that future researchers and practitioners trust TDA estimates only in such cases. Further, we find a disagreement between ground truth and estimated TDA distributions and encourage future work to study this gap. Code is provided at https://github.com/ElisaNguyen/bayesian-tda.

For agents

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

get_harvested_code_for_paper("2305.19765")
get_code_for_paper("2305.19765")
have("2305.19765")

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

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

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

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

Connect an agent — have() is free.