NeuroPrim: An Attention-based Model for Solving NP-hard Spanning Tree Problems

10/22/2022
by   Yuchen Shi, et al.
0

Spanning tree problems with special constraints are widely applied in real-life scenarios, such as water supply, transportation and telecommunications, which often require complex algorithm design and exponential time to solve. In recent years, there has been a surge of interest in end-to-end Deep Neural Networks (DNNs) to solve routing problems. However, as the output of such methods is a sequence of vertices, it is difficult to apply them to combinatorial optimization problems where the solution set consists of a edges sets, such as various spanning tree problems. In this paper, we propose NeuroPrim, a novel framework combining neural networks and the Prim algorithm, which is trained by REINFORCE with the POMO baseline to learn metrics for selecting edges for different spanning tree problems. We apply it to three difficult problems on Euclidean spaces, namely Degree-constrained Minimum Spanning Tree Problem (DCMSTP), Minimum Routing Cost Spanning Tree Problem (MRCSTP) and Steiner Tree Problem in Graphs (STPG). Experimental results show that our model is able to outperform some of the heuristics and obtain extremely small gaps of less than 0.1% for simple problems such as DCMST with degree constraint 3 and special cases of STPG up to 100 vertices. In addition, we find no significant degradation on problem instances as large as 1000, which demonstrates its strong generalization ability.

READ FULL TEXT

Please sign up or login with your details

Forgot password? Click here to reset