AI自动优化贝叶斯模型,无需人工干预即可提升精度与可解释性。
AutoStan: Autonomous Bayesian Model Improvement via Predictive Feedback
- 通过预测反馈循环自动编写和改进Stan代码
- 在含异常值数据上达到或超越黑箱方法性能
- 适合需要可解释性建模的研究者使用
我们提出AutoStan,一个在命令行界面中自主构建并迭代改进用Stan编写的贝叶斯模型的框架。该代理以循环方式工作:编写Stan模型文件,执行MCMC采样,然后根据两个互补反馈信号决定是否保留或回滚每项修改——即在保留数据上的负对数预测密度(NLPD)以及采样器自身的诊断指标(发散、R-hat、有效样本量)。我们在五个具有不同建模结构的数据集上评估了AutoStan。在一个含异常值的合成回归数据集上,代理从简单的线性回归逐步演进为具有Student-t鲁棒性、非线性异方差结构和显式污染混合的模型,在性能上匹配或超越当前最优的黑箱方法TabPFN,同时保持完全可解释性。在其余四个实验中,同一机制发现了分层部分池化、具有相关随机效应的变斜率模型,以及用于足球攻防的泊松模型。整个过程无需搜索算法、批判模块或领域特定指令。据我们所知,这是首个展示命令行编码代理能够自主编写并迭代改进多样贝叶斯建模问题的实例。
原文摘要 · Abstract (English)
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 experiments, the same mechanism discovers hierarchical partial pooling, varying-slope models with correlated random effects, and a Poisson attack/defense model for soccer. No search algorithm, critic module, or domain-specific instructions are needed. This is, to our knowledge, the first demonstration that a CLI coding agent can autonomously write and iteratively improve Stan code for diverse Bayesian modeling problems.
Thank you to arXiv for use of its open access interoperability. PaperDance 不是 arXiv 官方产品;中文卡片由大模型生成,请以原文为准。