EPOCH: Coverage-Aware Evolution with Experiential Preference Optimization for LLM-based Automated Heuristic Design
Organizations: Georgia Institute of Technology
Abstract
LLM-based automated heuristic design (AHD) discovers heuristics for combinatorial optimization problems (COPs), where an LLM generates candidates in an evolutionary search. Existing frameworks freeze the generator or fine-tune it on a scalar fitness signal hiding which instances each heuristic covers. Reflection-based frameworks improve heuristics with natural-language feedback, but it stays in the prompt and never reaches the generator's weights. We propose EPOCH, which makes instance coverage the objective of the evolutionary search and fine-tunes the generator to internalize reflection. Parent selection, operator allocation, and stagnation recovery all optimize how well the heuristics jointly cover the training instances, so the search returns a complementary heuristic ensemble. The generator learns from its own search by experiential preference optimization. A teacher LLM returns a natural-language insight on the generated heuristics, and the generator produces new heuristics with this insight. These improvements join the preference pairs for direct preference optimization (DPO). Since DPO only teaches the generator to rank these improvements, a reflective self-distillation (RSD) term makes it more likely to generate them on its own, and the gains accumulate over the long horizon of the search. Across COPs and open-source LLM backbones, EPOCH's heuristic ensembles outperform inference-only and fine-tuned baselines and generalize across problem scales.
Figures & tables
| Method | TSP-20 | TSP-50 | TSP-100 | TSP-200 | |
|---|---|---|---|---|---|
| Classical heuristics | |||||
| Nearest Neighbor | 17.64 | 21.96 | 24.58 | 26.10 | |
| LLM-based AHD: GPT-4o-mini (closed-source) | |||||
| ReEvo | Top-1 | 10.55 | 13.89 | 15.43 | 16.64 |
| Top-3 | 9.18 | 12.12 | 13.66 | 17.01 | |
| Top-10 | 8.49 | 10.92 | 12.48 | 14.29 | |
| Method | 1k_100 | 1k_500 | 5k_100 | 5k_500 | 10k_100 | 10k_500 | Avg. | |
|---|---|---|---|---|---|---|---|---|
| Classical heuristics | ||||||||
| First-Fit | 5.02 | 0.25 | 4.65 | 0.55 | 4.36 | 0.50 | 2.55 | |
| Best-Fit | 4.77 | 0.25 | 4.31 | 0.55 | 4.05 | 0.47 | 2.40 | |
| LLM-based AHD: GPT-4o-mini (closed-source) | ||||||||
| ReEvo | Top-1 | 3.74 | 0.40 | 3.09 | 0.69 | 2.84 | 0.53 | 1.88 |
| Top-4 | 3.61 | 0.40 | 2.98 | 0.56 | 2.74 | 0.44 | 1.79 | |
| TSP | OBP | |
| EPOCH (full) | 6.79 | 0.64 |
| Reflective learning | ||
| w/o RSD | 7.17 | 0.79 |
| w/o cross-round pairs | 6.92 | 0.75 |
| w/o instance-grounded insight | 6.90 | 0.68 |
| w/o teacher reflection | 6.99 | 0.83 |
Appendix figures & tables20 assets
Supplementary material from the paper’s appendix.
Appendix
| Train | Test | |||
|---|---|---|---|---|
| Problem | Scale | #Inst. | Scale | #Inst. |
| TSP | 64 | 300 | ||
| OBP | , | 4 | 5 | |
| KP | 64 | 1,000 | ||
| Method | TSP-20 | TSP-50 | TSP-100 | TSP-200 | |
| Classical heuristics | |||||
| Nearest Neighbor | 17.64 | 21.96 | 24.58 | 26.10 | |
| Greedy Edge | 11.96 | 17.41 | 18.69 | 17.89 | |
| Nearest Insertion | 13.14 | 19.38 | 21.55 | 23.69 | |
| Christofides | 8.82 | 11.17 | 11.95 | 12.41 | |
| LLM-based AHD: GPT-4o-mini (closed-source) | |||||
| Method | 1k_100 | 1k_500 | 5k_100 | 5k_500 | 10k_100 | 10k_500 | Avg. | |
|---|---|---|---|---|---|---|---|---|
| Classical heuristics | ||||||||
| First-Fit | 5.02 | 0.25 | 4.65 | 0.55 | 4.36 | 0.50 | 2.55 | |
| Best-Fit | 4.77 | 0.25 | 4.31 | 0.55 | 4.05 | 0.47 | 2.40 | |
| LLM-based AHD: GPT-4o-mini (closed-source) | ||||||||
| ReEvo | Top-1 | 3.74 | 0.40 | 3.09 | 0.69 | 2.84 | 0.53 | 1.88 |
| Top-4 | 3.61 | 0.40 | 2.98 | 0.56 | 2.74 | 0.44 | 1.79 | |
| Method | KP-50 | KP-100 | KP-200 | |
|---|---|---|---|---|
| Classical heuristics | ||||
| First-Fit (seed) | 32.856 | 34.836 | 53.153 | |
| LLM-based AHD: Llama-3.1-8B | ||||
| ReEvo | Top-1 | 0.224 | 0.099 | 0.107 |
| Top-3 | 0.198 | 0.081 | 0.089 | |
| Top-10 | 0.170 | 0.066 | 0.071 | |
| Method | TSP-20 | TSP-50 | TSP-100 | TSP-200 | |
|---|---|---|---|---|---|
| LLM-based AHD: Qwen2.5-7B | |||||
| CALM | Top-1 | 12.08 | 16.70 | 19.38 | 21.39 |
| Top-3 | 12.08 | 16.65 | 19.32 | 21.21 | |
| Top-10 | 11.49 | 16.10 | 18.60 | 20.48 | |
| EPOCH (Ours) | Top-1 | 7.97 | 10.85 | 12.82 | 14.64 |
| Top-3 | 5.55 | 8.61 | 11.08 | 13.22 | |
| Manual & GP heuristics | LLM-based AHD | |||||||||
|---|---|---|---|---|---|---|---|---|---|---|
| Instance | Greedy | Near-ins. | Near-gr. | GPHH | ReEvo | HSEvo | MCTS-AHD | EoH-S | CALM | EPOCH |
| ts225 | 5.38 | 19.93 | 16.82 | 7.71 | 7.36 | 6.18 | 3.56 | 3.69 | 5.78 | 5.68 |
| rat99 | 22.30 | 21.05 | 21.79 | 14.09 | 17.39 | 17.72 | 16.88 | 18.50 | 14.05 | 9.87 |
| bier127 | 19.50 | 23.05 | 23.25 | 15.64 | 20.94 | 17.26 | 17.53 | 11.24 | 12.18 | 6.33 |
| lin318 | 18.75 | 24.44 | 25.78 | 14.30 | 15.47 | 16.21 | 14.48 | 14.48 | 12.73 | 11.97 |
| eil51 | 13.03 | 16.14 | 31.96 | 10.20 | 6.65 | 8.42 | 7.26 | 7.56 | 7.53 | 6.83 |
| Qwen2.5-7B | Llama-3.1-8B | |||||||
|---|---|---|---|---|---|---|---|---|
| Method | TSP-20 | TSP-50 | TSP-100 | TSP-200 | TSP-20 | TSP-50 | TSP-100 | TSP-200 |
| ReEvo | ||||||||
| HSEvo | ||||||||
| MCTS-AHD | ||||||||
| EoH-S | ||||||||
| CALM | ||||||||
| Method | Qwen2.5-7B | Llama-3.1-8B |
|---|---|---|
| ReEvo | ||
| HSEvo | ||
| EoH-S | ||
| CALM |
| Qwen2.5-7B | Llama-3.1-8B | ||||||||
|---|---|---|---|---|---|---|---|---|---|
| Method | Wilcoxon | Win | Tie | Loss | Wilcoxon | Win | Tie | Loss | |
| ReEvo | 20 | 278 | 0 | 22 | 292 | 0 | 8 | ||
| 50 | 289 | 0 | 11 | 300 | 0 | 0 | |||
| 100 | 296 | 0 | 4 | 300 | 0 | 0 | |||
| 200 | 289 | 0 | 11 | 300 | 0 | 0 | |||
| HSEvo | 20 | 295 | 0 | 5 | 292 | 0 | 8 | ||
| Method | Wilcoxon | Win | Tie | Loss | |
|---|---|---|---|---|---|
| ReEvo | 50 | 522 | 440 | 38 | |
| 100 | 657 | 273 | 70 | ||
| 200 | 825 | 66 | 109 | ||
| MCTS-AHD | 50 | 453 | 493 | 54 | |
| 100 | 544 | 367 | 89 | ||
| 200 | 515 | 309 | 176 |
| Ablation | Removed | Replacement |
| Reflective learning | ||
| w/o RSD | the RSD distillation term | plain DPO on the same pairs ( ) |
| w/o cross-round pairs | the certified cross-round matching, a valid hinted Round-2 winner over a strictly worse valid Round-1 heuristic | each valid Round-2 heuristic paired with a randomly chosen valid Round-1 heuristic, reward-ordered ( ) |
| w/o instance-grounded insight | the gap-vector instance-split sentence in the teacher prompt | a generic critique from code and scalar gaps only |
| w/o teacher reflection | the insight channel | Round 2 regenerates unhinted ( ) |
| w/o preference optimization | all DPO bursts | a frozen generator, search and reflection only |
| TSP | OBP | |
| RSD weight | ||
| (no RSD) | 7.17 | 0.79 |
| 6.79 | 0.64 | |
| 6.84 | 0.73 | |
| 6.96 | 0.76 | |
| RSD scope | ||
| Method | TSP-20 | TSP-50 | TSP-100 | TSP-200 | |
|---|---|---|---|---|---|
| LLM-based AHD: Qwen2.5-7B | |||||
| EoH-S | Top-1 | 8.64 | 12.25 | 14.44 | 16.73 |
| Top-3 | 5.43 | 9.12 | 11.76 | 14.43 | |
| Top-10 | 3.46 | 7.08 | 9.97 | 12.69 | |
| CALM | Top-1 | 6.75 | 9.99 | 11.96 | 13.96 |
| Top-3 | 6.70 | 9.92 | 11.90 | 13.91 | |
| Method | 1k_100 | 1k_500 | 5k_100 | 5k_500 | 10k_100 | 10k_500 | Avg. | |
|---|---|---|---|---|---|---|---|---|
| LLM-based AHD: Qwen2.5-7B | ||||||||
| EoH-S | Top-1 | 3.70 | 0.49 | 2.89 | 0.52 | 2.71 | 0.44 | 1.79 |
| Top-4 | 3.37 | 0.25 | 2.31 | 0.39 | 2.04 | 0.39 | 1.46 | |
| CALM | Top-1 | 4.17 | 0.35 | 2.89 | 0.45 | 2.55 | 0.35 | 1.79 |
| Top-4 | 4.09 | 0.30 | 2.82 | 0.45 | 2.50 | 0.35 | 1.75 | |
| EPOCH (GPT-5-nano) | Top-1 | 3.91 | 0.25 | 1.54 | 0.17 | 1.27 | 0.19 | 1.22 |
| TSP | OBP | |
| LLM-based AHD: GPT-4o-mini (closed-source) | ||
| ReEvo | 0.60 | 0.52 |
| HSEvo | 0.38 | 0.29 |
| MCTS-AHD | 0.42 | 0.36 |
| EoH-S | 0.53 | 0.29 |
| LLM-based AHD: GPT-5-nano (closed-source) | ||
| Component | Setting |
|---|---|
| Iterations / heuristic generations | / |
| Generations per iteration | (Round 1 Round 2) |
| Sampling | temperature , top- |
| Population size | |
| LoRA rank | (4-bit base) |
| DPO every / / lr | iterations / / |
| Operator | Instruction sentence |
|---|---|
| Exploitative crossover | Please generate a new algorithm that is motivated by the following algorithms but performs better on any same instance. |
| Complementary crossover | The two algorithms below each perform well on different problem instances. Please generate a new algorithm that unites their strengths so that it performs well across all the instances that either of them already handles well. |
| Simplification | Please create a simplified and more elegant version of an algorithm by distilling and refining the core ideas from the following. |
| Injection | Inject a novel, meaningful component into the following algorithm. The component may be self-devised or inspired by ideas from other domains or problems. |
| Replacement | For the following algorithm, identify a fragment that assigns equal or near-equal credits to multiple elements and rewrite it to a fragment where credits are deterministically and reasonably differentiated. |
| Refine | Identify the single most important weakness or failure mode of the following algorithm, then write an improved version that fixes specifically that weakness while preserving the parts that already work well. |
| Problem | Description and efficiency note |
|---|---|
| TSP | Takes the current node, the destination node, the unordered set of unvisited nodes, and a distance matrix where distance_matrix[i][j] is the distance from node to ; returns the next node, which must be unvisited. Efficiency: called once per step, so avoid nested loops and recomputation. |
| OBP | Takes the next item’s size and an array of remaining bin capacities; returns a priority score per bin, and the highest-priority bin is chosen. |
| KP | Takes the remaining capacity and two aligned arrays with the weights and values of the items not yet packed; returns the index of the next item to pack, which must fit. Efficiency: called once per packed item, so score all remaining items with array operations rather than loops over items. |
| Critique | {candidate_intro} | {task_direction} |
|---|---|---|
| Contrastive | Below are the best and worst valid algorithms it produced for that request, ordered from best to worst: | Identify which design choices appear to have helped reduce the optimality gap, and give a concrete change of direction that would lead to an even better next attempt. |
| Repair | Below are two algorithms it produced for that request: one valid algorithm that ran successfully, and one invalid algorithm that failed to run (its “Why it failed” line explains the reason). | One candidate ran to completion and one failed at runtime. Identify the design choices that supported successful execution and the code-level pitfalls that caused the failure, then give a concrete next-attempt direction that combines both lessons. |
| Diagnostic | Below are two algorithms it produced for that request. Both of them are invalid - neither ran successfully. Each one’s “Why it failed” line explains why it was rejected. | Both candidates failed to run, so there is no working example: diagnose the shared failure modes and give a concrete next-attempt direction that produces a runnable function. |
Automated Heuristic Design
Automated heuristic design creates or adapts problem-solving rules for optimization, planning, scheduling, and related search tasks.
See all 84 papers