[论文解读] Understanding Generalization and Stochastic Gradient Descent
本文通过将泛化能力与贝叶斯证据联系起来,解释了为何随机梯度下降(SGD)在深度学习中泛化性能良好,贝叶斯证据倾向于选择宽广的极小值而非尖锐的极小值。它确定了一个与学习率和训练集大小乘积成正比的最优小批量大小,表明小批量引入的噪声会驱动优化过程趋向高证据的极小值,该结论已通过实证验证。
We consider two questions at the heart of machine learning; how can we predict if a minimum will generalize to the test set, and why does stochastic gradient descent find minima that generalize well? Our work responds to Zhang et al. (2016), who showed deep neural networks can easily memorize randomly labeled training data, despite generalizing well on real labels of the same inputs. We show that the same phenomenon occurs in small linear models. These observations are explained by the Bayesian evidence, which penalizes sharp minima but is invariant to model parameterization. We also demonstrate that, when one holds the learning rate fixed, there is an optimum batch size which maximizes the test set accuracy. We propose that the introduced by small mini-batches drives the parameters towards minima whose evidence is large. Interpreting stochastic gradient descent as a stochastic differential equation, we identify the noise scale $g = \epsilon (\frac{N}{B} - 1) \approx \epsilon N/B$, where $\epsilon$ is the learning rate, $N$ the training set size and $B$ the batch size. Consequently the optimum batch size is proportional to both the learning rate and the size of the training set, $B_{opt} \propto \epsilon N$. We verify these predictions empirically.
研究动机与目标
- 理解为何随机梯度下降在测试数据上能找到泛化性能良好的极小值。
- 解释神经网络的泛化行为,特别是针对Zhang等人(2016)的研究,他们表明模型能够记忆随机标签。
- 研究小批量大小和学习率在决定泛化性能中的作用。
- 将SGD的动力学与贝叶斯证据联系起来,贝叶斯证据会惩罚任何参数化方式下的尖锐极小值。
- 推导并验证一个理论上最优的小批量大小,以最大化测试准确率。
提出的方法
- 使用贝叶斯证据作为模型泛化能力的度量,该度量倾向于选择宽广极小值,且与模型参数化无关。
- 将SGD建模为随机微分方程,推导出噪声尺度 $ g = \epsilon (\frac{N}{B} - 1) \approx \epsilon N/B $,其中 $ \epsilon $ 为学习率,$ N $ 为训练集大小,$ B $ 为小批量大小。
- 提出小批量引入的噪声会驱动参数趋向于具有高贝叶斯证据的极小值。
- 推导出最优小批量大小为 $ B_{\text{opt}} \propto \epsilon N $,表明其与学习率和训练集大小均呈线性比例关系。
- 通过在真实数据和随机标签数据上的小型线性模型及深度神经网络,实证验证了理论预测。
实验结果
研究问题
- RQ1为何使用SGD训练的模型即使能够记忆随机标签,仍能实现良好的泛化性能?
- RQ2小批量大小的选择如何影响SGD中的泛化性能?
- RQ3由随机性引入的噪声与极小值的贝叶斯证据之间存在何种关系?
- RQ4能否基于学习率和训练集大小,从理论上预测最优小批量大小?
- RQ5在随机标签上的记忆现象是否不仅限于深度网络,也存在于更小的模型中?
主要发现
- 贝叶斯证据会惩罚尖锐极小值,且与模型参数化无关,为泛化提供了理论解释。
- 小型线性模型同样具备记忆随机标签数据的能力,证实记忆现象并非深度网络独有。
- 当学习率固定时,存在一个能最大化测试集准确率的最优小批量大小。
- 最优小批量大小与学习率和训练集大小成正比,即 $ B_{\text{opt}} \propto \epsilon N $。
- 实证结果证实,小批量引入的噪声会驱动优化过程趋向于高证据极小值,从而提升泛化性能。
更好的研究,从现在开始
从论文设计到论文写作,大幅缩短您的研究时间。
无需绑定信用卡
本解读由 AI 生成,并经人工编辑审核。