Papers › Amortizing intractable inference in diffusion models for vision, language, and control

Amortizing intractable inference in diffusion models for vision, language, and control

31 May 2024arXiv:2405.20971archive 2025-07-28

Siddarth Venkatraman, Moksh Jain, Luca Scimeca, Minsu Kim, Marcin Sendera, Mohsin Hasan, Luke Rowe, Sarthak Mittal, Pablo Lemos, Emmanuel Bengio, Alexandre Adam, Jarrid Rector-Brooks, Yoshua Bengio, Glen Berseth, Nikolay Malkin

Diffusion models have emerged as effective distribution estimators in vision, language, and reinforcement learning, but their use as priors in downstream tasks poses an intractable posterior inference problem. This paper studies amortized sampling of the posterior over data, 𝐱∼pᵖᵒˢᵗ(𝐱)∝p(𝐱)r(𝐱), in a model that consists of a diffusion generative model prior p(𝐱) and a black-box constraint or likelihood function r(𝐱). We state and prove the asymptotic correctness of a data-free learning objective, relative trajectory balance, for training a diffusion model that samples from this posterior, a problem that existing methods solve only approximately or in restricted cases. Relative trajectory balance arises from the generative flow network perspective on diffusion models, which allows the use of deep reinforcement learning techniques to improve mode coverage. Experiments illustrate the broad potential of unbiased inference of arbitrary posteriors under diffusion priors: in vision (classifier guidance), language (infilling under a discrete diffusion LLM), and multimodal data (text-to-image generation). Beyond generative modeling, we apply relative trajectory balance to the problem of continuous control with a score-based behavior prior, achieving state-of-the-art results on benchmarks in offline reinforcement learning.

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

Code

Syntology Ran 11 of 14 code samples harvested from 1 repository linked to this paper; 3 have no recorded run. Of those that ran: 1 ran · honoured contract; 1 ran · our draft was wrong; 1 ran · fixture could not drive it; 8 ran with no contract checked.

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

gfnorg/diffusion-finetuning officialmentioned in paperpytorch 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

14 samples harvested; 11 ran; 1 honoured the contract we drafted; 3 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
1ran · our draft was wrong
1ran · fixture could not drive it
8ran
3unverified

Licence: 14 of the 14 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 gfnorg/diffusion-finetuning. “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.

bias_dropout_add_scale gfnorg/diffusion-finetuning/diffusion_lm/model/fused_add_dropout_scale.py official repository ran no licence file found · pointer only · 0bb0f3f46e52f14d · report
bwd_mle gfnorg/diffusion-finetuning/rtb_diffusion/gflownet_losses.py official repository ran no licence file found · pointer only · b0fa4ddf4d6ac206 · report
fwd_rl gfnorg/diffusion-finetuning/rtb_diffusion/gflownet_losses.py official repository ran no licence file found · pointer only · 01ed3924aa7d95e4 · report
fwd_rtb gfnorg/diffusion-finetuning/rtb_diffusion/gflownet_losses.py official repository ran · our draft was wrong no licence file found · pointer only · 1672f2253c982cee · report
get_bias_dropout_add_scale gfnorg/diffusion-finetuning/diffusion_lm/model/fused_add_dropout_scale.py official repository ran no licence file found · pointer only · 06f8b66017690883 · report
modulate gfnorg/diffusion-finetuning/diffusion_lm/model/fused_add_dropout_scale.py official repository ran fingerprinted no licence file found · pointer only · 819cf4771f4eebf0 · report
optimization_manager gfnorg/diffusion-finetuning/diffusion_lm/losses.py official repository ran no licence file found · pointer only · 9b714e281bb784b7 · report
residual_linear gfnorg/diffusion-finetuning/diffusion_lm/model/transformer.py official repository ran fingerprinted no licence file found · pointer only · e1d1b19d3f2e9f49 · report
rotate_half gfnorg/diffusion-finetuning/diffusion_lm/model/rotary.py official repository ran · honoured contract fingerprinted no licence file found · pointer only · 8526ce179df04bd4 · report
sample_categorical gfnorg/diffusion-finetuning/diffusion_lm/catsample.py official repository ran · fixture could not drive it no licence file found · pointer only · 172aa319a831b3ab · report
unsqueeze_as gfnorg/diffusion-finetuning/diffusion_lm/graph_lib.py official repository ran no licence file found · pointer only · f3598c5ced32bdac · report
apply_rotary_pos_emb gfnorg/diffusion-finetuning/diffusion_lm/model/rotary.py official repository unverified no licence file found · pointer only · 05816c8a9ef162b5 · report
get_optimizer gfnorg/diffusion-finetuning/diffusion_lm/losses.py official repository unverified no licence file found · pointer only · 32fa27b9da9341dc · report
gumbel_softmax gfnorg/diffusion-finetuning/diffusion_lm/catsample.py official repository unverified no licence file found · pointer only · a017bf60b761f427 · report

Tasks

Continuous ControlDeep Reinforcement LearningImage GenerationReinforcement LearningText to Image GenerationText-to-Image Generationcontinuous-controlreinforcement-learning

Results from the paper archive 2025-07-28

No leaderboard rows for this paper in the archive.

Methods

Diffusion

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