Graph Convolutional Branch and Bound v1.0.0
A TSP solver that combines a graph convolutional network with a 1-Tree branch-and-bound.
|
This repository contains the implementation of the Graph Convolutional Branch and Bound solver for the Traveling Salesman Problem. It combines a 1Tree branch and bound proposed by Held and Karp with the Graph Convolutional Network proposed by Joshi, Laurent, and Bresson. In the src
folder, you can also find a Cplex TSP solver that I developed to verify the correctness of the hybrid one.
The Graph Conv Net is used to preprocess the input Graph to create a distance matrix file. Each entry in this file will be a pair \((w_{ij}, p_{ij})\), where \(w_{ij}\) is the weight of the Edge between nodes \(i\) and \(j\), computed as the euclidean distance, and \(p_{ij} \in [0,1]\) is the probability, obtained by the neural network, that the corresponding Edge is part of the optimal tour. I will leverage this probabilistic information to expedite the exploration of the branch and bound tree.
To improve efficiency, the original 1-Tree Branch and Bound approach proposed by Held and Karp was not implemented. Instead, a modified version, well described in the Valenzuela and Jones paper, was used.
I used the pre-trained Graph Conv Nets that Joshi released in the official repository of the paper. These networks were trained on one million instances of Euclidean TSP, with cities sampled from the range \([0,1] \times [0,1]\) and sizes of 20, 50, and 100 nodes. The edge embeddings from the last convolutional layer were transformed into a probabilistic adjacency matrix using a multi-layer perceptron with softmax. I refer you to this repository to download the trained models and to build the correct Python environment for the forward step.
The hybrid solver obtains the probabilities for each Edge of being in the solution using a Graph Conv Net, it then assigns to a 1-Tree the probability of being the optimal tour by averaging the probabilities of its edges. It then uses these values as follows:
All code documentation was completed using Doxygen, and is accessible in both online and PDF formats.