Home▸Articles▸Data Science

Link Prediction Lab 2D: Node Embeddings & Edge Scoring

A powerful technique in network analysis that leverages machine learning to predict missing or future connections within a graph.

mysimulator teamUpdated June 2026≈ 3 min read▶ Open the simulation

What Link Prediction Is

Link prediction is the task of predicting missing or future connections (links) between nodes in a network. This technique is widely used in social networks, recommendation systems, and biological networks to infer relationships that are not explicitly observed.

In the context of this simulation, link prediction involves embedding each node into a 2D space where its position reflects certain properties of the node, and then using these embeddings to score potential links between nodes.

How Node Embeddings Work

Node embeddings are a way to represent nodes in a network as points in a high-dimensional space. In this simulation, a Graph Convolutional Network (GCN) style neighbor-mean aggregation rule is used to pull these node embeddings together based on the connections between them.

This process involves averaging the embeddings of neighboring nodes and updating each node's embedding accordingly, which helps capture the structural information of the network.

live demo · related simulation● LIVE

Edge Scoring Methods

After obtaining the node embeddings, edge scoring methods are used to predict potential links between nodes. The simulation allows you to choose between cosine similarity and dot product as your scoring method.

Cosine similarity measures the cosine of the angle between two vectors (embeddings), which is useful for capturing the directionality of relationships, while the dot product provides a measure of how much these vectors align in terms of magnitude.

Why It Matters

Link prediction is crucial for understanding and modeling complex networks. By predicting missing or future links, we can gain insights into network dynamics, improve recommendation systems, and enhance our understanding of various real-world phenomena.

The AUC (Area Under the Curve) readout in this simulation provides a quantitative measure of how well the model performs in distinguishing between actual and predicted links.

Frequently asked questions

What is an embedding in graph theory?

An embedding in graph theory refers to representing each node as a point in a high-dimensional space, where the position of the point reflects certain properties or relationships within the network.

How does cosine similarity differ from dot product in edge scoring?

Cosine similarity measures the angle between two vectors and is scale-invariant, making it useful for capturing directional relationships. Dot product measures how much two vectors align in terms of magnitude, which can be more sensitive to the overall size of the vectors.

Why use a GCN-style neighbor-mean aggregation rule?

GCN-style neighbor-mean aggregation helps capture local network structure by averaging the embeddings of neighboring nodes. This method is effective in preserving important structural information and can lead to better node representations.

What does AUC stand for, and how is it used in link prediction?

AUC stands for Area Under the Curve and represents the performance of a binary classifier system. In the context of link prediction, it measures the model's ability to rank actual links higher than non-links.

Try it live

Everything above runs in your browser — open Link Prediction Lab 2D: Node Embeddings & Edge Scoring and change the parameters while it is running. Nothing is installed, nothing is uploaded, the whole model lives in one tab.

▶ Open Link Prediction Lab 2D: Node Embeddings & Edge Scoring simulation

What did you find?

Add reproduction steps (optional)