Learning Bayesian Statistics

#157 Amortized Inference & BayesFlow in Practice, with Stefan Radev


Listen Later

Support & Resources
→ Support the show on Patreon
Bayesian Modeling Course (first 2 lessons free)

Our theme music is « Good Bayesian », by Baba Brinkman (feat MC Lars and Mega Ran). Check out his awesome work


Takeaways:

Q: What is simulation-based inference and what does "sim-to-real" mean?
A: Simulation-based inference (SBI) uses a mechanistic simulator as an epistemic tool: you train a neural network on a large number of labeled simulations and then deploy it on real, unlabeled data. The "sim-to-real" framing captures the key asymmetry -- your network never sees real data during training, only simulations, but it generalizes to real observations at inference time. This is the opposite of the more common "synthetic-for-ML" approach, where fake data is used purely to augment real training data.

Q: What is the amortized inference agent skill and what does it do?
A: It's an open-source AI agent skill, co-developed by Stefan and Alexandre, that teaches an AI coding agent to run a complete, state-of-the-art amortized inference workflow. Because amortized inference is recent enough that it's underrepresented in LLM training data, vanilla agents tend to get it wrong. The skill injects the right methodology: it guides the agent to set up the simulator, choose the right network architecture, run a pilot, train with appropriate diagnostics, and produce an actionable report -- without the user needing to know the details.

Q: What is calibration coverage and why should you never skip it?
A: Calibration coverage tells you whether your posterior uncertainty is honest -- whether your credible intervals actually contain the true parameter at the right frequency. A model can show poor parameter recovery yet still be well-calibrated (because it's falling back on the prior), or it can appear to recover parameters while being poorly calibrated. Running calibration diagnostics both in-sample and out-of-sample is especially revealing for hierarchical models, which often appear to underfit in-sample but generalize much better out-of-sample thanks to shrinkage.

Full takeaways here

Chapters:
00:00:00 How does amortized inference fit into the Bayesian workflow?
00:12:03 What does "sim-to-real" mean in simulation-based inference?
00:15:57 Why is amortized inference particularly suited to psychology and neuroscience?
00:21:51 What is the amortized inference agent skill?
00:39:00 What is calibration coverage and how do you interpret it?
00:41:50 How do you decide what to do next after your first training run?
00:44:53 How do actionable insights make Bayesian workflows more usable?
00:49:08 What are the unique challenges of hierarchical models in amortized inference?
01:00:51 What is the current state of BayesFlow's support for hierarchical models?
01:05:00 What are the main failure modes of amortized inference and how do you handle model misspecification?

Thank you to my Patrons for making this episode possible!

Links from the show

...more
View all episodesView all episodes
Download on the App Store

Learning Bayesian StatisticsBy Alexandre Andorra

  • 4.7
  • 4.7
  • 4.7
  • 4.7
  • 4.7

4.7

66 ratings


More shows like Learning Bayesian Statistics

View all
Odd Lots by Bloomberg

Odd Lots

1,993 Listeners

Conversations with Tyler by Mercatus Center at George Mason University

Conversations with Tyler

2,461 Listeners

Talk Python To Me by Michael Kennedy

Talk Python To Me

583 Listeners

The Quanta Podcast by Quanta Magazine

The Quanta Podcast

544 Listeners

Super Data Science: ML & AI Podcast with Jon Krohn by Jon Krohn

Super Data Science: ML & AI Podcast with Jon Krohn

306 Listeners

Sean Carroll's Mindscape: Science, Society, Philosophy, Culture, Arts, and Ideas by Sean Carroll

Sean Carroll's Mindscape: Science, Society, Philosophy, Culture, Arts, and Ideas

4,167 Listeners

Practical AI by Practical AI LLC

Practical AI

212 Listeners

Last Week in AI by Skynet Today

Last Week in AI

313 Listeners

Machine Learning Street Talk (MLST) by Machine Learning Street Talk (MLST)

Machine Learning Street Talk (MLST)

101 Listeners

Dwarkesh Podcast by Dwarkesh Patel

Dwarkesh Podcast

551 Listeners

Hard Fork by The New York Times

Hard Fork

5,576 Listeners

Latent Space: The AI Engineer Podcast by Latent.Space

Latent Space: The AI Engineer Podcast

101 Listeners

Risky Business with Nate Silver and Maria Konnikova by Pushkin Industries

Risky Business with Nate Silver and Maria Konnikova

263 Listeners

Prof G Markets by Vox Media Podcast Network

Prof G Markets

1,480 Listeners

The Opinions by The New York Times Opinion

The Opinions

632 Listeners