Layer-diverse Negative Sampling for Graph Neural Networks

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

TL;DR

Researchers have developed LDGCN, a novel "layer-diverse" negative sampling method that significantly boosts Graph Neural Network (GNN) performance. By incorporating information from non-neighboring nodes and ensuring diversity across the network's depth using a "space-squeezing" technique, the model effectively combats common GNN failures like over-smoothing and over-squashing.

The Challenge: Over-smoothing and Over-squashing

Standard GNNs operate on a "message-passing" principle, where nodes update their representations by aggregating information from immediate neighbors (positive samples). While intuitive, this "homophily" assumption leads to significant issues as networks deepen:

  • Over-smoothing: Node representations become indistinguishable after several layers of averaging, making classification difficult.
  • Over-squashing: Information from distant parts of the graph is lost when passing through structural bottlenecks or weakly connected subgraphs.
  • Limited Expressivity: Standard aggregators (like MEAN or MAX) often fail to distinguish between different graph topologies if neighborhood statistics look similar.

Previous attempts to use negative samples (non-neighbors) to provide contrast often picked redundant nodes in every layer, limiting the "view" of the graph and wasting computational resources.

Methodology: LDGCN

The core innovation of LDGCN (Layer-diverse GCN) lies in its two-step negative sampling process designed to capture a holistic view of the graph's global structure.

1. Shortest-Path Candidate Selection

To maintain efficiency and avoid the $O(N^4)$ complexity of searching the entire graph, LDGCN uses a shortest-path-based method to identify a small, effective set of candidate negative nodes. This ensures that the candidates are structurally relevant while reducing computational overhead.

Selection of candidate nodes based on shortest-path distance from the target node.

2. Space Squeezing with DPP

The model employs a Determinantal Point Process (DPP), a statistical model that favors diverse subsets. Geometrically, DPP prefers sets of nodes that span a large volume in the feature space.

The critical innovation is the "Space Squeeze": after selecting samples for a specific layer, the algorithm mathematically "squeezes" the feature space along the dimensions of those nodes. This lowers the probability of selecting the same or very similar nodes in the next layer, forcing the network to explore different non-neighbors at each depth.

Layer-diverse negative sampling: different sets of negative samples are selected for each layer of the GNN to maximize information variety.

Key Results and Insights

The authors evaluated LDGCN across a massive battery of benchmarks, including citation networks, large-scale graphs (like ogbn-mag with 1.9M nodes), and heterophilous datasets where nodes link to different types.

  • Accuracy Boost: LDGCN consistently outperformed standard GCNs. For instance, on the "Computers" dataset, accuracy reached 77.92%, compared to 47.21% for a standard GCN.
  • Deep GNN Stability: While standard GCN accuracy typically plummets after 4 layers due to over-smoothing, LDGCN remained stable even at 32 layers.
  • Reduced Redundancy: The node overlap rate between layers dropped from 75% in previous methods to just ~10% with LDGCN's space-squeezing technique.
  • Distinct Embeddings: Higher Mean Average Distance (MAD) scores confirmed that LDGCN successfully maintains distinct node representations, preventing the collapse of the embedding space.

Conclusion and Future Work

LDGCN demonstrates that negative samples can act as "repelling forces," ensuring that nodes that should be different stay distinct in the embedding space. By dynamically "rewiring" the graph during training, it creates shortcuts for information flow without the usual penalties of traditional rewiring.

While the computational cost of eigendecompositions for DPP sampling remains a challenge for web-scale graphs, the authors mitigated this by sampling small percentages of nodes. Future research may explore applying this "layer-diverse" logic to other graph tasks beyond classification, such as link prediction or graph generation.

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