betaFeedback

WorksEngineering

Calibrating Generative Flows through Regional Probability Matching

Abstract

Generative models offer a powerful route to scientific simulation and discovery by enabling the study of complex populations and rare phenomena. Flow matching can generate realistic samples, yet inaccurate occurrence frequencies can distort population statistics and compromise inferences about rare events. Here we developed generalized mass-preserving coupled flow matching (G-MPCF), which matches the probability masses of Gaussian source regions to those of weighted data regions. This construction encodes the desired regional frequencies in the correspondence between noise and observations, shaping the learned dynamics while preserving the prescribed target distribution. On a rare-mode benchmark, G-MPCF reduces relative score error by 95.0% and numerical integration error by 89.9% compared with independent flow matching. On CIFAR-10 with a 100:1 class-probability ratio, it reduces corrected class-mass error by 44.6% compared with minibatch optimal transport, while improving mean image fidelity with matched computational budgets. We envision that incorporating regional probability calibration into generative modelling will support more reliable scientific simulation and inference, enabling the study of systems in which rare events and their occurrence frequencies are central to understanding the underlying mechanisms.

Generative models are becoming powerful tools for exploring complex scientific systems, including populations in which rare states carry important mechanistic information. Their usefulness depends not only on generating plausible observations but also on reproducing how frequently these states occur, as distorted probabilities can bias population statistics and the interpretation of rare phenomena. Diffusion and score-based models learn to reverse progressive data corruption [1, 2, 3, 4], whereas continuous normalizing flows learn differential equations that transform tractable source distributions into complex target distributions [5, 6, 7]. These approaches have enabled studies of molecular transition states, turbulent trajectories and high-resolution Earth-system fields [8, 9, 10]. Yet realistic generated structures do not necessarily imply accurate population frequencies, making the simultaneous recovery of structural fidelity and prescribed occurrence frequencies a central challenge for scientific generative modelling.

Flow matching and stochastic interpolants learn generative velocity fields along probability paths between tractable sources and target distributions [11, 12, 13, 14]. The source–target coupling determines which displacements supervise these fields and can alter the interpolation geometry without changing the prescribed endpoint marginals. Dynamic optimal transport provides a kinetic-energy formulation of transport [15, 16]. Minibatch transport and multisample matching construct finite-sample assignments [12, 17], while rectified flow uses learned dynamics to generate revised training pairs [18]. Optimal flow matching develops direct transport mappings [19]; cluster-wise transport exploits local data structure [20], and learned plans and model-aligned costs further adapt pairing to the regression problem [21, 22]. Together, these approaches establish coupling design as an important factor in generative learning, while leaving open how its joint probability structure affects endpoint frequency accuracy under limited model capacity and computational budgets.

For imbalanced generation, the desired distribution also specifies how often each part of the data should occur. Sample weights allow this prescribed population to differ from the empirical data frequencies. Their interaction with source–target assignment is particularly relevant when low-probability regions receive few draws within a training batch. Previous studies have investigated bias correction and distribution calibration in generative models [23, 24], while precision, recall, density and coverage characterize sample fidelity and support [25, 26, 27]. A region can contain convincing and diverse generated samples while receiving an inaccurate fraction of the total probability. In flow matching, this frequency error can arise even when training pairs have the prescribed endpoint marginals. Couplings with identical source and target laws induce different conditional velocity fields along the interpolation path. Their approximation by a finite network affects the distribution reached during generation [28, 29].

Regional probability offers a direct way to organize this regression problem. Matching the probability of a source region to that of a target region assigns a corresponding share of source draws to the target’s local structure. Conditional sampling within the target region then retains the relative weights of its observations. The remaining freedom in pairing can organize the supervising displacements within each region. Regions fitted in a continuous feature representation can capture structure across semantic classes. Class-frequency error and within-class coverage then provide complementary measurements of the resulting feature-based coupling. This construction connects population frequencies to the geometry of training pairs and motivates examining their effects on field approximation, sample allocation and within-region coverage together.

The learned field also determines the numerical work required for generation. Implicit diffusion sampling and higher-order solvers reduce the cost of following learned dynamics [30, 31, 32]; consistency models and mean flows learn mappings for few-step inference [33, 34]. Coupling design acts earlier, through the interpolation states and velocities presented during training. Its endpoint effects therefore involve both approximation of the training field and evolution along the learned trajectory. Joint measurements of field, rollout and integration errors can connect changes in the training pairs to generation under a limited evaluation budget.

Here we introduce generalized mass-preserving coupled flow matching (G-MPCF), which constructs training pairs by aligning Gaussian source regions with weighted data regions according to their probabilities. As illustrated in Figure 1, target observations are sampled conditionally within matched regions, while additional within-region rank matching refines pair geometry without altering target sampling frequencies. Rare-mode experiments show reductions of 95.0% in relative score error and 89.9% in solver error. On CIFAR-10 with a 100:1 class-probability ratio, matched-computation comparisons yield 49.3% and 44.6% lower corrected class-mass errors than independent pairing and minibatch optimal transport, respectively, alongside improved mean fidelity. Component interventions identify regional probability matching as the principal source of these gains, with mass-only coupling achieving comparable calibration and fidelity. Furthermore, rollout diagnostics connect field improvements to endpoint performance across targets and computation budgets.

Figure 1. Mass-calibrated construction of training pairs. a, Image features define regions CjC_j with probabilities pj=∑i∈Cjwip_j = \sum_{i\in C_j} w_i, where wiw_i is the normalized image weight. b, Gaussian projection quantiles define source regions with matching probabilities and colours. c, Conditional sampling uses probabilities wi/pjw_i/p_j with replacement. This calibrated sampling step establishes the prescribed target marginal, while subsequent rank matching preserves repeated draws and rearranges source–target correspondences without changing the sampled target counts. d, Paired noise ZZ and image XX define interpolants XtX_t and target velocity X−ZX-Z. Integrating the learned field from fresh noise generates images. Images, feature clusters and interpolation states are schematic.

Results

Mass-calibrated pairing simplifies rare-mode fields

G-MPCF divides a Gaussian source into regions with the same probabilities as weighted data regions. It samples targets with replacement within each matched region to establish a calibrated regional correspondence, and the full implementation further pairs source and target scores by rank. The image implementation uses twenty regions fitted to pretrained features and learns the velocity in image coordinates. Let QQ denote a source law, PP a target law and Π∈Γ(Q,P)\Pi\in\Gamma(Q, P) a coupling. For (Z,X)∼Π(Z, X) \sim\Pi and tt uniform on [0,1][0, 1], the

flow-matching objective is

Xt=(1−t)Z+tX,U=X−Z,X_t = (1-t)Z + tX,\quad U = X-Z,
LΠ(θ)=Et,(Z,X)∼Π∥vθ(Xt,t)−U∥2.(1)\mathcal{L}_{\Pi}(\theta) = \mathbb{E}_{t,(Z,X)\sim\Pi}\lVert v_\theta(X_t,t)-U\rVert^2. \tag*{(1)}

Its population minimizer is the conditional velocity uΠ(x,t)=E[U∣Xt=x]u_{\Pi}(x,t)=\mathbb{E}[U \mid X_t=x], which supplies the vector field associated with the chosen interpolation law[11, 13].

For weighted observations, P=∑iwiδxiP = \sum_i w_i\delta_{x_i}, we fit label-free regions CjC_j and assign their probabilities pj=∑i∈Cjwip_j = \sum_{i\in C_j}w_i. A unit projection of a standard Gaussian is divided at quantiles with successive probabilities pjp_j. Writing JJ for the source region and II for the sampled target index gives, for i∈Cji\in C_j,

Pr⁡(J=j)=pj,Pr⁡(I=i∣J=j)=wi/pj,\Pr(J=j)=p_j,\qquad\Pr(I=i\mid J=j)=w_i/p_j,
Pr⁡(I=i)=pj(wi/pj)=wi.(2)\Pr(I=i)=p_j(w_i/p_j)=w_i. \tag*{(2)}

Within each region, source and target scores are paired by rank. The prescribed target marginal in equation (2) is already established by calibrated regional sampling, while the subsequent permutation preserves sampled target-index multiplicities and rearranges source–target correspondences. For fixed one-dimensional score multisets, equal-rank matching minimizes the sum of squared score differences over within-region permutations, providing a geometric criterion without altering target probabilities.

Regional probability assignment and within-region geometric ordering can both change the regression problem, despite preserving the prescribed source and target marginals. For any square-integrable field ff,

E∥U−f(Xt,t)∥2=E[tr⁡Var⁡(U∣Xt)]+E∥uΠ(Xt,t)−f(Xt,t)∥2.(3)\mathbb{E}\lVert U-f(X_t,t)\rVert^2 = \mathbb{E}[\operatorname{tr}\operatorname{Var}(U\mid X_t)] + \mathbb{E}\lVert u_{\Pi}(X_t,t)-f(X_t,t)\rVert^2. \tag*{(3)}

The two terms are conditional velocity variance and conditional-mean approximation error. Both depend on the coupling, so preserving QQ and PP permits different regression problems. To examine how this change affects approximation at fixed model capacity, we use targets whose population velocity and score can be evaluated directly.

We first evaluated a rare-mode target with an explicit coupling and reference field. Rare12 contains eight common modes of probability 0.115 and four outer modes of probability 0.02, with centred and whitened coordinates. We partition a two-dimensional standard Gaussian into alternating sectors of probability 0.115 and 0.135, then split the larger sectors at r⋆=−2log⁡(0.02/0.135)=1.95425r_{\star}=\sqrt{-2\log(0.02/0.135)}=1.95425 to assign outer probability 0.02 to each rare mode. We call this analytic construction MPCF and compare it with independent conditional flow matching (I-CFM). Independent interpolation paths cross the central region towards different targets. MPCF assigns rare targets to outer Gaussian sectors, separating common- and rare-mode contributions throughout interpolation, as shown in Figure 2a–Figure 2d. The exact velocity and scaled score st(x)=−x+tuΠ(x,t)s_t(x)=-x+tu_{\Pi}(x,t) provide references for evaluating the learned field.

Rare-mode transport and field accuracy across training pairs, intermediate distributions, and diagnostic metrics

Figure 2. Rare-mode transport and field accuracy. a,b, Independent and mass-calibrated training pairs for rare12. Open circles denote sources; blue circles and orange diamonds identify common and rare targets. c,d, Exact intermediate densities with shared intensity scales within each time column. e,f, MPCF-to-I-CFM ratios for six diagnostics across 32 paired runs per target; endpoint and path metrics use 16 evaluations. Dashed lines mark equality. g,h, Endpoint SWD and mode-mass total variation at one evaluation. i,j, Corresponding results at 16 evaluations, with five runs per method and target throughout g–j. Methods follow decreasing mean rare12 SWD at 16 evaluations. OFM uses one evaluation throughout. Boxes show medians and interquartile ranges, whiskers span the observed ranges and dots denote individual runs. Vertical axes in e–h,j are logarithmic; those in i are linear. NFE, number of field evaluations.

MPCF reduced relative score mean squared error (MSE) by 95.0%, from 0.16476 to 0.00817, with improvement in all 32 paired training runs in Figure 2e. Relative velocity MSE fell by 66.7%, and Euler-to-reference MSE at 16 evaluations fell by 89.9%. Endpoint sliced-Wasserstein distance (SWD)[35] decreased by 35.2%, from 0.2061 to 0.1335, alongside 43.6% lower mode-mass error.

0.1335, alongside 43.6% lower mode-mass error. The paired SWD difference was −0.07253, with a 95% bootstrap interval from −0.08080 to −0.06472. All six exact two-sided paired tests in Supplementary Table S1 favoured MPCF, with P≤5.13×10−9P \le5.13 \times10^{-9}. With one field evaluation, MPCF reached SWD 0.1606, below the independent flow’s 0.1982 at 32 evaluations. Its error stabilized near 0.13 from two evaluations onwards, while independent pairing improved gradually as the budget increased. Figure 3a follows the generated densities and endpoint errors across inference budgets.

Figure 3. a,b, Endpoint densities and sliced-Wasserstein distance for rare12 and gaussian8. Maps pool 9,000 outputs from three runs with common smoothing and logarithmic colour scales within each target; curves summarize 32 paired runs. Both SWD axes are logarithmic. c, Balanced CIFAR-10 t-distributed stochastic neighbour embedding (t-SNE) maps and corrected class-mass total variation (MassTV). Maps contain 1,536 images; colours denote reference labels or predicted classes. Truck enlargements share target-defined bounds and the target 80% density contour. Counts refer to displayed trucks; inset bars and percentages give full-evaluation truck frequencies against the 10% target. d, Unit-circle projections and angular densities of the same maps; dashed curves show the target. Image evaluations use three training runs and 50,000 images per model at 16 Euler evaluations. SWD curves and metric bars show means; bands and error bars show standard deviations.

The equal-mass gaussian8 target tests the same construction with uniform mode probabilities. Score error fell by 79.3% and velocity error by 46.1% in Figure 2f. MPCF also improved the one- and two-evaluation endpoints. At 16 evaluations, independent pairing reached SWD 0.2543 and MPCF 0.2722, accompanied by Euler-to-reference MSE of 0.00489 and 0.01019. The ordering of endpoint and integration errors therefore changes with the inference budget. Figure 3b follows the generated densities and endpoint errors across the same budgets.

A six-method comparison with five training runs per method and target extends the analysis to minibatch optimal-transport conditional flow matching (OT-CFM), two-stage rectified flow (2-RF), Optimal Flow Matching (OFM) and Mean-Flow[12, 18, 19, 34]. At a budget of 16 evaluations, MPCF reached mean rare12 SWD 0.1392, compared with 0.1456 for OT-CFM, 0.1522 for OFM and 0.2026 for I-CFM. Its mode-mass error was 0.0260, the lowest among the six methods in Figure 2i,Figure 2j. At one evaluation, OFM gave the lowest mean SWD on both targets; MPCF gave the lowest mode-mass error, reaching 0.0248 on rare12 and 0.0171 on gaussian8 in Figure 2g,Figure 2h.

Regional probability matching improves image generation

We compared six coupling methods on CIFAR-10 using a shared 20.1-million-parameter U-Net and 5.425×10175.425 \times10^{17} floating-point operations (FLOPs) per training run, including pairing and auxiliary computation. Importance-weighted sampling of 45,000 training images produced a 100:1 class-probability ratio. Eight paired runs supplied 50,000 images each at 16 Euler evaluations. A validation confusion matrix corrected classifier-based class frequencies;

minority recall measured feature-manifold coverage within the three least probable classes.

The balanced feature maps in Figure 3c resolve class allocation across all six methods. The matched truck-region enlargements contain 146 target observations, 92 under I-CFM and 143 under G-MPCF. Across the complete evaluations, the predicted truck frequency increases from 6.92% under I-CFM to 9.13% under G-MPCF, towards the 10% target. The absolute frequency error decreases by 71.8%, and G-MPCF is closest to the truck target among the six methods in each of the three runs. Figure 3d shows the angular distributions of the same feature maps about the reference centre. Long-tail enlargements and complete class-frequency comparisons appear in Supplementary Figs. S3 and S4.

G-MPCF reduced corrected MassTV to 0.04863, compared with 0.09593 for I-CFM and 0.08777 for OT-CFM. These values correspond to reductions of 49.3% and 44.6%, respectively. G-MPCF had the lowest mean allocation error among all six methods in Figure 4a; two-stage rectified flow followed at 0.05858. The paired reductions were 0.04730 relative to I-CFM and 0.03915 relative to OT-CFM. The respective 95% intervals ranged from 0.04534 to 0.04908 and from 0.03672 to 0.04136. Both superiority comparisons had Holm-adjusted P=0.016P = 0.016.

Figure 4. Image-generation performance and its regional basis. a, Corrected class-mass total variation, weighted Fréchet Inception distance (FID) and minority recall across six coupling methods. Filled and open bars denote WLT100 and balanced targets, with eight and three training runs, respectively. b, Allocation, fidelity and coverage under five coupling operations. Filled and open bars denote weighted and minority-class FID in the middle chart, and recall and precision in the right chart. c,d, Predicted-to-target class-frequency ratios and class recall, ordered by decreasing target probability. Shading marks minority classes; the dashed line marks matched frequencies. e,f, Allocation, fidelity and coverage as regional probabilities vary from the target law at ρ=0\rho= 0 to uniform at ρ=1\rho= 1. Component and relaxation comparisons use three training runs. All image evaluations use 50,000 images per model at 16 Euler evaluations. Bars and curves show means; error bars and bands show standard deviations.

Weighted FID[36] was 19.80 for G-MPCF, 22.35 for I-CFM and 22.06 for OT-CFM. Both prespecified FID non-inferiority tests passed with adjusted P=0.008P = 0.008. Model-aligned coupling (MAC) reached the lowest mean FID of 19.60. Minority recall was 0.674 for G-MPCF, 0.667 for I-CFM and 0.697 for OT-CFM, with paired difference intervals spanning zero. The improvement in aggregate class allocation was accompanied by better mean fidelity than the two primary controls, while within-minority coverage varied with the coupling.

We repeated the comparison with equal class probabilities to assess the effect of removing the imposed class imbalance. On balanced CIFAR-10, G-MPCF yielded FID 17.71 and MassTV 0.08317, compared with 18.43 and 0.09686 for I-CFM over three independent training runs. OT-CFM reached 17.11 and 0.07629, and MAC reached FID 16.77. G-MPCF improved both aggregate metrics over independent pairing in this setting, with the larger allocation advantage appearing in the long-tail task. We next isolated regional probabilities and rank ordering to identify which part of the coupling produced the allocation gain.

Regional probability assignment explains the image gain

We evaluated regional calibration and rank ordering through five coupling operations, with three independent training runs each. Mass-only coupling used quantile assignment and conditional target sampling; geometry-only coupling used global rank matching; and uniform-region pairing combined equal source-region probabilities, regional sorting and the weighted conditional target law. All operations shared the model, training budget and inference setting. Because mass-only and independent pairing preserve the same target marginal, their comparison isolates the effect of regional source–target correspondence. Comparing G-MPCF with the mass-only variant isolates the contribution of rank matching within each region.

Mass-only coupling reproduced the allocation and fidelity gains of G-MPCF in Figure 4b. Mean MassTV was 0.05023 for mass-only coupling, 0.05044 for G-MPCF and 0.09561 for independent pairing; their weighted FIDs were 19.98, 20.16 and 22.48, respectively. Geometry-only matching yielded MassTV 0.10020 and FID 22.53, compared with 0.10097 and 21.42 for uniform-region pairing. Notably, mass-only coupling achieved slightly lower mean MassTV and FID than G-MPCF, indicating no additional aggregate benefit from within-region rank matching in this setting. Thus, calibrated regional sampling accounts for the principal allocation and fidelity improvements, although differences between the two calibrated variants remain descriptive given the three independent runs.

For the second most probable class, the predicted-to-target frequency ratio increased from 0.68 under independent pairing to 0.86 under mass-only coupling and 0.85 under G-MPCF. Despite similar frequency profiles, the two calibrated variants exhibited differences in class-specific recall, as shown in Figure 4c,Figure 4d. Minority recall was 0.694 for mass-only coupling and 0.565 for G-MPCF, with corresponding minority precision of approximately 0.894 and 0.900, respectively, as detailed in Supplementary Table S9. These results suggest that rank ordering can affect local feature-manifold coverage without necessarily improving aggregate calibration or fidelity. Therefore, regional probability matching drives the main calibration gains, whereas geometric ordering provides a distinct, task-dependent refinement.

We further examined the effect of relaxing regional probability assignments by setting qρ=(1−ρ)p+ρuq_\rho= (1-\rho)p + \rho u, where uu is uniform over regions and 0≤ρ≤10 \le\rho\le1. Retaining conditional target probabilities wi/pjw_i/p_j yields PI,qρ(i)=qρ,jwi/pjP_{I,q_\rho}(i) = q_{\rho,j}w_i/p_j for i∈Cji \in C_j, whose deviation from the intended row law PI(i)=wiP_I(i)=w_i is

TV⁡(PI,qρ,PI)=12∑j∑i∈Cj∣qρ,jpj−1∣wi=12∑j∣qρ,j−pj∣=ρTV⁡(u,p).(4)\operatorname{TV}(P_{I,q_\rho},P_I) = \frac{1}{2}\sum_j\sum_{i\in C_j}\left|\frac{q_{\rho,j}}{p_j}-1\right|w_i = \frac{1}{2}\sum_j\left|q_{\rho,j}-p_j\right| = \rho\operatorname{TV}(u,p). \tag*{(4)}

Across five relaxation levels, generated MassTV increased from 0.05044 through 0.05998, 0.07099 and 0.08397 to 0.10097, while weighted FID rose from 20.16 to 21.42 and minority recall varied non-monotonically, as shown in Figure 4e,Figure 4f. Because relaxation also changes the induced target-index marginal, these trends reflect sensitivity to regional mass misspecification without independently isolating geometric effects. Together with the mass-only intervention, these findings identify calibrated regional correspondence as the principal source of improvement, with rank matching providing additional geometric organization.

Rollout diagnostics connect field and endpoint accuracy

The effect of coupling on a fitted field propagates through both the learned dynamics and their numerical integration. Let AtA_t and BtB_t be the second and fourth moments of the field error under the interpolation law, and let χt2\chi_t^2 measure the chi-squared divergence of the learned-rollout law from that law. For kk Euler steps of size h=T/kh=T/k, the regularity conditions in Methods give

W2(L(X^T(k)),P)≤∫0TeL(T−t)(At+χt2Bt)1/2 dt+hMa2eL^T−1L^+(1−T)(EΠ∥X−Z∥2)1/2.(5)W_2\left(\mathcal{L}\left(\hat{X}_T^{(k)}\right),P\right) \leq\int_0^T e^{L(T-t)}\left(A_t+\sqrt{\chi_t^2B_t}\right)^{1/2}\,\mathrm{d}t +\frac{hM_a}{2}\frac{e^{\hat{L}T}-1}{\hat{L}} +(1-T)\left(\mathbb{E}_{\Pi}\lVert X-Z\rVert^2\right)^{1/2}. \tag*{(5)}

Here LL and L^\hat{L} are the spatial Lipschitz constants of the exact and learned fields, and MaM_a bounds the learned flow’s material acceleration. The three terms quantify field error under rollout, Euler integration error and terminal truncation. The first term evaluates field error along the learned trajectory, and its density-ratio factor links those visited states to the interpolation distribution used in training. The bound therefore motivates measuring regression error on both distributions together with the numerical endpoint discrepancy.

We examined these stages in 36 mixture conditions spanning dimensions 8, 32 and 128, rare probabilities from 0.01 to 0.2, and changes in mode separation and source displacement. Three paired training runs at each condition used common source and target laws. The single-factor slices in Figure 5a–Figure 5c isolate each input change at dimension 32. Increasing rare-mode probability strengthened the field improvement and eventually the endpoint improvement, while changing separation or displacement produced distinct endpoint responses.

Relative field-loss and endpoint-SWD reductions, cumulative distributions, diagnostic regression, runs improved, and SWD residuals

Figure 5. From field approximation to endpoint accuracy. a–c, Relative field-loss and endpoint-SWD reductions as rare probability, mode separation or source displacement varies at dimension 32. Curves show means and bands show standard deviations. d–f, Cumulative distributions of relative field improvement and rollout-penalty and solver-error differences. The latter are I-CFM minus G-MPCF. Boxes show medians and interquartile ranges; whiskers span all observations. Horizontal axes are symmetric logarithmic. g, Observed endpoint improvement and the three-diagnostic regression, ordered by observed improvement. h, Fractions of runs with improved field loss or endpoint SWD. i, Observed minus fitted endpoint improvement. The 36 conditions use three paired training runs each, giving 24, 57 and 27 runs in dimensions 8, 32 and 128. Evaluation uses 5,000 points, 16 Euler evaluations and a 64-step Heun reference.

The diagnostics in Figure 5d–Figure 5f measure displacement-regression improvement on interpolation states, the change in regression loss during rollout and Euler-to-Heun endpoint MSE. Their distributions compare the effects of coupling across the three dimensions.

A regression using all three diagnostics explained 88.8% of the variation in the 36 condition-mean endpoint differences, with fitted values and residuals in Figure 5g,Figure 5i. Across 108 training pairs, 106 improved field loss, 58 improved endpoint SWD and 56 improved both in Figure 5h. Together, these diagnostics link field approximation to endpoint accuracy through the learned dynamics and numerical integration. The image-field comparison in Supplementary Fig. S8 adds path length and path-length ratio to the regression, rollout and integration measurements.

Image-generation gains extend across computation budgets

Eight image configurations varied training-data fraction, U-Net width or computation around the full-data, width-96 reference, with three paired training runs per configuration. At 16 evaluations, G-MPCF improved FID in 23 of 24 pairs and corrected MassTV in 21. Figure 6a,Figure 6b shows fidelity across five inference budgets and paired MassTV reductions at 16 evaluations. The gains extended across both data and model scales. With half of the training data, FID fell from 32.01 to 27.14 and MassTV from 0.17529 to 0.09534. At base width 64, FID fell from 27.62 to 24.25; at width 128, it fell from 20.79 to 19.18. At half the reference computation, mean FID improved from 29.09 to 27.39 and MassTV from 0.10314 to 0.06550. With one-quarter computation, both FIDs were near 224 and MassTV was 0.71993 for I-CFM and 0.73777 for G-MPCF.

Figure 6. Resource budgets and validation-guided image generation. a, Weighted FID across inference budgets and resource levels, relative to full data, width 96 and full computation. b, Paired MassTV decrease at 16 evaluations, I-CFM minus G-MPCF. c, Validation kernel Inception distance (KID) for Gaussian and probabilistic principal-component analysis (PPCA) mixture sources at full displacement. Both axes in a,c are logarithmic. d, Mean validation KID across 122 candidates in logarithmic bins; the dashed line marks selected Gaussian-source G-MPCF at 16 evaluations. e,f, Test FID and MassTV under the selected source and budget; vertical axes start at 21 and 0.045. a–c,e,f show means across three paired training runs, with 10,000 images per run. Bands and error bars show standard deviations, except for standard errors of the mean in c.

Reducing the inference budget of the reference model also preserved a fidelity advantage. At four evaluations, G-MPCF reached FID 49.75 compared with 69.51 for I-CFM, a 28.4% reduction. At eight evaluations, the values were 27.57 and 33.87; at 16, they were 21.74 and 24.22. This comparison changes the cost of sampling from already trained fields. Together with the training-resource interventions, it shows how the observed image gains vary when computation is changed before or after fitting the model.

We selected a source and sampler from 122 validation candidates spanning two sources, three couplings, four displacement fractions and five inference budgets, together with source-retention controls. The rule screened class-mass error, compared validation KID and selected the smallest admissible NFE. At full displacement and 16 evaluations, G-MPCF gave the lowest validation KID for the Gaussian source, and OT-CFM performed best within the fitted mixture source in Figure 6c. Averaging over three training runs selected Gaussian-source G-MPCF with full displacement

and 16 evaluations in Figure 6d. Its test FID was 21.78 and MassTV 0.05489, compared with 24.36 and 0.09765 for I-CFM and 23.87 and 0.09197 for OT-CFM under the same source and budget in Figure 6e,Figure 6f. Supplementary Fig. S7 shows image sequences from shared Gaussian inputs across seven budgets from 1 to 64 Euler evaluations under these three couplings. The validation procedure therefore retained the full Gaussian-source flow for this image task, and the independent test comparison reproduced its allocation and fidelity advantages over the two controls.

As the evaluated coupling candidates included independent pairing, minibatch optimal transport and G-MPCF, this selection identifies the preferred action within the considered search space, while the incremental contribution of rank matching relative to mass-only coupling is examined separately in the component interventions.

Discussion

We developed G-MPCF, a coupling approach that incorporates regional probability calibration into flow matching. The method matches Gaussian source regions to weighted data regions according to their probability masses, preserving the prescribed target distribution while reorganizing the velocity supervision used for training. On the rare-mode benchmark, the analytic coupling reduces relative score error by 95.0% and numerical integration error by 89.9% compared with independent flow matching. On CIFAR-10 with a 100:1 class-probability ratio, G-MPCF reduces corrected class-mass error by 44.6% relative to minibatch optimal transport and improves mean image fidelity under matched computational budgets. G-MPCF uses the standard flow-matching objective, allowing regional calibration to be incorporated into existing training pipelines without changing the generative architecture.

Extending G-MPCF to scientific data will require representations that distinguish the states whose populations are relevant to the application. In the image experiments, pretr ained features define the regions and observation weights determine their probabilities. For molecular and materials systems, conformational coordinates or structural order parameters could provide a physical basis for defining these regions. Relative state populations obtained from reference simulations or experiments could then inform the target probabilities. Learning representations that resolve transitions between these states, and adapting the partition as additional observations become available, would be useful for applying the method to more complex systems. Independent estimates of generated state populations would allow regional calibration to be evaluated together with structural fidelity and coverage.

With regional probabilities specified, the remaining freedom in the coupling can be used to organize the geometry of training pairs. The image ablations support this separation, with calibrated sampling accounting for the principal allocation and fidelity gains and local pairing affecting coverage. Matching rules that incorporate physical symmetries or appropriate transport costs could further adapt the construction to scientific data. Conditional extensions could represent changes in state populations with temperature, pressure or external forcing, providing a route to generating ensembles across physical conditions. We anticipate that regional probability matching will be useful for scientific sampling tasks in which structural accuracy and relative populations jointly determine the quantities of interest, including molecular ensembles, competing material states and rare configurations in complex dynamical systems.

Methods

Mass-calibrated coupling

Training images resized to 224 pixels are represented by 512-dimensional penultimate features of an ImageNet-pretrained ResNet-18 [37, 38]. Features are averaged over each image and its horizontal reflection, then standardized with target-weighted training means and standard deviations. Weighted deterministic kk-means [39] produces 20 non-empty regions, ordered along a sign-anchored principal axis of their centroids. The representation and regions remain fixed during flow training.

For a unit source direction a0a_0 and standard-normal cumulative distribution function Φ\Phi, define

References

  1. [1]Sohl-Dickstein, J., Weiss, E. A., Maheswaranathan, N. & Ganguli, S. Deep unsupervised learning using nonequilibrium thermodynamics. In Proc. 32nd International Conference on Machine Learning, vol. 37 of Proceedings of Machine Learning Research, 2256–2265 (2015).arxiv.org/abs/1503.03585
  2. [2]Ho, J., Jain, A. & Abbeel, P. Denoising diffusion probabilistic models. In Advances in Neural Information Processing Systems, vol. 33, 6840–6851 (2020).arxiv.org/abs/2006.11239
  3. [3]Song, Y. & Ermon, S. Generative modeling by estimating gradients of the data distribution. In Advances in Neural Information Processing Systems, vol. 32 (2019).arxiv.org/abs/1907.05600
  4. [4]Song, Y. et al. Score-based generative modeling through stochastic differential equations. In International Conference on Learning Representations (2021).
  5. [5]Chen, R. T. Q., Rubanova, Y., Bettencourt, J. & Duvenaud, D. Neural ordinary differential equations. In Advances in Neural Information Processing Systems, vol. 31 (2018).arxiv.org/abs/1806.07366
  6. [6]Grathwohl, W., Chen, R. T. Q., Bettencourt, J., Sutskever, I. & Duvenaud, D. FFJORD: Free-form continuous dynamics for scalable reversible generative models. In International Conference on Learning Representations (2019).arxiv.org/abs/1810.01367
  7. [7]Papamakarios, G., Nalisnick, E., Rezende, D. J., Mohamed, S., & Lakshminarayanan, B. (2021). Normalizing flows for probabilistic modeling and inference. Journal of Machine Learning Research, 22, 1–64.
  8. [8]Duan, C. et al. Optimal transport for generating transition states in chemical reactions. Nat. Mach. Intell. 7, 615–626 (2025).DOI
  9. [9]Li, T., Biferale, L., Bonaccorso, F., Scarpolini, M. A. & Buzzicotti, M. Synthetic Lagrangian turbulence by generative diffusion models. Nat. Mach. Intell. 6, 393–403 (2024).DOI
  10. [10]Hess, P., Aich, M., Pan, B. & Boers, N. Fast, scale-adaptive and uncertainty-aware down-scaling of Earth system model fields with generative machine learning. Nat. Mach. Intell. 7, 363–373 (2025).arxiv.org/abs/2403.02774
  11. [11]Lipman, Y., Chen, R. T. Q., Ben-Hamu, H., Nickel, M. & Le, M. Flow matching for generative modeling. In International Conference on Learning Representations (2023).arxiv.org/abs/2210.02747
  12. [12]Tong, A. et al. Improving and generalizing flow-based generative models with minibatch optimal transport. Trans. Mach. Learn. Res. (2024).arxiv.org/abs/2302.00482
  13. [13]Albergo, M. S. & Vanden-Eijnden, E. Building normalizing flows with stochastic interpolants. In International Conference on Learning Representations (2023).arxiv.org/abs/2209.15571
  14. [14]Albergo, M. S., Boffi, N. M., & Vanden-Eijnden, E. (2025). Stochastic interpolants: A unifying framework for flows and diffusions. Journal of Machine Learning Research, 26, 1–80.
  15. [15]Benamou, J.-D. & Brenier, Y. A computational fluid mechanics solution to the Monge–Kantorovich mass transfer problem. Numer. Math. 84, 375–393 (2000).DOI
  16. [16]Peyré, G. & Cuturi, M. Computational optimal transport. Found. Trends Mach. Learn. 11, 355–607 (2019).arxiv.org/abs/1803.00567
  17. [17]Pooladian, A.-A. et al. Multisample flow matching: Straightening flows with minibatch couplings. In Proc. 40th International Conference on Machine Learning, vol. 202 of Proceedings of Machine Learning Research, 28100–28127 (2023).arxiv.org/abs/2304.14772
  18. [18]Liu, X., Gong, C. & Liu, Q. Flow straight and fast: Learning to generate and transfer data with rectified flow. In International Conference on Learning Representations (2023).arxiv.org/abs/2209.03003
  19. [19]Kornilov, N., Mokrov, P., Gasnikov, A. & Korotin, A. Optimal flow matching: Learning straight trajectories in just one step. In Advances in Neural Information Processing Systems, vol. 37, 104180–104204 (2024).arxiv.org/abs/2403.13117
  20. [20]Chiang, C., Tu, K.-H., Liao, J.-W., Chou, C.-F. & Ke, T.-W. COT-FM: Cluster-wise optimal transport flow matching. In Proc. IEEE/CVF Conference on Computer Vision and Pattern Recognition (CVPR), 11515–11524 (2026).arxiv.org/abs/2603.13395
  21. [21]Chapel, L., Tavenard, R. & Vaiter, S. Differentiable generalized sliced Wasserstein plans. In Advances in Neural Information Processing Systems, vol. 38, 162905–162929 (2025).arxiv.org/abs/2505.22049
  22. [22]Lin, Y., Yao, Y., Zhou, Y. & Liu, T. Beyond optimal transport: Model-aligned coupling for flow matching. In Proc. IEEE/CVF Conference on Computer Vision and Pattern Recognition Findings, 3955–3964 (2026).arxiv.org/abs/2505.23346
  23. [23]Grover, A. et al. Bias correction of learned generative models using likelihood-free importance weighting. In Advances in Neural Information Processing Systems, vol. 32 (2019).arxiv.org/abs/1906.09531
  24. [24]Choi, K., Grover, A., Singh, T., Shu, R. & Ermon, S. Fair generative modeling via weak supervision. In Proc. 37th International Conference on Machine Learning, vol. 119 of Proceedings of Machine Learning Research, 1887–1898 (2020).arxiv.org/abs/1910.12008
  25. [25]Sajjadi, M. S. M., Bachem, O., Lucic, M., Bousquet, O. & Gelly, S. Assessing generative models via precision and recall. In Advances in Neural Information Processing Systems, vol. 31 (2018).arxiv.org/abs/1806.00035
  26. [26]Kyngäänniemi, T., Karras, T., Laine, S., Lehtinen, J., & Aila, T. (2019). Improved precision and recall metric for assessing generative models. Advances in Neural Information Processing Systems, 32.
  27. [27]Naeem, M. F., Oh, S. J., Uh, Y., Choi, Y. & Yoo, J. Reliable fidelity and diversity metrics for generative models. In Proc. 37th International Conference on Machine Learning, vol. 119 of Proceedings of Machine Learning Research, 7176–7185 (2020).arxiv.org/abs/2002.09797
  28. [28]Benton, J., Deligiannidis, G. & Doucet, A. Error bounds for flow matching methods. Trans. Mach. Learn. Res. (2024).arxiv.org/abs/2305.16860
  29. [29]Zhou, Z., & Liu, W. (2025). An error analysis of flow matching for deep generative modeling. Proceedings of Machine Learning Research, 267, 78903–78932.
  30. [30]Song, J., Meng, C. & Ermon, S. Denoising diffusion implicit models. In International Conference on Learning Representations (2021).arxiv.org/abs/2010.02502
  31. [31]Lu, C. et al. DPM-Solver: A fast ODE solver for diffusion probabilistic model sampling in around 10 steps. In Advances in Neural Information Processing Systems, vol. 35, 5775–5787 (2022).arxiv.org/abs/2206.00927
  32. [32]Karras, T., Aittala, M., Aila, T. & Laine, S. Elucidating the design space of diffusion-based generative models. In Advances in Neural Information Processing Systems, vol. 35, 26565–26577 (2022).arxiv.org/abs/2206.00364
  33. [33]Song, Y., Dhariwal, P., Chen, M. & Sutskever, I. Consistency models. In Proc. 40th International Conference on Machine Learning, vol. 202 of Proceedings of Machine Learning Research, 32211–32252 (2023).arxiv.org/abs/2303.01469
  34. [34]Geng, Z., Deng, M., Bai, X., Kolter, J. Z. & He, K. Mean flows for one-step generative modeling. In Advances in Neural Information Processing Systems, vol. 38, 75460–75482 (2025).arxiv.org/abs/2505.13447
  35. [35]Bonneel, N., Rabin, J., Peyré, G. & Pfister, H. Sliced and Radon Wasserstein barycenters of measures. J. Math. Imaging Vis. 51, 22–45 (2015).DOI
  36. [36]Heusel, M., Ramsauer, H., Unterthiner, T., Nessler, B. & Hochreiter, S. GANs trained by a two time-scale update rule converge to a local Nash equilibrium. In Advances in Neural Information Processing Systems, vol. 30 (2017).arxiv.org/abs/1706.08500
  37. [37]He, K., Zhang, X., Ren, S. & Sun, J. Deep residual learning for image recognition. In Proc. IEEE Conference on Computer Vision and Pattern Recognition, 770–778 (2016).arxiv.org/abs/1512.03385
  38. [38]Deng, J. et . al . (2009). ImageNet: A large-scale hierarchical image database. Proc. IEEE Conference on Computer Vision and Pattern Recognition, 248–255.
  39. [39]Lloyd, S. P. Least squares quantization in PCM. IEEE Trans. Inf. Theory 28, 129–137 (1982).DOI
  40. [40]Hairer, E., Nørsett, S. P., & Wanner, G. (1993). Solving Ordinary Differential Equations I: Nonstiff Problems. In Springer.
  41. [41]Krizhevsky, A. (2009). Learning multiple layers of features from tiny images. In Tech. Rep., University of Toronto.
  42. [42]Ronneberger, O., Fischer, P. & Brox, T. U-Net: Convolutional networks for biomedical image segmentation. In Medical Image Computing and Computer-Assisted Intervention – MICCAI 2015, vol. 9351 of Lecture Notes in Computer Science, 234–241 (Springer, 2015).arxiv.org/abs/1505.04597
  43. [43]Wu, Y. & He, K. Group normalization. In Proc. European Conference on Computer Vision, 3–19 (2018).arxiv.org/abs/1803.08494
  44. [45]Gretton, A., Borgwardt, K. M., Rasch, M. J., Schölkopf, B. & Smola, A. A kernel two-sample test. J. Mach. Learn. Res. 13, 723–773 (2012).DOI
  45. [46]Bińkowski, M., Sutherland, D. J., Arbel, M. & Gretton, A. Demystifying MMD GANs. In International Conference on Learning Representations (2018).arxiv.org/abs/1801.01401
  46. [47]Parmar, G., Zhang, R. & Zhu, J.-Y. On aliased resizing and supersizing subtleties in GAN evaluation. In Proc. IEEE/CVF Conference on Computer Vision and Pattern Recognition, 11410–11420 (2022).arxiv.org/abs/2104.11222
  47. [48]Lipton, Z., Wang, Y.-X. & Smola, A. Detecting and correcting for label shift with black box predictors. In Proc. 35th International Conference on Machine Learning, vol. 80 of Proceedings of Machine Learning Research, 3122–3130 (2018).arxiv.org/abs/1802.03916
  48. [49]van der Maaten, L. & Hinton, G. Visualizing data using t-SNE. J. Mach. Learn. Res. 9, 2579–2605 (2008).
  49. [50]Holm, S. A simple sequentially rejective multiple test procedure. Scand. J. Stat. 6, 65–70 (1979).DOI
  50. [51]Efron, B. & Tibshirani, R. J. An Introduction to the Bootstrap (Chapman and Hall/CRC, New York, 1994).DOI
  51. [52]Tipping, M. E. & Bishop, C. M. Mixtures of probabilistic principal component analyzers. Neural Comput. 11, 443–482 (1999).pubmed.ncbi.nlm.nih.gov/9950739
  52. [53]Clanuwat, T. et al. Deep learning for classical Japanese literature. Preprint at https://arxiv.org/abs/1812.01718 (2018).
  53. [54]Reyes-Ortiz, J., Anguita, D., Ghio, A., Oneto, L. & Parra, X. Human activity recognition using smartphones. UCI Machine Learning Repository https://doi.org/10.24432/C54S4K (2013).
  54. [55]Huang, Y. et al. Source data for Calibrating generative flows through regional probability matching. Zenodo https://doi.org/10.5281/zenodo.23277850 (2026).

Paper details

vlnc:W_wfp7chyg
Version
v1 · latest
Published
Fresh — added to the Hub within the last 30 days
Added
License
CC BY 4.0
Usage

views · 5

downloads · 0

A view counts once per browser per day, a download each time the PDF is requested.

  • Engineering

Not recorded for this paper

View statement
Looking for related papers…
Contents