Source-linked AI summary

Generative agent-based modeling with actions grounded in physical, social, or digital space using Concordia

Alexander Sasha Vezhnevets, John P. Agapiou, Avia Aharon, Ron Ziv, Jayd Matyas, Edgar A. Duéñez-Guzmán, William A. Cunningham, Simon Osindero, Danny Karmon, Joel Z. Leibo

arXiv:2312.03664v2cs.AIcs.CL

TL;DR

Researchers need more expressive ways to model complex social interactions and to generate or evaluate data-intensive digital services. Concordia addresses this with LLM-mediated agents and a Game Master that simulates grounded environments and connects to digital services. The paper presents the library as useful across social simulation and service evaluation, while emphasizing that standards for real-world generalization remain unresolved.

  • Problem

    Traditional agent-based models have limited ability to represent the complexity of social situations, while collecting high-quality user data for building and evaluating services is challenging and privacy-sensitive.

  • Method

    Concordia constructs GABMs in grounded physical, social, or digital environments using generative agents and a Game Master that translates natural-language actions into simulated effects or service integrations.

  • Results

    Concordia supports models of social interactions and technologies, including synthetic-data generation, service evaluation, and examples spanning elections, businesses, disputes, experiments, and digital applications.

  • Takeaways & Limitations

    The library offers a flexible basis for modeling phenomena involving communication, social meaning, common sense, and grounded environments.

  • Takeaways & Limitations

    The field still lacks agreed standards for determining whether and under which conditions in-silico experiment results generalize to the real world.

Abstract

from arXiv · show

Agent-based modeling has been around for decades, and applied widely across the social and natural sciences. The scope of this research method is now poised to grow dramatically as it absorbs the new affordances provided by Large Language Models (LLM)s. Generative Agent-Based Models (GABM) are not just classic Agent-Based Models (ABM)s where the agents talk to one another. Rather, GABMs are constructed using an LLM to apply common sense to situations, act "reasonably", recall common semantic knowledge, produce API calls to control digital technologies like apps, and communicate both within the simulation and to researchers viewing it from the outside. Here we present Concordia, a library to facilitate constructing and working with GABMs. Concordia makes it easy to construct language-mediated simulations of physically- or digitally-grounded environments. Concordia agents produce their behavior using a flexible component system which mediates between two fundamental operations: LLM calls and associative memory retrieval. A special agent called the Game Master (GM), which was inspired by tabletop role-playing games, is responsible for simulating the environment where the agents interact. Agents take actions by describing what they want to do in natural language. The GM then translates their actions into appropriate implementations. In a simulated physical world, the GM checks the physical plausibility of agent actions and describes their effects. In digital environments simulating technologies such as apps and services, the GM may handle API calls to integrate with external tools such as general AI assistants (e.g., Bard, ChatGPT), and digital apps (e.g., Calendar, Email, Search, etc.). Concordia was designed to support a wide array of applications both in scientific research and for evaluating performance of real digital services by simulating users and/or generating synthetic data.

1. Introduction

Concordia extends agent-based modeling with LLM-mediated generative agents that can operate in grounded physical, social, and digital environments. Its Game Master translates natural-language actions into simulated consequences or integrations with digital services, while the project highlights unresolved standards for validating real-world generalization.

  • Motivation: GABMs use generative models to provide agents with common sense, reasoning, planning, few-shot learning, and shared semantic understanding.These affordances are presented as enabling more flexible and expressive models than traditional ABMs.
  • Contribution: Concordia is a library for constructing GABMs in grounded physical, social, or digital spaces.It is designed to make language-mediated simulations flexible to define and use.
  • Method: The Game Master converts agents’ natural-language actions into appropriate implementations and simulates their effects in the environment.In physical settings it checks plausibility; in digital settings it can represent apps, social networks, assistants, or external services.
  • Digital applications: Digital representations can range from natural-language prompts and mock-ups to real API integrations for sandbox evaluation, realistic data generation, and service evaluation.This supports modeling how digital media shapes communication and decisions.
  • Applications: Agent-based simulations can generate synthetic activity data for training and evaluating models when real data are absent or used alongside them.The paper frames this as an alternative to human-centered methods that are expensive, difficult to scale, and less suited to complex constrained interactions.
  • Validation: The field lacks consensus on how to determine when LLM-based simulation results generalize to real human populations.The authors argue that validation conditions, best practices, and epistemic norms must be developed collectively.

2. Concordia

Concordia is a framework for generative agent-based simulations in which modular agents use language models and memory, while a Game Master grounds their interactions in configurable environments. Its design supports experiments spanning physical, social, and digital settings, but reliable real-world generalization remains an open validation challenge.

  • 2. Concordia: Concordia models social interactions with generative agents and a generative environment maintained by a Game Master.The GM maintains world state, communicates observations, resolves action effects and conflicts, and updates grounded variables.
  • 2.2. Generative environments: The Game Master translates natural-language intentions into simulated outcomes while checking physical or variable-level grounding and communicating invalid actions.This interaction pattern supports natural-language agent actions and environment updates within the episode loop.
  • 2.1. Generative agents: Agents combine long-term experience, working-memory components, and LLM reasoning to generate context-sensitive actions guided by personal history and social norms.The component system retrieves relevant experience and constructs compact conditioning text for each action timestep.
  • 2.3. Experiment design using Concordia: Experiments configure agents, the GM, and grounded variables for specific interactions such as businesses, elections, or resource governance.Grounded variables can represent money, goods, votes, voting procedures, resources, financial variables, or political variables.
  • 2.3. Experiment design using Concordia: Validation should prioritize direct tests of generalization, alongside algorithmic-fidelity and robustness evaluations tailored to each model’s purpose.The authors identify train-test contamination and stereotype representation as unresolved issues that complicate interpretation.

3. Interpretations

Concordia’s generative agents can be interpreted through cognitive, social-construction, emergent-culture, and non-utility-maximizing perspectives, while inheriting cultural assumptions and biases from their underlying LLMs.

  • Neuroscience interpretation: Concordia’s architecture can be viewed as a biologically plausible account of cognition centered on pattern completion and language-mediated action generation.The architecture connects working-memory contents to incremental next-symbol prediction and emitted action sequences.
  • Neuroscience interpretation: Agents retain experience through long-term memory and retrieve routines when needed, reducing pressure on limited working memory.Natural-language routines remain fragile: they can be difficult to recall and may be forgotten when unused.
  • Cultural grounding and limitations: The approach inherits cultural knowledge and biases from the LLM, so its validity depends on whether conditioned outputs reflect the beliefs and attitudes of intended subpopulations.This property is discussed as algorithmic fidelity, and culturally produced assumptions can become agents’ background knowledge.
  • A theory of social construction: Concordia supports models in which agents collectively construct and revise social facts, routines, and rationales during ongoing interaction.Agents can continue routines until disruption, then engage in collective reflection before establishing a new routine and rationale.
  • Emergent social phenomena: Generative agents can copy, communicate, reproduce, and modify behavioral patterns, providing a possible substrate for cultural evolution and emergent information diffusion.Information diffusion emerged in a prior simulation without being specifically programmed.
  • Generative-agent cognition: Concordia agents generate behavior by querying next-word prediction systems while using individual biographies, memories, preferences, and plans.Their behavior can therefore appear systematically differentiated and goal-directed without requiring explicitly specified utility functions.
  • Concordia agents are not rational utility maximizers: Unlike utility-maximizing models, GABMs do not require payoff specifications and may represent valuation changes without treating valuations as functional prerequisites.This makes them suitable for questions that are difficult to formulate within fundamentally goal-optimizing frameworks.

4. Applications

Concordia supports applications ranging from synthetic user studies and digital-service evaluation to psychological modeling, AI-assistant auditing, and multi-scale social simulation.

  • 4.1. Synthetic user studies in digital action space: Concordia simulates digital activity by translating natural-language actions into structured phone-app functions, enabling synthetic user activity logs and single-user A/B testing.The PhoneGameMaster and PhoneUniverse mediate phone interaction, while repeated simulations can vary service configurations.
  • 4.2. Data generation and service evaluation: Synthetic users can interact with real services to generate training or evaluation data while reducing reliance on difficult-to-collect personal user data.The paper frames this as a response to the privacy and availability challenges of high-quality user data.
  • 4.3. Emergence and social institutions: Concordia can investigate how language-formulated rules, laws, and norms influence shared-resource management and whether governance patterns emerge.The proposed applications include testing when resource-sharing demands produce rules or norms capable of governing resources.
  • 4.4. Concordia can implement classic and contemporary psychological models: Its modular component system supports controlled psychological experiments by modeling alternative cognitive processes and comparing simulations with empirical human data.The system can also generate hypotheses through simulated experiments that may later be validated on human participants.
  • 4.5. AI assistants with transparent auditing and credit assignment: Concordia agents can serve as assistants or synthetic workers whose natural-language policies are modular, reusable, and easier to specify than quantitative rewards.The paper also discusses transparent auditing of agent behavior and stakeholder participation in agent design.
  • 4.6. Emergence and multi-scale modeling with Concordia: Concordia supports multi-scale modeling by representing individuals, organizations, institutions, or nation states at different resolutions.This design is presented as a way to study how phenomena at one scale provide a substrate for phenomena at another.

5. Future work

Future work focuses on establishing standards for interpreting and validating LLM-based simulations, while expanding Concordia’s environments, model integrations, agent capabilities, and research tools.

  • 5. Future work: Future validation work will address when in silico experiments generalize to the real world, an issue requiring community-wide negotiation.The authors release Concordia early with few examples to invite researchers to develop validating procedures, best practices, and epistemic norms.
  • 5. Future work: Planned extensions include new example environments and integrations with different LLMs to assess which models are suitable for GABMs.
  • 5. Future work: Planned agent improvements include better associative memory, dynamic component assembly, and tool use.
  • 5. Future work: Additional tools will support visualization, auditing, simulation snapshots, performance comparisons, and keyframe-based action steering.

6. Conclusion

The conclusion presents GABM and Concordia as tools for specifying detailed models of social phenomena, technologies, and policies, especially where communication, meaning, common sense, or grounded environments matter.

  • 6. Conclusion: Concordia provides tools to specify detailed models of phenomena, technologies, and policies for evaluation.
  • 6. Conclusion: GABM and Concordia are particularly suited to social phenomena involving communication, social meaning, common sense, or grounded physical, social, and digital interaction.
  • 6. Conclusion: Concordia is available on GitHub.

A. Implementation details

The implementation overview directs readers to Concordia’s core interfaces and the main agent and Game Master implementations.

  • A. Implementation details: The code overview recommends starting with interfaces for agents, the Game Master, components, and clocks, followed by the basic agent and Game Master implementations.

A.1. Agents

Concordia agents combine named observations, actions, and configurable components whose states and updates shape decisions over simulation episodes.

  • A.1. Agents: Each agent implements naming, observation, and action methods, with actions returned as natural-language strings under specified output formats.
  • A.1. Agents: Agent names must be unique, while action specifications can request free-form, categorical, or numeric outputs.
  • A.1. Agents: Agent constructors receive component lists, and components expose state, naming, update, and optional observation methods.
  • A.1. Agents: At each timestep, component states are concatenated into decision context, observations are recorded, and updates occur at configurable intervals.

A.2. Game master implementation

The Game Master exposes methods for identification, processing player actions, and running simulation episodes.

  • The GM processes player actions by creating event statements and can run a single simulation episode.It also provides a name-returning method.

A.3. GM components

GM components maintain environment state, expose appropriate observations, and update that state as agents act. They can also integrate classical simulators when their state is representable in language.

  • Components maintain state, expose full or player-specific views, and update state through defined lifecycle methods.Examples include tracking player locations and selectively exposing each player’s location.
  • The GM processes each turn by updating components, sending partial observations, receiving an action, updating before the event, and constructing context from component states.The clock may advance after each player or after all players act, controlled by a constructor flag.
  • Custom functionality is implemented through components that track grounded variables, update them after events, and represent their state linguistically.Components can send observations when events affect or are observed by other players.
  • Components may use differential equations or finite-state machines, provided they can represent their state in language.Natural language can connect multiple classical simulators.

A.3.1. Turn taking and simultanious action

Concordia supports sequential and quasisimultaneous turn-taking, while concurrent execution can accelerate simulation but often produces inconsistencies.

  • In quasisimultaneous mode, all players act within one main-clock step while retaining a specific internal initiative order.
  • In sequential mode, agents act one after another and the game clock advances between their turns.
  • Concurrent player turns greatly speed up simulation but often lead to inconsistencies, so they are used at the user’s risk.

A.4. Nested games

Nested games let Concordia shift control to a specialized sub-simulation for a period, then return its memories to the parent game. This supports finer-grained modeling of selected processes.

  • A component can create a new GM, transfer control to it temporarily, and recover control when its episode ends.The nested GM returns its memories to the parent GM.
  • Nested games allow one process to run at a finer time scale than the surrounding simulation.The fishing example uses a one-hour parent clock and a faster-clock subgame for fishing activity.
  • The conversation component in the examples uses nested-game structure to model conversations among agents and potential NPCs.

A.5. Concurrency

Concordia improves wall-time efficiency by updating components concurrently while LLM calls are in flight. This sacrifices guaranteed update order, but sequential updates remain available through a wrapper.

  • LLM API calls are the library’s performance bottleneck.
  • Concurrent component updates let other components proceed while one waits for LLM inference.
  • The update sequence is not guaranteed under concurrency, while a sequential wrapper supports ordered updates.

A.6. Sampling initial memories and backstories

Concordia generates agent backstories and formative memories from biographical facts, traits, and simulation context, while providing phone-based simulations and illustrative examples. Validation of whether generated agents exhibit the intended traits remains future work.

  • A.6. Sampling initial memories and backstories: Initial memories are generated by conditioning a backstory on biographical facts, randomized traits, and simulation-specific context, then generating formative memories at different ages.
  • A.6. Sampling initial memories and backstories: Trait validation for the resulting agents has not yet been addressed and is identified as future work.
  • A.6. Sampling initial memories and backstories: Phone apps subclass PhoneApp, expose callable actions through annotations and docstrings, and may execute Python code or connect to external services.
  • A.6. Sampling initial memories and backstories: PhoneApp instances are shared between players’ phones, while a SceneTriggeringComponent launches a PhoneGameMaster when an event requires phone interaction.
  • A.6. Sampling initial memories and backstories: Examples cover calendar coordination, mayoral elections, decision-making components, and social exclusion using questionnaires.
Loading 2312.03664v2…