1 Introduction
Floor plan diagrams are crucial in the initial stages of the architectural design process. They play a key role in transforming the relationship requirements and spatial considerations of a project into tangible layouts. Traditional methods of drawing an architectural diagram of a floor plan focus on achieving connectivity between spatial zones using adjacent shapes as a group of zones. In 1864, architect Robert Kerr proposed what he termed a “thoroughfare plan.” He described a similar abstract conceptual sketch as a “skeleton upon which rooms are grouped,” prioritising movement and functional relationships over “spatial detail.” At that time, he drew only adjacent rectangles to denote groups of rooms (
Emmons, 1998). Bubble diagram sketches, consisting of circles and connecting lines, are used to indicate relationships between spaces and functions; they have long been used as a form of abstraction in architectural programming, especially in modern architecture. In his 1938 essay
“If I Had to Teach You Architecture”, Le Corbusier described a similar method, starting with a straight line and building outward with functional units, thereby emphasising clarity and organisation (Fig. 1, left diagram as an abstract visual interpretation). In this approach, the diagram was more than just a technical tool; it was considered a generator of architectural logic from the inside out (
Emmons, 1998).
In 1937, Nobbs used the idea of a network diagram (Fig. 1, middle diagram as an abstract visual interpretation) followed by the steps of assembling elements. Nobbs conceived the design process of building as the evolution of an organism and suggested using the diagram as a tool for simulating an optimal solution. He explains the bubble diagram as follows:
“the plan at this stage is like a medical student’s dissected animal, with all its organs neatly spilled out and some of the connections stretched, but none broken” (
Nobbs, 1937). However, this approach involves manually drawing and making iterative adjustments, which can be time-consuming. It is also challenging to efficiently capture the complex spatial relationships inherent to architectural design. During the 20th Century, the representation of bubble diagrams (Fig. 1, right diagram as an abstract visual interpretation) (
White, 1975) became a foundational design method and a guiding design framework for architects to uncover and systematise space-planning procedures (
Hsu and Krawczyk, 2003).
In 1957, the first computer algorithms were used to solve “spatial allocation problems.”
Alexander (1964) framed the design process as a mathematical and algorithmic process transforming requirements into a graph-like network with a hierarchical, clustered network of nodes, revealing the relationships between spaces (Fig. 2, left, as an abstract visual interpretation). Between 1957 and 1970, more than thirty different programs were developed to help automate stages of the generation of building layouts (
Shaviv, 1985). Then, between the 1970s and 2000, four main approaches for generating a bubble diagram by computer algorithms that are typically transformed into a layout plan were applied. These are as follows:
a) Rule-based space planning (Fig. 3, as an abstract visual interpretation); initially proposed by
Mitchell and Dillon (1972). This includes form-generation rules through which computational procedures can rapidly produce a wide range of floor plan diagrams.
b) Physics-based bubble diagrams, introduced by
Fortin (1978). This starts with a random position of spaces; then elements are placed according to attractive and repulsive forces related to adjacency rules. This method relies on the initial condition and is difficult to balance in the case of a complex project relationship (
Fortin, 1978).
c) Graph theory-based bubble diagram, proposed by
Ruch (1978) as an interactive programming for the graph, bubble diagram and schematic plan (i.e., Fig. 2, middle and right, as an abstract visual interpretation). During the 1980s, it was proven that a bubble-diagram graph could be captured and manipulated on screen; later, in the early 1990s, its generation was automated using constraint-based engines; then, in the late 1990s, evolutionary searches were used to evolve whole families of graphs, treating the bubble diagram itself as a design variable rather than a static sketch (
Hsu and Krawczyk, 2003).
d) Mathematical-based programming, which typically uses graph theory as a topological constraint graph, then defines geometrical mathematical constraints of rooms (Fig. 4, as an abstract visual interpretation of the successive steps); such as areas and positions (e.g.,
Galle, 1981).
Since 2000, these four approaches have continued to be used, but with different algorithms. A new fifth approach has utilised artificial neural networks (ANN) to develop a comprehensive layout based on images, leveraging databases that are limited to specific typologies (residential, commercial, industrial) for each database. Recent related studies are presented in detail in the following section. We highlight that our study proposes a new approach for using ANN to remap the adjacency relations amongst architectural elements. Unlike current ANN approaches, it does not rely on a specific database, nor does it seek to automate the entirety of the process while generating a final detailed floorplan with walls. Rather, it provides the user with an interactive canvas in which automated mapping of topological relationships can be applied to initial geometrical bubble diagrams.
2 Related research
Several recent studies have explored computer algorithmic processes for generating floor plan diagrams efficiently while considering diverse design requirements, all of which have developed algorithms similar to the four previous methodological approaches:
a) Rule-based space planning.
Guo and Li (2017) developed an evolutionary agent-based approach that uses physical interaction rules (attraction, swap, repulsion, compression) and is well-suited to the conceptual design of spaces with no complex geometric conditions, such as irregular plots.
b) Physics-based bubble diagrams. Attraction and repulsion forces are the main forces required to solve the adjacency of connected bubbles and pack them inside a user-defined polygon within a 3D modeling tool, such as in
Veloso et al. (2014).
c) Graph-theory-based bubble diagram. This uses graphs to organise zones and spatial relationships. Various representations, including visibility graphs, Voronoi diagrams and adjacency matrices have been employed to capture connectivity and adjacency constraints (
Franz et al., 2005;
Nassar, 2019). These approaches support designers in conceiving spatial configurations but often require extensive manual modification. Most such approaches use physics-based spring computations. Other researchers have developed graph-based algorithms for generating only rectangular floor plans, allowing the insertion of new rooms while maintaining the connectivity of the existing layout (
Wang et al., 2018). The standard method used in this approach is the spring embedder graph-drawing algorithm, which serves as the basis for many modern models. This algorithm solves an optimisation problem in which the energy of a configuration is minimised while ensuring that every vertex of the graph remains within specified boundaries and maintains the characteristics inherent to force-directed methods in the final layout (
Zhang and Pang, 2016).
d) Mathematical-based programming (parametric method); other studies have used parametric modelling tools to enable designers to participate actively in the generation process by specifying design constraints based on graphs and preferences (
Egor et Figal., 2020;
Hu et al., 2020). These techniques facilitate the iterative exploration of design alternatives, relying on physics-based graph optimisation within a parametric manipulation; however, they do not enable real-time exploration of a context or outline shape.
e) Machine learning techniques have also been used to automate various aspects of architectural design, including floor plan generation. Generative adversarial networks and convolutional neural networks have been used to learn patterns from existing floor plans and generate new layouts (
Nauata et al., 2021;
Yıldız et al., 2023). Although effective, these methods rely on large training datasets and may fail to capture complex spatial relationships, especially when the designer applies a new context or project requirement that is absent from the dataset. The primary goal of using these techniques is to obtain a detailed layout with walls and doors. Here, it is necessary to highlight that even this study uses a machine learning method; however, it is used in a manner such that there is no reliance on a specific dataset. Nonetheless, it focuses on producing a bubble diagram where the nodes are localised in space with respect to relationships and areas.
Current approaches generally minimise human participation, limiting the potential for deeper integration of AI into design practice, and their focus is on finalising the layout with details. In addition, the deep learning techniques used in most of the studies (
Veloso et al., 2022;
Wu et al., 2019;
Zhang et al., 2024) were unable to generalise strategies to unseen scenarios, preventing the use of the developed approaches as a scalable design method for architectural design. Using the reinforcement learning approach,
Kakooee et al. (2024) and
Kakooee and Dillenburger (2025) observed that an agent trained on a particular design scenario often struggles to produce satisfactory solutions when confronted with new design requirements or constraints, necessitating retraining for each scenario. Their study, like most preceding efforts, tried to automate all of the layout phases, from topological fitting to the final detailed wall and geometrical fitting.
In contrast, our study focuses on using ANN without data, and the neurons are a probabilistic space in which the designer explores positioning zones and areas according to the probability of real-time interactions with the competitive learning process between the neurons. In this study, we introduce a new method for creating floor plan diagrams, using a self-organising map (SOM) algorithm enhanced with a graph distance function explicitly tailored for architectural applications. SOMs have been widely applied in data visualisation, clustering, abstraction and dimensionality reduction. They consist of processing elements called neurons or nodes, which are interconnected with associated weights. By organising input data onto a lower-dimensional grid while preserving topological relationships, SOMs offer a powerful tool for analysing, understanding and reducing high-dimensional data (
Kohonen, 2001). They also reflect the topological structure of data, making them invaluable for interpreting complex graph relationships (
Bonabeau and Hénaux, 1998). SOMs have also been explored in architectural applications for generating in-between architectural spaces for previous designs (
Zaghloul, 2015).
However, their use in floor plan generation has been limited to design generation based on complete design data, rather than abstract relations between spaces. The inverted SOM is an algorithm developed for the rapid generation of complex graphs (
Meyer, 1998) in which the user does not interact with the training process to fix graph node positions; rather, it uses a generic distance metric. Unlike conventional SOM methods, which predominantly use Euclidean distance metrics, the proposed approach uses the cosine distance function, representing the angular relationship between two vectors. The cosine distance values range between 0 for identical vectors and 2 for opposite vectors. A value of 1 denotes that the vectors are orthogonal. This approach leverages the inherent topology of spatial relationships encoded in graph structures, allowing for more accurate and contextually relevant floor plan generation.
Central to our methodology is the use of SOM neurons as topological and metric positions of probabilistic zones. As an unsupervised learning technique, SOMs can map high-dimensional input vectors into a lower-dimensional grid while preserving topological relationships. Building on the SOM approach, we seek to empower users to influence floor plan generation processes by setting fixed positions for key elements, such as entrances and viewpoints. This interactive feature enables designers to integrate their intent into the generated floor plans in real time, resulting in contextually relevant outcomes. Various experiments were conducted on floor plan diagrams of residential buildings to validate our method and demonstrate its capability to generate initial layouts in real time. The results indicate the potential of the self-organising adjacency graph (SOAG) method to initiate floor plan diagrams, offering architects and designers an efficient and intuitive tool with which to explore design alternatives while meeting project requirements.
Informed by the limitations of these diverse research efforts, our proposed SOAG method advances the automated generation of floor plan diagrams by adapting the standard SOM algorithm. First, the SOM neurons are represented as a meaningful geometric grid inside the floor plan outline function while projecting the adjacency matrix. Second, the cosine distance is used to select the winner neurons, which are termed the best matching unit (BMU). Lastly, specific zone elements are localised next to some neurons, which forces the SOAG to work as a diagram optimiser. This integration automatically generates initial floor plan diagrams while accommodating user input and spatial constraints. These optimisation objectives are integrated at the front-end level, where the user interacts with the training process in real time.
3 Methodology
The SOAG algorithm, developed for architects and using Mathematica as its background coding language, is packaged as a Wolfram Player file. In the first step, users define the geometry of the floor plan by importing an outline from any CAD tool or by drawing it inside a basic canvas. Then, the topological requirements are defined by specifying the spaces that have a direct relationship in a simple data sheet input. Next, the user suggests the positions of key points, such as the entrance and outer viewpoints, and can enter the area of each space. In this study, the terms zone and space are used interchangeably to describe broader areas within the bubble diagram, while key points denote the importance of attractive regions. This is effective because the focus is limited to bubble diagrams without detailed walls, doors or other architectural elements; instead, these distinctions remain at a conceptual rather than constructional level. Finally, the SOAG algorithm optimises the position of each element of the floor plan to match the defined topological inputs.
The proposed algorithm focuses on feature engineering the topological relationships and training a SOAG to fit the relational information into a floor plan shape. In this section, we outline the step-by-step process, which is also illustrated in Fig. 5.
3.1 Floor plan graph initiation
The initial step involves creating an outline of the floor plan representation and converting its internal space into a graph grid such that the grid spacing is similar to that of the design metric unit. A polyline P represents the outline of a floor plan, defining its boundaries and layout. The polyline is filled with a grid of graph nodes. Thus, the space inside the floor plan is discretised into a uniform grid of nodes, G = {v1,v2,…,vj}, each representing a specific point in the layout. This graph provides the foundation for representing spatial relationships and facilitates feature extraction for SOAG training.
3.2 Feature engineering
Key points, K = {k1,k2,…,km}, such as the position of the main entrance, outer viewpoints, or contextual architectural features, are identified, assigned feature vectors, and added to the project zone requirements. Abstract elements, such as viewpoints, are represented as zones with zero area. The relationships between rooms and key points are determined using an adjacency matrix, A, which is derived from the connectivity of rooms and the spatial requirements of the project. For each key point, ki, a feature vector, , is computed, incorporating spatial, relational and semantic information from A. The feature vector, , is assigned to the closest graph node, vj*, based on the Euclidean distance.
3.3 Weight initialisation
The weights of all graph nodes are initialised as follows: first, nodes corresponding to key points are assigned their respective feature vectors, then all other nodes are initialised according to the initial key point vectors, serving as placeholders to be updated during SOAG training. Thus, in this study, only the nodes next to the key points have fixed feature vectors. As a result, the training will not be biased towards a random weight initialisation. Many studies (e.g.,
Akinduko et al., 2016;
Su et al., 1999) have demonstrated that the initialisation of SOM weights plays a crucial role in shaping convergence speed, stability, and overall training quality, making it a key factor to consider in both initial training and retraining processes.
3.4 SOAG training algorithm
The SOAG algorithm (Fig. 6) clusters and organises the feature vectors, providing a topological representation of the spatial relationships within the floor plan.
Input
P: Floor plan outline (polyline);
A: Adjacency matrix;
K = {k1, k2, …, km}: Key points;
L: Length of feature vectors;
T: Maximum number of SOAG training iterations;
ε: Quantisation error threshold;
r: Initial SOAG radius, equal to the maximum graph distance;
σ: Learning rate for SOAG;
w: SOAG weights.
3.5 Output and SOAG interpretation
The final output consists of the trained SOAG weights, which encode the spatial and relational representations of the floor plan. These weights provide insights into the layout structure, key point clustering and semantic relationships, facilitating further analysis and/or visualisation.
4 Experiment
4.1 Application interface―side input panel
Users can select from different methods for calculating boundary shapes, such as “minimum convex polygon,” which creates a convex-hull bounding shape around the multiplicatively weighted Voronoi diagram (MWVD) region, as mentioned in Section 5. Other default-bounding regions include “minimum rectangle” and “minimum disk” around the cluster nodes. An iterations slider can be used to adjust the number of SOAG iterations. Interactive zoom and pan sliders help users navigate and adjust the plot view. The “Run” button executes the SOAG training process.
4.1.1 Application interface―graph zones and relationships
The interface defines and manages the spatial zone requirements of the key points, such as entrances and viewpoints. The SOAG is constrained to preserve the locations of the key points and associates them with the nearest neuron nodes using its feature vector (Fig. 10). Users can specify relationships between zones or key points, such as adjacency, forming a basis for computing the adjacency matrix, i.e., the core of the feature vector (Figs. 8 and 9). Editable fields assign numerical areas to zones, acting as a ratio between the spaces that affect the weight of the Voronoi distance.
4.1.2 Application interface―graph representation
The right panel visualises the spatial layout overlaid with a grid. Coloured regions denote different zones, nodes represent key locations (e.g., “Entrance” and “Viewpoints”), with edges denoting their defined relationships or connections.
4.1.3 Export and run controls
The interface (Fig. 7) has buttons for executing calculations (“Run”) and exporting data in various formats, enabling integration with external tools, such as Rhino or layout libraries.
Based on the inputs required for adjacency, the relationships in the input fields of the experiment in Fig. 7 are as follows:
{Frontdoor ⇔ Livingroom, View1 ⇔ Masterroom1, View2 ⇔ Secondroom1, View1 ⇔ Reception, Frontdoor ⇔ Kitchen, Entrance ⇔ Frontdoor, Living ⇔ Bathroom1}.
5 Results and discussion
The SOAG can generate floor plan diagrams in real time based on user inputs, such as topological, geometrical and contextual constraints. The SOAG algorithm integrates user-defined key points, such as entrance position and outer viewpoints, into the final layout, successfully localising zones and differentiating between related and unrelated zones by initialising the feature vector with the adjacency matrix values. It then transforms the matrices by substituting values that represent each element in the vector with a unique high value, thereby assisting users in performing adjacency clustering, as shown in Step 4 in Fig. 6.
Introducing a new distance function expands the capabilities of the algorithm beyond the generation of standard two-dimensional SOM map layouts with a Euclidean metric. A graph grid is more effective than a metric grid because it can represent functional movement rather than physical distance. Consequently, if two points are close in a metric grid and there is an obstacle, such as a wall, between them, the metric grid cannot recognise this feature, whereas a graph grid can effectively represent obstacles, such as walls, by removing connections between the two points. A graph grid can also define exclusion zones, ensuring that spaces are not generated in restricted areas. This adaptability helps to satisfy the requirements of both spatial continuity and zoning constraints.
Replacing the binary values of the adjacency relations (Fig. 6, Step 4) improves the ability of the algorithm to distinguish differences in the vector. The use of a cosine distance function (Fig. 6, Step 14), instead of the standard Euclidean distance, to evaluate the similarity of vectors allows a focus on the directionality of relationships rather than their magnitude. This is ideal for evaluating graphical data with asymmetric connections, where the feature vector structure is more important than the strength of its relationships. In such cases, the relationships between zone features, and their adjacency, are more important than their absolute positions. The SOAG training process preserves topological relationships, which are encapsulated in the neurons’ updated weights of SOAG (Fig. 11), leading to layouts aligned with practical needs and supporting real-time decisions in the initial design stages. In other words, SOAG simultaneously deals with both the latent space and geometrical metric space used by architects.
The interactive interface allows users to modify key parameters, such as adjacency relationships, space areas and the locations of key points. It also achieves real-time performance (less than 0.2 s per alternative) using a laptop with a CPU-only configuration, demonstrating the efficiency of the system even without GPU acceleration. Consequently, it enables the exploration of design alternatives while reducing the iterative workload typically associated with initial floor plan generation. The graphical output, including the grid representation and adjacency connections, provides an intuitive visualisation of the spatial relationships. Using graph nodes and edges effectively communicates the spatial configuration, facilitating ease of interpretation by architects and designers. The matrix of maximum weight distances per cluster, known as the U-matrix (
Kohonen, 2001), shows the boundaries (as dark lines) between the clusters in Fig. 12. The current implementation of the zones’ areas uses an MWVD (
Dong, 2008) with a weighted distance function, where the weight is determined as a ratio to the areas of the zones as follows:
where dv is the distance in each Voronoi region that represents the region of a zone, pv is the zone graph vertex coordinate and pi is a point within the polyline. The distance is relative to the area of each zone. Following SOAG training, the impacts of the areas are replaced with ratios, which can be seen as a limitation when areas are much larger than the adjacent elements. Key points, such as viewpoints, may have a small area or weight because they do not act as real zones, but rather as attractor points to adjacent zones (Figs. 7 and 10). Moving the key points generates more alternatives in real time without the need to have similar examples in the data for their localisation, as shown in Fig. 13. Furthermore, it is necessary to refer to the essence of MWVD, which was integrated inside the learning process of SOAG in different mathematical formats, in Step 15 of Fig. 6. Updates to the neurons’ weights are influenced by multiplying the graph distances by the square root of the areas according to the BMU selection.
This paper does not aim to automate the entire process of floor plan generation, but rather to focus on creating a likelihood-based canvas for placing initial zones for designers, allowing them to modify initial localisations before navigating a probabilistic setup of a bubble diagram. The generalisability of the proposed approach can be considered at a theoretical level. Within the scope of this study, further experiments and refinements are required to strengthen its applicability. To provide an initial indication of this potential, we also tested the algorithm on additional regular and irregular shapes, the results of which are presented in Appendix A.
5.1 Qualitative comparison
SOAG exhibits an ability to generate probabilistic regions of zones that overlap the same GT in Fig. 13. Unlike most dominant research approaches, the proposed approach does not rely on a training process; instead, we used only the relations and areas as a GT for comparison. Thus, from a qualitative comparison, similar results are obtained; additionally, changing the positions of key points (Fig. 13, right column) leads to new probabilistic-based bubble zone locations.
5.2 Quantitative comparison
The quantile plot (Fig. 14) compares the ground truth (GT) areas, represented by the diagonal dotted line, with the areas generated by SOAG, shown as scattered points. Each data point corresponds to an area measurement in mm
2. When the points are closer to the diagonal, a strong correlation between the GT values and the generated values is indicated, whereas deviations from the line highlight differences. The clustering of most points along the diagonal suggests that our method achieves a high level of accuracy for smaller and moderate areas; however, some noticeable deviations appear above 8000 mm
2, reflecting slight over- or under-estimations by our method. Overall, the visualisation demonstrates that the approach aligns well with the GT, with only a few outliers at higher ranges. Although these results suggest overall good agreement, additional experiments are needed to obtain a more comprehensive assessment of the method’s performance. The Hausdorff metric, also known as the Hausdorff distance (HD), was used to measure the difference between the two regions, namely the GT zones and the zones generated by the SOAG. HD is utilised in numerous computer vision applications and studies, particularly for shape matching (
Alt et al., 2003;
Alt and Guibas, 2009). As the areas were in mm
2, the histogram shows some differences in shapes (Fig. 15); even here, a similarity in the likelihood positions of zones and areas, rather than in shape, is needed.
6 Conclusions
The proposed SOAG method generates floor plan diagrams while creating initial outlines of convex or concave boundaries. It refines the traditional SOM techniques to suit architectural design applications and facilitates real-time human inputs; as such, it is a valuable for architects seeking to balance efficiency and creativity. It integrates user input and interaction at various stages in the process, allowing users to define adjacency constraints and set the positions of key points while ensuring that outcomes are adaptable to project needs without being driven by pre-trained floor plan data. Although we evaluated the developed approach using residential layouts, the method is adaptable to different kinds of floor plan typologies. This study demonstrates the potential of training a machine learning algorithm to solve problems on the fly, without exposure to previous solutions, in support of the early stages of architectural design by automating and optimising the generation of floor plan diagrams. The principal contribution of this study is in accelerating the automation of the initial planning and design stages. Further studies are needed to expand beyond the limitations of the proposed method and develop its application to more complex functional requirements.
7 Limitations and future work
The primary limitation of this method lies in the accuracy of the area distribution, which relies only on the MWVD and involves area ratios rather than absolute values. Efforts should be made to expand the algorithm’s ability to include additional design constraints, such as generating multiple floor plan diagrams. Additionally, integrating the method with established design tools and platforms, such as Rhino3D, could further streamline workflows and enhance its utility in professional practice. Moreover, validating the approach using more extensive and diverse floor plan scenarios, including complex layouts and multi-floor building designs, would help to demonstrate its robustness and versatility in varied architectural contexts. Finally, to avoid occasional intersection of graph edges when the key points are adjusted, the key points may be slightly repositioned through real-time interactions.
2095-2635/2026 The Authors. Publishing services by Elsevier B.V. on behalf of KeAi Communications Co. Ltd.