SYNTOLOGY HomeExplorerAtlasCodeMethodologyAboutDevelopersFeedPricing
Paper · 2301.07969 · 2023

Fast Inference in Denoising Diffusion Models via MMD Finetuning

arXiv · PDF · Open in the Atlas

Code that ran

11 of 13 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, 1 violated it and 4 have no contract verdict; 6 failures of our instrument; 2 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/2301.07969.json · badge: /api/ran/2301.07969.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
diegovalsesia/mmd-ddm canonical (classifier label)
classifier basis not recorded on the link
11 ran · 2 no recorded run
FunctionStatusWhere it lives
check_integrity Ran
ran, violated the contract we drafted
diegovalsesia/mmd-ddm/datasets/utils.py
pointer only (licence: MIT); the stored copy get_code serves, from xingyu-zheng/bidm, is pointer only (licence: NONE) · get_code("7345763c9b9300fb")
How it ran

The body of this sample is withheld: this paper's link allows the body inline (MIT), but get_code serves the stored copy, first harvested from xingyu-zheng/bidm, and GitHub detected no licence in that repository when it was checked. 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.

generate_random_projection Ran
ran on a synthesized input
diegovalsesia/mmd-ddm/functions/losses.py
code served (permissive licence) · get_code("78d16420c817a5ba")
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, 3) 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)

ARGS = {
    "n_features": 4,
    "n_projections": 3,
    "device": torch.device("cpu")
}
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, 3) — shape (4, 3) 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_timestep_embedding Ran
ran; the contract check could not run (RAISES, DEP_MISSING or TIMEOUT)
diegovalsesia/mmd-ddm/models/diffusion.py
code served (permissive licence) · get_code("cb49209c125de1b4")
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 Tensor, ndim 2, dtype family float, shape (2, 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
import math

torch.manual_seed(0)

# The function takes two parameters:
# 1. timesteps: a 1D tensor of timestep indices
# 2. embedding_dim: an integer specifying the embedding dimension

# Create a small 1D tensor of timesteps (batch size 2)
timesteps = torch.tensor([0, 5], dtype=torch.int64)

# Create an embedding dimension (use 4 as specified)
embedding_dim = 4

ARGS = {
    "timesteps": timesteps,
    "embedding_dim": embedding_dim,
}
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 Tensor, ndim 2, dtype family float, shape (2, 4) — shape (2, 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
list_dir Ran
ran; our contract draft was wrong, not the code
diegovalsesia/mmd-ddm/datasets/utils.py
pointer only (licence: MIT); the stored copy get_code serves, from xiaoboxia/T-Revision, is pointer only (licence: NONE) · get_code("915e1c6c38494be9")
How it ran

The body of this sample is withheld: this paper's link allows the body inline (MIT), but get_code serves the stored copy, first harvested from xiaoboxia/T-Revision, and GitHub detected no licence in that repository when it was checked. 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.

list_files Ran
ran; our contract draft was wrong, not the code
diegovalsesia/mmd-ddm/datasets/utils.py
pointer only (licence: MIT); the stored copy get_code serves, from xiaoboxia/T-Revision, is pointer only (licence: NONE) · get_code("208e196e9582a9a6")
How it ran

The body of this sample is withheld: this paper's link allows the body inline (MIT), but get_code serves the stored copy, first harvested from xiaoboxia/T-Revision, and GitHub detected no licence in that repository when it was checked. 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.

md5_hash Ran
ran; our contract draft was wrong, not the code
diegovalsesia/mmd-ddm/functions/ckpt_util.py
pointer only (licence: MIT); the stored copy get_code serves, from zh460045050/V2L-Tokenizer, is pointer only (licence: NONE) · get_code("07d90bd6ae1be7db")
How it ran

The body of this sample is withheld: this paper's link allows the body inline (MIT), but get_code serves the stored copy, first harvested from zh460045050/V2L-Tokenizer, and GitHub detected no licence in that repository when it was checked. 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.

noise_estimation_loss Ran
ran; our contract draft was wrong, not the code
diegovalsesia/mmd-ddm/functions/losses.py
code served (permissive licence) · get_code("36a45cceb1209d2f")
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 0, dtype family float, shape () 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)

# Define a simple model that takes (x, t) and outputs noise prediction
class NoisePredictor(nn.Module):
    def __init__(self):
        super().__init__()
        self.linear = nn.Linear(4, 4)
    
    def forward(self, x, t):
        # x shape: (batch, channels, height, width) = (2, 1, 1, 4)
        # t shape: (batch,) converted to float
        # output should match x shape
        batch_size = x.shape[0]
        x_flat = x.view(batch_size, -1)
        # t is (batch,), expand it to match
        t_expanded = t.unsqueeze(1)  # (batch, 1)
        combined = x_flat + t_expanded  # simple combination
        output = self.linear(combined)
        return output.view(batch_size, 1, 1, 4)

model = NoisePredictor()

# x0: original clean image, shape (batch=2, channels=1, height=1, width=4)
x0 = torch.randn(2, 1, 1, 4)

# t: timesteps, shape (batch=2,)
t = torch.LongTensor([0, 5])

# e: noise, same shape as x0
e = torch.randn(2, 1, 1, 4)

# b: betas (noise schedule), shape (num_timesteps,) - needs at least 6 elements for index 5
b = torch.linspace(0.0001, 0.02, 10)

ARGS = {
    "model": model,
    "x0": x0,
    "t": t,
    "e": e,
    "b": b,
    "keepdim": 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 Tensor, ndim 0, dtype family float, shape () — shape () 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
nonlinearity Ran
ran; our contract draft was wrong, not the code
diegovalsesia/mmd-ddm/models/diffusion.py
code served (permissive licence) · get_code("3137073275f8c21a")
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 Tensor, ndim 2, dtype family float, shape (2, 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 takes a single parameter 'x' which is used with:
# - multiplication operator (*)
# - torch.sigmoid() function
# This means x should be a tensor

x = torch.randn(2, 4)

ARGS = {
    "x": x
}
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 Tensor, ndim 2, dtype family float, shape (2, 4) — shape (2, 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
resnet20 Ran
ran on a synthesized input
diegovalsesia/mmd-ddm/models/resnet.py
code served (permissive licence) · get_code("e58bdb43e48b0fd1")
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 ResNet. 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)

ARGS = {
    'num_classes': 100
}
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 ResNet — a ResNet output has no array shape of its own; none is stated — the instrument coerces any output to an array; for a ResNet 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
resnet32 Ran
ran on a synthesized input
diegovalsesia/mmd-ddm/models/resnet.py
code served (permissive licence) · get_code("0afc6fa486224b4e")
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 ResNet. 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)

ARGS = {
    'num_classes': 100
}
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 ResNet — a ResNet output has no array shape of its own; none is stated — the instrument coerces any output to an array; for a ResNet 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
resnet44 Ran
ran on a synthesized input
diegovalsesia/mmd-ddm/models/resnet.py
code served (permissive licence) · get_code("487643556106dfaa")
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 ResNet. 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)

ARGS = {
    "num_classes": 100
}
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 ResNet — a ResNet output has no array shape of its own; none is stated — the instrument coerces any output to an array; for a ResNet 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
get_ckpt_path Not yet run
unverified (harvested, no recorded run)
diegovalsesia/mmd-ddm/functions/ckpt_util.py
code served (permissive licence) · get_code("d337241a56b82903")
How it ran

no invocation recorded.

get_timestep_embedding_batched Not yet run
unverified (harvested, no recorded run)
diegovalsesia/mmd-ddm/models/diffusion.py
code served (permissive licence) · get_code("e6461303bdb1b6c4")
How it ran

no invocation recorded.

Also present in other papers' code

Of 13 samples lifted from this paper's linked repositories, 13 carry a function identity and 0 do not. Of the 13 distinct functions with an identity, 7 are also present in other papers whose code we hold (7 with at least one paper dated earlier, 6 the same month, 7 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
nonlinearity 156 other papers
21 dated earlier, 1 the same month, 133 later, 1 same year, order not determinable · 25 only as an assembly brick
2104.07652 (2021-04)
Geometry-Free View Synthesis: Transformers and no 3D Priors
2106.00132 (2021-06)
On Fast Sampling of Diffusion Probabilistic Models
2106.06819 (2021-06)
D2C: Diffusion-Denoising Models for Few-shot Conditional Generation
and 153 more not named here
get_timestep_embedding 91 other papers
16 dated earlier, 2 the same month, 72 later, 1 same year, order not determinable · 7 only as an assembly brick
2104.07652 (2021-04)
Geometry-Free View Synthesis: Transformers and no 3D Priors
2106.00132 (2021-06)
On Fast Sampling of Diffusion Probabilistic Models
2106.06819 (2021-06)
D2C: Diffusion-Denoising Models for Few-shot Conditional Generation
and 88 more not named here
md5_hash 30 other papers
5 dated earlier, 1 the same month, 23 later, 1 same year, order not determinable
2008.01777 (2020-08)
Making Sense of CNNs: Interpreting Deep Representations & Their Invariances with INNs
2104.07652 (2021-04)
Geometry-Free View Synthesis: Transformers and no 3D Priors
2112.00384 (2021-12)
Exploration into Translation-Equivariant Image Quantization
and 27 more not named here
list_dir 19 other papers
7 dated earlier, 1 the same month, 10 later, 1 same year, order not determinable
1803.02999 (2018-03)
On First-Order Meta-Learning Algorithms
1903.12648 (2019-03)
Overcoming Catastrophic Forgetting with Unlabeled Data in the Wild
1906.00189 (2019-06)
Are Anchor Points Really Indispensable in Label-Noise Learning?
and 16 more not named here
check_integrity 16 other papers
4 dated earlier, 1 the same month, 10 later, 1 same year, order not determinable
1908.07724 (2019-08)
Restricted Recurrent Neural Networks
2206.02262 (2022-06)
Diffusion-GAN: Training GANs with Diffusion
2210.11633 (2022-10)
Graphically Structured Diffusion Models
and 13 more not named here
list_files 16 other papers
7 dated earlier, 1 the same month, 8 later
1803.02999 (2018-03)
On First-Order Meta-Learning Algorithms
1903.12648 (2019-03)
Overcoming Catastrophic Forgetting with Unlabeled Data in the Wild
1906.00189 (2019-06)
Are Anchor Points Really Indispensable in Label-Noise Learning?
and 13 more not named here
noise_estimation_loss 14 other papers
3 dated earlier, 11 later
2106.06819 (2021-06)
D2C: Diffusion-Denoising Models for Few-shot Conditional Generation
2206.02262 (2022-06)
Diffusion-GAN: Training GANs with Diffusion
2211.14680 (2022-11)
A Physics-informed Diffusion Model for High-fidelity Flow Field Reconstruction
and 11 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

Denoising Diffusion Models (DDMs) have become a popular tool for generating high-quality samples from complex data distributions. These models are able to capture sophisticated patterns and structures in the data, and can generate samples that are highly diverse and representative of the underlying distribution. However, one of the main limitations of diffusion models is the complexity of sample generation, since a large number of inference timesteps is required to faithfully capture the data distribution. In this paper, we present MMD-DDM, a novel method for fast sampling of diffusion models. Our approach is based on the idea of using the Maximum Mean Discrepancy (MMD) to finetune the learned distribution with a given budget of timesteps. This allows the finetuned model to significantly improve the speed-quality trade-off, by substantially increasing fidelity in inference regimes with few steps or, equivalently, by reducing the required number of steps to reach a target fidelity, thus paving the way for a more practical adoption of diffusion models in a wide range of applications. We evaluate our approach on unconditional image generation with extensive experiments across the CIFAR-10, CelebA, ImageNet and LSUN-Church datasets. Our findings show that the proposed method is able to produce high-quality samples in a fraction of the time required by widely-used diffusion models, and outperforms state-of-the-art techniques for accelerated sampling. Code is available at: https://github.com/diegovalsesia/MMD-DDM.

For agents

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

get_harvested_code_for_paper("2301.07969")
get_code_for_paper("2301.07969")
have("2301.07969")

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

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

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

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

Connect an agent — have() is free.