Table of Contents
Fetching ...

TorchSpatial: A Location Encoding Framework and Benchmark for Spatial Representation Learning

Nemin Wu, Qian Cao, Zhangyu Wang, Zeping Liu, Yanlin Qi, Jielu Zhang, Joshua Ni, Xiaobai Yao, Hongxu Ma, Lan Mu, Stefano Ermon, Tanuja Ganu, Akshay Nambi, Ni Lao, Gengchen Mai

TL;DR

TorchSpatial introduces a unified framework for spatial representation learning (SRL) focused on location encoding, accompanied by LocBench, a benchmark with 7 geo-aware image classification and 10 geo-aware image regression datasets. It consolidates 15 location encoders and provides a universal Geo-Bias Score based on spatial self-information to quantify geographic bias across scales. Empirical results show that incorporating location encoders can substantially boost overall performance but may increase geographic bias depending on dataset geography, underscoring the need for bias-aware model development. The work provides open-source tooling and a roadmap to extend SRL to more spatial data types and tasks, promoting reproducibility and spatial fairness in GeoAI research.

Abstract

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.

TorchSpatial: A Location Encoding Framework and Benchmark for Spatial Representation Learning

TL;DR

TorchSpatial introduces a unified framework for spatial representation learning (SRL) focused on location encoding, accompanied by LocBench, a benchmark with 7 geo-aware image classification and 10 geo-aware image regression datasets. It consolidates 15 location encoders and provides a universal Geo-Bias Score based on spatial self-information to quantify geographic bias across scales. Empirical results show that incorporating location encoders can substantially boost overall performance but may increase geographic bias depending on dataset geography, underscoring the need for bias-aware model development. The work provides open-source tooling and a roadmap to extend SRL to more spatial data types and tasks, promoting reproducibility and spatial fairness in GeoAI research.

Abstract

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.
Paper Structure (29 sections, 2 equations, 7 figures, 6 tables, 1 algorithm)

This paper contains 29 sections, 2 equations, 7 figures, 6 tables, 1 algorithm.

Figures (7)

  • Figure 1: The overall framework of TorchSpatial. TorchSpatial provides a unified location encoding framework that consolidates 15 widely used location encoders and LocBench benchmark which contains 7 geo-aware image classification and 10 geo-aware image regression datasets. In addition, we provide a universally applicable geographic bias evaluation framework called Geo-Bias Score.
  • Figure 2: Intuition of the two geo-bias scores. Left: When we encounter a low-performance observation (red dot), we extract its neighborhood by radius $r$. Middle: Dots represent the observed locations and crosses are background grid points. Dots within the neighborhood demonstrate spatial patterns against the unobserved background. The SSI of such patterns is called the unmarked SSI geo-bias score. It reflects the intrinsic sampling geo-bias. Right: Green and red dots represent locations where the model achieves high performance and low performance respectively. The SSI of such patterns is called the marked SSI geo-bias score. It reflects the geo-bias of model performance, dependent both on where the data are observed and how the model performs at these locations.
  • Figure 3: The spatial distributions of 4 geo-aware image classification datasets: BirdSnap, BirdSnap$\dagger$, NABird$\dagger$, and YFCC.
  • Figure 4: The spatial distributions of 3 geo-aware image classification datasets: iNat2017, iNat2018, and fMoW.
  • Figure 5: The spatial distributions of 4 geo-aware image regression datasets: MOSAIKS series.
  • ...and 2 more figures