arXivDaily arXiv每日学术速递 周一至周五更新
arXiv 2604.18481math.NAcs.LGcs.NA
收藏

物理信息神经网络:一种完整的训练循环的教科书推导

Physics-Informed Neural Networks: A Didactic Derivation of the Complete Training Cycle

Campus de Engenharias e Ciências Agrárias (CECA), Universidade Federal de Alagoas (UFAL), Rio Largo, Alagoas, 57100-000, Brazil(工程与农业科学学院(CECA),阿拉加斯联邦大学(UFAL),里奥拉戈,阿拉加斯,57100-000,巴西)

Abdeladhim Tahimi

AI总结:

本文通过一阶初值问题的示例,推导了物理信息神经网络的完整训练流程,包括前向传播、损失函数计算、反向传播及参数更新,并验证了网络的精确性。

摘要:

本文是一份逐步、自包含的指南,介绍了物理信息神经网络(PINN)完整训练循环的全过程。通过一个具有已知解析解的一阶初值问题作为示例,我们逐步展示了每个阶段的过程:网络输出及其时间导数的前向传播,由微分方程残差和初始条件构成的复合损失函数的评估,梯度反向传播(特别关注隐藏层中出现的乘积法则),以及梯度下降参数更新。每一步都用具体的、可验证的数值进行展示,使用一个1-3-3-1多层感知机(具有两个隐藏层和22个可训练参数)。从这些具体例子中,我们推导出一般性的递归公式——表达为灵敏度传播关系——将梯度计算扩展到任意深度的网络,并将这些公式与实践中使用的自动微分引擎联系起来。训练后的网络对精确解进行验证,仅使用物理信息损失,就实现了相对$ L^2 $误差为$ 4.290 \times 10^{-4} $,而无需任何真实解的数据。一个配套的Jupyter/PyTorch笔记本复现了每一步的手动计算和完整的训练流程,提供了手推和机器计算梯度之间的相互验证。

英文摘要:

This paper is a step-by-step, self-contained guide to the complete training cycle of a Physics-Informed Neural Network (PINN) -- a topic that existing tutorials and guides typically delegate to automatic differentiation libraries without exposing the underlying algebra. Using a first-order initial value problem with a known analytical solution as a running example, we walk through every stage of the process: forward propagation of both the network output and its temporal derivative, evaluation of a composite loss function built from the ODE residual and the initial condition, backpropagation of gradients -- with particular attention to the product rule that arises in hidden layers -- and a gradient descent parameter update. Every calculation is presented with explicit, verifiable numerical values using a 1-3-3-1 multilayer perceptron with two hidden layers and 22 trainable parameters. From these concrete examples, we derive general recursive formulas -- expressed as sensitivity propagation relations -- that extend the gradient computation to networks of arbitrary depth, and we connect these formulas to the automatic differentiation engines used in practice. The trained network is then validated against the exact solution, achieving a relative $L^2$ error of $4.290 \times 10^{-4}$ using only the physics-informed loss, without any data from the true solution. A companion Jupyter/PyTorch notebook reproduces every manual calculation and the full training pipeline, providing mutual validation between hand-derived and machine-computed gradients.

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

↑