Under estimation of uncertainty

Dear Team, I am trying to perform SVI using numpyro. I tried multiple auto guides and different ELBO loss variants. However, the uncertainties in my predictions are massively under-estimated. Its so low that it looks like I am getting point estimates.

So,

  1. I’d like to know if there are some settings in numpyro that controls the uncertainty levels in the predictions? In short, any suggestions on what you would do, in general, to get better uncertainty estimates. Since I have not shared my model, I do not expect answers for my case. Just some general suggestions?
  2. I get posterior samples using this code:
predictive = Predictive(svi.guide, params=svi.get_params(svi_results.state), num_samples=100)
(Note: Here 'svi' is instance of the SVI class; and svi_results are output of the svi.run() function)
posterior_param_samples = predictive(rng_key, feature_arrays)

Am I doing something wrong here? May be I should use the sample_posterior function from the guide to get the posterior samples. So, if anyone can guide on that, it would be great. Thanks a lot for all the help :slight_smile: