Papers › D2C: Diffusion-Denoising Models for Few-shot Conditional Generation

D2C: Diffusion-Denoising Models for Few-shot Conditional Generation

12 Jun 2021arXiv:2106.06819archive 2025-07-28

Abhishek Sinha, Jiaming Song, Chenlin Meng, Stefano Ermon

Conditional generative models of high-dimensional images have many applications, but supervision signals from conditions to images can be expensive to acquire. This paper describes Diffusion-Decoding models with Contrastive representations (D2C), a paradigm for training unconditional variational autoencoders (VAEs) for few-shot conditional image generation. D2C uses a learned diffusion-based prior over the latent representations to improve generation and contrastive self-supervised learning to improve representation quality. D2C can adapt to novel generation tasks conditioned on labels or manipulation constraints, by learning from as few as 100 labeled examples. On conditional generation from new labels, D2C achieves superior performance over state-of-the-art VAEs and diffusion models. On conditional image manipulation, D2C generations are two orders of magnitude faster to produce over StyleGAN2 ones and are preferred by 50% - 60% of the human evaluators in a double-blind study.

PaperPDFCodeCode Syntology ran

In Syntology Open this paper in Syntology's Atlas, the map of the papers in Syntology's graph and their citations.

For agents, Syntology's MCP tool lists every function and class Syntology harvested from this paper and whether it ran (how to connect): get_harvested_code_for_paper(arxiv_id="2106.06819")

Code

Syntology Ran 13 of 20 code samples harvested from 2 repositories linked to this paper; 7 have no recorded run. Of those that ran: 1 ran · honoured contract; 4 ran · our draft was wrong; 3 ran · fixture could not drive it; 5 ran with no contract checked.

By repository: community (archive-listed): 19 samples from 2 repositories, 12 ran; 1 identical to code first harvested elsewhere. The run record, sample by sample. “Ran” means executed on a synthesized input, not that the code is correct or reproduces the paper.

jiamings/d2c mentioned on GitHubpytorchMIT report
jiamings/d2c_pre_release mentioned on GitHubpytorch report
MS-P3/code4 mindsporeApache-2.0 report

Repository list and official/mentioned flags are the archive's, frozen 2025-07-28. Reachability, where shown, is from one Syntology probe window (2026-09-16 to 2026-09-18); repositories not probed show nothing. GitHub stars are not tracked.

Code Syntology ran Syntology

20 samples harvested; 13 ran; 1 honoured the contract we drafted; 7 have no recorded run. Read from Syntology's graph 2026-09-24; that is when this build read the record, not when the samples ran.

1ran · honoured contract
4ran · our draft was wrong
3ran · fixture could not drive it
5ran
7unverified

Licence: 3 of the 20 samples are pointer only, meaning Syntology does not serve that copy's text. This page shows no code text for any sample; each one links to its file in the repository.

Harvested from 2 repositories linked to this paper, official or community; each sample names its own and says which. Some samples are identical code Syntology first harvested from another repository; for those, this paper's copy is not located and its licence is not recorded. “Ran” means the sample executed on a synthesized input. It does not mean the output is correct, and nothing here reproduces the paper's results. “Honoured” and “violated” refer to a contract Syntology drafted from the code itself; “our draft was wrong” and “fixture could not drive it” are failures of Syntology's instrument, not of the code.

Each sample ends with its code_sha256, Syntology's identity for that exact code. An agent fetches the stored sample with Syntology's MCP tool get_code(code_sha256="…") (how to connect); click an identity to copy that call.

Repository labels, per sample. official repository: The archive marks this repository official for the paper. named in the paper: The archive records that the paper mentions this repository; it is not marked official. community (archive-listed): In the archive's code links for this paper, not marked official and not recorded as mentioned in the paper. found in paper text by Syntology: Syntology found this repository in the paper's own text; whether it is the authors' implementation is not asserted. community: Not in the archive's code links for this paper; a community repository Syntology harvested. Samples from a repository marked official are listed first. Licence labels name the repository's licence as recorded at harvest. “Pointer only” means Syntology does not serve that copy's text, for one of four reasons: no licence file was found; the licence was not identified; the licence is recorded as permissive but that copy's record is not marked cleared; or the licence is outside the permissive list Syntology serves text under (MIT, Apache-2.0, BSD and similar). Some licences outside that list permit redistribution, such as WTFPL, and GPL-3.0 under its conditions; they are simply not on the list. Hover a licence label for the reason. File links open the file on GitHub at the default branch, which may have changed since the harvest.

Normalize jiamings/d2c/d2c/diffusion/models/diffusion.py community (archive-listed) ran · our draft was wrong MIT (permissive) · c3a6b977022957cb · report
encoding_steps jiamings/d2c_pre_release/d2c/diffusion/functions/denoising.py community (archive-listed) ran · fixture could not drive it no licence file found · pointer only · ad14f44fec3d2524 · report
fusion1 jiamings/d2c/d2c/autoencoder/thirdparty/adamax.py community (archive-listed) ran MIT (permissive) · 3b0641f4cd06c379 · report
generalized_steps jiamings/d2c_pre_release/d2c/diffusion/functions/denoising.py community (archive-listed) ran · fixture could not drive it no licence file found · pointer only · 72677ee06e0271d7 · report
get_stride_for_cell_type jiamings/d2c/d2c/autoencoder/utils.py community (archive-listed) ran · honoured contract MIT (permissive) · 417c413f2e89d954 · report
get_timestep_embedding jiamings/d2c/d2c/diffusion/models/diffusion.py community (archive-listed) ran · fixture could not drive it fingerprinted MIT (permissive) · cb49209c125de1b4 · report
logit jiamings/d2c/d2c/autoencoder/neural_operations.py community (archive-listed) ran fingerprinted MIT (permissive) · d42ce56b29f68801 · report
noise_estimation_loss jiamings/d2c/d2c/diffusion/functions/losses.py community (archive-listed) ran MIT (permissive) · 36a45cceb1209d2f · report
nonlinearity jiamings/d2c/d2c/diffusion/models/diffusion.py community (archive-listed) ran · our draft was wrong fingerprinted MIT (permissive) · 3137073275f8c21a · report
norm jiamings/d2c/d2c/autoencoder/neural_ar_operations.py community (archive-listed) ran · our draft was wrong fingerprinted MIT (permissive) · e68ef3509ca0d2e9 · report
reduce_tensor jiamings/d2c/d2c/autoencoder/utils.py community (archive-listed) ran MIT (permissive) · be5abd3083ea4db8 · report
soft_clamp5 jiamings/d2c/d2c/autoencoder/distributions.py community (archive-listed) ran MIT (permissive) · cd334034d398bfaa · report
channel_mask jiamings/d2c/d2c/autoencoder/neural_ar_operations.py community (archive-listed) unverified MIT (permissive) · f68e8891796e9ba0 · report
concat_all_gather jiamings/d2c/d2c/autoencoder/moco/builder.py community (archive-listed) unverified MIT (permissive) · 73cecca9f3575f09 · report
count_parameters_in_M jiamings/d2c/d2c/autoencoder/utils.py community (archive-listed) unverified MIT (permissive) · 44baea4dbacc4a54 · report
create_conv_mask jiamings/d2c/d2c/autoencoder/neural_ar_operations.py community (archive-listed) unverified MIT (permissive) · d95da35d40ec2186 · report
get_skip_connection jiamings/d2c/d2c/autoencoder/neural_operations.py community (archive-listed) unverified MIT (permissive) · 76eacbd7f60e8ade · report
num_samples jiamings/d2c/d2c/autoencoder/lmdb_datasets_modified.py community (archive-listed) unverified MIT (permissive) · 2b4f2e46e841de50 · report
sample_normal_jit jiamings/d2c/d2c/autoencoder/distributions.py community (archive-listed) unverified MIT (permissive) · 47e78aab5991761b · report
compute_alpha identical code first harvested elsewhere ran · our draft was wrong licence of this copy not recorded · 9215fb189fbfb9f4 · report

Tasks

Conditional Image GenerationDenoisingImage GenerationImage ManipulationSelf-Supervised Learning

Results from the paper archive 2025-07-28

No leaderboard rows for this paper in the archive.

Methods

ConvolutionDiffusionPath Length RegularizationR1 RegularizationWeight Demodulation

Report a problem or propose a change · a person checks every report against the paper or source before anything changes; decisions are listed on /corrections