SYNTOLOGY HomeExplorerAtlasCodeMethodologyAboutDevelopersFeedPricing
Paper · 2310.00149 · ICLR · 2024

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

Dacheng Tao, Yixin Chen, Muhan Zhang, Hao Liu, Jiarui Feng, Lecheng Kong, Ningyue Liang

arXiv · PDF · Open in the Atlas

Code that ran

9 of 18 samples (functions and classes) lifted from this paper's linked repositories executed on a synthesized input in Syntology's jail (0 of them constructed an object rather than computing a result; 0 honoured the contract we drafted, 0 violated it and 0 have no contract verdict; 9 failures of our instrument; 9 no recorded run), measured 2026-11-22; repository links from the Papers with Code archive attributed under CC BY-SA, no affiliation; bodies inline only under a permissive licence as GitHub detects it. Not a reproduction of the paper's results.

"Ran" means the function executed on a synthesized input and returned a value. It is not a reproduction of the paper's results. This record, dated, as JSON: /api/ran/2310.00149.json · badge: /api/ran/2310.00149.svg

Each repository's role is a label: a classifier's output recorded on the link, or, where no role is recorded, what the Papers with Code archive marked. The line under it names its basis. Neither says who wrote the code.

RepositoryRoleRan
LechengKong/OneForAll canonical (classifier label)
classifier basis: census
7 ran · 4 no recorded run
lechengkong/oneforall community
Papers with Code archive
2 ran · 5 no recorded run
FunctionStatusWhere it lives
ArxivFSSplitter Ran
ran; our contract draft was wrong, not the code
LechengKong/OneForAll/task_constructor.py
pointer only (licence: MIT); the stored copy get_code serves, from GXG-CS/STEM-GNN, is pointer only (licence: NONE) · get_code("5f925b34de0a38cb")
How it ran

The body of this sample is withheld: this paper's link allows the body inline (MIT), but get_code serves the stored copy, first harvested from GXG-CS/STEM-GNN, and GitHub detected no licence in that repository when it was checked. The setup block that called it is withheld with it, because it is written against that body. source_path and origin say where the code lives, to read under the repository's own terms. A run is recorded.

ArxivSplitter Ran
ran; our contract draft was wrong, not the code
LechengKong/OneForAll/task_constructor.py
code served (permissive licence) · get_code("ad60d5c30ea175c9")
How it ran

Ran in Syntology's sandbox on this synthesized input (drafted by a language model, Claude Haiku 4.5, prompt python_fixture_v1, through the batch API) and returned str. The image it ran in was not recorded. If your copy returns the same type on these inputs, it matched what we observed; nothing here checks that. It does NOT mean the output is correct: nothing has compared it to the paper.

import torch
import torch.nn as nn

torch.manual_seed(0)

class MockDataset:
    def __init__(self):
        self.data = MockData()

class MockData:
    def __init__(self):
        self.split = "train"

dataset = MockDataset()

ARGS = {
    "dataset": dataset
}
Setup block drafted by
a language model, Claude Haiku 4.5, prompt python_fixture_v1, through the batch API
Imports
torch — import names as written, not package names to install; a name the repository itself provides is not a package
Returned
type str — a str output has no array shape of its own; none is stated — the instrument coerces any output to an array; for a str output the recorded ndim 0 and dtype family float describe that coercion, not the output, and are not stated
Environment
image not recorded; re-verify against syntology-harvest-sandbox:v5-deps; not recorded for this sample: the harness installs a cuda-to-cpu shim (cuda_shim.py) before every sample and no run records whether a sample needed it; seed: none by the harness; any seed is in the setup block
CiteSplitter Ran
ran; our contract draft was wrong, not the code
LechengKong/OneForAll/task_constructor.py
pointer only (licence: MIT); the stored copy get_code serves, from GXG-CS/STEM-GNN, is pointer only (licence: NONE) · get_code("840cce4bf1e34557")
How it ran

The body of this sample is withheld: this paper's link allows the body inline (MIT), but get_code serves the stored copy, first harvested from GXG-CS/STEM-GNN, and GitHub detected no licence in that repository when it was checked. The setup block that called it is withheld with it, because it is written against that body. source_path and origin say where the code lives, to read under the repository's own terms. A run is recorded.

binary_apr_func Ran
ran; our contract draft was wrong, not the code
LechengKong/OneForAll/utils.py
pointer only (licence: MIT); the stored copy get_code serves, from GXG-CS/STEM-GNN, is pointer only (licence: NONE) · get_code("352a58f5914509ef")
How it ran

The body of this sample is withheld: this paper's link allows the body inline (MIT), but get_code serves the stored copy, first harvested from GXG-CS/STEM-GNN, and GitHub detected no licence in that repository when it was checked. The setup block that called it is withheld with it, because it is written against that body. source_path and origin say where the code lives, to read under the repository's own terms. A run is recorded.

binary_single_auc_func Ran
ran; our contract draft was wrong, not the code
LechengKong/OneForAll/utils.py
pointer only (licence: MIT); the stored copy get_code serves, from GXG-CS/STEM-GNN, is pointer only (licence: NONE) · get_code("c06eaa1bc9d830c1")
How it ran

The body of this sample is withheld: this paper's link allows the body inline (MIT), but get_code serves the stored copy, first harvested from GXG-CS/STEM-GNN, and GitHub detected no licence in that repository when it was checked. The setup block that called it is withheld with it, because it is written against that body. source_path and origin say where the code lives, to read under the repository's own terms. A run is recorded.

masked_edge_index Ran
ran; our contract draft was wrong, not the code
LechengKong/OneForAll/gp/nn/layer/pyg.py
code served (permissive licence) · get_code("7826f03da19a967c")
How it ran

Ran in Syntology's sandbox on this synthesized input (drafted by a language model, Claude Haiku 4.5, prompt python_fixture_v1, through the batch API) and returned Tensor, ndim 2, dtype family int, shape (2, 3) as a later run recorded it. The image it ran in was not recorded. If your copy returns the same type, ndim and shape on these inputs, it matched what we observed; nothing here checks that. It does NOT mean the output is correct: nothing has compared it to the paper.

import torch

torch.manual_seed(0)

# edge_index: a tensor of shape (2, num_edges) representing graph edges
# This is a standard graph representation where first row is source nodes, second row is target nodes
edge_index = torch.tensor([
    [0, 1, 2, 0, 1],  # source nodes
    [1, 2, 0, 2, 0]   # target nodes
], dtype=torch.long)

# edge_mask: a boolean tensor of shape (num_edges,) to select which edges to keep
edge_mask = torch.tensor([True, False, True, True, False], dtype=torch.bool)

ARGS = {
    "edge_index": edge_index,
    "edge_mask": edge_mask
}
Setup block drafted by
a language model, Claude Haiku 4.5, prompt python_fixture_v1, through the batch API
Imports
torch — import names as written, not package names to install; a name the repository itself provides is not a package
Returned
type Tensor, ndim 2, dtype family int, shape (2, 3) — shape (2, 3) as a later run recorded it
dtype family
int means an integer dtype; float means any other dtype the instrument saw, bool and complex included (fixture_check.py records only these two families)
Environment
image not recorded; re-verify against syntology-harvest-sandbox:v5-deps; not recorded for this sample: the harness installs a cuda-to-cpu shim (cuda_shim.py) before every sample and no run records whether a sample needed it; seed: none by the harness; any seed is in the setup block
mean_pooling Ran
ran; our contract draft was wrong, not the code
LechengKong/OneForAll/models/model.py
code served (permissive licence) · get_code("43281e60ab9405f3")
How it ran

Ran in Syntology's sandbox on this synthesized input (drafted by a language model, Claude Haiku 4.5, prompt python_fixture_v1, through the batch API) and returned Tensor, ndim 2, dtype family float, shape (2, 4) as a later run recorded it. The image it ran in was not recorded. If your copy returns the same type, ndim and shape on these inputs, it matched what we observed; nothing here checks that. It does NOT mean the output is correct: nothing has compared it to the paper.

import torch

torch.manual_seed(0)

# Construct tensors for mean_pooling function
# The function expects:
# - token_embeddings: shape (batch_size, sequence_length, embedding_dim)
# - attention_mask: shape (batch_size, sequence_length)

batch_size = 2
sequence_length = 3
embedding_dim = 4

token_embeddings = torch.randn(batch_size, sequence_length, embedding_dim)
attention_mask = torch.ones(batch_size, sequence_length)

# Set one attention value to 0 to test masking behavior
attention_mask[0, 2] = 0

ARGS = {
    "token_embeddings": token_embeddings,
    "attention_mask": attention_mask,
}
Setup block drafted by
a language model, Claude Haiku 4.5, prompt python_fixture_v1, through the batch API
Imports
torch — import names as written, not package names to install; a name the repository itself provides is not a package
Returned
type Tensor, ndim 2, dtype family float, shape (2, 4) — shape (2, 4) as a later run recorded it
dtype family
int means an integer dtype; float means any other dtype the instrument saw, bool and complex included (fixture_check.py records only these two families)
Environment
image not recorded; re-verify against syntology-harvest-sandbox:v5-deps; not recorded for this sample: the harness installs a cuda-to-cpu shim (cuda_shim.py) before every sample and no run records whether a sample needed it; seed: none by the harness; any seed is in the setup block
normalize_string Ran
ran; our contract draft was wrong, not the code
lechengkong/oneforall/models/model.py
code served (permissive licence) · get_code("ff7d55c8c0dd7dde")
How it ran

Ran in Syntology's sandbox on this synthesized input (drafted by a language model, Claude Haiku 4.5, prompt python_fixture_v1) and returned str. The image it ran in was not recorded. If your copy returns the same type on these inputs, it matched what we observed; nothing here checks that. It does NOT mean the output is correct: nothing has compared it to the paper.

import torch
import torch.nn as nn

torch.manual_seed(0)

ARGS = {
    "s": "Hello-World_Test String"
}
Setup block drafted by
a language model, Claude Haiku 4.5, prompt python_fixture_v1
Imports
torch — import names as written, not package names to install; a name the repository itself provides is not a package
Returned
type str — a str output has no array shape of its own; none is stated — the instrument coerces any output to an array; for a str output the recorded ndim 0 and dtype family float describe that coercion, not the output, and are not stated
Environment
image not recorded; re-verify against syntology-harvest-sandbox:v5-deps; not recorded for this sample: the harness installs a cuda-to-cpu shim (cuda_shim.py) before every sample and no run records whether a sample needed it; seed: none by the harness; any seed is in the setup block
swish Ran
ran; our contract draft was wrong, not the code
lechengkong/oneforall/models/model.py
code served (permissive licence) · get_code("3a4a478be185334b")
How it ran

Ran in Syntology's sandbox on this synthesized input (drafted by a language model, Claude Haiku 4.5, prompt python_fixture_v1) and returned Tensor, ndim 2, dtype family float, shape (2, 4) as a later run recorded it. The image it ran in was not recorded. If your copy returns the same type, ndim and shape on these inputs, it matched what we observed; nothing here checks that. It does NOT mean the output is correct: nothing has compared it to the paper.

import torch

torch.manual_seed(0)

# The swish function takes a single Tensor parameter 'x'
# It calls x.sigmoid() and multiplies x by the result
# So we need a valid tensor

x = torch.randn(2, 4)

ARGS = {
    "x": x
}
Setup block drafted by
a language model, Claude Haiku 4.5, prompt python_fixture_v1
Imports
torch — import names as written, not package names to install; a name the repository itself provides is not a package
Returned
type Tensor, ndim 2, dtype family float, shape (2, 4) — shape (2, 4) as a later run recorded it
dtype family
int means an integer dtype; float means any other dtype the instrument saw, bool and complex included (fixture_check.py records only these two families)
Environment
image not recorded; re-verify against syntology-harvest-sandbox:v5-deps; not recorded for this sample: the harness installs a cuda-to-cpu shim (cuda_shim.py) before every sample and no run records whether a sample needed it; seed: none by the harness; any seed is in the setup block
BinGraphAttModel Not yet run
unverified (harvested, no recorded run)
lechengkong/oneforall/models/model.py
code served (permissive licence) · get_code("4d74d0c9e6317861")
How it ran

no invocation recorded.

MLP Not yet run
unverified (harvested, no recorded run)
lechengkong/oneforall/models/model.py
code served (permissive licence) · get_code("c4f4edb029c0bebe")
How it ran

no invocation recorded.

SingleHeadAtt Not yet run
unverified (harvested, no recorded run)
lechengkong/oneforall/models/model.py
code served (permissive licence) · get_code("ae908941a6b72092")
How it ran

no invocation recorded.

activation_resolver Not yet run
unverified (harvested, no recorded run)
lechengkong/oneforall/models/model.py
code served (permissive licence) · get_code("d15a20d9776a5201")
How it ran

no invocation recorded.

classification_func Not yet run
unverified (harvested, no recorded run)
LechengKong/OneForAll/gp/lightning/metric.py
code served (permissive licence) · get_code("2f952f786f090a85")
How it ran

no invocation recorded.

flat_auc Not yet run
unverified (harvested, no recorded run)
LechengKong/OneForAll/utils.py
pointer only (licence: MIT); the stored copy get_code serves, from GXG-CS/STEM-GNN, is pointer only (licence: NONE) · get_code("1ae9c9bd82345553")
How it ran

The body of this sample is withheld: this paper's link allows the body inline (MIT), but get_code serves the stored copy, first harvested from GXG-CS/STEM-GNN, and GitHub detected no licence in that repository when it was checked. The setup block that called it is withheld with it, because it is written against that body. source_path and origin say where the code lives, to read under the repository's own terms. No invocation recorded.

flat_binary_func Not yet run
unverified (harvested, no recorded run)
LechengKong/OneForAll/gp/lightning/metric.py
code served (permissive licence) · get_code("ba35408d43f03da8")
How it ran

no invocation recorded.

resolver Not yet run
unverified (harvested, no recorded run)
lechengkong/oneforall/models/model.py
code served (permissive licence) · get_code("743ac2471dcc771b")
How it ran

no invocation recorded.

similarity_func Not yet run
unverified (harvested, no recorded run)
LechengKong/OneForAll/gp/lightning/metric.py
code served (permissive licence) · get_code("0806c1152385d974")
How it ran

no invocation recorded.

Also present in other papers' code

Of 18 samples lifted from this paper's linked repositories, 18 carry a function identity and 0 do not. Of the 18 distinct functions with an identity, 7 are also present in other papers whose code we hold (2 with at least one paper dated earlier, 0 the same month, 5 later) and 11 are only here among the 52,977 papers whose code Syntology holds (as of 2026-09-26).

Only here means: among the 52,977 papers whose code Syntology holds (51,887 with lifted samples, 1,090 through their assemblies only), as of 2026-09-26, no other paper's lifted samples or current assembly bricks contain an identical function body after normalisation.

FunctionAlso present inEarliest-datedOthers named
ArxivFSSplitter 2 other papers
2 later
2411.06070 (2024-11)
GFT: Graph Foundation Model with Transferable Tree Vocabulary
2602.09258 (2026-02)
Generalizing GNNs with Tokenized Mixture of Experts
CiteSplitter 2 other papers
2 later
2411.06070 (2024-11)
GFT: Graph Foundation Model with Transferable Tree Vocabulary
2602.09258 (2026-02)
Generalizing GNNs with Tokenized Mixture of Experts
binary_apr_func 2 other papers
2 later
2411.06070 (2024-11)
GFT: Graph Foundation Model with Transferable Tree Vocabulary
2602.09258 (2026-02)
Generalizing GNNs with Tokenized Mixture of Experts
binary_single_auc_func 2 other papers
2 later
2411.06070 (2024-11)
GFT: Graph Foundation Model with Transferable Tree Vocabulary
2602.09258 (2026-02)
Generalizing GNNs with Tokenized Mixture of Experts
flat_auc 2 other papers
2 later
2411.06070 (2024-11)
GFT: Graph Foundation Model with Transferable Tree Vocabulary
2602.09258 (2026-02)
Generalizing GNNs with Tokenized Mixture of Experts
normalize_string
brick of this paper's assembly: helper
2 other papers
2 dated earlier
2206.09144 (2022-06)
Beyond Real-world Benchmark Datasets: An Empirical Study of Node Classification with GNNs
2306.08274 (2023-06)
A Simple and Scalable Graph Neural Network for Large Directed Graphs
swish
brick of this paper's assembly: helper
2 other papers
2 dated earlier
2206.09144 (2022-06)
Beyond Real-world Benchmark Datasets: An Empirical Study of Node Classification with GNNs
2306.08274 (2023-06)
A Simple and Scalable Graph Neural Network for Large Directed Graphs

Presence, not direction: an identical function body in two papers' repositories does not say who wrote it, which came from which, or that either paper's method rests on it. Matching is exact after normalisation, so a renamed or edited function is not matched. Dates are when papers appeared, not when code was written. Only .py files the harvester lifted are covered; notebooks are not read. A new-style arXiv id YYMM.NNNN dates a paper to the month 20YY-MM; otherwise Paper.year dates it to the year; otherwise it is undated. Dates are when the paper appeared, not when the code was written. Read 2026-11-22.

Repositories linked to this paper

Some links come from the archived Papers with Code dataset (CC BY-SA 4.0): attribution and licence.

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, fewshot, and zero-shot learning scenarios. OFA performs well across different tasks, making it the first general-purpose across-domains classification model on graphs.

For agents

The same record, over MCP at https://syntology.ai/mcp:

get_harvested_code_for_paper("2310.00149")
get_code_for_paper("2310.00149")
have("2310.00149")

The run record, dated, one paper per request, free:

curl https://syntology.ai/api/ran/2310.00149.json

A badge for a README (the split and the date, never a ratio):

[![Syntology run record](https://syntology.ai/api/ran/2310.00149.svg)](https://syntology.ai/paper/2310.00149)

Connect an agent — have() is free.