An Explainable Hybrid Attention Based TabNet–BiLSTM Framework for Intelligent Soil Data-Driven Crop and Fertilizer Recommendation
DOI:
https://doi.org/10.70917/ijcisim-2026-4983Keywords:
BiLSTM, crop prediction, deep learning for agri soil data analytics, explainable artificial intelligence, fertilizer recommendation, hybrid deep learning, LIME, precision agriculture, SHAP, tabnetAbstract
Accurate crop selection and fertilizer recommendation based on soil laboratory data analysis are essential for sustainable agriculture and precision nutrient management. Most existing crop recommendation systems lean on standalone machine learning or deep learning architectures that constrain their ability to model sparse feature relevance and contextual nutrient interactions simultaneously while keeping the model interpretable. We propose AgriDeepFusion-XAI, a hybrid deep learning architecture introduces a dual branch attention sequence fusion mechanism. It combines TabNet based sparse feature selection with BiLSTM based contextual representation learning then layers on explainable decision analysis through SHAP and LIME for intelligent crop classification and fertilizer recommendation. The TabNet branch carries out sequential attentive feature selection using sparsemax-based masking to identify the important soil attributes, while the BiLSTM branch learns the bidirectional dependencies hiding in soil feature sequences. Embeddings from both branches are fused through a dense integration layer to perform multi-class crop prediction which is followed by a rule guided fertilizer recommendation module. SHAP and LIME explainability techniques are integrated to enhance the interpretability which helps to provide global feature importance and instance-level explanations. The proposed architecture was evaluated using a seven years soil laboratory dataset collected from soil lab located in Madurai, Tamilnadu, India. It includes sixteen physiochemical soil attributes and twenty two crop categories. Data preprocessing pipeline included missing values handling, feature normalization, categorical encoding and stratified data partitioning. Model performance was evaluated through stratified five fold cross validation. Experimental results shows that AgriDeepFusion-XAI achieves 97.3% classification accuracy, 97.92% macro-F1 score, and 97.85% precision and 97% recall which outperforms standalone TabNet and BiLSTM models by 3-4%. The proposed AgriDeepFusion-XAI architecture provides a scalable, explainable, and reliable decision support system for an intelligent smart agricultural system.