Layer-diverse Negative Sampling for Graph Neural Networks

Wei Duan, Jie Lu, Yu Guang Wang, Junyu Xuan · DOI

Introduction

Graph Neural Networks (GNNs) have become the standard for learning on graph-structured data. Most GNN architectures rely on a neighborhood aggregation scheme, where a node's representation is updated based on its immediate neighbors. While effective, this "neighborhood watch" approach leads to several well-documented pathologies: over-smoothing, where node features become indistinguishable in deep networks; over-squashing, where information is lost at structural bottlenecks; and limited expressivity due to local topology reliance.

The Problem of Redundant Negative Sampling

To mitigate these issues, researchers have explored "negative sampling"—incorporating information from non-neighboring nodes. However, existing methods often suffer from high redundancy, repeatedly selecting the same set of negative samples across different layers. This redundancy wastes computational resources and fails to provide the diverse global context needed to prevent over-smoothing. The authors found that in previous state-of-the-art models, the overlap of sampled nodes between layers was often over 75%.

Methodology: Layer-diverse Negative Sampling (LDGCN)

The proposed LDGCN framework introduces a two-stage strategy to ensure diversity both within and across layers.

Intra-layer Diversity via DPP

LDGCN utilizes a Determinantal Point Process (DPP) to select a candidate set of negative samples. Unlike random sampling, DPP ensures that the chosen nodes are not only different from the target node but also distinct from each other, maximizing information coverage within a single layer.

The candidate set selection process where a diverse subset of nodes is chosen for negative sampling within a single layer.

Inter-layer Diversity via Space-Squeezing

The core innovation of LDGCN is "space-squeezing." To prevent subsequent layers from picking the same negative samples, the algorithm identifies the influential dimensions (eigenvectors) used in the previous layer's sampling and "squeezes" or shrinks them. This effectively "hides" previously sampled nodes from the algorithm in the next step, forcing the model to explore new regions of the graph's feature space. These diverse negative samples are subtracted from the standard message-passing update, creating "shortcuts" that bypass bottlenecks.

Visualizing the selection of different negative samples across successive layers (Layer 1, 2, and 3) to ensure inter-layer diversity.

Experimental Results

The authors evaluated LDGCN across a variety of benchmarks, including homophilous (e.g., Cora, PubMed) and heterophilous (e.g., WebKB) graphs, as well as large-scale datasets like ogbn-mag.

  • Performance Gains: On the Cora dataset, a 4-layer LDGCN achieved 76.80% accuracy, significantly outperforming a standard GCN (63.39%) and previous negative sampling methods like D2GCN (73.02%).
  • Mitigating Over-smoothing: Using the Mean Average Distance (MAD) metric, LDGCN demonstrated superior node distinctness. In a 6-layer model on Citeseer, LDGCN maintained a MAD of 74.29, compared to just 7.44 for a standard GCN.
  • Redundancy Reduction: The "space-squeezing" technique reduced node overlap between layers from nearly 99.7% in some baseline models to approximately 40.45% in the "Computers" dataset.

Conclusion

LDGCN addresses the fundamental limitations of neighborhood aggregation by introducing a principled approach to diverse negative sampling. By ensuring that each layer learns from a unique set of non-neighbors, the model effectively "rewires" the graph to bypass bottlenecks and maintain feature distinctness. While the computational cost of DPP sampling ($O(S^3)$) remains a consideration, the significant gains in accuracy and robustness to over-smoothing make LDGCN a powerful tool for deep graph learning.

Summary updated

BibTeX
@article{duan2024layer,
  author = {Wei Duan and Jie Lu and Yu Guang Wang and Junyu Xuan},
  title = {{Layer-diverse Negative Sampling for Graph Neural Networks}},
  journal = {Trans. Mach. Learn. Res.},
  year = {2024},
}
Figure