arXivDaily arXiv每日学术速递 周一至周五更新
arXiv 2311.14468cs.LG
收藏

用于随机梯度优化的在线重要性采样

Online Importance Sampling for Stochastic Gradient Optimization

Max Planck Institute for Informatics(马克斯·普朗克信息学研究所);Saarland University(萨尔大学);Adobe Research(奥多比研究院);University College London(伦敦大学学院)

Corentin Salaün, Xingchang Huang, Iliyan Georgiev, Niloy J. Mitra, Gurprit Singh

AI总结:

提出一种在线重要性采样算法,通过基于损失导数的新指标在训练时即时计算数据重要性,提升梯度估计精度并支持在线数据剪枝,显著减少训练时间且几乎不损失准确性。

摘要:

机器学习优化通常依赖于随机梯度下降(SGD),其中梯度估计的精度对模型性能至关重要。梯度是通过从训练数据集中均匀选取数据样本形成的小批量来计算的。然而,并非所有数据样本对梯度估计的贡献都相同。为了解决这个问题,已经开发了各种重要性采样策略来优先处理更重要的样本。尽管取得了这些进展,当前所有的重要性采样方法都遇到了与计算效率和无缝集成到实际机器学习流程中相关的挑战。在这项工作中,我们提出了一种实用的算法,能够在训练过程中即时高效地计算数据重要性,从而无需进行数据集预处理。我们还引入了一种基于损失函数关于网络输出导数的新颖指标,专为小批量重要性采样而设计。我们的指标优先考虑具有影响力的数据点,从而提高了梯度估计的准确性。我们展示了我们的方法在各种应用中的有效性。我们首先执行分类和回归任务,以证明准确性的提升。然后,我们展示了我们的方法如何通过识别并丢弃对训练损失贡献最小的数据样本,同样适用于在线数据剪枝。这显著减少了训练时间,同时模型准确性的损失可以忽略不计。

英文摘要:

Machine learning optimization often depends on stochastic gradient descent, where the precision of gradient estimation is vital for model performance. Gradients are calculated from mini-batches formed by uniformly selecting data samples from the training dataset. However, not all data samples contribute equally to gradient estimation. To address this, various importance sampling strategies have been developed to prioritize more significant samples. Despite these advancements, all current importance sampling methods encounter challenges related to computational efficiency and seamless integration into practical machine learning pipelines. In this work, we propose a practical algorithm that efficiently computes data importance on-the-fly during training, eliminating the need for dataset preprocessing. We also introduce a novel metric based on the derivative of the loss w.r.t. the network output, designed for mini-batch importance sampling. Our metric prioritizes influential data points, thereby enhancing gradient estimation accuracy. We demonstrate the effectiveness of our approach across various applications. We first perform classification and regression tasks to demonstrate improvements in accuracy. Then, we show how our approach can also be used for online data pruning by identifying and discarding data samples that contribute minimally towards the training loss. This significantly reduce training time with negligible loss in the accuracy of the model.

机构、总结、中文摘要均由AI分析而来,可能存在错误,请以论文正文为准。

↑