Abstract:Addressing the issue of low prediction accuracy in traditional groundwater level forecasting models due to a lack of consideration for relevant influencing factors, this study incorporates multiple sources such as meteorological data and the Normalized Difference Vegetation Index (NDVI) to examine their impact on groundwater levels. A multi-factor Long Short-Term Memory (M-LSTM) neural network model with an attention mechanism is proposed to enhance prediction accuracy by integrating multiple key factors. The core idea of the algorithm is to modify the input end of the classic LSTM network to enable it to learn features from multi-factor data and to include an attention mechanism between LSTM layers to better learn and emphasize the temporal features within the multi-factor data. Datong, Shanxi Province, serves as the study area for testing the algorithm, with a dataset comprising monthly NDVI data, groundwater level observations, and meteorological data from 2015 to 2020, using nested cross-validation with root mean square error (RMSE) as the performance evaluation metric. The experimental results demonstrate that the M-LSTM model with the introduction of an attention mechanism can effectively predict groundwater levels, achieving a minimum RMSE of 0.4367, indicative of high precision.