All models

LINE

Node embeddings for million-node graphs that keep both neighbors and shared-neighbor structure close.

Graphs and geometry · 13 operations Checked

100%

Showing the top corner; full diagram not loaded yetShowing a small copy; full diagram not loaded yetLarge diagram, not loaded yet

Open SVG

Loading diagram (17 KB)

Open in a new tab

Click or tap a spot to read it up close. Scroll or drag inside the diagram to move through it. Zoom with + and − or Ctrl and scroll. Press 0 for the whole graph. Swipe inside the diagram to move through it. Use + and − to zoom.

At a glance

Family
LINE
Parameters
291.5M
Operations
13
Framework
PyTorch
Recurrent
No
Published
WWW 2015
Cited by
5,973 (as of 26 November 2026)
Authors
Jian Tang, Meng Qu, Mingzhe Wang and others
License
MIT
Checked
Passed: the trace was replayed operation by operation and matched the model's own output for this input.

Files

The diagram is a drawing of a TorchLens trace of the source code. It contains no code or weights.

Details
Stable ID
m1504
Graph hash
4432d8d54823d816c1628ffa0e9e3a3e2eae5c969784859ff87e5dfef3fb7f66
Skeleton hash
fc907a59c30734ba398688de2a00dfa6ae72c653639c27814e136b3d552b598e
Architecture hash
24de60d95796cf844e816e94f6a5fc86292d6b6987136c04a6242d67d8b072cc
Diagram SHA-256
beaae2a06c51a37b2c8b45471114937d00f74c3946b07a2e68dfa9c37f10dc60
TorchLens version
2.36.0
Renderer
graphviz 2.43.0+pyvips 3.2.0+libvips 8.18.7+render-opts@06c1f0d3
Check
Forward pass replayed in PyTorch

What it is

LINE, for Large-scale Information Network Embedding, maps the nodes of very large graphs into low-dimensional vectors for visualization, node classification and link prediction. It was built for networks of millions of nodes, where earlier graph embedding methods did not scale, and it accepts undirected, directed and weighted edges alike. The objective is designed to preserve both local and global network structure.

Local structure is first-order proximity: for two vertices joined by an edge, the edge weight is their proximity, and without an edge it is 0. Global structure is second-order proximity, the similarity between two vertices' neighborhood structures, so that nodes sharing many neighbors land close together even when no edge links them. The paper contrasts this with DeepWalk, whose truncated random walks behave like a depth-first search; LINE uses a breadth-first strategy and also handles weighted edges. Because edge weights can range from one to hundreds of thousands, plain stochastic gradient descent explodes; the fix is to sample edges with probability proportional to weight and treat each sample as a binary edge. With an alias table, drawing an edge takes constant time, and negative sampling keeps each update cheap.

The first- and second-order models are trained separately, and LINE (1st+2nd) simply concatenates the two vectors into a longer one. The original toolkit is no longer maintained, and its authors point users to their GraphVite system instead. The paper reports that a network with millions of vertices and billions of edges embeds in a few hours on a typical single machine.

Key idea. A scalable node embedding whose objective preserves first- and second-order proximity, trained by weight-proportional edge sampling instead of plain SGD.

  • LINE
  • Large-scale Information Network Embedding
  • network embedding
  • node embedding
  • graph embedding
  • first-order proximity
  • second-order proximity
  • edge sampling
  • Tang
  • GraphVite

AI-written summary, based on the paper and checked automatically against it; not reviewed by a person. Corrections welcome.

Cite the paper

@misc{tang2015linelargescaleinformationnetwork,
      title={LINE: Large-scale Information Network Embedding}, 
      author={Jian Tang and Meng Qu and Mingzhe Wang and Ming Zhang and Jun Yan and Qiaozhu Mei},
      year={2015},
      eprint={1503.03578},
      archivePrefix={arXiv},
      primaryClass={cs.LG},
      doi={https://doi.org/10.1145/2736277.2741093},
      url={https://arxiv.org/abs/1503.03578}, 
}