[Paper Review] TorchSpatial: A Location Encoding Framework and Benchmark for Spatial Representation Learning
TorchSpatial presents a unified framework (LocBench) for location encoders, benchmarks across geo-aware tasks, and a Geo-Bias Score to quantify geographic bias in spatial representation learning.
Spatial representation learning (SRL) aims at learning general-purpose neural network representations from various types of spatial data (e.g., points, polylines, polygons, networks, images, etc.) in their native formats. Learning good spatial representations is a fundamental problem for various downstream applications such as species distribution modeling, weather forecasting, trajectory generation, geographic question answering, etc. Even though SRL has become the foundation of almost all geospatial artificial intelligence (GeoAI) research, we have not yet seen significant efforts to develop an extensive deep learning framework and benchmark to support SRL model development and evaluation. To fill this gap, we propose TorchSpatial, a learning framework and benchmark for location (point) encoding, which is one of the most fundamental data types of spatial representation learning. TorchSpatial contains three key components: 1) a unified location encoding framework that consolidates 15 commonly recognized location encoders, ensuring scalability and reproducibility of the implementations; 2) the LocBench benchmark tasks encompassing 7 geo-aware image classification and 10 geo-aware image regression datasets; 3) a comprehensive suite of evaluation metrics to quantify geo-aware model's overall performance as well as their geographic bias, with a novel Geo-Bias Score metric. Finally, we provide a detailed analysis and insights into the model performance and geographic bias of different location encoders. We believe TorchSpatial will foster future advancement of spatial representation learning and spatial fairness in GeoAI research. The TorchSpatial model framework and LocBench benchmark are available at https://github.com/seai-lab/TorchSpatial, and the Geo-Bias Score evaluation framework is available at https://github.com/seai-lab/PyGBS.
Motivation & Objective
- Introduce a unified location encoding framework consolidating 15 encoders to enable scalable, reproducible SRL development.
- Provide LocBench: a benchmark suite with 7 geo-aware image classification and 4 geo-aware image regression datasets for systematic evaluation.
- Develop a universal Geo-Bias Score framework to quantify geographic bias in model performance across space.
- Analyze performance and geographic bias of different location encoders across diverse geographic coverage and dataset sizes.
Proposed method
- Define Enc(x) = NN(PE(x)) to formalize location encoders within a flexible framework.
- Implement 15 widely used 2D/3D location encoders inside the TorchSpatial framework.
- Assemble LocBench with 7 geo-aware image classification and 4 geo-aware image regression datasets.
- Develop Geo-Bias Scores based on spatial self-information (SSI) to quantify base and relative geographic bias at multiple spatial scales.
- Evaluate encoder impact on overall performance and geographic bias across datasets, reporting both metrics and bias analyses.

Experimental results
Research questions
- RQ1How do different location encoders affect overall model performance on geo-aware tasks?
- RQ2How does the choice of location encoder influence geographic bias in model predictions across space?
- RQ3Are geo-aware improvements consistent across diverse datasets and spatial scales?
- RQ4Can the Geo-Bias Score framework provide a universal measure of geographic bias for SRL models?
Key findings
- Adding location encoders generally boosts model performance across geo-aware tasks.
- Some encoders (e.g., Sphere2Vec variants) achieve state-of-the-art results on multiple datasets, while others have mixed effects on bias.
- Geo-Bias Scores reveal that most encoders increase geographic bias relative to a location-unaware baseline, with variations across datasets and scales.
- GPT-4V underperforms in fine-grained geo-aware image classification compared to fine-tuned models.
- The Geo-Bias framework captures base dataset bias and encoder-specific bias across multiple spatial scales (e.g., 100 km, 1000 km, nearest neighbors).
- Qualitative hot-spot analyses show geographic performance patterns are largely driven by dataset spatial distributions rather than encoder choice.

Read this paper
Open the full text in the Nubint reader and ask about any passage as you read.
Read this paper on NubintThis review was generated by AI from the original paper. Please check the paper before citing it.