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

arXiv: https://arxiv.org/abs/2406.15658 · HTML: https://mlsanity.com/paper/2406.15658/

## Key facts

- Cited by 31 papers in the map (data through 14 Oct 2026).
- Builds on 48 of its 100 references that are in the map.
- First posted on arXiv 21 Jun 2024.

## Builds on (most cited first, 30 of 48)

- [On the Opportunities and Risks of Foundation Models](https://mlsanity.com/paper/2108.07258/) (2021)
- [Optuna: A Next-generation Hyperparameter Optimization Framework](https://mlsanity.com/paper/1907.10902/) (2019)
- [Fast Graph Representation Learning with PyTorch Geometric](https://mlsanity.com/paper/1903.02428/) (2019)
- [VoxelNet: End-to-End Learning for Point Cloud Based 3D Object Detection](https://mlsanity.com/paper/1711.06396/) (2017)
- [SatMAE: Pre-training Transformers for Temporal and Multi-Spectral Satellite Imagery](https://mlsanity.com/paper/2207.08051/) (2022)
- [Functional Map of the World](https://mlsanity.com/paper/1711.07846/) (2017)
- [A Neural Representation of Sketch Drawings](https://mlsanity.com/paper/1704.03477/) (2017)
- [VoxelNeXt: Fully Sparse VoxelNet for 3D Object Detection and Tracking](https://mlsanity.com/paper/2303.11301/) (2023)
- [Geography-Aware Self-Supervised Learning](https://mlsanity.com/paper/2011.09980/) (2020)
- [GeoCLIP: Clip-Inspired Alignment between Locations and Images for Effective Worldwide Geo-localization](https://mlsanity.com/paper/2309.16020/) (2023)
- [SatCLIP: Global, General-Purpose Location Embeddings with Satellite Imagery](https://mlsanity.com/paper/2311.17179/) (2023)
- [GEO-Bench: Toward Foundation Models for Earth Monitoring](https://mlsanity.com/paper/2306.03831/) (2023)
- [Efficient Interactive Annotation of Segmentation Datasets with Polygon-RNN++](https://mlsanity.com/paper/1803.09693/) (2018)
- [Presence-Only Geographical Priors for Fine-Grained Image Classification](https://mlsanity.com/paper/1906.05272/) (2019)
- [Large Language Models are Geographically Biased](https://mlsanity.com/paper/2402.02680/) (2024)
- [PolyTransform: Deep Polygon Transformer for Instance Segmentation](https://mlsanity.com/paper/1912.02801/) (2019)
- [Multi-Scale Representation Learning for Spatial Feature Distributions using Grid Cells](https://mlsanity.com/paper/2003.00824/) (2020)
- [Annotating Object Instances with a Polygon-RNN](https://mlsanity.com/paper/1704.05548/) (2017)
- [A Generalizable and Accessible Approach to Machine Learning with Global Satellite Imagery](https://mlsanity.com/paper/2010.08168/) (2020)
- [TorchAudio: Building Blocks for Audio and Speech Processing](https://mlsanity.com/paper/2110.15018/) (2021)
- [TorchGeo: Deep Learning With Geospatial Data](https://mlsanity.com/paper/2111.08872/) (2021)
- [CSP: Self-Supervised Contrastive Spatial Pre-Training for Geospatial-Visual Representations](https://mlsanity.com/paper/2305.01118/) (2023)
- [GeoLLM: Extracting Geospatial Knowledge from Large Language Models](https://mlsanity.com/paper/2310.06213/) (2023)
- [Geographic Location Encoding with Spherical Harmonics and Sinusoidal Representation Networks](https://mlsanity.com/paper/2310.06743/) (2023)
- [Spatial Implicit Neural Representations for Global-Scale Species Mapping](https://mlsanity.com/paper/2306.02564/) (2023)
- [LSTM-TrajGAN: A Deep Learning Approach to Trajectory Privacy Protection](https://mlsanity.com/paper/2006.10521/) (2020)
- [Reconstructing continuous distributions of 3D protein structure from cryo-EM images](https://mlsanity.com/paper/1909.05215/) (2019)
- [A Review of Location Encoding for GeoAI: Methods and Applications](https://mlsanity.com/paper/2111.04006/) (2021)
- [SustainBench: Benchmarks for Monitoring the Sustainable Development Goals with Machine Learning](https://mlsanity.com/paper/2111.04724/) (2021)
- [Connecting the Dots: Floorplan Reconstruction Using Two-Level Queries](https://mlsanity.com/paper/2211.15658/) (2022)

## Built on by (most cited first, 30 of 31)

- [Spatial-RAG: Spatial Retrieval Augmented Generation for Real-World Geospatial Reasoning Questions](https://mlsanity.com/paper/2502.18470/) (2025)
- [A Survey of Large Language Model-Powered Spatial Intelligence Across Scales: Advances in Embodied Agents, Smart Cities, and Earth Science](https://mlsanity.com/paper/2504.09848/) (2025)
- [GAIR: Location-Aware Self-Supervised Contrastive Pre-Training with Geo-Aligned Implicit Representations](https://mlsanity.com/paper/2503.16683/) (2025)
- [Measuring the Intrinsic Dimension of Earth Representations](https://mlsanity.com/paper/2511.02101/) (2025)
- [REO-VLM: Transforming VLM to Meet Regression Challenges in Earth Observation](https://mlsanity.com/paper/2412.16583/) (2024)
- [LocDiff: Identifying Locations on Earth by Diffusing in the Hilbert Space](https://mlsanity.com/paper/2503.18142/) (2025)
- [Whose Truth? Pluralistic Geo-Alignment for (Agentic) AI](https://mlsanity.com/paper/2508.05432/) (2025)
- [CITYREP: A Unified Benchmark for Urban Representations Across Cities, Tasks, and Modalities](https://mlsanity.com/paper/2605.26036/) (2026)
- [Generating Binary Species Range Maps](https://mlsanity.com/paper/2408.15956/) (2024)
- [S2Vec: Self-Supervised Geospatial Embeddings for the Built Environment](https://mlsanity.com/paper/2504.16942/) (2025)
- [MoRA: Mobility as the Backbone for Geospatial Representation Learning at Scale](https://mlsanity.com/paper/2506.01297/) (2025)
- [GeoBS: Information-Theoretic Quantification of Geographic Bias in AI Models](https://mlsanity.com/paper/2509.23482/) (2025)
- [OBSR: Open Benchmark for Spatial Representations](https://mlsanity.com/paper/2510.05879/) (2025)
- [Localized, High-resolution Geographic Representations with Slepian Functions](https://mlsanity.com/paper/2602.00392/) (2026)
- [GeoConformal prediction: a model-agnostic framework of measuring the uncertainty of spatial prediction](https://mlsanity.com/paper/2412.08661/) (2024)
- [SLED: Scalable Location Encoding via Distillation](https://mlsanity.com/paper/2608.06612/) (2026)
- [Latent Domain Modeling Improves Robustness to Geographic Shifts](https://mlsanity.com/paper/2503.02036/) (2025)
- [ZooplanktonBench: A Geo-Aware Zooplankton Recognition and Classification Dataset from Marine Observations](https://mlsanity.com/paper/2505.18477/) (2025)
- [Towards Unified Vision Language Models for Forest Ecological Analysis in Earth Observation](https://mlsanity.com/paper/2511.16853/) (2025)
- [A Proxy Consistency Loss for Grounded Fusion of Earth Observation and Location Encoders](https://mlsanity.com/paper/2604.18881/) (2026)
- [CoST: Semantic-Aware Urban Understanding via Spatial-Temporal Alignment](https://mlsanity.com/paper/2608.21041/) (2026)
- [A Unified Framework for Next-Gen Urban Forecasting via LLM-driven Dependency Retrieval and GeoTransformer](https://mlsanity.com/paper/2408.08852/) (2024)
- [Efficient Mixture of Geographical Species for On Device Wildlife Monitoring](https://mlsanity.com/paper/2504.08620/) (2025)
- [Geospatial Foundational Embedder: Top-1 Winning Solution on EarthVision Embed2Scale Challenge (CVPR 2025)](https://mlsanity.com/paper/2509.06993/) (2025)
- [Geography According to ChatGPT -- How Generative AI Represents and Reasons about Geography](https://mlsanity.com/paper/2603.18881/) (2026)
- [Geographic Bias and Diversity in AI Evaluation](https://mlsanity.com/paper/2606.05187/) (2026)
- [Textual Supervision Enhances Geospatial Representations in Vision-Language Models](https://mlsanity.com/paper/2606.07172/) (2026)
- [Do Location Encoders Capture Spatial Effects? A GeoShapley Benchmark Across Scales](https://mlsanity.com/paper/2606.23453/) (2026)
- [MABLE: Masked Autoencoding with Bi-Lipschitz Decoding for Embeddings and Graph Metric Learning](https://mlsanity.com/paper/2607.02990/) (2026)
- [MIND the Gap: A Geographic Implicit Neural Representation with Adjustable Spatial Scale](https://mlsanity.com/paper/2609.25454/) (2026)

## Abstract (arXiv)

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.
