Adding value to food chain information: using data on pig welfare and antimicrobial use on-farm to predict meat inspection outcomes

Background Using Food Chain Information data to objectively identify high-risk animals entering abattoirs can represent an important step forward towards improving on-farm animal welfare. We aimed to develop and evaluate the performance of classification models, using Gradient Boosting Machine algorithms that utilise accurate longitudinal on-farm data on pig health and welfare to predict condemnations, pluck lesions and low cold carcass weight at slaughter. Results The accuracy of the models was assessed using the area under the receiver operating characteristics (ROC) curve (AUC). The AUC for the prediction models for pneumonia, dorsocaudal pleurisy, cranial pleurisy, pericarditis, partial and total condemnations, and low cold carcass weight varied from 0.54 for pneumonia and 0.67 for low cold carcass weight. For dorsocaudal pleurisy, ear lesions assessed on pigs aged 12 weeks and antimicrobial treatments (AMT) were the most important prediction variables. Similarly, the most important variable for the prediction of cranial pleurisy was the number of AMT. In the case of pericarditis, ear lesions assessed both at week 12 and 14 were the most important variables and accounted for 33% of the Bernoulli loss reduction. For predicting partial and total condemnations, the presence of hernias on week 18 and lameness on week 12 accounted for 27% and 14% of the Bernoulli loss reduction, respectively. Finally, AMT (37%) and ear lesions assessed on week 12 (15%) were the most important variables for predicting pigs with low cold carcass weight. Conclusions The findings from our study show that on farm assessments of animal-based welfare outcomes and information on antimicrobial treatments have a modest predictive power in relation to the different meat inspection outcomes assessed. New research following the same group of pigs longitudinally from a larger number of farms supplying different slaughterhouses is required to confirm that on farm assessments can add value to Food Chain Information reports.


Background
The primary objective of meat inspection (MI) is to identify animals unfit for human consumption. Additionally, MI can also identify animal welfare issues and be used for surveillance and control of animal diseases [1]. MI includes three key elements: food chain information (FCI), ante mortem (AM) and post mortem (PM) inspections. FCI is the link between farm and Open Access *Correspondence: joana.pessoa@teagasc.ie 1 Pig Development Department, Teagasc Animal and Grassland Research and Innovation Centre, Moorepark, Ireland Full list of author information is available at the end of the article slaughterhouse and should provide information regarding pigs' life that is relevant for meat safety. Recently, official post mortem MI in the European Union changed to visual only inspection, thus excluding routine palpation and incision procedures [2]. Indeed, more detailed MI (with palpation/incision techniques) is now only performed in suspect animals, identified through FCI, AM or/and at PM.
However, batches of incoming pigs with a high frequency of health and welfare lesions are not fit for visual MI [3,4]. These pigs need closer attention from the meat inspector, and palpation and incision procedures are likely also required, which entails a reduction in line speed [5]. Furthermore, although these lesions are not normally associated with foodborne zoonotic agents [6], palpation and incision techniques increase the risk of microbial cross-contamination [6][7][8][9].
Ideally, batches of pigs with a high frequency of health and welfare lesions should be slaughtered separately for resources to be allocated efficiently and to ensure microbial meat safety. Thus, information that enables evidencebased risk categorization of slaughter pigs is needed [3]. This could come from two sources: AM findings and/ or FCI reports. Nonetheless, considering the practical arrangements needed at the slaughterhouse, basing these measures on AM findings can be impractical and onerous.
According to European Union Regulation (EC) No. 853/2004 [2], FCI should be sent to the slaughterhouse no less than 24 h before the day of slaughter, including information, among others, on animal health status, veterinary products administered within a relevant period and with withdrawal periods greater than zero, and production data that might indicate the presence of disease (i.e. mortality records). Hence, FCI reports could be a more promising way of identifying pigs at risk. Indeed studies show it is possible to incorporate routine on-farm data on animal health (including antimicrobial use-AMU) and welfare information within the FCI [4,10,11] in spite of the potential disadvantage of farmers providing insufficient or inaccurate information [4,11]. Furthermore, there are validated standardized protocols to assess pig health and welfare on farm (Welfare Quality, 2009). These are not done routinely, as they are labour-intensive and time-consuming [13], but there are studies indicating the usefulness of adapted, scaled down versions utilising a few key animal based welfare outcomes [14].
Using FCI data to objectively identify high-risk animals entering abattoirs can represent an important step forward towards improving on-farm animal welfare. Therefore, the aim of this study was to develop and evaluate the performance of a classification model that uses longitudinal on-farm data on pig health and welfare to predict condemnations, pluck lesions and low cold carcass weight at slaughter.

Methods
This was an observational study whereby pigs were managed according to routine practices on an Irish commercial farm with a wean-to-finish system from July to November 2018. We selected this farm due to its history of respiratory disease, assessed through slaughterhouse checks [15]. This farm was positive for Mycoplasma hyopneumoniae, Actinobacillus pleuropneumoniae, porcine reproductive and respiratory syndrome virus and Influenza A virus.
Full information regarding animal management is available in [16]. In short, four batches of pigs (n = 1573, in total) of circa 12 weeks of age and weighing 25 ± 5.3 kg were housed, on arrival at the farm, in eight rooms each divided into six pens (mean number of pigs: 197 ± 5 per room and 33 ± 2 per pen). All pigs were individually identified with ear-tags and were followed until reaching the target slaughter weight of 110 kg (114 ± 15.4 kg liveweight). Pigs were transferred (at 14 and 18 weeks of age), in the same groups, to the grower and finisher accommodation, respectively. Environmental enrichment was provided by farm staff in the form of hard-plastic balls.
Average daily gain from week 12 to slaughter was 917 ± 45.2 g/day. Feed conversion ratio and finisher mortality in 2018 were 2.52 and 3.9%, respectively. The equivalent figures for the Irish finisher herd were 2.72 and 2.4%, respectively [17].

On-farm data collection
On arrival at the farm and at transfer between each production stage all pigs were individually weighed and assessed for animal-based welfare outcomes associated with the good housing and health themes of Welfare Quality ® ( Table 1). The first author carried out all assessments.
Data on antimicrobial treatments (AMT) were registered daily by farm staff on a per pig basis. Antimicrobials were only administered parenterally during the trial. For each treatment, information on pig ID, date, commercial name of the active substance, dosage, and reason for treatment was recorded. Only the number of antimicrobial treatments per pig was included in the modelling approach.

Slaughterhouse data collection
Pigs were sent to the slaughterhouse in eight batches, which corresponded to the eight rooms where they were housed on farm. A unique slap number linked to each pig's ear-tag number was used, thus allowing the attribution of each carcass to the corresponding individual pig. All pluck examinations were carried out by the same trained veterinarian.
Data collection on lung lesions followed the same protocol reported in [16]. Briefly, for each pig, individual lung lobes were examined for pneumonia lesions according to the method developed by Madec & Derrien (1981). The scores were 0 (no pneumonia) to 4 (76-100% of the lung lobe affected). Pleurisy was scored on the dorsocaudal (DC) lobes utilizing a modified version of the Slaughterhouse Pleurisy Evaluation System [21]. The scores were 0 (no pleurisy), 2 (focal lesions in one lobe), 3 (bilateral adhesions or monolateral adhesions affecting more than 1/3 of the diaphragmatic lobe), and 4 (extensive lesions affecting more than 1/3 of both diaphragmatic lobes). Cranial pleurisy (CP) and pericarditis were recorded as absent (0) or present (1).
Tail lesion scoring was performed using the same scoring system applied on-farm (Table 1). In total, three assessors performed this scoring after having received training.
All carcasses diverted for total or partial condemnation, according to the decision of the acting veterinary meat inspector, and reason for condemnation were recorded. Because the presence of cranial pleurisy and the severity of dorsocaudal pleurisy were recorded for all pigs, all carcasses for which the reason for partial condemnation was due to pleural adhesions to the chest wall were not included to calculate the prevalence of partial condemnations. Individual cold carcass weights were also recorded.

Model building procedure
Six models were built. Slaughterhouse variables were transformed into six binary variables: 1) presence of pneumonia (scores ≥ 1), 2) presence of moderate to severe dorsocaudal pleurisy (scores ≥ 3), 3) presence of cranial pleurisy, 4) presence of pericarditis, 5) partial and total condemnations, and 6) low carcass weight (carcasses belonging to the 15% of animals with lowest cold carcass weight). A second observer had to be drafted to conduct tail lesion scoring for one of the batches of pigs at slaughter resulting in considerable inconsistencies between observers. Therefore, these lesions were not included. On-farm variables were used as predictor variables ( Table 1). All animal-based welfare outcomes assessed at week 12, 14 and 18 were used with no transformation. Antimicrobial treatment was used as a continuous variable, indicating the number of treatments each pig received from week 12 until slaughter. Pig was considered the experimental unit.
The Gradient Boosting Machine algorithm (GBM) was used to evaluate the potential of health and welfare variables to predict partial and total condemnations, pluck lesions and low cold carcass weight at slaughter. The GBM algorithm is a machine learning technique, specifically a boosted tree algorithm. GBM fits additive models in a forward, stage-wise manner. At each iteration, GBM identifies "shortcomings", attributing more weight to instances predicted wrongly in the previous iteration [22].
The gbm R package was used for this analysis [23]. Several default model hyperparameters were changed from default values. The initial number of trees was set to 5000, maximum number of splits per tree was set to 3, and shrinkage was set to 0.001. Cross validation was used, with cv = 10, to determine the optimum number of trees (early stopping) to minimize Bernoulli deviance.

Assessing model performance
To characterize the overall performance of the models, sensitivity and specificity were calculated at several probability thresholds. Sensitivity was defined as the proportion of pigs presenting pluck lesions, suffering partial and total condemnations, or with low carcass weight (belonging to the 15% lowest cold carcass weight) that were correctly identified as such (true positive rate). Specificity was defined as the proportion of pigs with none of the above that were correctly identified as having no lesions/ condemnations/low cold carcass weight (true negative rate).
To test the six models on independent data, our dataset was divided into a training dataset, each time an 80% random sample, and a testing dataset (the remaining 20%).

Variable importance
GBM models display information on the relative influence of each predictor variable, based on whether a variable was selected to split on during the tree building process, and on the magnitude of the reduction of the loss function (i.e. Bernoulli loss) as a result.
Variable importance was expressed as the percentage contribution of each variable in the prediction of each response variable.

Results
Overall, 22% of pigs had pneumonia lesions at slaughter. The prevalence of dorsocaudal and cranial pleurisy was 10% and 16%, respectively. Pericarditis was recorded in 18% of pigs. Regarding condemnations, 2.6% and 0.8% of pigs were partially and totally condemned, respectively.
The prevalence of the different animal-based welfare outcomes is presented in Table 2. The average number of parenteral antimicrobial treatments administered on farm was 0.23 (min. 0 and max. 8). Table 3 shows the performance of the prediction models for pneumonia, dorsocaudal pleurisy, cranial pleurisy, pericarditis, partial and total condemnations, and low cold carcass weight. Evaluation on the test dataset showed that all models belonged to the less accurate category (0.5 < AUC ≤ 0.7), varying from 0.54 for pneumonia and 0.67 for low cold carcass weight. Furthermore, Fig. 1 shows the ROC curves for each prediction model in the test dataset, where the trade-offs between sensitivity and specificity can be observed.
The 10 most important variables per prediction model are shown in Table 4. For predicting pneumonia, which resulted in the weakest performing model, several variables contributed interchangeably. For dorsocaudal pleurisy, ear lesions (assessed on week 12) and AMT were the most important prediction variables. Similarly, the most important variable for the prediction of cranial pleurisy was the number of AMT. In the case of pericarditis, ear lesions (assessed both at week 12 and 14) were the most important variables and accounted for 33% of the Bernoulli loss reduction. For predicting partial and total condemnations, the presence of hernias (on week 18) and lameness (on week 12) accounted for 27% and 14% of the Bernoulli loss reduction, respectively. Finally, AMT (37%) and ear lesions assessed on week 12 (15%) were the most important variables for predicting pigs with low cold carcass weight.

Discussion
This study provides results of animal-based welfare outcomes and antimicrobial use assessed on farm and their ability to predict MI outcomes, pluck lesions, and poor performance assessed at slaughter. The prevalence of all animal-based welfare outcomes included in this study, with the exception of tail lesions, was higher compared to the averages for pigs in the different production stages  . Regarding the prevalence of pluck lesions, pneumonia and its severity was higher, while dorsocaudal and cranial pleurisy were similar compared to recent findings of an Irish cross sectional study [15]. Cold carcass weight was higher than the average for the Irish pig herd in 2018, while average daily gain was comparable [17]. Regarding partial and total condemnations, our findings were higher compared to a large scale observational study carried out in slaughterhouses in the Republic and Northern Ireland [25]. Although only one farm and one slaughterhouse participated in the study, and thus results should not be extrapolated or interpreted as general figures, we would like to highlight that the same group of individually identified pigs was followed longitudinally from farm to slaughter. Although several studies present results providing associations between animal-based welfare outcomes assessed on farm and different variables assessed at the slaughterhouse [4,26,27], all acknowledged that not assessing the same pigs on farm and at slaughter was a major limitation in their methodology. Furthermore, we would like to highlight that differences in farms' health status, prevalence of specific animal-based welfare outcomes, and performance could possibly influence the different variables assessed at slaughter. Overall, ear lesions were the most prevalent animalbased welfare outcome scored during all assessments carried out on farm, with the prevalence varying from 33 to 39% (at 18 weeks of age and at 12 weeks, respectively). These findings are considerably higher than average figures reported in studies carried out in Denmark, Chile, and Spain [26,28,29]. These studies reported bursitis as one of the most prevalent animal-based welfare outcomes, which is in accordance with our findings (second most prevalent outcome).
Differences in scoring conditions may be the reason for different animal-based welfare outcomes reported in some studies as, in these studies, assessments were conducted on group level and from outside the pens [18, 26,28,29]. In the current study, pigs were scored individually, outside the home pen, and with good light conditions. This likely led to more accurate recording of the welfare lesions. Even though it would be too onerous to collect such data in this way under practical conditions, Precision Livestock Farming tools could be employed [30]. Furthermore, although it is possible to collect information on animal-based welfare outcomes at slaughter during MI, several studies expressed concerns regarding its feasibility both due to time constraints and overcrowding [26,31,32].
Regarding our modelling approach, machine-learning techniques, as is the case of the GBM models used in this study, have become more commonly used in the animal science field [33]. These techniques are able to deal with a wide range of data types, incomplete datasets, collinear variables, and other assumptions that need to be met by classical regression techniques [34]. Moreover, these models can equal or outperform logistic regression models [33].
Overall, all models run with the test dataset were less accurate (0.5 < AUC ≤ 0.7), with the prediction model for pneumonia having the poorest performance (AUC = 0.54). Indeed, other studies showed that coughing may be the best on-farm indicator to predict pneumonia lesions at slaughter [16]. Dorsocaudal pleurisy, with an AUC of 0.66, was the second best performing model. The most valuable variables to predict these pluck lesions were ear lesions assessed on week 12 and the number of AMT administered. Similarly, the prediction model for cranial pleurisy (AUC = 0.60) used the same variables to obtain the biggest reduction of Bernoulli loss, but in the reverse order. Although medication was administered by farm staff, we collected information on the reasons for its use, and indeed most AMs were administered when farm staff identified pigs with clinical signs of respiratory disease. Still, other studies found that the presence of pleurisy at slaughter was associated with farmers reporting, through the FCI, the presence of coughing for the last 3 months of the rearing cycle [4,10]. However, we have previously identified strong associations between the presence of coughing and a higher prevalence of different lung lesions at slaughter, but only on the last weeks of the finisher stage in the same farm [16]. Nevertheless, coughing modelling was done at pen and room level in that study. Here, we report results at pig level. Due to the different approaches and related implications (i.e. coughing at pig level would be difficult to report in a commercial setting), we cannot directly compare these studies. Still, these results indicate that it may be useful to include, in the FCI, information on medication use and on different animal-based welfare outcomes, other than coughing, assessed throughout the finisher stage, in order to predict incoming pigs with high prevalence of pleurisy lesions. The prediction model for pericarditis (AUC = 0.60) showed that ear lesions scored during the three on-farm assessments accounted for 39% of the Bernoulli loss (Table 4), with the first two assessments being the most important variables to predict pericarditis at slaughter. Pericarditis is a common lesion seen at MI across the world [15,35,36]. Due to the chronic nature of these lesions, there is uncertainty regarding its etiology [15]. Pathogens such as Mycoplasma hyopneumoniae, Glaesserella parasuis, and Streptococcus suis are associated with pericarditis [37]. Of these pathogens, S. suis is the only one that has ear biting as an associated risk factor [38]. Furthermore, a recent study showed that pig saliva is the major natural habitat of S. suis, suggesting that saliva is the most probable source of infection by S. suis [39]. To our knowledge, this is the first study where a relationship between pericarditis and ear lesions is reported. In light of these findings, further studies should investigate this association.
The prediction model for partial and total condemnations (AUC = 0.66) showed that the presence of hernias (assessed on week 18) and lameness (assessed on week 12) were the most important predictive variables. These results are in line with the most prevalent reasons for both partial (arthritis) and total condemnations (peritonitis and presence of hernias) in our study, as per the decision of the official veterinarian. Felin et al. [10] also found associations between the presence of hernias and total condemnations.
The prediction model for low cold carcass weight had the best performance of all models (AUC = 0.67). The most important predictive variable was the administration of antimicrobials. This model was included due to the importance of cold carcass weight to farmers (as a proxy for production efficiency), and because meat inspectors are more likely to pay closer attention to smaller/lighter pigs during MI. Although the performance of this model is not high, these results indicate that pigs that required more AMT had poorer growth. Excessive use and misuse of antimicrobials is associated with inappropriate practices, such as improper dosage and dilutions, and insufficient treatment time when using parenteral antimicrobials [40]. More studies are needed to understand if it is more profitable to raise pigs that require long treatment time up to slaughter, or to euthanize them. On the other hand, these pigs may pose a higher food safety risk than non-medicated pigs due to increased risk for the presence of antimicrobial residues and potential risk for antimicrobial resistance. Therefore, it may be useful to individually identify pigs that required AMT during finisher stage and include these details in the FCI, both so farmers can track how many AMT are administered during the whole period, and so that risk categorization of these pigs may be performed at the slaughterhouse.
Interestingly, predictive variables recorded earlier in the finisher stage often scored as the most important variables in several prediction models (Table 4). Normally, lesions that occur later in the finisher stage are better predictors of lesions occurring at slaughter, especially in the case of respiratory diseases [41]. These results show the importance of following pigs longitudinally, starting earlier in the growing/finisher stage.

Conclusion
The findings from our study show that on farm assessments of animal-based welfare outcomes and information on antimicrobial treatments have a modest predictive power in relation to the different meat inspection outcomes assessed. New research following the same group of pigs longitudinally from a larger number of farms, with different health status and prevalence of animal-based welfare outcomes, and supplying different slaughterhouses is required to confirm that on farm assessments can add value to Food Chain Information reports.