SYNTOLOGY HomeExplorerAtlasCodeMethodologyAboutDevelopersFeedPricing
Paper · 2606.05067 · 2026

FLAGG: Flexible Autoregressive Graph Generation

Fondazione Kessler, Alessandro Sperduti, Luciano Serafini, Samuel Cognolato

arXiv · PDF

Code that ran

11 of 13 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; 0 honoured the contract we drafted, 1 violated it and 0 have no contract verdict; 10 failures of our instrument; 2 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/2606.05067.json · badge: /api/ran/2606.05067.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
CognacS/flagg-graphgen canonical (classifier label)
classifier basis: census
11 ran · 2 no recorded run
FunctionStatusWhere it lives
edges_map_fn Ran
ran; the contract check could not run (RAISES, DEP_MISSING or TIMEOUT)
CognacS/flagg-graphgen/src/analysis/visualization.py
code served (permissive licence) · get_code("c47c4ee88b4a1174")
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 torch import Tensor

torch.manual_seed(0)

# Construct edge_index: shape (2, 2) - two edges
# Each column represents an edge: [source_node, target_node]
edge_index = torch.tensor([
    [0, 1],
    [1, 2]
], dtype=torch.long).T  # Transpose to get (2, 2)

# Construct edge_attr: shape (2,) - attributes for each edge
# These are indices into the edges_decoder
edge_attr = torch.tensor([0, 1], dtype=torch.long)

# Construct edges_decoder: maps attribute indices to edge type labels
edges_decoder = {
    0: "edge_type_0",
    1: "edge_type_1"
}

ARGS = {
    "edge_index": edge_index,
    "edge_attr": edge_attr,
    "edges_decoder": edges_decoder
}
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
get_checkpoint_filepath Ran
ran; our contract draft was wrong, not the code
CognacS/flagg-graphgen/src/callbacks/checkpointing.py
code served (permissive licence) · get_code("9f49181c8399f1e2")
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 os.path as osp
import tempfile
import shutil

# Create a temporary directory structure to simulate checkpoint directories
temp_base = tempfile.mkdtemp()

# Set up directory structure: checkpoint_dir/model_name/version_X/checkpoints/
checkpoint_dir = temp_base
model_name = "test_model"
version = 0

version_subdir = osp.join(checkpoint_dir, model_name, f"version_{version}", "checkpoints")
os.makedirs(version_subdir, exist_ok=True)

# Create a dummy checkpoint file
dummy_checkpoint = osp.join(version_subdir, "checkpoint_epoch_1.pt")
with open(dummy_checkpoint, 'w') as f:
    f.write("dummy checkpoint")

ARGS = {
    "checkpoint_dir": checkpoint_dir,
    "model_name": model_name,
    "version": version,
}
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
gpus_available Ran
ran, violated the contract we drafted
CognacS/flagg-graphgen/src/configurator.py
code served (permissive licence) · get_code("aecd9bcf7f26ea83")
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 bool, ndim 0, dtype family float, shape () as a later run recorded it. 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, 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)

platform_config = {
    'devices': 1
}

ARGS = {
    'platform_config': platform_config
}
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 bool, 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
normalize_hist Ran
ran; our contract draft was wrong, not the code
CognacS/flagg-graphgen/src/analysis/distributions.py
code served (permissive licence) · get_code("11eb76ee9f443e43")
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
import numpy as np

torch.manual_seed(0)

# The function normalize_hist takes a histogram dictionary
# It sums the values, divides each value by the total
# So hist_dict needs to be a dict with numeric values

hist_dict = {
    'a': 10,
    'b': 20,
    'c': 30
}

ARGS = {
    'hist_dict': hist_dict
}
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 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
plot_histogram_from_hist Ran
ran; our contract draft was wrong, not the code
CognacS/flagg-graphgen/src/analysis/distributions.py
code served (permissive licence) · get_code("4ce8c155a66d5ad9")
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 matplotlib
matplotlib.use('Agg')  # Use non-interactive backend to avoid display issues
import matplotlib.pyplot as plt

# Create a sample histogram dictionary
hist_dict = {
    'category_a': 10,
    'category_b': 20,
    'category_c': 15,
    'category_d': 5
}

# Define arguments for plot_histogram_from_hist
ARGS = {
    'hist_dict': hist_dict,
    'normalize': True
}
Setup block drafted by
a language model, Claude Haiku 4.5, prompt python_fixture_v1, through the batch API
Imports
matplotlib — 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
preprocess_config Ran
ran; our contract draft was wrong, not the code
CognacS/flagg-graphgen/src/configurator.py
code served (permissive licence) · get_code("5d10bccfe016949a")
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 DictConfig. 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, DictConfig

# Create a DictConfig with the expected structure
# The function accesses cfg.hydra.runtime.choices and manipulates it
cfg = OmegaConf.create({
    'hydra': {
        'runtime': {
            'choices': {
                'db': 'mysql',
                'server': 'local'
            }
        }
    },
    'model': {
        'layers': 3,
        'hidden_dim': 64
    },
    'train': {
        'lr': 0.001,
        'epochs': 10
    }
})

ARGS = {
    'cfg': cfg
}
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 DictConfig — a DictConfig output has no array shape of its own; none is stated — the instrument coerces any output to an array; for a DictConfig output the recorded ndim 1 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
repeat_interleave_patched Ran
ran; our contract draft was wrong, not the code
CognacS/flagg-graphgen/src/monkey_patches.py
code served (permissive licence) · get_code("f89a5d11331554b7")
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 (3, 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

torch.manual_seed(0)

# Create a small input tensor
input_tensor = torch.randn(2, 4)

# Create repeats as a tensor
repeats_tensor = torch.tensor([1, 2], dtype=torch.long)

# dim parameter
dim = 0

ARGS = {
    "input": input_tensor,
    "repeats": repeats_tensor,
    "dim": dim
}
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 (3, 4) — shape (3, 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
run_cmd Ran
ran; our contract draft was wrong, not the code
CognacS/flagg-graphgen/auto_script.py
code served (permissive licence) · get_code("af53f7d96fa64b66")
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 subprocess
import time
import tempfile
import os

# Create a temporary file for output
temp_output = tempfile.NamedTemporaryFile(mode='w', delete=False, suffix='.txt')
output_file = temp_output.name
temp_output.close()

try:
    # Construct arguments for run_cmd
    cmd = ['python', '-c', 'print("Hello, World!")']
    output = output_file
    timeout = 5
    
    ARGS = {
        'cmd': cmd,
        'output': output,
        'timeout': timeout
    }
finally:
    # Clean up temp file after defining ARGS
    if os.path.exists(output_file):
        try:
            os.remove(output_file)
        except:
            pass
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 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
run_parallel Ran
ran; our contract draft was wrong, not the code
CognacS/flagg-graphgen/auto_script.py
code served (permissive licence) · get_code("246dc66384af4bd5")
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 subprocess
import tempfile
import os

# Create temporary directory for output files
temp_dir = tempfile.mkdtemp()

# Define commands to run in parallel
commands = [
    ['python', '-c', 'print("Hello from command 1")'],
    ['python', '-c', 'print("Hello from command 2")'],
    ['python', '-c', 'import time; time.sleep(0.5); print("Command 3 done")'],
]

# Define output file paths for each command
outputs = [
    os.path.join(temp_dir, 'output_1.txt'),
    os.path.join(temp_dir, 'output_2.txt'),
    os.path.join(temp_dir, 'output_3.txt'),
]

ARGS = {
    'commands': commands,
    'outputs': outputs,
    'max_workers': 2,
    'timeout': 30,
}
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 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
setup_logger Ran
ran; our contract draft was wrong, not the code
CognacS/flagg-graphgen/src/configurator.py
code served (permissive licence) · get_code("b3bc302e0edef088")
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

ARGS = {
    'logger': logging.INFO
}
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
values_to_hist_dict Ran
ran; our contract draft was wrong, not the code
CognacS/flagg-graphgen/src/analysis/distributions.py
code served (permissive licence) · get_code("b398ac4511c6de6f")
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
import numpy as np

torch.manual_seed(0)

# The function takes a value_list and counts occurrences of each value
# It uses: iteration over value_list, membership testing (v in hist_dict),
# and dictionary operations (assignment, increment)
# Values should be hashable types that can be used as dict keys

value_list = [1, 2, 2, 3, 3, 3, 1, 4, 4]

ARGS = {
    "value_list": value_list
}
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 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_colors_map Not yet run
unverified (harvested, no recorded run)
CognacS/flagg-graphgen/src/analysis/visualization.py
code served (permissive licence) · get_code("6ceaf5f03bb1de1d")
How it ran

no invocation recorded.

nodes_map_fn Not yet run
unverified (harvested, no recorded run)
CognacS/flagg-graphgen/src/analysis/visualization.py
code served (permissive licence) · get_code("a2cf30647acf10ab")
How it ran

no invocation recorded.

Also present in other papers' code

Of 13 samples lifted from this paper's linked repositories, 13 carry a function identity and 0 do not. Of the 13 distinct functions with an identity, 0 are also present in other papers whose code we hold (0 with at least one paper dated earlier, 0 the same month, 0 later) and 13 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.

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

The Deep Graph Generation's panorama spans two extremes: one-shot and sequential models. The former generates nodes and edges jointly, while the latter samples them autoregressively. Each method performs better in different graph domains depending on size and topology, but neither is applicable to all graph categories. For instance, one-shot methods struggle with generating large graphs, while sequential methods underperform on smaller graphs. A possible way to overcome these limitations is to flexibly combine the two methods in a unique system. In this work, we propose the FLAGG (Flexible Autoregressive Graph Generation) framework, which sequentially generates portions of graphs with oneshot models. FLAGG can apply any one-shot model to make it autoregressive, allowing flexibility in choosing the sequential policy. This policy is specified through a stochastic node removal process, which an Insertion Model learns to reverse. We evaluate FLAGG with the DiGress one-shot model on several data sets of different graph sizes and domains. We show that the approach outperforms both one-shot and autoregressive baselines in terms of sampling quality.

For agents

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

get_harvested_code_for_paper("2606.05067")
get_code_for_paper("2606.05067")
have("2606.05067")

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

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

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

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

Connect an agent — have() is free.