AutoStan: Autonomous Bayesian Model Improvement via Predictive Feedback
Oliver D\"urr

TL;DR
AutoStan is an autonomous CLI agent that iteratively improves Bayesian models in Stan using predictive feedback, achieving state-of-the-art results across diverse datasets without domain-specific guidance.
Contribution
This work introduces AutoStan, the first autonomous CLI agent capable of writing and improving Stan models for various Bayesian problems without external search algorithms or domain-specific instructions.
Findings
AutoStan outperforms a black-box method on synthetic data with outliers.
It discovers complex Bayesian structures like hierarchical models and Poisson models.
The framework operates effectively across multiple diverse datasets.
Abstract
We present AutoStan, a framework in which a command-line interface (CLI) coding agent autonomously builds and iteratively improves Bayesian models written in Stan. The agent operates in a loop, writing a Stan model file, executing MCMC sampling, then deciding whether to keep or revert each change based on two complementary feedback signals: the negative log predictive density (NLPD) on held-out data and the sampler's own diagnostics (divergences, R-hat, effective sample size). We evaluate AutoStan on five datasets with diverse modeling structures. On a synthetic regression dataset with outliers, the agent progresses from naive linear regression to a model with Student-t robustness, nonlinear heteroscedastic structure, and an explicit contamination mixture, matching or outperforming TabPFN, a state-of-the-art black-box method, while remaining fully interpretable. Across four additional…
Peer Reviews
No public reviews on file for this paper yet. If you reviewed it on a platform where reviews are public (OpenReview, ICLR, NeurIPS, ICML), you can paste yours below so the community can read it here.
Videos
No videos yet. Explain this paper in a talk, walkthrough, or lecture? Add one.
