Thanks to visit codestin.com
Credit goes to github.com

Skip to content
/ LLM-SAM Public

Official repository for The LLM-Empowered Social Agent Modeling (LLM-SAM) Framework: Simulating the Coevolution of Opinions and Actions

Notifications You must be signed in to change notification settings

pzs19/LLM-SAM

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

6 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

LLM-SAM

Official repository for The LLM-Empowered Social Agent Modeling (LLM-SAM) Framework: Simulating the Coevolution of Opinions and Actions

Teasor

Understanding and simulating inherently complex social interactions are crucial for addressing challenges in areas such as collective decision-making, marketing, policy design, and social governance. The recent emergence and development of large language models (LLMs) has led to growing works focusing on using LLMs to simulate multi-agent social interactions. However, current LLM-based social agent systems fail to fully represent human diversity and irrationality, as data used to train LLMs is limited due to privacy and security reasons. To overcome these limitations, we propose a new framework, Large Language Model-empowered Social Agent Modeling (LLM-SAM), which incorporates the theoretical models, real-user data, and LLMs to simulate complex social interactions in a more comprehensive and scalable way. Specifically, we use the coevolution of opinions and actions, a key aspect of social dynamics as an example, and apply LLM-SAM to demonstrate the feasibility and applicability of the proposed framework. The theoretical models and real-user data collected on small and static networks are used to train the social agents empowered by LLMs, and then to verify their correctness. Next, the fine-tuned multi-LLM social agents are used to simulate social interactions in more complex scenarios such as larger and dynamic networks. Our simulation results demonstrate that the proposed LLM-SAM framework can capture a range of complex social phenomena not considered in the theoretical model or not observed in real-user data, such as the emergence of the unpopular norm, paradigm shift, and polarization.

Install

pip install openai
# Install vLLM with CUDA 12.1.
pip install vllm

Experiment

Validation of Multi-LLM Social Agents

# including LLaMA, Qwen and GPT-4o-mini
bash scripts/run_social_agent.sh

Applications to Larger Networks

# including LLaMA, Qwen and GPT-4o-mini
bash scripts/run_large_network.sh

Applications to Dynamic Network

# including LLaMA, Qwen and GPT-4o-mini
bash scripts/run_dynamic_network.sh

About

Official repository for The LLM-Empowered Social Agent Modeling (LLM-SAM) Framework: Simulating the Coevolution of Opinions and Actions

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published