[KongchangAI]
· 1 min read· 920 words

SwarmEvolve: Latent-Space Agent Swarms Accelerate Evolutionary Search

SwarmEvolve: Latent-Space Agent Swarms Accelerate Evolutionary Search

SwarmEvolve uses hundreds of low-cost agents communicating in latent space for evolutionary search, beating text methods in both speed and quality.

SwarmEvolve proposes a latent-space communication framework for evolutionary search, replacing traditional LLM textual chain-of-thought iteration with hundreds of low-cost agents. Each agent reasons directly in hidden-state space and shares information via KV caches, avoiding decoding overhead. A novelty filter preserves distinctive ideas using hidden-state vector distances, while an aggregator combines cluster members' KV caches for latent-space crossover. On 21 math and science problems, SwarmEvolve achieved the highest average score, reaching in a median of 3–8 minutes the best scores other state-of-the-art frameworks need 60 minutes for. With Qwen3 8B, it even improved AlphaEvolve's frontier-LLM solutions on some problems, demonstrating a fast, low-cost path for program search.

Traditional LLM-guided evolutionary search relies on agents generating full textual chains of thought to iteratively optimize programs, but each round of generation is slow and must be repeated to maintain population diversity, resulting in low overall efficiency. SwarmEvolve proposes a new framework: each round deploys hundreds of low-cost agents that reason directly in latent space without decoding to text, and share information by passing KV caches. Each cluster studies the problem from a different angle, a novelty filter preserves the most distinctive ideas by measuring distances between agents' hidden-state vectors, and an aggregator agent receives the combined KV cache of all cluster members, allowing ideas to cross-pollinate naturally in latent space. On 21 mathematical discovery and scientific computing problems, SwarmEvolve achieved the highest average score, and reached the best scores that other state-of-the-art frameworks need 60 minutes to obtain in a median of just 3 to 8 minutes. On several problems, SwarmEvolve with Qwen3 8B even improved upon solutions that AlphaEvolve first found with frontier LLMs. This work shows that agent swarms communicating in latent space offer a fast, low-cost approach to program search for scientific problems.

SwarmEvolve framework diagram

Latent-Space Communication: Bypassing the Text Bottleneck

The core innovation of SwarmEvolve is replacing textual chains of thought with latent-space reasoning. In traditional methods, the LLM must generate lengthy textual explanations each round, and must generate multiple times to maintain population diversity, which becomes a speed bottleneck. SwarmEvolve lets each agent reason directly in hidden-state space without decoding to natural language, and passes information through KV caches. This design greatly reduces generation overhead while preserving the ability to exchange information among agents. A swarm of hundreds of low-cost agents can explore different directions in parallel, and the KV-cache sharing mechanism ensures effective integration of knowledge.

KV cache refers to the historical key-value pairs (Key/Value) cached by large language models during autoregressive generation, used to avoid recomputing already-processed tokens. In SwarmEvolve, agents do not decode hidden states into text but instead directly share KV caches, enabling other agents to "read" the intermediate representations of their reasoning traces. This sharing is equivalent to passing information in latent space, preserving the structured information of the reasoning process while eliminating the overhead of text decoding and re-encoding. The combination and passing of KV caches thus become a lightweight channel for inter-agent communication and a key technical foundation for enabling hundreds of agents to collaborate in parallel.

Novelty Filtering and Latent-Space Crossover

To maintain population diversity, SwarmEvolve introduces a novelty filter: it selects the most distinctive ideas by computing distances between agents' hidden-state vectors. This avoids the redundancy caused by the randomness of text generation in traditional methods. More ingeniously, crossover occurs naturally in latent space—the aggregator agent receives the combined KV cache of all cluster members, thereby fusing different lines of thought. This mechanism requires no explicit textual recombination yet achieves efficient idea hybridization. Each cluster studies the problem from a different angle, further enhancing the breadth of exploration.

Hidden-state vectors refer to the internal representations produced by each Transformer layer when an LLM processes input. SwarmEvolve takes an agent's hidden state at the end of reasoning (usually the last layer or a pooled vector) as the semantic summary of its "idea." By computing cosine or Euclidean distances between these vectors, one can quantify how much different agents' exploration directions differ. The larger the distance, the more distinctive the idea. The novelty filter accordingly preserves the individuals with the greatest distances, thereby maintaining population diversity at the latent-space level and avoiding the semantic loss and high computational cost of deduplication based on text similarity in traditional methods.

Experimental Performance: Dual Advantages in Speed and Quality

On 21 mathematical discovery and scientific computing problems, SwarmEvolve achieved the highest average score. Even more striking is its speed: it reaches the best scores that other state-of-the-art frameworks need 60 minutes to achieve in a median time of just 3 to 8 minutes. On some problems, SwarmEvolve with Qwen3 8B even improved upon solutions that AlphaEvolve first found with frontier LLMs. This shows that the latent-space swarm method is not only fast but can also surpass text-reasoning-based approaches in solution quality. The swarm collaboration of low-cost agents achieves efficient search through latent-space communication.

AlphaEvolve is an evolutionary program search framework proposed by DeepMind that uses frontier LLMs (such as Gemini) to generate code variants and has discovered improved algorithms for mathematical and computational problems. AlphaEvolve relies on full textual chains of thought for iteration, with high generation cost per round, but achieves notable results thanks to the reasoning power of strong LLMs. The significance of comparing SwarmEvolve with AlphaEvolve lies in this: the former uses swarms of low-cost models and latent-space communication to reach, and even improve upon, solutions that the latter can obtain only with frontier LLMs on some problems. This suggests that search efficiency and the design of communication mechanisms may be more critical than simply stacking model parameters.

Implications for AI-Driven Scientific Discovery

SwarmEvolve demonstrates the potential of latent-space communication in program search. Traditional evolutionary search is constrained by the serial nature of text generation and the cost of maintaining diversity, whereas latent-space swarms significantly improve search efficiency through parallel, low-cost agent collaboration. This approach does not rely on the massive parameter counts of frontier LLMs, yet can achieve better results on specific problems, offering a new direction for AI-assisted scientific discovery. In the future, latent-space communication may extend to a broader range of optimization problems, advancing low-cost, high-efficiency automated program search.

#SwarmEvolve#latent space#evolutionary search#KV cache#AI scientific discovery#LLM agents
Share:

Related articles