Papers › Discrete Contrastive Diffusion for Cross-Modal Music and Image Generation

Discrete Contrastive Diffusion for Cross-Modal Music and Image Generation

15 Jun 2022arXiv:2206.07771archive 2025-07-28

Ye Zhu, Yu Wu, Kyle Olszewski, Jian Ren, Sergey Tulyakov, Yan Yan

Diffusion probabilistic models (DPMs) have become a popular approach to conditional generation, due to their promising results and support for cross-modal synthesis. A key desideratum in conditional synthesis is to achieve high correspondence between the conditioning input and generated output. Most existing methods learn such relationships implicitly, by incorporating the prior into the variational lower bound. In this work, we take a different route -- we explicitly enhance input-output connections by maximizing their mutual information. To this end, we introduce a Conditional Discrete Contrastive Diffusion (CDCD) loss and design two contrastive diffusion mechanisms to effectively incorporate it into the denoising process, combining the diffusion training and contrastive learning for the first time by connecting it with the conventional variational objectives. We demonstrate the efficacy of our approach in evaluations with diverse multimodal conditional synthesis tasks: dance-to-music generation, text-to-image synthesis, as well as class-conditioned image synthesis. On each, we enhance the input-output correspondence and achieve higher or competitive general synthesis quality. Furthermore, the proposed approach improves the convergence of diffusion models, reducing the number of required diffusion steps by more than 35% on two benchmarks, significantly increasing the inference speed.

PaperPDFCodeCode Syntology ran

In Syntology View this paper on Syntology: its repositories, every harvested function with whether it ran, its licence and the call to fetch it.

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="2206.07771")

Code

Syntology Ran 3 of 5 code samples harvested from 1 repository linked to this paper; 2 have no recorded run. Of those that ran: 1 ran · our draft was wrong; 2 ran · fixture could not drive it.

By repository: official repository: 5 samples from 1 repository, 3 ran. The run record, sample by sample. “Ran” means executed on a synthesized input, not that the code is correct or reproduces the paper.

l-yezhu/cdcd officialmentioned in papermentioned on GitHubpytorch 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

5 samples harvested; 3 ran; 0 honoured the contract we drafted; 2 have no recorded run. Read from Syntology's graph 2026-09-25; that is when this build read the record, not when the samples ran.

1ran · our draft was wrong
2ran · fixture could not drive it
2unverified

Licence: 5 of the 5 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 l-yezhu/cdcd. “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.

alpha_schedule l-yezhu/cdcd/synthesis/modeling/transformers/diffusion_d2m.py official repository ran · our draft was wrong fingerprinted no licence file found · pointer only · 84faa1a3b9691991 · report
beat_scores L-YeZhu/CDCD/inference/inference_aist.py official repository ran · fixture could not drive it fingerprinted no licence file found · pointer only · ff2d0b5dcf33853c · report
shift_time l-yezhu/cdcd/synthesis/modeling/transformers/diffusion_d2m.py official repository ran · fixture could not drive it no licence file found · pointer only · 4e22bf5a718f0d6a · report
DiffusionTransformer l-yezhu/cdcd/synthesis/modeling/transformers/diffusion_d2m.py official repository unverified no licence file found · pointer only · 756f507ff7a03064 · report
instantiate_from_config l-yezhu/cdcd/synthesis/modeling/transformers/diffusion_d2m.py official repository unverified no licence file found · pointer only · 178128dbd7d43112 · report

Tasks

Contrastive LearningDenoisingImage GenerationMusic Generation

Results from the paper archive 2025-07-28

No leaderboard rows for this paper in the archive.

Methods

Contrastive LearningDiffusion

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