Abstract
Accurate streamflow forecasting is essential for effective water management, particularly in regions vulnerable to climate change. However, many areas, such as the Upper Tana River Basin in Kenya, suffer from significant data scarcity, making it difficult to train robust machine learning models. This study proposes a transfer learning framework that leverages Long Short-Term Memory (LSTM) networks pre-trained on large-scale datasets from the United States (CAMELS-US). By fine-tuning these models with local data and incorporating static catchment attributes, the researchers demonstrate that hydrological knowledge can be effectively transferred across continents, significantly improving forecast stability and accuracy in data-sparse regions.
Introduction: The Challenge of the "Data Desert"
In hydrology, the "generalization gap" refers to the difficulty of applying models trained in data-rich environments to regions with sparse or inconsistent records. Traditional physically-based models often require extensive local parameters and expert configuration, while standard deep learning models typically fail when historical data is insufficient to learn complex rainfall-runoff relationships from scratch. This paper addresses this gap by investigating whether knowledge of universal water cycles can be transferred from a data-rich source domain to a data-sparse target domain.
Methodology: Transferring Hydrological Knowledge
The core of the proposed approach is a Transfer Learning (TL) framework utilizing a multi-layer LSTM network. The methodology follows a structured three-step process:
- Source Domain Pre-training: An LSTM model is first trained on the CAMELS-US dataset, which provides over 30 years of high-quality data across 531 basins. This stage allows the model to learn the fundamental physics of how meteorological forcing (e.g., precipitation, temperature) translates into streamflow.
- Target Domain Adaptation: The pre-trained model is transferred to the Kenyan context. The internal representations learned during pre-training are preserved, while the final regression head is retrained using limited local data.
- Optimization: The model is fine-tuned using a specialized loss function based on Nash-Sutcliffe Efficiency (NSE), a standard hydrological metric that is more robust to varying streamflow scales than traditional error metrics.
Model Architecture and Static Attributes
To enhance the model's ability to generalize across diverse landscapes, the researchers integrated Static Catchment Attributes (SCA). These attributes—including soil properties, land cover, elevation, and aridity—act as descriptors that define the unique "personality" of a river basin. By combining dynamic meteorological forcing with these static features, the LSTM can differentiate how two distinct basins might react to the same rainfall event.
Datasets
- CAMELS-US (Source): A benchmark dataset covering 531 basins in the United States from 1980 to 2014, providing a rich foundation for learning general hydrological patterns.
- TNC Kenya (Target): A dataset from the Upper Tana River Basin covering 26 stream locations (2015–2019). This dataset is characterized by extreme sparsity, with many stations exhibiting up to 50% missing data, highlighting the need for transfer learning.
Key Results and Discussion
The study compared several model variants, including a standard LSTM, an LSTM with static attributes ($LSTM_{SCA}$), and the transfer learning hybrid ($LSTM_{TL+SCA}$).
- Improved Accuracy: The $LSTM_{TL}$ model achieved a median NSE of -0.49, a significant improvement over the standard LSTM's -0.85. While negative NSE values indicate ongoing challenges with data quality, the upward trend represents a major step toward model viability.
- Enhanced Stability: One of the most critical findings was the reduction in performance variance. The standard deviation of the error metric dropped by nearly 80% (from 2.08 to 0.46) when using transfer learning, indicating far more reliable forecasts across different basins.
- Peak Flow Capture: Qualitative analysis showed that transfer learning models were significantly better at capturing the timing and magnitude of peak flow events, which are essential for flood risk management.
Conclusion and Future Work
Transfer learning provides a powerful mechanism for stabilizing hydrological forecasts in regions where ground-truth data is inconsistent. While some stations still reported poor scores due to extreme local data gaps, the pre-trained weights offered a superior initialization compared to random noise. Future research will explore the integration of satellite-derived rainfall data and more advanced architectures, such as Graph Neural Networks (GNNs), to better model the spatial connectivity of river systems and further bridge the data gap.
Summary updated