Skip to content

A neural network translates pigs’ emotions by listening to their grunts

The A.I. system could improve the lives of commercially raised pigs.
Credit: Davy3 Photo / Adobe Stock
Key Takeaways
  • In prior research, scientists have noticed that pigs often grunt when in neutral or positive situations and squeal when in negative situations, suggesting that vocalizations may indicate their mood.
  • An international team made thousands of audio recordings of 411 domestic pigs in a variety of situations and then fed the data into a neural network to identify patterns.
  • After training, the neural network was able to predict a pig’s emotional state from the sounds it makes with over 90% accuracy, suggesting that it could be used to monitor the well-being of commercial herds.

Perhaps the most common way that humans interact with pigs is through bacon. That’s tasty, but somewhat unfortunate, as pigs are fascinating, highly intelligent creatures that display a wide range of emotions. As such, many scientists are committed to maximizing the welfare of these domesticated animals as they live out their human-managed lives.

To that end, an international team of researchers has trained an artificial neural network to recognize pigs’ emotions by their vocalizations. Publishing their findings in Scientific Reports, the team hopes that with a little more tinkering, an automated recognition system can be developed to monitor pigs’ well-being in industrial farm settings.

Earlier work has found that pig vocalizations can be broken down into high-frequency screams and squeals, which are prevalent in negative contexts, and low-frequency grunts, which are regularly heard in neutral or positive contexts. For example, a pig might squeal when isolated, fighting, or surprised. It will grunt when reunited with a friend or familiar human, eating, or playfully running.

With this in mind, the researchers mounted a herculean effort to record thousands of vocalizations from hundreds of pigs in diverse settings and contexts. Their final data set included 7,411 recordings from 411 pigs, taken from a variety of situations covering the entire life of commercially-raised pigs, including when restrained, castrated, nursing, enriched, handled, and huddling.

(Credit: Dario Sabljak / Adobe Stock)

“There are clear differences in pig calls when we look at positive and negative situations,” Elodie Briefer, an Associate Professor at the University of Copenhagen and the study’s lead author, said in a statement. “In the positive situations, the calls are far shorter, with minor fluctuations in amplitude. Grunts, more specifically, begin high and gradually go lower in frequency.”

The researchers next converted the recordings into spectrograms, which are visual representations of the spectrum of frequencies of a sound signal as it varies with time, and fed them into a machine-learning neural network. Doing so taught the network to identify patterns in the spectrograms and associate these patterns with either a positive or negative emotional state, and even to recognize the specific context in which the sound was produced (when the animal was running or waiting, for example).

The researchers could eventually show the neural network a novel spectrogram and it could determine whether the pig was in a positive or negative mood with 91.5% accuracy. It could even guess the situation in which the sound was made with 81.5% accuracy.

“These results indicate that a system based on a few acoustic parameters is capable of correctly detecting in some cases, from a single call, whether a pig is in a positive or a negative situation,” the researchers wrote.

Scientists are also hoping to use pattern-recognizing algorithms to shed light on the communications of other animals. Owing to their sizable brains and social inclinations, elephants, whales, and dolphins are primary focuses. In 2017, researchers also used artificial intelligence software to analyze the various calls of marmosets.

The utility of studying animal emotions

It is a debated question whether — or the extent to which — animals experience emotions. Some scientists argue that it’s impossible to know whether animals experience emotions — at least in a manner that’s similar to how humans experience emotions. Meanwhile, others argue that it’s nearly impossible to accurately identify animals’ emotions by analyzing their behavior. Still, some researchers do think that animals experience emotions in a way that’s at least somewhat similar to our experience.

In any case, closely analyzing the experiences of animals arguably has real-world utility. Many modern pig farms make use of microphone-based systems to monitor and classify stress-based vocalizations and coughing. This provides caretakers with a potential early warning that a pathogen could be spreading among the herd. Adapting the researchers’ neural network to the task of maintaining the welfare of commercial pigs could improve on these systems while achieving complementary goals: improving the well-being of our hoofed friends and lowering costs for farmers.

In this article


Up Next