Do Location Encoders Capture Spatial Effects? A GeoShapley Benchmark Across Scales
2026-06-22 • Machine Learning
Machine Learning
AI summaryⓘ
The authors studied how well different methods convert locations (latitude and longitude) into complex data that computers can use to understand spatial patterns. They tested a tool called GeoShapley to see if it could explain how these methods capture known geographic effects at different scales, from small grids to global data. They found that the main spatial effect was generally well captured, but a secondary effect was harder to recover, especially at the global scale. They also noted that using raw coordinates without any complex encoding often performed comparably to more advanced methods.
Location encoderGeographic coordinatesHigh dimensional embeddingSpatial effectsGeoShapleyGame-theoretic explainerSpatial scaleContrastive trainingTorchSpatialSynthetic data
Authors
Daniel Kiv, Shaowen Wang
Abstract
Location encoders transform geographic coordinates into high dimensional embeddings for downstream machine learning, but it is unclear how well these representations capture interpretable spatial effects. We benchmark whether GeoShapley, a game-theoretic explainer that treats all location features as a single joint player, can recover spatially varying coefficients from models built on location-encoder embeddings. Eleven encoders from the TorchSpatial framework are evaluated against a synthetic process with known coefficients, across three scales (grid, county, global), with and without raw coordinates alongside the embedding, and under untrained and contrastively trained conditions. Measuring recovery as the correlation between estimated and true coefficients, we report how it varies with scale and encoder architecture and compare the embeddings against a raw-coordinate baseline. Recovery of the primary coefficient is consistently high across encoders, whereas recovery of a secondary coefficient is more scale-dependent, differing most at the global scale; the raw-coordinate baseline remains competitive throughout.