SYNTOLOGY HomeExplorerAtlasCodeMethodologyAboutDevelopersFeedPricing
Paper · 2305.19523 · ICLR · 2024

Harnessing Explanations: LLM-to-LM Interpreter for Enhanced Text-Attributed Graph Representation Learning

Bryan Hooi, Yann Lecun, Xiaoxin He, Thomas Laurent, Adam Perold, Xavier Bresson

arXiv · PDF · Open in the Atlas

Code that ran

6 of 7 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, 0 violated it and 1 has no contract verdict; 4 failures of our instrument; 1 no recorded run), measured 2026-11-23; 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/2305.19523.json · badge: /api/ran/2305.19523.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
XiaoxinHe/TAPE canonical (classifier label)
classifier basis: census
5 ran · 1 no recorded run
xiaoxinhe/tape_arxiv_2023 canonical (classifier label)
classifier basis: classifier_2025
1 ran · 0 no recorded run
FunctionStatusWhere it lives
compute_metrics Ran
ran on a synthesized input
XiaoxinHe/TAPE/core/LMs/lm_trainer.py
code served (permissive licence) · get_code("869b258eb176ffca")
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 numpy as np
import torch

# Set seed for reproducibility
torch.manual_seed(0)

# The function expects p to be a tuple of (predictions, labels)
# where predictions are logits/probabilities with shape (batch_size, num_classes)
# and labels are class indices with shape (batch_size,)

batch_size = 2
num_classes = 4

# Create predictions: raw logits (batch_size, num_classes)
predictions = np.random.randn(batch_size, num_classes).astype(np.float32)

# Create labels: class indices (batch_size,)
labels = np.array([0, 2], dtype=np.int64)

# Construct the argument as a tuple
p = (predictions, labels)

ARGS = {
    'p': p
}
Setup block drafted by
a language model, Claude Haiku 4.5, prompt python_fixture_v1, through the batch API
Imports
numpy, sklearn, 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
get_dir_of_file Ran
ran; our contract draft was wrong, not the code
XiaoxinHe/TAPE/core/utils.py
code served (permissive licence) · get_code("587bcdd318e3716e")
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 os

def get_dir_of_file(f_name):
    return os.path.dirname(f_name) + '/'

ARGS = {
    'f_name': '/path/to/some/file.txt'
}
Setup block drafted by
a language model, Claude Haiku 4.5, prompt python_fixture_v1, through the batch API
Imports
none outside the standard library — 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
init_path Ran
ran; our contract draft was wrong, not the code
XiaoxinHe/TAPE/core/utils.py
code served (permissive licence) · get_code("a0a4a124393e3929")
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 os
import tempfile

# Create a temporary directory for testing
temp_dir = tempfile.mkdtemp()

# Test with a nested file path that doesn't exist yet
test_file_path = os.path.join(temp_dir, "subdir", "nested", "test_file.txt")

ARGS = {
    "dir_or_file": test_file_path
}
Setup block drafted by
a language model, Claude Haiku 4.5, prompt python_fixture_v1, through the batch API
Imports
none outside the standard library — 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
time2str Ran
ran; our contract draft was wrong, not the code
XiaoxinHe/TAPE/core/utils.py
code served (permissive licence) · get_code("52f69633f57cef09")
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

# time2str takes a single parameter 't' which should be a numeric value (int or float)
# representing time in seconds. The function converts it to a human-readable string.

# Test with various time values
t_value = 125.5  # 2 minutes and 5.5 seconds

ARGS = {
    't': t_value
}
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
update_cfg Ran
ran; our contract draft was wrong, not the code
XiaoxinHe/TAPE/core/config.py
code served (permissive licence) · get_code("a5fe9aee2d93d22e")
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 CfgNode. 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 os
import argparse
from yacs.config import CfgNode as CN

def set_cfg(cfg):
    cfg.dataset = 'cora'
    cfg.device = 0
    cfg.seed = None
    cfg.runs = 4
    cfg.gnn = CN()
    cfg.lm = CN()
    cfg.gnn.model = CN()
    cfg.gnn.model.name = 'GCN'
    cfg.gnn.model.num_layers = 4
    cfg.gnn.model.hidden_dim = 128
    cfg.gnn.train = CN()
    cfg.gnn.train.weight_decay = 0.0
    cfg.gnn.train.epochs = 200
    cfg.gnn.train.feature_type = 'TA_P_E'
    cfg.gnn.train.early_stop = 50
    cfg.gnn.train.lr = 0.01
    cfg.gnn.train.wd = 0.0
    cfg.gnn.train.dropout = 0.0
    cfg.lm.model = CN()
    cfg.lm.model.name = 'microsoft/deberta-base'
    cfg.lm.model.feat_shrink = ''
    cfg.lm.train = CN()
    cfg.lm.train.batch_size = 9
    cfg.lm.train.grad_acc_steps = 1
    cfg.lm.train.lr = 2e-05
    cfg.lm.train.epochs = 4
    cfg.lm.train.warmup_epochs = 0.6
    cfg.lm.train.eval_patience = 50000
    cfg.lm.train.weight_decay = 0.0
    cfg.lm.train.dropout = 0.3
    cfg.lm.train.att_dropout = 0.1
    cfg.lm.train.cla_dropout = 0.4
    cfg.lm.train.use_gpt = False
    return cfg

def update_cfg(cfg, args_str=None):
    parser = argparse.ArgumentParser()
    parser.add_argument('--config', default='', metavar='FILE', help='Path to config file')
    parser.add_argument('opts', default=[], nargs=argparse.REMAINDER, help='Modify config options using the command-line')
    if isinstance(args_str, str):
        args = parser.parse_args(args_str.split())
    else:
        args = parser.parse_args()
    cfg = cfg.clone()
    if os.path.isfile(args.config):
        cfg.merge_from_file(args.config)
    cfg.merge_from_list(args.opts)
    return cfg

cfg_base = set_cfg(CN())

ARGS = {
    'cfg': cfg_base,
    'args_str': None
}
Setup block drafted by
a language model, Claude Haiku 4.5, prompt python_fixture_v1, through the batch API
Imports
yacs — import names as written, not package names to install; a name the repository itself provides is not a package
Returned
type CfgNode — a CfgNode output has no array shape of its own; none is stated — the instrument coerces any output to an array; for a CfgNode 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
word2vec Ran
ran, honoured the contract we drafted
xiaoxinhe/tape_arxiv_2023/src/process.py
pointer only (licence: NONE) · get_code("a3113ed80fa9619b")
How it ran

The body of this sample is withheld: GitHub detected no licence in this paper's repository, xiaoxinhe/tape_arxiv_2023 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.

get_gnn_trainer Not yet run
unverified (harvested, no recorded run)
XiaoxinHe/TAPE/core/GNNs/gnn_utils.py
code served (permissive licence) · get_code("d2afc384178adbf7")
How it ran

no invocation recorded.

Also present in other papers' code

Of 7 samples lifted from this paper's linked repositories, 7 carry a function identity and 0 do not. Of the 7 distinct functions with an identity, 5 are also present in other papers whose code we hold (1 with at least one paper dated earlier, 0 the same month, 5 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
update_cfg 8 other papers
2 dated earlier, 6 later
2110.03753 (2021-10)
From Stars to Subgraphs: Uplifting Any GNN with Local Structure Awareness
2304.07702 (2023-04)
An Empirical Study of Realized GNN Expressiveness
2309.16014 (2023-09)
Graph-level Representation Learning with Joint-Embedding Predictive Architectures
and 5 more not named here
get_dir_of_file 1 other paper
1 later
2406.12052 (2024-06)
UniGLM: Training One Unified Language Model for Text-Attributed Graph Embedding
init_path 1 other paper
1 later
2406.12052 (2024-06)
UniGLM: Training One Unified Language Model for Text-Attributed Graph Embedding
time2str 1 other paper
1 later
2406.12052 (2024-06)
UniGLM: Training One Unified Language Model for Text-Attributed Graph Embedding
word2vec 1 other paper
1 later
2510.10849 (2025-10)
Glance for Context: Learning When to Leverage LLMs for Node-Aware GNN-LLM Fusion

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-23.

Repositories linked to this paper

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

Abstract

Representation learning on text-attributed graphs (TAGs) has become a critical research problem in recent years. A typical example of a TAG is a paper citation graph, where the text of each paper serves as node attributes. Initial graph neural network (GNN) pipelines handled these text attributes by transforming them into shallow or hand-crafted features, such as skip-gram or bag-of-words features. Recent efforts have focused on enhancing these pipelines with language models (LMs), which typically demand intricate designs and substantial computational resources. With the advent of powerful large language models (LLMs) such as GPT or Llama2, which demonstrate an ability to reason and to utilize general knowledge, there is a growing need for techniques which combine the textual modelling abilities of LLMs with the structural learning capabilities of GNNs. Hence, in this work, we focus on leveraging LLMs to capture textual information as features, which can be used to boost GNN performance on downstream tasks. A key innovation is our use of explanations as features: we prompt an LLM to perform zero-shot classification, request textual explanations for its decision-making process, and design an LLM-to-LM interpreter to translate these explanations into informative features for downstream GNNs. Our experiments demonstrate that our method achieves state-of-the-art results on well-established TAG datasets, including Cora, PubMed, ogbn-arxiv, as well as our newly introduced dataset, tape-arxiv23. Furthermore, our method significantly speeds up training, achieving a 2.88 times improvement over the closest baseline on ogbn-arxiv. Lastly, we believe the versatility of the proposed method extends beyond TAGs and holds the potential to enhance other tasks involving graph-text data 1 .

For agents

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

get_harvested_code_for_paper("2305.19523")
get_code_for_paper("2305.19523")
have("2305.19523")

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

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

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

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

Connect an agent — have() is free.