projects → sptgnn
Multi-Modal Spatio-Temporal Graph Neural Network with Mixture of Experts for Soil Organic Carbon Prediction
Soil organic carbon is the largest terrestrial carbon pool: roughly 1,500 Gt in the upper metre of soil, more than the atmosphere and vegetation combined. Measuring it underpins greenhouse gas inventories, land use planning and carbon credit markets. Yet most digital soil mapping still runs classical regressors over hand-crafted covariates, discarding the rich spectral and temporal signal in satellite data and treating every field sample as if its neighbours didn't exist. SpTGNN is the model designed and built as part of the Spatialise internal research group, alongside Felipe Drummond and Anton Bossenbroek.
We harmonized 49,044 topsoil samples from nine source databases across six continents (2013–2022), and paired each sample with four modalities: Sentinel-2 spectral patches, Sentinel-1 SAR, Copernicus GLO-30 elevation, and 63 tabular environmental covariates. Samples become nodes in a heterogeneous graph with three edge types: geographic proximity, NDVI similarity and topographic alignment. The model can then reason about how nearby, similar soils relate instead of predicting each point in isolation.
Each modality gets its own encoder: satellite patches go through a per-region fine-tuned (then frozen) TerraMind v1-large vision transformer, coordinates through multi-scale Fourier features, and the streams are fused by a sparse cross-gated mixture-of-experts layer with top-k routing, to our knowledge a novel move for multi-modal geospatial data. Four relational graph attention layers propagate information over the edge types, and a five-member deep ensemble with a heteroscedastic head and post-hoc temperature scaling turns predictions into calibrated uncertainties.
On the African test region the ensemble cuts RMSE by ~8.5% against a tuned XGBoost baseline (3.51 vs 3.84 g/kg, R² 0.762 vs 0.715), with the best single model reaching R² ≈ 0.88 at 14% MAPE, and calibration landing at ECE 0.026–0.031 after temperature scaling. Ablations confirm each piece earns its place: dropping the multi-relational edges, the MoE fusion or the ViT stream each costs 0.25–0.39 R².
This isn't just a paper model: it runs in production. At Spatialise I built the API that serves SpTGNN inference to live clients in the agriculture industry, turning satellite imagery and a soil sample layout into carbon predictions with calibrated confidence intervals. The codebase is private, but the interface is public: see the Python SDK reference.
- Company
- Spatialise ↗
- Paper
- arXiv:2606.16580 ↗
- API Docs
- Python SDK reference ↗
- Stack
- PyTorch, Relational GAT, TerraMind ViT, Ray Tune, NVIDIA A100, GCP



