Yu-Qi Wang, Hong-Cheng Wang*, Jia-Ji Chen, Wan-Xin Yin, Jiuling Li, Zhiyu Zhang, He-Wen Li, Mei-Fang Wang and Ai-Jie Wang,
{"title":"Transformer Networks and Loss with Punishment for Optimized Management of Urban Water Supply System","authors":"Yu-Qi Wang, Hong-Cheng Wang*, Jia-Ji Chen, Wan-Xin Yin, Jiuling Li, Zhiyu Zhang, He-Wen Li, Mei-Fang Wang and Ai-Jie Wang, ","doi":"10.1021/acsestwater.4c0088110.1021/acsestwater.4c00881","DOIUrl":null,"url":null,"abstract":"<p >Accurate water demand forecasting is critical for the efficient operation and management of water supply systems, traditional forecasting models often show limited performance, with errors equally 50%/50% split between underestimation and overestimation. Here we show a model based on transformer (TF) to predict water demand quantity, comparing its performance with statistical models, recurrent neural network (RNN), long short-term memory (LSTM). To tackle the critical issue of underestimating water demand, we design a penalized loss function that constrains the model’s output distribution when predicting anomalies, drawing inspiration from the Chinese saying “killing the chicken to scare the monkey.” The rationale for this penalized loss function is explained through the principles of the transformer network and loss function with punishment (TFP) model and interpretability analysis. If actually deployed, the TFP model would reduce water supply by 8.97%, achieving a mean absolute percentage error of 2.93% and an underestimation probability of just 30.63%. Additionally, we outline a process for applying the penalized loss function to tackle a broader range of environmental challenges, with the goal of addressing more diverse environmental issues in the future.</p>","PeriodicalId":93847,"journal":{"name":"ACS ES&T water","volume":"5 2","pages":"800–815 800–815"},"PeriodicalIF":4.8000,"publicationDate":"2025-01-26","publicationTypes":"Journal Article","fieldsOfStudy":null,"isOpenAccess":false,"openAccessPdf":"","citationCount":"0","resultStr":null,"platform":"Semanticscholar","paperid":null,"PeriodicalName":"ACS ES&T water","FirstCategoryId":"1085","ListUrlMain":"https://pubs.acs.org/doi/10.1021/acsestwater.4c00881","RegionNum":0,"RegionCategory":null,"ArticlePicture":[],"TitleCN":null,"AbstractTextCN":null,"PMCID":null,"EPubDate":"","PubModel":"","JCR":"Q1","JCRName":"ENVIRONMENTAL SCIENCES","Score":null,"Total":0}
引用次数: 0
Abstract
Accurate water demand forecasting is critical for the efficient operation and management of water supply systems, traditional forecasting models often show limited performance, with errors equally 50%/50% split between underestimation and overestimation. Here we show a model based on transformer (TF) to predict water demand quantity, comparing its performance with statistical models, recurrent neural network (RNN), long short-term memory (LSTM). To tackle the critical issue of underestimating water demand, we design a penalized loss function that constrains the model’s output distribution when predicting anomalies, drawing inspiration from the Chinese saying “killing the chicken to scare the monkey.” The rationale for this penalized loss function is explained through the principles of the transformer network and loss function with punishment (TFP) model and interpretability analysis. If actually deployed, the TFP model would reduce water supply by 8.97%, achieving a mean absolute percentage error of 2.93% and an underestimation probability of just 30.63%. Additionally, we outline a process for applying the penalized loss function to tackle a broader range of environmental challenges, with the goal of addressing more diverse environmental issues in the future.