Agent-based modeling (ABM) seeks to understand the behavior of complex systems by simulating a collection of agents that act and interact within an environment. Their practical utility requires capturing realistic environment dynamics and adaptive agent behavior while efficiently simulating million-size populations. Recent advancements in large language models (LLMs) present an opportunity to enhance ABMs by using LLMs as agents with further potential to capture adaptive behavior. However, the computational infeasibility of using LLMs for large populations has hindered their widespread adoption. In this paper, we introduce AgentTorch -- a framework that scales ABMs to millions of agents while capturing high-resolution agent behavior using LLMs. We benchmark the utility of LLMs as ABM agents, exploring the trade-off between simulation scale and individual agency. Using the COVID-19 pandemic as a case study, we demonstrate how AgentTorch can simulate 8.4 million agents representing New York City, capturing the impact of isolation and employment behavior on health and economic outcomes. We compare the performance of different agent architectures based on heuristic and LLM agents in predicting disease waves and unemployment rates. Furthermore, we showcase AgentTorch's capabilities for retrospective, counterfactual, and prospective analyses, highlighting how adaptive agent behavior can help overcome the limitations of historical data in policy design. AgentTorch is an open-source project actively being used for policy-making and scientific discovery around the world. The framework is available here: github.com/AgentTorch/AgentTorch.
翻译:基于代理的建模(ABM)旨在通过模拟在环境中行动和交互的代理集合来理解复杂系统的行为。其实用性要求在高效模拟百万级规模群体的同时,捕捉真实的环境动态和自适应的代理行为。大型语言模型(LLM)的最新进展为增强ABM提供了机遇,即利用LLM作为代理,从而进一步捕捉自适应行为。然而,将LLM应用于大规模群体时存在的计算不可行性阻碍了其广泛采用。本文提出AgentTorch——一个能够将ABM扩展至数百万代理,同时利用LLM捕捉高分辨率代理行为的框架。我们对LLM作为ABM代理的效用进行了基准测试,探讨了模拟规模与个体代理能力之间的权衡。以COVID-19大流行为案例研究,我们展示了AgentTorch如何模拟代表纽约市的840万代理,捕捉隔离与就业行为对健康和经济结果的影响。我们比较了基于启发式代理和LLM代理的不同架构在预测疾病传播波和失业率方面的性能。此外,我们展示了AgentTorch在回顾性、反事实和前瞻性分析方面的能力,强调自适应代理行为如何帮助克服政策设计中历史数据的局限性。AgentTorch是一个开源项目,目前正被全球范围内用于政策制定和科学发现。该框架可通过以下链接获取:github.com/AgentTorch/AgentTorch。