arXivDaily arXiv每日学术速递 周一至周五更新
arXiv 2403.02681cs.LGmath.OC
收藏

用于深度神经网络优化的带部分 Hessian 的 SGD

SGD with Partial Hessian for Deep Neural Networks Optimization

The Hong Kong Polytechnic University(香港理工大学)

Ying Sun, Hongwei Yong, Lei Zhang

AI总结:

本文提出复合优化器 SGD-PH,对逐通道参数使用可精确提取的对角部分 Hessian,其余参数采用 SGD 更新,从而兼顾二阶优化效率与一阶泛化能力。

摘要:

由于二阶算法在求解经典优化问题方面的有效性,近年来设计用于训练深度神经网络(DNN)的二阶优化器引起了广泛的研究兴趣。然而,由于 DNN 中中间特征的维度非常高,直接计算并存储用于网络优化的 Hessian 矩阵十分困难。以往大多数二阶方法对 Hessian 信息的近似并不精确,从而导致性能不稳定。在本工作中,我们提出了一种复合优化器,它将用于更新逐通道参数、具有精确部分 Hessian 矩阵的二阶优化器,与用于更新其他参数的一阶随机梯度下降(SGD)优化器相结合。我们证明,逐通道参数对应的 Hessian 矩阵是对角的,并且可以从无 Hessian 方法中直接、精确地提取。所提出的方法名为 SGD with Partial Hessian(SGD-PH),兼具一阶和二阶优化器的优点。与一阶优化器相比,它利用一定量的 Hessian 矩阵信息辅助优化;而与现有二阶优化器相比,它保留了一阶优化器良好的泛化性能。在图像分类任务上的实验证明了我们提出的优化器 SGD-PH 的有效性。代码已公开发布于 https://github.com/myingysun/SGDPH。

英文摘要:

Due to the effectiveness of second-order algorithms in solving classical optimization problems, designing second-order optimizers to train deep neural networks (DNNs) has attracted much research interest in recent years. However, because of the very high dimension of intermediate features in DNNs, it is difficult to directly compute and store the Hessian matrix for network optimization. Most of the previous second-order methods approximate the Hessian information imprecisely, resulting in unstable performance. In this work, we propose a compound optimizer, which is a combination of a second-order optimizer with a precise partial Hessian matrix for updating channel-wise parameters and the first-order stochastic gradient descent (SGD) optimizer for updating the other parameters. We show that the associated Hessian matrices of channel-wise parameters are diagonal and can be extracted directly and precisely from Hessian-free methods. The proposed method, namely SGD with Partial Hessian (SGD-PH), inherits the advantages of both first-order and second-order optimizers. Compared with first-order optimizers, it adopts a certain amount of information from the Hessian matrix to assist optimization, while compared with the existing second-order optimizers, it keeps the good generalization performance of first-order optimizers. Experiments on image classification tasks demonstrate the effectiveness of our proposed optimizer SGD-PH. The code is publicly available at \url{https://github.com/myingysun/SGDPH}.

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

↑