Large Language Model Driven Agents for Simulating Echo Chamber Formation

Chenhao Gu, Ling Luo, Zainab Razia Zaidi, Shanika KarunasekeraarXiv 2025 · OpenReview

Abstract

The rise of echo chambers on social media platforms has heightened concerns about polarization and the reinforcement of existing beliefs. Traditional approaches for simulating echo chamber formation have often relied on predefined rules and numerical simulations, which, while insightful, may lack the nuance needed to capture complex, real-world interactions. In this paper, we present a novel framework that leverages large language models (LLMs) as generative agents to simulate echo chamber dynamics within social networks. The novelty of our approach is that it incorporates both opinion updates and network rewiring behaviors driven by LLMs, allowing for a context-aware and semantically rich simulation of social interactions. Additionally, we utilize real-world Twitter (now X) data to benchmark the LLM-based simulation against actual social media behaviors, providing insights into the accuracy and realism of the generated opinion trends. Our results demonstrate the efficacy of LLMs in modeling echo chamber formation, capturing both structural and semantic dimensions of opinion clustering.

Introduction

Echo chambers—environments where individuals are exposed primarily to information that confirms their existing beliefs—are a major driver of social polarization and misinformation. Traditionally, researchers studied these using mathematical models like the DeGroot model or Bounded Confidence Model. While useful, these classical models are "opinion-agnostic" in a linguistic sense; they treat opinions as simple numbers (e.g., a value between -1 and 1) and use fixed rules to determine how those numbers change.

These models fail to capture the "why" behind human interaction: the nuance of language, the weight of specific arguments, and the emotional sentiment that actually causes someone to hit the "unfollow" button. This research bridges the gap by creating a simulation where agents "read" and "write" content, making social decisions based on semantic meaning rather than just digits.

The LLM-Enhanced Simulation Framework

The proposed framework replaces traditional mathematical functions with prompt-driven LLM calls, operating on three main pillars:

  1. Opinion Evolution: Instead of a weighted average of numbers, an agent’s opinion is updated by an LLM that analyzes the agent's history and the "surrounding tweets" from its neighbors.
  2. Network Rewiring: Agents dynamically adjust their connections. The probability of following or unfollowing a neighbor is determined by an LLM evaluating the compatibility of their textual content.
  3. Content Generation: Agents generate new posts reflecting their updated stances, which then feed back into the "screens" (limited feeds) of their neighbors.
The three-stage simulation framework: Data Preparation, Simulation Process, and Analysis/Validation.

The framework uses Standardized Prompting and Chain-of-Thought (CoT) Reasoning to ensure the agents' decisions are logical and reproducible. It also implements a "screen" concept to simulate finite cognitive capacity, where agents only see a subset of prioritized posts rather than the entire network's output.

Datasets and Benchmarking

The study benchmarks its simulations against two real-world Twitter (now X) datasets to validate realism:

  • COVID-19 Vaccination Dataset: Tweets categorized by stance (pro-vax, anti-vax, or neutral) to study vaccine hesitancy and entrenched polarization.
  • Ukraine War Dataset: Approximately 1 million tweets labeled as pro-Russian, pro-Ukrainian, or neutral, representing a discourse dominated by a single majority view.

Model-Specific Polarization Patterns

A key finding was how different models behaved under the same conditions. ChatGPT tended to produce highly polarized, split communities, mirroring real-world "us vs. them" dynamics. In contrast, Gemini showed a strong "consensus bias," often steering the simulation toward uniform positive sentiment. This suggests that the safety tuning or training data of an LLM can fundamentally alter the "sociology" of the simulation.

Comparison of network evolution between ChatGPT and Gemini, showing distinct polarization vs. consensus behaviors over time.

Key Results

The researchers compared several models (GPT-4o Mini, ChatGPT, Gemini, Llama 3.1, Qwen2, and Gemma2) against a traditional equation-based baseline:

  • Structural Accuracy: For the COVID-19 dataset, real-world Modularity (a measure of network division) was 0.7125. LLMs like Meta-Llama (0.7257) and Gemma (0.7299) were remarkably close, whereas equation-based models struggled to capture the same level of community distinction.
  • Stance Tracking: ChatGPT and Qwen demonstrated the highest accuracy in replicating real-world opinion trends over time.
  • Semantic Clustering: Echo chambers are not just about who follows whom; they involve the narrowing of vocabulary. LLM agents naturally formed tighter semantic clusters than even real-world users, showing a high degree of linguistic convergence within groups.

Limitations and Future Work

While promising, LLM agents currently lack the full "richness and variability" of human language, often producing more repetitive discourse than real-world users. Additionally, the computational cost of simulating thousands of agents is high, and models like Llama 3.1 showed sensitivity to prompt formatting. Future work will focus on incorporating more diverse training data and refined prompt engineering to better replicate the complex reality of human social media interactions.

Summary updated

BibTeX
@misc{gu2025large,
  author = {Chenhao Gu and Ling Luo and Zainab Razia Zaidi and Shanika Karunasekera},
  title = {{Large Language Model Driven Agents for Simulating Echo Chamber Formation}},
  year = {2025},
  eprint = {2502.18138},
  archivePrefix = {arXiv},
  url = {https://arxiv.org/abs/2502.18138},
}
Figure