Overview · DeepSCORPAN · Architecture · Mathematics · Auto-Configuration · Research-Family · Benchmark · Usage
GeoVersa is the research line behind a family of spatial prediction networks that combine deep representation learning with geostatistical residual correction.
The active, benchmarked path in this repository is the pure ConvKrigingNet2D / GeoVersa configuration:
- three encoders learn from tabular covariates, raster patches, and coordinates;
- a residual memory bank stores the current backbone residual field;
- a differentiable anisotropic kriging layer interpolates those residuals;
- a learned global gate controls how strongly the correction enters the final prediction;
- the training pipeline configures itself automatically from the fold, the variogram, and the available hardware.
The repository also preserves a broader GeoVersa research family of experimental architectures and benchmark histories. This README now does both:
- it documents the current validated benchmark path exactly as the code executes it;
- it keeps the DeepSCORPAN / GeoVersa research narrative and the references to your network families.
Digital Soil Mapping is grounded in the SCORPAN framework:
where
Classical regression-kriging keeps these two parts separate:
GeoVersa reframes that idea as a DeepSCORPAN program: the trend model and the residual geostatistical correction are learned inside one trainable system.
For the active GeoVersa benchmark path, the final standardized prediction is:
with:
-
$\hat{y}_{i}^{\mathrm{base}}$ : deep trend prediction; -
$\delta_i$ : anisotropic residual interpolation from the memory bank; -
$\beta \in (0,1)$ : learned global kriging gate.
This is the current concrete realization of the broader DeepSCORPAN idea in the repository.
| SCORPAN factor | Current GeoVersa realization |
|---|---|
| Tabular encoder over point-level covariates | |
|
|
2D CNN patch encoder |
| Coordinate encoder | |
| Differentiable anisotropic residual-kriging layer |
The benchmarked architecture has four coupled components:
| Component | Input | Output | Role |
|---|---|---|---|
| Tabular encoder | point covariates |
nonlinear trend from SCORPAN-style attributes | |
| Patch encoder | raster patch |
local terrain and remote-sensing texture | |
| Coordinate encoder | location |
smooth spatial trend component | |
| Residual kriging layer | neighbor residual bank | anisotropic spatial correction |
flowchart LR
X["Tabular covariates x_i"] --> TAB["Tabular MLP"]
P["Raster patch P_i"] --> PATCH["Patch CNN + projection"]
C["Coordinates s_i"] --> COORD["Coordinate MLP + projection"]
TAB --> FUSE["Fusion block"]
PATCH --> FUSE
COORD --> FUSE
FUSE --> BASE["Scalar head: yhat_base"]
BASE --> BANK["Residual bank refresh"]
BANK --> KRIG["Anisotropic residual kriging"]
C --> KRIG
BASE --> OUT["Final predictor"]
KRIG --> OUT
OUT["yhat = yhat_base + beta delta"]
The active kriging layer is purely spatial in its weighting rule. It stores latent vectors in the bank for compatibility with the broader GeoVersa research program, but the current benchmarked path does not use latent similarity inside the kriging weights. That distinction matters and is reflected below in the mathematics.
| Symbol | Meaning |
|---|---|
| tabular covariates | |
| raster patch | |
| coordinates | |
y_i |
observed target |
T(y_i) |
optional target transform |
y_i^{(s)} |
standardized training target |
The standardized target is:
Each modality is encoded independently and projected into a shared latent space:
These embeddings are fused into a joint representation:
and mapped to the base trend:
At each bank refresh, the current backbone defines residuals over the training set:
so the memory bank can be written as:
For query point
The anisotropic distance is:
The active weighting rule is the exponential covariance softmax used in AnisotropicExpCovKrigingLayer_Auto:
and the residual correction is:
This is intentionally different from earlier latent-attention variants explored in the GeoVersa research line. The benchmarked path described here uses pure anisotropic spatial weighting.
The global gate is learned end to end:
and the final standardized prediction is:
During warmup, only the backbone is optimized:
After warmup, the full model is trained with:
For the current standalone GeoVersa benchmark:
- the model is trained only against the observed target;
r2is reported as Pearson squared in the current benchmark path.
The active auto-config logic lives in code/ConvKrigingNet2D_Auto_v5.R and derives the model from the fold geometry, the fitted variogram, and device constraints.
From the empirical variogram, the code initializes:
-
$\ell_{\mathrm{maj}}$ ,$\ell_{\mathrm{min}}$ , and$\theta$ ; - nugget-to-sill ratio
$r$ ; - neighborhood size
$K$ ; - the initial kriging gate prior.
The active rules are:
The latent widths and patch geometry follow:
where:
If patches are already cached, the actual cached tensor size overrides the heuristic patch_size.
The current v5 rules are:
The
The initial learning rate is estimated with a Polyak-style probe:
Weight decay scales with model size:
Batch size is chosen from the smaller of:
- a statistical target near
$n_{\mathrm{train}} / 8$ ; - a device-aware memory estimate.
After warmup, the code adapts:
patience;lr_patience;lr_decay;bank_refresh_every.
The repository is not only the current ConvKrigingNet2D benchmark. It also records a broader family of GeoVersa research directions through archived searches, confirmations, and benchmark folders under results/.
PointPatchConvKrigingNet2DGeoVersa
GeoBasisMLPGeoImplicitNetGeoSplineNetGeoMonotoneSplineGeoNAMKrigingNetGeoMLSKrigingNet
GeoHashKrigingNetGeoKernelAttentionKrigingNetGeoPrototypeKrigingNetGeoSetKrigingNetGeoSetLocalKrigingNetGeoNeuralProcessKrigingNetGeoTransformerKrigingNet
GeoFlowKrigingNetGeoGraphKrigingNetGeoHyperKrigingNetGeoKANKrigingNetGeoMOEKrigingNetGeoSoftTreeKrigingNetPedoformerKrigingNet
GeoVariogramKrigingNetGeoWaveletKrigingNetGeoScoreKrigingNet
These families should be understood as part of the GeoVersa research program. The current benchmarked and documented production path, however, is the pure ConvKrigingNet2D / GeoVersa route described in this README.
The repository now keeps two separate comparison tracks:
code/run_wadoux_style_rf_conv_comparison.R
This runs GeoVersa itself on Wadoux-style validation splits.
code/run_wadoux_rf_reference.R
This reproduces the Random Forest reference under the same validation framework.
Tracked upstream reference:
- repository:
AlexandreWadoux/SpatialValidation; - mirrored commit:
ba3ad39bfa8474a09e8ac4cd82a0161649648794; - local documentation:
docs/wadoux2021-reference/.
The validation suite is not a collection of interchangeable scores. Each protocol estimates a different empirical risk functional, so a scientifically correct reading must respect the estimand behind the split design, in the sense emphasized by Wadoux et al. (2021).
Let
For the optional full-domain benchmark, the population-style target is:
The DesignBased protocol instead estimates map error from an independent simple-random test sample
This is why DesignBased is the main benchmark in this repository whenever the scientific claim is map accuracy rather than only local interpolation skill.
For RandomKFold, the repository evaluates the out-of-fold risk under random partitioning:
For SpatialKFold, the same out-of-fold estimator is applied after replacing random folds by spatially separated blocks
For BLOOCV, each focal test location is evaluated after excluding a buffer of radius
flowchart LR
A["Population"] --> A1["Full-domain empirical risk"]
B["DesignBased"] --> B1["Independent SRS estimate of map accuracy"]
C["RandomKFold"] --> C1["Random out-of-fold predictive risk"]
D["SpatialKFold"] --> D1["Blocked spatial generalization risk"]
E["BLOOCV"] --> E1["Buffered local extrapolation/interpolation stress test"]
The correct interpretation is therefore:
DesignBasedis the principal benchmark for claims about map accuracy;RandomKFoldis useful but can be optimistic when train and test remain too close in feature or geographic space;SpatialKFolddiagnoses robustness under explicit spatial separation;BLOOCVprobes a buffered leave-location-out regime and is especially informative about short-range spatial dependence;- winning
3/4protocols is not, by itself, a sufficient scientific claim unless the primary estimand has been declared in advance.
GeoVersa's thesis is not weakened by this distinction. On the contrary: the model is designed to combine a deep covariate-driven backbone with spatial residual correction, so it should be read as a system with two complementary ambitions:
- strong local residual recovery when nearby signal is genuinely informative;
- competitive map-level accuracy under design-based evaluation when the backbone has learned the large-scale structure well.
Setup:
- scenario:
random; - protocol:
DesignBased; - sample size:
500; - repetitions:
3; - model profile:
auto; - device:
mps; - metric convention:
Pearson^2.
| Model | ME | RMSE | Pearson^2 | MEC |
|---|---|---|---|---|
| RF benchmark | 0.187 | 32.313 | 0.883 | 0.877 |
| GeoVersa, standalone auto | 0.403 | 33.033 | 0.873 | 0.870 |
Current reading:
- this is the current clean benchmark for the standalone
autopath in this repository; - GeoVersa is now being evaluated without any RF-guided training path;
- GeoVersa still does not yet beat the RF benchmark on
DesignBased.
The current clean gap relative to the RF benchmark is:
The original saved Wadoux .Rdata outputs are still not present in the mirrored upstream checkout. Their availability is tracked in docs/wadoux2021-reference/official_rdata_manifest.csv.
Sys.setenv(
WADOUX_AUTO_V5_SCRIPT = normalizePath(file.path(getwd(), "code", "ConvKrigingNet2D_Auto_v5.R"), mustWork = FALSE),
WADOUX_AUTO_SCRIPT = normalizePath(file.path(getwd(), "code", "ConvKrigingNet2D_Auto.R"), mustWork = FALSE),
WADOUX_MODELS = "ConvKrigingNet2D",
WADOUX_PROTOCOLS = "DesignBased",
WADOUX_N_ITER = "10",
WADOUX_SAMPLE_SIZE = "500",
WADOUX_MODEL_PROFILE = "auto",
WADOUX_DEVICE = "mps",
WADOUX_RESULTS_DIR = "results/geoversa_run"
)
source("code/run_wadoux_style_rf_conv_comparison.R")Useful override knobs exposed by the runner:
WADOUX_BASE_LOSS_WEIGHTWADOUX_K_NEIGHBORSWADOUX_WEIGHT_DECAYWADOUX_LRWADOUX_BATCH_SIZEWADOUX_PATIENCEWADOUX_LR_PATIENCEWADOUX_LR_DECAYWADOUX_ALPHA_MEWADOUX_LAMBDA_COVWADOUX_COORD_DROPOUT
Sys.setenv(
WADOUX_RF_SCENARIO = "random",
WADOUX_RF_PROTOCOLS = "Population,DesignBased",
WADOUX_RF_N_ITER = "10",
WADOUX_RF_SAMPLE_SIZE = "500",
WADOUX_R2_METHOD = "pearson",
WADOUX_RF_RESULTS_DIR = "results/wadoux_rf_reference"
)
source("code/run_wadoux_rf_reference.R")source("code/import_wadoux_official_rdata.R")code/
ConvKrigingNet2D_Auto.R
ConvKrigingNet2D_Auto_v5.R
run_wadoux_style_rf_conv_comparison.R
run_wadoux_rf_reference.R
import_wadoux_official_rdata.R
wadoux2021_rf_reproduction_helpers.R
docs/
wadoux2021-reference/
logo/
GeoVersa Logo.png
results/
geoversa_blw_confirm10_20260406/
wadoux2021_rf_reference_random_designbased_10iter_pearson_20260405/
many archived GeoVersa family searches and confirmations
@software{GeoVersa,
author = {Rodrigues, Hugo},
title = {{GeoVersa}: Deep Learning + Geostatistics for Spatial Prediction},
year = {2026},
doi = {10.5281/zenodo.15139517},
url = {https://github.com/HugoMachadoRodrigues/GeoVersa}
}- McBratney, A. B., Mendonça Santos, M. L., and Minasny, B. (2003). On digital soil mapping. Geoderma, 117(1-2), 3-52.
- Jenny, H. (1941). Factors of Soil Formation: A System of Quantitative Pedology.
- Wadoux, A. M. J.-C., Heuvelink, G. B. M., de Bruin, S., and Brus, D. J. (2021). Spatial cross-validation is not the right way to evaluate map accuracy. Ecological Modelling, 457, 109692. https://doi.org/10.1016/j.ecolmodel.2021.109692