论文信息
论文解读
AI 辅助整理- 方法
- XGBoost模型,使用2019-2023年2647条检查结果及VIS等行政兽医
- 发现
- 模型AUC 0.75,抗生素发放量、农户年龄和距离等是动物福利违规的重要预测因子。
- 机会点
- 可探索将常规兽医行政数据与机器学习结合,用于其他农业合规监管的精准抽查与风险预警。
论文摘要
引言 在奥地利,官方动物福利检查要求至少对2%的农业牲畜养殖场进行基于风险的随机抽样检查。在施泰尔马克州,超过19,000个养殖场饲养牲畜,而官方兽医的检查能力有限,因此需要高效地确定养殖场检查的优先顺序。本研究旨在开发一种机器学习模型,利用常规收集的行政和动物健康数据,识别施泰尔马克州动物福利违规风险较高的养殖场。方法 统计分析纳入了2019年至2023年动物福利检查的结果,按养殖场和年份汇总。共有2,647条汇总检查结果用于训练极端梯度提升(XGBoost)模型,另有475条结果用于测试。养殖场相关信息(如生产类型、养殖者及区域数据、牲畜数据)以及屠宰和肉类检验数据均获取自消费者健康信息系统数据库(Verbrauchergesundheitsinformationssystem,VIS)。此外,当地病死动物无害化处理厂的数据以及养殖者抗生素发放信息也可获取,并纳入模型。结果 结果显示模型性能中等,测试集的AUC(曲线下面积)为0.75(95%-CI [0.66, 0.82]),MCC(马修斯相关系数)为0.25(95%-CI [0.19, 0.37]),AP(平均精度)为0.19(95%-CI [0.11–0.31])。事后模型解释显示,最重要的影响因素是养牛生产中的抗生素发放,特别是总体用量和欧洲药品管理局D类抗生素,其次是养殖者相关特征,如养殖者年龄和养殖场与养殖者住所之间的距离。加入动物健康服务(Tiergesundheitsdienst,TGD)与模型预测的动物福利违规概率降低相关。其他相关因素包括养殖场牲畜单位数(牛和家禽)、无害化处理厂记录的牛死亡率,以及肉类检验中的某些发现,如猪心包炎。讨论 这些结果表明,常规记录的行政和兽医数据可为识别动物福利违规风险较高的养殖场提供有意义的指标。尽管一些预测因素似乎间接相关
全文
Frontiers in Veterinary ScienceFrontiers in Veterinary Science 01 frontiersin.org
TYPE Original Research
PUBLISHED 30 September 2026
DOI 10.3389/fvets.2026.1938469
OPEN ACCESS
EDITED BY
Heinzpeter Schwermer,
Federal Food Safety and Veterinary
Office (FSVO), Switzerland
REVIEWED BY
Yosuke Sasaki,
Meiji University, Japan
Tobias Ueli Blatter,
Eidgenossisches Bundesamt fur
Lebensmittelsicherheit und
Veterinarwesen, Switzerland
CORRESPONDENCE
Eva Obenaus
eva.obenaus@stmk.gv.at
RECEIVED 15 July 2026
REVISED 08 September 2026
ACCEPTED 14 September 2026
PUBLISHED 30 September 2026
CITATION
Obenaus E, Kuchling S, Zerak T,
Schleicher C, Kopacka I, Budik S,
Grimme S, Hiesel J, Eckhardt P,
Baumgartner J and Firth CL (2026)
Risk-based prioritization of official
animal welfare inspections using
machine learning.
Front. Vet. Sci. 13:1938469.
doi: 10.3389/fvets.2026.1938469
COPYRIGHT
© 2026 Obenaus, Kuchling, Zerak,
Schleicher, Kopacka, Budik, Grimme,
Hiesel, Eckhardt, Baumgartner and Firth.
This is an open-access article distributed
under the terms of the Creative
Commons Attribution License (CC BY).
The use, distribution or reproduction in
other forums is permitted, provided the
original author(s) and the copyright
owner(s) are credited and that the
original publication in this journal is
cited, in accordance with accepted
academic practice. No use, distribution
or reproduction is permitted which does
not comply with these terms.
Risk-based prioritization of official
animal welfare inspections using
machine learning
Eva Obenaus 1,2, Sabrina Kuchling 3, Tadej Zerak 3,
Corina Schleicher 3, Ian Kopacka 3, Sven Budik 2, Sabine Grimme 2,
Jörg Hiesel 2, Peter Eckhardt 2, Johannes Baumgartner 4 and
Clair L. Firth 1
1Centre for Veterinary Public Health and One Health, Clinical Department for Farm Animals and Food
System Transformation, University of Veterinary Medicine Vienna, Vienna, Austria, 2Department of
Veterinary Administration, Styrian Provincial Government, Graz, Austria, 3Division of Data, Statistics and
Risk Assessment, Austrian Agency for Health and Food Safety (AGES), Graz, Austria, 4Animal Welfare
Science Unit, Clinical Department for Farm Animals and Food System Transformation, University of
Veterinary Medicine Vienna, Vienna, Austria
Introduction: For official animal welfare inspections in Austria, at least 2% of agri-
cultural live stock 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 priori tization 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.
Methods: 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 inspec tion 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 farm ers were available and incorporated into the model.
Results: 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 dispens ing 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.
Discussion: These results indicate that routinely recorded administrative and
veterinary data can provide meaning ful indicators for identifying farms with a
higher risk of animal welfare violations. Although some predictors appear indi -
rectly linked to welfare, they likely reflect broader farm management practices
and animal health status. Risk-based sam pling could support veterinary authori-
ties in prioritizing farms for inspection and allocating inspection resources more
efficiently.
Obenaus et al. 10.3389/fvets.2026.1938469
Frontiers in Veterinary Science 02 frontiersin.org
KEYWORDS
animal welfare, animal welfare violations, data-based indicators, machine learning
model, risk-based sampling, welfare violation indicator
1 Introduction
According to the Austrian Animal Welfare Inspection Ordinance,
2% of agricultural livestock farms in Austria must undergo an official
animal welfare inspection each year. Farms selected for inspection
must be chosen on the basis of risk (1). In the federal state of Styria,
19,549 farms were reported to keep livestock in 2023 (2). The 2023
Austrian Agricultural Structure Survey, reported average herd sizes of
36 head of cattle, 469 chickens, 119 pigs, 35 sheep and 14 goats per
farm, with Styria accounting for 26.7% of the total pig and 32.4% of
the total chicken population in the country (3). By contrast, only 38
official veterinarians were responsible for animal welfare inspections
in Styria in 2021 (4). A study from Finland showed that animal welfare
checks are a particularly stressful part of official veterinarians’ work
(5). To carry out the required number of annual welfare inspections,
the official veterinarians in Styria have to inspect around 400 farms
per year. In recent years, scientific research has increasingly focused
on identifying indicators that can be used to predict animal welfare
violations (6–10). Various studies have attempted to address this issue
using data-driven and/or animal-based analytics (7, 9, 10). Private
data sources, such as monitoring biometric parameters or perfor -
mance data, could be an efficient method of observing animal health
and welfare and it would be highly interesting to use these data for
violation prediction (11). However, although these parameters could
be highly beneficial for animal welfare predictions, these data are often
owned by the farmers and/or private organizations and are therefore
not available to public veterinary authorities for analysis ( 9).
Investment in monitoring systems is often associated with an
increased focus on animal welfare and fewer violations, which should
be encouraged and promoted, and the possibility that such systems
could be used for welfare surveillance by national authorities may lead
to reduced uptake among farmers. Nevertheless, livestock farms gen-
erate a large amount of data, some of which are collected to comply
with regulatory requirements or to meet the requirements of various
agri-marketing programs and are accessible to official authorities.
Risk-based inspection systems generally comprise two related
components: the estimation or categorization of risk and the subse-
quent allocation of inspection resources. Risk may be estimated using
expert-based assessments, predefined risk scores, scenario-tree
models, statistical models or machine-learning methods. The resulting
risk estimates can then be used to stratify farms, rank them for inspec-
tion or assign different selection probabilities, for example through
probability-proportional-to-risk sampling ( 12, 13). Scenario-tree
models provide a structured framework for combining predefined risk
pathways, probabilities and expert knowledge in veterinary surveil-
lance (14). In the present study, we aimed to develop an explicitly
data-driven risk-ranking method based on routinely recorded admin-
istrative and veterinary variables, without introducing additional
expert-assigned weights, scores or risk categories. Extreme Gradient
Boosting (XGBoost) was considered suitable for this purpose because
the available data comprised heterogeneous predictors with poten-
tially nonlinear associations and interactions, as well as missing
values. As a tree-boosting method, XGBoost can model such
relationships and generate a continuous score for ranking farms with-
out requiring all thresholds and interaction structures to be specified
in advance (15). The resulting model was intended to provide a risk-
estimation and ranking component that complements, rather than
replaces, the existing risk-based and expert-informed control system.
Against this background, the primary objective of this study was
to develop a deliberately data-driven model based on routinely
recorded administrative and veterinary variables to rank livestock
farms according to their predicted risk of a recorded positive animal-
welfare inspection outcome. Our main question was: Which routinely
recorded farm and animal-related characteristics are associated with
a higher predicted risk of a recorded positive animal-welfare inspec-
tion outcome and could therefore support the prioritization of farms
for official veterinary inspection? The model is intended to comple-
ment and support the development of the inspection plan by provid-
ing an additional, data-driven basis for prioritizing farms while
maintaining the required broader sampling of farms. Farms with
higher predicted risks could therefore be given higher priority within
the overall selection process, supporting a more targeted allocation of
available inspection resources. The model is intended as a decision-
support tool and would not automatically trigger additional monitor-
ing or inspections.
2 Materials and methods
The analytical dataset comprised 3,122 aggregated farm-year
inspection records from official animal welfare inspections conducted
in Styria between 2019 and 2023. These records were used to develop
and evaluate an Extreme Gradient Boosting (XGBoost) model for the
risk-based prioritization of livestock farms for official inspection.
Official animal welfare inspections in Styria are conducted within
a risk-based and probabilistic control system. Farm selection is not
based exclusively on animal-welfare-related criteria: for administrative
efficiency, animal welfare inspections may be combined with other
official controls, including feed and milk hygiene controls. Selection
also incorporates available administrative information and profes-
sional assessment by the competent authorities. The sampling frame
comprised all eligible livestock farms, and no farm category was sys-
tematically excluded from selection; however, selection probabilities
were unequal. Because individual farm-level inclusion probabilities
could not be reconstructed no inverse-probability weighting or other
formal correction for selection bias was applied.
Inspections were carried out by official veterinarians using the
animal welfare manuals and checklists issued by the Federal Ministry
of Labor, Social Affairs, Health, Care, and Consumer Protection (16).
To promote a consistent and objective assessment across inspections,
official veterinarians in Styria routinely participate in calibration train-
ing sessions for animal welfare inspections. These sessions aimed to
harmonize the application and interpretation of the relevant assess-
ment criteria and thereby reduce variation between inspectors. The
resulting inspection outcomes were used as the basis for defining the
binary target variable in the present study. A farm-year observation
Obenaus et al. 10.3389/fvets.2026.1938469
Frontiers in Veterinary Science 03 frontiersin.org
was classified as positive when an animal welfare deficiency was docu-
mented during an official inspection or when a criminal complaint
was filed as a consequence of the inspection. The number of farms
with animal welfare violations, categorized according to the respective
assessment categories, is presented in Supplementary Table S1. Farms
without an observed inspection outcome were not included as nega-
tive cases.
A gradient boosting machine learning model was used to rank
farms according to their predicted probability of a positive recorded
inspection outcome. The model was intended to support prioritization
of farms for official inspection and not to estimate the population
prevalence of underlying animal welfare violations. The approach is
based on an ensemble of decision trees that are fitted sequentially,
where each tree optimizes the residuals of the preceding ensemble,
thereby improving predictive performance and reducing variance
compared with single-tree models. Model hyperparameters were
tuned using a cross-validated grid search, shown in
Supplementary Figure S2. Hyperparameter tuning was performed
exclusively on the training data using cross-validation. The test set was
not used at any stage of tuning procedure. All analyses were per -
formed in R version 4.3.3, and model fitting was conducted using the
xgboost package (version 1.7.11.1) (17, 18).
Model performance was assessed using the area under the receiver
operating characteristic curve (AUC-ROC), the Matthews Correlation
Coefficient (MCC) and a gain plot (19, 20). The ROC represents the
true positive rate (sensitivity) versus the false positive rate (1-specific-
ity). The value ranges from 0 to 1. An AUC of 0.5 suggests no discrimi-
nation, meaning that the model would perform as well as a random
selection. A value close to 1 would represent a theoretically perfect
model, whereas a value close to 0 indicates that the model systemati-
cally predicts the wrong class. The Matthews Correlation Coefficient
(MCC), on the other hand is a metric used to evaluate the quality of
binary classifications. This value ranges from −1 to 1. As with the
AUC, a score of 1 would represent a theoretically perfect model.
Values close to 0 correspond to random performance, while −1 indi-
cates total disagreement between predictions and observations.
Provided is also average precision (AP) and confidence intervals for
each metric. Average precision was calculated by ranking observations
according to their predicted probability of the positive class and com-
puting precision at each positive observation. AP corresponds to the
mean precision across these ranks. Confidence intervals (95% CI)
were estimated using 5,000 non-parametric percentile-bootstrap
samples. Farms were used as the resampling unit where repeated
observations per farm were present; otherwise, individual observa-
tions were resampled.
The area under the ROC curve (AUC-ROC) is insensitive to class
imbalance, whereas the Matthews Correlation Coefficient (MCC) is
prevalence-dependent and is not directly comparable across datasets
with substantially different class distributions. However, unlike accu-
racy or F1-score, it does only assign a high score when a classifier
performs well on both classes and provides a balanced summary of all
four cells of the confusion matrix. Both metrics were therefore con-
sidered appropriate for the present study, where non-compliant farms
(8.1%) were strongly underrepresented relative to compliant farms
(91.9%). Because the intended application was to prioritize farms for
inspection, random selection was used as an operational benchmark
for the ranking task. The random-selection reference represents the
expected cumulative identification of positive inspection outcomes
when farms are selected without risk-based prioritization. A gain plot
(cumulative gains chart) shows the cumulative proportion of positive
inspection outcomes identified by a model as a function of the propor-
tion of the population, ranked by predicted probability. It compares
model-based prioritization with random selection and illustrates the
proportion of recorded positive inspection outcomes identified among
the top-ranked farms.
To this end, characteristics of each farm and species that could
support the ranking of farms according to their risk of a positive
recorded inspection outcome were included as model features. All
reported features were included, and feature selection was not per-
formed as a pre-processing step; instead, the internal feature selection
mechanism of XGBoost was relied upon to identify the most relevant
predictors during model training. The characteristics were based on
data from the Consumer Health Information System
(Verbrauchergesundheitsinformationssystem (VIS)) and the fallen stock
rendering plant (Tierkörperverwertung (TKV)). The available data
were split into 85% for training the model and 15% for testing. This
ratio was chosen to ensure a sufficient number of training observa-
tions given the relatively low prevalence of non-compliant outcomes,
and because farms inspected across multiple years were assigned
exclusively to either the training or the test set to prevent data leakage.
This farm-level partitioning reduced the number of independent units
available for testing and motivated the use of a larger training propor-
tion. Therefore, a total of 2,647 aggregated inspection results from
2,387 unique farms were used for training and 475 inspection results
from 421 unique farms for testing. A table showing train and test split
as well as the number of farms with specific set of inspections results
is represented in the Supplementary Table S3.
To facilitate post hoc model interpretation, SHapley Additive
exPlanations (SHAP) values were calculated. Global feature impor-
tance was summarized using the mean absolute SHAP values, while
the sign of the SHAP values indicated whether a given feature value
contributed to an increase or decrease in the model-predicted prob-
ability for an individual observation.
2.1 Features
The model included six main categories of influencing factors:
farm information, production type, dispensing of antibiotics, data
from the ante-mortem and post-mortem slaughterhouse inspection,
fallen/dead stock rendering plant and density of the location of veteri-
nary practices. The data were obtained from administrative databases
maintained by the respective data custodians. The databases are sub-
ject to regular quality assurance and validation procedures conducted
by the responsible data providers. Before model development, descrip-
tive data checks were performed to identify implausible values, incon-
sistent entries, unusual distributions, and potential reporting errors.
No duplicated records or systematic errors were identified, the avail-
able data were used, without introducing ad hoc corrections to indi-
vidual records.
Features with only two possible values (such as ‘yes’ or ‘no’) were
encoded as 0 for ‘no’ (false) and 1 for ‘yes’ (true). Features with non-
numeric values were ‘one-hot-encoded’ into multiple features, one for
each possible value. After preprocessing and one-hot encoding, the
final dataset contained 80 model features. Descriptive statistics for all
features are provided in Supplementary Table S4. If no or insufficient
information was available for a feature, its value was coded as NA
(“not available”). The rules used to determine when values were coded
as NA are described in the Supplementary Table S5. No farms were
Obenaus et al. 10.3389/fvets.2026.1938469
Frontiers in Veterinary Science 04 frontiersin.org
excluded because of missing feature values; instead, missing values
were retained as NA, the modeling approach handled these missing
values directly, allowing missingness to potentially contribute to
model predictions. In summary, the model examined various features
across all six subcategories which are listed in Table 1. The target vari-
able, inspection result, was paired with feature values from the previ-
ous year for each inspection, unless otherwise specified. Although
some features are species-specific, all features were included in a single
general model. Farms are selected for inspection based on their overall
risk across all species and are subsequently inspected for every species
present on the farm. A general model does increase practicability
compared to species-specific models. Nevertheless, sensitivity analyses
of model performance using species-specific models were also con-
ducted and are reported in the Supplementary Table S6. Detailed
descriptions, summary statistics, and missingness information for all
model features are provided in Supplementary Tables S4 and S5. The
features are briefly described below.
2.1.1 Farm information
Various details about the farmers themselves are available for each
farm. One potential factor influencing the likelihood of an animal
welfare violation was considered to be membership of the Animal
Health Service ( Tiergesundheitsdienst (TGD)). The Animal Health
Service aims to prevent animal diseases and improve the overall health
and welfare on the farm. TGD veterinarians are only permitted to
dispense certain antibiotics to farmers who are also members of the
TGD and who have completed the appropriate medicine administra-
tion and handling courses (21). Important to note is that according to
the List of veterinary medicinal products approved pursuant to
Section 2(2) of the Veterinary Medicinal Products Application
Regulation 2010 (Federal Law Gazette II No. 259/2010), certain anti-
biotic-containing veterinary medicinal products may also be dis -
pensed to animal holdings that are not members of the TGD, provided
that the applicable legal requirements are met (22).
Another possible influencing factor could be the Single
Application Form (SAF , Mehrfachantrag), an annual application
Austrian farmers can submit to claim EU agricultural subsidies under
the Common Agricultural Policy (CAP) including area-based aid and
subsidies for improved animal welfare practices linked to compliance
with certain management and husbandry standards (23). To do so,
farmers must provide information on land area, land use, livestock
numbers, and participation in agri-environmental and animal welfare
programs. The application is typically submitted electronically within
legally prescribed deadlines. Failure to submit SAF excludes access to
these CAP-based financial supports.
Since farm-specific characteristics, such as the physical location
and the number of individuals involved in farm operations, may be
associated with the likelihood of animal welfare violations, the number
of managers per farm, the maximum number of farms to all farmers
and the distance from the farm to the home address were further fea-
tures of interest. If a farm had more than one manager, the maximum
distance to a residential address was considered. If a farmer owned
more than one farm, the maximum distance between all farms was
taken into account. The maximum age of farmers was the last charac-
teristic included under this category. For this set of features there is no
historical data available, which means the state at modeling is used for
values of features for all years.
2.1.2 Production type
The number of animals was calculated for each species, measured
in livestock units (LSU, Großvieheinheit (GVE)), the standard EU con-
version unit used to compare different farm animals based on their
liveweight (24). For cattle, information on the type of farm (dairy, calf
fattening, cattle fattening/beef, suckler cow husbandry/fattening) and
alpine pasturing registration was obtained, partly based on animal
movement data. In pig production, a distinction was made between
rearing gilts, breeding, fattening, and combined farrow-to-finish sys-
tems. For poultry, three production types are available: laying hens,
pullets (rearing) and broilers. These were also classified according to
whether they reared chickens or turkeys, or whether the species was
not specified. For pigs and poultry, an additional factor considered
was whether the farm engaged in free-range farming. For horses,
goats, and sheep, no further distinction was made between the pro-
duction systems. Only the presence of these species and the herd size
in LSU were considered.
2.1.3 Antibiotics
Quantities of veterinary antibiotics dispensed by the herd veteri-
narians to the farmer are documented in the PHAROS database (25).
The dose-based unit of measurement DDDvet (Defined Daily Dose
for animals) as defined by EMA (European Medicines Agency) is used
(26). The total defined daily doses of antibiotics dispensed (adjusted
for herd size) per year are defined for each farm, enabling compari-
sons of these characteristics between farms regardless of their size (27,
28). EMA categorizes antibiotics into four groups: Category A antibi-
otics are not licensed for use in veterinary medicine and are never
permitted for use in food-producing animals and were therefore not
included in this model. Categories B and C are subject to restrictions,
such as compulsory sensitivity testing (29). While category D includes
antibiotics used as first line treatments, such as penicillins, tetracy-
clines and sulfonamide/trimethoprim combinations (30). Information
about antibiotics becomes available with higher delay compared to
data from other features. Therefore, each inspection result is matched
with antibiotics data from 2 years prior to the inspection.
2.1.4 Ante-mortem and post-mortem
slaughterhouse inspection
The data on slaughter and meat inspection ( Schlachttier- und
Fleischuntersuchung (SFU)) provide information on the number of
inspections carried out and the number of identified findings.
Inspectors must categorize their findings using a standardized SFU-
code (A, B, C, D, E) ( 31, 32). Categories A and B, which are not
included in this model, refer to animal diseases that are listed as
OIE/WOAH diseases, such as foot-and-mouth disease or tubercu -
losis. These classifications were not taken into account because they
involve highly infectious notifiable and not notifiable diseases that
are not considered to be directly related to animal welfare viola -
tions. Category C describes obvious animal welfare violations,
which are primarily visible at ante-mortem inspection. Post-
mortem, Category D is used when the entire carcass is condemned
and category E when only certain organs are unfit for human con -
sumption. Each category is assigned a number to specify the find -
ings. For the model, all category C entries were combined due to the
low number recorded. All category C, D & E entries were
Obenaus et al. 10.3389/fvets.2026.1938469
Frontiers in Veterinary Science 05 frontiersin.org
TABLE 1 Overview of features included in the model as potential indicators of animal welfare violations.
Feature group Species/Category Feature Data type
Production type Cattle No cattle production Binary
Calf fattening Binary
Cattle fattening/beef Binary
Dairy Binary
Suckler cow husbandry/fattening Binary
Alpine cattle pasture Binary
Livestock units cattle Continuous
Pigs No pig production Binary
Pig rearing gilts Binary
Pig fattening Binary
Pig breeding Binary
No pig stock during evaluation period Binary
Combined farrow-to-finish Binary
Free range pig farming Binary
Livestock units pigs Continuous
Poultry No poultry production Binary
Laying hens Binary
Pullets (rearing) Binary
Poultry fattening/broilers Binary
Chicken Binary
Turkey Binary
Undefined poultry Binary
Free range poultry farming Binary
Organic poultry farming Binary
Livestock units poultry Continuous
Sheep No sheep production Binary
Livestock units sheep Continuous
Goat No goat production Binary
Livestock units goat Continuous
Horse No horse production Binary
Livestock units horse Continuous
Farm information Single Application Form (CAP subsidies) Binary
Member of Animal Health Service Binary
Maximum age of farmer Count
Number of managers Count
Maximum number of farms of each associated person Count
Maximum distance between all farms of each associated
person
Continuous
Distance farm to farmer’s home address Continuous
Maximum distance from farm to all people home address Continuous
Ante-mortem and post-
mortem Slaughterhouse
inspection
Cattle, pigs, poultry, sheep, goat,
horse
Relative number of C (animal welfare violation) Ratio
Relative number of D061* (polyarthritis) Ratio
Relative number of D164* (multiple abscess) Ratio
Relative number of D164a* (other findings) Ratio
Relative number of E167# (pneumonia) Ratio
Relative number of E168# (pericarditis) Ratio
Relative number of E169# (pleuritis) Ratio
Relative number of E169a# (peritonitis) Ratio
Relative number of E169gs# (adhesion/sticking of entrails) Ratio
(Continued)
Obenaus et al. 10.3389/fvets.2026.1938469
Frontiers in Veterinary Science 06 frontiersin.org
potentially expected to indicate an animal welfare violation and
were therefore taken into account in the modeling and are listed in
Table 1.
2.1.5 Fallen/dead stock rendering plant
Rendering plants also maintain important data. The number of
fallen/dead stock in each category is collated for each farm. For
horses, goats and sheep, the number of dead animals is divided by the
herd size. For poultry, weight in livestock units is a more accurate
measurement than counting individuals. For these species, a ratio of
dead animals to livestock numbers is calculated using LSU. For pigs,
the number is divided into adult pigs and piglets. Due to the more
detailed database for cattle, four subgroups are used: abortion/still-
birth; calves (<6 months old); youngstock (6–24 months); and adult
cattle (>24 months). Unknown age of the animal is indicated
accordingly.
2.1.6 Veterinary practices
Information about veterinary care was included in the model. The
regional density of TGD veterinarians in a district or municipality was
taken into account. By definition, to be veterinary members of the
TGD, these practitioners are routinely (although perhaps not exclu-
sively) treating farm animals. Therefore, the number of TGD
veterinarians, whose practice address was located in the same region
as the farm, was divided by the total number of farms in that region.
2.2 Feature importance—SHAP
The SHAP (Shapley Additive Explanations) method is used to
interpret the results of machine learning models by assigning a con-
tribution value to each feature. SHAP values quantify the contribu-
tion of each feature to the model prediction. A positive SHAP value
indicates that the corresponding feature value increases the predic-
tion. In this case, a higher SHAP value indicates a higher predicted
probability of animal welfare violations. A negative SHAP value indi-
cates that the corresponding feature value decreases the prediction.
The larger the absolute negative value, the greater the negative con-
tribution of the feature to the prediction; similarly, the larger the posi-
tive value, the greater the positive contribution. Feature importance
is calculated as the mean of absolute SHAP values (MSV). SHAP was
chosen because it provides a consistent additive decomposition of
individual model predictions and can summarize both the magnitude
and direction of feature contributions for a tree-based model. In this
study, SHAP was used for post-hoc interpretation and communication
of model behavior, not as a causal analysis or as a stand-alone rule for
selecting farms. When predictors are correlated or structurally linked,
SHAP contributions may be shared between variables; therefore, the
reported rankings should be interpreted as model-based attributions
rather than independent effects.
TABLE 1 (Continued)
Feature group Species/Category Feature Data type
Fallen/dead stock rendering
plant
Cattle Relative number of abortions/stillbirths (cattle) Ratio
Relative number of dead calves (<6 months) Ratio
Relative number of dead youngstock cattle (6–24 months) Ratio
Relative number of dead adult cattle (>24 months) Ratio
Relative number of dead cattle unknown age Ratio
Pigs Relative number of dead pigs Ratio
Relative number of dead piglets Ratio
Poultry Ratio dead animals to stock figure (in LSU) Ratio
Sheep Relative number of dead sheep Ratio
Goat Relative number of dead goats Ratio
Horse Relative number of dead horses Ratio
Veterinary practices Number of animal health service veterinarians per district Continuous ratio
Number of animal health service veterinarians per
municipality
Continuous ratio
Antibiotics Cattle Total dispensed antibiotic cattle (nDDDvet) Continuous ratio
Dispensed antibiotics Category B cattle (nDDDvet) Continuous ratio
Dispensed antibiotics Category C cattle (nDDDvet) Continuous ratio
Dispensed antibiotics Category D cattle (nDDDvet) Continuous ratio
Pigs Total dispensed antibiotic pigs (nDDDvet) Continuous ratio
Dispensed antibiotics Category B pigs (nDDDvet) Continuous ratio
Dispensed antibiotics Category C pigs (nDDDvet) Continuous ratio
Dispensed antibiotics Category D pigs (nDDDvet) Continuous ratio
*SFU category D = carcass condemnation. #SFU category E = pathological findings, but limited to certain organs, carcass not condemned. DDDvet, defined daily dose for veterinary medicine;
CAP , common agricultural policy.
Obenaus et al. 10.3389/fvets.2026.1938469
Frontiers in Veterinary Science 07 frontiersin.org
3 Results
3.1 Model performance
Results showed an 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. The corresponding precision-recall curve is
shown in Supplementary Figure S1. As shown in Figure 1, a selection
of livestock farms with the trained model outperforms random selec-
tion also in terms of gain. The gray curve demonstrates a theoretical
optimal model. Random selection would yield a corresponding pro-
portion of animal welfare violations, resulting in points lying along the
diagonal. The curve of the model is located above the diagonal within
the shaded area, indicating that the selection strategy identifies a
higher proportion of positive cases than expected under random
sampling.
3.2 Feature importance and interpretation
with SHAP values
Figure 2 lists the top 15 features that most strongly influenced the
model’s prediction of animal welfare violations according to
MSV . Features with the highest MSV are listed at the top. Additional
SHAP plots for lower-ranked features are provided in
Supplementary Figures S2 and S3. Due to their low relevance for the
prediction, the remaining features are not shown in the SHAP dia-
grams. The feature value is represented by different shades of purple/
yellow: dark purple indicates a high feature value, while light yellow
points represent lower feature values. If this information is not avail-
able, the dots are displayed in gray. Each dot represents an observa-
tion. To enhance readability, the values were plotted with vertical
offsets.
3.2.1 Most relevant features
Five out of the six main feature groups are listed in the top ten,
i.e., the most relevant features for predicting animal welfare viola -
tions, with only information about veterinarian density falling
outside this range to number eleven (Figure 2). The features with the
highest mean absolute SHAP values (MSV) were the total amount of
dispensed antibiotics for use in cattle production (MSV 0.131), the
amount of dispensed antibiotics in category D for cattle (MSV 0.092),
maximum age of the farmer (MSV 0.074), maximum distance from
the farm to the farmer’s residential address (MSV 0.054), and Animal
Health Service membership (MSV 0.045). These are followed by LSU
of cattle (MSV 0.044) and LSU of poultry farms (MSV 0.043) as well
as the number of dead adult cattle removed from the farm by the
rendering plant (MSV 0.041). The maximum distance between the
residential address and the farm, when a farm has more than one
manager (MSV 0.039) and the presence of pericarditis in pigs at the
slaughterhouse (MSV 0.034) are also among the most relevant fea-
tures. Animal Health Service membership is a feature with a particu-
larly clear result: non-membership was associated with positive
SHAP values, corresponding to a higher model-predicted probability
of an animal welfare violation, whereas membership was associated
with negative SHAP values and a lower predicted probability
(Figure 2). The model-predicted probability of animal welfare viola-
tions is higher in association with the presence of pericarditis in pigs,
a greater number of cattle on the farm (LSU cattle), and a greater
number of fallen adult cattle sent for rendering. While a greater dis-
tance between the farm and the residential address is associated with
a higher model-predicted probability of a violation, missing (i.e.,
unknown) values for this characteristic also associated with a higher
model-predicted probability. In contrast, a higher amount of dis -
pensed antibiotics (total and category D) on cattle farms is associated
with a lower model-predicted probability of an animal welfare viola-
tion. It is important to note, however, that there were relatively few
cattle farms with high antibiotic use. Other features, such as the
farmer age, LSU poultry, and the maximum distance of all residential
addresses from a farm when more than one farmer is involved, show
a more diffuse distribution.
3.2.2 Density of veterinarian practices
The characteristics describing the association between the den -
sity of veterinary practices and the model-predicted probability of
FIGURE 1
Gain plot showing the proportion of farm violations detected by the trained model (blue) relative to the proportion of tested samples, compared with a
theoretical optimal model (gray).
Obenaus et al. 10.3389/fvets.2026.1938469
Frontiers in Veterinary Science 08 frontiersin.org
animal welfare violations is not among the top ten but is listed as
eleventh (MSV 0.030) (Figure 2). A high density of livestock veteri-
narians in a district is associated with both positive and negative
SHAP values, indicating that its relationship with the model-pre -
dicted probability varied across observations. Similarly, a low density
of livestock veterinarians was associated with both higher and lower
model-predicted probabilities.
3.2.3 Farm information and production type
In addition to Animal Health Service membership, application
of the SAF (MSV 0.015) and access for cattle to alpine pastures (MSV
0.007) are also associated with a lower model-predicted probability
of an animal welfare violation, while the lack of application for these
subsidies or lack of access to alpine pastures is associated with a
higher model-predicted probability (Supplementary Figure S2).
3.2.4 Antibiotics
High levels of total antibiotics dispensed (MSV 0.131) to cattle
farmers, particularly Category D (0.092) and, to a lesser extent,
Category C (MSV 0.028), are associated with a lower
model-predicted probability of animal welfare violations (Figure 2).
This association was also observed for the same features if no data
was available. However, as shown in Supplementary Figures S2 and S3,
higher dispensing of category B antibiotics in cattle (MSV 0.011), and
higher levels of dispensing of all antibiotics in pigs is associated with
a higher model-predicted probability of an animal welfare violation:
categories B (MSV 0.009), C (MSV 0.005) and D antibiotics in pigs
(MSV 0.005).
3.2.5 Quantity of livestock units and dead stock
In addition to the LSU of cattle and poultry, other animal species
also show uneven distribution. Although not entirely clear, a higher
LSU of cattle, poultry and sheep tends to be associated with a higher
model-predicted probability of animal welfare violations. As shown
in Figure 2 and Supplementary Figures S2 and S3, a higher number
of dead animals sent for rendering is generally associated with a
higher model-predicted probability of an animal welfare violation,
except for the number of dead goats (MSV 0.006)
(Supplementary Figure S3). For cattle, a distinction could be made
for the different age categories: specifically, a high mortality rate
among calves leads to a higher model-predicted probability of animal
welfare violations on a farm (MSV 0.027) (Figure 2).
FIGURE 2
SHAP summary plot showing the contribution of the 15 most influential features to model predictions. Features are ordered by decreasing mean
absolute SHAP value. Each point represents a farm. SHAP, Shapley Additive Explanations. DDDvet = Defined Daily Dose for veterinary medicine# SFU
category E = pathological findings, but limited to certain organs, carcass not condemned.
Obenaus et al. 10.3389/fvets.2026.1938469
Frontiers in Veterinary Science 09 frontiersin.org
3.2.6 Findings of ante-mortem and post-mortem
slaughterhouse inspection
As seen in Figure 2, Supplementary Figures S2 and S3, findings
in post-mortem meat inspections of cattle and pigs (in particular,
pericarditis, MSV 0.034) are associated with a higher model-pre -
dicted probability of an animal welfare violation. However, seen in
Supplementary Figure S2, the presence of peritonitis (169a) in pigs
decreases the model-predicted probability (MSV 0.011).
4 Discussion
This study highlights the potential of routinely collected data for
the prediction of animal welfare violations. The results suggest that
animal welfare outcomes are influenced by a range of interconnected
factors and underscore the value of combining information from dif-
ferent data sources. Although SHAP facilitates the identification of
features that are relevant to the model’s predictions, the dependencies
and interactions among these features cannot be explicitly repre -
sented within this SHAP analysis itself. These associations should not
be interpreted as evidence of causal relationships. The following sec-
tions discuss the most influential predictors identified by the model
and their implications in relation to existing literature.
4.1 Farm information
There is little research on how general farmer data influences the
likelihood of animal welfare violations. However, farmers’ physical
and mental health is known to often play an important role in influ-
encing animal welfare (33). Although these factors can have a major
impact, data protection regulations or lack of data accessibility make
it nearly impossible to include them in statistics or studies ( 9).
Nevertheless, the results showed that even the limited data available
had a significant influence on the characteristic target values. With
four farm-related characteristics among the top ten most influential
factors, these data have a greater impact predicting animal welfare
violations than originally assumed. Animal Health Service member-
ship was clearly demonstrated to show a lower model-predicted prob-
ability of an animal welfare violation (negative SHAP value) when a
farmer was an Animal Health Service member (feature
value = purple). Conversely, animal welfare violation is associated
with a higher model-predicted probability (positive SHAP value)
when the farmer is not a member (feature value = yellow). The fea-
ture SAF showed similar results, possibly indicating that farmers who
actively apply for these EU subsidies also have better overall manage-
ment and therefore a lower predicted probability of animal welfare
violations.
The age of the farmer is also an important factor in this model.
Older age tended to increase the predicted probability of animal wel-
fare violations. However, the results are not as clear-cut as for Animal
Health Service membership. In this model, young farmers were asso-
ciated with a higher risk of committing animal welfare violations and
middle age was more neutral. This would also be consistent with the
literature (34–36). On the one hand, older farmers have more experi-
ence than younger ones. A review of farmers’ views on animal welfare
describes how older farmers have more knowledge about animal dis-
eases and a higher empathy score, making them more sensitive to
animal pain and welfare (34). On the other hand, animal welfare is
often related to the farmer’s own physical and mental well-being.
High occupational well-being, low stress, low loneliness, farmer opti-
mism and determination to continue production, are associated with
a high animal welfare index (33). Although age had a major impact
on the model, it may not always reflect the real situation on the farm:
sometimes an older farmer is officially retired and no longer regis-
tered as the owner but still manages the farm on a daily basis.
The model-predicted probability of a welfare violation increased
with the distance between the place of residence and the farm, and
also when no information on residential address was available. When
more than one farmer was listed as an associated person, the results
were less clear. A greater maximum distance from the place of resi-
dence of all farm-associated people had both positive and negative
SHAP values, while a shorter maximum distance to the farm
appeared to reduce the predicted probability of violations. If a farmer
lives close to or on their farm, it is easier for them to monitor animal
health and welfare. On the other hand, distance may also prevent
operational blindness, also called “farm blindness” (37). While farm-
ers who live on their farms may fall into a routine, farmers who only
work there and live elsewhere can maintain some objective distance
and therefore may have a fresher perspective. Missing values occurred
when a farm was still registered in the VIS, but was no longer actively
engaged in animal husbandry, sometimes due to the fact that a farmer
has been prohibited from keeping animals. Another reason could be
that the farmer never filled in this information for the farm, which
also could be explained by a lack of general farm management and
organizational skills and would therefore be an explanation for an
increased risk for animal welfare violation.
4.2 Production type
The herd size of a farm (i.e., LSU) especially for cattle and, to a
lesser extent, for poultry is very important for the model used to
predict animal welfare. Compared to many other countries, Austria
has small-scaled livestock farms, with an average of only 36 head of
cattle or 119 pigs (3, 38). It is often assumed that smaller farms have
fewer animals to care for and therefore, in theory, farmers can spend
more time with each individual animal while larger farms are often
viewed as industrial, intensive production facilities where animals are
just numbers and animal welfare is not a priority (39–41). However,
previous studies have shown that animal welfare does not depend
solely on farm size (38, 40, 64). Larger farms have more animals to
care for, but they often have better management systems to monitor
and measure animal health and welfare and often more staff on site,
while smaller farms may focus more on the individual animal but
often have fewer resources to change operating systems to improve
the general animal welfare. Therefore, animal welfare is influenced
more by the options available, the opportunities for improvement and
farmers’ attitude toward animal welfare and husbandry than by herd
size per se (42, 43).
4.3 Antibiotics
The use of antibiotics in farm animals is a topic of great interest,
particularly regarding antibiotic resistance (44). However, treating
sick animals is also a key aspect of animal welfare. Quantifying AMU
(antimicrobial usage) in livestock farming is complex and therefore
Obenaus et al. 10.3389/fvets.2026.1938469
Frontiers in Veterinary Science 10 frontiersin.org
difficult to compare (45, 46). It is important to note that, at present,
the antibiotic amounts recorded in the Austrian statistics and in this
model only represent those prescribed and dispensed to farmers by
veterinarians. Antibiotics directly administered by veterinarians (as
is common in cattle production) are not included in these datasets
and dispensed antibiotics may not have been used by the farmers for
the prescribed purpose.
In this model, the prescription and dispensing of antibiotics for
use in cattle and pigs leads to different predictive outcomes, which
may be due to the extremely different types of veterinary treatment
(individual versus group treatments, administration by the herd vet-
erinarians (which is, therefore, not reported to the veterinary authori-
ties at the time of this data collection) versus dispensing for
administration by the farmer) common in these animal production
systems. While high levels of total antibiotics dispensed for use in
cattle (both total and Category D) reduced the predicted probability
of an animal welfare violation, the opposite was true for pigs. Cattle
and pigs differ significantly in their husbandry practices. Pigs are
often kept in larger groups and treated accordingly, while cattle, par-
ticularly dairy cows, are more frequently treated individually. This
could indicate that high antibiotic prescription rates in pigs are either
detrimental to animal health or (more likely) indicative of a substan-
tial, possibly long-term, herd health problem and thus increase risk
for animal welfare violations. In contrast, antibiotic use in cattle is
predominantly individualized, meaning that higher treatment levels
may be associated with targeted, indication-based therapy and may
therefore have a positive effect on animal health. On the other hand,
improved animal welfare is often associated with reduced antibiotic
usage (47). This also aligns with the results of this model, as a lack of
data on antibiotic dispensing in cattle reduces the predicted likeli -
hood of animal welfare violations. This could indicate that good
health management on cattle farms could prevent the necessity for
antibiotic use, or it could indicate that a large proportion of antibiotic
treatments on cattle farms are administered by the herd veterinarian
themselves (therefore, not requiring reporting to the PHAROS data-
base under the current legislation), meaning that the veterinarian is
frequently on farm. The predictive value of TGD membership for
antibiotic dispensing may be partly related to the fact that the dis -
pensing and administration of certain injectable veterinary medicinal
products within the TGD are subject to completion of a specific
application course. TGD members who have completed the required
course may therefore have access to medicinal products for injectable
administration. At the same time, the official list of approved veteri-
nary medicinal products includes several antimicrobial products that
may also be dispensed to non-TGD farms under specific circum -
stances (22). A cross-tabulation of TGD membership and the corre-
sponding antibiotic categories is provided in the
Supplementary Table S7. To summarize, antibiotic use or dispensing
records alone cannot be used to predict the probability of welfare
violations or issues with animal health.
4.4 Ante-mortem and post-mortem
slaughterhouse inspection data (SFU)
Ante- and post-mortem slaughterhouse inspections are crucial
for food safety. Abnormal findings, however, may also indicate animal
welfare violations. There is growing interest in using this data to pre-
dict animal welfare violations (48–51). In this study, pericarditis in
pigs proved to be highly predictive, while other findings appeared to
have less influence than expected. In practice, SFU findings are col-
lected by official veterinarians and meat inspection assistants.
Although criteria are established for each abnormality, the results
from the same carcass can differ between inspectors and different
slaughterhouses can also record extremely heterogeneous results
(52–56). Due to this subjectivity, SFU findings can differ substantially
from the true condition of the carcass. Another factor is the number
of available findings: category C findings, although particularly rel-
evant to animal welfare violations, were too few to analyze separately.
As post-mortem dissections and meat inspection primarily focus on
identifying abnormalities affecting food safety, animal welfare find-
ings are considered less relevant and, even if present, are rarely docu-
mented. The low number of findings could also explain why higher
peritonitis findings in pigs was associated with a reduced model-
predicted probability of animal welfare violations. A previous
Austrian study identified peritonitis as the rarest finding, with a
prevalence of only 0.1% (57). It is therefore possible that, within the
present data set, farms without recorded animal welfare violations
experienced occasional periods with elevated peritonitis incidence,
resulting in a misleading inverse association in the model.
Furthermore, the MSV of this feature was relatively low at 0.011. By
contrast, a Danish study found that pericarditis detected at meat
inspection was weakly correlated with noticeable health findings on
farm, so it is possible that while welfare issues were present in farms
with this issue, the farmer was not necessarily fully aware of them
(58). However, the authors of this Danish study also stated that they
believed pericarditis was often underdiagnosed at meat inspection.
4.5 Fallen/dead stock rendering plant
In cattle, the number of deadstock animals over 24 months of age
sent to the rendering plant was associated with an increased likelihood
of animal welfare violations. High mortality can indicate poor animal
health or general farm management problems (59, 60). Calf and pig
mortality were also among the 20 most important factors for predicting
animal welfare violations in this model. Consistent with previous stud-
ies, cow and calf mortality are considered important animal welfare
indicators (61, 62). In addition to the mortality rate, necropsy findings
can provide valuable information on animal welfare. Post-mortem dis-
sections are frequently performed to determine the cause of death and
to rule out relevant animal diseases. In some cases, dissections are also
carried out in response to animal welfare concerns. The results are for-
warded to the district authority responsible for further investigation or
the initiation of criminal proceedings While informal training of
employees to recognize animal welfare issues exists at a number of ren-
dering plants in Austria, there is currently no standardized system in
place for recording animal welfare parameters (63). Standardized pro-
cedures and protocols for rendering plant employees could provide
additional useful information.
4.6 Veterinary practices
Although the density of veterinary practices is not among the top
ten factors, it ranks eleventh for relevance in the model. A higher den-
sity of veterinary practices treating livestock would be expected to
decrease the predicted likelihood of animal welfare violations by
improving access to veterinary care. However, such an association was
not observed in the present analysis. The veterinarians included in this
Obenaus et al. 10.3389/fvets.2026.1938469
Frontiers in Veterinary Science 11 frontiersin.org
model are all members of the Animal Health Service, treat food-pro-
ducing animals, and have contracts with their farmers that include,
among other things, an annual review of animal health and welfare.
Most farmers who are Animal Health Service members have attended
the relevant medication training courses, are authorized to perform
follow-up treatments themselves, and can therefore administer and
inject intramuscular and subcutaneous medications as prescribed by a
veterinarian. Due to the close cooperation between farmers and veteri-
narians, as well as the ability for farmers to perform follow-up treat-
ments themselves, membership of the Animal Health Service seems
more important than the actual number of veterinarians in a district.
4.7 Selection bias
The outcome was observable only when farms came to the attention
of the authorities through the existing Styrian control and surveillance
system. It therefore represents a recorded animal welfare deficiency or
associated criminal complaint, rather than all underlying violations in
the farm population. Because farm selection is probabilistic but risk-
based and incorporates multiple control purposes, administrative infor-
mation and professional assessment, the inspected sample may differ
systematically from the wider farm population.
Although all eligible livestock farms are included in the sampling
frame, selection probabilities were unequal and the inspected sample
cannot be assumed to be representative of all Styrian livestock farms.
Farm-specific inclusion probabilities could not be reconstructed, and
no formal correction for selection bias was applied. Farms without an
observed outcome were not treated as negative cases; consequently,
violations on uninspected farms may remain undetected. Passive sur-
veillance, such as public complaints, may partially mitigate but
cannot resolve this limitation.
The model should therefore be interpreted as a risk-ranking tool
for prioritizing inspections within the existing control and surveil-
lance system, rather than as an estimate of the unconditional proba-
bility or population prevalence of animal welfare violations.
4.8 Limitations
This study has several limitations that should be considered when
interpreting the results. The model is based on routinely collected
administrative data, which may include inconsistencies, missing
values, and variation in data quality. Nevertheless, the model was
developed using routinely reported data to ensure its feasibility for
application across a large number of farms in the routine monitoring
process. Although this enhances practical applicability, it also means
that model performance may be affected by limitations inherent in
the underlying administrative data. In a small number of cases (2.6%
of the dataset), the residential address required to calculate the dis -
tance between the farm and the farmer’s residence was unavailable.
While most of these cases were attributable to farms without relevant
production activity in the preceding period, some may have been
linked to farm closures following animal welfare violations.
Consequently, a limited degree of target leakage cannot be fully
excluded for this predictor, although the affected observations repre-
sented only a small proportion of the dataset.
In addition, some variables, particularly antibiotic dispensing
data, are subject to a substantial time lag, which may limit their tem-
poral relevance for prediction.
Furthermore, the model relies on proxy variables for welfare,
such as antibiotic use, mortality, and slaughterhouse findings, as no
directly measured animal welfare indicators were available. While
these variables provide meaningful insights into underlying farm
management and animal health, they cannot fully capture the multi-
faceted nature of animal welfare issues on farm.
The model was compared with random selection as an opera -
tional benchmark for the ranking task. However, it was not directly
compared with the existing Styrian selection procedure. A valid ret-
rospective comparison would require reconstruction of the selection
decisions under the existing procedure, including its multiple control
purposes, risk-based components, administrative information and
professional assessment. These elements could not be fully recon -
structed from the available data. The relative effectiveness of model-
based ranking and the existing selection procedure therefore remains
unknown. In addition, no model-based comparator, such as penal-
ized logistic regression, was evaluated. Such a comparison would
require predefined decisions regarding the handling of missing
values, categorical variables and potentially nonlinear relationships.
The predictive performance of the model was moderate but
clearly above random selection, indicating that relevant patterns can
be identified from the available data. However, performance may be
limited by the relatively small number of farms with recorded
violations.
4.9 Practical implication
From a practical perspective, the proposed model is intended to
support veterinary authorities in prioritizing farms for official animal
welfare inspections and to serve as a decision-support tool within a
risk-based sampling approach. Rather than automatically triggering
additional monitoring or inspections, the model could be used to
identify farms with a higher predicted risk and thereby support a
more targeted allocation of available inspection resources.
5 Conclusion
Despite these limitations, the results highlight the potential of
routinely collected data to support risk-based prioritization of animal
welfare controls using machine learning. The level of antibiotics dis-
pensed for use on cattle farms, membership of the Animal Health
Service and age of the farmer had the highest impact for prediction
of animal welfare violations. In addition to antibiotic use, the results
of meat inspections and data from fallen stock rendering plants also
significantly influenced the model, although the results were some-
what heterogeneous.
Many factors associated with an increased risk of animal welfare
violations may initially seem controversial. However, upon closer
examination, they indirectly reveal insights into the general manage-
ment practices of a farm and the farmers’ attitudes toward animal
welfare. It is important to note that no one singular factor can be used
to make decisions as to which farms require animal welfare inspec-
tions. Rather, the predictive model relies on the combined contribu-
tion of all included features, with each factor providing only part of
the overall prediction. Further development of existing databases and
the implementation of new data collection methods could enhance
Obenaus et al. 10.3389/fvets.2026.1938469
Frontiers in Veterinary Science 12 frontiersin.org
new pathways to collect data and therefore increase predictive perfor-
mance. Applying this model to future animal welfare inspections will
allow its real-world efficacy to be evaluated and determine whether it
can support veterinary authorities in prioritizing farms for inspection
and improve the allocation of inspection resources. The current model
was developed for Styria, reflecting the state-level responsibility for
inspection planning in Austria. In the future, a nationwide approach
could be considered, although this would require appropriate legal
adjustments, particularly regarding data protection and data exchange
between federal states. The pooling of data from multiple federal states
could increase the available dataset and the number of farms with
documented welfare violations, potentially enabling more robust risk-
based prioritization at the national level.
Data availability statement
The data used in this study were obtained from a national veteri-
nary authority and are subject to data protection regulations. As a
result, the data are not publicly available. Requests for access to the
data should be directed to the respective authority and may be subject
to approval. Requests to access these datasets should be directed to
eva.obenaus@stmk.gv.at.
Author contributions
EO: Writing – original draft, Conceptualization, Investigation. SK:
Formal analysis, Writing – review & editing, Conceptualization,
Methodology. TZ: Writing – review & editing, Methodology,
Visualization, Formal analysis, Conceptualization. CS: Methodology,
Conceptualization, Formal analysis, Writing – review & editing. IK: Data
curation, Conceptualization, Writing – review & editing. SB: Writing –
review & editing. SG: Writing – review & editing. JH: Writing – review &
editing. PE: Writing – review & editing. JB: Writing – review & editing.
CF: Supervision, Writing – review & editing.
Funding
The author(s) declared that financial support was received for this
work and/or its publication. Open access funding provided by
University of Veterinary Medicine Vienna.
Conflict of interest
EO is employed by the Federal State of Styria as an official veteri-
narian and attends the University of Veterinary Medicine, Vienna as
a doctoral student.
The remaining author(s) declared that this work was conducted
in the absence of any commercial or financial relationships that could
be construed as a potential conflict of interest.
Generative AI statement
The author(s) declared that Generative AI was used in the creation
of this manuscript. The author(s) used generative artificial intelligence
(AI)-based language tools during the preparation of this manuscript.
ChatGPT (version based on GPT-5.5; model: GPT-5.5; OpenAI, San
Francisco, CA, USA) was used for improving grammar, style, and
readability. DeepL Translator (DeepL SE, Cologne, Germany) was
used as a translation tool to support the translation of text passages.
All AI-assisted outputs were critically reviewed, verified, and edited
by the authors. The authors take full responsibility for the final content
and accuracy of the manuscript.
Any alternative text (alt text) provided alongside figures in this
article has been generated by Frontiers with the support of artificial
intelligence and reasonable efforts have been made to ensure accuracy,
including review by the authors wherever possible. If you identify any
issues, please contact us.
Publisher’s note
All claims expressed in this article are solely those of the authors
and do not necessarily represent those of their affiliated organizations,
or those of the publisher, the editors and the reviewers. Any product
that may be evaluated in this article, or claim that may be made by its
manufacturer, is not guaranteed or endorsed by the publisher.
Supplementary material
The Supplementary material for this article can be found online
at: https://www.frontiersin.org/articles/10.3389/fvets.2026.1938469/
full#supplementary-material
References
- RIS – Tierschutz-Kontrollverordnung – Bundesrecht konsolidiert, Fassung vom
27.01.2025; (2025). Available online at: https://ris.bka.gv.at/GeltendeFassung.wxe?Abfra
ge=Bundesnormen&Gesetzesnummer=20003824 (Accessed January 27, 2025) - STATISTIK AUSTRIA. Viehwirtschaft – Agrarstrukturdaten, Tabelle: Viehwirtschaft,
Viehbestand der landwirtschaftlichen Betriebe 2023 (.ods). Available online at: https://
www.statistik.at/statistiken/land-und-forstwirtschaft/tiere-tierische-erzeugung/viehbes-
tand/viehwirtschaft-agrarstrukturdaten (Accessed June 16, 2026) - STATISTIK AUSTRIA. Agrarstrukturerhebung 2023, Land- und forstwirtschaftliche
Betriebe und deren Strukturdaten. Available online at: https://www.statistik.at/fileadmin/
publications/SB_1-17-Agrarstrukturerhebung_2023.pdf (Accessed June 16, 2026) - Veterinärbericht 2021: Amt der Steiermärkischen Landesregierung-Fachabteilung
Gesundheit und Pflegemanagement, Referat Veterinärdirektion 2021:32.
Available online at: https://www.veterinaerwesen.steiermark.at/cms/doku -
mente/12842105_162003968/b758f9b0/Veterinaerbericht-2021_Internet.pdf .
(Accessed August 7, 2025) - Väärikkälä S, Hänninen L, Nevas M. Veterinarians experience animal welfare control
work as stressful. Front Vet Sci. (2020) 7:77. doi: 10.3389/fvets.2020.00077 - Lutz B, Zwygart S, Rufener C, Burla J-B, Thomann B, Stucki D. Data-based variables
used as indicators of dairy cow welfare at farm level: a review. Animals. (2021) 11:3458.
doi: 10.3390/ani11123458
Obenaus et al. 10.3389/fvets.2026.1938469
Frontiers in Veterinary Science 13 frontiersin.org
7. Stygar AH, Krampe C, Llonch P , Niemi JK. How far are we from data-driven and
animal-based welfare assessment? A critical analysis of European quality schemes. Front
Anim Sci. (2022) 3:874260. doi: 10.3389/fanim.2022.874260
8. Thomann B, Kuntzer T, Schüpbach-Regula G, Rieder S. Investigating the use of
machine learning algorithms to support risk-based animal welfare inspections of cattle
and pig farms. Front Vet Sci. (2024) 11:1401007. doi: 10.3389/fvets.2024.1401007
9. Thomann B, Würbel H, Kuntzer T, Umstätter C, Wechsler B, Meylan M, et al.
Development of a data-driven method for assessing health and welfare in the most
common livestock species in Switzerland: the smart animal health project. Front Vet Sci.
(2023) 10:1125806. doi: 10.3389/fvets.2023.1125806
10. Otten ND, Nielsen LR, Thomsen PT, Houe H. Register-based predictors of violations
of animal welfare legislation in dairy herds. Animal. (2014) 8:1963–70. doi: 10.1017/
S1751731114001918
11. Ferreira C, Todorovic M, Sugrue P , Teixeira S, Galvin P . Review: emerging sensors
and instrumentation systems for bovine health monitoring. Animal. (2025) 19:101527.
doi: 10.1016/j.animal.2025.101527
12. Stärk KDC, Regula G, Hernandez J, Knopf L, Fuchs K, Morris RS, et al. Concepts for
risk-based surveillance in the field of veterinary medicine and veterinary public health:
review of current approaches. BMC Health Serv Res. (2006) 6. doi: 10.1186/1472-6963-6-20
13. EFSA Panel on Animal Health and Welfare (AHAW). Guidance on risk assessment
for animal welfare. EFSA J. (2012) 10:2513. doi: 10.2903/j.efsa.2012.2513
14. Blickenstorfer S, Schwermer H, Engels M, Reist M, Doherr MG, Hadorn DC. Using
scenario tree modelling for targeted herd sampling to substantiate freedom from disease.
BMC Vet Res. (2011) 7:49. doi: 10.1186/1746-6148-7-49
15. Chen T, Guestrin C. XGBoost Proceedings of the 22nd ACM SIGKDD International
Conference on Knowledge Discovery and Data Mining . New Y ork, NY: ACM (2016).
p. 785–94.
16. Fachstelle für tiergerechte Tierhaltung und Tierschutz Handbücher & Checklisten -
Selbstevaluierung Tierschutz Bundesminister für Arbeit, Soziales, Gesundheit, Pflege und
Konsumentenschutz; (2020). Available online at: https://www.tierschutzkonform.at/nutz-
tiere/handbuecher-checklisten/?fwp_downloads_kategorien=handbuecher (Accessed
June 1, 2026)
17. Comprehensive R Archive Network. Extreme Gradient Boosting [R Package Xgboost
Version 1.7.11.1]. Vienna: Comprehensive R Archive Network (CRAN); (2025). Available
online at: https://www.icesi.edu.co/CRAN/web/packages/xgboost/ (Accessed March
7, 2026).
18. R Core Team. R: A Language and Environment for Statistical Computing. Vienna: R
Foundation for Statistical Computing. (2026). Available online at: https://www.R-project.
org/ (Accessed July 7, 2026).
19. Fawcett T. An introduction to ROC analysis. Pattern Recogn Lett (2006);27:861–874.
doi: 10.1016/j.patrec.2005.10.010
20. Matthews BW . Comparison of the predicted and observed secondary structure of
T4 phage lysozyme. Biochim Biophys Acta . (1975) 405:442–51. doi:
10.1016/0005-2795(75)90109-9
21. Verordnung des Bundesministers für Gesundheit über die Anerkennung und den
Betrieb von Tiergesundheitsdiensten (Tiergesundheitsdienst-Verordnung 2009 –
TGD-VO 2009) StF: BGBl. II Nr. 434/2009. Available online at: https://www.ris.bka.gv.at/
geltendefassung/bundesnormen/20006592/tgd-vo%202009,%20fassung%20vom%20
21.08.2021.pdf (Accessed June 1, 2026)
22. Liste der Freigabe gem. § 2 Abs. 2 der Veterinär-Arzneispezialitäten-
Anwendungsverordnung 2010 – BGBl. II Nr. 259/2010; Stand: (2026). Available online
at: https://www.ris.bka.gv.at/Dokumente/Avn/AVN_20260529_AVN_2026_14/Liste_
Veterinaer-Arzneispezialitaeten-Anwendungsverordnung.pdf. (Accessed September
06, 2026)
23. Bundeskanzleramt Österreich, Unternehmensserviceportal (USP). Agrarpolitik EU –
Mehrfachantrag auf flächen- und tierbezogene Förderungen. Available online at: https://
www.usp.gv.at/themen/brancheninformationen/landwirtschaft/agrarmarkt/agrarfoerde-
rungen/agrarpolitik-eu-mehrfachantrag-auf-flaechen-und-tierbezogene-foerderungen.
html (Accessed June 16, 2026)
24. European Commission E Glossary: Livestock Unit (2025). Available online at: https://
ec.europa.eu/eurostat/statistics-explained/SEPDF/cache/1246.pdf (Accessed June
01, 2026)
25. Network on quantification of veterinary antimicrobial usage at herd level and analysis,
CommunicaTion and benchmarkING to improve responsible usage. PHAROS Austria;
(2026). Available online at: https://www.aacting.org/matrix/pharos/?lid=1422 (Accessed
April 13, 2026)
26. European Medicines Agency. Defined daily doses for animals (DDDvet) and defined
course doses for animals (DCDvet): European surveillance of veterinary antimicrobial
consumption (ESV AC). Available online at: https://www.ema.europa.eu/en/documents/
other/defined-daily-doses-animals-dddvet-and-defined-course-doses-animals-dcdvet-
european-surveillance-veterinary-antimicrobial-consumption-esvac_en.pdf. (Accessed
July 03, 2026)
27. European Medicines Agency. Guidance on collection and provision of national data
on antimicrobial use by animal species-categories 2018; (EMA/489035/2016). Available
online at: https://www.ema.europa.eu/en/documents/scientific-guideline/guidance-col-
lection-and-provision-national-data-antimicrobial-use-animal-speciescategories_en.pdf.
(Accessed April 13, 2026)
28. Bundesamt für Sicherheit im Gesundheitswesen (BASG) Veterinär Antibiotika
Mengenstromanalyse – Erweiterung DDDVet, DCDVet (2026). Available online at:
https://www.basg.gv.at/fuer-unternehmen/online-service/erweiterung-dddvet-dcdvet
(Accessed April 13, 2026)
29. Bundesgesetz über Tierarzneimittel (Tierarzneimittelgesetz): TAMG; (2026).
Available online at: https://www.ris.bka.gv.at/GeltendeFassung.wxe?Abfrage=Bundesno
rmen&Gesetzesnummer=20012477 (Accessed June 02, 2026)
30. European Medicines Agency. Categorisation of antibiotics in the European Union:
answer to the request from the European Commission for updating the scientific advice
on the impact on public health and animal health of the use of antibiotics in animals
EMA/CVMP/CHMP/682198/2017-Rev1. Available online at: https://www.ema.europa.
eu/en/documents/report/categorisation-antibiotics-european-union-answer-request-
european-commission-updating-scientific-advice-impact-public-health-animal-health-
use-antibiotics-animals_en.pdf (Accessed April 13, 2026)
31. Schodl K., Huber L., Klinger J. Erläuterungen zu ausgewählten Befunden der SFU
2018. Available online at: https://www.burgenland.at/fileadmin/user_upload/VOES_
SFU_Befundkatalog_2018.pdf. (Accessed October 16, 2025)
32. Bundesministerium für Soziales, Gesundheit, Pflege und Konsumentenschutz
Durchführungserlass 1/Version 10 für die Durchführung der Schlachttier- und
Fleischuntersuchung bei als Haustiere gehaltenen Huftieren (Rind, Schwein, Schaf, Ziege,
Einhufer), Beilage_1_-_Codeliste_Rotfleisch_20201120_1 2021. Available online at:
https://www.verbrauchergesundheit.gv.at/lebensmittel/schlachttier-und-fleischuntersu-
chung-hygienekontrollen.html (Accessed October 16, 2025)
33. Hansen BG, Østerås O. Farmer welfare and animal welfare- exploring the relationship
between farmer's occupational well-being and stress, farm expansion and animal welfare.
Prev Vet Med. (2019) 170:104741. doi: 10.1016/j.prevetmed.2019.104741
34. Balzani A., Hanlon A. Factors that influence farmers' views on farm animal welfare:
a semi-systematic review and thematic analysis. Animals (Basel) (2020) 10:1524. doi:
10.3390/ani10091524
35. Peden RSE, Camerlink I, Boyle LA, Akaichi F , Turner SP . Farmer perceptions of pig
aggression compared to animal-based measures of fight outcome. Animals. (2019) 9:22.
doi: 10.3390/ani9010022
36. Huxley JN, Whay HR. Current attitudes of cattle practitioners to pain and the use of
analgesics in cattle. Vet Rec. (2006) 159:662–8. doi: 10.1136/vr.159.20.662
37. Mee JF . Denormalizing poor dairy youngstock management: dealing with "farm-
blindness". J Anim Sci. (2020) 98:S140–9. doi: 10.1093/jas/skaa137
38. Beggs DS, Jongman EC, Hemsworth PH, Fisher AD. The effects of herd size on the
welfare of dairy cows in a pasture-based system using animal- and resource-based indica-
tors. J Dairy Sci. (2019) 102:3406–20. doi: 10.3168/jds.2018-14850
39. Weary D. M., Robbins J., Fraser D., von Keyserlingk M. A. G.. Is Animal Welfare
Better on Smaller Farms? La Fondation Droit Animal, Éthique et Sciences; (2021).
Available online at: https://www.fondation-droit-animal.org/proceedings-aw/is-animal-
welfare-better-on-smaller-farms/ (Accessed November 17, 2025)
40. Lindena T, Hess S. Is animal welfare better on smaller dairy farms? Evidence from 3,085
dairy farms in Germany. J Dairy Sci. (2022) 105:8924–45. doi: 10.3168/jds.2022-21906
41. Busch G, Bayer E, Spiller A, Kühl S. Factory farming’? Public perceptions of farm sizes
and sustainability in animal farming. PLoS Sustain Transform. (2022) 1:e0000032. doi:
10.1371/journal.pstr.0000032
42. Waiblinger S, Menke C. Influence of herd size on human—cow relationships.
Anthrozoös. (1999) 12:240–7. doi: 10.2752/089279399787000156
43. Gieseke D, Lambertz C, Gauly M. Relationship between herd size and measures of
animal welfare on dairy cattle farms with freestall housing in Germany. J Dairy Sci. (2018)
101:7397–411. doi: 10.3168/jds.2017-14232
44. Okeke IN, de Kraker MEA, van Boeckel TP , Kumar CK, Schmitt H, Gales AC, et al.
The scope of the antimicrobial resistance challenge. Lancet. (2024) 403:2426–38. doi:
10.1016/S0140-6736(24)00876-6
45. Ardakani Z, Aragrande M, Canali M. Global antimicrobial use in livestock farming:
an estimate for cattle, chickens, and pigs. Animal. (2024) 18:101060. doi: 10.1016/j.
animal.2023.101060
46. European Medicines Agency. European sales and use of antimicrobials for veterinary
medicine: annual surveillance report for 2024 (EMA/CVMP/ESUAVET/376993/2025).
Available online at: https://www.ema.europa.eu/en/documents/report/european-sales-
use-antimicrobials-veterinary-medicine-annual-surveillance-report-2024_en.pdf .
(Accessed December 30, 2025)
47. Albernaz-Gonçalves R, Olmos Antillón G, Hötzel MJ. Linking animal welfare and
antibiotic use in pig farming-a review. Animals. (2022) 12. doi: 10.3390/ani12020216
48. Witt J, Krieter J, Büttner K, Wilder T, Hasler M, Bussemas R, et al. Relationship
between animal-based on-farm indicators and meat inspection data in pigs. Porcine
Health Manag. (2024) 10:8. doi: 10.1186/s40813-024-00359-9
49. Comin A, Jonasson A, Rockström U, Kautto AH, Keeling L, Nyman A-K, et al. Can
we use meat inspection data for animal health and welfare surveillance? Front Vet Sci.
(2023) 10:1129891. doi: 10.3389/fvets.2023.1129891
50. Knage-Rasmussen KM, Rousing T, Sørensen JT, Houe H. Assessing animal welfare
in sow herds using data on meat inspection, medication and mortality. Animal. (2015)
9:509–15. doi: 10.1017/S1751731114002705
Obenaus et al. 10.3389/fvets.2026.1938469
Frontiers in Veterinary Science 14 frontiersin.org
51. van Staaveren N, Doyle B, Manzanilla EG, Calderón Díaz JA, Hanlon A, Boyle LA.
Validation of carcass lesions as indicators for on-farm health and welfare of pigs. J Anim
Sci. (2017) 95:1528–36. doi: 10.2527/jas.2016.1180
52. Eckhardt Peter, Fuchs Klemens, Kornberger Birgit, Köfer Josef Untersuchungen über
die Reliabilität der im Zuge der Fleischuntersuchung erhobenen Befunde von
Schlachtschweinen (2009). Available online at: https://www.wtm.at/explorer/WTM/
Archiv/2009/WTM_05-06-2009_Artikel_6.pdf (Accessed May 13, 2026).
53. Klinger J, Conrady B, Mikula M, Käsbohrer A. Agricultural holdings and slaughter-
houses' impact on patterns of pathological findings observed during post-mortem meat
inspection. Animals. (2021) 11. doi: 10.3390/ani11051442
54. Bonde M, Toft N, Thomsen PT, Sørensen JT. Evaluation of sensitivity and specificity
of routine meat inspection of Danish slaughter pigs using latent class analysis. Prev Vet
Med. (2010) 94:165–9. doi: 10.1016/j.prevetmed.2010.01.009
55. Horst A, Gertz M, Krieter J. Challenges and opportunities of using meat inspection
data to improve pig health traits by breeding: a review. Livest Sci. (2019) 221:155–62. doi:
10.1016/j.livsci.2019.02.001
56. Stärk K, Alonso S, Dadios N, Dupuy C, Ellerbroek L, Georgiev M, et al. Strengths and
weaknesses of meat inspection as a contribution to animal health and welfare surveillance.
Food Control. (2014) 39:154–62. doi: 10.1016/j.foodcont.2013.11.009
57. Schleicher C, Scheriau S, Kopacka I, Wanda S, Hofrichter J, Köfer J. Analysis of the
variation in meat inspection of pigs using variance partitioning. Prev Vet Med. (2013)
111:278–85. doi: 10.1016/j.prevetmed.2013.05.018
58. Nielsen SS, Nielsen GB, Denwood MJ, Haugegaard J, Houe H. Comparison of record-
ing of pericarditis and lung disorders at routine meat inspection with findings at system-
atic health monitoring in Danish finisher pigs. Acta Vet Scand. (2015) 57. doi: 10.1186/
s13028-015-0109-z
59. Compton CWR, Heuer C, Thomsen PT, Carpenter TE, Phyn CVC, McDougall S.
Invited review: a systematic literature review and meta-analysis of mortality and culling
in dairy cattle. J Dairy Sci. (2017) 100:1–16. doi: 10.3168/jds.2016-11302
60. Alvåsen K, Jansson Mörk M, Dohoo IR, Sandgren CH, Thomsen PT, Emanuelson U.
Risk factors associated with on-farm mortality in Swedish dairy cows. Prev Vet Med.
(2014) 117:110–20. doi: 10.1016/j.prevetmed.2014.08.011
61. Bertocchi L, Fusi F , Angelucci A, Bolzoni L, Pongolini S, Strano RM, et al.
Characterization of hazards, welfare promoters and animal-based measures for the wel-
fare assessment of dairy cows: elicitation of expert opinion. Prev Vet Med . (2018)
150:8–18. doi: 10.1016/j.prevetmed.2017.11.023
62. Nielsen SS, Alvarez J, Bicout DJ, Calistri P , Canali E, Drewe JA, et al. Welfare of dairy
cows. EFSA J. (2023) 21:e07993. doi: 10.2903/j.efsa.2023.7993
63. Grosse Beilage E, Maschat K, Baumgartner J. Retrospective pig welfare assessment at
rendering plants – a useful tool for monitoring and inspection. Porcine Health Manag.
(2026) 12. doi: 10.1186/s40813-026-00504-6
64. Robbins JA, von Keyserlingk MA, Fraser D, Weary DM. INVITED REVIEW:
Farm size and animal welfare. J Anim Sci . (2016) 12:5439–5455. doi: 10.2527/
jas.2016-0805
论文原文与出版信息
Frontiers in Veterinary Science