Fed-XGBoost-LGBM: Privacy-Preserving Multi-Crop Recommendation Using Federated XGBoost-LGBM Ensemble on Imbalanced Soil Data
Sarowar Morshed Shawon, Md Mushfiqur Rahman, Shah Nawaz Haider, Arnab Barua, Steve Austin · 2025
Soil nutrient-based crop recommendation plays a vital role in optimizing agricultural productivity and sustainability. The advancement in Machine Learning (ML) and Deep Learning (DL) has promising application in the particular domain. This study proposes a novel Federated Learning (FL) based ensemble model that integrates Extreme Gradient Boosting (XGBoost) and Light Gradient Boosting Machine (LGBM) for multi-crop recommendation using key soil parameters including Nitrogen (N), Phosphorus (P), and Potassium (K). The model was trained and evaluated using an imbalanced dataset consisting of multiple crop types: Teff, Maize, Wheat, Barley, Bean, Pea, Sorghum, Dagussa, Niger seed, Potato, Red Pepper and Fallow, which was balanced using SMOTE (Synthetic Minority Over-sampling Technique). The proposed ensemble model outperformed baseline algorithms including Logistic Regression, Random Forest, CatBoost, XGBoost, and standalone LGBM, achieving an accuracy of 86.2 %, F1-score of 85.9 %, and balanced accuracy of 86.2 %. Furthermore, to ensure data privacy and generalizability across regions, the model was deployed in a FL setting, demonstrating strong performance across multiple global clients with an average accuracy of$\mathbf{7 6. 3 \%}$and F1-score of$\mathbf{7 6. 4 \%}$over three training rounds. The results validate the efficacy of the proposed architecture in delivering accurate, privacy-preserving, and scalable crop recommendations based on soil nutrient profiles.