[论文解读] Going NUTS with ADVI: Exploring various Bayesian Inference techniques with Facebook Prophet
该论文在 PyMC 中重新实现 Facebook Prophet,以比较单变量时间序列预测任务上的全量 MCMC、MAP 和变分推理方法,发现 NUTS 通常最可靠地收敛;而 VI 提供速度优势,但可能高估或低估不确定性。
Since its introduction, Facebook Prophet has attracted positive attention from both classical statisticians and the Bayesian statistics community. The model provides two built-in inference methods: maximum a posteriori estimation using the L-BFGS-B algorithm, and Markov Chain Monte Carlo (MCMC) sampling via the No-U-Turn Sampler (NUTS). While exploring various time-series forecasting problems using Bayesian inference with Prophet, we encountered limitations stemming from the inability to apply alternative inference techniques beyond those provided by default. Additionally, the fluent API design of Facebook Prophet proved insufficiently flexible for implementing our custom modeling ideas. To address these shortcomings, we developed a complete reimplementation of the Prophet model in PyMC, which enables us to extend the base model and evaluate and compare multiple Bayesian inference methods. In this paper, we present our PyMC-based implementation and analyze in detail the implementation of different Bayesian inference techniques. We consider full MCMC techniques, MAP estimation and Variational inference techniques on a time-series forecasting problem. We discuss in details the sampling approach, convergence diagnostics, forecasting metrics as well as their computational efficiency and detect possible issues which will be addressed in our future work.
研究动机与目标
- 推动超越 Prophet 内置推断方法的灵活贝叶斯实验。
- 在 PyMC 中重新实现 Facebook Prophet,以实现模块化组件和替代推理技术。
- 系统性比较时间序列预测任务中的全量 MCMC(MH、NUTS、DMZ)、MAP 和变分推理(ADVI、FR-ADVI)。
- 评估不同方法的收敛诊断、预测指标和计算效率。
提出的方法
- 在 PyMC 中重新实现 Facebook Prophet,提供趋势、季节性和假日组件的模块化 API。
- 评估三类贝叶斯推理方法:全量 MCMC(MH、NUTS、DMZ)、MAP(L-BFGS-B)以及变分推理(ADVI 与 FR-ADVI)。
- 分析使用单变量时间序列(维基百科 Peyton Manning 页面浏览量)并采用默认 Prophet 设置(分段线性趋势、25 个更改点、年度与周季节性)。
- 收敛与诊断指标:MCMC 的 R-hat、ESS、自相关;VI 的负 ELBO 收敛;预测指标(MSE、RMSE、MAE、MAPE)。
- 比较不同方法在采样与收敛方面的性能,包括计算时间和有效样本量。

实验结果
研究问题
- RQ1在 Prophet 风格模型中,完整 MCMC、MAP 与 VI 推断方法在精度和不确定性表达方面的比较如何?
- RQ2在本设置中,哪种贝叶斯推理技术在预测质量与计算效率之间提供最佳折中?
- RQ3在将 Prophet 的可分解时间序列模型应用于每种方法时,其收敛诊断与实际限制是什么?
- RQ4变分推理(ADVI/FR-ADVI)是否能够可靠近似 Prophet 组件的后验分布,以及它对不确定性量化有何影响?
主要发现
- NUTS 可对所有参数收敛,R-hat 约为 1.0004–1.0010,ESS 高(如 k 为 3050.72,m 为 3267.21)。
- MH 与 DMZ 未能收敛(多参数 R-hat > 1.01;大多数参数的 ESS < 400),即使样本量很大。
- ADVI 在某些情况下在 VI 方法中提供最佳预测指标,但 FR-ADVI 相较于 NUTS 可能高估或低估后验不确定性。
- MAP 提供高质量的预测,执行快速,本质上等同于正则化的极大似然估计;其不确定性表达能力相较于全量 MCMC 有所限制。
- VI 方法在预测指标上可与全量 MCMC 相当,同时显著降低计算时间;但 FullRank ADVI 可能高估不确定性,ADVI 可能低估不确定性。
- 概览性结果显示 NUTS 在 550 次采样和 193.77 秒内达到收敛,而 MH/DMZ 需要数百万次采样且仍未收敛;NUTS 至少在总样本中提供 17% 的有效样本。
- 变分方法在约 80,000 次迭代内收敛,运行时间约 18–23 秒,视具体方法而定,而 MCMC 方法的运行时间从数千到数万秒不等,视方法而定。
- MAP、ADVI 与 NUTS 各有不同的优势;作者建议在当前设置下 NUTS 可能是此问题的最佳综合选择。
- 未来工作包括将 MCMC 的 GPU 加速(如 JAX、NumPyro)以及进一步研究 ADVI 与 FR-ADVI 的后验不确定性行为。

更好的研究,从现在开始
从论文设计到论文写作,大幅缩短您的研究时间。
无需绑定信用卡
本解读由 AI 生成,并经人工编辑审核。