Abstract
Simulation-Based Inference (SBI) is a critical tool for scientific disciplines where the likelihood function is intractable but forward simulators are available. Traditional Neural Posterior Estimation (NPE) methods rely on discrete normalizing flows, which impose significant architectural constraints to maintain invertibility. This paper introduces Flow Matching Posterior Estimation (FMPE), a framework that utilizes continuous normalizing flows (CNFs) trained via flow matching. FMPE enables the use of unconstrained, high-capacity neural architectures, resulting in superior accuracy and scalability. We demonstrate that FMPE outperforms existing methods on standard benchmarks and real-world gravitational-wave inference tasks, achieving higher precision with faster training times.
Introduction
In fields such as astrophysics, epidemiology, and particle physics, researchers often work with complex simulators that generate synthetic data from physical parameters. However, calculating the probability of observed data given specific parameters—the likelihood—is frequently impossible. Simulation-Based Inference (SBI) addresses this by training neural networks to approximate the posterior distribution directly from simulated data-parameter pairs.
Currently, the gold standard for SBI is Neural Posterior Estimation (NPE), which typically employs discrete normalizing flows. While effective, these flows require specialized architectures (e.g., coupling layers) to ensure tractable Jacobians and invertibility. These constraints limit the network's ability to process high-dimensional conditioning data. Conversely, diffusion models offer architectural flexibility but lack direct density evaluation, which is essential for scientific validation and Bayesian model comparison. FMPE bridges this gap by combining the flexibility of diffusion-like training with the exact density estimation of continuous flows.
Methodology: Flow Matching Posterior Estimation
Vector Field Regression
FMPE shifts the learning objective from a sequence of discrete transformations to a continuous vector field $v_t$. This field defines the velocity of points as they are "pushed" from a simple base distribution (e.g., Gaussian noise) toward the complex target posterior. By learning the vector field rather than the transformation itself, the model avoids the rigid architectural requirements of discrete flows.
Unconstrained Architectures
Because the network only needs to output a vector field, FMPE can leverage standard, powerful components like ResNets and Gated Linear Units (GLUs). This is particularly beneficial for high-dimensional conditioning data ($x$), as the network can devote more parameters to interpreting the data rather than satisfying mathematical constraints. In the authors' gravitational-wave experiments, FMPE allocated two-thirds of its parameters to data interpretation, whereas traditional NPE was forced to spend two-thirds of its capacity on the flow mechanism itself.
Optimal Transport and Time Re-weighting
To improve training stability and efficiency, FMPE utilizes an "optimal transport" formulation. This results in straighter trajectories from noise to data, which are significantly easier for the network to learn than the stochastic paths found in diffusion models. Additionally, the authors introduce a power-law distribution for the time parameter $t$ during training. This re-weighting focuses the model's learning capacity on the most complex parts of the transformation, typically occurring near the target distribution boundary.
Experimental Evaluation
SBI Benchmark
The framework was first tested on a suite of 10 standard SBI tasks, including "Two Moons," "SLCP," and "Lotka-Volterra." These tasks range from 2 to 10 parameter dimensions and up to 100 data dimensions. FMPE consistently matched or exceeded the performance of NPE, showing particular resilience in handling multimodal distributions.
Gravitational-Wave Inference
To test scalability, the authors applied FMPE to the GW150914 event—the first detected black hole merger. This real-world application involves 15 parameters and high-dimensional frequency-domain data ($x \in \mathbb{R}^{15744}$). FMPE achieved a mean Jensen-Shannon Divergence (JSD) of 0.5 mnat, a significant improvement over the 3.6 mnat achieved by the NPE baseline. This performance makes the FMPE posterior nearly indistinguishable from those produced by computationally expensive "Ground Truth" Markov Chain Monte Carlo (MCMC) samplers.
Key Insights
- Mass Coverage: For scientific applications, "mode-dropping" (ignoring possible physical explanations) is a significant risk. FMPE is theoretically and empirically shown to be "mass-covering," ensuring it captures the full support of the true posterior.
- Training Efficiency: Despite utilizing more complex internal architectures, the FMPE model for gravitational waves trained 30% faster than the NPE baseline (2 days versus 3 days on an NVIDIA A100 GPU).
- Exact Density Evaluation: Unlike diffusion models, FMPE allows for the calculation of exact log-probabilities by integrating the divergence of the vector field. This capability is vital for importance sampling and calculating Bayesian evidence.
Conclusion and Future Work
FMPE represents a significant step forward in making simulation-based inference scalable and flexible. By moving to continuous flows and flow matching, it removes the architectural shackles of discrete flows while maintaining the rigorous density evaluation required for scientific research.
The primary trade-off for this performance is inference speed; because FMPE requires solving an Ordinary Differential Equation (ODE), generating samples involves hundreds of network forward passes, compared to the single pass required by discrete flows. Future research will focus on "sequential" versions of FMPE to tune models for specific observations and the integration of physical symmetries (e.g., rotation or translation) directly into the vector field to further enhance accuracy.
Summary updated