Unified Vector Floorplan Generation via Markup Representation

Kaede Shiohara, Toshihiko Yamasaki

TL;DR

This paper introduces Floorplan Markup Language (FML) and its corresponding model, FMLM, which treat vector floorplan generation as a simple next-token prediction task. By encoding spatial layouts, site boundaries, and room adjacency graphs into a single text-like grammar, a single autoregressive transformer can handle a wide variety of design tasks—outperforming previous task-specific state-of-the-art models.

What Problem Does This Paper Address?

Automating residential floorplan generation is a long-standing challenge at the intersection of architecture and computer graphics. Architects and algorithms alike must satisfy diverse, heterogeneous constraints: sometimes you want to generate a layout from a specific site boundary, sometimes from a room adjacency graph (e.g., "the kitchen must connect to the dining room"), and other times you need to complete a partial sketch.

Previous data-driven approaches suffer from poor generalization because their underlying data representations are fragmented. Some models generate rasterized images (which require clunky raster-to-vector conversions), while others use diffusion models to predict fixed-length room vertex coordinates. Because these architectures are hardcoded for specific inputs, no single model could seamlessly handle boundaries, graphs, completions, and unconditional generation all at once.

Methods

The authors bridge this gap by reframing spatial layout generation as a language modeling problem. Their approach consists of two main components:

  1. Floorplan Markup Language (FML): Inspired by HTML, FML represents floorplans and their conditions as a sequence of tagged elements. It uses tags like <room>, <vertex>, <door>, and <connect> to define geometry and relationships. To convert 2D coordinates into discrete tokens, continuous 2D points $(x, y)$ are flattened into a 1D value $z = x + y \times W$ (where $W$ is the width of the space).
Floorplan Markup Language (FML) represents boundaries, graphs, and layouts in a unified text sequence.
  1. Floorplan Markup Language Model (FMLM): The model uses an autoregressive transformer architecture based on LLaMA-3. It takes an input sequence (which can include condition tokens like a boundary or graph) and predicts the next token.

To make this language-based approach work for physical architecture, the authors introduced two key training and inference techniques:

  • Room Permutation: Autoregressive models are sensitive to sequence order, but the order in which rooms are listed shouldn't matter. The authors randomly shuffle the room order during training to teach the model permutation invariance.
  • Constrained Decoding: During inference, the model is forced to strictly follow FML grammar and basic architectural physics (e.g., ensuring doors have exactly two vertices and rooms do not overlap) by setting the probabilities of invalid tokens to zero.

Datasets

The model was trained and evaluated on the RPLAN dataset, a standard benchmark containing 80,000 residential floorplans with dense annotations. The dataset includes nine room classes (Living Room, Bedroom, Kitchen, etc.) and two door classes (Interior Door and Front Door).

Key Insights and Ideas

  • Floorplans as Code: The core "aha moment" is that complex spatial hierarchies and geometric constraints can be flattened into a structured, tag-based grammar without losing topological fidelity.
  • Grammar as a Hard Constraint: Instead of relying on complex loss functions or post-processing optimization loops to prevent rooms from overlapping, FMLM uses constrained decoding at the token level to enforce physical plausibility.
  • Unified Multi-Tasking: Because conditions (boundaries, graphs) are just prefix tokens in the sequence, a single model naturally handles multi-conditional generation (e.g., Boundary + Graph to Floorplan) without architectural modifications.
Figure 1. Our Floorplan Markup Language Model directly generates vector floorplans under the wide range of situations.

Key Results

Despite being a single unified model, FMLM consistently outperformed task-specific baselines across both quantitative metrics (like Fréchet Inception Distance (FID), Intersection over Union (IoU), and Graph Edit Distance (GED)) and qualitative realism.

  • Unconditional Generation: FMLM achieved an FID of 7.22, significantly outperforming the diffusion-based GSDiff (15.02).
  • Boundary-Conditioned Generation: FMLM achieved an FID of 4.61 (vs. GSDiff's 11.26) and a higher IoU of 98.06%, showing it adheres much more closely to site boundaries.
  • Graph-Conditioned Generation: FMLM achieved an overall FID of 3.41, blowing past HouseDiffusion (29.31) and HouseGAN++ (48.44). It also achieved a lower Graph Edit Distance (1.21 vs 1.55 for HouseDiffusion), meaning the generated layouts adhered better to the requested room connectivity.

Qualitatively, FMLM avoids common artifacts found in prior models, such as floating doors or misaligned, overlapping room boundaries.

Limitations and Future Work

While highly effective, the authors note a few limitations:

  1. Single-Story Only: The current grammar is restricted to 2D, single-story residential layouts. Extending FMLM to multi-story buildings would require introducing hierarchical tags like <story>.
  2. No Natural Language Integration: FML is currently its own specialized markup language. A promising future direction is integrating FML directly into Large Language Models (LLMs) to allow users to generate floorplans using natural language prompts (e.g., "Design a spacious 3-bedroom house with an open-concept kitchen").

Summary updated

BibTeX
@inproceedings{shiohara2026unified,
  author = {Kaede Shiohara and Toshihiko Yamasaki},
  title = {{Unified Vector Floorplan Generation via Markup Representation}},
  booktitle = {IEEE/CVF Conference on Computer Vision and Pattern Recognition},
  year = {2026},
  url = {https://openreview.net/forum?id=BnvUfotXIJ},
}
Figure