SYNTOLOGY HomeExplorerAtlasCodeMethodologyAboutDevelopersFeedPricing
Paper · 2405.17880 · ICML · 2024

Diffusion Rejection Sampling

Byeonghu Na, Il-Chul Moon, Donghyeok Shin, Yeongmin Kim, Wanmo Kang, Minsang Park

arXiv · PDF · Open in the Atlas

Code that ran

18 of 23 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; 4 honoured the contract we drafted, 0 violated it and 1 has no contract verdict; 13 failures of our instrument; 5 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/2405.17880.json · badge: /api/ran/2405.17880.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
aailabkaist/DiffRS canonical (classifier label)
classifier basis: census
15 ran · 4 no recorded run
aailabkaist/diffrs canonical (classifier label)
classifier basis: classifier_2025
3 ran · 1 no recorded run
FunctionStatusWhere it lives
GFP Ran
ran; our contract draft was wrong, not the code
aailabkaist/DiffRS/guided_diffusion/nn.py
code served (permissive licence) · get_code("adc34d7b6b290d6b")
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 GaussianFourierProjection. 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
import torch.nn as nn

torch.manual_seed(0)

ARGS = {
    "embedding_size": 256,
    "scale": 1.0,
}
Setup block drafted by
a language model, Claude Haiku 4.5, prompt python_fixture_v1, through the batch API
Imports
numpy, torch — import names as written, not package names to install; a name the repository itself provides is not a package
Returned
type GaussianFourierProjection — a GaussianFourierProjection output has no array shape of its own; none is stated — the instrument coerces any output to an array; for a GaussianFourierProjection 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
approx_standard_normal_cdf Ran
ran; our contract draft was wrong, not the code
aailabkaist/DiffRS/guided_diffusion/losses.py
pointer only (licence: Apache-2.0); the stored copy get_code serves, from quandao10/slct, is pointer only (licence: NONE) · get_code("cfd76fd0d89574a4")
How it ran

The body of this sample is withheld: this paper's link allows the body inline (Apache-2.0), but get_code serves the stored copy, first harvested from quandao10/slct, 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.

betas_for_alpha_bar Ran
ran, honoured the contract we drafted
aailabkaist/DiffRS/guided_diffusion/gaussian_diffusion.py
pointer only (licence: Apache-2.0); the stored copy get_code serves, from NVlabs/DiffPure, is pointer only (licence: NOASSERTION) · get_code("2ab2316ac6fdd869")
How it ran

The body of this sample is withheld: this paper's link allows the body inline (Apache-2.0), but get_code serves the stored copy, first harvested from NVlabs/DiffPure, and GitHub could not classify the licence of that repository (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.

calculate_fid_from_inception_stats Ran
ran, honoured the contract we drafted
aailabkaist/DiffRS/fid_npzs.py
pointer only (licence: Apache-2.0); the stored copy get_code serves, from sangyun884/fast-ode, is pointer only (licence: NONE) · get_code("45e941764344e7f3")
How it ran

The body of this sample is withheld: this paper's link allows the body inline (Apache-2.0), but get_code serves the stored copy, first harvested from sangyun884/fast-ode, 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.

compute_t_cos_from_t_lin Ran
ran; our contract draft was wrong, not the code
aailabkaist/DiffRS/guided_diffusion/unet.py
code served (permissive licence) · get_code("7e78740874fe261b")
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 (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 numpy as np

torch.manual_seed(0)

# The function takes timesteps as input
# timesteps is used in arithmetic operations: timesteps ** 2, timesteps * beta_0
# It should be a torch tensor
timesteps = torch.linspace(0, 1, 5)

ARGS = {
    "timesteps": timesteps
}
Setup block drafted by
a language model, Claude Haiku 4.5, prompt python_fixture_v1, through the batch API
Imports
numpy, 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 (5,) — shape (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
discretized_gaussian_log_likelihood Ran
ran; our contract draft was wrong, not the code
aailabkaist/DiffRS/guided_diffusion/losses.py
pointer only (licence: Apache-2.0); the stored copy get_code serves, from quandao10/slct, is pointer only (licence: NONE) · get_code("cd33283d615fb3d7")
How it ran

The body of this sample is withheld: this paper's link allows the body inline (Apache-2.0), but get_code serves the stored copy, first harvested from quandao10/slct, 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.

format_time Ran
ran; our contract draft was wrong, not the code
aailabkaist/DiffRS/dnnlib/util.py
code served (permissive licence) · get_code("674eca7b9e1b6439")
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 str. 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
from typing import Union

# Test with various time values
ARGS = {
    "seconds": 3661.7  # 1 hour, 1 minute, 1.7 seconds - tests rounding and all format branches
}
Setup block drafted by
a language model, Claude Haiku 4.5, prompt python_fixture_v1
Imports
numpy — import names as written, not package names to install; a name the repository itself provides is not a package
Returned
type str — a str output has no array shape of its own; none is stated — the instrument coerces any output to an array; for a str 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
format_time_brief Ran
ran; our contract draft was wrong, not the code
aailabkaist/DiffRS/dnnlib/util.py
code served (permissive licence) · get_code("32af001972a0699f")
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 str. 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
from typing import Union

# Test with various time values
ARGS = {
    "seconds": 45.7  # A float value that will be rounded to 46 seconds
}
Setup block drafted by
a language model, Claude Haiku 4.5, prompt python_fixture_v1
Imports
numpy — import names as written, not package names to install; a name the repository itself provides is not a package
Returned
type str — a str output has no array shape of its own; none is stated — the instrument coerces any output to an array; for a str 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_grad_log_ratio Ran
ran; our contract draft was wrong, not the code
aailabkaist/diffrs/generate_diffrs.py
code served (permissive licence) · get_code("df0b56173321f0ad")
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, 4, 3, 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
import torch.nn as nn
import numpy as np

torch.manual_seed(0)

# Create a minimal discriminator model
class MinimalDiscriminator(nn.Module):
    def __init__(self):
        super().__init__()
        self.linear = nn.Linear(4 * 3 * 3, 1)
    
    def forward(self, input, timesteps, condition):
        # Flatten input and process
        batch_size = input.shape[0]
        x = input.view(batch_size, -1)
        out = self.linear(x)
        return out

# Create vpsde instance
class vpsde:
    def __init__(self):
        self.beta_0 = 0.1
        self.beta_1 = 20.0
        self.s = 0.008
        self.f_0 = np.cos(self.s / (1.0 + self.s) * np.pi / 2.0) ** 2

    @property
    def T(self):
        return 1

    def compute_tau(self, std_wve_t):
        tau = -self.beta_0 + torch.sqrt(self.beta_0 ** 2 + 2.0 * (self.beta_1 - self.beta_0) * torch.log(1.0 + std_wve_t ** 2))
        tau /= self.beta_1 - self.beta_0
        return tau

    def marginal_prob(self, t):
        log_mean_coeff = -0.25 * t ** 2 * (self.beta_1 - self.beta_0) - 0.5 * t * self.beta_0
        mean = torch.exp(log_mean_coeff)
        std = torch.sqrt(1.0 - torch.exp(2.0 * log_mean_coeff))
        return (mean, std)

    def transform_unnormalized_wve_to_normalized_vp(self, t, std_out=False):
        tau = self.compute_tau(t)
        mean_vp_tau, std_vp_tau = self.marginal_prob(tau)
        if std_out:
            return (mean_vp_tau, std_vp_tau, tau)
        return (mean_vp_tau, tau)

    def compute_t_cos_from_t_lin(self, t_lin):
        sqrt_alpha_t_bar = torch.exp(-0.25 * t_lin ** 2 * (self.beta_1 - self.beta_0) - 0.5 * t_lin * self.beta_0)
        time = torch.arccos(np.sqrt(self.f_0) * sqrt_alpha_t_bar)
        t_cos = self.T * ((1.0 + self.s) * 2.0 / np.pi * time - self.s)
        return t_cos

    def integral_beta(self, t):
        return 0.5 * t ** 2 * (self.beta_1 - self.beta_0) + t * self.beta_0

    def antiderivative(self, t, stabilizing_constant=0.0):
        if isinstance(t, float) or isinstance(t, int):
            t = torch.tensor(t).float()
        return torch.log(1.0 - torch.exp(-self.integral_beta(t)) + stabilizing_constant) + self.integral_beta(t)

    def normalizing_constant(self, t_min):
        return self.antiderivative(self.T) - self.antiderivative(t_min)

    def get_diffusion_time(self, batch_size, batch_device, t_min=1e-05, importance_sampling=True):
        if importance_sampling:
            Z = self.normalizing_constant(t_min)
            u = torch.rand(batch_size, device=batch_device)
            return ((-self.beta_0 + torch.sqrt(self.beta_0 ** 2 + 2 * (self.beta_1 - self.beta_0) * torch.log(1.0 + torch.exp(Z * u + self.antiderivative(t_min))))) / (self.beta_1 - self.beta_0), Z.detach())
        else:
            return (torch.rand(batch_size, device=batch_device) * (self.T - t_min) + t_min, 1)

discriminator = MinimalDiscriminator()
vpsde_instance = vpsde()

# Build arguments
ARGS = {
    "discriminator": discriminator,
    "vpsde": vpsde_instance,
    "unnormalized_input": torch.randn(2, 4, 3, 3),
    "std_wve_t": torch.tensor([0.5, 0.6]),
    "img_resolution": 32,
    "time_min": 0.0,
    "time_max": 1.0,
    "class_labels": torch.tensor([0, 1]),
    "log": False,
    "log_only": False,
}
Setup block drafted by
a language model, Claude Haiku 4.5, prompt python_fixture_v1, through the batch API
Imports
numpy, 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, 4, 3, 3) — shape (2, 4, 3, 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_log_ratio Ran
ran; the contract check could not run (RAISES, DEP_MISSING or TIMEOUT)
aailabkaist/diffrs/generate_diffrs.py
code served (permissive licence) · get_code("4325667e4ab67849")
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 (2, 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
import torch.nn as nn

torch.manual_seed(0)

# Create a minimal discriminator module that accepts input, timesteps, and condition
class MinimalDiscriminator(nn.Module):
    def __init__(self):
        super().__init__()
        self.linear = nn.Linear(4, 2)
    
    def forward(self, input, timesteps, condition):
        # The function calls discriminator(input, timesteps=time, condition=class_labels)
        # and expects a log_ratio output
        return self.linear(input)

# Construct arguments
discriminator = MinimalDiscriminator()
input_tensor = torch.randn(2, 4)  # batch size 2, feature dim 4
time_tensor = torch.randint(0, 10, (2,))  # timesteps for batch of 2
class_labels = torch.randint(0, 3, (2,))  # class labels for batch of 2

ARGS = {
    "discriminator": discriminator,
    "input": input_tensor,
    "time": time_tensor,
    "class_labels": class_labels
}
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 (2, 2) — shape (2, 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
get_named_beta_schedule Ran
ran, honoured the contract we drafted
aailabkaist/DiffRS/guided_diffusion/gaussian_diffusion.py
pointer only (licence: Apache-2.0); the stored copy get_code serves, from NVlabs/DiffPure, is pointer only (licence: NOASSERTION) · get_code("a086d6286a40b889")
How it ran

The body of this sample is withheld: this paper's link allows the body inline (Apache-2.0), but get_code serves the stored copy, first harvested from NVlabs/DiffPure, and GitHub could not classify the licence of that repository (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.

get_param_groups_and_shapes Ran
ran; our contract draft was wrong, not the code
aailabkaist/DiffRS/guided_diffusion/fp16_util.py
pointer only (licence: Apache-2.0); the stored copy get_code serves, from ZhendongWang6/DIRE, is pointer only (licence: NONE) · get_code("e41367ad14ff58fd")
How it ran

The body of this sample is withheld: this paper's link allows the body inline (Apache-2.0), but get_code serves the stored copy, first harvested from ZhendongWang6/DIRE, 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.

make_master_params Ran
ran; our contract draft was wrong, not the code
aailabkaist/DiffRS/guided_diffusion/fp16_util.py
pointer only (licence: Apache-2.0); the stored copy get_code serves, from ZhendongWang6/DIRE, is pointer only (licence: NONE) · get_code("e20dd5102da3b050")
How it ran

The body of this sample is withheld: this paper's link allows the body inline (Apache-2.0), but get_code serves the stored copy, first harvested from ZhendongWang6/DIRE, 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.

make_output_format Ran
ran; our contract draft was wrong, not the code
aailabkaist/DiffRS/guided_diffusion/logger.py
code served (permissive licence) · get_code("bcd8b4acab199405")
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 HumanOutputFormat. 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 os
import sys
import tempfile

# Create a temporary directory for output
temp_dir = tempfile.mkdtemp()

ARGS = {
    'format': 'log',
    'ev_dir': temp_dir,
    'log_suffix': '_test'
}
Setup block drafted by
a language model, Claude Haiku 4.5, prompt python_fixture_v1, through the batch API
Imports
tensorflow — import names as written, not package names to install; a name the repository itself provides is not a package
Returned
type HumanOutputFormat — a HumanOutputFormat output has no array shape of its own; none is stated — the instrument coerces any output to an array; for a HumanOutputFormat 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
mpi_weighted_mean Ran
ran; our contract draft was wrong, not the code
aailabkaist/DiffRS/guided_diffusion/logger.py
pointer only (licence: Apache-2.0); the stored copy get_code serves, from HeadLiuYun/NeuroDiff, is pointer only (licence: NONE) · get_code("e515a67f7f32e76d")
How it ran

The body of this sample is withheld: this paper's link allows the body inline (Apache-2.0), but get_code serves the stored copy, first harvested from HeadLiuYun/NeuroDiff, 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.

normal_kl Ran
ran, honoured the contract we drafted
aailabkaist/DiffRS/guided_diffusion/losses.py
pointer only (licence: Apache-2.0); the stored copy get_code serves, from facebookresearch/agrol, is pointer only (licence: NOASSERTION) · get_code("cf2798b666b231ca")
How it ran

The body of this sample is withheld: this paper's link allows the body inline (Apache-2.0), but get_code serves the stored copy, first harvested from facebookresearch/agrol, and GitHub could not classify the licence of that repository (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.

unflatten_master_params Ran
ran; the contract check could not run (RAISES, DEP_MISSING or TIMEOUT)
aailabkaist/DiffRS/guided_diffusion/fp16_util.py
pointer only (licence: Apache-2.0); the stored copy get_code serves, from ZhendongWang6/DIRE, is pointer only (licence: NONE) · get_code("64fff1e30802b815")
How it ran

The body of this sample is withheld: this paper's link allows the body inline (Apache-2.0), but get_code serves the stored copy, first harvested from ZhendongWang6/DIRE, 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.

vpsde Ran
ran on a synthesized input · constructed an object; no result was computed
aailabkaist/diffrs/generate_diffrs.py
code served (permissive licence) · get_code("880175fab5fb6ba0")
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, vpsde: 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 numpy as np

torch.manual_seed(0)

class vpsde:
    def __init__(self):
        self.beta_0 = 0.1
        self.beta_1 = 20.0
        self.s = 0.008
        self.f_0 = np.cos(self.s / (1.0 + self.s) * np.pi / 2.0) ** 2

    @property
    def T(self):
        return 1

    def compute_tau(self, std_wve_t):
        tau = -self.beta_0 + torch.sqrt(self.beta_0 ** 2 + 2.0 * (self.beta_1 - self.beta_0) * torch.log(1.0 + std_wve_t ** 2))
        tau /= self.beta_1 - self.beta_0
        return tau

    def marginal_prob(self, t):
        log_mean_coeff = -0.25 * t ** 2 * (self.beta_1 - self.beta_0) - 0.5 * t * self.beta_0
        mean = torch.exp(log_mean_coeff)
        std = torch.sqrt(1.0 - torch.exp(2.0 * log_mean_coeff))
        return (mean, std)

    def transform_unnormalized_wve_to_normalized_vp(self, t, std_out=False):
        tau = self.compute_tau(t)
        mean_vp_tau, std_vp_tau = self.marginal_prob(tau)
        if std_out:
            return (mean_vp_tau, std_vp_tau, tau)
        return (mean_vp_tau, tau)

    def compute_t_cos_from_t_lin(self, t_lin):
        sqrt_alpha_t_bar = torch.exp(-0.25 * t_lin ** 2 * (self.beta_1 - self.beta_0) - 0.5 * t_lin * self.beta_0)
        time = torch.arccos(np.sqrt(self.f_0) * sqrt_alpha_t_bar)
        t_cos = self.T * ((1.0 + self.s) * 2.0 / np.pi * time - self.s)
        return t_cos

    def get_diffusion_time(self, batch_size, batch_device, t_min=1e-05, importance_sampling=True):
        if importance_sampling:
            Z = self.normalizing_constant(t_min)
            u = torch.rand(batch_size, device=batch_device)
            return ((-self.beta_0 + torch.sqrt(self.beta_0 ** 2 + 2 * (self.beta_1 - self.beta_0) * torch.log(1.0 + torch.exp(Z * u + self.antiderivative(t_min))))) / (self.beta_1 - self.beta_0), Z.detach())
        else:
            return (torch.rand(batch_size, device=batch_device) * (self.T - t_min) + t_min, 1)

    def antiderivative(self, t, stabilizing_constant=0.0):
        if isinstance(t, float) or isinstance(t, int):
            t = torch.tensor(t).float()
        return torch.log(1.0 - torch.exp(-self.integral_beta(t)) + stabilizing_constant) + self.integral_beta(t)

    def normalizing_constant(self, t_min):
        return self.antiderivative(self.T) - self.antiderivative(t_min)

    def integral_beta(self, t):
        return 0.5 * t ** 2 * (self.beta_1 - self.beta_0) + t * self.beta_0


vpsde_instance = vpsde()

ARGS = {}
Setup block drafted by
a language model, Claude Haiku 4.5, prompt python_fixture_v1, through the batch API
Imports
numpy, torch — import names as written, not package names to install; a name the repository itself provides is not a package
Returned
type vpsde — 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 vpsde 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
ask_yes_no Not yet run
unverified (harvested, no recorded run)
aailabkaist/DiffRS/dnnlib/util.py
code served (permissive licence) · get_code("9d31d2c4cd16bb2d")
How it ran

no invocation recorded.

avg_pool_nd Not yet run
unverified (harvested, no recorded run)
aailabkaist/DiffRS/guided_diffusion/nn.py
code served (permissive licence) · get_code("ecd0fc28815b65ae")
How it ran

no invocation recorded.

conv_nd Not yet run
unverified (harvested, no recorded run)
aailabkaist/DiffRS/guided_diffusion/nn.py
code served (permissive licence) · get_code("fe4eb545bbb728e0")
How it ran

no invocation recorded.

diffrs_sampler Not yet run
unverified (harvested, no recorded run)
aailabkaist/diffrs/generate_diffrs.py
code served (permissive licence) · get_code("8eeaa1f341734651")
How it ran

no invocation recorded.

profile Not yet run
unverified (harvested, no recorded run)
aailabkaist/DiffRS/guided_diffusion/logger.py
pointer only (licence: Apache-2.0); the stored copy get_code serves, from HeadLiuYun/NeuroDiff, is pointer only (licence: NONE) · get_code("0c6607473a4c4c55")
How it ran

The body of this sample is withheld: this paper's link allows the body inline (Apache-2.0), but get_code serves the stored copy, first harvested from HeadLiuYun/NeuroDiff, 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. No invocation recorded.

Also present in other papers' code

Of 23 samples lifted from this paper's linked repositories, 23 carry a function identity and 0 do not. Of the 23 distinct functions with an identity, 19 are also present in other papers whose code we hold (19 with at least one paper dated earlier, 17 the same month, 17 later) and 4 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
normal_kl 160 other papers
102 dated earlier, 8 the same month, 48 later, 2 same year, order not determinable · 19 only as an assembly brick
2010.02502 (2020-10)
Denoising Diffusion Implicit Models
2105.05233 (2021-05)
Diffusion Models Beat GANs on Image Synthesis
2111.11672 (2021-11)
Few-shot Image Generation with Mixup-based Distance Learning
and 157 more not named here
approx_standard_normal_cdf 154 other papers
96 dated earlier, 8 the same month, 48 later, 2 same year, order not determinable · 17 only as an assembly brick
2010.02502 (2020-10)
Denoising Diffusion Implicit Models
2105.05233 (2021-05)
Diffusion Models Beat GANs on Image Synthesis
2111.11672 (2021-11)
Few-shot Image Generation with Mixup-based Distance Learning
and 151 more not named here
discretized_gaussian_log_likelihood 128 other papers
90 dated earlier, 6 the same month, 31 later, 1 same year, order not determinable · 16 only as an assembly brick
2010.02502 (2020-10)
Denoising Diffusion Implicit Models
2105.05233 (2021-05)
Diffusion Models Beat GANs on Image Synthesis
2111.11672 (2021-11)
Few-shot Image Generation with Mixup-based Distance Learning
and 125 more not named here
conv_nd 121 other papers
81 dated earlier, 5 the same month, 32 later, 3 same year, order not determinable · 32 only as an assembly brick
2006.11239 (2020-06)
Denoising Diffusion Probabilistic Models
2010.02502 (2020-10)
Denoising Diffusion Implicit Models
2111.11672 (2021-11)
Few-shot Image Generation with Mixup-based Distance Learning
and 118 more not named here
avg_pool_nd 113 other papers
79 dated earlier, 4 the same month, 27 later, 3 same year, order not determinable · 31 only as an assembly brick
2006.11239 (2020-06)
Denoising Diffusion Probabilistic Models
2010.02502 (2020-10)
Denoising Diffusion Implicit Models
2110.11291 (2021-10)
Likelihood Training of Schrödinger Bridge using Forward-Backward SDEs Theory
and 110 more not named here
betas_for_alpha_bar 92 other papers
71 dated earlier, 2 the same month, 17 later, 2 same year, order not determinable · 3 only as an assembly brick
2006.11239 (2020-06)
Denoising Diffusion Probabilistic Models
2010.02502 (2020-10)
Denoising Diffusion Implicit Models
2102.09672 (2021-02)
Improved Denoising Diffusion Probabilistic Models
and 89 more not named here
format_time 73 other papers
32 dated earlier, 4 the same month, 36 later, 1 undated
2004.00049 (2020-04)
In-Domain GAN Inversion for Real Image Editing
2004.11660 (2020-04)
Disentangled and Controllable Face Image Generation via 3D Imitative-Contrastive Learning
2108.00946 (2021-08)
StyleGAN-NADA: CLIP-Guided Domain Adaptation of Image Generators
and 70 more not named here
make_output_format 73 other papers
61 dated earlier, 2 the same month, 9 later, 1 same year, order not determinable
1611.05763 (2016-11)
Learning to reinforcement learn
1804.06459 (2018-04)
On Learning Intrinsic Rewards for Policy Gradient Methods
1806.02473 (2018-06)
Graph Convolutional Policy Network for Goal-Directed Molecular Graph Generation
and 70 more not named here
unflatten_master_params 72 other papers
49 dated earlier, 5 the same month, 17 later, 1 same year, order not determinable
2111.11672 (2021-11)
Few-shot Image Generation with Mixup-based Distance Learning
2111.14818 (2021-11)
Blended Diffusion for Text-driven Editing of Natural Images
2112.03145 (2021-12)
Diffusion Models for Implicit Image Segmentation Ensembles
and 69 more not named here
make_master_params 70 other papers
47 dated earlier, 5 the same month, 17 later, 1 same year, order not determinable
2111.11672 (2021-11)
Few-shot Image Generation with Mixup-based Distance Learning
2111.14818 (2021-11)
Blended Diffusion for Text-driven Editing of Natural Images
2112.03145 (2021-12)
Diffusion Models for Implicit Image Segmentation Ensembles
and 67 more not named here
ask_yes_no 69 other papers
32 dated earlier, 4 the same month, 32 later, 1 undated
2004.00049 (2020-04)
In-Domain GAN Inversion for Real Image Editing
2004.11660 (2020-04)
Disentangled and Controllable Face Image Generation via 3D Imitative-Contrastive Learning
2108.00946 (2021-08)
StyleGAN-NADA: CLIP-Guided Domain Adaptation of Image Generators
and 66 more not named here
format_time_brief 68 other papers
28 dated earlier, 4 the same month, 35 later, 1 undated
2108.00946 (2021-08)
StyleGAN-NADA: CLIP-Guided Domain Adaptation of Image Generators
2202.00273 (2022-02)
StyleGAN-XL: Scaling StyleGAN to Large Diverse Datasets
2206.07695 (2022-06)
VoxGRAF: Fast 3D-Aware Image Synthesis with Sparse Voxel Grids
and 65 more not named here
get_param_groups_and_shapes 68 other papers
45 dated earlier, 5 the same month, 17 later, 1 same year, order not determinable
2111.11672 (2021-11)
Few-shot Image Generation with Mixup-based Distance Learning
2111.14818 (2021-11)
Blended Diffusion for Text-driven Editing of Natural Images
2112.03145 (2021-12)
Diffusion Models for Implicit Image Segmentation Ensembles
and 65 more not named here
get_named_beta_schedule 63 other papers
45 dated earlier, 2 the same month, 15 later, 1 same year, order not determinable
2010.02502 (2020-10)
Denoising Diffusion Implicit Models
2108.02938 (2021-08)
ILVR: Conditioning Method for Denoising Diffusion Probabilistic Models
2111.11672 (2021-11)
Few-shot Image Generation with Mixup-based Distance Learning
and 60 more not named here
profile 61 other papers
48 dated earlier, 3 the same month, 9 later, 1 same year, order not determinable
1611.05763 (2016-11)
Learning to reinforcement learn
1905.06750 (2019-05)
Random Expert Distillation: Imitation Learning via Expert Policy Support Estimation
1906.05841 (2019-06)
Deep Reinforcement Learning for Industrial Insertion Tasks with Visual Inputs and Natural Rewards
and 58 more not named here
mpi_weighted_mean 52 other papers
40 dated earlier, 3 the same month, 8 later, 1 same year, order not determinable
2010.02502 (2020-10)
Denoising Diffusion Implicit Models
2111.11672 (2021-11)
Few-shot Image Generation with Mixup-based Distance Learning
2111.14818 (2021-11)
Blended Diffusion for Text-driven Editing of Natural Images
and 49 more not named here
calculate_fid_from_inception_stats 23 other papers
13 dated earlier, 1 the same month, 9 later
2206.00364 (2022-06)
Elucidating the Design Space of Diffusion-Based Generative Models
2211.17091 (2022-11)
Refining Generative Process with Discriminator Guidance in Score-based Diffusion Models
2301.12003 (2023-01)
Minimizing Trajectory Curvature of ODE-based Generative Models
and 20 more not named here
compute_t_cos_from_t_lin 1 other paper
1 dated earlier
2403.01189 (2024-03)
Training Unbiased Diffusion Models From Biased Dataset
vpsde
brick of this paper's assembly: helper
1 other paper
1 dated earlier
2403.01189 (2024-03)
Training Unbiased Diffusion Models From Biased Dataset

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

Recent advances in powerful pre-trained diffusion models encourage the development of methods to improve the sampling performance under welltrained diffusion models. This paper introduces Diffusion Rejection Sampling (DiffRS), which uses a rejection sampling scheme that aligns the sampling transition kernels with the true ones at each timestep. The proposed method can be viewed as a mechanism that evaluates the quality of samples at each intermediate timestep and refines them with varying effort depending on the sample. Theoretical analysis shows that DiffRS can achieve a tighter bound on sampling error compared to pre-trained models. Empirical results demonstrate the state-of-the-art performance of DiffRS on the benchmark datasets and the effectiveness of DiffRS for fast diffusion samplers and large-scale text-to-image diffusion models. Our code is available at https: //github.com/aailabkaist/DiffRS.

For agents

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

get_harvested_code_for_paper("2405.17880")
get_code_for_paper("2405.17880")
have("2405.17880")

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

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

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

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

Connect an agent — have() is free.