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.