Equality-Constrained Neural Networks for Environmental Process Modeling: Application to Ozone Inactivation of Cryptosporidium
Charles Nathan Haas
Drexel University
Key points
From the paper's conclusion- Applying a mechanistically constrained machine-learning framework to 225 observations of ozone inactivation of Cryptosporidium from 16 utilities, two computational strategies for enforcing the constraint were examined.
- Leave-one-agency-out cross-validation revealed poor transferability across utilities, with rankings differing from those obtained using AICc.
- Mechanistically constrained neural networks can be integrated with environmental process models while preserving physical consistency, but information-criterion-based model selection may be misleading for grouped environmental datasets.
Abstract
Abstract Environmental engineering process models often combine governing mass balance relationships with rate expressions whose dependence on environmental conditions is incompletely understood. We present a mechanistically constrained machine-learning framework in which a feedforward neural network represents an unknown process-rate function, while parameter estimation is performed subject to an exact process constraint rather than treating the network as an unconstrained black-box predictor. Two computational strategies for enforcing the constraint were examined: reduced-space elimination of the constrained variable and simultaneous full-space optimization with log-transformed reparameterization. The latter proved to be more robust and was adopted for model development. To support reliable optimization across multiple neural-network architectures, a nested warm-start strategy was developed that exploits the hierarchical structure of the candidate architectures. The framework was applied to a dataset comprising 225 observations of ozone inactivation of Cryptosporidium collected using waters from 16 utilities spanning a range of water-quality conditions. Although larger architectures achieved progressively better in-sample fits, leave-one-agency-out cross-validation revealed poor transferability across utilities and produced rankings that differed markedly from those obtained using the small-sample-corrected Akaike information criterion (AICc). The architecture favored by AICc was among the poorest performers under blocked cross-validation, whereas the best cross-validated model ranked near the bottom of the AICc ordering. Cross-validation error was concentrated among utilities operating under temperature conditions poorly represented in the remaining dataset, and a mechanistic analysis identified a specific extrapolation failure in the constrained model when confronted with observations outside its training domain. These results demonstrate how mechanistically constrained neural networks can be integrated with environmental process models while preserving the physical consistency. More broadly, they show that information-criterion-based model selection may be misleading for grouped environmental datasets and that block-based cross-validation should be preferred when models are intended for transfer across sites, utilities, or operating conditions. A comparison against classical Chick–Watson kinetics showed that, at the present data scale, this simple fixed-form model generalized better across held-out utilities than the neural-network formulation despite a far poorer in-sample fit, indicating that the flexible model’s advantage is currently limited by data coverage rather than by the modeling approach itself and that a richer, more broadly sampled training set is the most promising route to realizing its potential for reduced predictive uncertainty.
Read the paper
Discussion · 1
Science Skim's AI key points, plus readers' public thoughts
- Applying a mechanistically constrained machine-learning framework to 225 observations of ozone inactivation of Cryptosporidium from 16 utilities, two computational strategies for enforcing the constraint were examined.
- Leave-one-agency-out cross-validation revealed poor transferability across utilities, with rankings differing from those obtained using AICc.
- Mechanistically constrained neural networks can be integrated with environmental process models while preserving physical consistency, but information-criterion-based model selection may be misleading for grouped environmental datasets.
Readers' thoughts
No reader thoughts yet.
Related papers
- An interpretable statistical surrogate of activated sludge systems that preserves mass conservation and component non-negativityDigital Chemical Engineering · 2026
- Machine learning-driven advanced oxidation processes for water pollution control: Predictive kinetics, catalyst design, and multi-objective optimization.Journal of environmental management · 2026
- Cascading evolutionary machine learning framework for micropollutants transport behaviors in nanofiltration.Water research · 2026
- A Robust Gaussian Process Paradigm for Predictive Modeling on Small Data sets in Environmental Science: A Case Study in Ballasted FlocculationEnvironmental Science & Technology · 2025
- Constraint Learning by Optimizing over Trained Neural Networks: A Pragmatic TutorialarXiv · 2026
- Physics‐constrained artificial intelligence for accelerating experimental discovery of MOFs in gas separationAIChE Journal · 2026