Deciphering the black box: interactive crop recommendation system using Explainable AI with visualisation dashboards
Yaganteeswarudu Akkem, Saroj Kumar Biswas, Varanasi Aruna · Journal of Experimental & Theoretical Artificial Intelligence · 2025
The integration of Artificial Intelligence (AI) into smart farming, particularly Crop Recommendation System (CRS), has propelled significant advancements but is often hindered by the ‘black box’ nature of models, which limits transparency and trust. This study aims to enhance smart farming by embedding explainable Artificial Intelligence (XAI) techniques – specifically Contrastive Explanation Method (CEM) and Accumulated Local Effects (ALE) – within CRS, empowering farmers to understand AI-generated crop suggestions. Implemented an XAI-driven CRS, utilising Local Interpretable Model-agnostic Explanations (LIME), SHapley Additive exPlanations (SHAP), CEM, and ALE for comprehensive explainability. Notably, CEM provides farmers with actionable contrastive explanations, while ALE details the average influence of environmental factors. To address data scarcity, Generative Adversarial Networks (GANs) were used to augment the dataset with synthetic data, and an interactive, explainable interface was developed using Streamlit. Results show a substantial improvement in system interpretability and user trust, evidenced by clearer, actionable explanations for farmers. Quantitatively, incorporating GAN-augmented data improved the Random Forest model’s Area Under the Receiver Operating Characteristic curve (AUROC) from 0.94 to 0.985 and F1-score from 0.93 to 0.98. This research is the first to integrate CEM and ALE in CRS, establishing a new benchmark for transparent and effective AI-powered agricultural decision-making.