Abstract
BiasedWalk is a scalable, unsupervised algorithm for learning node embeddings that captures both community structures (homophily) and structural roles (equivalence) in graphs. By utilizing a novel first-order biased random walk based on "proximity scores," it achieves performance superior to state-of-the-art methods like node2vec while significantly reducing memory overhead on large, dense networks. The algorithm scales linearly with the number of edges, making it a robust choice for massive real-world graphs.
Introduction
To apply machine learning to graph-structured data, such as social networks or biological pathways, nodes must first be transformed into low-dimensional mathematical vectors—a process known as representation learning or embedding. An effective embedding must capture two fundamental properties: homophily, where proximal nodes share similar vectors, and structural role, where nodes performing similar functions (e.g., hubs) are mapped closely regardless of their distance in the network.
Existing state-of-the-art methods like node2vec attempt to balance these properties using second-order random walks. However, these methods face a significant scalability hurdle: they require storing interconnections between neighbors, leading to a space complexity of $O(\tilde{D}|E|)$. This makes them impractical for very large or dense graphs. BiasedWalk addresses this limitation by simulating complex exploration patterns using only first-order information, achieving a space complexity of $O(|E|)$.
Methodology
BiasedWalk builds upon the Skip-gram architecture but introduces a novel node sampling procedure driven by proximity scores ($\tau_v$). As a random walk progresses, the algorithm maintains a map of these scores for candidate nodes. When a node is visited at step $l$, the proximity scores of all its neighbors are increased by an exponential factor ($\alpha^{l-1}$). This mechanism acts as a "memory" of the walk's path, tracking how close a candidate node is to the current trajectory.
The algorithm can be toggled between two distinct behaviors to suit different downstream tasks:
- BFS-style Sampling: The transition probability is proportional to the proximity score. This keeps the walk local, allowing the model to learn structural roles and equivalence.
- DFS-style Sampling: The transition probability is inversely proportional to the score. This pushes the walk further into the network, enabling it to capture broader community structures (homophily).
By adjusting the parameter $\alpha$, users can exert fine-grained control over the sampling's locality. This first-order approach allows BiasedWalk to scale linearly with graph size, making it suitable for networks with millions of nodes and edges.
Experimental Evaluation
The authors evaluated BiasedWalk across diverse domains, including social relationships (BlogCatalog), protein-protein interactions (PPI), and movie co-directorship (IMDB). The evaluation spanned multilabel classification, link prediction, and scalability testing on synthetic Erdős-Rényi graphs.
Key Results
- Superior Accuracy: In the BlogCatalog dataset, BiasedWalk improved the Macro-F1 score by 15% and the Micro-F1 score by 6% compared to baselines like DeepWalk and node2vec.
- Robust Link Prediction: BiasedWalk achieved the highest scores in nearly all link prediction tasks. Notably, it successfully processed the large Epinions graph, which caused the HOPE algorithm to fail due to high complexity.
- Linear Scalability: Experiments confirmed a linear relationship between graph size and computation time. BiasedWalk successfully embedded a 1-million-node graph in just a few hours.
Conclusion and Future Work
BiasedWalk demonstrates that memory-heavy second-order walks are not strictly necessary to capture the dual properties of homophily and structural equivalence. By utilizing proximity scores, the algorithm achieves state-of-the-art results with significantly improved efficiency.
Future research will focus on providing a deeper theoretical analysis of the biased random walk scheme. Additionally, the authors plan to adapt BiasedWalk for more specialized network types, such as signed networks (containing trust/distrust edges) and ego networks, and explore automated methods for hyperparameter tuning to reduce the need for cross-validation.
Summary updated