Sub-graph Based Diffusion Model for Link Prediction

Hang Li, Wei Jin, Geri Skenderi, Harry Shomer, Wenzhuo Tang, Wenqi Fan, Jiliang Tang · DOI

Abstract

Link prediction is a fundamental task in graph machine learning, traditionally dominated by discriminative Graph Neural Networks (GNNs). However, these models often struggle with generalization and robustness. This paper introduces SGDiff, a generative framework that leverages denoising diffusion probabilistic models (DDPMs) focused on local sub-graphs. By decomposing the joint likelihood of graph structure and node features using a Bayesian approach, SGDiff achieves state-of-the-art performance, exceptional transferability, and enhanced robustness against adversarial attacks.

Introduction

Predicting missing links in networks is critical for applications ranging from social recommendation systems to biological network analysis. While GNNs have achieved significant success, they are primarily discriminative and often fail to generalize to unseen domains or resist adversarial perturbations. Generative models, particularly diffusion models, offer a promising alternative but face scalability issues when applied to entire graph adjacency matrices ($O(N^2)$).

SGDiff addresses these challenges by shifting the focus from global graph modeling to the local enclosing sub-graph of a node pair. This approach not only reduces computational complexity but also allows the model to learn universal structural motifs that are transferable across different graph domains.

Methodology: The SGDiff Framework

SGDiff treats link prediction as a conditional likelihood estimation problem. The core innovation lies in the Bayesian decomposition of the joint likelihood of a sub-graph $S$, characterized by its adjacency matrix $A$ and node features $X$, into two parallel diffusion processes:

  1. Structure Diffusion Model: This component estimates $p(A|y)$, the probability of the sub-graph topology given the link status $y$. It utilizes discrete diffusion to handle categorical edge data and employs "Double Radius Node Labeling" (DRNL) to encode the relative positions of nodes within the sub-graph.
  2. Feature Diffusion Model: This component estimates $p(X|A, y)$, the probability of node features conditioned on the structure. It follows a standard Gaussian diffusion process, similar to those used in image generation.
Overview of the SGDiff framework showing parallel structure and feature diffusion processes.

The final prediction is made through Likelihood Fusion, which combines the scores from both diffusion models to determine the existence of a link.

Experimental Setup

The model was evaluated across six diverse real-world datasets to test its versatility and transferability:

  • Citation Networks: Cora, Citeseer, and Pubmed.
  • Miscellaneous Networks: USAir (airports), NS (collaborations), and Router (internet topology).

These datasets represent a wide range of sizes, densities, and feature types, providing a comprehensive benchmark for the proposed generative approach.

Key Results and Discussion

Performance and Data Efficiency

SGDiff demonstrates superior performance across various metrics compared to established baselines like GCN, GAT, and SEAL. Notably, the model maintains high accuracy even when training data is extremely limited (e.g., 1% of available edges), where traditional GNNs typically suffer significant performance drops.

Performance comparison of SGDiff against various GNN baselines on the Router dataset.

Transferability and Robustness

A key strength of SGDiff is its structural universality. The structure diffusion component can learn connectivity patterns that are common across different domains, enabling "zero-shot" transfer. For instance, a model trained on citation data can effectively predict links in flight networks without retraining.

Furthermore, SGDiff exhibits remarkable adversarial robustness. Because it is a generative model, it requires the entire local sub-graph to be consistent with the learned distribution. This makes it significantly harder for adversarial attacks, such as DICE (deleting edges between similar nodes and adding them between dissimilar ones), to degrade performance compared to discriminative models.

Conclusion

SGDiff represents a significant step forward in generative graph modeling for link prediction. By focusing on local sub-graphs and utilizing a Bayesian decomposition, it overcomes the scalability and generalization limitations of previous methods. While the iterative nature of diffusion models introduces some inference latency, the gains in transferability and robustness make it a powerful tool for complex network analysis. Future work will explore extending this framework to node and graph classification tasks, potentially leading to a unified foundation model for graph learning.

Summary updated

BibTeX
@inproceedings{li2024sub,
  author = {Hang Li and Wei Jin and Geri Skenderi and Harry Shomer and Wenzhuo Tang and Wenqi Fan and Jiliang Tang},
  title = {{Sub-graph Based Diffusion Model for Link Prediction}},
  booktitle = {LoG},
  year = {2024},
  url = {https://openreview.net/forum?id=UTidxVkJRH},
}
Figure