Spatial Language Representation with Multi-Level Geocoding

Sayali Kulkarni, Shailee Jain, Mohammad Javad Hosseini, Jason Baldridge, Eugene Ie, Li ZhangarXiv 2020

Abstract

We present a multi-level geocoding model (MLG) that learns to associate texts to geographic locations. The Earth's surface is represented using space-filling curves that decompose the sphere into a hierarchy of similarly sized, non-overlapping cells. MLG balances generalization and accuracy by combining losses across multiple levels and predicting cells at each level simultaneously. Without using any dataset-specific tuning, we show that MLG obtains state-of-the-art results for toponym resolution on three English datasets. Furthermore, it obtains large gains without any knowledge base metadata, demonstrating that it can effectively learn the connection between text spans and coordinates—and thus can be extended to toponyms not present in knowledge bases.

Introduction

Geocoding—the task of resolving a location reference in text (like "Springfield") to a specific point on Earth—is a fundamental challenge in Natural Language Processing. The primary hurdle is ambiguity; for instance, there are dozens of cities named Springfield globally. Traditional systems rely heavily on toponym resolution, mapping text spans to entries in a "gazetteer" (a geographic dictionary). These systems often employ heuristics like "population bias," assuming a user refers to the most populous version of a city.

However, this approach has significant limitations. It fails for non-standard references (e.g., historical sites or specific landmarks), low-resource domains where gazetteer metadata is sparse, and social media contexts where models may over-index on urban centers. To address these issues, we propose a "text-to-location" model that learns the relationship between language and geography directly, without being tethered to a static database.

The Multi-Level Geocoding Approach

The Multi-Level Geocoder (MLG) introduces a novel way to represent the Earth and learn spatial associations at multiple scales.

S2 Geometry and Hierarchical Representation

Instead of a flat grid of latitude and longitude, which distorts areas near the poles, MLG utilizes the S2 library. S2 projects the Earth onto a cube and recursively divides it into a hierarchy of cells. The model specifically targets levels 4 through 8, where Level 4 covers approximately 300,000 $km^2$ and Level 8 covers roughly 1,000 $km^2$.

Overview of the Multi-Level Geocoding framework, showing the mapping from text to hierarchical S2 cells.

Model Architecture

The MLG architecture is a multi-headed Convolutional Neural Network (CNN). It processes three distinct inputs: the target toponym, other toponyms in the context, and the surrounding context words. These inputs are encoded via 1D convolutions and global max-pooling before being concatenated.

Detailed neural architecture of the MLG model, highlighting the multi-headed output for joint loss calculation across different S2 levels.

The "secret sauce" of MLG is the Joint Multi-Level Loss. Rather than predicting only the finest-grained cell, the model features multiple output heads (e.g., for L5, L6, and L7). It calculates a cross-entropy loss for each level and minimizes their sum. This joint optimization forces the model to balance regional generalization with pinpoint accuracy. During inference, the final score for a cell is calculated as the product of its own probability and the probabilities of its parent cells in the hierarchy.

Experimental Results

We trained MLG on a massive slice of English Wikipedia (1.11M pages) and evaluated it on three standard benchmarks: WikToR (highly ambiguous Wikipedia data), LGL (local news), and GeoVirus (global disease reports). Notably, the authors unified these datasets by correcting significant coordinate inconsistencies and "sign-flip" errors found in original versions.

Performance and Insights

  • State-of-the-Art Performance: MLG outperformed the previous benchmark, CamCoder, across all datasets. On the WikToR dataset in a gazetteer-free setting, MLG achieved 91% accuracy within 161km, a significant jump from CamCoder's 70%.
  • Hierarchy as Regularization: Training on multiple levels simultaneously prevents overfitting to specific coordinates. Coarser levels provide a "safety net" for regional linguistic patterns, while finer levels capture local context.
  • Gazetteer-Free Strength: MLG shows a 9% performance gap over previous single-level models when no external metadata is used. This suggests the model is truly learning "spatial language"—the way we describe locations—rather than just memorizing a list of cities.
  • Disambiguation Success: Qualitatively, the model successfully disambiguates locations like "Arlington" (England) vs. "Arlington" (Oregon) based purely on surrounding context (e.g., mentions of "Devon" vs. "Gilliam County").

Conclusion and Future Work

MLG demonstrates that hierarchical geocoding can significantly improve toponym resolution without relying on external gazetteers. Future work will explore representing locations as polygons rather than points to better capture features like rivers or countries. Additionally, implementing hierarchical softmax could improve computational efficiency, and incorporating spatial smoothing might further refine prediction accuracy by rewarding "near-miss" predictions.

Summary updated

BibTeX
@misc{kulkarni2020spatial,
  author = {Sayali Kulkarni and Shailee Jain and Mohammad Javad Hosseini and Jason Baldridge and Eugene Ie and Li Zhang},
  title = {{Spatial Language Representation with Multi-Level Geocoding}},
  year = {2020},
  eprint = {2008.09236},
  archivePrefix = {arXiv},
  url = {https://arxiv.org/abs/2008.09236},
}
Figure