One For All: Towards Training One Graph Model For All Classification Tasks
Hao Liu, Jiarui Feng, Lecheng Kong, Ningyue Liang, Dacheng Tao, Yixin Chen, Muhan Zhang
Abstract
Designing a single model to address multiple tasks has been a long-standing objective in artificial intelligence. Recently, large language models have demonstrated exceptional capability in solving different tasks within the language domain. However, a unified model for various graph tasks remains underexplored, primarily due to the challenges unique to the graph learning domain. First, graph data from different areas carry distinct attributes and follow different distributions. Such discrepancy makes it hard to represent graphs in a single representation space. Second, tasks on graphs diversify into node, link, and graph tasks, requiring distinct embedding strategies. Finally, an appropriate graph prompting paradigm for in-context learning is unclear. We propose One for All (OFA), the first general framework that can use a single graph model to address the above challenges. Specifically, OFA proposes text-attributed graphs to unify different graph data by describing nodes and edges with natural language and uses language models to encode the diverse and possibly cross-domain text attributes to feature vectors in the same embedding space. Furthermore, OFA introduces the concept of nodes-of-interest to standardize different tasks with a single task representation. For in-context learning on graphs, OFA introduces a novel graph prompting paradigm that appends prompting substructures to the input graph, which enables it to address varied tasks without fine-tuning. We train the OFA model using graph data from multiple domains (including citation networks, molecular graphs, knowledge graphs, etc.) simultaneously and evaluate its ability in supervised, few-shot, and zero-shot learning scenarios. OFA performs well across different tasks, making it the first general-purpose across-domains classification model on graphs.
Ask Lune
Know this paper in minutes, not an afternoon.
Lune can read every page of it and the top-tier papers that cite it, and gives you its claims, its evidence and its limits, each one cited to the paper it comes from. No skimming, no AI slop.
112 top-tier papers have cited it since. Know what they found before your reviewers do.
Lune can draw on
the full paper · the top-tier papers that cite it · related work
Free to start. No credit card required.
Lineage
- LLMs as Zero-shot Graph Learners: Alignment of GNN Representations with LLM Token Embeddings cites Open Graph Benchmark: Datasets for Machine Learning on Graphs
- LLMs as Zero-shot Graph Learners: Alignment of GNN Representations with LLM Token Embeddings cites Label-free Node Classification on Graphs with Large Language Models (LLMs)
- LLMs as Zero-shot Graph Learners: Alignment of GNN Representations with LLM Token Embeddings cites Finetuned Language Models are Zero-Shot Learners
- A Survey on In-context Learning cites Language Models are Few-Shot Learners
- Neural Bellman-Ford Networks: A General Graph Neural Network Framework for Link Prediction cites Open Graph Benchmark: Datasets for Machine Learning on Graphs
- ARC: A Generalist Graph Anomaly Detector with In-Context Learning cites Language Models are Few-Shot Learners
- G-Retriever: Retrieval-Augmented Generation for Textual Graph Understanding and Question Answering cites Label-free Node Classification on Graphs with Large Language Models (LLMs)
- Label-free Node Classification on Graphs with Large Language Models (LLMs) cites Open Graph Benchmark: Datasets for Machine Learning on Graphs
- Finetuned Language Models are Zero-Shot Learners cites Language Models are Few-Shot Learners
- GFT: Graph Foundation Model with Transferable Tree Vocabulary cites Open Graph Benchmark: Datasets for Machine Learning on Graphs
Cited by top-tier papers112
- G-Retriever: Retrieval-Augmented Generation for Textual Graph Understanding and Question AnsweringXiaoxin He, Yijun Tian, Yifei Sun, Nitesh V. Chawla et al.NeurIPS 2024 · 384 citations
- GFT: Graph Foundation Model with Transferable Tree VocabularyZehong Wang, Zheyuan Zhang, Nitesh V. Chawla, Chuxu Zhang et al.NeurIPS 2024 · 108 citations
- Label-free Node Classification on Graphs with Large Language Models (LLMs)Zhikai Chen, Haitao Mao, Hongzhi Wen, Haoyu Han et al.ICLR 2024 · 103 citations
- LLMs as Zero-shot Graph Learners: Alignment of GNN Representations with LLM Token EmbeddingsDuo Wang, Yuan Zuo, Fengzhi Li, Junjie WuNeurIPS 2024 · 99 citations
- ARC: A Generalist Graph Anomaly Detector with In-Context LearningYixin Liu, Shiyuan Li, Yu Zheng, Qingfeng Chen et al.NeurIPS 2024 · 73 citations
Builds on29
- Language Models are Few-Shot LearnersTom B. Brown, Benjamin Mann, Nick Ryder, Melanie Subbiah et al.NeurIPS 2020 · 64,255 citations
- Finetuned Language Models are Zero-Shot LearnersJason Wei, Maarten Bosma, Vincent Y. Zhao, Kelvin Guu et al.ICLR 2022 · 4,966 citations
- Open Graph Benchmark: Datasets for Machine Learning on GraphsWeihua Hu, Matthias Fey, Marinka Zitnik, Yuxiao Dong et al.NeurIPS 2020 · 3,935 citations
- Neural Bellman-Ford Networks: A General Graph Neural Network Framework for Link PredictionZhaocheng Zhu, Zuobai Zhang, Louis-Pascal A. C. Xhonneux, Jian TangNeurIPS 2021 · 546 citations
- A Survey on In-context LearningQingxiu Dong, Lei Li, Damai Dai, Ce Zheng et al.EMNLP 2024 · 479 citations
Related papers
- All in One and One for All: A Simple yet Effective Method towards Cross-domain Graph PretrainingHaihong Zhao, Aochuan Chen, Xiangguo Sun, Hong Cheng et al.KDD 2024 · 35 citations
- UniGraph: Learning a Unified Cross-Domain Foundation Model for Text-Attributed GraphsYufei He, Yuan Sui, Xiaoxin He, Bryan HooiKDD 2025 · 8 citations
- Context-aware Graph Meta-learningNingbo Huang, Gang Zhou, Meng Zhang, Shunhang Li et al.AAAI 2026
- Killing Two Birds with One Stone: Cross-modal Reinforced Prompting for Graph and Language TasksWenyuan Jiang, Wenwei Wu, Le Zhang, Zixuan Yuan et al.KDD 2024 · 4 citations
- All in One: Multi-Task Prompting for Graph Neural NetworksXiangguo Sun, Hong Cheng, Jia Li, Bo Liu et al.KDD 2023 · 149 citations
