STANK LOVE, BEAR WIG, and other sayings from AI-generated candy hearts

The list also includes ME LOVE HAVE and HOLE. Happy Valentine's Day.

This Valentine’s Day, would you give someone a candy heart that says STANK LOVE on it? What about TIME HUG, or BEAR WIG, or simply FANG? What would you think after receiving a treat featuring the words LOVE BOT, or PIN A FACE, or just HOLE? Would you swoon for TIME STAR or SWEAT POO? This is what you get when you ask artificial intelligence to write romantic messages for you.

More specifically, a machine learning system called a neural network deserves our thanks for these bizarre expressions, as does a human—a research scientist, Janelle Shane, who works at an optics research and design company in Colorado. But as a hobby, she experiments with artificial intelligence. And while it’s easy to laugh at AI-created Valentine’s Day messages like LOVE 2000 HOGSYEA, her research also illustrates an important issue in artificial intelligence: why good data, and lots of it, matters for developing AI.

But first, here’s how, and why, Shane used the neural network to create messages like LOOK BIG. She began, she says, by wondering what she “could train the neural network on that would showcase its weird, kind of endearing ability to try and fail to guess at what humans find attractive.” She eventually hit on candy hearts. But neural networks need data from which to learn and create their own rules that they follow to produce fresh, new material.

So Shane assembled a list of 366 real candy heart messages. They included predictable phrases like COOL CAT, BEAR HUG, and the simple, earnest, I LOVE YOU. The list, Shane comments, was “pitifully small.” (For comparison, Apple says they used “over a billion images” when creating the neural networks that power its Face ID security system on the iPhone X.) To compensate for the small list size, she took a number of steps. The first was to ensure that the neural network didn’t just directly repeat words it saw in the list she gave it. She needed to “thwart its ability to memorize the data,” she says. So, Shane explains, she intentionally hobbled aspects of the AI system by knocking out “parts of the neural network at random.” Using that strategy, she made the artificial intelligence system devise “really general rules” when producing new candy heart slogans.

Another step she took produced more Valentine’s Day text—gems like the caveman-style ME LOVE HAVE. To make the original dataset bigger, she added back into it some of the AI-generated slogans the system first came up with, like STANK LOVE. That ended up creating many bear-themed slogans, including TIME BEAR, which would be an excellent title for a film about a time-traveling ursine, and HOME BEAR, which kind of sounds like an Apple product. The bear theme is probably because the expanded dataset included BEAR HUG, MY BEAR, BEAR WIG, and TEAM BEAR.

“The more data it has, the more it’s going to be consistently interesting,” Shane says. With a creative endeavor like this one, aiming for something interesting is the whole point. But with artificial intelligence taking on even bigger roles in our lives, the stakes are higher when we’re not just talking about candy hearts. For example, artificial intelligence systems can learn biases from the language patterns they see. And recent research reported in The New York Times showed that facial recognition systems were better at correctly identifying the gender of images of white males; one probable cause for errors like these is if the data set used in the first place overrepresented white men.

But when using artificial intelligence in a fun, lighthearted way, as Shane is, the creative results will also be best with a lot of data. For the candy hearts, the original input was scant, and she had to sort through the output to find the good ones. In fact, some of the neural network’s raw output produced stuff like this: WEAL O3, GIGDY LE, and TALL U WANKE. She’s had more luck with bigger datasets for other projects, like giving a neural network thousands of real bird names and asking it to come up with new, made-up avian names based on that original data. (Cape Babbler was one believable result.)

Besides candy hearts and bird species, Shane has also trained neural networks to come up with new names for craft beers (want a sip of some Dang River?), metal bands (what does music from Death from the Trend sound like?), and delightfully, My Little Pony names, producing Pony names like Dark Candy (which also sounds like a Valentine’s Day snack).

Anyway, happy Valentine’s Day. And remember, as the AI said: FAN ME.

Rob Verger

Rob Vergeris an associate editor at PopSci, where he covers aviation, the military, transportation, outdoor gear and gadgets, and other tech topics. A graduate of Columbia Journalism School, he's also written for The Boston Globe, Newsweek, The Daily Beast, CJR, VICE News, and other publications. Contact the author here.