SYNTOLOGY HomeExplorerAtlasCodeMethodologyAboutDevelopersFeedPricing
Paper · 2207.02196 · ECCV · 2022

Accelerating Score-based Generative Models with Preconditioned Diffusion Sampling

Li, Xiatian Zhu, Li Zhang, Hengyuan Ma, Jianfeng Feng

arXiv · PDF · Open in the Atlas

Code that ran

5 of 9 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; 4 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/2207.02196.json · badge: /api/ran/2207.02196.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
fudan-zvg/pds marked official in Papers with Code
Papers with Code archive
5 ran · 4 no recorded run
FunctionStatusWhere it lives
NoneCorrector Ran
ran on a synthesized input · constructed an object; no result was computed
fudan-zvg/pds/sampling.py
code served (permissive licence) · get_code("a47db0e7a2395534")
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, NoneCorrector: 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)

# Define a minimal SDE stand-in
class MinimalSDE:
    def __init__(self):
        pass

# Define a minimal score function
class MinimalScoreFn(nn.Module):
    def __init__(self):
        super().__init__()
        self.linear = nn.Linear(4, 4)
    
    def forward(self, x, t):
        return self.linear(x)

# Construct the arguments
sde = MinimalSDE()
score_fn = MinimalScoreFn()
snr = 0.1
n_steps = 10

ARGS = {
    'sde': sde,
    'score_fn': score_fn,
    'snr': snr,
    'n_steps': n_steps
}
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 NoneCorrector — 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 NoneCorrector 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
NonePredictor Ran
ran on a synthesized input · constructed an object; no result was computed
fudan-zvg/pds/sampling.py
code served (permissive licence) · get_code("38de9882d8ed3be3")
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, NonePredictor: 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 abc

torch.manual_seed(0)

# Create a minimal SDE mock that has a reverse method
class MockSDE:
    def __init__(self):
        pass
    
    def reverse(self, score_fn, probability_flow):
        return MockReverseSDE()

class MockReverseSDE:
    def __init__(self):
        pass

# Create a minimal score function (can be a simple nn.Module or callable)
class MockScoreFn(nn.Module):
    def __init__(self):
        super().__init__()
        self.linear = nn.Linear(4, 4)
    
    def forward(self, x, t):
        return self.linear(x)

# Build the arguments
sde = MockSDE()
score_fn = MockScoreFn()
probability_flow = False

ARGS = {
    'sde': sde,
    'score_fn': score_fn,
    'probability_flow': probability_flow
}
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 NonePredictor — 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 NonePredictor 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
dft2d Ran
ran; our contract draft was wrong, not the code
fudan-zvg/pds/sampling.py
code served (permissive licence) · get_code("5df6dcb7a359ac39")
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, 5) 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.fft import ifft, fft

torch.manual_seed(0)

# dft2d performs FFT along dimensions 2 and 3
# So x needs to be at least 4D: (batch, channels, dim2, dim3)
x = torch.randn(2, 3, 4, 5)

ARGS = {
    '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, 5) — shape (2, 3, 4, 5) 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
get_pc_sampler Ran
ran; our contract draft was wrong, not the code
fudan-zvg/pds/sampling.py
code served (permissive licence) · get_code("30c016ba85e5c3ba")
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) and returned function. The image it ran in was not recorded. The code mentions cuda, and the harness aliases cuda to the CPU for every sample; whether this run needed that is 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 functools

torch.manual_seed(0)

# Create a minimal SDE class
class MinimalSDE:
    def __init__(self):
        self.T = 1.0
    
    def reverse(self, score_fn, probability_flow=False):
        return self

# Create a minimal score model
class MinimalScoreModel(nn.Module):
    def __init__(self):
        super().__init__()
        self.linear = nn.Linear(4, 4)
    
    def forward(self, x, t):
        return self.linear(x)

# Create a minimal mutils module with get_score_fn
class mutils:
    @staticmethod
    def get_score_fn(sde, model, train=False, continuous=False):
        def score_fn(x, t):
            return model(x, t)
        return score_fn

# Inject mutils into the module namespace for the function to use
import sys
current_module = sys.modules[__name__]
current_module.mutils = mutils

# Create minimal predictor and corrector classes
class MinimalPredictor:
    def __init__(self, sde, score_fn, probability_flow=False):
        self.sde = sde
        self.score_fn = score_fn
    
    def update_fn(self, x, t, space_mask=None, freq_mask=None):
        return (x, x)

class MinimalCorrector:
    def __init__(self, sde, score_fn, snr, n_steps):
        self.sde = sde
        self.score_fn = score_fn
    
    def update_fn(self, x, t, space_mask=None, freq_mask=None):
        return (x, x)

# Create inverse scaler function
def inverse_scaler(x):
    return x

# Create test data
sde = MinimalSDE()
shape = (2, 3, 4, 5)  # batch=2, channels=3, height=4, width=5
model = MinimalScoreModel()
predictor = MinimalPredictor
corrector = MinimalCorrector

ARGS = {
    'sde': sde,
    'shape': shape,
    'predictor': predictor,
    'corrector': corrector,
    'inverse_scaler': inverse_scaler,
    'snr': 0.1,
    'n_steps': 1,
    'probability_flow': False,
    'continuous': False,
    'denoise': True,
    'eps': 0.001,
    'device': 'cpu',
    'space_mask': None,
    'freq_mask': None,
}
Setup block drafted by
a language model, Claude Haiku 4.5, prompt python_fixture_v1
Imports
torch — import names as written, not package names to install; a name the repository itself provides is not a package
Returned
type function — a function output has no array shape of its own; none is stated — the instrument coerces any output to an array; for a function 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
idft2d Ran
ran; our contract draft was wrong, not the code
fudan-zvg/pds/sampling.py
code served (permissive licence) · get_code("d1f7b1355cac7b94")
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, 5) 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 as nn

torch.manual_seed(0)

# idft2d applies ifft twice: once on dim=2, then on dim=3
# This requires a complex-valued tensor with at least 4 dimensions
# The function expects x to support ifft operations on dims 2 and 3

# Create a small complex tensor with shape (batch=2, channels=3, height=4, width=5)
x = torch.randn(2, 3, 4, 5, dtype=torch.complex64)

ARGS = {
    '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, 5) — shape (2, 3, 4, 5) 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
Corrector Not yet run
unverified (harvested, no recorded run)
fudan-zvg/pds/sampling.py
code served (permissive licence) · get_code("8b4d3dbe438a7256")
How it ran

no invocation recorded.

Predictor Not yet run
unverified (harvested, no recorded run)
fudan-zvg/pds/sampling.py
code served (permissive licence) · get_code("ccb989dac7906e74")
How it ran

no invocation recorded.

shared_corrector_update_fn Not yet run
unverified (harvested, no recorded run)
fudan-zvg/pds/sampling.py
code served (permissive licence) · get_code("ce9148fdfa6ee740")
How it ran

no invocation recorded.

shared_predictor_update_fn Not yet run
unverified (harvested, no recorded run)
fudan-zvg/pds/sampling.py
code served (permissive licence) · get_code("0a6fc1e303e70fac")
How it ran

no invocation recorded.

Also present in other papers' code

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

Score-based generative models (SGMs) have recently emerged as a promising class of generative models. However, a fundamental limitation is that their inference is very slow due to a need for many (e.g., 2000) iterations of sequential computations. An intuitive acceleration method is to reduce the sampling iterations which however causes severe performance degradation. We investigate this problem by viewing the diffusion sampling process as a Metropolis adjusted Langevin algorithm, which helps reveal the underlying cause to be ill-conditioned curvature. Under this insight, we propose a model-agnostic preconditioned diffusion sampling (PDS) method that leverages matrix preconditioning to alleviate the aforementioned problem. Crucially, PDS is proven theoretically to converge to the original target distribution of a SGM, no need for retraining. Extensive experiments on three image datasets with a variety of resolutions and diversity validate that PDS consistently accelerates off-the-shelf SGMs whilst maintaining the synthesis quality. In particular, PDS can accelerate by up to 29× on more challenging high resolution (1024×1024) image generation.

For agents

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

get_harvested_code_for_paper("2207.02196")
get_code_for_paper("2207.02196")
have("2207.02196")

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

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

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

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

Connect an agent — have() is free.