用大规模LLM智能体模拟城市活动,实现高效实时仿真。
OpenCity: A Scalable Platform to Simulate Urban Activities with Massive LLM Agents
- 设计请求调度器与分组精炼提示策略,降低通信和计算开销。
- 在六座城市实验中实现单代理仿真速度提升600倍,耗能减半。
- 支持万级智能体一小时仿真,可对比真实城市数据,适合城市研究者。
基于智能体的模型(ABMs)长期用于探索个体行为如何聚合形成复杂城市现象。与黑箱预测模型不同,ABMs擅长揭示微观到宏观行为的联动机制。大语言模型(LLMs)的兴起使具备前所未有效率的城市场景智能体成为可能,但其高昂的计算成本制约了大规模仿真。为此,我们提出OpenCity,一个面向系统与提示效率优化的可扩展仿真平台。具体而言,设计了基于IO多路复用的并行请求调度器以减少通信开销;提出“分组-蒸馏”提示优化策略,通过聚类具有相似静态属性的智能体来降低冗余。在六个全球城市的实验中,OpenCity实现每代理仿真时间加速600倍,LLM请求量减少70%,令牌使用量降低50%。该性能使10,000个智能体的日活动仿真可在普通硬件上一小时内完成。同时,显著提速首次实现了对全球六大城市的城市场景仿真基准构建,将模拟结果与真实数据进行对比。我们认为OpenCity为跨学科城市研究提供了关键基础设施,推动更广泛的研究协作。代码仓库见 https://anonymous.4open.science/r/Anonymous-OpenCity-42BD。
原文摘要 · Abstract (English)
Agent-based models (ABMs) have long been employed to explore how individual behaviors aggregate into complex societal phenomena in urban space. Unlike black-box predictive models, ABMs excel at explaining the micro-macro linkages that drive such emergent behaviors. The recent rise of Large Language Models (LLMs) has led to the development of LLM agents capable of simulating urban activities with unprecedented realism. However, the extreme high computational cost of LLMs presents significant challenges for scaling up the simulations of LLM agents. To address this problem, we propose OpenCity, a scalable simulation platform optimized for both system and prompt efficiencies. Specifically, we propose a LLM request scheduler to reduce communication overhead by parallelizing requests through IO multiplexing. Besides, we deisgn a "group-and-distill" prompt optimization strategy minimizes redundancy by clustering agents with similar static attributes. Through experiments on six global cities, OpenCity achieves a 600-fold acceleration in simulation time per agent, a 70% reduction in LLM requests, and a 50% reduction in token usage. These improvements enable the simulation of 10,000 agents' daily activities in 1 hour on commodity hardware. Besides, the substantial speedup of OpenCity allows us to establish a urban simulation benchmark for LLM agents for the first time, comparing simulated urban activities with real-world data in 6 major cities around the globe. We believe our OpenCity platform provides a critical infrastructure to harness the power of LLMs for interdisciplinary studies in urban space, fostering the collective efforts of broader research communities. Code repo is available at https://anonymous.4open.science/r/Anonymous-OpenCity-42BD.
Thank you to arXiv for use of its open access interoperability. PaperDance 不是 arXiv 官方产品;中文卡片由大模型生成,请以原文为准。