MIT’s Nightmare Machine uses AI to make ordinary photos skin crawling

In “Playtest,” a recent episode of Charlie Brooker’s superb show Black Mirror, audiences got a glimpse at how the future of horror might look in a world of advanced neural networks and augmented reality. As with everything about Black Mirror, the world the episode portrays is a near-future dystopia, in which the technology is recognizable, but ever-so-slightly out of reach.

It may be a bit closer than you think, though, based on a new machine learning project coming out of MIT, bearing a name from Charlie Brooker’s twisted imagination. In short, MIT’s “Nightmare Machine” uses cutting-edge deep learning technology to conjure up images designed to scare the bejesus out of us.

And not only could it tell us more about how we get scared, but our fear is helping train it to become scarier all the time!

“We use state-of-the-art deep learning algorithms to learn how haunted houses, or toxic cities look like. Then we apply the learned style to famous landmarks.”

“There have been a rising number of intellectuals, including Elon Musk and Stephen Hawking, raising alarms about the potential threat of superintelligent AI on humanity,” researcher Pinar Yanardag Delul, a Ph.D. student at MIT’s Media Lab, told Digital Trends. “In the spirit of Halloween and following the traditional MIT hack culture, we wanted to playfully commemorate humanity’s fear of AI, which is a growing theme in popular culture.”

In a sense, the Nightmare Machine is an extension of Google’s Deep Dream art generation tool. Deep Dream, for those unfamiliar with it, played on a funny quirk of Google’s image classification algorithms: the tools which let Google Images recognize, say, chair in unlabelled pictures of chairs. Taking advantage of what Google called “training mishaps” Deep Dream used its pattern recognition abilities to start accentuating details found in pictures. The results were gloriously surreal: skies filled with imagined birds, trees transformed into ornate buildings, and empty oceans becoming alien cityscapes.

MIT’s Nightmare Machine is the sinister flip side to Deep Dream; the AI equivalent of taking two identical twins and raising one as a perfect child (Google’s project), while locking the other away in the attic with a bucket of fish heads to eat (MIT’s project.)

“We use state-of-the-art deep learning algorithms to learn how haunted houses, or toxic cities look like,” Delul continued. “Then, we apply the learned style to famous landmarks, and it is surprising how well the algorithm is able to extract the element from the haunted templates and plant it into the landmarks. Most of the outcomes are indeed quite scary.”

As with any good horror movie mad scientist, of course, the researchers didn’t didn’t stop there. Human testing was called for. “We [observed some] interesting outcomes,” Dr. Manuel Cebrian, Principal Research Scientist, told Digital Trends. “Say we train a neural network on places, like a haunted house, and apply it to a person or group of people. The result is equally haunting!”

“Our research group’s main goal is to understand the barriers between human and machine cooperation.”

By applying the Nightmare Machine neural network to any image they could think of, suddenly nothing was off limit. An image from one of the recent U.S. presidential debates (pretty haunting to begin with!) suddenly morphed into two skeletons insulting one another on-stage. A couch gag from The Simpsons looked like a spooky apparition from a J-horror movie, and countless user portraits were defiled to look like the kind of selfies George Romero’s zombies might snap with the leftover smartphones following an undead apocalypse.

(For a closer look, check out the handy Instagram account the researchers set up to show off their ghoulish creations.)

“For now, this is just a fun experiment, in the spirit of Halloween, to explore a new way which machines can scare us in the more visceral sense,” Dr. Cebrian continued. “We are, however, asking people to vote on what they find scary. So far we have collected over 100,000 individual evaluations of our fully computer-generated images.”

This is where the human factor comes into play. After all, a neural network can do all the Deep Dreaming it wants, but it takes a human to have nightmares. In this case, by ranking how scary you find the images the Nightmare Machine generates, it can hone its abilities to scare us even more.

“Interesting to note, the generated faces are equally creepy from the AI’s point of view, but people find some of them quite scary, while others not so much,” Delul said. “That reveals that there is extra information in how human perceive horror that can be exploited to make even scarier faces as you suggest. Maybe in the future, we can [even] generate ‘personalized’ horror images were we to tailor the generation process to [an individual’s] data.”

And we’re back where we started with Black Mirror’s “Playtest” episode!

“Maybe this technology is closer to than we think,” Iyad Rahwan, Associate Professor at MIT Media Lab, told us. “Our research group’s main goal is to understand the barriers between human and machine cooperation. Psychological perceptions of what makes humans tick and what make machines tick are important barrier for such cooperation to emerge. This project tries to shed some light on that front — of course in a goofy, hackerish, Halloween manner.”

We’re blaming you if we can’t sleep tonight, MIT! We hope you’re proud of yourselves…