Source-linked AI summary
HydroSphere: A Framework for Governed, Self-Healing Wastewater Infrastructure
Prabu, Fancy C, Suresh A, Srini Ramaswamy
TL;DR
Conventional wastewater plants rely on static monitoring and control that can struggle with changing pollutant conditions. HydroSphere combines forecasting, dosing optimization, and anomaly recovery in a governed pipeline. Its evaluation uses millions of real-world measurements, while the authors characterize the system as a proof of concept with a documented dosing-reward limitation.
Problem
Conventional treatment relies on static monitoring and control that can struggle to adapt to dynamic wastewater conditions and delayed contamination events.
Source: §1 · p. 1Method
HydroSphere integrates multi-parameter forecasting, PPO-based adaptive dosing, and SHADE anomaly detection and recovery in a sequenced, governance-controlled pipeline.
Source: §1 · p. 2, A. System Architecture · p. 3Results
HydroSphere’s four-layer architecture held up under evaluation on a multi-decade, multi-country real-world dataset of 2,827,977 measurements, though the authors describe it as proof of concept.
Source: §1 · p. 2, §6 · p. 14Takeaways & Limitations
The authors present tiered governance and recovery steps as safeguards for keeping corrupted or unreliable data from driving system actions.
Source: §1 · p. 2, A. System Architecture · p. 3, F. Agentic Governance Protocol · p. 6The proof of concept’s ADOM reward does not penalize chemical overuse, and its reward improvement over the fixed-dose baseline is modest.
Source: §6 · p. 14
Abstract
from arXiv · showhide
Rapid industrialization and urban growth are increasing pressure on water quality and wastewater treatment systems, while conventional treatment plants often rely on static monitoring and control strategies that cannot easily adapt to changing pollutant conditions. This paper presents HydroSphere, a governed, data-driven framework for real-time water quality monitoring, forecasting, treatment optimization, and fault recovery. HydroSphere is evaluated using 2.82 million water-quality measurements collected between 1940 and 2023. The framework integrates three main components. First, a hybrid TCN-LSTM model performs multi-step forecasting across seven water-quality parameters, achieving an RMSE of 0.1417, MAE of 0.1047, and R2 of 0.3596. Second, the Adaptive Dosage Optimization Module uses PPO reinforcement learning to adjust chemical dosing, achieving a mean step reward of 1.059 compared with 1.017 for a fixed-dose baseline. The results also show that unconstrained reward optimization can lead to excessive dosing, demonstrating the need for explicit operational safeguards. Third, the SHADE anomaly detection module uses a deep autoencoder to identify sensor and process anomalies, achieving an F1 score of 0.651 under controlled fault injection. HydroSphere combines these capabilities with tiered governance, deterministic safety bounds, and human oversight to support safer and more adaptive water infrastructure. The framework provides a scalable foundation for intelligent wastewater management and supports the objectives of UN Sustainable Development Goals 6 and 13.
1. INTRODUCTION
HydroSphere addresses the mismatch between dynamic wastewater conditions and conventional static monitoring and dosing by combining forecasting, adaptive dosing, and anomaly recovery in one governed pipeline. The literature survey motivates this integration and describes governance as bounded, auditable autonomy.
1. INTRODUCTION
- Static dosing and periodic manual monitoring struggle with fluctuating wastewater, raising risks of regulatory noncompliance, over-dosing, and delayed responses to contamination.The cited monitoring cadence may be only every few hours, while contamination events can unfold within minutes.Source: §1 · p. 1
- TCNs capture multi-scale temporal patterns, LSTMs model longer-term relationships, reinforcement learning adapts dosing, and autoencoders can detect faults without labeled fault data.The paper presents these properties as motivating the forecasting, dosing, and anomaly-detection components.Source: §1 · p. 1
- HydroSphere links multi-parameter forecasting, PPO-based chemical dosing, and anomaly-triggered recovery in a single pipeline, with each module’s output conditioning the next.Validated sensor data feed forecasting; forecasts and live readings inform dosing; detected anomalies trigger governance-constrained recovery.Source: §1 · p. 2
- HydroSphere is evaluated on 2,827,977 real-world water-quality measurements spanning 1940–2023, drawn from a dataset covering five countries.The paper contrasts this eight-decade span with prior studies focused on single sites or shorter periods.Source: §1 · p. 2
2. LITERATURE SURVEY
- Prior work includes rule-based dosing, fuzzy control, ANN and SVM effluent prediction, and hybrid forecasting architectures.The survey says the hybrid studies reported improvements over the single-architecture models they compared.Source: §2 · p. 2
- The survey identifies a gap in governance-controlled systems integrating forecasting, autonomous dosing, and self-healing recovery, and describes SMARtAutonomy’s four bounded operating states.The states are Stable, Meta-Cognitive, Assisted, and Revoked.Source: §2 · p. 3
3. METHODOLOGY
HydroSphere strictly sequences sensor validation, forecasting, and dosing across four pipeline layers. Its compute placement and synchronization boundaries are designed to keep unvetted readings and forecasts from reaching downstream decisions.
A. System Architecture
- The four-layer pipeline collects sensor readings, screens them through SHADE, generates six-step TCN-LSTM forecasts over a rolling 24-step window, then uses forecasts and validated state for PPO dosing.SHADE’s pass/correct/flag verdict is a synchronous blocking step before a reading advances.Source: A. System Architecture · p. 3
- Hard layer boundaries prevent forecasts from using unvetted readings and dosing decisions from using unvetted forecasts, allowing governance states to intervene before corrupted signals reach actuators.This is the stated purpose of the synchronization points.Source: A. System Architecture · pp. 3–4
- TCN-LSTM inference runs on a shared cloud GPU, while SHADE runs on an edge gateway near sensors; MQTT/LoRaWAN carries sensor data.The paper assigns forecasting to a latency-tolerant, capacity-heavy cloud backend and edge detection to minimize delay and retain operation if cloud connectivity drops.Source: A. System Architecture · p. 4
B. Dataset and Preprocessing
The study evaluates HydroSphere on an extensive multi-country water-quality dataset and defines a preprocessing pipeline before describing a hybrid TCN-LSTM forecaster. The model uses causal convolutions and recurrent layers to produce a multi-step forecast from each rolling input window.
B. Dataset and Preprocessing
- The dataset contains 2,827,977 measurements from five countries across 80 years for pH, BOD, DO, Ammonia, Nitrate, Temperature, and Nitrogen.The paper notes the long period distinguishes it from studies focused on one site or a short interval.Source: B. Dataset and Preprocessing · p. 4
- The CCME WQI is the treatment-efficiency target, aggregating scope, frequency, and amplitude into a single 0–100 score.This provides a unified target rather than separately tracking all seven raw parameters.Source: B. Dataset and Preprocessing · p. 4
- Rows with more than 50% missing values are dropped because imputing most of a record could introduce noise and imputation artifacts.Remaining missing values are filled with column-wise medians, chosen for robustness to outliers and skew.Source: B. Dataset and Preprocessing · p. 4
- Feature-scaling statistics are fitted only on the training partition to avoid exposing validation or test-period information and producing optimistic generalization error.The passage specifically cautions against fitting Min-Max parameters on the full time-series dataset.Source: B. Dataset and Preprocessing · p. 4
C. Hybrid TCN-LSTM Model
- The forecaster stacks dilated causal convolutions with a two-layer LSTM, then projects the final hidden state into a six-step forecast.The TCN receptive field is 29 timesteps for a 24-step input window; predicting all steps at once avoids compounding autoregressive error but does not condition later steps on earlier ones.Source: C. Hybrid TCN-LSTM Model · p. 4
D. Adaptive Dosage Optimization Module (ADOM)
ADOM formulates chemical dosing as a continuous-action control problem and trains a PPO policy against a fixed-dose baseline. The current proof-of-concept reward has an over-dosing limitation, while the proposed scalarization adds explicit cost and dose-volatility terms.
D. Adaptive Dosage Optimization Module (ADOM)
- The dosing problem is modeled as a continuous-action MDP with γ = 0.99, and the state combines normalized values for all seven water-quality features with dose level.The long horizon is intended to account for stability over the treated period rather than only short-term reward.Source: D. Adaptive Dosage Optimization Module… · p. 4
- The PPO agent is trained for 200,000 timesteps and benchmarked against a fixed-dose baseline of 0.5.The target dose is state-dependent, rising as measured efficiency falls and clipped to avoid physically implausible extremes.Source: D. Adaptive Dosage Optimization Module… · p. 5
- The current reward does not penalize chemical overuse because it rewards proximity to a high target dose without accounting for cost, environmental impact, or mechanical consequences.The passage identifies this as a limitation demonstrated empirically in the Results section.Source: D. Adaptive Dosage Optimization Module… · p. 5
- The proposed multi-objective scalarization rewards treatment efficiency, penalizes dose cost, and uses a quadratic volatility term to discourage erratic dose swings.Operators can tune the weights at runtime without retraining, rebalancing treatment aggressiveness, cost, and hardware wear.Source: D. Adaptive Dosage Optimization Module… · p. 5
E. Self-Healing Anomaly Detection Engine (SHADE)
SHADE maps anomaly severity to progressively more constrained responses, from autonomous smoothing to human-supervised dosing and a hard failsafe.
E. Self-Healing Anomaly Detection Engine (SHADE)
- SHADE uses a 64→16→4 autoencoder bottleneck and sets anomaly threshold τ at the 95th percentile of clean-training reconstruction errors.Inputs deviating from the learned normal-behavior structure produce larger reconstruction errors.Source: E. Self-Healing Anomaly Detection… · p. 5
- At e(x) < τ, Stable State treats operation as normal, with standard multi-objective reward and no alerts or recovery actions.This is the system's default, unencumbered operating mode.Source: E. Self-Healing Anomaly Detection… · p. 5
- At τ ≤ e(x) < 2τ, Meta-Cognitive State retains full autonomy and smooths transient sensor spikes with a 10-step rolling mean while dosing continues.The agent treats elevated reconstruction error as a low-severity disturbance.Source: E. Self-Healing Anomaly Detection… · p. 5
- At 2τ ≤ e(x) < 3τ, features are clamped to μ ± 3σ, an asymmetric barrier penalty activates, and an operator must validate further action.The penalty prevents autonomous overdosing beyond τsafe while the agent continues to act.Source: E. Self-Healing Anomaly Detection… · p. 5
- At e(x) ≥ 3τ, SHADE bypasses the RL reward, disconnects the agent from actuators, and defaults dosing to zero until an operator resets the system.Recovery actions are logged for regulatory audit.Source: E. Self-Healing Anomaly Detection… · p. 5
F. Agentic Governance Protocol
HydroSphere supplements SHADE's tiered recovery with safeguards for unsafe doses, missing sensor data, and emergency-stop decisions. These safeguards bound autonomy through physical limits, sensing checks, and human oversight.
F. Agentic Governance Protocol
- A physics-based hard interlock clips PPO output to Dmax, which is set by deployment-specific pipe capacity and chemical safety regulations.Dmax is fixed by engineering and regulation, not learned or adjustable by the RL agent.Source: F. Agentic Governance Protocol · p. 6
- A timestamp-based sensor health monitor detects stale critical pH, DO, or BOD channels, demotes operation to Assisted State, and holds the last known safe dose.SHADE cannot detect a channel that stops transmitting because absent data produces no reconstruction error.Source: F. Agentic Governance Protocol · p. 6
- Tier 3 alerts an operator and waits for a response before defaulting to the zero-dose mechanical failsafe if no response arrives within Twait.The countdown allows a human to intervene with situational context the system may lack.Source: F. Agentic Governance Protocol · p. 6
- Three independent safeguards bound HydroSphere's autonomy at the physical, sensing, and human-oversight layers, beyond SHADE's tiered detection logic.They address gaps a reactive anomaly-detection layer cannot cover alone.Source: F. Agentic Governance Protocol · p. 6
4. RESULTS
The three HydroSphere modules were evaluated on real Figshare water-quality data, with no synthetic or augmented data used.
4. RESULTS
- The evaluation covered all three modules: Hybrid TCN-LSTM forecasting, ADOM dosage control, and SHADE anomaly detection.The experiments used real data from the Figshare Comprehensive Surface Water Quality Monitoring Dataset.Source: §4 · p. 6
- The dataset contained 2,827,977 observations for training and testing the modules.Source: §4 · p. 6
- No synthetic or augmented data was added during training or evaluation, so reported metrics reflect performance on authentic, unseen water-quality measurements.Source: §4 · p. 6
A. TCN-LSTM Forecasting Performance
The TCN-LSTM forecasts six steps from a 24-step look-back and shows stable validation behavior on real water-quality data. Its reported error metrics accompany qualitative evidence of trajectory tracking, while the narrow, right-skewed target calls for interpreting R² alongside other metrics.
A. TCN-LSTM Forecasting Performance
- The model was trained for 40 epochs on 99,971 overlapping sequence pairs from a 100,000-row real-data subsample, using a 24-step look-back and 6-step forecast window.An 80/20 temporal split was used to avoid data leakage, and the best checkpoint was selected by minimum validation MSE.Source: A. TCN-LSTM Forecasting Performance · p. 6
- Training loss fell from MSE 0.02571 to 0.02029, while validation loss moved from 0.02301 to 0.02008; both curves converged without reported overfitting.The validation loss tracked closely with training loss over 40 epochs.Source: A. TCN-LSTM Forecasting Performance · p. 7, Figure 1 · p. 7
- RMSE was 0.1417, MAE was 0.1047, and R² was 0.3596 on the forecasting evaluation.The target is highly right-skewed, with mean efficiency 0.918 and many observations in [0.85, 1.00], which the paper identifies as relevant context for R².Source: A. TCN-LSTM Forecasting Performance · p. 7
- The 6-step sample forecast compares actual and predicted treatment-efficiency sequences, and the reported trajectories preserve shape and approximate timing.The paper presents this qualitative check as complementary to aggregate validation metrics.Source: A. TCN-LSTM Forecasting Performance · pp. 7–8, Figure 2 · p. 7
- The TCN-LSTM's directional fidelity extends across the six-step horizon, with later-step directionality attributed to information from the full look-back rather than the model's earlier predictions.The forecast is produced in one pass from the LSTM's final hidden state, not autoregressively.Source: A. TCN-LSTM Forecasting Performance · p. 8
- MSE was 0.0201, MAE was 0.1047, and (1−R²) was 0.6404; the paper cautions that the high unexplained-variance value reflects the narrow, right-skewed target rather than high absolute error.The paper recommends interpreting the four metrics in combination rather than relying on any one individually.Source: A. TCN-LSTM Forecasting Performance · p. 8, Figure 3 · p. 8
B. ADOM Reinforcement Learning Performance
ADOM’s PPO agent earned a higher mean step reward than fixed dosing, but its unconstrained policy converged toward near-maximum dosing and substantially higher chemical cost. The results motivate deployment safeguards that penalize dose swings and let operators adjust priorities at runtime.
B. ADOM Reinforcement Learning Performance
- Episode reward rose from approximately 7,000 to a peak of approximately 68,000 by Episode 2, then varied between roughly 18,000 and 52,000.The authors associate the early rise with learning to track the state-dependent target dose; they note that a longer run is needed to assess stabilization.Source: B. ADOM Reinforcement Learning… · p. 9
- 1.0591 mean step reward for PPO versus 1.0172 for the fixed-dose baseline over the 1,000-step evaluation.The comparison used matched water-quality observations for both policies.Source: B. ADOM Reinforcement Learning… · p. 9, Table 2 · p. 9
- The deployment reward adds a quadratic dose-volatility penalty and operator-tunable weights, allowing runtime priority changes without retraining while retaining hard safety interlocks.The volatility term penalizes large dose swings; changing weights cannot authorize an unsafe dose.Source: B. ADOM Reinforcement Learning… · p. 10
- PPO increased dosing during pollution excursions while fixed dosing stayed nearly unchanged, but PPO’s dose remained near-maximum even during cleaner stretches.The aligned Figure 5 trajectories compare dose level above per-step reward over the evaluation.Source: B. ADOM Reinforcement Learning… · p. 10, Figure 5 · p. 10
- $847.82 PPO chemical cost versus $425.00 for fixed dosing over 1,000 steps, with mean doses of 0.997 and 0.500, respectively.Both agents were evaluated at the same cost rate; the passage attributes the gap to dosing behavior.Source: Figure 6 · p. 10, B. ADOM Reinforcement Learning… · p. 11
- The unconstrained reward formulation did not penalize chemical cost, allowing a high-dose policy with nearly doubled cost and potential operational consequences.The ablation was presented as evidence that a well-trained agent can converge to an operationally unsafe policy.Source: B. ADOM Reinforcement Learning… · pp. 8–11
C. SHADE Anomaly Detection Performance
SHADE detects anomalies from reconstruction errors learned by an autoencoder and pairs detection with tiered recovery actions. Its evaluation uses controlled fault injection, so aggregate detection and recovery frequencies require that context.
C. SHADE Anomaly Detection Performance
- Training on 80,000 rows and evaluating on 2,827,977 rows with 5% controlled fault injection separates model fitting from full-dataset assessment.The 50-epoch autoencoder reached a minimum validation MSE of 0.000082; reconstruction errors above the 95th-percentile threshold are flagged without labeled fault examples during training.Source: C. SHADE Anomaly Detection Performance · pp. 11–12
- F1 score 0.651 measures SHADE detection on injected faults, but the aggregate does not establish meaningful detectability differences across fault severities.The evaluation uses three severity levels; the 95th-percentile threshold was designed to flag 5% of samples as anomalous.Source: Table 3 · p. 11, C. SHADE Anomaly Detection Performance · p. 12
- Larger sensor-spike and critical-fault deviations produce larger reconstruction errors and are detected with greater confidence than lower-severity process drift.The process-drift error distribution partly overlaps the normal tail, making those anomalies harder to distinguish.Source: C. SHADE Anomaly Detection Performance · p. 12
D. SHADE Self-Healing Recovery Analysis
- Across 141,399 detected anomalies, recovery actions were Sensor Recalibration 59.1%, Emergency Stop 30.8%, and Setpoint Reset 10.1%.Recalibration substitutes a rolling-window mean; setpoint reset clamps features to rolling μ ± 3σ and alerts an operator; emergency stop suspends dosing and prompts urgent maintenance.Source: D. SHADE Self-Healing Recovery Analysis · pp. 12–13, Figure 9 · p. 12, Table 4 · p. 12
- Emergency Stop accounts for 30.8% of recovery actions, reflecting the deliberately included critical-fault share rather than necessarily the real-world base rate.Fault injection included a representative proportion of critical-severity faults to test the recovery engine across the severity spectrum.Source: D. SHADE Self-Healing Recovery Analysis · p. 13
- Setpoint Reset accounts for 10.1% of actions, representing the intermediate-severity tier between routine recalibration and emergency shutdown.The authors describe this relatively small Tier 2 band as supporting a three-tier rather than two-tier recovery design.Source: D. SHADE Self-Healing Recovery Analysis · p. 13
E. Live Inference Validation
HydroSphere was run end to end on five representative samples spanning clean to critically polluted water. The reported detections, recovery actions, and dosing recommendations varied consistently with sample water quality.
E. Live Inference Validation
- The five-sample evaluation passed each sample through the complete pipeline autonomously, without manual intervention.The samples covered the contamination spectrum and all three SHADE anomaly severity levels.Source: E. Live Inference Validation · pp. 13–14
- Across five samples, clean readings were classified Normal, mild drift triggered Setpoint Reset, and severely polluted readings triggered Emergency Stop.The critical samples had reconstruction errors 8.8× and 34.4× above threshold; the mildly elevated-BOD sample was just above threshold at 0.000519.Source: E. Live Inference Validation · p. 13, Table 5 · p. 13
- Recommended doses decreased from 0.734 for the cleanest sample to 0.623 for the most severely polluted sample.The authors report that the dose recommendations decrease monotonically as water quality improves.Source: E. Live Inference Validation · p. 13
5. DISCUSSION
The discussion reports forecasting and dosing results alongside a hazard-weighted error measure and SHADE recovery outcomes. It also identifies excessive dosing under the current reward as a deployment concern.
5. DISCUSSION
- The TCN-LSTM achieved R²=0.3596, RMSE=0.1417, and MAE=0.1047; the custom wMAE was 0.1948 versus standard MAE 0.1047.The weighted measure applies α=2 to underpredicted pollution events and α=1 to false positives, encoding asymmetric environmental risk.Source: §5 · p. 14
- The PPO agent improved mean reward by 4.1% over the fixed-dose baseline, but converged to mean dose 0.997 and cost $847.82 versus $425.00.The authors characterize the current reward as proof-of-concept because it permits high-dose convergence.Source: §5 · p. 14
- The discussion identifies a volatility penalty as a safeguard against unstable dose swings that could affect pump and valve hardware.Its weights are described as operator-tunable at runtime without model retraining.Source: §5 · p. 14
- SHADE achieved F1=0.651 and executed 141,399 tiered recovery actions across the 2.82 million-record evaluation.The reported framework outcomes are presented as supporting a scalable, interpretable, and operationally grounded wastewater-management solution.Source: §5 · p. 14
6. CONCLUSION
HydroSphere reports three evaluated modules on 2,827,977 measurements from 1940–2023, but frames the system as a proof of concept rather than deployment-ready. Reward redesign and governance implementation are identified as safety-critical next steps for live infrastructure.
6. CONCLUSION
- RMSE=0.1417, MAE=0.1047, and R²=0.3596 for Hybrid TCN-LSTM; ADOM-PPO improved mean reward by 4.1% over a fixed-dose baseline; SHADE achieved F1=0.651 with 141,399 autonomous tiered recovery actions.The framework was trained exclusively on 2,827,977 real water-quality measurements from 1940–2023.Source: §6 · p. 14
- HydroSphere is a proof of concept, not deployment-ready: the ADOM reward does not penalize chemical overuse, and its absolute reward improvement over the fixed-dose baseline is modest.These limitations are presented as concrete next steps rather than fundamental architectural limitations.Source: §6 · p. 14
- Reward redesign and Agentic Governance Protocol implementation are the most safety-critical future work because they determine whether live-system autonomy stays bounded by deterministic, physics-based, and human-oversight safeguards.Other future directions include full-dataset GPU training, federated learning across plants, and edge IoT deployment.Source: §6 · p. 14
- HydroSphere is presented as a reproducible contribution aligned with UN SDG 6 and SDG 13, with tiered human-in-the-loop governance offered as a template for introducing autonomy into safety-critical public infrastructure.Source: §6 · p. 14