Path2Vec: Representation Learning for Node Sequences Based on Contrastive Learning
摘要
We often deal with sequences of nodes on graphs, such as routes from departure points to destinations in road networks, and information diffusion routes from information sources in SNS. While there has been much research on nodes and edges in graph machine learning, and many methods for embedding them in vector spaces have been proposed, there is little research on node sequences (path), and a method for embedding node sequences in vector space has not been established. In this study, for node sequences, we propose a novel method for embedding paths in a vector space by considering the nature and appearance order of nodes. Our method learns the vectors so that paths consisting of nodes with similar characteristics or consisting of the same nodes become similar vectors, whereas consisting of nodes with different properties or distant nodes become dissimilar vectors. The proposed method uses the framework of Contrastive Learning, which is a type of self-supervised learning. Specifically, a similar node sequence is generated by fixing the starting point, intermediate points, and ending point, and data-augmenting the path based on a random walk. Then, we nonlinearly project the encoded vectors considering the node vectors and the order of appearance, and learn various parameters so that the similarity of the embedding vectors of node sequences generated from the same starting point and ending point is high. Through evaluation experiments using actual road network data, we confirm that the desired vector can be obtained.