Papers › TorchSpatial: A Location Encoding Framework and Benchmark for Spatial Representation Learning
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
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.
In Syntology View this paper on Syntology, its page in Syntology's graph. That page adds which of its functions are also present in other papers' code Syntology holds, with dates, and its dated run record as JSON and a README badge. It also lists the repositories linked to the paper, the abstract and the calls for agents.
Open this paper in Syntology's Atlas, the map of the papers in Syntology's graph and their citations.
For agents, on Syntology's MCP service (how to connect):
get_harvested_code_for_paper(arxiv_id="2406.15658")get_code(code_sha256="…")with a sample'scode_sha256from the list belowget_citation_path(paper_1="2406.15658", paper_2="…")with another paper's arXiv id or titleget_concepts_for_paper(arxiv_id="2406.15658")
Code
Syntology 22 code samples harvested from 2 repositories linked to this paper: 21 ran (of which 0 constructed an object rather than computing a result; 11 with no instrument failure: 2 honoured, 1 violated, 8 with no contract checked; 10 where Syntology's instrument failed) · 1 unverified. Where Syntology's instrument failed: 8 where our contract draft was wrong; 2 where the contract check could not run; failures of Syntology's instrument, not of the code.
By repository: official repository: 22 samples from 2 repositories, 21 ran (11 with no instrument failure; 10 where Syntology's instrument failed). The run record, sample by sample. “Ran” means executed on a synthesized input, not that the code is correct or reproduces the paper.
Levels written between 2026-09-22 and 2026-09-24 (UTC): the dates Syntology's graph wrote each sample's verification level, not when the code executed.
Repository list and official/mentioned flags are the archive's, frozen 2025-07-28. Reachability, where shown, is from one Syntology probe window (2026-09-16 to 2026-09-18); repositories not probed show nothing. GitHub stars are not tracked.
Code Syntology ran Syntology
22 samples harvested: 21 ran (of which 0 constructed an object rather than computing a result; 11 with no instrument failure: 2 honoured, 1 violated, 8 with no contract checked; 10 where Syntology's instrument failed) · 1 unverified. “Where Syntology's instrument failed” counts failures of Syntology's instrument, not of the code. Syntology's record for this page last changed ; when this build read Syntology's graph is in the build record. That date is not when the samples ran.
Licence: 4 of the 22 samples are pointer only, meaning Syntology does not serve that copy's text. For 4 of them, this paper's copy is under a permissive licence and cleared, but the stored copy of the same code that Syntology serves is not; the licence label's tooltip gives Syntology's recorded reason. This page shows no code text for any sample; each one links to its file in the repository.
Harvested from 2 repositories linked to this paper, official or community; the list below is grouped by repository, each group headed by its name and what it is to the paper. “Ran” means the sample executed on a synthesized input. It does not mean the output is correct, and nothing here reproduces the paper's results. A line beginning “fixture:” under a sample that ran gives the arguments Syntology's fixture called the sample with, each as name:type/rank/element kind (? where none was recorded), and the type of what the fixture's run returned, exactly as the harness recorded them; the arguments and the returned type were recorded by two separate runs of the same fixture. No output value is shown, and a returned type says nothing about whether the output was right. “Level recorded” gives the UTC date when Syntology's graph wrote the sample's verification level, not when the code executed; where the level was written before Syntology's graph kept that date, the row says “level recorded, date not recorded”. “Honoured” and “violated” refer to a contract Syntology drafted from the code itself. “Our draft was wrong” and “the contract check could not run” are failures of Syntology's instrument, not of the code: the sample ran on Syntology's synthesized input, and then the drafted contract did not describe it, or the check itself raised an error (RAISES), lacked a dependency (DEP_MISSING) or ran out of time (TIMEOUT); hover the label for which. A metamorphic tier, where shown, is evidence of the output's shape, not that the sample implements the method.
Each sample ends with its code_sha256. A sample's code_sha256 is Syntology's identity for that exact code. It is printed in full (16 hexadecimal characters for every sample in this build), and get_code(code_sha256="…") takes it exactly as printed. An agent calls it on Syntology's MCP service (how to connect); click an identity to copy that call.
Repository labels, per sample. official repository: The archive marks this repository official for the paper. named in the paper: The archive records that the paper mentions this repository; it is not marked official. community (archive-listed): In the archive's code links for this paper, not marked official and not recorded as mentioned in the paper. found in paper text by Syntology: Syntology found this repository in the paper's own text; whether it is the authors' implementation is not asserted. community: Not in the archive's code links for this paper; a community repository Syntology harvested. Samples are grouped by repository: a repository marked official first, then by how directly the repository is tied to the paper, then in the archive's order; never by how many ran. Licence labels name the repository's licence as recorded at harvest. “Pointer only” means Syntology does not serve that copy's text, for one of six reasons: no licence file was found; the licence was not identified; the licence is recorded as permissive but that copy's record is not marked cleared; the licence is outside the permissive list Syntology serves text under (MIT, Apache-2.0, BSD and similar); this paper's copy was not located, so its licence is not recorded; or this paper's copy is cleared, but the stored copy of the same code that Syntology serves is not. Some licences outside that list permit redistribution, such as WTFPL, and GPL-3.0 under its conditions; they are simply not on the list. Hover a licence label for the reason. File links open the file on GitHub at the default branch, which may have changed since the harvest.
A function or class name links to its page when the name occurs in the harvested code of at least 5 papers; the name is a string, not an identity.
ee66019898426cda · report
fixture: signature pred:Tensor/2/float · returned Tensor · level recorded 2026-09-24 eccb2504e6bf75c5 · report
fixture: signature locs:ndarray/2/float, d_mrr:ndarray/1/float, do_positive:bool/0/bool, num_interval:int/0/int, intervals:NoneType/0/? · returned tuple · level recorded 2026-09-22 f0c8a19e7f1331fe · report
fixture: signature locs:ndarray/2/float, d_mrr:ndarray/1/float, lat_intervals:ndarray/1/float, lon_intervals:ndarray/1/float · returned tuple · level recorded 2026-09-22 48bee5af4d1cdfec · report
fixture: signature train_classes:ndarray/1/int, num_classes:int/0/int, eval_loc:ndarray/1/float, nn_tree:BallTree/0/?, hyper_params:dict/0/?, ptype:str/0/str · returned ndarray · level recorded 2026-09-24 ec0ef856ad8a26b0 · report
fixture: signature train_classes:ndarray/1/int, train_locs:ndarray/2/float, hyper_params:dict/0/? · returned tuple · level recorded 2026-09-24 96cda1aea7b63917 · report
fixture: signature embed:Tensor/2/float, dim:int/0/int · returned Tensor · level recorded 2026-09-22 063ddd72ea995d8a · report
fixture: signature activation:str/0/str, context_str:str/0/str · returned ReLU · level recorded 2026-09-24 d456c5cf4caf5297 · report
fixture: signature loc_pred:ndarray/2/float, loc_class:ndarray/1/int · returned ndarray · level recorded 2026-09-22 fb680a92900a2a60 · report
fixture: signature train_sample_ratio:float/0/float, train_sample_method:str/0/str · returned str · level recorded 2026-09-24 28855eb94bf07f6e · report
fixture: signature loc:ndarray/1/float, q:int/0/int · returned tuple · level recorded 2026-09-24 65b7b5e57148522e · report
fixture: signature ip_dir:str/0/str, ann_file_name:str/0/str, split_name:str/0/str, remove_empty:bool/0/bool, meta_type:str/0/str · returned tuple · level recorded 2026-09-24 9d835b2cb9e2f146 · report
fixture: signature mask_dir:str/0/str, mask_filename:str/0/str · returned tuple · level recorded 2026-09-24 3cfd8e042f3a9170 · report
fixture: signature file_path:str/0/str, invert:bool/0/bool · returned ndarray · level recorded 2026-09-24 05bbcdadb7f81960 · report
fixture: signature eval_params:dict/0/? · returned str · level recorded 2026-09-24 d54c93139380fbe0 · report
fixture: signature data_dir:str/0/str, dataset:str/0/str, eval_split:str/0/str, res_type:str/0/str, sample_ratio:NoneType/0/? · returned str · level recorded 2026-09-24 89fc1fad0c9b5226 · report
fixture: signature params:dict/0/?, eval_params:dict/0/? · returned str · level recorded 2026-09-24 b6dbb6a8dbe80516 · report
fixture: signature mask_lines:ndarray/2/float, locs:ndarray/2/float, colors:str/0/str, cmap:str/0/str, intervals:ndarray/1/int, map_range:tuple/1/int, categories:ndarray/1/int, fig:NoneType/0/?, ax:NoneType/0/?, pt_size:int/0/int · returned tuple · level recorded 2026-09-22 757cdfd8757676b2 · report
fixture: signature radius:float/0/float, n_neighbors:int/0/int · returned int · level recorded 2026-09-24 ce1886c7a705a294 · report
fixture: signature local_values_list:list/1/ndarray, global_values:ndarray/1/float, bins:int/0/int, threshold:int/0/int, smooth:float/0/float · returned tuple · level recorded 2026-09-24 824c3511b683ed83 · report
fixture: signature points:ndarray/2/float, k:int/0/int · returned ndarray · level recorded 2026-09-24 b84f15b1635ddbda · report
fixture: signature center:ndarray/1/float, radius:float/0/float, density:float/0/float, n_points:NoneType/0/? · returned ndarray · level recorded 2026-09-24 Tasks
Results from the paper archive 2025-07-28
No leaderboard rows for this paper in the archive.
Report a problem or propose a change · a person checks every report against the paper or source before anything changes; decisions are listed on /corrections