Law in Silico: Simulating Legal Society with LLM-Based Agents
Yiding Wang, Yuxuan Chen, Fanxu Meng, Xifan Chen, Xiaolei Yang, Muhan Zhang
TL;DR
The paper tackles the challenge of studying legal systems without costly real-world experiments by introducing Law in Silico, an LLM-based framework for simulating legal societies. It combines hierarchical agent modeling, scenario-based decision-making, and a dynamic legal system to capture how macro societal factors influence individual behavior and how micro-level interactions drive legal evolution. Through macro-level experiments across multiple countries, it shows that simulated crime rates align with real-world data and reveal the impact of deterrence and underreporting. Micro-level simulations further demonstrate the importance of transparent, effective institutions in protecting vulnerable groups, while highlighting cat-and-mouse dynamics between regulation and exploitation. Overall, the work provides a scalable virtual laboratory for legal theory testing, policy design, and administrative planning with practical implications for law design and governance.
Abstract
Since real-world legal experiments are often costly or infeasible, simulating legal societies with Artificial Intelligence (AI) systems provides an effective alternative for verifying and developing legal theory, as well as supporting legal administration. Large Language Models (LLMs), with their world knowledge and role-playing capabilities, are strong candidates to serve as the foundation for legal society simulation. However, the application of LLMs to simulate legal systems remains underexplored. In this work, we introduce Law in Silico, an LLM-based agent framework for simulating legal scenarios with individual decision-making and institutional mechanisms of legislation, adjudication, and enforcement. Our experiments, which compare simulated crime rates with real-world data, demonstrate that LLM-based agents can largely reproduce macro-level crime trends and provide insights that align with real-world observations. At the same time, micro-level simulations reveal that a well-functioning, transparent, and adaptive legal system offers better protection of the rights of vulnerable individuals.
