struc2vec: Learning Node Representations from Structural Identity

Leonardo F. R. Ribeiro, Pedro H. P. Saverese, Daniel R. Figueiredo

The struc2vec algorithm learns continuous representations for nodes in any graph. struc2vec captures structural equivalence between nodes.


Structural identity is a concept of symmetry in which network nodes are identified according to the network structure and their relationship to other nodes. Structural identity has been studied in theory and practice over the past decades, but only recently has it been addressed with representational learning techniques. This work presents struc2vec, a novel and flexible framework for learning latent representations for the structural identity of nodes. struc2vec uses a hierarchy to measure node similarity at different scales, and constructs a multilayer graph to encode structural similarities and generate structural context for nodes. Numerical experiments indicate that state-of-the-art techniques for learning node representations fail in capturing stronger notions of structural identity, while struc2vec exhibits much superior performance in this task, as it overcomes limitations of prior approaches. As a consequence, numerical experiments indicate that struc2vec improves performance on classification tasks that depend more on structural identity.

Blog post

Promotional Video


[Link] Leonardo F. R. Ribeiro, Pedro H. P. Saverese, Daniel R. Figueiredo, struc2vec: Learning Node Representations from Structural Identity, ACM SIGKDD 2017


A reference implementation of struc2vec in Python is available on GitHub.


The datasets used in the paper are available on GitHub.




If you think struc2vec useful in your research, we ask that you cite the following paper:

               author = {Ribeiro, Leonardo F.R. and Saverese, Pedro H.P. and Figueiredo, Daniel R.},
               title = {Struc2Vec: Learning Node Representations from Structural Identity},
               booktitle = {Proceedings of the 23rd ACM SIGKDD International Conference on Knowledge Discovery and Data Mining},
               series = {KDD '17},
               year = {2017},
               isbn = {978-1-4503-4887-4},
               location = {Halifax, NS, Canada},
               pages = {385--394},
               numpages = {10},
               url = {},
               doi = {10.1145/3097983.3098061},
               acmid = {3098061},
               publisher = {ACM},
               address = {New York, NY, USA},
               keywords = {feature learning, node embeddings, structural identity},