NeurIPS 2026Coming to NeurIPS?Explore papers, orals & directions

Constrained Layout Generation with Factor Graphs

Mohammed Haroon Dupty, Yanfei Dong, Sicong Leng, Guoji Fu, Yong Liang Goh, Wei Lu, Wee Sun Lee · DOI

Abstract

Automated floorplan generation requires balancing user-defined constraints with geometric feasibility. Traditional Graph Neural Networks (GNNs) often fail to capture fine-grained spatial dependencies, leading to overlapping rooms or misaligned boundaries. This paper presents FP-FGNN, a novel framework that utilizes factor graphs to represent rooms as sets of boundary variables. By modeling higher-order constraints through specialized factor nodes, FP-FGNN achieves a significant improvement in layout accuracy, reaching a Box-level IOU of 0.8685, while enabling real-time interactive design.

Introduction

The challenge of automated architectural design lies in "fidelity"—the strict adherence to complex spatial requirements. While AI models have demonstrated the ability to generate diverse layouts, they frequently struggle with rigid constraints, such as specific wall-sharing requirements or fitting within non-standard building perimeters.

Existing methods typically rely on GNNs where each room is represented as a single node. This representation is often too coarse to capture the nuances of architectural space. In a real-world floorplan, rooms interact through specific boundaries rather than as point masses. For instance, a bathroom might share only its northern wall with a bedroom's southern wall. Standard GNNs struggle to model these fine-grained, higher-order dependencies, often resulting in topological errors or layouts that ignore the building's structural shell.

Methodology: The FP-FGNN Framework

To address these limitations, the researchers introduced the FloorPlan Factor Graph Neural Network (FP-FGNN). This approach transitions from a simple graph to a bipartite Factor Graph structure, which allows for more precise modeling of spatial constraints.

Factor Graph Representation

The architecture consists of two primary node types:

  1. Variable Nodes: Instead of a single node per room, each room is decomposed into four latent variables representing its bounding box boundaries: $x_{min}, x_{max}, y_{min},$ and $y_{max}$.
  2. Factor Nodes: These nodes represent the constraints and connect specifically to the variables they influence.

Constraint Modeling

The system utilizes four distinct factor types to ensure geometric integrity:

  • Box Factors: These maintain the internal consistency of a single room, such as ensuring the room maintains a realistic area and that $x_{min} < x_{max}$.
  • Relational Factors: These encode adjacency and relative positioning. For example, a "left-of" relation specifically links the $x_{max}$ variable of one room to the $x_{min}$ variable of another.
  • Boundary Factors: These link the building's perimeter corner points to room variables, ensuring the generated layout "hugs" the external walls accurately.
  • Complete Factor: A global node that captures high-level dependencies across the entire layout.

Two-Stage Generation

The generation process occurs in two stages. First, the FGNN predicts the coordinates for all room bounding boxes using neuralized message passing. Second, these predicted boxes are processed by a Cascaded Refinement Network (CRN) to generate the final, high-resolution colored floorplan image.

Experimental Setup

The model was trained and evaluated using the RPLAN dataset, a comprehensive collection of over 80,000 residential floorplans. The researchers utilized a refined version of the dataset containing 15 room types and pre-defined adjacency types. The data was partitioned into approximately 56,500 training samples and 12,100 test samples.

Results and Discussion

FP-FGNN demonstrates a substantial leap in performance over previous state-of-the-art models.

Quantitative Performance

The framework achieved a Box-level Intersection over Union (IOU) of 0.8685, significantly outperforming the previous benchmark, Graph2Plan, which achieved 0.6796. This improvement underscores the effectiveness of using factor graphs for high-fidelity layout generation.

Qualitative Improvements and Speed

Beyond metrics, the generated floorplans exhibit sharper internal boundaries and a marked reduction in room overlaps. The model is also highly efficient, with an average inference time of 0.023 seconds. This near-instantaneous processing enables an "iterative design" workflow, where architects can modify constraints and receive immediate visual feedback.

Robustness

The model proved resilient to incomplete data. In tests where 50% of room information was omitted to simulate vague user requests, FP-FGNN maintained high accuracy in preserving the remaining constraints, demonstrating its utility as a practical design tool.

Conclusion and Future Work

FP-FGNN represents a significant advancement in constrained layout generation by shifting the focus from point-based graphs to boundary-based factor graphs. While the current model is optimized for rectangular bounding boxes—limiting its application for L-shaped or curved rooms—it provides a robust foundation for future architectural AI. Future research may explore the automatic learning of factor structures and the integration of natural language processing to allow users to generate layouts from descriptive text.

Summary updated

BibTeX
@misc{dupty2024constrained,
  author = {Mohammed Haroon Dupty and Yanfei Dong and Sicong Leng and Guoji Fu and Yong Liang Goh and Wei Lu and Wee Sun Lee},
  title = {{Constrained Layout Generation with Factor Graphs}},
  year = {2024},
  eprint = {2404.00385},
  archivePrefix = {arXiv},
  url = {https://arxiv.org/abs/2404.00385},
}
Figure