SYNTOLOGY HomeExplorerAtlasCodeMethodologyAboutDevelopersFeedPricing
Paper · 2105.14203 · NeurIPS · 2021

Understanding Instance-based Interpretability of Variational Auto-Encoders

Kamalika Chaudhuri, Zhifeng Kong

arXiv · PDF · Open in the Atlas

Code that ran

7 of 10 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; 1 honoured the contract we drafted, 0 violated it and 3 have no contract verdict; 3 failures of our instrument; 3 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/2105.14203.json · badge: /api/ran/2105.14203.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
fengnima/vae-tracin-pytorch community
Papers with Code archive
7 ran · 3 no recorded run
FunctionStatusWhere it lives
BetaVAE_H Ran
ran on a synthesized input · constructed an object; no result was computed
fengnima/vae-tracin-pytorch/tracin.py
code served (permissive licence) · get_code("4075f45105ce1e79")
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, BetaVAE_H: the run constructed the object and did not call it, so no result was computed. 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)

# The BetaVAE_H constructor takes z_dim and nc as parameters
# z_dim: latent dimension (default 10)
# nc: number of input channels (default 3)

ARGS = {
    'z_dim': 10,
    'nc': 3,
}
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 BetaVAE_H — 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 BetaVAE_H 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
BetaVAE_MNIST Ran
ran on a synthesized input · constructed an object; no result was computed
fengnima/vae-tracin-pytorch/tracin.py
code served (permissive licence) · get_code("327ac362d341fdae")
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, BetaVAE_MNIST: the run constructed the object and did not call it, so no result was computed. 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

torch.manual_seed(0)

# The BetaVAE_MNIST constructor takes:
# - z_dim: dimension of latent space (default 10)
# - l: number of layers (default 3)
# - nc: number of channels (default 1, must be 1 based on assertion)

ARGS = {
    'z_dim': 10,
    'l': 3,
    'nc': 1,
}
Setup block drafted by
a language model, Claude Haiku 4.5, prompt python_fixture_v1, through the batch API
Imports
numpy, torch — import names as written, not package names to install; a name the repository itself provides is not a package
Returned
type BetaVAE_MNIST — 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 BetaVAE_MNIST 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
View Ran
ran on a synthesized input · constructed an object; no result was computed
fengnima/vae-tracin-pytorch/tracin.py
code served (permissive licence) · get_code("d98e6eb646f75ed8")
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, View: the run constructed the object and did not call it, so no result was computed. 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)

# The View module's __init__ takes 'size' parameter
# The forward method calls tensor.view(self.size)
# So 'size' should be a valid shape tuple for reshaping

# Create a small tensor to test with
test_tensor = torch.randn(2, 4)

# 'size' should be a tuple representing the target shape
# We'll reshape from (2, 4) to (1, 8) as an example
target_size = (1, 8)

ARGS = {
    'size': target_size
}
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 View — 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 View 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
calc_loss Ran
ran; our contract draft was wrong, not the code
fengnima/vae-tracin-pytorch/tracin.py
code served (permissive licence) · get_code("5380fb72510af9a7")
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 (1,) 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)

# Create small tensors matching the expected shapes
# x: (batch_size, 3, 64, 64) but we'll use tiny version (2, 3, 4, 4)
batch_size = 2
x = torch.randn(batch_size, 3, 4, 4)

# x_recon: same shape as x
x_recon = torch.randn(batch_size, 3, 4, 4)

# mu: latent mean, will be reshaped to (batch_size, latent_dim)
# Using shape (2, 8) for latent dimension
mu = torch.randn(batch_size, 8)

# logvar: latent log variance, same shape as mu
logvar = torch.randn(batch_size, 8)

# beta: weighting factor for KL divergence
beta = 0.5

ARGS = {
    "x": x,
    "x_recon": x_recon,
    "mu": mu,
    "logvar": logvar,
    "beta": beta,
}
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 (1,) — shape (1,) 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
grad_z_last_layer Ran
ran; our contract draft was wrong, not the code
fengnima/vae-tracin-pytorch/tracin.py
code served (permissive licence) · get_code("e369fec7c01c72af")
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
import torch.nn as nn

torch.manual_seed(0)

class SimpleEncoder(nn.Module):
    def __init__(self):
        super().__init__()
        self.fc1 = nn.Linear(3 * 64 * 64, 16)
        self.fc_mu = nn.Linear(16, 8)
        self.fc_logvar = nn.Linear(16, 8)
    
    def forward(self, x):
        x = x.view(x.size(0), -1)
        h = self.fc1(x)
        mu = self.fc_mu(h)
        logvar = self.fc_logvar(h)
        return mu, logvar

class SimpleDecoder(nn.Module):
    def __init__(self):
        super().__init__()
        self.fc1 = nn.Linear(8, 16)
        self.fc2 = nn.Linear(16, 3 * 64 * 64)
    
    def forward(self, z):
        h = self.fc1(z)
        x_recon = self.fc2(h)
        x_recon = x_recon.view(-1, 3, 64, 64)
        return x_recon

class SimpleVAE(nn.Module):
    def __init__(self):
        super().__init__()
        self.encoder = SimpleEncoder()
        self.decoder = SimpleDecoder()
    
    def forward(self, x):
        mu, logvar = self.encoder(x)
        z = mu + torch.exp(0.5 * logvar) * torch.randn_like(mu)
        x_recon = self.decoder(z)
        return x_recon, mu, logvar

z = torch.randn(3, 64, 64)

model = SimpleVAE()
model.eval()

ARGS = {
    'z': z,
    'model': model,
    'gpu': -1,
    'beta': 1,
    'reconstruct_num': 1,
    'use_last_layer': 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 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
kl_divergence Ran
ran; our contract draft was wrong, not the code
fengnima/vae-tracin-pytorch/tracin.py
code served (permissive licence) · get_code("39b467466c64b8ed")
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)

# Create small tensors for mu and logvar
# The function expects:
# - mu: tensor with .size() method, .data attribute, .pow() method
# - logvar: tensor with .size() method, .data attribute, .exp() method
# Both should support view operations and arithmetic

batch_size = 2
latent_dim = 4

mu = torch.randn(batch_size, latent_dim)
logvar = torch.randn(batch_size, latent_dim)

ARGS = {
    "mu": mu,
    "logvar": logvar,
}
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
reparametrize Ran
ran, honoured the contract we drafted
fengnima/vae-tracin-pytorch/tracin.py
code served (permissive licence) · get_code("863fc64cd51264f0")
How it ran

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

import torch
from torch.autograd import Variable

torch.manual_seed(0)

# The function reparametrize expects:
# - mu: a tensor (used with arithmetic operations and passed to std.data.new)
# - logvar: a tensor (used with .div(2).exp() and .data.new and .size())

# Create small tensors for mu and logvar
# logvar should be a log variance tensor
mu = torch.randn(2, 4)
logvar = torch.randn(2, 4)

ARGS = {
    "mu": mu,
    "logvar": logvar,
}
Setup block drafted by
a language model, Claude Haiku 4.5, prompt python_fixture_v1, through the batch API
Imports
torch — import names as written, not package names to install; a name the repository itself provides is not a package
Returned
type Tensor, ndim 2, dtype family float, shape (2, 4) — shape (2, 4) as a later run recorded it
dtype family
int means an integer dtype; float means any other dtype the instrument saw, bool and complex included (fixture_check.py records only these two families)
Environment
image not recorded; re-verify against syntology-harvest-sandbox:v5-deps; not recorded for this sample: the harness installs a cuda-to-cpu shim (cuda_shim.py) before every sample and no run records whether a sample needed it; seed: none by the harness; any seed is in the setup block
display_progress Not yet run
unverified (harvested, no recorded run)
fengnima/vae-tracin-pytorch/tracin.py
code served (permissive licence) · get_code("68a43111deb5f3a4")
How it ran

no invocation recorded.

get_ordered_checkpoint_list Not yet run
unverified (harvested, no recorded run)
fengnima/vae-tracin-pytorch/tracin.py
code served (permissive licence) · get_code("a5cb8cdf15fed41a")
How it ran

no invocation recorded.

tracin_cp Not yet run
unverified (harvested, no recorded run)
fengnima/vae-tracin-pytorch/tracin.py
code served (permissive licence) · get_code("54cd564a54f7b7fb")
How it ran

no invocation recorded.

Also present in other papers' code

Of 10 samples lifted from this paper's linked repositories, 10 carry a function identity and 0 do not. Of the 10 distinct functions with an identity, 3 are also present in other papers whose code we hold (1 with at least one paper dated earlier, 0 the same month, 3 later) and 7 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
reparametrize
brick of this paper's assembly: helper
10 other papers
10 later · 2 only as an assembly brick
2111.02338 (2021-11)
Drop, Swap, and Generate: A Self-Supervised Approach for Generating Neural Activity
2210.13647 (2022-10)
Temporally Disentangled Representation Learning
2301.05169 (2023-01)
Causal Triplet: An Open Challenge for Intervention-centric Causal Representation Learning
and 7 more not named here
View
brick of this paper's assembly: helper
3 other papers
1 dated earlier, 2 later · 2 only as an assembly brick
2006.10102 (2020-06)
CAPTURING LABEL CHARACTERISTICS IN VAEs
2307.06206 (2023-07)
SepVAE: a contrastive VAE to separate pathological patterns from healthy ones
2310.17325 (2023-10)
C-Disentanglement: Discovering Causally-Independent Generative Factors under an Inductive Bias of Confounder
kl_divergence
brick of this paper's assembly: loss
2 other papers
2 later · 1 only as an assembly brick
2111.02338 (2021-11)
Drop, Swap, and Generate: A Self-Supervised Approach for Generating Neural Activity
2406.19298 (2024-06)
Compositional Image Decomposition with Diffusion Models

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

Instance-based interpretation methods have been widely studied for supervised learning methods as they help explain how black box neural networks predict. However, instance-based interpretations remain ill-understood in the context of unsupervised learning. In this paper, we investigate influence functions [Koh and Liang, 2017], a popular instance-based interpretation method, for a class of deep generative models called variational auto-encoders (VAE). We formally frame the counter-factual question answered by influence functions in this setting, and through theoretical analysis, examine what they reveal about the impact of training samples on classical unsupervised learning methods. We then introduce VAE-TracIn, a computationally efficient and theoretically sound solution based on Pruthi et al. [2020], for VAEs. Finally, we evaluate VAE-TracIn on several real world datasets with extensive quantitative and qualitative analysis.

For agents

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

get_harvested_code_for_paper("2105.14203")
get_code_for_paper("2105.14203")
have("2105.14203")

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

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

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

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

Connect an agent — have() is free.