NeurIPS 2026Coming to NeurIPS?Explore papers, orals & directions

LINE: Large-scale Information Network Embedding

Jian Tang, Meng Qu, Mingzhe Wang, Ming Zhang, Jun Yan, Qiaozhu MeiWWW 2015 · DOI

Abstract

This paper studies the problem of embedding very large information networks into low-dimensional vector spaces, which is useful in many tasks such as visualization, node classification, and link prediction. Most existing graph embedding methods do not scale for real world information networks which usually contain millions of nodes. In this paper, we propose a novel network embedding method called the "LINE," which is suitable for arbitrary types of information networks: undirected, directed, and/or weighted. The method optimizes a carefully designed objective function that preserves both the local and global network structures. An edge-sampling algorithm is proposed that addresses the limitation of the classical stochastic gradient descent and improves both the effectiveness and the efficiency of the inference. Empirical experiments prove the effectiveness of the LINE on a variety of real-world information networks, including language networks, social networks, and citation networks. The algorithm is very efficient, which is able to learn the embedding of a network with millions of vertices and billions of edges in a few hours on a typical single machine.

Introduction

In the era of massive data, information networks—such as social media follows, citation webs, or word co-occurrences—often contain millions of nodes and billions of edges. To make this data useful for machine learning tasks like node classification or recommendation, we need to "embed" these networks, representing each node as a dense, low-dimensional vector.

Existing embedding algorithms face two primary challenges: scalability and sparsity. Classical methods like MDS or Laplacian Eigenmaps have computational complexities that scale quadratically with the number of nodes, making them impractical for web-scale data. Furthermore, real-world networks are often sparse; two nodes might be highly similar but lack a direct link. LINE (Large-scale Information Network Embedding) addresses these issues by preserving both direct links and shared neighborhood structures through a novel edge-sampling optimization.

The LINE Framework

LINE optimizes an objective function designed to preserve two distinct types of proximity:

  • First-order Proximity: This captures the local, pairwise connection between nodes. If node A and node B have a strong edge between them, their embeddings should be close.
  • Second-order Proximity: This assumes that nodes with similar "contexts" (neighbors) are similar. Even if two nodes are not directly connected, sharing many common neighbors implies a high degree of similarity.
Illustration of first-order and second-order proximity in a network. Nodes 6 and 7 share a direct edge (1st order), while nodes 5 and 6 share multiple common neighbors (2nd order).

Optimization via Edge Sampling

Standard Stochastic Gradient Descent (SGD) often struggles with weighted graphs because edge weights can vary by orders of magnitude, leading to unstable gradients. LINE introduces a clever Edge Sampling technique: instead of using raw weights in the gradient update, the algorithm samples edges with a probability proportional to their weights. These sampled edges are treated as binary (weight = 1) for the update, maintaining the original objective function while ensuring stable and efficient learning.

Experimental Evaluation

The authors evaluated LINE on several massive, diverse datasets, including a word co-occurrence network built from the entire English Wikipedia (1.9M nodes, ~1 billion edges), social networks from Flickr and YouTube, and DBLP citation networks.

Key Results and Efficiency

LINE demonstrates superior performance in both accuracy and computational efficiency. On the 1-billion-edge Wikipedia network, LINE(2nd) completed the embedding process in under 3 hours on a single commodity server. In contrast, popular competitors like DeepWalk were significantly slower and less accurate on semantic tasks.

Comparison of LINE against state-of-the-art methods across semantic and syntactic tasks, including running times.

Key insights from the results include:

  • Complementary Proximity: Concatenating first- and second-order embeddings consistently yields the best performance, as they capture different structural nuances.
  • Linear Scalability: The optimization complexity is proportional to the number of edges and independent of the number of nodes, allowing the model to handle graphs that would crash traditional algorithms.
  • Superior Visualization: When visualized via t-SNE, LINE produces distinct clusters of research communities (e.g., Data Mining vs. Computer Vision) compared to other methods that often clump high-degree nodes together.

Limitations and Future Work

While LINE is highly effective, the authors identify several areas for future research:

  • Joint Training: Currently, first- and second-order proximities are trained separately. A joint optimization approach could be more principled.
  • Higher-order Proximity: Exploring 3rd-order or higher proximities might capture even deeper global structures beyond "friends of friends."
  • Heterogeneous Networks: Extending the framework to handle networks with multiple types of nodes and edges (e.g., users, products, and locations) remains a promising next step.

Summary updated

BibTeX
@inproceedings{tang2015line,
  author = {Jian Tang and Meng Qu and Mingzhe Wang and Ming Zhang and Jun Yan and Qiaozhu Mei},
  title = {{LINE: Large-scale Information Network Embedding}},
  booktitle = {The Web Conference},
  year = {2015},
  doi = {10.1145/2736277.2741093},
}
Figure