arXiv:2611.01559cs.LGNov 2026

Manuscript Offprint

arXiv:2611.01559

Generative Modeling with Continuous Flows: Sample Complexity of Flow Matching

Mudit Gaur, Prashant Trivedi, Shuchin Aeron, Amrit Singh Bedi, George K. Atia, Vaneet Aggarwal

Open access. PaperVantage converted this article to text, so layout and figures may differ from the original.

Abstract

Flow matching has emerged as a promising alternative to diffusion-based generative modeling, offering a continuous-time ordinary differential equation formulation with fast sampling and a simple regression-based training objective. Despite its empirical success, some theoretical analyses idealize the learning procedure by assuming that the velocity field is obtained by exact empirical risk minimization. This assumption does not reflect the practical finite-dataset setting, where the empirical flow-matching loss is only approximately minimized by a finite number of stochastic-gradient updates. We develop an empirical-risk-minimizer-free analysis for flow matching that explicitly accounts for both finite-sample statistical error and finite-time empirical optimization error. Our analysis considers a finite dataset of NN flow-matching samples and a learned parameter θT\theta_T obtained after TT stochastic gradient updates on the empirical objective. Under regularity assumptions on the interpolation path, sub-exponential source and target distributions, approximation by a bounded-parameter smooth neural velocity class, empirical-loss optimization, and uniform flow stability, we prove a guarantee that holds with high probability over the finite training dataset and in expectation over the stochastic-gradient randomness. The resulting bound separates approximation error, statistical error from the finite dataset, tail error from unbounded source and target distributions, and empirical optimization error from approximate minimization of the finite-sample objective. For a prescribed bounded-parameter smooth neural velocity class, the statistical term is controlled through a metric-entropy/Rademacher uniform-convergence bound for the induced truncated squared-loss class. The empirical optimization term is controlled by an expected finite-time stochastic-gradient guarantee under an empirical Polyak-Łojasiewicz condition and a finite-dataset stochastic-gradient oracle. The sub-exponential endpoint tails are handled through an explicit endpoint-magnitude truncation argument. Under the stated approximation, tail, flow-stability, smooth-network-complexity, and empirical optimization conditions, the bound yields Wasserstein-2 error of order O(ϵ)O(\epsilon) with dataset size O~(ϵ−4)\tilde{O}(\epsilon^{-4}) and optimization budget O~(ϵ−2)\tilde{O}(\epsilon^{-2}), up to the corresponding problem-dependent and logarithmic factors. Our result provides an ERM-free finite-dataset analysis of flow matching that explicitly separates finite-sample statistical error from finite-time stochastic-gradient optimization error on the empirical flow-matching objective.

1 Introduction

Generative models have become a central component of modern machine learning, with applications in image synthesis, scientific modeling, computational biology, and reinforcement learning. Diffusion and score-based generative models have achieved strong empirical performance by transforming a simple source distribution into a target data distribution through a learned reverse-time stochastic process (Song et al., 2021). Their success has motivated a substantial theoretical literature on score estimation, denoising objectives, numerical discretization, optimization error, and statistical guarantees for accurate generation. At the same time, diffusion-based sampling can require many numerical integration steps, and its training objective is tied to estimating score functions along a noisy probability path.

Flow matching provides an alternative framework for continuous-time generative modeling (Lipman et al., 2023). Rather than learning a score function, flow matching learns a time-dependent velocity field whose associated ordinary differential equation transports samples from a source distribution to a target distribution. The learned model is a deployable velocity field of the form

uθ(x,t),u_{\theta}(x,t),

which depends only on the current state and time. This viewpoint leads to a regression-based training objective and can enable efficient deterministic sampling through ODE simulation. Several variants have been proposed, including rectified flow, conditional flow matching, optimal-transport flow matching, and stochastic interpolants (Lipman et al., 2023; Liu et al., 2023; Tong et al., 2023; Albergo et al., 2023). These works demonstrate that both the interpolation path and the coupling between source and target samples can substantially affect the geometry, regularity, and computational efficiency of the resulting generative flow.

Despite this empirical and methodological progress, the theoretical understanding of how flow-matching velocity fields are learned from finite data remains incomplete. In the diffusion setting, recent works study sample complexity and convergence guarantees for score estimation and score-based generation (Chen et al., 2023; Gupta et al., 2024; Gaur et al., 2025; Guan et al., 2025), as well as discrete diffusion models (Srikanth et al., 2026b). These results address questions such as how accurately a learned vector field must approximate its population target and how many samples or optimization steps are sufficient for the generated distribution to approach the desired target distribution. In the flow-matching setting, existing work has established stability and error-propagation guarantees for learned flows (Benton et al., 2024), while recent analyses study statistical, approximation, and sample-complexity properties of flow matching and rectified flows (Zhou and Liu, 2025; Sahoo et al., 2026). These results provide important complementary perspectives on velocity estimation and terminal distributional error.

This paper focuses on a distinction between statistical and optimization error that arises in practical finite-dataset training. A flow-matching model is commonly trained using a fixed stored dataset and a finite number of stochastic-gradient updates. Consequently, the empirical flow-matching objective is generally only approximately minimized. This setting differs both from an idealized exact empirical-risk-minimization formulation and from a population-oracle or fresh-sample optimization model. Two distinct effects must therefore be controlled. The first is the statistical error incurred by replacing the population objective with a finite empirical objective. The second is the empirical optimization error incurred by performing only finitely many stochastic-gradient updates on that fixed objective.

We develop an empirical-risk-minimizer-free analysis for this finite-dataset setting. Given a training dataset of NN flow-matching samples, we study the parameter θT\theta_T obtained after TT stochastic-gradient updates on the empirical objective L^N\hat{L}_N. Our analysis explicitly separates the discrepancy between the population loss LL and the empirical loss L^N\hat{L}_N from the error caused by only approximately minimizing L^N\hat{L}_N. An empirical risk minimizer is introduced only as a theoretical comparator and is not assumed to be available to the training algorithm.

Our formulation is based on a coupling between a source distribution (π0)(\pi_0) and a target distribution (π1)(\pi_1), together with a linear, or rectified, interpolation path. The regression target is the associated pathwise velocity, while the deployable target is its conditional mean given the current state and time. This marginal velocity field depends only on the current state and time and can therefore be used during generation. We explicitly assume that the marginal velocity field is path-consistent with the prescribed interpolation path, so that the corresponding reference ODE reproduces the path marginals and reaches (π1)(\pi_1) at terminal time. A uniform flow-stability argument then converts integrated velocity-field error along the reference path into Wasserstein-2 error for the generated terminal distribution.

A further distinction from compact-support formulations is that we allow sub-exponential source and target distributions. This is important because standard source distributions used in generative modeling, including Gaussian noise, are unbounded. We handle unbounded data through endpoint-magnitude truncation. On the event that both coupled endpoints have bounded norm, the linear interpolation state, pathwise velocity, and induced squared-loss class are uniformly controlled. The contribution of the complementary event is then bounded using the assumed endpoint-tail behavior. This construction avoids truncation arguments involving singular factors near the terminal time and is naturally compatible with linear and rectified interpolation paths.

The central question addressed in this work is:

How many training samples and stochastic-gradient updates are sufficient for a neural velocity field trained by flow matching to generate a distribution close to the target distribution?

Our proof proceeds in two stages. First, uniform flow stability converts excess population flow-matching risk into terminal Wasserstein-2 error. Second, the excess population risk is decomposed into approximation, finite-dataset statistical, and empirical optimization contributions. Under unbounded endpoint distributions, the statistical term further separates into a truncated uniform-convergence contribution and an endpoint-tail contribution. For a prescribed bounded-parameter smooth neural velocity class, the truncated statistical contribution is controlled through a metric-entropy and Rademacher uniform convergence argument for the induced scalar squared-loss class. The empirical optimization contribution is controlled through an expected finite time stochastic gradient guarantee under empirical smoothness, an empirical proximal Polyak Łojasiewicz condition, and a finite dataset stochastic gradient oracle.

The resulting theorem holds with high probability over the draw of the finite training dataset and in conditional expectation over the stochastic-gradient randomness. Under the stated approximation, endpoint-tail, flow-stability, neural-class-complexity, and empirical-optimization conditions, the bound yields expected Wasserstein-2 error of order O(ϵ)O(\epsilon) with dataset size O~(ϵ−4)\tilde{O}(\epsilon^{-4}) and optimization budget O~(ϵ−2)\tilde{O}(\epsilon^{-2}), up to the displayed problem-dependent and logarithmic factors. These rates should be interpreted for a prescribed bounded-parameter smooth neural velocity class. In particular, dimension and architecture dependence may enter through the neural-class complexity, approximation error, endpoint-tail parameters, flow-stability constant, and empirical optimization constants. We do not claim that these quantities are dimension free or uniformly controlled over arbitrary architectures.

We complement the theoretical analysis with synthetic experiments designed to illustrate the mechanisms represented in the bound. The experiments examine how velocity-estimation and terminal distributional errors vary with the dataset and optimization budgets, compare fixed finite-dataset training with a one-pass fresh-sample procedure, and study the effect of different couplings for a linear interpolation path. These experiments are not intended to verify the formal asymptotic rates or to compete with large-scale generative-model benchmarks. Rather, they provide controlled diagnostic evidence for the approximation-statistical-optimization structure underlying the analysis.

The main contributions of this work are summarized as follows:

  • Finite-dataset ERM-free analysis for flow matching. We analyze a velocity field trained on a fixed finite empirical flow-matching objective without assuming that the training algorithm has access to an exact empirical risk minimizer. The learned parameter is the output of a finite number of stochastic-gradient updates.

  • Separation of finite-sample statistical and empirical optimization error. We distinguish the error incurred by replacing the population objective with a finite empirical objective from the error incurred by only approximately minimizing that empirical objective. This makes explicit the separate roles of the dataset size NN and the optimization budget TT.

  • Sub-exponential endpoints and explicit tail control. We replace compact-support assumptions with sub-exponential source and target distributions. Endpoint-magnitude truncation yields a bounded squared-loss class on a high-probability event, while the contribution of its complement is controlled through an explicit tail term. This permits standard unbounded source distributions such as Gaussian noise.

  • Metric-entropy control for a smooth neural squared-loss class. For a prescribed bounded-parameter smooth neural velocity class, we derive a uniform-convergence bound for the induced truncated scalar squared-loss class using parameter-space covering numbers and Rademacher complexity. This yields a squared-loss-level statistical contribution of order Oˉ(N−1/2)\bar{O}\left(N^{-1/2}\right), up to the displayed network-complexity, truncation-envelope, and logarithmic factors.

  • Path-based formulation with a deployable marginal velocity field. We formulate the learning problem using interpolation paths induced by couplings between the source and target distributions while ensuring that the learned velocity field depends only on the current state and time. The coupling is treated as part of the prescribed path and can affect the associated velocity-regression problem and its learning difficulty.

  • Finite-time empirical optimization guarantee. Under empirical smoothness, an empirical proximal-PL condition, bounded conditional gradient variance, and the stated uniform empirical regularity conditions, we control the expected empirical suboptimality after TT finite-dataset stochastic-gradient updates. Combined with the statistical and flow-stability arguments, this produces a finite-sample and finite-time terminal distributional guarantee.

References (34)