Hierarchical Estimation for Effective and Efficient Sampling Graph Neural Network

Yang Li, Bingbing Xu, Qi Cao, Yige Yuan, Huawei Shen

TL;DR

Scaling Graph Neural Networks (GNNs) to massive graphs requires smart sampling, but finding the optimal sampling probability suffers from a catch-22: you need the node embeddings to calculate the lowest-variance probabilities, but you can't compute those embeddings until the graph is sampled. This paper introduces HE-SGNN, a hierarchical estimation framework that breaks this "circular dependency" by estimating embeddings using historical training data or raw features. The result is a highly accurate, low-variance sampling method that scales efficiently to giant graphs.

What Problem Does This Paper Address?

GNNs are powerful tools for graph-structured data, but they suffer from the infamous "neighbor explosion" problem. As network layers deepen, the number of neighbors needed to compute a single node's representation grows exponentially. This makes full-batch training on large-scale graphs computationally impossible.

To tackle this, researchers use sampling paradigms: node-wise, layer-wise, or subgraph sampling. While these methods make training feasible, they introduce significant variance into the node aggregation step, which destabilizes training and hurts final model accuracy.

Theoretically, to minimize this variance, the sampling probability must depend on the hidden node embeddings and model weights ($HW$). However, a fundamental paradox arises: we cannot know the hidden embeddings of a layer until we have sampled the layer below it. The authors formalize this catch-22 as circular dependency, showing that previous methods either ignored this crucial neighbor-aggregation information or introduced slow, complex external parameters to guess it.

Fig. 1. (a) Circular dependency in layer-wise sampling. (b) Circular dependency in subgraph sampling. (c) Circular dependency in node-wise sampling.

Methods

The authors propose HE-SGNN (Hierarchical Estimation based Sampling GNN), a two-level estimation framework designed to bypass circular dependency.

  1. Level 1 (Estimation): Estimate the node embeddings in the sampling probability formula to break the circular dependency.
  2. Level 2 (Aggregation): Apply standard GNN operations on the sampled graph to learn final representations.

Because different sampling paradigms operate differently, the authors design two distinct strategies for Level 1:

  • Layer-wise Sampling (HE-SGNN(L)): The authors treat the training process across epochs as a time series. Since a node's embedding changes smoothly from one epoch to the next, they use historical values of $HW$ from previous training steps to estimate the current, unknown $HW$. They incorporate optimistic initialization (giving unsampled nodes a higher initial weight) to ensure all nodes are adequately explored early in training.
  • Subgraph Sampling (HE-SGNN(SN/SE)): Subgraph partitioning happens entirely before training begins, meaning no historical training data exists. To break the dependency here, the authors use the raw input node features ($X$) as a proxy for the hidden layer embeddings. They also derive a node-probability-induced edge sampler (HE-SGNN(SE)) to ensure sampled subgraphs remain well-connected and don't isolate nodes.
Fig. 2. Overall architecture of HE-SGNN with layer-wise node sampler.

Datasets

The framework was evaluated on seven diverse, authoritative graph datasets:

  • Citation Networks: Cora, Citeseer, and Pubmed.
  • Large-scale/Social/Product Graphs: Flickr, Reddit, Yelp, and Ogbn-products (a massive recommendation network containing over 2.4 million nodes and 61 million edges).

Key Insights and Ideas

  • Formalizing the Paradox: The clear mathematical formulation of "circular dependency" unifies the variance analysis of node-wise, layer-wise, and subgraph sampling under a single theoretical umbrella.
  • History as a Free Lunch: Realizing that training is continuous allows the model to use historical embeddings as a time-series simulation. This provides a highly accurate variance reduction mechanism with virtually zero added computational cost.
  • Features as Structural Proxies: For subgraph sampling, showing that raw input features can serve as an effective proxy for deep hidden representations during pre-training graph partitioning.

Key Results

HE-SGNN consistently outperformed or matched state-of-the-art sampling methods across all benchmarks in both accuracy and training efficiency.

  • Accuracy Gains: On the massive Ogbn-products dataset, the subgraph edge sampler variant (HE-SGNN(SE)) achieved a top F1-micro score of 0.803, outperforming GraphSAINT (0.799) and ClusterGCN (0.790).
  • Training Speed: Computational complexity analysis and empirical tests showed that HE-SGNN maintains the same fast training times per epoch as FastGCN and LADIES, while completely avoiding the heavy attention-calculation overhead that plagues methods like ASGCN.

Limitations and Future Work

  • Space Complexity: For the layer-wise time-series approach, storing the historical embedding norms introduces an additional $O(LN)$ space complexity (where $L$ is the number of layers and $N$ is the total number of nodes). While minor compared to storing full matrices, it could become a bottleneck for truly astronomical graphs.
  • Feature Dependency: The subgraph sampling variant relies heavily on the quality of the initial input features. If the raw features are uninformative or poorly correlated with the graph topology, the variance reduction might be less effective.
  • Future Extensions: The authors suggest extending this unified variance reduction framework to more complex architectures, such as Heterogeneous Graph Neural Networks.

Summary updated

BibTeX
@misc{li2022hierarchical,
  author = {Yang Li and Bingbing Xu and Qi Cao and Yige Yuan and Huawei Shen},
  title = {{Hierarchical Estimation for Effective and Efficient Sampling Graph Neural Network}},
  year = {2022},
  eprint = {2211.09813},
  archivePrefix = {arXiv},
  url = {https://arxiv.org/abs/2211.09813},
}
Figure