Papers
Topics
Authors
Recent
Search
2000 character limit reached

OpenCity: A Scalable Platform to Simulate Urban Activities with Massive LLM Agents

Published 11 Oct 2024 in cs.MA and cs.AI | (2410.21286v1)

Abstract: 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 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.

Definition Search Book Streamline Icon: https://streamlinehq.com
References (33)
  1. Thomas C Schelling. Micromotives and macrobehavior. WW Norton & Company, 2006.
  2. Emergence of urban growth patterns from human mobility behavior. Nature Computational Science, 1(12):791–800, 2021.
  3. Strategic covid-19 vaccine distribution can simultaneously elevate social utility and equity. Nature Human Behaviour, 6(11):1503–1514, 2022.
  4. Generative agents: Interactive simulacra of human behavior. In Proceedings of the 36th annual acm symposium on user interface software and technology, pages 1–22, 2023.
  5. Urban generative intelligence (ugi): A foundational platform for agents in embodied city environment. arXiv preprint arXiv:2312.11813, 2023.
  6. Beyond imitation: Generating human mobility from context-aware reasoning with large language models. arXiv preprint arXiv:2402.09836, 2024.
  7. Chain-of-thought prompting elicits reasoning in large language models. Advances in neural information processing systems, 35:24824–24837, 2022.
  8. Perceive, reflect, and plan: Designing llm agent for goal-directed city navigation without instructions. arXiv preprint arXiv:2408.04168, 2024.
  9. On the limits of agency in agent-based models. arXiv preprint arXiv:2409.10568, 2024.
  10. Francesc Bruguera i Moriscot. Benchmarking input/output multiplexing facilities of the linux kernel. 2019.
  11. Computer networks: a systems approach. Morgan Kaufmann, 2007.
  12. Batch prompting: Efficient inference with large language model apis. arXiv preprint arXiv:2301.08721, 2023.
  13. Understanding individual human mobility patterns. nature, 453(7196):779–782, 2008.
  14. The timegeo modeling framework for urban mobility without travel surveys. Proceedings of the National Academy of Sciences, 113(37):E5370–E5378, 2016.
  15. Mobility patterns are associated with experienced income segregation in large us cities. Nature communications, 12(1):4633, 2021.
  16. Modelling the scaling properties of human mobility. Nature physics, 6(10):818–823, 2010.
  17. The dimensions of residential segregation. Social forces, 67(2):281–315, 1988.
  18. Significant Gravitas. Autogpt. https://github.com/Significant-Gravitas/AutoGPT, 2023. Accessed: 2024-09-01.
  19. A survey on large language model based autonomous agents. Frontiers of Computer Science, 18(6):186345, 2024.
  20. The rise and potential of large language model based agents: A survey. arXiv preprint arXiv:2309.07864, 2023.
  21. Communicative agents for software development. arXiv preprint arXiv:2307.07924, 6, 2023.
  22. Swe-agent: Agent-computer interfaces enable automated software engineering. arXiv preprint arXiv:2405.15793, 2024.
  23. Metagpt: Meta programming for multi-agent collaborative framework. arXiv preprint arXiv:2308.00352, 2023.
  24. S3: Social-network simulation system with large language model-empowered agents. arXiv preprint arXiv:2307.14984, 2023.
  25. Recagent: A novel simulation paradigm for recommender systems. arXiv preprint arXiv:2306.02552, 2023.
  26. Towards efficient generative large language model serving: A survey from algorithms to systems. arXiv preprint arXiv:2312.15234, 2023.
  27. Flashattention: Fast and memory-efficient exact attention with io-awareness. Advances in Neural Information Processing Systems, 35:16344–16359, 2022.
  28. Awq: Activation-aware weight quantization for on-device llm compression and acceleration. Proceedings of Machine Learning and Systems, 6:87–100, 2024.
  29. Efficient memory management for large language model serving with pagedattention. In Proceedings of the 29th Symposium on Operating Systems Principles, pages 611–626, 2023.
  30. Efficiently programming large language models using sglang. arXiv preprint arXiv:2312.07104, 2023.
  31. Defint: A default-interventionist framework for efficient reasoning with hybrid large language models. arXiv preprint arXiv:2402.02563, 2024.
  32. Automating customer service using langchain: Building custom open-source gpt chatbot for organizations. arXiv preprint arXiv:2310.05421, 2023.
  33. Auto-gpt for online decision making: Benchmarks and additional opinions. arXiv preprint arXiv:2306.02224, 2023.
Citations (2)

Summary

  • The paper presents a scalable platform that simulates urban activities using massive LLM agents, achieving a 600-fold speedup on standard hardware.
  • The paper introduces a Group-and-Distill Meta-Prompt Optimizer that reduces LLM requests by 73.7% and token usage by 45.5%, optimizing simulation efficiency.
  • The paper demonstrates high simulation accuracy in reproducing urban dynamics and enables counterfactual experiments, enhancing urban planning studies.

OpenCity: A Scalable Platform to Simulate Urban Activities with Massive LLM Agents

Introduction

The paper presents "OpenCity," a scalable platform for simulating urban activities using large-scale LLMs agents. The work addresses the computational challenges of deploying numerous LLM agents in urban simulations by introducing novel optimization strategies to significantly enhance system efficiency. The platform leverages the inherent reasoning capabilities of LLM agents to model complex human behaviors, offering a robust tool for urban studies and planning.

Architectural and Algorithmic Innovations

LLM Request Scheduler

OpenCity incorporates a scalable LLM request scheduler to optimize network communication in agents' simulation. This scheduler uses I/O multiplexing to parallelize LLM requests, reducing idle waiting times typically encountered during network communication. Figure 1

Figure 1: The functionality of the proposed LLM Request Scheduler.

Group-and-Distill Meta-Prompt Optimizer

The Group-and-Distill Meta-Prompt Optimizer reduces computational overhead by decreasing the number of LLM prompts. By clustering agents with similar static attributes and utilizing batch prompting, this strategy minimizes redundancy and effectively compresses input tokens, sustaining agent independence concerning dynamic properties. Figure 2

Figure 2: Overview of Group-and-Distill Meta-Prompt Optimizer.

Experimental Results

Performance Evaluation

The experimental evaluation conducted across six major global cities demonstrates that OpenCity achieves substantial improvements in simulation efficiency. The platform can simulate 10,000 agents' activities in just one hour on standard hardware, achieving a 600-fold speedup and reducing LLM requests by 73.7% and token usage by 45.5%. Figure 3

Figure 3: Acceleration experiment results and scalability experiments showcase significant performance improvements.

This performance indicates the platform's strong scalability, as demonstrated by the reduced simulation times per agent as the number of agents increases from one to 10,000.

Faithfulness and Simulation Accuracy

To assess accuracy, OpenCity was tested for its ability to reproduce urban dynamics such as the radius of gyration and the origin-destination matrix. The system demonstrates high fidelity in simulating human-like behaviors, maintaining consistency in agents' dynamic attributes and minor discrepancies in urban dynamics reproduction metrics across cities.

Counterfactual Simulations

The platform’s capabilities extend to conducting counterfactual experiments, such as examining experienced urban segregation under different urban planning scenarios. By evenly distributing income groups within simulations, researchers can observe and analyze the resulting impact on urban segregation metrics. Figure 4

Figure 4: The distribution of income segregation index for counterfactual experiment.

Practical and Theoretical Implications

Infrastructure for Urban Studies

OpenCity acts as infrastructure for interdisciplinary urban studies, supporting simulations that integrate social, economic, and environmental factors. Its user-friendly web interface allows researchers from various fields to engage with complex simulations without extensive programming knowledge.

Future Developments

The platform sets a precedent for future research by highlighting the utility of LLM agents in large-scale simulations. There remains potential for enhancing LLM agents' scalability and multi-agent interactions further, integrating real-time adaptive models that better replicate dynamic urban systems. Figure 5

Figure 5: A detail case of interpreting simulation results through communication.

Conclusion

OpenCity offers a critical advancement in the simulation of urban activities through LLM agents, drastically improving computational efficiency while maintaining high fidelity in behavioral modeling. The platform's design opens avenues for a broad range of applications in urban planning and policy-making, urging further exploration of LLM capabilities in complex system simulations.

Paper to Video (Beta)

Whiteboard

No one has generated a whiteboard explanation for this paper yet.

Open Problems

We haven't generated a list of open problems mentioned in this paper yet.

Collections

Sign up for free to add this paper to one or more collections.

Tweets

Sign up for free to view the 1 tweet with 0 likes about this paper.