arXivDaily arXiv每日学术速递 周一至周五更新
感恩节,周五至周末无更新,大家顺遂。周一再来吧
arXiv 2311.00636cs.LGstat.ML
收藏

面向现代神经网络架构的 Kronecker 因子近似曲率方法

Kronecker-Factored Approximate Curvature for Modern Neural Network Architectures

University of Cambridge(剑桥大学);ETH Zurich(苏黎世联邦理工学院);Max Planck Institute for Intelligent Systems(马克斯·普朗克智能系统研究所);University of Tübingen(图宾根大学);Tübingen AI Center(图宾根人工智能中心)

Runa Eschenhagen, Alexander Immer, Richard E. Turner, Frank Schneider, Philipp Hennig

AI总结:

本文针对现代神经网络中带权重共享的线性层,提出 K-FAC-expand 和 K-FAC-reduce 两种二阶优化变体,证明其在深度线性网络中的精确性,并在图神经网络和视觉 Transformer 上验证了显著加速训练的效果。

摘要:

许多现代神经网络架构的核心组件,如 Transformer、卷积神经网络或图神经网络,都可以表示为带有权重共享的线性层。Kronecker 因子近似曲率(K-FAC)是一种二阶优化方法,已展现出加速神经网络训练并从而降低计算成本的潜力。然而,目前尚缺乏一个可将其应用于通用架构的框架,特别是针对具有线性权重共享层的架构。本文识别了线性权重共享层的两种不同设置,并据此提出两种 K-FAC 变体——expand 和 reduce。我们证明,在各自对应的设置下,这两种变体对于带有权重共享的深度线性网络是精确的。值得注意的是,K-FAC-reduce 通常比 K-FAC-expand 更快,我们利用这一特性,通过优化 Wide ResNet 的边际似然来加速自动超参数选择。最后,在训练图神经网络和视觉 Transformer 时,我们观察到这两种 K-FAC 变体之间差异很小。然而,两种变体都能以一级参考运行步数的 50%–75% 达到固定的验证指标目标,这转化为相当的挂钟时间改进。这凸显了将 K-FAC 应用于现代神经网络架构的潜力。

英文摘要:

The core components of many modern neural network architectures, such as transformers, convolutional, or graph neural networks, can be expressed as linear layers with $\textit{weight-sharing}$. Kronecker-Factored Approximate Curvature (K-FAC), a second-order optimisation method, has shown promise to speed up neural network training and thereby reduce computational costs. However, there is currently no framework to apply it to generic architectures, specifically ones with linear weight-sharing layers. In this work, we identify two different settings of linear weight-sharing layers which motivate two flavours of K-FAC -- $\textit{expand}$ and $\textit{reduce}$. We show that they are exact for deep linear networks with weight-sharing in their respective setting. Notably, K-FAC-reduce is generally faster than K-FAC-expand, which we leverage to speed up automatic hyperparameter selection via optimising the marginal likelihood for a Wide ResNet. Finally, we observe little difference between these two K-FAC variations when using them to train both a graph neural network and a vision transformer. However, both variations are able to reach a fixed validation metric target in $50$-$75\%$ of the number of steps of a first-order reference run, which translates into a comparable improvement in wall-clock time. This highlights the potential of applying K-FAC to modern neural network architectures.

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

↑