Abstract
GraphCLIP is a novel framework designed to build highly transferable foundation models for Text-Attributed Graphs (TAGs). By aligning graph structures with natural language summaries generated by Large Language Models (LLMs) and employing invariant learning techniques, GraphCLIP overcomes traditional barriers of label dependency and poor cross-domain transferability. The model achieves state-of-the-art performance in zero-shot and few-shot settings across diverse domains, including academic citations, e-commerce, and social networks.
Introduction
Most real-world graphs—such as social networks, product catalogs, or citation indices—are Text-Attributed Graphs (TAGs), where nodes contain rich textual information. Despite the success of Large Language Models (LLMs) in natural language processing, creating a "Graph Foundation Model" that generalizes across different datasets remains a significant challenge. Current models often suffer from heavy label dependency and poor transferability; a model trained on academic data typically fails when applied to e-commerce graphs due to shifts in feature and label spaces.
GraphCLIP addresses these issues by asking: Can we create a model that understands the relationship between graph structure and text so well that it can perform tasks on a brand-new graph without any additional training?
Methodology
GraphCLIP draws inspiration from the CLIP architecture, adapting the concept of cross-modal alignment to the graph domain. The framework is built upon three primary pillars:
1. LLM-Assisted Data Curation
To bridge the gap between local node data and global graph structure, the authors used Qwen2-72B to generate descriptive summaries of subgraphs. By feeding subgraphs formatted in markup languages like GraphML into the LLM, they created a massive dataset of 0.2 billion tokens of graph-summary pairs. These summaries capture the "essence" of a node and its neighborhood more effectively than raw node text.
2. Contrastive Pretraining with Invariant Learning
The model utilizes a dual-encoder setup: a Graph Transformer for structural encoding and a frozen Sentence-BERT for text encoding. To prevent the model from memorizing spurious, dataset-specific patterns, the authors introduced Invariant Learning. This involves using adversarial perturbations during training to ensure the graph encoder captures robust features that remain consistent even when the data distribution shifts.
3. Graph Prompt Tuning
For few-shot scenarios, GraphCLIP avoids full fine-tuning, which can lead to catastrophic forgetting. Instead, it employs Graph Prompt Tuning, learning a small "prompt feature" to align new tasks with the pretraining objective. This allows the model to adapt to new target data while retaining its foundational knowledge.
Evaluation and Results
The framework was evaluated using 12 open-source datasets across four domains, including academic (PubMed, ArXiv), e-commerce (Amazon), and social (Reddit, Instagram) graphs.
Key Findings
- Zero-Shot Superiority: On the
WikiCSdataset, GraphCLIP achieved 70.19% accuracy in a zero-shot setting, outperforming the previous state-of-the-art (ZeroG) by over 15%. - Cross-Domain Mastery: Even when academic data was excluded from the training set, the model performed competitively on academic target datasets, proving it learned generalizable principles.
- Link Prediction: Beyond node classification, GraphCLIP excelled at predicting connections. On the
Historydataset, it reached a 96.04% AUC, significantly higher than SBERT or other graph-specific baselines.
Conclusion and Future Work
GraphCLIP demonstrates that aligning structural graph data with LLM-generated natural language summaries is a powerful path toward universal graph foundation models. While the current model focuses on node text and topology, future work aims to incorporate complex edge attributes (e.g., specific relationship types), which are critical for specialized fields like molecular biology and drug discovery. Additionally, the team is exploring ways to optimize the computational cost of scaling Graph Transformers to even larger datasets.
Summary updated