On YouTube, a search for "cute cat" nets more than 3.5 million results. Some of those cats, like the cute cat that thinks it's a dog, rack up millions and millions of views. Others, like the video of a cute dog licking a cute cat, get only a couple of thousand.

Why one cat finds viral fame while an equally adorable one languishes in the burial ground of under-clicked YouTube videos is often chalked up to randomness - a combination of the unpredictable nature of both human preference and the Internet.

Jure Leskovec, a Stanford computer scientist, views this premise as a challenge. The vast majority of content that exists online goes nowhere. Why wouldn't there be patterns associated with content that beats the odds?

Elementary school in Oakland opens time capsule from 1927San Francisco Chronicle

Brides of March walk through San FranciscoSan Francisco Chronicle

WildCare rescues Western scrub jay from rodent glue trapWildCare

The Regulars: The CarpenterJessica Christian

Massive fire in San Francisco's North BeachDavid Essling

"The question was, 'Can we understand these things better?' " said Leskovec.

It turns out - as Leskovec and a growing number of scientists of varying disciplines are proving - that "virality" is pretty predictable.

Leskovec's work, like many of his peers, focuses on "cascades," the path through which a piece of content travels within a given network. The idea is that by studying the course of travel of both successes and failures, one can statistically model the attributes of content that performs well.

More in Technology

A science-backed understanding of virality is a hot commodity, valuable in improving everything from product marketing and online journalism to political campaigns and the study of human behavior.

Getting message out

"For marketers, designing something viral means getting out their message to a wider audience at a lower cost," said Katherine Milkman, a behavioral scholar at Wharton who in 2011 analyzed the content in the New York Times' most e-mailed list. "For content providers, viral content draws more eyes to their website, which means more advertising revenues and more potential subscribers and/or repeat readers."

The research of Milkman and others offers one explanation for the proliferation of cat videos on BuzzFeed: content that invokes a strong emotional response typically does better.

Leskovec's work seeks to drill deeper. In a study co-authored with Facebook data scientists that he presented last week at the International World Wide Web Conference in Korea, Leskovec examined how hundreds of thousands of photographs were shared on Facebook over a 28 day period. They were able to see who shared which photograph at what time, and reconstruct exact models of how an image moved across the social network. Sometimes a single image would be shared thousands of times when posted from one account, but less than a dozen times from another account.

Then, using machine learning and a fancy algorithm, they pinpointed important characteristics of successful posts like (the type of image, caption content and speed of sharing, for example) and predicted how far an image might spread once it began to catch on. They were able to predict whether an image would double its number of shares about 80 percent of the time - a finding that could also be useful in creating new viral content.

"One of the best ways to understand (virality) is to formulate it as a prediction problem," said Lada Adamic, the research manager on Facebook's 40-person data science team. "Going in, we didn't know how predictable it would be. It turned out to be more predictable than we expected."

The speed at which something was shared turned out to be the best predictor of growth, followed by the structure of a cascade - whether a photo broke out of its initial network into different friend or fan groups.

Leskovec had conducted a similar analysis on the popular forum website Reddit. He analyzed content that had been shared multiple times, picking apart which factors influenced a piece of content's success - down to the grammatical structure of headlines. Using those models, he reposted the same content and managed to generate three times as many "upvotes."

Psychological responses

Others have studied brain activity or, like Milkman, psychological responses to understand how information spreads online. Aristotle hypothesized much of that in 350 B.C. - he thought content should have an ethical appeal, an emotional appeal or a logical appeal in order to be memorable.

Predicting a single hit is still hard, but data modeling like Leskovec's could offer much more specific clues for creating one - as specific as the time of day, depending on the type of content and the prominence of nouns in a title. The content, who posts it, and who is in the original poster's network still matter in making something go viral - but work like Leskovec's is fine-tuning an understanding of what other factors also play a part. (Leskovec, for the record, cringes at the use of the word viral, a poorly defined and therefore thoroughly unscientific word.)

At BuzzFeed, the king of the viral Web, a seven-person data science team employs its own version of Leskovec's experiment - they use a predictive algorithm to try to catch something that might go viral as early as possible, so they can boost its presence on the site and on social networks (where it really takes off), and garner even more clicks.