We introduce a practical method to enforce partial differential equation (PDE) constraints for functions defined by neural networks (NNs), with a high degree of accuracy and up to a desired tolerance. We develop a differentiable PDE-constrained layer that can be incorporated into any NN architecture. Our method leverages differentiable optimization and the implicit function theorem to effectively enforce physical constraints. Inspired by dictionary learning, our model learns a family of functions, each of which defines a mapping from PDE parameters to PDE solutions. At inference time, the model finds an optimal linear combination of the functions in the learned family by solving a PDE-constrained optimization problem. Our method provides continuous solutions over the domain of interest that accurately satisfy desired physical constraints. Our results show that incorporating hard constraints directly into the NN architecture achieves much lower test error when compared to training on an unconstrained objective.
翻译:我们提出了一种实用方法,用于强制执行由神经网络(NNs)定义的函数的偏微分方程(PDE)约束,该方法具有高度准确性,并可达到所需容差。我们开发了一个可微的PDE约束层,可集成到任何NN架构中。我们的方法利用可微优化和隐函数定理来有效施加物理约束。受字典学习启发,我们的模型学习一组函数,其中每个函数定义了从PDE参数到PDE解的映射。在推理时,通过求解PDE约束优化问题,模型在所学函数族中找到最优线性组合。该方法在感兴趣域上提供连续解,能准确满足所需物理约束。结果表明,与基于无约束目标训练相比,将硬约束直接融入NN架构可显著降低测试误差。