[论文解读] CityGPT: Empowering Urban Spatial Cognition of Large Language Models
CityGPT 引入 CityInstruction 和自权重微调(SWFT)方法,以使通用 LLM 拥有城市空间知识,通过 CityEval 基准测试验证,显示较小的城市微调模型对比更大/专有基线具有强劲表现。
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}.
研究动机与目标
- 由于离线城市知识存在空白,需在 LLM 中实现城市规模的空间理解的动机。
- 提出 CityInstruction 以注入城市知识并使 LLM 能进行空间推理。
- 开发 SWFT,在微调时对领域数据进行加权,并保持通用能力。
- 创建 CityEval,全面评估城市空间理解和任务性能。
- 证明使用 CityInstruction 训练的较小 LLM 在 CityEval 上对基线具有优势。
提出的方法
- 从 Mobility-simulation 启发的模板构建 CityInstruction 数据集,包含 CityQA、CityWalk、CityReasoning,以 grounded 城市知识。
- 引入 CityReasoning,给出显式的中间推理步骤,以对齐人类的空间认知。
- 应用 SWFT:先以 CityInstruction 加通用数据热身,然后基于基线损失和热身损失自适应加权训练样本,以降低低质量数据权重。
- 将 CityInstruction 与通用指令数据混合,以缓解灾难性遗忘并保持通用能力。
- 开发 CityEval 基准,包含 City Image、Urban Semantics、Spatial Reasoning 和 Composite Tasks,以评估城市空间认知和下游表现。
- 在四个城市(Beijing、London、New York、Paris)上对多种开源和商业 LLM 进行评估,并分析域内与域外迁移。
实验结果
研究问题
- RQ1LLMs 是否能够通过在具体现实城市体验数据上进行训练来获得城市尺度的空间认知?
- RQ2SWFT 是否在提升城市特定表现的同时保留通用能力?
- RQ3CityInstruction 训练的模型在新城市(域外)上迁移空间知识的能力如何?
- RQ4较小的城市微调 LLM 在 CityEval 上是否能与大型专有模型媲美?
- RQ5CityInstruction 的数据组成和规模对 CityEval 任务的表现有何影响?
主要发现
- CityGPT-7B 通过 CityInstruction 训练,在 CityEval 的多城多任务上显著超越基线模型,尤其在 Spatial Reasoning 上对最优基线的提升达到高达 236.59%。
- CityGPT 模型在 CityEval 的任务组(City Image、Urban Semantics、Spatial Reasoning)上均优于基础模型,最大增益出现在 Spatial Reasoning。
- SWFT 相较 CityGPT-SFT 在 CityEval 表现上有所提升,且通常能保持或提升通用基准(MMLU、BBH),但某些任务(GSM8K)在某些配置中可能下降。
- CityInstruction 能将城市空间知识迁移到未见城市,表明城市认知具有在训练地点之外的部分泛化能力。
- 数据消融显示城市语义任务对数据需求较少,而空间推理任务需要显著更多数据以获得强结果。
阅读本论文
在 Nubint 阅读器中打开原文,边读边就任意段落提问。
在 Nubint 中阅读本论文本解读由 AI 根据论文原文生成,引用前请核对原文。