# Application of Machine Learning Models in Optimizing Wastewater Treatment Processes: A Review
## 2 Wastewater Treatment Processes in an Industrial Wastewater Treatment Plant
### Traditional and AI-Based Technologies Used in Wastewater Treatment
A new approach consist of the usage of an advanced DL method (a node-level capsule graph neural network (NLCGNN) that uses the hermit crab optimization algorithm for model parameters fine tuning) in the treatment process of the wastewater supplied by a paper mill, improving the prediction accuracy of critical quality indicators (such as COD), the model performance, and the real-time monitoring process [50]. The NLCGNN treats the wastewater treatment process for a paper mill as a connected network, where each network node represents different treatment stages (mechanical, chemical, or biological), and the network connections represent the wastewater flow rates between stages. In this way, the NLCGNN captures the complex relationships between wastewater quality parameters (such as pH, COD, BOD, TSS, etc.). The NLCGNN learns how upstream paper production affects downstream treatment, predicting fiber buildup in a stage (causing high COD values in subsequent stages) and optimizing the entire treatment chain (improving real-time monitoring, COD control, and reducing chemical consumption, among other benefits) [36]. Although these models need large amounts of data, ML and DL methods have the potential to optimize wastewater treatment processes from a plant, for instance, through the reduction of plant operational costs (minimizing the number of laboratory measurements and costs with chemical reactants, etc.) and through the real-time monitoring of the plant treatment processes [27,51]. Because of these models' black-box nature (the mechanisms between the input and the output features are not presented), the plant operators are a bit skeptical about using these models, preferring the classical models [10]. The integration of AI with an existing WWTP control system, like SCADA (Supervisory Control and Data Acquisition), is a desideratum because it can optimize the plant wastewater treatment processes and fault detection, but the high implementation costs represent a barrier to the widespread adoption of this solution [7]. According to [PERSON] and [PERSON] [12], ML and DL techniques are typically applied to enhance the real-time monitoring capabilities of SCADA systems (through the integration of data from various sensors) to achieve more accurate control and management of wastewater treatment processes. For improving the optimization, real-time monitoring, and the control of the processes within a WWTP, AI models can be integrated with IoT technologies, allowing more precise and timely interventions, improving the collection process of data and real-time analysis, and providing more accurate data (through advanced sensors) for climate models [10,52,53]. In addition, the integration of AI models with IoT technologies allows the creation of intelligent networks dedicated to WWTP monitoring, in which the data supplied by distributed sensors are analyzed to detect anomalies in the plant operation and infrastructure, and to predict unwanted pollution events [43,54]. Machine learning has been successfully implemented in various environmental and engineering fields, such as marine applications, showing its portability for the prediction of complex phenomena [55]. Therefore, the use of advanced technologies in conjunction with traditional ones (such as microbial analysis) in the treatment processes of a WWTP enhances pollutant removal and, simultaneously, leads to the development of sustainable and environmentally friendly treatment technologies. These technologies come with a set of advantages, such as improved control of plant treatment processes and, overall, an enhanced WWTP performance [9,38]. To fully achieve the potential of AI models in optimizing wastewater treatment processes, it is essential to consider all the advantages of AI in addressing the problem, as well as its limitations (such as data requirements, integration costs, complexity, and model transparency).