SYNTOLOGY HomeExplorerAtlasCodeMethodologyAboutDevelopersFeedPricing
Paper · 2411.02322 · ICLR · 2025

LayerDAG: A Layerwise Autoregressive Diffusion Model for Directed Acyclic Graph Generation

Eli Chien, Pan Li, Ying Zhang, Mufei Li, Viraj Shitole, Changhai Man, Zhaodong Wang, Srinivas Sridharan

arXiv · PDF · Open in the Atlas

Code that ran

3 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; 0 honoured the contract we drafted, 0 violated it and 0 have no contract verdict; 3 failures of our instrument; 3 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/2411.02322.json · badge: /api/ran/2411.02322.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
Graph-COM/LayerDAG canonical (classifier label)
classifier basis: census
3 ran · 3 no recorded run
FunctionStatusWhere it lives
collate_common Ran
ran; our contract draft was wrong, not the code
Graph-COM/LayerDAG/src/dataset/layer_dag.py
code served (permissive licence) · get_code("27319bb0981452fb")
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

torch.manual_seed(0)

# Construct a batch of 2 graphs with different numbers of nodes
batch_size = 2

# Graph 0: 3 nodes, 2 edges
# Graph 1: 4 nodes, 3 edges

# Source and destination indices for edges (before cumsum adjustment)
src = [
    torch.tensor([0, 1], dtype=torch.long),  # edges in graph 0
    torch.tensor([0, 1, 2], dtype=torch.long),  # edges in graph 1
]

dst = [
    torch.tensor([1, 2], dtype=torch.long),  # edges in graph 0
    torch.tensor([1, 2, 3], dtype=torch.long),  # edges in graph 1
]

# Node features: list of tensors, one per graph
# Graph 0: 3 nodes with feature dim 4
# Graph 1: 4 nodes with feature dim 4
x_n = [
    torch.randint(0, 10, (3, 4), dtype=torch.long),
    torch.randint(0, 10, (4, 4), dtype=torch.long),
]

# Absolute level: list of tensors, one per graph
abs_level = [
    torch.tensor([0.0, 1.0, 2.0], dtype=torch.float),
    torch.tensor([0.0, 1.0, 2.0, 3.0], dtype=torch.float),
]

# Relative level: list of tensors, one per graph
rel_level = [
    torch.tensor([0.0, 0.5, 1.0], dtype=torch.float),
    torch.tensor([0.0, 0.33, 0.67, 1.0], dtype=torch.float),
]

ARGS = {
    "src": src,
    "dst": dst,
    "x_n": x_n,
    "abs_level": abs_level,
    "rel_level": rel_level,
}
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 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
collate_fn Ran
ran; our contract draft was wrong, not the code
Graph-COM/LayerDAG/src/eval/discriminator/data_utils.py
code served (permissive licence) · get_code("90d42e86447a074b")
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

torch.manual_seed(0)

# Construct sample data items for a batch
# Each item should be: (batch_src, batch_dst, batch_x_n, batch_label)
# where:
# - batch_src: edge source indices tensor
# - batch_dst: edge destination indices tensor  
# - batch_x_n: node features tensor
# - batch_label: scalar label

data_item_1 = (
    torch.tensor([0, 1], dtype=torch.long),  # batch_src
    torch.tensor([1, 0], dtype=torch.long),  # batch_dst
    torch.randn(2, 4),  # batch_x_n (2 nodes, 4 features)
    1  # batch_label
)

data_item_2 = (
    torch.tensor([0, 1, 2], dtype=torch.long),  # batch_src
    torch.tensor([1, 2, 0], dtype=torch.long),  # batch_dst
    torch.randn(3, 4),  # batch_x_n (3 nodes, 4 features)
    0  # batch_label
)

# Create a list of data items to pass to collate_fn
data = [data_item_1, data_item_2]

ARGS = {
    "data": data
}
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 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
load_yaml Ran
ran; our contract draft was wrong, not the code
Graph-COM/LayerDAG/setup_utils.py
code served (permissive licence) · get_code("3a54c41960ac921e")
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 tempfile
import os
import yaml
import pydantic
from typing import Optional

torch_imported = False
try:
    import torch
    torch_imported = True
    torch.manual_seed(0)
except ImportError:
    pass

# Create a temporary YAML config file
yaml_config = {
    "general": {
        "dataset": "test_dataset",
        "conditional": True,
        "patience": 10
    },
    "node_count": {
        "loader": {
            "batch_size": 32,
            "num_workers": 2
        },
        "model": {
            "x_n_emb_size": 64,
            "pe_emb_size": 32,
            "y_emb_size": 16,
            "num_mpnn_layers": 3,
            "pool": "mean",
            "pe": "laplacian"
        },
        "num_epochs": 100,
        "optimizer": {
            "lr": 0.001,
            "amsgrad": True
        }
    },
    "node_pred": {
        "T": 5,
        "loader": {
            "batch_size": 32,
            "num_workers": 2
        },
        "num_epochs": 50,
        "graph_encoder": {
            "x_n_emb_size": 64,
            "pe_emb_size": 32,
            "y_emb_size": 16,
            "num_mpnn_layers": 3,
            "pool": "mean",
            "pe": "laplacian"
        },
        "predictor": {
            "t_emb_size": 16,
            "out_hidden_size": 128,
            "num_transformer_layers": 2,
            "num_heads": 4,
            "dropout": 0.1
        },
        "optimizer": {
            "lr": 0.001,
            "amsgrad": True
        }
    },
    "edge_pred": {
        "T": 5,
        "loader": {
            "batch_size": 32,
            "num_workers": 2
        },
        "num_epochs": 50,
        "graph_encoder": {
            "x_n_emb_size": 64,
            "pe_emb_size": 32,
            "y_emb_size": 16,
            "num_mpnn_layers": 3,
            "pool": "mean",
            "pe": "laplacian"
        },
        "predictor": {
            "t_emb_size": 16,
            "out_hidden_size": 128
        },
        "optimizer": {
            "lr": 0.001,
            "amsgrad": True
        }
    }
}

# Write to temporary file
temp_dir = tempfile.mkdtemp()
config_file_path = os.path.join(temp_dir, "config.yaml")
with open(config_file_path, 'w') as f:
    yaml.dump(yaml_config, f)

ARGS = {
    "config_file": config_file_path
}
Setup block drafted by
a language model, Claude Haiku 4.5, prompt python_fixture_v1, through the batch API
Imports
pydantic, torch, yaml — 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
collate_node_count Not yet run
unverified (harvested, no recorded run)
Graph-COM/LayerDAG/src/dataset/layer_dag.py
code served (permissive licence) · get_code("4ad453dd726c4d73")
How it ran

no invocation recorded.

collate_node_pred Not yet run
unverified (harvested, no recorded run)
Graph-COM/LayerDAG/src/dataset/layer_dag.py
code served (permissive licence) · get_code("ee2dd78c575b65e0")
How it ran

no invocation recorded.

to_dag_dataset Not yet run
unverified (harvested, no recorded run)
Graph-COM/LayerDAG/src/dataset/tpu_tile.py
code served (permissive licence) · get_code("d576b3a5bc3c105c")
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, 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 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.

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

Directed acyclic graphs (DAGs) serve as crucial data representations in domains such as hardware synthesis and compiler/program optimization for computing systems. DAG generative models facilitate the creation of synthetic DAGs, which can be used for benchmarking computing systems while preserving intellectual property. However, generating realistic DAGs is challenging due to their inherent directional and logical dependencies. This paper introduces LayerDAG, an autoregressive diffusion model, to address these challenges. LayerDAG decouples the strong node dependencies into manageable units that can be processed sequentially. By interpreting the partial order of nodes as a sequence of bipartite graphs, LayerDAG leverages autoregressive generation to model directional dependencies and employs diffusion models to capture logical dependencies within each bipartite graph. Comparative analyses demonstrate that LayerDAG outperforms existing DAG generative models in both expressiveness and generalization, particularly for generating large-scale DAGs with up to 400 nodes-a critical scenario for system benchmarking. Extensive experiments on both synthetic and real-world flow graphs from various computing platforms show that LayerDAG generates valid DAGs with superior statistical properties and benchmarking performance. The synthetic DAGs generated by LayerDAG enhance the training of ML-based surrogate models, resulting in improved accuracy in predicting performance metrics of real-world DAGs across diverse computing platforms. Our implementation is available at https://github.com/Graph-COM/LayerDAG.

For agents

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

get_harvested_code_for_paper("2411.02322")
get_code_for_paper("2411.02322")
have("2411.02322")

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

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

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

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

Connect an agent — have() is free.