Real Face vs. AI-Generated Fake: The Science Behind GANs (2024)

We’ve seen great advancements in artificial intelligence in the past two decades. AI has applications in a wide array of industries like healthcare, fashion, education, agriculture and will no doubt continue to act as a major digital disruptor.

As Andrew Ng putit: “Just as electricity transformed almost everything 100 years ago, today I actually have a hard time thinking of an industry that I don’t think AI will transform in the next several years.”

However, bad actors can misuse AI easily. Let’s look at an application of AI that’s been used to trick people and spread misinformation: AI-generated images, some of which we calldeepfakes.

What Are Deepfake Images?

Deepfakes (a portmanteau of “deep learning” and “fake”) are highly convincing fake videos and images created by AI neural networks.

Deepfakes and AI-Generated Photos

In the past few years, deepfakes began takingthe internet — and the real world — by storm and, in 2020,deepfakes went mainstream. We see deepfakes in ads and TV shows, but someuse them to spread mis- and disinformation. While many videos are harmless, others have caused a great deal of vexationwhen faces of politicians are made to look like they’re saying and doing things they haven’t said or done.

While you may be familiar with deepfake videos, you may not know that deepfakes can be still images, too. AI deep learning models are indeed capable of generating fake faces that look almost identical to real people. These programs have become really strong over the years, and it’s almost impossible to distinguish between a real face and an AI-generated fake.

Can you tell which one of these faces is real and which one is AI-generated?

Real Face vs. AI-Generated Fake: The Science Behind GANs (1)

The face on the right is real. An AI application generated the photo on the left. Did you guess right?

More From Built In ExpertsHow to Spot a Deepfake

GANs: The Technology Behind AI-GeneratedImages

Deepfakes can begenerated by a class of machine learning models called GANs (generative adversarial networks). Researcher Ian Goodfellow and his colleagues designed GANs in 2014.

How Do GAN Images Work?

Two neural networks compete against each other. The first network (the generator) generates fake images based on an existing image data set. The second network (the discriminator) learns to identify the difference between real and computer-generated images.

The generator’s job is to trick the discriminator into believing the images are real. This way, as the discriminator gets better at identifying AI-generated images, the generator produces more and more realistic images to trick the discriminator.

This is why they’re adversaries: As one network gets better, so does the other.

The GAN remains one of the most fascinating innovations in deep learning. In fact, Yann LeCun, Meta’s chief AI scientist, called GANs “the most interesting idea in ML in the last 10 years.”

Back to BasicsAI vs. Machine Learning vs. Deep Learning: What’s the Difference?

Now You Try: Real Faces vs. GAN-Generated Images

Real Face vs. AI-Generated Fake: The Science Behind GANs (2)

As we now know, GAN-generated images can be very convincing. Neural networks have become alarmingly good at creating realistic human faces. Given the high stakes are for both personal and national security, it’s important for us to be able to distinguish between real faces and those generated by GANs. So how do we do that? Practice, practice, practice.

Inspired by thispersondoesnotexist.com, I created an application to quiz you on whether you can tell a real person’s face from a fake one. I used the one million fake face data set to get GAN-generated images for this project, and Kaggle’s UTKFace data set for the real images.

Try identifying which of the images are real faces and which ones are GAN-generated.

Real Face vs. AI-Generated Fake: The Science Behind GANs (3)

In essence, you’ll be acting as a GAN discriminator. Just as the discriminator gets better at identifying AI-generated images over time, so will you.

Real Face vs. AI-Generated Fake: The Science Behind GANs (2024)
Top Articles
Latest Posts
Article information

Author: Domingo Moore

Last Updated:

Views: 5986

Rating: 4.2 / 5 (53 voted)

Reviews: 92% of readers found this page helpful

Author information

Name: Domingo Moore

Birthday: 1997-05-20

Address: 6485 Kohler Route, Antonioton, VT 77375-0299

Phone: +3213869077934

Job: Sales Analyst

Hobby: Kayaking, Roller skating, Cabaret, Rugby, Homebrewing, Creative writing, amateur radio

Introduction: My name is Domingo Moore, I am a attractive, gorgeous, funny, jolly, spotless, nice, fantastic person who loves writing and wants to share my knowledge and understanding with you.