# Multi-Scale Temporal Convolutional Networks for Effluent COD Prediction in Industrial Wastewater
## 4 Results and Discussion  
Table 3 presents the predictive performance of the proposed MSTCN and comparison models. The training duration required for each model to converge is also recorded in it for more comprehensive evaluations from different dimensions. It is obvious that MSTCN not only demonstrates remarkable improvements in predictive accuracy over other models but also exhibits superior training efficiency. MSTCN has a training \(R^{2}\) of 0.9786, RMSE of 0.1834, and MAE of 0.1480, while it achieves the highest \(R^{2}\) of 0.9044, lowest RMSE of 0.3927, and lowest MAE of 0.2765 on the test set. Figure 12 plots its result curves against the measured one. Although there are some larger deviations between predictions and observations at the last few samples, MSTCN continues to successfully capture the overall trends in the test data and maintain a high degree of accuracy. When \begin{table}
\begin{tabular}{c c c c c} \hline \hline
**NO** & **Layer** & **Parameter** & **NO** & **Layer** & **Parameter** \\ \hline \multirow{4}{*}{1} & \multirow{4}{*}{Input} & Input1 = (13, 20, 6) & \multirow{4}{*}{4} & \multirow{4}{*}{TCN} & Dilation\_rate = 3 \\  & & Input2 = (10, 25, 6) & & \\  & & Input3 = (7, 41, 6) & & \\ \cline{1-1}  & \multirow{2}{*}{GCN} & \multirow{2}{*}{Kernel\_size = 6} & \multirow{2}{*}{5} & \multirow{2}{*}{Dropout} & Rate = 0.2 \\
2 & & Rate = 0.2 & & \\ \hline \hline \end{tabular}
\end{table} 
Table 1: Structure of the MSTCN model with the best forecasting performance. \begin{table}
\begin{tabular}{c c c c c} \hline \hline
**Parameter** & **CNN** & **LSTM** & **ALSTM** & **TCN** \\ \hline Kernel size & 3 & / & / & 5 \\ filters & 32 & / & / & (128, 64, 32, 16, 16) \\ Dilation rate & / & / & / & (1, 2, 4, 8, 16) \\ Activation & ReLU & Tanh & Tanh & LeakyReLU \\ Dropout rate & 0.2 & 0.1 & 0.2 & 0.2 \\ Units & / & 120 & (120, 240) & / \\ Batch size & 64 & 64 & 32 & 64 \\ Optimizer & RMSprop & Adam & RMSprop & Adam \\ Max epochs & 500 & 500 & 500 & 500 \\ Learning rate & 0.01 & 0.01 & 0.001 & 0.01 \\ \hline \hline \end{tabular}
\end{table} 
Table 2: Hyperparameters of CNN, LSTM, ALSTM, and TCN. \begin{table}
\begin{tabular}{c c c c c c} \hline \hline
**Model** & **Training/Test Set** & \(R^{2}\) & **RMSE** & **MAE** & **Time (s)** \\ \hline \multirow{3}{*}{CNN} & Training & 0.9286 & 0.3353 & 0.2914 & 7.2 \\  & Test & 0.7688 & 0.6108 & 0.5606 & \\ \cline{1-1}  & Training & 0.9768 & 0.1910 & 0.1432 & \\ \cline{1-1}  & Test & 0.8027 & 0.5643 & 0.4659 & \\ \cline{1-1}  & Training & 0.9196 & 0.3557 & 0.2855 & \\ \cline{1-1}  & Test & 0.8747 & 0.4496 & 0.3552 & 10.2 \\ \cline{1-1}  & Training & 0.8834 & 0.4286 & 0.3969 & \\ \cline{1-1}  & Test & 0.8406 & 0.5071 & 0.4292 & 7.6 \\ \cline{1-1}  & Training & 0.9786 & 0.1834 & 0.1480 & \\ \cline{1-1}  & Test & 0.9044 & 0.3927 & 0.2765 & 8.0 \\ \hline \hline \end{tabular}
\end{table} 
Table 3: The performance metrics of comparison models for predicting COD-E.  
dealing with the untrained sequence that contains both long-term dependencies and short-term fluctuations, MSTCN can also generate predictions with slight biases, confirming its robustness and reliability in forecasting effluent COD concentrations. Additionally, it takes 8 s to reach convergence, which is quite efficient given the model complexity. Figure 13 presents the predictions of CNN and LSTM on the test set, which suggests that LSTM can better fit the observation curve with smaller errors when there exist similar trends within a relatively long time period. However, both of them have poor generalization abilities on this wastewater treatment process dataset. Although these two models can achieve an explanation degree of over 90% for the variability in the COD-E data during training, there is a significant decrease in predictive performance on the test set. The test \(R^{2}\) value of MSTCN is 17.63% and 12.67% higher than that of CNN and LSTM, respectively. According to the test _RMSE_, MSTCN has a 35.68% and 30.42% reduction compared to them, respectively.