SYNTOLOGY HomeExplorerAtlasCodeMethodologyAboutDevelopersFeedPricing
Paper · 2105.14951 · NeurIPS · 2021

SNIPS: Solving Noisy Inverse Problems Stochastically

Bahjat Kawar, Gregory Vaksman, Michael Elad

arXiv · PDF · Open in the Atlas

Code that ran

12 of 22 samples (functions and classes) lifted from this paper's linked repositories executed on a synthesized input in Syntology's jail (5 of them constructed an object rather than computing a result; 1 honoured the contract we drafted, 0 violated it and 5 have no contract verdict; 6 failures of our instrument; 10 no recorded run), measured 2026-11-23; bodies inline only under a permissive licence as GitHub detects it. Not a reproduction of the paper's results.

"Ran" means the function executed on a synthesized input and returned a value. It is not a reproduction of the paper's results. This record, dated, as JSON: /api/ran/2105.14951.json · badge: /api/ran/2105.14951.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
bahjat-kawar/snips_torch canonical (classifier label)
classifier basis: classifier_2025
12 ran · 10 no recorded run
FunctionStatusWhere it lives
ConditionalInstanceNorm2dPlus Ran
ran on a synthesized input · constructed an object; no result was computed
bahjat-kawar/snips_torch/runners/ncsn_runner.py
code served (permissive licence) · get_code("388e66d45a0b6895")
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, ConditionalInstanceNorm2dPlus: 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)

class ConditionalInstanceNorm2dPlus(nn.Module):

    def __init__(self, num_features, num_classes, bias=True):
        super().__init__()
        self.num_features = num_features
        self.bias = bias
        self.instance_norm = nn.InstanceNorm2d(num_features, affine=False, track_running_stats=False)
        if bias:
            self.embed = nn.Embedding(num_classes, num_features * 3)
            self.embed.weight.data[:, :2 * num_features].normal_(1, 0.02)
            self.embed.weight.data[:, 2 * num_features:].zero_()
        else:
            self.embed = nn.Embedding(num_classes, 2 * num_features)
            self.embed.weight.data.normal_(1, 0.02)

    def forward(self, x, y):
        means = torch.mean(x, dim=(2, 3))
        m = torch.mean(means, dim=-1, keepdim=True)
        v = torch.var(means, dim=-1, keepdim=True)
        means = (means - m) / torch.sqrt(v + 1e-05)
        h = self.instance_norm(x)
        if self.bias:
            gamma, alpha, beta = self.embed(y).chunk(3, dim=-1)
            h = h + means[..., None, None] * alpha[..., None, None]
            out = gamma.view(-1, self.num_features, 1, 1) * h + beta.view(-1, self.num_features, 1, 1)
        else:
            gamma, alpha = self.embed(y).chunk(2, dim=-1)
            h = h + means[..., None, None] * alpha[..., None, None]
            out = gamma.view(-1, self.num_features, 1, 1) * h
        return out

model = ConditionalInstanceNorm2dPlus(num_features=4, num_classes=3, bias=True)
x = torch.randn(2, 4, 5, 6)
y = torch.tensor([0, 1])

ARGS = {
    'num_features': 4,
    'num_classes': 3,
    'bias': 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 ConditionalInstanceNorm2dPlus — 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 ConditionalInstanceNorm2dPlus 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
ConditionalVarianceNorm2d Ran
ran on a synthesized input · constructed an object; no result was computed
bahjat-kawar/snips_torch/runners/ncsn_runner.py
code served (permissive licence) · get_code("87800abf6d1cfbcd")
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, ConditionalVarianceNorm2d: 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)

class ConditionalVarianceNorm2d(nn.Module):

    def __init__(self, num_features, num_classes, bias=False):
        super().__init__()
        self.num_features = num_features
        self.bias = bias
        self.embed = nn.Embedding(num_classes, num_features)
        self.embed.weight.data.normal_(1, 0.02)

    def forward(self, x, y):
        vars = torch.var(x, dim=(2, 3), keepdim=True)
        h = x / torch.sqrt(vars + 1e-05)
        gamma = self.embed(y)
        out = gamma.view(-1, self.num_features, 1, 1) * h
        return out


# Create small tensors for forward pass testing
batch_size = 2
num_features = 4
num_classes = 3
height = 5
width = 6

# x: input tensor with shape (batch, channels, height, width)
x = torch.randn(batch_size, num_features, height, width)

# y: class indices tensor with shape (batch,)
y = torch.randint(0, num_classes, (batch_size,))

ARGS = {
    "num_features": num_features,
    "num_classes": num_classes,
    "bias": 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 ConditionalVarianceNorm2d — 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 ConditionalVarianceNorm2d 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
EMAHelper Ran
ran on a synthesized input · constructed an object; no result was computed
bahjat-kawar/snips_torch/runners/ncsn_runner.py
code served (permissive licence) · get_code("c8ee28a2429c95c7")
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, EMAHelper: 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)

# Create a simple test module
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

# Create an instance of EMAHelper
ema_helper = None

# Define ARGS for EMAHelper.__init__
ARGS = {
    "mu": 0.999
}
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 EMAHelper — 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 EMAHelper 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
InstanceNorm2dPlus Ran
ran on a synthesized input · constructed an object; no result was computed
bahjat-kawar/snips_torch/runners/ncsn_runner.py
code served (permissive licence) · get_code("7ebe24984ea80e20")
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, InstanceNorm2dPlus: 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)

class InstanceNorm2dPlus(nn.Module):

    def __init__(self, num_features, bias=True):
        super().__init__()
        self.num_features = num_features
        self.bias = bias
        self.instance_norm = nn.InstanceNorm2d(num_features, affine=False, track_running_stats=False)
        self.alpha = nn.Parameter(torch.zeros(num_features))
        self.gamma = nn.Parameter(torch.zeros(num_features))
        self.alpha.data.normal_(1, 0.02)
        self.gamma.data.normal_(1, 0.02)
        if bias:
            self.beta = nn.Parameter(torch.zeros(num_features))

    def forward(self, x):
        means = torch.mean(x, dim=(2, 3))
        m = torch.mean(means, dim=-1, keepdim=True)
        v = torch.var(means, dim=-1, keepdim=True)
        means = (means - m) / torch.sqrt(v + 1e-05)
        h = self.instance_norm(x)
        if self.bias:
            h = h + means[..., None, None] * self.alpha[..., None, None]
            out = self.gamma.view(-1, self.num_features, 1, 1) * h + self.beta.view(-1, self.num_features, 1, 1)
        else:
            h = h + means[..., None, None] * self.alpha[..., None, None]
            out = self.gamma.view(-1, self.num_features, 1, 1) * h
        return out


# Create a small test input tensor: batch_size=2, channels=4, height=3, width=3
x = torch.randn(2, 4, 3, 3)

ARGS = {
    "num_features": 4,
    "bias": 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 InstanceNorm2dPlus — 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 InstanceNorm2dPlus 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
VarianceNorm2d Ran
ran on a synthesized input · constructed an object; no result was computed
bahjat-kawar/snips_torch/runners/ncsn_runner.py
code served (permissive licence) · get_code("a6e7e28620d868f3")
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, VarianceNorm2d: 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)

# VarianceNorm2d expects:
# - num_features: int (number of channels)
# - bias: bool (optional, defaults to False)

# Create a small instance to test
num_features = 4
bias = False

ARGS = {
    "num_features": num_features,
    "bias": bias,
}
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 VarianceNorm2d — 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 VarianceNorm2d 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
general_anneal_Langevin_dynamics Ran
ran; our contract draft was wrong, not the code
bahjat-kawar/snips_torch/runners/ncsn_runner.py
code served (permissive licence) · get_code("1cb35353e2df12d7")
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 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
import torch.nn as nn

torch.manual_seed(0)

# Create a minimal scorer network that takes x_mod and labels
class ScoreNet(nn.Module):
    def __init__(self, img_dim):
        super().__init__()
        self.img_dim = img_dim
        self.linear = nn.Linear(img_dim * img_dim, img_dim * img_dim)
    
    def forward(self, x, labels):
        batch_size = x.shape[0]
        num_frames = x.shape[1]
        flattened = x.view(batch_size, num_frames, -1)
        output = self.linear(flattened)
        return output.view(batch_size, num_frames, self.img_dim, self.img_dim)

# Set up dimensions
batch_size = 2
num_frames = 3
img_dim = 4
latent_dim = 6

# Create H matrix (measurement/forward operator) - must be square for SVD
H = torch.randn(img_dim * img_dim, img_dim * img_dim)

# Create y_0 (observations)
y_0 = torch.randn(batch_size, num_frames, img_dim * img_dim)

# Create x_mod (initial guess for images)
x_mod = torch.randn(batch_size, num_frames, img_dim, img_dim)

# Create scorenet
scorenet = ScoreNet(img_dim)

# Create sigma schedule
sigmas = torch.tensor([1.0, 0.5, 0.1])

ARGS = {
    'H': H,
    'y_0': y_0,
    'x_mod': x_mod,
    'scorenet': scorenet,
    'sigmas': sigmas,
    'n_steps_each': 2,
    'step_lr': 8e-06,
    'final_only': False,
    'verbose': False,
    'denoise': True,
    'c_begin': 0,
    'sigma_0': 1.0
}
Setup block drafted by
a language model, Claude Haiku 4.5, prompt python_fixture_v1, through the batch API
Imports
torch, tqdm — import names as written, not package names to install; a name the repository itself provides is not a package
Returned
type list, ndim 5, 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
get_custom_kernel Ran
ran, honoured the contract we drafted
bahjat-kawar/snips_torch/runners/ncsn_runner.py
code served (permissive licence) · get_code("61e08b48ac22c4de")
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 ndarray, ndim 2, dtype family float, shape (64, 64) 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 numpy as np

ARGS = {
    'type': 'gauss',
    'dim': 8
}
Setup block drafted by
a language model, Claude Haiku 4.5, prompt python_fixture_v1, through the batch API
Imports
numpy, scipy, torch — import names as written, not package names to install; a name the repository itself provides is not a package
Returned
type ndarray, ndim 2, dtype family float, shape (64, 64) — shape (64, 64) 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
inverse_data_transform Ran
ran; our contract draft was wrong, not the code
bahjat-kawar/snips_torch/runners/ncsn_runner.py
code served (permissive licence) · get_code("cd9d1cd248f9be9e")
How it ran

Ran in Syntology's sandbox on this synthesized input (drafted by a language model, Claude Haiku 4.5, prompt python_fixture_v1, through the batch API) and returned Tensor, ndim 4, dtype family float, shape (2, 3, 4, 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

torch.manual_seed(0)

class ConfigStandIn:
    def __init__(self):
        self.image_mean = torch.randn(3, 4, 4)
        self.data = DataConfig()

class DataConfig:
    def __init__(self):
        self.logit_transform = False
        self.rescaled = True

config = ConfigStandIn()
X = torch.randn(2, 3, 4, 4)

ARGS = {
    "config": config,
    "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 4, dtype family float, shape (2, 3, 4, 4) — shape (2, 3, 4, 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
invert_diag Ran
ran; our contract draft was wrong, not the code
bahjat-kawar/snips_torch/runners/ncsn_runner.py
code served (permissive licence) · get_code("4b07870d83869614")
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 (4, 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

torch.manual_seed(0)

# The function invert_diag takes a tensor M and inverts its non-zero diagonal elements
# It uses:
# - torch.zeros_like(M) to create an output tensor
# - M != 0 for masking non-zero elements
# - 1 / M[M != 0] for element-wise inversion

# Create a small tensor with some zero and non-zero values
M = torch.tensor([
    [2.0, 0.0, 4.0, 0.0],
    [0.0, 3.0, 0.0, 5.0],
    [1.0, 0.0, 2.0, 0.0],
    [0.0, 4.0, 0.0, 1.0]
])

ARGS = {
    "M": M
}
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 (4, 4) — shape (4, 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
kernel_to_matrix Ran
ran; the contract check could not run (RAISES, DEP_MISSING or TIMEOUT)
bahjat-kawar/snips_torch/runners/ncsn_runner.py
code served (permissive licence) · get_code("610e5888cc1e256b")
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 ndarray, ndim 2, dtype family float, shape (20, 12) 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 numpy as np

# Create a small kernel (blur filter)
F = np.array([[1, 2], [3, 4]], dtype=np.float32)

# Define signal dimensions
I_row_num = 3
I_col_num = 4

ARGS = {
    "F": F,
    "I_row_num": I_row_num,
    "I_col_num": I_col_num,
}
Setup block drafted by
a language model, Claude Haiku 4.5, prompt python_fixture_v1, through the batch API
Imports
numpy, scipy, torch — import names as written, not package names to install; a name the repository itself provides is not a package
Returned
type ndarray, ndim 2, dtype family float, shape (20, 12) — shape (20, 12) 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
logit_transform Ran
ran; our contract draft was wrong, not the code
bahjat-kawar/snips_torch/runners/ncsn_runner.py
code served (permissive licence) · get_code("778a78e5d08c23b3")
How it ran

Ran in Syntology's sandbox on this synthesized input (drafted by a language model, Claude Haiku 4.5, prompt python_fixture_v1, through the batch API) and returned Tensor, ndim 4, dtype family float, shape (2, 3, 4, 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

torch.manual_seed(0)

# Create a small image tensor with values in [0, 1]
# Shape: (batch=2, channels=3, height=4, width=4)
image = torch.rand(2, 3, 4, 4)

# Define arguments for logit_transform
ARGS = {
    "image": image,
    "lam": 1e-06,
}
Setup block drafted by
a language model, Claude Haiku 4.5, prompt python_fixture_v1, through the batch API
Imports
torch — import names as written, not package names to install; a name the repository itself provides is not a package
Returned
type Tensor, ndim 4, dtype family float, shape (2, 3, 4, 4) — shape (2, 3, 4, 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
vec_to_image Ran
ran; our contract draft was wrong, not the code
bahjat-kawar/snips_torch/runners/ncsn_runner.py
code served (permissive licence) · get_code("38e5424873f17c56")
How it ran

Ran in Syntology's sandbox on this synthesized input (drafted by a language model, Claude Haiku 4.5, prompt python_fixture_v1, through the batch API) and returned Tensor, ndim 4, dtype family float, shape (2, 4, 4, 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

torch.manual_seed(0)

# Create a small tensor with shape (batch=2, channels=4, flattened_spatial=16)
# After reshape, this should become (2, 4, img_dim, img_dim)
# We need v.shape[0] = batch, v.shape[1] = channels, and img_dim x img_dim spatial dims
# So total elements = batch * channels * img_dim * img_dim = 2 * 4 * 4 * 4 = 128

v = torch.randn(2, 4, 16)  # batch=2, channels=4, flattened=16
img_dim = 4

ARGS = {
    "v": v,
    "img_dim": img_dim,
}
Setup block drafted by
a language model, Claude Haiku 4.5, prompt python_fixture_v1, through the batch API
Imports
torch — import names as written, not package names to install; a name the repository itself provides is not a package
Returned
type Tensor, ndim 4, dtype family float, shape (2, 4, 4, 4) — shape (2, 4, 4, 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
CelebA Not yet run
unverified (harvested, no recorded run)
bahjat-kawar/snips_torch/runners/ncsn_runner.py
code served (permissive licence) · get_code("63f6d53e17f2cf08")
How it ran

no invocation recorded.

NCSNRunner Not yet run
unverified (harvested, no recorded run)
bahjat-kawar/snips_torch/runners/ncsn_runner.py
code served (permissive licence) · get_code("b61f91dffbc9686a")
How it ran

no invocation recorded.

NCSNv2 Not yet run
unverified (harvested, no recorded run)
bahjat-kawar/snips_torch/runners/ncsn_runner.py
code served (permissive licence) · get_code("605acc68aa3232ef")
How it ran

no invocation recorded.

NCSNv2Deeper Not yet run
unverified (harvested, no recorded run)
bahjat-kawar/snips_torch/runners/ncsn_runner.py
code served (permissive licence) · get_code("cc27fd891520a914")
How it ran

no invocation recorded.

VisionDataset Not yet run
unverified (harvested, no recorded run)
bahjat-kawar/snips_torch/runners/ncsn_runner.py
code served (permissive licence) · get_code("3a2746c903862ace")
How it ran

no invocation recorded.

data_transform Not yet run
unverified (harvested, no recorded run)
bahjat-kawar/snips_torch/runners/ncsn_runner.py
code served (permissive licence) · get_code("c4a69cb9142a7670")
How it ran

no invocation recorded.

get_dataset Not yet run
unverified (harvested, no recorded run)
bahjat-kawar/snips_torch/runners/ncsn_runner.py
code served (permissive licence) · get_code("44c4f505b4f07dde")
How it ran

no invocation recorded.

get_model Not yet run
unverified (harvested, no recorded run)
bahjat-kawar/snips_torch/runners/ncsn_runner.py
code served (permissive licence) · get_code("ba939dba5d855f41")
How it ran

no invocation recorded.

get_normalization Not yet run
unverified (harvested, no recorded run)
bahjat-kawar/snips_torch/runners/ncsn_runner.py
code served (permissive licence) · get_code("1dc9e4e73ba16aac")
How it ran

no invocation recorded.

mat_by_vec Not yet run
unverified (harvested, no recorded run)
bahjat-kawar/snips_torch/runners/ncsn_runner.py
code served (permissive licence) · get_code("dc7592588979a5a3")
How it ran

no invocation recorded.

Also present in other papers' code

Of 22 samples lifted from this paper's linked repositories, 22 carry a function identity and 0 do not. Of the 22 distinct functions with an identity, 9 are also present in other papers whose code we hold (6 with at least one paper dated earlier, 0 the same month, 8 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
get_normalization
brick of this paper's assembly: helper
4 other papers
1 dated earlier, 3 later · 1 only as an assembly brick
1907.05600 (2019-07)
Generative Modeling by Estimating Gradients of the Data Distribution
2209.03954 (2022-09)
Learning to Generate Realistic LiDAR Point Clouds
2307.11308 (2023-07)
DPM-OT: A New Diffusion Probabilistic Model Based on Optimal Transport
and 1 more not named here
ConditionalInstanceNorm2dPlus
brick of this paper's assembly: helper
2 other papers
1 dated earlier, 1 later · 1 only as an assembly brick
1907.05600 (2019-07)
Generative Modeling by Estimating Gradients of the Data Distribution
2209.03954 (2022-09)
Learning to Generate Realistic LiDAR Point Clouds
ConditionalVarianceNorm2d
brick of this paper's assembly: helper
2 other papers
1 dated earlier, 1 later · 1 only as an assembly brick
1907.05600 (2019-07)
Generative Modeling by Estimating Gradients of the Data Distribution
2209.03954 (2022-09)
Learning to Generate Realistic LiDAR Point Clouds
InstanceNorm2dPlus
brick of this paper's assembly: helper
2 other papers
1 dated earlier, 1 later · 1 only as an assembly brick
1907.05600 (2019-07)
Generative Modeling by Estimating Gradients of the Data Distribution
2209.03954 (2022-09)
Learning to Generate Realistic LiDAR Point Clouds
VarianceNorm2d
brick of this paper's assembly: helper
2 other papers
1 dated earlier, 1 later · 1 only as an assembly brick
1907.05600 (2019-07)
Generative Modeling by Estimating Gradients of the Data Distribution
2209.03954 (2022-09)
Learning to Generate Realistic LiDAR Point Clouds
NCSNv2
brick of this paper's assembly: model
1 other paper
1 dated earlier
1907.05600 (2019-07)
Generative Modeling by Estimating Gradients of the Data Distribution
data_transform
brick of this paper's assembly: helper
1 other paper
1 later
2310.11142 (2023-10)
BayesDiff: Estimating Pixel-wise Uncertainty in Diffusion via Bayesian Inference
inverse_data_transform
brick of this paper's assembly: helper
1 other paper
1 later
2310.11142 (2023-10)
BayesDiff: Estimating Pixel-wise Uncertainty in Diffusion via Bayesian Inference
logit_transform
brick of this paper's assembly: helper
1 other paper
1 later
2310.11142 (2023-10)
BayesDiff: Estimating Pixel-wise Uncertainty in Diffusion via Bayesian Inference

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

In this work we introduce a novel stochastic algorithm dubbed SNIPS, which draws samples from the posterior distribution of any linear inverse problem, where the observation is assumed to be contaminated by additive white Gaussian noise. Our solution incorporates ideas from Langevin dynamics and Newton's method, and exploits a pre-trained minimum mean squared error (MMSE) Gaussian denoiser. The proposed approach relies on an intricate derivation of the posterior score function that includes a singular value decomposition (SVD) of the degradation operator, in order to obtain a tractable iterative algorithm for the desired sampling. Due to its stochasticity, the algorithm can produce multiple high perceptual quality samples for the same noisy observation. We demonstrate the abilities of the proposed paradigm for image deblurring, super-resolution, and compressive sensing. We show that the samples produced are sharp, detailed and consistent with the given measurements, and their diversity exposes the inherent uncertainty in the inverse problem being solved.

For agents

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

get_harvested_code_for_paper("2105.14951")
get_code_for_paper("2105.14951")
have("2105.14951")

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

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

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

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

Connect an agent — have() is free.