Evaluating Time Series Models for Urban Wastewater Management: Predictive Performance, Model Complexity and Resilience
1 [st] Vipin Singh 2 [nd] Tianheng Ling
vipin.singh@bht-berlin.de tianheng.ling@uni-due.de
3 [rd] Teodor Chiaburu 4 [th] Felix Biessmann
chiaburu.teodor@bht-berlin.de felix.biessmann@bht-berlin.de
1 [st] Vipin Singh
2 [nd] Tianheng Ling 3 [rd] Teodor Chiaburu
tianheng.ling@uni-due.de chiaburu.teodor@bht-berlin.de
felix.biessmann@bht-berlin.de
1 Berlin University of Applied Sciences and Technology, Berlin, Germany 2 Intelligent Embedded Systems Department, University of Duisburg-Essen, Duisburg, Germany 3 Einstein Center Digital Future, Berlin, Germany - Corresponding author. Abstract —Climate change increases the frequency of extreme rainfall, placing a significant strain on urban infrastructures, especially Combined Sewer Systems (CSS). Overflows from overburdened CSS release untreated wastewater into surface waters, posing environmental and public health risks. Although traditional physics-based models are effective, they are costly to maintain and difficult to adapt to evolving system dynamics. Ma chine Learning (ML) approaches offer cost-efficient alternatives with greater adaptability. To systematically assess the potential of ML for modeling urban infrastructure systems, we propose a protocol for evaluating Neural Network architectures for CSS time series forecasting with respect to predictive performance, model complexity, and robustness to perturbations. In addition, we assess model performance on peak events and critical fluctuations, as these are the key regimes for urban wastewater management. To investigate the feasibility of lightweight models suitable for IoT deployment, we compare global models, which have access to all information, with local models, which rely solely on nearby sensor readings. Additionally, to explore the security risks posed by network outages or adversarial attacks on urban infrastructure, we introduce error models that assess the resilience of models. Our results demonstrate that while global models achieve higher predictive performance, local models provide sufficient resilience in decentralized scenarios, ensuring robust modeling of urban infrastructure. Furthermore, models with longer native forecast horizons exhibit greater robustness to data perturbations. These findings contribute to the development of interpretable and reliable ML solutions for sustainable urban wastewater management. The implementation is available in our GitHub repository .
Index Terms —Time Series Forecasting, Neural Networks, Combined Sewer Systems, Robustness Analysis, Data Pertur bations
I. INTRODUCTION
Rapid urbanization is transforming landscapes globally, and more people are moving to cities than ever. This demographic surge intensifies the demands on aging urban infrastructure, particularly Combined Sewer Systems (CSS), which were designed decades ago based on outdated climate assumptions. CSS collects and transports stormwater and wastewater within a single pipe network, reducing construction costs and land use. Today however, these systems
The authors gratefully acknowledge the financial support provided by the Federal Ministry for Economic Affairs and Climate Action of Germany for the RIWWER project. 1](https://github.com/calgo-lab/resilient-timeseries-evaluation)
are experiencing unprecedented stress due to the increased frequency and intensity of extreme rainfall driven by climate change. The expansion of sealed surfaces in urban environments increases stormwater runoff, increasing the likelihood of Combined Sewer Overflows (CSOs), where untreated wastewater is discharged into natural water bodies. These overflows pose significant public health risks by contaminating water supplies and exposing cities to regulatory penalties and infrastructural degradation. Proactive management of CSS filling levels could mitigate these overflows, but existing approaches are based on physics-based hydraulic models. Although effective, these models require high-quality data for calibration, and are costly to implement, maintain, and adapt to changing environments. Even after implementation, these systems require regular reconfiguration to maintain high performance, making them impractical for real-time decision making. Recent advances in sensor technology and data transmission infrastructure have paved the way for Machine Learning (ML) approaches in real-time urban water management. In particular, time series forecasting models based on Neural Network (NN) have shown the ability to capture complex temporal patterns, enabling accurate predictions of overflow events without requiring detailed physical system description. However, compared to traditional physics-based models, these NNs often suffer from limited interpretability, which can undermine stakeholder trust and practical adoption. Furthermore, their robustness to real-world data perturbations, such as sensor noise, missing data, or network outages, remains underexplored. To address these challenges, this study conducts a comprehensive analysis of forecast consistency and robustness under data perturbations. The evaluation protocols are designed to reflect real-world challenges thatimpact urban wastewater management, including extreme weather events and potential adversarial attacks, which can lead to sensor or network outages. We investigate two modeling approaches: global models, which leverage all available sensor data as covariates, and local models, which rely solely on data from the target sensor, representing decentralized scenarios where global data access is restricted due to sensor failures or network disruptions. This comparative analysis assesses the resilience of each approach under varying conditions, ensuring reliable predictions in practical settings. To further study all relevant factors determining modeling choices, we develop realistic error models. These proposed methodologies are applied to multiyear data from a large urban wastewater network, providing empirical insights into model selection for effective and resilient urban wastewater management. II. RELATED WORK
This work builds on our previous empirical framework, which investigates the performance of global and local models for CSS forecasting (see subsection III-C), focusing on predictive precision and computational complexity across random weightinitializations. Our study extends this prior work in three key ways:
• Incorporation of Historical Weather Forecasts : By integrating historical weather forecast data as input features, we assess the generalization capabilities of models in real-world deployment scenarios. • Introduction of Realistic Error Models : We evaluate model resilience under sensor noise, malfunctions, and network outages, addressing critical challenges in urban wastewater monitoring. • Evaluation of Critical Events: : We develop assessment protocols designed to measure model performance during peak overflow events, which are of primary concern in wastewater management. Our main contribution lies in a comprehensive empirical evaluation based on novel assessment protocols that examine the feasibility of various ML approaches for urban wastewater management modeling. A key requirement of models in this contextis interpretability, which remains a barrier to adopting NNs in critical infrastructure. Although recent work explores hybrid statistical-ML models to balance accuracy and explainability,, these often require model-specific adaptations. Complementing existing work on interpretability in ML, we propose an evaluation protocol based on realistic errors, or perturbation, of the data. Systematically corrupting input data (e.g., masking sensors, adding noise) helps to investigate model behavior with respect to their resilience. By introducing a perturbation-based evaluation of model robustness, we extend existing interpretability measures with a notion of resilience of model types. III. METHODOLOGY
This section details the model development process, including six NN architectures, the dataset used for training and testing, and the methodological framework adopted for hyperparameter optimization and model evaluation.
A. Neural Network Architectures
The six evaluated neural networks will be presented, highlighting their key characteristics and suitability for time series forecasting:
1) LSTM: The Long Short-Term Memory (LSTM) network uses memory cells with input, output, and forget gates to capture both short- and long-term dependencies in sequential data–. However, its one-step recursive prediction mechanism can lead to error accumulation in multi-step forecasting. 2) DeepAR: Built on an autoregressive LSTM backbone, the DeepAR network employs Monte Carlo sampling to produce probabilistic forecasts, quantifying predictive uncertainty. Nevertheless, its sequential prediction framework remains susceptible to error propagation across time steps. 3) N-HiTS: The Neural Hierarchical Interpolation for Time Series Forecasting (N-HiTS) network features a purely feed-forward architecture with hierarchical interpolation, decomposing time series into frequency components. It eliminates recursive dependencies, improving computational efficiency and mitigating error accumulation over extended horizons. 4) Transformer: The Transformer network leverages Multi-head Self-Attention (MHSA) mechanisms and positional encoding to efficiently capture long-term dependencies in time series data and parallelize computation, without sequential recurrence, albeit at a high computational cost. 5) TCN: Temporal Convolutional Networks (TCN) employ causal and dilated convolutions to model temporal dependencies efficiently, although with limitations in capturing long-term patterns. 6) TFT: The Temporal Fusion Transformer (TFT) integrates MHSA mechanism, LSTM layers and gating mechanisms to capture both short- and long-term dynamics while enhancing interpretability through variable selection and quantile regression.
B. Dataset
The dataset used in this study is provided by Wirtschaftsbe triebe Duisburg and comprises three years of hourly-resampled time series data from six locations in Duisburg’s Vierlinden district . Itincludes 35 sensor features capturing various aspects of the CSS operation, such as water levels, pump energy consumption, valve states, and rainfall measurements. The target variable for our analysis are the filling levels of an overflow basin. Originally, sensor readings were event-driven, recorded atirregular intervals ranging from 1 second to 1 hour. To establish a uniform temporal resolution, the data were resampled to hourly intervals by computing the mean of values closest to each full-hour mark. Missing rainfall measurements were imputed using data from the nearest Deutsche Wetterdienst station. Missing values in other features were interpolated using linear interpolation, with indicator columns flagging imputed entries to maintain data integrity. In addition, historical rain forecasts from the Open-Meteo Weather API were incorporated as future covariates, enabling the models to integrate physics-based predictions into the data-driven learning approach. C. Global vs. Local Model Approach
This study evaluates two forecasting approaches for urban wastewater management:
2 Data cannot be publicly released. Readers may contact the corresponding author for further details. 1) Global Model: Incorporates all available sensor data under normal conditions, utilizing historical rain forecasts from the Open-Meteo API as future covariates. By leveraging system-wide data and meteorological context, itis supposed to achieve higher predictive accuracy. 2) Local Model: Operates autonomously during sensor failures or network disruptions, relying only on historical data from a given sensor. For models requiring future covariates (e.g., TFT), a placeholder feature created by shifting the target variable forward by the forecast horizon, substitutes unavailable external data. This improves resilience for edge deploymentin critical infrastructure scenarios.
The global model prioritizes precision through rich contextualization, while the local model ensures operational continuity in scenarios where centralized data access is compromised. D. Model Development Process
To preserve temporal dependencies and seasonal patterns, the dataset was chronologically splitinto training, validation, and test sets. In our study, we used an input sequence length of 72 hours, a forecast horizon of 12 hours, and a batch size of 256. Hyperparameter tuning was performed separately for the global and local models using Optuna ’s Tree-structured Parzen Estimator in a two-phase search over 600 trials. The best configurations (see our GitHub Repository) for each model type were then trained 100 times with different random seeds to assess the consistency of forecasts. Training used the Adam optimizer with early stopping to mitigate overfitting, using MSE as the loss function. The experiments were carried out on an NVIDIA A100 GPU to meet computational demands. IV. ROBUSTNESS ANALYSIS
This section presents the robustness analysis conducted in this study, evaluating the performance of the proposed models under real-world data quality issues that may impact forecasting accuracy. A. Error types
To simulate common data perturbations encountered in sensor-based systems, we introduce three error types, visualized in Figure 1. 1) Outliers refer to data points that deviate significantly from the majority of observations, often caused by measurement errors or sensor miscalibration. They are identified using the Interquartile Range (IQR) method, as defined in Equation 1, where IQR = Q 3 − Q 1 . x /∈
To introduce controlled outlier perturbations, the values are modified as shown in Equation 2, where µ denotes the mean of the data, and N represents a Gaussian distributed random number. The parameter α controls the magnitude of the shift, while β determines the noise
2) Missing Values represented as x missing = NaN, simulate gaps in sensor readings, which commonly arise due to hardware failures, maintenance procedures, or communication issues. 3) Clipping constrains data within predefined bounds to reflect sensor limitations. As shown in Equation 3, Q lower and Q upper are the specified quantile bounds. This error type mimics scenarios where physical or design limits prevent sensor readings from exceeding certain values. Q lower if x < Q lower x clipped =
B. Error sampling
 
x if Q lower ≤ x ≤ Q upper
Q upper if x > Q upper
Errors are injected using the tab err error generation package, which models realistic errors for tabular and time series data. The package supports patterns with complex dependencies between covariates and errors. In our study, the Errors-At-Random scenario was employed, treating the timestamp as the dependent variable to ensure that errors appear in consecutive clusters, mimicking sensor downtimes or intermittent failures. The error rates are adjustable. However, for Value Clipping, only values outside the specified bounds are modified, which can yield a lower effective error rate.
C. Error Generation Setup
The robustness evaluation follows a hierarchical structure represented by nested loops:
3](https://github.com/calgo-lab/taberr) Algorithm 1 Hierarchical Structure of Robustness Evaluation
1: for each Model Type do 2: for each Model i in 100 Trials (subsection III-D) do 3: for each Feature do
4: for each Error Type do 5: for each Error Rate do
6: Evaluate robustness of model i under given conditions
This ensures a systematic evaluation of the robustness of the models. For the error rates 10%, 20%, 30%, 40%, and 50% were considered. Finally, these are the error type configurations, as defined in subsection IV-A:
• Outliers: α = 1 . 1, β = 0 . 1
• Missing Values: –
• Clipping: q lower = 0 . 2 → Q 0 . 2, q upper = 0 . 8 → Q 0 .
8
V. RESULTS AND DISCUSSION
This section describes the results of the models and com pares their performance in terms of predictive performance, robustness, and computational complexity. A. Predictive Performance
The predictive performance of the evaluated NN architectures, measured by Mean Squared Error (MSE), is shown in Figure 2. To assess the consistency of the models, each architecture was trained 100 times with different random weightinitializations, and the spread of MSE values across runs is reported. Figure 2 suggest that local models often
20% of these differences. To smooth the time intervals, a rolling mean is applied before selection with a window size of 48, corresponding to 2 days. The MSEs of these events are shown in Figure 3, suggesting that during peak events, global models perform better than local models, with the TFT model achieving the highest predictive precision. achieve MSEs comparable to global models.
This trend can be seen across all model architectures evaluated. Upon closer investigation of the results, we found that there are long periods of time when there is little activity in the sewer system and sensor readings. To better investigate the predictive performance in regimes relevant for urban infrastructure, we conducted another evaluation in which we considered only peak events and critical fluctuations. These events are identified by calculating the differences between consecutive values and selecting the highest
We investigated the robustness to realistic errors such as sensor noise, malfunctions, or network outages by applying outliers, missing values, and clipping as specified in subsection IV-C. Figure 4 shows all the MSE differences between unperturbed and perturbed data aggregated per model type. The best performing model in terms of robustness is the TCN model, followed closely by the TFT and N-HiTS models. After individually evaluating the established metrics, the trade-offs between predictive performance, computational complexity, and robustness are analyzed in this subsection. The predictive performance is measured with the MSE, the computational complexity with the model size and inference time, and the robustness with the forecast consistency (IQR of the MSE) and the MSE increase due to perturbations. To provide a more holistic view of the trade-offs, a Computation Complexity Index (CCI) and a Robustness Index (RI) are introduced:
Figure 5 shows that the local N-HiTS and TFT models both exhibit high predictive performance. The N-HiTS model achieves this predictive performance at a computational complexity lower than that of TFT. The LSTM and DeepAR models perform poorly in terms of robustness, while DeepAR performs worstin predictive precision. The Transformer model has the worst complexity among the models. Median MSE vs RI
1 . 4
CCI i =
2
ti s i
� max( t ) [+] max( s ) �
with ti being the inference time, s i the model size of model i and max( t ) and max( s ) the maximum inference time and model size among all models, respectively. Median MSE vs CCI
DeepAR
TCN
LSTM
Transformer
DeepAR
RI i =
3
iqr i MSE pert ,i iqr pert ,i � max(iqr) [+] max(MSE pert ) [+] max(iqr pert )
�
TCN
with iqr i being the IQR of the MSE, MSE pert ,i the mean absolute MSE increase due to perturbations and iqr pert ,i the IQR of the absolute MSE increase due to perturbations of model i . The maximum values are calculated analogously to the complexity index. Due to the local model approach already simulating the extreme case of a total network outage, they have 100% missingness in exogenous data. This effectively means that the perturbation analysis was not conducted for the local models, as they are inherently subject to the most severe perturbation. To assess their robustness, only the IQR of the MSE, representing the forecast consistency, is considered. The relationships between predictive performance, computational cost, and robustness are visualized in Figure 5 for local models and in Figure 6 for global models. For the global models there is no clear winner in the tradeoff analysis, according to Figure 6. The Transformer model has the best balance between the metrics, but has a poor predictive performance. The TFT model has a poor complexity, but a good predictive performance and robustness. The DeepAR and LSTM models show a poor robustness among the global models as well. Overall the TFT model seems to achieve the best trade-off, it achieves superior predictive performance and very good robustness. However its complexity make it more difficult to deploy on edge devices. VI. CONCLUSION AND FUTURE WORK
This study empirically evaluated six NN architectures for time series forecasting in CSS, focusing on predictive perfomance, computational complexity, and robustness under data perturbations. In a comprehensive empirical evaluation on a real-world dataset, we find that global models leveraging system-wide sensor data achieved superior accuracy, particularly the TFT, which excelled in predicting critical peak overflow events. Local models, relying solely on single-sensor data, demonstrated resilience in decentralized scenarios, with N-HiTS and TFT offering the best balance of performance and robustness. Multi-step forecasting models (e.g., N-HiTS, TCN, TFT, Transformer) proved significantly more robust to data perturbations, such as outliers, missing values, and clipping, than single-step autoregressive models (e.g., LSTM, DeepAR), highlighting the impact of error propagation in recursive architectures. Another key finding is that evaluation protocols that account for peak events may yield different results than when considering all data. These findings confirm the potential of modern NNs to enhance CSS managementin real-time. By integrating global models during normal operations and deploying local models as fail-safes during sensor failures, cities can mitigate overflow risks while maintaining operational continuity. The perturbation analysis further provides stakeholders with actionable insights into model reliability under real-world data quality challenges. Future research should apply this framework to data from other cities to generalize the findings. To advance toward practical IoT deployment, model weight quantization techniques should be investigated to further reduce computational complexity, and the feasibility of models on embedded hardware should be systematically assessed. Additionally, evaluating grouped feature perturbations could offer deeper insightinto how correlated errors affect model performance. Finally, a direct comparison with physics-based models remains an important but challenging next step.