GeOT: A spatially explicit framework for evaluating spatio-temporal predictions

Nina Wiedemann, Théo Uscidda, Martin Raubal · DOI

Abstract

When predicting observations across space and time, the spatial layout of errors impacts a model's real-world utility. For instance, in bike sharing demand prediction, error patterns translate to relocation costs. However, commonly used error metrics in GeoAI evaluate predictions point-wise, neglecting effects such as spatial heterogeneity, autocorrelation, and the Modifiable Areal Unit Problem. We put forward Optimal Transport (OT) as a spatial evaluation metric and loss function. The proposed framework, called GeOT, assesses the performance of prediction models by quantifying the transport costs associated with their prediction errors. Through experiments on real and synthetic data, we demonstrate that 1) the spatial distribution of prediction errors relates to real-world costs in many applications, 2) OT captures these spatial costs more accurately than existing metrics, and 3) OT enhances comparability across spatial and temporal scales. Finally, we advocate for leveraging OT as a loss function in neural networks to improve the spatial accuracy of predictions. Experiments with bike sharing, charging station, and traffic datasets show that spatial costs are significantly reduced with only marginal changes to non-spatial error metrics. Thus, this approach not only offers a spatially explicit tool for model evaluation and selection, but also integrates spatial considerations into model training.

Introduction

In the field of Geographic AI (GeoAI), the mantra is "spatial is special." However, most predictive models are still evaluated using standard point-wise metrics like Mean Squared Error (MSE) or Mean Absolute Percentage Error (MAPE). These metrics treat every location as an independent data point, ignoring the spatial context of errors.

This leads to a major disconnect: if a weather model predicts a rainstorm 50km away from its actual location, it might receive the same MSE penalty as a model that predicts it only 5km away, provided the magnitude of the error is the same. In reality, the 50km error is far more costly for logistics and planning. Standard metrics ignore spatial autocorrelation, heterogeneity, and the "Modifiable Areal Unit Problem" (MAUP), where changing the scale of data aggregation changes the results. The GeOT framework bridges this gap by quantifying the effort required to "move" predicted mass to its true location.

Methodology

The core of GeOT is Optimal Transport (OT), specifically the Wasserstein distance (often called the Earth Mover’s Distance).

  1. Quantifying Spatial Cost: Instead of just looking at the difference in values at a single point, GeOT calculates the minimum cost to redistribute predicted values to match the ground truth. This cost is defined by a user-specified matrix, such as Euclidean distance, travel time, or CO2 emissions.
  2. Partial Optimal Transport: Standard OT requires the total "mass" (e.g., total number of bikes) to be equal in both distributions. Since predictions rarely sum up perfectly to the truth, GeOT uses Partial OT. By introducing "dummy points" to handle mass imbalance, the metric can penalize both spatial displacement and total magnitude errors.
  3. OT as a Loss Function: To move beyond just evaluation, GeOT implements a differentiable version of OT using Sinkhorn divergences. This allows neural networks to be trained specifically to minimize spatial costs during the learning process.
Comparison of standard point-wise metrics (MSE) versus the GeOT framework. While MSE treats locations independently, GeOT accounts for the relocation effort (spatial cost) required to align predictions with ground truth.

Applications and Datasets

The authors validated GeOT using both synthetic and real-world datasets across various domains where spatial error distribution is critical.

Overview of various GeoAI applications where GeOT can be applied to quantify spatial costs of prediction errors.

Key datasets included:

  • BIXI Bike Sharing (Montreal): Demand prediction for 458 stations. Errors here translate directly to the cost of truck-based bike relocation.
  • EV Charging Stations (France): Occupancy prediction for 83 stations, where errors represent "opportunity costs" for drivers seeking a charger.
  • PEMS Traffic Flow (California): Flow forecasting for 163 freeway sensors.
  • LBC Mortality Rates (USA): A spatial regression task predicting cancer mortality across 666 counties.

Key Insights and Results

Bridging Metrics and Statistics

GeOT demonstrates a strong empirical correlation ($r=0.98$) between OT error and Moran’s I, a classic measure of spatial autocorrelation. This means GeOT naturally captures the spatial patterns that GIScientists prioritize, but in a way that is integrated directly into the prediction error metric.

Solving the Scaling Problem

One of the most powerful features of GeOT is its ability to compare predictions across different spatial scales. Because it uses a cost matrix between locations, researchers can compare a model that predicts at a "cluster" level directly against point-level ground truth data, mitigating the effects of MAUP.

"Spatially Improved" Predictions

When used as a loss function, OT doesn't necessarily reduce the amount of error (MSE), but it changes the layout of the error. In the bike-sharing experiment, training a model with an OT-based loss function reduced the relocation cost from 161.5 km to 135.7 km—a significant operational saving—while the MSE only increased marginally (from 1.24 to 1.26).

Limitations and Future Work

While GeOT offers significant advantages, it introduces computational challenges. Calculating exact OT is expensive; even with the Sinkhorn approximation, training was about 40 times slower than using standard MSE. This may limit its immediate use on very large-scale datasets like high-resolution satellite imagery.

Additionally, the framework requires choosing a penalty parameter for mass imbalance and cannot directly handle negative values without scaling. Future directions include extending the framework to a unified spatio-temporal OT metric, allowing researchers to trade off "errors in time" (predicting a peak too late) against "errors in space" (predicting a peak in the wrong neighborhood).

Summary updated

Abstract

When predicting observations across space and time, the spatial layout of errors impacts a model's real-world utility. For instance, in bike sharing demand prediction, error patterns translate to relocation costs. However, commonly used error metrics in GeoAI evaluate predictions point-wise, neglecting effects such as spatial heterogeneity, autocorrelation, and the Modifiable Areal Unit Problem. We put forward Optimal Transport (OT) as a spatial evaluation metric and loss function. The proposed framework, called GeOT, assesses the performance of prediction models by quantifying the transport costs associated with their prediction errors. Through experiments on real and synthetic data, we demonstrate that 1) the spatial distribution of prediction errors relates to real-world costs in many applications, 2) OT captures these spatial costs more accurately than existing metrics, and 3) OT enhances comparability across spatial and temporal scales. Finally, we advocate for leveraging OT as a loss function in neural networks to improve the spatial accuracy of predictions. Experiments with bike sharing, charging station, and traffic datasets show that spatial costs are significantly reduced with only marginal changes to non-spatial error metrics. Thus, this approach not only offers a spatially explicit tool for model evaluation and selection, but also integrates spatial considerations into model training. All code is available at https://github.com/mie-lab/geospatialOT.
BibTeX
@article{wiedemann2025geot,
  author = {Nina Wiedemann and Théo Uscidda and Martin Raubal},
  title = {{GeOT: A spatially explicit framework for evaluating spatio-temporal predictions}},
  journal = {Int. J. Geogr. Inf. Sci.},
  year = {2025},
  doi = {10.1080/13658816.2025.2481101},
}
Figure