arXivDaily arXiv每日学术速递 周一至周五更新
arXiv 2510.23498cs.LGcs.AIcs.NAmath.NA
收藏

神经微分方程的混合精度训练

Mixed Precision Training of Neural ODEs

NTNU – Norwegian University of Science and Technology(挪威科学技术大学);Emory University(埃默里大学);University of Tennessee(田纳西大学)

Elena Celledoni, Brynjulf Owren, Lars Ruthotto, Tianjiao Nicole Yang

AI总结:

本文提出了一种适用于连续时间架构的混合精度训练框架,通过高精度存储权重和低精度计算关键操作,解决神经微分方程训练中的计算成本和内存增长问题。

摘要:

利用低精度计算已成为深度学习中缓解日益增长的计算成本的标准策略。然而,单纯使用低精度计算可能导致舍入误差和不稳定性。因此,混合精度训练方案通常将权重存储在高精度中,并仅在白名单操作中使用低精度计算。尽管这些方法在连续时间架构如神经微分方程(Neural ODEs)中尚未可靠,本文提出了一种混合精度训练框架,包含显式ODE求解器和自定义反向传播方案,并在多种学习任务中展示了其有效性。我们的方案在计算速度和内存使用方面取得了显著改进,同时保持了与单精度训练相当的精度。

英文摘要:

Exploiting low-precision computations has become a standard strategy in deep learning to address the growing computational costs imposed by ever larger models and datasets. However, naively performing all computations in low precision can lead to roundoff errors and instabilities. Therefore, mixed precision training schemes usually store the weights in high precision and use low-precision computations only for whitelisted operations. Despite their success, these principles are currently not reliable for training continuous-time architectures such as neural ordinary differential equations (Neural ODEs). This paper presents a mixed precision training framework for neural ODEs consisting of explicit ODE solvers and a custom backpropagation scheme and shows their effectiveness in a range of learning tasks. Our scheme uses low-precision computations for evaluating the velocity, parameterized by the neural network, and for storing intermediate states, while numerical reliability is provided by custom dynamic adjoint scaling and by accumulating the solution and gradients in higher precision. These contributions address two key challenges in training neural ODEs: the computational cost of repeated network evaluations and the growth of memory requirements with the number of time steps or layers. Along with the paper we publish our extendable, open-source PyTorch package \texttt{rampde}, whose syntax resembles that of leading packages to provide a drop-in replacement in existing codes. We demonstrate the reliability and effectiveness of our scheme using challenging test cases and on neural ODE applications in image classification and generative models, achieving approximately 50\% memory reduction and up to 2x speedup while maintaining accuracy comparable to single-precision training.

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

↑