Bernstein Flows for Flexible Posteriors in Variational Bayes
Oliver Dürr, Stephan Hörling, Daniel Dold, Ivonne Kovylov, Beate Sick
TL;DR
Bernstein Flow Variational Inference (BF-VI) introduces a flexible, black-box variational framework that uses Bernstein-polynomial transformation models to approximate complex, multi-parameter posteriors. By combining transformation-models with triangular/masked autoregressive maps, BF-VI yields accurate posterior approximations in low dimensions and often outperforms NF-based VI in higher dimensions. The approach is demonstrated across single- and multi-parameter Bayesian models and is further applied to a semi-structured melanoma problem that jointly models image data and interpretable tabular components, enabling uncertainty quantification for interpretable parameters. While tail underestimation can occur in high dimensions due to optimization and KL asymmetry, BF-VI proves to be a practical, scalable tool for uncertainty quantification in complex Bayesian settings and semi-structured modeling.
Abstract
Variational inference (VI) is a technique to approximate difficult to compute posteriors by optimization. In contrast to MCMC, VI scales to many observations. In the case of complex posteriors, however, state-of-the-art VI approaches often yield unsatisfactory posterior approximations. This paper presents Bernstein flow variational inference (BF-VI), a robust and easy-to-use method, flexible enough to approximate complex multivariate posteriors. BF-VI combines ideas from normalizing flows and Bernstein polynomial-based transformation models. In benchmark experiments, we compare BF-VI solutions with exact posteriors, MCMC solutions, and state-of-the-art VI methods including normalizing flow based VI. We show for low-dimensional models that BF-VI accurately approximates the true posterior; in higher-dimensional models, BF-VI outperforms other VI methods. Further, we develop with BF-VI a Bayesian model for the semi-structured Melanoma challenge data, combining a CNN model part for image data with an interpretable model part for tabular data, and demonstrate for the first time how the use of VI in semi-structured models.
