用梯度信息做早期停止,不需预留验证集。
GRADSTOP: Early Stopping of Gradient Descent via Posterior Sampling
- 从梯度中估计贝叶斯后验,构建停止准则。
- 测试损失接近验证集方法,且节省训练数据。
- 适合数据少的场景,如迁移学习,兼容主流优化器。
机器学习模型通常通过梯度下降最小化训练数据上的损失函数来训练,但容易过拟合,导致在未见数据上性能下降。传统解决方案是使用预留的验证集进行早期停止,但会减少可用于训练的数据量。本文提出GRADSTOP,一种基于梯度信息的新型随机早期停止方法,仅利用梯度下降过程中自然产生的梯度信息。核心贡献包括:利用梯度信息估计贝叶斯后验;将早期停止问题建模为从该后验中采样;并据此构建停止准则。实验表明,GRADSTOP在测试数据上获得接近基于验证集方法的低损失,且能充分利用全部数据训练,在数据受限场景(如迁移学习)中尤为有利。该方法可作为可选功能集成到主流梯度下降库中,计算开销极小。代码已开源。
原文摘要 · Abstract (English)
Machine learning models are often learned by minimising a loss function on the training data using a gradient descent algorithm. These models often suffer from overfitting, leading to a decline in predictive performance on unseen data. A standard solution is early stopping using a hold-out validation set, which halts the minimisation when the validation loss stops decreasing. However, this hold-out set reduces the data available for training. This paper presents GRADSTOP, a novel stochastic early stopping method that only uses information in the gradients, which are produced by the gradient descent algorithm ``for free.'' Our main contributions are that we estimate the Bayesian posterior by the gradient information, define the early stopping problem as drawing sample from this posterior, and use the approximated posterior to obtain a stopping criterion. Our empirical evaluation shows that GRADSTOP achieves a small loss on test data and compares favourably to a validation-set-based stopping criterion. By leveraging the entire dataset for training, our method is particularly advantageous in data-limited settings, such as transfer learning. It can be incorporated as an optional feature in gradient descent libraries with only a small computational overhead. The source code is available at https://github.com/edahelsinki/gradstop.
Thank you to arXiv for use of its open access interoperability. PaperDance 不是 arXiv 官方产品;中文卡片由大模型生成,请以原文为准。