Introduction
In fields like computer vision and natural language processing, universal representations such as CLIP or BERT have become standard tools. However, the geospatial domain lacks a similar, easily accessible standard. Existing geolocation models often face high data costs, requiring expensive inputs like street-level imagery or private mobility data, and suffer from limited coverage, failing to generalize across different regions or tasks.
LLMGeovec addresses these challenges by transforming geographic coordinates into rich semantic embeddings. It leverages OpenStreetMap (OSM) data combined with the latent world knowledge of Large Language Models (LLMs). As a "generic enhancer," it boosts performance across geographic prediction and spatio-temporal forecasting, allowing simple linear models to often outperform complex, specialized architectures.
The LLMGeovec Framework
The researchers introduced a two-phase, training-free pipeline to extract geolocation representations:
- Prompt Generation: For any coordinate, the system uses OSM tools (Nominatim and Overpass API) to retrieve a hierarchical address and the ten nearest points of interest (POIs). This information is formatted into a structured text prompt.
- Text Embedding: This prompt is fed into a pre-trained LLM (e.g., LLaMA-3 8B or Mistral-8x7B). The hidden states from the LLM’s last layer are averaged to create a fixed-length "geolocation representation" vector.
To integrate these embeddings into downstream tasks, a simple MLP Adapter aligns the LLM’s high-dimensional vector with the target model's features. Crucially, the LLM remains frozen; only the small adapter is trained.
Benchmarking and Datasets
LLMGeovec was evaluated across three distinct spatio-temporal domains:
- Geographic Prediction (GP): A multi-scale benchmark with 14 global tasks (climate, population density), country-level data (India), and city-level data (NYC crime and income).
- Long-Term Time Series Forecasting (LTSF): Six datasets covering solar energy, wind, temperature, traffic, and air quality.
- Graph-based Spatio-Temporal Forecasting (GSTF): Benchmarks including the LargeST traffic flow benchmark and the LaDe last-mile delivery dataset.
Key Insights: Semantics and Generalization
A core insight of this work is that LLMs learn linear representations of space and time during pre-training. By providing a text description, we "unlock" this internal map. While traditional Spatio-Temporal Graph Neural Networks (STGNNs) focus on structural connections, LLMGeovec provides semantic context—knowing a location is a "Financial District" vs. a "Residential Park" is highly predictive.
Furthermore, LLMGeovec demonstrates remarkable zero-shot generalization. Unlike learnable embeddings that overfit to a specific city, these universal representations perform well when training on one city and testing on another, capturing the underlying semantics of the environment rather than just local structural patterns.
Quantitative Results
LLMGeovec achieved state-of-the-art results across all scales. In national-level tasks, it outperformed image-based models like MapillaryGCN by 0.07 to 0.10 in $R^2$ score.
As shown in the table above, adding LLMGeovec to existing models like iTransformer or TSMixer significantly improved Mean Squared Error (MSE). For instance, wind forecasting improved by 13.3% on average, while traffic forecasting saw a 22% improvement. In graph-based tasks, enhancements to models like DCRNN and ASTGCN reached approximately 8%.
Conclusion and Future Directions
LLMGeovec proves that complex spatial algorithms are not always the answer; often, models simply need a better sense of "where" they are in the world. While the current implementation depends on the quality of OpenStreetMap data, future work could explore larger LLMs (70B+) for even richer representations or apply these embeddings to tasks like spatio-temporal imputation and generative modeling.
Summary updated