# Theory-guided hard constraint projection (HCP): a knowledge-based data-driven scientific machine learning method

arXiv: https://arxiv.org/abs/2012.06148 · HTML: https://mlsanity.com/paper/2012.06148/

## Key facts

- Cited by 29 papers in the map (data through 14 Oct 2026).
- First posted on arXiv 11 Dec 2020.

## Built on by (most cited first, 29 of 29)

- [Physics-Informed Machine Learning: A Survey on Problems, Methods and Applications](https://mlsanity.com/paper/2211.08064/) (2022)
- [Any equation is a forest: Symbolic genetic algorithm for discovering open-form partial differential equations (SGA-PDE)](https://mlsanity.com/paper/2106.11927/) (2021)
- [HANNA: Hard-constraint Neural Network for Consistent Activity Coefficient Prediction](https://mlsanity.com/paper/2407.18011/) (2024)
- [ENFORCE: Nonlinear Constrained Learning with Adaptive-depth Neural Projection](https://mlsanity.com/paper/2502.06774/) (2025)
- [Physics-Informed Neural Networks with Hard Nonlinear Equality and Inequality Constraints](https://mlsanity.com/paper/2507.08124/) (2025)
- [Integration of knowledge and data in machine learning](https://mlsanity.com/paper/2202.10337/) (2022)
- [A New Computationally Simple Approach for Implementing Neural Networks with Output Hard Constraints](https://mlsanity.com/paper/2307.10459/) (2023)
- [Physics-Regulated Deep Reinforcement Learning: Invariant Embeddings](https://mlsanity.com/paper/2305.16614/) (2023)
- [An Intriguing Property of Geophysics Inversion](https://mlsanity.com/paper/2204.13731/) (2022)
- [Physics-Guided Discovery of Highly Nonlinear Parametric Partial Differential Equations](https://mlsanity.com/paper/2106.01078/) (2021)
- [AutoKE: An automatic knowledge embedding framework for scientific machine learning](https://mlsanity.com/paper/2205.05390/) (2022)
- [Learning PDE Solvers with Physics and Data: A Unifying View of Physics-Informed Neural Networks and Neural Operators](https://mlsanity.com/paper/2601.14517/) (2026)
- [RBF-MGN:Solving spatiotemporal PDEs with Physics-informed Graph Neural Network](https://mlsanity.com/paper/2212.02861/) (2022)
- [An explainable operator approximation framework under the guideline of Green's function](https://mlsanity.com/paper/2412.16644/) (2024)
- [Picard-KKT-hPINN: Enforcing Nonlinear Enthalpy Balances for Physically Consistent Neural Networks](https://mlsanity.com/paper/2501.17782/) (2025)
- [EquiNO: A Physics-Informed Neural Operator for Multiscale Simulations](https://mlsanity.com/paper/2504.07976/) (2025)
- [DAE-HardNet: A Physics Constrained Neural Network Enforcing Differential-Algebraic Hard Constraints](https://mlsanity.com/paper/2512.05881/) (2025)
- [TgDLF2.0: Theory-guided deep-learning for electrical load forecasting via Transformer and transfer learning](https://mlsanity.com/paper/2210.02448/) (2022)
- [Implicit factorized transformer approach to fast prediction of turbulent channel flows](https://mlsanity.com/paper/2412.18840/) (2024)
- [Hard Constraint Projection in a Physics Informed Neural Network](https://mlsanity.com/paper/2601.06244/) (2026)
- [Physics-informed Neural Network Combined with Characteristic-Based Split for Solving Navier-Stokes Equations](https://mlsanity.com/paper/2304.10717/) (2023)
- [Filtered Partial Differential Equations: a robust surrogate constraint in physics-informed deep learning framework](https://mlsanity.com/paper/2311.03776/) (2023)
- [DiffSlack: Learning under Nonlinear Inequality Constraints via Learnable Slack Variables](https://mlsanity.com/paper/2606.05247/) (2026)
- [Phy-Taylor: Physics-Model-Based Deep Neural Networks](https://mlsanity.com/paper/2209.13511/) (2022)
- [Worth of knowledge in deep learning](https://mlsanity.com/paper/2307.00712/) (2023)
- [Optimization of geological carbon storage operations with multimodal latent dynamic model and deep reinforcement learning](https://mlsanity.com/paper/2406.04575/) (2024)
- [A nudge to the truth: atom conservation as a hard constraint in models of atmospheric composition using an uncertainty-weighted correction](https://mlsanity.com/paper/2408.16109/) (2024)
- [Hard constraint learning approaches with trainable influence functions for evolutionary equations](https://mlsanity.com/paper/2502.17497/) (2025)
- [Physics-Informed Neural Networks for Solving Derivative-Constrained PDEs](https://mlsanity.com/paper/2604.13723/) (2026)

## Abstract (arXiv)

Machine learning models have been successfully used in many scientific and engineering fields. However, it remains difficult for a model to simultaneously utilize domain knowledge and experimental observation data. The application of knowledge-based symbolic AI represented by an expert system is limited by the expressive ability of the model, and data-driven connectionism AI represented by neural networks is prone to produce predictions that violate physical mechanisms. In order to fully integrate domain knowledge with observations, and make full use of the prior information and the strong fitting ability of neural networks, this study proposes theory-guided hard constraint projection (HCP). This model converts physical constraints, such as governing equations, into a form that is easy to handle through discretization, and then implements hard constraint optimization through projection. Based on rigorous mathematical proofs, theory-guided HCP can ensure that model predictions strictly conform to physical mechanisms in the constraint patch. The performance of the theory-guided HCP is verified by experiments based on the heterogeneous subsurface flow problem. Due to the application of hard constraints, compared with fully connected neural networks and soft constraint models, such as theory-guided neural networks and physics-informed neural networks, theory-guided HCP requires fewer data, and achieves higher prediction accuracy and stronger robustness to noisy observations.
