A.I. 'Nightmare Machine' Knows What Scares You

Barcelona's graceful Casa Milà looks a lot less inviting after a pass through the Nightmare Machine. (Image credit: Nightmare Machine)

The idea of artificial intelligence (AI) — autonomous computers that can learn independently — makes some people extremely uneasy, regardless of what the computers in question might be doing.

Those individuals probably wouldn't find it reassuring to hear that a group of researchers is deliberately training computers to get better at scaring people witless.

The project, appropriately enough, is named "Nightmare Machine." Digital innovators in the U.S. and Australia partnered to create an algorithm that would enable a computer to understand what makes certain images frightening, and then use that data to transform any photo, no matter how harmless-looking, into the stuff of nightmares. [5 Intriguing Uses for Artificial Intelligence (That Aren't Killer Robots)]

Images created by Nightmare Machine are unsettling, to say the least. Iconic buildings from around the world appear eroded and distorted within shadowy settings or amid charred and smoldering landscapes, glimpsed through what appears to be murky, polluted water or toxic gas clouds.

Nightmare Machine's faces are equally disturbing. Some of the subjects are almost abstract, but subtle — creepy suggestions of hollow eyes, bloody shadows and decaying flesh still cause unease. Even the lovable Muppet Kermit the Frog emerges from the process as a zombie-like creature that would terrify toddlers — and adults, too.

A photo posted by on

The primary reason for building Nightmare Machine was to explore the common fear inspired by intelligent computers, its trio of designers told Live Science. They wanted to playfully confront the anxiety inspired by AI, and simultaneously test if a computer is capable of understanding and visualizing what makes people afraid.

"We know that AI terrifies us in the abstract sense," co-creator Pinar Yanardag, a postdoctoral researcher at MIT Media Lab in Massachusetts, wrote in an email. "But can AI scare us in the immediate, visceral sense?"

The designers used a form of artificial intelligence called "deep learning" — a system of data structures and programs mimicking the neural connections in a human brain — to teach a computer what makes for a frightening visual, according to co-creator Manuel Cebrian, a principal research scientist at CSIRO Data61 in Australia.

"Deep-learning algorithms perform remarkably well in several tasks considered difficult or impossible," Cebrian said. "Even though there is a lot of room for improvement, some of the faces already look remarkably creepy!"

Once deep-learning algorithms understood the visual elements that were commonly perceived as spooky, they applied those styles to images of buildings and human faces — with chilling results.

Neuschwanstein Castle in Germany is somewhat the worse for wear after Nightmare Machine's algorithms are done with it. (Image credit: Nightmare Machine)

"Elon Musk said that with the development of AI, we are 'summoning the demon,'" co-creator Iyad Rahwan, an associate professor at MIT Media Lab, told Live Science.

"We wanted to playfully explore whether and how AI can indeed become a demon, that can learn how to scare us, both by extracting features from scary images and subsequent refinement using crowd feedback," Rahwan said. He added that the timing of their spooky experiment — close to Halloween — was no accident. 

"Halloween has always been a time where people celebrate what scares them," he said, "so it seems like a perfect time for this particular hack." 

"Our research group's main goal is to understand the barriers between human and machine cooperation," Rahwan said. "Psychological perceptions of what makes humans tick and what makes machines tick are important barriers for such cooperation to emerge. This project tries to shed some light on that front — of course, in a goofy, hackerish Halloween manner!"

And if you're brave enough, Nightmare Machine could use your help to learn how to become even scarier.

The project's creators used deep-learning algorithms to generate frightening images of dozens of faces, tweaking the results to make them look even more disturbing. Nightmare Machine visitors can vote on these so-called "Haunted Faces," to help the algorithm "learn scariness," according to instructions on the website.

Teaching a computer to be more terrifying — what could possibly go wrong?

Original article on Live Science.

Mindy Weisberger
Live Science Contributor

Mindy Weisberger is an editor at Scholastic and a former Live Science channel editor and senior writer. She has reported on general science, covering climate change, paleontology, biology and space. Mindy studied film at Columbia University; prior to Live Science she produced, wrote and directed media for the American Museum of Natural History in New York City. Her videos about dinosaurs, astrophysics, biodiversity and evolution appear in museums and science centers worldwide, earning awards such as the CINE Golden Eagle and the Communicator Award of Excellence. Her writing has also appeared in Scientific American, The Washington Post and How It Works Magazine.  Her book "Rise of the Zombie Bugs: The Surprising Science of Parasitic Mind Control" will be published in spring 2025 by Johns Hopkins University Press.