Abstract
To simultaneously address the rising need of expressing uncertainties in deep learning models along with producing model outputs which are consistent with the known scientific knowledge, we propose a novel physics-guided architecture (PGA) of neural networks in the context of lake temperature modeling where the physical constraints are hard coded in the neural network architecture. This allows us to integrate such models with state of the art uncertainty estimation approaches such as Monte Carlo (MC) Dropout without sacrificing the physical consistency of our results. We demonstrate the effectiveness of our approach in ensuring better generalizability as well as physical consistency in MC estimates over data collected from Lake Mendota in Wisconsin and Falling Creek Reservoir in Virginia, even with limited training data. We further show that our MC estimates correctly match the distribution of ground-truth observations, thus making the PGA paradigm amenable to physically grounded uncertainty quantification.
Introduction
Deep learning has achieved remarkable success in commercial applications, yet its adoption in scientific domains is often hindered by two primary challenges: physical inconsistency and the difficulty of reliable uncertainty quantification. Standard "black-box" neural networks are agnostic to scientific laws, often producing predictions that violate fundamental principles—such as predicting that water density decreases with depth in a stable lake environment.
Furthermore, scientific applications require robust uncertainty quantification. While techniques like Monte Carlo (MC) Dropout provide a range of possible outcomes by randomly perturbing the network, these perturbations often break any physical consistency learned during training. This "Uncertainty Paradox" results in physically nonsensical uncertainty bounds. This research introduces Physics-Guided Architecture (PGA) to resolve these issues by hard-coding scientific principles directly into the model's structure.
Methods
The authors developed the PGA-LSTM framework specifically for lake temperature modeling. This architecture enforces two critical physical laws: the non-linear relationship between temperature and density, and the monotonic increase of density with depth. Unlike previous "Physics-Guided Learning" (PGL) approaches that use soft constraints in loss functions, PGA uses hard architectural constraints.
The architecture consists of three main components:
- Temporal Feature Extraction: An LSTM-based autoencoder compresses seven days of environmental drivers (e.g., air temperature, wind, radiation) into a representative hidden state.
- Monotonicity-Preserving LSTM: This core innovation ensures physical consistency. Instead of predicting density ($Z$) at a specific depth directly, the network predicts a positive increment ($\delta$) using a ReLU activation. This increment is added to the density of the layer above ($Z_{d-1}$), ensuring that $Z_d \ge Z_{d-1}$ by construction.
- Density-to-Temperature Mapping: Final layers map these physically consistent density values back into temperature predictions.
By hard-wiring these rules, the model maintains physical integrity even when neurons are removed during MC Dropout testing.
Results and Discussion
The model was evaluated using data from Lake Mendota (WI) and Falling Creek Reservoir (VA). The PGA model demonstrated significant improvements over standard LSTM and PGL baselines:
- Accuracy and Physical Integrity: On Lake Mendota, the PGA model achieved a Test RMSE of 2.09°C, compared to 2.25°C for the standard LSTM. Crucially, the physical inconsistency metric for PGA was nearly 0.00, while the standard LSTM failed the density-depth rule 32% of the time.
- Robustness in Data Scarcity: The advantage of the PGA approach became more pronounced as training data decreased. By leveraging physical knowledge, the model requires fewer examples to generalize effectively, resisting the overfitting common in black-box models.
- Physically Grounded Uncertainty: Unlike baseline models where uncertainty often resembles random noise, the PGA model's uncertainty bounds were physically consistent and accurately enveloped ground-truth observations across all depths.
Conclusion
Physics-Guided Architecture represents a paradigm shift in theory-guided data science, moving from "telling" a model to follow rules via loss functions to "building" those rules into the model's architecture. While currently focused on monotonic constraints, this framework provides a foundation for integrating more complex physical laws—such as energy conservation—into deep learning models for climate modeling, fluid dynamics, and beyond.
Summary updated