  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.
