Offline Decision Transformers for Neural Combinatorial Optimization: Surpassing Heuristics on the Traveling Salesman Problem
Organizations: Panasonic Connect Co., Ltd., Japan
Abstract
Combinatorial optimization problems like the Traveling Salesman Problem are critical in industry yet NP-hard. Neural Combinatorial Optimization has shown promise, but its reliance on online reinforcement learning (RL) hampers deployment and underutilizes decades of algorithmic knowledge. We address these limitations by applying the offline RL framework, Decision Transformer, to learn superior strategies directly from datasets of heuristic solutions; it aims to not only to imitate but to synthesize and outperform them. Concretely, we (i) integrate a Pointer Network to handle the instance-dependent, variable action space of node selection, and (ii) employ expectile regression for optimistic conditioning of Return-to-Go, which is crucial for instances with widely varying optimal values. Experiments show that our method consistently produces higher-quality tours than the four classical heuristics it is trained on, demonstrating the potential of offline RL to unlock and exceed the performance embedded in existing domain knowledge.
Figures & tables
| Data | Method | |||
|---|---|---|---|---|
| NN | Original | 17.24 10.24 | 22.73 8.21 | 24.81 6.47 |
| BC | 17.28 10.23 | 22.74 8.21 | 24.75 6.50 | |
| DT (Ours) | 16.73 10.07 | 22.60 8.17 | 24.76 6.48 | |
| NI | Original | 13.24 6.99 | 19.12 4.78 | 21.77 3.43 |
| BC | 12.26 7.13 | 18.20 5.44 | 22.00 5.29 | |
| DT (Ours) | 6.43 4.86 | 14.98 4.91 | 19.84 4.85 |
| Fixed RTG | Predicted RTG using expectile regression | |||||
|---|---|---|---|---|---|---|
| Data | 0 | mean of data | ||||
| 20 | NN | 67.90 29.58 | 17.21 10.17 | 17.22 10.17 | 17.14 10.13 | 16.73 10.07 |
| NI | 68.39 26.26 | 13.12 7.62 | 13.09 6.29 | 11.02 5.96 | 6.43 4.86 | |
| FI | 89.69 31.21 | 3.33 4.78 | 1.70 2.33 | 1.61 2.27 | 1.30 2.27 | |
| SA | 106.03 31.37 | 2.52 4.50 | 0.97 1.77 | 0.84 1.50 | 0.83 1.60 | |
| 50 | NN | 213.67 41.84 | 22.71 8.18 | 22.69 8.17 | 22.66 8.17 | 22.60 8.17 |
| Data | (offset) | (offset) | (offset) |
|---|---|---|---|
| NN | 15.82 9.96 (1.00) | 22.45 8.14 (1.00) | 24.58 6.49 (2.00) |
| NI | 3.94 4.34 (0.50) | 10.40 5.10 (2.00) | 16.50 5.06 (2.00) |
| FI | 1.29 2.21 (-0.05) | 3.07 2.37 (0.20) | 4.51 2.20 (0.50) |
| SA | 0.79 1.49 (-0.10) | 2.39 2.10 (0.00) | 5.32 2.87 (0.50) |
Appendix figures & tables9 assets
Supplementary material from the paper’s appendix.
Appendix
| Data | |||
|---|---|---|---|
| Training | Download | Download | Download |
| Validation | Download | Generate (Seed 9999) | Generate (Seed 9999) |
| Test | Download | Download | Download |
| Parameter | |||
|---|---|---|---|
| Maximum (starting) temperature | 2.5 | 2.5 | 2.5 |
| Minimum (ending) temperature | 0.025 | 0.0025 | 0.0025 |
| Number of iterations | 50,000 | 5,000,000 | 5,000,000 |
| Parameter | Value |
|---|---|
| Number of layers | 2 |
| Number of attention heads | 8 |
| Embedding dimension | 128 |
| Activation function | GELU |
| Normalization method | Layer Normalization |
| Dropout rate | 0.0 |
| Parameter | Value |
|---|---|
| Number of layers | 2 |
| Number of attention heads | 8 |
| Embedding dimension | 128 |
| Activation function | GELU |
| Normalization method | Layer Normalization |
| Dropout rate | 0.0 |
| Parameter | Value |
|---|---|
| Loss balance coefficient | 0.5 |
| Optimizer | Schedule-Free AdamW [ 6 ] |
| Learning rate | 0.0025 |
| Weight decay | 0.0 |
| AdamW betas | (0.9, 0.999) |
| AdamW epsilon | 1e-8 |
| Parameter | |||
|---|---|---|---|
| Training time | 19 hours | 1 days 3 hours | 1 days 23 hours |
| Prediction time | 0.63 seconds | 0.86 seconds | 1.10 seconds |
| Data | Method | |||
|---|---|---|---|---|
| Optimal | 3.83 0.30 | 5.69 0.25 | 7.76 0.23 | |
| NN | Original | 4.49 0.55 | 6.99 0.57 | 9.69 0.58 |
| BC | 4.49 0.54 | 6.99 0.57 | 9.69 0.58 | |
| DT (Ours) | 4.47 0.54 | 6.98 0.56 | 9.69 0.58 | |
| NI | Original | 4.33 0.39 | 6.78 0.35 | 9.45 0.33 |
| BC | 4.30 0.39 | 6.73 0.37 | 9.47 0.44 |
| Fixed RTG | Predicted RTG using expectile regression | |||||
|---|---|---|---|---|---|---|
| Data | 0 | mean of data | ||||
| 20 | NN | 6.43 1.25 | 4.49 0.54 | 4.49 0.54 | 4.49 0.54 | 4.47 0.54 |
| NI | 6.44 1.04 | 4.32 0.23 | 4.33 0.36 | 4.25 0.36 | 4.07 0.33 | |
| FI | 7.25 1.23 | 3.95 0.26 | 3.90 0.33 | 3.89 0.32 | 3.88 0.33 | |
| SA | 7.88 1.27 | 3.92 0.26 | 3.87 0.32 | 3.86 0.32 | 3.86 0.32 | |
| 50 | NN | 17.84 2.38 | 6.99 0.56 | 6.98 0.56 | 6.98 0.57 | 6.98 0.56 |
| Data | (offset) | (offset) | (offset) |
|---|---|---|---|
| NN | 4.44 0.53 (1.00) | 6.97 0.56 (1.00) | 9.67 0.58 (2.00) |
| NI | 3.98 0.36 (0.50) | 6.28 0.38 (2.00) | 9.04 0.45 (2.00) |
| FI | 3.88 0.32 (-0.05) | 5.87 0.29 (0.20) | 8.11 0.28 (0.50) |
| SA | 3.86 0.32 (-0.10) | 5.83 0.29 (0.00) | 8.18 0.31 (0.50) |