SwarmEvolve: Latent Agent Swarms for Evolutionary Discovery and Optimization
Abstract
LLM-guided evolutionary search uses AI agents to improve programs for mathematical and computational problems by iteratively refining solutions and combining high-scoring methods. However, the process is often slow because the LLM generates a long textual chain of thought for each round and must repeat this generation many times to maintain population diversity. We present SwarmEvolve, a framework in which hundreds of low-cost agents per round work in swarms, reason in latent space without decoding to text, and share information by passing KV caches. Each swarm studies the problem from a different angle. A novelty filter keeps the most distinct agent ideas by directly measuring the distances between the agents' hidden state vectors. Crossover of ideas happens naturally in latent space, as a summarizer agent receives the combined KV caches of all swarm members. On 21 problems in mathematical discovery and scientific computing, SwarmEvolve gets the highest average score and needs a median of only 3 to 8 minutes to reach the best scores that other state-of-the-art frameworks reach in 60 minutes. On several problems, SwarmEvolve with Qwen3 8B improves on the solutions that AlphaEvolve first found with frontier LLMs. Our work shows that agent swarms that communicate in latent space offer a fast, low-cost approach to program search for scientific problems.
Community
Author here!
SwarmEvolve is an LLM-guided evolutionary search framework for mathematical discovery and optimization.
Unlike many existing frameworks, SwarmEvolve runs swarms of hundreds of small agents that use latent reasoning and communicate through KV cache transfer, so they never write text. As a result, SwarmEvolve is much faster, more scalable, and more diverse in the ideas it explores.
With open-weight Qwen3 8B, 14B and 32B, SwarmEvolve takes only minutes to reach the scores that other frameworks reach in an hour, and it improves on AlphaEvolve's results on a few problems!
Like our agents, we think better as a swarm, so questions and ideas are very welcome!
Get this paper in your agent:
hf papers read 2611.08483 Don't have the latest CLI?
curl -LsSf https://hf.co/cli/install.sh | bash Models citing this paper 0
No model linking this paper
Datasets citing this paper 0
No dataset linking this paper
Spaces citing this paper 0
No Space linking this paper