NeuralHydrology - Interpreting LSTMs in Hydrology

Frederik Kratzert, Mathew Herrnegger, Daniel Klotz, Sepp Hochreiter, Günter KlambauerExplainable AI 2019 · DOI · DBLP

Introduction

Predicting river discharge from meteorological data is a cornerstone of hydrology. Traditionally, this task relies on process-based models that explicitly simulate physical reservoirs like snowpacks and groundwater. While physically grounded, these models often suffer from calibration difficulties due to unobservable subsurface parameters. Recently, Long Short-Term Memory (LSTM) networks have emerged as powerful alternatives, yet they are frequently criticized as "black boxes." This research aims to bridge the interpretability gap by demonstrating that LSTMs internally learn to represent fundamental hydrological processes, such as snow accumulation and soil moisture, without explicit physical supervision.

Methodology

The study utilizes a parsimonious architecture consisting of a single LSTM layer with 10 hidden units, followed by a dense layer. The model is trained to predict daily river discharge based on a 365-day history of meteorological inputs. To analyze the internal logic of the network, the authors employed three primary techniques:

  1. Integrated Gradients (IG): Attributing model outputs to specific input features across time.
  2. Time Steps of Influence (TSOI): Quantifying the historical window the model prioritizes for a given prediction.
  3. Correlation Analysis: Comparing internal LSTM cell states with simulated physical states from a traditional conceptual model (SAC-SMA + Snow-17).

Datasets and Evaluation

The researchers focused on two contrasting basins from the CAMELS dataset to test the model's adaptability to different physical regimes. Basin A (Clearwater River) is snow-dominated, while Basin B (Little River) has no snow influence.

Table 1: Characteristics and performance metrics for the two study basins.

As shown in Table 1, the model achieved high predictive accuracy across both environments, with Nash-Sutcliffe Efficiency (NSE) scores exceeding 0.70 in test phases.

Predictive Performance

The LSTM demonstrates a remarkable ability to capture the complex dynamics of river discharge. In Basin A, the model accurately tracks the seasonal peaks driven by snowmelt and the immediate responses to rainfall events.

Figure 1: Observed vs. predicted discharge for Basin A, alongside precipitation data.

The hydrograph in Figure 1 illustrates the close alignment between the predicted (dashed orange) and observed (solid blue) discharge, confirming the model's robustness in a snow-influenced catchment.

Interpretability and Emergent Physics

The core finding of this work is that the LSTM's internal memory cells act as "dynamic reservoirs." In snow-influenced basins, specific cells learned to store information over months, mirroring the behavior of a physical snowpack. This is reflected in the seasonal shift of the Time Steps of Influence (TSOI): during summer, the model's memory window is short (10–20 days), but it expands to approximately 150 days in winter to track accumulating snow.

Furthermore, the model discovered "emergent physics." For instance, it learned that increased solar radiation correlates with a decrease in the "snow cell" state, effectively capturing the process of sublimation and melt without being explicitly programmed to do so. Correlation analysis revealed that internal cell states had up to a 0.81 correlation with Snow Water Equivalent (SWE) in Basin A and a 0.91 correlation with groundwater storage in Basin B.

Conclusion

This research provides compelling evidence that LSTMs are not merely statistical engines but can learn to simulate physical processes from raw data. By identifying specific cells that correspond to physical states, hydrologists can gain confidence in deep learning models and potentially use these insights to design more efficient, "physically-informed" neural architectures. While the study relied on proxy validation against traditional models, it marks a significant step toward transparent and physically-consistent machine learning in the geosciences.

Summary updated

BibTeX
@inproceedings{kratzert2019neuralhydrology,
  author = {Frederik Kratzert and Mathew Herrnegger and Daniel Klotz and Sepp Hochreiter and Günter Klambauer},
  title = {{NeuralHydrology - Interpreting LSTMs in Hydrology}},
  booktitle = {Explainable AI},
  year = {2019},
  doi = {10.1007/978-3-030-28954-6\_19},
}
Figure