Using tf-gnn to predict similar graphs

What’s the best approach to predict similarity between two graph structures?

My goal is to build a model that will learn the similarity metric between two graphs and go on to predict the most similar (or top-K most similar) graph to an inputted graph. My training data consists of random pairs of graphs and their cosine similarity. My current model is pretty basic, and it does not perform well at all. It’s a simple Sequential model with 2 hidden layers. I experienced a lot of trouble with prepping the data to be trained/tested because the graphs are of varying lengths which affects the input shape.

That’s when I came across TensorFlow GNN, and it looks like this could be a better approach. Are there any tutorials similar to my use case out there? Or are there other approaches that people know of that would be better suited for me?

1 Like