HarmonicFormer: Cross-Phase Harmonic Modeling for Efficient Long-Term Water Quality Forecasting
Abstract
1. Introduction
- 1.
- Traditional statistical models such as ARIMA and Prophet assume linearity and stationarity, failing to capture nonlinear and complex seasonal fluctuations in water quality dynamics. Conventional machine learning methods including SVR, Random Forest, and XGBoost remain heavily dependent on manual feature engineering and have limited capacity for high-dimensional, long-sequence data.
- 2.
- Deep learning models like LSTM and CNN-based hybrid architectures have achieved promising results, but adaptively capturing key information from long sequences remains challenging.
- 3.
- Periodicity-aware methods, including frequency-domain approaches like FreqCycle, adaptive period discovery methods such as TimesNet, and phase-based methods like PhaseFormer, still face limitations including global implicit representations, inaccurate decomposition under noise, and lack of explicit multi-scale periodic modeling mechanisms.
- 1.
- Based on multi-site water quality monitoring data from the Pearl River basin, we systematically analyzed the multi-scale periodic characteristics of parameters such as dissolved oxygen, pH, and ammonia nitrogen, providing a data foundation for explicit periodic modeling.
- 2.
- We proposed the HarmonicFormer model, which explicitly embeds multi-scale prior knowledge such as diurnal and seasonal cycles through harmonic temporal encoding, achieving efficient modeling of inherent periodic structures in water quality data.
- 3.
- We conducted extensive experiments on long-term prediction tasks for multiple water quality parameters. Results demonstrate that HarmonicFormer achieves optimal or near-optimal prediction performance across most water quality parameters and prediction horizons with extremely low parameter count and training cost, validating the effectiveness of explicit multi-scale periodic modeling in improving water quality prediction accuracy.
2. Related Work
3. Method
3.1. Data Preprocessing
3.2. HarmonicFormer Model
3.2.1. Harmonic Time Encoding
3.2.2. Phase Embedding
3.2.3. Cross-Phase Routing Layer
3.2.4. Phase Predictor
3.2.5. Phase Detokenization
3.3. Model Complexity Analysis
4. Dataset
5. Results and Discussion
5.1. Experimental Setup
5.2. Overall Performance and Stepwise Analysis
5.2.1. Overall Performance
5.2.2. Performance Across Prediction Horizons
5.2.3. Training Efficiency and Convergence
5.3. Ablation Study
5.4. Discussion
6. Conclusions
Author Contributions
Funding
Data Availability Statement
Acknowledgments
Conflicts of Interest
Abbreviations
| RevIN | Reversible Instance Normalization |
| FFN | Feed-Forward Network |
| GELU | Gaussian Error Linear Unit |
Appendix A. Supplementary Results of Auxiliary Metrics
| Variable | Horizon | HarmonicFormer (Ours) | TimesNet (ICLR 2023) [28] | FreqCycle (AAAI 2026) [34] | PhaseFormer (ICLR 2026) [35] | DLinear (AAAI 2023) [36] | Autoformer (NIPS 2021) [18] | GWN (IJCAI 2019) [39] | ASTGCN (AAAI 2019) [40] | STGCN (IJCAI 2018) [23] | |||||||||
|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
| RMSE | RSE | RMSE | RSE | RMSE | RSE | RMSE | RSE | RMSE | RSE | RMSE | RSE | RMSE | RSE | RMSE | RSE | RMSE | RSE | ||
| AN | 24 | 0.5138 | 0.5949 | 0.5550 | 0.6427 | 0.5280 | 0.6113 | 0.5342 | 0.6186 | 0.5240 | 0.6067 | 0.6851 | 0.7933 | 0.5178 | 0.5995 | 0.5384 | 0.6234 | 0.5684 | 0.6581 |
| 48 | 0.5773 | 0.6681 | 0.6752 | 0.7813 | 0.5880 | 0.6805 | 0.5903 | 0.6830 | 0.5823 | 0.6738 | 0.7196 | 0.8327 | 0.5729 | 0.6630 | 0.5937 | 0.6870 | 0.6701 | 0.7754 | |
| 96 | 0.6634 | 0.7658 | 0.7751 | 0.8948 | 0.6726 | 0.7765 | 0.6704 | 0.7739 | 0.6586 | 0.7604 | 0.8110 | 0.9363 | 0.6456 | 0.7453 | 0.6657 | 0.7686 | 0.7682 | 0.8868 | |
| 192 | 0.7707 | 0.8858 | 0.8759 | 1.0067 | 0.7784 | 0.8947 | 0.7727 | 0.8881 | 0.7409 | 0.8515 | 0.8620 | 0.9907 | 0.7315 | 0.8408 | 0.7440 | 0.8551 | 0.7880 | 0.9057 | |
| 336 | 0.8572 | 0.9792 | 0.9615 | 1.0984 | 0.8690 | 0.9927 | 0.8581 | 0.9803 | 0.8022 | 0.9164 | 0.9378 | 1.0713 | 0.7947 | 0.9079 | 0.7973 | 0.9108 | 0.8283 | 0.9462 | |
| 720 | 0.9075 | 1.0277 | 1.0181 | 1.1530 | 0.9227 | 1.0449 | 0.9072 | 1.0273 | 0.8681 | 0.9831 | 1.0352 | 1.1723 | 0.8563 | 0.9698 | 0.8749 | 0.9908 | 0.9049 | 1.0248 | |
| N | 24 | 0.4521 | 0.4256 | 0.4945 | 0.4655 | 0.4592 | 0.4323 | 0.4643 | 0.4371 | 0.4673 | 0.4399 | 0.6125 | 0.5766 | 0.4593 | 0.4324 | 0.4868 | 0.4583 | 0.5498 | 0.5176 |
| 48 | 0.4858 | 0.4582 | 0.5753 | 0.5425 | 0.4908 | 0.4628 | 0.4952 | 0.4670 | 0.5065 | 0.4777 | 0.6175 | 0.5824 | 0.5056 | 0.4768 | 0.5381 | 0.5074 | 0.6274 | 0.5917 | |
| 96 | 0.5285 | 0.4993 | 0.6284 | 0.5936 | 0.5306 | 0.5012 | 0.5351 | 0.5055 | 0.5620 | 0.5309 | 0.7049 | 0.6659 | 0.5778 | 0.5459 | 0.5940 | 0.5611 | 0.7075 | 0.6683 | |
| 192 | 0.5853 | 0.5545 | 0.6733 | 0.6379 | 0.5839 | 0.5532 | 0.5891 | 0.5581 | 0.6395 | 0.6059 | 0.6709 | 0.6356 | 0.6804 | 0.6446 | 0.7412 | 0.7022 | 0.7772 | 0.7363 | |
| 336 | 0.6433 | 0.6107 | 0.7387 | 0.7012 | 0.6400 | 0.6076 | 0.6455 | 0.6128 | 0.7199 | 0.6834 | 0.6925 | 0.6573 | 0.7838 | 0.7440 | 0.8516 | 0.8084 | 0.8356 | 0.7932 | |
| 720 | 0.7361 | 0.6986 | 0.8454 | 0.8022 | 0.7342 | 0.6967 | 0.7337 | 0.6962 | 0.8780 | 0.8332 | 0.8341 | 0.7916 | 0.9272 | 0.8798 | 0.9989 | 0.9479 | 1.0325 | 0.9798 | |
| DO | 24 | 0.3893 | 0.4399 | 0.4389 | 0.4960 | 0.4145 | 0.4684 | 0.3977 | 0.4493 | 0.4152 | 0.4692 | 0.5100 | 0.5763 | 0.4067 | 0.4595 | 0.4077 | 0.4607 | 0.4227 | 0.4776 |
| 48 | 0.4434 | 0.5013 | 0.5304 | 0.5995 | 0.4626 | 0.5230 | 0.4499 | 0.5086 | 0.4624 | 0.5227 | 0.6542 | 0.7396 | 0.4536 | 0.5128 | 0.4596 | 0.5195 | 0.4814 | 0.5442 | |
| 96 | 0.5222 | 0.5909 | 0.6249 | 0.7072 | 0.5351 | 0.6056 | 0.5281 | 0.5976 | 0.5357 | 0.6062 | 0.7169 | 0.8112 | 0.5204 | 0.5889 | 0.5436 | 0.6152 | 0.5596 | 0.6333 | |
| 192 | 0.6207 | 0.7033 | 0.6894 | 0.7811 | 0.6292 | 0.7129 | 0.6239 | 0.7069 | 0.6242 | 0.7072 | 0.7515 | 0.8514 | 0.6048 | 0.6852 | 0.6346 | 0.7190 | 0.6616 | 0.7495 | |
| 336 | 0.7155 | 0.8096 | 0.7831 | 0.8862 | 0.7187 | 0.8133 | 0.7198 | 0.8145 | 0.7171 | 0.8114 | 0.8981 | 1.0162 | 0.7152 | 0.8094 | 0.7231 | 0.8183 | 0.7614 | 0.8615 | |
| 720 | 0.8629 | 0.9925 | 0.8755 | 1.0071 | 0.8516 | 0.9796 | 0.8684 | 0.9989 | 0.9273 | 1.0666 | 1.0599 | 1.2192 | 0.9571 | 1.1009 | 0.9980 | 1.1479 | 0.8930 | 1.0273 | |
| Perm | 24 | 0.5027 | 0.5071 | 0.5395 | 0.5443 | 0.5138 | 0.5184 | 0.5190 | 0.5236 | 0.5196 | 0.5243 | 0.7028 | 0.7091 | 0.5261 | 0.5308 | 0.5556 | 0.5605 | 0.5858 | 0.5910 |
| 48 | 0.5516 | 0.5582 | 0.6385 | 0.6461 | 0.5586 | 0.5653 | 0.5632 | 0.5700 | 0.5658 | 0.5725 | 0.7037 | 0.7121 | 0.5788 | 0.5858 | 0.6076 | 0.6149 | 0.6297 | 0.6372 | |
| 96 | 0.6083 | 0.6187 | 0.7038 | 0.7159 | 0.6108 | 0.6212 | 0.6177 | 0.6282 | 0.6225 | 0.6332 | 0.7785 | 0.7918 | 0.6416 | 0.6526 | 0.6640 | 0.6753 | 0.7158 | 0.7280 | |
| 192 | 0.6791 | 0.6970 | 0.7394 | 0.7589 | 0.6758 | 0.6937 | 0.6820 | 0.7000 | 0.6897 | 0.7079 | 0.7765 | 0.7970 | 0.7053 | 0.7240 | 0.7371 | 0.7566 | 0.7607 | 0.7808 | |
| 336 | 0.7372 | 0.7658 | 0.8067 | 0.8380 | 0.7292 | 0.7575 | 0.7376 | 0.7662 | 0.7425 | 0.7713 | 0.8193 | 0.8511 | 0.7429 | 0.7717 | 0.7732 | 0.8032 | 0.8230 | 0.8549 | |
| 720 | 0.8733 | 0.9384 | 0.9107 | 0.9786 | 0.8676 | 0.9323 | 0.8764 | 0.9417 | 0.8430 | 0.9059 | 0.9386 | 1.0086 | 0.8197 | 0.8808 | 0.8364 | 0.8988 | 0.8703 | 0.9352 | |
| P | 24 | 0.4122 | 0.5975 | 0.4389 | 0.6362 | 0.4152 | 0.6018 | 0.4181 | 0.6061 | 0.4172 | 0.6048 | 0.6437 | 0.9331 | 0.4080 | 0.5914 | 0.4178 | 0.6057 | 0.4206 | 0.6097 |
| 48 | 0.4458 | 0.6482 | 0.5280 | 0.7677 | 0.4499 | 0.6542 | 0.4522 | 0.6575 | 0.4527 | 0.6582 | 0.6487 | 0.9433 | 0.4426 | 0.6435 | 0.4524 | 0.6578 | 0.4589 | 0.6673 | |
| 96 | 0.4963 | 0.7234 | 0.5691 | 0.8295 | 0.4992 | 0.7275 | 0.5027 | 0.7327 | 0.5029 | 0.7329 | 0.7065 | 1.0297 | 0.4950 | 0.7214 | 0.5103 | 0.7438 | 0.5112 | 0.7450 | |
| 192 | 0.5607 | 0.8206 | 0.6151 | 0.9003 | 0.5609 | 0.8209 | 0.5639 | 0.8253 | 0.5626 | 0.8233 | 0.6864 | 1.0047 | 0.5544 | 0.8115 | 0.5786 | 0.8468 | 0.6029 | 0.8824 | |
| 336 | 0.6025 | 0.8862 | 0.6758 | 0.9941 | 0.5998 | 0.8822 | 0.6033 | 0.8873 | 0.6078 | 0.8940 | 0.6811 | 1.0018 | 0.5901 | 0.8680 | 0.6229 | 0.9162 | 0.6401 | 0.9415 | |
| 720 | 0.6592 | 0.9826 | 0.7447 | 1.1102 | 0.6552 | 0.9767 | 0.6596 | 0.9833 | 0.6935 | 1.0339 | 0.8565 | 1.2769 | 0.6775 | 1.0099 | 0.7514 | 1.1202 | 0.7318 | 1.0909 | |
| pH | 24 | 0.4836 | 0.4496 | 0.5496 | 0.5110 | 0.5115 | 0.4755 | 0.4931 | 0.4584 | 0.5089 | 0.4731 | 0.6795 | 0.6317 | 0.5107 | 0.4748 | 0.5277 | 0.4906 | 0.5941 | 0.5523 |
| 48 | 0.5421 | 0.5039 | 0.6569 | 0.6107 | 0.5621 | 0.5226 | 0.5492 | 0.5106 | 0.5667 | 0.5269 | 0.8410 | 0.7818 | 0.5733 | 0.5330 | 0.5899 | 0.5484 | 0.6784 | 0.6307 | |
| 96 | 0.6249 | 0.5807 | 0.7551 | 0.7017 | 0.6395 | 0.5943 | 0.6318 | 0.5871 | 0.6525 | 0.6063 | 0.8221 | 0.7639 | 0.6601 | 0.6134 | 0.6822 | 0.6339 | 0.7940 | 0.7378 | |
| 192 | 0.7366 | 0.6828 | 0.8369 | 0.7757 | 0.7463 | 0.6918 | 0.7407 | 0.6866 | 0.7615 | 0.7059 | 0.8932 | 0.8279 | 0.7720 | 0.7156 | 0.7860 | 0.7286 | 0.8971 | 0.8316 | |
| 336 | 0.8367 | 0.7739 | 0.9523 | 0.8808 | 0.8467 | 0.7831 | 0.8389 | 0.7759 | 0.8703 | 0.8049 | 0.9122 | 0.8437 | 0.8903 | 0.8234 | 0.9146 | 0.8460 | 0.9884 | 0.9142 | |
| 720 | 0.9654 | 0.9008 | 1.0946 | 1.0214 | 0.9807 | 0.9151 | 0.9696 | 0.9047 | 1.0691 | 0.9977 | 1.0826 | 1.0102 | 1.2024 | 1.1220 | 1.2178 | 1.1364 | 1.2403 | 1.1573 | |
| Tur | 24 | 0.5326 | 0.6901 | 0.5631 | 0.7296 | 0.5348 | 0.6930 | 0.5405 | 0.7003 | 0.5408 | 0.7007 | 0.6559 | 0.8499 | 0.5276 | 0.6836 | 0.5419 | 0.7022 | 0.5359 | 0.6944 |
| 48 | 0.5719 | 0.7431 | 0.6667 | 0.8662 | 0.5744 | 0.7463 | 0.5841 | 0.7588 | 0.5786 | 0.7518 | 0.6856 | 0.8908 | 0.5656 | 0.7349 | 0.5771 | 0.7498 | 0.5752 | 0.7473 | |
| 96 | 0.6163 | 0.8039 | 0.7281 | 0.9497 | 0.6160 | 0.8035 | 0.6174 | 0.8052 | 0.6203 | 0.8090 | 0.7288 | 0.9506 | 0.6040 | 0.7878 | 0.6342 | 0.8271 | 0.6259 | 0.8163 | |
| 192 | 0.6555 | 0.8644 | 0.7681 | 1.0129 | 0.6543 | 0.8628 | 0.6544 | 0.8629 | 0.6573 | 0.8668 | 0.7094 | 0.9355 | 0.6385 | 0.8420 | 0.6571 | 0.8665 | 0.7583 | 1.0000 | |
| 336 | 0.6727 | 0.8995 | 0.7450 | 0.9963 | 0.6711 | 0.8974 | 0.6712 | 0.8976 | 0.6823 | 0.9124 | 0.7621 | 1.0192 | 0.6615 | 0.8846 | 0.6915 | 0.9247 | 0.9393 | 1.2561 | |
| 720 | 0.7238 | 0.9779 | 0.8290 | 1.1201 | 0.7219 | 0.9753 | 0.7245 | 0.9789 | 0.7378 | 0.9968 | 0.8608 | 1.1629 | 0.7871 | 1.0634 | 0.7962 | 1.0756 | 1.0376 | 1.4019 | |
| Temp | 24 | 0.1636 | 0.2888 | 0.1817 | 0.3207 | 0.1661 | 0.2933 | 0.1658 | 0.2927 | 0.1891 | 0.3339 | 0.2329 | 0.4111 | 0.1628 | 0.2875 | 0.1668 | 0.2945 | 0.1724 | 0.3044 |
| 48 | 0.2004 | 0.3547 | 0.2146 | 0.3799 | 0.1944 | 0.3441 | 0.2011 | 0.3560 | 0.2088 | 0.3696 | 0.4086 | 0.7234 | 0.1917 | 0.3393 | 0.1971 | 0.3489 | 0.2304 | 0.4080 | |
| 96 | 0.2475 | 0.4415 | 0.2829 | 0.5046 | 0.2405 | 0.4290 | 0.2588 | 0.4617 | 0.2531 | 0.4514 | 0.3581 | 0.6388 | 0.2336 | 0.4167 | 0.2539 | 0.4530 | 0.3503 | 0.6249 | |
| 192 | 0.3314 | 0.6001 | 0.2998 | 0.5429 | 0.2964 | 0.5366 | 0.3361 | 0.6085 | 0.3092 | 0.5598 | 0.9143 | 1.6555 | 0.2898 | 0.5248 | 0.2964 | 0.5368 | 0.4192 | 0.7591 | |
| 336 | 0.4360 | 0.8046 | 0.3791 | 0.6995 | 0.3559 | 0.6568 | 0.4417 | 0.8151 | 0.3998 | 0.7378 | 0.8524 | 1.5729 | 0.3768 | 0.6952 | 0.3604 | 0.6650 | 0.4584 | 0.8458 | |
| 720 | 0.6371 | 1.2365 | 0.6283 | 1.2193 | 0.4947 | 0.9600 | 0.6342 | 1.2308 | 0.7527 | 1.4608 | 1.5089 | 2.9284 | 0.7306 | 1.4179 | 0.7786 | 1.5111 | 0.7986 | 1.5499 | |
| Cond | 24 | 0.4883 | 0.5206 | 0.5255 | 0.5602 | 0.5011 | 0.5342 | 0.4852 | 0.5173 | 0.5022 | 0.5354 | 0.5515 | 0.5880 | 0.5000 | 0.5331 | 0.5078 | 0.5413 | 0.5156 | 0.5496 |
| 48 | 0.5194 | 0.5543 | 0.5994 | 0.6396 | 0.5303 | 0.5659 | 0.5170 | 0.5518 | 0.5328 | 0.5686 | 0.6165 | 0.6580 | 0.5271 | 0.5625 | 0.5370 | 0.5731 | 0.5539 | 0.5911 | |
| 96 | 0.5612 | 0.5990 | 0.6674 | 0.7123 | 0.5705 | 0.6089 | 0.5629 | 0.6009 | 0.5764 | 0.6152 | 0.6528 | 0.6968 | 0.5671 | 0.6054 | 0.5872 | 0.6268 | 0.6054 | 0.6462 | |
| 192 | 0.6317 | 0.6731 | 0.7295 | 0.7774 | 0.6371 | 0.6789 | 0.6319 | 0.6733 | 0.6435 | 0.6857 | 0.7683 | 0.8187 | 0.6408 | 0.6828 | 0.6467 | 0.6891 | 0.6951 | 0.7407 | |
| 336 | 0.6923 | 0.7360 | 0.8117 | 0.8630 | 0.6964 | 0.7404 | 0.6920 | 0.7357 | 0.7136 | 0.7587 | 0.7920 | 0.8420 | 0.7130 | 0.7580 | 0.7202 | 0.7657 | 0.8310 | 0.8835 | |
| 720 | 0.8082 | 0.8545 | 0.9459 | 1.0001 | 0.8022 | 0.8481 | 0.8027 | 0.8487 | 0.9032 | 0.9549 | 1.1047 | 1.1679 | 0.9035 | 0.9552 | 0.9781 | 1.0341 | 0.9838 | 1.0401 | |
| Avg. | 0.5941 | 0.6941 | 0.6681 | 0.7762 | 0.5943 | 0.6901 | 0.5986 | 0.6994 | 0.6126 | 0.7147 | 0.7613 | 0.9139 | 0.6134 | 0.7121 | 0.6360 | 0.7383 | 0.6827 | 0.7949 | |
| Avg. Rank | 2.33 | 2.33 | 7.19 | 7.19 | 2.96 | 2.96 | 3.54 | 3.54 | 4.50 | 4.50 | 8.37 | 8.37 | 3.07 | 3.07 | 5.69 | 5.69 | 7.35 | 7.35 | |
| Variable | Horizon | HarmonicFormer (Ours) | TimesNet (ICLR 2023) [28] | FreqCycle (AAAI 2026) [34] | PhaseFormer (ICLR 2026) [35] | DLinear (AAAI 2023) [36] | Autoformer (NIPS 2021) [18] | GWN (IJCAI 2019) [39] | ASTGCN (AAAI 2019) [40] | STGCN (IJCAI 2018) [23] |
|---|---|---|---|---|---|---|---|---|---|---|
| GPI_abs | GPI_abs | GPI_abs | GPI_abs | GPI_abs | GPI_abs | GPI_abs | GPI_abs | GPI_abs | ||
| AN | 24 | 0.1102 | 0.1925 | 0.2288 | 0.2797 | 0.7916 | 26.7885 | 1.7022 | 2.8357 | 21.6364 |
| 48 | 0.5697 | 0.6952 | 1.2007 | 0.3062 | 4.1713 | 5.9890 | 9.9741 | 23.1460 | 44.9319 | |
| 96 | 3.8069 | 6.5379 | 3.6862 | 5.1447 | 15.8592 | 11.4438 | 25.2118 | 55.6017 | 79.2561 | |
| 192 | 17.1460 | 14.6440 | 12.1034 | 5.7603 | 58.8201 | 16.7574 | 115.1860 | 98.2085 | 342.5202 | |
| 336 | 26.1844 | 10.5761 | 17.2481 | 27.2394 | 141.7310 | 141.2164 | 204.6088 | 176.9115 | 346.9314 | |
| 720 | 195.1877 | 1.7869 | 47.8944 | 199.0816 | 445.5295 | 803.5205 | 404.6067 | 518.8139 | 599.5185 | |
| N | 24 | 0.0351 | 0.0000 | 0.0131 | 0.1702 | 0.3613 | 0.0447 | 0.1340 | 1.4826 | 0.0003 |
| 48 | 0.0641 | 0.0958 | 0.0616 | 0.3266 | 1.8747 | 7.1171 | 0.4997 | 0.0073 | 2.2826 | |
| 96 | 0.0595 | 1.1262 | 0.0726 | 0.0519 | 7.6354 | 0.6444 | 9.0948 | 0.3735 | 11.9054 | |
| 192 | 0.8043 | 4.1083 | 0.1403 | 0.0550 | 35.8524 | 0.0001 | 56.2947 | 55.1332 | 213.4563 | |
| 336 | 0.0078 | 21.7111 | 0.0098 | 0.0628 | 116.3006 | 0.0047 | 192.8615 | 389.3440 | 512.0277 | |
| 720 | 9.7465 | 3.9734 | 1.5501 | 16.1118 | 801.7836 | 4.1830 | 1565.2882 | 2851.1113 | 3010.2128 | |
| DO | 24 | 0.2287 | 0.0074 | 0.0329 | 0.2960 | 0.2157 | 0.2202 | 0.1493 | 0.0264 | 0.9383 |
| 48 | 0.1115 | 0.0578 | 0.0267 | 0.1971 | 1.2086 | 0.0000 | 0.0231 | 2.1754 | 8.0394 | |
| 96 | 0.5939 | 1.6874 | 0.0003 | 2.2474 | 6.7774 | 2.9590 | 3.6734 | 17.2480 | 38.1391 | |
| 192 | 2.7538 | 32.1970 | 0.2908 | 2.7093 | 44.7059 | 438.6833 | 9.6146 | 84.5399 | 39.7899 | |
| 336 | 1.0015 | 79.0032 | 1.5982 | 0.3901 | 224.3571 | 1339.8057 | 44.9912 | 154.5325 | 10.8243 | |
| 720 | 76.1341 | 1366.5116 | 68.0956 | 78.9894 | 4657.4325 | 425.1351 | 3658.2337 | 8167.2396 | 2795.7935 | |
| Perm | 24 | 0.1321 | 0.0263 | 0.3795 | 1.0985 | 0.3398 | 3.3497 | 0.0200 | 0.0120 | 0.0409 |
| 48 | 1.3917 | 0.0372 | 1.7675 | 1.3980 | 1.7831 | 0.1834 | 0.1353 | 0.3148 | 0.0821 | |
| 96 | 7.2496 | 0.0087 | 5.7556 | 8.2128 | 5.0050 | 25.3338 | 3.0546 | 0.0818 | 5.0804 | |
| 192 | 36.8088 | 0.2346 | 30.4483 | 38.0226 | 21.0352 | 0.7209 | 0.4257 | 35.7078 | 29.2690 | |
| 336 | 130.8479 | 8.4887 | 108.5664 | 124.9360 | 46.1551 | 87.8866 | 6.1740 | 17.4011 | 138.8716 | |
| 720 | 989.8402 | 99.9727 | 963.8146 | 1022.4874 | 258.6467 | 416.8387 | 599.1480 | 983.0456 | 3332.3403 | |
| P | 24 | 0.0003 | 0.0288 | 0.0688 | 0.3253 | 1.1544 | 10.3921 | 0.0378 | 0.0462 | 0.1076 |
| 48 | 0.0027 | 0.0126 | 0.2131 | 0.1800 | 5.8013 | 108.6974 | 1.4182 | 14.1664 | 10.4714 | |
| 96 | 0.1307 | 0.2185 | 0.7074 | 0.1344 | 16.8490 | 81.6551 | 7.2090 | 84.4732 | 39.6755 | |
| 192 | 1.7379 | 0.4462 | 3.8985 | 1.6358 | 88.0964 | 129.5566 | 54.7056 | 42.6886 | 85.5319 | |
| 336 | 4.5006 | 65.6245 | 11.1964 | 5.5332 | 252.3296 | 815.6277 | 118.2594 | 772.8632 | 769.3215 | |
| 720 | 8.8062 | 427.3806 | 45.5825 | 7.4661 | 1523.1415 | 4410.7477 | 10,474.9380 | 4957.3017 | 5222.6942 | |
| pH | 24 | 0.5983 | 0.0213 | 0.0134 | 0.6413 | 0.9991 | 2.1611 | 1.4985 | 5.0024 | 5.7742 |
| 48 | 1.0251 | 0.0521 | 0.0509 | 1.4742 | 5.2610 | 0.4174 | 2.7031 | 22.3098 | 18.8522 | |
| 96 | 5.0547 | 0.1770 | 0.8609 | 7.8232 | 24.7156 | 45.0782 | 25.3263 | 83.7369 | 5.9515 | |
| 192 | 15.7894 | 23.9151 | 1.3327 | 22.2747 | 128.5219 | 316.4853 | 96.6469 | 190.2809 | 18.5577 | |
| 336 | 26.0927 | 111.3872 | 0.4617 | 49.6234 | 435.7817 | 398.9661 | 620.7882 | 1113.1331 | 905.8134 | |
| 720 | 123.7476 | 708.1186 | 6.2206 | 125.9397 | 4998.4284 | 1225.1326 | 46,714.7535 | 11,766.8595 | 22,619.9673 | |
| Tur | 24 | 0.1824 | 0.0684 | 0.1123 | 0.0119 | 1.8722 | 9.7322 | 0.4135 | 1.3894 | 0.0109 |
| 48 | 0.0149 | 1.1250 | 0.3568 | 0.0291 | 8.6040 | 49.9134 | 9.2746 | 27.6699 | 8.8936 | |
| 96 | 0.1557 | 7.7352 | 0.2162 | 0.9670 | 28.3880 | 12.4750 | 14.6568 | 115.2703 | 84.5976 | |
| 192 | 13.7333 | 10.3130 | 0.8269 | 13.6116 | 102.1706 | 8.8639 | 42.8517 | 203.4249 | 580.5209 | |
| 336 | 4.5038 | 168.8699 | 0.1386 | 3.0350 | 272.7931 | 578.0640 | 520.8020 | 474.7299 | 15392.1793 | |
| 720 | 10.2031 | 862.4360 | 0.8377 | 8.6210 | 913.6629 | 2833.4078 | 6993.2488 | 1125.5801 | 58,975.3268 | |
| Temp | 24 | 0.0040 | 0.1097 | 0.0022 | 0.0120 | 0.0018 | 0.1655 | 0.0002 | 0.0199 | 0.0065 |
| 48 | 0.0114 | 0.0738 | 0.0019 | 0.0086 | 0.0324 | 17.4798 | 0.0431 | 0.5024 | 0.0628 | |
| 96 | 0.0806 | 0.9253 | 0.0143 | 0.5763 | 0.5456 | 39.4167 | 0.0749 | 0.0684 | 10.4214 | |
| 192 | 4.6677 | 3.5598 | 0.1461 | 6.1148 | 4.7988 | 49.8493 | 17.0674 | 1.5001 | 101.5003 | |
| 336 | 54.7630 | 32.9342 | 1.2742 | 81.2301 | 53.3482 | 8173.8849 | 308.5761 | 16.3838 | 320.7105 | |
| 720 | 873.8195 | 843.5267 | 50.9008 | 1496.6710 | 9671.6638 | 343,420.1353 | 12,871.4938 | 16,840.1088 | 30,823.8448 | |
| Cond | 24 | 0.0431 | 0.4849 | 0.0237 | 0.0801 | 0.3717 | 21.8788 | 0.0031 | 2.4186 | 0.0108 |
| 48 | 0.0015 | 2.1552 | 0.1259 | 0.0117 | 2.3634 | 530.5220 | 0.3821 | 4.0439 | 5.6052 | |
| 96 | 3.2275 | 7.9847 | 1.0038 | 1.3633 | 10.5444 | 627.3379 | 9.0334 | 20.1074 | 9.3834 | |
| 192 | 4.3322 | 11.2703 | 7.4603 | 6.9984 | 54.5658 | 351.9056 | 19.0599 | 71.8256 | 44.5876 | |
| 336 | 46.3262 | 173.1719 | 38.7644 | 34.1752 | 218.3509 | 1559.0175 | 239.8393 | 333.0293 | 392.8412 | |
| 720 | 495.7792 | 2955.3679 | 398.9614 | 417.0533 | 2301.6944 | 27,982.0167 | 18,133.0048 | 6187.7783 | 6221.5995 | |
| Avg. | 59.2621 | 149.5032 | 34.0141 | 70.9110 | 518.9856 | 7362.4039 | 1929.8003 | 1076.1853 | 2856.6428 | |
| Avg. Rank | 3.30 | 3.43 | 2.63 | 3.93 | 5.89 | 6.72 | 5.52 | 6.56 | 7.04 | |
References
- Li, L.; Knapp, J.L.A.; Lintern, A.; Ng, G.-H.C.; Perdrial, J.; Sullivan, P.L.; Zhi, W. River water quality shaped by land–river connectivity in a changing climate. Nat. Clim. Change 2024, 14, 225–237. [Google Scholar] [CrossRef] [Scilit]
- Wu, J.; Cheng, S.-P.; He, L.-Y.; Wang, Y.-C.; Yue, Y.; Zeng, H.; Xu, N. Assessing water quality in the Pearl River for the last decade based on clustering: Characteristic, evolution and policy implications. Water Res. 2023, 244, 120492. [Google Scholar] [CrossRef] [Scilit] [PubMed]
- Chidiac, S.; El Najjar, P.; Ouaini, N.; El Rayess, Y.; El Azzi, D. A comprehensive review of water quality indices (WQIs): History, models, attempts and perspectives. Rev. Environ. Sci. Bio/Technol. 2023, 22, 349–395. [Google Scholar] [CrossRef] [Scilit] [PubMed]
- Zhi, W.; Appling, A.P.; Golden, H.E.; Podgorski, J.; Li, L. Deep learning for water quality. Nat. Water 2024, 2, 228–241. [Google Scholar] [CrossRef] [Scilit] [PubMed]
- Bi, J.; Wang, Z.; Yuan, H.; Wu, X.; Wu, R.; Zhang, J.; Zhou, M.C. Long-term water quality prediction with transformer-based spatial-temporal graph fusion. IEEE Trans. Autom. Sci. Eng. 2025, 22, 11392–11404. [Google Scholar] [CrossRef] [Scilit]
- Hochreiter, S.; Schmidhuber, J. Long short-term memory. Neural Comput. 1997, 9, 1735–1780. [Google Scholar] [CrossRef] [Scilit] [PubMed]
- Pyo, J.; Pachepsky, Y.; Kim, S.; Abbas, A.; Kim, M.; Kwon, Y.S.; Ligaray, M.; Cho, K.H. Long short-term memory models of water quality in inland water environments. Water Res. X 2023, 21, 100207. [Google Scholar] [CrossRef] [Scilit] [PubMed]
- Hu, Z.; Zhang, Y.; Zhao, Y.; Xie, M.; Zhong, J.; Tu, Z.; Liu, J. A water quality prediction method based on the deep LSTM network considering correlation in smart mariculture. Sensors 2019, 19, 1420. [Google Scholar] [CrossRef] [Scilit] [PubMed]
- Cho, K.; Van Merriënboer, B.; Gulçehre, Ç.; Bahdanau, D.; Bougares, F.; Schwenk, H.; Bengio, Y. Learning phrase representations using RNN encoder–decoder for statistical machine translation. In Proceedings of the 2014 Conference on Empirical Methods in Natural Language Processing (EMNLP); Association for Computational Linguistics: Stroudsburg, PA, USA, 2014; pp. 1724–1734. [Google Scholar]
- Sutskever, I.; Vinyals, O.; Le, Q.V. Sequence to sequence learning with neural networks. In Proceedings of the Advances in Neural Information Processing Systems; Curran Associates, Inc.: Red Hook, NY, USA, 2014. [Google Scholar]
- Bai, S.; Kolter, J.Z.; Koltun, V. An empirical evaluation of generic convolutional and recurrent networks for sequence modeling. arXiv 2018, arXiv:1803.01271. [Google Scholar]
- Wang, Z.; Duan, L.; Shuai, D.; Qiu, T. Research on water environmental indicators prediction method based on EEMD decomposition with CNN-BiLSTM. Sci. Rep. 2024, 14, 1676. [Google Scholar] [CrossRef] [Scilit] [PubMed]
- Bahdanau, D.; Cho, K.; Bengio, Y. Neural machine translation by jointly learning to align and translate. In Proceedings of the International Conference on Learning Representations (ICLR), San Diego, CA, USA, 7–9 May 2015. [Google Scholar]
- Chen, H.; Yang, J.; Fu, X.; Zheng, Q.; Song, X.; Fu, Z.; Wang, J.; Liang, Y.; Yin, H.; Liu, Z.; et al. Water quality prediction based on LSTM and attention mechanism: A case study of the Burnett River, Australia. Sustainability 2022, 14, 13231. [Google Scholar] [CrossRef] [Scilit]
- Rahman, A.; Syeed, M.M.M.; Fatema, K.; Karim, M.R.; Khan, R.H.; Hossain, M.S.; Uddin, M.F. An enhanced multi-head attention-based LSTM model for forecasting the surface water quality index. Water Pract. Technol. 2025, 20, 896–914. [Google Scholar] [CrossRef] [Scilit]
- Vaswani, A.; Shazeer, N.; Parmar, N.; Uszkoreit, J.; Jones, L.; Gomez, A.N.; Kaiser, Ł.; Polosukhin, I. Attention is all you need. In Proceedings of the Advances in Neural Information Processing Systems; Curran Associates, Inc.: Red Hook, NY, USA, 2017; Volume 30. [Google Scholar]
- Zhou, H.; Zhang, S.; Peng, J.; Zhang, S.; Li, J.; Xiong, H.; Zhang, W. Informer: Beyond efficient transformer for long sequence time-series forecasting. In Proceedings of the AAAI Conference on Artificial Intelligence; AAAI Press: Washington, DC, USA, 2021; Volume 35, pp. 11106–11115. [Google Scholar]
- Wu, H.; Xu, J.; Wang, J.; Long, M. Autoformer: Decomposition transformers with auto-correlation for long-term series forecasting. In Proceedings of the Advances in Neural Information Processing Systems; Curran Associates, Inc.: Red Hook, NY, USA, 2021; Volume 34, pp. 22419–22430. [Google Scholar]
- Nie, Y.; Nguyen, N.H.; Sinthong, P.; Kalagnanam, J. A time series is worth 64 words: Long-term forecasting with transformers. In Proceedings of the International Conference on Learning Representations (ICLR), Kigali, Rwanda, 1–5 May 2023. [Google Scholar]
- Liu, Y.; Hu, T.; Zhang, H.; Wu, H.; Wang, S.; Ma, L.; Long, M. iTransformer: Inverted transformers are effective for time series forecasting. In Proceedings of the International Conference on Learning Representations (ICLR), Vienna, Austria, 7–11 May 2024. [Google Scholar]
- Kipf, T.N.; Welling, M. Semi-supervised classification with graph convolutional networks. In Proceedings of the International Conference on Learning Representations (ICLR), Toulon, France, 24–26 April 2017. [Google Scholar]
- Veličković, P.; Cucurull, G.; Casanova, A.; Romero, A.; Liò, P.; Bengio, Y. Graph attention networks. In Proceedings of the International Conference on Learning Representations (ICLR), Vancouver, BC, Canada, 30 April–3 May 2018. [Google Scholar]
- Yu, B.; Yin, H.; Zhu, Z. Spatio-temporal graph convolutional networks: A deep learning framework for traffic forecasting. In Proceedings of the Twenty-Seventh International Joint Conference on Artificial Intelligence (IJCAI); Curran Associates, Inc.: Red Hook, NY, USA, 2018; pp. 3634–3640. [Google Scholar]
- Zhu, Q.; Shen, Z.; Wu, Z.; Zhang, H.; Yuan, J.; Chen, Y. Temporal-relational graph neural network for nearshore seawater quality parameters multivariate multi-step prediction and correlation modelling. Expert Syst. Appl. 2025, 265, 126020. [Google Scholar] [CrossRef] [Scilit]
- Yuan, M.; Li, Y.; Zhang, L.; Zhao, W.; Zhang, X.; Li, J. Rapid prediction approach for water quality in plain river networks: A data-driven water quality prediction model based on graph neural networks. Water 2025, 17, 2543. [Google Scholar] [CrossRef] [Scilit]
- Zhou, T.; Ma, Z.; Wen, Q.; Wang, X.; Sun, L.; Jin, R. FEDformer: Frequency enhanced decomposed transformer for long-term series forecasting. In Proceedings of the International Conference on Machine Learning (ICML); Proceedings of Machine Learning Research: Baltimore, MD, USA, 2022; pp. 27268–27286. [Google Scholar]
- Liu, S.; Yu, H.; Liao, C.; Li, J.; Lin, W.; Liu, A.X.; Dustdar, S. Pyraformer: Low-complexity pyramidal attention for long-range time series modeling and forecasting. In Proceedings of the International Conference on Learning Representations (ICLR), Virtual, 3–7 May 2021. [Google Scholar]
- Wu, H.; Hu, T.; Liu, Y.; Zhou, H.; Wang, J.; Long, M. TimesNet: Temporal 2D-variation modeling for general time series analysis. In Proceedings of the International Conference on Learning Representations (ICLR), Kigali, Rwanda, 1–5 May 2023. [Google Scholar]
- Jitha, P.; Vijaya, M.S. Temporal fusion transformer: A deep learning approach for modeling and forecasting river water quality index. Int. J. Intell. Syst. Appl. Eng. 2023, 11, 277–293. [Google Scholar]
- Ramya, S.; Srinath, S.; Tuppad, P. Data driven multi-stage transformer based framework for intelligent water quality monitoring. Sci. Rep. 2025, 15, 41680. [Google Scholar] [CrossRef] [Scilit] [PubMed]
- Graziano, A.P.; Jones, R.C. Diel and seasonal patterns in continuously monitored water quality at fixed sites in two adjacent embayments of the tidal freshwater Potomac River. Water 2017, 9, 624. [Google Scholar] [CrossRef] [Scilit]
- Deng, L.; Chen, K.; Liu, Z.; Wu, B.; Chen, Z.; He, S. Spatiotemporal variation evaluation of water quality in middle and lower Han River, China. Sci. Rep. 2022, 12, 14125. [Google Scholar] [CrossRef] [Scilit] [PubMed]
- Ding, X.; Chen, Y.; Zeng, H.; Du, Y. Time series prediction of water quality based on NGO-CNN-GRU model: A case study of Xijiang River, China. Water 2025, 17, 2413. [Google Scholar] [CrossRef] [Scilit]
- Zhang, B.; Yin, S.; Zhu, H.; He, X. FreqCycle: A Multi-Scale Time-Frequency Analysis Method for Time Series Forecasting. In Proceedings of the AAAI Conference on Artificial Intelligence (AAAI), Singapore, 20–27 January 2026. [Google Scholar]
- Niu, Y.; Deng, J.; Tong, Y. PhaseFormer: From patches to phases for efficient and effective time series forecasting. In Proceedings of the International Conference on Learning Representations (ICLR), Rio de Janeiro, Brazil, 23–27 April 2026. [Google Scholar]
- Zeng, A.; Chen, M.; Zhang, L.; Xu, Q. Are transformers effective for time series forecasting? In Proceedings of the AAAI Conference on Artificial Intelligence (AAAI), Washington, DC, USA, 7–14 February 2023. [Google Scholar]
- Kim, T.; Kim, J.; Tae, Y.; Park, C.; Choi, J.-H.; Choo, J. Reversible Instance Normalization for Accurate Time-Series Forecasting against Distribution Shift. In Proceedings of the International Conference on Learning Representations (ICLR), Virtual, 25–29 April 2022. [Google Scholar]
- Maroufi, H.; Mehdinejadiani, B. A comparative study on using metaheuristic algorithms for simultaneously estimating parameters of space fractional advection-dispersion equation. J. Hydrol. 2021, 602, 126757. [Google Scholar] [CrossRef] [Scilit]
- Wu, Z.; Pan, S.; Long, G.; Jiang, J.; Zhang, C. Graph WaveNet for Deep Spatial-Temporal Graph Modeling. In Proceedings of the Twenty-Eighth International Joint Conference on Artificial Intelligence (IJCAI-19), Macao, China, 10–16 August 2019. [Google Scholar]
- Guo, S.; Lin, Y.; Feng, N.; Song, C.; Wan, H. Attention Based Spatial-Temporal Graph Convolutional Networks for Traffic Flow Forecasting. In Proceedings of the AAAI Conference on Artificial Intelligence (AAAI), Honolulu, HI, USA, 27 January–1 February 2019. [Google Scholar]








| Parameter | Unit | Mean | Std | Min | Max | Missing Rate (%) |
|---|---|---|---|---|---|---|
| Water Temperature | °C | 24.389 | 4.792 | 0.000 | 38.260 | 0.23% |
| pH | – | 7.493 | 0.551 | 4.050 | 10.670 | 0.37% |
| Dissolved Oxygen | mg/L | 7.141 | 2.066 | 0.005 | 29.370 | 0.23% |
| Ammonia Nitrogen | mg/L | 0.121 | 0.229 | 0.000 | 22.204 | 2.37% |
| Total Nitrogen | mg/L | 2.449 | 1.027 | 0.000 | 48.382 | 2.09% |
| Total Phosphorus | mg/L | 0.070 | 0.049 | 0.000 | 2.431 | 1.61% |
| Conductivity | μS/cm | 1330.615 | 3433.925 | 0.001 | 37,565.110 | 1.67% |
| Permanganate Index | mg/L | 2.768 | 1.747 | 0.000 | 47.054 | 1.51% |
| Turbidity | NTU | 42.753 | 86.154 | 0.001 | 8934.345 | 0.31% |
| Variable | Horizon | HarmonicFormer (Ours) | TimesNet (ICLR 2023) [28] | FreqCycle (AAAI 2026) [34] | PhaseFormer (ICLR 2026) [35] | DLinear (AAAI 2023) [36] | Autoformer (NIPS 2021) [18] | GWN (IJCAI 2019) [39] | ASTGCN (AAAI 2019) [40] | STGCN (IJCAI 2018) [23] | |||||||||
|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
| MSE | MAE | MSE | MAE | MSE | MAE | MSE | MAE | MSE | MAE | MSE | MAE | MSE | MAE | MSE | MAE | MSE | MAE | ||
| AN | 24 | 0.2640 | 0.2743 | 0.3081 | 0.3053 | 0.2788 | 0.2836 | 0.2854 | 0.2962 | 0.2746 | 0.3248 | 0.4190 | 0.4023 | 0.2681 | 0.3128 | 0.2899 | 0.3267 | 0.3230 | 0.3573 |
| 48 | 0.3333 | 0.3186 | 0.4559 | 0.3832 | 0.3458 | 0.3206 | 0.3484 | 0.3315 | 0.3390 | 0.3728 | 0.5132 | 0.4601 | 0.3283 | 0.3576 | 0.3525 | 0.3755 | 0.4492 | 0.4175 | |
| 96 | 0.4401 | 0.3740 | 0.6007 | 0.4446 | 0.4524 | 0.3713 | 0.4494 | 0.3802 | 0.4338 | 0.4348 | 0.6778 | 0.5400 | 0.4168 | 0.4171 | 0.4432 | 0.4372 | 0.5905 | 0.4904 | |
| 192 | 0.5940 | 0.4451 | 0.7671 | 0.5094 | 0.6059 | 0.4393 | 0.5971 | 0.4472 | 0.5489 | 0.5041 | 0.7408 | 0.5392 | 0.5351 | 0.4906 | 0.5534 | 0.5032 | 0.6210 | 0.5461 | |
| 336 | 0.7348 | 0.5082 | 0.9247 | 0.5722 | 0.7551 | 0.5042 | 0.7363 | 0.5088 | 0.6435 | 0.5626 | 0.8867 | 0.5912 | 0.6316 | 0.5519 | 0.6357 | 0.5387 | 0.6859 | 0.5756 | |
| 720 | 0.8235 | 0.5520 | 1.0301 | 0.6241 | 0.8513 | 0.5524 | 0.8229 | 0.5508 | 0.7536 | 0.6350 | 1.0667 | 0.6922 | 0.7331 | 0.6260 | 0.7655 | 0.6442 | 0.8188 | 0.6561 | |
| N | 24 | 0.2044 | 0.2607 | 0.2459 | 0.3009 | 0.2109 | 0.2702 | 0.2156 | 0.2762 | 0.2183 | 0.2937 | 0.3896 | 0.4497 | 0.2109 | 0.2768 | 0.2370 | 0.2998 | 0.3023 | 0.3328 |
| 48 | 0.2360 | 0.2919 | 0.3279 | 0.3607 | 0.2408 | 0.2985 | 0.2452 | 0.3037 | 0.2566 | 0.3290 | 0.3866 | 0.4385 | 0.2556 | 0.3171 | 0.2895 | 0.3441 | 0.3937 | 0.4006 | |
| 96 | 0.2793 | 0.3308 | 0.3951 | 0.4058 | 0.2815 | 0.3336 | 0.2864 | 0.3384 | 0.3158 | 0.3796 | 0.4915 | 0.5084 | 0.3338 | 0.3770 | 0.3529 | 0.3927 | 0.5005 | 0.4601 | |
| 192 | 0.3426 | 0.3806 | 0.4490 | 0.4436 | 0.3410 | 0.3791 | 0.3471 | 0.3847 | 0.4090 | 0.4472 | 0.4008 | 0.4376 | 0.4630 | 0.4525 | 0.5495 | 0.4836 | 0.6039 | 0.5298 | |
| 336 | 0.4138 | 0.4272 | 0.5525 | 0.4998 | 0.4096 | 0.4233 | 0.4167 | 0.4293 | 0.5183 | 0.5128 | 0.4760 | 0.4858 | 0.6143 | 0.5297 | 0.7257 | 0.5578 | 0.7069 | 0.5879 | |
| 720 | 0.5419 | 0.4946 | 0.7216 | 0.5774 | 0.5390 | 0.4925 | 0.5383 | 0.4932 | 0.7709 | 0.6292 | 0.6954 | 0.6165 | 0.8592 | 0.6301 | 0.9976 | 0.6802 | 1.0675 | 0.7402 | |
| DO | 24 | 0.1515 | 0.2462 | 0.1931 | 0.2850 | 0.1718 | 0.2669 | 0.1581 | 0.2534 | 0.1724 | 0.2775 | 0.2716 | 0.3813 | 0.1654 | 0.2666 | 0.1662 | 0.2673 | 0.1786 | 0.2820 |
| 48 | 0.1966 | 0.2852 | 0.2799 | 0.3509 | 0.2140 | 0.3023 | 0.2024 | 0.2914 | 0.2138 | 0.3131 | 0.4179 | 0.4873 | 0.2058 | 0.3046 | 0.2112 | 0.3101 | 0.2318 | 0.3352 | |
| 96 | 0.2727 | 0.3433 | 0.3872 | 0.4173 | 0.2864 | 0.3553 | 0.2789 | 0.3486 | 0.2870 | 0.3712 | 0.4444 | 0.4973 | 0.2708 | 0.3569 | 0.2956 | 0.3802 | 0.3132 | 0.3992 | |
| 192 | 0.3853 | 0.4172 | 0.4642 | 0.4654 | 0.3959 | 0.4252 | 0.3893 | 0.4202 | 0.3896 | 0.4470 | 0.5733 | 0.5755 | 0.3657 | 0.4261 | 0.4027 | 0.4495 | 0.4377 | 0.4854 | |
| 336 | 0.5119 | 0.4927 | 0.6010 | 0.5347 | 0.5166 | 0.4960 | 0.5181 | 0.4963 | 0.5142 | 0.5323 | 0.7467 | 0.6628 | 0.5114 | 0.5267 | 0.5229 | 0.5246 | 0.6066 | 0.5912 | |
| 720 | 0.7445 | 0.6277 | 0.7681 | 0.6149 | 0.7253 | 0.6192 | 0.7541 | 0.6316 | 0.8598 | 0.7179 | 1.2201 | 0.8596 | 0.9154 | 0.7340 | 0.9958 | 0.7742 | 0.7975 | 0.6926 | |
| Perm | 24 | 0.2527 | 0.2944 | 0.2956 | 0.3324 | 0.2640 | 0.3052 | 0.2694 | 0.3065 | 0.2700 | 0.3295 | 0.3920 | 0.4224 | 0.2767 | 0.3154 | 0.3086 | 0.3284 | 0.3432 | 0.3377 |
| 48 | 0.3043 | 0.3286 | 0.4170 | 0.4035 | 0.3120 | 0.3348 | 0.3172 | 0.3383 | 0.3201 | 0.3664 | 0.5733 | 0.5304 | 0.3349 | 0.3586 | 0.3692 | 0.3677 | 0.3970 | 0.3775 | |
| 96 | 0.3701 | 0.3697 | 0.4934 | 0.4437 | 0.3730 | 0.3713 | 0.3815 | 0.3763 | 0.3876 | 0.4140 | 0.6357 | 0.5643 | 0.4117 | 0.4017 | 0.4408 | 0.4134 | 0.5128 | 0.4476 | |
| 192 | 0.4612 | 0.4228 | 0.5526 | 0.4720 | 0.4568 | 0.4192 | 0.4652 | 0.4255 | 0.4756 | 0.4715 | 0.6062 | 0.5308 | 0.4975 | 0.4470 | 0.5434 | 0.4766 | 0.5788 | 0.5017 | |
| 336 | 0.5435 | 0.4661 | 0.6560 | 0.5219 | 0.5318 | 0.4602 | 0.5440 | 0.4671 | 0.5513 | 0.5178 | 0.6578 | 0.5677 | 0.5520 | 0.4864 | 0.5979 | 0.5165 | 0.6773 | 0.5650 | |
| 720 | 0.7626 | 0.5631 | 0.8378 | 0.6055 | 0.7527 | 0.5585 | 0.7680 | 0.5656 | 0.7107 | 0.6041 | 0.9288 | 0.7089 | 0.6719 | 0.5777 | 0.6995 | 0.5925 | 0.7574 | 0.6381 | |
| P | 24 | 0.1699 | 0.2454 | 0.1990 | 0.2741 | 0.1724 | 0.2514 | 0.1748 | 0.2552 | 0.1741 | 0.2700 | 0.3907 | 0.4543 | 0.1665 | 0.2523 | 0.1746 | 0.2651 | 0.1769 | 0.2651 |
| 48 | 0.1988 | 0.2738 | 0.2806 | 0.3366 | 0.2024 | 0.2783 | 0.2045 | 0.2817 | 0.2049 | 0.3022 | 0.4451 | 0.4839 | 0.1959 | 0.2855 | 0.2047 | 0.2947 | 0.2106 | 0.3036 | |
| 96 | 0.2463 | 0.3127 | 0.3250 | 0.3711 | 0.2492 | 0.3149 | 0.2527 | 0.3198 | 0.2529 | 0.3472 | 0.4918 | 0.5192 | 0.2450 | 0.3376 | 0.2605 | 0.3565 | 0.2614 | 0.3529 | |
| 192 | 0.3144 | 0.3619 | 0.3841 | 0.4111 | 0.3146 | 0.3609 | 0.3180 | 0.3649 | 0.3165 | 0.4021 | 0.6006 | 0.5754 | 0.3074 | 0.3888 | 0.3348 | 0.4210 | 0.3636 | 0.4394 | |
| 336 | 0.3630 | 0.3975 | 0.4342 | 0.4422 | 0.3597 | 0.3931 | 0.3639 | 0.3974 | 0.3694 | 0.4483 | 0.4940 | 0.5218 | 0.3482 | 0.4212 | 0.3879 | 0.4628 | 0.4085 | 0.4754 | |
| 720 | 0.4345 | 0.4510 | 0.5521 | 0.5171 | 0.4293 | 0.4454 | 0.4351 | 0.4511 | 0.4810 | 0.5339 | 0.7440 | 0.6821 | 0.4588 | 0.5173 | 0.5646 | 0.5902 | 0.5360 | 0.5795 | |
| pH | 24 | 0.2338 | 0.2816 | 0.3003 | 0.3327 | 0.2616 | 0.3054 | 0.2431 | 0.2930 | 0.2590 | 0.3253 | 0.4467 | 0.4742 | 0.2608 | 0.3113 | 0.2785 | 0.3271 | 0.3529 | 0.3670 |
| 48 | 0.2938 | 0.3255 | 0.4304 | 0.4020 | 0.3160 | 0.3438 | 0.3017 | 0.3355 | 0.3212 | 0.3701 | 0.6359 | 0.5952 | 0.3286 | 0.3566 | 0.3479 | 0.3745 | 0.4603 | 0.4281 | |
| 96 | 0.3905 | 0.3873 | 0.5708 | 0.4746 | 0.4090 | 0.4016 | 0.3992 | 0.3942 | 0.4257 | 0.4397 | 0.7712 | 0.6452 | 0.4358 | 0.4226 | 0.4654 | 0.4479 | 0.6305 | 0.5122 | |
| 192 | 0.5425 | 0.4696 | 0.7190 | 0.5453 | 0.5569 | 0.4803 | 0.5486 | 0.4741 | 0.5799 | 0.5277 | 0.7897 | 0.6240 | 0.5959 | 0.5075 | 0.6178 | 0.5264 | 0.8053 | 0.5902 | |
| 336 | 0.7001 | 0.5440 | 0.9106 | 0.6281 | 0.7168 | 0.5532 | 0.7037 | 0.5464 | 0.7574 | 0.6163 | 0.8332 | 0.6552 | 0.7925 | 0.6043 | 0.8366 | 0.6232 | 0.9766 | 0.6636 | |
| 720 | 0.9320 | 0.6466 | 1.2254 | 0.7432 | 0.9617 | 0.6580 | 0.9400 | 0.6501 | 1.1430 | 0.7694 | 1.2593 | 0.8364 | 1.4464 | 0.8577 | 1.4828 | 0.8767 | 1.5370 | 0.9017 | |
| Tur | 24 | 0.2836 | 0.3111 | 0.3181 | 0.3363 | 0.2860 | 0.3134 | 0.2921 | 0.3235 | 0.2924 | 0.3424 | 0.4492 | 0.4662 | 0.2783 | 0.3247 | 0.2937 | 0.3494 | 0.2872 | 0.3332 |
| 48 | 0.3271 | 0.3427 | 0.4462 | 0.4113 | 0.3300 | 0.3394 | 0.3411 | 0.3592 | 0.3348 | 0.3764 | 0.4709 | 0.4769 | 0.3199 | 0.3615 | 0.3331 | 0.3788 | 0.3308 | 0.3698 | |
| 96 | 0.3799 | 0.3816 | 0.5299 | 0.4572 | 0.3795 | 0.3705 | 0.3811 | 0.3806 | 0.3848 | 0.4196 | 0.4971 | 0.4836 | 0.3648 | 0.3976 | 0.4022 | 0.4529 | 0.3918 | 0.4312 | |
| 192 | 0.4297 | 0.4166 | 0.5597 | 0.4769 | 0.4281 | 0.4045 | 0.4282 | 0.4146 | 0.4321 | 0.4655 | 0.5077 | 0.4829 | 0.4077 | 0.4397 | 0.4318 | 0.4677 | 0.5751 | 0.5951 | |
| 336 | 0.4525 | 0.4346 | 0.5631 | 0.4941 | 0.4503 | 0.4214 | 0.4506 | 0.4339 | 0.4656 | 0.5028 | 0.5652 | 0.5395 | 0.4376 | 0.4818 | 0.4781 | 0.5249 | 0.8829 | 0.7913 | |
| 720 | 0.5239 | 0.4805 | 0.6963 | 0.5671 | 0.5212 | 0.4637 | 0.5249 | 0.4808 | 0.5444 | 0.5711 | 0.7433 | 0.6594 | 0.6194 | 0.6253 | 0.6339 | 0.6351 | 1.0761 | 0.9066 | |
| Temp | 24 | 0.0268 | 0.1035 | 0.0348 | 0.1213 | 0.0276 | 0.1059 | 0.0275 | 0.1058 | 0.0358 | 0.1285 | 0.0567 | 0.1821 | 0.0265 | 0.1073 | 0.0278 | 0.1098 | 0.0297 | 0.1182 |
| 48 | 0.0402 | 0.1310 | 0.0468 | 0.1430 | 0.0378 | 0.1264 | 0.0404 | 0.1324 | 0.0436 | 0.1418 | 0.0871 | 0.2271 | 0.0367 | 0.1311 | 0.0388 | 0.1322 | 0.0532 | 0.1657 | |
| 96 | 0.0613 | 0.1642 | 0.0801 | 0.1890 | 0.0578 | 0.1593 | 0.0670 | 0.1773 | 0.0640 | 0.1756 | 0.1176 | 0.2708 | 0.0546 | 0.1628 | 0.0645 | 0.1775 | 0.1228 | 0.2497 | |
| 192 | 0.1098 | 0.2370 | 0.0906 | 0.2025 | 0.0878 | 0.2058 | 0.1129 | 0.2420 | 0.0956 | 0.2239 | 1.1699 | 0.6867 | 0.0840 | 0.2152 | 0.0879 | 0.2096 | 0.1766 | 0.3145 | |
| 336 | 0.1901 | 0.3226 | 0.1416 | 0.2452 | 0.1267 | 0.2562 | 0.1951 | 0.3268 | 0.1599 | 0.2997 | 0.2724 | 0.3990 | 0.1419 | 0.2937 | 0.1299 | 0.2661 | 0.2083 | 0.3477 | |
| 720 | 0.4059 | 0.4905 | 0.3298 | 0.3676 | 0.2447 | 0.3705 | 0.4022 | 0.4870 | 0.5666 | 0.5823 | 2.1010 | 1.3232 | 0.5338 | 0.5642 | 0.6062 | 0.6068 | 0.6379 | 0.6280 | |
| Cond | 24 | 0.2385 | 0.2510 | 0.2751 | 0.2790 | 0.2511 | 0.2649 | 0.2354 | 0.2649 | 0.2522 | 0.2833 | 0.4373 | 0.4518 | 0.2500 | 0.2660 | 0.2577 | 0.2774 | 0.2658 | 0.2868 |
| 48 | 0.2697 | 0.2847 | 0.3570 | 0.3338 | 0.2812 | 0.2943 | 0.2673 | 0.2940 | 0.2838 | 0.3111 | 0.3879 | 0.4193 | 0.2779 | 0.3045 | 0.2884 | 0.3131 | 0.3068 | 0.3338 | |
| 96 | 0.3149 | 0.3244 | 0.4516 | 0.3882 | 0.3254 | 0.3321 | 0.3169 | 0.3307 | 0.3322 | 0.3542 | 0.5314 | 0.5149 | 0.3217 | 0.3477 | 0.3449 | 0.3678 | 0.3666 | 0.3743 | |
| 192 | 0.3990 | 0.3900 | 0.5473 | 0.4524 | 0.4059 | 0.3912 | 0.3993 | 0.3935 | 0.4141 | 0.4194 | 0.5265 | 0.5043 | 0.4106 | 0.4264 | 0.4182 | 0.4320 | 0.4832 | 0.4557 | |
| 336 | 0.4792 | 0.4494 | 0.6565 | 0.5183 | 0.4850 | 0.4489 | 0.4788 | 0.4506 | 0.5093 | 0.4893 | 0.7731 | 0.6575 | 0.5084 | 0.4957 | 0.5189 | 0.4889 | 0.6911 | 0.5938 | |
| 720 | 0.6532 | 0.5393 | 0.9041 | 0.6420 | 0.6435 | 0.5411 | 0.6444 | 0.5392 | 0.8158 | 0.6522 | 1.2143 | 0.8659 | 0.8146 | 0.6521 | 0.9566 | 0.7095 | 0.9682 | 0.7242 | |
| Avg. | 0.3809 | 0.3753 | 0.4830 | 0.4255 | 0.3821 | 0.3737 | 0.3857 | 0.3808 | 0.4081 | 0.4245 | 0.6189 | 0.5487 | 0.4130 | 0.4148 | 0.4447 | 0.4343 | 0.5087 | 0.4749 | |
| Avg. Rank | 2.65 | 2.96 | 7.76 | 7.43 | 2.70 | 2.83 | 4.06 | 4.37 | 4.91 | 6.57 | 8.76 | 9.13 | 3.24 | 5.11 | 6.39 | 7.00 | 7.59 | 8.04 | |
| Model | Avg. RMSE | Avg. RSE | Avg. GPI_abs | Avg. Rank (RMSE/RSE) | Avg. Rank (GPI) |
|---|---|---|---|---|---|
| HarmonicFormer | 0.5941 | 0.6941 | 59.2621 | 2.33 | 3.30 |
| TimesNet | 0.6681 | 0.7762 | 149.5032 | 7.19 | 3.43 |
| FreqCycle | 0.5943 | 0.6901 | 34.0141 | 2.96 | 2.63 |
| PhaseFormer | 0.5986 | 0.6994 | 70.9110 | 3.54 | 3.93 |
| DLinear | 0.6126 | 0.7147 | 518.9856 | 4.50 | 5.89 |
| Autoformer | 0.7613 | 0.9139 | 7362.4039 | 8.37 | 6.72 |
| GWN | 0.6134 | 0.7121 | 1929.8003 | 3.07 | 5.52 |
| ASTGCN | 0.6360 | 0.7383 | 1076.1853 | 5.69 | 6.56 |
| STGCN | 0.6827 | 0.7949 | 2856.6428 | 7.35 | 7.04 |
| Model | Runs | Avg. Epoch Time (s) | Median Epoch Time (s) | Avg. Epochs | Avg. Train Time (s) | Avg. MSE Rank | Avg. MAE Rank |
|---|---|---|---|---|---|---|---|
| HarmonicFormer | 54 | 5.78 | 6.61 | 8.5 | 49.0 | 2.65 | 2.96 |
| FreqCycle | 54 | 9.61 | 10.69 | 9.0 | 86.3 | 2.70 | 2.83 |
| GWN | 54 | 75.07 | 81.21 | 7.4 | 558.9 | 3.24 | 5.11 |
| PhaseFormer | 54 | 5.52 | 5.53 | 7.7 | 42.6 | 4.06 | 4.37 |
| DLinear | 53 | 8.20 | 8.33 | 9.7 | 79.4 | 4.91 | 6.57 |
| ASTGCN | 54 | 126.09 | 134.69 | 7.4 | 936.3 | 6.39 | 7.00 |
| TimesNet | 54 | 812.86 | 256.37 | 4.0 | 3266.5 | 7.76 | 7.43 |
| STGCN | 54 | 29.53 | 30.89 | 8.1 | 237.9 | 7.59 | 8.04 |
| Autoformer | 54 | 76.82 | 64.38 | 5.3 | 404.0 | 8.76 | 9.13 |
| Variable | HarmonicFormer | GWN | ASTGCN | STGCN |
|---|---|---|---|---|
| Total Nitrogen MSE193:336 | 0.5056 | 0.7740 | 0.9978 | 0.8493 |
| pH MSE193:336 | 0.8868 | 1.1484 | 1.1743 | 1.0958 |
| Conductivity MSE193:336 | 0.5901 | 0.7608 | 0.8984 | 0.8990 |
| Three-variable Mean MSE | 0.6608 | 0.8944 | 1.0235 | 0.9480 |
| MSE Reduction by HF (%) | – | 26.1% | 35.4% | 30.3% |
| Mean Lead-wise 95% CI Width | 0.0103 | 0.3336 | 0.2444 | 0.3745 |
| CI-width Reduction by HF (%) | – | 96.9% | 95.8% | 97.2% |
| Model | Mean MSE193:336 | MSE Reduction by HF (%) | Identified Mechanism | ||
|---|---|---|---|---|---|
| HarmonicFormer | 0.5901 | – | Reference | Reference | Reference |
| GWN | 0.7608 | 22.4 | >0 | <0 | Offsetting-bias |
| ASTGCN | 0.8984 | 34.3 | >0 | <0 | Offsetting-bias |
| STGCN | 0.8990 | 34.4 | Dominant increase | Non-dominant | Bias-dominant |
| Study | Variant | ||||||
|---|---|---|---|---|---|---|---|
| MSE | MAE | MSE | MAE | MSE | MAE | ||
| Module | HarmonicFormer | 0.0578 | 0.1827 | 0.0983 | 0.2387 | 0.1603 | 0.3047 |
| w/o Harmonic Enc. | 0.0639 | 0.1914 | 0.1035 | 0.2439 | 0.1676 | 0.3121 | |
| w/o RevIN | 0.0605 | 0.1852 | 0.0982 | 0.2337 | 0.1837 | 0.3282 | |
| Period | 0.0718 | 0.2079 | 0.1085 | 0.2539 | 0.1729 | 0.3194 | |
| 0.0578 | 0.1827 | 0.0983 | 0.2387 | 0.1603 | 0.3047 | ||
| 0.0677 | 0.1975 | 0.1164 | 0.2631 | 0.1679 | 0.3136 | ||
| 0.0990 | 0.2452 | 0.1187 | 0.2670 | 0.1712 | 0.3189 | ||
| Routers | 0.0586 | 0.1831 | 0.0952 | 0.2320 | 0.1577 | 0.3018 | |
| 0.0582 | 0.1826 | 0.0950 | 0.2333 | 0.1617 | 0.3068 | ||
| 0.0578 | 0.1827 | 0.0983 | 0.2387 | 0.1603 | 0.3047 | ||
| 0.0600 | 0.1867 | 0.0958 | 0.2342 | 0.1607 | 0.3054 | ||
| Layers | 0.0607 | 0.1878 | 0.0967 | 0.2363 | 0.1611 | 0.3067 | |
| 0.0578 | 0.1827 | 0.0983 | 0.2387 | 0.1603 | 0.3047 | ||
| 0.0604 | 0.1867 | 0.0959 | 0.2339 | 0.1599 | 0.3040 | ||
Disclaimer/Publisher’s Note: The statements, opinions and data contained in all publications are solely those of the individual author(s) and contributor(s) and not of MDPI and/or the editor(s). MDPI and/or the editor(s) disclaim responsibility for any injury to people or property resulting from any ideas, methods, instructions or products referred to in the content. |
© 2026 by the authors. Licensee MDPI, Basel, Switzerland. This article is an open access article distributed under the terms and conditions of the Creative Commons Attribution (CC BY) license.
Share and Cite
Zhang, C.; Zhou, J.; Liang, Y.; Zhang, C.; Tavares, A.; Bai, J. HarmonicFormer: Cross-Phase Harmonic Modeling for Efficient Long-Term Water Quality Forecasting. Water 2026, 18, 2005. https://doi.org/10.3390/w18162005
Zhang C, Zhou J, Liang Y, Zhang C, Tavares A, Bai J. HarmonicFormer: Cross-Phase Harmonic Modeling for Efficient Long-Term Water Quality Forecasting. Water. 2026; 18(16):2005. https://doi.org/10.3390/w18162005
Chicago/Turabian StyleZhang, Canjia, Jiajun Zhou, Yanchun Liang, Chunfu Zhang, Adriano Tavares, and Jing Bai. 2026. "HarmonicFormer: Cross-Phase Harmonic Modeling for Efficient Long-Term Water Quality Forecasting" Water 18, no. 16: 2005. https://doi.org/10.3390/w18162005
APA StyleZhang, C., Zhou, J., Liang, Y., Zhang, C., Tavares, A., & Bai, J. (2026). HarmonicFormer: Cross-Phase Harmonic Modeling for Efficient Long-Term Water Quality Forecasting. Water, 18(16), 2005. https://doi.org/10.3390/w18162005

