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.
Figures & tables
Figure 1. We propose Co-DSL , a framework that helps LLMs generate spatial layouts that align with a user’s intent. In the first stage (left), a user collaborates with an LLM to co-design reusable spatial concepts, providing high-level feedback until each concept behaves as intended. In the second stage (right), given a new layout request, the LLM authors a program that composes library concepts. Using Co-DSL , we find that LLMs can author parameterized layout programs, where different parameterizations instantiate concept-graphs that generate different layouts, letting the user explore design variations without re-prompting.
Figure 2. Overview of Co-DSL . During concept co-design (left), a user comes up with concept specifications and then collaborates with an LLM to co-design a library of spatial concepts. During layout generation (right), we prompt an LLM to author a layout program from a text description. Layout programs compose library concepts together to form concept-graphs, which we can solve to find a layout that satisfies the constraints induced by the high-level concepts.
Figure 3. Co-DSL concepts and concept-graphs. ( Left ): each concept is implemented as a parameterized Group or Relation class with dual execution modes: synthesis logic transforms an input layout into an output layout, and verification logic checks whether a static layout satisfies the concept’s semantics. ( Right ): executing a layout program instantiates a concept-graph, a declarative specification of which concepts should hold over which entities. A solver searches for a layout satisfying this specification, treating layouts from child graphs as single units within their parent.
Figure 4. Co-designing a concept. The user starts with a concept specification (left), which the LLM uses to initialize the concept. The user then navigates diagnostic views to inspect the concept’s behavior. The interface view shows the class definition, the scenario view shows application scenarios, the synthesis view shows Synthesis() transformations, and the verification view shows Verification() predictions. The user can provide feedback from any view to guide the LLM in making revisions. We show an example guidance sequence a user might provide while developing a Surround Relation (see Section 4.1 ).
Figure 5. Concept libraries co-designed with Co-DSL . We visualize representative concepts across our evaluation domains. Each domain highlights one concept: we provide a summary of its intent, a subset of its exposed parameters, and show how varying those parameters allows for diverse layout generation.
Figure 6. Encoding spatial patterns as reusable concepts. Each row shows a representative concept from one of our five evaluation domains, including its description and layouts approved by the user during co-design. For two new prompts requesting the pattern, we compare layouts generated by PSDL, Holodeck, and Co-DSL . PSDL and Holodeck receive the user’s concept description as part of the prompt, while Co-DSL uses the co-designed library concept. The w/o user guidance condition instead uses the concept implementation initially produced by the LLM, before the user provides feedback. PSDL and Holodeck do not support bookshelf arrangements or 3D shape assemblies, which are marked as unsupported.
Figure 7. Physical validity versus prompt adherence. For each method we plot the percentage of generations that pass all base validity checks (X-axis) against the percentage of explicitly requested constraints judged satisfied (Y-axis) on the standard prompts from the bedroom, dining, and living-room domains. We compare Co-DSL against recent LLM program synthesis baselines that use fixed operation sets (PSDL, Holodeck) and ablated versions of our method (triangle markers). The star (top-right corner) marks ideal task performance.
Figure 8. Generating layout programs from text. We qualitatively compare Co-DSL against: ( top ) baselines that use LLMs to author programs with fixed operation sets (Holodeck ( Yang et al., 2024 ) and PSDL ( Gumin et al., 2025 ) ); ( bottom ) ablated versions of Co-DSL that remove LLM program repair, concept-graphs, and concept libraries. We observe Co-DSL produces more coherent layouts that better respect library concept semantics, adhere better to prompt specifications, and remain physically valid. We mark violations with red circles.
Method
Solved% ↑
Error ↓
Violations ↓
Time ↓
Co-DSL w/o hierarchy
73
1.02
0.320
5.9
Co-DSL w/o LLM correction
35
3.52
0.975
12.2
Co-DSL w/o solver repair
48
1.52
0.285
13.1
Co-DSL w/o verification
13
3.22
0.238
4.7
Co-DSL
81
0.28
0.065
4.3
Table 1. Ablations on concept composition. We report how often each variant finds a layout that satisfies the generated concept-graph, how much error is incurred in the best found layout, the number of base validity check violations, and the time taken for each search. We describe the ablation conditions in Section 6.4 .
Figure 9. Concept evolution through co-design. We show the trajectories of two concepts developed by participants in our user study (Section 6.5 ). Each column illustrates the concept’s execution behavior on an application scenario: synthesis transforms the input layout (top) into the output layout (bottom), while marks next to each verification version record its vote on the synthesized layout. The leftmost column shows the initial LLM implementation, while the rightmost shows the final version approved by the participant. Between columns, we summarize the user-provided feedback which drove the LLM to modify the implementation.
Figure 10. Generative layout programs. We show examples of LLM authored generative layout programs with Co-DSL concepts. Each layout program exposes a parameterized interface that supports design exploration. Changing program parameters produces related layout variations from a single authored program, highlighting the control and diversity afforded by our approach.
Figure 11. Extending a concept library. Each domain panel shows two prompts (left) which require a spatial pattern. The initial library is not able to represent the pattern ( Init Lib ), but after the user co-designs a new concept, adding it to the library ( + concept ) produces improved layouts.
Appendix figures & tables10 assets
Supplementary material from the paper’s appendix.
Appendix
Figure 12. Structured layout domains. For each domain, we show an example layout rendered by the domain’s structured logic (top) and as a 3D Blender scene using our final rendering pipeline (bottom).
Figure 13. Qualitative comparison of Co-DSL against FlairGPT ( Littlefair et al., 2025 ) and LayoutVLM ( Sun et al., 2025 ) on bedrooms, living rooms, and dining arrangements. Each row shows a prompt and the layout produced by each method.
Figure 14. Failure modes of scenes generated by Co-DSL . Unsatisfiable (left): the LLM writes a program whose concept-graphs admit no valid placement. Graph solved, bad layout (right): the solver finds a satisfying layout, but the scene violates implicit expectations that no constraint in the graph captures.
Method
Living
Bedroom
Dining
Bookshelf
Chair
Holodeck
1.55 | 37.5%
2.08 | 22.5%
2.55 | 22.5%
–
–
PSDL
1.52 | 42.5%
0.72 | 55.0%
0.33 | 90.0%
–
–
Co-DSL w/o user guidance
1.38 | 37.5%
0.25 | 77.5%
2.35 | 60.0%
0.00 | 100%
0.10 | 95.0%
Co-DSL w/o graph
2.60 | 15.0%
1.74 | 36.8%
6.94 | 38.9%
2.63 | 68.4%
0.35 | 95.0%
Co-DSL w/o concepts
1.68 | 26.3%
1.85 | 15.0%
8.25 | 35.0%
2.95 | 35.0%
0.05 | 95.0%
Co-DSL
0.00 | 100%
0.00 | 100%
0.03 | 97.5%
0.00 | 100%
0.00 | 100%
Appendix
Table 2. Base validity of layouts generated from LLM authored layout programs. Each entry gives the average number of validity-check violations per layout ( ↓ ) followed by the percentage of layouts that are valid ( ↑ ). Dashes indicate that the method does not produce layouts for that domain.
Method
Living
Bedroom
Dining
All
Holodeck
27.8
27.3
8.3
19.4
PSDL
79.0
86.4
84.8
83.5
Co-DSL w/o user guidance
77.8
85.7
89.1
84.8
Co-DSL w/o graph
74.1
93.0
84.3
83.5
Co-DSL w/o concepts
90.8
90.9
93.9
92.2
Co-DSL
83.3
95.5
92.2
90.5
Appendix
Table 3. Prompt adherence. We report the percent of explicitly requested prompt constraints judged satisfied (Section D.4 ).
Domain
Co-DSL
PSDL
No preference
Living
50.0
33.3
16.7
Bedroom
76.7
11.7
11.7
Dining
58.3
13.3
28.3
Appendix
Table 4. Human perceptual study. For each domain, we report the percentage of responses in which raters preferred the Co-DSL layout, preferred the PSDL layout, or expressed no preference, with three raters and 20 pairs per rater in each domain (60 responses per domain).
Domain
Concept
Co-DSL
w/o guidance
PSDL
Holodeck
Bedroom
CornerBedGroup
2/2
0/2
1/2
0/2
Bedroom
CentralBedGroup
2/2
1/2
0/2
0/2
Bedroom
DeskGroup
2/2
0/2
0/2
0/2
Dining
RectTableLayout
2/2
0/2
0/2
0/2
Dining
CircularTableLayout
2/2
2/2
0/2
0/2
Dining
Surround
2/2
0/2
1/2
0/2
Appendix
Table 5. Concept-adherence expert analysis. For each concept and method, we report the number of generated layouts that the expert judged to respect the concept’s semantics.
Domain
Method
Valid exec. (%)
Adherence (%)
Valid across range (%)
Living
PSDL
36.7
84.5
20.0
Co-DSL
96.1
80.2
84.2
Bedroom
PSDL
70.0
84.7
35.0
Co-DSL
99.2
81.4
90.0
Dining
PSDL
36.2
82.1
10.0
Co-DSL
85.0
86.8
75.0
Appendix
Table 6. Generative layout programs by domain. ‘Valid executions’ is the percentage of completed executions with zero base validity violations. ‘Adherence’ is the percentage of object-based and control constraints judged satisfied. ‘Valid across range’ is the percentage of authored programs for which every execution is valid.
Figure 17. Best layout found for the first program. Each copied spoon overlaps its placemat.
Figure 20. Layout produced by the repaired program: structured render (left) and final render (right).
Understanding and generating spatially coherent layouts from natural language remains a fundamental yet challenging task for large language models (LLMs). Existing LLMs often struggle to capture explicit geometric relationships and structural dependencies between objects. To address this issue, we propose SG-Layout, a graph-guided layout generation framework that explicitly incorporates structured spatial knowledge into LLMs. SG-Layout follows a two-stage training paradigm: (1) a graph-language feature alignment stage, where a relational graph encoder and a projector are trained to map scene-graph embeddings into the LLM's linguistic space; and (2) an instruction tuning stage, where LoRA-based adapters enable efficient fine-tuning for instruction-driven layout generation while keeping the backbone frozen. We evaluate SG-Layout on image layout generation, indoor scene synthesis and robotic object rearrangement tasks. Experimental results show that SG-Layout improves spatial reasoning accuracy and geometric consistency over the compact open-source backbone, with particularly clear advantages in relation-dense and compositionally complex scenes. These results highlight the effectiveness of graph-structured feature alignment for enhancing controllable layout generation.
Indoor scene layout generation is a challenging task in interior design. Existing methods often oversimplify the task by reducing room conditions to coarse 3D bounding boxes and neglecting structural elements such as doors and windows. More fundamentally, many prior approaches formulate spatial reasoning as direct coordinate prediction, thereby casting interior layout design as continuous regression over raw geometric parameters, which hinders the model from learning the underlying reasoning logic of intelligent layout design. We propose LayoutDSL, a novel LLM-based framework for learning an interior layout policy in a domain-specific language (DSL) action space. The DSL provides an explicit symbolic representation of layout information and serves as a structured action space for layout reasoning, where each action corresponds to an interpretable design decision. Under this DSL-based policy learning paradigm, we construct 3D-FrontDSL, a dataset of room-structure annotations paired with synthetic DSL action sequences for supervised fine-tuning. To promote a more generalizable and scalable policy with verifiable feedback, we design rewards grounded in interior design principles and physical plausibility, and optimize the policy via reinforcement learning. Extensive experiments demonstrate that LayoutDSL substantially improves spatial plausibility and design logicality over strong baselines and existing methods.
In architectural interior design, miscommunication frequently arises as clients lack design knowledge, while designers struggle to explain complex spatial relationships, leading to delayed timelines and financial losses. Recent advancements in generative layout tools narrow the gap by automating 3D visualizations. However, prevailing methodologies exhibit limitations: rule-based systems implement hard-coded spatial constraints that restrict participatory engagement, while data-driven models rely on extensive training datasets. Recent large language models (LLMs) bridge this gap by enabling intuitive reasoning about spatial relationships through natural language. This research presents an LLM-based, multimodal, multi-agent framework that dynamically converts natural language descriptions and imagery into 3D designs. Specialized agents (Reference, Spatial, Interactive, Grader), operating via prompt guidelines, collaboratively address core challenges: the agent system enables real-time user interaction for iterative spatial refinement, while Retrieval-Augmented Generation (RAG) reduces data dependency without requiring task-specific model training. This framework accurately interprets spatial intent and generates optimized 3D indoor design, improving productivity, and encouraging nondesigner participation. Evaluations across diverse floor plans and user questionnaires demonstrate effectiveness. An independent LLM evaluator consistently rated participatory layouts higher in user intent alignment, aesthetic coherence, functionality, and circulation. Questionnaire results indicated 77% satisfaction and a clear preference over traditional design software. These findings suggest the framework enhances user-centric communication and fosters more inclusive, effective, and resilient design processes. Project page: https://rsigktyper.github.io/AICodesign/
Ren Jian Lim, Rushi Dai
Hong Kong Center for Construction Robotics, The Hong Kong University of Science and Technology