[论文解读] Laplace Redux -- Effortless Bayesian Deep Learning
该论文对贝叶斯深度学习的 Laplace 近似变体进行综述,介绍 laplace PyTorch 库,并展示相较于流行的贝叶斯方法具有竞争力且成本效益高的性能,包括对预训练模型的事后适用性。
Bayesian formulations of deep learning have been shown to have compelling theoretical properties and offer practical functional benefits, such as improved predictive uncertainty quantification and model selection. The Laplace approximation (LA) is a classic, and arguably the simplest family of approximations for the intractable posteriors of deep neural networks. Yet, despite its simplicity, the LA is not as popular as alternatives like variational Bayes or deep ensembles. This may be due to assumptions that the LA is expensive due to the involved Hessian computation, that it is difficult to implement, or that it yields inferior results. In this work we show that these are misconceptions: we (i) review the range of variants of the LA including versions with minimal cost overhead; (ii) introduce "laplace", an easy-to-use software library for PyTorch offering user-friendly access to all major flavors of the LA; and (iii) demonstrate through extensive experiments that the LA is competitive with more popular alternatives in terms of performance, while excelling in terms of computational cost. We hope that this work will serve as a catalyst to a wider adoption of the LA in practical deep learning, including in domains where Bayesian approaches are not typically considered at the moment.
研究动机与目标
- 在深度学习中推动贝叶斯神经网络及不确定性量化。
- 综述可扩展的 Laplace 近似变体及其在现代网络中的适用性。
- 介绍一个易于使用的 PyTorch 库(laplace),实现主要的 LA 变体。
- 展示 LA 相较于其他方法在经验上的竞争力与计算效率。
- 展示实际应用案例,包括对预训练模型的事后应用以及持续学习。
提出的方法
- 通过在 MAP 周围进行二阶展开,将拉普拉斯后验 p(θ|D) ≈ N(θMAP, Σ)。
- 评述四个促进 LA 可扩展性的要素(权重选择、Hessian 近似、超参数调优、预测分布)。
- 讨论 Hessian 分解方法(完全、对角、Kronecker-因子、低秩)及它们与 Fisher/GGN 的联系。
- 描述基于边际似然的在线与事后超参数调优,用于经验贝叶斯。
- 概述预测推断策略,包括蒙特卡洛、Probit 近似、扩展 Probit 与 Laplace 桥。
- 介绍 laplace 作为一个模块化工具包,将 Hessian 计算委托给 BackPACK/ASDL 后端,并支持多种 LA 变体。
实验结果
研究问题
- RQ1在标准基准上,不同的 Laplace 近似变体在预测性能和校准方面有何比较?
- RQ2Laplace 近似是否能够以可接受的计算成本扩展到现代深度网络架构?
- RQ3在分布偏移和分布外情境下,LA 是否提供鲁棒的不确定性量化?
- RQ4对预训练网络的事后应用是否是全贝叶斯训练的可行、成本高效的替代方案?
- RQ5在基于 LA 的贝叶斯深度学习中,超参数调优(如先验方差、边际似然的暴露)有哪些实际指南?
主要发现
- Laplace 近似在与强基线贝叶斯方法的对比中具有竞争力,同时提供更高的计算效率。
- 对预训练网络,使用带有 KFAC/GGN 的事后最后一层 LA 在性能与成本之间取得有利平衡。
- 基于经验Fisher的 Hessian 趋势有助于 OOD 检测,而 GGN 有助于分布内指标。
- 通过边际似然的基于 ML 的超参数调优可以在线进行或事后进行,从而实现经验贝叶斯。
- 与集成、HMC 或 SWAG 相比,基于 LA 的方法显著降低训练和预测时间,同时保持良好的校准。
- 该方法扩展到包括 transformers 在内的多样化架构,并且作为强基线支持持续学习。
阅读本论文
在 Nubint 阅读器中打开原文,边读边就任意段落提问。
在 Nubint 中阅读本论文本解读由 AI 根据论文原文生成,引用前请核对原文。