Divergence is Uncertainty: A Closed-Form Posterior Covariance for Flow Matching
Title: Divergence as a Proxy for Uncertainty: A Closed-Form Solution for Posterior Covariance in Flow Matching
Abstract:
While flow matching has emerged as a dominant paradigm in generative modeling, effectively quantifying the uncertainty of its generated samples remains a significant challenge. Current methodologies typically rely on retraining models with auxiliary variance heads, maintaining computationally expensive ensembles, or propagating approximate covariance matrices through numerous integration steps—each approach necessitating a compromise between training overhead, inference speed, and accuracy. We demonstrate that such trade-offs are unnecessary. By adapting Tweedie’s formula from the denoising context to the flow matching interpolant, we derive an exact, closed-form expression for the posterior covariance at every stage of the generative trajectory. This solution hinges on a single metric: the divergence of the learned velocity field. This quantity can be calculated post-hoc on any pre-existing flow matching model, eliminating the need for architectural changes or retraining. For single-step generators like MeanFlow, this formula provides end-to-end generation uncertainty in one forward pass, bypassing the multi-step variance propagation inherent in previous techniques. Our experiments on MNIST reveal that the resulting per-pixel uncertainty maps are semantically coherent, focusing on digit boundaries where sample variation peaks. Furthermore, the scalar uncertainty score accurately reflects actual prediction error, all while requiring approximately $10^4 \times$ less total compute than ensembling or Monte Carlo dropout.
Source: arXiv Generated at: 2026-06-02 00:00:00 UTC





