Multi-Domain Graph Foundation Models: Robust Knowledge Transfer via Topology Alignment

Shuo Wang, Bokui Wang, Zhixiang Shen, Boyan Deng, zhao kang

Abstract

Building foundation models for graphs is challenging due to the fundamental structural discrepancies between domains, such as citation networks and social media graphs. The Multi-Domain Graph Foundation Model (MDGFM) addresses this by aligning node features and graph topologies through a novel pre-training and dual-prompt tuning architecture. MDGFM achieves robust, few-shot generalization to unseen graphs, maintaining high performance even under severe structural noise or adversarial attacks.

Introduction

While foundation models have revolutionized Natural Language Processing and Computer Vision, the graph domain has lagged behind. The primary obstacle is structural discrepancy: graphs from different domains exhibit vastly different topologies. For instance, citation networks are typically homophilic (similar nodes connect), whereas web-link or social networks are often heterophilic (dissimilar nodes connect).

Existing multi-domain graph pre-training methods often fail because they apply uniform encoding to fixed, potentially noisy structures, leading to "negative transfer." MDGFM is designed to overcome these hurdles by adaptively aligning diverse topologies and transferring domain-invariant knowledge to entirely unseen target graphs.

Methodology

MDGFM introduces a unified framework that bridges the gap between diverse domains through four key stages:

  1. Feature Projection & Semantic Alignment: Node feature dimensions are unified across domains using PCA. The model then utilizes domain tokens to capture specific traits and a shared token to capture universal, transferable semantic properties.
  2. Topology-Aware Alignment: Instead of relying on raw input graphs, MDGFM employs Graph Structure Learning (GSL) to refine the adjacency matrix. A balance token dynamically weighs the importance of node features against aggregated structural information, and the graph is sparsified using an efficient k-Nearest Neighbors (kNN) approach.
  3. Contrastive Pre-training: The encoder is trained to maximize mutual information between the original and GSL-refined graphs, ensuring it learns robust, invariant structural properties.
  4. Downstream Adaptation: For few-shot learning on unseen targets, MDGFM uses a dual-prompt strategy. A meta prompt transfers broad source knowledge, while a task-specific prompt adapts to the target domain. A learnable parameter balances these prompts to prevent negative transfer if the target domain is highly dissimilar from the source.
The MDGFM architecture featuring domain-specific tokens, shared tokens, and a topology-aware alignment module.

Experimental Setup and Results

The model was evaluated using a leave-one-out cross-domain transfer setup across seven datasets, including homophilic citation networks (Cora, Citeseer, Pubmed) and heterophilic web/Wikipedia networks (Cornell, Chameleon, Squirrel).

Performance and Robustness

MDGFM demonstrated significant improvements over state-of-the-art baselines like GCOPE and MDGPT, outperforming them by up to 18.04% in 1-shot scenarios and 8.11% in few-shot scenarios. The model also exhibited extreme robustness; while baseline performance degraded sharply under adversarial edge manipulation (Meta-attacks), MDGFM remained stable due to its topology refinement module.

Performance comparison of MDGFM against ablation variants across seven diverse graph datasets.

Key Insights

  • Topology Alignment is Critical: Structural patterns hold essential semantic information. Aligning topology alongside features is mandatory for effective graph foundation models.
  • Invariant Learning: By focusing on a "shared token" and filtering noise, the model learns domain-invariant representations, which theoretically minimizes the error bound for generalization.
  • Prompting as a Safeguard: The dual-prompt mechanism acts as a gatekeeper, allowing the model to down-weight conflicting pre-trained knowledge when encountering a target domain with a unique or conflicting topology.

Conclusion

MDGFM represents a significant step toward robust graph foundation models. By prioritizing structural alignment and flexible prompting, it achieves superior generalization across diverse domains. Future work will focus on extending this framework to handle dynamic graphs and large-scale heterogeneous networks to further broaden its real-world utility.

Summary updated

BibTeX
@inproceedings{wang2025multi,
  author = {Shuo Wang and Bokui Wang and Zhixiang Shen and Boyan Deng and zhao kang},
  title = {{Multi-Domain Graph Foundation Models: Robust Knowledge Transfer via Topology Alignment}},
  booktitle = {International Conference on Machine Learning},
  year = {2025},
  url = {https://openreview.net/forum?id=44Wq2xeRF0},
}
Figure