This study proposes a novel deep learning model, named STA-BiGRU-XGBoost, for predicting moisture content during the white tea withering process using near-infrared spectroscopy. The model integrates spatiotemporal attention mechanisms, bidirectional gated recurrent units (BiGRU), and the XGBoost algorithm to address challenges such as extended withering durations, environmental variability, and temporal variations in spectral data. The maximum relevance minimum redundancy (mRMR) algorithm is employed to select critical variables, including hot air velocity, air duct temperature, and spectral absorbance. A spatial attention mechanism enhances feature relevance, while BiGRU captures long-term temporal dependencies. Temporal attention further adjusts the weights of key time steps. XGBoost was incorporated to improve prediction stability under the investigated production-line conditions. Experimental results obtained from a production-line dataset collected from Zhenghe County during the March–May 2025 production season show that the STA-BiGRU-XGBoost model achieved the best performance among the compared models, with RMSE = 0.0920, MAE = 0.0772, and R² = 0.9806. Furthermore, the model’s interpretability is validated through attention weight visualization, highlighting key features associated with moisture evaporation dynamics. It should be noted that the current validation was conducted within a specific production season and fresh-leaf source region; broader generalization across different geographic origins, cultivars, and extreme weather conditions requires further cross-origin and multi-season validation.
Tao et al. (Sat,) studied this question.