Skip to content

About

Explainable multimodal data-fusion framework for crop-pair compatibility reasoning (NBI, ERS, NutComp, CP) using ensemble learning and SHAP. Achieved R² = 0.96 across 2.4M crop pairs, published in Elsevier Array (2026).

Topics

Resources

Stars

0 stars

Watchers

0 watching

Forks

Latest commit

 

History

18 Commits

Folders and files

Repository files navigation

Vellore Institute of Technology, Chennai
Vellore Institute of Technology (Chennai, India)
Taylor's University, Malaysia
Taylor's University (Subang Jaya, Malaysia)

An Explainable Multimodal Data Fusion Framework for Compatibility Reasoning in Heterogeneous Decision Systems

🌾 AgriCompatNet: Knowledge-Guided Machine Learning & Explainable Decision Support for Intercropping Systems

Elsevier Array DOI: 10.1016/j.array.2026.101267 License: CC BY 4.0 / MIT XAI: SHAP & PDP/ICE Benchmark: R2 = 0.96 Collaboration: India x Malaysia Python: 3.10 | 3.11

Published in Elsevier Array (Volume 32, Article 101267, 2026) — Special Issue on Explainable Decision Systems (EDS)
[Official ScienceDirect Article] • [Download Open-Access PDF] • [Executable Jupyter Notebook] • [Cite This Work]


Important

Headline Empirical Findings: AgriCompatNet achieves a state-of-the-art predictive performance of $R^2 = 0.96$, $\text{RMSE} = 0.039$, and $\text{MAE} = 0.027$ across ~2.4 million crop-pair combinations systematically generated from 2,200 curated crop instances covering 7 core agro-environmental dimensions ($N, P, K$, temperature, humidity, pH, and precipitation). Furthermore, controlled sensitivity simulations under $\pm 10%$ environmental perturbations confirm robust ecological stability without catastrophic phase transitions.

AgriCompatNet Overall Architecture

Figure 1: High-level architectural workflow of the AgriCompatNet framework, illustrating multimodal agro-environmental ingestion, domain-informed indicator construction, ensemble fusion, and post-hoc SHAP explainability.


📑 Table of Contents


🌟 Overview & Core Motivation

Sustainable agriculture and agroecological intensification depend heavily on intercropping—cultivating two or more crop varieties simultaneously on the same parcel of land. While intercropping enhances biodiversity, curtails pest proliferation, optimizes soil microbiome health, and augments land equivalent ratio (LER), discovering mutually synergistic crop combinations across varied microclimates has traditionally relied on trial-and-error field trials or opaque, black-box recommendation models.

AgriCompatNet addresses this challenge through a knowledge-guided multimodal data fusion framework:

  1. Decoupling First-Order Heuristics from Emergent Interaction Modeling: Rather than relying solely on deterministic formulas or unconstrained regression on raw sensor feeds, AgriCompatNet establishes an intermediate abstraction layer consisting of four domain-grounded agronomic indicators ($\text{NBI}$, $\text{ERS}$, $\text{NutComp}$, $\text{CP}$).
  2. Preventing Information & Target Leakage: Strict partitioning and evaluation safeguards prevent formula memorization, allowing tree ensembles (Random Forest, LightGBM, CatBoost) to learn non-linear co-adaptation boundaries and ecological constraints.
  3. Intrinsic Explainable AI (XAI): Full integration of Shapley Additive Explanations (SHAP), Partial Dependence Plots (PDP), Individual Conditional Expectation (ICE), and pairwise interaction analysis provides agronomic transparency for domain experts and farm decision-support systems (DSS).

🌐 International Collaboration & Authors

This scientific investigation was conducted under an international bilateral research collaboration between Vellore Institute of Technology (VIT, India) and Taylor's University (Malaysia):

Author Institutional Affiliation Contact & Profiles
Gokul Ram K. School of Computer Science and Engineering, Vellore Institute of Technology, Chennai, India gokulram.k2023@vitstudent.ac.in
Dr. U. Vignesh
(Corresponding Author)
School of Computer Science and Engineering, Vellore Institute of Technology, Chennai, India vignesh.u@vit.ac.in
Dr. Geetha S. School of Computer Science and Engineering, Vellore Institute of Technology, Chennai, India geetha.s@vit.ac.in
Dr. Parvathi R. Centre for Advanced Data Science, Vellore Institute of Technology, Chennai, India parvathi.r@vit.ac.in
Assoc. Prof. Abdulkareem Sh. Mahdi Al-Obaidi School of Engineering, Faculty of Innovation and Technology, Taylor’s University, Subang Jaya, Malaysia abdulkareem.mahdi@taylors.edu.my

🏗️ Six-Stage Pipeline Architecture

The overall methodology formalized in Algorithm 1 of the published paper is structured into six modular, interconnected stages:

flowchart TD
    %% Styling Definitions
    classDef inputStyle fill:#e1f5fe,stroke:#0288d1,stroke-width:2px,color:#01579b;
    classDef prepStyle fill:#f3e5f5,stroke:#7b1fa2,stroke-width:2px,color:#4a148c;
    classDef indicatorStyle fill:#e8f5e9,stroke:#388e3c,stroke-width:2px,color:#1b5e20;
    classDef modelStyle fill:#fff3e0,stroke:#f57c00,stroke-width:2px,color:#e65100;
    classDef fusionStyle fill:#fbe9e7,stroke:#d84315,stroke-width:2px,color:#bf360c;
    classDef xaiStyle fill:#ede7f6,stroke:#512da8,stroke-width:2px,color:#311b92;

    %% Stage 1
    subgraph S1["Stage 1: Raw Agro-Environmental Inputs"]
        D1["Soil Chemical Profile<br/>(N, P, K Macronutrients)"]:::inputStyle
        D2["Crop Physiology & Edaphic<br/>(Soil pH, Growth Dynamics)"]:::inputStyle
        D3["Microclimatic Factors<br/>(Temp, Relative Humidity, Rain)"]:::inputStyle
    end

    %% Stage 2
    subgraph S2["Stage 2: Harmonization & Multivariate Outlier Removal"]
        H1["Scale Invariance Normalization<br/>(Min-Max to [0, 1])"]:::prepStyle
        H2["Anomaly Filtering & Outlier Capping<br/>(Interquartile Range & Z-scores)"]:::prepStyle
        H3["Collinearity & Redundancy Pruning<br/>(Pearson Correlation Screening)"]:::prepStyle
    end

    %% Stage 3
    subgraph S3["Stage 3: Agronomic Indicator Construction"]
        I1["Nutrient Balance Index (NBI)<br/>Proportional Stoichiometric Alignment"]:::indicatorStyle
        I2["Environmental Resilience Score (ERS)<br/>Exponential Climatic Co-Adaptation"]:::indicatorStyle
        I3["Nutrient Complementarity (NutComp)<br/>Strata Resource-Use Synergies"]:::indicatorStyle
        I4["Conflict Penalty (CP)<br/>Resource Niche Overlap & Competition"]:::indicatorStyle
    end

    %% Stage 4
    subgraph S4["Stage 4: Ensemble Compatibility Learning"]
        M1["Random Forest Regressor<br/>(Bagging Variance Reduction)"]:::modelStyle
        M2["LightGBM Regressor<br/>(Histogram Gradient Boosting)"]:::modelStyle
        M3["CatBoost Regressor<br/>(Symmetric Oblivious Trees)"]:::modelStyle
    end

    %% Stage 5
    subgraph S5["Stage 5: Weighted Fusion & Logistic Calibration"]
        F1["Meta-Learner & Stacking Fusion<br/>(Non-linear Interaction Mapping)"]:::fusionStyle
        F2["Calibrated Compatibility Index (CCI)<br/>Continuous Bimodal Scale [0, 1]"]:::fusionStyle
    end

    %% Stage 6
    subgraph S6["Stage 6: Explainability & Knowledge Validation"]
        X1["Global & Local SHAP Attribution<br/>(Summary Beeswarm, Waterfall Plots)"]:::xaiStyle
        X2["Partial Dependence & ICE Plots<br/>(Marginal Effects & Saturation Profiles)"]:::xaiStyle
        X3["Topological Graph & Manifold Embeddings<br/>(NetworkX Graphs, PCA & UMAP Projections)"]:::xaiStyle
    end

    %% Connections
    D1 & D2 & D3 --> H1 --> H2 --> H3
    H3 --> I1 & I2
    H3 --> I3 & I4
    I1 & I2 & I3 & I4 --> M1 & M2 & M3
    M1 & M2 & M3 --> F1 --> F2
    F2 --> X1 & X2 & X3
Loading

📐 Mathematical Formulation & Agronomic Indicators

AgriCompatNet constructs four domain-grounded composite indicators to model the biophysical and ecological interplay between crop pairs $a$ and $b$:

1. Nutrient Balance Index ($\text{NBI}$)

Quantifies how closely soil macronutrient proportions match agronomic optimal ratios, penalizing both deficiency and luxury consumption:

$$\text{NBI} = 1 - \frac{1}{m} \sum_{k=1}^{m} \left| \frac{r_k - r_k^{opt}}{r_k^{opt}} \right|$$

Where $r_k$ represents the observed soil nutrient ratio (e.g., $N:P$, $N:K$, $P:K$), $r_k^{opt}$ is the empirically established optimal stoichiometric benchmark, and $m$ is the total number of evaluated nutrient pairs.

2. Environmental Resilience Score ($\text{ERS}_{ab}$)

Measures climatic co-adaptation under shared temperature, relative humidity, and precipitation variability via an exponential decay formulation:

$$\text{ERS}_{ab} = \exp\left(-\frac{1}{n} \sum_{t=1}^{n} \frac{|E_{a,t} - E_{b,t}|}{\sigma_{E_t}}\right)$$

Where $E_{a,t}$ and $E_{b,t}$ represent environmental tolerance requirements along dimension $t$, and $\sigma_{E_t}$ denotes the population-wide variance, ensuring multi-attribute scale invariance.

3. Nutrient Complementarity ($\text{NutComp}_{ab}$)

Measures reciprocal resource-use partitioning, assessing whether one crop’s high demand is balanced by the partner crop’s modest requirement:

$$\text{NutComp}_{ab} = 1 - \frac{1}{K} \sum_{k=1}^{K} \left| U_{a,k} - (1 - U_{b,k}) \right|$$

Where $U_{a,k}, U_{b,k} \in [0, 1]$ represent min-max normalized uptake intensities for macronutrient $k$ across the total evaluated nutrients $K$.

4. Conflict Penalty ($\text{CP}_{ab}$)

Captures resource contention and ecological friction resulting from overlapping rhizosphere niches and divergent climatic regimes:

$$\text{CP}_{ab} = \frac{1}{2} \left( \sum_{k=1}^{K} w_k \frac{|U_{a,k} - U_{b,k}|}{\max(U_{a,k}, U_{b,k})} + \beta (1 - \rho(E_a, E_b)) \right)$$

Where $w_k$ denotes the agronomic importance weight of nutrient $k$, $\rho(E_a, E_b)$ is the correlation coefficient across environmental responses, and $\beta$ balances edaphic vs climatic conflict.

5. Unified Crop Compatibility Index ($\text{CCI}_{ab}$)

The final target metric combines these indicators into a unified score normalized to the unit interval $[0, 1]$:

$$\text{CCI}_{ab} = \alpha,\text{NBI}_{ab} + \beta,\text{ERS}_{ab} + \gamma,\text{NutComp}_{ab} - \delta,\text{CP}_{ab}$$

$$\text{subject to } \alpha + \beta + \gamma + \delta = 1, \quad \text{CCI}_{ab} \in [0, 1]$$


📊 Experimental Benchmarks & Validation

The framework was comprehensively benchmarked against standard decision models on a curated dataset of 2,200 crop instances across 2.4 million generated crop-pair combinations:

Quantitative Benchmark Comparison (Table 1)

Model Architecture Model Paradigm $R^2$ Score (Variance Explained) RMSE (Root Mean Squared Error) MAE (Mean Absolute Error) Inference Characteristics
Random Forest Bagging Ensemble 0.91 0.049 0.031 High variance control, tree diversity
LightGBM Histogram Boosting 0.93 0.045 0.029 Fast gradient leaf-wise splitting
CatBoost Symmetric Oblivious Trees 0.90 0.051 0.033 Strong regularization, categorical handling
AgriCompatNet (Fusion) Multimodal Knowledge-Guided Ensemble 0.96 0.039 0.027 State-of-the-art calibration & domain fidelity

Note

Ablation Insight: Systematic feature exclusion confirms that removing the Conflict Penalty ($\text{CP}$) induces the steepest drop in predictive accuracy ($R^2$ drops from $0.96 \to 0.78$), verifying that antagonistic modeling is crucial for preventing false-positive recommendations.


Top High-Synergy Compatible Crop Pairs (Table 2)

Pair Rank Crop A Crop B CCI Score Agronomic Interaction Mechanism Perturbation Stability ($\pm 10%$)
0 Papaya Papaya 0.9975 Homogeneous control baseline / self-affinity High baseline stability
1 Mungbean Mungbean 0.9942 Leguminous atmospheric nitrogen self-sufficiency Extremely robust
2 Coconut Coconut 0.9925 Deep vertical rooting system equilibrium Resilient
4 Mungbean Blackgram 0.9902 Stratified root zones, complementary $N_2$-fixation, zero macronutrient competition Stable ($\Delta\text{CCI} &lt; 0.015$)
7 Rice Jute 0.9890 Shared hydromorphic waterlogged niche, complementary vegetative canopy heights Stable ($\Delta\text{CCI} &lt; 0.018$)

🔬 Explainable AI (XAI) & Interpretability Suite

Interpretability in AgriCompatNet is treated as an active model-validation tool rather than an afterthought:

  1. Global SHAP Feature Importance: Identifies Conflict Penalty ($\text{CP}$) as the primary determinant of compatibility variance, followed by Nutrient Complementarity ($\text{NutComp}$) and Nutrient Balance ($\text{NBI}$).
  2. Local SHAP Waterfall Explanations: Deconstructs specific pairwise interactions (e.g., Mungbean–Blackgram) to reveal positive contributions from minimal edaphic friction.
  3. Partial Dependence & ICE Profiles: Demonstrate monotonic, saturation-governed responses, proving that beyond threshold values of $\text{ERS}$, additional resilience yields diminishing returns.
  4. Second-Order Interaction Modeling: Uncovers strong non-linear cross-talk between $\text{CP} \times \text{NBI}$, where favorable nutrient stoichiometry cannot overcome intense competitive conflict.

🖼️ Visual Results & Empirical Gallery

All figures extracted directly from the verified pipeline outputs:


Fig 2: Feature Normalization Pipeline

Min-Max scaling across 7 agro-environmental features ensuring equal variance contribution.


Fig 3: Multivariate Outlier Detection

Interquartile range analysis identifying microclimatic and edaphic anomalies.


Fig 5: Bimodal CCI Distribution

Clear separation between compatible ($CCI &gt; 0.75$) and conflicting ($CCI &lt; 0.35$) crop clusters.


Fig 6: Pairwise Crop–Crop Heatmap

Full $22 \times 22$ affinity matrix illustrating clustered guild synergies and competitive blocks.


Fig 7: Compatibility Network Graph

Topological network where edge thickness reflects high mutual compatibility ($CCI \ge 0.70$).


Fig 12: PCA Latent Space Embedding

2D projection of agronomic indicator space showcasing distinct crop cluster formations.


Fig 8: Global SHAP Feature Importance

Conflict Penalty ($\text{CP}$) exhibits the highest mean absolute SHAP value.


Fig 14: SHAP Summary Beeswarm Plot

Feature value distribution demonstrating directional impact on compatibility prediction.


Fig 9: Partial Dependence Plots (PDP)

Marginal effects of $\text{NBI}$, $\text{ERS}$, $\text{NutComp}$, and $\text{CP}$ on predicted $\text{CCI}$.


Fig 11: Feature Interaction (CP x NBI)

Non-linear coupling proving high conflict suppresses favorable nutrient balance.


Fig 4: Environmental Perturbation Sensitivity

Controlled $\pm 10\%$ perturbations of $\text{ERS}$ and $\text{CP}$ illustrating model resilience.


ICE: Individual Conditional Expectation Curves

Observation-level trajectory validation confirming homogeneous monotonic slopes.


📂 Repository Structure

AgriCompatNet/
├── .gitignore                      # Python, Jupyter, virtualenv exclusions
├── CITATION.cff                    # Citation File Format (v1.2.0) metadata
├── LICENSE                         # Dual License: MIT (Code) & CC BY 4.0 (Assets)
├── README.md                       # Comprehensive repository documentation
├── requirements.txt                # Pinned dependency requirements
├── images/
│   ├── 1_Graphical_Insights.png    # High-resolution framework architecture diagram
│   ├── badges/                     # Crisp local SVG status badges
│   │   ├── badge_elsevier_array.svg
│   │   ├── badge_doi.svg
│   │   ├── badge_license.svg
│   │   ├── badge_xai.svg
│   │   ├── badge_benchmark.svg
│   │   ├── badge_collaboration.svg
│   │   └── badge_python.svg
│   ├── logos/                      # Institutional logos
│   │   ├── vit_chennai_logo.png
│   │   └── taylors_university_logo.png
│   ├── fig02_feature_normalization.png
│   ├── fig03_outlier_detection_boxplots.png
│   ├── fig04_environmental_sensitivity.png
│   ├── fig05_cci_distribution.png
│   ├── fig06_compatibility_heatmap.png
│   ├── fig07_crop_compatibility_network.png
│   ├── fig08_global_shap_importance.png
│   ├── fig09_partial_dependence_plots.png
│   ├── fig10_local_shap_waterfall_pair1.png
│   ├── fig11_shap_interaction_cp_nbi.png
│   ├── fig12_pca_latent_clusters.png
│   ├── fig13_feature_correlation_matrix.png
│   ├── fig14_shap_beeswarm_impact.png
│   └── ice_individual_conditional_expectation.png
├── notebooks/
│   └── agricompatnet_pipeline.ipynb # Complete 39-cell end-to-end research notebook
└── resources/
    └── AgriCompatNet_Elsevier_Array_2026.pdf # Full Elsevier published open-access paper

🚀 Quick Start & Reproduction

1. Clone the Repository

git clone https://github.com/GOKULRAM-K/AgriCompatNet.git
cd AgriCompatNet

2. Set Up a Virtual Environment (Python 3.10+)

python -m venv venv

# On Linux/macOS:
source venv/bin/activate

# On Windows:
venv\Scripts\activate

3. Install Dependencies

pip install --upgrade pip
pip install -r requirements.txt

4. Run the Research Notebook

Launch the Jupyter Notebook to reproduce all 6 stages, figures, and benchmark metrics:

jupyter notebook notebooks/agricompatnet_pipeline.ipynb

📜 Citation

If you use AgriCompatNet, its algorithmic indicators ($\text{NBI}$, $\text{ERS}$, $\text{NutComp}$, $\text{CP}$, $\text{CCI}$), or baseline comparisons in your research, please cite our published paper in Elsevier Array:

BibTeX Format (Click to Expand / Collapse)
@article{GOKULRAM2026101267,
  title = {An explainable multimodal data fusion framework for compatibility reasoning in heterogeneous decision systems},
  journal = {Array},
  volume = {32},
  pages = {101267},
  year = {2026},
  issn = {2590-0056},
  doi = {10.1016/j.array.2026.101267},
  url = {https://doi.org/10.1016/j.array.2026.101267},
  author = {Gokul Ram K. and U. Vignesh and Geetha S. and Parvathi R. and Abdulkareem Sh. Mahdi Al-Obaidi},
  keywords = {Explainable artificial intelligence, Multimodal data fusion, Decision support systems, Crop compatibility, Ensemble learning, Precision agriculture},
  note = {Special Issue: EDS}
}
APA 7th Edition Format

Gokul Ram, K., Vignesh, U., Geetha, S., Parvathi, R., & Al-Obaidi, A. S. M. (2026). An explainable multimodal data fusion framework for compatibility reasoning in heterogeneous decision systems. Array, 32, Article 101267. https://doi.org/10.1016/j.array.2026.101267


⚖️ License & Open Access

Developed with passion for open science, sustainable agriculture, and explainable artificial intelligence.

About

Explainable multimodal data-fusion framework for crop-pair compatibility reasoning (NBI, ERS, NutComp, CP) using ensemble learning and SHAP. Achieved R² = 0.96 across 2.4M crop pairs, published in Elsevier Array (2026).

Topics

Resources

Stars

0 stars

Watchers

0 watching

Forks

Releases

Packages

Contributors

Languages