What is the recommended Bayesian workflow in BayesFlow when we have many candidate parameters but little prior knowledge about which ones are truly important?

Hi,

Suppose we begin with little prior knowledge and therefore assign priors to all candidate coefficients.

After observing data, what is currently considered the best Bayesian strategy in BayesFlow for identifying which coefficients are genuinely supported by the data?

I have experimented with Gaussian priors and a continuous spike-and-slab approximation.

Are there more suitable approaches for amortized inference?

I have attached the code for your reference.

Thank!

Hi vivian, the (no so smart) discuss bot flagged the post. Discuss has been having loads of false alarms with their (not so smart) algorithms lately. I’ve now unlocked the post.

Can you please clarify what do you mean by “genuinely supported by the data”? If you mean which coefficients can be identified (i.e., posterior != prior), then a look at the metrics and diagnostics would typically suffice.

Note, however, that currently this is a heuristic approach, because in some cases it can happen that the neural estimator is the problem and not the model itself. Non-identifiability of the model can sometimes be confirmed with traditional methods (e.g., looking at the Fisher information matrix).

I’m doing amortized posterior estimation with BayesFlow on a discrete-time hazard/survival model with a set of regression coefficients. Originally I trained with an independent N(0,1) prior on every coefficient.

I’d like the trained network to do variable selection at inference: for a new dataset, recognize which covariates have no effect and return a posterior that concentrates at 0 for them — not just a wide posterior shrunk toward 0. With an N(0,1) prior this can’t happen, since the network never sees a “coefficient is exactly 0” regime.

I tried a spike-and-slab training prior (each coefficient is 0 with probability 0.5, otherwise N(0,1)) to teach the network the sparse regime. It learns the shape, but I’m wondering about alternatives.

Are there better ways to do amortized variable selection?Any BayesFlow-native patterns welcome.

I think your approach makes sense. Relevance determination is a general (Bayesian) problem that is not specifically tied to amortized inference. Porting any concept from parametric Bayesian statistics should be possible in amortized Bayes.