Artificial intelligence is emerging as the next frontier in fake news — and it just might make you second-guess everything you see.

Can you imagine a world where you see a video of a world leader engaged in some kind of damning act, but you can't tell whether it's real or a completely computer-generated fake?

What about a world where pretty much anyone could make that fake video on a regular computer using free tools?

It might sound like science fiction, but at least one respected researcher has dropped everything to warn the world that we're hurtling towards that reality.

We'll meet him later — but first let's put your fake-detecting skills to the test.

(We're going to start off pretty easy, but be warned: this may get a little weird.)

Which of these videos is fake?

If you guessed Trump, you're correct.

That's a snippet from a fake video created by a YouTube user called Derpfakes.

Okay, so some random person on the internet put Trump's face onto Alec Baldwin. So what? Huw Parkinson does that on Insiders every week and democracy hasn't crumbled.

Well, what's different about this is 'Derpfakes' didn't painstakingly fake this footage by hand — artificial intelligence did it for him. And that's where things start to get a little confusing and a little scary.

Stop for a moment and look at Donald Trump's face in the video below. It's not a photograph, it's not manipulated footage, it's a wholesale computer-generated creation of his face. This is what's known as a deepfake. All you have to do to make one is feed the computer a series of portraits of Trump's face and it figures out how to swap it onto someone else.

On close inspection, you might conclude it's not very convincing. Fair enough — we did say we were starting easy.

So what's around the corner?

'Derpfakes' is using machine learning software that made its way into the public domain via the dark corners of the internet, where it was unsurprisingly being used to make fake celebrity porn. The exact origins of that software are unknown, but it mirrors the kinds of research happening in top universities and the R&D departments of major tech companies.

Researchers are making continuous advances in this area. In May, Christian Theobalt, a Professor at the Max-Planck-Institute for Informatics, released a video on YouTube that shows just how far the technology has come.

Which of these videos is fake?

The woman with the red T-shirt is what the researchers call a Deep Portrait.

With this tech, it's not just the face that's been faked — the whole scene is AI-generated.

As with the Trump example, all they need to do is feed the computer some source imagery and it can create a fake that mimics it.

Here's real video of the woman that Professor Theobalt and his colleagues used to create the footage side by side with the fake.

Still too easy? Try this one

Actually neither of these is a Deep Portrait, they're both real videos.

If you didn't pick that they were real, you were probably beginning to try to apply a logic as to why one was real and the other wasn't.

Both of these men were used by the researchers to create deep portraits. You can see how the researchers use the man against the green background to create a deep portrait of Barack Obama.

What about someone you may recognise. Which of these world leaders is fake?

That's not the real Theresa May, but it is the real Vladimir Putin.

If you're interested to see how good these fakes are, here is the real Theresa May (L), alongside the deep portrait of her (R):

Now, remember that footage of Barack Obama we showed you at the top of the story, alongside the fake Donald Trump?

That video of Mr Obama is also from Professor Theobalt and his colleagues. One of the things they do to see how well their 'Deep Portrait' technology performs is to use the video they're faking as the source video to test how accurate it is.

Here's the test they did on Mr Obama:

Which of these Obamas is the computer-generated fake?

If you guessed the second video, you're correct. But the real question is: Which of those videos did we use at the top of the story?

Was it the real one or was it the fake? And would you have spotted the fake in that context?

(The video at the top was the fake one...)

If at the moment you're feeling frustrated and a little confused, then that's the point.

Even if you guessed correctly on every video in our quiz, imagine having to apply that much scrutiny to every piece of video you see.

We're used to being able to rely on footage like this to navigate the world, we're used to turning on the TV or looking on Facebook and seeing footage of someone saying something and not having to question it.

It's this trust that has allowed the rise of mass media broadcasters — even if people on TV said things you didn't agree with, you could at least be sure they were the people saying it.

Why does this matter?

Picture this: a story emerges about a US president getting up to no good in a Russian hotel. Then, some footage of the incident follows. It's poor quality, shaky, pixelated.

The president declares it's fake news and the footage itself is a hoax, made by machine learning.

Up to now, video footage (often grainy) has been the deciding point of proof that tips a story over into becoming a national or global issue.

Think of the rise of #blacklivesmatter: police brutality towards African-Americans has long been an issue, but footage from CCTV cameras, mobile phones and police dash-cams and body-cams made the issue more visceral and much harder to dismiss.

But that relies on us being able to trust the pictures we see.

'We are careening toward an infocalypse'

If all this sounds scary to you, then you're not alone. Aviv Ovadya is a technologist who sounded an early warning about the rise of fake news, well before the phrase became a White House favourite.

In early 2016, Ovadya sounded the alarm about how vulnerable our digital world was to misinformation and manipulation, outlining a scenario that at the time sounded pretty far-fetched — social media had created an explosive breeding ground for misinformation that would have real-world consequences.

But for Ovadya, who is chief technologist at the Centre for Social Media Responsibility, the crisis gripping social media organisations pales in comparison to the threat machine learning and deepfakes could pose. He sees this as a fundamental shift in how we are able to interpret the world, and one we're ill-prepared to face.

"It's not whether you can do something like this, it's how much it costs to do this. The printing press didn't allow you to write but the printing press made it so much cheaper to distribute knowledge that it completely changed the shape of civilisation.

"And you can think about this as the same sort of thing, it just changes the shape of what we can create. And that is what's so fundamental about it, in particular the way in which we can imitate reality I think is at the core of this."

Ovadya is deeply worried about what these kinds of fakes could lead to, but is at pains to point out we're not yet at the point where deepfake news videos are being created and disseminated.

"There are some really scary scenarios out there, but we're not there yet. And it could be very soon potentially, and we need to start preparing as if it's going to be tomorrow, because it could be tomorrow."

A world without truth?

One of the scenarios Ovadya is most worried about doesn't even require the technology for creating deepfakes to be 100 per cent convincing all the time. Instead, he's concerned that the technology's very existence could create a situation where people feel they can't trust what they see — and that might allow those in power to use deepfake technology as a cover for their wrongdoing.

Think back to the scenario with the president in the Russian hotel room. What's scarier? A world where that tape actually exists, or a world where it exists but the president is able to write it off as fake?

Ovadya says this isn't about technology creating something foolproof every time, it's actually about the existence of technology that creates doubt and will make navigating the world much harder.

"It has significant impact on the ability to hold power to account, to make sense of the world efficiently. It's like ... if you had glasses and you broke your glasses and you couldn't replace them. You have this window [where you can see clearly], and then you're just worse at everything.

"That's a way we can think about it in terms of our democracy — depending on what you're doing maybe you're OK, but again if you go back to the driving analogy I often use, you're far more likely to crash without your glasses."

There are hints of movement in this direction already. Donald Trump recently suggested, without providing any evidence, that NBC interviewer Lester Holt had been "caught fudging" a tape in which Mr Trump discussed how Russia had been on his mind when he fired FBI director James Comey. And after rumours emerged that a tape recording of Mr Trump saying the 'N-word' existed, alt-right conspiracy theorist Alex Jones started suggesting that such a tape could be made using a program called Adobe VoCo.

Adobe VoCo, which can synthesise a person's speech, has never even been released, and Adobe was upfront about saying they'd make sure that you could test if audio had been manipulated this way, but that didn't stop Alex Jones from using the possibility of its existence to spread misinformation.

Where does this leave us?

If just the possibility of deepfakes can make us start doubting what we see, what can we do about it? Aviv Ovadya suggests part of the answer might lie in one final head-scratching question: Why are you trusting what I'm telling you now?

"I wouldn't say this foretells the end of mass media, because as long as you know that when you're reading an article from ABC, or watching their broadcast that it really is coming from them, if you can establish a provenance of the information you're taking in, and you know that you can trust them to have done thorough vetting then you can still trust that mass media environment."

But it still comes with a price.

"We need to ensure that we can build these trust networks, and we need to ensure that ABC can efficiently vet what's real and what's not. But what we give up is the ability for a random person on the street, someone who's in the right place at the right time or a whistleblower — if they can't prove provenance then you really will never be able to trust them."

Next: How hard is it to make a deepfake?

We really wanted to understand how deepfakes work, and there's really only one way to do that: to make one.

So we trained a machine learning algorithm to understand Malcolm Turnbull's face.

One thing's for certain: this is not the prime minister. But is it Malcolm Turnbull?

Imagery credits

Credits