Episodi

  • #167 Amortized Inference & GPUs for Stan, with Paul-Christian Bürkner & Steve Bronder
    Oct 20 2026

    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 amortized Bayesian inference and how does it differ from MCMC?

    Instead of running MCMC on each dataset, you train neural networks on data simulated from the model, so you don't need likelihood or prior densities. Once training is done, inference on a new dataset is essentially instant: new data in, posterior out. The price is everything neural networks bring with them, from unstable training to a lack of guarantees. Paul's stated goal is to make these methods as reliable and robust as MCMC while staying orders of magnitude faster, and he's candid that he doesn't know whether the field will ever get there.

    Q: Why would a Bayesian model not have a usable likelihood?

    A: Usually not because the likelihood can't be written down in principle, but because computing it is so expensive or numerically unstable that it's intractable in practice. Paul gives two cases. First, mechanistic models built on complicated differential equations, as in physical chemistry or biology, where you can't solve through the equations to get densities and gradients in a stable, fast way. Second, big latent variable models with thousands of latent variables between the parameters and the data, where marginalizing them out is hopeless. In both cases, simulating from the model is easy: simulate the parameters, the latents and the data, throw the latents away, and learn the relation between parameters and data from the simulations.

    Full takeaways here!

    Chapters:

    15:33 What is amortized Bayesian inference and when should you use it instead of MCMC?
    23:18 Why would a Bayesian model not have a usable likelihood?
    26:03 What's holding back GPU computing in Stan?
    31:14 What are sum-to-zero constraints and why do they make models sample faster?
    35:55 What is a Jacobian adjustment in Bayesian statistics?
    39:17 How do you diagnose failures in amortized Bayesian inference?
    42:01 What is leave-one-group-out cross-validation for hierarchical models?
    45:57 Do undertrained neural posteriors overestimate or underestimate uncertainty?
    49:06 How do Stan developers use AI tools in their work?
    55:47 Should Stan and brms hide the inference algorithm from users?

    Thank you to my Patrons for making this episode possible!

    Full links from the show here!

    Mostra di più Mostra meno
    1 ora e 3 min
  • What Do Kernels, Length Scale & Amplitude Mean in Gaussian Processes?
    Oct 7 2026

    Today's clip is from Episode 166, featuring Bill Engels & Jesse Grabowski. In this conversation, Bill explains what a kernel means in a Gaussian process and how it defines the idea of similarity between data points. He then breaks down the role of the length scale, showing how it controls how quickly the relationship between two points changes, and how amplitude controls the overall scale of the functions a GP can represent.

    The discussion also connects these ideas to the practical use of Gaussian processes for modeling unknown nonlinear relationships, and why kernels provide an interpretable way to describe how inputs are related.

    Full discussion here

    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!

    Mostra di più Mostra meno
    4 min
  • #166 PTGP: A New Gaussian Process Library, with Bill Engels & Jesse Grabowski
    Oct 1 2026

    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 PTGP and why did Bill and Jesse build it?
    A: PTGP is a new Gaussian process library built on PyTensor and PyMC, aimed squarely at practitioners rather than researchers assembling their own GP methods from papers. Bill Engels, who wrote PyMC's original GP submodule during a Google Summer of Code, built it because most GP libraries implement one method well but give little guidance on when to use it or how to fix it when it breaks. PTGP is opinionated by design: it picks battle-tested algorithms, tells you which one fits your data size, and ships the debugging knowledge alongside the code.

    Q: Why are Gaussian processes described as sitting at the intersection of statistics and machine learning?
    A: A Gaussian process starts from a simple idea: things that are close in the input space should be close in the output space, and the kernel function defines exactly what "close" means for your problem. That makes GPs look like machine learning (let the data speak through a flexible function) while staying fully interpretable once you've chosen a kernel, since observing data collapses the process into an ordinary multivariate normal.

    Full takeaways here!

    Chapters:

    05:51 Where do Gaussian processes actually get used in practice?
    09:07 What do a kernel's length scale and amplitude actually control?
    11:58 What is HSGP and how does it combine with hierarchical models?14:51 Where does PTGP fit in a modern data science workflow?
    21:01 Are Gaussian processes interpretable, or are they a black box?27:49 Why aren't Gaussian processes used everywhere already?
    32:44 What does a kernel function actually tell you about your data?46:33 What is PyTensor and what does it give you over other backends?50:54 How do you build a Gaussian process model in PyTensor?
    52:09 Why is fitting a Gaussian process so computationally expensive?56:00 How does PyTensor's rewrite system speed up GP math for you?59:54 How did an eight-line rewrite replace a matrix inverse in PTGP?01:01:10 Which backends can PyTensor compile your Gaussian process to?
    01:11:27 What are inducing points and when should you use them?01:22:09 What goes wrong when you fit a VFE approximation, and how do you fix it?
    01:23:18 How do you use an AI agent inside a Jupyter notebook?01:36:06 What are PTGP's skill files and which failures do they catch?01:42:20 How do you balance learning something against shipping it with an LLM?
    01:44:28 How do you tell a useful LLM answer from a convincing wrong one?
    01:48:37 Why does a good-looking AI output create an illusion of learning?

    Thank you to my Patrons for making this episode possible!

    Full links from the show here!

    Mostra di più Mostra meno
    1 ora e 58 min
  • How AI Can Evaluate Bayesian Workflows with Bayesify
    Sep 28 2026

    Today's clip is from Episode 165, featuring Alex Fengler. In this conversation, Alex introduces Bayesify , a tool that uses AI to analyze research papers and assess how well they follow a Bayesian workflow.

    He explains how the tool breaks an analysis down step by step, identifies strengths and weaknesses, and provides suggestions for improving the paper. They also discuss how BasiFi can be used as an educational resource, a review engine for researchers, and potentially as a way to study how the quality of Bayesian analyses has changed over time.

    Alex also explains why the team is building a human-rated "gold set" of papers to evaluate how well the tool's scoring aligns with expert judgment. It's an interesting example of how AI can be used not just to generate research, but to help verify and evaluate statistical workflows.

    Full discussion here

    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!

    Mostra di più Mostra meno
    5 min
  • #165 Hierarchical Sequential Sampling Modeling, with Alex Fengler
    Sep 18 2026

    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 HSSM and how does it relate to HDDM?
    A: HSSM stands for hierarchical sequential sampling models, a generalization of HDDM (hierarchical drift diffusion models), the older toolbox for the same class of decision-making models, but HSSM is built from the ground up on simulation-based inference. That's what lets it handle any variation of the underlying process model, not just the ones with a tractable closed-form likelihood.

    Q: What is the drift diffusion model and why has cognitive science relied on it so heavily?
    A: The drift diffusion model treats a decision as a random walk that accumulates evidence until it crosses one of two boundaries, with parameters controlling boundary separation, starting bias, and drift rate. It's been used in thousands of published papers largely because it has a closed-form likelihood, which makes standard Bayesian and maximum-likelihood inference fast. Small variations on the model are often just as scientifically motivated, but if their likelihoods aren't analytically convenient, the literature using them stays sparse.

    Q: What is a likelihood approximation network (LAN) and what does it actually learn?
    A: A LAN is a neural network trained to take in a process's parameters and a trial's outcome and output how likely that outcome was, learned purely from repeated simulation rather than derived analytically. Once trained, it functions as a fast, reusable likelihood you plug directly into Bayes' rule, in place of a closed-form solution that may not exist for the model you actually want to fit.

    Q: What's the difference between amortizing the likelihood and amortizing the posterior?
    A: Amortizing the likelihood, HSSM's approach, means training a network once to approximate the likelihood, then reusing that same network across arbitrarily many downstream models: different priors, hierarchical structures, or regression backends, with no retraining. Amortizing the posterior directly, the approach tools like BayesFlow take, gives near-instant inference once trained, but locks the network into the specific scenario it was trained for.

    Chapters:
    00:00:00 What is HSSM and how does it fit into the Bayesian inference landscape?
    00:12:09 How did HSSM evolve from HDDM, and what does it apply to?
    00:30:25 How do neural networks learn likelihoods for Bayesian inference?
    00:37:01 What makes amortized Bayesian inference so flexible?
    00:41:04 What are the real computational costs of amortized inference?
    00:55:16 How does HSSM integrate with libraries like BayesFlow?
    00:58:57 What does a live demo of HSSM and BayesFlow look like?
    01:18:33 What is Bayesify and how does it score a paper's Bayesian workflow?
    01:23:12 What new model classes are coming to the HSSM ecosystem?
    01:30:12 How is AI reshaping development in the HSSM ecosystem?
    01:38:42 How should society incentivize keeping hard cognitive skills alive?

    Thank you to my Patrons for making this episode possible!

    Links from the show.

    Mostra di più Mostra meno
    1 ora e 48 min
  • Bayesian Principal Stratification: Modeling Treatment Effects
    Sep 11 2026

    Today's clip is from Episode 164, featuring Andrew Gelman, Aki Vehtari & Richard McElreath. In this conversation, Andrew explains how Bayesian principal stratification can be used to reason about treatment effects when there is an intermediate treatment or outcome that is only partially observed.

    He discusses how latent variables can represent whether someone would take a stage-two treatment, and how pre-treatment characteristics such as age, location, and past spending can help build a model for this process.

    Richard connects the problem to the broader distinction between per-protocol and intent-to-treat analyses, and they discuss how standard approaches such as instrumental variables can be understood as special cases of more general Bayesian models. It's a useful example of how Bayesian modeling can represent the full process behind a causal question rather than relying on simplifying assumptions.

    Full discussion here

    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!

    Mostra di più Mostra meno
    5 min
  • Why a Bayesian Workflow Goes Beyond Fitting Models
    Sep 2 2026

    Today's clip is from Episode 164, featuring Andrew Gelman, Aki Vehtari & Richard McElreath. In this conversation, Andrew explains why a Bayesian workflow goes far beyond simply fitting a model.

    He discusses the importance of building, fitting, and checking models, and why moving between simpler and more complicated models can reveal insights that a single model might miss.

    He also explores how simulation and generative modeling can help researchers evaluate new models and gain confidence in their results, even when there isn't an established method or published study to rely on. It's a look at why good statistical practice isn't just about getting an answer, but knowing how much you can trust it.

    Full discussion here

    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!

    Mostra di più Mostra meno
    4 min
  • #164 Bayesian Workflow, with Andrew Gelman, Aki Vehtari & Richard McElreath
    Aug 31 2026

    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 the "Bayesian Workflow" book about, and who is it for?

    A: It covers what the three authors know that isn't already in Bayesian Data Analysis (BDA3) or Statistical Rethinking, organized around case studies that walk through full analyses end to end rather than just giving a recommendation. It's not an introduction to Bayesian inference -- it assumes you already know the basics -- but a guide to making theoretically informed, professional decisions at the many branching points a real analysis involves that source books rarely acknowledge.

    Q: What's a concrete way to report Bayesian results without just handing over a posterior distribution?

    A: Report a few named scenarios from the distribution, such as pessimistic, median, and optimistic. This is easier to discuss than a full posterior and helps shift the conversation toward what would move outcomes from the median toward the optimistic case.

    Full takeaways


    Chapters:
    00:18:22 What is the elevator pitch for the Bayesian Workflow book?
    00:20:12 Where does workflow sit between statistical theory and case studies?
    00:27:21 Why express your scientific background in a generative model?
    00:36:43 How is a Bayesian workflow different from a pipeline?
    00:39:03 What is reverse Bayes, and how does it help with prior sensitivity?
    00:43:53 How do Bayesians reinterpret non-Bayesian methods?
    00:45:02 How is the Bayesian Workflow book structured?
    00:48:49 How do you model bat mortality at wind farms from zero-inflated carcass counts?
    00:52:24 When does a hierarchical model stop being an innocuous assumption?
    00:58:17 Can multilevel regression and poststratification pool detection across sites?
    00:59:32 Why start with a big generative simulation before the statistical model?
    01:02:05 What is the "secret weapon" of comparing shrinkage to fixed-effects estimates?
    01:11:02 How do you detect which assumptions are actually driving your inference?
    01:15:24 How do you get regulated industries to accept a posterior instead of a score?
    01:22:04 Should statisticians soften uncertainty for decision makers?
    01:23:11 Why report three scenarios instead of a single number?
    01:27:51 How do you handle a leaky instrument in causal inference?
    01:29:16 What is a principal stratification model?
    01:34:47 What are the three authors working on next?

    Thank you to my Patrons for making this episode possible!

    Full show notes

    Mostra di più Mostra meno
    1 ora e 44 min