Co-DSL: Human-LLM Co-design of Reusable Spatial Concepts for Layout Generation

R. Kenny Jones Jiajun Wu Maneesh Agrawala

Stanford University

BibTeX
@misc{jones2026codsl,
  title={Co-DSL: Human-LLM Co-design of Reusable Spatial Concepts for Layout Generation},
  author={R. Kenny Jones and Jiajun Wu and Maneesh Agrawala},
  year={2026},
  eprint={2610.15290},
  archivePrefix={arXiv},
  primaryClass={cs.GR},
  url={https://arxiv.org/abs/2610.15290},
}
Abstract

We present Co-DSL, a framework in which users and LLMs co-design reusable spatial concepts for layout generation. In the first stage, our system allows users to create a library of personalized operations. To add a concept, a user provides a description, which the LLM converts into an initial implementation. The user can then observe the concept's execution behavior over example scenarios and provide lightweight feedback to the LLM, which revises the concept's implementation logic. In the second stage, given a library, an LLM can author a layout program that meets a new layout request from a user. Executing a layout program instantiates a concept-graph, a declarative composition of library concepts. In this way, we require the LLM only to specify which concepts should hold, while we use a solver to search for a layout that satisfies them. Across five spatial layout domains, we find that Co-DSL libraries let LLMs capture layout patterns that are challenging for prior fixed-operation systems, and demonstrate that our concept-graph representation is needed for LLMs to reliably compose concepts together. We further find that Co-DSL lets LLMs author generative layout programs that expose high-level parametric controls users can manipulate to explore a distribution of related layouts without re-prompting.

Co-DSL has two stages

Co-DSL overview. Stage 1: a user writes concept specifications and co-designs them with an LLM into a concept library. Stage 2: from a layout prompt, the LLM writes a layout program that executes into a concept-graph, which is solved into a layout.

Stage 1: Concept co-design

The user identifies recurring concepts that would be useful in a target domain, such as mounting an object on a wall or arranging two sofas around a TV, and describes each one in natural language. The LLM implements each concept as an executable class. The user inspects the concept's execution behavior and provides feedback, which the LLM uses to revise the implementation until the behavior matches the user's intent.

Stage 2: Layout generation

Given a new prompt, the LLM writes a layout program that uses the co-designed library. Executing the program instantiates a concept-graph: a declarative specification of which concepts should hold over which entities. A solver searches for a layout that satisfies the graph. In this way, the LLM only needs to specify which concepts should hold, without worrying about how to schedule concept execution logic directly.

Results

We apply Co-DSL to five spatial layout domains: living rooms, bedrooms, dining arrangements, bookshelves, and chairs. We compare against two recent LLM layout systems that write programs over fixed, expert-designed operation sets: Holodeck and PSDL.

Encoding Spatial Patterns as Reusable Concepts

Each concept encodes a pattern that the user specified and approved during co-design. We ask each method to apply the pattern in new layouts. PSDL and Holodeck receive the user's description of the pattern in their prompt, while Co-DSL uses the co-designed library concept. The w/o user guidance condition uses the LLM's initial implementation of the concept, before any user feedback.

Take-away: Co-DSL reliably reuses co-designed concepts in new contexts, while fixed-operation methods often miss the intended pattern.

Generating Layout Programs from Text

We generate layouts from detailed text prompts in the bedroom, dining, and living-room domains, with every method using the same base LLM. Below, we compare layouts for prompts that request several interacting spatial relationships. Red circles mark constraints that a layout violates.

Prompt:

Across all prompts, we measure physical validity, the percentage of layouts in which no object is out of bounds, floating, or intersecting another object, and prompt adherence, the percentage of explicitly requested prompt constraints that an LLM judge marks as satisfied.

Scatter plots of physical validity against prompt adherence for the bedroom, dining, and living-room domains, comparing Co-DSL, PSDL, Holodeck, and two ablations.
Take-away: Co-DSL layouts are more often physically valid and better respect requested spatial relationships.

Generative layout programs

Beyond producing a single layout, a user may want to explore a space of related designs. With Co-DSL, an LLM can author generative layout programs, with interpretable parameters that support exploration. The user describes a scene together with the controls they want to expose, and the LLM returns a layout program whose arguments correspond to these controls. Once authored, the program can be executed under new parameter settings to produce design variations without re-prompting the LLM.

Prompt:

Parameter setting
Take-away: Co-DSL supports LLM-authored programs where changing parameters produces related layout variations without re-prompting.

Walkthrough of Concept Development