From RNNs to Transformers: benchmarking deep learning architectures for hydrologic prediction
Abstract. Recurrent Neural Networks (RNNs) such as Long Short-Term Memory (LSTM) have achieved significant success in hydrological modeling. However, the recent breakthroughs of foundation models like ChatGPT and the Segment Anything Model (SAM) in natural language processing and computer vision have raised interest in the potential of attention mechanism-based models for hydrologic predictions. In this study, we propose a deep learning framework that seamlessly integrates multi-source, multi-scale data and multi-model modules, creating an automated platform for multi-dataset benchmarking and attention-based model comparisons beyond LSTM-centered tasks. The proposed framework enables evaluation of deep learning models across diverse hydrologic prediction tasks, including regression (daily runoff, soil moisture, snow water equivalent, and dissolved oxygen prediction), forecasting (using lagged hydrologic observations combined with meteorological inputs), autoregression (forecasting based solely on historical observations), spatial cross-validation (assessing model generalization to ungauged regions), and zero-shot forecasting (prediction without task-specific training data). Specifically, we benchmarked 11 Transformer-based architectures against a baseline Long Short-Term Memory (LSTM) model and further evaluated pretrained Large Language Models (LLMs) and Time Series Attention Models (TSAMs) regarding their capabilities for zero-shot hydrologic forecasting. Results show that LSTM models perform best in regression tasks, especially on the global streamflow dataset (median KGE = 0.75), surpassing the best-performing Transformer-based model's KGE value by 0.11. However, as tasks become more complex (from regression and forecasting to autoregression and zero-shot prediction), attention-based models gradually surpass LSTM models. This study provides a robust framework for comparing and developing different model structures in the era of large-scale models, providing a valuable benchmark for water resource modeling, forecasting, and management.
Authors
- Zhi Wei (ORCID: https://orcid.org/0000-0001-6059-4267)
- Fearghal O’Donncha (ORCID: https://orcid.org/0000-0002-0275-1591)
- Kathryn Lawson (ORCID: https://orcid.org/0000-0003-0075-7911)
- Yalan Song (ORCID: https://orcid.org/0000-0002-4722-148X)
- Jiangtao Liu (ORCID: https://orcid.org/0000-0002-9219-8354)
- Tadd Bindas (ORCID: https://orcid.org/0000-0003-3159-6276)
- Hylke E. Beck (ORCID: https://orcid.org/0000-0003-2553-9566)
- Chaopeng Shen (ORCID: https://orcid.org/0000-0002-0685-1901)
- Nicholas Kraabel
Institutions
- Pennsylvania State University (US)
- Hohai University (CN)
- IBM Research - Ireland (IE)
- King Abdullah University of Science and Technology (SA)
Publication Details
- Journal
- Hydrology and earth system sciences
- Published
- 2025-12-01
- DOI
- https://doi.org/10.5194/hess-29-6811-2025
- Citations
- 2
- Primary Topic
- Hydrological Forecasting Using AI
- Type
- article
- Field-Weighted Citation Impact
- 1.60
Funders
- National Science Foundation
- U.S. Department of Energy
- Grains Research and Development Corporation
- National Oceanic and Atmospheric Administration
- Biological and Environmental Research