ReaGeo: The First End‑to‑End LLM Geocoding Framework Linking Precise Mapping and Spatial Correlation
ReaGeo, a novel end‑to‑end geocoding system built on the Qwen2.5‑3B large language model, converts address text directly into Geohash sequences using chain‑of‑thought reasoning and GRPO reinforcement learning, achieving an average error of 119.6 m and 97.2 % accuracy within 500 m on Beijing data, surpassing commercial APIs and academic baselines while also modeling broader spatial correlation for line‑ and area‑type queries.
Geocoding and Its Challenges
Geocoding transforms natural‑language location descriptions such as "No.10 Chengfu Road, Haidian District, Beijing" into latitude‑longitude coordinates, a core capability for digital maps, navigation, and spatial services. Traditional pipelines rely on a multi‑stage process: named‑entity recognition (NER) to split the address, followed by large geographic database retrieval and ranking. This approach breaks down when faced with colloquial, abbreviated, or dialectal inputs, causing a >15% drop in accuracy for non‑standard queries.
ReaGeo: End‑to‑End LLM Geocoding
ReaGeo replaces the entire pipeline with a single large language model (LLM) that directly generates Geohash strings from raw address text. The system uses the Qwen2.5‑3B model and encodes coordinates as a 9‑character Base32 Geohash (≈2.4 m precision). By treating the address as a text generation task, the model outputs a sequence of characters that can be progressively refined for higher spatial accuracy.
Training Procedure
Stage 1 – CoT‑enhanced Supervised Fine‑Tuning (SFT) : To handle vague phrases like "200 m south of XX intersection", ReaGeo injects chain‑of‑thought (CoT) reasoning. For each point‑of‑interest (POI) address, a neighboring reference address is used to compute a relative position, which is inserted as an intermediate reasoning step. The model is trained with special tags <thinking> and </thinking> to mark these steps. During inference the tags can be omitted to save compute.
Example input and output:
"Snow-covered courtyard <thinking>" → "100 meters south of the intersection of XX Road and XX Road, XX District </thinking> w x 4 e j 8 m d t"Stage 2 – GRPO Reinforcement Learning : Building on the SFT model, ReaGeo applies Group Relative Policy Optimization (GRPO) without a separate value network. Multiple candidate outputs are generated for the same input; a reward based on geographic distance guides policy updates. The reward function is: R = (T − √D(y_pred, y_true)) ⁄ S where T = 100, D(·) is the WGS‑84 ellipsoidal distance in meters, and S = 1000. Training data include synthetic offset descriptions (e.g., "XX intersection south 200 m") to strengthen directional reasoning.
Example input and output after GRPO:
"50 meters north of No.385 XX Road, XX Town, XX District, XX" → "w x 4 s f d v p y"Experimental Evaluation
The authors evaluated ReaGeo on 239,918 Beijing address samples (both urban and suburban), split into standard and offset scenarios, and compared against six baselines, including commercial APIs (Baidu Maps, Tencent Maps) and recent academic models. Key results:
Zero‑shot large models (e.g., Qwen3‑Max) achieve near‑zero Acc@100, confirming that geocoding requires task‑specific training.
Commercial APIs perform modestly on non‑standard queries.
ReaGeo attains an average deviation (ADD) of 119.6 m and 97.2 % Acc@500 on urban data; in the offset scenario it reaches 71.5 % Acc@200 versus 42.2 % for Baidu Maps.
Ablation Studies
Removing GRPO drops Acc@100 from 51.3 % to 40.6 %, highlighting the importance of reinforcement learning for fine‑grained spatial inference.
Removing CoT increases invalid outputs from 20 to 80, showing that chain‑of‑thought reasoning prevents hallucination.
The full ReaGeo pipeline yields the best performance, confirming that the combination of CoT and GRPO is essential.
Design Choices
Why Geohash instead of raw latitude‑longitude? Ablation shows Geohash output (ADD = 427.7 m, Acc@100 = 68.8 %) outperforms direct coordinate generation (ADD = 440.1 m, Acc@100 = 68.7 %). Geohash discretizes continuous space into a token sequence that aligns naturally with autoregressive LLM generation and enables progressive precision gains (each additional character improves accuracy roughly fourfold).
Generalization to Unseen Directional Terms
Tests on intercardinal directions (NE, SE, NW, SW) – never seen during training – still achieve ADD = 562.9 m and Acc@100 = 22.4 %, only modestly worse than basic directions (ADD = 524.8 m, Acc@100 = 32.6 %). This demonstrates true spatial reasoning rather than memorization.
Beyond Point Geocoding: Spatial Correlation
ReaGeo also predicts distributions for line‑type POIs (roads) and area‑type POIs (administrative districts). For roads, sampled points form a heatmap that follows the road geometry; for districts, the heatmap covers ~70 % of the area, concentrating on urban cores. This implicit probability distribution bridges precise geocoding and broader spatial correlation.
Search‑Engine Perspective
Spatial correlation can be described as the relationship between a query and geographic locations, encompassing both "where" intent (Geographical Anticipation) and distance sensitivity (Geographical Sensitivity). The authors illustrate how queries like "Nankai University" may refer to multiple campuses, requiring both textual relevance and spatial reasoning. Modeling this "where‑what" problem improves map search, especially for ambiguous or partially specified queries.
Practical Outlook
High‑definition map provider Gaode (Amap) is integrating ReaGeo into products such as traffic incident localization, intelligent destination recognition for logistics, and natural‑language map search, replacing complex pipelines with a single model. This demonstrates the commercial viability of the research.
Conclusion
ReaGeo reconstructs geocoding as an end‑to‑end text‑generation task, dramatically reducing reliance on handcrafted geographic knowledge bases while delivering high accuracy and robustness. By learning spatial relationships directly from language, it opens pathways toward conversational map interaction, natural‑language navigation, and intelligent logistics positioning.
Signed-in readers can open the original source through BestHub's protected redirect.
This article has been distilled and summarized from source material, then republished for learning and reference. If you believe it infringes your rights, please contactand we will review it promptly.
Amap Tech
Official Amap technology account showcasing all of Amap's technical innovations.
How this landed with the community
Was this worth your time?
0 Comments
Thoughtful readers leave field notes, pushback, and hard-won operational detail here.
