Automatic differentiation (AD) is a critical step in physics-informed machine learning, required for computing the high-order derivatives of network output w.r.t. coordinates. In this paper, we present a novel and lightweight algorithm to conduct such AD for physics-informed operator learning, as we call the trick of Zero Coordinate Shift (ZCS). Instead of making all sampled coordinates leaf variables, ZCS introduces only one scalar-valued leaf variable for each spatial or temporal dimension, leading to a game-changing performance leap by simplifying the wanted derivatives from "many-roots-many-leaves" to "one-root-many-leaves". ZCS is easy to implement with current deep learning libraries; our own implementation is by extending the DeepXDE package. We carry out a comprehensive benchmark analysis and several case studies, training physics-informed DeepONets to solve partial differential equations (PDEs) without data. The results show that ZCS has persistently brought down GPU memory consumption and wall time for training by an order of magnitude, with the savings increasing with problem scale (i.e., number of functions, number of points and order of PDE). As a low-level optimisation, ZCS entails no restrictions on data, physics (PDEs) or network architecture and does not compromise training results from any aspect.
翻译:自动微分(AD)是物理信息机器学习中的关键步骤,用于计算网络输出关于坐标的高阶导数。本文针对物理信息算子学习,提出一种新颖且轻量级的算法,即零坐标移动(ZCS)技巧。与将所有采样坐标设为叶变量不同,ZCS仅在每个空间或时间维度引入一个标量叶变量,通过将所需导数从“多根-多叶”简化为“单根-多叶”,实现革命性的性能提升。ZCS易于在现有深度学习库中实现;我们通过扩展DeepXDE包完成具体实现。我们进行了全面的基准测试分析和多个案例研究,训练物理信息型DeepONet以无数据方式求解偏微分方程(PDE)。结果表明,ZCS持续将GPU内存消耗和训练耗时降低一个数量级,且节省幅度随问题规模(即函数数量、采样点数和PDE阶数)增加而增大。作为底层优化手段,ZCS对数据、物理模型(PDE)或网络架构均无限制,且不会从任何方面影响训练结果。