Pure and physics-guided deep learning approaches for spatio-temporal groundwater level prediction
Groundwater represents a key element of the water cycle, yet it exhibits complex and context-dependent relationships that make its modeling challenging. Theory-based models have been the cornerstone of scientific understanding. However, their computational cost, simplifying assumptions, and calibration requirements limit their use. In recent years, data-driven models have emerged as powerful alternatives. In particular, deep learning has proven to be a promising approach for its design flexibility and ability to learn complex relationships directly from the data without requiring extensive domain information. We proposed an attention-based pure deep learning model, named STAINet, to predict weekly groundwater levels in Piedmont (Italy), leveraging both irregular groundwater time series and weather image sequences. To enhance the model's trustworthiness and generalization ability, we merged the theory and data-driven approaches by considering physics-guided strategies to inject the groundwater flow equation into the model. Firstly, we restructured the tail of the architecture to predict the three terms of the governing equation, named the autoregressive, diffusion, and residual components - we thus obtained the PSTAINet-IB. Then, we further injected physics priors by adding loss terms related to the estimated equation components, obtaining the PSTAINet-ILB model. Lastly, we developed the PSTAINet-ILRB by imposing a loss term specific to the residual component, which forces the groundwater recharge to occur within the groundwater body recharge zone, which is identified by domain experts. The models were evaluated both by feeding true lagged values as input and by iterating their own predictions (rollouts) over the whole test set. The PSTAINet-ILB model performed the best, achieving remarkable test performance, and generating equation components in line with domain experts' expectations.