SYNTOLOGY HomeExplorerAtlasCodeMethodologyAboutDevelopersFeedPricing
Paper · 2510.07343 · ICML · 2025

Local MAP Sampling for Diffusion Models

Greg Steeg, Rob Brekelmans, Shaorong Zhang

arXiv · PDF · Open in the Atlas

Code that ran

5 of 7 samples (functions and classes) lifted from this paper's linked repositories executed on a synthesized input in Syntology's jail (2 of them constructed an object rather than computing a result; 0 honoured the contract we drafted, 0 violated it and 2 have 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/2510.07343.json · badge: /api/ran/2510.07343.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
NVlabs/ffhq-dataset canonical (classifier label)
classifier basis: census
2 ran · 0 no recorded run
szhan311/lmaps community
Papers with Code archive
3 ran · 2 no recorded run
FunctionStatusWhere it lives
DiffusionSampler Ran
ran on a synthesized input · constructed an object; no result was computed
szhan311/lmaps/algo/lmaps.py
code served (permissive licence) · get_code("d63b0ad54157347d")
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, DiffusionSampler: 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)

class SimpleScheduler:
    """Minimal scheduler with required attributes for DiffusionSampler"""
    def __init__(self, num_steps=5):
        self.num_steps = num_steps
        self.sigma_max = 10.0
        self.sigma_steps = torch.linspace(10.0, 0.1, num_steps)
        self.factor_steps = torch.linspace(0.9, 0.1, num_steps)
        self.scaling_factor = torch.linspace(1.0, 0.5, num_steps)
        self.scaling_steps = torch.linspace(1.0, 0.8, num_steps)

class SimpleDiffusionModel(nn.Module):
    """Minimal diffusion model that the sampler calls with (x, sigma)"""
    def __init__(self):
        super().__init__()
        self.linear = nn.Linear(4, 4)
    
    def forward(self, x, sigma):
        # Model takes x and sigma and returns predictions
        # The sampler uses this to compute scores
        return self.linear(x)

scheduler = SimpleScheduler(num_steps=5)
model = SimpleDiffusionModel()
x_start = torch.randn(2, 4)

ARGS = {
    'scheduler': scheduler,
    'solver': 'euler'
}
Setup block drafted by
a language model, Claude Haiku 4.5, prompt python_fixture_v1, through the batch API
Imports
numpy, torch, tqdm — import names as written, not package names to install; a name the repository itself provides is not a package
Returned
type DiffusionSampler — 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 DiffusionSampler 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
Scheduler Ran
ran on a synthesized input · constructed an object; no result was computed
szhan311/lmaps/algo/lmaps.py
code served (permissive licence) · get_code("f7be343c247d4d21")
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, Scheduler: 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 numpy as np

ARGS = {
    "num_steps": 10,
    "sigma_max": 100.0,
    "sigma_min": 0.01,
    "sigma_final": None,
    "schedule": "linear",
    "timestep": "poly-7",
    "scaling": "none",
}
Setup block drafted by
a language model, Claude Haiku 4.5, prompt python_fixture_v1, through the batch API
Imports
numpy — import names as written, not package names to install; a name the repository itself provides is not a package
Returned
type Scheduler — 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 Scheduler 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
choose_bytes_unit Ran
ran; our contract draft was wrong, not the code
NVlabs/ffhq-dataset/download_ffhq.py
pointer only (licence: NOASSERTION) · get_code("7498d9df51caac8b")
How it ran

The body of this sample is withheld: GitHub could not classify the licence of this paper's repository, NVlabs/ffhq-dataset (NOASSERTION). 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.

format_time Ran
ran; our contract draft was wrong, not the code
NVlabs/ffhq-dataset/download_ffhq.py
pointer only (licence: NOASSERTION) · get_code("15468ee07dd1a1d9")
How it ran

The body of this sample is withheld: GitHub could not classify the licence of this paper's repository, NVlabs/ffhq-dataset (NOASSERTION). 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.

lmaps Ran
ran; our contract draft was wrong, not the code
szhan311/lmaps/algo/lmaps.py
code served (permissive licence) · get_code("11e947cd55c389b9")
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, ndim 3, 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)

class MockOperator(nn.Module):
    """Mock operator that implements the gradient method."""
    def __init__(self):
        super().__init__()
    
    def gradient(self, x, measurement):
        """Compute gradient for the operator."""
        # Simple mock: return a gradient-like tensor of same shape as x
        return torch.randn_like(x) * 0.1

operator = MockOperator()

# Create small tensors with distinct dimensions
x0hat = torch.randn(2, 4)  # batch size 2, feature dim 4
measurement = torch.randn(2, 3)  # different size to distinguish

ARGS = {
    'x0hat': x0hat,
    'operator': operator,
    'measurement': measurement,
    'sigma': 1.0,
    'num_steps': 10,
    'lr': 1.0,
    'thre': 0.05,
    'lr_decay_rate': 0.95,
    'boot': 0,
    'rho': 1.0,
    'noise_cal': False,
    'alpha_t': 1
}
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, ndim 3, dtype family float — 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
Algo Not yet run
unverified (harvested, no recorded run)
szhan311/lmaps/algo/lmaps.py
code served (permissive licence) · get_code("c2edba7bb220dc45")
How it ran

no invocation recorded.

LMAPS Not yet run
unverified (harvested, no recorded run)
szhan311/lmaps/algo/lmaps.py
code served (permissive licence) · get_code("4e2f73bdb5596b16")
How it ran

no invocation recorded.

Also present in other papers' code

Of 7 samples lifted from this paper's linked repositories, 7 carry a function identity and 0 do not. Of the 7 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 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.

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 Posterior Sampling (DPS) provides a principled Bayesian approach to inverse problems by sampling from p(x 0 | y). While posterior sampling is valuable for capturing uncertainty and multi-modality, many classical and practical inverse problem settings ultimately prioritize accurate point estimation-most notably the MAP estimator, which has long served as a standard reconstruction objective in imaging and scientific applications. We introduce Local MAP Sampling (LMAPS), a new inference framework that iteratively solving local MAP subproblems along the diffusion trajectory. This perspective clarifies their connection to global MAP and DPS, offering a unified probabilistic interpretation for optimization-based methods. Building on this foundation, we develop practical algorithms with a covariance approximation motivated by Gaussian prior assumption, a reformulated objective for stability and interpretability. Across a broad set of image restoration and scientific tasks, LMAPS achieves state-of-the-art performance.

For agents

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

get_harvested_code_for_paper("2510.07343")
get_code_for_paper("2510.07343")
have("2510.07343")

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

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

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

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

Connect an agent — have() is free.