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:
- Premature Convergence: They lack structured exploration mechanisms, causing the search to get stuck in local optima.
- 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.
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:
- 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.
- 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.
- 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).
- 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.
Datasets
The framework was evaluated across four classic COP benchmarks:
- Traveling Salesman Problem (TSP): 77 instances from the standard
TSPLIBlibrary, ranging from 50 to 20,000 cities. - Online Bin Packing Problem (Online BPP): Evaluated on the
Weibull-5kdistribution, 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
Taillardbenchmark 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).
Limitations and Future Work
The authors note two primary limitations:
- 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.
- 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