A Machine Learning Approach to Algorithm Selection for Exact Computation of Treewidth

Borislav Slavchev, Evelina Masliankova, Steven Kelk*

*Corresponding author for this work

Research output: Contribution to journalArticleAcademicpeer-review


We present an algorithm selection framework based on machine learning for the exact computation of treewidth, an intensively studied graph parameter that is NP-hard to compute. Specifically, we analyse the comparative performance of three state-of-the-art exact treewidth algorithms on a wide array of graphs and use this information to predict which of the algorithms, on a graph by graph basis, will compute the treewidth the quickest. Experimental results show that the proposed meta-algorithm outperforms existing methods on benchmark instances on all three performance metrics we use: in a nutshell, it computes treewidth faster than any single algorithm in isolation. We analyse our results to derive insights about graph feature importance and the strengths and weaknesses of the algorithms we used. Our results are further evidence of the advantages to be gained by strategically blending machine learning and combinatorial optimisation approaches within a hybrid algorithmic framework. The machine learning model we use is intentionally simple to emphasise that speedup can already be obtained without having to engage in the full complexities of machine learning engineering. We reflect on how future work could extend this simple but effective, proof-of-concept by deploying more sophisticated machine learning models.

Original languageEnglish
Article number200
Number of pages20
Issue number10
Publication statusPublished - Sept 2019


  • algorithm selection
  • combinatorial optimisation
  • machine learning
  • tree decomposition
  • treewidth

Cite this