Climate change is a major hazard to the agricultural systems of the world, as it is changing the temperature regimes, precipitation patterns, and soil dynamics, which are weakening crop production and the stability of ecosystems. The proposed research is a hybrid modeling framework that combines Multiple Linear Regression (MLR) with a deep learning architecture (PatchTST) based on the Transformer to quantify and predict the effect of climate variability on the productivity of agriculture. Multi-source data, including global weather data, crop data, and ISRIC-WISE soil data, were harmonized through stringent preprocessing steps that included imputation, normalization, and spatial-temporal alignment. The regression analysis reveals a statistically significant negative impact of temperature on crop yield, while precipitation and soil fertility exhibit positive contributions. To capture complex non-linear dependencies and long-term temporal patterns, the PatchTST model was trained using time-series inputs enriched with satellite-derived vegetation indices. The proposed model significantly outperforms conventional deep learning approaches, achieving an R2 of 0.98, RMSE of 0.0172, and MAE of 0.0134. Attention-based interpretability highlights soil moisture and NDVI as dominant predictors, reinforcing the model’s physical and agronomic relevance. The findings indicate that integrating interpretable statistical models with advanced deep learning improves predictive accuracy while addressing the transparency limitations of black-box approaches. The framework supports practical deployment across regional crop planning, climate risk policymaking, and farm-level decision support systems, demonstrating its direct applicability to real-world agricultural management.
Haque et al. (Sun,) studied this question.