Pith. sign in

REVIEW 4 major objections 4 minor 24 references

Application of Soft Actor-Critic Algorithms in Optimizing Wastewater Treatment with Time Delays Integration

T0 review · 4 major / 4 minor · reviewed 2026-08-12 · deepseek-v4-flash

Pith's one-line read A delay-aware Soft Actor-Critic agent cuts phosphorus emissions by 36 percent and total costs by 9 percent versus PID control in a simulated wastewater treatment plant.

desk verdict The delay-aware SAC result is the real contribution, but the headline gains over PID are inflated by an open-loop historical baseline and a one-day simulation, so the paper needs a proper closed-loop comparator before the central claim is credible. read the letter →

arxiv 2411.18305 v1 pith:6OMGBEE3 submitted 2024-11-27 eess.SY cs.AIcs.LGcs.SY

classification eess.SYcs.AIcs.LGcs.SY
keywords deepreinforcementlearningSoftActor-CritictimedelaysLSTMsimulatorwastewatertreatmentphosphorusremovalprocesscontrolPIDcomparison
verification ladder T0 review T1 audit T2 compute T3 formal

The pith

A machine-rendered reading of the paper's core claim, the machinery that carries it, and where it could break.

The reading

This paper claims that a Soft Actor-Critic reinforcement learning agent, trained on an LSTM-based simulator that reproduces the delayed feedback of a wastewater treatment plant, can control chemical phosphorus removal better than the plant's existing PID controller. Training the agent under random action and observation delays produced the strongest policy: in the simulated environment it reduced phosphorus emissions by 36 percent, lowered deviation from the regulatory target by 77 percent, improved cumulative reward by 55 percent, and cut total operational costs by 9 percent relative to the historical PID trace. The authors care because wastewater plants are slow, nonlinear, and subject to stochastic delays, so reactive PID controllers tend to overshoot or undershoot the phosphate target, and a controller that anticipates delays could reduce environmental risk while saving on chemical and tax costs.

What carries the argument

The machinery has three parts. The learning core is Soft Actor-Critic, an off-policy maximum-entropy actor-critic algorithm that maximises expected reward plus a policy-entropy term, giving stable exploration in continuous action spaces. The environment is a Gym-style simulator whose transition model is an LSTM trained on two years of logged plant data to predict the next state from the current state, the two metal-salt dosing actions, and exogenous variables; it supplies the multi-step state predictions that make delay training feasible. The delay handling is a set of wrappers, inspired by the random-delay Markov decision process literature, that append an action buffer and delay indicators to the observation so the agent can see which action is actually taking effect and how old its state information is.

What would settle it

Take the plant's logged dataset and, for each logged state-action pair, replay the action through the LSTM and compare its multi-step prediction against the state actually recorded at the corresponding future time, focusing on time steps where the dosing action lies in the upper tail of the historical distribution; if the prediction error grows with action novelty, the reported 36 percent emission reduction is not a stable result. A stronger test is a closed-loop trial in which the trained random-delay SAC policy sets the salt doses at the real plant for several weeks and effluent phosphate is compared with the PID baseline over the same inflow conditions.

Watch

Extended reading notes

Core claim

The central discovery, as the authors state it, is that explicitly modelling stochastic delays makes a Soft Actor-Critic policy qualitatively better at the phosphorus removal task than either a delay-unaware SAC agent or the PID controller currently logged at the plant. The random-delay agent learned to hold effluent phosphate close to the target with fewer oscillations, and it did so while slightly lowering combined chemical and tax costs compared with PID. The paper is careful to frame this as a simulated result: the comparison runs the same historical exogenous inputs through an LSTM predictor for both the PID actions and the SAC actions, and the PID actions are reconstructed from the historical log rather than obtained from a live controller. A secondary result is that the reward structure matters: with a non-linear penalty that grows steeply above the target concentration, the delay-aware agents trade some chemical cost for much lower regulatory deviation.

Load-bearing premise

The load-bearing premise is that the LSTM simulator, trained on historical plant data, predicts the next plant state accurately for the dosing actions the SAC policies choose, including actions outside the range the historical PID controller used, so the head-to-head comparison measures the controllers rather than the simulator's errors.

Editorial extensions

If this is right

  • Delay-unaware SAC agents underperform even the logged PID controller on cost, so any RL deployment at a similar plant should train with explicit delay modelling rather than on an idealised, delay-free environment.
  • Random-delay training appears to dominate constant-delay training, suggesting that stochastic delay ranges, not just worst-case fixed delays, should be part of the training distribution.
  • A policy trained on the LSTM simulator can keep effluent phosphate within regulatory limits while using less chemical and paying less phosphorus tax than the existing controller, which is the combination a plant operator actually wants.
  • The reward function with a steep non-linear penalty is what makes the agent choose compliance over raw cost minimisation, so the reward design is as load-bearing as the algorithm.

Reading between the lines

Editorial extensions of the paper, not claims the author makes directly.

  • A natural next step the paper leaves implicit is a closed-loop trial at the plant, since the simulated head-to-head cannot certify how the LSTM behaves on dosing actions the historical PID never took.
  • The same delay-randomisation recipe could transfer to other slow industrial dosing loops, such as coagulation, pH correction, or chemical precipitation, where stochastic sensor and actuator lag is the main control obstacle.
  • Because the delay-aware agent outperformed the delay-unaware one, adding random delay during training may act as a form of domain randomisation that regularises the policy; testing that hypothesis would require an ablation where only the delay distribution changes.
Share X Bluesky LinkedIn Reddit HN

Editorial analysis

A structured set of objections, weighed in public.

Desk editor's note, referee report, and a circularity audit.

Referee Report

4 major / 4 minor

Summary. The paper applies the Soft Actor-Critic (SAC) algorithm to phosphorus removal control in a wastewater treatment plant (WWTP), using a custom LSTM-based simulator to model plant dynamics. The authors train SAC agents under three delay scenarios (no delay, constant delay, random delay) and compare the best agents against the existing plant PID controller. The headline results—reported in the abstract and Section 5.2—are that the random-delay agent achieves 36% lower phosphorus emissions, 55% higher reward, 77% lower target deviation, and 9% lower total costs relative to PID in the simulated environment. The comparison is performed by replaying historical PID actions through the LSTM simulator, as described in Section 3.6.

Significance. If the results are sound, the paper would provide a useful demonstration that delay-aware deep reinforcement learning can improve regulatory compliance and cost efficiency in a realistic WWTP control task. The manuscript is clearly written, the problem is well motivated, and the use of a simulator built from plant data is a sensible first step. However, the evaluation methodology as presented has load-bearing weaknesses: the PID baseline is not a closed-loop controller in the simulator, the LSTM simulator's generalization to SAC action sequences is not validated, and the results rest on a single evaluation day and single run. These issues prevent the current version from supporting the quantitative claims made in the abstract and conclusions.

major comments (4)
  1. [Section 3.6, Table 2, Figure 5] The PID baseline is an open-loop replay of historical actions, not a closed-loop controller interacting with the simulated plant. The paper states in Section 3.6 that the real PID controller was not accessible and that the PID actions were taken directly from the dataset. Once the LSTM simulator's trajectory diverges from the historical trajectory—which it must for any nontrivial action sequence—the replayed PID action at time t+1 is conditioned on a state different from the simulator's state at t+1, while SAC actions are generated online from the simulated state. This biases the comparison in favor of SAC. The authors need to provide either a closed-loop PID baseline (e.g., a tuned PID implemented in the simulator) or demonstrate that the LSTM exactly reproduces the historical state trajectory under historical actions, so that the replay is faithful. Without this, the 36%/55%/77%/9% improvements cannot be attributed to policy quality.
  2. [Section 3.2, Section 4.2] The LSTM simulator's accuracy for the action sequences generated by the trained SAC policies is not validated. The simulator was trained on historical plant data, and SAC policies may produce dosing actions outside the historical distribution. The paper refers to prior work [11,12,13] for simulator development, but provides no error analysis, no multi-step prediction accuracy measures, and no sensitivity analysis with respect to action ranges in this manuscript. Since every head-to-head result in Table 2 and Figure 5 is computed inside this simulator, the authors should validate the simulator's multi-step predictions on action sequences similar to those produced by SAC (e.g., by comparing predicted versus actual plant responses on held-out data, or by reporting prediction errors for out-of-distribution actions). Without this, the reported gains may be artifacts of simulator inaccuracy.
  3. [Section 4.2, Figure 5, Table 2] The evaluation appears to rely on a single day (September 15, 2022) and a single run without error bars or multiple seeds. Figure 5 shows one trajectory and Table 2 reports one set of totals. Given the stochasticity in SAC training and in the random-delay environment, the reported improvements could be the result of a favorable seed or a particular day. The authors should report results across multiple evaluation days and multiple training seeds, with means and standard deviations, before drawing conclusions about the relative performance of SAC-RD and PID.
  4. [Section 3.3.3, Eq. (13)] The nonlinear penalty function Pcoef(x) = a·e^{z·x+c} + d contains shape parameters a, z, c, and d, but their numerical values are never reported, and no sensitivity analysis is provided. Since the reward function in Eq. (13) is the criterion on which all agents are compared, the ranking of SAC-RD, SAC-CD, SAC-ND, and PID may depend on these parameters. The authors should report the parameter values and test the robustness of the comparison to reasonable variations of these parameters.
minor comments (4)
  1. [Algorithm 1, line 17] The sampling statement 'κt ∼ DiscreteUniform(αmin, κmax)' appears to contain a typo; 'αmin' should likely be 'κmin'.
  2. [Section 2.1 and Section 3.5.1] The notation for observation delay is inconsistent: Eq. (1) uses d_s, while Section 3.5.1 uses ω. Please unify the notation.
  3. [Abstract and Table 2] The abstract reports a '36% reduction in phosphorus emissions,' but Table 2 does not contain an explicit 'emissions' metric; this appears to refer to 'Avg. Target' (average phosphorus concentration). Please define the metric explicitly and ensure the abstract matches the table.
  4. [References] References [21] and [24] are duplicate entries for the same PyTorch paper; consolidate them.

Circularity Check

2 steps flagged · score 5.0 of 10

The headline SAC-vs-PID gains are partly constructed by the replay-PID baseline and an LSTM simulator imported from the authors' prior work, rather than by an independent closed-loop comparison.

  1. fitted input called prediction [Section 3.6 (Eq. 17), used in Section 4.2 and Table 2]
    "Specifically, for a given input sequence, we assumed that the PID controller would make the same decisions as it did historically for the corresponding state. ... The actions of both the PID controller and SAC agents were then sent to the custom simulator, which produced the next state of the system, enabling a side-by-side evaluation of their performance."

    The PID baseline is not a closed-loop controller on the simulator: it is a fixed array of historical plant actions aPID,t retrieved from the dataset (Eq. 17). SAC actions, by contrast, are generated online from the simulated state. Any divergence between the LSTM's state trajectory and the historical plant trajectory is therefore attributed to PID, while SAC is allowed to react to the simulator's own state. The reported 36%/55%/77%/9% improvements are thus built into the baseline construction rather than derived from a fair controller comparison; the 'prediction' that PID has high target deviation is essentially the historical deviation replayed through the fitted simulator.

  2. self citation load bearing [Section 1 (Introduction) and Section 3.2]
    "Control policies were trained on a state-of-the-art simulator employing Long Short-Term Memory (LSTM) networks, which were previously trained and enhanced for multi-step simulations in prior studies [11, 12, 13]. ... A refined version of the LSTM model, enhanced for more accurate multi-step simulations as described in [11, 12, 13], was employed as a predictor to forecast the system’s next state."

    The central evaluation environment is the authors' own LSTM simulator, whose accuracy for the closed-loop, out-of-distribution action sequences produced by SAC is asserted only by self-citation to [11,12,13]. No external plant-data validation is provided in this paper for those simulated trajectories. Because all head-to-head conclusions are generated inside this simulator, the central claim is, as presented, a property of the authors' modeling pipeline: the simulator is both the training environment and the benchmark, and its validity for the tested actions is imported from prior self-cited work rather than demonstrated here.

full rationale

The paper's strongest quantitative claims all come from Section 4.2's comparison of SAC agents against a PID baseline inside an LSTM simulator. Two construction choices make the comparison partially self-referential. First, the PID 'controller' is a historical action replay (Section 3.6), not a policy closing the loop on the simulated state; the paper even states the real PID was not accessible and that the historical decisions were assumed to hold. Feeding the same fixed historical actions to the simulator while letting SAC react to simulated states biases the result against PID. Second, the simulator itself is adopted from the authors' prior works [11,12,13] without in-paper validation for the SAC-generated control sequences, so the benchmark is the same modeling pipeline that produced the agents. These issues do not make the SAC training algorithm circular in the mathematical sense, and part of the result is a legitimate demonstration that a reward-optimizing policy can beat a non-optimizing replay baseline in a learned environment. However, the headline numbers are not an independent, externally grounded comparison; they reduce largely to the replay-PID construction and self-cited simulator. Score 5 reflects partial, but not total, circularity.

Assumptions & free parameters 3 free parameters · 4 assumptions · 0 invented entities

The central claim rests on assumptions that are either inherited from prior self-authored work or chosen by hand for this study: the LSTM simulator is the ground truth, the historical PID trace is the baseline, and the nonlinear penalty plus delay ranges define the learning problem. No external physical plant validation is provided.

free parameters (3)
  • Nonlinear penalty shape parameters a, z, c, d = not reported
    In Eq. 12, chosen by hand to make the penalty mild below the target and steep above it. These values shape the reward and therefore the rank ordering of agents, but are not specified in the paper.
  • Action delay range (kappa_min, kappa_max) = not reported
    Used in Algorithm 1 for constant and random delay scenarios. The ranges determine the stochastic delay conditions the agent is trained under, but no numeric values are given.
  • Observation delay range (omega_min, omega_max) = not reported
    Same as above. The observation delay sampling range is never specified.
assumptions (4)
  • domain assumption The LSTM model trained on historical plant data accurately predicts next states for the action sequences used in evaluation, including those from SAC.
    Section 3.2 describes the LSTM as the environment's predictor; Section 4.2 uses it as ground truth for the PID vs SAC comparison.
  • domain assumption The logged historical actions faithfully represent the current PID controller's policy for the simulated state trajectories.
    Section 3.6 states the real PID controller was not accessible and historical actions were assumed to be the PID response for the same states.
  • domain assumption The cost prices, tax rate, and the nonlinear penalty coefficients reflect the plant's true economic and regulatory objectives.
    Equations 7-12. The prices and tax rate are presented as Danish market values, but the nonlinear penalty is a hand-designed choice that changes the optimal policy.
  • domain assumption Observation and action delays are independent discrete uniform random variables on fixed ranges.
    Algorithm 1 lines 17-18 sample from DiscreteUniform. The real delay process in the plant may differ, and this assumption is not validated.

how reviews work

0 comments
Cite this review

Pith. "Pith review of Application of Soft Actor-Critic Algorithms in Optimizing Wastewater Treatment with Time Delays Integration." pith.science (2026). https://pith.science/paper/6OMGBEE3

@misc{pith2026241118305,
  author       = {Pith},
  title        = {Pith review of: Application of Soft Actor-Critic Algorithms in Optimizing Wastewater Treatment with Time Delays Integration},
  year         = {2026},
  howpublished = {\url{https://pith.science/paper/6OMGBEE3}},
  note         = {Machine review of arXiv:2411.18305}
}
read the original abstract

Wastewater treatment plants face unique challenges for process control due to their complex dynamics, slow time constants, and stochastic delays in observations and actions. These characteristics make conventional control methods, such as Proportional-Integral-Derivative controllers, suboptimal for achieving efficient phosphorus removal, a critical component of wastewater treatment to ensure environmental sustainability. This study addresses these challenges using a novel deep reinforcement learning approach based on the Soft Actor-Critic algorithm, integrated with a custom simulator designed to model the delayed feedback inherent in wastewater treatment plants. The simulator incorporates Long Short-Term Memory networks for accurate multi-step state predictions, enabling realistic training scenarios. To account for the stochastic nature of delays, agents were trained under three delay scenarios: no delay, constant delay, and random delay. The results demonstrate that incorporating random delays into the reinforcement learning framework significantly improves phosphorus removal efficiency while reducing operational costs. Specifically, the delay-aware agent achieved 36% reduction in phosphorus emissions, 55% higher reward, 77% lower target deviation from the regulatory limit, and 9% lower total costs than traditional control methods in the simulated environment. These findings underscore the potential of reinforcement learning to overcome the limitations of conventional control strategies in wastewater treatment, providing an adaptive and cost-effective solution for phosphorus removal.

Figures

Figures reproduced from arXiv: 2411.18305 by the authors.

Figure 1
Figure 1. A system with three different actions, with random action and observation delays. a˜ j i = a j i−da , for j ∈ {1, 2, 3}. (3) Here, ˜a j i represents the delayed action component that the system perceives at time i. The combination of random delays in observation and action introduces significant variability and challenges in maintaining optimal control, requiring the agent to adapt dynamically to the system’s stocha… view at source ↗
Figure 2
Figure 2. The process of training Soft Actor-Critic policy on [PITH_FULL_IMAGE:figures/full_fig_p006_2.png] view at source ↗
Figure 4
Figure 4. The inputs and outputs of the phosphorus removal [PITH_FULL_IMAGE:figures/full_fig_p008_4.png] view at source ↗
Figures from the paper (2 more)
Figure 3
Figure 3. Figure 3: Average cumulative rewards per episode for SAC [PITH_FULL_IMAGE:figures/full_fig_p008_3.png]
Figure 5
Figure 5. Figure 5: The comparison of the existing PID control and learned SAC policies for a point of the wastewater treatment dataset on [PITH_FULL_IMAGE:figures/full_fig_p009_5.png]

Discussion (0). Continue with ORCID to comment.

Reference graph

Works this paper leans on

24 extracted references · 19 canonical work pages

  1. [1]

    K. Chen, H. Wang, B. Valverde-P ´erez, S. Zhai, L. Vezzaro, A. Wang, Optimal control towards sustainable wastewater treatment plants based on multi-agent reinforcement learning, Chemosphere 279 (2021) 130498

  2. [2]

    Syafiie, F

    S. Syafiie, F. Tadeo, E. Martinez, T. Alvarez, Model-free control based on reinforcement learning for a wastewater treatment problem, Applied Soft Computing 11 (1) (2011) 73–82

  3. [3]

    H. C. Croll, K. Ikuma, S. K. Ong, S. Sarkar, Reinforcement learning ap- plied to wastewater treatment process control optimization: Approaches, challenges, and path forward, Critical Reviews in Environmental Science and Technology 53 (20) (2023) 1775–1794

  4. [4]

    Q. Yang, W. Cao, W. Meng, J. Si, Reinforcement-learning-based tracking control of waste water treatment process under realistic system conditions and control performance requirements, IEEE Transactions on Systems, Man, and Cybernetics: Systems 52 (8) (2021) 5284–5294

  5. [5]

    Haarnoja, A

    T. Haarnoja, A. Zhou, P. Abbeel, S. Levine, Soft actor-critic: O ff-policy maximum entropy deep reinforcement learning with a stochastic actor, in: International conference on machine learning, PMLR, 2018, pp. 1861– 1870

  6. [6]

    Schulman, Trust region policy optimization, arXiv preprint arXiv:1502.05477 (2015)

    J. Schulman, Trust region policy optimization, arXiv preprint arXiv:1502.05477 (2015)

  7. [7]

    Schulman, F

    J. Schulman, F. Wolski, P. Dhariwal, A. Radford, O. Klimov, Proximal policy optimization algorithms, arXiv preprint arXiv:1707.06347 (2017)

  8. [8]

    Lillicrap, Continuous control with deep reinforcement learning, arXiv preprint arXiv:1509.02971 (2015)

    T. Lillicrap, Continuous control with deep reinforcement learning, arXiv preprint arXiv:1509.02971 (2015)

Show all 24 references
  1. [9]

    R. Nian, J. Liu, B. Huang, A review on reinforcement learning: Introduc- tion and applications in industrial process control, Computers & Chemical Engineering 139 (2020) 106886

  2. [10]

    Bouteiller, S

    Y . Bouteiller, S. Ramstedt, G. Beltrame, C. Pal, J. Binas, Reinforcement learning with random delays, in: International conference on learning rep- resentations, 2020. 10

  3. [11]

    Mohammadi, M

    E. Mohammadi, M. Stokholm-Bjerregaard, A. A. Hansen, P. H. Nielsen, D. Ortiz-Arroyo, P. Durdevic, Deep learning based simulators for the phosphorus removal process control in wastewater treatment via deep re- inforcement learning algorithms, Engineering Applications of Artific...

  4. [12]

    Mohammadi, D

    E. Mohammadi, D. Ortiz-Arroyo, M. Stokholm-Bjerregaard, A. A. Hansen, P. Durdevic, Improved long short-term memory-based wastew- ater treatment simulators for deep reinforcement learning, arXiv preprint arXiv:2403.15091 (2024)

  5. [13]

    Mohammadi, D

    E. Mohammadi, D. Ortiz-Arroyo, M. Stokholm-Bjerregaard, P. Durde- vic, Multi-step simulation improvement for time series using exogenous state variables, in: Proceedings of the 21st International Conference on Informatics in Control, Automation and Robotics - V olume 1, 2024, ...

  6. [14]

    Spielberg, R

    S. Spielberg, R. Gopaluni, P. Loewen, Deep reinforcement learning ap- proaches for process control, in: 2017 6th international symposium on advanced control of industrial processes (AdCONIP), IEEE, 2017, pp. 201–206

  7. [15]

    H.-E. Byun, B. Kim, J. H. Lee, Robust dual control of batch processes with parametric uncertainty using proximal policy optimization, in: 2020 59th IEEE Conference on Decision and Control (CDC), IEEE, 2020, pp. 3016–3021

  8. [16]

    Y . Bao, Y . Zhu, F. Qian, A deep reinforcement learning approach to im- prove the learning performance in process control, Industrial & Engineer- ing Chemistry Research 60 (15) (2021) 5504–5515

  9. [17]

    Nillson, Real-time control systems with delays [ph

    J. Nillson, Real-time control systems with delays [ph. d. thesis], Lund Institute of Technology, Sweden (1998)

  10. [18]

    Zhong, H

    X. Zhong, H. He, H. Zhang, Z. Wang, Optimal control for unknown discrete-time nonlinear markov jump systems using adaptive dynamic programming, IEEE Transactions on Neural Networks and Learning Sys- tems 25 (12) (2014) 2141–2155

  11. [19]

    Hester, M

    T. Hester, M. Quinlan, P. Stone, Rtmba: A real-time model-based rein- forcement learning architecture for robot control, in: 2012 IEEE Interna- tional Conference on Robotics and Automation, IEEE, 2012, pp. 85–90

  12. [20]

    Brockman, V

    G. Brockman, V . Cheung, L. Pettersson, J. Schneider, J. Schulman, J. Tang, W. Zaremba, Openai gym, arXiv preprint arXiv:1606.01540 (2016)

  13. [21]

    Paszke, S

    A. Paszke, S. Gross, F. Massa, A. Lerer, J. Bradbury, G. Chanan, T. Killeen, Z. Lin, N. Gimelshein, L. Antiga, et al., Pytorch: An imper- ative style, high-performance deep learning library, Advances in neural information processing systems 32 (2019)

  14. [22]

    Kr ¨uger A/S, Hubgrade performance plant, https://www.kruger.dk/ english/hubgrade-advanced-online-control , accessed: 2023- 11-30 (2023)

  15. [23]

    Mohammadi, A

    E. Mohammadi, A. Rani, M. Stokholm-Bjerregaard, D. Ortiz-Arroyo, P. Durdevic, Wastewater treatment plant data for nutrient removal system, arXiv preprint arXiv:2407.05346 (2024)

  16. [24]

    Paszke, S

    A. Paszke, S. Gross, F. Massa, A. Lerer, J. Bradbury, G. Chanan, T. Killeen, Z. Lin, N. Gimelshein, L. Antiga, A. Desmaison, A. Kopf, E. Yang, Z. DeVito, M. Raison, A. Tejani, S. Chilamkurthy, B. Steiner, L. Fang, J. Bai, S. Chintala, Pytorch: An imperative style, high- perfor...

Pith tools

Reviewed August 12, 2026 · model on record in the stance chip above.