In the fourth season of Silicon Valley, HBO’s Emmy-winning, Cupertino-mocking comedy series, one of the characters develops a visual-recognition app that can identify food in pictures, classifying every image as either “hot dog” or “not hot dog.” When one of the guys uses the app to take a dick pic, he discovers that he does, in fact, have a “hot dog.” They end up selling the technology to video-streaming app Periscope, which plans to use it to detect porn.
Visual-recognition technology is, of course, nothing new. Most social media companies—dating apps included—use computer vision to enforce community guidelines and root out X-rated images. If Instagram or Facebook has ever deleted one of your photos, it’s because computer vision told it to. For the most part, its function has been to prevent adult content from spreading where it doesn’t belong.
xHamster, one of the highest-trafficked porn sites, has other plans.
Currently, to find a specific scene on the site, users have to browse a category page or search a tag. xHamster vice president Alex Hawkins wants to move toward searches without words—ones in which “AI facial and body recognition tech” will access your viewing history “to identify similar performers or the same performer or similar videos.” The question is, can it be done? Distinguishing one hot dog from another hot dog isn’t easy—that is to say, recognizing something as pornographic is a different skill from finding the best video for you. In a world where most computer-vision technology is developed to identify tangible objects such as clothing and food, can an algorithm be trained to know your sexual desires?
The answer, according to Matias Klein, chief executive officer of the artificial intelligence company Kognition, depends on data. “The accuracy of the model is highly dependent on the quality of the input training data,” he says. And data sets aren’t always interchangeable. In other words, the same machine-learning engine that recognizes shirts and sandwiches won’t instantly know porn. “Which categories will be created is a human-level decision, not necessarily a computer task,” explains Albert Bou Fadel, chief executive officer of technology company SmartBarrel. “It is a human filter that will decide what to keep as a category and what to disregard.”
His question is a subjective one about what porn is and what it isn’t. That’s important, given that watching porn is a deeply personal experience. If we each have our own idea of what’s sexy, how can we collectively train a computer? To the machine-learning systems of today, there are few visual differences between nipple play and checking yourself for breast cancer: Both show a hand circling around nipples. One is clearly sexual; the other is not. This illustrates a problem Facebook has encountered and why the platform has been criticized for mislabeling photos of women breast-feeding as porn. “Building and labeling a training data set and then designing and optimizing a deep neural network is not a trivial task,” Klein says.
Engineers have complained that Yahoo’s system works well detecting porn for white performers but not for those of color.
In 2016, Yahoo made one of its deep-learning algorithms public by open-sourcing its code for the entire internet to use. What’s fascinating about that release is that Yahoo explicitly told the public its algorithm does not detect porn but rather flags visual content “not suitable/safe for work (NSFW), including offensive and adult images.” As Yahoo research engineer Jay Mahadeokar and product manager Gerry Pesavento wrote in a company blog post, “Defining NSFW material is subjective.” Unlike the hot dog app on Silicon Valley, Yahoo’s system isn’t designed to give users a hard yes or no. Instead, it analyzes images individually, assigning each a score based on how likely it is to be offensive. “Developers can use this score to filter images below a certain suitable threshold,” the two explained, “or use this signal to rank images in search results.”
Because we live in a time when you can’t publish a NSFW detector without someone hacking it, a young computer programmer named Gabriel Goh quickly manipulated Yahoo’s algorithm to produce extreme versions of NSFW imagery. (In programming speak, Goh accomplished this “by maximally activating certain neurons of the classifier.”) If you were to look at the images—highly exaggerated, colorful, mutated and abstract versions of male and female genitalia—you’d notice there’s little about them that’s sexy. To echo United States Supreme Court Justice Potter Stewart’s infamous words on porn, “I know it when I see it.” This isn’t it.
Because of how open source works—once code is shared with GitHub’s tech community, it’s available for anyone to play with—Yahoo can’t track how many engineers have used the tool for its intended function. But people are indeed using it, based on the chat boards on start-up accelerator Y Combinator. There, engineers have complained that Yahoo’s system works well detecting porn for white performers but not for those of color. One user, niftich, suggests Yahoo’s training data must have included more white actors, which brings us back to Klein’s point about the importance of data.
Indeed, the porn industry has been heavily criticized for treating minority performers more as fetishes than people. According to a 2013 study from data journalist Jon Millward, “Deep Inside: A Study of 10,000 Porn Stars and Their Careers,” 70.5 percent of female stars are white. But user aab0 notes that the difference in system performance may “also reflect what is most distinguishable. Which is easier for [the computer] to confidently distinguish: black pubic hair on black skin, or black pubic hair on white skin? Darker nipples on black skin, or darker nipples on white skin?”
Nipple color, waxed versus unwaxed pubic regions and other precise physical characteristics are where visual recognition may truly revolutionize search. “This level of specificity is hard to do with keyword searches alone,” says Hawkins. “Specifically, with a platform like ours, where self-produced amateur content is often uploaded without significant keywords or descriptive text, these unarticulated visual identifiers can help connect the content.” In his view, a computer may be better able than language to tell us what we want. With xHamster’s system, which the company began developing in July 2017, Hawkins says, “the AI can help identify performers similar to one a viewer already likes, matching body and facial structure and other identifying features.”
“Computer vision today is still a black box. There’s a lot of science and theories of how it works, but for the most part, we’re scraping the surface.”
Hawkins points out that xHamster isn’t using Yahoo’s tech—its own tech is already in use. For example: When you visit xHamster.com, the site drops a cookie that tracks the videos you view. When one clip ends, the system uses that video’s visuals to recommend what you should watch next. Right now, the software focuses on facial characteristics and body types. An ideal system would pick up on every other visual element that could make or break the mood. From large tattoos to badly lit rooms, from women pulling back their hair with 1980s headbands to nature settings, visual recognition software could help porn platforms create an endless array of previously unimagined categories.
“This,” Hawkins says, “becomes increasingly important as we move toward virtual-reality productions, which move consumers further and further away from the keyboard.” In November, xHamster launched a VR platform that allows viewers to navigate using eye movement. This is critical to bringing a VR world alive—and because our eyes naturally fixate on what our brains deem attractive, eye tracking might one day also help visual search pinpoint exactly which seconds of video turn us on the most. “Our current data-base now includes more than 1 million individuals and 3 million videos,” Hawkins explains—everything from real-life exhibitionist couples to independently produced fetish clips. At the time of this writing, xHamster’s internal tech team had analyzed some 35,000 of these videos, webcam performances and studio clips.
Hawkins claims the goal isn’t just to offer better search results but to help fans and performers connect to create a pathway to finding more porn featuring the people they like. Visual recognition won’t stop at recommending another (possibly free) clip to stream. It will direct—and up-sell—you to upcoming webcam engagements or specific channels.
Of course, in threesome and orgy videos, xHamster’s system still isn’t sophisticated enough to determine who turns you on the most. As with computerized translation, chatbot development and other types of machine learning, AI engines learn not only from the data engineers who train them but from real people who provide feedback on system results. Along with eye tracking, user feedback might someday help xHamster pinpoint which performers are more engaging.
Bou Fadel calls visual recognition “a work in progress,” something that will take years to perfect. “Computer vision today is still a black box. There’s a lot of science and theories of how it works, but for the most part, we’re scraping the surface,” he says. In the meantime, hackers, xHamster’s team and porn giants will continue to tweak algorithms, unveil virtual-reality programs and track your viewing, all in an effort to find a single formula for predicting the sexual desires of all humankind. The biggest takeaway? Deleting your browser history may soon become pointless.