Skip to main content
Log in

Learning to optimise general TSP instances

  • Original Article
  • Published:
International Journal of Machine Learning and Cybernetics Aims and scope Submit manuscript

Abstract

The Travelling Salesman Problem is a classical combinatorial optimisation problem (COP). In recent years, learning to optimise approaches have shown success in solving TSP problems. However, they focus on one type of TSP instance, where the points are uniformly distributed in Euclidean spaces (easy instances). Such approaches cannot generalise to other embedding spaces that represent various levels of difficult instances, e.g., TSP instances where the points are distributed in a non-uniform manner and spherical spaces. Obtain optimal solutions for easy instances is achievable and can be used as training data to solve various TSP instances. However, acquire optimal solutions for complex TSP instances is difficult and time-consuming. Hence, this paper introduces a new learning-based approach based on a convolutional neural network combined with a Long Short-Term Memory, referred to as the non-Euclidean TSP network (NETSP), that utilises randomly generated instances (easy instances) to solve various common TSP instances (complex TSP instances). We have demonstrated its superiority over state-of-the-art methods for various TSP instances. We performed extensive experiments that indicate our approach generalises across many instances and scales to larger instances.

This is a preview of subscription content, log in via an institution to check access.

Access this article

Price excludes VAT (USA)
Tax calculation will be finalised during checkout.

Instant access to the full article PDF.

Fig. 1
Fig. 2
Fig. 3
Fig. 4
Fig. 5
Fig. 6
Fig. 7
Fig. 8
Fig. 9
Fig. 10
Fig. 11
Fig. 12

Similar content being viewed by others

Notes

  1. The edge weights represent the geographic distances (Haversine) between these locations, and TSP points are distributed on a sphere considering the curvature of the Earth.

  2. Pseudo-Euclidean instances, which is Euclidean distance but a breakdown of some properties of Euclidean space since the triangular inequality is not satisfied [15]

  3. We will use cities and points inter-changeably to mean the same thing.

  4. The distance matrix for this instances was computed using the Haversine formula (great circle distance)

  5. Phase transition takes place in the ability to be solved of many COPs. If problem instances are very tightly constrained, Fig. 1a, almost all problem instances will be very hard to find a solution. If such problems are very loosely constrained, Fig. 1b, there are likely to be many solutions.

  6. In general, 1D convolutional mechanism, information flows by a convolution operation (\(*\)) followed by an activation function, \(S = f(K*C + B)\), where C and K denote the incoming input signal and a kernel respectively, and B is a weight

  7. https://github.com/wouterkool/attention-learn-to-route.

  8. Section 5.3.4 we show the statistical analysis test between the two groups of result, Kool et al. [9] and our results.

References

  1. Applegate DL, Bixby RE, Chvatal V, Cook WJ (2006) The traveling salesman problem: a computational study. Princeton university press,

  2. Nicos Christofides (1976) Worst-case analysis of a new heuristic for the travelling salesman problem. Technical report, Carnegie-Mellon Univ Pittsburgh Pa Management Sciences Research Group

  3. Burke E, Hart E, Kendall G, Newall J, Ross P, Shulenburg S (2003) An emerging direction in modern search technology. Handbook Metaheuristics 2:457474

    MATH  Google Scholar 

  4. LeCun Yann, Bengio Yoshua, Hinton Geoffrey (2015) Deep learning. Nature 521(7553):436–444

    Article  Google Scholar 

  5. Li Ke, Malik Jitendra (2017) Learning to optimize neural nets. arXiv preprint arXiv: 1703.00441,

  6. Oriol Vinyals, Meire Fortunato, Navdeep Jaitly (2015) Pointer networks. In: Advances in Neural Information Processing Systems, pages 2692–2700

  7. Irwan B, Hieu P, Quoc VL, Mohammad N, Samy B (2016) Neural combinatorial optimization with reinforcement learning. arXiv preprintarXiv:1611.09940,

  8. Michel D, Pierre C, Alexandre L, Yossiri Adulyasak, Louis-Martin Rousseau (2018) Learning heuristics for the tsp by policy gradient. In: International conference on the integration of constraint programming, artificial intelligence, and operations research, pages 170–181. Springer,

  9. WWM Kool, M Welling (2018) Attention solves your tsp. arXiv preprint arXiv:1803.08475,

  10. Yeong-Dae K, Jinho C, Byoungjip K, Iljoo Y, Seungjai M, Youngjune Gwon (2020) Pomo: Policy optimization with multiple optima for reinforcement learning. arXiv preprint arXiv: 2010.16011,

  11. Nasrin S, Jeffrey C, Tabinda S, Qin AK (2021) Learning to optimise routing problems using policy optimisation. In: 2021 international joint conference on neural networks (IJCNN), pages 1–8. IEEE,

  12. Pablo M, Norman MG (1994) An analysis of the performance of traveling salesman heuristics on infinite-size fractal instances in the euclidean plane. ORSA J Comput,

  13. Cárdenas-Montes Miguel (2018) Creating hard-to-solve instances of travelling salesman problem. Appl Soft Comput 71:268–276

    Article  Google Scholar 

  14. Thomas F, Thomas S, Holger H, Peter M (2005) An analysis of the hardness of tsp instances for two high performance algorithms. In: Proceedings of the Sixth Metaheuristics International Conference, pages 361–367,

  15. Matthew C (2018) A comparison of exact and heuristic algorithms to solve the travelling salesman problem. Univ Plymouth J

  16. Reinelt Gerhard (1991) Tsplib-a traveling salesman problem library. ORSA J Comput 3(4):376–384

    Article  Google Scholar 

  17. David A (2006) Ribert Bixby, Vasek Chvatal, William Cook (2006) Concorde tsp solver,

  18. Chaitanya KJ, Thomas L, Xavier B ( 2019) An efficient graph convolutional network technique for the travelling salesman problem. arXiv preprintarXiv:1906.01227,

  19. Yousof HK (2001) On the solution of the traveling salesman problem: a novel heuristic that uses frequency of anchored nearest neighbors. Master’s thesis, Arizona State University

  20. LeCun Yann, Bengio Yoshua et al (1995) Convolutional networks for images, speech, and time series. Handbook Brain Theory Neural Netw 3361(10):1995

    Google Scholar 

  21. Saad Albawi, Tareq Abed Mohammed, Saad Al-Zawi (2017) Understanding of a convolutional neural network. In: 2017 international conference on engineering and technology (ICET), pages 1–6. Ieee,

  22. Lawler Eugene L, Wood David E (1966) Branch-and-bound methods: a survey. Oper Res 14(4):699–719

    Article  MathSciNet  Google Scholar 

  23. Helsgaun Keld (2000) An effective implementation of the lin-kernighan traveling salesman heuristic. Euro J Oper Res 126(1):106–130

    Article  MathSciNet  Google Scholar 

  24. Gendreau Michel, Potvin Jean-Yves (2005) Metaheuristics in combinatorial optimization. Ann Oper Res 140(1):189–213

    Article  MathSciNet  Google Scholar 

  25. Laurent P, Vincent F (2015). Or-tools

  26. Elias K, Hanjun D, Yuyu Z, Bistra D, Le S (2017) Learning combinatorial optimization algorithms over graphs. In Advances in neural information processing systems, pages 6348–6358,

  27. Ashish V, Noam S, Niki P, Jakob U, Llion J, Aidan NG, Łukasz K, Illia P (2017) Attention is all you need. In: Advances in neural information processing systems, pages 5998–6008,

  28. Zonghan W, Shirui P, Fengwen C, Guodong L, Chengqi Z, S YP (2020) A comprehensive survey on graph neural networks. IEEE Transactions on Neural Networks and Learning Systems

  29. Xing Zhihao, Shikui Tu (2020) A graph neural network assisted monte carlo tree search approach to traveling salesman problem. IEEE Access 8:108418–108428

    Article  Google Scholar 

  30. Yaoxin W, Wen S, Zhiguang C, Jie Z, Andrew L (2021) Learning improvement heuristics for solving routing problems. IEEE transactions on neural networks and learning systems

  31. Paulo R de O da Costa, Jason R, Yingqian Z, Alp A ( 2020) Learning 2-opt heuristics for the traveling salesman problem via deep reinforcement learning. arXiv preprintarXiv:2004.01608,

  32. Ruffa AA (2007) A novel solution to the att48 benchmark problem. arXiv preprint arXiv: 0710.0539

  33. Caldwell JR, Watson RA, Thies C, Knowles JD (2018) Deep optimisation: Solving combinatorial optimisation problems using deep neural networks. arXiv preprint arXiv: 1811.00784,

  34. Macready William G, Wolpert David H (1996) What makes an optimization problem hand? Complexity 1(5):40–46

    Article  Google Scholar 

  35. Kate S-M, van Hemert V, Xin YL (2010) Understanding tsp difficulty by learning from evolved instances. In: International conference on learning and intelligent optimization, pages 266–280. Springer,

  36. Carl Robusto C (1957) The cosine-haversine formula. Am Math Mon 64(1):38–40

    Article  MathSciNet  Google Scholar 

  37. Prates M, Avelar PHC, Lemos H, Lamb LC, Vardi Moshe Y (2019) Learning to solve np-complete problems: a graph neural network for decision tsp. Proc AAAI Conf Artificial Intell 33:4731–4738

    Google Scholar 

  38. Gerhard R (1995) Tsplib95. Interdisziplinäres Zentrum für Wissenschaftliches Rechnen (IWR), Heidelberg, 338,

  39. Rennie SJ , Marcheret E, Mroueh Y, Ross J, Goel V (2017) Self-critical sequence training for image captioning. In: Proceedings of the IEEE conference on computer vision and pattern recognition, pages 7008–7024,

  40. Souza LC, Usberti FL, Técnico-IC-PFG Relatório , Final de Graduação Projeto(2019) Two-stage stochastic traveling salesman problem with evolutionary framework. Inst. de Computação,

  41. Gent Ian P, Walsh Toby (1996) The tsp phase transition. Artificial Intell 88(1–2):349–358

    Article  MathSciNet  Google Scholar 

  42. Hochreiter S, Schmidhuber J (1997) Long short-term memory. Neural Comput 9(8):1735–1780

    Article  Google Scholar 

  43. Dzmitry B, Kyunghyun C, Yoshua B (2014) Neural machine translation by jointly learning to align and translate. arXiv preprint arXiv: 1409.0473

  44. Xavier B ,Thomas L (2021). The transformer network for the traveling salesman problem. arXiv preprint arXiv:2103.03012,

  45. Wouter K, Herke van H, Joaquim G, Max W (2021) Deep policy dynamic programming for vehicle routing problems. arXiv preprint arXiv:2102.11756,

  46. Nasrin S, Jeffrey C, Tabinda S, Babak A, Qin AK (2021) Learning enhanced optimisation for routing problems. arXiv preprintarXiv:2109.08345,

  47. Kingma DP, Adam JB (2014) A method for stochastic optimization. arXiv preprintarXiv:1412.6980,

  48. Bresson X , Laurent T ( 2018) An experimental study of neural networks for variable graphs. Arxiv,

  49. Yoshua B, Andrea L, Antoine P (2020) Machine learning for combinatorial optimization: a methodological tour d’horizon. Euro J Oper Res

  50. Hao L, Xingwen Z, Shuang Y (2019) A learning-based iterative method for solving vehicle routing problems. In: International conference on learning representations

  51. Li Z, Quanhong W, Haihua L, Yong Z (2019) End-to-end learning of multi-scale convolutional neural network for stereo matching. arXiv preprint arXiv:1906.10399

Download references

Acknowledgements

The authors wish to thank Kendall Taylor for his valuable comments and helpful suggestions for figures which greatly improved the paper’s quality.

Author information

Authors and Affiliations

Authors

Corresponding author

Correspondence to Nasrin Sultana.

Additional information

Publisher's Note

Springer Nature remains neutral with regard to jurisdictional claims in published maps and institutional affiliations.

Rights and permissions

Reprints and permissions

About this article

Check for updates. Verify currency and authenticity via CrossMark

Cite this article

Sultana, N., Chan, J., Sarwar, T. et al. Learning to optimise general TSP instances. Int. J. Mach. Learn. & Cyber. 13, 2213–2228 (2022). https://doi.org/10.1007/s13042-022-01516-8

Download citation

  • Received:

  • Accepted:

  • Published:

  • Issue Date:

  • DOI: https://doi.org/10.1007/s13042-022-01516-8

Keywords

Navigation