[Paper Review] CityGPT: Empowering Urban Spatial Cognition of Large Language Models
CityGPT introduces CityInstruction and a self-weighted fine-tuning (SWFT) method to imbue general LLMs with urban spatial knowledge, validated by CityEval benchmarks showing strong performance of smaller, city-tuned models against larger/proprietary baselines.
Large language models(LLMs), with their powerful language generation and reasoning capabilities, have already achieved notable success in many domains, e.g., math and code generation. However, they often fall short when tackling real-life geospatial tasks within urban environments. This limitation stems from a lack of physical world knowledge and relevant data during training. To address this gap, we propose extit{CityGPT}, a systematic framework designed to enhance LLMs' understanding of urban space and improve their ability to solve the related urban tasks by integrating a city-scale `world model' into the model. Firstly, we construct a diverse instruction tuning dataset, extit{CityInstruction}, for injecting urban knowledge into LLMs and effectively boosting their spatial reasoning capabilities. Using a combination of extit{CityInstruction} and open source general instruction data, we introduce a novel and easy-to-use self-weighted fine-tuning method ( extit{SWFT}) to train various LLMs (including ChatGLM3-6B, Llama3-8B, and Qwen2.5-7B) to enhance their urban spatial capabilities without compromising, or even improving, their general abilities. Finally, to validate the effectiveness of our proposed framework, we develop a comprehensive text-based spatial benchmark extit{CityEval} for evaluating the performance of LLMs across a wide range of urban scenarios and geospatial tasks. Extensive evaluation results demonstrate that smaller LLMs trained with extit{CityInstruction} by extit{SWFT} method can achieve performance that is competitive with, and in some cases superior to, proprietary LLMs when assessed using extit{CityEval}.
Motivation & Objective
- Motivate the need for urban-scale spatial understanding in LLMs due to gaps in offline city knowledge.
- Propose CityInstruction to inject urban knowledge and enable spatial reasoning in LLMs.
- Develop SWFT to weight-domain data during fine-tuning and preserve general capabilities.
- Create CityEval to comprehensively evaluate urban spatial understanding and task performance.
- Demonstrate that smaller LLMs trained with CityInstruction outperform baselines on CityEval.
Proposed method
- Construct CityInstruction dataset from mobility-simulation inspired templates including CityQA, CityWalk, and CityReasoning to ground urban knowledge.
- Introduce CityReasoning with explicit intermediate reasoning steps to align with human spatial cognition.
- Apply SWFT: warm up with CityInstruction plus general data, then adaptively weight training samples based on base and warm-up loss to down-weight low-quality data.
- Mix CityInstruction with general instruction data to mitigate catastrophic forgetting and preserve general capabilities.
- Develop CityEval benchmark with City Image, Urban Semantics, Spatial Reasoning, and Composite Tasks to assess urban spatial cognition and downstream performance.
- Evaluate across multiple open-source and commercial LLMs on four cities (Beijing, London, New York, Paris) and analyze in-domain and out-of-domain transfer.
Experimental results
Research questions
- RQ1Can LLMs acquire city-scale spatial cognition by training on embodied urban experience data?
- RQ2Does SWFT improve urban-specific performance while preserving general capabilities?
- RQ3How well do CityInstruction-trained models transfer spatial knowledge to new cities (out-of-domain)?
- RQ4Do smaller city-tuned LLMs achieve competitive results against large proprietary models on CityEval?
- RQ5What is the impact of data composition and size of CityInstruction on performance in CityEval tasks?
Key findings
- CityGPT-7B trained with CityInstruction substantially outperforms baseline models on CityEval across multiple cities and tasks, notably achieving up to 236.59% improvement in Spatial Reasoning over the best baseline.
- CityGPT models outperform base models across CityEval task groups (City Image, Urban Semantics, Spatial Reasoning), with the largest gains in Spatial Reasoning.
- SWFT improves CityGPT performance and generally preserves or enhances general benchmarks (MMLU, BBH) relative to CityGPT-SFT, though some tasks (GSM8K) may decline in certain configurations.
- CityInstruction enables transfer of urban spatial knowledge to unseen cities, indicating partial generalization of urban cognition beyond training locales.
- Data ablation shows urban semantics tasks require less data to reach high performance, while spatial reasoning tasks need substantially more data for strong results.
Read this paper
Open the full text in the Nubint reader and ask about any passage as you read.
Read this paper on NubintThis review was generated by AI from the original paper. Please check the paper before citing it.