RegimeBenchWhich method finds spatial regimes, and when?
RegimeBench IJGIS companion

Which method finds spatial regimes, and when?

Spatial heterogeneity has edges. Most methods only draw gradients.

That spatial relationships vary is not in dispute — geographically weighted regression and attribution maps have modelled drifting coefficients for years. The open question is the shape of the variation. Walk from the waterfront villas through the apartment blocks to the farms and what one more room is worth does not drift: it jumps, at a street you could point to. A smooth surface cannot put a line there. Spatial regimes can. This page is about finding them, and about a benchmark of 3,564 controlled runs that says which methods actually do.

Panel: an illustration. The benchmark behind it runs on controlled simulations with known regimes, plus two real datasets.

0method runs
0scenarios
0algorithms
0generating axes
1 / 4 Three neighbourhoods villas · apartment blocks · farms
01 The problem

The mechanism has a geography, and the geography has borders

Same structure as the town above, now with the statistics beside it. Read these three maps left to right. The first is the thing that actually varies: the local effect of X₁ on Y, which takes three values over three zones and is piecewise constant — flat inside a zone, discontinuous at its edge. The second is what a single global regression puts in its place — one number, everywhere. The third is what that costs, and the point is that the cost is not spread evenly: it reassembles the map you started from.

The mechanismβ₁(s) · what varies
What one global model assumesβ̄ everywhere
Where that assumption failslocal error of the global fit
β₁ −3  0  +3 local error low  high white lines: regime boundaries
The same data without the geography
Every location pooled into one scatter — supporting evidence, not the argument.
What the pooling costs
Read with the maps above.
Global slope—
Regime slopes—
R², one global model—
R², one model per regime—
Moran's I of the global model's error—

The last line is the spatial tell. A correctly specified model leaves error with no geography, so Moran's I sits near zero; here the error is strongly clustered, because what the model omitted was itself a map. Note also what the error map cannot do: the two zones with opposite slopes are both dark, because error says where the global model is wrong, never how. Recovering the how is the job of the methods benchmarked below.

Inference

The reported effect belongs to no one

A pooled coefficient is a weighted average of opposing mechanisms. Its confidence interval can be tight and its sign still wrong for every zone in the study area.

Decisions

Interventions land in the wrong places

Policies calibrated on a global elasticity over- or under-shoot wherever the local mechanism departs from the average — and the error map shows exactly where that is.

Transfer

Models move badly across space

A model fitted where one mechanism dominates degrades when applied elsewhere, which is exactly the signal this benchmark turns into a validity check.

02 Why it is hard

The regimes are on the map. They are not always in the outcome.

Here is the trap most benchmarks fall into. Map the outcome and, in the usual setting, the regimes are already visible in it — so a method that simply clusters Y looks like a regime detector. Switch to strict process heterogeneity, where the intercept is dropped and every regime's slope vector is normalised, and the outcome map goes quiet while the regimes underneath are completely unchanged.

The outcome you can mapY(s)
The regimes you are afterground truth · identical in both modes
Y low  high regimes 1  2  3
The mechanisms, pooled
X₁ against Y by regime. They differ in both modes — that is the point.
The outcome, pooled
What is left for a method that clusters Y alone.
Spread of regime means—
Largest pairwise KS statistic—
ARI from clustering on Y alone—

Under strict process the three distributions lie on top of one another and the ARI collapses, exactly as in Table A1 of the paper. The map on the right has not moved.

03 What we built

A benchmark that varies the ground truth, not just the method

Comparisons in this literature usually hold the data-generating process fixed and swap algorithms. We vary it as well: five axes of the generating process are crossed, so every method is scored under conditions that are known, controlled and reported — including the ones designed to defeat it.

Process type
linearhybridnonlinear
Heterogeneity
mixedstrict process
Regime geometry
rectangularVoronoiarbitrary
Covariates
uniformnormal
Noise
10%20%30%
3 × 2 × 3 × 2 × 3 =108conditions →396scenarios × 9 methods →3,564runs

Each run is scored on partition accuracy (ARI, NMI), on fit inside the recovered regimes, and on how badly a regime's model transfers to the others.

rectangularground-truth regimes, K = 5

Four ways to model spatial heterogeneity — and the cell nobody had filled

This is the axis the opening panel was about. Methods sort along two questions: is the local relationship between X and Y assumed linear or allowed to be nonlinear, and is heterogeneity represented as a continuous surface or as discrete regimes? The continuous column is crowded — GWR, MGWR and attribution maps all live there — and the discrete column, where a method has to commit to a boundary, is not. Of its two cells only the linear one was occupied. The fourth is what this paper is about.

continuous → discrete
continuous · linear

Geographically weighted regression

GWR and MGWR let a linear coefficient drift smoothly over space. No boundaries, no mechanism beyond a local linear slope.

continuous · nonlinear

Attribution surfaces

SHAP and GeoShapley maps from a nonlinear learner. Rich and local, but they describe every location separately rather than delimiting zones.

discrete · linear

Regression-coupled regionalization

2KModel and SKATER-Reg carve contiguous regions whose internal linear regressions differ. Clean boundaries, linear mechanisms only.

discrete · nonlinear

XAI-driven regime detection — this paper

Cluster a nonlinear attribution surface instead of the raw data, and the discretisation of regionalization meets a mechanism that need not be linear.

linear → nonlinear

Columns: the functional form assumed for the local relationship. Rows: whether heterogeneity is represented as a continuous surface or as discrete regimes.

The XAI-driven family, in five steps

The idea is one substitution. Regionalization clusters observations by their regression coefficients; we cluster them by their attribution vectors — what a nonlinear model says each covariate contributed at that location. The framework is attribution-method agnostic; SHAP is the instance used here.

01

Covariates and coordinates

X, the location, and the outcome Y at every observation.

02

A nonlinear learner

A gradient-boosted ensemble fits Y without being told the regimes.

03

Per-location attributions

SHAP returns, for every observation, one contribution per covariate.

04

Cluster the attributions

Locations whose covariates act alike fall together, wherever they are.

05

Regimes on the map

Contiguous zones, each with its own nonlinear mechanism.

Three members are benchmarked here: SHAP-KMeans (cluster the attribution vectors directly), 2KModel+SHAP (attribution-seeded micro-clusters, then contiguity merging) and SHAP-RecSplit (error-driven recursive bisection).

04 What we found

No single winner. A division of labor.

Across all 3,564 runs SHAP-KMeans leads on ARI and SKATER-Reg is the strongest classical method — but the aggregate hides the finding. Which family wins is decided by the process type: regression-coupled regionalization reads a linear mechanism directly off its own criterion, and attribution clustering takes over as soon as the mechanism stops being linear. Each cell below is one condition; pick one, then narrow the conditioning axes and watch how stable the ranking is.

Ranking in the selected condition
Adjusted Rand Index, five main methods.
XAI-driven Regression-coupled Attribute-based
The crossover, in one chart
ARI against process type, for the leader of each family.

Solid lines: mixed heterogeneity. Dashed: strict process. The gap between the two is the part of a method's score that comes from outcome level rather than mechanism — which is why SKATER-Reg barely moves and the outcome-driven baselines collapse.

05 Ranking explorer

All nine algorithms, one metric at a time

Mean over the conditions selected above.

06 Cross-regime transferability

A validity signal that needs no ground truth

On real data nobody hands you the true regimes, so a partition cannot be scored against them. This is the substitute: train inside one regime and predict in another. If the partition separates genuinely different mechanisms, that transfer should fail — a strongly negative cross-region R² is evidence of real process boundaries, not a defect. Values are truncated at −10.

07 The field

Nine algorithms, three families

08 Data & code

Everything here is reproducible

The figures in the paper and the numbers on this page come from one aggregated benchmark table, produced by the simulation code in the repository and redrawn by a single script.

Cite the paper

Chen, C., Luo, P., & Meng, L. (2026). Modeling Nonlinear Spatial Regimes: A Systematic Benchmark of Classical and XAI-Driven Approaches. International Journal of Geographical Information Science.