SYNTOLOGY HomeExplorerAtlasCodeMethodologyAboutDevelopersFeedPricing
Paper · 2405.20971 · NeurIPS · 2024

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

Yoshua Bengio, Moksh Jain, Emmanuel Bengio, Minsu Kim, Marcin Sendera, Siddarth Venkatraman, Mohsin Hasan, Luke Mila

arXiv · PDF · Open in the Atlas

Code that ran

13 of 14 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; 2 honoured the contract we drafted, 0 violated it and 0 have no contract verdict; 11 failures of our instrument; 1 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.20971.json · badge: /api/ran/2405.20971.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
gfnorg/diffusion-finetuning canonical (classifier label)
classifier basis: census
13 ran · 1 no recorded run
FunctionStatusWhere it lives
bias_dropout_add_scale Ran
ran; the contract check could not run (RAISES, DEP_MISSING or TIMEOUT)
gfnorg/diffusion-finetuning/diffusion_lm/model/fused_add_dropout_scale.py
pointer only (licence: NONE) · get_code("0bb0f3f46e52f14d")
How it ran

The body of this sample is withheld: GitHub detected no licence in this paper's repository, gfnorg/diffusion-finetuning 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.

bwd_mle Ran
ran; our contract draft was wrong, not the code
gfnorg/diffusion-finetuning/rtb_diffusion/gflownet_losses.py
pointer only (licence: NONE) · get_code("b0fa4ddf4d6ac206")
How it ran

The body of this sample is withheld: GitHub detected no licence in this paper's repository, gfnorg/diffusion-finetuning 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.

fwd_rl Ran
ran; our contract draft was wrong, not the code
gfnorg/diffusion-finetuning/rtb_diffusion/gflownet_losses.py
pointer only (licence: NONE) · get_code("01ed3924aa7d95e4")
How it ran

The body of this sample is withheld: GitHub detected no licence in this paper's repository, gfnorg/diffusion-finetuning 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.

fwd_rtb Ran
ran; our contract draft was wrong, not the code
gfnorg/diffusion-finetuning/rtb_diffusion/gflownet_losses.py
pointer only (licence: NONE); the stored copy get_code serves, from GFNOrg/diffusion-finetuning, is pointer only (licence: NONE) · get_code("1672f2253c982cee")
How it ran

The body of this sample is withheld: GitHub detected no licence in this paper's repository, gfnorg/diffusion-finetuning 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.

get_bias_dropout_add_scale Ran
ran; our contract draft was wrong, not the code
gfnorg/diffusion-finetuning/diffusion_lm/model/fused_add_dropout_scale.py
pointer only (licence: NONE) · get_code("06f8b66017690883")
How it ran

The body of this sample is withheld: GitHub detected no licence in this paper's repository, gfnorg/diffusion-finetuning 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.

get_optimizer Ran
ran; our contract draft was wrong, not the code
gfnorg/diffusion-finetuning/diffusion_lm/losses.py
pointer only (licence: NONE); the stored copy get_code serves, from Dongjae0324/infodis, is pointer only (licence: NONE) · get_code("32fa27b9da9341dc")
How it ran

The body of this sample is withheld: GitHub detected no licence in this paper's repository, gfnorg/diffusion-finetuning 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.

gumbel_softmax Ran
ran; our contract draft was wrong, not the code
gfnorg/diffusion-finetuning/diffusion_lm/catsample.py
pointer only (licence: NONE); the stored copy get_code serves, from Dongjae0324/infodis, is pointer only (licence: NONE) · get_code("a017bf60b761f427")
How it ran

The body of this sample is withheld: GitHub detected no licence in this paper's repository, gfnorg/diffusion-finetuning 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.

modulate Ran
ran, honoured the contract we drafted
gfnorg/diffusion-finetuning/diffusion_lm/model/fused_add_dropout_scale.py
pointer only (licence: NONE) · get_code("819cf4771f4eebf0")
How it ran

The body of this sample is withheld: GitHub detected no licence in this paper's repository, gfnorg/diffusion-finetuning 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.

optimization_manager Ran
ran; our contract draft was wrong, not the code
gfnorg/diffusion-finetuning/diffusion_lm/losses.py
pointer only (licence: NONE) · get_code("9b714e281bb784b7")
How it ran

The body of this sample is withheld: GitHub detected no licence in this paper's repository, gfnorg/diffusion-finetuning 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.

residual_linear Ran
ran; the contract check could not run (RAISES, DEP_MISSING or TIMEOUT)
gfnorg/diffusion-finetuning/diffusion_lm/model/transformer.py
pointer only (licence: NONE) · get_code("e1d1b19d3f2e9f49")
How it ran

The body of this sample is withheld: GitHub detected no licence in this paper's repository, gfnorg/diffusion-finetuning 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.

rotate_half Ran
ran, honoured the contract we drafted
gfnorg/diffusion-finetuning/diffusion_lm/model/rotary.py
pointer only (licence: NONE); the stored copy get_code serves, from hxixixh/gumbel-distill, is pointer only (licence: NONE) · get_code("8526ce179df04bd4")
How it ran

The body of this sample is withheld: GitHub detected no licence in this paper's repository, gfnorg/diffusion-finetuning 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.

sample_categorical Ran
ran; the contract check could not run (RAISES, DEP_MISSING or TIMEOUT)
gfnorg/diffusion-finetuning/diffusion_lm/catsample.py
pointer only (licence: NONE); the stored copy get_code serves, from chuwd19/Split-Gibbs-Discrete-Diffusion-Posterior-Sampling, is pointer only (licence: NONE) · get_code("172aa319a831b3ab")
How it ran

The body of this sample is withheld: GitHub detected no licence in this paper's repository, gfnorg/diffusion-finetuning 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.

unsqueeze_as Ran
ran; the contract check could not run (RAISES, DEP_MISSING or TIMEOUT)
gfnorg/diffusion-finetuning/diffusion_lm/graph_lib.py
pointer only (licence: NONE) · get_code("f3598c5ced32bdac")
How it ran

The body of this sample is withheld: GitHub detected no licence in this paper's repository, gfnorg/diffusion-finetuning 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.

apply_rotary_pos_emb Not yet run
unverified (harvested, no recorded run)
gfnorg/diffusion-finetuning/diffusion_lm/model/rotary.py
pointer only (licence: NONE) · get_code("05816c8a9ef162b5")
How it ran

The body of this sample is withheld: GitHub detected no licence in this paper's repository, gfnorg/diffusion-finetuning 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 14 samples lifted from this paper's linked repositories, 14 carry a function identity and 0 do not. Of the 14 distinct functions with an identity, 12 are also present in other papers whose code we hold (11 with at least one paper dated earlier, 0 the same month, 6 later) and 2 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
get_bias_dropout_add_scale 8 other papers
1 dated earlier, 7 later
2310.16834 (2023-10)
Discrete Diffusion Modeling by Estimating the Ratios of the Data Distribution
2410.21035 (2024-10)
Beyond Autoregression: Fast LLMs via Self-Distillation Through Time
2412.10193 (2024-12)
Simple Guidance Mechanisms for Discrete Diffusion Models
and 5 more not named here
rotate_half 8 other papers
4 dated earlier, 4 later · 1 only as an assembly brick
2310.16834 (2023-10)
Discrete Diffusion Modeling by Estimating the Ratios of the Data Distribution
2401.12522 (2024-01)
BiTA: Bi-Directional Tuning for Lossless Acceleration in Large Language Models
2402.07754 (2024-02)
Diffusion of Thought: Chain-of-Thought Reasoning in Diffusion Language Models
and 5 more not named here
gumbel_softmax 4 other papers
1 dated earlier, 3 later
2310.16834 (2023-10)
Discrete Diffusion Modeling by Estimating the Ratios of the Data Distribution
2406.03736 (2024-06)
Your Absorbing Discrete Diffusion Secretly Models the Conditional Distributions of Clean Data
2506.19935 (2025-06)
Any-Order GPT as Masked Diffusion Model: Decoupling Formulation and Architecture
and 1 more not named here
sample_categorical 4 other papers
1 dated earlier, 3 later
2310.16834 (2023-10)
Discrete Diffusion Modeling by Estimating the Ratios of the Data Distribution
2406.03736 (2024-06)
Your Absorbing Discrete Diffusion Secretly Models the Conditional Distributions of Clean Data
2503.01161 (2025-03)
Split Gibbs Discrete Diffusion Posterior Sampling
and 1 more not named here
get_optimizer 3 other papers
1 dated earlier, 2 later
2310.16834 (2023-10)
Discrete Diffusion Modeling by Estimating the Ratios of the Data Distribution
2406.03736 (2024-06)
Your Absorbing Discrete Diffusion Secretly Models the Conditional Distributions of Clean Data
2510.24088 (2025-10)
Information-Theoretic Discrete Diffusion
apply_rotary_pos_emb 2 other papers
2 dated earlier
2310.16834 (2023-10)
Discrete Diffusion Modeling by Estimating the Ratios of the Data Distribution
2402.07754 (2024-02)
Diffusion of Thought: Chain-of-Thought Reasoning in Diffusion Language Models
residual_linear 2 other papers
2 dated earlier
2310.16834 (2023-10)
Discrete Diffusion Modeling by Estimating the Ratios of the Data Distribution
2402.07754 (2024-02)
Diffusion of Thought: Chain-of-Thought Reasoning in Diffusion Language Models
bias_dropout_add_scale 1 other paper
1 dated earlier
2310.16834 (2023-10)
Discrete Diffusion Modeling by Estimating the Ratios of the Data Distribution
fwd_rtb 1 other paper
1 later
2605.15417 (2026-05)
f -Trajectory Balance: A Loss Family for Tuning GFlowNets, Generative Models, and LLMs with Off-and On-Policy Data
modulate 1 other paper
1 dated earlier
2310.16834 (2023-10)
Discrete Diffusion Modeling by Estimating the Ratios of the Data Distribution
optimization_manager 1 other paper
1 dated earlier
2310.16834 (2023-10)
Discrete Diffusion Modeling by Estimating the Ratios of the Data Distribution
unsqueeze_as 1 other paper
1 dated earlier
2310.16834 (2023-10)
Discrete Diffusion Modeling by Estimating the Ratios of the Data Distribution

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

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, x ∼ 𝑝 post (x) ∝ 𝑝(x)𝑟 (x), in a model that consists of a diffusion generative model prior 𝑝(x) and a black-box constraint or likelihood function 𝑟 (x). 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. We illustrate the broad potential of unbiased inference of arbitrary posteriors under diffusion priors across a collection of experiments: 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. Code is available at this link. 38th Conference on Neural Information Processing Systems (NeurIPS 2024).

For agents

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

get_harvested_code_for_paper("2405.20971")
get_code_for_paper("2405.20971")
have("2405.20971")

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

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

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

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

Connect an agent — have() is free.