SYNTOLOGY HomeExplorerAtlasCodeMethodologyAboutDevelopersFeedPricing
Paper · 2210.13148 · NeurIPS · 2023

Transformers over Directed Acyclic Graphs

Veronika Thost, 𝑥, Lei Shi, Yuankai Luo, 𝑘𝑒𝑦 𝑥, " 𝑥 # 𝑥 $ 𝑥, 𝑥 ' 𝑥

arXiv · PDF · Open in the Atlas

Code that ran

6 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; 2 honoured the contract we drafted, 0 violated it and 4 have no contract verdict; 0 failures of our instrument; 3 no recorded run), measured 2026-11-22; 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/2210.13148.json · badge: /api/ran/2210.13148.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
LUOyk1999/DAGformer canonical (classifier label)
classifier basis not recorded on the link
6 ran · 3 no recorded run
FunctionStatusWhere it lives
create_products_of_givens_rotations Ran
ran, honoured the contract we drafted
LUOyk1999/DAGformer/Node_classification_citation/dag_nodeformer.py
pointer only (licence: MIT); the stored copy get_code serves, from qitianwu/NodeFormer, is pointer only (licence: NONE) · get_code("214d66f90baa5770")
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 qitianwu/NodeFormer, 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.

create_projection_matrix Ran
ran, honoured the contract we drafted
LUOyk1999/DAGformer/Node_classification_citation/dag_nodeformer.py
pointer only (licence: MIT); the stored copy get_code serves, from qitianwu/NodeFormer, is pointer only (licence: NONE) · get_code("44fbc869db4685a6")
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 qitianwu/NodeFormer, 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.

eigvec_normalizer Ran
ran on a synthesized input
LUOyk1999/DAGformer/NA/src/utils_dag.py
code served (permissive licence) · get_code("0ca4bfed1ccd10c3")
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 (4, 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
import numpy as np

torch.manual_seed(0)

# Create small test tensors
# EigVecs: shape (n_features, n_components)
# EigVals: shape (n_components,)
EigVecs = torch.randn(4, 3)
EigVals = torch.abs(torch.randn(3)) + 0.1  # Ensure positive eigenvalues

ARGS = {
    'EigVecs': EigVecs,
    'EigVals': EigVals,
    'normalization': 'L2',
    'eps': 1e-12
}
Setup block drafted by
a language model, Claude Haiku 4.5, prompt python_fixture_v1, through the batch API
Imports
numpy, 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 (4, 3) — shape (4, 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
get_conv Ran
ran on a synthesized input
LUOyk1999/DAGformer/self-citation/models.py
code served (permissive licence) · get_code("19afc55973cf4ff3")
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 type. 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
from torch_geometric.nn import GCNConv, SAGEConv, GATConv, ARMAConv

torch.manual_seed(0)

ARGS = {
    'conv_name': 'GINConv'
}
Setup block drafted by
a language model, Claude Haiku 4.5, prompt python_fixture_v1, through the batch API
Imports
torch, torch_geometric — import names as written, not package names to install; a name the repository itself provides is not a package
Returned
type type — a type output has no array shape of its own; none is stated — the instrument coerces any output to an array; for a type 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_lap_decomp_stats Ran
ran on a synthesized input
LUOyk1999/DAGformer/NA/src/utils_dag.py
code served (permissive licence) · get_code("3f612bede595ee34")
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 tuple. 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 numpy as np

torch.manual_seed(0)

# Create small eigenvalues and eigenvectors for a tiny graph
# For a graph with 4 nodes, we need 4 eigenvalues and a 4x4 eigenvector matrix
num_nodes = 4
max_freqs = 3

# Create synthetic eigenvalues (must be real, typically non-negative for Laplacian)
evals = np.array([0.0, 0.5, 1.2, 2.1])

# Create synthetic eigenvectors (4x4 matrix)
evects = np.array([
    [0.5, 0.3, -0.1, 0.2],
    [0.5, -0.2, 0.3, -0.1],
    [0.5, 0.4, -0.2, 0.3],
    [0.5, -0.5, 0.0, -0.4]
], dtype=np.float32)

ARGS = {
    'evals': evals,
    'evects': evects,
    'max_freqs': max_freqs,
    'eigvec_norm': 'L2'
}
Setup block drafted by
a language model, Claude Haiku 4.5, prompt python_fixture_v1, through the batch API
Imports
numpy, torch — import names as written, not package names to install; a name the repository itself provides is not a package
Returned
type tuple — a tuple output has no array shape of its own; none is 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
top_sort Ran
ran on a synthesized input
LUOyk1999/DAGformer/NA/src/utils_dag.py
code served (permissive licence) · get_code("9dd505688b70e6d7")
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 1, dtype family int, shape (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 numpy

torch.manual_seed(0)

# Construct a simple DAG as edge_index
# edge_index[0] contains parent nodes
# edge_index[1] contains child nodes
# Let's create a small DAG: 0->1, 0->2, 1->3
parent_nodes = numpy.array([0, 0, 1], dtype=int)
child_nodes = numpy.array([1, 2, 3], dtype=int)
edge_index = numpy.array([parent_nodes, child_nodes], dtype=int)

graph_size = 4

ARGS = {
    "edge_index": edge_index,
    "graph_size": graph_size
}
Setup block drafted by
a language model, Claude Haiku 4.5, prompt python_fixture_v1, through the batch API
Imports
numpy, torch — import names as written, not package names to install; a name the repository itself provides is not a package
Returned
type Tensor, ndim 1, dtype family int, shape (4,) — shape (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
get_simple_gnn_layer Not yet run
unverified (harvested, no recorded run)
LUOyk1999/DAGformer/Node_classification_citation/gnn_layers.py
code served (permissive licence) · get_code("a99c1bcf4a331aae")
How it ran

no invocation recorded.

get_simple_gnn_layer Not yet run
unverified (harvested, no recorded run)
LUOyk1999/DAGformer/NA/dvae/gnn_layers.py
code served (permissive licence) · get_code("8b08a2aa35ad4509")
How it ran

no invocation recorded.

relu_kernel_transformation Not yet run
unverified (harvested, no recorded run)
LUOyk1999/DAGformer/Node_classification_citation/dag_nodeformer.py
pointer only (licence: MIT); the stored copy get_code serves, from qitianwu/NodeFormer, is pointer only (licence: NONE) · get_code("9ec77c43b56275a8")
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 qitianwu/NodeFormer, 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.

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, 3 are also present in other papers whose code we hold (0 with at least one paper dated earlier, 0 the same month, 3 later) and 6 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
create_products_of_givens_rotations 2 other papers
2 later
2306.08385 (2023-06)
NodeFormer: A Scalable Graph Structure Learning Transformer for Node Classification
2602.21498 (2026-02)
Learning Recursive Multi-Scale Representations for Irregular Multivariate Time Series Forecasting
create_projection_matrix 2 other papers
2 later
2306.08385 (2023-06)
NodeFormer: A Scalable Graph Structure Learning Transformer for Node Classification
2412.08160 (2024-12)
DG-Mamba: Robust and Efficient Dynamic Graph Structure Learning with Selective State Space Models
relu_kernel_transformation 1 other paper
1 later
2306.08385 (2023-06)
NodeFormer: A Scalable Graph Structure Learning Transformer for Node Classification

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

Transformer models have recently gained popularity in graph representation learning as they have the potential to learn complex relationships beyond the ones captured by regular graph neural networks. The main research question is how to inject the structural bias of graphs into the transformer architecture, and several proposals have been made for undirected molecular graphs and, recently, also for larger network graphs. In this paper, we study transformers over directed acyclic graphs (DAGs) and propose architecture adaptations tailored to DAGs: (1) An attention mechanism that is considerably more efficient than the regular quadratic complexity of transformers and at the same time faithfully captures the DAG structure, and (2) a positional encoding of the DAG's partial order, complementing the former. We rigorously evaluate our approach over various types of tasks, ranging from classifying source code graphs to nodes in citation networks, and show that it is effective in two important aspects: in making graph transformers generally outperform graph neural networks tailored to DAGs and in improving SOTA graph transformer performance in terms of both quality and efficiency.

For agents

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

get_harvested_code_for_paper("2210.13148")
get_code_for_paper("2210.13148")
have("2210.13148")

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

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

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

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

Connect an agent — have() is free.