Towards Text-free Graph Foundation Models: Rethinking Multi-Domain Graph Contrastive Learning

Zihao Zhao, Xinlong Zhai, Jinyu Yang, Chuan ShiarXiv 2025 · DOI

TL;DR

This paper introduces MDGCL, a novel framework for training "foundation models" on diverse, text-free graph datasets. Unlike previous methods that treat all graphs equally, MDGCL explicitly learns to distinguish between different graph domains, leading to significantly improved performance in cross-domain transfer tasks.

What Problem Does This Paper Address?

Foundation models, which excel at learning generalizable knowledge from vast amounts of data, have revolutionized fields like NLP and computer vision. Researchers are now trying to extend this paradigm to graph-structured data, which is prevalent in areas like social networks and recommendation systems. However, a key challenge is that graphs from different domains (e.g., citation networks vs. social networks) have vastly different structures and semantics. Existing "graph foundation model" approaches often use contrastive learning methods designed for single domains, treating graphs from different domains as interchangeable. This fails to account for inherent domain differences, leading to poor performance when transferring knowledge to new domains.

Methods

The core of MDGCL lies in its two-stage approach:

  • Multi-Domain Pre-training:
    • Domain-Aware Contrastive Learning: Instead of treating all pairs of graphs as either positive (same domain) or negative (different domains) indiscriminately, MDGCL's contrastive learning objective explicitly trains the model to distinguish between domains. This forces the model to learn domain-specific features.
  • Domain Tokens: To capture global information about each domain, the authors introduce "domain tokens." These tokens are learned representations that are integrated with the graph data, allowing the model to understand the overarching characteristics of a domain.
  • Feature Dimension Unification: Since graphs can have different feature dimensions, a Singular Value Decomposition (SVD) based mapping is used to unify them before pre-training.
  • Cross-Domain Transfer (Downstream Stage):
    • Domain-Level Attention Mechanism: To effectively transfer knowledge from the pre-trained source domains to a new target domain, MDGCL employs an attention mechanism. This mechanism computes the similarity between nodes in the target graph and the domain tokens of the source domains, allowing for fine-grained, context-aware knowledge injection.

Datasets

The paper evaluates MDGCL on five benchmark datasets:

  • Citation Networks: Cora, CiteSeer, PubMed
  • Amazon Co-purchase Networks: Photo, Computers

These datasets represent different types of graph structures and domains, allowing for a thorough evaluation of the model's cross-domain transfer capabilities.

Key Insights and Ideas

  • Domain Differences Matter: The most crucial insight is that simply applying single-domain contrastive learning to multi-domain graph data is insufficient. Explicitly learning to differentiate between domains is key to effective knowledge transfer.
  • Domain Tokens as Global Context: The introduction of domain tokens provides a novel way to encode and leverage high-level, domain-specific information, which is essential for understanding the nuances of different graph types.
  • Attention for Fine-Grained Transfer: The domain-level attention mechanism is critical for bridging the gap between source and target domains, allowing for targeted and effective knowledge integration at the node level.
  • Robustness Across Graph Types: MDGCL demonstrates strong performance on both homophilic (nodes tend to connect to similar nodes) and heterophilic (nodes tend to connect to dissimilar nodes) graphs, suggesting its general applicability.

Key Results

MDGCL significantly outperforms existing state-of-the-art methods on both node classification and graph classification tasks across the evaluated datasets. The paper reports a maximum improvement of 19.33% on accuracy and 19.13% on Macro-F1 score. Furthermore, MDGCL shows competitive performance even with a limited number of source domains and its performance scales positively with an increasing number of source domains, indicating its potential for large-scale foundation model training. The method also demonstrates superior training efficiency compared to some existing multi-domain graph foundation models.

Limitations and Future Work

  • Homogeneous Graphs Focus: The current MDGCL framework is designed for homogeneous graphs (graphs with a single type of node and edge). The authors suggest that extending this to heterogeneous graphs (with multiple node and edge types) would be a promising future direction.
  • Scalability: While MDGCL shows good efficiency, further exploration into scaling to even larger datasets and more complex graph structures could be beneficial.
  • Foundation Model Potential: The paper positions MDGCL as a step towards text-free graph foundation models, implying that further research could build upon this framework to create more comprehensive and versatile graph intelligence systems.

Summary updated

BibTeX
@misc{zhao2025towards,
  author = {Zihao Zhao and Xinlong Zhai and Jinyu Yang and Chuan Shi},
  title = {{Towards Text-free Graph Foundation Models: Rethinking Multi-Domain Graph Contrastive Learning}},
  year = {2025},
  eprint = {2506.22510},
  archivePrefix = {arXiv},
  url = {https://arxiv.org/abs/2506.22510},
}
Figure