# 物理引导神经网络

物理引导神经网络（physics-guided neural network, PGNN）是一种部分借助物理定律进行训练的神经网络，用于预测湖泊水温等科学量；在最初的湖泊温度研究中，它比纯数据驱动模型更准确、更一致。该术语由阿尔卡·道（Arka Daw）及其同事在2017年的一篇arXiv论文中提出，该论文将基于物理的模型模拟输出与观测特征及基于物理的损失函数相结合。<sup>[1](https://doi.org/10.48550/arxiv.1710.11431)</sup> 综述将PGNN归入在神经网络中施加物理约束的三大框架家族：物理引导（PgNN）、物理信息（PiNN）和物理编码（PeNN）网络。<sup>[2](https://ar5iv.labs.arxiv.org/html/2211.07377)</sup> PGNN脱胎于理论引导数据科学（theory-guided data science, TGDS）范式，该范式将科学模型的性能界定为准确性加简洁性加一致性。<sup>[3](https://doi.org/10.1109/tkde.2017.2720168)</sup>

| 关键事实 | 详情 |
|---|---|
| 核心思想 | 将物理模型输出作为输入（混合物理-数据，HPD）与训练目标中基于物理的损失项相结合<sup>[1](https://doi.org/10.48550/arxiv.1710.11431)</sup> |
| 通用损失 | \( L = \mathrm{Supervised\ loss}(Y_{\mathrm{pred}}, Y_{\mathrm{true}}) + \mathrm{Physics\text{-}based\ Penalty} \)，物理项由 \( \lambda_{\mathrm{PHY}} \) 等超参数加权<sup>[4](https://arxiv.org/pdf/2001.11086v3.pdf)</sup> |
| 标志性结果 | 米勒湖（Lake Mille Lacs）测试集上PGNN的RMSE为0.73，黑箱神经网络为1.18，基于物理的模型为1.69，物理不一致性接近零<sup>[1](https://doi.org/10.48550/arxiv.1710.11431)</sup> |
| 命名变体 | PGRNN（循环网络，能量守恒）、PGA-LSTM（硬性架构约束）、PGNNIV（内部变量）、残差与HPD-Res混合模型<sup>[4](https://arxiv.org/pdf/2001.11086v3.pdf)</sup><sup> • </sup><sup>[5](https://arxiv.org/html/1911.02682)</sup><sup> • </sup><sup>[6](https://www.sciencedirect.com/science/article/abs/pii/S0045782521001523)</sup> |
| 应用领域 | 湖泊温度与水质、磷预测，并可推广至其他机理模型学科<sup>[1](https://doi.org/10.48550/arxiv.1710.11431)</sup><sup> • </sup><sup>[7](https://pubs.usgs.gov/publication/70237364)</sup> |
| 官方代码 | Python/Keras/TensorFlow仓库，含米勒湖与门多塔湖（Lake Mendota）数据集<sup>[8](https://github.com/arkadaw9/PGNN)</sup> |

## 工作原理

PGNN以两种方式注入物理知识。第一，网络将基于物理的模拟输出作为输入特征，与观测驱动数据并列，构成混合物理-数据（HPD）模型；在湖泊温度研究中，通用湖泊模型（General Lake Model, GLM）提供了这些模拟输出。<sup>[1](https://doi.org/10.48550/arxiv.1710.11431)</sup><sup> • </sup><sup>[9](https://dl4physicalsciences.github.io/files/nips_dlps_2017_19.pdf)</sup> 第二，科学知识以可微惩罚项的形式进入学习目标。总体损失的形式为 \( L = \mathrm{Supervised\ loss}(Y_{\mathrm{pred}}, Y_{\mathrm{true}}) + \mathrm{Physics\text{-}based\ Penalty} \)。<sup>[4](https://arxiv.org/pdf/2001.11086v3.pdf)</sup>

典型的物理项利用水的密度-深度关系：由于密度较大的水必须位于密度较小的水之下，任何预测密度随深度增加而减小的深度点，都会通过密度违反量的[ReLU](https://www.edgepedia.org/zh/rectifier-neural-networks)函数受到惩罚。该项由 \( \lambda_{\mathrm{PHY}} \) 加权，该超参数设定物理一致性相对于监督经验损失的相对重要性。<sup>[1](https://doi.org/10.48550/arxiv.1710.11431)</sup> 由于该惩罚项无需目标观测值，可在无标签数据上评估，从而使训练成为半监督的。<sup>[1](https://doi.org/10.48550/arxiv.1710.11431)</sup> TGDS框架将目标概括为准确性 + 简洁性 + [一致性](https://www.edgepedia.org/zh/consistency)，物理知识通过架构设计、学习目标或输出修正三种途径进入。<sup>[9](https://dl4physicalsciences.github.io/files/nips_dlps_2017_19.pdf)</sup>

## 实施方法

遵循湖泊温度工作流程的实践者按以下步骤操作。第一，在历史气象驱动数据上运行未经校准的物理模型（使用默认参数的GLM），生成模拟温度剖面。第二，由这些模拟数据加上观测驱动数据组装网络输入，并选择要施加的物理约束，如密度随深度单调不减和能量守恒。第三，在模拟输出上预训练网络，然后在稀疏的湖内观测数据上微调；这一点很重要，因为不到1%的湖泊拥有100天或以上的温度观测数据，不到5%的湖泊拥有10天或以上。<sup>[4](https://arxiv.org/pdf/2001.11086v3.pdf)</sup> 第四，调节 \( \lambda_{\mathrm{PHY}} \)：较大的值施加更严格的物理约束，产生物理上更一致的预测，但可能影响测试RMSE。<sup>[1](https://doi.org/10.48550/arxiv.1710.11431)</sup> 官方仓库是一个不再维护的遗留实现，锁定于Python 3.7.3/Keras 2.2.5/[TensorFlow](https://www.edgepedia.org/zh/tensorflow) 1.14.0，包含明尼苏达州米勒湖和威斯康星州门多塔湖的数据集，以及HPD（PGNN0，\( \lambda_{\mathrm{PHY}} = 0 \)）、残差和混合残差（HPD-Res）变体；仓库中存在公开的未解决问题，报告称数据集文件在现代Keras/SciPy/TensorFlow上无法加载，TensorFlow仅从组合损失的均方误差部分计算梯度，导致基于物理的惩罚项没有梯度，且没有更新的版本支持较新的TensorFlow/Keras版本。<sup>[8](https://github.com/arkadaw9/PGNN)</sup>

## 起源

PGNN框架出现在阿尔卡·道及其同事2017年的arXiv预印本《物理引导神经网络（PGNN）：在湖泊温度建模中的应用》中。<sup>[1](https://doi.org/10.48550/arxiv.1710.11431)</sup> 它建立在阿努杰·卡帕特内（Anuj Karpatne）及其同事2017年发表于IEEE TKDE的理论引导数据科学范式之上。<sup>[3](https://doi.org/10.1109/tkde.2017.2720168)</sup> 一个相关的前驱工作是斯图尔特（Stewart）和埃尔蒙（Ermon）在AAAI 2017上的无标签监督工作，该工作以物理和领域知识替代标签来训练网络。<sup>[10](https://doi.org/10.1609/aaai.v31i1.10934)</sup> 同一团队后来将该框架作为2022年《知识引导机器学习》（*Knowledge-guided machine learning*，[Taylor & Francis](https://www.edgepedia.org/zh/taylor-and-francis)，第353-372页）的书章发表<sup>[11](https://pubs.usgs.gov/publication/70237341)</sup>，循环扩展的期刊版本于2021年发表在ACM/IMS Transactions on Data Science上。<sup>[7](https://pubs.usgs.gov/publication/70237364)</sup>

## 变体

**PGRNN**将PGNN扩展到动力系统的循环网络，为LSTM训练增加了两个约束：密度-深度关系和时间上的能量守恒。<sup>[12](https://doi.org/10.48550/arxiv.1810.02880)</sup> 其能量守恒损失为 \( L = L_{\mathrm{RNN}} + \lambda_{\mathrm{EC}} \cdot L_{\mathrm{EC}} \)，其中 \( L_{\mathrm{EC}} = \frac{1}{T_{\mathrm{ice\text{-}free}}} \sum_{t \in \mathrm{ice\text{-}free}} \mathrm{ReLU}(|\Delta U_{t} - (F_{\mathrm{in}} - F_{\mathrm{out}})| - \tau_{\mathrm{EC}}) \)，仅在无冰期施加，取 \( \lambda_{\mathrm{EC}} = 0.01 \)。<sup>[4](https://arxiv.org/pdf/2001.11086v3.pdf)</sup>

**PGA-LSTM**将物理从损失移入架构：一个隐藏神经元被显式训练以单调递推的方式表达随深度变化的水密度，蒙特卡洛dropout提供不确定性量化。<sup>[5](https://arxiv.org/html/1911.02682)</sup> **PGNNIV**（带内部变量的物理引导神经网络）将应力等内部隐藏状态变量与受已知物理关系约束的神经元层相关联，仅使用可观测数据训练；相对于其他神经方法，它提高了收敛速度、数据效率、噪声过滤和外推能力。<sup>[6](https://www.sciencedirect.com/science/article/abs/pii/S0045782521001523)</sup> **残差与HPD-Res模型**则是在物理输出之上链接一个机器学习模型：残差模型预测对基于物理的输出的加性修正，HPD-Res从驱动数据加物理输出中预测残差。<sup>[1](https://doi.org/10.48550/arxiv.1710.11431)</sup> 综述将这些设计分为软约束（物理引导损失）和硬约束（物理引导架构）。<sup>[13](https://dl.acm.org/doi/10.1145/3766887)</sup>

## 应用

已发表的结果主要集中在湖泊建模。在米勒湖上，PGNN达到测试RMSE 0.73，物理不一致性接近零，而黑箱神经网络为1.18，基于物理的模型为1.69；此前的最优结果是针对特定湖泊的校准，在28个湖泊上的中位RMSE为1.47 °C。<sup>[1](https://doi.org/10.48550/arxiv.1710.11431)</sup> PGNN0和普通网络平均有超过50%的时间违反密度-深度关系，而PGNN在各时间步上保持一致。<sup>[1](https://doi.org/10.48550/arxiv.1710.11431)</sup> 当训练数据从3000个样本缩减到800个样本时，PGNN的RMSE仍低于基线，尤其是在1250和1500个样本时。<sup>[1](https://doi.org/10.48550/arxiv.1710.11431)</sup>

在门多塔湖上（13,543条观测，1980年4月30日至2015年11月2日，11个气象驱动变量，三分之二用于训练），带密度-深度约束的PGRNN达到RMSE 1.4791，物理不一致性0.0732，而普通RNN为1.6042和0.2024，物理模型为2.6544和0.0051。<sup>[12](https://doi.org/10.48550/arxiv.1810.02880)</sup> 在未校准的GLM模拟（RMSE 2.950）上预训练，仅用16条观测（数据的0.1%）微调，达到RMSE 2.056，优于用十倍数据训练的循环基线<sup>[4](https://arxiv.org/pdf/2001.11086v3.pdf)</sup>；总体而言，即使训练数据极少，PGRNN也比基于物理的模型提升超过20%。<sup>[4](https://arxiv.org/pdf/2001.11086v3.pdf)</sup> PGRNN还被应用于门多塔湖的磷浓度，总体误差0.0237，物理模型为0.0266。<sup>[12](https://doi.org/10.48550/arxiv.1810.02880)</sup> 在福灵溪水库（Falling Creek Reservoir，7,588条观测）上，PGA-LSTM将逐样本测试RMSE从2.96 °C（LSTM）降至2.19 °C，平均测试RMSE为1.88 °C，物理不一致性接近零。<sup>[5](https://arxiv.org/html/1911.02682)</sup> 在水文学之外，物理引导损失已被用于带守恒层的大气对流模拟器、分子动力学力和能量损失，以及多保真度网络的材料建模<sup>[13](https://dl.acm.org/doi/10.1145/3766887)</sup>；物理约束深度模型在流体模拟、天气与气候建模及分子动力学中作为数值模拟的替代品，速度快几个数量级。<sup>[14](https://pmc.ncbi.nlm.nih.gov/articles/PMC11228478/)</sup>

## 局限与替代方案

**泛化无法保证。** 绝大多数最先进的PgNN缺乏鲁棒性，无法满足插值或外推泛化的保证。<sup>[2](https://ar5iv.labs.arxiv.org/html/2211.07377)</sup> 由于科学领域的训练数据通常稀疏，PgNN模型在时空和物理属性上超出训练范围的条件下的盲测中失败。<sup>[2](https://ar5iv.labs.arxiv.org/html/2211.07377)</sup> 这在经验上可见：在佛罗里达驱动数据的GLM模拟上预训练的模型直接应用于门多塔湖，RMSE为9.010（RNN）和8.657（PGRNN），只有在本地观测上微调后才大幅改善。<sup>[4](https://arxiv.org/pdf/2001.11086v3.pdf)</sup>

**损失平衡困难。** 量级悬殊的损失项无加权求和会导致训练动力学次优；含高阶导数的PDE残差项往往占主导。<sup>[15](https://link.springer.com/article/10.1007/s10915-026-03447-w)</sup> 现有PGNN工作大多以恒定权衡参数添加单个物理引导损失，当存在多个相互竞争的物理函数时，需要在训练过程中自适应调节它们的贡献。<sup>[16](https://par.nsf.gov/biblio/10509576)</sup> 过度正则化是另一种失败模式：在不可压缩湍流中，无散度正则化器降低了预测散度，但过度使用会抹平小涡旋并增加预测误差。<sup>[13](https://dl.acm.org/doi/10.1145/3766887)</sup>

**软约束可能被遗忘。** 在PGA研究中，软物理引导损失（PGL-LSTM）在RMSE或物理一致性上相比普通LSTM几乎没有改善，dropout网络可能遗忘损失施加的物理一致性；在门多塔湖使用40%训练数据时，黑箱LSTM蒙特卡洛样本有32%的时间物理不一致，而PGA-LSTM保持了一致性。<sup>[5](https://arxiv.org/html/1911.02682)</sup> 传统神经网络在数据稀疏时也无法成功训练，而这是科学与工程领域的常见情况，也是物理约束框架的动机所在。<sup>[16](https://par.nsf.gov/biblio/10509576)</sup>

**替代方案。** 分类学文献区分三种框架。PgNN在符合物理的精选数据上使用现成的监督深度学习，通常以物理模型输出作为输入，需要丰富的数据集。PiNN由拉伊西（Raissi）、佩尔迪卡里斯（Perdikaris）和卡尼亚达基斯（Karniadakis）在《计算物理学杂志》（Journal of Computational Physics）上提出，通过用自动微分计算的PDE残差和边界约束损失，以软约束方式施加物理约束；其损失结合数据、PDE、初始条件和边界条件项，权重分别为 \( w_{d} \)、\( w_{p} \)、\( w_{i} \) 和 \( w_{b} \)。<sup>[2](https://ar5iv.labs.arxiv.org/html/2211.07377)</sup><sup> • </sup><sup>[17](https://doi.org/10.1016/j.jcp.2018.10.045)</sup> PeNN将物理直接嵌入网络结构。在综述记号中，PINN目标为 \( \mathcal{L}_{\mathrm{PINN}} = \mathcal{L}(\boldsymbol{u}) + \lambda_{\mathcal{F}} \cdot \mathcal{L}_{\mathcal{F}}(\boldsymbol{u}) \)。<sup>[13](https://dl.acm.org/doi/10.1145/3766887)</sup> PiNN在小数据情形下充当正则化机制，已在流体、量子力学、反应-扩散和浅水问题上得到验证。<sup>[17](https://doi.org/10.1016/j.jcp.2018.10.045)</sup> 相对于混合模型链式结构，PGNN基于损失的方法不同于残差模型——后者学习对物理输出的加性修正，在原始论文中列为替代混合设计。<sup>[1](https://doi.org/10.48550/arxiv.1710.11431)</sup> 损失平衡与重加权仍是活跃的研究课题：王（Wang）及其同事2021年的学习率退火方法根据相对梯度幅值调整权重，在计算物理问题上将PINN精度提高50到100倍<sup>[18](https://link.springer.com/article/10.1007/s10462-025-11322-7)</sup>，相关机制包括NTK特征值加权、自适应lbPINN和梯度增强gPINN。<sup>[18](https://link.springer.com/article/10.1007/s10462-025-11322-7)</sup><sup> • </sup><sup>[15](https://link.springer.com/article/10.1007/s10915-026-03447-w)</sup> 自适应加权多个相互竞争的物理损失这一开放问题仍是活跃的研究目标。<sup>[16](https://par.nsf.gov/biblio/10509576)</sup>

## References

1. [Daw, Arka and colleagues (2017). Physics-guided Neural Networks (PGNN): An Application in Lake Temperature Modeling. arXiv (Cornell University).](https://doi.org/10.48550/arxiv.1710.11431)
2. [Physics-Guided, Physics-Informed, and Physics-Encoded Neural Networks in Scientific Computing](https://ar5iv.labs.arxiv.org/html/2211.07377)
3. [Anuj Karpatne and colleagues (2017). Theory-Guided Data Science: A New Paradigm for Scientific Discovery from Data. IEEE Transactions on Knowledge and Data Engineering.](https://doi.org/10.1109/tkde.2017.2720168)
4. [Physics-Guided Machine Learning for Scientific Discovery: An Application in Simulating Lake Temperature Profiles](https://arxiv.org/pdf/2001.11086v3.pdf)
5. [Physics-Guided Architecture (PGA) of Neural Networks for Quantifying Uncertainty in Lake Temperature Modeling](https://arxiv.org/html/1911.02682)
6. [Prediction and identification of physical systems by means of Physically-Guided Neural Networks with meaningful internal layers (PGNNIV)](https://www.sciencedirect.com/science/article/abs/pii/S0045782521001523)
7. [Physics-guided machine learning for scientific discovery: An application in simulating lake temperature profiles (USGS record)](https://pubs.usgs.gov/publication/70237364)
8. [arkadaw9/PGNN (official code repository)](https://github.com/arkadaw9/PGNN)
9. [How Can Physics Inform Deep Learning Methods in Scientific Problems?: Recent Progress and Future Prospects](https://dl4physicalsciences.github.io/files/nips_dlps_2017_19.pdf)
10. [Stewart, Russell, Ermon, Stefano (2017). Label-Free Supervision of Neural Networks with Physics and Domain Knowledge. AAAI Publications (The Association for the Advancement of Artificial Intelligence (AAAI)).](https://doi.org/10.1609/aaai.v31i1.10934)
11. [Physics-guided neural networks (PGNN): An application in lake temperature modeling (USGS record)](https://pubs.usgs.gov/publication/70237341)
12. [Jia, Xiaowei and colleagues (2018). Physics Guided Recurrent Neural Networks For Modeling Dynamical Systems: Application to Monitoring Water Temperature And Quality In Lakes. arXiv (Cornell University).](https://doi.org/10.48550/arxiv.1810.02880)
13. [Physics-Guided Deep Learning for Dynamical Systems: A Survey | ACM Computing Surveys](https://dl.acm.org/doi/10.1145/3766887)
14. [Learning dynamical systems from data: An introduction to physics-guided deep learning](https://pmc.ncbi.nlm.nih.gov/articles/PMC11228478/)
15. [Advancements and Future Directions in Loss Function Designs for Physics-Informed Neural Networks: A Comprehensive Review (Journal of Scientific Computing)](https://link.springer.com/article/10.1007/s10915-026-03447-w)
16. [Physics-Guided, Physics-Informed, and Physics-Encoded Neural Networks and Operators in Scientific Computing: Fluid and Solid Mechanics (NSF Public Access Repository)](https://par.nsf.gov/biblio/10509576)
17. [M. Raissi, P. Perdikaris, G.E. Karniadakis (2018). Physics-informed neural networks: A deep learning framework for solving forward and inverse problems involving nonlinear partial differential equations. Journal of Computational Physics.](https://doi.org/10.1016/j.jcp.2018.10.045)
18. [Physics-informed neural networks for PDE problems: a comprehensive review (Artificial Intelligence Review)](https://link.springer.com/article/10.1007/s10462-025-11322-7)

---
*Initially written Sep 29, 2026 · Edited: Oct 15, 2026; Oct 21, 2026; Oct 25, 2026*

Topic: 技术与人造世界 › 计算技术与数字系统 › 人工智能与数据 › Machine learning and neural computation › Neural networks and deep learning › Titles I to Z

Copyright 2026 Edgepedia

License: Edgepedia Community License 1.0, https://www.edgepedia.org/edgepedia/license

Source: https://www.edgepedia.org/zh/physics-guided-neural-network

English original: https://www.edgepedia.org/physics-guided-neural-network
