HydroGAT: Distributed Heterogeneous Graph Attention Transformer for Spatiotemporal Flood Prediction

Aishwarya Sarkar, Autrin Hakimi, Xiaoqiong Chen, Hai Huang, Chaoqun Lu, Ibrahim Demir, Ali Jannesari

Introduction

Flood forecasting is a high-stakes balancing act between spatial resolution and physical realism. Traditional data-driven models, such as standard LSTMs or CNNs, often ignore the specific topological paths water takes through a river network. While Graph Neural Networks (GNNs) have emerged as a potential solution, most existing versions simplify complex landscapes into coarse polygons or focus only on sparse gauge stations. This creates two major gaps: the neglect of spatial heterogeneity (missing runoff signals from land pixels) and the separate processing of space and time. Furthermore, training a GNN where every pixel is a node is computationally intensive, often exceeding the memory limits of a single GPU.

The HydroGAT Framework

To address these challenges, we introduce HydroGAT, a novel spatiotemporal deep learning framework that treats entire river basins as high-resolution heterogeneous graphs. HydroGAT stands out through three main technical innovations:

Heterogeneous Basin Graphs

Instead of just connecting gauges, HydroGAT represents the basin as a 4km x 4km grid where every land and river pixel is a node. The model utilizes two types of directed edges to capture hydrological dynamics:

  1. Flow edges: Following the steepest descent (D8 algorithm) to model immediate local routing.
  2. Catchment edges: Connecting distant upstream and downstream points to learn long-range regional influences.
The HydroGAT graph structure: (a) local flow directions, (b) long-range catchment relationships, and (c) the integrated heterogeneous graph used in the model.

Spatiotemporal Architecture

The model architecture combines a Transformer-based temporal encoder with a dual-branch Graph Attention Network (GAT). A temporal module with causal masking processes historical precipitation and discharge to capture both seasonal trends and short-term storm peaks. These embeddings are fed into two parallel GAT-based Gated Recurrent Units (GRUs)—one for each edge type. A learnable parameter ($\alpha$) dynamically decides how much to weight direct flow versus broader catchment relationships.

Distributed Training Pipeline

To handle the massive graph size, the authors developed a pipeline using PyTorch’s Distributed Data Parallel (DDP). This splits the temporal data into chunks across up to 64 NVIDIA A100 GPUs, allowing for "full-batch" training on high-resolution basins that would otherwise be impossible to process.

Experimental Results

The model was evaluated on the Cedar River Basin (CRB) and the Des Moines River Basin (DSMRB) using hourly data from the WaterBench dataset (2012–2018).

  • Accuracy: HydroGAT outperformed five state-of-the-art baselines, achieving a Nash-Sutcliffe Efficiency (NSE) of up to 0.97 and a Kling-Gupta Efficiency (KGE) of 0.96.
  • Lead Time Stability: While other models saw performance decline after 24–48 hours, HydroGAT maintained an NSE > 0.90 for up to 66 hours in the Cedar River Basin.
  • Scalability: The distributed pipeline demonstrated a 15x speedup when moving from 4 to 64 GPUs, reducing multi-day training tasks to just a few hours.

Key Insights and Interpretability

By promoting every pixel to a node, the model captures critical "unlabeled" information from land surfaces, such as soil moisture and snowmelt. Furthermore, the use of GATs provides interpretability through attention maps; these reveal that the model naturally learns to focus on major tributaries while ignoring outlier stations that do not contribute meaningful data to the outlet.

Conclusion

HydroGAT demonstrates that high-resolution, heterogeneous graph representations can significantly improve flood prediction accuracy and lead time. Future work will explore integrating more granular environmental features, such as land-use changes and vegetation indices, to better model how human development affects runoff.

Summary updated

BibTeX
@inproceedings{sarkar2025hydrogat,
  author = {Aishwarya Sarkar and Autrin Hakimi and Xiaoqiong Chen and Hai Huang and Chaoqun Lu and Ibrahim Demir and Ali Jannesari},
  title = {{HydroGAT: Distributed Heterogeneous Graph Attention Transformer for Spatiotemporal Flood Prediction}},
  booktitle = {SIGSPATIAL/GIS},
  year = {2025},
}
Figure