Optimizing Chlorination in Water Distribution Systems via Surrogate-assisted Neuroevolution

Rivaaj Monsia, Daniel Young, Olivier Francon, Risto MiikkulainenarXiv 2026 · DOI

TL;DR

This paper introduces a surrogate-assisted neuroevolution framework to optimize chlorine injection in water distribution systems (WDS), balancing microbial safety against the risks of toxic chemical byproducts. By combining the Evolutionary Surrogate-Assisted Prescription (ESP) framework with multi-objective NEAT and curriculum learning, the authors successfully bypass the computational bottlenecks of traditional hydraulic simulators. The resulting control policies significantly outperform standard reinforcement learning methods like PPO, providing a diverse set of practical, Pareto-optimal strategies for real-world deployment.

What Problem Does This Paper Address?

Providing clean, safe drinking water to growing urban areas requires complex Water Distribution Systems (WDS). To keep water safe from harmful microbes, utilities inject disinfectants like chlorine. However, maintaining the right chlorine balance is incredibly difficult: too little chlorine allows dangerous pathogens to thrive, while too much leads to the formation of carcinogenic disinfection byproducts.

Optimizing this process is a massive control challenge. WDS dynamics are highly non-linear, noisy, and spatiotemporally delayed due to varying consumer demands and pipe topologies. While accurate physics-based simulators like EPANET exist, they are computationally heavy and far too slow to be used directly in the iteration loops required by modern machine learning or reinforcement learning (RL). This paper tackles the dual challenge of eliminating this computational bottleneck while optimizing multiple conflicting objectives (e.g., minimizing cost vs. maximizing safety).

Methods

The authors implement the Evolutionary Surrogate-Assisted Prescription (ESP) framework, which splits the problem into two co-optimized components: a predictor (surrogate model) and a prescriptor (the controller).

Figure 2: The outer loop of the Evolutionary Surrogate- assisted Prescription (ESP) algorithm [13]. The predictor and prescriptor are co-optimized to guide learning of both mod- els synergistically, encouraging innovation and regularizing the resulting policies.
  1. Knowledge-Distilled Surrogate Model: To replace the slow EPANET simulator, they train a causal, single-layer LSTM student network. To ensure high accuracy over long horizons, the student is trained via knowledge distillation from a high-capacity, non-causal bidirectional LSTM "teacher" that has access to limited future context. The surrogate predicts incremental changes ($\Delta_t$) in water quality rather than raw values, which stabilizes autoregressive rollouts.
  2. Multi-Objective Neuroevolution (NEAT + NSGA-II): Instead of standard RL, the control policies (prescriptors) are represented as neural networks evolved using NEAT (Neuroevolution of Augmenting Topologies). The networks are optimized across four distinct objectives using NSGA-II: minimizing total chlorine used (cost), minimizing safety bound violations, maintaining spatial fairness (homogeneous concentration), and ensuring temporal smoothness of injections.
  3. Curriculum Learning: Rather than forcing the networks to learn all four objectives at once—which often leads to poor local optima—the authors introduce the objectives sequentially (starting with bounds and fairness, then adding smoothness, and finally cost).

Datasets

The framework was trained and evaluated using data from the AI for Drinking Water Chlorination Challenge (IJCAI 2025).

  • Topology: A fixed WDS network featuring 5 chlorine booster stations (injection nodes), 17 monitoring sensors, and 2 flow-measurement pipes.
  • Training Data: 90 distinct 3-day simulation scenarios generated via the EPyT Python toolkit (an interface for EPANET), featuring varying consumer demands, seasonal reaction dynamics, and initial uniform random chlorine injections.
  • Evaluation Data: A completely held-out 3-day scenario that included unannounced, random contamination events to test the robustness of the controllers.

Key Insights and Ideas

  • Standard RL and Single-Objective Evolution Collapse: Off-the-shelf PPO and single-objective NEAT completely failed on this task. Because the composite reward landscape is highly noisy, these algorithms quickly collapsed into a lazy local optimum—injecting virtually zero chlorine to minimize cost and maximize smoothness, at the expense of safety.
  • Objective Ordering Matters: The success of curriculum learning depends heavily on which objectives are paired first. Initializing evolution with adversarial objectives (like bound violations and cost) caused the model to fail. However, pairing synergistic objectives first (like fairness and cost) allowed the networks to discover highly effective, safe policies before fine-tuning for stricter constraints.
  • Automatic Regularization Effect: A fascinating byproduct of the ESP framework is that co-optimizing the surrogate and the controller creates a natural smoothing effect. The evolved controllers pressure the surrogate to generate smoother state predictions, which in turn helps the controller inject chlorine more evenly over time.

Key Results

The curricular NSGA-II framework successfully generated a diverse Pareto front of viable control policies, easily outperforming the baselines.

Pairwise population fronts show the gradual formation of the Pareto front as objectives are added.
  • Vs. Constant High Injection (250 mg/L): The curricular NSGA-II agent achieved a similar reduction in infection risk during contamination events while cutting safe boundary violations by ~40%.
  • Vs. Non-Curricular NSGA-II: Introducing the curriculum improved the infection risk mitigation by nearly 30%, while simultaneously delivering a 5x improvement in fairness and a 4x improvement in injection smoothness.

Limitations and Future Work

While highly promising, the authors note a few limitations:

  • Short Simulation Horizons: The training and evaluation scenarios were restricted to 3-day windows. Real-world WDS operations face seasonal shifts spanning months or years, which the current surrogate might struggle to predict.
  • Topology Constraints: The method was only validated on a single network topology. Future work must verify if these surrogate models can generalize across diverse, real-world municipal water grids.
  • Lack of Explicit Spatial Heuristics: The current networks treat inputs globally; incorporating graph neural networks (GNNs) or multi-agent communication protocols could drastically speed up learning in larger networks.

Summary updated

BibTeX
@misc{monsia2026optimizing,
  author = {Rivaaj Monsia and Daniel Young and Olivier Francon and Risto Miikkulainen},
  title = {{Optimizing Chlorination in Water Distribution Systems via Surrogate-assisted Neuroevolution}},
  year = {2026},
  eprint = {2602.07299},
  archivePrefix = {arXiv},
  url = {https://arxiv.org/abs/2602.07299},
}
Figure