SKE-Layout: Spatial Knowledge Enhanced Layout Generation with LLMs

Junsheng Wang, Nieqing Cao, Yan Ding, Mengying Xie, Fuqiang Gu, Chao Chen

Abstract

Large Language Models (LLMs) have shown remarkable capabilities in following general instructions but often falter when tasked with fine-grained spatial reasoning. SKE-Layout is a novel framework that addresses these limitations by integrating a hybrid knowledge base with a specialized contrastive retrieval system. By leveraging both real-world and synthetic data, SKE-Layout enables LLMs to move beyond "hallucinated" placements toward precise, coordinate-based spatial reasoning for robotics and image generation. Our evaluation shows significant performance gains, with success rate improvements ranging from 5% to 30% over state-of-the-art baselines.

Introduction

While LLMs are proficient at high-level task planning, they struggle with the precise geometric requirements of spatial layouts. For instance, an instruction to "place a cup 10cm to the left of a plate at a 30-degree angle" often results in coordinates that are physically impossible or semantically nonsensical. Existing Retrieval-Augmented Generation (RAG) methods attempt to mitigate this by providing examples, but they are hampered by three primary challenges: data scarcity for complex layouts, object bias in standard text-embedding models (which prioritize object identity over spatial relationships), and domain silos between 2D image generation and 3D robotic manipulation.

Methods

SKE-Layout introduces a unified approach to spatial reasoning through several key innovations:

  1. Hybrid Knowledge Base Construction: The system extracts spatial data from real-world images using Vision-Language Models (VLMs) and Detection Transformers (DETR). To address data scarcity, it utilizes LLMs to generate synthetic scenarios for rare instructions, which are then validated for accuracy.
  2. Instance-Wise Contrastive Learning: To eliminate "object bias," the authors developed a custom embedding model. By replacing specific object names with placeholders (e.g., "Object A") during training, the model is forced to prioritize geometric relationships over object identities.
  3. Multi-Task Learning Strategy: SKE-Layout employs a unified embedding space for both 2D and 3D tasks, allowing the model to leverage commonalities in spatial language across different domains.
  4. Unified Layout Representation: Objects are represented as standardized tuples: $o = (\text{id}, c, x, y, z, w, h, d, \theta)$, encompassing identity, color, position, dimensions, and rotation.
The SKE-Layout framework overview, illustrating the pipeline from knowledge extraction to layout planning and simulation.

Experimental Results

The researchers evaluated SKE-Layout across three benchmarks: NSR-1K (text-to-image), StructFormer (robotic rearrangement), and a newly introduced SK-Dataset featuring complex geometric and semantic shapes.

In robotic tasks, SKE-Layout demonstrated substantial improvements over baselines like LayoutGPT and LLM-GROP. Specifically, it outperformed the state-of-the-art by 30% on "Tower" tasks and 20% on "Circle" and "Line" tasks. On the challenging SK-Dataset, SKE-Layout achieved a 75.1% success rate on simple tasks and significantly outperformed LLM-GROP on complex "Semantic Geometric Shapes" (21.7% vs. 4.5%).

Success rate comparison between SKE-Layout (Ours) and baselines across various robotic rearrangement tasks.

Conclusion

SKE-Layout demonstrates that prioritizing spatial geometry over object identity is critical for effective layout generation. By combining retrieval-augmented generation with synthetic data engines and contrastive learning, the framework provides a versatile solution for both 2D and 3D spatial tasks. Future work will focus on addressing open-domain challenges and bridging the gap between simulated environments and real-world robotic deployment where sensor noise and physical uncertainties are prevalent.

Summary updated

BibTeX
@inproceedings{wang2025ske,
  author = {Junsheng Wang and Nieqing Cao and Yan Ding and Mengying Xie and Fuqiang Gu and Chao Chen},
  title = {{SKE-Layout: Spatial Knowledge Enhanced Layout Generation with LLMs}},
  booktitle = {IEEE/CVF Conference on Computer Vision and Pattern Recognition},
  year = {2025},
  doi = {10.1109/cvpr52734.2025.01808},
}
Figure