AI Can Detect Cow Pain Better Than Humans — What Now?
Pain is difficult to assess in others. When human patients hurt, doctors rely on self-reports. When veterinarians assess animal pain, they’re limited to human observation. Not only does this require expertise in species-specific facial expression and behavior, but pain scores can vary among observers, which can muddy results.
In this study, the authors acknowledge the poor management of pain in cows in particular, as well as increasing public concern over farmed animal welfare. They also cite that AI models have already proven effective at identifying pain in companion animals, sheep, and horses via vision-based analysis. Thus, they aimed to find out how effective AI models and veterinarians are at detecting pain in bulls, and what this could mean for future cow pain management.
The researchers used video footage of 17 bulls from a previous study about pain following castration surgery. These were a mix of Nelore and Angus breeds. In this earlier study, three-minute videos were recorded of each bull at five time points:
- 48 hours prior to surgery (before fasting);
- Prior to sedation (during fasting);
- Three hours after surgery (before post-operative pain relief);
- One hour after post-operative pain relief; and
- 24 hours after surgery.
The bulls were given post-operative pain relief for three days after the surgery. Additional rescue pain relief was available if needed.
For this study, the authors selected 34 videos for analysis, taken from the second and third time points. These time points served as proxies for ‘no pain’ and ‘pain’ conditions; the researchers reasoned the bulls didn’t experience pain going into surgery but did coming out as the anesthesia wore off.
How Veterinarians Assessed Pain
The human experts used in the study were two anesthetist veterinarians. The anesthetists independently scored each bull in a live in-person assessment at the two time points (prior to sedation and three hours after surgery).
Six months later, the same anesthetists independently scored the bulls again, but in the three-minute videos this time. These were presented randomly so that the experts were unaware at which point — pre- or post-surgery — they were scoring each bull.
For the live assessments, the experts used the Bovine Grimace Scale, which analyzes various pain indicators involving facial changes and ear positioning. For both the live and video assessments, they used the UNESP-Botucatu Cattle Pain Scale. This scale was created specifically for pain analysis in cows and scores behavioral pain indicators, such as mobility and appetite.
All evaluations were then converted to binary categories of either ‘pain’ or ‘no pain.’ In this way, results from the anesthetists and the AI models could be directly compared.
How AI Models Assessed Pain
The researchers sampled one frame per second from each video. They began by manually marking the bull’s face in the first frame. A Segment Anything Model, or SAM, then automatically cropped each subsequent frame to isolate the bull’s face. Next, DINO ViT-B/16, a Vision Transformer model, transformed each cropped frame (image) into unique strings of numbers — a numerical ‘fingerprint’ of sorts.
These ‘fingerprints’ were used to train another model, a linear Support Vector Machine, or SVM, on how to classify the images according to the researchers’ instructions. The researchers used the Stochastic Gradient Descent (SGD) method, which makes thousands of tiny adjustments to an AI model until it becomes skilled at classification. In this case, the SVM learned to classify each image as either ‘pain’ or ‘no pain.’
It’s important to note that the models assessed bull faces only, while the anesthetists scored their faces, bodies, movement, and behavior.
Humans Are Good At Detecting Bull Pain, But AI Is Better
In the live assessments, the anesthetists reliably detected pain in the bulls using the pain scale (accuracy: 88%), but performed more modestly with the grimace scale (accuracy: 81%). The authors suggest this may be because the grimace scale wasn’t validated at the time of the study, and the anesthetists received no prior training on it. In the video assessments, the experts achieved moderate accuracy on the pain scale (72%).
The machines had greater success: the AI models matched or exceeded the anesthetists’ live assessment ability, and outperformed them on video assessment, achieving perfect specificity (100%) and perfect precision (100%). This means they had no false positives — no bulls were scored as in pain when they weren’t. However, the models did miss a small number of genuine pain cases (sensitivity: 94%).
Interestingly, the models showed accuracy across both white Nelore and black Angus bulls, suggesting AI isn’t easily confused by differences in appearance like color.
A Promising Future, With Caveats
The authors are optimistic about the use of AI models to complement human evaluation — even suggesting the potential for it to reduce human on-farm presence. They report that AI models show promise in solving the inter-observer variability problem that comes with human assessment, and providing more extensive pain evaluations via dynamic (video) analysis.
Overall, AI’s strength lies in its ability to recognize facial nuances that may be imperceptible or overlooked by humans, and in its capacity to scale. It’s more efficient for AI to assess cow pain than it is to hire and train humans to do so.
Aside from the encouraging results, the authors note some key limitations:
- The sample size was small. Seventeen bulls may not be representative of general populations.
- The bulls were given no food for 48 hours before surgery. This could have put them under stress and influenced pain scores.
- In the live assessments, the anesthetists knew which stage of the procedure (pre- or post-surgery) they were observing. This may have impacted their scoring.
- Certain pain markers may have been confused with related behaviors or emotional states.
- Lingering anesthesia may have skewed results, though the authors consider this unlikely as the bulls were sitting up — a sign of wakefulness — when scored.
- The binary ‘pain’ or ‘no pain’ categories may have excluded more nuanced pain-relevant information.
- The conditions were controlled. Therefore, results may not apply to different populations, settings, and environments.
What This Means For Advocates
Gaining a better understanding of animal pain is undoubtedly a positive thing. AI accuracy and scalability combined with human expertise could prove a powerful approach to farmed animal pain management. That said, relinquishing some — or all — animal husbandry practices to AI systems may have harmful animal welfare consequences, some of which may be unpredictable, unmanageable, or unknowable.
AI will continue to affect farmed animals, and indeed all sentient beings, in the coming years. For this reason, advocates would be well advised to educate themselves on AI and machine learning, and stay updated on the latest developments in model use.
In animal agriculture specifically, AI technology is referred to as Precision Livestock Farming or PLF. Wherever AI systems are already implemented, advocates should pose critical questions around its use and press for useful discussions. If AI pain detection is being used on a farm, what actions follow? Would machines administer painkillers, for example? How might this impact the animals?
Academics have already reported that the human-animal bond is at risk of being eroded by PLF, as it enables larger herd sizes with fewer workers and reduced on-farm time. When workers are less present, animals can become more fearful and reactive to them. Advocates should collaborate with veterinarians, scientists, and farmers to ensure that animal welfare is carefully considered, accounted for, and protected at all stages of AI adoption, particularly when it comes to scaling efforts. Those working in legal and government professions should prepare to play crucial roles in determining how AI is used in animal agriculture, and how welfare standards can be raised and enforced.
https://doi.org/10.1038/s41598-026-39604-2

