Water

When Does Physics Injection Help? A Single-Site, Three-Month Case Study of Physics-Informed Transformer Prediction of Total Nitrogen and Total Phosphorus

Seungmin Lee, Juhwan Kim, Yeojin Kim, Yeonwuk Jung, Soojun Kim

Key points

From the paper's conclusion
  • Physics injection appeared beneficial only where the linear baseline carried target-relevant information, suggesting that the benefit is dataset-scoped rather than universal.

Abstract

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.

Read the paper

Discussion

Science Skim's AI key points, plus readers' public thoughts

Readers' thoughts

No reader thoughts yet.

Related papers