Abstract
Graph Convolutional Networks (GCNs) are widely used in graph-based applications, such as social networks and recommendation systems. Nevertheless, large-scale graphs or deep aggregation layers in full-batch GCNs consume significant GPU memory, causing out-of-memory (OOM) errors on mainstream GPUs. Subgraph sampling methods reduce memory consumption but introduce gaps among subgraphs, reducing accuracy. We propose PromptGCN, a novel prompt-based lightweight GCN model that bridges these gaps using learnable prompt embeddings to transfer global information across subgraphs. Extensive experiments show PromptGCN improves accuracy by up to 5.48% while maintaining memory efficiency.
Introduction: The Memory Bottleneck in GCNs
Graph Convolutional Networks (GCNs) are powerful tools for modeling relational data, but their scalability is severely limited by memory consumption. In full-batch training, the entire graph and its intermediate activations must reside in GPU memory. As the number of layers or the feature dimensions increase, memory requirements explode, frequently leading to "Out of Memory" (OOM) errors on standard hardware.
To mitigate this, researchers employ subgraph sampling, which partitions a large graph into smaller, manageable subgraphs. While this approach significantly reduces the memory footprint, it introduces a "subgraph gap": nodes in one partition lose visibility of their neighbors in others, leading to a loss of global structural information and degraded model accuracy.
Methods: Bridging the Gap with PromptGCN
PromptGCN addresses the subgraph gap by introducing a "prompting" mechanism inspired by successes in Natural Language Processing. Instead of training on isolated subgraphs, PromptGCN uses learnable prompt embeddings to act as a global memory bridge.
The framework operates in four main stages:
- Graph Partitioning: The global graph is divided into local subgraphs using standard algorithms like METIS.
- Prompt Selection: For each node, the model adaptively selects the most relevant prompt from a set of learnable embeddings based on feature similarity.
- Prompt Attachment: The selected prompt is fused with the node's features. The authors found that concatenation worked best, as it preserves the independence of the learned global context.
- Prompt Sharing: These prompts are shared and updated across all subgraphs. As training progresses, they carry the "memory" of the global structure, effectively transferring information across the artificial boundaries created by partitioning.
Experimental Setup and Datasets
The authors evaluated PromptGCN on seven large-scale datasets across two primary tasks:
- Node Classification: AmazonCoBuyPhoto, AmazonCoBuyComputer, Flickr, Reddit, and the massive Ogbn-products (containing over 2.4 million nodes and 126 million edges).
- Link Prediction: Ogbl-citation2 and Ogbl-collab.
The model was tested across various backbones, including GCN, GAT, and GCNII, to demonstrate its versatility.
Key Insights
- Prompts as Global Anchors: Prompts serve as a compressed representation of the entire graph, providing the missing context lost during sampling.
- Class-Prompt Correlation: Performance is optimized when the number of prompts aligns with the number of target classes. Visualization reveals that prompts naturally cluster near their corresponding classification groups.
- Mitigating Over-smoothing: In deep architectures (5+ layers), PromptGCN helps maintain node individuality by providing stable, distinct parameters, countering the tendency of features to become indistinguishable.
- Plug-and-Play Framework: PromptGCN is not a standalone model but a framework compatible with existing sampling methods like ClusterGCN, GraphSAINT, or LMC.
Results and Performance
PromptGCN consistently outperforms baseline sampling methods:
- Accuracy: It achieved an accuracy boost of up to 5.48% on the Flickr dataset compared to standard sampling.
- Efficiency: On the Ogbn-products dataset, PromptGCN matched full-batch performance while avoiding OOM errors, reducing memory usage by up to 28x in some configurations.
- Scalability: The method scales effectively to massive graphs where full-batch training is impossible on standard hardware.
Conclusion and Future Work
PromptGCN successfully bridges the gap between memory-efficient subgraph sampling and high-accuracy full-batch training. By using shared prompts to maintain global context, it enables the training of deep, accurate GCNs on massive datasets. Future research may explore more complex prompt templates for nuanced patterns and adaptation to dynamic graphs where nodes and edges change over time.
Summary updated