Researchers tap AI to read pain in animals

Veterinarians are intrigued by the technology's potential

Published: June 25, 2024
By Riis Williams

Listen to this story.

Photos courtesy of Dr. Holger Volk
Researchers are testing whether artificial intelligence tools can do a more consistent job than humans at reading pain from the often-inscrutable expressions of cats. The cats on the top row of the image are showing no pain. The cats on the bottom row are exhibiting pain.

A senior cat that had been gentle most of its life developed a curious tendency to claw at the legs of its 9-year-old human housemate whenever the child walked by. Mystified by the cat's aggressive turn, its owners consulted their regular veterinarian. The doctor, too, was perplexed.

It took a referral to a veterinary behaviorist, Dr. Christine Calder, to get to the bottom of the problem: The cat was acting strangely because it was in pain.

Pain in nonhuman animals can be notoriously difficult for people to recognize, not least because animals don't use human language to express how they feel. Veterinarians often rely on patients' vital signs, body language and facial expressions to try to identify pain and assess its severity.

Advances in artificial intelligence technology promise to make that job much easier — whether for pet owners, primary care veterinarians or even experts in pain detection like Calder.

"To be honest, it can be hard to detect anything unless it's an acute situation," Calder, who is based in Maine, acknowledged in an interview. "So if they're able to standardize and validate these [AI tools] then, yeah, I'd definitely try them out."

The tools work not by revolutionizing how pain is assessed but by foolproofing existing methods of detection. Veterinarians currently use pain scales, which match certain body language and facial expressions to levels of pain severity. But applying the scales can be skewed by human bias, so unless an animal is undeniably shaking or vocalizing in extreme distress, their pain might still go unrecognized.

In brief

Enter the AI tools, which employ machine learning programs that are trained to detect and assign a measure to animals' pain using the same pain scales. The systems are fed multiple images, including videos, of animals in various states of distress. Theoretically, the AI tool's range and precision improves as it consumes more material

Over the past decade, numerous such tools have been developed by researchers to assess pain in animals, including horses, sheep, cats, rabbits and mice. Success rates have varied depending on the specific design of each AI program, all of which have been tested only in controlled, laboratory environments and not in active veterinary clinics or on farms. Several of the systems were better at flagging the presence of pain than identifying its acuteness. They also tended to perform best on animal types that have a relatively uniform appearance, such as rats and mice. Though the tools are far from perfect in execution, Calder said the concept is intriguing and holds much promise.

An evolving capability

The capacity for nonhuman animals to express negative feelings in their facial expressions and full-body mannerisms has been studied for more than a century. Charles Darwin was among the first evolutionary biologists to explore the science in his 1872 book The Expression of the Emotions in Man and Animals. However, the development and common use of scientifically validated observational pain scales is fairly recent.

One of the first behavior-based pain assessments, called the Glasgow Composite Measure Pain Scale, was created in 2007 to discern acute postoperative discomfort in dogs based on their vocalizations, general mobility and demeanor, posture, reaction to touch and attention to a wound. Similar scales for other animals were developed shortly after. In 2010, a solely face-based assessment named the Grimace Scale was established to detect pain in lab mice. The user looks for "facial action units": squinted eyes, bulging cheeks and noses, and ear and whisker twitching. Six more grimace scales exist today to detect pain in rats, rabbits, horses, cats, sheep and ferrets.

Pain scales are valuable to and popular among veterinarians. But Calder said that their accuracy can vary based on the patient's level of stoicism.

"Part of their reliability is complicated by the fact that when animals come into veterinary hospitals, they're usually so stressed that they mask or distort their faces anyway," Calder said. "So, really, you have to get most of your information from the owner about how the animal is behaving in their home environment."

Some AI applications may help veterinarians get a better look at that at-home behavior by having pet owners capture photos or videos of their pets.

In 2023, an international group of researchers published a study in automated pain recognition in cats involving the training of a machine learning algorithm using a feline version of the Glasgow scale. The algorithm drew on 84 images of cats of different breeds and ages with various medical conditions to rank their pain. The study authors reported that it was able to correctly judge the presence and intensity of pain in 77% of the cats, based on their facial movements.

The system should improve further with a larger data set, said Anna Zamansky, an associate professor of information systems at the University of Haifa in Israel and a study coauthor. She and her team of veterinarians and computer scientists are now feeding the algorithm thousands of images of cats to make an app for pet owners, which they intend to launch commercially in a year or so.

Zamansky explained that the app is modeled roughly after existing AI-driven apps that people can use to evaluate the health of human infants. If a pet owner notices their cat behaving abnormally, they will be able to obtain a quick and easy pain assessment by recording and uploading a video to the app.

Keeping veterinarians in the frame

The app's developers don't want to encourage pet owners to leave practitioners out of the picture, though. If the algorithm notices signs of discomfort, an interactive ChatGPT-like system will describe the indicators and suggest the cat be taken to a veterinarian.

"Something like this might also be really helpful for cats recovering from surgery," said Dr. Holger Volk, a coauthor of the 2023 study and chair of the Department of Small Animal Medicine and Surgery at the University of Veterinary Medicine Hannover in Germany. "It could help a pet owner verify that they need to continue to give their cat postoperative pain medicine. … Of course, we also wouldn't want the owner to disregard professional guidance, so [the app] must also always encourage veterinary consultation."

A separate research team that generated a similar AI-powered system in a laboratory to evaluate pain in sheep in 2017 is working on upgrading its product to be used commercially on farms. The scientists trained their program using the Sheep Pain Facial Expression Scale and 500 photographs of sheep being treated for diseases including foot rot and mastitis. The system was able to gauge the sheep's pain levels with 80% accuracy, and now the researchers are hoping to link it to video cameras installed on farms where sheep tend to congregate, with the goal of catching early signs of pain.

"I remember farmers saying to us, 'Oh, I know my animals the best. How can you tell me that you know my animals more than me?' " said Marwa Mahmoud, a professor of socially intelligent technologies at the University of Glasgow and member of the research team. "I think that's a pretty common sentiment when it comes to new technologies. But the idea is to use the system to predict early, subtle signs of pain from a sheep’s facial expressions so that farmers can check on their animals. The goal is, of course, not to replace the farmers or veterinarians but rather, to assist them."

Dr. Ryan Appleby, an assistant professor of diagnostic imaging at Ontario Veterinary College who studies AI, said that while veterinarians seem mostly receptive to the new tools, some have concerns about data security and client privacy when it comes to the processing and storage of personal photos, videos and voice recordings.

Although many veterinary medicine AI systems are already on the market, the United States and Canada don't have firm regulations regarding the transparency of human and veterinary medical AI developments. The U.S. Food and Drug Administration, Health Canada and the United Kingdom's Medicines and Healthcare Products Regulatory Agency recently released guiding principles for the responsible production and handling of machine learning medical devices that Appleby said are also relevant to veterinary medicine. They don't, however, actually require developers to adhere to them. Appleby urges agencies to establish actual protections before AI technology becomes even more available and popular.

"There are definitely some folks who are apprehensive about how exactly data is being used by the providers of the AI systems," said Appleby, who chairs the American College of Veterinary Radiology's AI education and development program. "Where are the recordings or other documentation being stored? What base AI model is being used to power some of these devices? I think that in order for these kinds of technologies to really be beneficial, there has to be a strong level of trust there."

Still, Appleby said that he is very optimistic about how AI systems can potentially improve pain and disease diagnoses and overall patient care — as long as they are properly regulated

For her part, Calder says her enthusiasm for the new tools is animal-specific. For the long-time behaviorist, recognizing and analyzing cat pain isn't always terribly tricky. Case in point: She successfully treated that strange-acting cat with a nonsteroidal anti-inflammatory drug after figuring out that it had joint pain. The child-swatting stopped.

Dogs, though, are another story. There isn't even an established grimace scale for dogs because their signs of pain manifest so differently across breeds.

"All of the breeds look and act so different," Calder said. "Some will go and run a mile and carry on business as usual even when they're in pain, and others will act like they're dying when they have a little thorn in their paw .... So I'd be real interested to see what AI could do for that."

VIN News Service commentaries are opinion pieces presenting insights, personal experiences and/or perspectives on topical issues by members of the veterinary community. To submit a commentary for consideration, email

Information and opinions expressed in letters to the editor are those of the author and are independent of the VIN News Service. Letters may be edited for style. We do not verify their content for accuracy.