Skip to main content
Log in

Generalization of machine learning for problem reduction: a case study on travelling salesman problems

  • Regular Article
  • Published:
OR Spectrum Aims and scope Submit manuscript

Abstract

Combinatorial optimization plays an important role in real-world problem solving. In the big data era, the dimensionality of a combinatorial optimization problem is usually very large, which poses a significant challenge to existing solution methods. In this paper, we examine the generalization capability of a machine learning model for problem reduction on the classic travelling salesman problems (TSP). We demonstrate that our method can greedily remove decision variables from an optimization problem that are predicted not to be part of an optimal solution. More specifically, we investigate our model’s capability to generalize on test instances that have not been seen during the training phase. We consider three scenarios where training and test instances are different in terms of: (1) problem characteristics; (2) problem sizes; and (3) problem types. Our experiments show that this machine learning-based technique can generalize reasonably well over a wide range of TSP test instances with different characteristics or sizes. Since the accuracy of predicting unused variables naturally deteriorates as a test instance is further away from the training set, we observe that, even when tested on a different TSP problem variant, the machine learning model still makes useful predictions about which variables can be eliminated without significantly impacting solution quality.

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

Similar content being viewed by others

Notes

  1. Our C++ source codes are publicly available online at https://github.com/yuansuny/tsp.

  2. https://matilda.unimelb.edu.au/matilda/.

  3. We do not remove the edges that appear in the best sample solution to guarantee that the reduced problem space contains at least one feasible solution.

References

  • Applegate D, Cook W, Rohe A (2003) Chained Lin–Kernighan for large traveling salesman problems. INFORMS J Comput 15(1):82–92

    Article  Google Scholar 

  • Applegate D, Bixby R, Chvatal V, Cook W (2006a) Concorde TSP solver

  • Applegate DL, Bixby RE, Chvatal V, Cook WJ (2006b) The traveling salesman problem: a computational study. Princeton University Press, Princeton

    Google Scholar 

  • Balasundaram B, Butenko S, Hicks IV (2011) Clique relaxations in social network analysis: the maximum k-plex problem. Oper Res 59(1):133–142

    Article  Google Scholar 

  • Bello I, Pham H, Le QV, Norouzi M, Bengio S (2016) Neural combinatorial optimization with reinforcement learning. arXiv preprint. arXiv:1611.09940

  • Bengio Y, Lodi A, Prouvost A (2018) Machine learning for combinatorial optimization: a methodological tour d’horizon. arXiv preprint. arXiv:1811.06128

  • Blum C, Pinacho P, López-Ibáñez M, Lozano JA (2016) Construct, merge, solve & adapt a new general algorithm for combinatorial optimization. Comput Oper Res 68:75–88

    Article  Google Scholar 

  • Boser BE, Guyon IM, Vapnik VN (1992) A training algorithm for optimal margin classifiers. In: Proceedings of the fifth annual workshop on computational learning theory. ACM, pp 144–152

  • Chang C-C, Lin C-J (2011) LIBSVM: a library for support vector machines. ACM Trans Intell Syst Technol 2:27:1–27:27

    Article  Google Scholar 

  • Chen X, Tian Y (2019) Learning to perform local rewriting for combinatorial optimization. Adv Neural Inf Process Syst 6278–6289

  • Cortes C, Vapnik V (1995) Support-vector networks. Mach Learn 20(3):273–297

    Google Scholar 

  • Deudon M, Cournut P, Lacoste A, Adulyasak Y, Rousseau L-M (2018) Learning heuristics for the TSP by policy gradient. In: International conference on the integration of constraint programming, artificial intelligence, and operations research. Springer, pp 170–181

  • Ding J-Y, Zhang C, Shen L, Li S, Wang B, Xu Y, Song L (2019) Accelerating primal solution findings for mixed integer programs based on solution prediction. arXiv preprint. arXiv:1906.09575

  • Dong C, Jäger G, Richter D, Molitor P (2009) Effective tour searching for tsp by contraction of pseudo backbone edges. In: International conference on algorithmic applications in management. Springer, pp 175–187

  • Fan R-E, Chen P-H, Lin C-J (2005) Working set selection using second order information for training support vector machines. J Mach Learn Res 6(Dec):1889–1918

    Google Scholar 

  • Fan R-E, Chang K-W, Hsieh C-J, Wang X-R, Lin C-J (2008) LIBLINEAR: a library for large linear classification. J Mach Learn Res 9(Aug):1871–1874

    Google Scholar 

  • Fischer T, Merz P (2007) Reducing the size of traveling salesman problem instances by fixing edges. In: European conference on evolutionary computation in combinatorial optimization. Springer, pp 72–83

  • Friggstad Z, Gollapudi S, Kollias K, Sarlos T, Swamy C, Tomkins A (2018) Orienteering algorithms for generating travel itineraries. In: Proceedings of the eleventh ACM international conference on web search and data mining. ACM, pp 180–188

  • Gao J, Chen J, Yin M, Chen R, Wang Y (2018) An exact algorithm for maximum k-plexes in massive graphs. IJCAI 1449–1455

  • Grassia M, Lauri J, Dutta S, Ajwani D (2019) Learning multi-stage sparsification for maximum clique enumeration. arXiv preprint. arXiv:1910.00517

  • He H, Daume H III, Eisner JM (2014) Learning to search in branch and bound algorithms. Adv Neural Inf Process Syst 3293–3301

  • Helsgaun K (2000) An effective implementation of the Lin–Kernighan traveling salesman heuristic. Eur J Oper Res 126(1):106–130

    Article  Google Scholar 

  • Hougardy S, Schroeder RT (2014) Edge elimination in tsp instances. In: International workshop on graph-theoretic concepts in computer science. Springer, pp 275–286

  • Jäger G, Dong C, Goldengorin B, Molitor P, Richter D (2014) A backbone based TSP heuristic for large instances. J Heuristics 20(1):107–124

    Article  Google Scholar 

  • Johnson DS, McGeoch LA (1997) The traveling salesman problem: a case study in local optimization. Local Search Comb Optim 1(1):215–310

    Google Scholar 

  • Jonker R, Volgenant T (1983) Transforming asymmetric into symmetric traveling salesman problems. Oper Res Lett 2(4):161–163

    Article  Google Scholar 

  • Jonker R, Volgenant T (1984) Nonoptimal edges for the symmetric traveling salesman problem. Oper Res 32(4):837–846

    Article  Google Scholar 

  • Khalil E, Dai H, Zhang Y, Dilkina B, Song L (2017) Learning combinatorial optimization algorithms over graphs. Adv Neural Inf Process Syst 6348–6358

  • Kilby P, Slaney J, Walsh T et al (2005) The backbone of the travelling salesperson. IJCAI 175–180

  • Kool W, van Hoof H, Welling M (2019) Attention, learn to solve routing problems!. International conference on learning representations

  • Lauri J, Dutta S (2019) Fine-grained search space classification for hard enumeration variants of subset problems. In: Proceedings of the thirty-third AAAI conference on artificial intelligence. AAAI, pp 2314–2321

  • Li Z, Chen Q, Koltun V (2018) Combinatorial optimization with graph convolutional networks and guided tree search. Adv Neural Inf Process Syst 539–548

  • Lin S, Kernighan BW (1973) An effective heuristic algorithm for the traveling-salesman problem. Oper Res 21(2):498–516

    Article  Google Scholar 

  • Lin C-J, Weng RC, Keerthi SS (2008) Trust region Newton method for logistic regression. J Mach Learn Res 9(Jun):627–650

    Google Scholar 

  • Reinelt G (1991) Tsplib—a traveling salesman problem library. ORSA J Comput 3(4):376–384

    Article  Google Scholar 

  • Sherali HD, Driscoll PJ (2002) On tightening the relaxations of Miller–Tucker–Zemlin formulations for asymmetric traveling salesman problems. Oper Res 50(4):656–669

    Article  Google Scholar 

  • Smith-Miles K, van Hemert J (2011) Discovering the suitability of optimisation algorithms by learning from evolved instances. Ann Math Artif Intell 61(2):87–104

    Article  Google Scholar 

  • Sun Y, Li X, Ernst A (2019) Using statistical measures and machine learning for graph reduction to solve maximum weight clique problems. IEEE Trans Pattern Anal Mach Intell

  • Vinyals O, Fortunato M, Jaitly N (2015) Pointer networks. Adv Neural Inf Process Syst 2692–2700

  • Wu Q, Hao J-K (2015) A review on algorithms for maximum clique problems. Eur J Oper Res 242(3):693–709

    Article  Google Scholar 

  • Wu Y, Song W, Cao Z, Zhang J, Lim A (2019) Learning improvement heuristics for solving the travelling salesman problem. arXiv preprint. arXiv:1912.05784

Download references

Acknowledgements

This work was supported by an ARC Discovery Grant (DP180101170) from Australian Research Council.

Author information

Authors and Affiliations

Authors

Corresponding author

Correspondence to Yuan Sun.

Additional information

Publisher's Note

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

Appendix A: Random sampling method for sequential ordering problem

Appendix A: Random sampling method for sequential ordering problem

figure c

The main steps of our random sampling method to generate one feasible route for SOP can be summarized as follows:

  1. 1.

    Initialize a route starting from city 1;

  2. 2.

    Compute a set of candidate cities \(V_c\) that do not have any precedence after removing the cities that have already been visited;

  3. 3.

    Randomly select a city from the candidates \(V_c\) to visit;

  4. 4.

    Repeat Steps 2 and 3 until all cities have been visited.

To avoid redundant computation, we first iterate through the set of precedence constraints \({\mathcal {S}}\) to count the number of cities that should be visited before visiting city i (\(i=1,\ldots ,n\)) and store this in array A. We also store the individual cities that should be visited after city i (\(i=1,\ldots ,n\)) in a linked list L (lines 3–6 in Algorithm 3). Having A and L, we can efficiently update the set of candidate cities \(V_c\) that can be visited in the next step after removing the cities already visited (lines 14–17 in Algorithm 3). The idea is that after removing city v in the current step, we iterate through the linked list L[v] and for every \(v'\) in L[v], we decrement \(A[v']\) by 1. If \(A[v']\) is equal to 0, then city \(v'\) can be visited in the next step since it does not have any precedence apart from the cities already visited. By doing this, we can generate one sample route in \({\mathcal {O}}\big (|{\mathcal {S}}|\big )\) time. Thus, the total time complexity of generating m samples is \({\mathcal {O}}\big (m|{\mathcal {S}}|\big )\).

Rights and permissions

Reprints and permissions

About this article

Check for updates. Verify currency and authenticity via CrossMark

Cite this article

Sun, Y., Ernst, A., Li, X. et al. Generalization of machine learning for problem reduction: a case study on travelling salesman problems. OR Spectrum 43, 607–633 (2021). https://doi.org/10.1007/s00291-020-00604-x

Download citation

  • Received:

  • Accepted:

  • Published:

  • Issue Date:

  • DOI: https://doi.org/10.1007/s00291-020-00604-x

Keywords

Navigation