A generative adversarial network is a pair of neural networks trained in opposition: one generates candidate content, the other judges whether it looks real, and both improve until the generator’s output passes. For roughly a decade it was how deepfake face synthesis was done.
For a fraud team, how it trains matters less than what it leaves behind. Each generation architecture produces a characteristic trace, and the trace is the part you can act on. Our explainer on how deepfakes work covers it end to end.
What Is a Generative Adversarial Network?
To understand Generative Adversarial Networks (commonly called GANs), think of them as a game of cat and mouse between two AI competitors that make each other better.
Here is how it works in everyday terms:
- The Forger (The Generator): This network tries to create something out of nothing. It takes random “noise” as input and tries to paint, design, or generate a realistic image.
- The Detective (The Discriminator): This network inspects the results. It gets fed a mix of actual, real-life images and the Generator’s “fake” creations, and its sole job is to guess which is which.
They are locked in a continuous loop: whenever the Generator fools the Detective, the Detective studies its mistake to get smarter. Whenever the Detective catches a fake, the Generator learns exactly what gave it away and adapts. Both of them train and improve together.
Two Ways the Game Breaks
While this setup is brilliant, it is also notoriously difficult to manage. Two common issues often occur:
- Training Instability (The Out-of-Sync Rivalry): Because the two systems are constantly reacting to one another, they can easily fall out of balance. Instead of getting smarter, they might fail to converge entirely, causing the generated results to rapidly degrade into chaotic mess.
- Mode Collapse (The “One-Trick Pony”): Sometimes, the Generator figures out one very specific trick (like a particular face or object) that always tricks the Detective. Rather than exploring and creating new things, it gets lazy and just generates endlessly repetitive variations of that same handful of successful images.
Why Are They Used?
What made GANs so revolutionary when they first arrived was sharpness.
Before they came along, standard AI generation models tended to output fuzzy, averaged-out, and blurry images. But because the Generator is constantly trying to beat a sharp-eyed “critic” (the Detective), it is forced to get every tiny, realistic detail right. It can’t get away with blur, because that’s exactly the kind of flaw a critic will notice and reject immediately.
What a Generative Adversarial Network Leaves Behind
Adversarial training leaves a signature in the frequency domain: regular, almost periodic patterns arising from the upsampling operations that build an image from a compact representation.
No human sees them. A model learns them easily, and they became the backbone of a whole generation of detectors on that strength alone.
They also age badly. A fingerprint specific to one architecture’s internals disappears when the architecture changes, and a detector keyed to it is reading a signal that is no longer there.
Our breakdown of how deepfakes work covers the generation side in more detail, and the applied case of spotting an AI-generated selfie shows what survives of these signatures in a real submission.
How Does a Generative Adversarial Network Differ From Diffusion and Autoencoders?
Organise by output rather than by training method and the comparison becomes useful.
Autoencoder Face Swaps
An autoencoder compresses an input into a compact representation and reconstructs it. A variational autoencoder does the same while learning a smoother, more continuous representation, which makes interpolation between faces possible.
The face-swap application uses a shared encoder with two decoders, one trained per identity, so a face encoded from one person can be reconstructed as another.
This is the architecture that made consumer face swapping practical, and its artifacts are the most visible of the three.
Seams at the hairline and jaw, where the swapped region meets the original frame. Skin tone and lighting that do not match between the face and the rest of the head. Resolution differences, because the swapped region is generated at a fixed size and composited into whatever the source video was shot at.
And temporal flicker, as the reconstruction varies slightly frame to frame.
Our guide to spotting a deepfake covers which of these a person can see.
Diffusion Models
A diffusion model starts from noise and removes it step by step toward a target description, learning to reverse a gradual corruption process.
It trains against a likelihood objective rather than an adversary, which avoids the instability and mode collapse that affect adversarial training. The output is more diverse and more controllable.
Generation is slower, because it is iterative rather than a single forward pass. Latent diffusion addresses that by running the process in a compressed representation instead of at full pixel resolution, which is how diffusion became practical for face synthesis at scale.
The crossover happened earlier than the popular timeline puts it. Dhariwal and Nichol established diffusion as the state of the art for image synthesis in Diffusion Models Beat GANs on Image Synthesis, published at NeurIPS in 2021, reporting Frechet Inception Distance scores of 2.97 on ImageNet at 128 by 128 and 4.59 at 256 by 256.
What arrived later was access rather than capability. The deepfakes people now recognize came out of that access wave. The quality threshold was crossed in research in 2021 and the consumer-facing tools followed, which matters here because a detector built against the generators of 2020 was already behind before most people had heard the word diffusion.
Where Diffusion Artifacts Actually Appear
Diffusion artifacts matter more for detection than the architecture does, and where they sit explains a decade of detector obsolescence in one observation.
Diffusion models do not leave the frequency fingerprints a generative adversarial network leaves. The traces shift to different parts of the spectrum entirely, and there are fewer obvious high-frequency artifacts to find.
Where diffusion fails instead is fine semantic detail. Hands with the wrong number of fingers or implausible joints. Teeth that merge or multiply. Jewellery that changes shape across a frame. Text in the background that resolves into letter-like shapes without being words.
Those are not signal-processing artifacts. They are failures of understanding, and a detector built to find periodic frequency patterns has no mechanism for noticing them.
First-Order Motion Models
A first-order motion model animates a still photograph using the motion from a driving video. It needs one source image of the target and modest hardware, and it runs live, which is what put the one-photograph attack within reach of people who could not train anything.
Its traces are their own kind: motion plausible in isolation but inconsistent with the still’s original geometry, and a face that moves while the scene behind it stays inert.
The architecture matters less now than the capability it introduced. General-purpose generative models have since learned to do the same thing, so a live puppet driven from a single profile picture is no longer evidence that this particular family produced it.
What a verification flow has to assume is simpler: one public photograph is enough source material, whoever’s pipeline it goes through.
What Each Architecture Costs an Attacker
Cost decides prevalence, and prevalence decides what your verification flow actually meets. Nobody spends a week of training time to open a low-value account.
Data, Compute and Time
| Architecture | What the attacker needs | Real-time capable |
|---|---|---|
| Autoencoder face swap | Many images of both identities, a training run, hours to days | Only after training, and with effort |
| Generative adversarial network | A pretrained model; training one from scratch is expensive | Varies by implementation |
| Diffusion model | A pretrained model and a prompt; no training required | Not usually, generation is iterative and slow |
| First-order motion model | One photograph of the target and consumer hardware | Yes |
The columns tell a story the row labels do not, and it is the right-hand one that should change how a verification flow is designed, because real-time capability is what turns a technique from a forgery problem into a live-session problem.
Why Cost Predicts Prevalence
An attack requiring a training run on paired data is a different risk from one requiring a single public photograph.
The first is available to someone with time, skill and a specific target worth the investment. The second is available to anyone, against anyone, at scale, which is the economics behind most synthetic identity fraud.
What the Architecture Tells a Detector
The mapping above can be read two ways, and only one of them is safe to publish.
The Architecture-to-Artifact Table
| Architecture | Characteristic trace | Where it appears | What removes it |
|---|---|---|---|
| Autoencoder face swap | Boundary seams, tone and lighting mismatch, resolution discontinuity, temporal flicker | The edge of the swapped region, and across frames | Heavy compression, low resolution, careful post-processing |
| Generative adversarial network | Regular, almost periodic patterns from upsampling | The frequency domain, invisible in the image | Resampling, recompression, a change of architecture |
| Diffusion model | Fine semantic failures: hands, teeth, jewellery, background text | Small high-detail regions | Cropping away the affected region; improved models |
| First-order motion model | Motion inconsistent with the still’s geometry; an unreacting background | The relationship between face and scene | A driving video closely matched to the source still |
What the Artifact Mapping Is Good For
The architecture-to-artifact mapping describes what each generation family tends to leave behind. It is not a triage procedure, and treating it as one is the mistake worth naming.
Two reasons. A fraud analyst looking at a flagged session is looking at compressed, resized, re-encoded material, and most of those traces are exactly what compression removes first. And a trace that is present proves far less than its absence disproves: careful post-processing removes boundary seams, and an improved model stops producing bad hands.
So the table is useful for understanding why detectors are built the way they are. It is a poor substitute for one.
HyperVerge is an AI-powered identity verification platform built for digital onboarding, fraud prevention, and deepfake detection across fintech and banking. We’re seeing professional grade deepfakes in production, sometimes as high as 1% of the total application volumes. For high volume customers, that is a lot.
“Face swapping, the old kind and the kind still turning up now, is mostly powered by GANs. That’s the older technique. Diffusion is the newer one and it keeps getting better, which is the direction all of this is moving in. Our models have to cover the lot: the generative tools anyone can open in a browser, the legacy face swaps and face merges, the live-streamed ones, and content that’s wholly AI-generated with no real person in it anywhere.”
Harsh Malani, Machine Learning Engineer II, HyperVerge
As a buyer, you don’t need to worry about how the detector catches fakes under the hood. What actually matters is coverage: making sure the tool can catch a wide variety of different AI models and deepfake styles.
Why This Mapping Decays
One caveat belongs alongside that mapping permanently, whichever way it is framed.
Every trace in that table is a property of a particular way of generating images, not a property of synthesis itself. When the generation family changes, the trace changes with it, and a detector trained on the old trace degrades.
That is not a hypothetical.
ASVspoof 5, the current speech spoofing benchmark, now generates its attacks against surrogate detection models before submitting them, so that the attacks are already optimized against detection. And the DF26 benchmark, published in September 2026, found state-of-the-art video detectors performing close to random chance on output from seven modern generators.
The conclusion we draw from that decay is about layering rather than about models.
A control that does not depend on recognizing the generator does not decay with it. Capture integrity is that control: an injected stream is detectable by the route it took regardless of which architecture produced the content inside it, which is where face liveness sits in the stack.
We are one of very few companies globally to have completed CEN/TS 18099 injection attack detection testing.
Our two-part content for deepfakes and image injection covers how the attack reaches a capture path.
If you want to see where those layers sit in a working onboarding flow, talk to our team.
FAQs
What is a generative adversarial network?
A generative adversarial network is a pair of neural networks trained in opposition. One generates candidate content and the other judges whether it looks real, with each network’s failure serving as the other’s training signal. The arrangement produces sharp output and is prone to training instability and mode collapse.
How does a GAN differ from a diffusion model?
A generative adversarial network trains against a critic network; a diffusion model trains to reverse a gradual noising process against a likelihood objective. Diffusion avoids instability and mode collapse, produces more diverse and controllable output, and generates more slowly because the process is iterative.
What is mode collapse?
Mode collapse occurs when a generator finds a narrow set of outputs that reliably fool its discriminator and stops exploring. The result is many generated samples that are small variations of very few underlying images, which reduces diversity without necessarily reducing apparent quality.
What artifacts does a generative adversarial network leave?
Regular, almost periodic patterns in the frequency domain, arising from the upsampling operations that build an image from a compact representation. They are invisible to a person and easy for a model to learn. That is what made them the basis of a generation of detectors, and also why those detectors aged badly.
Why do diffusion models get hands wrong?
Because their failures are semantic rather than signal-level. Diffusion produces fewer obvious frequency artifacts than adversarial training does, and instead struggles with fine high-detail structure that requires understanding: finger count and joint plausibility, teeth, jewellery, and small text in the background. Each model generation narrows the gap.
How is an autoencoder used in a [face swap](https://hyperverge.co/blog/how-to-spot-a-deepfake/)?
A shared encoder compresses faces into a common representation, and two decoders are trained, one per identity. A face encoded from the source is then reconstructed by the target’s decoder, producing the target’s face wearing the source’s expression and pose. The method needs a large image set of both people first.
What is a first-order motion model?
A first-order motion model animates a still photograph using motion extracted from a driving video. It needs a single source image, modest compute, and runs in real time. It introduced the live puppet built from one profile picture, though general-purpose generative models now reach the same result by other routes.
Can a deepfake be made from one photograph?
Yes. A first-order motion model requires only one image of the target plus a driving video of someone performing. Talking-head generation approaches do the same from a photograph and an audio track, which means any public profile picture is sufficient source material.
