Abstract
Sampling subgraphs for training Graph Neural Networks (GNNs) is receiving much attention from the GNN community. While a variety of methods have been proposed, each method samples the graph according to its own heuristic. However, there has been little work in mixing these heuristics in an end-to-end trainable manner. In this work, we design a generative framework for graph sampling. Our method, SubMix, parameterizes graph sampling as a convex combination of heuristics. We show that a continuous relaxation of the discrete sampling process allows us to efficiently obtain analytical gradients for training the sampling parameters. Our experimental results illustrate the usefulness of learning graph sampling in three scenarios: (1) robust training of GNNs by automatically learning to discard noisy edge sources; (2) improving model performance by trainable and online edge subset selection; and (3) by integrating our framework into state-of-the-art (SOTA) decoupled GNN models, for homogeneous OGBN datasets. Our method raises the SOTA on challenging ogbn-arxiv and ogbn-products, respectively, by over 4 and 0.5 percentage points.
Introduction
Training Graph Neural Networks (GNNs) on large-scale graphs faces a significant bottleneck: the "neighbor explosion" problem. As layers are added, the receptive field of a node grows exponentially, making full-batch training computationally prohibitive. Subgraph sampling addresses this by selecting a small subset of neighbors. However, traditional samplers rely on fixed, hand-crafted heuristics such as random selection or degree-based prioritization. These methods are static and cannot adapt to the specific characteristics of a dataset or the presence of noise, potentially leading to suboptimal performance if the chosen heuristic favors uninformative edges.
The SubMix Framework
SubMix addresses these limitations by treating subgraph sampling as an end-to-end trainable process. The core idea is to parameterize the sampling strategy as a convex combination of multiple heuristics.
Mixture of Heuristics
Instead of relying on a single sampler, SubMix maintains a pool of $J$ heuristics (e.g., Random, Top-Degree, PageRank). It learns a set of weights $\pi_\phi$ that allocate a sampling "budget" $b$ across these heuristics. This allows the model to dynamically adjust the importance of different structural properties during training.
Differentiable Sampling via Continuous Relaxation
A primary challenge in learning sampling parameters is the discrete nature of edge selection, which is non-differentiable. SubMix overcomes this by employing a continuous relaxation. By approximating the discrete top-$k$ selection with a sigmoid-based function, the framework produces a "soft" adjacency matrix. This relaxation enables the calculation of analytical gradients, allowing the GNN's loss to directly inform and optimize the sampling parameters $\phi$ via backpropagation.
Experimental Evaluation
The authors evaluated SubMix across various benchmarks, ranging from small-scale citation networks (Cora, Citeseer, Pubmed) to large-scale Open Graph Benchmark (OGB) datasets.
Automatic Denoising and Robustness
One of the most compelling features of SubMix is its ability to filter out uninformative data. In experiments where adversarial noise edges were introduced, SubMix successfully identified and suppressed the noise-sampling heuristic.
As shown in the results, the weight assigned to $Q_{NOISE}$ rapidly decreases toward zero across all datasets, demonstrating that the model effectively "learns" which edges are detrimental to the task.
Large-Scale Performance
When integrated with state-of-the-art decoupled GNN architectures like EnGCN, SubMix achieved significant performance gains. On ogbn-arxiv, accuracy improved from a 77.98% baseline to 82.26%. On the massive ogbn-products dataset, it reached 88.59%, setting new benchmarks for these tasks.
Conclusion
SubMix represents a significant step toward fully automated GNN design by making the sampling strategy a learnable component. By mixing heuristics and utilizing continuous relaxation, it provides a robust mechanism for denoising and performance optimization. While the current implementation introduces some computational overhead during training, the gains in accuracy and the ability to handle large-scale graphs make it a powerful tool for the GNN community. Future work may explore learning the heuristics themselves or extending the framework to heterogeneous graph structures.
Summary updated