How to deal w___ missing input data

Martin Gauch, Frederik Kratzert, Daniel Klotz, Grey Nearing, Déborah Cohen, Oren Gilon

Abstract

Deep learning hydrologic models have made their way from research to applications. More and more national hydrometeorological agencies, hydro power operators, and engineering consulting companies are building Long Short-Term Memory (LSTM) models for operational use cases. All of these efforts come across similar sets of challenges – challenges that are different from those in controlled scientific studies. In this paper, we tackle one of these issues: how to deal with missing input data? Operational systems depend on the real-time availability of various data products – most notably, meteorological forcings. The more external dependencies a model has, however, the more likely it is to experience an outage in one of them. We introduce and compare three different solutions that can generate predictions even when some of the meteorological input data do not arrive in time, or not arrive at all: First, input replacing, which imputes missing values with a fixed number; second, masked mean, which averages embeddings of the forcings that are available at a given time step; third, attention, a generalization of the masked mean mechanism that dynamically weights the embeddings. We compare the approaches in different missing data scenarios and find that, by a small margin, the masked mean approach tends to perform best.

The Challenge of Operational Data Outages

In controlled research environments, datasets are typically complete. However, real-world operational systems—such as global flood forecasting tools—rely on meteorological "forcings" (e.g., precipitation and temperature) from multiple external providers. These providers occasionally experience outages.

Standard Long Short-Term Memory (LSTM) models used in hydrology often require a full year of historical data to generate a single prediction. In this context, even a single day of missing data (a NaN value) can "poison" the entire input sequence. This renders the model unable to produce a forecast for the following 365 days. Currently, many operational systems simply stop producing forecasts during such outages, which is unacceptable for critical disaster management.

Visualizing how missing data across different forcing groups can render standard models non-robust.

Architectural Strategies for Robustness

To address this, the authors evaluated three strategies to handle missing inputs within an LSTM framework:

  1. Input Replacing: Missing values are replaced with a fixed constant (zero), and a binary flag is added to indicate to the model which data points are missing.
  2. Masked Mean: This modular approach assigns a small "embedding" network to each data provider (e.g., Daymet, NLDAS). At each time step, the model calculates embeddings for all available sources and averages the valid ones. Missing sources are simply excluded from the calculation.
  3. Attention: A generalization of the masked mean that uses a "query-key-value" mechanism to dynamically weight different data sources based on their characteristics or the specific river basin.
The Masked Mean architecture: embeddings from available forcing groups are averaged to create a robust input for the LSTM.

Experimental Setup and Results

The study utilized the CAMELS dataset, covering 531 basins across the United States, with three daily meteorological forcing products: Daymet, Maurer, and NLDAS. Models were trained to predict streamflow using these forcings alongside 26 static catchment attributes.

Key findings include:

  • Superiority of Masked Mean: Despite the theoretical advantages of dynamic weighting in the attention mechanism, the simpler masked mean approach proved most robust. It maintained high accuracy (measured by NSE and KGE) even as the probability of missing data increased to 60%.
  • Attention Over-complication: The attention mechanism often struggled at low missing-data probabilities, as it attempted to find complex weightings where a simple average sufficed.
  • Graceful Degradation: Unlike standard models that fail completely with missing data, these robust architectures showed predictable and slow performance decay during outages.

Conclusion

Robustness is a requirement for operational long-memory models. The masked mean approach offers a simple yet effective way to "keep the lights on" during data provider outages. Beyond handling missing data, these methods enable "Regional Forcing" integration, allowing a single model to utilize high-quality local data where available while seamlessly falling back to global products elsewhere.

Summary updated

BibTeX
@inproceedings{gauch2025how,
  author = {Martin Gauch and Frederik Kratzert and Daniel Klotz and Grey Nearing and Déborah Cohen and Oren Gilon},
  title = {{How to deal w\_\_\_ missing input data}},
  booktitle = {Hydrology},
  year = {2025},
  doi = {10.5194/hess-29-6221-2025},
}
Figure