Research preprint · 2026

Posterior
Flow Matching

Learning conditional velocity means and variances
for generation and endpoint uncertainty.

Chenrui Ma1Xi Xiao2Lin Zhao3Xinru Jiang3Tianyang Wang2Yanning Shen4Nando Fioretto1

1 University of Virginia2 University of Alabama at Birmingham3 Northeastern University4 University of California, Irvine

PFM application examples: generated images paired with variance maps, chair and airplane point clouds with uncertainty ellipsoids, molecular conformations, and action predictions for PushT.
One posterior, two complementary outputs. A prediction of the data endpoint, and the uncertainty that remains. Examples from the paper span images, point clouds, molecules, and actions.

The motivation

A direction to follow.
A spread to learn.

At an intermediate state, several noise–data pairs can be compatible with the same input, each prescribing a different velocity toward its data endpoint. Flow matching learns their conditional mean, which supplies a transport direction but leaves the spread of compatible endpoints unspecified.

Posterior Flow Matching (PFM) learns that mean together with componentwise variance through a Gaussian posterior model. The same learned moments provide endpoint-posterior readouts and support both a mean-driven ordinary differential equation (ODE) and a posterior-driven stochastic differential equation (SDE). The experiments examine generation quality, the information in these readouts, and the role of posterior covariance in sampling.

01 / Method

Learn a posterior.
Generate and diagnose.

A shared backbone predicts a mean and log variance. One negative log-likelihood (NLL) objective connects the transport field to endpoint uncertainty.

Independent standard Gaussian noise X0 ∼ 𝒩(0, I) and data X1 ∼ pdata define the reference path Xt = (1 − t)X0 + tX1, with velocity target V = X1 − X0. Generation time increases from noise at t = 0 toward data at t = 1.

01

Learn conditional moments

A diagonal Gaussian fits the conditional velocity mean vθ and variances γθ = exp ℓθ. Fixing covariance to the identity recovers the FM regression objective.

02

Read endpoint uncertainty

An affine map converts velocity moments into the endpoint mean μθ and covariance Σθx, with no additional prediction head.

03

Choose ODE or SDE

The mean supplies transport. The SDE allocates noise through learned covariance and includes the score and divergence corrections needed by the full dynamics.

A shared backbone learns velocity mean and variance through Gaussian NLL. The trained posterior model supports a mean-driven ODE and posterior-driven SDE with several noise strengths.
From learning to sampling. The two heads are trained jointly. Both samplers use the same posterior model; changing stochasticity changes the noise and its corresponding drift correction.

Posterior learning

qθ(v | x, t) = 𝒩(v; vθ, Σθ),   Σθ = diag γθ

ℒPFM = ½ 𝔼 [ ∑i ( (Vi − vθ,i)2 / γθ,i + log γθ,i ) ]

The expectation uses the reference pairs and training time law. For unrestricted means and positive diagonal variances, the population optimum recovers the conditional velocity mean and componentwise variances under the paper's moment assumptions.

Endpoint readouts at (x, t)

μθ = x + (1 − t)vθ

Σθx = (1 − t)2Σθ

These readouts describe the compatible data endpoints. They are distinct from the SDE's injected noise and from downstream execution error. The ImageNet model predicts the endpoint mean directly, using the equivalent parameterization in the paper.

The ODE, the corrected SDE, and their theoretical scope

For the standard Gaussian reference noise and t < 1, the velocity mean also gives a derived score. The nonnegative schedule λ controls the overall diffusion rate; the learned covariance sets its relative strength across states and coordinates.

dYt = vθ dt,   ŝθ = (tvθ − x) / (1 − t)

aθ = λ(t)Σθ,   BθBθ⊤ = aθ

dYt = [vθ + ½ ∇x · aθ + ½ aθ ŝθ] dt + Bθ dWt

Fields in the dynamics are evaluated at (Yt, t), and Wt is Brownian motion. The score term compensates for diffusion across density gradients; the divergence term accounts for spatially varying covariance. Setting λ = 0 recovers the ODE.

With exact fields, matching initialization Y0 ∼ 𝒩(0, I), and the regularity conditions stated in the paper, both dynamics preserve the reference marginals. Under the same compatible coefficients, the SDE dissipates relative entropy of density perturbations, whereas the ODE preserves it. These continuous-time statements do not imply exact learned fields or error-free numerical sampling.

02 / Generation across domains

One formulation.
Four generation tasks.

Task-specific baselines test generation quality. Within each task and category, PFM ODE and PFM SDE share the trained posterior model. The tables and figures below report the paper's experiments.

ImageNet-256 · CIFAR-10

Generation quality in pixel space

Class-conditioned image generation tests whether posterior-driven sampling improves Fréchet inception distance (FID) and inception score (IS) relative to mean-driven transport and the listed FM and diffusion baselines.

Image-generation code

ImageNet-256
MethodFID ↓IS ↑
FM25.4263.2
Diffusion27.3862.1
PFM ODE24.4565.44
PFM SDE22.2868.06
CIFAR-10
MethodFID ↓
FM3.75
Diffusion4.12
PFM ODE3.49
PFM SDE3.03

50,000 class-balanced samples per setting; 250 integration steps for ImageNet and 50 for CIFAR-10. Lower FID and higher IS are better. Tables scroll horizontally when needed.

PFM SDE lowers ImageNet FID from 24.45 to 22.28 and raises IS from 65.44 to 68.06 relative to PFM ODE. CIFAR-10 FID decreases from 3.49 to 3.03. The gains also hold against the baselines shown here.

Representative ImageNet endpoint predictions paired with earlier variance maps, beside curves of predicted endpoint variance and mean squared residual over time.
Outputs and their readouts. Each near-final endpoint image is paired with an earlier variance map from the same trajectory. Maps average over channels and brighten with increasing variance. The right panel compares predicted endpoint variance with mean squared residuals; the gallery illustrates representative outputs, while the tables measure generation quality.

ShapeNet · Chair & Airplane

Geometry and distributional coverage

A shape latent conditions point-cloud generation. Chamfer-distance (CD) metrics compare geometric matching, coverage, and the distinction between generated and reference distributions.

Point-cloud code

ShapeNet · Chair
MethodMMD ×10³ ↓COV (%) ↑1-NNA (%)
Diffusion12.2848.9460.11
FM12.0449.2361.74
PFM ODE11.5750.9859.95
PFM SDE10.5051.5858.23
ShapeNet · Airplane
MethodMMD ×10³ ↓COV (%) ↑1-NNA (%)
Diffusion3.2848.7164.83
FM3.2649.3463.19
PFM ODE3.2350.1362.70
PFM SDE3.0651.8060.23

MMD is minimum matching distance, averaged from each reference shape to its nearest generated shape. COV is coverage. For 1-nearest-neighbor accuracy (1-NNA), the ideal value is 50%; bold marks the closest value. All metrics use CD. Swipe within a table to see every metric.

In both categories, PFM SDE lowers MMD, increases coverage, and moves 1-NNA closer to 50% relative to PFM ODE and the listed baselines. The improvements span geometric fidelity and distributional coverage.

Chair and airplane endpoint predictions at successive generation times. Blue points show predicted endpoints and orange ellipsoids show one-standard-deviation contours at tracked points.
How predicted shape develops. Chair is shown on the left and Airplane on the right; each row tracks one example with consistent framing. Blue points show endpoint means, and orange ellipsoids show endpoint standard deviations at a fixed subset of points. These contours visualize the readout rather than sampled alternative trajectories.

GEOM-QM9 · Molecular conformations

Coverage and conformation accuracy

Conditioned on molecular graphs, PFM generates atom coordinates with covariance projected onto the centered coordinate subspace. Recall and precision measure both reference coverage and generated-conformation quality.

Molecular-generation code

GEOM-QM9 · Coverage and matching distance
Method / samplerCOV-R (%) ↑COV-P (%) ↑MAT-R (Å) ↓MAT-P (Å) ↓
FM (ET-Flow) / ODE96.4794.050.0730.098
FM (ET-Flow–SO(3)) / ODE95.9892.100.0760.110
PFM / ODE96.4493.990.0750.108
PFM / SDE98.3796.420.0630.081

COV-R/P: recall/precision coverage; MAT-R/P: recall/precision matching distance. Coverage uses a 0.5 Å threshold. Performance metrics use chirality correction without force-field relaxation. Swipe within the table to see every metric.

The molecular model uses graph features with a constant atom chirality input. Optional chirality postprocessing reflects a conformer when all specified centers are inverted relative to the input stereochemistry. Posterior readouts describe the raw model before correction.

PFM SDE improves all four reported metrics over PFM ODE and the listed reference methods: coverage rises to 98.37% / 96.42%, while matching distances fall to 0.063 / 0.081 Å.

Six molecular endpoint predictions progressing through generation time, with atomwise variance colors, followed by reference conformations colored by element.
Geometry with atomwise readouts. Each row follows a conformation prediction through generation time. Generated colors encode endpoint variance; reference colors denote elements. These visualizations show model readouts before chirality correction, whereas the performance table uses the correction.

PushT · Visuomotor control

Generated actions in a control loop

PFM generates action sequences conditioned on observations. Comparing two integration budgets tests control performance when the sampler has a limited number of generation steps.

PushT code

PushT · Control score
Method20 steps ↑50 steps ↑
FM0.8250.872
Diffusion Policy0.8230.867
PFM ODE0.8270.878
PFM SDE0.8480.914

Higher control scores are better. The 20/50-step columns refer to generation integration budgets, distinct from the environment steps in the figure. Tables scroll horizontally when needed.

PFM SDE improves control scores from 0.827 to 0.848 at 20 steps and from 0.878 to 0.914 at 50 steps, exceeding the listed FM and Diffusion Policy results at both budgets.

Two PushT episodes. Upper rows show endpoint action means and standard-deviation ellipses during generation; the bottom row shows environment execution across planning calls.
From a planning call to execution. Columns indicate environment steps. Within each call, upper rows show action means in blue and standard-deviation ellipses in orange at successive generation times; the bottom row shows execution. Posterior dispersion is not an execution-error estimate.

03 / Posterior diagnostics

Check the information
in the covariance.

The readout includes (1 − t)², so a shrinking variance alone does not establish calibration. The paper tests predicted moments against known endpoint residuals and compares covariance models at the same mean.

Reference states interpolate independent noise and held-out data endpoints at fixed times. This makes the endpoint residual observable. Grouped second-moment checks assess variance–residual agreement; molecular Gaussian NLL compares learned covariance with a time-only covariance fitted on validation data.

Chair and Airplane binned endpoint variance versus residual plots, molecular covariance trace versus squared residual norm, and molecular NLL comparing learned and time-only covariance at the same mean.
Moment and likelihood checks. Panels (a,b) compare point-cloud endpoint variances with mean squared residuals; (c) compares molecular covariance traces with squared residual norms; (d) compares molecular velocity-posterior NLL per subspace dimension at a shared predicted mean. Dotted lines indicate equality in (a–c). Bars and bands show 95% bootstrap intervals; hollow markers mark sparse bins.

The moment checks show broad agreement, with departures in low-variance and sparse point-cloud bins. Learned molecular covariance gives lower Gaussian NLL at every evaluated time than the time-only baseline. These checks support the information in the learned covariance at the evaluated reference states.

04 / Ablation studies and sampling cost

What does the
posterior covariance add?

The diffusion tensor has two parts: learned covariance sets local noise allocation, while the inference-time schedule controls its overall rate. Separate comparisons examine each role and the sampling cost.

Covariance choice at a shared mean model

All three samplers use the same trained PFM model. The two SDEs share the same scalar schedule: posterior-driven sampling uses aθ = λ(t)Σθ, while the isotropic alternative uses aiso = λ(t)I, with each sampler's corresponding drift correction. Molecular isotropy is defined within the centered coordinate subspace.

Covariance choice · Selected metrics
Task / metricPFM ODEPFM + isotropic SDEPFM SDE
ImageNet · FID ↓24.4524.3122.28
Chair · MMD-CD ×10³ ↓11.5711.4610.50
Airplane · MMD-CD ×10³ ↓3.233.323.06
GEOM-QM9 · COV-R (%) ↑96.4496.1498.37
PushT · 50-step score ↑0.8780.8820.914

Selected metrics from the full covariance comparison below. This controls the mean model and scalar schedule, not the total injected noise energy. Swipe within a table to see every sampler.

Posterior-driven sampling improves the reported quality metrics over isotropic sampling across all four tasks. Isotropic noise alone gives smaller gains on ImageNet, Chair, and PushT, and worsens molecular coverage and Airplane MMD relative to PFM ODE.

Full covariance comparison across all reported metrics
ImageNet-256
SamplerFID ↓IS ↑
PFM ODE24.4565.44
PFM + isotropic SDE24.3165.53
PFM SDE22.2868.06
PushT · Control score
Sampler20 steps ↑50 steps ↑
PFM ODE0.8270.878
PFM + isotropic SDE0.8330.882
PFM SDE0.8480.914
ShapeNet · Chair
SamplerMMD ×10³ ↓COV (%) ↑1-NNA (%)
PFM ODE11.5750.9859.95
PFM + isotropic SDE11.4651.3459.68
PFM SDE10.5051.5858.23
ShapeNet · Airplane
SamplerMMD ×10³ ↓COV (%) ↑1-NNA (%)
PFM ODE3.2350.1362.70
PFM + isotropic SDE3.3250.3262.78
PFM SDE3.0651.8060.23

ShapeNet metrics use CD; 1-NNA is best at 50%.

GEOM-QM9
SamplerCOV-R (%) ↑COV-P (%) ↑MAT-R (Å) ↓MAT-P (Å) ↓
PFM ODE96.4493.990.0750.108
PFM + isotropic SDE96.1493.580.0780.123
PFM SDE98.3796.420.0630.081

Molecular coverage uses the same 0.5 Å threshold and correction protocol as the generation comparison. PFM ODE/SDE rows reproduce the main task tables.

Stochasticity is an inference-time choice

With the learned covariance fixed, the sweep varies λ0 in λ(t) = λ0(1 − t). The drift correction scales with λ0, and the Brownian coefficient with its square root; zero recovers the ODE.

Stochasticity sweeps show ImageNet FID and IS, Chair and Airplane 1-NNA-CD, and PushT control scores at two integration budgets.
Varying strength with covariance fixed. Panels compare ImageNet quality, ShapeNet 1-NNA-CD, and PushT control scores as λ0 changes. For 1-NNA, the ideal value is 50%.

Intermediate scales improve quality relative to the ODE in the evaluated sweeps; larger scales can reduce it. The favorable range depends on the task and integration budget, including the two PushT budgets.

1.16–1.33×

PFM SDE time relative to PFM ODE

The same trained posterior model supports both choices. PFM ODE has sampling times close to FM ODE; the SDE additionally computes variance-field derivatives for its drift correction.

Per-task sampling times on NVIDIA B200
NVIDIA B200 · Milliseconds per generated sample
TaskFM ODEDiffusion SDEPFM ODEPFM SDE
ImageNet-2563.433.783.423.98
ShapeNet1.872.111.882.47
GEOM-QM92.182.422.172.89
PushT4.254.494.305.04

Milliseconds per generated sample, as reported in the paper. PushT timings use 50 integration steps. These measurements describe the evaluated workloads and hardware.

05 / Code & interfaces

Train, sample,
and evaluate.

One PFM repository contains four parallel task implementations: images, point clouds, molecules, and PushT. Each task directory provides its own setup, data instructions, training, ODE/SDE sampling, evaluation, and posterior diagnostics. Pretrained PFM checkpoints are not provided.

The paper link opens the authors' preprint PDF. An arXiv link will be added when the submission is available.

Reference

Cite this work.

@misc{ma2026posteriorflowmatching,
  title   = {Posterior Flow Matching},
  author  = {Chenrui Ma and Xi Xiao and Lin Zhao and Xinru Jiang and
             Tianyang Wang and Yanning Shen and Nando Fioretto},
  year    = {2026},
  note    = {Preprint}
}