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

训练大型结构化模型时高阶信息的收集与利用

Gathering and Exploiting Higher-Order Information when Training Large Structured Models

LAMSADE;Paris-Dauphine University(巴黎-第纳大学);PSL University(巴黎-萨克雷大学);CNRS(国家科学研究中心)

Pierre Wolinski

AI总结:

本文针对大型模型训练中高阶导数计算成本高的问题,提出在参数划分子空间上精确计算海森矩阵及高阶导数投影的方法,可用于超参数调优、二阶优化及正则化,具备层间长程交互建模等优势。

摘要:

在训练神经网络等大型模型时,由于计算成本过高,通常无法获取二阶及以上的完整导数。因此,在二阶优化方法中,常见的做法是利用一阶信息(如参数梯度,例如拟牛顿法;或激活值梯度,例如K-FAC)来规避海森矩阵(Hessian)的计算。本文聚焦于精确且显式地计算海森矩阵及更高阶导数在与优化相关的精选子空间上的投影。具体而言,对于给定的参数集划分,我们计算可被视为“基于划分的高阶导数”的张量,只要划分的子集数量保持在较小规模,就能以合理成本完成计算。随后,我们给出了这些张量的若干应用示例:第一,展示了如何计算每个参数子集的学习率,可用于超参数调优;第二,展示了如何利用二阶张量构建一种利用海森矩阵所包含信息的优化方法;第三,展示了如何利用三阶张量(即损失函数三阶导数包含的信息)对该优化方法进行正则化。由此得到的训练步骤具有若干优良特性,包括:考虑了被训练神经网络各层之间的长程交互,这在同类方法(如K-FAC)中通常无法实现;优化轨迹在逐层仿射重参数化下保持不变。

英文摘要:

When training large models, such as neural networks, the full derivatives of order 2 and beyond are usually inaccessible, due to their computational cost. Therefore, among the second-order optimization methods, it is common to bypass the computation of the Hessian by using first-order information, such as the gradient of the parameters (e.g., quasi-Newton methods) or the activations (e.g., K-FAC). In this paper, we focus on the exact and explicit computation of projections of the Hessian and higher-order derivatives on well-chosen subspaces relevant for optimization. Namely, for a given partition of the set of parameters, we compute tensors that can be seen as "higher-order derivatives according to the partition", at a reasonable cost as long as the number of subsets of the partition remains small. Then, we give some examples of how these tensors can be used. First, we show how to compute a learning rate per subset of parameters, which can be used for hyperparameter tuning. Second, we show how to use these tensors at order 2 to construct an optimization method that uses information contained in the Hessian. Third, we show how to use these tensors at order 3 (information contained in the third derivative of the loss) to regularize this optimization method. The resulting training step has several interesting properties, including: it takes into account long-range interactions between the layers of the trained neural network, which is usually not the case in similar methods (e.g., K-FAC); the trajectory of the optimization is invariant under affine layer-wise reparameterization.

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

↑