Compatible Likelihoods for Flow Matching on Manifolds
1 University of Cambridge
Click the entry to select it all.
@inproceedings{
ng2026compatible,
title={Compatible Likelihoods for Flow Matching on Manifolds},
author={Lucas Ng and Georgios Batzolis and Mark Girolami},
booktitle={The Fortieth Annual Conference on Neural Information Processing Systems},
year={2026},
url={https://openreview.net/forum?id=jJsQucS0Fg}
} Abstract
1 Introduction
Modern generative modelling owes much of its success to transport-based models, which learn to deform a simple base distribution into the target data distribution. Among them are diffusion models (Sohl-Dickstein et al. 2015; Ho et al. 2020) and normalizing flows (Tabak and Turner 2013; Rezende and Mohamed 2015; Papamakarios et al. 2021). In particular, conditional flow matching models (Lipman et al. 2023; Albergo and Vanden-Eijnden 2023; Liu et al. 2023) are effective at generating images (Hu et al. 2024), video (Jin et al. 2025), and heterogeneous tabular data (Guzmán-Cordero et al. 2025). As flow matching models learn the transport map in terms of a time-dependent vector field, they belong to the class of continuous normalizing flows (Chen et al. 2018). To overcome the scalability challenges afflicting other models in this class, flow matching decomposes the intractable marginal probability path into simpler conditional paths that couple the base and data distributions. The idea is to learn the marginal velocity field by regression onto many examples of the simple fields generating these simple paths.
Many datasets are inherently non-Euclidean and more naturally modelled as distributions on curved manifolds of nontrivial topology. The dominant generalization of flow matching to manifolds is the Riemannian flow matching (RFM) model of Chen and Lipman (2024). Recently, Eijkelboom et al. (2024) have observed that the Euclidean flow matching objective is equivalent to maximizing the likelihood of a Gaussian model of the true endpoint posterior . Cast in this light, flow matching generalizes to data supported on arbitrary, non-Euclidean spaces through an appropriate choice of parametric family . Applying this to Riemannian manifolds, Zaghen et al. (2026) propose Riemannian Gaussian variational flow matching (RG-VFM), which maximizes the likelihood of Pennec (2006)’s Riemannian Gaussian distribution over conditional endpoints.
By delineating two properties, we characterize loss functions for flow matching in terms of their likelihood model, whether that is explicit (as in RG-VFM) or implicit (as in RFM). First, we say a loss function is compatible if its population optimum is at the true marginal flow induced by the data and coupling. This is a minimal correctness check for an objective to be of general utility. Second, we say it is support-aware if the likelihood model puts mass only on velocities that are achievable. As depicted in Table 1, these are independent properties in the sense that RFM is compatible but not support-aware on compact manifolds, while RG-VFM is support-aware but not compatible.
Our theoretical contributions are:
We derive a general compatibility condition for likelihood-based losses, satisfied by RFM but not RG-VFM. We show this analytically on the simplest non-Euclidean manifold, the flat torus . This general condition is of particular relevance to the manifold setting, but applies to any flow matching problem in which the conditional paths are nonlinear.
We show that the squared error in the local flow scales with the product of distributional fit and a residual term. For a compatible model, the residual is zero, which eliminates this source of error even when the likelihood model is misspecified.
We view RFM as maximizing likelihood over velocities in the tangent space under a Gaussian model of fixed covariance. This reveals how, despite being compatible, it omits global structure from its training signal. One example is compact manifolds, where the maximum flow speed is limited. Here, the RFM likelihood puts density on infeasible velocities.
This motivates our proposed method, which is both compatible and support-aware. We use an exponential family in endpoint space with the conditional velocity as sufficient statistic. This enforces compatibility regardless of the underlying geometry, inducing a geometrically preconditioned regression loss (with the RFM pipeline otherwise unchanged). Experimentally, we first compare methods on a simple distribution on where the ideal behaviour of all models is analytic. Faced with rapid spatiotemporal variation in incompatible models, where gradients are uncontrolled except by the network Lipschitz constant, ODE solvers struggle. We then evaluate on high-dimensional tori and four geospatial datasets, following Chen and Lipman (2024) and De Bortoli et al. (2022), as well as on a dataset of human poses in with nearly 12 million training samples.
| Method | Network output | Compatible? | Support-aware on compact manifolds? |
|---|---|---|---|
| RFM | velocity | Yes | No |
| RG-VFM | endpoint | No | Yes |
| Ours | velocity | Yes | Yes |
2 Preliminaries
Riemannian flow matching (RFM)
Chen and Lipman (2024) apply flow matching to general manifolds, as long as we have a suitable notion of distance to hand. If we have the exponential and logarithmic maps, a natural way to construct conditional velocity fields is to follow the minimum-length geodesic at constant speed from a base sample at to a data sample at . Then , where is the intermediate point1 along the geodesic at time . Together with the coupling, these conditional velocity fields uniquely determine conditional probability paths via the continuity equation,
under the boundary conditions and . The converse holds modulo gauge freedom in the velocity fields, as different velocity fields can induce the same probability path. Learning the marginal velocity field produces a transport map from the base distribution into the data distribution. To achieve this, the RFM loss is
Variational flow matching (VFM)
In the Euclidean setting, Eijkelboom et al. (2024) reformulate flow matching as likelihood maximization for a virtual parametric model of the endpoint posterior . The objective is to minimize the KL divergence or, equivalently, to maximize a likelihood in endpoint space,
This gives a unified framework in which, by choosing an appropriate likelihood model , flow matching generalizes to arbitrary data supports like the space of graphs. Eijkelboom et al. (2024) show further that the squared norm loss of Euclidean flow matching corresponds to implicitly modelling the endpoint posterior as a Gaussian of fixed covariance.
Riemannian Gaussian variational flow matching (RG-VFM)
Zaghen et al. (2026) extend this endpoint-likelihood view to manifolds. They choose the family of virtual models to be the Riemannian Gaussians of Pennec (2006) with mean parameter and constant variance ,
By restricting to homogeneous manifolds, where all points are geometrically equivalent under the symmetries of the manifold, Zaghen et al. (2026) propose the RG-VFM loss,
This exploits the fact that the partition function of the Riemannian Gaussian on a homogeneous manifold is independent of . Hence, it can be dropped from the loss without affecting the optimization. Because is an endpoint, RG-VFM predicts the velocity as .
3 Compatibility of training objectives
We call a training objective compatible if every population minimizer, after applying the prescribed decoder from network output to velocity, produces the true marginal velocity,
This is the minimal requirement for correctness as it guarantees that transport along integral curves of transforms the base distribution into the data . Statistical decision theory would see this as an application of Fisher consistency; we use an alternative name here to avoid confusion with Consistency Models (Song et al. 2023; C. Cheng et al. 2025). Since , RFM satisfies this. By contrast, the RG-VFM objective has global minima at any and all Fréchet means of . Converting such an endpoint on the manifold into a velocity tangent vector generally does not produce the true , except in Euclidean space.
The likelihood perspective of Eijkelboom et al. (2024) is gaining traction, proliferating to a diversity of settings. As well as Zaghen et al. (2026), the VFM lineage now includes the work of Guzmán-Cordero et al. (2025), Matişan et al. (2026), and Carrasco-Pollo et al. (2026). Alongside RG-VFM, future work is at risk of designing new losses for flow matching which seem natural, without checking for compatibility. Without an explicit check, we risk building on incompatible models. Possible mechanisms are that (1) the parametrization makes this analytically non-obvious, or (2) the added level of indirection obscures the connection to the careful construction of conditional flow matching.
In this section, we seek a general framework for compatibility of flow matching losses, both those that exist and those that will exist. Under the likelihood lens, we study the behaviour of these losses in the manifold setting. As our primary interest is the performance of such a likelihood model at best fit, we proceed under the idealized assumption of infinite data and network capacity. This allows us to reason beyond a binary condition of yes or no and quantify how far from the true marginal flow a likelihood model predicts in the worst case, even under optimal training.
3.1 A motivating example: incompatibility on a manifold without curvature
Zaghen et al. (2026, sec. 4.2) write that RG-VFM implicitly captures the full geometric structure of the manifold while RFM lacks curvature information, resulting in weaker, less precise supervision. Therefore, we begin by comparing both methods on the flat torus where the geometric structure is both conceptually simple and without curvature. Consider the base and data distributions
under independent coupling . With some , let and . As illustrated in Figure 1, the two cross-pair geodesics then meet at at time , carrying equal and opposite velocities. At , their conditional expectation (the true marginal velocity) is zero. At the same , RG-VFM minimizes the Fréchet function,
This has local minima at and ; the loss is locally quadratic around each. Because , the shorter arc between and is the one through . Under the RG-VFM loss, the unique and globally optimal endpoint prediction is . Decoding this endpoint prediction into a velocity prediction at gives a velocity of magnitude . This is substantially different to the zero velocity we expect. Hence, despite the endpoint prediction being globally optimal under the loss, we have incompatible flow on a flat manifold.
Although this construction is intuitive and analytically tractable, a natural question is whether this behaviour is a consequence of the singular distributions and not the objective itself; we analyse a smoothed version in Appendix A. Next, we formalize compatibility for all flow matching objectives viewed as likelihood maximization, agnostic of the base, coupling, or data.
3.2 The condition for compatibility of likelihood-based objectives
Think of training as fitting a model distribution at each to a data posterior , where is whichever variable carries the likelihood, for example an endpoint , a conditional velocity , or something else.2 The marginal velocity field is the expectation under of a feature mapping to the space of conditional velocities, . For a model in endpoint space (like RG-VFM), , while for a model in velocity space (like RFM), . The question is whether likelihood optimization can distinguish between data posteriors that differ in .
Suppose is optimal for under the loss . We wish to know if this optimum could give an incorrect velocity prediction. Consider an alternative for some (signed, square-integrable, mean-zero) . Then
where is the model score at optimum. This perturbation is invisible to the likelihood at first order if this integral vanishes. Meanwhile, it shifts the marginal velocity by
For a correct prediction, we need both Equation 2 and Equation 3 to agree that a perturbation actually occurs. That is, the following logical implication must hold for all :
Equivalently, this is a check for the existence of a -independent linear map and vector such that we have (almost everywhere),
Since is unknown before training, a practical objective must satisfy Equation 4 at every in the model class, not just at the optimum. For RG-VFM, whose network output is , the target feature is , and the score with respect to the network output is . As there is no global affine relationship between and on non-Euclidean manifolds, RG-VFM does not satisfy compatibility, obstructed by both curvature and topology.
3.3 Measuring the flow error
A natural way to quantify the departure from compatibility is via the best approximation at the likelihood optimum, so as to satisfy Equation 4 as much as possible. Specifically, we solve the least-squares problem
denoting the residual term as . We obtain the following bound, which is locally sharp in the sense of Cauchy–Schwarz:3
Theorem 1. Assume measurable , . Let be absolutely continuous with respect to . Assume the first-order optimality condition (requiring to be interior) and enough regularity for the score identity . Then
where is the chi-squared divergence between and .
Proof. See Appendix A.1.
This elucidates why strong performance does not need the likelihood to be an accurate approximation to the density. A compatible likelihood model has zero residual and zero flow error at the population optimum, regardless of the residual distributional misfit . This gives a proof of the compatibility condition alternative to the exposition in Section 3.2. Adding more degrees of freedom to the likelihood model, aiming for better density estimation, seems a natural way to reduce flow error. However, if the model is incompatible, the residual remains nonzero. Unconstrained by first-order conditions, a flow error generically persists. That is, we should favour likelihood families that possess compatibility over those that are more expressive but do not.
Moreover, the velocity implied by the likelihood model, , is not necessarily the prediction the model uses in practice, . To avoid computing the expectation online, methods like RG-VFM use a decoder. This takes the parameters of the likelihood at the network head and maps them to a velocity prediction. Via the triangle inequality, this mismatch between the decoder and the likelihood moments leads to an additional error term:
This reiterates that, in settings with nonlinear conditional paths, like on a manifold, a family of likelihoods needs more than geometric naturalness. In addition to compatibility, we would like to parametrize the likelihood family without this decoder error.
3.4 Riemannian flow matching does likelihood maximization implicitly
Here, we express the RFM loss in maximum-likelihood form in velocity space as
where is the Gaussian over the full tangent space. The score with respect to the network output is , which is affine in the feature . Hence, RFM satisfies the compatibility condition. However, this Gaussian is not support-aware on compact manifolds. On a compact manifold , conditional velocities are bounded as
The map is not surjective. That is, many tangent vectors do not correspond to any endpoint on the manifold. Despite this, the Gaussian puts density on velocities outside the feasible set, regardless of the training distributions. Two adjacent velocities, straddling the boundary of the feasible set so that one is feasible and the other is not, have near equal loss. This discards prior knowledge of the global manifold structure and suggests an improvement to the method: using this information to improve training efficiency and optima achieved.
4 Method
These theoretical developments point to a likelihood family whose score is affine in the conditional velocity. In addition, we want to support the likelihood on manifold endpoints only, so as to avoid inefficient density assignment. As in Zaghen et al. (2026), defining the likelihood in endpoint space (at least initially) is a natural way to achieve this. Keeping velocity prediction as the network output, we propose an exponential family with conditional velocity as the sufficient statistic,
This is an exponential family with natural parameter , carrier . This uniquely maximizes entropy relative to amongst endpoint distributions of a given mean velocity. Per the standard property of exponential families, let the mean map be
where is the log-partition function,
To tie the family to the network, we set . This makes the prediction of the model match the expectation of the likelihood. We discuss the domain of this in Appendix C. The score with respect to is and since the target feature is , the compatibility condition of Equation 4 is satisfied. Hence, the model fulfils both key desiderata.
Training loss
Differentiating the negative log-likelihood with respect to gives
where is the covariance of at the natural parameter matching the predicted velocity . This is the Fisher information of the model. Detaching from the backward pass yields a surrogate loss with gradients identical to those of the likelihood objective,4
where is the stop-gradient operator. Our method naturally reduces to a reweighting of the RFM objective, and crucially without opening up the entries of the preconditioning matrix as a new design space. In other settings, using the inverse Fisher information to adapt dynamics to the intrinsic geometry is an idea that has seen performance gains (Girolami and Calderhead 2011).
Choice of carrier
Although our construction addresses both key desiderata, the choice of carrier is apparently open. However, this design axis mostly collapses under several structural constraints. We seek a centred, isotropic carrier that factorizes on product manifolds, localizes around as , and recovers ordinary flow matching in Euclidean space. Among radial carriers, product factorization imposes a Gaussian form; terminal locality sets the decay; and matching the Euclidean covariance sets its scale (Appendix A). This leads to the following choice, reminiscent of the Riemannian Gaussian in Zaghen et al. (2026):
This is also normalizable on common noncompact manifolds, including hyperbolic space, which requires the carrier to have superlinear decay. As , the loss tends to that of RFM. In Appendix B, we study sensitivity to the carrier. The resulting velocity-space likelihood is Gaussian in Euclidean space and a truncated Gaussian on flat tori; on spheres, the loss upweights errors in speed relative to those in direction (Figure 7). This reflects the intuition that geodesic convergence on manifolds of positive curvature means errors in magnitude are more significant than those in direction.
Practical computation
At first, it seems we must compute the mean map and covariance per training step, online and via numerical differentiation. The insight is that the more symmetries a manifold has, the fewer scalar functions depends on. By differentiating under the integral sign, we get a formula for each scalar function. On many manifolds, we pretabulate these via quadrature in low dimensions, often just one. Different datasets on a given manifold can reuse the same lookup table. On the flat torus , the covariance is diagonal with each entry an independent function of . All factors share a single 1D lookup table. On spaces of constant curvature, isotropy cuts down to two scalar functions of the magnitude. On product manifolds, is block diagonal with one block per factor. This lets us compose tables and highlights that on many manifolds, the table dimension stays low as the manifold dimension grows. Queries to the lookup tables take time. In Appendix F, we show that, when compiled, the overhead per iteration is negligible.
5 Experiments
In this section, we evaluate our theoretical predictions and method across four settings. We defer implementation details to Appendix C and evaluation and training protocols to Appendix E.
Analytic test case
We test the predictions of Section 3.1 under the parameters illustrated in Figure 1 with 30 seeds. Figure 2 shows the velocity error at . Both RFM and our method achieve velocities close to the ideal value of zero, while RG-VFM is bimodal and splits into two clusters of 15 seeds each. As the magnitude is bounded per Section 3.4, the upper cluster has its centre just below the value of from Section 3.1. The lower cluster corresponds to the population local minimum of RG-VFM at zero velocity, which is a stable attractor for some seeds but not globally optimal.
Table 2 shows distributional metrics and, for dopri5, NFE and wall times. Ranking by agrees with ranking by velocity error at , supporting the idea that learning the marginal velocity is important for generative performance. RG-VFM seeds in the upper cluster are better by training loss than those in the lower cluster, but perform worse on generative metrics and require more ODE steps. Ranking by kernel methods favours our method and RFM over both RG-VFM clusters. A potential cause of this discrepancy is that optimal transport is more sensitive to the ratio of samples generated near to each Dirac and more affected by the flow branch. RG-VFM has the highest inference NFEs and wall times by far. This is consistent with the rapid spatiotemporal variation we observe in the learned RG-VFM field in the absence of compatibility (see also Figure 4).
| Error | Energy dist. | MMD | NFE | Time | |||
|---|---|---|---|---|---|---|---|
| Method (# seeds) | via | Laplace | dopri5 | dopri5, (s) | |||
| RFM (30) | 0.070 0.040 | 0.45 0.20 | 0.88 0.30 | 0.214 0.064 | 0.055 0.028 | 497 [426, 578] | 1.92 [1.65, 2.22] |
| RG-VFM (30) | 2.080 2.078 | 0.54 0.29 | 0.83 0.32 | 0.311 0.191 | 0.085 0.079 | 36,839 [33,796, 60,574] | 141.4 [130.3, 233.9] |
| upper cluster (15) | 4.123 0.042 | 0.65 0.30 | 1.00 0.31 | 0.370 0.212 | 0.107 0.089 | 55,436 [32,228, 70,115] | 212.9 [124.0, 271.9] |
| lower cluster (15) | 0.037 0.019 | 0.42 0.24 | 0.66 0.25 | 0.251 0.151 | 0.063 0.063 | 36,638 [35,411, 41,675] | 140.4 [136.8, 161.3] |
| Our method (30) | 0.060 0.041 | 0.43 0.18 | 0.84 0.31 | 0.212 0.055 | 0.054 0.024 | 443 [388, 582] | 1.71 [1.49, 2.24] |
High-dimensional product tori
Following the setup of De Bortoli et al. (2022) and Chen and Lipman (2024), we evaluate on product tori with uniform base and wrapped Gaussian data distribution of scale . This setup is of particular interest because the scale is so small that the optimal NLL of a continuous normalizing flow is analytic. Recall that so the differential entropy of the true data gives a lower bound. As the density is isotropic, the per-dimension NLL lower bound is , exact to 4 decimal places for all dimensions here. We see in Table 3 that NLL is uninformative for RG-VFM and several values reported by Chen and Lipman (2024) are below the entropic lower bound, which may be due to use of Rademacher vectors to estimate divergence. To mitigate this, we use exact divergence via jacrev. In Appendix B, we run the checkerboard experiment of Zaghen et al. (2026), testing many solver settings to sanity-check that the NLL results of RG-VFM are not an artefact of our implementation.
In Figure 3, the MMD gives an interesting comparison. We see that before dimension 200, there is a consistent ordering of methods with our method best, RFM second, and RG-VFM last. Beyond this, our method maintains its advantage while RFM and RG-VFM swap places. This is consistent with the idea of Section 3.4 that awareness of geometric constraints is important for scalability.
| Our method | RFM Paper results |
RFM Reproduced |
RG-VFM | Riemannian Score-Based |
|
|---|---|---|---|---|---|
| -0.1904 0.001 | -0.2051 0.010 † | -0.1715 0.006 | -0.2171 0.001 † | -0.1482 0.010 | |
| -0.1900 0.005 | -0.1495 0.010 | -0.1658 0.004 | -0.2142 0.003 † | -0.1412 0.010 | |
| -0.1879 0.004 | -0.1851 0.010 | -0.1681 0.003 | -0.2157 0.002 † | -0.1519 0.010 | |
| -0.1827 0.004 | -0.1838 0.010 | -0.1678 0.002 | -0.2211 0.002 † | -0.1404 0.010 | |
| -0.1871 0.001 | -0.2105 0.010 † | -0.1673 0.001 | -0.2935 0.011 † | -0.1230 0.010 | |
| -0.1847 0.001 | -0.2111 0.010 † | -0.1687 0.001 | -0.3524 0.010 † | -0.0840 0.010 | |
| -0.1758 0.003 | -0.2065 0.010 † | -0.1553 0.001 | -0.4091 0.008 † | 0.0355 0.010 | |
| -0.1643 0.002 | -0.1701 0.010 | -0.0993 0.001 | -0.3368 0.017 † | 0.0745 0.010 | |
| -0.1374 0.002 | -0.1432 0.010 | -0.0232 0.002 | -1.1979 0.040 † | 0.1423 0.010 |
| Volcano | Earthquake | Flood | Fire | |
|---|---|---|---|---|
| Dataset size (train + val + test) | 827 | 6,120 | 4,875 | 12,809 |
| Riemannian CNF (Mathieu and Nickel 2020) | -0.97 0.15 | 0.19 0.04 | 0.90 0.03 | -0.66 0.05 |
| Moser Flow (Rozen et al. 2021) | -2.02 0.42 | -0.09 0.02 | 0.62 0.04 | -1.03 0.03 |
| CNF Matching (Ben-Hamu et al. 2022) | -2.38 0.17 | -0.38 0.01 | 0.25 0.02 | -1.40 0.02 |
| Riemannian Score-Based (De Bortoli et al. 2022) | -4.92 0.25 | -0.19 0.07 | 0.45 0.17 | -1.33 0.06 |
| Riemannian Diffusion Model (Huang et al. 2022) | -6.61 0.97 | -0.40 0.05 | 0.43 0.07 | -1.38 0.05 |
| RFM (Paper results) | -7.93 1.67 | -0.28 0.08 | 0.42 0.05 | -1.86 0.11 |
| RFM (Reproduced) | -6.96 1.71 | -0.21 0.05 | 0.48 0.04 | -1.77 0.06 |
| Our method | -9.69 1.94 | -0.28 0.04 | 0.47 0.04 | -2.11 0.11 |
Earth and climate science datasets on the sphere
Following Chen and Lipman (2024), we apply our method to datasets compiled from NGDC/WDS (2020a, 2020b), Brakenridge (2017), and EOSDIS (2020) by Mathieu and Nickel (2020). In Table 4, we see uniform improvement relative to our reproduction of the baseline. While our method, like RFM, struggles on the earthquake and flood datasets, it improves over prior work on the volcano and fire datasets, which are the smallest and largest datasets respectively and have highly concentrated regions requiring high fidelity (see plots in De Bortoli et al. 2022). The models outperforming our method and RFM (Reproduced) do not require implicitly specifying a particular transport path. This allows them to optimize the path. The trade-off is lack of scalability above low manifold dimension.
High-dimensional human pose data
We further evaluate on a large-scale dataset of human poses from amass (Mahmood et al. 2019), embedded in , following Dünkel et al. (2024) in the partition of the dataset we use. We train RFM, RG-VFM, and our method on 11,823,971 samples from this partition. We also compare with the released checkpoint of HuProSO3 (Dünkel et al. 2024), which was trained on the full partition, including our test samples. We see in Table 5 that our method outperforms according to both sample-based metrics. This supports the use of our method, especially in high-dimensional applications where sample quality is of particular importance.
id_0900. 20,000 samples per seed.
| NLL | Energy distance | Gaussian MMD | |
|---|---|---|---|
| Method | w.r.t. Haar | chordal, | chordal, |
| HuProSO3 | -137.78 | 56.76 | 9.746 |
| RG-VFM | -150.58 0.41 | 18.60 1.72 | 3.601 0.308 |
| RFM | -198.11 0.81 | 2.16 0.20 | 0.379 0.035 |
| Our method | -197.41 0.44 | 1.68 0.04 | 0.293 0.008 |
6 Limitations
Similar to RFM (Chen and Lipman 2024) and RG-VFM (Zaghen et al. 2026), our method requires specialization per manifold. Both RFM and RG-VFM have the advantage of only requiring well-studied manifold objects. Tables of metric tensors and logarithmic maps are readily available; our method brings the added work of devising an efficient way to compute and invert the mean map and pretabulate the covariance components. This generally involves identifying a symmetry that reduces the integration to low-dimensional quadrature, differentiating under the integral sign, and crafting a numerically stable implementation. We have not implemented our method on general geometries as extensively as Chen and Lipman (2024) have for RFM. For manifolds without closed-form geodesics, even RFM is costly and complex. In this setting, probability paths are defined via diffusive or biharmonic premetrics, so our method would need to perform quadrature over these or estimate the mean and variance via Monte Carlo, which may be prohibitive. We discuss these potential extensions in Appendix C. As in RG-VFM, we target data with known symmetries and geometric structure rather than arbitrary 3D meshes, but it may be possible to extend our method to these settings. Unlike RG-VFM, we do not require homogeneity, although it is useful in practice.
7 Related Work
Guzmán-Cordero et al. (2025) previously suggested, based on the ideas of Eijkelboom et al. (2024), that likelihoods over endpoints should be exponential families with a parameter of interest as the sufficient statistic. Their work targets heterogeneous tabular data, relying on the identity via linearity of conditional paths to estimate the marginal field from the endpoint prediction, similar to RG-VFM. As this work establishes, the nonlinearity of conditional paths on manifolds means that such constructions do not generally possess compatibility.
Prior intrinsic generative models include Riemannian CNFs (Mathieu and Nickel 2020), Moser Flow (Rozen et al. 2021), CNF Matching (Ben-Hamu et al. 2022), and score-based (De Bortoli et al. 2022) and ELBO-based diffusion (Huang et al. 2022). However, as Chen and Lipman (2024) discuss, these require simulated random walks (Huang et al. 2022; De Bortoli et al. 2022), approximations to the heat kernel (De Bortoli et al. 2022), heavy divergence computation (Huang et al. 2022) or Hutchinson estimation (Mathieu and Nickel 2020). Earlier simulation-free methods (Rozen et al. 2021; Ben-Hamu et al. 2022) scale poorly to high dimensions and general geometries.
With the exception of RG-VFM, recent manifold extensions of flow matching mostly specialize RFM to particular geometries or applications (as in Cheng et al. 2024; Miller et al. 2024; A. H. Cheng et al. 2025), or propose an alternative method for a single manifold class (as in Collas et al. 2025). An orthogonal line of work focuses on accelerated inference. Consistency models (Song et al. 2023) distil one-step maps from intermediate states to data, and Riemannian consistency models (C. Cheng et al. 2025) port this idea to manifolds. Similarly, flow maps (Boffi et al. 2025) use self-distillation for few-step inference, and Davis et al. (2026) propose Generalized Flow Maps for manifolds.
8 Conclusion
At population optima, likelihood maximization generically fails to recover the true marginal velocity. Our compatibility condition characterizes when it succeeds. Our residual bound shows that compatibility is enough to avoid this source of error even if the likelihood is misspecified. On compact manifolds, prior work satisfying the condition assigns Gaussian likelihood to infeasible velocities. We propose an exponential family in endpoint space that preconditions the loss while being both compatible and support-aware. Empirically, our method recovers the expected velocity in the analytic test case, improves NLL on two spherical benchmarks, and improves sample-based metrics on high-dimensional tori and human poses. More broadly, in choosing a likelihood for flow matching, we must consider not only the intrinsic geometry, but also whether optimizing yields the right flow.
Acknowledgements
This research is supported through the EPSRC ROSEHIPS grant [EP/W005816/1].
Appendix
Organization of the appendix
We prove and derive the main theoretical results of interest in Appendix A; we share more experiments and ablations in Appendix B; we describe implementation details and training algorithms in Appendix C; we specialize the method to some common manifolds of interest in Appendix D; we outline the experimental protocols and hyperparameters in Appendix E; and we report measurements of computational performance in Appendix F.
A Proofs and theoretical derivations
A.1 Compatibility bound
See Theorem 1.
Proof. The residual is defined as that of the least-squares problem
In particular,
Now taking expectations under each distribution and ,
In the subtraction of these expressions, the terms cancel and we are left with
For any unit vector , Cauchy–Schwarz yields
Taking supremum over unit vectors concludes the proof.
A.2 Motivating example with smooth data on
Here, we check whether the example of Section 3.1 survives after smoothing the mixture of Diracs into that of wrapped Gaussians,
As before, let , , and . Geodesics joining the component centres and meet at . For a coupled pair with geodesic velocity at , the endpoints satisfy and (modulo ). As the change of variables has unit Jacobian, under independent coupling the conditional density satisfies
Both mixtures satisfy . Hence, . For all and ,
Local behaviour of the marginal velocity
The derivative determines the direction of the true marginal field near the crossing. Let , , and . For small , the two crossing component pairs dominate near . Via the corresponding Gaussian components on , we calculate the conditional mean of for each crossing pair. For pairs centred at and , we have, via completion of the square,
The two Gaussian products have the same dependence on (after integration over ), so they also have equal posterior weights. Averaging over the two crossing pairs cancels the terms in ,
For pairs whose endpoints are of the same sign, the mean of is ; for crossing pairs, it is zero. For all four cases, the variance is . For each pair whose endpoints are of the same sign, the distribution of has density at zero equal to times that for a crossing pair. To obtain the derivative for the wrapped distributions, we must also account for periodic copies and the restriction . We have
Since , differentiating gives
At , the endpoints satisfy and . Both endpoints coincide with their Gaussian means for only the crossing pairs, at . For the other pairs, no value of puts both endpoints at their Gaussian means. The crossing peaks lie some fixed distance from the integration boundaries. Hence, other Gaussian terms and the tails, added when extending the crossing integrals to , change the derivative of the numerator and the value of the denominator by at most for some and finite . The crossing terms contribute a denominator of order , so
for some . Reflection means is odd, implying that
That is to say, for sufficiently narrow components, the true marginal velocity points toward zero on both sides of the crossing.
Global optimum of the RG-VFM loss for smooth data
RG-VFM minimizes the Fréchet function of the conditional endpoint distribution. At , the endpoint corresponding to is , so
By symmetry, , meaning is always a stationary point. Let be the magnitude of the endpoint, where induces the density of . Again by symmetry, it will suffice to compare with for . For symmetric endpoints , the Fréchet function changes by
Now, averaging over
Only endpoint magnitudes contribute to the second term, which offsets the quadratic cost of moving away from . Choose and let . If and , then, for ,
For ,
For the wrapped Gaussian mixtures, concentrates at as , so and . The strict inequalities hold for sufficiently small component variances, persisting for small perturbations (within the family of symmetric mixtures). Hence is the unique global optimum for RG-VFM on an open region within the parameterized family of symmetric smooth mixtures. At , either minimum-length geodesic from zero has length . Because of this, the smoothed case has the same branch ambiguity as for the mixture of Diracs. While symmetry gives , RG-VFM decodes this endpoint into a velocity of magnitude . Again, the velocity error at the population optimum is
A.3 Characterization of the Gaussian carrier
As the theory of compatibility does not select a universal carrier, we impose a small number of heuristic desiderata. We desire for the carrier to be centred, isotropic, factorizable on product manifolds, give ordinary CFM in the Euclidean case, linearize to RFM in the limit , and be normalizable on manifolds of interest. For a radially isotropic carrier, coordinates on product manifolds enter only through the joint norm . Following the same derivation as for Herschel–Maxwell, we write such a carrier as and use factorization to obtain
where . Hence, by continuity, . Geodesic exponentials provide a natural setting in which to vary the tailedness of the carrier in ablation (see Appendix B.3). Terminal locality excludes the constant and growing choices. This means that , and equating the Euclidean covariance to selects uniquely. The requirements narrow to the present choice of Gaussian carrier.
A.4 Limiting behaviour and relationship to Riemannian flow matching
Manifolds with diffeomorphic exponential map
On these noncompact manifolds, a special choice of carrier recovers Riemannian flow matching. We see that the Jacobian term introduces an artificial linearization of the likelihood model over endpoints, collapsing the variance to the identity. Let the carrier be
Here, is the Jacobian determinant with respect to the Riemannian volume measures. The exponential family over endpoints
pushes forward under to a density on ,
Thus the pushforward is , and
In consequence, , , and the likelihood-based loss is equivalent to RFM up to the factor . On flat manifolds like product tori, this carrier is equivalent to our choice up to a constant factor, but the pushforward for product tori is truncated, as in Appendix D.1.
Asymptotic convergence as
Under our choice of carrier, as , the endpoint distribution concentrates around , with typical distances of order . In this limit, the geometry becomes locally Euclidean by linearization of the exponential map, and the covariance operator converges to the identity, so the sample loss approaches , the RFM sample loss up to the factor . Examples of this limit can be found in Appendix D.
B Supplementary experimental results
B.1 Profiles of the vector fields for the analytic test case on
In the absence of compatibility, first-order conditions for likelihood maximization do not fully determine the learned marginal velocity in the sense we discuss in Section 3.2. Here, we study the learned field corresponding to the analytic example in Section 3.1, in particular its behaviour with respect to ODE solvers. The analytic predictions are visible in along , as shown in Figure 4. Here, there is a branch ambiguity in that the RG-VFM decoder has the arbitrary choice of two shortest paths to , which approach from opposing directions. The upper cluster for RG-VFM (the globally optimal case, defined as in Figure 2) exhibits what is nearly a discontinuity at , with the one-sided limits matching the values predicted in Section 3.1. The lower cluster is smooth but converges to the local minimum at zero velocity, which is not globally optimal. RFM and our method are smooth throughout. We attribute the high NFE with dopri5 reported in Table 2 to the high local Lipschitz constant of the field in the upper cluster at . The kink at in both RG-VFM clusters is due to the clipping of to a maximum of 10. This is necessary because the pole at is not automatically separable in the same way as it is for RFM and our method, as the network output is not guaranteed to match the rate necessary for pole cancellation. We take the clamp bounds from the implementation provided by Zaghen et al. (2026).
B.2 Evaluating the NLL for RG-VFM
To check that the uniform violations of the entropic bound we find in the RG-VFM NLLs in Table 3 are not an artefact of our implementation, we reproduce the checkerboard task of Zaghen et al. (2026) on . We use the published codebase on the same task (intrinsic variant, 3,000 epochs at the published hyperparameters) and study the resulting NLL of the continuous normalizing flow under a wide range of solvers. We compute the CNF likelihood via change of variables with exact divergence (per-coordinate torch.autograd.grad), reporting values in bits. Here, we observe values that are too large rather than too small. We cannot predict which way the NLL will diverge, but we hypothesize this to be a function of the data and solver.
Increasing the number of steps
Figure 5 shows a sweep over the number of Euler steps. RFM stabilizes at approximately 2.51 bits (below the entropic upper bound bits for the uniform distribution on ) by and stays there. RG-VFM rises from 1.7 bits at to 723.7 bits at . Repeating the sweep with Heun (2nd order) and rk4 (4th order) gives qualitatively identical behaviour, exceeding 50 bits by for both. This eliminates the possibility of this phenomenon being an artefact of discretization to first order.
Reducing the tolerance of dopri5
Table 6 exhibits the same divergence under dopri5 at tightening tolerances. RFM stays around 2.47 bits while RG-VFM rises from 16.6 bits to 533.5 bits as tolerance drops from to . At tolerance , RG-VFM requires as many function evaluations as RFM. RG-VFM at tolerances exceeds the 300 seconds time limit; RFM completes in under 2 seconds at the tolerances we test.
| RFM | RG-VFM | |||
|---|---|---|---|---|
| NLL | NFE | NLL | NFE | |
| Tolerance | (bits) | (bits) | ||
| 2.48 | 32 | 16.6 | 452 | |
| 2.47 | 50 | 130.0 | 2,318 | |
| 2.47 | 134 | 312.3 | 10,328 | |
| 2.47 | 494 | 533.5 | 34,694 | |
| 2.47 | 2,216 | timeout - — | ||
| 2.47 | 9,902 | timeout - — | ||
Specialized solvers for stiff ODEs
After increasing the time limit to 900 seconds per call, we also test SciPy’s stiff integrators lsoda, bdf and Radau via torchdiffeq. We use tolerances , resulting in 12 runs per model. For RFM, 10 runs complete, taking between 0.2 seconds and 399 seconds. Their NLLs are within 0.04 bits of 2.47 bits. lsoda and Radau time out at tolerance . For RG-VFM, all 12 runs reach the time limit.
B.3 Carrier ablation
Here, as a natural setting to compare our choice of carrier against potential alternatives, we consider the family of geodesic exponential carriers
where, for ,
We choose so that, in two-dimensional Euclidean space at , the covariance is . This is for the same reason that we omit the factor of in the loss—it allows us to compare based on shape and not global rescaling. A global rescaling would largely correspond to just a factor change in the learning rate. We choose as a degenerate carrier that does not localize the endpoint distribution around as . Clearly, this is inefficient density assignment in the limit, and more so than RFM, whose Gaussian tails decay outside the feasible velocity support.
Unlike and , the other carriers , , and do not factor coordinate-wise on product manifolds. For , factorization follows from the additive separability of the squared product norm. Hence, we conduct the ablation on , where pretabulating works for all carriers via quadrature in 1D. Specifically, we compare under the wrapped Gaussian target (a Gaussian in the tangent space pushed forward onto the manifold) described in Section 5 for the experiments. We use RFM as a baseline. As well as the target, the uniform base, coupling, and manifold geometry determine the posterior.
In Table 7, many negative medians occur for energy distance and MMD as the finite sample estimators exhibit skew although the population mean must be non-negative. KL is computed from the difference of the test/NLL and the wrapped Gaussian entropy estimated from the same test samples (i.e., acting as a Monte Carlo control variate). The lowest variance comparison is by KL. Ranked by KL, is clearly worst. Except for , the other powers do not show a clear difference, consistent with the carrier being a robust secondary choice after discarding alternatives filtered out by desiderata such as normalizability.
| KL | Energy distance | Laplace MMD | |
|---|---|---|---|
| RFM | 0.1765 0.1447 [0.1607] | 0.945 5.453 [-0.336] | 2.026 7.359 [-0.187] |
| 0.5485 0.2773 [0.4488] | 9.811 7.990 [5.828] | 15.173 11.696 [9.467] | |
| 0.1398 0.1339 [0.1070] | 1.389 4.884 [-0.306] | 2.681 6.189 [-0.098] | |
| 0.1350 0.1091 [0.1037] | 0.584 5.086 [-1.432] | 1.465 6.405 [-1.383] | |
| 0.1779 0.1667 [0.1215] | 0.713 4.996 [-0.819] | 1.649 6.420 [-1.138] | |
| 0.1617 0.1567 [0.1078] | 0.876 5.740 [-1.237] | 1.872 7.662 [-1.641] |
C Implementation details
C.1 Network output and domain of the mean map
For a full, regular exponential family with positive carrier and bounded sufficient statistic, under minimality is strictly convex. Hence, is one-to-one and maps the natural-parameter space onto the relative interior of the convex hull of feasible conditional velocities. Thus, exists when lies in that interior. At finite interior parameters, is positive definite under minimality. If approaches the boundary, some eigenvalues of the covariance can tend to zero. That is, does have the potential to become ill-conditioned or diverge in the limit. Our notion of support awareness relies on the conditional velocity field being well defined. This is the same prerequisite already required by RFM for the regression target, and by RG-VFM in the decoder from endpoints to velocities—both assume that the set of coupled pairs with non-unique probability paths has measure zero. That is to say, we do not introduce branch dependence at cut loci as an additional assumption or limitation of our method. Our endpoint likelihood induces density only on velocities produced by the conditional map from endpoints to velocities, relative to a fixed choice of branch.
In implementation, the network predicts an unconstrained velocity . We evaluate the surrogate loss where the mean map is invertible. Outside this region, we use a barrier-style extension, which we obtain by clamping the argument of the mean parameter prior to inversion of the table. This has no effect on the population minimizer, provided it lies in the interior. This is because the effective loss we implement in practice is larger outside that interior and the gradients of the penalty all point inwards. On tori we clamp per coordinate while on spheres we clamp the norm. Across the selected checkpoints in our reported experiments, the fraction of predictions for which the barrier remained active was zero. Notwithstanding potentially large gradients as the mean parameter approaches the boundary of its domain, we do not observe any stability issues in practice and did not require gradient clipping, warmup, or other special techniques to train our method. We scale our loss to be on the same scale as the RFM loss by omitting the factor of .
C.2 Training algorithms
In Figure 6, we compare our method and RFM on simple geometries in algorithmic terms.
Algorithm 1: Riemannian Flow Matching
Initialize parameters of
while not converged do
sample time
sample training example
sample noise
end while
Algorithm 2: Our method
Pretabulate components of
Initialize parameters of
while not converged do
sample time
sample training example
sample noise
end while
C.3 Implementation on less symmetric manifolds
In principle, the usual steps of our method work on less symmetric manifolds—compute the mean and covariance of the conditional velocity under the endpoint family, numerically invert the mean map, and cache the resulting functions. Instead of quadrature, Monte Carlo could be feasible; the structure of the exponential family lets us express these quantities as expectations. Computing them offline and interpolating seems the most plausible route. Neural or piecewise optimization is plausibly most useful in either inverting the mean map, or selecting good choices of nodes and weights for quadrature. Generally, if there is a particular high-dimensional manifold supporting several datasets of interest, it would be prudent to learn the function approximations once, reusing them across datasets.
D Specialization to common geometries
The surrogate loss of our method is preconditioned by the covariance of the conditional velocity. For the purposes of this section, let and so that . It will also be particularly convenient to adopt the definition
The range of geodesic velocities that are feasible and the Riemannian volume measure determine the log-partition function. In each case considered here, we find that symmetries of the manifold reduce the covariance to a small number of scalar functions. This makes offline pretabulation tractable.
D.1 Flat torus
As each coordinate of satisfies , we have . Since the metric is flat, the map from endpoints to velocities has constant Jacobian. Hence, the likelihood is a product of distributions truncated to . Now, let . With and as the standard normal density and CDF respectively, the log-partition function separates across coordinates into
The mean velocity is
The covariance is diagonal, with
Hence, we need just one scalar coefficient per coordinate to form the surrogate loss,
As , the interval expands to all of , meaning tends to one. As a result, the loss approaches , which is that of RFM up to a factor of .
D.2 Complete simply connected manifolds of constant curvature
Here, let be a complete simply connected -dimensional manifold of constant sectional curvature where . Rotating around preserves both distance and volume. Hence, the log-partition function depends on only via . To emphasize this radial dependence, we write this function as . The prediction of the velocity is parallel to and . As , the covariance is
At , the continuous extension is ; a directional decomposition is unneeded. Now, let and be the components of which are, respectively, parallel and perpendicular to . Then, the surrogate loss is
We find that the loss weights errors parallel and perpendicular to the predicted velocity differently. As shown in Figure 7, the parallel component has greater weight than the perpendicular one on . This reflects the intuition that, when curvature is positive, geodesic convergence means that errors in the magnitude of the predicted velocity matter more than those in the direction.
Radial integration
We evaluate in polar coordinates around . Let and be the angle between and . The radial part of the Riemannian volume measure is (up to a factor independent of )
For a conditional velocity vector of magnitude making an angle with , the exponent in the likelihood is . Over the sphere of possible directions, the area between angles and is proportional to . Together with the radial factor in the volume measure , this means the log-partition function reduces to
Computation of the derivatives
Employing the modified Bessel function of the first kind, we write the integral over as
For , the derivatives of the Bessel term satisfy the identities
Differentiating Equation 14 under the integral sign enables the calculation of both and via quadrature in just one dimension. We tabulate these and the inverse of the map prior to the training loop. For numerical stability, we use exponentially scaled Bessel functions for large arguments and a series expansion near zero. We accumulate the quadrature sums via log-sum-exp.
Euclidean limit
As , the radial factor in the volume measure converges as . Hence, the integral tends to its Euclidean form for which
As a result, and . Both weights in the loss tend to one, meaning . Up to a factor of , this again recovers the loss of RFM.
D.3 Rotation groups and products
On , we use the canonical bi-invariant metric where the distance from the identity to a rotation is given by its angle. Let a tangent vector at be denoted , where . Identifying is isometric as
Under this metric, has sectional curvature . The manifold is of constant curvature, albeit not simply connected. The largest possible geodesic distance between two rotations is , meaning the conditional velocity satisfies .
Radial integration
As before, rotational symmetry means the log-partition function depends on only via . Let denote this function (for a single rotation factor) and let be the magnitude of the conditional velocity, corresponding to a rotation angle of . The radial part of the volume measure is proportional to . In order to integrate over directions, let be the angle between and the conditional velocity. In three dimensions, the average over directions is
These together reduce the log-partition function to
To evaluate the covariance, we use some helpful derivatives,
Differentiating (under the integral sign) lets us evaluate and via quadrature in one dimension. For numerical stability, we use series expansions near zero, scaled hyperbolic functions for large arguments, and log-sum-exp for the quadrature sums.
Product structure
Here, is the number of rotation factors, so the intrinsic dimension is . On , the metric is the sum of the metrics of the individual rotation groups. As both the likelihood and the volume measure factorize across rotation factors,
where is the norm of the natural parameter for the th rotation factor. The covariance has a block per rotation factor. Each of these takes the form in Equation 12, where determines the . Let and be the components of the error in the th factor parallel and perpendicular to , respectively. Then, by Equation 13, the surrogate loss is
The network uses all rotation factors to predict the velocity in each factor. As , both weights tend to one. Up to a factor of , this again recovers the RFM loss. Due to the product structure and identical factors, we pretabulate just the two scalar functions, reusing them across all rotation factors.
E Experimental methodology and evaluation
E.1 Evaluation framework
Accurate measurement of generative performance on manifolds is important, but many tools from the Euclidean setting are not immediately to hand. Here we discuss validity of common evaluation metrics and lay out our choices.
Wasserstein distances
Wasserstein distances are a natural way to measure generative performance (Villani 2009) but are costly to compute. Sliced Wasserstein mitigates this in Euclidean space by reducing optimal transport via projection, but generalizing requires injectivity of the Radon transform (Kolouri et al. 2019). This is automatic in Euclidean space but for manifolds it requires choosing a family of projections. Hence, attempts to apply sliced Wasserstein to manifolds introduce additional geometric structure. For example, Bonet et al. (2025) propose global projections on Cartan–Hadamard manifolds, where geodesic structure is well behaved, while Rustamov and Majumdar (2023) suggest spectral slicing based on Laplace–Beltrami eigenfunctions. Their metric guarantees rely on the chosen family of projections being separating. In practice, the implementations use approximations via truncating to a finite number of terms.
Kernel methods
Methods based on kernels can work well, but their validity depends on RKHS conditions. The energy distance [ED; Székely and Rizzo (2013)] is a nonparametric discrepancy requiring the space to have strong negative type to be a valid metric. On , geodesic distance has negative type but not strong negative type (Lyons 2020). We can convert to strong negative type by square root (Lyons 2013, Corollary 3.18), setting in the ED formula. Kokkendorff (2002) proves that compact Riemannian manifolds of negative type and dimension are simply connected, so geodesic distance on is not of negative type and the same trick does not work for . Maximum mean discrepancy [MMD; Gretton et al. (2012)] is a related discrepancy defined often with a Gaussian kernel parametrized by its bandwidth. Feragen et al. (2015) show the Riemannian generalization of this kernel is not positive definite on manifolds, suggesting the Laplace kernel specifically for (which includes ). In our experiments, we use the median heuristic to set the Laplace kernel bandwidth.
Our choices
Based on the above, we report Wasserstein distances for our analytic test case, where the data distribution is an equally weighted mixture of two Diracs, simplifying optimal transport (alongside the pedagogical reasons, we chose the singular form of the distributions precisely so that Wasserstein is feasible), alongside the unbiased forms of energy distance with the square-root trick and MMD with the Riemannian Laplace kernel. For the real-world geospatial benchmarks, we found the small size of the test set commonly resulted in negative values for the unbiased kernel methods despite their population validity. As these are well-established benchmarks in the literature with many prior reported results, we think it reasonable to only report NLL. However, this means we cannot compare to RG-VFM as its NLLs are uninformative; see Appendix B.2 for further discussion. As Zaghen et al. (2026) do not report NLLs in their experiments, we were unable to validate our replication directly according to this metric.
E.2 Evaluating on tori in high dimensions via an MMD with Fourier kernel
For high-dimensional product tori, we report NLL so as to compare to prior work, but felt it was necessary to supplement this with a more robust metric, one reason being for a fairer and clearer comparison to RG-VFM. However, the Riemannian energy distance and Laplace-kernel MMD are neither metrics nor pseudometrics for . Here, we construct an MMD pseudometric with a Fourier kernel designed specifically for the wrapped Gaussian target of our experiment. This uses the known closed form of the characteristic function to calculate the RKHS representation of the data distribution without estimation, thus eliminating this source of experimental uncertainty.
We first note that a translation-invariant kernel on is characteristic if and only if its Fourier coefficients are positive on the whole Fourier spectrum (Fukumizu et al. 2008; Sriperumbudur et al. 2010). We use the Fourier kernel
with , , and wavevector for which we choose with parameter . The associated MMD is the RKHS distance between mean embeddings (Gretton et al. 2012),
where is the empirical Fourier embedding of generated samples . In the case of wrapped Gaussian data , we use the closed-form expression for the Fourier embedding of the data distribution, . In practice, we truncate to a finite set of frequencies for some . Then the empirical MMD V-statistic at parameter is
We use the set of wavevectors with the th standard basis vector, and average over a grid centred at , namely to get a more robust estimate of performance giving
where normalizes for total Fourier weight. The result is a scalable squared pseudometric of finite resolution. As it detects discrepancies only in the marginal distributions of individual coordinates, it may miss pairwise interactions at high dimensions. Consideration of all pairs of basis vectors is infeasible at 400 dimensions and the data distribution is in any case isotropic. At low dimensions we found that pairs and higher-order interactions had negligible contribution to the MMD, especially compared with the effect of varying the bandwidth .
E.3 Protocols for training and evaluation
The analytic test case, torus sweep, and geospatial experiments use a single NVIDIA A100-SXM GPU with 80 GB of memory. The efficiency studies use the hardware specified in Appendix F. We follow the RFM setup published by Chen and Lipman (2024) and extend its codebase to support our method and additional evaluation metrics. This splits the data into 80 % train, 10 % validation, and 10 % test, giving us the same data splits as in the RFM paper. We use seed values 0–29, 0–4, and 0–4 for our training runs on the analytic test case, high-dimensional torus, and geospatial datasets respectively. Our backbone is a standard multilayer perceptron with time concatenated to the input. We use Swish (Ramachandran et al. 2018) with a learnable parameter and Adam with an exponential moving average (Polyak and Juditsky 1992) (decay 0.999). For synthetic datasets, we train for 50,000 iterations with batch size 512 and 3 hidden layers of width 512. For the geospatial datasets, we train for 1,000,000 iterations with batch size and hidden width following Chen and Lipman (2024). The analytic test case uses dopri5 as the ODE solver with tolerance while the high-dimensional torus uses 1,000 Euler steps with projection at each step for scalability following Chen and Lipman (2024). In the latter case it was not feasible to use dopri5 (even if desired) as RG-VFM did not complete in a reasonable time beyond low dimensions. At these low dimensions we observe that the Euler solver appears most favourable for RG-VFM; this is also the solver used by Zaghen et al. (2026). Evaluation on the geospatial datasets uses dopri5 with tolerance also following Chen and Lipman (2024). We modify the RFM codebase to torch.compile without graph breaks, training in default mode for these experiments. We disable compilation for the runtime benchmark in Appendix F.2. In Appendix F.3, we compare execution in both modes, eager and compiled. We are aware that RG-VFM is sensitive to solver choice and tolerance, and we investigate a variety of solvers and tolerances in Appendix B.2.
E.4 Training and evaluation on human pose data
We use human pose data expressed in , following Dünkel et al. (2024), who train their normalizing flow model, HuProSO3, on a partition of the amass dataset collection (Mahmood et al. 2019), namely: cmu (Carnegie Mellon University, n.d.), PosePrior (Akhter and Black 2015), TotalCapture (Trumble et al. 2017), EyesJapanDataset (Eyes JAPAN Co. Ltd., n.d.), kit and ekut (Mandery et al. 2015, 2016; Krebs et al. 2021), BMLrub (Troje 2002), TCDHands (Hoyet et al. 2012), and accad (Advanced Computing Center for the Arts and Design, n.d.). Whereas Dünkel et al. (2024) are concerned with cross-dataset performance—the unconditional HuProSO3 is trained on the whole of the above partition and tested on an aggregate of remaining datasets from amass—we are concerned with in-distribution performance. We train RFM, RG-VFM, and our method with an 80/10/10 training/validation/test split of this partition, resulting in 11,823,971 training samples. Using an MLP of 6 layers and width 1,024, we train for 150,000 steps.
We report NLL with respect to the Haar measure. For both energy distance and Gaussian MMD, we evaluate via the chordal distance (i.e., implicitly embedding into ). The embedding into Euclidean space is injective, so these metrics are valid for distributions of poses. The Gaussian MMD metric uses the median heuristic for the bandwidth, calibrated uniformly using the test set.
F Computational performance
F.1 Timing dopri5 sampling on
Sampling for our human pose experimental results in Table 5 used Euler integration with 1,000 steps (following the original RG-VFM implementation and for the reasons we outline in Appendix B.2). Here, we also report the NFE and wall time required for sampling with dopri5 (Table 8). Our method only differs from RFM in the backward pass, while the forward pass is through an MLP of the same architecture. Therefore, under Euler sampling they have the same sampling cost, while under adaptive sampling the sampling time depends on the neural approximation learned.
In many cases, flow matching under independent coupling has optimal solutions exhibiting significant spatiotemporal variation (motivating ideas around rectification and choosing better couplings). For methods possessing compatibility, we posit that their relative ordering measured by adaptive solver NFE depends on the true marginal field induced by the data. Notably, at a tolerance of , the wall times for our method and RFM are comparable to that of a forward pass through HuProSO3’s autoregressive normalizing flow. Although HuProSO3 does not require numerical integration, it has a relatively heavier neural architecture and its authors note they have not optimized all potential parallelism (Dünkel et al. 2024, sec. B.1).
id_0900). Flow matching models use adaptive dopri5; HuProSO3 uses its autoregressive forward pass.
| Time | NFE | ||
|---|---|---|---|
| Method | Tolerance | (s) | |
| HuProSO3 - — | 0.025 - — | ||
| RFM | 0.132 | 17.3 | |
| RG-VFM | 1.581 | 30.2 | |
| Our method | 0.047 | 6.6 | |
| RFM | 0.279 | 37.1 | |
| RG-VFM | 17.562 | 385.6 | |
| Our method | 0.355 | 46.6 |
F.2 Throughput of training without compilation
We additionally benchmark the runtime of the full training loop in the same pipeline and report iterations per second (it/s). The results are in Table 9. We measure wall time from the start to the end of each run. Across methods, we keep the model architecture and execution setup fixed and change only the training loss. The hardware is an NVIDIA GeForce RTX 3090 (24 GB) with an AMD Ryzen 9 5950X 16-Core CPU. All methods use the same architecture and run configuration: a three-layer MLP with width 512, batch size 512, with 1,000 training steps per run and 5 repetitions with torch.compile turned off. We disable the evaluation of validation NLL during this benchmark; differences in runtime reflect the cost of pretabulation, table lookups and training iterations. The reduction in throughput with our method is largest at low dimensions and shrinks at high dimensions. This is consistent with the lookup being a small per-sample cost relative to the initial pretabulation, reducing at high dimensions as other costs increase.
torch.compile disabled. We use the same full training loop for all methods and only change the loss. Thus this data does not reflect the high inference time of RG-VFM.
| Method | ||||
|---|---|---|---|---|
| RFM | 48.33 1.11 | 15.32 0.08 | 46.35 0.65 | 14.62 0.04 |
| RG-VFM | 46.44 0.19 | 14.82 0.02 | 44.50 0.29 | 14.25 0.03 |
| Our method | 40.51 0.81 | 14.58 0.11 | 34.30 0.50 | 12.98 0.05 |
F.3 Wall time and memory use
In Table 10, we report wall time and memory use for and in eager and compiled execution.
Timing methodology:
We use eager execution and compilation via
torch.compilefor and (wrapped_torusandfloodconfigs respectively).Each run has 40 steps for warm-up followed by 1,000 timed steps.
After synchronizing CUDA, we use
time.perf_counter()to time the construction ofManifoldFMLitModule(cfg).We call
torch.cuda.synchronize()at the end of each timed batch. This ensures that timing measures completed GPU work (not async CPU dispatch).
Memory methodology:
We initialize the CUDA context with
torch.zeros(1, device="cuda:0")first and then reset the peak memory statistics tracked by the allocator.Cpk = peak memory recorded by the allocator during construction, i.e.
torch.cuda.max_memory_allocated()aton_train_start.Clive = live memory recorded by the allocator after construction, i.e.
torch.cuda.memory_allocated(), aton_train_start.Cdrv = memory usage reported by the driver after construction, i.e.
(total - free)fromtorch.cuda.mem_get_info()aton_train_start.Mpk = peak memory recorded by the allocator during training, i.e.
torch.cuda.max_memory_allocated()over the timed window after the reset following warm-up.Mdrv = maximum memory usage reported by the driver during training, i.e.
total - min(free)fromtorch.cuda.mem_get_info()over samples taken at the end of each batch timed, after synchronization.
We give both allocator and driver metrics as the former are only exact at byte level for live allocations tracked by PyTorch. (They omit memory pools for CUDA graphs and direct cuSOLVER/cuBLAS or other CUDA allocations. Hence, they report apparently lower memory usage under torch.compile.) The latter also capture memory usage across the device. Measurements were taken on an AMD Ryzen Threadripper and NVIDIA RTX A6000. The allocator memory overhead is just a few MiB. We find it of particular note that compilation via torch.compile makes the runtime overhead per iteration near negligible.
| Time | Memory | ||||||||
|---|---|---|---|---|---|---|---|---|---|
| Constructor | Step | Cpk | Clive | Cdrv | Mpk | Mdrv | |||
| Mode | Method | (s) | (ms) | (MiB) | (MiB) | (MiB) | (MiB) | (MiB) | |
| Eager | RFM | 0.0015 | 3.78 0.14 | 3.80 | 3.80 | 418 | 54.206 | 492 | |
| Eager | RG-VFM | 0.0014 | 3.91 0.10 | 3.80 | 3.80 | 418 | 54.206 | 492 | |
| Eager | Ours | 0.0002 | 6.50 0.07 | 4.84 | 4.84 | 420 | 55.268 | 494 | |
| Compiled | RFM | 0.0070 | 2.30 0.06 | 21.08 | 11.93 | 508 | 7.717 0.005 | 492 | |
| Compiled | RG-VFM | 0.0077 | 2.27 0.05 | 21.08 | 11.93 | 508 | 7.721 0.010 | 492 | |
| Compiled | Ours | 0.0138 | 2.32 0.06 | 22.11 | 12.97 | 510 | 8.782 | 496 | |
| Eager | RFM | 0.0062 | 91.82 0.48 | 166.39 | 166.39 | 582 | 4493.520 | 5112 | |
| Eager | RG-VFM | 0.0068 | 92.13 0.13 | 166.39 | 166.39 | 582 | 4493.520 | 5110 | |
| Eager | Ours | 0.0540 | 93.72 0.08 | 172.03 | 172.03 | 602 | 4499.190 | 5112 | |
| Compiled | RFM | 0.0120 | 65.93 0.32 | 2782.98 | 174.52 | 3268 | 332.999 | 3414 | |
| Compiled | RG-VFM | 0.0048 | 66.52 0.38 | 2782.98 | 174.52 | 3266 | 332.999 | 3412 | |
| Compiled | Ours | 0.0509 | 65.63 0.36 | 2788.62 | 180.16 | 3268 | 338.669 | 3436 | |
F.4 Compute resources
For the experiment, the 30 seeds complete in under 2 hours across all three trained methods, as each run finishes in under 1 minutes. On product tori in high dimensions, training takes approximately 1 minutes per run. We find this to be essentially independent of dimension. Evaluation of test/NLL becomes more expensive as increases. This brings the total time per run from a few minutes at low to around 1 hours at . The full sweep over 5 seeds, 3 methods, and all dimensions that we report consumes roughly 30 hours of A100 time. On the geospatial datasets, a single run of training and evaluation completes in under 5 hours. For one method on one dataset, the sweep over 5 seeds takes under 24 hours. Across the four datasets and the two methods we train ourselves (our method and our reproduction of RFM), this totals roughly 200 hours of A100 time. The analytic test case, experiments on product tori in high dimensions, and geospatial experiments together account for approximately 250 hours of A100 time. The training benchmark in Appendix F.2 contributes a negligible amount of extra compute. Some additional compute was used for preliminary experiments, including the solver investigations in Appendix B.2, as well as early prototypes.
References
This is computable without clamping the denominator as it is with . Considering nonuniqueness of is nonessential as the set of coupled pairs with multiple geodesics has measure zero.↩︎
Any likelihood over endpoints can be reparameterized as a likelihood over conditional velocities via the map , but not vice versa; we discuss the implications of this further in Section 3.4.↩︎
The bound is locally sharp with . All -divergences with are locally equivalent so KL has the same rate.↩︎
is self-adjoint under .↩︎