HydroDCM: Hydrological Domain-Conditioned Modulation for Cross-Reservoir Inflow Prediction

Pengfei Hu, Fan Ming, Xiaoxue Han, Chang Lu, Yue Ning, Dan Lu

TL;DR

Predicting water inflow into reservoirs is crucial for flood mitigation and clean energy, but deep learning models often fail when deployed to new or data-scarce locations due to "domain shift." This paper introduces HydroDCM, a novel domain generalization framework that uses spatial metadata to strip away location-specific biases during training, then dynamically reapplies location context during inference. The framework achieves state-of-the-art forecasting accuracy on unseen reservoirs while remaining highly computationally efficient.

What Problem Does This Paper Address?

Every reservoir operates within a unique environmental fingerprint shaped by local climate, geography, and upstream catchment characteristics. Because of this variability, a machine learning model trained to predict water inflow at one reservoir typically performs poorly when applied to another—a classic machine learning challenge known as domain shift.

Standard Domain Generalization (DG) methods attempt to solve this by learning "domain-invariant" features that ignore location-specific quirks. However, hydrology presents two unique hurdles that break conventional DG:

  1. Many-Domain Categorization: A river basin can contain dozens or hundreds of reservoirs. Treating each as a distinct domain causes standard DG algorithms (like meta-learning) to explode in computational complexity.
  2. Reliance on Metadata: Reservoirs possess rich, static physical metadata (such as latitude, longitude, and elevation) that directly influence hydrology. Standard DG methods discard this auxiliary data in their quest for pure feature invariance.

HydroDCM bridges this gap by transforming spatial metadata from an ignored variable into a generalization-driving signal.

Methods

HydroDCM splits the forecasting task into a two-stage architecture:

Figure 1: Overview of HydroDCM architecture for reservoir inflow prediction. Given the observations Xi, (1) the feature encoder fϕ(·) extracts temporal representations hi, which are refined into invariant features zi through adversarial learning with dθ(·) using spatial metadata si as pseudo-domain labels; (2) modulation parameters {γ(si), δ(si)} in the FiLM adapter mβ(·) adjust zi into ˜zi = γ(si) ⊙zi + δ(si), which is then passed to the predictive head pω(·) for estimating future inflow ˆyi.

Stage 1: Invariant Representation Learning

First, a temporal feature extractor (an Encoder-Decoder LSTM) processes historical hydrometeorological data (precipitation, temperature, past inflow). To handle the "many-domain" problem without computational bloat, HydroDCM projects each reservoir's spatial metadata into a continuous latent space using a contrastive loss function. This groups physically similar reservoirs together, creating "pseudo-domain labels." An adversarial domain discriminator then challenges the feature extractor to strip these domain cues out of the latent features, leaving behind purely domain-invariant hydrological signals.

Stage 2: Feature-Wise Modulation

Pure invariance can lead to underfitting because geography does matter. To safely reintroduce location context without reintroducing domain bias, HydroDCM introduces a lightweight Feature-wise Linear Modulation (FiLM) adapter. Conditioned on the target reservoir's metadata, this adapter computes scaling ($\gamma$) and shifting ($\delta$) parameters that dynamically modulate the invariant features before they are passed to the final predictive head.

Datasets

The authors evaluated HydroDCM using real-world data from 30 reservoirs in the Upper Colorado River Basin spanning from 1999 to 2011.

Figure 2: Geographical Position and River Network among 30 reservoirs in the Upper Colorado River Basin.
  • Source Domains (Training): 27 reservoirs with complete historical records.
  • Target Domains (Testing): 3 isolated reservoirs (Meeks Cabin, Joes Valley, and McPhee) that contribute only 3 years of observations and share no stream branches with the training set, providing a rigorous test for cross-reservoir generalization.
  • Input Features: Daily precipitation and temperature data from the 4 km-resolution PRISM model, alongside historical daily inflow records over a 30-day rolling window.

Key Insights and Ideas

  • The Invariance-Adaptation Paradox: Standard machine learning frameworks treat domain invariance and domain adaptation as mutually exclusive. HydroDCM proves that you can achieve both: adversarial learning strips away confounding domain covariates, while a lightweight conditioning layer safely injects localized physical priors back into the model at inference time.
  • Continuous Pseudo-Domains: Instead of treating 100 reservoirs as 100 discrete categorical domains, mapping them to a continuous space based on physical metadata allows the model to scale efficiently to massive hydrological networks.
  • Temporal Stability: As forecasting horizons extend from Day 1 out to Day 7, predictive uncertainty typically balloons. HydroDCM’s spatial conditioning acts as an effective regularizer, significantly slowing down performance degradation over longer lead times compared to standard baselines.

Key Results

The model's accuracy was evaluated using the Nash–Sutcliffe Efficiency (NSE) metric, where a score of 1 indicates perfect prediction.

Figure 3: Comparison of model performance on daily NSE scores across three reservoirs (MCR, JVR, and MCP) from Day 3 to Day 7. Each subplot shows the NSE (%) for DANN, MLDG, CondAdv, IRM, and HydroDCM on a specific reservoir–day combination. Error bars indicate standard deviations over five independent runs. The horizontal black, blue, and red dash lines represent the Base, Few-shot, and Oracle standards for observing enhanced robustness, respectively.
  • Superior Generalization: HydroDCM achieved an overall NSE of 82.90% across the unseen target reservoirs, substantially outperforming top DG baselines like MLDG (80.67%) and CondAdv (80.77%).
  • Closing the Upper Bound: HydroDCM performed remarkably close to the Oracle baseline (83.93%)—an idealized model trained directly on the target reservoir's data, which is rarely possible in real-world, data-scarce applications.
  • Long-Horizon Robustness: On difficult Day 7 forecasts, HydroDCM maintained a 73.96% NSE, outperforming standard domain adversarial networks (DANN) and invariant risk minimization (IRM) by more than 4% on average.

Limitations and Future Work

While HydroDCM marks a major step forward for multi-reservoir modeling, the authors note several areas for improvement:

  • Simplistic Metadata: The current model relies solely on basic spatial coordinates and elevation. Future iterations could incorporate richer environmental descriptors like land use, soil permeability, and climate indices.
  • Lack of Physical Constraints: HydroDCM is entirely data-driven. Integrating physics-informed constraints (such as mass balance equations for water conservation) could make the model more reliable under unprecedented, extreme climate events.
  • Theoretical Analysis: While the adversarial-contrastive loss formulation works exceptionally well in practice, a more rigorous information-theoretic or causal representation analysis is needed to fully understand the latent feature interactions.

Summary updated

BibTeX
@misc{hu2025hydrodcm,
  author = {Pengfei Hu and Fan Ming and Xiaoxue Han and Chang Lu and Yue Ning and Dan Lu},
  title = {{HydroDCM: Hydrological Domain-Conditioned Modulation for Cross-Reservoir Inflow Prediction}},
  year = {2025},
  eprint = {2512.03300},
  archivePrefix = {arXiv},
  url = {https://arxiv.org/abs/2512.03300},
}
Figure