Learning Large-scale Network Embedding from Representative Subgraph

Junsheng Kong, Weizhao Li, Ben Liao, Jiezhong Qiu, Chang-Yu Hsieh, Yi Cai, Jinhui Zhu, Shengyu ZhangarXiv 2021

Abstract

Network embedding transforms graph nodes into low-dimensional vectors, serving as a cornerstone for recommendation systems and social network analysis. However, existing methods struggle with the "scalability wall" when processing networks with millions of nodes. This paper introduces NES (Network Embedding from Representative Subgraph), a novel framework that leverages the structural importance of high-degree nodes to learn embeddings efficiently. By factorizing a small-scale information matrix derived from a representative subgraph and inferring global embeddings through a related matrix, NES achieves linear scalability. Experimental results on the YouTube dataset demonstrate that NES can embed over a million nodes in approximately 4 minutes, providing orders-of-magnitude speedups over traditional methods like DeepWalk and NetSMF without compromising classification accuracy.

Introduction

Network embedding is the process of mapping graph nodes into a low-dimensional latent space while preserving structural properties. As datasets grow to include millions or billions of edges, standard algorithms like DeepWalk or Node2Vec encounter significant bottlenecks. These methods often rely on random walks or the factorization of massive $n \times n$ matrices, where $n$ is the number of nodes. For instance, the NetMF approach, while theoretically elegant, often fails due to memory constraints on large-scale networks.

The critical challenge lies in capturing global network structure without the computational overhead of processing every node-to-node relationship. The NES framework addresses this by operating on the principle that a well-chosen "representative subgraph" contains sufficient structural information to infer embeddings for the entire network.

Methodology

The NES framework follows a three-stage pipeline designed for maximum efficiency and linear scalability.

The NES pipeline: from original graph to final embeddings via representative subgraph sampling and matrix factorization.

1. Degree-Based Sampling

The algorithm begins by identifying the top $k$ nodes with the highest degrees. These influential nodes serve as the "skeleton" of the network. While complex sampling strategies exist, the authors found that simple degree centrality is remarkably effective at capturing the core structural information of social and biological networks.

2. Small-Scale Matrix Factorization

Instead of factorizing the full network's information matrix, NES constructs a $k \times k$ matrix ($M_g$) representing the relationships within the sampled core subgraph. To maintain efficiency, the framework employs Random-Walk Polynomial Sparsification and applies Randomized SVD to extract the latent structure of this smaller matrix. This shift from $n \times n$ to $k \times k$ operations is the primary driver of the speedup.

3. Embedding Inference

The final step involves calculating embeddings for all $n$ nodes using the low-rank properties of the core. The authors derive a mathematical bridge using a "related matrix" $R$, which maps the relationships between unsampled nodes and the representative core. The final embedding $N_e$ is calculated as $N_e = M_R V'_d \Sigma'^{-1/2}_d$, allowing for the rapid generation of vectors for the entire population based on the sampled skeleton.

Representative subgraph matrix $A_g$ and related matrix $R$ used for embedding inference.

Experimental Evaluation

Datasets and Performance

The researchers evaluated NES against three standard benchmarks: PPI (3,890 nodes), BlogCatalog (10,312 nodes), and YouTube (1,138,499 nodes). On the YouTube dataset, NES achieved state-of-the-art performance by sampling only 1.32% of the total nodes.

The most striking result is the computational speedup. On the YouTube dataset:

  • DeepWalk required 24 hours.
  • NetSMF required 4.1 hours.
  • NES completed the task in just 4.1 minutes.

Furthermore, while traditional NetMF failed due to "out of memory" errors on the YouTube dataset, NES handled the million-node network with ease, demonstrating its memory efficiency.

Accuracy and Robustness

Despite only processing a fraction of the graph, NES matched or slightly outperformed DeepWalk, LINE, and Node2Vec in Micro-F1 and Macro-F1 scores for vertex classification tasks. The authors also demonstrated sampling robustness: as the sample size $k$ increases, performance plateaus quickly, suggesting that a very small percentage of high-degree nodes is sufficient for high-quality representation.

Discussion and Conclusion

NES demonstrates that the structural information of large-scale networks is often concentrated in a small set of influential nodes. By making the implicit matrix factorization of skip-gram methods explicit and localized, NES achieves linear scalability $O(n)$, making it future-proof for massive datasets.

However, limitations remain. Degree-based sampling may introduce bias in "long-tail" graphs where critical information resides in low-degree nodes. Additionally, while NES excels at static vertex classification, future work is needed to adapt the "representative core" concept to dynamic, evolving graphs and other downstream tasks like link prediction or community detection.

Summary updated

BibTeX
@misc{kong2021learning,
  author = {Junsheng Kong and Weizhao Li and Ben Liao and Jiezhong Qiu and Chang-Yu Hsieh and Yi Cai and Jinhui Zhu and Shengyu Zhang},
  title = {{Learning Large-scale Network Embedding from Representative Subgraph}},
  year = {2021},
  eprint = {2112.01442},
  archivePrefix = {arXiv},
  url = {https://arxiv.org/abs/2112.01442},
}
Figure