1Department of Computer Science and Application, Maharshi Dayanand University, Rohtak-124 001, Haryana, India.
2Department of Computer Science and Engineering, SRM University, Delhi-NCR, Sonipat-131 029, Haryana, India.
*Corresponding Author: Sukhvinder Singh Deora, Department of Computer Science and Application, Maharshi Dayanand University, Rohtak-124 001, Haryana, India. Email: sukhvinder.dcsa@mdurohtak.ac.in
Accurate global crop yield predictions are crucial for ensuring food security, effective agricultural planning and climate adaptation. However, existing machine learning and deep learning approaches lack crop-specific feature learning, uncertainty quantification and multiscale spatial contexts, which limits their application in precision agriculture.
This study presents a hybrid ensemble deep learning framework integrated with a crop-aware transformer encoder with heteroscedastic uncertainty for global multi-crop yield prediction (Maize, rice, wheat, soybean) at a 5-arcminute (~9 km) global resolution. The architecture integrates three key innovations: (1) conservative feature engineering using historical yields (4-year sequences with a 3-year temporal gap), geographic coordinates, climate zone indicators alongside temporal trends and stress indicators; (2) crop-aware multi-head attention different mechanisms with crop-specific Query/Key/Value projections enabling differential pattern learning per crop and (3) heteroscedastic output heads predicting both mean yield (μ) and uncertainty (σ) via negative log-likelihood optimization. We implemented rigorous validation using temporal splitting (training: years ≤2013; test: years >2013) and geographic blocking (5-fold GroupKFold with 0.5° spatial blocks) to prevent both spatial and temporal data leakage.
Evaluated on the GlobalCropYield5min dataset (1982-2015) across four crops with 60,000 samples in 34 years. The proposed model achieved an overall test R2 of 0.9281, RMSE of 0.585 t/ha and MAE of 0.379 t/ha, with statistical significance confirmed by a paired t-test (p=0.011). Five-fold geographic cross-validation yielded R2 of 0.9337±0.0074 and rice R2=0.9462 (best), maize R2=0.9268, wheat R2=0.9201 and soybean R2=0.8298. Uncertainty quantification achieved excellent calibration (Expected calibration error = 0.024), with empirical coverage matching theoretical values (68% intervals: 69.1% coverage; 95% intervals: 94.8% coverage). Regional analysis showed consistent performance across continents (R2=0.871-0.941), with data-scarce regions showing the expected performance reduction. Ablation studies confirmed that crop-aware attention contributed +3.4% to R2, multiscale spatial features contributed 5.8% and temporal sequence features contributed +3.66%.
Crop yield prediction, Deep learning, Heteroscedastic regression, Transformer neural network, Uncertainty quantification