I have a network of labelled digraphs and a I need to perform a unsupervised learning algorithm on this data.

I am interested in embedding a network of description logic documents in a vector space using the ideas in the paper Co-embedding Attributed Networks (which is a variational auto-encoder). look at the picture:

enter image description here

The first step is to represent each digraph as a feature vector in a vector space.

I have googled a lot but I haven't found good explanations (I also search for supervised algorithms like support vector machine working on a set of labelled digraphs but google doesn't retrieve good results).

My question is: How can I represent a set of labelled digraphs into a vector for learning purposes? (this representation algorithm must have linear complexity)

  • 1
    $\begingroup$ It depends entirely on what the learning task is. What features might be important for your problem? Number of vertices? Number of edges? Density? Something a little more complicated? $\endgroup$
    – Juho
    Nov 27, 2019 at 17:41

1 Answer 1


I don't think that paper is suitable for what you want to do. That paper generates an embedding of nodes: given a graph $G$ and a node $v$ in $G$, it outputs an embedding of $v$ (a representation of some properties of $v$). You want an embedding of the entire graph: given a graph $G$, you want to compute an embedding of $G$ (a representation of the entire graph $G$).

So, I suspect you'll need to consider a different approach. A usual starting point would be to do exactly what @Juho recommended: brainstorm some features that might be relevant (e.g., number of nodes, average degree), then map the graph to a feature vector (a list of the values of these features), and use the feature vector as your representation of the graph. More sophisticated methods are possible as well, but I'd recommend you start with the simple approach before diving into more complex methods, especially if you are not very experienced in this field.


Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Not the answer you're looking for? Browse other questions tagged or ask your own question.