Unsupervised and Scalable Algorithm for Learning Node Representations

Tiago Pimentel, Adriano Veloso, Nivio ZivianiWorkshops @ ICLR 2017

TL;DR

The paper introduces Neighborhood Based Node Embeddings (NBNE), a highly efficient and fully unsupervised algorithm for learning graph representations. By replacing the traditional "random walk" approach with random permutations of a node’s immediate neighborhood, NBNE achieves state-of-the-art results in link prediction and node classification while eliminating the need for the costly parameter tuning required by predecessors like Node2Vec.

The Problem: The Cost of Random Walks

In graph machine learning, the goal is often to turn nodes into mathematical vectors (embeddings) that capture their structural identity. Historically, this required "feature engineering"—manually picking metrics like degree or centrality—which is slow and struggles to generalize.

Recent breakthroughs like DeepWalk and Node2Vec automated this process by treating graphs like text. They perform "random walks" across the graph to create "sentences" of nodes, then use Natural Language Processing techniques (specifically, the SkipGram model) to learn embeddings.

However, Node2Vec has a major drawback: it relies on two hyperparameters ($p$ and $q$) to guide its walks. Finding the optimal values for these parameters requires a labeled validation set, making the process semi-supervised and computationally expensive. The authors of this paper sought a method that is truly unsupervised, faster, and just as accurate.

The Solution: Neighborhood Based Node Embeddings (NBNE)

The core innovation of NBNE is how it generates "sentences" for the SkipGram model. Instead of walking through the graph, it looks directly at a node's neighborhood.

  1. Sentence Generation (The Permutation Trick): For every node (the "root"), the algorithm takes its neighbors and creates random permutations of them. Since neighborhoods are unordered sets but SkipGram requires ordered sequences, random permutations act as a data augmentation technique. It forces the model to learn that all neighbors are equally relevant to the root node's context.
  2. Chunking: These permutations are divided into small sequences (sentences) of size $k$. This handles nodes with massive neighborhoods that would otherwise create "sentences" too long for the model, and it injects a sense of "context" where none naturally exists in a set of neighbors.
  3. SkipGram Learning: These generated sentences are fed into the standard Word2Vec SkipGram algorithm. The model learns to predict a neighbor node given a root node, effectively mapping nodes with similar neighborhoods to similar locations in vector space.
  4. Scalability: The complexity is linear relative to the number of nodes and the "branching factor" (average degree). This makes it much faster to train than walk-based methods that require multiple iterations to tune parameters.

Datasets and Evaluation

The authors evaluated NBNE across three distinct types of networks:

  • Facebook: A social network graph (4,039 nodes, 88,234 edges) used for link prediction.
  • Astro: A collaboration network of physicists from Arxiv (18,772 nodes, 198,110 edges) used for link prediction.
  • Blog: A dataset of bloggers and their friendships (10,312 nodes, 333,983 edges) used for node classification across 39 different classes.

Key Results

Unlike Node2Vec, which essentially "cheats" by using a bit of labeled data to find the best walk parameters, NBNE can be trained on the raw graph structure alone. Despite this stricter unsupervised setting, NBNE demonstrates strong performance.

Performance comparison of NBNE against DeepWalk and Node2vec across three datasets.
  • Superior Performance on Complex Tasks: On the Astro dataset, NBNE outperformed Node2Vec by 5.43% in Precision and 7.62% in AUC.
  • Better Class Distribution: In the Blog classification task, NBNE achieved a Macro F1 score 22.45% higher than Node2Vec. This suggests that NBNE is significantly better at identifying nodes in smaller, less frequent classes, rather than just defaulting to the "easy" majority classes.
  • Facebook "Saturation": On the Facebook dataset, all models performed very similarly, with Node2Vec holding a slight edge. The authors suggest this is because the dataset is "saturated"—the structural patterns are so clear that most embedding methods easily reach a performance ceiling.
  • Efficiency: NBNE is significantly faster to deploy because it only requires one training pass. In contrast, Node2Vec often requires training up to 25 different models to find the optimal $p$ and $q$ parameters.

Limitations and Future Work

While NBNE successfully removes the $p$ and $q$ parameters, it introduces $n$ (the number of permutations). While the authors note this can be tuned on the training set without overfitting, very high values of $n$ could eventually slow down the training process.

Additionally, because NBNE focuses strictly on immediate neighborhoods, it might struggle with tasks that require "long-range" structural information—such as identifying nodes that play similar roles in distant parts of a massive graph—which random walks are generally better at capturing.

Ultimately, the authors suggest that NBNE's efficiency makes it a prime candidate for extremely large-scale graphs where traditional walk-based methods become computationally prohibitive.

Summary updated

BibTeX
@inproceedings{pimentel2017unsupervised,
  author = {Tiago Pimentel and Adriano Veloso and Nivio Ziviani},
  title = {{Unsupervised and Scalable Algorithm for Learning Node Representations}},
  booktitle = {Workshops @ ICLR},
  year = {2017},
}
Figure