SYNTOLOGY HomeExplorerAtlasCodeMethodologyAboutDevelopersFeedPricing
Paper · 1910.00760 · 2019

Efficient Graph Generation with Graph Recurrent Attention Networks

arXiv · PDF · Open in the Atlas

Code that ran

8 of 15 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; 2 failures of our instrument; 7 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/1910.00760.json · badge: /api/ran/1910.00760.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
lrjconan/GRAN canonical (classifier label)
classifier basis: census
8 ran · 7 no recorded run
FunctionStatusWhere it lives
clean_graphs Ran
ran; our contract draft was wrong, not the code
lrjconan/GRAN/utils/eval_helper.py
code served (permissive licence) · get_code("f5d7e99da0c1815c")
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 numpy as np
from random import shuffle

def find_nearest_idx(array, value):
    idx = np.abs(array - value).argmin()
    return idx

def clean_graphs(graph_real, graph_pred, npr=None):
    """ Selecting graphs generated that have the similar sizes.
    It is usually necessary for GraphRNN-S version, but not the full GraphRNN model.
    """
    if npr is None:
        shuffle(graph_real)
        shuffle(graph_pred)
    else:
        npr.shuffle(graph_real)
        npr.shuffle(graph_pred)
    real_graph_len = np.array([len(graph_real[i]) for i in range(len(graph_real))])
    pred_graph_len = np.array([len(graph_pred[i]) for i in range(len(graph_pred))])
    pred_graph_new = []
    pred_graph_len_new = []
    for value in real_graph_len:
        pred_idx = find_nearest_idx(pred_graph_len, value)
        pred_graph_new.append(graph_pred[pred_idx])
        pred_graph_len_new.append(pred_graph_len[pred_idx])
    return (graph_real, pred_graph_new)

# Create sample graphs as lists of nodes/adjacency lists
graph_real = [
    [0, 1, 2],
    [0, 1, 2, 3],
    [0, 1]
]

graph_pred = [
    [0, 1, 2, 3],
    [0, 1, 2],
    [0, 1, 2, 3, 4]
]

npr_instance = np.random.RandomState(42)

ARGS = {
    "graph_real": graph_real,
    "graph_pred": graph_pred,
    "npr": npr_instance
}
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 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
compute_edge_ratio Ran
ran on a synthesized input
lrjconan/GRAN/runner/gran_runner.py
code served (permissive licence) · get_code("345d9330634d2e06")
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 networkx as nx

# Create a list of small NetworkX graphs
G_list = [
    nx.complete_graph(3),      # 3 nodes, 3 edges
    nx.path_graph(4),          # 4 nodes, 3 edges
    nx.star_graph(2),          # 3 nodes, 2 edges
]

ARGS = {
    "G_list": G_list
}
Setup block drafted by
a language model, Claude Haiku 4.5, prompt python_fixture_v1, through the batch API
Imports
networkx — 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
degree_worker Ran
ran; our contract draft was wrong, not the code
lrjconan/GRAN/utils/eval_helper.py
code served (permissive licence) · get_code("2830d89cd6960c9d")
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 ndarray, 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 numpy as np
import networkx as nx

# Create a simple graph for testing
G = nx.Graph()
G.add_edges_from([(0, 1), (1, 2), (2, 3), (3, 0), (1, 3)])

ARGS = {
    "G": G
}
Setup block drafted by
a language model, Claude Haiku 4.5, prompt python_fixture_v1, through the batch API
Imports
networkx, numpy — import names as written, not package names to install; a name the repository itself provides is not a package
Returned
type ndarray, 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
edict2dict Ran
ran on a synthesized input
lrjconan/GRAN/utils/arg_helper.py
code served (permissive licence) · get_code("85c06dcfd0525e9f")
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
from easydict import EasyDict as edict

# Create a nested edict structure to test the recursive conversion
nested_edict = edict({
    'name': 'test_model',
    'learning_rate': 0.001,
    'nested_config': edict({
        'hidden_dim': 128,
        'num_layers': 3,
        'activation': 'relu'
    }),
    'another_nested': edict({
        'batch_size': 32,
        'dropout': 0.5
    }),
    'simple_value': 42
})

ARGS = {
    'edict_obj': nested_edict
}
Setup block drafted by
a language model, Claude Haiku 4.5, prompt python_fixture_v1, through the batch API
Imports
easydict, 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
find_nearest_idx Ran
ran, honoured the contract we drafted
lrjconan/GRAN/utils/eval_helper.py
code served (permissive licence) · get_code("a39feeeaa3cceac3")
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 int64, ndim 0, dtype family int, 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 numpy as np

# Create a numpy array with some sample values
array = np.array([1.2, 3.5, 5.8, 7.1, 9.3])

# Create a value to search for
value = 5.5

# Construct the ARGS dictionary
ARGS = {
    "array": array,
    "value": value
}
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 int64, ndim 0, dtype family int, 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
get_logger Ran
ran on a synthesized input
lrjconan/GRAN/utils/logger.py
code served (permissive licence) · get_code("8569ed5e16bfff42")
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 Logger. 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 logging

# The function get_logger takes an optional logger_name parameter
# and returns a logger object. We need to provide a valid logger_name.

ARGS = {
    'logger_name': 'exp_logger'
}
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 Logger — a Logger output has no array shape of its own; none is stated — the instrument coerces any output to an array; for a Logger 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
l2 Ran
ran, honoured the contract we drafted
lrjconan/GRAN/utils/dist_helper.py
pointer only (licence: MIT); the stored copy get_code serves, from lf-wen/hgdm, is pointer only (licence: NONE) · get_code("039fc6561a9516bc")
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 lf-wen/hgdm, 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.

setup_logging Ran
ran on a synthesized input
lrjconan/GRAN/utils/logger.py
code served (permissive licence) · get_code("c231d83496edbc85")
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 Logger. 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 logging
import tempfile
import os

# Create a temporary file for logging
temp_log_file = tempfile.NamedTemporaryFile(mode='w', delete=False, suffix='.log').name

ARGS = {
    'log_level': 'INFO',
    'log_file': temp_log_file,
    'logger_name': 'exp_logger'
}
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 Logger — a Logger output has no array shape of its own; none is stated — the instrument coerces any output to an array; for a Logger 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
evaluate Not yet run
unverified (harvested, no recorded run)
lrjconan/GRAN/runner/gran_runner.py
code served (permissive licence) · get_code("79386155a1b3f4d1")
How it ran

no invocation recorded.

get_config Not yet run
unverified (harvested, no recorded run)
lrjconan/GRAN/utils/arg_helper.py
code served (permissive licence) · get_code("7da817c2fb6ff428")
How it ran

no invocation recorded.

get_graph Not yet run
unverified (harvested, no recorded run)
lrjconan/GRAN/runner/gran_runner.py
code served (permissive licence) · get_code("9851241198ed98d8")
How it ran

no invocation recorded.

load_graph_list Not yet run
unverified (harvested, no recorded run)
lrjconan/GRAN/utils/data_helper.py
code served (permissive licence) · get_code("84ac833da895bc1b")
How it ran

no invocation recorded.

mixture_bernoulli_loss Not yet run
unverified (harvested, no recorded run)
lrjconan/GRAN/model/gran_mixture_bernoulli.py
code served (permissive licence) · get_code("52ee19ca206bf805")
How it ran

no invocation recorded.

pick_connected_component_new Not yet run
unverified (harvested, no recorded run)
lrjconan/GRAN/utils/data_helper.py
pointer only (licence: MIT); the stored copy get_code serves, from kevtran23/autoregressive_bias_correction, is pointer only (licence: NONE) · get_code("b231e12a086b9714")
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 kevtran23/autoregressive_bias_correction, 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.

preprocess_graph_list Not yet run
unverified (harvested, no recorded run)
lrjconan/GRAN/utils/data_helper.py
code served (permissive licence) · get_code("c6926ba7d87c5583")
How it ran

no invocation recorded.

Also present in other papers' code

Of 15 samples lifted from this paper's linked repositories, 15 carry a function identity and 0 do not. Of the 15 distinct functions with an identity, 9 are also present in other papers whose code we hold (3 with at least one paper dated earlier, 0 the same month, 7 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
l2 10 other papers
10 later
2204.01613 (2022-04)
SPECTRE: Spectral Conditioning Helps to Overcome the Expressivity Limits of One-shot Graph Generators
2305.19337 (2023-05)
HiGen: Hierarchical Graph Generative Networks
2306.07618 (2023-06)
Hyperbolic Graph Diffusion Model
and 7 more not named here
degree_worker 6 other papers
6 later
2204.01613 (2022-04)
SPECTRE: Spectral Conditioning Helps to Overcome the Expressivity Limits of One-shot Graph Generators
2305.19337 (2023-05)
HiGen: Hierarchical Graph Generative Networks
2312.17397 (2023-12)
Classifier-free graph diffusion for molecular property targeting
and 3 more not named here
find_nearest_idx 3 other papers
1 dated earlier, 2 later
1802.08773 (2018-02)
GraphRNN: Generating Realistic Graphs with Deep Auto-regressive Models
2204.01613 (2022-04)
SPECTRE: Spectral Conditioning Helps to Overcome the Expressivity Limits of One-shot Graph Generators
2305.19337 (2023-05)
HiGen: Hierarchical Graph Generative Networks
clean_graphs 2 other papers
2 later
2204.01613 (2022-04)
SPECTRE: Spectral Conditioning Helps to Overcome the Expressivity Limits of One-shot Graph Generators
2305.19337 (2023-05)
HiGen: Hierarchical Graph Generative Networks
get_graph 1 other paper
1 later
2405.03188 (2024-05)
Hyperbolic Geometric Latent Diffusion Model for Graph Generation
get_logger 1 other paper
1 later
2210.10318 (2022-10)
Gaussian-Bernoulli RBMs Without Tears
load_graph_list 1 other paper
1 dated earlier
1906.09531 (2019-06)
Bias Correction of Learned Generative Models using Likelihood-Free Importance Weighting
pick_connected_component_new 1 other paper
1 dated earlier
1906.09531 (2019-06)
Bias Correction of Learned Generative Models using Likelihood-Free Importance Weighting
setup_logging 1 other paper
1 later
2210.10318 (2022-10)
Gaussian-Bernoulli RBMs Without Tears

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

We propose a new family of efficient and expressive deep generative models of graphs, called Graph Recurrent Attention Networks (GRANs). Our model generates graphs one block of nodes and associated edges at a time. The block size and sampling stride allow us to trade off sample quality for efficiency. Compared to previous RNN-based graph generative models, our framework better captures the auto-regressive conditioning between the already-generated and to-be-generated parts of the graph using Graph Neural Networks (GNNs) with attention. This not only reduces the dependency on node ordering but also bypasses the long-term bottleneck caused by the sequential nature of RNNs. Moreover, we parameterize the output distribution per block using a mixture of Bernoulli, which captures the correlations among generated edges within the block. Finally, we propose to handle node orderings in generation by marginalizing over a family of canonical orderings. On standard benchmarks, we achieve state-of-the-art time efficiency and sample quality compared to previous models. Additionally, we show our model is capable of generating large graphs of up to 5K nodes with good quality. To the best of our knowledge, GRAN is the first deep graph generative model that can scale to this size. Our code is released at: https://github.com/lrjconan/GRAN.

For agents

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

get_harvested_code_for_paper("1910.00760")
get_code_for_paper("1910.00760")
have("1910.00760")

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

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

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

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

Connect an agent — have() is free.