SYNTOLOGY HomeExplorerAtlasCodeMethodologyAboutDevelopersFeedPricing
Paper · 2006.14615 · 2020

LayoutTransformer: Layout Generation and Completion with Self-attention

arXiv · PDF · Open in the Atlas

Code that ran

4 of 5 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 4 have no contract verdict; 0 failures of our instrument; 1 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/2006.14615.json · badge: /api/ran/2006.14615.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
Layout-Generation/layout-generation community (classifier label)
classifier basis not recorded on the link
4 ran · 1 no recorded run
FunctionStatusWhere it lives
convert_to_cxywh Ran
ran on a synthesized input
Layout-Generation/layout-generation/LayoutGAN/Publaynet/utils.py
code served (permissive licence) · get_code("a489ec3e1f95074f")
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 3, dtype family float, shape (2, 3, 5) 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

# Analyze the function:
# - Takes 'data' parameter
# - Expects data to be numpy array with shape [..., N] where N >= 4
# - Extracts bboxes from last 4 columns: data[..., 0:4]
# - Extracts labels from remaining columns: data[..., 4:]
# - Performs operations expecting 3D array (batch, spatial, features)

# Create a small 3D numpy array
# Shape: (batch=2, grid=3, features=6)
# First 4 features are bbox coordinates (x, y, w, h)
# Last 2 features are class scores
batch_size = 2
grid_size = 3
num_bbox_features = 4
num_classes = 2

data = np.random.randn(batch_size, grid_size, num_bbox_features + num_classes).astype(np.float32)

# Ensure bboxes are reasonable values
data[..., 0:4] = np.random.uniform(0, 100, (batch_size, grid_size, 4))
# Class scores
data[..., 4:] = np.random.uniform(0, 1, (batch_size, grid_size, 2))

ARGS = {
    "data": data
}
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 ndarray, ndim 3, dtype family float, shape (2, 3, 5) — shape (2, 3, 5) 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
image_manifold_size Ran
ran on a synthesized input
Layout-Generation/layout-generation/LayoutGAN/MNIST/mnist_utils.py
code served (permissive licence) · get_code("436d0a89cc2125c0")
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, ndim 1, dtype family int; 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

# The function takes a single parameter: num_images
# It calculates manifold dimensions by taking floor and ceil of sqrt
# The assertion requires that manifold_h * manifold_w == num_images
# So num_images must be a perfect square or a product of floor(sqrt(n)) * ceil(sqrt(n))

# Valid examples:
# num_images=4: sqrt(4)=2.0, floor=2, ceil=2, 2*2=4 ✓
# num_images=6: sqrt(6)≈2.45, floor=2, ceil=3, 2*3=6 ✓
# num_images=9: sqrt(9)=3.0, floor=3, ceil=3, 3*3=9 ✓

num_images = 9

ARGS = {
    "num_images": num_images
}
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, ndim 1, dtype family int — a tuple 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
layout_bbox Ran
ran on a synthesized input
Layout-Generation/layout-generation/LayoutGAN/Publaynet/utils.py
code served (permissive licence) · get_code("a11ef6986b6257d6")
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 EagerTensor, ndim 4, dtype family float, shape (64, 4, 5, 5) 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 tensorflow as tf
import numpy as np

# Set seed for reproducibility
tf.random.set_seed(0)
np.random.seed(0)

# Create valid arguments for layout_bbox function
# The function expects:
# 1. final_pred: tensor that will be reshaped to [64, 9, 9]
# 2. output_height: integer for height
# 3. output_width: integer for width

# final_pred needs to have 64*9*9 = 5184 elements
# It contains bbox_reg (first 4 channels) and cls_prob (next 5 channels)
final_pred = tf.constant(np.random.randn(64, 9, 9).astype(np.float32))

output_height = 4
output_width = 5

ARGS = {
    'final_pred': final_pred,
    'output_height': output_height,
    'output_width': output_width
}
Setup block drafted by
a language model, Claude Haiku 4.5, prompt python_fixture_v1, through the batch API
Imports
numpy, tensorflow — import names as written, not package names to install; a name the repository itself provides is not a package
Returned
type EagerTensor, ndim 4, dtype family float, shape (64, 4, 5, 5) — shape (64, 4, 5, 5) 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
merge Ran
ran on a synthesized input
Layout-Generation/layout-generation/LayoutGAN/MNIST/mnist_utils.py
code served (permissive licence) · get_code("62cdfe4021abce05")
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 3, dtype family float, shape (4, 6, 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 numpy as np

# Create test images: shape (batch, height, width, channels)
# Using distinct sizes: batch=2, height=4, width=3, channels=3
images_rgb = np.random.rand(2, 4, 3, 3).astype(np.float32)

# Size parameter for merging: (rows, cols) in the output grid
size = (1, 2)

ARGS = {
    "images": images_rgb,
    "size": size,
}
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 ndarray, ndim 3, dtype family float, shape (4, 6, 3) — shape (4, 6, 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
layout_point Not yet run
unverified (harvested, no recorded run)
Layout-Generation/layout-generation/LayoutGAN/MNIST/mnist_utils.py
code served (permissive licence) · get_code("594808498a19482c")
How it ran

no invocation recorded.

Also present in other papers' code

Of 5 samples lifted from this paper's linked repositories, 5 carry a function identity and 0 do not. Of the 5 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 5 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

We address the problem of scene layout generation for diverse domains such as images, mobile applications, documents, and 3D objects. Most complex scenes, natural or human-designed, can be expressed as a meaningful arrangement of simpler compositional graphical primitives. Generating a new layout or extending an existing layout requires understanding the relationships between these primitives. To do this, we propose LayoutTransformer, a novel framework that leverages self-attention to learn contextual relationships between layout elements and generate novel layouts in a given domain. Our framework allows us to generate a new layout either from an empty set or from an initial seed set of primitives, and can easily scale to support an arbitrary of primitives per layout. Furthermore, our analyses show that the model is able to automatically capture the semantic properties of the primitives. We propose simple improvements in both representation of layout primitives, as well as training methods to demonstrate competitive performance in very diverse data domains such as object bounding boxes in natural images(COCO bounding box), documents (PubLayNet), mobile applications (RICO dataset) as well as 3D shapes (Part-Net). Code and other materials will be made available at https://kampta.github.io/layout.

For agents

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

get_harvested_code_for_paper("2006.14615")
get_code_for_paper("2006.14615")
have("2006.14615")

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

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

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

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

Connect an agent — have() is free.