Sci-Tech

Analysis

Artificial Intelligence

Reading time: 10min

Breeding for Resilience: Interpreting Animal Behaviour With Machine Learning

published on

07/31/2025

written by

Lead writer

Stephen Kemp

Stephen has a background in the use of gene discovery for understanding resilience in tropical livestock. Current research interests focus on information systems for enabling tropical livestock improvement, including the use of artificial intelligence and large language models to enable dynamic partnerships between researchers and end users.

Ram Dhulipala

Ram is a Senior Scientist – Digital Agriculture and Innovation at the International Livestock Research Institute (ILRI) and is also Interim Director of CGIAR’s digital transformation accelerator. He has worked in the public and private sectors, in areas such as software development, corporate strategy and digital transformation.

 

Mazdak Salavati

Mazdak is a Reader in Data Science and Livestock Informatics. His background is in research software development for high throughput phenotyping of livestock species, ranging from molecular/genomic phenotypes (RNA-Seq, ATAC-Seq, RRBS, CAGE and whole genome sequencing) to animal-level proxy phenotype captures using real-time data streaming technologies.  

Share on social media

Abstract

Smallholder livestock systems face increasing challenges due to climate variability, particularly heat stress, which impacts animal health, welfare and productivity. Traditional productivity measurements, such as milk yield or growth rate, are labour-intensive, costly and fail to capture an animal’s overall adaptability. In response, the International Livestock Research Institute (ILRI) and Scotland’s Rural College (SRUC) are pioneering a novel phenotyping approach using low-cost sensors, video analysis and artificial intelligence (AI). By integrating data on animal movement, behaviour, physiological responses and environmental conditions, they are developing digital twins: real-time digital representations of animals’ health and comfort. This method provides a scalable, cost-effective proxy for fitness and resilience, enabling more accurate and rapid genetic selection suited to smallholder environments. Beyond breeding, the system supports animal management and policy planning by offering timely, actionable insights. This approach to phenotyping could revolutionise livestock improvement strategies in resource-constrained settings.

AI-Derived Proxies of Livestock Welfare, Health and Performance Can Overcome the Constraints of Traditional Phenotyping

In smallholder systems, livestock are exposed to diverse pressures that influence their health and welfare, and therefore their ability to grow and be productive. With growing climate-related risks, smallholders and their livestock are expected to face increasingly complex environmental factors. One such challenge is the need for livestock to perform well under increasing temperature stress.

Historically, productivity has been measured by intensive measurement of isolated parameters such as milk production or growth rate. These data are in turn used to plan breeding programmes to ensure future productivity. However, measuring productivity this way is cumbersome and expensive; it also considers traits in isolation rather than understanding the overall state of health and welfare of the animal, which reflect true adaptation and resilience. For example, milk production is a key trait in breeding more productive dairy cattle, and studies have demonstrated a correlation between increased environmental temperature-humidity index (THI) and reduced milk production [1]. But while the milk production phenotype provides an important baseline, it is neither easily measured nor readily scalable.

The intensive measuring of such parameters has enabled breeding for improved productivity in the Global North. It is made possible by large-scale production systems with highly homogeneous environments and well-defined breeds, and by taking advantage of opportunities to measure traits of interest as part of farmers’ commercial relationships. In contrast, tropical smallholder systems are far more diverse, with smaller numbers of livestock per household and largely manual, informal methods for handling animal products. As a result, breed improvement programmes aiming to benefit smallholders are rarely carried out in actual smallholder settings, resulting in little to no improvement in smallholder profitability [2]. Indeed, this gap has widened as genetic innovations like genomic selection have accelerated the rate of genetic gain in intensive farming but have failed to benefit smallholders due to the absence of baseline phenotypes [3]. Furthermore, these programmes have overlooked the multiple and interrelated factors linked to heat stress, including behavioural, health, genetic and environmental.

©Dejan Sarec

The Search for Proxies for Adaptation and Fitness

The need for large-scale measures of generalised real-world performance has led to a search for proxies for adaptation or fitness that can be applied at scale and low cost per animal. This would free breeding programmes from the tyranny of conventional phenotyping, which represents a constant drag on resources while providing only a narrow view of selected aspects of adaptation. The goal is to identify an easily measured set of metrics that reflect interactions between health, genetics and the environment, and, which could be applied to breeding for traits such as tolerance to heat stress. Importantly, such an approach would also provide insights into animal welfare. It may be, moreover, that breeding for animals simply showing reduced signs of stress could enable selection for tolerance to environmental stressors, thus improving adaptability and productivity.

Animal wearables that are smart enough to do the job are expected to be affordable and capable of filling the phenotyping gap, thus unleashing the potential of tools such as genomic selection.

Leveraging AI and Digital Twins for Holistic Animal Welfare

The emergence of machine learning coupled with simple low-cost sensors or image analysis provides an exciting possible route to achieving a more holistic view of animals’ comfort zones within a given environment, and offers the possibility of integrating data streams as diverse as heat load, signals of stress/contentment, farmer feedback and others to build meaningful in-silico representations of animals in their real-world environments. Such so-called ‘digital twins’ might provide not only measures of real-world performance to drive genetic improvement, but also near- real-time information to assist in animal care and management.

Constructing and maintaining digital twins of individual livestock or groups – whether at household, regional or national level – demands near-real-time data from animals, integrated with localised data covering factors such as weather, feed availability, veterinary care and market conditions. As the Global South becomes increasingly integrated into digital data systems, more and more of these data streams are available, except for those from the animals themselves.

What remains missing are data streams representing animal behaviour, and from which artificial intelligence (AI) tools can extract signals associated with this behaviour to provide a proxy for conventional phenotyping; these phenotypes are then integrated with environmental measures. The resulting in-silico representations might support animal keepers by alerting them to health and management issues, and allowing them to model the consequences of changes in their farming practice or anticipated environmental shifts. In the longer term, such data could drive a distributed breeding programme, using real-world performance information to calibrate genomic selection models; moreover and for the first time, it might spur the creation of breeding programmes aimed at producing animals adapted to the environmental conditions they will actually face.

Empowering Smallholder Farmers With Affordable Phenotyping Tools

Scientists at the International Livestock Research Institute (ILRI) have for many years understood the need to measure the productivity of real-world livestock in the hands of smallholder farmers, and have developed a suite of ‘action research’ programmes,  which both provide day-to-day management support and capture data to identify the most suitable breeding material. However, they have long been constrained by the cost and difficulty of measuring the performance of animals scattered across tiny herds over large areas. At the same time, Scotland’s Rural College (SRUC) has been pioneering the concept of digital twins in dairy systems to enable a drive towards carbon- neutral farming in Scotland. By combining ILRI’s expertise in improving smallholder breeds with SRUC’s innovations in dairy digital twins, a unique research concept has emerged, incorporating AI-driven sensor expertise from commercial collaborators at Bodit and animal welfare skills from SRUC’s specialist team. The result is a research programme that deploys an array of sensors, coupled with image analysis, to train an AI model to detect significant livestock events such as coughing, feeding or changes in movement patterns that reflect underlying physiological states and processes, including health, reproduction and nutrition.

Figure 1. Range of weather data and rumination patterns from animals in the study  

The upper portion of the figure shows temperature humidity index (0-100% where > 72 is considered a criterion for heat stress) during the eight weeks of pen trials, accompanied by a segmented image of the animals in the pen. The lower portion shows pattens of rumination (expressed as hours per day) and sitting time measured using neck collar sensors from Bodit. 

Working with the cattle breeds most commonly used by smallholder farmers in East Africa, the programme detects and monitors through a simple low-cost wearable; this data is matched to behaviours (recorded by video cameras) and physiological changes (recorded by a bolus placed in each animal’s rumen). Combining these data streams with knowledge of, for example, the minute-by-minute heat load that each animal is exposed to (determined not only by temperature, but also humidity, wind and sunshine), enables the team to optimally train its AI. The AI will consequently be able to convert simple, low-cost streams of data into useful measures of overall levels of health and comfort, as well as detect key parameters such as oestrus, heat stress, sickness or injury. If successful, the aim is to identify a minimal sensor requirement, which could be motion or vision-based, and subsequently develop ultra-low-cost devices, which could in turn be tested by collaborators in East Africa’s farming communities.  

These trends are emerging at a time when AI models are becoming more powerful and more easily deployed on very small and secure systems, since the cost and power requirements of sensors are falling while their onboard abilities are exponentially increasing. Animal wearables that are smart enough to do the job are expected to be affordable and capable of filling the phenotyping gap, thus unleashing the potential of tools such as genomic selection. 

This CGIAR Digital Transformation Accelerator programme represents an important advance in livestock phenotyping technology [4]. In many ways, it is the phenotypic equivalent to genomic selection, which builds an estimate of genetic merit on the basis of an overall genomic fingerprint. The AI-driven phenotyping approach described here yields an overall ‘fitness’ metric that is not directly based on any single, simple trait, but represents an animal’s suitability for a given environment. Such tools will enable more rapid breeding for adaptation, with reduced environmental impact and improved decision-making support for farmers and policymakers.  

Main image: ©ChatGPT

References  

[1] Ekine-Dzivenu CC, Mrode R, Oyieng E, Komwihangilo D, Lyatuu E, Msuta G, et al. Evaluating the impact of heat stress as measured by temperature-humidity index (THI) on test-day milk yield of smallholder dairy cattle in a sub-Sahara African climate. Livest. Sci. 2020;242:104314. https://doi.org/10.1016/j.livsci.2020.104314  

[2] Marshall K, Gibson JP, Mwai O, Mwacharo JM, Haile A, Getachew T, et al. Livestock genomics for developing countries – African examples in practice. Front. Genet. 2019;10:413439. https://doi.org/10.3389/fgene.2019.00297  

[3] Mrode R, Ojango J, Ekine-Dzivenu C, Aliloo H, Gibson J, Okeyo MA. Genomic prediction of crossbred dairy cattle in Tanzania: A route to productivity gains in smallholder dairy systems. J. Dairy Sci. 2021;104:11779-11789. https://doi.org/10.3168/jds.2020-20052  

[4] CGIAR. Program/Accelerator: Digital Transformation. CGIAR; 2025. Available at: https://www.cgiar.org/cgiar-research-porfolio-2025-2030/digital-transformation/ (accessed on 9 July 2025). 

Continue reading

07/30/2025

5 min read

Balancing AI Innovation with Responsible Governance

Amy Hammond

artificial intelligence_the use of artificial intelligence in animal care

07/04/2025

5 min read

Smart Barns, Digital Kennels: How artificial intelligence is quietly revolutionising animal care

Santiago Alonso Sousa

07/02/2025

5 min read

From Reactive to Predictive Care: A Conversation on AI and Animal Health

Claude AI

Discover more thematic articles

Animal health

Biosecurity

Collaboration

Gender

Veterinary Workforce

Wildlife