Papers › Variational Control for Guidance in Diffusion Models

Variational Control for Guidance in Diffusion Models

6 Feb 2025arXiv:2502.03686archive 2025-07-28

Kushagra Pandey, Farrin Marouf Sofian, Felix Draxler, Theofanis Karaletsos, Stephan Mandt

Diffusion models exhibit excellent sample quality, but existing guidance methods often require additional model training or are limited to specific tasks. We revisit guidance in diffusion models from the perspective of variational inference and control, introducing Diffusion Trajectory Matching (DTM) that enables guiding pretrained diffusion trajectories to satisfy a terminal cost. DTM unifies a broad class of guidance methods and enables novel instantiations. We introduce a new method within this framework that achieves state-of-the-art results on several linear, non-linear, and blind inverse problems without requiring additional model training or specificity to pixel or latent space diffusion models. Our code will be available at https://github.com/czi-ai/oc-guidance

PaperPDFCodeCode Syntology ranMethod as code

In Syntology View this paper on Syntology, its page in Syntology's graph. That page adds which of its functions are also present in other papers' code Syntology holds, with dates, and its dated run record as JSON and a README badge. It also lists the repositories linked to the paper, the abstract and the calls for agents.

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

For agents, on Syntology's MCP service (how to connect):

Code

Syntology 37 code samples harvested from 1 repository linked to this paper: 25 ran (of which 15 constructed an object rather than computing a result; 19 with no instrument failure: 2 honoured, 2 violated, 15 with no contract checked; 6 where Syntology's instrument failed) · 12 unverified. Where Syntology's instrument failed: 3 where our contract draft was wrong; 3 where the contract check could not run; failures of Syntology's instrument, not of the code.

By repository: official repository: 37 samples from 1 repository, 25 ran (19 with no instrument failure; 6 where Syntology's instrument failed). The run record, sample by sample. “Ran” means executed on a synthesized input, not that the code is correct or reproduces the paper.

Levels written on 2026-09-22 (UTC): the dates Syntology's graph wrote each sample's verification level, not when the code executed.

czi-ai/oc-guidance officialmentioned in papermentioned on GitHubpytorchSyntology: 37 samples, 25 ran (6 instrument-failed) · 12 unverified 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

37 samples harvested: 25 ran (of which 15 constructed an object rather than computing a result; 19 with no instrument failure: 2 honoured, 2 violated, 15 with no contract checked; 6 where Syntology's instrument failed) · 12 unverified. “Where Syntology's instrument failed” counts failures of Syntology's instrument, not of the code. Syntology's record for this page has not changed since , the first build that kept a record date for it; when this build read Syntology's graph is in the build record. That date is not when the samples ran.

2ran · honoured contract
2ran · violated contract
3ran · our draft was wrong
3ran; the contract check could not run
15ran
12unverified

Licence: 0 of the 37 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 czi-ai/oc-guidance. “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. A line beginning “fixture:” under a sample that ran gives the arguments Syntology's fixture called the sample with, each as name:type/rank/element kind (? where none was recorded), and the type of what the fixture's run returned, exactly as the harness recorded them; the arguments and the returned type were recorded by two separate runs of the same fixture. No output value is shown, and a returned type says nothing about whether the output was right. “Level recorded” gives the UTC date when Syntology's graph wrote the sample's verification level, not when the code executed; where the level was written before Syntology's graph kept that date, the row says “level recorded, date not recorded”. “Honoured” and “violated” refer to a contract Syntology drafted from the code itself. “Our draft was wrong” and “the contract check could not run” are failures of Syntology's instrument, not of the code: the sample ran on Syntology's synthesized input, and then the drafted contract did not describe it, or the check itself raised an error (RAISES), lacked a dependency (DEP_MISSING) or ran out of time (TIMEOUT); hover the label for which. A metamorphic tier, where shown, is evidence of the output's shape, not that the sample implements the method.

Each sample ends with its code_sha256. A sample's code_sha256 is Syntology's identity for that exact code. It is printed in full (16 hexadecimal characters for every sample in this build), and get_code(code_sha256="…") takes it exactly as printed. An agent calls it on Syntology's MCP service (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 are grouped by repository: a repository marked official first, then by how directly the repository is tied to the paper, then in the archive's order; never by how many ran. 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 six 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; the licence is outside the permissive list Syntology serves text under (MIT, Apache-2.0, BSD and similar); this paper's copy was not located, so its licence is not recorded; or this paper's copy is cleared, but the stored copy of the same code that Syntology serves is not. 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.

A function or class name links to its page when the name occurs in the harvested code of at least 5 papers; the name is a string, not an identity. A census tag appears when Syntology's census ran implementations with that name on one shared input per bucket: it gives how many were compared, from how many papers, and how many distinct outputs they produced, and names this sample's bucket when this sample was one of them.

czi-ai/oc-guidance official repository 37 samples, 25 ran (6 instrument-failed) · 12 unverified
ClassifierGuidanceModel algos/ndtm.py ran MIT (permissive) · d462c80071bba6ae · report fixture: returned ClassifierGuidanceModel · level recorded 2026-09-22
Colorization algos/ndtm.py ran MIT (permissive) · 6a6a65fc42a70109 · report fixture: returned Colorization · level recorded 2026-09-22
Compose algos/ndtm.py ran MIT (permissive) · 4e17b94f063c1a90 · report fixture: returned Compose · level recorded 2026-09-22
Deblurring algos/ndtm.py ran MIT (permissive) · 71af7ce3212d9e1c · report fixture: returned Deblurring · level recorded 2026-09-22
Denoising algos/ndtm.py ran MIT (permissive) · e305d10182891cee · report fixture: returned Denoising · level recorded 2026-09-22
HDR algos/ndtm.py ran MIT (permissive) · b306e3c609ef54b2 · report fixture: returned HDR · level recorded 2026-09-22
H_functions algos/ndtm.py ran MIT (permissive) · 6db82769d2740ade · report fixture: returned H_functions · level recorded 2026-09-22
Inpainting algos/ndtm.py ran MIT (permissive) · 0ae82c5ede22b668 · report fixture: returned Inpainting · level recorded 2026-09-22
Inpainting2 algos/ndtm.py ran MIT (permissive) · 7be00d2291252268 · report fixture: returned Inpainting2 · level recorded 2026-09-22
Kernel in 16 papers algos/ndtm.py ran MIT (permissive) · c2af90d254ccfd46 · report fixture: returned Kernel · level recorded 2026-09-22
NonlinearBlurOperator algos/ndtm.py ran MIT (permissive) · 145e71681d09f888 · report fixture: returned NonlinearBlurOperator · level recorded 2026-09-22
PhaseRetrievalOperator algos/ndtm.py ran MIT (permissive) · e2bcec0e8e006dd5 · report fixture: returned PhaseRetrievalOperator · level recorded 2026-09-22
Quantization algos/ndtm.py ran MIT (permissive) · f41a66ced241dca1 · report fixture: returned Quantization · level recorded 2026-09-22
SRConv algos/ndtm.py ran MIT (permissive) · 7409f145ba888a09 · report fixture: returned SRConv · level recorded 2026-09-22
SuperResolution algos/ndtm.py ran MIT (permissive) · 227f0fb97d62f667 · report fixture: returned SuperResolution · level recorded 2026-09-22
_generate_masks algos/ndtm.py ran · honoured contract MIT (permissive) · eb873be6f32b06c7 · report fixture: signature n:int/0/int, c:int/0/int, h:int/0/int, w:int/0/int, device:device/0/?, prob:float/0/float · returned Tensor · level recorded 2026-09-22
fft2_m algos/ndtm.py ran · our draft was wrong fingerprinted MIT (permissive) · e7311e88db6ad154 · report fixture: signature x:Tensor/3/complex · returned Tensor · level recorded 2026-09-22
fft2c_new in 14 papers algos/ndtm.py ran; the contract check could not run (RAISES) MIT (permissive) · 816447d200680f31 · report fixture: signature data:Tensor/4/float, norm:str/0/str · returned Tensor · level recorded 2026-09-22
get_degreadation_image algos/ndtm.py ran · our draft was wrong MIT (permissive) · a933de7de76557d7 · report fixture: signature y_0:Tensor/2/float, H:callable/0/?, cfg:Config/0/? · returned Tensor · level recorded 2026-09-22
ifft2_m algos/ndtm.py ran · our draft was wrong fingerprinted MIT (permissive) · 5fc916e4b9359935 · report fixture: signature x:Tensor/5/float · returned Tensor · level recorded 2026-09-22
ifft2c_new algos/ndtm.py ran; the contract check could not run (RAISES) MIT (permissive) · 1e028b85024231e6 · report fixture: signature data:Tensor/5/float, norm:str/0/str · returned Tensor · level recorded 2026-09-22
load_mask in 12 papers algos/ndtm.py ran · violated contract MIT (permissive) · 789b9f261d70e038 · report fixture: signature f:str/0/str · returned ndarray · level recorded 2026-09-22
norm in 120 papers
census: 23 implementations from 26 papers, 15 distinct outputs across 6 buckets, one shared input per bucket
algos/ndtm.py ran; the contract check could not run (RAISES) fingerprinted MIT (permissive) · 594fad709f5a8599 · report fixture: signature lst:list/1/float · returned float · level recorded 2026-09-22
polar2z algos/ndtm.py ran · violated contract fingerprinted MIT (permissive) · 7c37ca7a5cce1a9c · report fixture: signature r:ndarray/1/float, θ:ndarray/1/float · returned ndarray · level recorded 2026-09-22
postprocess in 70 papers
census: 5 implementations from 5 papers, 5 distinct outputs across 2 buckets, one shared input per bucket this sample: bucket 2 of 2, arg 1: rank 2, kind float, dtype float32
algos/ndtm.py ran · honoured contract fingerprinted MIT (permissive) · 3464de9ecaec7ab8 · report fixture: signature x:Tensor/2/float · returned Tensor · level recorded 2026-09-22
BDeblur algos/ndtm.py unverified MIT (permissive) · 59c972439cda37dc · report
BlindImageDeblurring algos/ndtm.py unverified MIT (permissive) · 7030d9cea95cdb1b · report
Blurkernel algos/ndtm.py unverified MIT (permissive) · 7dd8e8db87c7fd43 · report
DDIM in 5 papers algos/ndtm.py unverified MIT (permissive) · d3f739f828f9ced4 · report
JPEG algos/ndtm.py unverified MIT (permissive) · 209d87580d017e23 · report
NDTM algos/ndtm.py unverified MIT (permissive) · 61acb2ecfa5f1aeb · report
NonLinearOperator algos/ndtm.py unverified MIT (permissive) · 665f19e750d67297 · report
build_degredation_model algos/ndtm.py unverified MIT (permissive) · f60cfe5f4ecd94c4 · report
build_one_degredation_model algos/ndtm.py unverified MIT (permissive) · df951fd1e4c0af59 · report
jpeg_decode algos/ndtm.py unverified MIT (permissive) · 4f7a44cd35a6ec25 · report
jpeg_encode algos/ndtm.py unverified MIT (permissive) · bbdb00b7e6e8b170 · report
pdf in 8 papers algos/ndtm.py unverified MIT (permissive) · d71b71588b63f3d0 · report

Method as code Syntology

What Syntology's graph records as this paper's claimed method, lifted into code: each assembly names its bricks (functions and classes), each with its own role and its own verification level. An assembly is not a check that the code implements the method correctly or reproduces the paper's results. Levels are each brick's own verification level in Syntology's graph (level 0: no recorded run), listed brick by brick and never combined into one level; “ran” means the brick executed on a synthesized input, not that its output is correct, and the instrument figure counts failures of Syntology's instrument, not of the code. Where a model read the code against the paper's claim, each assembly's label verdict is one model's judgement, kept in this page's JSON twin; it is not calibrated, so no card prints it.

1 assembly on this paper: 1 harvested, 0 generated.

harvested Assembly for Diffusion Trajectory Matching (DTM) (graph method: Diffusion Trajectory Matching (DTM)). 41 bricks; individually on a fixture: 29 ran (of which 15 constructed an object rather than computing a result; 19 with no instrument failure: 2 honoured, 2 violated, 15 with no contract checked; 10 where Syntology's instrument failed) · 12 unverified. The assembly has not been run end-to-end.

  1. NDTM entry · level 0 · unverified · 61acb2ecfa5f1aeb
  2. ClassifierGuidanceModel model · level 1 · ran · d462c80071bba6ae
  3. DDIM helper · level 0 · unverified · d3f739f828f9ced4
  4. build_degredation_model helper · level 0 · unverified · f60cfe5f4ecd94c4
  5. get_degreadation_image helper · level 1 · ran · our draft was wrong · a933de7de76557d7
  6. postprocess helper · level 1 · ran · honoured contract · 3464de9ecaec7ab8
  7. register_module helper · level 1 · ran · our draft was wrong · 0f7dbb625f311002
  8. Compose helper · level 1 · ran · 4e17b94f063c1a90
  9. SRConv helper · level 1 · ran · 7409f145ba888a09
  10. SuperResolution helper · level 1 · ran · 227f0fb97d62f667
  11. build_one_degredation_model helper · level 0 · unverified · df951fd1e4c0af59
  12. H_functions helper · level 1 · ran · 6db82769d2740ade
  13. BDeblur helper · level 0 · unverified · 59c972439cda37dc
  14. BlindImageDeblurring helper · level 0 · unverified · 7030d9cea95cdb1b
  15. Colorization helper · level 1 · ran · 6a6a65fc42a70109
  16. Deblurring helper · level 1 · ran · 71af7ce3212d9e1c
  17. Denoising helper · level 1 · ran · e305d10182891cee
  18. HDR helper · level 1 · ran · b306e3c609ef54b2
  19. Inpainting helper · level 1 · ran · 0ae82c5ede22b668
  20. Inpainting2 helper · level 1 · ran · 7be00d2291252268
  21. JPEG helper · level 0 · unverified · 209d87580d017e23
  22. NonlinearBlurOperator helper · level 1 · ran · 145e71681d09f888
  23. PhaseRetrievalOperator helper · level 1 · ran · e2bcec0e8e006dd5
  24. Quantization helper · level 1 · ran · f41a66ced241dca1
  25. _generate_masks helper · level 1 · ran · honoured contract · eb873be6f32b06c7
  26. load_mask helper · level 1 · ran · violated contract · 789b9f261d70e038
  27. pdf helper · level 0 · unverified · d71b71588b63f3d0
  28. Blurkernel helper · level 0 · unverified · 7dd8e8db87c7fd43
  29. Kernel helper · level 1 · ran · c2af90d254ccfd46
  30. NonLinearOperator helper · level 0 · unverified · 665f19e750d67297
  31. jpeg_decode helper · level 0 · unverified · 4f7a44cd35a6ec25
  32. jpeg_encode helper · level 0 · unverified · bbdb00b7e6e8b170
  33. fft2_m helper · level 1 · ran · our draft was wrong · e7311e88db6ad154
  34. ifft2_m helper · level 1 · ran · our draft was wrong · 5fc916e4b9359935
  35. polar2z helper · level 1 · ran · violated contract · 7c37ca7a5cce1a9c
  36. torch_ycbcr2rgb helper · level 1 · ran; the contract check could not run · 1a97ae3490446b38
  37. chroma_subsample helper · level 1 · ran; the contract check could not run · 53d2d220125f7625
  38. torch_rgb2ycbcr helper · level 1 · ran; the contract check could not run · d6921cde0083f064
  39. fft2c_new helper · level 1 · ran; the contract check could not run (RAISES) · 816447d200680f31
  40. ifft2c_new helper · level 1 · ran; the contract check could not run (RAISES) · 1e028b85024231e6
  41. norm helper · level 1 · ran; the contract check could not run (RAISES) · 594fad709f5a8599

Each brick ends with its code_sha256, Syntology's identity for that exact code; click one to copy the get_code call that returns it. For agents, on Syntology's MCP service: assembly(arxiv_id="2502.03686") returns these assemblies with each brick's role and wiring (how to connect).

Tasks

SpecificityVariational Inference

Results from the paper archive 2025-07-28

No leaderboard rows for this paper in the archive.

Methods

DiffusionVariational Inference

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