Can ELBO result from varitional inference used for model comparison?

Dear Bayesian statistics experts,

ELBO/Negative free energy can be regarded as the lower bound of marginal likelihood. I wonder is there any way to get the ELBO result from RStan or cmdstanr and then use them for model comparison? Thanks.

@avehtari @yuling

Both of them should return draws from the variational approximation and the log of unnormalized posterior density __log_p and log of unnormalized variational approximation density __log_q. These are sufficient to compute ELBO. However, the current ADVI algorithm in Stan is not very good, so using that for inference or model comparison can be unreliable.


Thanks for your explanation!

1 Like