What Spatial Cross-Validation Actually Means in Mineral Prospectivity

Spatial cross-validation prospectivity mapping is a specific branch of machine learning applied to mineral exploration that uses geographically partitioned train-test splits instead of the standard random splits found in most data science workflows. In a random k-fold cross-validation, an algorithm might train on a deposit in Inner Mongolia and test on a deposit 50 kilometers away, allowing information leakage between spatially autocorrelated training samples. This is not a theoretical problem; it inflates model accuracy by 15 to 30 percent in published benchmarks for geological datasets, and several 2023 and 2024 peer-reviewed studies have shown that random splits systematically overestimate true out-of-sample performance in mineral systems. Spatial cross-validation fixes this by ensuring that points from the same geographic cluster, tectonic terrane, or geological province are kept together in either the training set or the test set, never both.

Also worth reading: What is the most effective REE prospectivity mapping workflow for identifying new critical mineral deposits? · What are rare earth minerals and why is AI transforming how we find them? · How does AI optimize rare earth processing and mineral discovery for supply chain resilience?

The technique is now widely used in prospectivity mapping for copper, gold, porphyry systems, and increasingly for rare earth elements (REE) and natural hydrogen. Recent work published in Nature's Scientific Reports and in Wiley's Earth Space Science journals has used spatial cross-validation as the default evaluation protocol, replacing the random-fold baseline that dominated the literature before 2022. The core idea is borrowed from ecology and epidemiology, where spatial autocorrelation has been a known pitfall for decades, and it was adapted for mineral systems as the scale of machine learning deployments grew.

Why Random Cross-Validation Fails for Mineral Systems

The failure mode of random cross-validation is structural rather than incidental. Mineral deposits cluster along faults, intrusions, sedimentary basins, and alteration halos. If a training fold includes one half of an intrusion and the test fold includes the other half, the model can effectively memorize the geological signature and still appear to generalize. Empirical studies on copper-gold and REE datasets report Area Under Curve (AUC) values between 0.88 and 0.96 under random cross-validation, but the same models drop to 0.65 to 0.80 when the splits are made spatially. The gap is the hidden optimism that the random procedure injects.

For rare earth exploration specifically, the problem is acute because ion-adsorption clays and carbonatite complexes are highly localized. A model trained on southern Chinese REE clays will often fail when applied to a different weathering regime in Madagascar or Brazil, partly because the spectral and geochemical signatures shift. Spatial cross-validation surfaces this failure honestly, allowing the exploration geologist to calibrate trust in the model before deploying capital.

How the Method Works in Practice

A typical spatial cross-validation pipeline for prospectivity mapping starts with a deposit or occurrence dataset, a set of predictor rasters (lithology, structure, geophysics, geochemistry, remote sensing bands), and a defined spatial grouping unit. The grouping can be a regular grid, a tessellation such as Voronoi polygons, a buffered radius around each deposit, or administrative boundaries. A common choice is 5-fold or 10-fold spatial CV, where the study area is divided into 5 or 10 contiguous blocks and each block is held out in turn.

Once the spatial folds are defined, an ensemble of learners (Random Forest, XGBoost, LightGBM, or a stacked model) is trained on the predictor rasters and the binary deposit presence/absence labels inside the training blocks. Predictions are generated across the entire study area, and the held-out block provides an unbiased estimate of generalization. This is repeated across all folds, and the mean AUC, F1-score, precision-recall area, and prediction-rate curve are aggregated. Final prospectivity maps are produced by retraining on the full dataset, but the reported performance metrics come from the spatial folds.

For REE applications, predictors typically include Landsat 8/9 multispectral bands, Sentinel-2 shortwave infrared composites, ASTER thermal bands, aeromagnetic and radiometric surveys, stream-sediment geochemistry ratios such as La/Y or Ce/Y, and distance-to-intrusion layers. The non-linear interactions between these layers are exactly the patterns that tree-based ensembles detect, and spatial CV reveals whether those interactions hold across provinces.

Comparison of Validation Strategies for Prospectivity Mapping

StrategyHandling of Spatial AutocorrelationReported AUC BiasComputational CostBest Use Case
Random k-foldIgnores+15 to +30% overestimationLowQuick screening only
Spatial block k-foldPreserves by blockLow biasLow to mediumStandard prospectivity mapping
Spatial buffer leave-one-outStrict, distance-controlledLowest biasHighSparse, high-value targets
Cluster-based k-fold (e.g., k-means on coordinates)Preserves by cluster shapeLow to moderateMediumIrregular geology
Internal-external cross-validation (IOCV)Strict, by regionLowest bias, region-dependentMediumMulti-region studies
The table above summarizes the main options used in 2022-2025 mineral prospectivity literature. Each row corresponds to a published protocol rather than a theoretical variant. The reported AUC bias column comes from comparative studies that ran the same model under multiple validation schemes on the same dataset, so the values are directly comparable. Buffer leave-one-out and IOCV are the strictest because they enforce larger minimum distances between training and test deposits, but they require more deposits to remain statistically meaningful. Cluster-based k-fold using k-means on coordinates is a practical middle ground when geological provinces are diffuse.

Practical Steps to Implement Spatial Cross-Validation

The first practical step is to define a deposit or occurrence database with reliable coordinates. For REE, this means pulling verified occurrences from national geological surveys, the USGS Mineral Resources Data System, or peer-reviewed literature, and standardizing them to a single coordinate system. The second step is to assemble the predictor stack at a consistent resolution, usually 30 m for Landsat, 10 to 20 m for Sentinel-2, and 100 m for merged geophysics-geochemistry products. The third step is to choose the spatial fold geometry, and the recommended default in 2024-2025 publications is a 5-fold block design with a block size at least 1.5 times the maximum predictor radius (for example, a 3 km buffer on faults requires 4.5 km blocks).

Once the folds are defined, the modeling step uses an ensemble such as Random Forest (typically 500 to 2000 trees, mtry tuned via spatial CV, not random CV), gradient boosting, or a stacked learner. Class imbalance is addressed through SMOTE, undersampling of the background, or class weights. Finally, prediction-rate curves are plotted against the area classified as prospective, and a threshold such as the top 5% or 10% prospective area is used to map drill targets. Sky Mineral-style platforms automate most of these steps but the validation strategy is the most consequential user choice.

Common Mistakes and How to Avoid Them

The most common mistake is to report random k-fold AUC alongside a spatial-only deployment, creating a misleading impression of accuracy. Several 2022-2024 prospectivity papers have been criticized in post-publication review for exactly this issue. The second common mistake is to use folds that are too small relative to the spatial autocorrelation range, which leaks information between folds and produces the same bias as random CV. A diagnostic test is to compute Moran's I on the residuals across the study area; if significant spatial autocorrelation remains in the residuals, the fold size is too small.

A third mistake is to ignore the negative class definition. Background samples in mineral prospectivity are typically generated from the study area excluding known deposits, but the exclusion buffer must be realistic. A 500 m buffer around a 200 m-wide vein is acceptable; a 5 km buffer is not, because it overstates the contrast between deposit and background and inflates the apparent model skill. For REE targets, deposit footprints are often diffuse, so buffer size should be informed by the alteration halos reported in the source literature.

A fourth mistake is to deploy a model across climatic or geological regimes without re-validating. A spatial CV within a single province can be excellent, but cross-province transfer still requires external validation. Studies on Chinese REE clays have shown AUC drops of 10 to 25 percent when models trained in one province are applied to another, even with spatial CV, because the weathering regime and clay mineralogy differ.

When to Use Spatial CV and When Random Is Acceptable

Spatial cross-validation is appropriate whenever the deployment area differs geographically from the training area, which is the case for almost every greenfield exploration program. It is also appropriate whenever the model will be used to rank hundreds of square kilometers of unknown terrane, because the prospective targets by definition lie outside the training footprint. The narrow exception where random CV is acceptable is when the study area is small (under a few square kilometers) and the goal is purely local mapping, such as resource estimation at an operating mine.

For rare earth exploration specifically, the case for spatial CV is strong because most REE targets are defined by secondary processes (weathering of carbonatite, lateritization, clay formation) that vary with climate. Random CV within one deposit cluster will not surface this sensitivity. Spatial CV, particularly buffer-based or IOCV, will.

Limitations and Open Questions

Spatial cross-validation is not a panacea. It tells you how the model performs on held-out space within the training distribution, not how it performs on fundamentally new terrane. For that, external test sets are required, and external test sets are rare in REE exploration because there are few well-documented deposits outside of China. The method also assumes that the predictor stack is comparable across space, which is rarely true when geophysical surveys were flown at different resolutions or in different decades.

Another open question is the optimal block size. Most studies use ad hoc choices, but recent work has proposed a data-driven approach based on variogram ranges of the deposit density. Until that becomes standard, reporting results across two or three block sizes is the most honest practice. Finally, spatial CV does not address the problem of unrepresentative sampling, where deposits in remote or politically difficult regions are absent from the training data. That bias is structural and must be corrected by targeted data acquisition, not by validation strategy alone.

Summary of Best Practices for 2026 Deployments

For an exploration team in 2026, the recommended workflow is: (1) build a deposit database with provenance and exclusion buffers, (2) assemble a 30 m to 100 m multi-layer predictor stack, (3) run spatial 5-fold CV with at least two block sizes, (4) report both the spatial and the random CV results side by side, (5) train the final model on all data and produce a continuous prospectivity raster, (6) apply a top-percentile threshold (commonly 5% to 10%) to define drill targets, and (7) document the validation protocol in any internal or external reporting. This workflow matches the standards now expected in peer-reviewed prospectivity mapping and is the baseline against which AI-powered exploration platforms are increasingly evaluated.

The technique is well established, computationally cheap, and supported by open-source tooling (scikit-learn with custom CV splitters, R's blockCV package, and various QGIS plugins). For rare earth and critical mineral exploration, where each drill hole costs tens of thousands of dollars, the difference between a model that over-promises and one that honestly reports its performance is a difference of real capital at risk.