Forecasting Reservoir Inflow via Recurrent Neural ODEs

Fan Zhou, Liang Li

Introduction

Effective reservoir management is a critical task for modern infrastructure, requiring a delicate balance between storing water for hydropower and irrigation and releasing it to mitigate flood risks. Central to this decision-making process is inflow forecasting—the ability to accurately predict the volume of water entering a reservoir over various time horizons.

Traditional forecasting models, such as Long Short-Term Memory (LSTM) networks or AutoRegressive Integrated Moving Average (ARIMA), often struggle with the complexities of hydrological systems. These systems are characterized by inherent stochasticity—driven by groundwater seepage, irregular snowmelt, and measurement errors—and continuous physical dynamics. Standard neural networks operate on discrete time steps, making them less flexible for arbitrary prediction horizons and often failing to capture the underlying continuous nature of water flow.

The FlowODE Framework

To address these challenges, we present FlowODE, a novel forecasting framework that transitions from discrete state transitions to a continuous-time inference approach. FlowODE integrates Stochastic Recurrent Neural Networks (SRNNs) with Neural Ordinary Differential Equations (ODEs) to model latent reservoir states.

The FlowODE architecture combines SRNNs for uncertainty modeling with Neural ODEs for continuous-time state evolution.

The architecture consists of several key modules:

  1. Stochastic RNN (SRNN): Unlike deterministic models, the SRNN generates a probability distribution (mean and variance) for latent variables. This allows FlowODE to explicitly account for the uncertainty inherent in hydrological observations.
  2. Neural ODE Solver: This component evolves the latent state over time using an ODE solver (e.g., the Dopri5 method). By treating the state transition as a continuous process, the model can calculate the reservoir's state at any future point by simply adjusting the integration interval, enabling "zero-shot" multi-horizon forecasting.
  3. Multi-head Attention: This mechanism weighs historical data to focus on the most relevant past events for specific prediction horizons.
  4. Factors Fusion Network: A gated fusion layer incorporates external variables such as temperature, precipitation, and electricity prices to refine the forecast.

Experimental Evaluation

FlowODE was evaluated using real-world data from two significant hydropower stations in China:

  • PBG: A large-scale artificial dam on the Dadu River with a 3,600 MW capacity.
  • SXG: A downstream regulation station whose inflow is heavily influenced by the discharge from the PBG dam.

The datasets included water flow metrics, power generation data, meteorological factors (temperature and precipitation), and temporal markers.

Key Results and Insights

FlowODE consistently outperformed state-of-the-art baselines, including standard LSTMs, Bi-GRUs, and other ODE-based models like LatentODE. On the PBG dataset, FlowODE achieved a Root Mean Squared Error (RMSE) of 296.3, compared to 311.8 for LSTM.

The Cascade Effect and Feature Importance

A significant finding was the "cascade effect" in downstream reservoirs. For the SXG station, the most critical predictor was not local weather but the outflow from the upstream PBG dam. FlowODE's ability to fuse these diverse factors proved essential for accurate forecasting in interconnected systems.

Ablation studies show the relative improvement contribution of different factors, highlighting the dominance of upstream outflow for downstream stations like SXG.

Continuous Dynamics and Efficiency

By modeling the reservoir as a physical system governed by continuous laws, FlowODE maintains high accuracy across multiple time horizons (hourly, daily, weekly) without retraining. Furthermore, the use of an ODE solver introduces a tunable trade-off between accuracy and computational cost. Operators can increase the number of function evaluations ($N$) to gain precision during critical events like flash floods or decrease them for faster routine monitoring.

Conclusion and Future Directions

FlowODE represents a significant advancement in hydrological forecasting by bridging the gap between deep learning and continuous physical modeling. Future work will focus on scaling the model to handle complex cascaded systems with dozens of dams and integrating forecasts into automated control systems for optimized water management and revenue generation. Additionally, exploring advanced statistical techniques like Normalizing Flows could further enhance the model's handling of non-Gaussian uncertainty.

Summary updated

Abstract

Forecasting reservoir inflow is critical for making many policies, ranging from flood control and agriculture irrigation to water ecology management, hydropower generation, and landslide prevention. Prior studies mainly exploit autoregressive models -- e.g., recurrent neural networks (RNN) and its many variants -- to model the flow time series's temporal pattern. However, existing approaches rely on regular and accurate inflow observations, which either fail to predict multi-scale inflow (e.g., an hour, a day, or a month ahead prediction) or ignore the uncertainty of observations due to confounding factors such as snowmelt and precipitation. To address the limitations, we propose a novel inflow forecasting model by incorporating the uncertainty of the observations into the RNN model and the continuous-time dynamics of the latent states with neural ordinary differential equations (ODE). Our method, called FlowODE, explicitly encodes the stochasticity of hidden conditions in addition to the temporal dependencies among inflow observations. Moreover, FlowODE explores a continuum of layers instead of discrete RNNs to model the hidden states' dynamics, allowing us to infer the inflow at any time horizon flexibly. We conduct extensive experiments on the real-world datasets collected from two large-scale hydropower dams. The results show that our method consistently outperforms previous inflow forecasting models while providing adaptable predictions and a flexible balance between prediction accuracy and computational cost.
BibTeX
@inproceedings{zhou2021forecasting,
  author = {Fan Zhou and Liang Li},
  title = {{Forecasting Reservoir Inflow via Recurrent Neural ODEs}},
  booktitle = {AAAI Conference on Artificial Intelligence},
  year = {2021},
  doi = {10.1609/aaai.v35i17.17763},
}
Figure