HouseDiffusion: Vector Floorplan Generation via a Diffusion Model with Discrete and Continuous Denoising
By Mohammad Amin Shabani, Sepidehsadat Hosseini, Yasutaka Furukawa Simon Fraser University
HouseDiffusion is an AI model that takes a simple bubble diagram, meaning a list of rooms and which rooms connect through doors, and generates a complete vector floorplan. Earlier models painted floorplans pixel by pixel. HouseDiffusion works directly with the corner coordinates of every room and door. Its main idea is to predict each coordinate in two ways at once: as a continuous value, which suits the diffusion process, and as an exact integer, which makes walls line up, corners meet and rooms share edges cleanly.
It beats the previous best method, House-GAN++, on every metric the authors measured. On average, diversity improves by 67% and compatibility with the input graph by 32%. In a user study, people found its floorplans almost as realistic as real ones.
The Problem: Why Is Floorplan Generation Hard?
According to the authors, about 90% of buildings in North America are built without a dedicated architect designing the floorplan, mostly because of cost. AI tools that can suggest good layouts quickly could make professional-quality design affordable for many more home buyers.
Earlier AI floorplan generators had three recurring problems:
- They ignored the brief. You asked for 2 bedrooms, a kitchen and a living room, and the model gave you 3 bedrooms and no kitchen.
- They lacked variety. The designs looked repetitive.
- They didn't look like real floorplans. Edges were jagged, walls didn't line up, and rooms overlapped or left gaps.
The root cause, the paper argues, is the raster (image-based) approach. Models like House-GAN and House-GAN++ represent each room as a black-and-white image mask and process it with convolutions. That works for refining local shapes, but it struggles with global reasoning across the whole layout. It also needs heavy post-processing to convert the pixels into usable vector drawings.
Why not just predict coordinates directly?
Floorplans are structured geometry, and architecture has strict rules:
- Walls are usually axis-aligned, so neighbouring corners share exactly the same x or y value.
- Adjacent rooms share walls and corners with no gaps or overlaps.
- Walls are often parallel or perpendicular to each other.
If a neural network simply regresses (predicts) continuous coordinates, two values almost never come out exactly equal. You end up with walls that are off by a fraction. The opposite approach, treating every coordinate as a classification over 256 possible values, causes severe class imbalance, and the network fails to train.
HouseDiffusion's contribution is a way to get the best of both.
The Core Idea in One Picture
Bubble diagram (rooms + door connections)
│
▼
Random noise for every room/door corner coordinate
│
▼ repeat ~1000 denoising steps
┌────────────────────────────────────────────┐
│ Transformer with 3 structured attentions │
│ ├─ Continuous head → predicts the noise │
│ └─ Discrete head → predicts the exact │
│ integer coordinate │
└────────────────────────────────────────────┘
│
▼
Clean vector floorplan (polygons for rooms and doors)
The model starts from pure random noise and gradually "denoises" it into a precise floorplan, guided at every step by the bubble diagram.
How HouseDiffusion Works
1. Input: the bubble diagram
The user gives a graph:
- Nodes = rooms, each with a type: kitchen, living room, bedroom, dining room, bathroom, study, balcony, entrance, storage, or unknown.
- Edges = door connections between rooms (interior doors and the front door).
This is a very common early step in real architectural practice, so the model fits naturally into how designers already work.
2. Representation: every room is a polygon
Instead of images, each room and each door is a 1D loop of corners, a polygon defined by a sequence of (x, y) points. The whole floorplan is just a set of these polygons.
How many corners should each room have? Rather than padding to a large maximum and letting the network switch corners off, which is wasteful and hard to train, the authors build a histogram of corner counts per room type from the training data and sample from it. As a bonus, a user can set the corner count manually and so control how complex each room's shape is. An image-based system cannot offer this.
Coordinates are integers from 0 to 255. During diffusion they are scaled to the range [−1, 1] and treated as continuous numbers.
3. The forward and reverse diffusion process
Like all diffusion models:
- Forward process (training only): take a real floorplan and add Gaussian noise step by step until it becomes pure noise. This uses a standard cosine noise schedule.
- Reverse process (generation): a neural network learns to undo the noise one step at a time, until a clean floorplan emerges.
The reverse network is a Transformer, and every room/door corner is one token (node).
4. Feature embedding: what each corner "knows"
Each corner is embedded into a 512-dimensional vector built from:
- Its coordinate, augmented: the model also samples 8 points along the wall to the next corner. This helps it reason about wall alignment, not just isolated points.
- Room type (one-hot)
- Room index and corner index (one-hot)
- The current diffusion timestep
5. Three kinds of attention, each with a job
This is one of the paper's key design choices. Inside the Transformer, attention is masked according to the floorplan's structure:
| Attention type | Who talks to whom | What it fixes |
|---|---|---|
| CSA: Component-wise Self Attention | Corners within the same room or door | Clean individual room shapes, with no self-intersecting or "impossible" polygons |
| GSA: Global Self Attention | Every corner with every other corner | Overall realism and diversity of the layout |
| RCA: Relational Cross Attention | Rooms ↔ the doors connected to them in the bubble diagram | Correct door placement and compatibility with the input graph |
The three attention outputs are summed, normalised, and the block is repeated four times.
6. The key trick: continuous and discrete denoising together
At each step the model makes two predictions:
- Continuous branch: predicts the noise that was added. This is the standard diffusion objective. It keeps the process mathematically sound, because diffusion is continuous by nature.
- Discrete branch: predicts the final clean coordinate, rounds it to an integer, and converts it into an 8-bit binary code (using an "int2bit" function). Two more attention blocks then refine this binary representation.
Because the final coordinates are exact integers, corners can genuinely snap to the same value. That is what produces perfectly aligned walls, shared corners and right angles.
Timing matters. The prediction of the final coordinate is only reliable near the end of denoising, so:
- During training, the discrete branch is used only for the last 20 steps.
- During generation, the discrete integer coordinates are fed forward only in the last 32 steps (out of 1000).
The authors tested this choice. Switching discrete mode on too late leaves too little time to refine. Switching it on too early throws away useful continuous information while the predictions are still poor.
7. Training setup
- Loss: simple L2 (mean squared error) on both the noise prediction and the binary coordinate prediction, weighted equally
- Framework: PyTorch, built on OpenAI's Guided-Diffusion codebase
- Optimiser: Adam with decoupled weight decay, learning rate 1e-3, divided by 10 every 100k steps
- Training: 250k steps, batch size 512, on a single NVIDIA RTX 6000 GPU
- Diffusion steps: 1000
Experiments and Results
Dataset
- RPLAN: 60,000 real vector floorplans at 256×256 resolution.
- Floorplans are split into groups by room count (5, 6, 7 or 8 rooms). When testing on one group, that group is left out of training, so the model can't simply memorise layouts.
- Non-Manhattan RPLAN (new benchmark): the authors created this variant by adding two random corners to an outer wall, producing angled, non-rectangular buildings.
Metrics
- Diversity: Fréchet Inception Distance (FID). Lower is better.
- Compatibility: graph edit distance between the input bubble diagram and the diagram reconstructed from the generated plan. Lower is better.
- Realism: a human study where participants compare two floorplans and pick the better one. Higher is better.
Headline numbers (RPLAN)
| Model | Realism ↑ | Diversity (FID) ↓, 8 rooms | Compatibility ↓, 8 rooms |
|---|---|---|---|
| Ashual et al. | −1.00 | 183.0 | 11.8 |
| Johnson et al. | −1.00 | 186.0 | 11.3 |
| House-GAN | −0.95 | 66.4 | 5.3 |
| House-GAN++ (previous SOTA) | −0.52 | 32.9 | 3.9 |
| HouseDiffusion | −0.19 | 9.5 | 2.5 |
HouseDiffusion wins across every room-count group and every metric.
What the realism score means
The realism score compares each model against real ground-truth floorplans:
- HouseDiffusion scored −0.19. Participants judged its output as realistic as the real floorplan about 81% of the time (when they either preferred the real one or rated them equal).
- In a direct comparison, people preferred HouseDiffusion over House-GAN++ about 85% of the time.
- House-GAN++ had reported a similar realism score only for a variant that relied on expensive post-processing and discarded about 90% of its generated samples. HouseDiffusion's results are raw network outputs with no filtering.
Non-Manhattan floorplans
House-GAN++ can't handle angled walls, and its diversity score (FID) is around 58–77 on this benchmark. HouseDiffusion stays around 10–12, nearly the same as on regular floorplans. This shows the vector approach generalises beyond rectangular layouts.
What it looks like in practice
The authors' visual comparisons show that House-GAN++ often misses rooms or adds extra ones. HouseDiffusion, because it generates exactly one polygon per requested room and door, always produces the correct set of rooms, with clean walls and no jagged edges.
Ablation Studies: What Actually Matters?
The authors removed components one at a time to see which ones matter.
1. Continuous + discrete vs. either alone
| Variant | Diversity ↓ | Compatibility ↓ |
|---|---|---|
| Discrete only (AnalogBits) | 14.5 | 6.0 |
| Continuous only (standard diffusion) | 38.8 | 2.2 |
| Both (HouseDiffusion) | 9.5 | 2.5 |
Combining both gives far better diversity at a very small cost in compatibility. The authors suspect that a purely discrete approach mostly learns to round numbers near the end, which hurts quality.
2. The three attention types
- Remove GSA → realism and diversity drop the most.
- Remove RCA → door placement breaks, and compatibility worsens sharply.
- Remove CSA → room shapes become self-intersecting or impossible.
- Replace all three with 3× more global attention → still clearly worse. The structure of the attention matters, not just the amount.
3. Corner augmentation (sampling points along walls)
This improves both metrics, and compatibility the most, because the extra points help the model reason about how walls align.
4. Controlling room complexity
You can increase the corner count of a single room, for example making the dining room 4, 6, 8 or 10 corners, and the surrounding rooms adapt their layouts to stay consistent.
Key Takeaways
- Vector beats raster for architecture. Generating coordinates directly removes post-processing and produces clean, CAD-ready geometry.
- Hybrid continuous/discrete denoising is the main innovation. Continuous values keep diffusion stable, and discrete integers enforce exact geometric relationships.
- Structure-aware attention matters. Telling the Transformer which corners belong together and which rooms connect is what makes layouts both realistic and faithful to the brief.
- New capabilities beyond better scores: non-Manhattan (angled) layouts and exact control over each room's corner count.
- It's practical to train. A single high-end GPU is enough.
Limitations and Future Work
- The model is evaluated on residential floorplans with 5–8 rooms. The authors name large-scale buildings as their next step.
- The non-Manhattan benchmark is synthetic: its angled walls were added by a heuristic, so realism wasn't measured there.
- Corner counts come from a dataset histogram unless the user specifies them, so shape complexity reflects the training data.
Why This Matters for AI-Powered Design Tools
For anyone building AI products for the architecture, engineering and construction (AEC) industry, HouseDiffusion is a strong reference design:
- Output is usable straight away. Vector polygons can go directly into CAD, BIM or web-based editors without vectorising images.
- It respects the client's brief. The bubble-diagram input matches how architects and home buyers already describe what they want ("3 bedrooms, open kitchen next to the living room").
- It generates many options quickly. Diffusion sampling naturally produces many different layouts for the same brief, which suits rapid design exploration.
- It is controllable. Corner-count control hints at more fine-grained editing, such as locking some rooms or adjusting shape complexity on demand.
The broader lesson reaches beyond floorplans. When a generative model must produce precise structured geometry, such as layouts, CAD parts or UI wireframes, it helps to pair a continuous diffusion process with discrete outputs.
Reference
Shabani, M. A., Hosseini, S., & Furukawa, Y. (2023). HouseDiffusion: Vector Floorplan Generation via a Diffusion Model with Discrete and Continuous Denoising. In Proceedings of the IEEE/CVF Conference on Computer Vision and Pattern Recognition (CVPR), pp. 5466–5475.
Project page, video and supplementary material: https://aminshabani.github.io/housediffusion