CityFM: City Foundation Models to Solve Urban Challenges

Pasquale Balsebre, Weiming Huang, Gao Cong, Yi Li · OpenReview

Abstract

Pre-trained Foundation Models (PFMs) have revolutionized AI by learning general-purpose representations for a wide range of tasks. However, their application to geospatial data remains limited due to the inherent heterogeneity of urban entities—encompassing points, segments, and regions—and their multimodal nature (spatial, visual, and textual). We present CityFM, a self-supervised framework that trains foundation models using open data from OpenStreetMap (OSM). CityFM produces multimodal representations that incorporate spatial, visual, and textual information. Our evaluation across road, building, and region-level tasks demonstrates that CityFM achieves performance superior to, or on par with, specialized state-of-the-art baselines.

Introduction: The Challenge of Urban Heterogeneity

Geospatial data is notoriously difficult to model. Unlike the standardized grids of images or the sequential nature of text, urban data consists of diverse geometries: points (shops), polylines (roads), and polygons (buildings). Furthermore, these entities are multimodal; they possess geographic coordinates, geometric shapes, and sparse, often inconsistent, textual annotations.

Traditionally, urban challenges have been addressed with task-specific models—one for traffic prediction, another for land-use classification. These "one-trick pony" models require extensive labeled data and fail to capture the shared underlying structure of the city. CityFM addresses this by learning a general-purpose "language of the city" from unlabeled OSM data through self-supervised learning.

Methodology: Multi-Objective Self-Supervised Learning

CityFM employs a self-supervised strategy based on mutual information maximization. It learns by aligning different views of the same urban data through three primary contrastive objectives:

  1. Text-based Contrastive Objective: Using a pre-trained BERT model, CityFM learns that entities within the same spatial context (e.g., a cluster of shops in a commercial district) should have similar embeddings, effectively capturing the functional "vibe" of a neighborhood.
  2. Vision-Language Multimodal Objective: Approximately 80% of buildings in OSM lack functional tags. CityFM uses a ResNet-18 backbone to encode the shape and size of buildings. By aligning these visual features with textual tags during training, the model learns to infer function from form (e.g., identifying a stadium or a house based on its geometry).
  3. Road-based Contrastive Objective: The model leverages OSM "Relations" (such as bus routes) to understand road hierarchy. By identifying arterial roads that support high-frequency transit, the model distinguishes major transportation hubs from local streets.
The CityFM framework uses contrastive learning to maximize similarity between related urban entities across different modalities.

Qualitative Insights: Form Follows Function

A key strength of CityFM is its ability to bridge the gap between visual geometry and semantic meaning. As shown in the building analysis, the model successfully correlates specific geometric features (shape and surface area) with functional categories like "house," "church," or "theatre."

Qualitative analysis of building representations showing how the model aligns geometric shape and size with functional tags.

Experimental Results

CityFM was pre-trained on data from Singapore, New York City, and Seattle, and evaluated on several downstream tasks:

  • Traffic Speed Inference: In NYC, CityFM achieved a Mean Absolute Error (MAE) of 3.2 mph, outperforming the best baseline (IRN2Vec at 3.78 mph).
  • Building Classification: In Singapore, the model reached 91.93% accuracy in classifying building types, proving the effectiveness of its multimodal approach.
  • Population Density Estimation: The model's representations showed a high correlation with actual census data, achieving an $R^2$ of 0.82 in Singapore.

Conclusion

CityFM demonstrates that foundation models can be successfully applied to the complex, multimodal domain of urban planning and geospatial analysis. By leveraging the vast, unlabeled repository of OpenStreetMap, CityFM provides a versatile backbone for solving diverse urban challenges without the need for massive task-specific labeled datasets. Future work will focus on scaling these models globally and incorporating dynamic, real-time data sources.

Summary updated

BibTeX
@inproceedings{balsebre2024cityfm,
  author = {Pasquale Balsebre and Weiming Huang and Gao Cong and Yi Li},
  title = {{CityFM: City Foundation Models to Solve Urban Challenges}},
  booktitle = {ACM International Conference on Information and Knowledge Management},
  year = {2024},
  doi = {10.1145/3627673.3679662},
}
Figure