cs.LGOct 23, 2026

A Tutorial on Physics Constrained Machine Learning for Hybrid Modeling, Optimization, and Control

Authors: Rahul Golder, Bimol Nath Roy, MM Faruque Hasan

Organizations: Artie McFerrin Department of Chemical Engineering, Texas A&M University, College Station, TX 77843-3122, USA · Texas A&M Energy Institute, Texas A&M University, College Station, TX 77843, USA

Abstract

Physics-constrained machine learning (PCML) integrates domain knowledge, first-principles, and physical constraints into AI/ML models. In this work, we present a step-by-step tutorial of a modular PCML framework, KKT-HardNet, and illustrate how it could be used for hybrid modeling, process simulation, optimization and model predictive control in a single platform. KKT-HardNet combines fast inference capabilities of neural networks with guaranteed satisfaction of algebraic constraints through differential projection. It can handle heterogeneous data and enforce both linear and nonlinear equality and inequality constraints. The modular design supports custom neural-network backbones and user-defined projection mechanisms for PCML. To enable efficient end-to-end training, KKT-HardNet exploits implicit function theorem to backpropagate through the projection layer. This avoids computationally expensive automatic differentiation. This work also introduces an exact reduced-order Fischer-Burmeister reformulation and a primal-dual interior-point method as an alternative projection solve strategy. We also provide a diverse set of benchmarking problems for PCML in engineering applications. KKT-HardNet achieves orders of magnitude better performance in terms of both constraint satisfaction and inference time. The KKT-HardNet code and the benchmark datasets are available at https://github.com/souls-tamu/kkt-hardnet .

Figures & tables

Appendix figures & tables3 assets

Supplementary material from the paper’s appendix.

Appendix

Explore similar work

CardsList
  1. PL-KKT-hPINN: Enforcing Nonlinear Equality Constraints on Neural Networks via Piecewise-Linear Projection

    Jun 9, 2026Fateme Mohammad Mohammadi, Hector Budman, Joshua L. PulsipherNeural Surrogate ModelingConstrained Optimization

  2. PE-MHL: Physics-Encoded Modular Hybrid Layers for Scalable Learning of Complex Systems

    Jun 2, 2026Ismail Hassaballa, Mircea LazarNonlinear System IdentificationPhysics-Informed ML

  3. SNAP-FM: Sparse Nonlinear Accelerated Projection for Physics-Constrained Generative Modeling

    Jun 30, 2026Alaina Kolli, Theodoros Xenakis, Utkarsh Utkarsh +4Constrained Generative ModelingPhysics-Informed Generative Modeling