One Model for One Graph: A New Perspective for Pretraining with Cross-domain Graphs

Jingzhe Liu, Haitao Mao, Zhikai Chen, Wenqi Fan, Mingxuan Ju, Tong Zhao, Neil Shah, Jiliang Tang · DOI

Introduction

In the domain of Graph Neural Networks (GNNs), pretraining has traditionally followed a "one-size-fits-all" paradigm. Standard pipelines attempt to train a single, monolithic model across diverse datasets to learn universal structural patterns. However, graphs are inherently heterogeneous; for instance, the structural properties of a citation network (characterized by high homophily) differ fundamentally from those of an e-commerce graph. This divergence often leads to "negative transfer," where learning patterns from one domain actively degrades performance in another.

To address this, the authors propose OMOG (One Model for One Graph). Instead of forcing a single model to reconcile conflicting graph patterns, OMOG builds a bank of specialized models—one for each source dataset—and adaptively fuses the most relevant experts for any given downstream task.

Comparison between the traditional 'one model for all' approach and the proposed 'one model for one graph' framework.

The OMOG Framework

OMOG conceptualizes pretraining as the construction of a modular "model bank." The framework operates through three primary stages: feature unification, source model pretraining, and adaptive fusion.

1. Feature Unification and Encoding

To overcome feature heterogeneity—where different datasets utilize varying node attribute dimensions—OMOG employs Large Language Models (specifically SentenceBERT) to map node attributes into a unified textual representation space. Structural information is then integrated using Simplified Graph Convolutions (SGC), creating a robust initial feature set $H$ that captures both semantic and topological data.

2. Building the Model Bank

Rather than a single training run on a combined dataset, OMOG trains an individual "Source Model" (based on a Transformer architecture) for every graph in the pretraining pool. These models are trained using a self-supervised contrastive loss, ensuring each becomes an expert on its specific domain. Simultaneously, a "Scoring Module" is trained for each source model to evaluate its potential relevance to unseen graphs.

The three-step pretraining process: incorporating attributes/structure, pretraining individual source models, and training corresponding scoring modules.

3. Adaptive Fusion

During inference, a new "test" graph is passed through all scoring modules in the bank. The system identifies the Top-K most relevant source models based on these scores. The parameters of these selected experts are then merged via a weighted average to create a custom-tailored model for the specific test graph. This approach is mathematically grounded in Bayesian Model Averaging, theoretically ensuring that the fused model performs at least as well as the best individual expert in the bank.

Experimental Setup

The framework was evaluated using 10 diverse text-attributed graphs (TAGs) spanning multiple domains, including CS Citations (Cora, CiteSeer, Arxiv, DBLP), E-commerce (Amazon History, Child, Sportsfit, Products, Ratings), Bio-Citation (Pubmed), and Knowledge Graphs (WikiCS). These datasets vary significantly in scale, ranging from approximately 2,700 to 1.6 million nodes, and in label complexity, with 3 to 40 distinct classes.

Key Insights and Results

OMOG was tested in zero-shot and few-shot (5 samples per class) settings for node classification and link prediction, yielding several critical insights:

  • Superior Performance: In zero-shot node classification, OMOG achieved the highest accuracy on 8 out of 9 datasets, outperforming the strongest baselines by an average margin of 9%. It also secured the top rank across all tested datasets for link prediction.
  • Computational Efficiency: Because source models are trained independently, the pretraining process is highly parallelizable. OMOG completed pretraining in approximately 0.9 hours, whereas traditional monolithic baselines required between 12 and 21 hours. Furthermore, OMOG is memory-efficient, requiring significantly less GPU memory (4.1G) compared to LLM-heavy alternatives like LLaGA (35.6G).
  • Mitigation of Negative Transfer: By using scoring modules as filters, the system prevents irrelevant or conflicting knowledge from polluting the final fused model. This is particularly effective for datasets with complex label spaces where simple retrieval methods often fail.

Conclusion and Future Work

OMOG demonstrates that a modular, expert-based approach to graph pretraining can effectively bypass the pitfalls of negative transfer while offering superior scalability and performance. Future research may explore the scaling limits of the model bank as the number of source graphs reaches the thousands, as well as the integration of this modular perspective into the development of large-scale Graph Foundation Models.

Summary updated

BibTeX
@misc{liu2024one,
  author = {Jingzhe Liu and Haitao Mao and Zhikai Chen and Wenqi Fan and Mingxuan Ju and Tong Zhao and Neil Shah and Jiliang Tang},
  title = {{One Model for One Graph: A New Perspective for Pretraining with Cross-domain Graphs}},
  year = {2024},
  eprint = {2412.00315},
  archivePrefix = {arXiv},
  url = {https://arxiv.org/abs/2412.00315},
}
Figure