Understanding the Geospatial Reasoning Capabilities of LLMs: A Trajectory Recovery Perspective

Thinh Hung Truong, Jey Han Lau, Jianzhong QiSubmission to ICLR 2026 · Withdrawn

TL;DR

Can Large Language Models "read" road maps and navigate without relying on external routing engines? This paper introduces GLOBALTRACE, a benchmark of over 4,000 real-world trajectories across eight travel modes, and shows that prompting frontier LLMs with compact topological graphs enables zero-shot trajectory recovery that rivals Google Maps and crushes specialized trajectory models.

What Problem Does This Paper Address?

While prior research has evaluated whether LLMs can recall geographical facts or answer multiple-choice map questions, their ability to parse road networks and plan geometric paths has remained largely untested.

Standard trajectory recovery usually tackles "point-wise" reconstruction (predicting single missing points) or "map-matching" (snapping noisy GPS traces to roads). In contrast, this paper investigates masked trajectory reconstruction: recovering long, contiguous withheld segments (hundreds to thousands of meters) across varied transportation modes (driving, walking, cycling, etc.). A model must understand motion context (heading, speed, travel mode), follow one-way and connectivity constraints, and emit valid coordinates adhering to real-world road geometries—all without an off-the-shelf navigation API.

Methods

Feeding raw geographic coordinates or giant OpenStreetMap JSON dumps quickly overwhelms LLMs with token bloat and unorganized data. To resolve this, the authors develop a two-stage, schema-constrained prompting pipeline:

  1. Stage 1 (Path Selection): The LLM receives start and end coordinates, movement narratives (prior speed and heading), and a localized road network bounding the gap. Instead of raw coordinates, the map is represented as a compact adjacency graph annotated with road IDs, types, and precomputed cardinal directions. The LLM outputs an explicit, step-by-step route across connected road and intersection IDs.
  2. Stage 2 (Coordinate Generation): The model iteratively grounds the planned steps against actual road geometries, generating an ordered sequence of coordinates that adheres strictly to the travel direction.

To evaluate recovery fairly across differing coordinate densities, the authors propose Point-on-Trajectory (PoT): a point-to-segment metric measuring the percentage of ground-truth points falling within a tolerance threshold ($\tau = 10\text{ m}$) of the reconstructed polyline, paired with its harmonic mean ($PoT_{F1}$).

[Masked Trajectory + Context] 
        │
        ▼
[Stage 1: LLM Path Selection] ──► Selects valid road & intersection IDs
        │
        ▼
[Stage 2: Coordinate Generation] ──► Grounds path to road geometry coordinates

Datasets

The authors introduce GLOBALTRACE, derived from public OpenStreetMap user traces collected from 2024 onward to avoid pre-training data contamination:

  • Scale & Diversity: 4,095 real-world trajectories spanning 72 regions/cities across all inhabited continents.
  • 8 Activity Modes: Hiking, driving, walking, cycling, bus, train, boat, and flying.
  • Two Gap Regimes: Small gaps (mean 0.3 km) and large gaps (mean 1.8 km).
  • Partitions: 2,930 train, 596 dev, and 569 test trajectories (with zero geographic overlap between train/dev and test sets).

Key Insights and Ideas

  • Topology Beats Raw Geometry: Ablation studies showed that stripping raw coordinate clutter down to clean topology annotated with directional bearings cut prompt length from ~26k to ~10.7k tokens while boosting $PoT_{F1}$ from 42.3% to 58.7%.
  • Zero-Shot LLMs Beat In-Domain Trajectory Models: General-purpose LLMs drastically outperformed TrajFM (a Transformer foundation model pre-trained on vehicle trajectories). TrajFM failed to generalize to unseen geographic regions ($PoT_{F1}$ of 15.3% vs. 63.3% for GPT-4.1).
  • Near-Zero Hallucination in Map Reading: LLMs scored 97.8%–99.8% on road network adherence, meaning they almost never fabricated non-existent road or intersection IDs.
  • Geospatial & Mode Biases: Models performed up to 50% better in the Global North (Europe, North America) than the Global South (Africa, Middle East, South America). Additionally, structured, rule-bound modes (driving, cycling, bus) had much higher recovery rates than free-form movement (hiking, walking, boats).
  • Preference-Aware Routing: Unlike traditional shortest-path routing, LLMs naturally combine internal world knowledge with subjective user constraints (e.g., routing an "urban foodie" through Melbourne's historic, café-lined Hardware Lane, despite it not being explicitly tagged as a food POI in the prompt).

Key Results

  • Reconstruction Accuracy (Test Set): GPT-4.1 achieved 63.3% $PoT_{F1}$ (overall), approaching Google Maps (65.0%) and beating traditional baselines like Linear+HMM (44.9%) and TrajFM (15.3%).
  • Path Validity: GPT-4.1 produced fully connected, valid paths across the road network for 76.2% of test samples.
  • Data Contamination Check: Evaluating performance on traces before vs. after each model's training cutoff showed no significant drop post-cutoff (GPT-4.1 improved slightly by +2.8%), confirming genuine reasoning over map context rather than rote memorization.

Limitations and Future Work

  • Imperfect Ground Truth: Real-world GPS traces are user-generated; human detours and GPS noise mean the true trajectory is not always the "optimal" or only valid path.
  • Precision vs. Recall Discrepancy: LLMs achieved high ground-truth coverage ($GT \to REC$) but lower precision ($REC \to GT$), frequently adding unnecessary spurs or loops onto side streets.
  • Scope: Trajectory recovery evaluates only a specific subset of broader geospatial and visual map reasoning capabilities.

Summary updated

Abstract

We explore the geospatial reasoning capabilities of Large Language Models (LLMs), specifically, whether LLMs can read road network maps and perform navigation. We frame trajectory recovery as a proxy task, which requires models to reconstruct masked GPS traces, and introduce GLOBALTRACE, a dataset with over 4,000 real-world trajectories across diverse regions and transportation modes. Using road network as context, our prompting framework enables LLMs to generate valid paths without accessing any external navigation tools. Experiments show that LLMs outperform off-the-shelf baselines and specialized trajectory recovery models, with strong zero-shot generalization. Fine-grained analysis shows that LLMs have strong comprehension of the road network and coordinate systems, but also pose systematic biases with respect to regions and transportation modes. Finally, we demonstrate how LLMs can enhance navigation experiences by reasoning over maps in flexible ways to incorporate user preferences.
BibTeX
@misc{truong2025understanding,
  author = {Thinh Hung Truong and Jey Han Lau and Jianzhong Qi},
  title = {{Understanding the Geospatial Reasoning Capabilities of LLMs: A Trajectory Recovery Perspective}},
  year = {2025},
  eprint = {2510.01639},
  archivePrefix = {arXiv},
  url = {https://arxiv.org/abs/2510.01639},
}
Figure