The Node2Vec model is a method for learning low-dimensional vector representations of nodes in a graph. It is based on the concept of language embeddings, where words with similar contexts are represented by similar vectors. Similarly, in the context of graph data, nodes with similar structural roles are expected to have similar embeddings.
Node2Vec uses a random walk strategy to generate sequences of nodes based on their neighborhood relationships. By sampling different types of walks, the model captures both local and global graph structure. These random walks are then used to train a Skip-gram model, which learns vector representations of nodes that preserve the structural information from the graph.