Papers › On the Guidance of Flow Matching

On the Guidance of Flow Matching

4 Feb 2025arXiv:2502.02150archive 2025-07-28

Ruiqi Feng, Tailin Wu, Chenglei Yu, Wenhao Deng, Peiyan Hu

Flow matching has shown state-of-the-art performance in various generative tasks, ranging from image generation to decision-making, where guided generation is pivotal. However, the guidance of flow matching is more general than and thus substantially different from that of its predecessor, diffusion models. Therefore, the challenge in guidance for general flow matching remains largely underexplored. In this paper, we propose the first framework of general guidance for flow matching. From this framework, we derive a family of guidance techniques that can be applied to general flow matching. These include a new training-free asymptotically exact guidance, novel training losses for training-based guidance, and two classes of approximate guidance that cover classical gradient guidance methods as special cases. We theoretically investigate these different methods to give a practical guideline for choosing suitable methods in different scenarios. Experiments on synthetic datasets, image inverse problems, and offline reinforcement learning demonstrate the effectiveness of our proposed guidance methods and verify the correctness of our flow matching guidance framework. Code to reproduce the experiments can be found at https://github.com/AI4Science-WestlakeU/flow_guidance.

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

Code

Syntology Ran 5 of 13 code samples harvested from 1 repository linked to this paper; 8 have no recorded run. Of those that ran: 2 ran · honoured contract; 3 ran · our draft was wrong.

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

ai4science-westlakeu/flow_guidance officialmentioned in papermentioned on GitHubjaxMIT 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

13 samples harvested; 5 ran; 2 honoured the contract we drafted; 8 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.

2ran · honoured contract
3ran · our draft was wrong
8unverified

Licence: 0 of the 13 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 ai4science-westlakeu/flow_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. “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.

apply_conditioning ai4science-westlakeu/flow_guidance/offline_rl/gflower/models_flow/flow_matcher.py official repository ran · our draft was wrong MIT (permissive) · b3d593fb33f79ac5 · report
cosine_beta_schedule ai4science-westlakeu/flow_guidance/offline_rl/gflower/models_flow/helpers.py official repository ran · honoured contract MIT (permissive) · b6113e0f43155a33 · report
get_2d_sincos_pos_embed ai4science-westlakeu/flow_guidance/offline_rl/gflower/models_flow/transformer.py official repository ran · honoured contract MIT (permissive) · c92c27c924b517e8 · report
modulate ai4science-westlakeu/flow_guidance/offline_rl/gflower/models_flow/transformer.py official repository ran · our draft was wrong fingerprinted MIT (permissive) · 03310bba324ae4fb · report
pad_t_like_x ai4science-westlakeu/flow_guidance/offline_rl/gflower/models_flow/flow_matcher.py official repository ran · our draft was wrong MIT (permissive) · 9e320fdaa5a3063f · report
apply_conditioning_from_conditioned_x ai4science-westlakeu/flow_guidance/offline_rl/gflower/models_flow/flow_matcher.py official repository unverified MIT (permissive) · 4e3580c79a7f3448 · report
contrastive_energy_loss ai4science-westlakeu/flow_guidance/synthetic/guided_flow/guidance/contrastive_energy.py official repository unverified MIT (permissive) · 0805a4fb5d3550c2 · report
cosine_beta_schedule ai4science-westlakeu/flow_guidance/offline_rl/gflower/models_flow/unet.py official repository unverified MIT (permissive) · a46ae414f0327ebd · report
extract ai4science-westlakeu/flow_guidance/offline_rl/gflower/models_flow/helpers.py official repository unverified MIT (permissive) · 09c8479d9a5b3e06 · report
get_2d_sincos_pos_embed_from_grid ai4science-westlakeu/flow_guidance/offline_rl/gflower/models_flow/transformer.py official repository unverified MIT (permissive) · 665d8a4e8f673a4c · report
to_np ai4science-westlakeu/flow_guidance/offline_rl/gflower/models_flow/flow_policy.py official repository unverified MIT (permissive) · 3e55aeee1baa4767 · report
wasserstein ai4science-westlakeu/flow_guidance/offline_rl/gflower/models_flow/optimal_transport.py official repository unverified MIT (permissive) · fb64fad1227c686b · report
wrap_grad_fn ai4science-westlakeu/flow_guidance/synthetic/guided_flow/guidance/gradient_guidance.py official repository unverified MIT (permissive) · 12bdc669adc8f3f5 · report

Tasks

Decision MakingImage Generation

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