Agentic AI and Explainable attention-based digital soil mapping
Attention-based deep learning to map soil properties in Algeria, with explainability and an agentic AI layer, an extension and improvements to the SUELO Project.
Loading media…
Overview
This project extends and advances the SUELO — AI-Powered National Soil Intelligence Platform initiative by introducing an intelligent, explainable, and spatially robust deep learning framework for national-scale Digital Soil Mapping (DSM) in Algeria.
The research combines Agentic AI, Generative AI, attention-based deep learning, and automated neural architecture optimization to address major challenges in soil data acquisition, soil property prediction, and spatial generalization.
An agentic AI workflow was developed to automatically discover, extract, and standardize soil observations from heterogeneous legacy sources, resulting in a harmonized database of 2,156 soil profiles. Building on this dataset, novel Uni-Task and Multi-Task Attention-Based Convolutional Neural Networks (UT-AttCNN and MT-AttCNN) were developed to predict multiple soil properties across different depth intervals.
A particular focus was placed on model explainability, architecture optimization, predictive uncertainty, and spatial generalization. Unlike conventional approaches relying primarily on random cross-validation, this study systematically evaluated model performance using spatially aware validation strategies to provide a more realistic assessment of predictive capabilities in geographically clustered datasets.
The resulting framework generated national soil property maps at approximately 700 m spatial resolution, providing a scientifically grounded foundation for soil characterization and sustainable land management.
Key Components & Technical Implementation
1. Agentic AI for Automated Soil Data Acquisition
Development of an automated agentic AI workflow to transform heterogeneous scientific documents and legacy datasets into structured soil profile observations.
- Integration of Generative AI and Large Language Models (LLMs) for document understanding and information extraction.
- Development of AI agents for automated soil data discovery, extraction, and structuring.
- Processing of heterogeneous sources, including scientific publications, doctoral dissertations, master’s theses, and institutional datasets.
- Use of GPT-4 and GPT-4 Vision for text and document understanding.
- Agent orchestration and workflow management using LangChain and LangGraph.
- Integration and experimentation with multiple LLM providers, including OpenAI, Together AI, and Groq.
- Construction of a harmonized database containing 2,156 soil profiles.
2. Soil Data Harmonization & Geospatial Integration
Development of a standardized data preparation pipeline to ensure consistency and reliability across heterogeneous soil observations.
- Data cleaning, quality control, and harmonization of soil profile measurements.
- Standardization of soil properties and depth intervals.
- Integration of soil observations with environmental covariates.
- Processing and spatial alignment of remote sensing and geospatial datasets.
- Construction of the final modelling dataset using the SCORPAN digital soil mapping framework.
3. Explainable Attention-Based Deep Learning Architectures
Design and implementation of attention-based convolutional neural networks for multi-property soil prediction.
Two complementary architectures were developed:
Uni-Task Attention-Based CNN (UT-AttCNN)
- Dedicated predictive models for individual soil properties.
- Attention mechanisms to improve the representation and learning of relevant input features.
- Prediction of soil texture fractions, pH, electrical conductivity (EC), cation exchange capacity (CEC), and soil organic matter (SOM).
- Investigation of attention-based feature relevance to improve model interpretability.
Multi-Task Attention-Based CNN (MT-AttCNN)
- A unified multi-task architecture for simultaneous prediction of multiple soil properties.
- Joint learning across different soil depth intervals.
- Investigation of shared representations and relationships between soil properties.
- Evaluation of the trade-offs between computational efficiency and predictive accuracy.
4. Neural Architecture Search & Automated Optimization
Implementation of an automated optimization framework to identify suitable neural network architectures and hyperparameters.
- Integration of Optuna for automated hyperparameter optimization.
- Neural Architecture Search (NAS) for systematic exploration of network configurations.
- Optimization of attention-based deep learning architectures.
- Comparison of optimized deep learning models with classical machine learning approaches.
- Benchmarking against Decision Trees, Random Forest, LightGBM, and Multilayer Perceptrons (MLP).
5. Spatial Cross-Validation & Model Generalization
Implementation of rigorous spatial validation strategies to assess model reliability and reduce the risk of overoptimistic performance estimates caused by spatial autocorrelation.
Four spatially aware validation approaches were investigated alongside conventional random cross-validation:
- Spatial Block Cross-Validation (blockCV).
- SPATIAL+ (SP).
- SPATIAL+ variant 1 (SP1).
- SPATIAL+ variant 2 (SP2).
The experiments demonstrated that random cross-validation substantially overestimated predictive performance. For UT-AttCNN, mean R² decreased from 0.78 under random cross-validation to 0.45 under spatial block cross-validation.
While tree-based ensembles performed competitively under random validation, UT-AttCNN was most frequently the best-performing approach under spatial validation, particularly for sand, silt, and soil organic matter prediction.
6. Predictive Uncertainty Quantification
Integration of Monte Carlo Dropout to estimate predictive uncertainty and assess the reliability of generated soil predictions.
- Implementation of Monte Carlo Dropout for uncertainty estimation.
- Generation of uncertainty maps alongside soil property predictions.
- Spatial analysis of predictive confidence and uncertainty patterns.
- Assessment of uncertainty across different soil properties and geographic regions.
7. National Soil Mapping & Visualization
Application of optimized models to generate national-scale digital soil maps for Algeria.
- Spatial prediction of multiple soil properties across the country.
- Generation of continuous soil property maps at approximately 700 m resolution.
- Production of uncertainty maps to complement the predicted soil properties.
- Visualization and cartographic analysis using ArcGIS.
- Evaluation of spatial prediction patterns against known soil-landscape relationships.
- Comparison with existing global soil mapping products, including SoilGrids.
Key Research Findings & Achievements
- Developed an agentic AI workflow for automated soil data extraction and harmonization from heterogeneous legacy sources.
- Constructed a standardized database containing 2,156 soil profiles.
- Designed two attention-based deep learning architectures: UT-AttCNN and MT-AttCNN.
- Integrated Neural Architecture Search and Optuna for automated model optimization.
- Demonstrated the importance of spatial cross-validation in assessing digital soil mapping model generalization.
- Achieved a mean R² of 0.78 under random cross-validation and 0.45 under spatial block cross-validation with UT-AttCNN.
- Demonstrated stronger performance and lower skill degradation of UT-AttCNN under spatial validation compared with competing approaches.
- Integrated Monte Carlo Dropout for predictive uncertainty quantification.
- Generated national soil property maps at approximately 700 m spatial resolution.