Even before we can speak, humans can glean useful information from the sound of laughter.

A study by UCLA and New York University researchers found that infants as young as five months can differentiate laughter between friends and laughter between strangers. The results suggest that the ability to identify the nature of social relationships is instilled early in human infancy, possibly as part of what the scientists call an “affiliation detection system” that uses vocal cues.

“If young infants are able to pick up social information from such brief clips of vocal behavior, it suggests a biologically evolved sensitivity,” said Gregory Bryant, a professor of communication and co-author of the paper. “Laughter is an ancient social vocalization shared with many other mammals, so it makes sense that we see very early emergence of infants’ ability to produce, perceive and understand the signal.”

The research, which was published in Scientific Reports, is the latest by Bryant and colleagues in a series of studies on “co-laughter” — the act of two people laughing together. Previous studies have addressed how adults from across cultures can tell whether they are listening to two friends or two strangers laughing together, and how people generally can tell whether a laugh is spontaneous or not.

Bryant and co-author Athena Vouloumanos, an associate professor of psychology at NYU, sought to study infants because the research would shed light on how early in life humans can gauge people’s relationship types using vocalizations.

“Infants’ sensitivity to different kinds of laughter might be one of the early emerging tools they use to understand and navigate the complex social world,” Vouloumanos said.

The researchers examined how five-month-olds processed exchanges of laughter between adults by tracking how long the infants listened to strangers laughing together versus how long they listened to friends laughing together. Previous child development research has established that scientists can determine how interested an infant is in something based on how long the subject holds the child’s attention.

In the first of two experiments, five-month-old infants heard alternating audio recordings of laughter between friends and between strangers. Researchers found that the infants listened longer to laughter between friends — showing not only that infants could differentiate between the two types of laughter, but also that they preferred to listen to friends laughing.

In the second experiment, researchers played audio recordings of laughter while showing the infants video clips of actors depicting friend-to-friend and stranger-to-stranger relationships. In one clip, two women faced and smiled at each other as if they were friends; in the other, the women turned their backs to each other, indicating that they were strangers. Both videos included a still frame of the actors with neutral facial expressions turned toward the camera. Infants then heard alternating audio recordings of friends’ laughter or strangers’ laughter.

The infants spent more time looking at the images when the social interaction was incongruous with the type of co-laughter they heard — that is, when the laughter between strangers was matched with the image of friends, and vice versa. That followed the scientists’ expectation for the experiment because gaze length is a commonly used measurement for spotting infants’ comprehension of interactions. A longer gaze indicates evidence of surprise — in this case, a mismatch between co-laughter and the nature of the relationship.

Bryant said the study reaffirms laughter’s role as a communication tool in human social relationships.

“But we have a lot to learn about how it works specifically,” he said. “While laughing is related to vocalizations in other animals, human laughter is much more flexible in its use. The study of laughter provides a great opportunity to get a window into both human uniqueness, and our evolutionary past.”