arXivDaily arXiv每日学术速递 周一至周五更新
arXiv 2312.01658cs.LGcs.DCmath.OC
收藏

AGD:一种利用逐步梯度差构造预处理矩阵的可自动切换优化器

AGD: an Auto-switchable Optimizer using Stepwise Gradient Difference for Preconditioning Matrix

Ant Group(蚂蚁集团)

Yun Yue, Zhiling Ye, Jiadi Jiang, Yongchao Liu, Ke Zhang

AI总结:

本研究提出利用逐步梯度差构造预处理矩阵的AGD优化器,搭配自动切换功能可在SGD与自适应模式间动态切换,在NLP、CV、RecSys任务上性能优于现有SOTA优化器。

摘要:

自适应优化器(如Adam)已在深度学习领域取得显著成效,这类优化器的核心组件是所谓的预处理矩阵,它可提供增强的梯度信息,并调节每个梯度方向的步长。本文提出一种设计预处理矩阵的新方法,将连续两步之间的梯度差用作对角元素。这些对角元素与Hessian矩阵密切相关,可被视为Hessian行向量与相邻参数向量差值的内积的近似。此外,我们引入了一种自动切换函数,使预处理矩阵能够在随机梯度下降(Stochastic Gradient Descent,SGD)与自适应优化器之间动态切换。基于这两项技术,我们开发了名为AGD的新型优化器,可提升泛化性能。我们在自然语言处理(Natural Language Processing,NLP)、计算机视觉(Computer Vision,CV)和推荐系统(Recommendation Systems,RecSys)的公开数据集上评估了AGD。实验结果表明,AGD的表现优于当前最优(state-of-the-art,SOTA)优化器,取得了极具竞争力甚至显著更优的预测性能。此外,我们还分析了AGD如何在SGD与自适应优化器之间自动切换,以及其在不同场景下的实际效果。代码可在https://github.com/intelligent-machine-learning/atorch/tree/main/atorch/optimizers 获取。

英文摘要:

Adaptive optimizers, such as Adam, have achieved remarkable success in deep learning. A key component of these optimizers is the so-called preconditioning matrix, providing enhanced gradient information and regulating the step size of each gradient direction. In this paper, we propose a novel approach to designing the preconditioning matrix by utilizing the gradient difference between two successive steps as the diagonal elements. These diagonal elements are closely related to the Hessian and can be perceived as an approximation of the inner product between the Hessian row vectors and difference of the adjacent parameter vectors. Additionally, we introduce an auto-switching function that enables the preconditioning matrix to switch dynamically between Stochastic Gradient Descent (SGD) and the adaptive optimizer. Based on these two techniques, we develop a new optimizer named AGD that enhances the generalization performance. We evaluate AGD on public datasets of Natural Language Processing (NLP), Computer Vision (CV), and Recommendation Systems (RecSys). Our experimental results demonstrate that AGD outperforms the state-of-the-art (SOTA) optimizers, achieving highly competitive or significantly better predictive performance. Furthermore, we analyze how AGD is able to switch automatically between SGD and the adaptive optimizer and its actual effects on various scenarios. The code is available at https://github.com/intelligent-machine-learning/atorch/tree/main/atorch/optimizers.

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

↑