TransGP: Task-Conditioned Transformer-Guided Genetic Programming for Multitask Dynamic Flexible Job Shop Scheduling
Abstract
Hyper-heuristics have become a popular approach for solving dynamic flexible job shop scheduling (DFJSS) problems. They use gradient-free optimization techniques like Genetic Programming (GP) to evolve non-differentiable heuristics. However, conventional GP methods tend to converge slowly because they rely solely on evolutionary search to find good heuristics. Existing multitask GP methods can solve multiple tasks simultaneously and speed up the search by transferring knowledge across similar tasks. But they mostly exchange heuristic building blocks without truly generating heuristics conditioned on task information. In this paper, we aim to accelerate convergence and enable task-specific heuristic generation by incorporating a task-conditioned Transformer model. The Transformer works in two ways. First, it learns the distribution of elite heuristics, biasing the search toward promising regions of the heuristic space. Second, through conditional generation, it produces heuristics tailored to specific tasks, allowing the model to handle multiple scheduling tasks at once and improving overall optimization efficiency. Based on these ideas, we propose TransGP, a Task-Conditioned Transformer-Guided GP framework. This evolutionary paradigm integrates generative modeling with GP, enabling efficient multitask heuristic learning and knowledge transfer. We evaluate TransGP on a range of DFJSS scenarios. Experimental results show that TransGP consistently outperforms multitask GP baselines, widely used handcrafted heuristics, and the pure Transformer model, achieving faster convergence, superior solution quality, and enhanced robustness.
Figures & tables
| S* | Task | Obj | UtilLevel | MachNum |
|---|---|---|---|---|
| 1 | Task 1: <Fmax-0.75-6> | Fmax | 0.75 | 6 |
| Task 2: <Fmax-0.85-8> | Fmax | 0.85 | 8 | |
| Task 3: <Fmax-0.95-10> | Fmax | 0.95 | 10 | |
| 2 | Task 1: <Fmean-0.75-6> | Fmean | 0.75 | 6 |
| Task 2: <Fmean-0.85-8> | Fmean | 0.85 | 8 | |
| Task 3: <Fmean-0.95-10> | Fmean | 0.95 | 10 |
| Notation | Description |
|---|---|
| NIQ | Number of operations in the queue |
| WIQ | Work in the queue |
| MWT | Waiting time of the machine |
| PT | Processing time of the operation |
| NPT | Median processing time for the next operation |
| OWT | Waiting time of the operation |
| S* | Task | GP | TGP | TransGP |
|---|---|---|---|---|
| 1 | Task 1 | 1390.99(103.84) | 1321.28(90.85) | 1276.79(33.11) (=) |
| Task 2 | 1402.18(79.22) | 1368.10(69.44)(=) | 1342.28(50.07) (=) | |
| Task 3 | 1461.44(106.28) | 1484.01(102.21)(=) | 1395.13(64.78) | |
| 2 | Task 1 | 580.42(11.17) | 571.84(6.95) | 566.21(5.70) |
| Task 2 | 605.35(10.50) | 598.08(6.29) | 587.20(6.02) | |
| Task 3 | 627.72(8.16) | 624.28(9.95)(=) | 610.87(4.48) |
| S* | Task | SPT NIQ | LPT NIQ | EDD NIQ | FIFO NIQ | SPT WIQ | LPT WIQ | EDD WIQ | FIFO WIQ | PureTrans | TransGP | ||
|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
| min | mean (std) | max | |||||||||||
| 1 | Task 1 | 1462.14 | 1512.95 | 1517.17 | 1521.58 | 1464.61 | 1518.27 | 1515.71 | 1527.31 | 1257.30 | 2424.80 (2618.89) | 11352.09 | 1276.79(33.11) |
| Task 2 | 1462.11 | 1563.57 | 1621.85 | 1621.09 | 1473.99 | 1584.82 | 1634.58 | 1615.25 | 1317.95 | 2448.01 (2546.17) | 12900.12 | 1342.28(50.07) | |
| Task 3 | 1589.18 | 1658.87 | 1748.73 | 1731.61 | 1548.94 | 1629.52 | 1717.44 | 1736.18 | 1482.35 | 3323.86 (4057.96) | 14999.00 | 1395.13(64.78) | |
| 2 | Task 1 | 656.76 | 680.76 | 666.13 | 670.12 | 655.23 | 679.21 | 666.37 | 668.17 | 559.97 | 610.00 (96.55) | 971.03 | 566.21(5.70) |
| Task 2 | 671.27 | 701.61 | 687.84 | 692.09 | 671.03 | 704.33 | 689.16 | 690.70 | 579.48 | 880.42 (786.11) | 3798.87 | 587.20(6.02) | |
| S* | Task | |||||
|---|---|---|---|---|---|---|
| 1 | Task 1 | 1290.74(36.42) | 1275.21(32.03)(=) | 1297.37(31.40)(=) | 1276.79(33.11)(=)(=) | 1294.58(64.57)(=)(=)(=)(=) |
| Task 2 | 1354.26(42.10) | 1361.16(42.97)(=) | 1344.48(48.00)(=)(=) | 1342.28(50.07)(=)(=)(=) | 1347.95(50.01)(=)(=)(=)(=) | |
| Task 3 | 1394.44(43.08) | 1390.68(60.36)(=) | 1412.18(55.11)(=)(=) | 1395.13(64.78)(=)(=)(=) | 1416.48(68.07)(=)(=)(=)(=) | |
| 2 | Task 1 | 564.20(4.10) | 563.55(4.99)(=) | 564.86(4.94)(=)(=) | 566.21(5.70)(=)(=)(=) | 566.99(4.66) (=)(=) |
| Task 2 | 589.30(5.57) | 586.49(6.09)(=) | 587.10(4.89)(=)(=) | 587.20(6.02)(=)(=)(=) | 587.72(6.26)(=)(=)(=)(=) | |
| Task 3 | 611.14(6.18) | 610.44(6.69)(=) | 610.71(6.04)(=)(=) | 610.87(4.48)(=)(=)(=) | 614.55(7.98) |
| S* | Task | GP | TGP | TransGP |
|---|---|---|---|---|
| 1 | Task 1 | 80.60(22.08) | 86.20(18.98)(=) | 52.87(16.38) |
| Task 2 | 84.13(26.97) | 82.67(20.68)(=) | 66.33(19.94) | |
| Task 3 | 75.87(21.51) | 84.33(22.04)(=) | 64.20(18.22)(=) | |
| 2 | Task 1 | 84.87(26.44) | 72.00(22.37)(=) | 57.07(16.70) |
| Task 2 | 83.20(20.23) | 73.60(20.14)(=) | 56.67(18.88) | |
| Task 3 | 77.40(20.81) | 73.67(21.74)(=) | 55.47(16.84) |
| Comparison | Rule Type | Jaccard | Size |
|---|---|---|---|
| Task 1 vs Task 2 | sequencing | 0.455 | 0.895 |
| Task 1 vs Task 2 | routing | 0.643 | 0.543 |
| Task 1 vs Task 3 | sequencing | 0.727 | 0.684 |
| Task 1 vs Task 3 | routing | 0.538 | 0.613 |
| Task 2 vs Task 3 | sequencing | 0.364 | 0.765 |
| Task 2 vs Task 3 | routing | 0.727 | 0.886 |
| Rank | Structural Pattern | Frequency | Coverage (%) |
|---|---|---|---|
| 1 | WIQ | 1,269 | 5.44 |
| 2 | *(MWT, TIS) | 331 | 1.42 |
| 3 | OWT | 327 | 1.40 |
| 4 | *(OWT, PT) | 295 | 1.26 |
| 5 | *(WKR, WIQ) | 280 | 1.20 |
| 6 | +(NIQ, MWT) | 264 | 1.13 |
| Step | Generated | Prob | Top-1 | Prob | Top-2 | Prob |
|---|---|---|---|---|---|---|
| 1 | / | 0.8547 | / | 0.8547 | PT | 0.0725 |
| 2 | WKR | 0.9955 | WKR | 0.9955 | + | 0.0012 |
| 3 | MWT | 0.9603 | MWT | 0.9603 | WKR | 0.0255 |
| 4 | MWT | 0.9913 | MWT | 0.9913 | WKR | 0.0025 |
| Metric | Value |
|---|---|
| Mutation 1 Similarity (%) | 100.00 |
| Mutation 2 Similarity (%) | 57.14 |
| Mutation 3 Similarity (%) | 100.00 |
| Mutation 4 Similarity (%) | 57.14 |
| Mutation 5 Similarity (%) | 57.14 |
| Average Similarity (%) | 74.29 ( 21.00) |
Job Shop Scheduling
Job shop scheduling assigns precedence-constrained operations to machines to optimize makespan and other production objectives.
See all 23 papers