Multi-Task Evolution for Zero-Shot Cross-Problem Generalization using LLMs
Authors: Zhuoliang Xie, Changliang Zhou, Genghui Li, Zhenkun Wang
Organizations: School of Automation and Intelligent Manufacturing, Southern University of Science and Technology, Shenzhen, China · Guangdong Provincial Key Laboratory of Fully Actuated System Control Theory and Technology, Southern University of Science and Technology, Shenzhen, China · College of Computer Science and Software Engineering, Shenzhen University, Shenzhen, China
Designing effective heuristics for diverse combinatorial optimization problems requires substantial expertise and repeated search. Large language models (LLMs) automate heuristic generation and refinement, but heuristic search typically depends on evaluation feedback from the problem being optimized. Generalizing to new problem definitions using only source-task feedback therefore remains a central challenge. We introduce MECo, an LLM-driven multi-task evolutionary framework for zero-shot cross-problem generalization. MECo maintains task-conditioned heuristic populations and uses a transfer gap based on cross-task population performance to guide their interactions. These interactions enable the transfer and recombination of heuristics. A complementary selection criterion then constructs a compact heuristic set by rewarding each member's additional coverage of source combinations. The selected set is applied to target problems without further search or adaptation. Experiments on 32 problem variants across vehicle routing (VRP) and flexible job-shop scheduling (FJSP) show that MECo achieves the lowest mean costs compared with eight automated heuristic design (AHD) baselines under the same budgets. On out-of-domain problems, it outperforms the strongest baseline in each family. Moreover, integrating the framework of MECo with different AHD methods improves their ID and OOD performance in both families, supporting its effectiveness across different methods.
Figures & tables
Figure 1: Comparison of heuristic design paradigms. Unlike existing methods, MECo evolves a heuristic set for zero-shot cross-problem generalization.
Figure 2: A case of generalization to combined VRP variants under separate and joint source training. Curves show the mean cost of the best heuristic in each population.
Figure 3: MECo couples transfer-guided task interactions with heuristic evolution. Each node represents a task-conditioned population. Source datasets DTj guide training and final set selection. The selected heuristics are frozen before zero-shot target evaluation.
Split
Variants
Instances
Size
Training
4
10
50
ID test
4
1,000
100
OOD test
12
1,000
100
Table 1: Data per family. Instances are counted per variant.
(a) VRP distance ↓
Method
All (#16)
ID (#4)
OOD (#12)
Rank (#16)
Gap (%) (#16)
Nearest-feasible
23.53±
23.04±
23.69±
7.66
7.74
Savings-priority
24.51±
22.48±
25.19±
7.75
14.64
EoH
23.16±0.80
22.14±0.08
23.49±1.04
7.12
7.52
ReEvo
23.20±0.55
22.41±0.46
23.46±0.60
8.78
7.58
MCTS-AHD
22.54±0.17
22.10±0.05
22.69±0.21
5.81
4.76
Table 2: Performance comparison across the two problem families.
Figure 4: OOD mean cost relative to MECo, computed as 100(fˉ/fˉMECo−1) .
VRP distance ↓
FJSP makespan ↓
Method
All (#16)
ID (#4)
OOD (#12)
All (#16)
ID (#4)
OOD (#12)
EoH
23.16±0.80
22.14±0.08
23.49±1.04
1466.8±33.5
1247.0±37.6
1540.1±32.2
EoH-MECo
21.99±0.66
21.66±0.83
22.10±0.61
1432.0±6.5
1211.1±13.3
1505.7±4.9
ReEvo
23.20±0.55
22.41±0.46
23.46±0.60
1446.0±29.7
1229.2±12.0
1518.2±35.8
ReEvo-MECo
22.86±1.75
21.17±0.70
23.43±2.41
1415.9±28.4
1207.3±18.0
1485.4±32.2
HSEvo
22.47±0.27
22.12±0.11
22.58±0.33
1443.3±23.3
1225.2±5.1
1516.0±29.5
Table 3: Baseline engines with and without MECo.
Figure 5: Performance on FJSP for ten runs.
VRP distance ↓
FJSP makespan ↓
Condition
All (#16)
ID (#4)
OOD (#12)
All (#16)
ID (#4)
OOD (#12)
w/o transfer gap
22.35±0.05
22.16±0.05
22.41±0.05
1410.2±7.8
1214.6±11.5
1475.3±6.6
w/o c1
22.28±0.16
22.11±0.11
22.34±0.17
1418.4±11.3
1226.7±13.9
1482.3±10.7
w/o c2
22.19±0.09
21.73±0.31
22.34±0.06
1411.9±8.7
1216.7±13.2
1477.0±7.3
w/o c3
22.32±0.11
21.89±0.31
22.46±0.16
1424.0±24.7
1224.0±18.5
1490.7±26.7
w/o m1
22.37±0.09
22.08±0.05
22.47±0.10
1411.4±4.9
1215.2±3.9
1476.8±5.2
Table 4: Component ablations with full MECo.
VRP distance ↓
FJSP makespan ↓
Model
All (#16)
ID (#4)
OOD (#12)
All (#16)
ID (#4)
OOD (#12)
gpt-4o-mini
21.98±0.50
21.60±0.70
22.11±0.43
1408.7±1.1
1211.3±3.5
1474.4±1.1
gpt-5.4-nano
22.29±0.46
21.72±0.43
22.48±0.48
1405.8±1.7
1205.1±3.4
1472.7±1.9
gemini-3.1-flash-lite
21.72±0.36
21.36±0.28
21.84±0.38
1367.6±22.3
1163.2±13.6
1435.8±25.1
Table 5: MECo performance with different generation models.
Appendix figures & tables15 assets
Supplementary material from the paper’s appendix.
Appendix
VRP
FJSP
Variant
O
B
TW
L
Depth
Split
Variant
R
A
S
T
Depth
Split
Base
0
OOD
Base
0
OOD
B
✓
1
ID
A
✓
1
ID
L
✓
1
ID
R
✓
1
ID
TW
✓
1
ID
S
✓
1
ID
O
✓
1
ID
T
✓
1
ID
Appendix
Table 6: Benchmark variants and active constraints. ID and OOD denote source and held-out task types.
Setting
VRP
FJSP
Training tasks × instances
4×10
4×10
Training size
50 customers and a depot
50 operations, 10 jobs, 5 machines
Test tasks × instances
16×1,000
16×1,000
Test size
100 customers and a depot
100 operations, 10 or 20 jobs
Test machines
–
5, 10, 11, 12, or 13
Coordinates / processing data
Uniform coordinates in [0,1]2
Public processing times and eligibility sets
Appendix
Table 7: Dataset sizes and base parameters.
Family
Attribute
Setting
VRP
O
Routes end at the last customer without returning to the depot
B
Pickups comprise 20% of customers, chosen uniformly
L
Route-distance bound of 3
TW
Speed 1 , service duration s=0.2 , depot horizon [0,3]
Window center U(di,3−di−s) and half-width U(s/2,1) , where di is depot distance
FJSP
R
Release dates from 0 to 0.80H , with the first job released at zero
Appendix
Table 8: Constraint generation parameters.
Common setting
Value
Generation model
GPT-4o-mini
New solver proposals per search
At most 2,000
Independent searches / final set size
3 / 4
Method
Population
Principal parameters
EoH
20
Initial allowance 40, two crossover parents
ReEvo
20
Mutation rate 0.5 , short- and long-term reflection
Appendix
Table 9: Common search settings and method parameters.
Problem
Rule
All (#16)
ID (#4)
OOD (#12)
VRP
Nearest-feasible
23.53
23.04
23.69
VRP
Savings-priority
24.51
22.48
25.19
FJSP
ECT
1486.8
1301.4
1548.6
FJSP
MWKR(min)-ECT
1751.7
1436.3
1856.9
Appendix
Table 10: Classical heuristic costs. Lower is better.
Method Base B L TW Nearest-feasible 20.85±21.98±20.91±35.61± Savings-priority 19.80±20.33±19.79±33.90± EoH 20.85±0.0022.00±0.0421.13±0.2431.77±0.07 ReEvo 20.89±0.1522.05±0.1020.95±0.2232.84±1.43 MCTS-AHD 20.86±0.0021.99±0.0320.95±0.0631.76±0.10 EoH-S 20.69±0.0722.10±0.1420.82±0.1132.09±0.54 MEoH 20.86±0.0121.98±0.0120.94±0.0233.53±0.72 HSEvo 20.85±0.0021.91±0.2320.91±0.0032.00±0.28 EMO-STA 20.37±0.8421.08±1.5520.50±0.7035.05±0.97 MoH 20.25±0.7621.01±1.5020.39±0.6333.19±0.61 MECo 20.37±0.8421.08±1.5520.32±0.6131.80±0.15
Automated heuristic design (AHD) with large language models (LLMs) has produced strong heuristics for combinatorial optimization problems (COPs). Yet existing frameworks optimize for average performance on a small fixed dataset and steer the search with "verbal gradients" distilled from scalar better/worse feedback. No single heuristic dominates across instance distributions, and scalar feedback tells the LLM whether a heuristic improved, but not where in the instance space or why. We propose MOSAIC, a grid-based framework that adversarially co-evolves problem instances and specialist heuristics inside a Quality-Diversity (QD) archive indexed by structural instance features. Instances evolve to expose weaknesses of the current heuristics, and heuristics evolve to eliminate them by specializing to the newly exposed regions. Each archive cell keeps a specialist heuristic, representative instances, and insights explaining what works in its region, forming a persistent memory that accumulates over the evolutionary search. For each heuristic pair sampled from distant grid regions, an LLM-guided evolutionary loop generates discriminative instances, and a decision tree identifies the feature-space regions where each heuristic wins. A reflection LLM then contrasts the two heuristics to produce multi-directional insights that persist in those regions and guide crossover and mutation. The archive is simultaneously a co-evolved benchmark of discriminative instances and a pool of region specialist heuristics, from which greedy selection extracts a compact complementary portfolio. Across COPs, test sizes, and LLM backbones, the portfolio consistently outperforms state-of-the-art LLM-based AHD methods, and the co-evolved instances attain higher feature-space coverage and stronger heuristic discrimination than evolutionary instance-generation baselines.
Recent LLM-guided evolutionary search methods have shown that iterative program mutation can discover strong algorithms, but they typically optimize each task independently, even when related tasks share reusable structure. We introduce Evolutionary Multi-Task Optimization (EMO) for LLM-guided program discovery, and propose EMO-STA (Shared-Then-Adapt), a two-stage framework that first evolves a shared archive of executable programs across a task family and then adapts selected shared candidates to each target task. Within EMO-STA, we explore multiple adaptation strategies, including warm-starting from the shared archive, adapting the best average shared program, and adapting the shared program that performs best on each target task. Across eight task families spanning continuous optimization, geometric construction, modeling, and algorithmic optimization, EMO-STA improves over matched-compute single-task evolution in most settings, with STA Best-Local providing the strongest in-distribution adaptation and STA Best-Shared yielding robust transfer to unseen tasks. Compute-allocation experiments show that allocating a substantial fraction of the family-level budget to shared evolution is consistently beneficial, with roughly balanced shared and adaptation budgets often being optimal. Beyond compute efficiency, we show that shared evolution can mitigate overfitting in low-evidence settings (e.g. few training data), including ARC tasks and time-series feature engineering, by favoring programs that generalize across all tasks rather than exploiting task-specific brittle artifacts.
Halil Alperen Gozeten, Xuechen Zhang, Emrullah Ildiz +3
University of Michigan - Ann Arbor · University of California San Diego
Large Language Models (LLMs) have advanced Automatic Heuristic Design (AHD) by enabling heuristic generation through reasoning and code synthesis. In LLM-based AHD, the LLM reasons about algorithm design and generates executable heuristic code. Existing architectures adopt two main paradigms: Natural Evolution applies crossover and mutation to this code to explore diverse strategies, but discards the reasoning traces behind the design decisions, weakening knowledge retention; Metacognitive Evolution retains these reasoning traces and refines them through reflection, but lacks population-level recombination, limiting exploration. These limitations reduce search efficiency, stability, and solution quality on complex problems. To address this gap, we propose MeEvo, an AHD framework that cyclically couples Natural Evolution and Metacognitive Evolution with operator balance that shifts from exploration to exploitation. Natural Evolution explores heuristic code while recording LLM-generated reasoning traces, fitness values, errors and best heuristic into a shared history; Metacognitive Evolution then reflects on this history to generate improved heuristics that feed into the next Natural Evolution cycle. This design enables population-driven exploration and reflection-driven refinement to reinforce each other. Experiments on five optimization problems show that MeEvo achieves stronger performance and lower variance than tested LLM-based AHD architectures, especially on complex constrained tasks.
Zishang Qiu, Xinan Chen, Rong Qu +1
School of Computer Science, University of Nottingham Ningbo China, Ningbo, China · School of Computer Science, University of Nottingham, Nottingham, UK