NeurIPS 2026Coming to NeurIPS?Explore papers, orals & directions

BEAM: Bi-level Memory-adaptive Algorithmic Evolution for LLM-Powered Heuristic Design

Chuyang Xiang, Yichen Wei, Jiale Ma, Handing Wang, Junchi YanarXiv 2026

TL;DR

BEAM reformulates automatic heuristic design as a bi-level optimization problem, separating high-level algorithmic structure evolution from low-level function implementation. By combining Genetic Algorithms, Monte Carlo Tree Search, and an adaptive memory module, BEAM enables Large Language Models (LLMs) to design complete, highly complex optimization solvers from scratch, significantly outperforming existing single-layer methods and state-of-the-art human-designed solvers.

What Problem Does This Paper Address?

Large Language Models (LLMs) have shown great promise in automatic heuristic design through Language Hyper-Heuristics (LHHs). However, most existing LHHs suffer from a major limitation: they only excel at optimizing a single, isolated function within a pre-defined, human-designed solver framework.

When tasked with designing an entire algorithm from scratch, single-layer evolution methods falter. They lack high-level algorithmic modeling, meaning they treat complex code as a monolithic block. This leads to massive token consumption, code generation errors, and a tendency to degrade into random search because the LLM cannot easily discern which specific code modification caused a change in performance. Furthermore, these methods lack structured external knowledge, often causing the LLM to get stuck or generate solutions that violate problem constraints.

Fig. 1: LHH Usage: 1) Single function design (used in [7], [11], [12]) for a given algorithm structure. 2) Hybrid algo- rithm design (proposed): designing a whole solver with given heuristic components. 3) Entire algorithm design: designing algorithms from scratch.

Methods

To mirror how human experts design algorithms, the authors introduce BEAM (Bi-level Memory-adaptive Algorithmic Evolution). BEAM splits the problem into two distinct layers:

  1. Exterior Layer (Algorithmic Structure): Uses a Genetic Algorithm (GA) to evolve the macro-architecture of the algorithm, utilizing function placeholders (e.g., defining where a mutation or local search should happen without writing the code yet).
  2. Interior Layer (Function Realization): Employs Monte Carlo Tree Search (MCTS) to systematically explore and implement the specific code for those placeholders. It also includes an automated code-fixing process to handle compilation or runtime errors.
Fig. 2: Pipeline of our BEAM. The exterior layer designs the heuristic (code) structure (the heuristic()) via genetic evolution; the interior layer designs the functions (the func i()s) by MCTS. Evaluation happens every time when designing a new function to ensure the function quality. After the entire genetic evolution, the best heuristic (code structure + functions) are printed out, and the functions (the func i()s) are stored into the adaptive memory for future code structures to call directly. As shown in our experiments (Table V), BEAM has better performance over Google’s AlphaEvolve [9].

Two core modules support this bi-level architecture:

  • Adaptive Memory (AM): A dynamic cache that stores high-performing low-level functions from previous generations. Instead of rewriting long code blocks repeatedly, the LLM can directly import elite functions, drastically reducing token usage and code noise.
  • Knowledge Augmentation (KA) Pipeline: Before generation, the LLM extracts problem-specific tags to construct a text-based knowledge repository (KnoBase) and a library of reusable heuristic components (HeuBase), preventing the model from searching blindly.
Fig. 3: Proposed KA pipeline. For each task, LLMs first sum- marize problem-specific tags and then use them to construct KnoBase and the LLM-retrieved part of HeuBase.

Datasets

BEAM was evaluated across a diverse suite of combinatorial and continuous optimization problems:

  • Traditional Single-Function Benchmarks: Traveling Salesman Problem (TSP-100 to TSP-100k using Guided Local Search), Online Bin Packing Problem (BPP using Weibull distributions), and Cost-Aware Acquisition Functions (CAF) for Bayesian Optimization.
  • Complex Complete Solver Benchmarks: Maximum Independent Set (MIS using RB and SATLIB graphs), Capacitated Vehicle Routing Problem (CVRP-100/200/500), and the Parallel Machine Scheduling Problem (PMSP).

Key Insights and Ideas

  • Decomposition Mimics Expertise: Human experts don't write complex code monolithically; they plan frameworks and reuse components. By formalizing this as a bi-level optimization problem ($\min_{\alpha} Q(\alpha, w^*(\alpha))$), BEAM makes automated code generation structurally tractable.
  • The Power of the import Statement: The Adaptive Memory module shifts the LLM's role from raw code generation to component composition. This drastically stabilizes evolution, as the model can build upon proven building blocks rather than risking syntax errors on every generation.
  • Algorithmic Recombination over Mutation: Grounding the LLM with a HeuBase allows it to successfully combine cutting-edge heuristics (like KaHIP for graph partitioning) in novel ways that single-layer prompting strategies cannot discover.

Key Results

  • CVRP Breakthrough: In hybrid algorithm design for the Capacitated Vehicle Routing Problem, BEAM reduced the optimality gap by 37.84% on aggregate compared to baseline LHHs.
  • Surpassing SOTA: On the Maximum Independent Set (MIS) problem, BEAM designed a heuristic that outperformed KaMIS, a state-of-the-art human-designed solver.
  • Higher Stability and Complexity: As shown in the benchmarking distribution, BEAM consistently produces code with the lowest average optimality gap and the smallest variance across multiple runs compared to alternatives like ReEvo and EoH.
Fig. 4: Best individual distribution. Label ‘Gap’ is the perfor- mance of the code generated by the models. It shows that the code generated by BEAM has the best average performance and the smallest variance among the three models.

Limitations and Future Work

The authors note that BEAM exhibits a tendency to overcomplicate solutions for simple objectives. Because the framework is designed to handle deep structural complexity, it often generates unnecessarily long code blocks for trivial tasks where a 20-line script would suffice.

Future work will focus on expanding BEAM to even more complex, multi-modal domains and developing more automated, efficient pipelines for the Knowledge Augmentation stage.

Summary updated

BibTeX
@misc{xiang2026beam,
  author = {Chuyang Xiang and Yichen Wei and Jiale Ma and Handing Wang and Junchi Yan},
  title = {{BEAM: Bi-level Memory-adaptive Algorithmic Evolution for LLM-Powered Heuristic Design}},
  year = {2026},
  eprint = {2604.12898},
  archivePrefix = {arXiv},
  url = {https://arxiv.org/abs/2604.12898},
}
Figure