Abstract
Heterogeneous Graph Neural Networks (HGNNs) face significant scalability challenges when applied to large-scale graphs with millions of nodes and edges. While existing methods optimize training, inference remains a major bottleneck due to high memory and computational requirements. We present SubInfer, a novel framework that partitions large heterogeneous graphs into semantically-rich subgraphs and completes them with global information. This approach enables efficient parallel training and inference on manageable chunks, significantly reducing memory and time overhead while maintaining high accuracy. Our evaluation across five benchmark datasets demonstrates that SubInfer achieves up to a 5x speedup in inference and reduces memory usage by over 90% compared to state-of-the-art baselines.
Introduction
Heterogeneous Graphs (HGs) are powerful tools for modeling complex systems with diverse node and edge types, such as academic networks or knowledge graphs. However, as these graphs scale to millions or billions of nodes, they become computationally prohibitive for standard HGNN architectures. Current approaches generally fall into three categories, each with distinct limitations:
- Decoupled methods offer fast training but require excessive memory to store pre-computed features.
- Mini-batch methods are efficient for training but often require loading the entire graph for inference, creating a massive bottleneck.
- Partition-based methods break the graph into pieces for training but frequently lose vital semantic information and global context, leading to poor convergence and slow inference.
SubInfer addresses the critical "inference bottleneck" in large-scale HGs. By allowing models to perform inference on subgraphs as efficiently as they train, SubInfer bridges the gap between theoretical scalability and practical deployment in production environments.
The SubInfer Framework
The SubInfer framework operates in three primary stages to ensure semantic integrity and global context within partitioned subgraphs.
1. Semantic Subgraph Partitioning
Standard partitioning tools like Metis often ignore node types, which can lead to the loss of critical semantic structures in heterogeneous data. SubInfer addresses this by utilizing meta-paths (e.g., Author-Paper-Author) to construct a "semantic graph" backbone. This backbone is partitioned first to preserve important relational patterns. Subsequently, a greedy algorithm assigns the remaining nodes to partitions in a way that minimizes edge loss across the subgraphs.
2. Subgraph Completion
A key innovation of SubInfer is the "completion" step. Simple partitioning can lead to skewed label distributions in subgraphs, which makes it difficult for models to converge during distributed training. SubInfer identifies the top-$k$ highest-degree nodes from the original graph and incorporates them into every subgraph. These "global anchors" provide essential context, stabilize the learning process, and act as bridges that connect local information to the global graph structure.
3. Distributed Training and Inference
Because the resulting subgraphs are self-contained and semantically representative, they can be distributed across a cluster for parallel processing. During the training phase, the model learns from these subgraphs independently. In the inference phase, the model generates predictions for each subgraph. The final output is obtained by averaging these predictions, ensuring a robust global result derived from efficient local computations.
Experimental Evaluation
SubInfer was evaluated on five diverse benchmark datasets: ogbn-mag, DBLP, Freebase, PubMed, and Yelp. These datasets vary significantly in size and complexity, providing a comprehensive test of the framework's versatility.
Key Results
The quantitative improvements demonstrate SubInfer's efficiency, particularly in inference speed and memory utilization.
- Inference Speedup: On the
ogbn-magdataset, SubInfer-RGCN achieved a nearly 5x speedup compared to standard Cluster-RGCN, completing inference in just 9 seconds versus 42 seconds. - Memory Efficiency: On the DBLP dataset, the SubInfer-NARS variant required only 8-9% of the memory used by the original NARS model, making it feasible to run on commodity hardware.
- Accuracy Preservation: SubInfer maintained competitive accuracy levels compared to state-of-the-art backbones like SeHGNN and R-HGNN. Notably, on the DBLP dataset, SubInfer actually outperformed models trained on the full graph, suggesting that partitioning can act as a form of semantic denoising by mitigating the impact of high label heterogeneity.
Discussion and Future Work
SubInfer demonstrates that treating inference as a primary design consideration can lead to massive efficiency gains in large-scale graph processing. The use of global anchors effectively mitigates the local bias inherent in graph partitioning, allowing for stable convergence.
However, several areas remain for future exploration. The framework's performance is sensitive to hyperparameters such as the number of subgraphs ($\varrho$) and the global information ratio ($\sigma$). Finding the optimal configuration currently requires manual tuning. Additionally, the reliance on pre-defined meta-paths suggests that automated meta-path discovery could further enhance the framework's robustness. Finally, extending the partitioning strategy to better support edge-level tasks like link prediction remains a challenge, as edges are frequently split across different partitions.
Summary updated