Large social networks foster connections by erasing national, geographic, and even linguistic barriers. But when it comes to fostering cooperation, global connectivity leaves something to be desired, new research says.

Working with colleagues at Emmanuel College, Harvard scientists have developed an algorithm that predicts whether a social structure is likely to favor cooperation, and the findings suggest that strong pairwise relationships — not loose networks scattered across the globe — are the most conducive to cooperation. The study is described in a March 29 paper in Nature.

“What we are able to do is calculate the critical benefit-to-cost ratio for cooperation to thrive on any fixed population structure,” said senior author Martin Nowak, a professor of mathematics and of biology and director of the Program for Evolutionary Dynamics. “And what we find is truly interesting. We can take any graph or social network, and if it has strong pairwise ties, that is what is most conducive for cooperation. This is a mathematical argument for stable families or for stable friendships.”

“I think one of the messages here is that while global interconnectedness has increased rapidly over the past few decades, there are downsides to that,” said first author Benjamin Allen, an assistant professor of mathematics at Emmanuel College and a researcher at the Program for Evolutionary Dynamics. “More connectivity won’t necessarily promote people being good to each other. It’s not that global connections are bad, but they are no substitute for a small number of strong local connections.”

Scientists for decades have sought to understand the interplay between social structure and evolution, beginning with “well-mixed” populations. Mathematical models have demonstrated that in such populations — where every individual interacts with every other individual — evolution selects against cooperation, causing it to eventually die out.

In 2006, however, Nowak and colleagues showed that in certain “special” populations — particularly those in which all members have the same number of connections — selection leans in favor of cooperation.

“If you are a cooperator, then your friends can also act as cooperators, so you form a cluster and receive a positive payoff from each other,” Nowak said. “In a well-mixed population, you can’t get clusters, so cooperation is selected against.

“But ever since then, the question has been what would happen if one person had three friends, and one of their friends had five, and someone else had eight,” Nowak said. “There was no way to calculate that.”

The problem was so complex that solving it would result in accidentally solving one of the most important open challenges in computer science. Known as P versus NP, the challenge asks whether every solved problem in which the answer can be quickly checked by a computer can also be quickly solved by a computer.

“If you can find an efficient algorithm that works on any network, you would have actually shown that P equals NP,” Nowak said. “But that’s not what we expect — most computer scientists don’t believe this is possible.”

The opening that allowed Allen and Nowak to develop an algorithm capable of solving the problem came in the form of weak selection.

“We began to wonder what happens in a situation where the payoff differences are small,” Nowak said. “The members of the networks are playing games that involve cooperation and defection, but what happens if the games have only a small effect?”

At the same time, Allen and a handful of mathematicians, including Fields Medal winner Shing-Tung Yau, the William Caspar Graustein Professor of Mathematics and a professor of physics at Harvard, began a series of meetings to discuss cooperation across networks. Soon they realized a general solution might be possible.

“When you include weak selection … all you have to do is calculate the meeting times of random walks [the likelihood that any two people in the network would meet] on the social network,” Nowak said. “That can be calculated, and that’s the solution to the problem.”

“Where random walks come from is when we’re trying to trace the ancestry of people’s strategies,” Allen said. “So if we take two individuals, they copied their strategy from someone else in the network, and they copied their strategy from someone else — the question is how far back do we have to go until they’re both copying the same person?”

Armed with the algorithm described in the study, Nowak said, researchers both pinpoint whether a given social network would support cooperation and also predict whether changes to the network might make it easier for cooperation to evolve.

The team used the new tool to analyze a handful of real-world social networks, including among monkeys. Of the networks examined, Facebook scored lowest in cooperation — but with a caveat.

“That stems from the fact that people have a lot of connections on Facebook, and in that data set we only have the raw connections,” Allen said. “If the graph were weighted so that close friends count for more, it may well have changed the outcome.”

Ultimately, the study helps paint a fuller picture of the interplay between evolution and society, Nowak said.

“The traditional, Darwinian theory of evolution is basically that everybody fights against everybody else — it’s just an all-out competition,” Nowak said. “But in the last 20 years, people have understood more and more that the other half of the story is about cooperation, the snuggle for survival. Natural selection can also favor cooperation, and the winners in that situation are those who cooperate with each other. This is a major extension of the story of evolution.”