How to Spot Fake AI Photos | Hany Farid | TED
How do you know if that shocking photo in your feed is real, or just another AI fake? Digital forensics expert Hany Farid explains how he helps journalists, courts and governments find structural errors in AI-generated images, offering four practical tips everyday individuals can use when facing the internet’s war on reality. (Recorded at TED2025 on April 10, 2025)
Watch on YouTube →Transcript
- 00:03You are a senior military officer
- 00:06and you've just received a chilling message on social media.
- 00:11Four of your soldiers have been taken,
- 00:14and if demands are not met in the next ten minutes,
- 00:17they will be executed.
- 00:19All you have to go on is this grainy photo,
- 00:22and you don't have the time to figure out
- 00:24if four of your soldiers are, in fact, missing.
- 00:27What's your first move?
- 00:30If I may be so bold,
- 00:32your first move is to contact somebody like me and my team.
- 00:37I am by training an applied mathematician and computer scientist.
- 00:40And I know that seems like a very strange first call at a moment like this,
- 00:44but I have spent the last 30 years developing technologies
- 00:48to analyze and authenticate digital images and digital videos.
- 00:54Along the way,
- 00:55we've worked with journalists, with courts and with governments
- 00:59on a range of cases
- 01:01from a damning photo of a cheating spouse,
- 01:05gut-wrenching images of child abuse,
- 01:08photographic evidence in a capital murder case,
- 01:11and of course, things that we just can't talk about.
- 01:16It used to be a case would come across my desk once a month.
- 01:21And then it was once a week.
- 01:23Now, it's almost every day.
- 01:26And the reason for this escalation is a combination of things.
- 01:30One, generative AI.
- 01:33We now have the ability to create images
- 01:35that are almost indistinguishable from reality.
- 01:38Two, social media dominates the world
- 01:43and is largely unregulated
- 01:45and actively promotes and amplifies lies and conspiracies
- 01:49over the truth.
- 01:51And collectively, this means that it is becoming harder and harder
- 01:55to believe anything that we read, see or hear online.
- 02:00I contend that we are in a global war for truth
- 02:06with profound consequences for individuals,
- 02:09for institutions, for societies, and for democracies.
- 02:14And I'd like to spend a little time talking today
- 02:17about what my team and I are doing
- 02:19to try to return some of that trust to our online world
- 02:22and in turn, our offline world.
- 02:26For 200 years, it seemed reasonable to trust photographs.
- 02:30But even in the mid 1800s,
- 02:33it turns out the Victorians had a sense of humor.
- 02:36They manipulated images.
- 02:38Or you could alter history.
- 02:40If you fell out of favor with Stalin, for example,
- 02:43you may be airbrushed out of the history books.
- 02:47But then, in the turn of the millennium,
- 02:50with the rise of digital cameras
- 02:52and photo-editing software,
- 02:54it became easier and easier to manipulate reality.
- 02:58And now, with generative AI,
- 03:01anybody can create any image of anything, anywhere,
- 03:05at a touch of a button.
- 03:07From four soldiers tied up in a basement
- 03:12to a giraffe, trying on a turtleneck sweater.
- 03:15(Laughter)
- 03:20It's not fun and games, of course,
- 03:22because generative AI is being used to supercharge past threats
- 03:26and create entirely new ones.
- 03:29The creation of nudes of real women and children
- 03:32used to humiliate or extort them.
- 03:35Fake videos of doctors promoting bogus cures for serious illnesses.
- 03:42A Fortune 500 company losing tens of millions of dollars
- 03:46because an AI impersonator of their CEO infiltrated a video call.
- 03:52Those threats are real,
- 03:53they are here, and we are all vulnerable.
- 03:58Before we talk about how we would analyze this image
- 04:01to determine if it's real or not,
- 04:02it's useful to understand how generative AI works.
- 04:06Starting with billions of images with a descriptive caption like this,
- 04:11each image is degraded until nothing but visual noise is left.
- 04:16A random array of pixels.
- 04:18And then the AI model learns how to reverse that process
- 04:24by essentially turning that noise
- 04:27back into the original image.
- 04:30And when this process is done, not once, not twice,
- 04:33but billions of times on a diverse set of images,
- 04:37the machine has learned how to convert noise
- 04:40into an image that is semantically consistent with anything you type.
- 04:45And it's incredible.
- 04:47But it is decidedly not how a natural photograph is taken,
- 04:51which is the result of converting light that strikes an electronic sensor
- 04:54into a digital representation.
- 04:57And so one of the first things we like to look at
- 04:59is whether the residual noise in an image
- 05:02looks more like a natural image
- 05:04or an AI-generated image.
- 05:06Here, for example, is our real dog and our AI dog.
- 05:10And here is the residual noise that I've extracted.
- 05:14And if you look at this,
- 05:15it's not at all obvious that there's any difference between those two patterns.
- 05:19But here, in this visualization of the noise,
- 05:21you can see a decidedly different pattern
- 05:24between the natural and the artificial.
- 05:26Those star-like patterns are a telltale sign of generative AI.
- 05:31Now, for the mathematicians and the physicists in the audience,
- 05:35that is the magnitude of the Fourier transform of the noise residual.
- 05:38For everybody else, that detail doesn't matter,
- 05:40but you definitely should have taken more math in college.
- 05:43(Laughter)
- 05:45Professors can't help themselves.
- 05:47So let's apply this analysis to this image.
- 05:50Here's the noise residual that I've extracted.
- 05:53And there is that star-like pattern that you see in the bottom right.
- 05:56Our first suggestion that something may be wrong here.
- 06:01But no forensic technique is perfect.
- 06:03And so you don't stop after one thing,
- 06:05you keep going.
- 06:06So let's go on to our next one, the vanishing points.
- 06:10If you image parallel lines in the physical world,
- 06:13they will converge to a single point, what's called the vanishing point.
- 06:17A good intuition for that, the railroad tracks.
- 06:20When I took this photo, the railroad tracks are obviously parallel,
- 06:23but you can see that they narrow as they recede away from me
- 06:27and intersect at a single vanishing point.
- 06:29This is a phenomenon that artists have known for centuries.
- 06:32But here's the great thing.
- 06:33AI doesn't know this.
- 06:36Because AI is fundamentally, as I just described,
- 06:39a statistical process.
- 06:41It doesn't understand the physical world, the geometry and the physics.
- 06:44So if we can find physical and geometric anomalies,
- 06:47we can find evidence of manipulation or generation.
- 06:52Here in this image, I've annotated four parallel lines
- 06:55on the parallel sides of the wall in our basement photo,
- 06:58and you can see a lack of a coherent vanishing point.
- 07:02That suggests a physically implausible scene.
- 07:06Evidence number two.
- 07:08Alright, what else can we learn?
- 07:10Surprisingly, shadows have a lot in common with vanishing points.
- 07:14Here, what I've done is I've annotated a point on a shadow
- 07:18with the corresponding part on the bottom of the rail
- 07:21that is casting that shadow.
- 07:22And I've extended those lines outwards.
- 07:25And they intersect, not at a vanishing point,
- 07:28but at the light that is casting that shadow.
- 07:32And again, this is a physical phenomena that you expect in natural images.
- 07:36And because AI fundamentally doesn't model the physics
- 07:39and the geometry of the world,
- 07:41it tends to violate these physics.
- 07:44Let's apply this analysis to our image.
- 07:47Here I've annotated four shadows on the bottom
- 07:50from the soldiers' shadows to their legs.
- 07:53And you can see that the lines aren't even close to intersecting.
- 07:57Not one, not two, but three anomalies.
- 08:02We now have a very good indication that this image is not authentic.
- 08:08The most important thing I want you to take away from this
- 08:12is that while it may not be easy,
- 08:14it is possible to distinguish what is real from what is fake.
- 08:20I think this image is a bit of a metaphor for how a lot of us feel.
- 08:26We feel like hostages.
- 08:29We don't know what to trust anymore.
- 08:31We don't know what is real.
- 08:33What is fake.
- 08:35But we don't have to be hostages.
- 08:38We don't have to succumb to the worst human instincts
- 08:42that pollute our online communities.
- 08:45We have agency, and we can effect change.
- 08:49Now, I can't turn you all into digital forensics experts in ten minutes.
- 08:56But I can leave you with a few thoughts.
- 08:58One, take comfort in knowing
- 09:02that the tools that I've described and that my team and I are developing
- 09:05are being made available to journalists, to institutions,
- 09:09to the courts to help them tell what's real and fake,
- 09:12which in turn helps you.
- 09:14Two, there is an international standard
- 09:16for so-called content credentials
- 09:19that can authenticate content at the point of creation.
- 09:23As these credentials start to roll out, they will help you, the consumer,
- 09:27figure out what is real and what is fake online.
- 09:30And while they won't solve all of our problems,
- 09:33they will absolutely be part of a larger solution.
- 09:37Three, please understand
- 09:40that social media is not a place to get news and information.
- 09:45(Applause)
- 09:52It is a place that Silicon Valley created to steal your time,
- 09:57your attention,
- 09:59by delivering you the equivalent of junk food.
- 10:03And like -- thank you.
- 10:05(Applause)
- 10:06And like any bad habit, you should quit.
- 10:09(Laughter)
- 10:10And if you can't quit,
- 10:12at least do not let this be your primary source of information,
- 10:15because it is simply too riddled with lies and conspiracies
- 10:20and now AI slop,
- 10:21to be even close to being reliable.
- 10:24Four.
- 10:26Understand that when you share false or misleading information,
- 10:30intentionally or not, you're all part of the problem.
- 10:34Don't be part of the problem.
- 10:35There are serious, smart,
- 10:37hard-working journalists and fact-checkers out there
- 10:39who work every day,
- 10:41because I talk to them every day,
- 10:43to sort out the lies from the truths.
- 10:45Take a breath before you share information,
- 10:49and don't deceive your friends and your families and your colleagues,
- 10:52and further pollute the online information ecosystem.
- 10:57(Applause)
- 11:02We're at a fork in the road.
- 11:05One path, we can keep doing what we've been doing for 20 years,
- 11:09allowing technology to rip us apart as a society,
- 11:13sowing distrust, hate, intolerance.
- 11:17Or we can change paths.
- 11:19We can find a new way to leverage the power of technology to work for us
- 11:24and with us, and not against us.
- 11:28That choice is entirely ours.
- 11:30Thank you.
- 11:31(Applause)
- 11:39Latif Nasser: We're doing rapid-fire questions, you ready?
- 11:42Roughly what percent of images online do you believe to be fake?
- 11:46Hany Farid: Depends on the platform.
- 11:47Signal-to-noise ratio is getting close to one.
- 11:50Stay off of Twitter, of X, and stay off of everything else for that matter.
- 11:53LN: So what do you think?
- 11:54HF: I would say we're getting close to 50 percent.
- 11:57LN: Can you differentiate between things that have, like,
- 12:00Instagram or TikTok filters or Photoshop versus fully AI generated images?
- 12:04HF: Yes, but it's becoming increasingly more difficult.
- 12:08LN: Are there any websites a layperson can use to check?
- 12:10HF: No.
- 12:12By the way, this is a secondary problem,
- 12:14which is now people are creating fake things,
- 12:16then going to fake sites to authenticate them.
- 12:19And it's all getting very weird, don't do it.
- 12:21LN: Last one, most important one.
- 12:22In CSI crime shows, when they say enhance,
- 12:25can you do that?
- 12:26(Laughter)
- 12:27HF: Yes.
- 12:28LN: OK, great. Hany Farid, everybody.