arXivDaily arXiv每日学术速递 周一至周五更新
arXiv周末暂无论文更新,休息一下吧,周末愉快~~
arXiv 2206.01298cs.LG
收藏

基于高阶伴随微分的内存高效神经常微分方程框架

A memory-efficient neural ODE framework based on high-level adjoint differentiation

Argonne National Laboratory(阿贡国家实验室);Brown University(布朗大学)

Hong Zhang, Wenjun Zhao

AI总结:

该研究提出基于高阶离散伴随算法微分的神经ODE框架PNODE,通过离散伴随积分器与定制检查点策略平衡内存与计算成本,在图像分类等任务中实现更高内存效率与更快速度,还支持刚性系统的隐式积分方法。

摘要:

神经常微分方程(neural ODEs)作为一种连接动力系统与深度学习的新型网络架构应运而生。然而,原始神经 ODE 中采用连续伴随方法得到的梯度不具备反向准确性。其他方法要么因深度计算图导致内存需求过高,要么时间积分方案选择有限,阻碍了其在大规模复杂动力系统中的应用。为在不牺牲内存效率与灵活性的前提下实现准确梯度,我们提出了一种基于高阶离散伴随算法微分的新型神经 ODE 框架 PNODE。通过利用离散伴随时间积分器以及为这些积分器定制的高级检查点策略,PNODE 能够在内存与计算成本之间取得平衡,同时一致且准确地计算梯度。我们提供了基于 PyTorch 和 PETSc(最常用的可移植、可扩展科学计算库之一)的开源实现。我们通过在图像分类和连续归一化流问题上开展的大量数值实验验证了其性能。结果表明,与其他具备反向准确性的方法相比,PNODE 实现了最高的内存效率。在图像分类问题上,PNODE 的速度最高可达原始神经 ODE 的 2 倍,最高可达现有最佳反向准确方法的 2.3 倍。我们还证明,PNODE 支持使用刚性动力系统所需的隐式时间积分方法。

英文摘要:

Neural ordinary differential equations (neural ODEs) have emerged as a novel network architecture that bridges dynamical systems and deep learning. However, the gradient obtained with the continuous adjoint method in the vanilla neural ODE is not reverse-accurate. Other approaches suffer either from an excessive memory requirement due to deep computational graphs or from limited choices for the time integration scheme, hampering their application to large-scale complex dynamical systems. To achieve accurate gradients without compromising memory efficiency and flexibility, we present a new neural ODE framework, PNODE, based on high-level discrete adjoint algorithmic differentiation. By leveraging discrete adjoint time integrators and advanced checkpointing strategies tailored for these integrators, PNODE can provide a balance between memory and computational costs, while computing the gradients consistently and accurately. We provide an open-source implementation based on PyTorch and PETSc, one of the most commonly used portable, scalable scientific computing libraries. We demonstrate the performance through extensive numerical experiments on image classification and continuous normalizing flow problems. We show that PNODE achieves the highest memory efficiency when compared with other reverse-accurate methods. On the image classification problems, PNODE is up to two times faster than the vanilla neural ODE and up to 2.3 times faster than the best existing reverse-accurate method. We also show that PNODE enables the use of the implicit time integration methods that are needed for stiff dynamical systems.

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

↑