[论文解读] Is SGD a Bayesian sampler? Well, almost
本文研究了在过参数化的深度神经网络中,随机梯度下降(SGD)是否表现出贝叶斯采样的行为。通过使用高斯过程估计贝叶斯后验,研究发现:给定训练数据 $S$ 时,SGD 收敛到函数 $f$ 的概率与贝叶斯后验 $P_{\textrm{B}}(f|S)$ 密切相关,表明泛化的主要归纳偏置源于未训练网络的参数-函数映射,而非 SGD 本身。
Overparameterised deep neural networks (DNNs) are highly expressive and so can, in principle, generate almost any function that fits a training dataset with zero error. The vast majority of these functions will perform poorly on unseen data, and yet in practice DNNs often generalise remarkably well. This success suggests that a trained DNN must have a strong inductive bias towards functions with low generalisation error. Here we empirically investigate this inductive bias by calculating, for a range of architectures and datasets, the probability $P_{SGD}(f\mid S)$ that an overparameterised DNN, trained with stochastic gradient descent (SGD) or one of its variants, converges on a function $f$ consistent with a training set $S$. We also use Gaussian processes to estimate the Bayesian posterior probability $P_B(f\mid S)$ that the DNN expresses $f$ upon random sampling of its parameters, conditioned on $S$. Our main findings are that $P_{SGD}(f\mid S)$ correlates remarkably well with $P_B(f\mid S)$ and that $P_B(f\mid S)$ is strongly biased towards low-error and low complexity functions. These results imply that strong inductive bias in the parameter-function map (which determines $P_B(f\mid S)$), rather than a special property of SGD, is the primary explanation for why DNNs generalise so well in the overparameterised regime. While our results suggest that the Bayesian posterior $P_B(f\mid S)$ is the first order determinant of $P_{SGD}(f\mid S)$, there remain second order differences that are sensitive to hyperparameter tuning. A function probability picture, based on $P_{SGD}(f\mid S)$ and/or $P_B(f\mid S)$, can shed new light on the way that variations in architecture or hyperparameter settings such as batch size, learning rate, and optimiser choice, affect DNN performance.
研究动机与目标
- 通过将函数选择概率与贝叶斯后验进行比较,研究在过参数化的深度神经网络(DNN)中,SGD 是否表现出贝叶斯采样的行为。
- 确定 DNN 中实现泛化的归纳偏置是源于 SGD 的优化动力学,还是源于未训练网络的参数-函数映射。
- 量化超参数调优和优化器选择对 SGD 函数选择概率与贝叶斯后验之间二阶偏差的影响程度。
- 基于 $P_{\textrm{SGD}}(f|S)$ 和 $P_{\textrm{B}}(f|S)$ 构建函数概率框架,用于分析架构和超参数选择对 DNN 泛化能力的影响。
- 评估该函数概率视角对不确定性量化和模型设计的影响,特别是与深度集成(Deep Ensembles)的关系。
提出的方法
- 通过在各种 DNN 架构和数据集上,经验估计 $P_{\textrm{SGD}}(f|S)$,即 SGD 收敛到与训练集 $S$ 一致的函数 $f$ 的概率。
- 使用高斯过程对贝叶斯后验 $P_{\textrm{B}}(f|S)$ 进行非参数估计,表示在给定 $S$ 的条件下,从随机采样的未训练 DNN 中表达函数 $f$ 的概率。
- 在对数尺度上比较 $P_{\textrm{SGD}}(f|S)$ 与 $P_{\textrm{B}}(f|S)$,以评估其相关性并识别偏差。
- 通过评估未训练 DNN 中的先验偏置,特别是对低复杂度、低误差函数的指数级偏置,分析参数-函数映射的作用。
- 系统性地改变学习率、批量大小和优化器选择等超参数,以测量其对 $P_{\textrm{SGD}}(f|S)$ 与 $P_{\textrm{B}}(f|S)$ 之间二阶差异的影响。
- 利用函数概率视角解释并比较不同架构和训练配置下的模型性能。
实验结果
研究问题
- RQ1在过参数化的 DNN 中,SGD 的函数选择概率 $P_{\textrm{SGD}}(f|S)$ 与贝叶斯后验 $P_{\textrm{B}}(f|S)$ 的相关性在多大程度上成立?
- RQ2DNN 中泛化的归纳偏置主要源于 SGD 的优化动力学,还是源于未训练网络的固有参数-函数映射?
- RQ3学习率、批量大小和优化器类型等超参数的选择,如何影响 $P_{\textrm{SGD}}(f|S)$ 与 $P_{\textrm{B}}(f|S)$ 之间的二阶偏差?
- RQ4基于 $P_{\textrm{SGD}}(f|S)$ 和 $P_{\textrm{B}}(f|S)$ 的函数概率框架,是否能提供比平均测试误差更细致的 DNN 泛化理解?
- RQ5SGD 与贝叶斯采样之间观察到的对应关系,是否为在 DNN 中使用深度集成进行不确定性量化提供了理论依据?
主要发现
- SGD 收敛到与训练数据 $S$ 一致的函数 $f$ 的概率 $P_{\textrm{SGD}}(f|S)$ 与贝叶斯后验 $P_{\textrm{B}}(f|S)$ 密切相关,尤其在对数尺度上表现尤为显著。
- 贝叶斯后验 $P_{\textrm{B}}(f|S)$ 显著偏向于低泛化误差和低复杂度的函数,表明未训练 DNN 的参数-函数映射是主要的归纳偏置来源。
- SGD 的函数选择概率与贝叶斯后验之间的二阶偏差对超参数调优(如学习率和批量大小)敏感,表明 SGD 引入了细微的、非贝叶斯效应。
- 过参数化 DNN 中泛化的主要原因在于参数-函数映射的归纳偏置,而非 SGD 本身所具有的特殊性质。
- 基于 $P_{\textrm{B}}(f|S)$ 和 $P_{\textrm{SGD}}(f|S)$ 的函数概率视角,为评估超参数和架构选择提供了比平均测试误差更精细的分析工具。
- SGD 与贝叶斯采样之间观察到的紧密对应关系,为使用深度集成来量化 DNN 预测不确定性提供了理论支持。
更好的研究,从现在开始
从阅读论文到最终审阅,大幅缩短您的研究时间。
无需绑定信用卡
本解读由 AI 生成,并经人工编辑审核。