Link Prediction without Graph Neural Networks

Zexi Huang, Mert Kosan, Arlei Lopes da Silva, Ambuj SinghICLR 2023 · DOI

TL;DR

This paper introduces Gelato, a novel framework for link prediction that challenges the dominance of Graph Neural Networks (GNNs). By addressing critical issues of class imbalance in training and evaluation, Gelato achieves superior accuracy and significantly faster training and inference times compared to state-of-the-art GNNs, all while using fewer parameters.

What Problem Does This Paper Address?

Link prediction, the task of predicting missing connections in a graph, is a crucial problem in many domains, from social networks to recommender systems. Graph Neural Networks (GNNs) have become the go-to method, often outperforming traditional heuristics. However, the authors argue that GNNs' success might be overstated due to how they handle the inherent class imbalance in real-world graphs (many more non-edges than edges). They point out that current GNN evaluation methods often use "biased testing" that overestimates performance, and their training methods can be inefficient. The paper aims to develop a more accurate, efficient, and robust link prediction method that addresses these limitations.

Methods

The core of Gelato is a "topology-centric" approach, contrasting with the "attribute-centric" message-passing of GNNs. It involves two main stages:

  1. Graph Learning: Instead of GNNs learning embeddings from topology and attributes, Gelato learns an "enhanced graph." This involves augmenting the original graph structure with information derived from node attributes. A simple Multi-Layer Perceptron (MLP) is used to learn weights for these augmented edges, effectively incorporating attribute similarity into the graph's topology.
  2. Topological Heuristic: The enhanced graph is then fed into a topological heuristic called Autocovariance (AC). AC is a random-walk based similarity measure that was previously shown to be effective for link prediction on non-attributed graphs.

Crucially, Gelato addresses class imbalance through:

  • Unbiased Training: The model is trained on a dataset that reflects the true ratio of edges to non-edges in the graph, rather than downsampling negative examples.
  • N-pair Loss: A metric learning loss function that contrasts positive edges against multiple negative edges, making it more sensitive to hard negative examples and better suited for imbalanced data.

Datasets

The paper evaluates Gelato on five standard attributed graph datasets commonly used for link prediction benchmarks:

  • CORA: Citation network.
  • CITESEER: Citation network.
  • PUBMED: Citation network.
  • PHOTO: Subgraph of the Amazon co-purchase graph.
  • COMPUTERS: Subgraph of the Amazon co-purchase graph.

The authors note that they use a specific data splitting strategy for unbiased training and testing, ensuring that validation and testing positive edges are included in the negative training set to simulate real-world scenarios.

Key Insights and Ideas

  • GNN Performance Overstated: The paper convincingly demonstrates that standard evaluation metrics and training practices for GNNs in link prediction can be misleading due to class imbalance, leading to an overly optimistic view of their performance.
  • Topology-Centric is Key for Link Prediction: For link prediction, which is inherently a task about graph structure, a topology-centric approach that enhances the topology with attributes is more effective than GNNs' attribute-centric message-passing.
  • Simplicity Can Trump Complexity: A simple MLP combined with a well-chosen topological heuristic (AC) and proper training (unbiased, N-pair loss) can outperform complex GNN architectures.
  • Class Imbalance is a Major Hurdle: The paper highlights that class imbalance is not just a minor inconvenience but a fundamental challenge that requires careful consideration in both model training and evaluation.

Key Results

Gelato demonstrates significant improvements over state-of-the-art GNN-based methods and topological heuristics:

  • Accuracy: Gelato achieves a 145.2% relative gain in Average Precision (AP) compared to the best GNN baseline and a 52.6% gain over Autocovariance alone.
  • Efficiency:
    • Training Speed: Gelato trains 11 times faster than the best GNN baseline (Neo-GNN).
  • Inference Speed: Gelato infers 6,000 times faster than Neo-GNN.
  • Model Size: Gelato has less than half the trainable parameters of Neo-GNN.
  • Robustness: The proposed unbiased training and N-pair loss lead to more consistent performance and better generalization, especially compared to cross-entropy loss with biased training.

Limitations and Future Work

  • Hyperparameter Tuning: While Gelato's hyperparameters are shown to be tunable, finding optimal settings might still require careful experimentation.
  • Incompatibility of N-pair Loss with Some GNNs: The paper notes that while the N-pair loss and unbiased training improved MLP performance, they did not yield better results for some GNN baselines when applied. Further research is suggested to understand this incompatibility.
  • Future Directions: The authors suggest exploring adversarial negative sampling methods for improved negative sample generation and investigating other differentiable topological heuristics or combinations thereof. They also believe their findings could open new research directions for understanding deep learning models on graphs.

Summary updated

BibTeX
@misc{huang2023link,
  author = {Zexi Huang and Mert Kosan and Arlei Lopes da Silva and Ambuj Singh},
  title = {{Link Prediction without Graph Neural Networks}},
  year = {2023},
  eprint = {2305.13656},
  archivePrefix = {arXiv},
  url = {https://arxiv.org/abs/2305.13656},
}
Figure