OpenGraph: Towards Open Graph Foundation Models

Lianghao Xia, Ben Kao, Chao Huang

Abstract

Graph Neural Networks (GNNs) have traditionally been limited by their dependence on specific node identities and feature sets, leading to a "Node Token Set Shift" that prevents effective cross-domain generalization. We introduce OpenGraph, a novel graph foundation model designed to bridge this gap. OpenGraph employs a unified graph tokenizer based on Singular Value Decomposition (SVD) to map disparate graph structures into a shared topological space. To address computational bottlenecks, it utilizes an anchor-based scalable Transformer. Furthermore, we leverage Large Language Models (LLMs) to generate diverse synthetic graph data for pre-training, overcoming the scarcity of high-quality labeled datasets. Our evaluations demonstrate that OpenGraph achieves state-of-the-art zero-shot performance across multiple real-world benchmarks, often surpassing traditional models that have been specifically fine-tuned on target data.

Introduction

While foundation models have revolutionized natural language processing and computer vision by learning from massive, diverse datasets, the graph domain has lagged behind. Most existing GNNs suffer from an "identity crisis": they are fundamentally tied to the specific node IDs and feature dimensions of their training data. When a model trained on a citation network is applied to a social network, it fails because the underlying "tokens" (nodes) and their relationships are entirely different. This lack of a universal representation has hindered the development of a truly generalizable graph model.

OpenGraph addresses these challenges by shifting the focus from specific node features to universal topological patterns. By treating topology as a shared language across all graphs, OpenGraph enables zero-shot transfer learning, allowing the model to perform tasks on unseen graphs without any additional training.

Methodology

OpenGraph's architecture is built on three core innovations designed to ensure universality, scalability, and data richness.

1. Unified Graph Tokenizer

To handle graphs with varying dimensions, OpenGraph introduces a topology-aware projection. Instead of relying on raw node features, it applies Singular Value Decomposition (SVD) to a smoothed adjacency matrix. This process transforms the raw graph structure into a shared mathematical space, creating "universal tokens." These tokens represent a node's position and role within the global topology rather than its specific identity, allowing the model to recognize structural motifs across different domains.

2. Scalable Graph Transformer

Standard Transformer architectures face quadratic complexity ($O(N^2)$), making them impractical for large-scale real-world graphs. OpenGraph implements anchor sampling, where self-attention is computed between nodes and a smaller, representative set of "anchor" points. This optimization reduces computational complexity to $O(N \times S)$, where $S$ is the number of anchors. This allows the model to scale to massive networks, such as MovieLens-10M, without the memory constraints that typically plague graph transformers.

3. Knowledge Distillation from LLMs

Data scarcity and privacy concerns often limit the availability of large-scale graph datasets. OpenGraph overcomes this by using LLMs to "hallucinate" realistic graph data. Using a Tree-of-Prompt algorithm, the researchers generated hierarchies of nodes (e.g., product categories) and employed Gibbs sampling to create realistic edges based on LLM-derived embeddings. This synthetic data (Gen0, Gen1, Gen2) provides a diverse pre-training ground that captures complex relational logic distilled from the LLM’s internal knowledge.

Experimental Results

OpenGraph was pre-trained on synthetic datasets and evaluated in a zero-shot setting against eight real-world datasets, including citation networks (Cora, Citeseer, Pubmed) and recommendation systems (MovieLens, Amazon-book).

Zero-Shot Performance

One of the most striking findings was that OpenGraph's zero-shot performance frequently outperformed traditional models that were given the benefit of few-shot training. For example, on the Cora dataset, OpenGraph achieved a zero-shot accuracy of 0.7504, significantly higher than a 5-shot GCN (0.5470) or a 5-shot GraphCL (0.5610). This suggests that the model has successfully captured robust, transferable graph dynamics that generalize better than local fine-tuning on small samples.

In link prediction tasks, OpenGraph reached a Recall@20 of 0.1911 on MovieLens-1M in a zero-shot capacity, nearly doubling the performance of many few-shot baselines. Furthermore, the anchor-based attention mechanism proved highly efficient; while standard transformer approaches often resulted in "Out of Memory" errors on the ML-10M dataset (7 million+ edges), OpenGraph maintained a manageable GPU memory footprint.

Discussion and Future Work

OpenGraph demonstrates that topology is a viable "universal language" for graph foundation models. By distilling structural knowledge from LLMs and utilizing a scalable transformer architecture, it breaks the "one-graph" barrier that has limited GNNs for years.

However, several avenues for future research remain:

  • Heterogeneity: Current iterations treat all nodes and edges as uniform. Future versions will aim to incorporate heterogeneous graph structures (e.g., distinguishing between "user" and "product" nodes).
  • Explainability: As a deep learning model, OpenGraph's decision-making process remains largely opaque. Improving the interpretability of zero-shot predictions is a key goal.
  • Robustness: Incorporating counterfactual learning could help the model better distinguish between essential structural patterns and random noise or errors in the data.

OpenGraph represents a significant step toward a truly universal foundation model for graph machine learning, proving that models can learn to understand graphs they have never seen before.

Summary updated

BibTeX
@inproceedings{xia2024opengraph,
  author = {Lianghao Xia and Ben Kao and Chao Huang},
  title = {{OpenGraph: Towards Open Graph Foundation Models}},
  booktitle = {Conference on Empirical Methods in Natural Language Processing},
  year = {2024},
  doi = {10.18653/v1/2024.findings-emnlp.132},
}
Figure