FloorplanQA: A Benchmark for Spatial Reasoning in LLMs using Structured Representations

Paper · arXiv 2507.07644 · Published July 10, 2025
LLM Evaluations and Benchmarks

We introduce FloorplanQA*, a diagnostic benchmark for evaluating spatial reasoning in large language models (LLMs). FloorplanQA is grounded in structured representations of indoor scenes (e.g., kitchens, living rooms, bedrooms, bathrooms, and others), encoded symbolically in JSON or XML layouts. The benchmark covers core spatial tasks, including distance measurement, visibility, path finding, and object placement within constrained spaces. Our results across a variety of frontier open-source and commercial LLMs reveal that while models may succeed on shallow queries, they often fail to respect physical constraints and preserve spatial coherence, though they remain mostly robust to small spatial perturbations. FloorplanQA uncovers a blind spot in today’s LLMs: inconsistent reasoning about indoor layouts. We hope this benchmark inspires new work on language models that can accurately infer and manipulate spatial and geometric properties in practical settings.

Introduction. Recent progress in large language models (LLMs) has revealed strong capabilities in structured reasoning, yet spatial inference over plausible, physically feasible environments such as indoor layouts remains poorly understood. In numerous practical applications, including architectural design, assistive planning, and embodied interaction, spatial understanding is handled through structured formats such as JSON, in which objects are specified by position, size, and orientation, rather than through images. Reasoning in these contexts requires geometric inference over symbolic layouts, not pixel-level perception.

We introduce FloorplanQA, a benchmark to evaluate spatial reasoning in LLMs using 2D floorplans represented in structured text-based formats. Each instance consists of a symbolic (JSON-encoded) layout paired with natural language questions that require the model to reason about spatial and geometric aspects of the scene, compute distances, evaluate placement feasibility, assess visibility, and reason about spatial constraints. FloorplanQA isolates symbolic spatial reasoning over inputs that mirror the abstractions used by designers, architects, and agents operating in structured environments. In contrast to many layout benchmarks that focus on qualitative relations or output realism, FloorplanQA emphasizes geometric consistency under explicit metric, clearance, and collision constraints.

Although LLMs can increasingly be used in tool-assisted pipelines, for example, to invoke spatial solvers or generate code, this work focuses on models’ direct, unaided reasoning capabilities. FloorplanQA is designed to probe what LLMs can infer from structured input alone, without relying on external computation or visual grounding, in order to measure their unassisted capabilities. This baseline is important because even in tool-rich systems, models benefit from some unaided spatial ability to anticipate outputs and avoid trivial errors.

Specifically, our contributions are as follows:

• We introduce a dataset of 2,000 structured 2D layouts, including 200 layouts sourced from the Habitat Synthetic Scenes Dataset (HSSD) (Khanna et al., 2023) based on real floorplans, and 600 each from synthetically generated kitchens, living rooms, and bedrooms. All are represented in JSON and paired with spatial reasoning questions.

• We provide a diverse suite of 16,000 spatial reasoning questions, eight questions per layout, covering geometric relations, placement feasibility, spatial occupancy, and navigation.

• We establish structured evaluation protocols and scoring metrics that enable a fine-grained diagnosis of reasoning performance by task type and error mode.

• We conduct a comparative analysis of 15 LLMs, including 7 reasoning-focused models, as well as 8 standard models, revealing consistent failure patterns in spatial inference from symbolic input.

Related work. Prior benchmarks have explored spatial reasoning across vision and language domains. CLEVR (Johnson et al., 2016) is a synthetic visual question answering dataset designed to test compositional reasoning, including basic spatial relations. In real-world settings, SpatialSense (Yang et al., 2019) focuses on recognizing spatial relations in images through adversarially mined examples. Benchmarks like BabyAI (Chevalier-Boisvert et al., 2018), ALFRED (Shridhar et al., 2019), and Room-to-Room (R2R) (Anderson et al., 2017) integrate spatial understanding into embodied tasks, requiring agents to follow instructions involving navigation and object manipulation in simulated environments. Recent datasets such as ScanQA (Azuma et al., 2021) and 3DSR- Bench (Ma et al., 2024a) extend spatial reasoning evaluation into 3D environments, emphasizing the need for models to comprehend and reason about spatial relationships in three dimensions.

Vision-language models have advanced spatial reasoning but often handle it qualitatively. The VQA dataset (Agrawal et al., 2015) challenges models to answer questions about images, while VL-T5 (Cho et al., 2021) unifies vision-andlanguage tasks via text generation. Recent work on 3D scene graphs (Armeni et al., 2019) introduces structured representations of environments, facilitating spatial reasoning. However, these approaches may miss fine-grained geometric details necessary for precise spatial inference. Efforts like SpatialVLM (Chen et al., 2024) aim to endow visionlanguage models with enhanced spatial reasoning capabilities, addressing some of these limitations.

Advancements in generative models have also contributed to spatial reasoning tasks. LayoutGPT (Feng et al., 2023) leverages large language models for compositional visual planning and layout generation, while Holodeck (Yang et al., 2023) enables language-guided generation of 3D embodied AI environments. Similarly, AnyHome (Wen et al., 2023) focuses on open-vocabulary generation of structured and textured 3D homes, highlighting the integration of language Evaluations of large language models’ spatial understanding have been conducted in studies like Evaluating Spatial Understanding of Large Language Models (Yamada et al., 2023), which assesses spatial reasoning through natural language descriptions of qualitative relations (e.g., ”left of,” ”above”), without numeric coordinates or metric computation. Additionally, benchmarks such as BALROG (Paglieri et al., 2024) test agentic reasoning in game environments (NetHack, BabyAI, etc.), where spatial reasoning emerges implicitly through sequential navigation commands rather than explicit geometric inference.

Method. We aim to create a benchmark based on floorplan datasets, with some critical requirements; first, they need to be publicly accessible, and second, they need to include furnishings (couches, tables, chairs, etc) at a minimally plausible level. These requirements matter because FloorplanQA’s questions require object-level geometry (sizes, orientations, clearances), and we need a dataset that others can actually obtain, so that results are reproducible. In practice, we were unable to find a dataset that meets these requirements, as several prominent datasets, such as SUNCG (Song et al., 2016) and HouseExpo (Li et al., 2019), are not accessible due to unresolved copyright claims. Other large-scale resources—including 3D-FRONT (Fu et al., 2021), Struc- We incorporated 200 layouts extracted from HSSD (Khanna et al., 2023). HSSD provides 211 high-quality, humanauthored 3D scenes populated with 18,656 objects across 466 semantic categories. Unlike purely procedural datasets, HSSD offers fine-grained semantics, 3D assets, and close correspondence to real interiors, making it an effective proxy for real-world interior layouts. Decorative or auxiliary objects (e.g., vases, plants, cushions, artworks, posters, bottles, shoes, candles) are removed to reduce clutter; see Appendix C for the full details. The original data is 3D, so we project each 3D scene to a 2D floor plan. This can result in dense polygons for each asset (repeated points, points on straight lines, excessive tokens), which would confound our ability to test 2D geometric reasoning, so we use the Douglas-Peucker algorithm (Douglas & Peucker, 1973) with ε = 0.01m to simplify the shapes (see Figure 5 for an example, Appendix C).

The generation process comprises two stages. First, we specify room geometries using explicit constraints on shape, adjacency, and design principles related to clearance, symmetry, and zoning (see Appendix B for more details). These constraints are encoded directly in the LLM prompt. Second, each room is furnished according to style-specific guidelines (e.g., a bedroom must contain a bed and storage), also defined in structured prompts, to encourage both visual realism and functional plausibility. Approximately one-third of candidate layouts are filtered out by a rule-based spatial validity filter that enforces basic clearance and accessibility constraints. The checks remove scenes with inaccessible furniture and implausible adjacencies, such as sofas blocking doors or a refrigerator overlapping a table. Full prompts, generation templates, and validation scripts are provided in the Supplementary Material.

Together, these two sources yield a publicly available dataset of 2,000 layouts: 1,800 synthetically generated via Gemini 2.5 Pro and 200 extracted from HSSD. The two subsets share a unified polygonal representation, enabling consistent downstream processing. Figure 2 shows examples from both sources, while Figure 1 (left) plots the room-type distribution; Figure 1 (right) reports the corresponding room/style/- geometry counts for the synthetic subset.

Layouts are represented in a structured JSON format. Each entry contains a layout id, the room type, and explicit geometric descriptions. The room boundary is stored as a closed polygon, while walls are represented separately as a list of line segments. Openings such as windows and doors are included in a dedicated openings field rather than flattened into the object list. All furnishings and functional elements (e.g., bed, sofa, table) are stored in the objects list, with each object defined by a labeled polygon. In the synthetic data, these polygons are axis-aligned bounding boxes (four points), whereas in HSSD they can exhibit arbitrary shapes and orientations. Object names are suffixed with instance identifiers (e.g., fridge 1, table 3) to ensure that referents remain unique and stable across prompt construction and answer evaluation. Coordinates are expressed in meters in a right-handed 2D Cartesian frame (+x to the right, +y upward), with origin at (0, 0).

Discussion. Key findings. Our evaluation (Section 4) reveals a consistent capability gap: while models reliably compute some geometric properties (distances, angles), they struggle with constraint satisfaction, geometric unions, and multi-step spatial planning. Three systematic failure modes emerge: (1) Models frequently behave as if object areas were independent rather than unioned (that is, they compute the sum of areas rather than the union), which aligns with low accuracy on Free Space and Max Box (Appendix J.3, J.8). (2) Performance drops on HSSD layouts with non-axis-aligned, high-vertex polygons, and qualitative analysis indicates that many Distance/Angle errors originate in centroid computation (Appendix J.1, J.4). (3) Shortest Path remains difficult, especially in cluttered scenes where buffering and obstacle interactions narrow corridors (Appendix J.6); sensitivity analysis shows this across Fr ́echet and clearance thresholds (Appendix H.2, Fig. 13).

Reasoning-focused models show notable improvements on geometric union tasks, demonstrating that extended inference computation helps with complex geometric operations. However, gains on planning tasks remain modest, suggesting that the bottleneck lies in spatial representation rather than purely computational depth.

Future directions. Two complementary directions follow. Near term: hybridize with external geometric solvers or symbolic planning modules, including set operations (unions/differences), centroid via shoelace, clearance buffering, oriented rectangle search, and A* path planning, to compensate for models’ weaknesses in collision avoidance and clearance reasoning. Longer term: train with explicit spatial constraints and harder distributions (irregular, overlapheavy layouts), and include constraint-violation exemplars and geometry-aware objectives so models learn to maintain coherence under rotation, clearance, and union operations. Beyond these directions, multi-step interaction (e.g., asking an agent to verify or revise its solution using a rendered floorplan) may further improve performance.

Conclusion. We introduced FloorplanQA, a benchmark for evaluating spatial reasoning in LLMs over symbolic 2D layouts representative of architectural and planning contexts. We evaluated 15 language models (8 general, 7 reasoning) on 2,000 layouts (1,800 synthetic; 200 semi–real HSSD) across 8 types of questions spanning metric queries, visibility, placement, and collision-free path estimation.

FloorplanQA provides a standalone benchmark for measuring progress on spatial reasoning in layout-based tasks, with applications ranging from architectural design to indoor planning.

Lines of inquiry this paper opens 24

Research framings built by reading the notes related to this paper — the questions it feeds into.

Does alignment training genuinely modify model behavior or only outputs? How do architectural constraints limit monolithic LLM performance on complex tasks? Do language models learn true linguistic principles or just surface patterns? Can visual rendering-based rewards effectively improve code and layout quality? What perception approach enables GUI agents to work most effectively? What are the distinctive characteristics of language models at different scales? Does parallel reasoning outperform sequential approaches under comparable computational budgets? Can neural networks achieve compositionality without explicit mechanisms? What conditions and architecture enable effective agent ecosystems? What harms result from users attributing consciousness to AI? How can reward models overcome their inherent blindspots and biases? Can RL enable genuinely new reasoning or just optimize existing capabilities? How important is reward engineering relative to pretraining for reasoning?