SYNTOLOGY HomeExplorerAtlasCodeMethodologyAboutDevelopersFeedPricing
Paper · 2402.07197 · 2024

GraphTranslator: Aligning Graph Model to Large Language Model for Open-ended Tasks

arXiv · PDF · Open in the Atlas

Code that ran

8 of 9 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; 1 honoured the contract we drafted, 1 violated it and 0 have no contract verdict; 6 failures of our instrument; 1 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/2402.07197.json · badge: /api/ran/2402.07197.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
alibaba/graphtranslator canonical (classifier label)
classifier basis: census
8 ran · 1 no recorded run
FunctionStatusWhere it lives
all_gather_with_grad Ran
ran, honoured the contract we drafted
alibaba/graphtranslator/Translator/models/base_model.py
code served (permissive licence) · get_code("5d118a6ac70d4e06")
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
import torch.nn as nn

torch.manual_seed(0)

# The function all_gather_with_grad expects a tensor as input
# It checks world_size == 1, and if so, returns the tensor as-is
# If world_size > 1, it would use GatherLayer.apply and concatenate
# Since we're in single-process mode, we just need a valid tensor

tensors = torch.randn(2, 4, requires_grad=True)

ARGS = {
    "tensors": tensors
}
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
apply_to_sample Ran
ran; our contract draft was wrong, not the code
alibaba/graphtranslator/Translator/datasets/data_utils.py
code served (permissive licence) · get_code("992489a59b9e08d0")
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 dict. 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

torch.manual_seed(0)

# The function apply_to_sample takes:
# - f: a callable that transforms tensors
# - sample: a nested structure (dict/list/tensor) to apply f to

# Define a simple transformation function
def transform_fn(x):
    """Simple transformation that adds 1 to a tensor"""
    return x + 1

# Create sample data with nested structures
sample = {
    "tensor_field": torch.randn(2, 4),
    "nested_dict": {
        "inner_tensor": torch.randn(3, 4),
        "value": 42
    },
    "list_field": [
        torch.randn(2, 3),
        {"another_tensor": torch.randn(1, 4)},
        "string_value"
    ]
}

ARGS = {
    "f": transform_fn,
    "sample": sample
}
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 dict — a dict output has no array shape of its own; none is stated — the instrument coerces any output to an array; for a dict 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
compute_accuracy Ran
ran; our contract draft was wrong, not the code
alibaba/graphtranslator/Producer/inference/GraphSAGE.py
code served (permissive licence) · get_code("eb3a55d5da2240a5")
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 float, ndim 0, dtype family float, shape () 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)

# Create sample outputs: batch_size=2, num_classes=4
outputs = torch.randn(2, 4)

# Create sample labels: batch_size=2
labels = torch.tensor([1, 3])

ARGS = {
    "outputs": outputs,
    "labels": labels,
}
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 float, ndim 0, dtype family float, shape () — shape () 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
is_url Ran
ran, violated the contract we drafted
alibaba/graphtranslator/Translator/common/utils.py
pointer only (licence: BSD-3-Clause); the stored copy get_code serves, from jylins/videoxum, is pointer only (licence: NONE) · get_code("4d1d9c47619920ba")
How it ran

The body of this sample is withheld: this paper's link allows the body inline (BSD-3-Clause), but get_code serves the stored copy, first harvested from jylins/videoxum, 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.

main_process Ran
ran; our contract draft was wrong, not the code
alibaba/graphtranslator/Translator/common/dist_utils.py
code served (permissive licence) · get_code("98589643273920ba")
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 function. 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
import functools

torch.manual_seed(0)

def get_dist_info():
    import torch.distributed as dist
    if torch.__version__ < '1.0':
        initialized = dist._initialized
    else:
        initialized = dist.is_initialized()
    if initialized:
        rank = dist.get_rank()
        world_size = dist.get_world_size()
    else:
        rank = 0
        world_size = 1
    return (rank, world_size)

def main_process(func):
    @functools.wraps(func)
    def wrapper(*args, **kwargs):
        rank, _ = get_dist_info()
        if rank == 0:
            return func(*args, **kwargs)
    return wrapper

# Create a simple test function to decorate
def sample_function(x, y):
    return x + y

# Apply the decorator
decorated_func = main_process(sample_function)

# The main_process function takes a single parameter: func (a callable)
ARGS = {
    'func': sample_function
}
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 function — a function output has no array shape of its own; none is stated — the instrument coerces any output to an array; for a function 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
move_to_cuda Ran
ran; the contract check could not run (RAISES, DEP_MISSING or TIMEOUT)
alibaba/graphtranslator/Translator/datasets/data_utils.py
code served (permissive licence) · get_code("f0d0d2447408bb09")
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 dict. The image it ran in was not recorded. The code mentions cuda, and the harness aliases cuda to the CPU for every sample; whether this run needed that is 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

torch.manual_seed(0)

# The function move_to_cuda takes a sample parameter which can contain:
# - tensors (which get moved to cuda)
# - dicts (recursively processed)
# - lists (recursively processed)
# - other types (returned as-is)

# Create a sample with various nested structures containing tensors
sample = {
    "input_ids": torch.randn(2, 4),
    "attention_mask": torch.randint(0, 2, (2, 4)),
    "nested_dict": {
        "embeddings": torch.randn(2, 3),
        "metadata": "some_string"
    },
    "tensor_list": [
        torch.randn(2, 5),
        torch.randn(2, 6)
    ],
    "mixed_list": [
        torch.randn(2, 7),
        {"inner_tensor": torch.randn(2, 8)},
        "string_value"
    ],
    "scalar_value": 42
}

ARGS = {
    "sample": sample
}
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 dict — a dict output has no array shape of its own; none is stated — the instrument coerces any output to an array; for a dict 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
node_to_dict Ran
ran; our contract draft was wrong, not the code
alibaba/graphtranslator/Translator/common/config.py
code served (permissive licence) · get_code("791c72070c0b1cfb")
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 dict. 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.

from omegaconf import OmegaConf

# Create a simple OmegaConf node to pass to node_to_dict
# The function converts an OmegaConf node to a regular Python container
node = OmegaConf.create({
    "model": {
        "name": "test_model",
        "layers": 3,
        "hidden_dim": 128
    },
    "training": {
        "lr": 0.001,
        "epochs": 100,
        "batch_size": 32
    },
    "data": ["sample1", "sample2", "sample3"]
})

ARGS = {
    "node": node
}
Setup block drafted by
a language model, Claude Haiku 4.5, prompt python_fixture_v1, through the batch API
Imports
omegaconf — import names as written, not package names to install; a name the repository itself provides is not a package
Returned
type dict — a dict output has no array shape of its own; none is stated — the instrument coerces any output to an array; for a dict 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
prepare_sample Ran
ran; our contract draft was wrong, not the code
alibaba/graphtranslator/Translator/datasets/data_utils.py
code served (permissive licence) · get_code("9d94c9c2524f4a1b")
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 dict. The image it ran in was not recorded. The code mentions cuda, and the harness aliases cuda to the CPU for every sample; whether this run needed that is 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)

# Create a sample with nested structure containing tensors
sample_data = {
    "tokens": torch.randn(2, 4),
    "embeddings": torch.randn(2, 3),
    "metadata": {
        "ids": torch.randn(2, 5),
        "scores": torch.randn(2, 1)
    },
    "sequence": [
        torch.randn(2, 6),
        torch.randn(2, 7),
        {
            "nested_tensor": torch.randn(2, 8)
        }
    ],
    "text": "sample string that should be ignored"
}

ARGS = {
    "samples": sample_data,
    "cuda_enabled": False
}
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 dict — a dict output has no array shape of its own; none is stated — the instrument coerces any output to an array; for a dict 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
download_cached_file Not yet run
unverified (harvested, no recorded run)
alibaba/graphtranslator/Translator/common/dist_utils.py
code served (permissive licence) · get_code("643539116e049080")
How it ran

no invocation recorded.

Also present in other papers' code

Of 9 samples lifted from this paper's linked repositories, 9 carry a function identity and 0 do not. Of the 9 distinct functions with an identity, 7 are also present in other papers whose code we hold (5 with at least one paper dated earlier, 3 the same month, 7 later) and 2 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
node_to_dict 39 other papers
18 dated earlier, 3 the same month, 16 later, 2 same year, order not determinable
2305.04160 (2023-05)
X-LLM: Bootstrapping Advanced Large Language Models by Treating Multi-Modalities as Foreign Languages
2305.14167 (2023-05)
DetGPT: Detect What You Need via Reasoning
2305.16103 (2023-05)
ChatBridge: Bridging Modalities with Large Language Model as a Language Catalyst
and 36 more not named here
download_cached_file 37 other papers
18 dated earlier, 3 the same month, 14 later, 2 same year, order not determinable
2305.04160 (2023-05)
X-LLM: Bootstrapping Advanced Large Language Models by Treating Multi-Modalities as Foreign Languages
2305.14167 (2023-05)
DetGPT: Detect What You Need via Reasoning
2305.16103 (2023-05)
ChatBridge: Bridging Modalities with Large Language Model as a Language Catalyst
and 34 more not named here
main_process 35 other papers
18 dated earlier, 2 the same month, 13 later, 2 same year, order not determinable
2305.04160 (2023-05)
X-LLM: Bootstrapping Advanced Large Language Models by Treating Multi-Modalities as Foreign Languages
2305.14167 (2023-05)
DetGPT: Detect What You Need via Reasoning
2305.16103 (2023-05)
ChatBridge: Bridging Modalities with Large Language Model as a Language Catalyst
and 32 more not named here
is_url 11 other papers
7 dated earlier, 3 later, 1 same year, order not determinable
2211.09790 (2022-11)
ConStruct-VL: Data-Free Continual Structured VL Concepts Learning
2303.12060 (2023-03)
VideoXum: Cross-modal Visual and Textural Summarization of Videos
2304.05977 (2023-04)
ImageReward: Learning and Evaluating Human Preferences for Text-to-Image Generation
and 8 more not named here
apply_to_sample 2 other papers
1 dated earlier, 1 later
2006.16336 (2020-06)
Learning Sparse Prototypes for Text Generation
2409.03643 (2024-09)
Image Over Text: Transforming Formula Recognition Evaluation with Character Detection Matching
move_to_cuda 1 other paper
1 later
2409.03643 (2024-09)
Image Over Text: Transforming Formula Recognition Evaluation with Character Detection Matching
prepare_sample 1 other paper
1 later
2409.03643 (2024-09)
Image Over Text: Transforming Formula Recognition Evaluation with Character Detection Matching

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

Large language models (LLMs) like ChatGPT, exhibit powerful zero-shot and instruction-following capabilities, have catalyzed a revolutionary transformation across diverse fields, especially for open-ended tasks. While the idea is less explored in the graph domain, despite the availability of numerous powerful graph models (GMs), they are restricted to tasks in a pre-defined form. Although several methods applying LLMs to graphs have been proposed, they fail to simultaneously handle the pre-defined and open-ended tasks, with LLM as a node feature enhancer or as a standalone predictor. To break this dilemma, we propose to bridge the pretrained GM and LLM by a Translator, named GraphTranslator, aiming to leverage GM to handle the pre-defined tasks effectively and utilize the extended interface of LLMs to offer various open-ended tasks for GM. To train such Translator, we propose a Producer capable of constructing the graph-text alignment data along node information, neighbor information and model information. By translating node representation into tokens, GraphTranslator empowers an LLM to make predictions based on language instructions, providing a unified perspective for both pre-defined and open-ended tasks. Extensive results demonstrate the effectiveness of our proposed GraphTranslator on zero-shot node classification. The graph question answering experiments reveal our GraphTranslator potential across a broad spectrum of open-ended tasks through language instructions. Our code is available at: https://github.com/alibaba/GraphTranslator.

For agents

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

get_harvested_code_for_paper("2402.07197")
get_code_for_paper("2402.07197")
have("2402.07197")

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

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

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

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

Connect an agent — have() is free.