FréchetFlow: Flow Matching for Non-Euclidean Data

Yidong Zhou, Muqing Cui, Hans-Georg MüllerarXiv 2026

TL;DR

FréchetFlow is a novel generative modeling framework designed for data that lives in general metric spaces—such as phylogenetic trees, graphs, and covariance matrices—where standard Euclidean or manifold-based methods fail. By representing complex objects as vectors of distances to "landmarks," the method leverages standard Euclidean flow matching to learn distributions and reconstructs new objects using weighted Fréchet means.

What Problem Does This Paper Address?

Most modern generative models, including Diffusion and Flow Matching, are built on the assumption that data resides in a Euclidean space where we can easily perform linear operations like addition and scaling. While researchers have extended these ideas to smooth manifolds (like spheres or tori), many scientific data types are far more "jagged."

Phylogenetic trees, metric graphs, and certain configuration spaces do not have a smooth manifold structure or a well-defined tangent space. In these "random object" spaces, we often only have a distance metric ($d$) to work with. The challenge is: how do you define a "flow" or "velocity" to generate new data when you can't even add two points together?

Methods

The authors introduce FréchetFlow, which sidesteps the need for a manifold structure by using a three-stage pipeline:

  1. Landmark Representation: Each object in the training set is mapped to a numerical vector in $\mathbb{R}^k$. Each entry in this vector is simply the distance from the object to one of $k$ pre-selected "landmarks" in the metric space. This turns non-Euclidean objects into standard Euclidean vectors.
  2. Learning the Distribution: Since the data is now in $\mathbb{R}^k$, the authors use standard Euclidean Flow Matching. This trains a neural network to model the velocity field that transforms a simple Gaussian distribution into the distribution of these distance vectors.
  3. Object Reconstruction: To turn a generated distance vector back into a real object, the authors use a weighted Fréchet mean. This is the metric-space version of a weighted average. A second neural network learns to output weights for a set of reference objects such that their Fréchet mean has a distance profile matching the generated vector.
The FréchetFlow pipeline: (a) mapping objects to distance vectors, (b) learning the vector distribution via flow matching, and (c) reconstructing new objects using weighted Fréchet means.

Crucially, both the representation and reconstruction steps rely only on the distance metric, making the framework applicable to any Polish (complete and separable) metric space.

Datasets

The authors evaluated FréchetFlow across a diverse range of synthetic and real-world scientific datasets:

  • Euclidean Baselines: Eight Gaussians and Two Moons.
  • Non-Euclidean Simulations: Locations on metric graphs, phylogenetic trees (BHV space), and CAT(0) cubical configuration spaces for robotics.
  • Earth Data: Geographic distributions of earthquakes, volcanoes, fires, and floods on a sphere.
  • Biological Data: MERFISH cell neighborhoods (represented as point clouds/distributions).
  • Neuroscience: ABIDE brain connectivity matrices (correlation matrices).

Key Insights and Ideas

  • The "Distance Trick": You don't need to model the complex geometry of a tree or a graph directly. Modeling the distances to a fixed set of landmarks is a powerful surrogate that captures the intrinsic geometry.
  • Fréchet Regression as a Decoder: The paper cleverly adapts Fréchet regression—traditionally used for prediction—into a "decoder" for a generative model.
  • Handling Discrete Transitions: One of the most impressive feats is that FréchetFlow can capture discrete changes (like a tree changing its topology or a robot moving into a different "cell" of a configuration space) through continuous dynamics in the distance-vector space.
  • Theoretical Consistency: The authors provide Wasserstein error bounds proving that as you increase the number of landmarks and the sample size, the generated distribution converges to the true distribution.

Key Results

  • Competitive with Euclidean Baselines: On standard 2D tasks, FréchetFlow matched or slightly outperformed direct Flow Matching (FM) as sample sizes increased.
  • Superior on Scientific Data: FréchetFlow achieved lower mean Wasserstein errors than specialized baselines like Riemannian Flow Matching (RFM) and Wasserstein Flow Matching (WFM) on several datasets.
  • MERFISH Success: For cell neighborhoods, FréchetFlow reduced the mean empirical $W_2$ error by 9.5% compared to the specialized WFM method.
  • Robustness: In non-Euclidean simulations (trees and graphs), the model successfully recovered branch probabilities and topology distributions, with errors consistently decreasing as the training sample size increased.

Limitations and Future Work

  • Landmark Selection: While the authors use Farthest-Point Selection (FPS), the "optimal" way to choose landmarks for a specific geometry remains an open question.
  • Computational Overhead: Calculating weighted Fréchet means can be computationally intensive, especially for complex metric spaces where the minimization must be done iteratively.
  • Conditional Generation: The current framework is unconditional. The authors suggest that extending this to conditional generation (e.g., generating brain networks based on clinical covariates) is a high-priority area for future research.

Summary updated

Abstract

Scientific observations such as probability distributions, trees and covariance matrices call for generative models that respect their non-Euclidean geometry. While flow matching has been extended to manifolds by utilizing geodesics and velocities, such manifold structures are not available in a general metric space. We introduce FréchetFlow, a generative modeling framework for metric space-valued data that requires neither linear operations nor a smooth manifold structure. A key feature of the proposed approach is that we utilize well-established Euclidean flows to learn the joint distribution of distances to a set of landmarks, whereupon new objects are reconstructed from generated landmark representations. The reconstruction step utilizes weighted Fréchet means of reference objects, drawing on Fréchet regression. We establish Wasserstein error bounds that connect accuracy of the generated object distributions to the placement of landmarks, flow approximation and reconstruction error and prove consistency under finite second moments. This leads to convergence rates that depend on the metric complexity of the target objects, tail moments and fitting accuracy. Experiments show competitive accuracy with established flow matching methods in Euclidean simulations and lower Wasserstein errors than specifically tailored methods for several scientific datasets. Across simulation settings, we find that generation error decreases as sample size increases.
BibTeX
@misc{zhou2026frechetflow,
  author = {Yidong Zhou and Muqing Cui and Hans-Georg Müller},
  title = {{FréchetFlow: Flow Matching for Non-Euclidean Data}},
  year = {2026},
  eprint = {2611.15220},
  archivePrefix = {arXiv},
  url = {https://arxiv.org/abs/2611.15220},
}
Figure