Papers
Topics
Authors
Recent
Search
2000 character limit reached

SwarmEvolve: Latent Agent Swarms for Evolutionary Discovery and Optimization

Published 5 Nov 2026 in cs.AI and cs.NE | (2611.08483v1)

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.

Summary

  • The paper introduces SwarmEvolve, a system optimizing evolutionary program search by using latent agent swarms, achieving 5x to 13x more evaluations per hour of high-quality candidate programs than existing models.
  • Latent agents in SwarmEvolve perform recursive reasoning without decoding intermediate tokens, improving the efficiency of program exploration.
  • SwarmEvolve's architecture includes optimization operator networks, KV-caching for communication, and latent reasoning, which reduces costs and significantly enhances search and discovery capabilities.

Problem setting and contribution

“SwarmEvolve: Latent Agent Swarms for Evolutionary Discovery and Optimization” (2611.08483) addresses the computational bottleneck in LLM-guided evolutionary program search. Existing systems use LLMs to mutate, recombine, and refine candidate programs, but typically require each agent to generate textual reasoning. This imposes substantial decoding and re-encoding costs, limits the number of proposals evaluated within a fixed budget, and makes large-scale population diversity expensive.

SwarmEvolve replaces most inter-agent textual reasoning with latent computation and KV-cache communication. Its central claim is that a large population of inexpensive latent agents can provide both greater search diversity and higher program throughput than smaller populations of text-reasoning agents, while using the same underlying LLM and hardware budget. The framework is evaluated on 21 problems spanning mathematical discovery and scientific computing, using Qwen3 8B, 14B, and 32B-FP8 and comparing against OpenEvolve, ShinkaEvolve, and CodeEvolve.

The reported results are substantial. With Qwen3 8B, SwarmEvolve evaluates 5–13 times more programs per hour than the comparison systems. It reaches the 60-minute scores of the baselines in a median of approximately 3–8 minutes, depending on the model and comparison. After 15 minutes, its average score exceeds the 60-minute average of every baseline for all three model sizes. Its Qwen3 8B configuration also improves on AlphaEvolve’s published constructions on three benchmark problems, despite AlphaEvolve’s use of frontier models.

The evaluation nevertheless measures performance on fixed, executable benchmark objectives rather than unconstrained scientific discovery. Consequently, the results establish the effectiveness of the proposed search procedure under these evaluators, but do not by themselves establish that latent swarms consistently produce novel mathematical knowledge outside such programmatic settings.

Latent reasoning and cache-based communication

SwarmEvolve builds on two mechanisms. First, latent agents perform recursive reasoning without decoding intermediate tokens. After processing their prompt, an agent feeds a transformed version of its final hidden state back into the model as the next input embedding. The transformation maps the output representation into the input-embedding space using a ridge-regression alignment between the model’s input and output embeddings, followed by norm normalization. Each agent performs 40 such latent steps.

Second, agents communicate by transferring their KV caches to a summarizer. The summarizer attends to the concatenated keys and values representing the agents’ focus prompts and latent trajectories, then decodes a textual program. Because Qwen3 uses RoPE, each cache block must be positionally rotated before concatenation so that attention scores remain consistent with the block’s new position. This implementation detail is essential: KV-cache transfer is not equivalent to naïvely concatenating hidden states, because the transformer’s positional encoding is embedded in the cached keys.

The method therefore separates computation into a cheap, highly parallel latent phase and a comparatively expensive textual synthesis phase. Agents do not need to verbalize every intermediate hypothesis. Instead, the summarizer receives the latent trajectories directly and produces one executable candidate program. This design changes the computational allocation of evolutionary search: GPU time is shifted away from repeated chain-of-thought decoding and toward generating and evaluating more complete programs.

Swarm construction and evolutionary operator

Each evolutionary round launches 10 swarms, each containing 45 latent agents, for a total of 450 agents. The swarms are assigned different search roles:

  • Refinement swarms focus on improving one of the best archived programs.
  • Hybridization swarms receive several high-scoring programs and seek combinations of their ideas.
  • Exploration swarms sample programs from a broader portion of the archive and also include agents that receive no parent program.
  • Fresh-start swarms attempt to construct a new approach from the initial program rather than continuing the current elite lineage.

Within each swarm, agents receive distinct combinations of focus phrasings and reasoning perspectives. These prompts target algorithmic choices, numerical stability, mathematical formulation, feasibility, parameterization, literature-derived constructions, and alternative algorithms. Parent programs are distributed so that the latent population varies both in prompt specialization and in the program context it reads.

After 40 latent steps, SwarmEvolve applies a novelty filter. It represents each agent by the mean of its hidden states across the reasoning trajectory, centers these representations relative to the swarm mean, and applies greedy farthest-point selection under cosine distance. Thirty of the 45 agents are retained. This procedure explicitly favors coverage of the latent population rather than selecting agents solely by a textual or score-based heuristic.

The latent geometry analysis supports the intended interpretation. Agents belonging to different swarms occupy distinct regions in a principal-component projection, indicating that the focus prompts induce role-specific reasoning trajectories. Within a single swarm, agents cluster according to the parent program they read, and the novelty filter retains representatives from the different clusters. Thus, the filter appears to preserve both cross-swarm specialization and within-swarm parent diversity.

Figure 1

Figure 1: Latent-agent trajectories form distinct regions by swarm and by parent program, while farthest-point filtering retains representatives from multiple clusters.

The summarizer then receives the 30 retained latent trajectories, the swarm’s parent programs, the problem statement, and an instruction to produce a complete executable program. The resulting candidates are syntax-checked, deduplicated, evaluated, and inserted into the archive. A separate parameter-tuning agent proposes up to eight single-number edits to the current best program per round. This additional operator is important because it supplies local numerical exploitation alongside the broader structural variation produced by the swarms.

Computational rationale

The paper attributes SwarmEvolve’s throughput primarily to the removal of sequential text generation from the agent phase. In the Qwen3 8B experiments, a round of 450 latent agents requires approximately four seconds for latent reasoning and 2.6 seconds for latent communication on average, whereas textual reasoning in the baselines consumes most of the GPU runtime. SwarmEvolve evaluates approximately 734 programs in a 60-minute run, compared with 158 for OpenEvolve, 99 for ShinkaEvolve, and 81 for CodeEvolve under the reported configurations.

The comparison is not merely an argument about raw model size. All methods use Qwen3 models, and the baselines are served with production-oriented inference optimizations including continuous batching, prefix caching, and CUDA graphs. SwarmEvolve’s advantage instead follows from its altered inference workload: hundreds of latent trajectories are executed in a batch, shared parent-program prefixes are reused through paged attention, and novelty filtering operates directly on hidden states rather than requiring an external embedding model and an additional LLM judge.

This yields an important implication for evolutionary search. If evaluator calls are sufficiently cheap or parallelized, then increasing the number of candidate programs can dominate increasing the amount of textual reasoning per candidate. SwarmEvolve makes this tradeoff explicit: its summarizers still decode programs, but most population members are represented by continuous latent trajectories rather than verbose textual transcripts.

Figure 2

Figure 2: Across 21 problems, SwarmEvolve generates more programs, obtains higher early scores, and reaches baseline 60-minute scores substantially sooner.

Empirical performance

The main benchmark contains 16 problems drawn from the AlphaEvolve problem suite and five newly designed scientific-computing tasks. The mathematical tasks cover packing, geometric point distributions, autocorrelation inequalities, uncertainty inequalities, additive combinatorics, and the dimension-11 kissing-number construction. The scientific tasks cover sparse linear systems, non-normal eigenvalue computation, viscous Burgers, convection-diffusion, and Helmholtz equations.

Scores are normalized by AlphaEvolve’s published objective values for the mathematical tasks; therefore, a score above one indicates an improvement over the corresponding AlphaEvolve construction. Scientific-computing scores measure the number of correct digits relative to high-fidelity reference solutions. Each framework receives 60 minutes, one GPU, and eight CPU evaluation cores, and each configuration is run with three seeds.

SwarmEvolve achieves the highest average score for every tested model:

Model SwarmEvolve OpenEvolve ShinkaEvolve CodeEvolve
Qwen3 8B 0.804 0.693 0.642 0.700
Qwen3 14B 0.837 0.771 0.686 0.739
Qwen3 32B-FP8 0.869 0.774 0.733 0.731

The Qwen3 8B SwarmEvolve average exceeds the averages of all three baselines using Qwen3 32B-FP8. This is a particularly strong result because it suggests that search organization and inference efficiency can compensate for a substantial model-scale difference under a fixed wall-clock budget. With Qwen3 32B-FP8, SwarmEvolve solves all five sparse-linear-system tasks to full accuracy, a result not achieved by any baseline run.

The per-problem trajectories show that the advantage is concentrated early but usually persists to the end of the hour. With Qwen3 8B, SwarmEvolve finishes with the highest score on 18 of 21 problems; the corresponding numbers are 16 of 21 for Qwen3 14B and 17 of 21 for Qwen3 32B-FP8. The paper reports that its trajectories generally rise most steeply during the first few minutes, consistent with the hypothesis that heterogeneous swarms cover multiple algorithmic directions before the baselines have generated comparable numbers of candidates.

Figure 3

Figure 3: With Qwen3 8B, SwarmEvolve’s score trajectories rise rapidly and finish highest on 18 of 21 problems.

Figure 4

Figure 4: With Qwen3 14B, SwarmEvolve finishes highest or tied for highest on 16 of 21 problems.

Figure 5

Figure 5: With Qwen3 32B-FP8, SwarmEvolve finishes highest or tied for highest on 17 of 21 problems.

Mathematical constructions and scientific solvers

The strongest individual claims concern several mathematical constructions. For 26-circle packing in the unit square, SwarmEvolve obtains a radius sum of approximately 2.635983, matching the reported verified best-known construction and exceeding the OpenEvolve, ShinkaEvolve, and CodeEvolve values of approximately 2.615, 2.626, and 2.614, respectively.

Figure 6

Figure 6: SwarmEvolve matches the verified best-known 26-circle packing with a radius sum of 2.636.

For the Heilbronn problem with 11 points in an equilateral triangle, SwarmEvolve obtains a normalized minimum triangle area of 0.0223. OpenEvolve obtains only 0.0016, while ShinkaEvolve and CodeEvolve obtain 0.0200 and 0.0222. The discrepancy is large enough to indicate that the evolutionary search can discover qualitatively different algorithmic constructions, rather than merely optimizing a common local parameterization.

Figure 7

Figure 7: SwarmEvolve’s 11-point construction attains a normalized minimum triangle area of 0.0223, compared with 0.0016 for OpenEvolve.

The autocorrelation tasks provide more direct evidence of improvement over AlphaEvolve’s published constructions. With Qwen3 8B, SwarmEvolve reaches approximately 0.9214 on the second autocorrelation inequality, compared with AlphaEvolve’s 0.8963, and approximately 1.4600 on the third inequality, compared with the evaluator-consistent AlphaEvolve value of 1.4688. The latter is an improvement because the objective is minimized. With Qwen3 14B and 32B-FP8, the second inequality reaches approximately 0.9314 and 0.9290, while the third reaches approximately 1.4602 and 1.4592. These comparisons require care because the evaluator’s definition for the third inequality differs from the expression used for AlphaEvolve’s published bound; the paper explicitly adjusts the reference value to maintain a consistent comparison.

On the uncertainty inequality, SwarmEvolve does not exceed AlphaEvolve’s best overall value because the benchmark restricts candidates to a Hermite-polynomial family, whereas AlphaEvolve’s best value uses Laguerre polynomials. Within the restricted Hermite family, SwarmEvolve reaches the same approximate value as AlphaEvolve’s Hermite construction with Qwen3 32B-FP8. This result illustrates that benchmark design and evaluator constraints can materially affect claims of improvement.

The scientific-computing tasks show that the method can evolve numerical algorithms rather than only static geometric constructions. For Burgers’ equation at viscosity ν=0.001\nu = 0.001, SwarmEvolve evolves a solver using 8192 grid points and a two-stage Runge–Kutta method, producing lower error away from the shock than the comparison programs. For convection-diffusion, it selects a substantially finer 768×768768 \times 768 grid, reducing error near the outflow boundary layers. For Helmholtz, it evolves an 818×818818 \times 818 discretization, improving accuracy by increasing the number of grid points per wavelength.

Figure 8

Figure 8: For the low-viscosity Burgers problem, SwarmEvolve’s evolved solver is most accurate away from the shock at x=0x=0.

Figure 9

Figure 9: For convection-diffusion, the principal errors occur in the thin outflow boundary layers and along the characteristic structure.

Figure 10

Figure 10: For Helmholtz, increasing the grid resolution reduces the discretization error as the number of points per wavelength increases.

These results also expose a limitation of score interpretation. In several scientific tasks, the discovered improvement is primarily a choice of discretization resolution, solver, or time step. That is a valid optimization under the stated evaluator, but it conflates algorithmic innovation with computational-resource allocation. The benchmark therefore tests whether the framework can discover effective executable strategies, not whether it can derive uniformly superior numerical methods at equal computational cost.

Ablation and scaling analysis

The paper compares latent reasoning with text reasoning under matched budgets. Replacing 40 latent steps with up to 40 text tokens lowers the average score from 0.804 to 0.796; allowing up to 256 text tokens lowers it further to 0.767. Program throughput falls from 734 candidates per hour with latent reasoning to 663 with 40-token reasoning and 402 with 256-token reasoning.

The result is notable because the longer text budget does not improve search quality. The authors attribute this partly to context saturation: the summarizer’s context window is limited to 32,768 tokens, and longer reasoning messages can overwhelm the available context. The implication is not that textual reasoning is intrinsically less informative, but that, within this architecture and budget, its communication cost reduces the number of evolutionary iterations enough to outweigh any benefit from longer explicit traces.

The swarm-size ablation compares 0, 15, 45, and 75 latent agents per swarm. Larger swarms improve the best score during the early portion of search, particularly within the first 100–150 evaluated programs. However, the final 60-minute scores converge within bootstrap uncertainty intervals. This supports a more specific conclusion than “more agents are better”: larger latent populations improve early coverage, but their marginal value saturates once the shared model’s blind spots dominate.

Figure 11

Figure 11: Increasing latent-agent count improves early search performance, while different swarm sizes converge later in the run.

Figure 12

Figure 12: The gain from latent agents relative to zero-agent swarms is largest during the first approximately 100 evaluations and diminishes later.

This saturation is theoretically consequential. Since all agents share the same model and latent representation, increasing population size does not guarantee access to fundamentally new abstractions. Diversity generated by prompt variation and parent-program assignment may be sufficient for early exploration, but it cannot eliminate model-level systematic errors. The experiments therefore support scaling the population for rapid initial discovery, while indicating that model diversity or independently trained agents may be needed to extend late-stage improvement.

Limitations and open questions

The architecture imposes three direct constraints. First, all agents and summarizers must use the same LLM because KV caches are model-specific. Cross-model swarms would require a learned translation between cache representations or another compatible communication mechanism. Second, the implementation assumes standard attention. State-space, linear-attention, and hybrid architectures compress history into fixed-size states, and the paper does not provide a mechanism for merging multiple such states during latent communication. Third, KV-cache memory grows with the number of agents, latent steps, transformer layers, and model width. The largest experiments consequently require substantial GPU memory.

The empirical comparisons also leave several methodological questions open. Baseline frameworks retain their default configurations, so the results demonstrate superiority under the selected implementations rather than under an exhaustive hyperparameter-matched comparison. The benchmark uses three seeds per condition, which is useful but limited for highly stochastic evolutionary processes. Several problems are inherited from prior benchmark suites, and the normalized scores depend on evaluator definitions, feasibility tolerances, and in some cases restrictions that exclude the broader function family used by the reference method.

Most importantly, the paper does not isolate the contributions of all design choices. Latent reasoning, 450-agent population size, swarm specialization, novelty filtering, cache communication, parent-program allocation, and parameter tuning are combined in the main system. The text-reasoning ablation establishes the importance of latent computation under the tested setup, while the swarm-size study establishes an early benefit from larger populations, but the independent effect of cache-based crossover, focus taxonomy, and farthest-point selection remains less precisely identified. A central open question is therefore whether the observed gains arise primarily from latent inference itself, from the much larger number of agents, or from the interaction between the two.

Conclusion

SwarmEvolve presents a coherent systems-level redesign of LLM-guided evolutionary program search. Its principal contribution is to use latent reasoning for population-scale exploration and KV-cache transfer for inter-agent synthesis, thereby replacing expensive textual deliberation with batched continuous computation. Across 21 mathematical and scientific-computing problems, the framework evaluates substantially more candidates, reaches baseline scores several times faster, and obtains the highest mean score for Qwen3 8B, 14B, and 32B-FP8.

The strongest evidence supports the paper’s narrower claim: under fixed GPU-time budgets and executable evaluators, latent agent swarms can improve the throughput and early effectiveness of evolutionary search. The remaining question is how well the approach extends beyond shared-model, standard-attention architectures and whether its late-stage search saturation can be addressed without sacrificing the efficiency that produces its principal advantage.

Paper to Video (Beta)

No one has generated a video about this paper yet.

Whiteboard

Explain it Like I'm 14

1. What is the paper about?

The paper introduces SwarmEvolve, a way to use artificial intelligence to discover better computer programs for difficult mathematics and science problems.

The main idea is to create a large “swarm” of small AI agents. Each agent tries to improve a program in a slightly different way. The agents then share their ideas and combine them into new programs.

Unlike most AI systems, which explain their thoughts using written words, SwarmEvolve lets the agents “think” using internal numerical representations. This makes the process much faster and cheaper.

2. What questions does the research ask?

The main research question is:

Can many inexpensive AI agents working together make program discovery faster and better?

The authors especially wanted to find out:

  • Can hundreds of AI agents explore more possible solutions than a small number of agents?
  • Can agents share ideas without writing long messages?
  • Can this method discover better programs in less time?
  • Can a small, open-source AI model compete with much larger and more expensive AI systems?

The programs being searched for include mathematical constructions, algorithms, and scientific computing methods, such as programs for solving equations.

3. How does SwarmEvolve work?

SwarmEvolve uses a method called evolutionary search. This is similar to natural selection:

  1. Start with one or more basic programs.
  2. Create changed versions of those programs.
  3. Test how well each version works.
  4. Keep the best versions.
  5. Continue improving them over many rounds.

It is like breeding racing cars: build many different cars, test their speed, keep the fastest ones, and use their useful features to design the next generation.

AI agents in swarms

In each round, SwarmEvolve creates 10 swarms, with 45 agents in each swarm. This gives a total of 450 agents.

Different swarms have different jobs. For example:

  • Some try to improve the best program.
  • Some combine ideas from several good programs.
  • Some explore unusual or less-tested approaches.
  • One swarm starts from a basic program and tries to find a completely different solution.

This is like asking different teams of students to solve the same puzzle, with each team using a different strategy.

Latent reasoning

Usually, an AI reasons by writing text, such as:

“First, I will try this method. It might work because…”

SwarmEvolve uses latent reasoning instead. The AI works with hidden numerical patterns inside the model rather than turning every thought into words.

These hidden patterns are called hidden states. They can be thought of as the AI’s internal notes. The agents do not need to write out every thought, which saves time.

An analogy would be the difference between:

  • Writing a long explanation of every idea, or
  • Thinking quickly using private mental images and then sharing only the final useful answer.

Sharing information through KV caches

The agents communicate using something called a KV cache. This is a stored collection of the information an AI has already processed.

Instead of sending written messages to one another, the agents pass their internal information to a summarizer agent. The summarizer reads the combined information and writes a new program.

This is similar to several students solving different parts of a problem and giving their rough notes to one student, who combines the ideas into one final answer.

Choosing different ideas

Some agents may think in almost exactly the same way. Keeping all of them would waste time.

SwarmEvolve compares the agents’ hidden states and removes the most similar ones. It keeps the agents with the most different ideas. This is called a novelty filter.

The purpose is to make sure the swarm contains a variety of approaches rather than many copies of the same idea.

Testing the programs

After a new program is created, the system:

  • Checks whether the program is written correctly.
  • Runs it on the problem.
  • Gives it a score.
  • Stores the program and its score in an archive.

The best programs are then used in later rounds.

4. What experiments were performed?

The researchers tested SwarmEvolve on 21 problems from mathematics and scientific computing.

These included problems involving:

  • Packing circles and shapes efficiently.
  • Geometry.
  • Number patterns and combinatorics.
  • Statistical analysis.
  • Sparse systems of equations.
  • Eigenvalues.
  • Differential equations used in science and engineering.

They compared SwarmEvolve with three other AI-based evolutionary systems:

  • OpenEvolve
  • ShinkaEvolve
  • CodeEvolve

They used three versions of the Qwen3 LLM and gave each method 60 minutes on one GPU.

5. What did the researchers find?

SwarmEvolve found better solutions

SwarmEvolve achieved the highest average score with all three AI model sizes.

It often produced the best result on individual problems as well. In some scientific computing tests, the largest version of SwarmEvolve solved problems with full accuracy, while the comparison systems did not.

It was much faster

SwarmEvolve tested 5 to 13 times more programs per hour than the other systems.

The comparison systems spent much of their time writing long chains of thought. SwarmEvolve avoided this costly step by using latent reasoning.

The researchers found that SwarmEvolve often reached, in only 3 to 8 minutes, the score that other systems reached after a full 60 minutes.

A smaller model could beat larger systems

SwarmEvolve using the smaller Qwen3 8B model had a higher average score than the comparison systems using the much larger Qwen3 32B model.

This is important because smaller models require less computing power and are cheaper to run.

It improved some results from AlphaEvolve

On three problems, SwarmEvolve using Qwen3 8B found solutions better than solutions originally discovered by AlphaEvolve using much more powerful “frontier” AI models.

For example, it found an improved arrangement for packing circles into a square and improved some mathematical bounds involving sequences.

The experiments showed that different swarms occupied different regions of the AI’s hidden space. This suggests that the swarms were genuinely exploring different kinds of ideas.

The novelty filter also kept agents with different ways of thinking. This helped the system avoid repeatedly trying nearly identical solutions.

Latent reasoning worked better than text reasoning

The researchers replaced latent reasoning with ordinary written reasoning and compared the results.

The latent version:

  • Tested more programs.
  • Took less time.
  • Achieved the best average score.

When the AI had to write longer explanations, the process became slower and sometimes overloaded the amount of information the summarizer had to read.

6. Why are these findings important?

Finding good programs for mathematics and science can require trying thousands or millions of possibilities. If each attempt takes a long time, the search becomes too expensive.

SwarmEvolve makes this search more efficient by:

  • Running hundreds of agents at once.
  • Allowing agents to explore different possibilities.
  • Sharing internal information without long written messages.
  • Testing many more programs in the same amount of time.
  • Using smaller and cheaper AI models.

This could help researchers design faster algorithms, better computer simulations, and improved methods for solving scientific equations.

7. What are the limitations?

The paper also explains several weaknesses:

  • All agents must currently use the same AI model, because their internal information is difficult to combine if it comes from different models.
  • The method needs a large amount of computer memory to store the agents’ internal information.
  • The system works best with certain types of AI models and may not work directly with every model design.
  • The method still depends on having a reliable way to test and score programs. If there is no clear test, it is difficult to know which program is better.
  • The agents can share information quickly, but they may still share the same blind spots because they are all based on one LLM.

Conclusion

SwarmEvolve shows that AI agents do not always need to communicate by writing long explanations. They can share internal numerical information and work together as a large swarm.

The paper’s main message is that many fast, diverse, inexpensive AI agents can sometimes discover better scientific and mathematical programs than fewer, larger, more expensive systems.

If the method continues to improve, it could make computer-assisted scientific discovery more affordable. Researchers might use it to find new algorithms, improve simulations, discover mathematical patterns, and solve difficult engineering problems using only modest computing equipment.

Practical Applications

Immediate Applications

  • Scientific-computing optimization pipelines — scientific software, engineering, and research laboratories. Organizations can use SwarmEvolve now to generate and test improved programs for sparse linear systems, eigenvalue computation, PDE solvers, symbolic regression, numerical integration, and optimization. A practical workflow is to provide a baseline implementation, a deterministic evaluator, and a measurable objective such as accuracy, runtime, memory use, or convergence rate. The system can then return the highest-scoring candidate together with evaluation logs and error messages. Assumptions and dependencies: The problem must be expressible as executable code with an automated, reliable evaluator. Results require independent validation because evolutionary search may exploit weaknesses in the benchmark or overfit the test cases.
  • Algorithm engineering and performance tuning — software infrastructure and high-performance computing. Development teams can use latent-agent swarms to optimize sorting routines, matrix multiplication, graph algorithms, schedulers, compiler passes, data structures, and parallel kernels. Refinement swarms can modify a strong implementation, while hybridization swarms can combine techniques from several high-performing candidates. The parameter-tuning agent can automatically explore numerical constants, thresholds, block sizes, and solver tolerances. Assumptions and dependencies: Candidate programs must run in a sandbox and be evaluated across representative workloads. Hardware-specific optimizations may require access to the target CPU, GPU, compiler, and runtime environment.
  • Rapid exploration of mathematical constructions — mathematics and theoretical computer science. Researchers can encode construction problems such as packing, geometric arrangements, combinatorial designs, bounds, and discrete optimization tasks into objective-driven search environments. SwarmEvolve can explore multiple proof-inspired or construction-inspired directions in parallel, potentially identifying candidates that merit formal mathematical analysis. The reported improvements over AlphaEvolve-style constructions suggest that relatively small open-weight models may be useful for inexpensive exploratory searches. Assumptions and dependencies: A numerical score is not equivalent to a proof. Candidate constructions require exact verification, formal proof, or exhaustive checking before publication.
  • Research-assistant tooling for program discovery — academia and industrial R&D. A deployable tool could accept a research question, baseline code, evaluator, and resource budget, then produce an archive of candidate programs, scores, failure logs, and mutations. This would support researchers who need to explore many implementation hypotheses without manually writing every variant. The archive could also make the search process reproducible by recording parent programs, prompts, seeds, hardware, and evaluation results. Assumptions and dependencies: The current method is best suited to well-specified computational tasks rather than open-ended research questions. Human researchers remain necessary to interpret, validate, and explain the generated solutions.
  • Low-cost on-premises AI search — universities, startups, and smaller laboratories. Because the experiments report strong performance using Qwen3 8B on a single GPU, institutions without access to frontier-model APIs can run comparable exploratory workflows using open-weight models. This can reduce dependence on external inference services and lower the cost of repeated program-search experiments. Assumptions and dependencies: The reported hardware and model performance may not transfer directly to all GPUs, models, or problem domains. KV-cache memory is a significant constraint, especially with many agents, long latent trajectories, or larger models.
  • Automated regression and benchmark improvement — software quality assurance. The framework can be integrated into continuous benchmarking systems that search for faster or more accurate implementations while retaining existing tests as hard correctness constraints. For example, a nightly workflow could evolve numerical kernels or database query strategies and submit only candidates that improve performance without reducing test coverage. Assumptions and dependencies: Evaluators must include correctness tests, adversarial cases, and resource limits. Otherwise, the optimizer may produce brittle solutions that perform well only on the benchmark.
  • Evaluation of diverse solution strategies — education and research training. In advanced programming, numerical methods, or optimization courses, instructors could use the system to generate multiple implementations of the same task and compare their accuracy, complexity, and design choices. Students could inspect the evolutionary archive to study how candidate solutions improve over time. Assumptions and dependencies: Generated programs need human review and clear attribution policies. The system should supplement, rather than replace, instruction in algorithmic reasoning and mathematical justification.
  • Personal and small-team optimization tools — daily technical work. Developers could use a local application to optimize repetitive scripts, data-processing pipelines, spreadsheet formulas translated into code, or small simulation programs. A user would provide a baseline script and a measurable goal, such as lower execution time or reduced memory consumption. Assumptions and dependencies: This is practical only for tasks with safe test data and deterministic or statistically stable evaluation. Sensitive source code and data should remain within an appropriately secured environment.

Long-Term Applications

  • Automated discovery of scientific models and numerical methods — physics, climate science, biology, and engineering. At larger scale, SwarmEvolve could search for discretization schemes, constitutive equations, surrogate models, control laws, and simulation algorithms. Different swarms could specialize in physical constraints, numerical stability, computational cost, or agreement with experimental data. This could produce tools for computational fluid dynamics, materials modeling, structural analysis, and biological simulation. Assumptions and dependencies: Scientific validity requires incorporating conservation laws, dimensional consistency, uncertainty quantification, and out-of-distribution testing. More research is needed to prevent solutions that optimize numerical benchmarks while violating domain principles.
  • Healthcare and biomedical algorithm design — medical imaging, diagnostics, and drug discovery. Future systems could evolve image-processing pipelines, segmentation algorithms, physiological simulators, treatment-scheduling rules, or molecular-scoring programs. Swarms could explore accuracy–latency–fairness trade-offs while evaluators assess performance on multiple patient cohorts. Assumptions and dependencies: Clinical deployment would require privacy protection, representative datasets, prospective validation, regulatory approval, and strong safeguards against demographic bias. The current paper does not demonstrate medical reliability or clinical usefulness.
  • Robotics and autonomous systems — motion planning, control, and coordination. SwarmEvolve could search for robot controllers, trajectory planners, sensor-fusion code, multi-robot coordination policies, and energy-efficient behaviors. Latent swarms could specialize in robustness, speed, safety margins, or adaptation to different environments, while simulations and hardware tests serve as evaluators. Assumptions and dependencies: Simulation-to-real transfer, safety verification, real-time constraints, and hardware-specific evaluation are major dependencies. Generated control programs would require formal safety checks and extensive physical testing before deployment.
  • Energy-system optimization — grids, batteries, and industrial energy management. The framework could evolve dispatch algorithms, battery charging policies, demand-response strategies, power-flow solvers, and renewable-energy forecasting pipelines. A multi-objective evaluator could score candidates on cost, reliability, emissions, and resilience. Assumptions and dependencies: Real deployment depends on high-fidelity grid models, secure operational data, regulatory constraints, and guarantees against unstable or adversarial behavior. Multi-objective optimization and hard safety constraints would need to be integrated into the framework.
  • Finance and operations research — portfolio construction, trading infrastructure, and logistics. Future applications could search for execution algorithms, risk models, inventory policies, routing heuristics, and scheduling programs. Evolutionary search is particularly suitable where candidate strategies can be back-tested or evaluated in simulation. Assumptions and dependencies: Historical back-tests are vulnerable to overfitting, leakage, and distribution shift. Deployment would require walk-forward validation, transaction-cost modeling, compliance review, and strict risk controls; a high benchmark score alone would not justify financial use.
  • Compiler and systems co-design — computer architecture and cloud infrastructure. Larger swarms could jointly optimize compiler transformations, GPU kernels, memory layouts, query planners, network protocols, and hardware-aware numerical libraries. A future product could connect the framework to profilers and automated benchmarking systems to evolve code for specific hardware configurations. Assumptions and dependencies: This requires robust compilation, hardware-in-the-loop testing, and multi-objective evaluation of speed, energy, memory, portability, and correctness. Search costs may become substantial when each candidate requires long compilation or hardware execution.
  • Formal-methods and theorem-proving assistance — mathematics and software verification. Swarm-generated constructions could be paired with proof assistants, SAT/SMT solvers, and symbolic algebra systems. One swarm might propose a conjecture or algorithm, while another generates lemmas, invariants, or formally checkable proof scripts. This would convert the current numerical-discovery workflow into a hybrid discovery-and-verification system. Assumptions and dependencies: Latent diversity does not guarantee logically valid reasoning. Formal verification, proof checking, and specialized representations are required, and these capabilities are not evaluated in the paper.
  • Cross-model and heterogeneous agent ecosystems — scalable AI research platforms. The current implementation requires agents and summarizers to share one model because they exchange KV caches directly. In the longer term, learned translations between KV caches or other latent representations could allow specialized agents based on different models to collaborate—for example, a mathematical model, a code model, and a domain-specific scientific model. Assumptions and dependencies: Reliable cache translation, alignment across model architectures, preservation of meaning, and protection against incompatible latent representations are unresolved technical issues.
  • Distributed and large-scale discovery services — cloud computing and national research infrastructure. Multi-GPU and multi-node implementations could distribute swarms, archive management, evaluators, and long-running evolutionary searches. Compressed latent messages, cache sharing, and asynchronous evaluation could support searches involving expensive simulations or large scientific datasets. Assumptions and dependencies: The paper identifies KV-cache memory growth as a major limitation. Practical scaling will require cache compression, scheduling strategies, fault tolerance, communication-efficient aggregation, and careful control of duplicate or correlated searches.
  • Human–AI collaborative discovery platforms — research management and policy. A mature product could present researchers with a ranked set of candidate algorithms, visualizations of search diversity, evaluator traces, and explanations generated after discovery. Policymakers and funding agencies could use such platforms to support reproducible, low-cost computational experimentation across institutions. Assumptions and dependencies: The latent reasoning itself is not directly interpretable, so accountability cannot rely on the internal swarm traces alone. Provenance, reproducibility, independent replication, licensing, and disclosure of generated versus human-authored contributions would be necessary for trustworthy adoption.

Glossary

  • Activation: The numerical output produced by a neural-network layer or unit during computation. “LLMs exchange token embeddings, activations, hidden states, or KV caches instead of text messages.”
  • Alignment matrix: A matrix that maps vectors from one representation space into another. “First, an alignment matrix $\mathbf{W}_{\mathrm{a}$ maps ht\mathbf{h}_t into the input embedding space.”
  • Argmax: The operation that returns the input value or index maximizing an objective function. “j⋆=arg max⁡j∉Kj^\star = \argmax_{j \notin \mathcal{K}}”
  • Autocorrelation: The correlation of a signal or sequence with a shifted version of itself. “its step functions improve AlphaEvolve's bounds for the second and third autocorrelation inequalities.”
  • Bootstrap interval: An uncertainty interval estimated by repeatedly resampling observed data. “with 95\% bootstrap intervals.”
  • Crossover: An evolutionary operation that combines characteristics from multiple candidate solutions. “This search can be carried out through evolutionary computation, a method to iteratively improve candidate programs through variation, crossover, and selection”
  • Cosine distance: A distance measure based on the angle between two vectors, commonly defined as one minus cosine similarity. “Greedy farthest-point selection~\citep{gonzalez1985clustering} in cosine distance then adds one agent at a time”
  • Cosine similarity: A measure of similarity between vectors based on the cosine of the angle separating them. “when its cosine similarity to an archived program exceeds 0.99”
  • Decoder-only transformer: A transformer LLM architecture that generates outputs using only a decoder stack. “We use decoder-only transformer LLMs~\citep{vaswani2017attention}”
  • Differential equation: An equation involving an unknown function and one or more of its derivatives. “building robust solvers for differential equations.”
  • Embedding: A learned numerical vector representation of a token, word, or other object. “The LLM instead feeds the last hidden state ht\mathbf{h}_t back as the next input embedding et+1\mathbf{e}_{t+1}”
  • Eigenvalue: A scalar associated with a matrix that describes how a corresponding eigenvector is scaled by that matrix. “We also design five scientific computing problems on sparse linear systems, eigenvalues of non-normal matrices”
  • Evolutionary computation: A family of optimization methods inspired by biological evolution, using variation and selection over candidate solutions. “This search can be carried out through evolutionary computation”
  • Farthest-point selection: A greedy procedure that iteratively selects the point farthest from the already selected set. “Greedy farthest-point selection~\citep{gonzalez1985clustering} in cosine distance then adds one agent at a time”
  • FP8: An 8-bit floating-point numerical format used to reduce memory and computation requirements. “Qwen3 32B-FP8”
  • Frontier LLM: A leading, highly capable LLM, typically at the current state of the art. “While AlphaEvolve relies on frontier LLMs”
  • Greedy algorithm: An algorithm that makes the locally best available choice at each step. “Greedy farthest-point selection~\citep{gonzalez1985clustering}”
  • Hidden state: An internal vector representation generated by a neural network for an input position. “The output of the last layer at position tt is the last hidden state ht∈Rd\mathbf{h}_t \in \mathbb{R}^d.”
  • Hybridization: The combination of components, methods, or ideas from different candidate solutions. “Three hybridization swarms each receive five programs drawn at random from the ten best”
  • Inference: The process of using a trained model to produce predictions or outputs. “for fast inference.”
  • Latent communication: Communication between agents through internal vector representations rather than decoded text. “We present SwarmEvolve, an evolutionary search framework in which swarms of low-cost latent agents reason in latent space and communicate by passing KV caches.”
  • Latent reasoning: Reasoning performed in a model’s continuous internal representation space without generating intermediate text tokens. “In latent reasoning, the LLM instead feeds the last hidden state ht\mathbf{h}_t back as the next input embedding et+1\mathbf{e}_{t+1}”
  • KV cache: Stored attention keys and values that allow an autoregressive transformer to reuse prior computation. “The LLM stores them in a KV cache {(K(ℓ),V(ℓ))}ℓ=1L\{(\mathbf{K}^{(\ell)}, \mathbf{V}^{(\ell)})\}_{\ell=1}^{L}”
  • Linear attention: An attention mechanism designed to reduce the computational cost of standard attention, often by restructuring the attention calculation. “Linear-attention, state-space, and hybrid models compress the past into a fixed-size state”
  • MAP-Elites: An evolutionary algorithm that maintains an archive of high-performing solutions across different regions of a behavior or feature space. “AlphaEvolve and its open-source variants add a MAP-Elites archive to keep diverse programs”
  • Non-normal matrix: A matrix that does not commute with its conjugate transpose, potentially exhibiting unusual spectral and numerical behavior. “eigenvalues of non-normal matrices”
  • Novelty filter: A mechanism that retains candidate solutions considered sufficiently different from one another. “A novelty filter then keeps the agents in each swarm whose latent reasoning trajectories are farthest apart in cosine distance.”
  • Paged attention: An attention implementation that manages key-value memory in blocks or pages to improve memory efficiency. “Agents that read the same program attend to one shared copy of its KV cache through paged attention”
  • Principal component: An orthogonal direction obtained through principal component analysis that captures successively decreasing amounts of variance in data. “It projects the centered and normalized mean hidden states of the latent agents onto their first two principal components.”
  • Ridge regression: A regularized form of linear regression that penalizes large parameter values to improve stability or prevent overfitting. “The matrix $\mathbf{W}_{\mathrm{a}$ is the ridge regression solution, with regularization weight ρ\rho”
  • Rotary position embedding (RoPE): A positional encoding method that applies position-dependent rotations to query and key vectors. “The Qwen3 models that we use encode positions with rotary position embeddings (RoPE)”
  • Sparse linear system: A system of linear equations whose matrix contains mostly zero entries. “We also design five scientific computing problems on sparse linear systems”
  • State-space model: A sequence-modeling architecture that represents prior inputs using a compact evolving internal state. “Linear-attention, state-space, and hybrid models compress the past into a fixed-size state”
  • Symbolic regression: The search for mathematical expressions that fit observed data or satisfy a specified objective. “Examples include symbolic regression”
  • Throughput: The amount of work completed per unit of time. “SwarmEvolve evaluates 5 to 13 times more programs per hour than existing SOTA frameworks”
  • Top-kk sampling: A language-generation method that restricts the next-token distribution to its kk most probable tokens. “\color{brown}Top-kk”
  • Top-pp sampling: A language-generation method that samples from the smallest set of tokens whose cumulative probability reaches a specified threshold. “\color{brown}Top-pp”
  • Transformer: A neural-network architecture based primarily on attention mechanisms for processing sequences. “We use decoder-only transformer LLMs~\citep{vaswani2017attention}”
  • Variational operator: An operator or transformation used to generate a modified candidate solution in an evolutionary search process. “This search can be carried out through evolutionary computation, a method to iteratively improve candidate programs through variation, crossover, and selection”
  • Vector embedding space: A continuous numerical space in which entities such as tokens or hidden representations are encoded as vectors. “so it reasons in its continuous embedding space without sampling tokens”

Open Problems

We haven't generated a list of open problems mentioned in this paper yet.

Tweets

Sign up for free to view the 5 tweets with 404 likes about this paper.