When Does Physics Injection Help? A Single-Site, Three-Month Case Study of Physics-Informed Transformer Prediction of Total Nitrogen and Total Phosphorus
Real-time prediction of total nitrogen (T-N) and total phosphorus (T-P) from in situ sensors is limited by missing values, outliers, and black-box deep models. This study evaluates when physics injection improves Transformer prediction at a single site. Six sensor channels were installed at a domestic wastewater-treatment facility and operated for three months (September–November 2025), yielding 127,261 raw records per channel with sensor gaps, interpolated onto a 5 min grid of 26,208 records. The series was cleaned by a two-stage handler (Local Outlier Factor + ±3-day rolling 3σ filter) and imputed by a physics baseline with a Random Forest residual. Hourly T-N and T-P measurements (2174 records each) served as targets and were split chronologically (70/20/10 with 3-day guards). Three Transformer variants sharing one backbone—data-only, physics-augmented, and physics-informed residual learning—were compared under identical Genetic Algorithm tuning. Imputation accuracy was high for algebraically linked variables (conductivity, TDS, resistance; r2 > 0.97) and moderate for temperature and dissolved oxygen. Variant ranking was target-dependent: data-only was best for T-N (r2 = 0.726) and residual learning for T-P (r2 = 0.492, +35% over the data-only baseline). Physics injection appeared beneficial only where the linear baseline carried target-relevant information, suggesting that the benefit is dataset-scoped rather than universal.
Authors
- Seungmin Lee (ORCID: https://orcid.org/0000-0003-3027-5876)
- Yeonwuk Jung
- Juhwan Kim
- Yeojin Kim
- Soojun Kim
Institutions
- Inha University (KR)
Publication Details
- Journal
- Water
- Published
- 2026-11-16
- DOI
- https://doi.org/10.3390/w18222857
- Primary Topic
- Water Quality Monitoring and Analysis
- Type
- article
- Field-Weighted Citation Impact
- 0.00
Funders
- Ministry of Science and ICT, South Korea