3

I have a dataset and want to be able to construct a graph from it in a supervised fashion.

Let's assume I have a dataset with N nodes, each node has e.g. 10 features. Out of these N nodes, I want to learn a graph, i.e. an $N \times N$ adjacency matrix. So, I start with $N$ nodes and all I know is a 10-dimensional feature vector for each node. I have no knowledge about the relation between these nodes and want to figure it out.

Here is an example for $N=6$, but in practice $N$ is not fixed. enter image description here

So the output I would like to get here is a $6\times6$ adjacency matrix, representing the relations between the nodes (undirected).

Note: N is arbitrary and not fixed. So an algorithm should be able to perform on any given N.

My dataset is labeled. For the training dataset, I have the desired adjacency matrix for each collection of input nodes, which is filled with $0$s and $1$s.

However, the output of the algorithm could also be an adjacency matrix filled with non-integer numbers in $[0,1]$, giving some kind of probability of the nodes being connected (preferably close to $0$ or $1$ of course). So I could easily give a number as the label for each node. In the above example, the labels for the three connected nodes could be class $1$, and so on.

Is there any kind of supervised learning algorithm (e.g. some sort of graph neural network) that can perform these tasks?

basti123
  • 31
  • 2

1 Answers1

2

It's perfectly reasonable to apply 'traditional' Deep Learning approaches to try and learn an adjacency matrix (a matrix is just a vector of vectors, which can be flattened into a single output vector) but you might need a lot of training data as N gets larger.

Your outputs could certainly have the form of an adjacency matrix, as you describe. Whether it's more useful to have 'boolean' (either 0 or 1) or 'probabalistic' entries in the matrix depends both on the data and the specifics of your end application.

NietzscheanAI
  • 7,286
  • 24
  • 38