[Paper Review] Can Graph Neural Networks Go "Online"? An Analysis of Pretraining and Inference
This paper evaluates whether graph neural networks (GNNs) can effectively adapt to dynamic graphs by inserting unseen nodes and edges after pretraining, comparing fine-tuning from a pretrained model versus retraining from scratch. Results show that pretrained GNNs achieve significantly higher and more stable test accuracy with fewer inference epochs, demonstrating that pretraining is crucial for online, dynamic graph learning in real-world applications.
Large-scale graph data in real-world applications is often not static but dynamic, i. e., new nodes and edges appear over time. Current graph convolution approaches are promising, especially, when all the graph's nodes and edges are available during training. When unseen nodes and edges are inserted after training, it is not yet evaluated whether up-training or re-training from scratch is preferable. We construct an experimental setup, in which we insert previously unseen nodes and edges after training and conduct a limited amount of inference epochs. In this setup, we compare adapting pretrained graph neural networks against retraining from scratch. Our results show that pretrained models yield high accuracy scores on the unseen nodes and that pretraining is preferable over retraining from scratch. Our experiments represent a first step to evaluate and develop truly online variants of graph neural networks.
Motivation & Objective
- To investigate whether pretraining improves the performance of graph neural networks when new nodes and edges are introduced after training, simulating real-world dynamic graphs.
- To evaluate the feasibility of online inference in GNNs by comparing fine-tuning from a pretrained model against retraining from scratch after graph updates.
- To assess the robustness and generalization of GNNs across different inductive settings—both with high and low label rates on unseen data.
- To establish a reproducible experimental framework for evaluating online learning capabilities in graph neural networks.
- To provide empirical evidence that pretraining enhances performance and stability in dynamic graph scenarios, especially under limited inference updates.
Proposed method
- Constructed a two-stage experimental setup: first, pretrain GNNs on a labeled subset of the graph; second, insert previously unseen nodes and edges and perform a limited number of inference epochs.
- Used three citation network datasets—Cora, Citeseer, and Pubmed—split into two complementary inductive settings: 'few-many' (low label rate) and 'many-few' (high label rate).
- Applied three GNN architectures: GCN, GAT, and GraphSAGE, along with an MLP baseline, all trained with Adam optimizer and standard hyperparameters.
- Evaluated test accuracy on a subset of unseen nodes after each inference epoch, comparing models with and without pretraining (200 epochs).
- Used Jensen-Shannon divergence to quantitatively compare the similarity of accuracy distributions across the two train-test settings.
- Conducted 60 experiments with 100 repetitions each to reduce random variance and ensure statistical reliability.
Experimental results
Research questions
- RQ1Does pretraining improve the performance of graph neural networks when new nodes and edges are introduced after training?
- RQ2How does the performance of pretrained GNNs compare to retraining from scratch in terms of accuracy and convergence speed during online inference?
- RQ3Is the benefit of pretraining consistent across different inductive settings—specifically, when label rates are high versus low?
- RQ4How stable and robust are pretrained GNNs to the addition of unseen nodes and edges in terms of variance and convergence?
- RQ5Can a limited number of inference epochs after pretraining achieve high accuracy on unseen nodes, suggesting practical viability for online graph learning?
Key findings
- Pretrained GNNs consistently outperform non-pretrained models in test accuracy across all datasets and architectures, with lower variance across 100 runs.
- Test accuracy plateaus after only 5–10 inference epochs for pretrained models, indicating rapid convergence on unseen data.
- The Jensen-Shannon divergence between accuracy distributions in the 'few-many' and 'many-few' settings is significantly lower with pretraining (0.0057–0.0115) than without (0.0666–0.1013), showing more consistent performance across settings.
- GAT without pretraining shows the fastest initial learning, but pretrained models still achieve higher absolute accuracy and stability.
- Pretrained GNNs achieve higher accuracy than the MLP baseline, even though the MLP is simpler and not designed for graph structure.
- The performance gap between pretrained and non-pretrained models is consistent across all three datasets—Cora, Citeseer, and Pubmed—confirming the generalizability of the findings.
Read this paper
Open the full text in the Nubint reader and ask about any passage as you read.
Read this paper on NubintThis review was generated by AI from the original paper. Please check the paper before citing it.