Research Article: Risk-based prioritization of official animal welfare inspections using machine learning
Abstract:
For official animal welfare inspections in Austria, at least 2% of agricultural livestock farms must be selected and inspected on the basis of a risk-based random sample. In the federal state of Styria, more than 19,000 farms keep livestock, while the inspection capacity of official veterinarians is limited, requiring efficient prioritization of farm checks. This study aimed to develop a machine learning model leveraging routinely collected administrative and animal health data to identify farms in Styria at higher risk of animal welfare violations.
The statistical analyses incorporated the outcomes of animal welfare inspections from 2019 to 2023, aggregated by farm and year. A total of 2,647 aggregated inspection results were used to train an Extreme Gradient Boosting (XGBoost) model, with a further 475 results used for testing purposes. Information about farms (e.g., production type, farmer and regional data, livestock data), as well as slaughter and meat inspection data, was acquired from the Consumer Health Information System database ( Verbrauchergesundheitsinformationssystem , VIS). Additionally, data from local fallen stock rendering plants and information on antibiotics dispensed to farmers were available and incorporated into the model.
Results showed a moderate model performance with AUC (Area under the curve) of 0.75 (95%-CI [0.66, 0.82]), MCC (Matthews Correlation Coefficient) of 0.25 (95%-CI [0.19, 0.37]) and AP (Average Precision) of 0.19 (95%-CI [0.11–0.31]) for the test set. Post-hoc model interpretation revealed as most important influencing features antibiotic dispensing in cattle production, particularly overall quantities and European Medicines Agency Category D antibiotics, followed by farmer-related characteristics such as farmer age and the distance between the farm and the farmer’s residence. Membership in the Animal Health Service ( Tiergesundheitsdienst , TGD) was associated with a decrease in the model-predicted probability of animal welfare violations. Other relevant factors included the number of livestock units (cattle and poultry) on farm, cattle mortality recorded by rendering plants, and certain findings at meat inspection, such as pericarditis in pigs.
These results indicate that routinely recorded administrative and veterinary data can provide meaningful indicators for identifying farms with a higher risk of animal welfare violations. Although some predictors appear indirectly linked to welfare, they likely reflect broader farm management practices and animal health status. Risk-based sampling could support veterinary authorities in prioritizing farms for inspection and allocating inspection resources more efficiently.
Introduction:
For official animal welfare inspections in Austria, at least 2% of agricultural livestock farms must be selected and inspected on the basis of a risk-based random sample. In the federal state of Styria, more than 19,000 farms keep livestock, while the inspection capacity of official veterinarians is limited, requiring efficient prioritization of farm checks. This study aimed to develop a machine learning model leveraging routinely collected administrative and animal health data to identify farms in Styria at…
Read more