Gerald Carter spends hours watching vampire bats share their meals with one another. While feasting, the animals—just slightly bigger than mice—huddle together in a small group and appear to lick each other’s faces. In fact, they’re sharing a meal of regurgitated blood.

Despite their intimidating name, vampire bats don’t suck blood—they use their razor-like teeth to make a small cut and lap blood from unsuspecting birds and livestock that live in the tropical regions of Mexico, Central America, and South America. But it’s the meal sharing that fascinates Carter, who captured the small animals in the wild in Tolé, Panama, and brought them to his research lab several hours away in Gamboa to study in captivity. By observing these surprisingly cuddly creatures, Carter hopes to untangle the evolutionary functions of friendship.

Carter’s group of bat companions could help us understand how and why humans evolved to make friends. Do friendships emerge only through closely regulated exchanges, or do they arise through a more informal and spontaneous flow of resources back and forth between individuals? And what is the real value of having friends? When vampire bats swap spit, they offer a unique opportunity to answer these questions.

Female vampire bats usually roost together in small groups of eight to 12. Male bats roost alone and defend their mating territory. Though many species of bats roost in groups, vampire bats are unique in their sharing of blood meals and in their propensity for social grooming. They also have a bigger brain, relative to their size, than most other species of bats. Of particular significance is their larger neocortex, which is associated with more complex social behavior.

Unlike male vampire bats, who keep food to themselves, female vampire bats share their food with both family and nonrelatives. It’s easy to understand why a bat might share her meal with her daughter or niece: Their survival means that her familial genes will likely continue on into future generations. But why help bats that aren’t kin?

Carter, a biologist at the Smithsonian Tropical Research Institute in Gamboa, believes it’s about hedging your bets. Bats are typically friends with family members, and those individuals help them by sharing food and exchanging grooming. But what if family is unavailable? By having friends that are not kin, female vampire bats appear to be setting up a safety net.

To test this idea, Carter and Gerald Wilkinson, a University of Maryland biologist who, in the 1980s, was the first to document reciprocity in bats, recently conducted an experiment: They prevented sharing among usual reciprocal food donors, including 10 relatives. Bats that had previously shared food with a wide network of nonrelatives ultimately had more food donors, the researchers found, compared to bats that had kept to a smaller, more familial web. In other words, the team demonstrated how vampire bats can score more food if they have wider social networks.

Interestingly, such findings mirror those of some anthropologists. Early humans likely used networks of friends as informal insurance companies. Researchers see examples of this today among the pastoral Maasai in Kenya, who even have a special word for friends who share resources back and forth: osotua. It translates to “umbilical cord.”

Anthropologist Dennis Sabore ole Sonkoi is a member of the Maasai and a graduate student at Rutgers University in New Brunswick, New Jersey, where he is studying the unwritten rules of osotua. He explains that a casual friend can become an osotua through a courtship-like process in which gifts are exchanged. The osotua relationship becomes official with the exchange of cattle, considered the tribe’s most prized possession. People can also inherit their family’s osotua relationships—something Sonkoi knows personally. Since his father passed away, he has supported his extended family, including maintaining his father’s osotua connections. He often turns to those elders for advice much like he’d talk to his uncles.

“You are always assured that you will get help, wherever you are, in any corner of the community,” Sonkoi says.

Sonkoi’s adviser, Rutgers anthropologist Lee Cronk, describes friendship as a type of risk pooling. But in modern society, most risk pooling has less to do with friends, he notes. “You also transfer risk when you buy an insurance policy, and I don’t consider State Farm to be my friend,” he says. But that insurance company understands “the psychology of friendship,” Cronk adds, and it tries to tap into that connection through its jingle: “Like a good neighbor, State Farm is there.”

Cronk believes adding an emotional component to risk pooling makes it more efficient, evolutionarily speaking. We don’t help friends because of some tit-for-tat account keeping, after all, but because we have empathy and love for them. This ability to love and make friends creates a wide network of people who can help in times of need. And, it seems, especially in the context of something like osotua, the friendship system is generally not abused by cheaters, who might try to take advantage of the gift-giving.

Researchers refer to this giving behavior as “need-based transfer.” “The original need-based transfer was parenting,” says Cronk. If our ancestors first evolved emotional mechanisms to care for their children, those same psychological mechanisms could later be applied to friends.

So perhaps friendship serves as a safety net for a variety of animals. But how do you actually prove that friendship as a social function evolves over time? When trying to model how behaviors and traits evolved, it helps to keep things simple—but the problem with friendship is that it involves a number of complex behaviors. It’s not one single action.

For instance, the theory of kin selection—helping your relatives so your genes will be reproduced—can be illustrated by a formula called “Hamilton’s rule,” which explains when a behavior or trait will be favored by natural selection. Evolutionary biologists use this and similar mathematical formulas to explain how cooperation among related animals evolved. Social relationships can be modeled if they involve strict account keeping, or reciprocity. But, even in bat populations, food sharing does not entail fixed tit-for-tat behavior. Could you make a formula for how you respond to your best friend? Probably not. It’s a big, warm, fuzzy challenge to break down friendship into its functional parts.

“Friendship is complicated in that we don’t understand it scientifically,” says Carter.

You might demand, say, that an acquaintance gives you gas money for carpooling with you. But you wouldn’t necessarily ask the same from a friend. You know they will pay you back in some form, at some point—so no worries, says Joan Silk, an evolutionary biologist at Arizona State University in Tempe who has spent most of her career studying social relationships in primates, specifically female baboons.

“I think that’s a hugely interesting feature of humans and one [for] which we don’t have a really good evolutionary model,” says Silk. Baboons show friendship-like relationships in that they will groom nonrelatives and rear young with them. Silk found that the more social the female baboon, the greater the rate of her infant’s survival. Just like humans (and bats), primates appear to benefit from a greater social network.

Yet sussing out the details of how these social bonding behaviors play out over time is difficult because it’s hard to manipulate human and primate relationships in a laboratory setting, explains Carter.

That’s where vampire bats could prove useful. The bats have a social system simple enough that researchers can manipulate it and measure the response, he says. The dark indoor lab setting resembles their home (caves or hollowed-out trees), and Carter can induce food sharing by letting certain bats go hungry overnight and feeding others. This mimics the bat’s natural conditions, where hungry bats often rely on their food donors.

“I think of them as a potential lab rat for natural reciprocity,” Carter says.

By exploring the limits of bat friendship—for example, seeing how long it takes before they punish freeloaders—or by playing friend matchmaker to learn what steps in a bat relationship lead to them sharing food, Carter can assess whether there are any clear rules that predict the course of friendship. He also hopes the bats can serve as a model organism to test the hormonal and neurochemical underpinnings of different characteristics of friendship. Similar work, based on research with monogamous prairie voles, has been done on the neural mechanisms behind pair-bonding. In these cases, researchers found genes—as well as brain chemistry—associated with monogamous behavior. Carter and his colleagues hope that cuddly vampire bats might point the way to the biology underlying generosity and different styles of friendship.

But the science has a long way to go. For the most part, you won’t even find the term “friendship” in the evolutionary biology literature. Instead you’ll see many researchers arguing over the nuanced definitions of reciprocity and reciprocal altruism—the theory that animals help others who help them in return. But strict reciprocity doesn’t completely describe what’s going on with vampire bats, primates, humans, dolphins, elephants, and other social animals.

Carter recalls how he used to roll his eyes when people would describe his work on reciprocity as studying “bat friendship.” But over time, he realized that bat friendship makes for a powerful research agenda.

If bats are friends, what does that mean? “Rather than just discarding friendship as this nonscientific idea, maybe we should link it” to science, Carter says. Now when he tells people about his research, he explains, “I am trying to understand friendship. That’s essentially what this is all about.”

This article is reproduced with permission from The article was first published on August 11, 2016.