SYNTOLOGY HomeExplorerAtlasCodeMethodologyAboutDevelopersFeedPricing
Paper · 2003.01332 · 2020

Heterogeneous Graph Transformer

arXiv · PDF · Open in the Atlas

Code that ran

2 of 6 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; 0 failures of our instrument; 4 no recorded run), measured 2026-11-21; 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/2003.01332.json · badge: /api/ran/2003.01332.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
acbull/pyHGT canonical (classifier label)
classifier basis: census
2 ran · 4 no recorded run
FunctionStatusWhere it lives
get_n_params Ran
ran, honoured the contract we drafted
acbull/pyHGT/ogbn-mag/pyHGT/utils.py
pointer only (licence: MIT); the stored copy get_code serves, from ldkong1205/openess, is pointer only (licence: NONE) · get_code("c6acd3e400fc2676")
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 ldkong1205/openess, 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.

mean_reciprocal_rank Ran
ran on a synthesized input
acbull/pyHGT/pyHGT/utils.py
code served (permissive licence) · get_code("b7094768238a0bdb")
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 list, ndim 1, dtype family float; no output shape is stated. The image it ran in was not recorded. If your copy returns the same type and ndim 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

# mean_reciprocal_rank expects rs to be an iterable of array-like objects
# Each element r should be convertible to a numpy array
# The function computes nonzero indices and calculates 1.0 / (first_nonzero_index + 1)

# Create some test data: a list of binary relevance arrays
# Each array represents relevance scores where 1 = relevant, 0 = not relevant
rs = [
    np.array([0, 1, 0, 1]),  # First relevant item at index 1, MRR = 1/2
    np.array([1, 0, 0, 0]),  # First relevant item at index 0, MRR = 1/1
    np.array([0, 0, 0, 0]),  # No relevant items, MRR = 0
    np.array([0, 0, 1, 0]),  # First relevant item at index 2, MRR = 1/3
]

ARGS = {
    "rs": rs
}
Setup block drafted by
a language model, Claude Haiku 4.5, prompt python_fixture_v1, through the batch API
Imports
numpy — import names as written, not package names to install; a name the repository itself provides is not a package
Returned
type list, ndim 1, dtype family float — a list output has no array shape of its own; none is stated
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
dcg_at_k Not yet run
unverified (harvested, no recorded run)
acbull/pyHGT/pyHGT/utils.py
pointer only (licence: MIT); the stored copy get_code serves, from CrawlScript/RpHGNN, is pointer only (licence: GPL-3.0) · get_code("98dab8054ae3ccee")
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 CrawlScript/RpHGNN, and GPL-3.0, as GitHub detects it on that repository, is not in the permissive set Syntology serves inline. 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.

ndcg_at_k Not yet run
unverified (harvested, no recorded run)
acbull/pyHGT/pyHGT/utils.py
pointer only (licence: MIT); the stored copy get_code serves, from CrawlScript/RpHGNN, is pointer only (licence: GPL-3.0) · get_code("46e47a2c4cf98c1f")
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 CrawlScript/RpHGNN, and GPL-3.0, as GitHub detects it on that repository, is not in the permissive set Syntology serves inline. 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.

renamed_load Not yet run
unverified (harvested, no recorded run)
acbull/pyHGT/pyHGT/data.py
code served (permissive licence) · get_code("391651c3e47960ca")
How it ran

no invocation recorded.

to_torch Not yet run
unverified (harvested, no recorded run)
acbull/pyHGT/pyHGT/data.py
code served (permissive licence) · get_code("f8a36842e8bfa621")
How it ran

no invocation recorded.

Also present in other papers' code

Of 6 samples lifted from this paper's linked repositories, 6 carry a function identity and 0 do not. Of the 6 distinct functions with an identity, 5 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 1 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
get_n_params 14 other papers
2 dated earlier, 12 later
1809.01852 (2018-09)
GAMENet: Graph Augmented MEmory Networks for Recommending Medication Combination
1912.09363 (2019-12)
Temporal Fusion Transformers for Interpretable Multi-horizon Time Series Forecasting
2004.12992 (2020-04)
MakeItTalk: Speaker-Aware Talking-Head Animation
and 11 more not named here
dcg_at_k 2 other papers
2 later
2006.15437 (2020-06)
GPT-GNN: Generative Pre-Training of Graph Neural Networks
2310.14481 (2023-10)
Efficient Heterogeneous Graph Learning via Random Projection
ndcg_at_k 2 other papers
2 later
2006.15437 (2020-06)
GPT-GNN: Generative Pre-Training of Graph Neural Networks
2310.14481 (2023-10)
Efficient Heterogeneous Graph Learning via Random Projection
renamed_load 2 other papers
1 dated earlier, 1 later
1606.03475 (2016-06)
De-identification of Patient Notes with Recurrent Neural Networks
2006.15437 (2020-06)
GPT-GNN: Generative Pre-Training of Graph Neural Networks
mean_reciprocal_rank 1 other paper
1 later
2006.15437 (2020-06)
GPT-GNN: Generative Pre-Training of Graph Neural Networks

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

Repositories linked to this paper

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

Abstract

Recent years have witnessed the emerging success of graph neural networks (GNNs) for modeling structured data. However, most GNNs are designed for homogeneous graphs, in which all nodes and edges belong to the same types, making them infeasible to represent heterogeneous structures. In this paper, we present the Heterogeneous Graph Transformer (HGT) architecture for modeling Web-scale heterogeneous graphs. To model heterogeneity, we design node- and edge-type dependent parameters to characterize the heterogeneous attention over each edge, empowering HGT to maintain dedicated representations for different types of nodes and edges. To handle dynamic heterogeneous graphs, we introduce the relative temporal encoding technique into HGT, which is able to capture the dynamic structural dependency with arbitrary durations. To handle Web-scale graph data, we design the heterogeneous mini-batch graph sampling algorithm---HGSampling---for efficient and scalable training. Extensive experiments on the Open Academic Graph of 179 million nodes and 2 billion edges show that the proposed HGT model consistently outperforms all the state-of-the-art GNN baselines by 9%--21% on various downstream tasks.

For agents

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

get_harvested_code_for_paper("2003.01332")
get_code_for_paper("2003.01332")
have("2003.01332")

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

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

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

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

Connect an agent — have() is free.