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

神经元ODE精确梯度的最小记忆辛伴随算法

Symplectic Adjoint Method for Exact Gradient of Neural ODE with Minimal Memory

Osaka University(大阪大学);Kobe University(神户大学)

Takashi Matsubara, Yuto Miyatake, Takaharu Yaguchi

摘要:

微分方程的神经网络模型,即神经ODE,使得能够以高精度学习连续时间动态系统和概率分布。神经ODE在数值积分期间重复使用相同的网络。反向传播算法的内存消耗与使用次数乘以网络大小成正比。即使检查点方案将计算图划分为子图,也是如此。否则,伴随方法通过在时间上向后的数值积分来获得梯度。虽然这种方法只消耗一个网络使用的内存,它需要高的计算成本,以抑制数值误差。本研究提出了辛伴随方法,这是一种通过辛积分器求解的伴随方法。辛伴随方法获得精确的梯度(直到舍入误差),其记忆与使用次数加上网络大小成正比。实验结果表明,辛伴随方法消耗的内存比朴素反向传播算法和检查点方案少得多,执行速度比伴随方法,并且对舍入误差更鲁棒。

英文摘要:

A neural network model of a differential equation, namely neural ODE, has enabled the learning of continuous-time dynamical systems and probabilistic distributions with high accuracy. The neural ODE uses the same network repeatedly during a numerical integration. The memory consumption of the backpropagation algorithm is proportional to the number of uses times the network size. This is true even if a checkpointing scheme divides the computation graph into sub-graphs. Otherwise, the adjoint method obtains a gradient by a numerical integration backward in time. Although this method consumes memory only for a single network use, it requires high computational cost to suppress numerical errors. This study proposes the symplectic adjoint method, which is an adjoint method solved by a symplectic integrator. The symplectic adjoint method obtains the exact gradient (up to rounding error) with memory proportional to the number of uses plus the network size. The experimental results demonstrate that the symplectic adjoint method consumes much less memory than the naive backpropagation algorithm and checkpointing schemes, performs faster than the adjoint method, and is more robust to rounding errors.

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

↑