YuLan-OneSim: Towards the Next Generation of Social Simulator with Large Language Models

Lei Wang, Heyang Gao, Xiaohe Bo, Xu Chen, Ji-Rong Wen · DOI

TL;DR

YuLan-OneSim is a new social simulator that uses Large Language Models (LLMs) to create complex, large-scale simulations of human behavior. It allows users to build scenarios using natural language, offers a vast library of pre-built simulations, and even includes an AI social researcher to automate the entire research process, from idea to report.

What Problem Does This Paper Address?

Traditional social simulations often require extensive programming expertise to set up scenarios, limiting accessibility for social scientists. Furthermore, these simulations can struggle to capture the nuances of human cognition and language, and often lack the scalability to model large populations realistically. Existing LLM-based simulators, while promising, still face challenges in code-free scenario creation, adaptability through feedback, and comprehensive research automation. YuLan-OneSim aims to bridge these gaps by making social simulation more accessible, realistic, scalable, and automated.

Methods

YuLan-OneSim introduces several novel approaches:

  • Code-Free Scenario Construction: Users describe scenarios in natural language, and the system automatically generates the simulation code. This involves a four-step process: scenario formalization (using ODD protocol), behavior graph construction, code generation, and agent specification.
  • Comprehensive Default Scenarios: A repository of 50 pre-defined scenarios across 8 domains (economics, sociology, politics, psychology, organization, demographics, law, communication) is provided.
  • Evolvable Simulation: A Verifier-Reasoner-Refiner-Tuner (VR2T) framework integrates external feedback to fine-tune the underlying LLMs, improving simulation realism.
  • Large-Scale Simulation: A responsive agent framework and a distributed simulation architecture support up to 100,000 agents.
  • AI Social Researcher: This subsystem automates the entire social science research loop, from topic input to report generation and refinement, using specialized LLM agents.

Datasets

The paper does not explicitly mention specific datasets used for training the LLMs powering YuLan-OneSim. However, it extensively uses its own 50 default scenarios across 8 domains for evaluation. Additionally, it compares simulation results against real-world data for the Brazilian real estate market (rental prices from 2020) to validate its model's alignment with empirical observations.

Key Insights and Ideas

  • Natural Language is the New Code: The ability to describe complex simulation scenarios in plain English dramatically lowers the barrier to entry for social scientists, democratizing agent-based modeling.
  • LLMs as the Engine of Social Science: YuLan-OneSim demonstrates that LLMs can not only generate code but also embody agents, reason about social interactions, and even act as researchers, fundamentally changing how social science research can be conducted.
  • Scalability is Key to Realism: Simulating up to 100,000 agents is crucial for capturing emergent social phenomena that might not appear in smaller-scale models.
  • Feedback Loops Drive Improvement: The "evolvable simulation" aspect, where the simulator learns from feedback, is vital for achieving more accurate and human-aligned simulations over time.
  • Automating the Research Cycle: The AI social researcher is a significant leap, potentially accelerating the pace of social science discovery by handling tedious tasks like scenario design and report writing.

Key Results

  • Scenario Construction Efficiency: The simulator generates code at an average speed of 50 tokens per second, over 14 times faster than an average human programmer.
  • Code Quality: Average ratings for generated behavior graphs (BG-Rating) and simulation code (C-Rating) were 4.82 and 4.20 respectively, indicating high quality.
  • Simulation Reliability: The simulator successfully verified established social theories like Axelrod's cultural dissemination model, showing realistic emergent patterns. It also demonstrated good alignment with real-world housing price data.
  • Scalability and Efficiency: The distributed architecture can simulate 100,000 agents in approximately 6,026 seconds per round, achieving a throughput of 49.41 events per second. This is significantly more efficient than single-node approaches for large-scale simulations.
  • AI Social Researcher Performance: The AI social researcher achieved an average scenario design quality score of 4.13 out of 5 and a report quality score of 3.31 out of 5, showing strong performance in translating topics into feasible simulations and generating structured reports.

Limitations and Future Work

  • Logical Errors: While code generation is efficient, logical errors (value access, instruction-action mismatches) are the most common issues, requiring further refinement.
  • Deeper Insights: The AI social researcher, while good at generating reports, could be improved to extract deeper insights and more actionable recommendations.
  • Future Work: The authors plan to incorporate more social theories to better regularize agent behaviors and explore more spatial and multi-modal information to enhance the simulator's applicability.

Summary updated

BibTeX
@misc{wang2025yulan,
  author = {Lei Wang and Heyang Gao and Xiaohe Bo and Xu Chen and Ji-Rong Wen},
  title = {{YuLan-OneSim: Towards the Next Generation of Social Simulator with Large Language Models}},
  year = {2025},
  eprint = {2505.07581},
  archivePrefix = {arXiv},
  url = {https://arxiv.org/abs/2505.07581},
}
Figure