ICLR 2023

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

Main figure for One for All: Towards Training One Graph Model for All Classification Tasks

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.

Benchmark Results

Tested on 1 dataset Non-standard metric on 1 dataset

Tables show presented results in global context (best 3 papers + GCN + MLP).

Knowledge Graphs

WN18RR

Global leaderboard →
Non-default metric. This paper reports Accuracy; the dataset default is MRR. Values below use Accuracy only.

Sorted by Accuracy. Highlighted rows are from other papers.

#ModelAccuracy ↑Paper
1
OFA-llama2-13b
0.9814 ±0.0025
This paper
2
OFA-llama2-7b
0.9808 ±0.0016
This paper
3
OFA-e5
0.9784 ±0.0035
This paper
4
OFA-ind-st
0.9722 ±0.0018
This paper
5
OFA-st
0.9691 ±0.0011
This paper
18
GCN
actual #18 vs paper #33 15 places worse
0.8677 ±0.0030
best reported
actual #18 vs paper #33 15 places worse
paper 0.6740 ±0.0240
paper 0.6740 ±0.0240 Δ today 0.1937
26
GraphSAGE
0.8298 ±0.0022
28
GIN
actual #28 vs paper #33 5 places worse
0.8025 ±0.0028
best reported
actual #28 vs paper #33 5 places worse
paper 0.5730 ±0.0340
paper 0.5730 ±0.0340 Δ today 0.2295
SOTA performance (not significantly different from the best) Baseline / comparison (this paper) Global context (other papers) Best today — OK at publication; today's leaderboard best is elsewhere