HMACE: Heterogeneous Multi-Agent Collaborative Evolution for Combinatorial Optimization

Yuping Yan, Jirui Han, Fei Ming, Yuanshuai Li, Yaochu JinarXiv 2026

TL;DR

HMACE introduces a heterogeneous multi-agent evolutionary framework that automates heuristic design for complex combinatorial optimization problems (COPs). By splitting the evolutionary process into four specialized agent roles and using a behavior-aware memory archive, it achieves state-of-the-art solution quality while slashing LLM token costs by up to an order of magnitude.

What Problem Does This Paper Address?

Combinatorial Optimization Problems (COPs)—such as the Traveling Salesman Problem (TSP) or the Bin Packing Problem (BPP)—underpin global logistics, scheduling, and manufacturing. Because these problems are NP-hard, finding exact solutions at scale is computationally impossible, forcing practitioners to rely on approximate algorithms called heuristics. Historically, designing these heuristics required years of human expertise.

Recently, researchers have used Large Language Models (LLMs) to automatically generate heuristic code (e.g., FunSearch, EoH). However, these early frameworks suffer from two major bottlenecks:

  1. Premature Convergence: They lack structured exploration mechanisms, causing the search to get stuck in local optima.
  2. Cognitive Entanglement: They rely on monolithic workflows where a single prompt or agent is forced to handle strategy planning, code generation, evaluation, and reflection simultaneously, leading to role interference and poor performance.
Figure 1: Architectural progression of LLM-based solvers for COPs. (1) Fixed Evolutionary Search: The LLM acts merely as a generation module within a rigid, human-crafted global loop. (2) Au- tonomous Single-Agent Evolution: A monolithic agent executes all cognitive operations sequentially, which inevitably leads to cognitive entanglement. (3) Homogeneous Multi-Agent Evolution: Homo- geneous agents explore in parallel with a shared memory, but still lack specialized cognitive focus. (4) Heterogeneous Multi-Agent Evolution: By decoupling problem-solving into specialized, interactive roles, it robustly eliminates role interference and enables systematic, diversified exploration.

The authors introduce HMACE (Heterogeneous Multi-Agent Collaborative Evolution) to solve this by treating automated heuristic design as an organizational design problem rather than a sequential coding task.

Methods

HMACE breaks down a single evolutionary generation into a collaborative loop driven by four specialized, role-playing agents that communicate via narrow, typed interfaces and a shared memory archive:

  1. The Proposer: Focuses purely on strategy exploration. It reviews parent heuristics and diverse exemplars from the archive to draft new algorithmic strategies in natural language.
  2. The Generator: Takes the natural language strategy and translates it into executable Python code, strictly adhering to the task's input/output constraints without introducing unprompted algorithmic drift.
  3. The Evaluator: An external programmatic module (outside the LLM) that runs the generated code on training instances. It returns two signals: a scalar fitness score (solution quality) and a multi-dimensional behavior vector (characterizing how the heuristic behaves during execution).
  4. The Reflector: Manages the system's long-term memory using a quality-diversity archive (CVT-MAP-Elites). It maps heuristics into distinct behavioral cells, keeping only the fittest code per cell. It then performs behavior-aware retrieval to feed diverse exemplars back to the Proposer, ensuring the search explores new algorithmic spaces.

Additionally, a lightweight deterministic Pre-filtering step screens out malformed or duplicate code before it reaches the expensive evaluation phase, preserving the computational budget.

Figure 2: The overview of the HMACE framework. The proposer conditions on parent heuristics and diverse exemplars retrieved from the archive to draft strategy candidates; the generator translates each candidate into executable code; the evaluator scores candidate heuristics on the training set; and the reflector maintains an archive-backed memory, retrieves diverse exemplars from different behavioral cells, and updates each cell with the best-performing candidate.

Datasets

The framework was evaluated across four classic COP benchmarks:

  • Traveling Salesman Problem (TSP): 77 instances from the standard TSPLIB library, ranging from 50 to 20,000 cities.
  • Online Bin Packing Problem (Online BPP): Evaluated on the Weibull-5k distribution, a standard benchmark for item stream packing.
  • Multidimensional Knapsack Problem (MKP): 10 synthetically generated instances under multiple knapsack capacity constraints.
  • Permutation Flow-shop Scheduling Problem (PFSP): Standard Taillard benchmark instances spanning multiple job-machine scales.

Key Insights and Ideas

  • Specialization Prevents Drift: By restricting the Generator to only write code based on the Proposer's strategy (and forbidding it from inventing new logic), the framework keeps the evolutionary search focused and interpretable.
  • Behavior over Syntax: Traditional LLM evolutionary loops select parents based purely on performance or text similarity. HMACE uses actual execution metrics (e.g., utilization quality, detour rates) to define a heuristic's "behavior." This ensures the LLM samples genuinely diverse algorithmic ideas rather than superficially rewritten code variants.
  • Shifting the Quality-Efficiency Frontier: More agents usually mean more token consumption. HMACE proves the opposite: by using a Reflector to avoid redundant evaluations and a Proposer to target underexplored niches, it finds better solutions faster and cheaper than monolithic single-agent loops.

Key Results

HMACE consistently outperformed state-of-the-art single-agent and multi-agent baselines in both solution quality and token efficiency.

  • Superior Quality: In matched LLM-driven comparisons (using GPT-5.4), HMACE achieved the lowest average optimality gaps on TSP (0.464%) and Online BPP (0.223%).
  • Extreme Token Efficiency: On TSP, HMACE required just 0.13M tokens, compared to CORAL's 0.94M. On Online BPP, HMACE consumed 0.42M tokens, while the multi-agent baseline CORAL inflated to 5.48M tokens (a 13× reduction in API costs for HMACE).
Trajectory-level cost analysis on TSP construction.
Table 3: Comparisons of TSP and Online BPP. Methods marked with ∗are evaluated using GPT-5.4. For TSP, Obj. (%) reports the average optimality gap over the 50-, 100-, 200-, 500-, and 1000-city settings in Table 1; for Online BPP, Obj. (%) reports the average over the Weibull-5k rows in Table 2. Gap (%) is computed relative to the best GPT-5.4 row within each matched task block. Time (s) and Tokens report the available runtime and token logs.

Limitations and Future Work

The authors note two primary limitations:

  1. Rigid Pipeline Structure: The framework relies on a predefined, static workflow. Future iterations could benefit from dynamic agent orchestration, where workflows or role assignments adapt in real-time based on search dynamics.
  2. Memory Scaling Issues: As the generations progress, accumulating massive amounts of historical data can cause information overload and context fragmentation. Developing dynamic curation mechanisms to selectively forget or compress older strategies remains an open challenge.

Summary updated

BibTeX
@misc{yan2026hmace,
  author = {Yuping Yan and Jirui Han and Fei Ming and Yuanshuai Li and Yaochu Jin},
  title = {{HMACE: Heterogeneous Multi-Agent Collaborative Evolution for Combinatorial Optimization}},
  year = {2026},
  eprint = {2605.07214},
  archivePrefix = {arXiv},
  url = {https://arxiv.org/abs/2605.07214},
}
Figure