SYNTOLOGY HomeExplorerAtlasCodeMethodologyAboutDevelopersFeedPricing
Paper · 2112.07804 · ICLR · 2022

Tackling the Generative Learning Trilemma with Denoising Diffusion GANs

Zhisheng Xiao, Arash Vahdat, Karsten Kreis

arXiv · PDF · Open in the Atlas

Code that ran

6 of 12 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 5 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/2112.07804.json · badge: /api/ran/2112.07804.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
taki0112/denoising-diffusion-gan-Tensorflow community (classifier label)
classifier basis not recorded on the link
6 ran · 6 no recorded run
FunctionStatusWhere it lives
adjust_dynamic_range Ran
ran on a synthesized input
taki0112/denoising-diffusion-gan-Tensorflow/src/utils.py
code served (permissive licence) · get_code("580ee01331365cc1")
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 EagerTensor, ndim 4, dtype family float, shape (2, 4, 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 tensorflow as tf
import numpy as np

# Create a small sample image tensor
# Shape: (batch_size=2, height=4, width=4, channels=3)
images = tf.constant(np.random.rand(2, 4, 4, 3) * 255, dtype=tf.float32)

# Define input range (e.g., 0-255 for typical image values)
range_in = (0.0, 255.0)

# Define output range (e.g., -1 to 1 for normalized values)
range_out = (-1.0, 1.0)

# Define output data type
out_dtype = tf.float32

ARGS = {
    "images": images,
    "range_in": range_in,
    "range_out": range_out,
    "out_dtype": out_dtype,
}
Setup block drafted by
a language model, Claude Haiku 4.5, prompt python_fixture_v1, through the batch API
Imports
numpy, tensorflow — import names as written, not package names to install; a name the repository itself provides is not a package
Returned
type EagerTensor, ndim 4, dtype family float, shape (2, 4, 4, 3) — shape (2, 4, 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
compute_paddings Ran
ran on a synthesized input
taki0112/denoising-diffusion-gan-Tensorflow/src/cuda/upfirdn_2d.py
code served (permissive licence) · get_code("809eb892e3916de5")
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. 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

# Test case 1: upsampling with kernel
ARGS = {
    "resample_kernel": np.array([1.0, 2.0, 1.0], dtype=np.float32),
    "up": True,
    "down": False,
    "kernel_size": 3,
    "factor": 2,
    "gain": 1.0
}
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 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: none by the harness; any seed is in the setup block
preprocess_fit_train_image Ran
ran on a synthesized input
taki0112/denoising-diffusion-gan-Tensorflow/src/utils.py
code served (permissive licence) · get_code("d1193687d98d105e")
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 EagerTensor, ndim 3, dtype family float, shape (3, 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 tensorflow as tf
import numpy as np

# Create a small batch of images with shape (batch_size, height, width)
# Using distinct dimensions: batch=2, height=4, width=3
batch_size = 2
height = 4
width = 3

# Create random image data in the range [0, 255] (uint8 or float)
images = tf.constant(np.random.randint(0, 256, size=(batch_size, height, width), dtype=np.uint8), dtype=tf.float32)

ARGS = {
    "images": images
}
Setup block drafted by
a language model, Claude Haiku 4.5, prompt python_fixture_v1, through the batch API
Imports
numpy, tensorflow — import names as written, not package names to install; a name the repository itself provides is not a package
Returned
type EagerTensor, ndim 3, dtype family float, shape (3, 2, 4) — shape (3, 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
torch_normalization Ran
ran on a synthesized input
taki0112/denoising-diffusion-gan-Tensorflow/src/evaluation/frechet_inception_distance.py
code served (permissive licence) · get_code("bd7cdd9c69d44405")
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 EagerTensor, ndim 4, dtype family float, shape (2, 4, 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 tensorflow as tf

# Create a small test tensor with shape (batch_size=2, height=4, width=4, channels=3)
# Values in range [0, 255] as expected by the function
x = tf.constant([
    [
        [[100, 150, 200], [120, 160, 210], [110, 155, 205], [105, 152, 202]],
        [[95, 145, 195], [115, 165, 215], [125, 170, 220], [130, 175, 225]],
        [[88, 138, 188], [98, 148, 198], [108, 158, 208], [118, 168, 218]],
        [[80, 130, 180], [90, 140, 190], [100, 150, 200], [110, 160, 210]],
    ],
    [
        [[50, 100, 150], [60, 110, 160], [70, 120, 170], [80, 130, 180]],
        [[40, 90, 140], [45, 95, 145], [55, 105, 155], [65, 115, 165]],
        [[30, 80, 130], [35, 85, 135], [40, 90, 140], [50, 100, 150]],
        [[25, 75, 125], [20, 70, 120], [15, 65, 115], [10, 60, 110]],
    ]
], dtype=tf.float32)

ARGS = {
    "x": x
}
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 EagerTensor, ndim 4, dtype family float, shape (2, 4, 4, 3) — shape (2, 4, 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
var_func_geometric Ran
ran, violated the contract we drafted
taki0112/denoising-diffusion-gan-Tensorflow/src/ops.py
pointer only (licence: MIT); the stored copy get_code serves, from khainb/rpsw, is pointer only (licence: NONE) · get_code("65846ba5525a01b5")
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 khainb/rpsw, 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.

var_func_vp Ran
ran on a synthesized input
taki0112/denoising-diffusion-gan-Tensorflow/src/ops.py
code served (permissive licence) · get_code("bfea3e00a742cd88")
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 EagerTensor, 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 tensorflow as tf
import numpy as np

def var_func_vp(t, beta_min, beta_max):
    log_mean_coeff = -0.25 * t ** 2 * (beta_max - beta_min) - 0.5 * t * beta_min
    var = 1.0 - tf.exp(2.0 * log_mean_coeff)
    return var

# Create small scalar values for the parameters
t_value = 0.5
beta_min_value = 0.1
beta_max_value = 0.9

# Convert to TensorFlow tensors (or use Python floats which TF will handle)
t = tf.constant(t_value, dtype=tf.float32)
beta_min = tf.constant(beta_min_value, dtype=tf.float32)
beta_max = tf.constant(beta_max_value, dtype=tf.float32)

ARGS = {
    "t": t,
    "beta_min": beta_min,
    "beta_max": beta_max,
}
Setup block drafted by
a language model, Claude Haiku 4.5, prompt python_fixture_v1, through the batch API
Imports
numpy, tensorflow — import names as written, not package names to install; a name the repository itself provides is not a package
Returned
type EagerTensor, 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
downsample_2d Not yet run
unverified (harvested, no recorded run)
taki0112/denoising-diffusion-gan-Tensorflow/src/cuda/upfirdn_2d_ref.py
code served (permissive licence) · get_code("66260595985bc021")
How it ran

no invocation recorded.

extract Not yet run
unverified (harvested, no recorded run)
taki0112/denoising-diffusion-gan-Tensorflow/src/ops.py
code served (permissive licence) · get_code("54562f70618bd9f0")
How it ran

no invocation recorded.

get_plugin Not yet run
unverified (harvested, no recorded run)
taki0112/denoising-diffusion-gan-Tensorflow/src/cuda/custom_ops.py
code served (permissive licence) · get_code("410f4fa3e787a8a1")
How it ran

no invocation recorded.

inception_processing Not yet run
unverified (harvested, no recorded run)
taki0112/denoising-diffusion-gan-Tensorflow/src/evaluation/frechet_inception_distance.py
code served (permissive licence) · get_code("790a9397a9de1ad7")
How it ran

no invocation recorded.

random_flip_left_right Not yet run
unverified (harvested, no recorded run)
taki0112/denoising-diffusion-gan-Tensorflow/src/utils.py
code served (permissive licence) · get_code("6fd5e92319c6c9fa")
How it ran

no invocation recorded.

upsample_2d Not yet run
unverified (harvested, no recorded run)
taki0112/denoising-diffusion-gan-Tensorflow/src/cuda/upfirdn_2d_ref.py
code served (permissive licence) · get_code("09f6c79e38f3a845")
How it ran

no invocation recorded.

Also present in other papers' code

Of 12 samples lifted from this paper's linked repositories, 12 carry a function identity and 0 do not. Of the 12 distinct functions with an identity, 1 are also present in other papers whose code we hold (0 with at least one paper dated earlier, 0 the same month, 1 later) and 11 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
var_func_geometric 7 other papers
7 later
2207.05876 (2022-07)
Adaptive Diffusion Priors for Accelerated MRI Reconstruction
2210.05559 (2022-10)
Unifying Diffusion Models' Latent Space, with Applications to CycleDiffusion and Guidance
2303.05456 (2023-03)
Restoration based Generative Models
and 4 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

A wide variety of deep generative models has been developed in the past decade. Yet, these models often struggle with simultaneously addressing three key requirements including: high sample quality, mode coverage, and fast sampling. We call the challenge imposed by these requirements the generative learning trilemma, as the existing models often trade some of them for others. Particularly, denoising diffusion models have shown impressive sample quality and diversity, but their expensive sampling does not yet allow them to be applied in many real-world applications. In this paper, we argue that slow sampling in these models is fundamentally attributed to the Gaussian assumption in the denoising step which is justified only for small step sizes. To enable denoising with large steps, and hence, to reduce the total number of denoising steps, we propose to model the denoising distribution using a complex multimodal distribution. We introduce denoising diffusion generative adversarial networks (denoising diffusion GANs) that model each denoising step using a multimodal conditional GAN. Through extensive evaluations, we show that denoising diffusion GANs obtain sample quality and diversity competitive with original diffusion models while being 2000× faster on the CIFAR-10 dataset. Compared to traditional GANs, our model exhibits better mode coverage and sample diversity. To the best of our knowledge, denoising diffusion GAN is the first model that reduces sampling cost in diffusion models to an extent that allows them to be applied to real-world applications inexpensively. Project page and code: https://nvlabs.github.io/denoising-diffusion-gan.

For agents

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

get_harvested_code_for_paper("2112.07804")
get_code_for_paper("2112.07804")
have("2112.07804")

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

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

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

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

Connect an agent — have() is free.