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 has only recently been addressed with techniques from representational learning. This work presents struc2vec, a novel and flexible framework for learning latent representations of node’s structural identity. struc2vec assesses structural similarity without using node or edge attributes, uses a hierarchy to measure similarity at different scales, and constructs a multilayer graph to encode the 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 techniques.