arXivDaily arXiv每日学术速递 周一至周五更新
arXiv 2403.03473cs.LGcs.CV

用于深度学习的免逆快速自然梯度下降方法

Inverse-Free Fast Natural Gradient Descent Method for Deep Learning

School of Information and Communication Engineering, University of Electronic Science and Technology of China (UESTC)(电子科技大学信息与通信工程学院);Department of Automation, Shanghai Jiao Tong University(上海交通大学自动化系)

Xinwei Ou, Ce Zhu, Xiaolin Huang, Yipeng Liu

AI总结:

本文提出仅需在首个 epoch 求逆的快速自然梯度下降(FNGD)方法,通过跨 epoch 共享每样本梯度加权系数,使计算复杂度降至与一阶方法相当,并在图像分类与机器翻译任务中显著超越 KFAC 和 AdamW。

摘要:

二阶优化技术通过引入二阶导数或统计量,有望比一阶方法实现更快的收敛速度。然而,由于计算效率低下,它们在深度学习中的使用受到限制。已有各种方法被提出来解决这一问题,主要集中在最小化待求逆矩阵的规模。尽管如此,迭代执行逆运算的必要性依然存在。在这项工作中,我们提出了一种快速自然梯度下降(FNGD)方法,仅需在第一个 epoch 进行求逆运算。具体而言,研究揭示了自然梯度下降(NGD)本质上是每样本梯度的加权和。我们的新方法进一步提出在各个 epoch 间共享这些加权系数,且不影响经验性能。因此,FNGD 表现出与一阶方法中平均和相似的特征,使得 FNGD 的计算复杂度与一阶方法相当。在图像分类和机器翻译任务上的大量实验证明了所提出的 FNGD 的效率。在 CIFAR-100 上训练 ResNet-18 时,与 KFAC 相比,FNGD 可实现 2.07 倍的加速。在 Multi30K 上训练 Transformer 时,FNGD 以几乎相同的训练时间,比 AdamW 高出 24 BLEU 分数。

英文摘要:

Second-order optimization techniques have the potential to achieve faster convergence rates compared to first-order methods through the incorporation of second-order derivatives or statistics. However, their utilization in deep learning is limited due to their computational inefficiency. Various approaches have been proposed to address this issue, primarily centered on minimizing the size of the matrix to be inverted. Nevertheless, the necessity of performing the inverse operation iteratively persists. In this work, we present a fast natural gradient descent (FNGD) method that only requires inversion during the first epoch. Specifically, it is revealed that natural gradient descent (NGD) is essentially a weighted sum of per-sample gradients. Our novel approach further proposes to share these weighted coefficients across epochs without affecting empirical performance. Consequently, FNGD exhibits similarities to the average sum in first-order methods, leading to the computational complexity of FNGD being comparable to that of first-order methods. Extensive experiments on image classification and machine translation tasks demonstrate the efficiency of the proposed FNGD. For training ResNet-18 on CIFAR-100, FNGD can achieve a speedup of 2.07$\times$ compared with KFAC. For training Transformer on Multi30K, FNGD outperforms AdamW by 24 BLEU score while requiring almost the same training time.

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

↑