the Creative Commons Attribution 4.0 License.
the Creative Commons Attribution 4.0 License.
Benefits of multi-target and self-supervised LSTM models for water quantity and quality
Abstract. Deep learning has become a standard tool for streamflow modeling, but its application to water quality remains challenging due to sparse, irregular, and noisy in-situ observations. Yet, water-quality variables are tightly linked to discharge and to each other through shared hydrological and biogeochemical controls, suggesting that jointly modeling water quantity and quality may help compensate for limited data availability. In this study, we compare single-target, multi-target, and self-supervised LSTM models for the joint simulation of discharge and six water-quality variables (NO₃–N, PO₄–P, DO, DOC, EC, and WT) across 408 German catchments. Our results highlight that extending the baselineLSTM from single-target discharge prediction to jointly predicting discharge and all six water-quality variables does not substantially degrade discharge performance (across all baseline configurations, median KGE' = 0.84–0.87) and yields median KGE' values between 0.35 (PO₄–P) and 0.94 (WT) for the water-quality targets. Interestingly, learning discharge as a co-target consistently outperforms models that use observed discharge as an additional input, indicating that jointly learning water quantity and quality is more effective than using discharge as a predictor. A variable-averaged loss function is key to balance the strongly uneven observation densities of discharge and water-quality variables. Building on this multi-target framework, we further explore whether an alternative training strategy based on self-supervised learning can better exploit the incomplete and heterogeneous nature of environmental observations. Our evaluation reveals that the self-supervisedLSTM yields a level of predictive skill comparable to the multi-target supervised baseline under inference conditions restricted to meteorological drivers, while effectively leveraging cross-variable dependencies to enhance PO₄–P and DO reconstructions when contextual water-quality data are provided. Besides showcasing the strong performance of LSTMs in water-quality simulations with sparse and irregular data, our results demonstrate that multi-target learning provides an effective framework for coupled water quantity–quality modeling, while self-supervised learning offers additional flexibility for exploiting incomplete and heterogeneous environmental observations, yielding predictive skill comparable to, and in some cases exceeding, that of calibrated process-based water-quality models and supporting the use of LSTMs as a scalable alternative for regional water-quality simulation in data-sparse environments.
Competing interests: At least one of the (co-)authors is a member of the editorial board of Hydrology and Earth System Sciences.
Publisher's note: Copernicus Publications remains neutral with regard to jurisdictional claims made in the text, published maps, institutional affiliations, or any other geographical representation in this paper. While Copernicus Publications makes every effort to include appropriate place names, the final responsibility lies with the authors. Views expressed in the text are those of the authors and do not necessarily reflect the views of the publisher.- Preprint
(2952 KB) - Metadata XML
- BibTeX
- EndNote
Status: final response (author comments only)
- CC1: 'Comment on egusphere-2026-3604', Corinna Frank, 01 Sep 2026
-
AC1: 'Reply on CC1', Jean-Paul Brede, 01 Sep 2026
Thank you very much for the comment and for noticing the inconsistency in this sentence.
You are indeed right and the sentence should read like you proposed: "This effect becomes more apparent when comparing groups of basins: the median KGE' for PO₄–P increases substantially (ΔKGE' ∈ [0.43; 0.58]) from basins with less frequent sampling (≥ 50 days, n = 43) to those with average sampling intervals of 10–20 days (n = 38)."
I supplemented a plot from this analysis for one of the multitarget models which also shows the contrast of the observed effect in PO4-P against the other water quality targets.
-
RC1: 'Comment on egusphere-2026-3604', Anonymous Referee #1, 07 Sep 2026
In current endeavors in hydrological sciences deep learning (DL) has been widely recognized as a field of interest. While water quantity modeling has shown great results, WQ modeling has often been limited by data requirements of DL models and the inherent nature, specifically, the sparse, irregular, and noisy nature of in-situ observations. This article aims to combine high frequency and sparse data sources into one framework investigating loss function formulation and model training regime benefits to simulate discharge alongside six WQ variables across 408 German catchments utilizing the CAMELS-DE and QUADICA datasets. The modeling framework is structured as follows:
Input Features: 8 dynamic meteorological variables (precipitation, temperature, radiation, and humidity) and 17 static attributes (topography, soil texture, land cover, and climate indices).
Target Variables: Specific discharge (Q) and six water-quality constituents: Nitrate (NO_3–N), Phosphate (PO_4–P), Dissolved Oxygen (DO), Dissolved Organic Carbon (DOC), Electrical Conductivity (EC), and Water Temperature (WT).
The authors identify a variable-averaged loss function as a critical mechanism for balancing the uneven observation densities between discharge and WQ variables. Their results suggest that jointly learning discharge as a co-target generally outperforms models using discharge as a simple predictor. Furthermore, the self-supervised approach shows promise in cross-variable reconstruction and moving towards a foundational hydrological DL model.
While the scope of this study is impressively large-scale and addresses a critical challenge in water-quality modeling, several methodological design choices and their physical-hydrological implications warrant a more differentiated discussion or further validation before final conclusions can be drawn.
Major comments:
It is stated (Lines 201–202) that the "only difference" between models is the learning objective to assess the SSL formulation independently. However, Table 2 states that the baseline LSTM uses a hidden size of 512, while the self-supervised LSTM is increased to 1024. This modification represents a roughly fourfold increase in model capacity. Given that the highlighted gains for PO_4–P and DO are quite modest (delta KGE' of 0.05 and 0.02 respectively, per Line 294), it is possible yet not discussed that these gains are a result of increased capacity rather than the SSL logic.
The possibility that these gains are a result of the increased capacity rather than the SSL logic should be tested before concluding. Ideally, a standard benchmark experiment should be added where a baseline supervised LSTM is trained with a hidden size of 1024 to serve as a proper control. Alternatively the increase in hidden size must be argued and discussed with regards to performance changes.
The model is trained with a fixed masking rate of exactly 3 variables (Line 193) but is evaluated in a "multi-masking" scenario where 7 variables are masked simultaneously. This creates an unencountered distribution shift at inference that could explain why the SSL model does not outperform (Line 444) its supervised counterpart in that scenario. This technical limitation should be incorporated into the otherwise good discussion better yet the SSL model should be trained with a dynamic masking rate (e.g., randomly masking between 1 and 7 variables per sequence) so it learns to operate under any missingness pattern.
The study relies on a temporal split (2000–2010 vs. 2010–2019) and regionalized LSTMs to support claims of "regional" modeling (Lines 28) which typically implies the ability to generalize to ungauged catchments. The current setup only demonstrates temporal interpolation within known locations as no spatial holdout is tested. The claims of “regional modeling” should be revised or a spatial holdout tested.
The paired bootstrap analysis across catchments (Lines 290, 295) asserts statistical significance for very small metric gains (e.g., delta KGE' of 0.02 for DO and 0.05 for PO_4–P) but is only based on the spatial distribution of the ensemble means. Averaging the 5 members predictions prior to metric calculation flattens temporal variance and discards the epistemic uncertainty of model initialization. The significance test must account for both spatial and initialization variance to prove these minor improvements are not simply artifacts of random seed selection. The methodology should be revised to either reflect only evaluating ensemble mean or ensemble characteristics should be reported and accounted for in statistical tests.
Minor comments:
The performance for PO_4–P (median KGE' 0.35) is attributed to "intrinsic complexity," yet the source context (Line 383) correctly identifies missing "point sources" and legacy effects. In addition, the use of a 365-day sliding window could be hydrologically problematic for nutrients. The authors acknowledge "deep groundwater memory" and "legacy effects" (Line 383), however a stateless model resetting every year as used in this study cannot physically capture these multi-year processes. This should be added as a paragraph acknowledging this structural architectural limitation.
The claim that SSL handles missing data naturally without imputation (Line 199) is technically underspecified given the 97% missingness in WQ variables. When a WQ variable acts as a dynamic input, it remains unclear how the daily-scale dynamic input vector represents those gaps. It should be explicitly stated how the SSL handles these e.g.: are these zero-padded, or are they accompanied by binary companion masks to alert the LSTM to the validity of the input signal?
Lines 12, 188, 264, 333, 373, and 468 (Inconsistent Chemical Formula Formatting): The chemical formulas for nitrate-nitrogen and orthophosphate-phosphorus are formatted in three conflicting styles across different sections of the article:
- Subscript with en-dash (NO₃–N and PO₄–P) in Line 12 (Abstract) and Line 188 (Section 3.2).
- Subscript with standard hyphen (NO₃-N and PO₄-P) in Line 264 (Figure 2 caption) and Line 333 (Section 5.1).
- Plain text with standard hyphen (NO3-N) in Line 373 and Line 468 (Section 6).
Line 240: In the sentence: “...leads to a slight decrease in runoff performance (median KGE from 0.87 to 0.84)...”, the prime symbol is omitted.
Lines 534–535, 566–567, and 614–615: Several references in the bibliography contain compiled duplication errors in their DOI prefixes, which results in broken hyperlinks.
Citation: https://doi.org/10.5194/egusphere-2026-3604-RC1 -
RC2: 'Comment on egusphere-2026-3604', Anonymous Referee #2, 08 Sep 2026
General comments
In this preprint, the authors methodically train LSTM models to predict water quantity and quality across 400+ German catchments. The most significant finding is that models that learn discharge as a co-target outperform models that use observed discharge as an additional input, at least for some water quality variables. This finding alone makes the manuscript worthy of publication, as it provides a well-supported starting point for future studies in this field. Another significant finding is that self-supervised LSTMs are shown to effectively leverage dependencies across water quality variables to enhance predictions for some constituents, which again informs future research. The manuscript is concise, well-structured and easy to follow.
Specific comments1. Since the strongest impacts of water quality variables typically occur when they reach unusual (i.e., extreme) values, I would have liked to see an assessment of model performance from that perspective, and whether the findings highlighted above also apply during extreme conditions.
2. Given that KGE' is used to evaluate model performance, it would be interesting to know which component of KGE' (correlation, bias or variability) is most responsible for the improvement in the predictions.
3. The caption of Figure 2 mentions: "Electrical conductivity (EC) is not shown due to figure layout constraints and is presented separately in the Appendix". However, I was unable to find this figure in the Appendix.
Citation: https://doi.org/10.5194/egusphere-2026-3604-RC2
Viewed
| HTML | XML | Total | BibTeX | EndNote | |
|---|---|---|---|---|---|
| 358 | 145 | 20 | 523 | 11 | 10 |
- HTML: 358
- PDF: 145
- XML: 20
- Total: 523
- BibTeX: 11
- EndNote: 10
Viewed (geographical distribution)
| Country | # | Views | % |
|---|
| Total: | 0 |
| HTML: | 0 |
| PDF: | 0 |
| XML: | 0 |
- 1
Very relevant topic and quite interesting results. I believe there might be a small mistake in the sentence in line 272-274:
"This effect becomes more apparent when comparing groups of basins: the median KGE' for PO₄–P increases substantially (ΔKGE' ∈ [0.43; 0.58]) from basins with average sampling intervals of 10–20 days (n = 38) to those with less frequent sampling (≥ 50 days, n = 43)."
Since the authors mention further in line 376-377 that "[...] increased sampling frequency can improve performance, particularly for PO₄–P [...]", they probably meant the exact opposite and could change the prior statement to "This effect becomes more apparent when comparing groups of basins: the median KGE' for PO₄–P increases substantially (ΔKGE' ∈ [0.43; 0.58]) from basins with less frequent sampling (≥ 50 days, n = 43) to those with average sampling intervals of 10–20 days (n = 38)."