SlowGuess/NeurIPS_2023_OCR huggingface dataset:
According to the results, with such a training method, LEHD+RRC can still obtain good generalization performance on TSP instances with up to 1,000 nodes with a reasonable inference time. Notably, it can outperform the very strong BQ (with bs16) method trained by supervised learning, especially on large-scale problem instances. The performance of LEHD can be further improved if more computational budget is available.
In summary, LEHD can be efficiently trained without any already labeled (nearly) optimal solutions. Therefore, it is possible to extend LEHD to tackle other practical CO problems where the optimal solution is hard to obtain. We will investigate how to design an even more efficient training method for LEHD as well as apply LEHD to solve other CO problems in future work.
C Implementation Details for TSP
C.1 Problem Setup
The task of solving a TSP instance with  $n$  nodes involves finding the shortest loop that visits each node exactly once and eventually returns to the first visited node. We generate TSP instances following the approach in Kool et al. [27], where the coordinates of  $n$  nodes are sampled uniformly at random from the unit square.
For a TSP instance  $\mathbf{S}$ , the node features  $(\mathbf{s}_1, \dots, \mathbf{s}_n)$  are the 2-dimensional coordinates of the  $n$  nodes in the graph.
In the original AM decoder, irrelevant nodes are masked during each construction step. In our model, we remove the embeddings of irrelevant nodes from the decoder input. This removal serves the same purpose as masking them in every decoder attention layer but also saves computational resources since the decoder is not required to perform computations related to irrelevant nodes. Consequently, for each construction step, the input node embeddings for the decoder only consist of the starting node embedding, the destination node embedding, and the available node embeddings.
Here is an extended explanation of Equation 2 in the case of TSP. After  $L$  attention layers,  $\widetilde{H}^{(0)}$  is transformed to  $\widetilde{H}^{(L)}$ . Each vector  $\widetilde{\mathbf{h}}_i^{(L)} \in \mathbb{R}^{d_e}$  ( $i \neq 1$  or 2) is transformed into a scalar  $u_i$  by applying the linear projection  $W_O \in \mathbb{R}^{d_e \times 1}$  (i.e.,  $u_i = W_O \widetilde{\mathbf{h}}_i^{(L)})$ , where  $d_e$  is the embedding dimension. Then  $\mathbf{p}^t = \mathrm{softmax}(\mathbf{u})$  is calculated.
D Implementation Details for CVRP
D.1 Problem Setup
A CVRP instance involves  $n$  customer nodes and one depot node, with each customer node  $i$  having a specific demand  $\delta_{i}$  that must be fulfilled. We aim to determine a set of sub-tours starting and ending at the depot such that the sum of demand satisfied by each sub-tour is within the capacity constraint  $D$  of the vehicle. Given the capacity constraint  $D$ , the objective is to minimize the total distance of the set of sub-tours. Similarly, following Kool et al. [27], we generate CVRP instances where the coordinates of customer nodes and depot nodes are sampled uniformly from the unit square. The demand  $\delta_{i}$  is sampled uniformly form  $\{1, \dots, 9\}$ . The vehicle capacities, denoted by  $D$ , are 50, 80, 100, and 250 for corresponding values of  $N$ , which are 100, 200, 500, and 1000, respectively.
Following Kool et al. [28] and Drakulic et al. [12], we define the formation of a feasible solution for CVRP. Rather than treating a visit to the depot as a separate step, we use binary variables to indicate whether a customer node is reached via the depot or another customer node. Specifically, in a feasible solution, a node is assigned a value of 1 if it is reached via the depot and a value of 0 if it is reached through another customer node.
For example, a feasible CVRP solution  $\{0,1,2,3,0,4,5,0,6,7,0\}$  where 0 represents the depot, can be denoted as follows:
$$
\left[ \begin{array}{c c c c c c c} 1 & 2 & 3 & 4 & 5 & 6 & 7 \\ 1 & 0 & 0 & 1 & 0 & 1 & 0 \end{array} \right] \tag {4}
$$
In this notation, the first row represents the sequence of visited nodes in the solution, and the second row indicates whether each node is reached via the depot or another customer node.
The purpose of using this notation is to ensure solution alignment. In CVRP instances, solutions with the same number of customer nodes may have varying numbers of sub-tours, leading to potential misalignment. By employing this notation, we can avoid such issues.
D.2 Implementation details
For CVRP, the node feature  $\mathbf{s}_i$  is represented as a 3-dimensional vector, comprising the 2-dimensional coordinates and the demand of node  $i$ . The demand of the depot is assigned a value of 0. Without loss of generality, we normalize the vehicle capacity  $D$  to  $\hat{D} = 1$ , and the demand  $\delta_i$  to  $\hat{\delta}_i = \frac{\delta_i}{D}$  [27].
In the decoder, the dynamically changing remaining capacity is added to both the starting node and destination node embeddings, resembling the approach employed in Kwon et al. [29]. Similar to TSP, the irrelevant node embeddings are excluded from the decoder input.
Here is an extended explanation of Equation 2 in the case of CVRP. After  $L$  attention layers,  $\widetilde{H}^{(0)}$  is transformed to  $\widetilde{H}^{(L)}$ . Each vector  $\widetilde{\mathbf{h}}_i^{(L)} \in \mathbb{R}^{d_e}$  ( $i \neq 1$  or 2) is projected to a 2-dimensional vector  $\mathbf{u}_i$  using the linear projection  $W_O \in \mathbb{R}^{d_e \times 2}$  (i.e.,  $\mathbf{u}_i = W_O \widetilde{\mathbf{h}}_i^{(L)})$ , where  $d_e$  is the embedding dimension. Each  $\mathbf{u}_i$  corresponds to two actions associated with the node  $i$ : either being reached via the depot or another customer node. This relation corresponds to the notation mentioned in equation 4. Subsequently,  $\mathbf{u}$  is flattened, and the softmax is utilized to compute the probability associated with each possible action.
E Solution Visualizations
Table 2 shows the test results on TSPLib and CVRPLib instances with different sizes and distributions. For TSPLib, we report the results on 2D Euclidean TSP instances with sizes smaller than 5000 (up to 4461). For CVRPLib, we report the results on the 2D Euclidean instances without additional constraints such as time windows.
Figures 3 show the solutions of "pr2392" instance in TSLib. Figures 4 show the solutions of "X-n1001-k43" instance in CVRPLib. For each figure, panel (a) shows the optimal solution, and panel (b), (c), and (d) shows the solution generated by POMO, BQ, and LEHD, respectively.
E.1 Solution visualizations of two TSPLib instances
(a) Optimal solution
(b) POMO aug×8: gap 69.6%
(c) BQ bs16: gap  $29.4\%$
Figure 3: Instance pr2392 with 2392 nodes.
(d) LEHD RRC1000: gap  $5.5\%$
E.2 Solution visualizations of two CVRPLib instances
(a) Optimal solution
(b) POMO aug×8: gap 24.8%
(c) BQ bs16: gap  $6.9\%$
Figure 4: Instance X-n1001-k43 with 1000 nodes
(d) LEHD RRC1000: gap  $2.9\%$
F Licenses
Table 13: List of licenses for the codes and datasets we used in this work
Resource	Type	Link	License
OR-Tools [41]	Code	https://github.com/google/or-tools	Apache License 2.0
LKH3 [16]	Code	http://webhotel4.ruc.dk/ keld/research/LKH-3/	Available for academic research use
HGS [50]	Code	https://github.com/chkwon/PyHygese	MIT License
Concorde [2]	Code	https://github.com/jvkersch/pyconcorde	BSD 3-Clause License
POMO [29]	Code	https://github.com/yd-kwon/POMO	MIT License
Att-GCN+MCTS [13]	Code	https://github.com/SaneLYX/TSP_Attn-GCRN-MCTS	MIT License
EAS [19]	Code	https://github.com/ahottung/EAS	Available online
SGBS [8]	Code	https://github.com/yd-kwon/SGBS	MIT License
TSPLib	Dataset	http://comopt.ifi.uni-heidelberg.de/software/TSPLIB95/	Available for any non-commercial use
CVRPLib	Dataset	http://vrp.galgos.inf.puc-rio.br/index.php/en/	Available for academic research use
The licenses for the codes and the datasets used in this work are listed in Table 13.