Introduction
The application of machine learning in geospatial tasks is increasingly common but often relies on globally available covariates, such as satellite imagery, that can be expensive or lack predictive power for certain socio-economic indicators. GeoLLM is a novel method designed to unlock the vast, "hidden" geospatial knowledge stored within Large Language Models (LLMs). By augmenting coordinate-based queries with descriptive map data from OpenStreetMap, GeoLLM transforms raw latitudes and longitudes into rich textual context. This approach achieves a 70% performance boost over standard baselines, matching or even exceeding the accuracy of specialized satellite-based models for predicting socio-economic indicators like population density and asset wealth.
The Challenge of Geospatial ML
Traditional geospatial machine learning usually relies on two primary inputs: geographic coordinates or satellite imagery. Both have inherent limitations. Coordinates are abstract numbers that LLMs struggle to interpret without additional context. Satellite imagery, while powerful, is often expensive, computationally heavy, and limited in scope—a satellite can see the roof of a building, but it cannot "see" the economic activity, cultural significance, or specific infrastructure details that are frequently documented in the text-based internet corpora LLMs are trained on.
The authors set out to bridge this gap by asking: Can we leverage the "compressed" world knowledge in LLMs to predict socio-economic outcomes? The core challenge is that LLMs are notoriously poor at "understanding" a location if provided only with a pair of numbers like (40.76208, -73.98042).
The GeoLLM Framework
To extract geospatial knowledge effectively, the authors introduce GeoLLM, a framework that operates through a three-step process:
- Contextual Prompting: Instead of relying solely on coordinates, GeoLLM uses auxiliary data from OpenStreetMap (OSM) to build a descriptive prompt. This includes a reverse-geocoded address (ranging from neighborhood to country level) and a list of the nearest points of interest (POIs) within a specific radius (e.g., "0.7 km North: Columbus Circle").
- Task Formatting: Because LLMs handle text better than continuous numerical outputs, the authors convert regression tasks (like predicting income) into a classification format. They scale target values to a range of 0.0 to 9.9 and associate them with 100 discrete "bins."
- Fine-tuning: The researchers fine-tuned several models, including GPT-3.5, Llama 2 (7B), and RoBERTa, using these enriched prompts. For Llama 2, they utilized QLoRA to make fine-tuning computationally efficient.
Evaluation Datasets
The study evaluates GeoLLM across a diverse set of global and regional datasets to test its versatility:
- WorldPop: Global population density counts.
- DHS (SustainBench): Socio-economic indicators from 48 countries, including asset wealth, women’s education, sanitation index, and BMI.
- USCB (US Census Bureau): Regional data on population, mean income, and Hispanic-to-non-Hispanic ratios.
- Zillow: Home value indices across the United States.
Results and Insights
The experiments reveal that LLMs are essentially "latent geographers." They already contain massive amounts of spatial data and simply need the right textual context to unlock it.
- Overall Performance: GeoLLM demonstrated a 70% improvement in Pearson’s $r^2$ compared to baselines that used nearest-neighbor approaches or raw coordinate prompts. On specific tasks like the Zillow home value prediction, GPT-3.5 achieved an $r^2$ of 0.87, a remarkably high correlation for a text-based model.
- Remarkable Sample Efficiency: One of the most surprising findings was GeoLLM's performance in low-data regimes. Even with only 100 training samples, GPT-3.5 maintained high predictive power, significantly outperforming traditional ML models like XGBoost trained on the same small set.
- Scaling Matters: Performance improved significantly as model size increased. GPT-3.5 outperformed Llama 2 by 19% and RoBERTa by 51%, suggesting that as LLMs grow, their "internal map" of the world becomes more detailed.
- Global Robustness: Unlike many models that fail in the Global South due to a lack of high-resolution imagery, GeoLLM remained consistent across different continents. Its predictions were comparable to, and sometimes better than, models using "Nightlight" satellite data, proving that text-based knowledge can be as predictive as visual data from space.
Limitations and Future Directions
While highly effective, GeoLLM has some limitations. The authors noted a slight "performance bias" where the model was more accurate in densely populated or developed areas compared to sparsely populated ones, likely reflecting the density of information available on the internet. Furthermore, the model is sensitive to prompt quality; in very remote areas where OSM data is thin, performance may degrade.
For future work, the authors suggest incorporating multimodal data—combining text prompts with satellite images—or temporal data to allow the model to make forecasts about how a location might change over time. Ultimately, GeoLLM shows immense promise in mitigating the limitations of existing geospatial covariates and complementing them in future research.
Summary updated