# How can Machine Learning be used to find attributes/characteristics of graphs?

I am aware ML is not necessary for many graph classification problems (as the graph theorists have many clever solutions), but I'm specifically interested in ML approaches to these types of questions. I imagine if you had enough training examples (1000s?) you could use a supervised approach for classification type of questions. I also assume an adjacency matrix would be a good data representation to use for ML approaches to undirected graph classification. Example problems are shown below.

1.) Given an undirected graph represented by an adjacency matrix, broadly speaking, how (if possible) could machine learning be used to find if said graph has a hamiltonian path?

2.) Given an undirected graph represented by an adjacency matrix, how can ML be used to determine if the graph is a tree?

ML is not likely to be a good approach for these kinds of problems. It will probably perform far worse than a hand-designed algorithm. Current ML is not magic; it is just a form of pattern-matching.

This depends heavily on the attribute you have in mind: I see no point in using ML for tree recognition for instance since we already have very practical exact algorithms for this. But sure, if you wanted to, nothing is stopping you from taking a bunch of graphs, representing them in some way and labeling them ("is a tree", "is not a tree") and training a classifier. Probably not very useful though.

With that being said, NP-hard problems could be more interesting but even then there are different approaches in the literature.

You can roughly say that there are at least three types of approaches:

• (i) using ML for choosing a heuristic that will perform well for a given instance,
• (ii) using ML for somehow finding the answer directly; and
• (iii) using ML for helping the human design heuristics.

For (i), a good keyword to search for is "algorithm portfolio". The distinction between say (ii) and (iii) is not that clear or easy to make. For (iii), you could have a look at . For (ii), I can mention at least the works  and  for TSP and maximum clique, respectively. These areas develop at an enormous speed, so you will find plenty of follow-up work to this already recent work.