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.
翻译:神经普通差异方程式(Neal CODEs)已成为一个新的网络结构,它连接动态系统和深层次学习,但通过香草神经内分解神经内分解法的持续连接方法获得的梯度不是反向的。其他方法要么由于深深的计算图形而存在过度的记忆要求,要么由于对时间集成计划的选择有限而妨碍了对大型复杂动态系统的应用。为了实现精确的梯度,同时又不损害记忆效率和灵活性,我们根据高层次离散的同步算法差异,提出了一个新的神经内径框架(PNODE)。通过利用独立连接的时间整合器和针对这些集成器的高级检查战略,PNODE可以提供记忆和计算成本之间的平衡,同时以一致和准确地计算梯度。我们提供了基于大型复杂的复杂动态系统(最常用的可缩缩放科学计算图书馆之一)的开放源实施。我们通过对图像分类和持续正常流动问题进行的广泛数字实验来展示业绩。我们显示,PNODEOD能够比其他的平流方法更快速地使用最精确的存储方法。我们显示,比平流式方法显示,比平流式的平流式方法要更快地显示,比平比平比平比平比平比平比平时的平时的平流方法更快速的周期方法更快的方法。