Benchmarking LLMs' Swarm intelligence

Kai Ruan, Mowen Huang, Ji-Rong Wen, Hao Sun · DOI

Abstract

Swarm Intelligence (SI) describes the emergence of complex global behaviors from simple, local interactions among decentralized agents. While Large Language Models (LLMs) have shown promise as autonomous agents, existing benchmarks often provide them with global visibility and unlimited communication, sidestepping the core challenges of decentralized coordination. This paper introduces SwarmBench, a modular 2D grid-world environment designed to evaluate LLMs on classic swarm tasks under strict constraints of limited perception and local communication.

Introduction

In nature, biological systems like ant colonies and bird flocks perform sophisticated collective labor without central leadership. These systems rely on local information and "whispered" communication to achieve global goals. Most current multi-agent LLM benchmarks grant models "god-like" powers—global maps and predefined hierarchies—which do not reflect the realities of decentralized robotics or emergent coordination. SwarmBench seeks to fill this gap by asking: Can an LLM-driven agent coordinate effectively when it can only see its immediate surroundings and talk to its nearest neighbors?

Overview of the five SwarmBench tasks, mapping biological inspiration to grid-world simulations.

The SwarmBench Framework

SwarmBench consists of five core tasks that test different facets of collective intelligence:

  1. Pursuit: Agents must collaboratively corner a faster-moving prey.
  2. Synchronization: Reaching a consensus to toggle internal states (e.g., mimicking firefly flashes).
  3. Foraging: Discovering food sources and transporting them back to a central nest.
  4. Flocking: Arranging agents into specific geometric patterns.
  5. Transport: Cooperatively pushing a heavy, irregularly shaped obstacle to a designated exit.

Constraints and Environment

To simulate true swarm conditions, the environment imposes three critical constraints:

  • Limited Perception: Agents only observe a small $k \times k$ (typically $5 \times 5$) window around their current position.
  • Local Communication: Messages are restricted to agents within the same local observation window.
  • Physics-Based Interaction: A custom engine resolves forces, requiring multiple agents to physically align and push simultaneously to move heavy objects.

Key Insights and Coordination Dynamics

Evaluation of 13 prominent LLMs (including DeepSeek-v3, GPT-4o, and Gemini 2.0 Flash) in a zero-shot protocol revealed several emergent behaviors and failure modes:

Implicit vs. Explicit Coordination

Surprisingly, the semantic content of agent messages (e.g., sharing coordinates) correlated weakly with task success. Effective coordination was largely implicit; successful agents adapted by observing the physical movements of their peers rather than following explicit verbal instructions.

The Tactical-Strategic Disconnect

Action attribution analysis showed that while local communication influenced immediate "tactical" decisions, it failed to translate into cohesive long-term "strategic" group planning. Models often suffered from a "goldfish memory" problem, failing to recall spatial information from previous rounds, leading to redundant exploration of empty areas.

Results and Performance

Performance varied significantly across tasks and models. Gemini-2.0-flash and o4-mini were the strongest generalists, particularly in spatial tasks like Pursuit and Foraging. Claude-3.7-sonnet demonstrated superior performance in the Synchronization task.

The Transport task grid-world, where agents (numbered) must coordinate to push a heavy block (B) to an exit.

While "Flocking" was the highest-scoring task—suggesting LLMs are proficient at basic pattern matching—the "Transport" task proved to be a significant barrier. Only o4-mini and DeepSeek-r1 achieved non-zero average scores, highlighting a massive gap in current LLMs' ability to perform collaborative physical reasoning.

Conclusion

SwarmBench provides a humbling look at the current state of decentralized AI. By removing global knowledge, the benchmark exposes critical weaknesses in LLMs' spatial recall and long-term strategic planning. Future work should explore Reinforcement Learning from Verifiable Rewards (RLVR) to specifically train models for decentralized coordination and develop architectures with better long-term spatial memory.

Summary updated

BibTeX
@misc{ruan2025benchmarking,
  author = {Kai Ruan and Mowen Huang and Ji-Rong Wen and Hao Sun},
  title = {{Benchmarking LLMs' Swarm intelligence}},
  year = {2025},
  eprint = {2505.04364},
  archivePrefix = {arXiv},
  url = {https://arxiv.org/abs/2505.04364},
}
Figure