A question about amortized VI

Dear Bayesflow developers/Bayesian model experts,

I am start to learn the amortized Bayesian inference. Bayesflow is a wonderful package, but as a stupid person, i always find flow model hard to understand. In the meanwhile, i found VAE very easy to understand and also easy get your hands on.
I have a question unrelated to the bayesflow which is can we use VAE for amortized inference?In the VAE for amortized inference, the encoder model maximize the posterior probability p(z|x) where the decoder model is basically the data generate model which re-generate the data and compare it with the simulation data.
I found these papers(Jaffe, P. I., Poldrack, R. A., Schafer, R. J., & Bissett, P. G. (2023). Modelling human behaviour in cognitive tasks with latent dynamical systems. Nature Human Behaviour. Modelling human behaviour in cognitive tasks with latent dynamical systems | Nature Human Behaviour ;
Whittington, J. C. R., Muller, T. H., Mark, S., Chen, G., Barry, C., Burgess, N., & Behrens, T. E. J. (2020). The Tolman-Eichenbaum Machine: Unifying Space and Relational Memory through Generalization in the Hippocampal Formation. Cell, 183(5), 1249-1263 e1223. Redirecting) used the similar approach for the one-shot model-fitting. Is it a reasonable approach? Thanks a lot.

Best,

Hi Mingqian,
I believe all generative models, including VAEs, have the potential for amortized Bayesian inference. I previously applied a VAE to a two-dimensional parameter space, and it performed reasonably well. However, as many studies, particularly in image generation, have shown, VAEs tend to produce lower-quality samples compared to other generative models. So there are relatively few studies that use VAEs for amortized Bayesian inference.

You may refer to the following paper for more context: https://arxiv.org/pdf/1909.06296

Best,

1 Like

Hi Mingqian,

VAEs amortized inference has a different goal than BayesFlow’s. In VAEs, you learn both the latent variables z and a posterior over latents given data x, p(z \mid x). In BayesFlow (and amortized Bayesian inference), you typically only learn a posterior p(z \mid x), where the “meaning” of the latents is set by the data-generating model (i.e., by yourself as a modeler).