Create and explore imaginative 3D worlds with our new product Dreamfield (opens in a new tab)

SwarmEvolve: Latent Agent Swarms for Evolutionary Discovery and Optimization

SwarmEvolve replaces expensive text-based reasoning in evolutionary program search with latent computation and KV-cache communication. By running 450 latent agents per round instead of a handful of verbose text-reasoning agents, it evaluates 5–13 times more programs per hour, reaches baseline 60-minute scores in under 10 minutes, and discovers mathematical constructions that exceed both classical baselines and frontier-model systems—all using the same underlying language model and hardware budget.
Script
Evolutionary search with language models has a bottleneck: every agent must verbalize its reasoning, making large populations prohibitively expensive. SwarmEvolve flips this around by running hundreds of latent agents that never decode a word, communicating instead through key-value cache transfer to a single summarizer that writes the actual program.
Each latent agent feeds its own hidden state back into the model for 40 recursive steps, never decoding intermediate tokens. The output embedding is ridge-aligned and norm-normalized back into the input space, creating a closed reasoning loop that costs seconds instead of the minutes required for verbose chain-of-thought text.
SwarmEvolve launches 10 swarms per round, totaling 450 latent agents, each assigned a distinct search role and focus prompt. After 40 latent steps, a novelty filter retains 30 agents using farthest-point selection in hidden-state space, ensuring the summarizer sees representatives from multiple reasoning clusters rather than redundant copies of the same idea.
With Qwen3 8B, SwarmEvolve evaluates 734 programs in one hour compared to 81 for CodeEvolve, 99 for ShinkaEvolve, and 158 for OpenEvolve. It reaches their 60-minute scores in a median of 3 to 8 minutes, and its 15-minute average exceeds every baseline's full-hour average across all three model sizes.
SwarmEvolve matches the verified best-known 26-circle packing and attains a normalized triangle area 14 times better than OpenEvolve's construction for the 11-point problem. On low-viscosity Burgers' equation, it evolves an 8192-point two-stage Runge–Kutta solver that achieves the lowest error away from the shock, demonstrating that latent swarms can discover both geometric constructions and adaptive numerical algorithms.
Latent trajectories form geometrically distinct regions by swarm role and parent program, and the novelty filter preserves this diversity rather than collapsing to a single high-scoring lineage. Yet all agents share one model, so late-stage gains saturate as prompt variation cannot eliminate systematic model blind spots. You can explore the full paper, dive into the latent-space visualizations, and generate your own explainer videos at emergentmind.com.