Updated on: 30 October 2026
A generative adversarial network (GAN) is a pair of neural networks trained against each other: a generator turns random noise into new images, and a discriminator learns to tell those images from real ones. Ian Goodfellow and his co-authors introduced the idea in 2014; each network improves by trying to beat the other, until the generated images look real.
"GAN architecture" has two meanings, and this guide covers both. First the model itself: its two networks, their layers, the training loop and the loss, then the main GAN types and their applications. Then GANs in building design: what architects and researchers built with them, from pix2pix to ArchiGAN and House-GAN, and where they fell short. Diffusion models overtook GANs in image generation in 2021, so the last part shows where GANs are still used as of October 2026.
What Are Generative Adversarial Networks (GANs)?
Generative adversarial networks are a class of deep learning models that learn the distribution of a training dataset and generate new samples that follow it: images above all, but also audio and other data. They are used in computer vision, image synthesis and image-to-image translation.
A GAN consists of two neural networks trained at the same time. The generator produces synthetic samples, and the discriminator judges whether a sample comes from the real dataset or from the generator. Through this adversarial learning, the generator learns to produce more realistic outputs and the discriminator gets better at spotting generated ones.
A basic, unconditional GAN needs no labels: it learns from unlabelled images alone. Conditional GANs are different: pix2pix, for example, learns from pairs of images, such as a drawing and the photo it should become, which is why it suited image-translation tasks in architecture.
GAN Architecture: Generator and Discriminator
The architecture of a GAN is two networks wired in a loop. The generator takes a random noise vector z, drawn from a simple distribution p(z), and turns it into a synthetic sample G(z). The discriminator takes either a real sample x from the training data or a generated sample G(z), and outputs a probability D(x) between 0 and 1 that its input is real. Google's machine learning course describes the same structure in its overview of GAN structure.
In the DCGAN design, the template for most image GANs, the two networks mirror each other, as the official PyTorch DCGAN tutorial builds them:
Network | Input | Layers | Output |
|---|---|---|---|
Generator | A noise vector z | Transposed convolutions that enlarge the data step by step, with batch normalization and ReLU | An image, through a Tanh output layer |
Discriminator | A real or a generated image | Strided convolutions that shrink the image step by step, with batch normalization and LeakyReLU | One probability that the image is real |
How a GAN Is Trained, Step by Step
Training alternates between the two networks, batch after batch:
Train the discriminator: show it a batch of real images labelled real and a batch of the generator's images labelled fake, and update its weights so that it classifies both correctly.
Train the generator: pass new noise through the generator and then through the discriminator, and update only the generator's weights so that the discriminator is more likely to call its images real.
Repeat: each network's progress makes the other's task harder, so both keep improving; training is stopped when the generated images look right or stop improving.
The training objective is a minimax game between the two networks:

Where:
G(z; θg) is the generator, which maps a noise vector z to a generated sample; θg are its parameters.
D(x; θd) is the discriminator, which outputs the probability that its input x is real; θd are its parameters.
p_data(x) is the distribution of the real training data.
p_z(z) is the noise (latent) distribution the generator samples from.
The discriminator maximizes this value: it wants D(x) close to 1 for real images and D(G(z)) close to 0 for generated ones. The generator minimizes it by pushing D(G(z)) up. Early in training the generator is poor and log(1 − D(G(z))) gives it almost no gradient, so most implementations, the PyTorch tutorial included, train the generator to maximize log D(G(z)) instead: the so-called non-saturating loss.
GAN training is sensitive to hyperparameters such as the learning rate, the batch size and the balance between the two networks. Google's course lists the common failure modes: vanishing gradients when the discriminator becomes too good, mode collapse when the generator keeps producing the same few outputs, and failure to converge.
Types of Generative Adversarial Networks
Since the original GAN of 2014, researchers have proposed many variants to stabilize training, control what is generated and reach higher resolutions. All keep the adversarial idea; they differ in network design, loss and input. The table lists the best-known ones with their first paper on arXiv (checked on 30 October 2026).
Model | Year | First paper | What it changed |
|---|---|---|---|
GAN (original) | 2014 | The generator–discriminator framework and the minimax objective; unstable to train and prone to mode collapse | |
Conditional GAN (cGAN) | 2014 | Feeds both networks extra information, such as a class label, to control what is generated | |
LAPGAN | 2015 | Generates images coarse to fine across a Laplacian pyramid of resolutions, an early multi-scale GAN | |
DCGAN | 2015 | Convolutional generator and discriminator with a stable training recipe; the template for later image GANs | |
InfoGAN | 2016 | An information-theoretic term that makes parts of the input code control interpretable features, without labels | |
LSGAN | 2016 | A least-squares loss that reduces vanishing gradients | |
SRGAN | 2016 | Super-resolution with an adversarial loss, for sharper enlarged images | |
pix2pix | 2016 | Paired image-to-image translation with a conditional GAN (CVPR 2017) | |
WGAN and WGAN-GP | 2017 | The Wasserstein distance for smoother gradients; the gradient penalty (GP) replaces weight clipping | |
BEGAN | 2017 | An autoencoder as discriminator and an equilibrium term that balances the two networks | |
CycleGAN | 2017 | Unpaired image-to-image translation through cycle consistency | |
StarGAN | 2017 | Translation between many image domains with a single model | |
SAGAN | 2018 | Self-attention layers for long-range coherence across the image | |
ESRGAN | 2018 | An enhanced SRGAN with more realistic textures in upscaled images | |
BigGAN | 2018 | Large-scale class-conditional generation: high realism at a high computing cost | |
StyleGAN, StyleGAN2, StyleGAN3 | 2018–2021 | ||
GauGAN (SPADE) | 2019 | Turns a map of regions such as sky, trees and water into a photo-like image (CVPR 2019) | |
TransGAN | 2021 | Transformers instead of convolutions in both networks; mainly a research model |
What Are the Advantages of GANs?
The main advantage of GANs for image generation is high-quality images: once trained, a GAN produces sharp, realistic images, and it does so in a single forward pass, which also makes it fast.
Sharp, detailed results in image synthesis, super-resolution and image-to-image translation.
Fast generation after training: one pass through the generator, with no iterative sampling steps.
No labels needed for unconditional GANs; conditional models such as pix2pix need paired examples instead.
No explicit likelihood: the discriminator learns what "realistic" means, so the model can capture complex data without a written-down probability formula.
These strengths made GANs the leading approach to image generation until diffusion models overtook them in 2021.
What Are the Disadvantages of GANs?
The same adversarial setup that gives GANs their sharp images also makes them hard to train. The two best-known problems are mode collapse, where the generator produces only a few kinds of output and misses the rest of the data, and training instability, where the two networks never settle.
Sensitivity to hyperparameters such as learning rate, batch size and network design.
Hard to evaluate: no single metric captures both quality and variety.
Limited interpretability: what the networks learn is hard to explain.
Data hungry: stable, high-quality results need large and varied datasets; with too little variety the model generalizes poorly.
Less variety and weaker text control than diffusion models, one reason diffusion took over text-to-image generation.
Risk of misuse: realistic fakes, privacy problems and biases copied from the training data.
In architecture there is one more limit: a GAN outputs pixels, not geometry, so a plan or a facade it draws has no dimensions you can rely on (see the architecture section below).
Applications of GANs
GANs work best where data has to be generated, translated or enhanced, images above all. The table pairs each application with the models known for it.
Application | What the GAN does | Example models |
|---|---|---|
Image synthesis | Generates new images, such as faces, objects or textures, from noise | DCGAN, StyleGAN, BigGAN |
Image-to-image translation | Turns one kind of image into another: a drawing into a photo-like image, day into night, one style into another | pix2pix (paired), CycleGAN (unpaired), StarGAN |
Scene generation from a layout | Paints a photo-like scene from a map of regions such as sky, water and trees | GauGAN (SPADE) |
Super-resolution and restoration | Enlarges and sharpens low-resolution images by adding plausible detail | SRGAN, ESRGAN |
Face and attribute editing | Changes age, expression or hair while keeping the identity | StarGAN, StyleGAN |
Video retargeting | Transfers the content of one video into the style of another domain while keeping the frames consistent | |
Text-to-image | Generates images from a text description | StyleGAN-T, GigaGAN (2023); diffusion models lead this task today |
Data augmentation | Creates synthetic training examples, for instance for object detection when labelled data is scarce | Task-specific GANs |
Image-to-image translation is the application closest to architecture. Trained on pairs of drawings and finished images, a pix2pix-style model learns to turn simple drawings into realistic visuals, a task architects now know from sketch-to-render workflows in architecture, along with day-to-night changes, material swaps and style transfer.
GANs in Architecture: Projects and Limits
In building design, GANs worked on images: plans, facades and views drawn as pixels, not 3D models or CAD drawings. The best-documented projects date from 2018 to 2021, an early chapter of generative architecture. Because the network draws the picture instead of a physically based renderer, GAN image translation is also an early form of neural rendering.
Floor Plans: From pix2pixHD to ArchiGAN and House-GAN
At CAADRIA 2018, Zheng and Huang ("Understanding and Visualizing GAN in Architectural Drawings") trained pix2pixHD on floor plans drawn with a colour for each room, so that the model learned to generate room layouts as coloured images.
ArchiGAN, Stanislas Chaillou's Harvard thesis project (May 2019, summarised on NVIDIA's Technical Blog on 17 July 2019), chained three Pix2Pix models for an apartment building: the first generates the footprint, the second the room program and the windows, the third the furniture, and the architect can edit the result between steps.
House-GAN (Nauata et al., ECCV 2020) starts from a bubble diagram, a graph of rooms and the rooms they connect to, and generates house layouts as room boxes; House-GAN++ (CVPR 2021) refined the method.
Facades and Massing: FrankenGAN and Building-GAN
FrankenGAN (Kelly, Guerrero, Steed, Wonka and Mitra, 2018) adds facade and roof detail to simple mass models. Building-GAN (Chang et al., ICCV 2021) works in three dimensions: it generates volumetric building designs from a graph of the program.
Sketch, Massing and Landscape Images
The general-purpose translators can be trained the same way: pix2pix on pairs of sketches and finished images, CycleGAN without matching pairs, and GauGAN to paint a landscape from a map of regions such as sky, water and trees. Such models can turn simple drawings and massing views into stylized or photorealistic renders, the first steps toward today's AI architectural visualization. They are particularly effective during early design phases, where geometric precision is less important than visual communication and conceptual exploration.
GANs have also been used to generate synthetic architectural data: extra examples for training computer vision models when real images are scarce or hard to label.
What GAN Plans Could Not Do
Chaillou named ArchiGAN's own limits: load-bearing walls did not line up from one floor to the next, and the output was a raster image, not a vector drawing. The same holds for every model in this section: it outputs pixels that look like walls and rooms, without dimensions, scale or structure. The architect stays in the loop, which is also the realistic answer to whether AI will replace architects.
AI image tools still return pixels. ArchiVinci's Floor plan module restyles a 2D plan image in one of four styles (3D view, Marker, Solid color or Drawing), which is how you color a floor plan with AI; it does not measure the plan.

Example from our floor plan coloring page, made in the Floor plan module. Left: the uploaded picture of a plan sketched on paper. Right: the result of the Drawing style with the prompt left empty, an image with the same rooms that is not measured.
For a plan you can measure and edit, draw it in Floor Plan Maker: walls, doors, windows and rooms with their areas, wall lengths and furniture dimensions shown as you draw, like in a CAD program, dimension lines, a 3D view and export to DXF, SVG, PDF or PNG, free in desktop browsers. It can also rebuild an existing plan image or PDF as an editable plan with AI (1 credit on a free account, refunded if the conversion fails).

From Research Models to Browser Tools
You no longer have to train a model to turn a sketch into an image. In ArchiVinci, a browser app, you upload a sketch, a 3D model view or a photo, describe materials and light in an optional prompt, and the default engine generates a new image that follows your upload, in seconds. The default engine, ArchiVinci 4.0, keeps the perspective and geometry of your upload, and every run gives a new variation, so run it again for another option or refine a detail in the Edit module. Examples are on the AI render generator page; a new account starts with 3 free credits, and commercial use needs an active plan.
Turn a sketch or massing view into a render Upload a sketch, a massing view or a photo and name the style and materials in a sentence: ArchiVinci generates a photorealistic version that follows your image, in seconds. A new account starts with 3 free credits. |
How Do GANs Compare to Other Generative Models?
GANs differ from other generative models in how they learn and how they generate. Diffusion models start from noise and remove it over many steps; autoregressive models such as PixelRNN (2016) generate an image one element at a time; a GAN produces the whole image in one pass. For the full comparison, see our guide to diffusion models.
Aspect | GANs | Diffusion models | Autoregressive models |
|---|---|---|---|
How they learn | A generator and a discriminator trained against each other | A network learns to remove noise added to training images | A network learns to predict the next element, a pixel or a token |
How they generate | One forward pass from a noise vector | Many denoising steps; distilled models need 1 to 4 | One element after another, so large images take longer |
Typical trade-off | Fast and sharp, but unstable training and less variety | Stable training and varied, high-quality images; slower without distillation | Fine control of local detail; slow for images |
The 2021 paper "Diffusion Models Beat GANs on Image Synthesis" by Dhariwal and Nichol marked the turning point: since then diffusion models have led image-generation research, and GANs have moved into supporting roles.
Are GANs Still Used in 2026?
Yes, as of October 2026, but mostly in supporting roles rather than as the main image generator:
Upscaling and restoration: SRGAN and ESRGAN trained super-resolution networks with an adversarial loss, and upscalers built on the ESRGAN design are still shared and used to enlarge images. Our guide to AI upscaling explains what an upscaler can and cannot add to an architectural image.
Text-to-image GANs: StyleGAN-T and GigaGAN (CVPR 2023) showed that GANs can be scaled up to generate images from text.
Adversarial training inside diffusion models: Adversarial Diffusion Distillation (2023), the method behind SDXL Turbo, uses a discriminator so that a diffusion model can produce an image in one to four steps.
Synthetic training data: GANs remain one way to create extra examples for training other models when real data is scarce.
Key Takeaways
A GAN is two neural networks trained against each other: a generator that creates samples from noise and a discriminator that judges whether they are real.
GAN architecture usually means this structure; in the DCGAN design the generator enlarges the data with transposed convolutions and the discriminator shrinks the image with strided convolutions.
Training alternates between the two networks; mode collapse, instability and sensitivity to hyperparameters are the classic problems.
The main GAN types run from the original GAN (2014) through DCGAN, WGAN, pix2pix, CycleGAN and StyleGAN to GigaGAN (2023).
In architecture, GANs drew plans (ArchiGAN, House-GAN), facade detail (FrankenGAN) and building volumes (Building-GAN), always without dimensions you can rely on.
Diffusion models overtook GANs in 2021; GANs remain one of the AI rendering algorithms worth knowing, now mainly in upscalers, fast generators and adversarial training.
Try it in ArchiVinci
Describe a building in a sentence, or upload a sketch or a 3D model view: ArchiVinci generates concept images that follow it. A new account starts with 3 free credits.
For early design concepts: AI concept design
Render a sketch, photo or model view: AI rendering
Frequently Asked Questions
What Is the Main Advantage of GANs for Image Generation?
High-quality images. A trained GAN produces sharp, realistic images, and because it needs only one pass through the generator, it is also fast.
What Are the Two Parts of a GAN?
The generator, which turns random noise into new samples, and the discriminator, which judges whether a sample is real or generated. They are trained together, each against the other.
What Is ArchiGAN?
ArchiGAN is Stanislas Chaillou's 2019 Harvard thesis project: a chain of three Pix2Pix models that generates an apartment building's footprint, then its rooms and windows, then its furniture, with the architect editing between steps. Its output is an image, not a vector drawing.
When should GANs be preferred over diffusion or transformer-based generative models?
When fast generation and sharp detail matter more than variety or text control, as in super-resolution, some image-to-image tasks and real-time uses with a narrow, well-defined kind of image. For general text-to-image generation, diffusion models have been the stronger choice since 2021.
Can GANs be reliably used for tasks requiring geometric or spatial accuracy?
No. A GAN outputs pixels, not geometry, so it suits visual realism, not metric accuracy. For a plan with real dimensions, draw it in a plan tool such as Floor Plan Maker, which shows wall lengths and furniture dimensions as you draw, like a CAD program.
How does dataset quality affect GAN training outcomes and output realism?
Strongly. A small, biased or repetitive dataset leads to mode collapse and unrealistic results, and a GAN cannot generate kinds of images its training data lacked.
Are GANs Used Together with Diffusion Models?
Yes. Adversarial Diffusion Distillation trains a diffusion model against a discriminator so that it needs only a few steps, and upscalers of the ESRGAN family are used to enlarge images made by other models.
