Predictive Modeling and Explainable AI for Veterinary Safety Profiles, Residue Assessment, and Health Outcomes Using Real-World Data and Physicochemical Properties
The safe use of pharmaceuticals in foodproducing animals is critical to protect animal welfare and human food safety. Adverse events (AEs) in veterinary medicine may reflect unexpected pharmacokinetic or toxicokinetic effects that result in violative residues in the food chain. This study introduces a predictive modeling framework to classify animal health outcomes (Death vs. Recovered) using the U.S. FDA Center for Veterinary Medicine's OpenFDA database of $\sim \mathbf{1. 2 8}$ million reports (1987-2025 Q1). Moreover, it integrates physicochemical drug properties from PubChem to capture relationships between chemical characteristics and residue potential. A comprehensive preprocessing pipeline mapped AEs and drugs to standardized ontologies, imputed missing values, and reduced high-cardinality variables. We evaluated multiple supervised models, including machine learning (ML) algorithms, ExcelFormer, and large language models (LLaMA 3.1 8B, Phi 3 12B, Gemma 3 27B). To address class imbalance, we applied undersampling, oversampling, and SMOTE+ENN, with a focus on improving recall for fatal outcomes. CatBoost, XGBoost, Random Forest, and Ensemble methods (Voting, Stacking) performed best, achieving precision, recall, and F1-scores of around 0.95. Incorporating Average Uncertainty Margin (AUM)-based pseudo-labeling of uncertain cases improved minorityclass detection, particularly in ExcelFormer and XGBoost. Model interpretability via SHapley Additive exPlanations (SHAP) identified biologically plausible predictors, including intestinal and cardiac disorders that linked to fatal outcomes, animal demographics, and drug physicochemical properties. Overall, this work shows that combining rigorous data engineering, advanced ML, and explainable AI enables accurate, interpretable prediction of veterinary safety outcomes. The approach supports the Food Animal Residue Avoidance Databank (FARAD)'s mission by enabling early detection of high-risk drug-event profiles, strengthening residue risk assessment, and informing regulatory and clinical decision-making. Code is available at: https://github.com/hosseinsholehrasa/CVM_FDA
Paper
References (35)
Scroll for more · 23 remaining