arXivDaily arXiv每日学术速递 周一至周五更新
arXiv 2006.00719cs.LGcs.NAmath.NAstat.ML
收藏

ADAHESSIAN:一个用于机器学习的自适应二阶优化器

ADAHESSIAN: An Adaptive Second Order Optimizer for Machine Learning

University of California, Berkeley(加州大学伯克利分校);NERSC, Lawrence Berkeley National Laboratory(劳伦斯伯克利国家实验室)

Zhewei Yao, Amir Gholami, Sheng Shen, Mustafa Mustafa, Kurt Keutzer, Michael W. Mahoney

摘要:

我们介绍ADAHESSIAN,二阶随机优化算法,动态地将曲率的损失函数通过自适应估计的HESSIAN。二阶算法是最强大的优化算法之一,与一阶方法(如SGD和Adam)相比,具有优越的收敛性能。传统的二阶方法的主要缺点是每次迭代计算量大,与一阶方法相比精度差。为了解决这些问题,我们在ADAHESSIAN中采用了几种新方法,包括:(i)基于Hutchinson的快速方法,以低计算开销近似曲率矩阵;(ii)均方根指数移动平均,以平滑不同迭代中Hessian对角的变化;以及(iii)块对角平均,以减少Hessian对角元素的方差。我们表明,ADAHESSIAN实现了新的国家的最先进的结果相比,其他自适应优化方法,包括亚当的变种。特别是,我们对CV,NLP和推荐系统任务进行了广泛的测试,发现ADAHESSIAN:(i)与Adam相比,在Cifar 10上的ResNets 20/32上的准确率高出1.80%/1.45%,在ImageNet上的准确率高出5.55%;(ii)在IWSLT 14/WMT 14上的BLEU得分为0.13/0.33,在PTB/Wikitext-103上的PPL得分为2.7/1.0,优于Transformers器的AdamW;(iii)在GLUE上的得分为0.41,优于SqueezeBert的AdamW;和(iv)在Criteo Ad Kaggle数据集上,DLRM的得分比Adagrad高0.032%。重要的是,我们证明了ADAHESSIAN的每次迭代的成本与一阶方法相当,并且它对超参数具有鲁棒性。

英文摘要:

We introduce ADAHESSIAN, a second order stochastic optimization algorithm which dynamically incorporates the curvature of the loss function via ADAptive estimates of the HESSIAN. Second order algorithms are among the most powerful optimization algorithms with superior convergence properties as compared to first order methods such as SGD and Adam. The main disadvantage of traditional second order methods is their heavier per iteration computation and poor accuracy as compared to first order methods. To address these, we incorporate several novel approaches in ADAHESSIAN, including: (i) a fast Hutchinson based method to approximate the curvature matrix with low computational overhead; (ii) a root-mean-square exponential moving average to smooth out variations of the Hessian diagonal across different iterations; and (iii) a block diagonal averaging to reduce the variance of Hessian diagonal elements. We show that ADAHESSIAN achieves new state-of-the-art results by a large margin as compared to other adaptive optimization methods, including variants of Adam. In particular, we perform extensive tests on CV, NLP, and recommendation system tasks and find that ADAHESSIAN: (i) achieves 1.80%/1.45% higher accuracy on ResNets20/32 on Cifar10, and 5.55% higher accuracy on ImageNet as compared to Adam; (ii) outperforms AdamW for transformers by 0.13/0.33 BLEU score on IWSLT14/WMT14 and 2.7/1.0 PPL on PTB/Wikitext-103; (iii) outperforms AdamW for SqueezeBert by 0.41 points on GLUE; and (iv) achieves 0.032% better score than Adagrad for DLRM on the Criteo Ad Kaggle dataset. Importantly, we show that the cost per iteration of ADAHESSIAN is comparable to first order methods, and that it exhibits robustness towards its hyperparameters.

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

↑