How memory can affect collective and cooperative behaviors in an LLM-Based Social Particle Swarm
Gemini agents with memory become selfish defectors, while Gemma agents with memory become cooperative allies.
A research team from Nagoya University has published a groundbreaking study on arXiv examining how memory affects cooperation in multi-agent AI systems. The team, led by Taisei Hishiki, Takaya Arita, and Reiji Suzuki, extended the classic Social Particle Swarm model by replacing rule-based agents with LLM agents endowed with Big Five personality scores and variable memory lengths. In this simulated 2D world, agents move and repeatedly play the Prisoner's Dilemma game with their neighbors, a classic test of cooperation versus selfishness.
Using Google's Gemini-2.0-Flash, the researchers discovered memory length is a critical control parameter. Even minimal memory drastically suppressed cooperative behavior. As memory increased, the system transitioned from stable cooperative clusters, through cyclical formation and collapse, to a final state of scattered defection. Sentiment analysis of the agents' internal reasoning texts revealed that Gemini interprets longer memory increasingly negatively.
In a striking comparative experiment, the team tested the same system using Google's smaller, open-weight model, Gemma 3:4b. The results were the complete opposite: longer memory promoted cooperation, leading to the formation of dense, stable cooperative clusters. Sentiment analysis showed Gemma agents interpreted memory less negatively than their Gemini counterparts. This divergence suggests the emergent social dynamics are not just a function of the game rules, but are fundamentally shaped by the specific LLM's characteristics, potentially including its internal 'alignment' or training objectives.
The findings provide a crucial micro-level cognitive account for contradictions in prior research on memory and cooperation. They demonstrate that in Generative Agent-Based Modeling (GABM), the choice of underlying AI model isn't neutral—it actively determines the macro-level social phenomena that emerge. This has profound implications for anyone simulating economies, social networks, or organizational behavior with AI agents, as the model itself becomes a core variable in the experiment.
- Gemini-2.0-Flash agents with longer memory became less cooperative, leading to a 'scattered defection' state in Prisoner's Dilemma simulations.
- Gemma 3:4b agents showed the inverse trend: longer memory promoted cooperation and the formation of dense cooperative clusters.
- Sentiment analysis of agent reasoning revealed Gemini interprets memory negatively, while Gemma does not, pointing to model-specific 'alignment' as a key driver of social dynamics.
Why It Matters
This reveals that the AI model you choose for multi-agent simulations isn't just a tool—it's a variable that fundamentally dictates the social reality you observe.