SYNTOLOGY HomeExplorerAtlasCodeMethodologyAboutDevelopersFeedPricing
Paper · 2206.00941 · NeurIPS · 2022

Improving Diffusion Models for Inverse Problems using Manifold Constraints

Jong Ye, Hyungjin Chung, Byeongsu Sim, Dohoon Ryu, Dept Of Bio, Brain Engineering

arXiv · PDF · Open in the Atlas

Code that ran

2 of 8 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; 0 honoured the contract we drafted, 0 violated it and 2 have no contract verdict; 0 failures of our instrument; 6 no recorded run), measured 2026-11-22; 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/2206.00941.json · badge: /api/ran/2206.00941.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
hj-harry/mcg_diffusion alias (classifier label)
classifier basis: classifier_2025
2 ran · 3 no recorded run
gzhu06/MCG-ipynb community (classifier label)
classifier basis not recorded on the link
0 ran · 3 no recorded run
FunctionStatusWhere it lives
VPSDE Ran
ran on a synthesized input
hj-harry/mcg_diffusion/sampling.py
code served (permissive licence) · get_code("015a4d15cac88499")
How it ran

Ran in Syntology's sandbox on this synthesized input (drafted by a language model, class construct-then-call prompt, model not recorded) 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 numpy as np

# VPSDE is an SDE subclass that implements variance-preserving diffusion
# The main computation methods are: sde, marginal_prob, prior_sampling, prior_logp, discretize, and reverse

# For this setup, we'll test the `sde` method which takes x and t as inputs
# and returns drift and diffusion

INIT_ARGS = {
    'beta_min': 0.1,
    'beta_max': 20.0,
    'N': 1000
}

# The sde method expects:
# - x: a torch tensor of shape (batch, channels, height, width)
# - t: a torch tensor of shape (batch,) with time values in [0, 1]

batch_size = 2
channels = 3
height = 8
width = 8

x = torch.randn(batch_size, channels, height, width)
t = torch.rand(batch_size)  # time values between 0 and 1

ARGS = {
    'x': x,
    't': t
}

METHOD = 'sde'
Setup block drafted by
a language model, class construct-then-call prompt, model not recorded
Imports
numpy, 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: torch and numpy seeded to 0 by the harness immediately before the class was constructed from INIT_ARGS (fixture_check.py)
subVPSDE Ran
ran on a synthesized input
hj-harry/mcg_diffusion/sampling.py
code served (permissive licence) · get_code("3dd4af5d1e0dc91b")
How it ran

Ran in Syntology's sandbox on this synthesized input (drafted by a language model, class construct-then-call prompt, model not recorded) 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 numpy as np

# Define a simple mock score function for testing
def mock_score_fn(x, t):
    """A simple score function that returns zeros with the same shape as x."""
    return torch.zeros_like(x)

# INIT_ARGS for subVPSDE.__init__
INIT_ARGS = {
    'beta_min': 0.1,
    'beta_max': 20.0,
    'N': 100
}

# For testing, we'll call the sde() method which is a core computation method
METHOD = 'sde'

# ARGS for the sde() method
# sde(self, x, t) expects:
# - x: a torch tensor (typically a batch of images)
# - t: a torch tensor of time values (one per batch element)

batch_size = 2
channels = 3
height = 8
width = 8

x = torch.randn(batch_size, channels, height, width)
t = torch.rand(batch_size)  # time values between 0 and 1

ARGS = {
    'x': x,
    't': t
}
Setup block drafted by
a language model, class construct-then-call prompt, model not recorded
Imports
numpy, 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: torch and numpy seeded to 0 by the harness immediately before the class was constructed from INIT_ARGS (fixture_check.py)
LangevinCorrectorCS Not yet run
unverified (harvested, no recorded run)
hj-harry/mcg_diffusion/sampling.py
code served (permissive licence) · get_code("1052cae517da3787")
How it ran

no invocation recorded.

SDE Not yet run
unverified (harvested, no recorded run)
hj-harry/mcg_diffusion/sampling.py
code served (permissive licence) · get_code("a339add524522cf7")
How it ran

no invocation recorded.

VESDE Not yet run
unverified (harvested, no recorded run)
hj-harry/mcg_diffusion/sampling.py
code served (permissive licence) · get_code("0447da452ed5a268")
How it ran

no invocation recorded.

create_classifier_and_diffusion Not yet run
unverified (harvested, no recorded run)
gzhu06/MCG-ipynb/guided_diffusion/script_util.py
code served (permissive licence) · get_code("5e5d99a81705a07f")
How it ran

no invocation recorded.

create_model Not yet run
unverified (harvested, no recorded run)
gzhu06/MCG-ipynb/guided_diffusion/script_util.py
code served (permissive licence) · get_code("35ea054532112e53")
How it ran

no invocation recorded.

create_model_and_diffusion Not yet run
unverified (harvested, no recorded run)
gzhu06/MCG-ipynb/guided_diffusion/script_util.py
code served (permissive licence) · get_code("13bf955284791eec")
How it ran

no invocation recorded.

Also present in other papers' code

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

FunctionAlso present inEarliest-datedOthers named
create_classifier_and_diffusion 9 other papers
1 dated earlier, 1 the same month, 7 later
2111.14818 (2021-11)
Blended Diffusion for Text-driven Editing of Natural Images
2206.10550 (2022-06)
(Certified!!) Adversarial Robustness for Free!
2212.00490 (2022-12)
Zero-Shot Image Restoration Using Denoising Diffusion Null-Space Model
and 6 more not named here
create_model 8 other papers
1 dated earlier, 1 the same month, 6 later
2111.14818 (2021-11)
Blended Diffusion for Text-driven Editing of Natural Images
2206.10550 (2022-06)
(Certified!!) Adversarial Robustness for Free!
2303.01469 (2023-03)
Consistency Models
and 5 more not named here

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-22.

Repositories linked to this paper

Some links come from the archived Papers with Code dataset (CC BY-SA 4.0): attribution and licence.

Abstract

Recently, diffusion models have been used to solve various inverse problems in an unsupervised manner with appropriate modifications to the sampling process. However, the current solvers, which recursively apply a reverse diffusion step followed by a projection-based measurement consistency step, often produce suboptimal results. By studying the generative sampling path, here we show that current solvers throw the sample path off the data manifold, and hence the error accumulates. To address this, we propose an additional correction term inspired by the manifold constraint, which can be used synergistically with the previous solvers to make the iterations close to the manifold. The proposed manifold constraint is straightforward to implement within a few lines of code, yet boosts the performance by a surprisingly large margin. With extensive experiments, we show that our method is superior to the previous methods both theoretically and empirically, producing promising results in many applications such as image inpainting, colorization, and sparse-view computed tomography. Code available here 36th Conference on Neural Information Processing Systems (NeurIPS 2022).

For agents

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

get_harvested_code_for_paper("2206.00941")
get_code_for_paper("2206.00941")
have("2206.00941")

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

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

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

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

Connect an agent — have() is free.