SYNTOLOGY HomeExplorerAtlasCodeMethodologyAboutDevelopersFeedPricing
Paper · 2605.30330 · 2026

When, why, and how do diffusion posterior samplers fail? A finite-sample lens

Benjamin Burns, Sara Fridovich-Keil

arXiv · PDF

Code that ran

4 of 6 samples (functions and classes) lifted from this paper's linked repositories executed on a synthesized input in Syntology's jail (1 of them constructed an object rather than computing a result; 0 honoured the contract we drafted, 0 violated it and 1 has no contract verdict; 3 failures of our instrument; 2 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/2605.30330.json · badge: /api/ran/2605.30330.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
voilalab/diagnosing-posterior-sampling community
Papers with Code archive
4 ran · 2 no recorded run
FunctionStatusWhere it lives
ForwardModel Ran
ran on a synthesized input · constructed an object; no result was computed
voilalab/diagnosing-posterior-sampling/src/scores/fsr.py
code served (permissive licence) · get_code("4a64fd65d09693b1")
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, ForwardModel: 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
from collections.abc import Callable
from dataclasses import dataclass

torch.manual_seed(0)

# Define a simple forward model function
def simple_forward_fn(x: torch.Tensor) -> torch.Tensor:
    """A simple linear forward operator: y = 2*x"""
    return 2 * x

# Define a simple derivative function
def simple_derivative_fn(x: torch.Tensor) -> torch.Tensor:
    """Derivative of the forward operator"""
    return 2 * torch.ones_like(x)

ARGS = {
    'fn': simple_forward_fn,
    'derivative': simple_derivative_fn,
    'name': 'linear_operator',
    'description': 'A simple linear forward operator',
    'is_linear': 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 ForwardModel — 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 ForwardModel 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
alpha_bar_from_times Ran
ran; our contract draft was wrong, not the code
voilalab/diagnosing-posterior-sampling/src/scores/fsr.py
code served (permissive licence) · get_code("3f5d59319cfef4d2")
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

torch.manual_seed(0)

# times: a tensor of time values where we want to evaluate alpha_bar
# These should be scalar values or a batch of scalars
times = torch.tensor([0.0, 0.5, 1.0, 1.5])

# beta_min: minimum beta value for the noise schedule
beta_min = 0.0001

# beta_max: maximum beta value for the noise schedule
beta_max = 0.02

ARGS = {
    "times": times,
    "beta_min": beta_min,
    "beta_max": beta_max,
}
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
likelihood_prefactor Ran
ran; our contract draft was wrong, not the code
voilalab/diagnosing-posterior-sampling/src/scores/fsr.py
code served (permissive licence) · get_code("373323e528bd487d")
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 (2,) 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)

# times: (B,) diffusion times - batch of 2 time values
times = torch.tensor([0.1, 0.5])

# beta_min: minimum beta of noise schedule - small positive float
beta_min = 0.0001

# beta_max: maximum beta of noise schedule - larger positive float
beta_max = 0.02

# clamp_denominator: whether to clamp (1 - alpha) to 1e-8
clamp_denominator = True

ARGS = {
    "times": times,
    "beta_min": beta_min,
    "beta_max": beta_max,
    "clamp_denominator": clamp_denominator,
}
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 (2,) — shape (2,) 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
prior_terms Ran
ran; the contract check could not run (RAISES, DEP_MISSING or TIMEOUT)
voilalab/diagnosing-posterior-sampling/src/scores/fsr.py
code served (permissive licence) · get_code("2e279a28c3567b38")
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)

# Parameters for prior_terms function
B = 2  # batch size
D = 4  # state dimension
N = 3  # number of training points

x_t = torch.randn(B, D)
times = torch.linspace(0.1, 0.9, B)
training_data = torch.randn(N, D)
beta_min = 0.0001
beta_max = 0.02

ARGS = {
    "x_t": x_t,
    "times": times,
    "training_data": training_data,
    "beta_min": beta_min,
    "beta_max": beta_max,
}
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
FSR Not yet run
unverified (harvested, no recorded run)
voilalab/diagnosing-posterior-sampling/src/scores/fsr.py
code served (permissive licence) · get_code("c4ad6a763a9f36e2")
How it ran

no invocation recorded.

LikelihoodApproximation Not yet run
unverified (harvested, no recorded run)
voilalab/diagnosing-posterior-sampling/src/scores/fsr.py
code served (permissive licence) · get_code("e5b997b34fe52452")
How it ran

no invocation recorded.

Also present in other papers' code

Of 6 samples lifted from this paper's linked repositories, 6 carry a function identity and 0 do not. Of the 6 distinct functions with an identity, 0 are also present in other papers whose code we hold (0 with at least one paper dated earlier, 0 the same month, 0 later) and 6 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.

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

Diffusion models have excellent capacity to model complex distributions of natural data, which has made them a popular and effective choice for posterior sampling in imaging inverse problems. Existing methods can incorporate any measurement model at inference time but must use an inexact approximation for the likelihood at intermediate timesteps for computational tractability. Although these approximations can often work well empirically, their downstream effect on the sampled posterior is poorly understood and can result in unexplained failures. To understand when, why, and how these likelihood approximations propagate to erroneous posterior distributions, we introduce a finite-sample perspective on posterior sampling that approximates the posterior to arbitrary precision as training set size tends towards infinity, for any forward model and prior distribution. Using this finite-sample lens, we observe that popular posterior sampling approximations tend to under-or over-estimate the spread of the posterior at intermediate timesteps, causing downstream consequences including sensitivity to early stopping time, inaccurate relative weighting of posterior modes, and hallucination, both of prior modes that are not in the posterior and likelihood modes that are not supported by the prior. Moreover, we find that the cause of these posterior errors requires neither a nonlinear measurement model nor a multimodal posterior, but can arise solely due to a multimodal prior and inaccurate posterior spread at intermediate sampling times. Our finite-sample posterior sampling approach is agnostic to the type of likelihood approximation and the type of (linear or nonlinear) forward model, and can thus serve as a drop-in diagnostic to evaluate the accuracy and failure modes of existing and future posterior samplers. All code for experiments is available at: https://github.com/voilalab/diagnosing-posterior-sampling.

For agents

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

get_harvested_code_for_paper("2605.30330")
get_code_for_paper("2605.30330")
have("2605.30330")

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

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

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

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

Connect an agent — have() is free.