Abstract
Bayesian inference for computationally expensive black-box models often requires thousands of new likelihood evaluations, making standard MCMC or Variational Inference impractical. We present Normalizing Flow Regression (NFR), an "offline" inference method that repurposes existing log-density evaluations—such as those generated during optimization—to learn a tractable posterior distribution. By treating a normalizing flow as a regression surrogate with a censored Tobit likelihood and annealed optimization, NFR provides robust uncertainty quantification without additional model simulations.
Introduction
In scientific computing, "black-box" models often involve high-fidelity simulations where a single evaluation of the likelihood can take minutes or hours. Traditional Bayesian methods like Markov Chain Monte Carlo (MCMC) are frequently discarded in favor of point estimates (e.g., Maximum Likelihood Estimation) because they require an excessive number of evaluations. While surrogate-based methods like Gaussian Processes exist, they typically approximate the log-likelihood surface and still require a secondary inference step to obtain the actual posterior.
Normalizing Flow Regression (NFR) addresses this by directly learning the posterior distribution from "offline" data—the traces of previous optimization runs. This approach "recycles" evaluations that are usually discarded, transforming them into a full, tractable Bayesian posterior.
The NFR Framework
The core idea of NFR is to use a normalizing flow not as a density estimator from samples, but as a regression model to fit a surface to known log-density values. Given a set of parameters $x$ and their corresponding log-densities $y$, we model the target as: $$f_\psi(x) = \log q_\phi(x) + C$$ where $q_\phi$ is a Masked Autoregressive Flow (MAF) and $C$ is a learnable constant representing the log-marginal likelihood (evidence).
Tobit Likelihood and Censoring
A significant challenge in log-density regression is the behavior of the target function in low-probability regions, where log-densities approach negative infinity. Standard mean-squared error objectives would force the model to waste capacity fitting these irrelevant tails. NFR employs a Tobit likelihood, which "censors" observations below a threshold $y_{low}$.
This censoring ensures the flow focuses its expressive power on the high-probability "peaks" of the distribution, leading to a more accurate posterior approximation where it matters most for inference.
Annealed Optimization
To prevent the flow from getting trapped in local minima during training, NFR utilizes annealed optimization (tempering). The algorithm begins by fitting a simple Gaussian base distribution and gradually "warps" it into the complex target distribution by incrementing a tempering parameter $\beta \in [0, 1]$.
Experimental Evaluation
The authors evaluated NFR on synthetic benchmarks (Rosenbrock-Gaussian, Lumpy distribution) and real-world models from biology and neuroscience, including a 12D Multisensory Perception model. Training data was sourced from the traces of common optimization algorithms like CMA-ES and BADS.
Key Results
- Accuracy: NFR consistently matched or outperformed baselines such as the Laplace approximation and Variational Sparse Bayesian Quadrature (VSBQ) in terms of model evidence error and marginal distribution overlap.
- Scalability: In high-dimensional tasks ($D=12$), NFR remained accurate while competitors like VSBQ failed to produce usable approximations.
- Efficiency: While NFR requires GPU training time (approx. 15–30 minutes), it avoids the massive computational cost of "online" methods like Black-Box Variational Inference (BBVI), which would require hundreds of hours for the same models.
Discussion and Limitations
NFR demonstrates that optimization traces are a "goldmine" of information for uncertainty quantification. However, the method is limited by the coverage of the offline data; if the initial optimization failed to explore a region containing a hidden mode, NFR cannot recover it. Furthermore, while NFR scales better than many surrogates, it currently faces a dimensionality ceiling around 15–20 parameters. Future work may involve "active" NFR, where the model suggests new evaluation points to iteratively refine the posterior.
Conclusion
Normalizing Flow Regression provides a powerful, efficient pathway for Bayesian inference in expensive black-box settings. By treating the posterior as a regression target and utilizing censoring and tempering, it turns discarded optimization data into a tractable, high-quality posterior distribution.
Summary updated