# How memory can affect collective and cooperative behaviors in an LLM-Based Social Particle Swarm

arXiv: https://arxiv.org/abs/2604.12250 · HTML: https://mlsanity.com/paper/2604.12250/

## Key facts

- No citing papers in the map yet (data through 14 Oct 2026).
- Builds on 13 of its 30 references that are in the map.
- First posted on arXiv 14 Apr 2026.

## Builds on (most cited first, 13 of 13)

- [DistilBERT, a distilled version of BERT: smaller, faster, cheaper and lighter](https://mlsanity.com/paper/1910.01108/) (2019)
- [Generative Agents: Interactive Simulacra of Human Behavior](https://mlsanity.com/paper/2304.03442/) (2023)
- [AgentVerse: Facilitating Multi-Agent Collaboration and Exploring Emergent Behaviors](https://mlsanity.com/paper/2308.10848/) (2023)
- [PersonaLLM: Investigating the Ability of Large Language Models to Express Personality Traits](https://mlsanity.com/paper/2305.02547/) (2023)
- [Playing repeated games with Large Language Models](https://mlsanity.com/paper/2305.16867/) (2023)
- [Personality Traits in Large Language Models](https://mlsanity.com/paper/2307.00184/) (2023)
- [Nicer Than Humans: How do Large Language Models Behave in the Prisoner's Dilemma?](https://mlsanity.com/paper/2406.13605/) (2024)
- [The Machine Psychology of Cooperation: Can GPT models operationalise prompts for altruism, cooperation, competitiveness and selfishness in economic games?](https://mlsanity.com/paper/2305.07970/) (2023)
- [An evolutionary model of personality traits related to cooperative behavior using a large language model](https://mlsanity.com/paper/2310.05976/) (2023)
- [Game Theory Meets Large Language Models: A Systematic Survey with Taxonomy and New Frontiers](https://mlsanity.com/paper/2502.09053/) (2025)
- [Strategies of cooperation and defection in five large language models](https://mlsanity.com/paper/2601.09849/) (2026)
- [Knowing the past improves cooperation in the future](https://mlsanity.com/paper/1901.07493/) (2019)
- [Evolutionary ecology of words](https://mlsanity.com/paper/2505.05863/) (2025)

## Abstract (arXiv)

This study examines how memory shapes the collective and cooperative dynamics of Large Language Model (LLM) agents in a multi-agent system. To this end, we extend the Social Particle Swarm (SPS) model, in which agents move in a two-dimensional space and play the Prisoner's Dilemma with neighboring agents, by replacing its rule-based agents with LLM agents endowed with Big Five personality scores and varying memory lengths. Using Gemini 2.0 Flash, we find that memory length is a critical parameter governing collective behavior: even a minimal memory drastically suppressed cooperation, transitioning the system from stable cooperative clusters through cyclical formation and collapse of clusters to a state of scattered defection as memory length increased. Big Five personality traits correlated with agent behaviors in partial agreement with findings from experiments with human participants, supporting the validity of the model. This effect of memory appeared whether or not personality was assigned. With heterogeneous personalities, individual behavior reflected the assigned traits and cooperation collapsed under long memory, whereas without personality Gemini's cooperative disposition dominated and cooperation was broadly maintained. Sentiment analysis of agents' reasoning texts showed that the model interprets memory increasingly negatively as its length grows, already in the early phase, providing a micro-level account of the suppression of cooperation. These results suggest that how an LLM interprets accumulated memory is a key driver of emergent social behavior in Generative Agent-Based Modeling.
