Imposing known physical constraints, such as conservation laws, during neural network training introduces an inductive bias that can improve accuracy, reliability, convergence, and data efficiency for modeling physical dynamics. While such constraints can be softly imposed via loss function penalties, recent advancements in differentiable physics and optimization improve performance by incorporating PDE-constrained optimization as individual layers in neural networks. This enables a stricter adherence to physical constraints. However, imposing hard constraints significantly increases computational and memory costs, especially for complex dynamical systems. This is because it requires solving an optimization problem over a large number of points in a mesh, representing spatial and temporal discretizations, which greatly increases the complexity of the constraint. To address this challenge, we develop a scalable approach to enforce hard physical constraints using Mixture-of-Experts (MoE), which can be used with any neural network architecture. Our approach imposes the constraint over smaller decomposed domains, each of which is solved by an "expert" through differentiable optimization. During training, each expert independently performs a localized backpropagation step by leveraging the implicit function theorem; the independence of each expert allows for parallelization across multiple GPUs. Compared to standard differentiable optimization, our scalable approach achieves greater accuracy in the neural PDE solver setting for predicting the dynamics of challenging non-linear systems. We also improve training stability and require significantly less computation time during both training and inference stages.
翻译:在神经网络训练中施加已知物理约束(如守恒定律)可引入归纳偏置,从而提升物理动力学建模的准确性、可靠性、收敛性和数据效率。虽然此类约束可通过损失函数惩罚项进行软性施加,但近期可微分物理与优化领域的进展通过将偏微分方程约束优化作为神经网络的独立层,实现了对物理约束的严格遵循。然而,施加硬约束会显著增加计算和内存成本,尤其是对复杂动力系统而言——这是因为需要在表示空间与时间离散化的网格上求解大量点的优化问题,从而大幅提升约束的复杂度。为应对这一挑战,我们提出一种基于混合专家模型(MoE)的可扩展方法来实现硬物理约束的强制执行,该方法可与任意神经网络架构兼容。本方法将约束施加于分解后的子域,每个子域由“专家”通过可微分优化独立求解。训练阶段,各专家利用隐函数定理独立执行局部反向传播;其相互独立性使得跨多GPU并行化成为可能。相较于标准可微分优化,我们的可扩展方法在预测非线性复杂系统动力学时,神经PDE求解器设置中实现了更高精度。同时,我们提升了训练稳定性,并在训练与推理阶段均显著降低了计算时间需求。