Papers › Switched Flow Matching: Eliminating Singularities via Switching ODEs

Switched Flow Matching: Eliminating Singularities via Switching ODEs

19 May 2024arXiv:2405.11605archive 2025-07-28

Qunxi Zhu, Wei Lin

Continuous-time generative models, such as Flow Matching (FM), construct probability paths to transport between one distribution and another through the simulation-free learning of the neural ordinary differential equations (ODEs). During inference, however, the learned model often requires multiple neural network evaluations to accurately integrate the flow, resulting in a slow sampling speed. We attribute the reason to the inherent (joint) heterogeneity of source and/or target distributions, namely the singularity problem, which poses challenges for training the neural ODEs effectively. To address this issue, we propose a more general framework, termed Switched FM (SFM), that eliminates singularities via switching ODEs, as opposed to using a uniform ODE in FM. Importantly, we theoretically show that FM cannot transport between two simple distributions due to the existence and uniqueness of initial value problems of ODEs, while these limitations can be well tackled by SFM. From an orthogonal perspective, our framework can seamlessly integrate with the existing advanced techniques, such as minibatch optimal transport, to further enhance the straightness of the flow, yielding a more efficient sampling process with reduced costs. We demonstrate the effectiveness of the newly proposed SFM through several numerical examples.

PaperPDFCode Syntology ran

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 16 code samples harvested from 1 repository linked to this paper: 12 ran (of which 0 constructed an object rather than computing a result; 9 with no instrument failure: 2 honoured, 0 violated, 7 with no contract checked; 3 where Syntology's instrument failed) · 4 unverified. Where Syntology's instrument failed: 2 where our contract draft was wrong; 1 where the contract check could not run; failures of Syntology's instrument, not of the code.

By repository: found in paper text by Syntology: 16 samples from 1 repository, 12 ran (9 with no instrument failure; 3 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.

No sample is linked to this paper from 1 of its repositories that Syntology harvested for other papers:

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

atong01/conditional-flow-matching found in paper text by SyntologySyntology: no sample linked to this paper (harvested for another paper). Syntology's graph links these samples to Improving and generalizing flow-based generative models with minibatch optimal transport (arXiv:2302.00482; that paper's own run record: 1 ran (of which 0 constructed an object rather than computing a result; 0 with no instrument failure: 0 honoured, 0 violated, 0 with no contract checked; 1 where Syntology's instrument failed) · 0 unverified); nothing checks that they implement this paper's method. report
tensorflow/gan found in paper text by SyntologyApache-2.0Syntology: 16 samples, 12 ran (3 instrument-failed) · 4 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.

A paper named beside a repository with no sample linked to this paper is shown with that paper's own run record, not this paper's: “ran” means executed on a synthesized input, not that the code is correct, and “where Syntology's instrument failed” counts failures of Syntology's instrument, not of the code. Papers are listed in arXiv-id order, at most three per repository.

Code Syntology ran Syntology

16 samples harvested: 12 ran (of which 0 constructed an object rather than computing a result; 9 with no instrument failure: 2 honoured, 0 violated, 7 with no contract checked; 3 where Syntology's instrument failed) · 4 unverified. “Where Syntology's instrument failed” counts failures of Syntology's instrument, not of the code. Syntology's record for this page last changed ; when this build read Syntology's graph is in the build record. That date is not when the samples ran.

2ran · honoured contract
2ran · our draft was wrong
1ran; the contract check could not run
7ran
4unverified

Licence: 0 of the 16 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 tensorflow/gan. “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.

tensorflow/gan found in paper text by Syntology 16 samples, 12 ran (3 instrument-failed) · 4 unverified
args_to_gan_model tensorflow_gan/python/losses/tuple_losses.py ran · our draft was wrong Apache-2.0 (permissive) · e00c96eaf4964fcf · report fixture: signature loss_fn:callable/0/? · returned function · level recorded 2026-09-24
get_trainable_variables tensorflow_gan/python/contrib_utils.py ran · honoured contract Apache-2.0 (permissive) · 49e2b0cc4b0c854f · report fixture: signature scope:NoneType/0/?, suffix:NoneType/0/? · returned list · level recorded 2026-09-24
get_variables_by_name tensorflow_gan/python/contrib_utils.py ran · honoured contract Apache-2.0 (permissive) · bfe05de19b4eb8d1 · report fixture: signature given_name:str/0/str, scope:str/0/str · returned list · level recorded 2026-09-24
image_grid in 41 papers tensorflow_gan/python/eval/eval_utils.py ran Apache-2.0 (permissive) · c2576a700c35ebba · report fixture: signature input_tensor:EagerTensor/4/float, grid_shape:list/1/int, image_shape:list/1/int, num_channels:int/0/int · returned EagerTensor · level recorded 2026-09-24
kl_divergence in 86 papers
census: 18 implementations from 18 papers, 15 distinct outputs across 7 buckets, one shared input per bucket
tensorflow_gan/python/eval/classifier_metrics.py ran Apache-2.0 (permissive) · a3e29c3eb31126b7 · report fixture: signature p:EagerTensor/2/float, p_logits:EagerTensor/2/float, q:EagerTensor/1/float · returned SymbolicTensor · level recorded 2026-09-24
python_image_grid tensorflow_gan/python/eval/eval_utils.py ran; the contract check could not run (RAISES) Apache-2.0 (permissive) · 3c1810a3f62b3156 · report fixture: signature input_array:ndarray/4/int, grid_shape:list/1/int · returned ndarray · level recorded 2026-09-24
run_classifier_fn tensorflow_gan/python/eval/classifier_metrics.py ran Apache-2.0 (permissive) · c9b8371a08cafd98 · report fixture: signature input_tensor:EagerTensor/2/float, classifier_fn:callable/0/?, num_batches:int/0/int, dtypes:NoneType/0/?, name:str/0/str · returned SymbolicTensor · level recorded 2026-09-24
sample_and_run_classifier_fn tensorflow_gan/python/eval/classifier_metrics.py ran Apache-2.0 (permissive) · e56d29a30182c70a · report fixture: signature sample_fn:callable/0/?, sample_inputs:list/1/EagerTensor, classifier_fn:callable/0/?, dtypes:NoneType/0/?, name:str/0/str · returned EagerTensor · level recorded 2026-09-24
stargan_prediction_input_fn_wrapper tensorflow_gan/python/estimator/stargan_estimator.py ran · our draft was wrong Apache-2.0 (permissive) · 86ee4730f89c1466 · report fixture: signature fn:callable/0/? · returned function · level recorded 2026-09-24
wasserstein_discriminator_loss tensorflow_gan/python/losses/losses_impl.py ran Apache-2.0 (permissive) · 6dfacdb4f7f296a6 · report fixture: signature discriminator_real_outputs:EagerTensor/2/float, discriminator_gen_outputs:EagerTensor/2/float, real_weights:float/0/float, generated_weights:float/0/float, scope:str/0/str, loss_collection:str/0/str, reduction:str/0/str, add_summaries:bool/0/bool · returned SymbolicTensor · level recorded 2026-09-24
wasserstein_generator_loss tensorflow_gan/python/losses/losses_impl.py ran Apache-2.0 (permissive) · ef511aaa7c479fd0 · report fixture: signature discriminator_gen_outputs:EagerTensor/2/float, weights:EagerTensor/2/float, scope:NoneType/0/?, loss_collection:str/0/str, reduction:str/0/str, add_summaries:bool/0/bool · returned SymbolicTensor · level recorded 2026-09-24
wasserstein_hinge_discriminator_loss tensorflow_gan/python/losses/losses_impl.py ran Apache-2.0 (permissive) · 3160840ade588e25 · report fixture: signature discriminator_real_outputs:SymbolicTensor/2/float, discriminator_gen_outputs:SymbolicTensor/2/float, real_weights:float/0/float, generated_weights:float/0/float, real_hinge:float/0/float, generated_hinge:float/0/float, scope:NoneType/0/?, loss_collection:str/0/str, reduction:str/0/str, add_summaries:bool/0/bool · returned SymbolicTensor · level recorded 2026-09-24
discriminator_fn tensorflow_gan/python/estimator/tpu_gan_estimator_test_lib.py unverified Apache-2.0 (permissive) · 1341ccc8c51a764e · report
generator_fn tensorflow_gan/python/estimator/tpu_gan_estimator_test_lib.py unverified Apache-2.0 (permissive) · ace1970711646371 · report
get_variables in 6 papers tensorflow_gan/python/contrib_utils.py unverified Apache-2.0 (permissive) · 8257e435f9a8eec2 · report
image_reshaper tensorflow_gan/python/eval/eval_utils.py unverified Apache-2.0 (permissive) · 1ea274c92e014f1e · report

Tasks

Attribute

Results from the paper archive 2025-07-28

No leaderboard rows for this paper in the archive.

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