Dušan Kekić, Miloš Jovićević, Olja Šovljanski, Ana Tomić, Lato Pezo, Nemanja Mirković, Radmila Novaković, Ivan Vićić, Nikola Bajčetić, Ljiljana Tolić Stojadinović, Svetlana Grujić, Milica Mirković, Nedjeljko Karabasil, Nataša Opavski, Ina Gajić
Background/Objectives: Antibiotic residues in aquatic environments reflect interacting physicochemical, climatic, and microbiological processes. This study characterized selected antibiotics in wastewater and surface water associated with the Danube River near Novi Sad, Serbia, and evaluated explainable stacked machine-learning models for concentration prediction. Methods: Thirty-six samples collected during summer and autumn 2024 were analyzed using SPE-HPLC-MS/MS. Artificial neural network, random forest, support vector machine, XGBoost, stacked linear, and stacked random forest (STACK-RF) models were developed using environmental/physicochemical variables or presumptive resistant bacterial taxa. Models were evaluated by fivefold cross-validation, complementary error metrics, Holm-adjusted Diebold-Mariano tests, XGBoost Gain, and SHAP analysis. Results: All target antibiotics were detected at least once. Azithromycin was most prevalent (75.0%), followed by sulfamethoxazole (58.3%), trimethoprim, and ciprofloxacin (52.8% each), while wastewater generally exhibited broader antibiotic profiles and higher concentrations than surface water. Standalone algorithms showed weak-to-moderate performance, whereas STACK-RF achieved the highest numerical accuracy for all environmental/physicochemical models (R2 = 0.745-0.913) and the available microbial-taxa models (R2 = 0.819-0.945), with consistently lower prediction errors. However, most pairwise differences were not significant after Holm correction. Influential environmental predictors were compound-specific and included COD, BOD5, pH, turbidity, electrical conductivity, water temperature, and relative humidity. Leading bacterial predictors included Klebsiella pneumoniae, Escherichia coli, Citrobacter freundii, and Aeromonas veronii. Conclusions: The results provide a proof-of-concept for machine-learning-assisted antibiotic prediction. Explainable STACK-RF modeling captured nonlinear, antibiotic-specific associations among residues, water-quality conditions, and microbial indicators. It may complement targeted chemical monitoring and support hypothesis generation, although larger, externally validated datasets are required before broader application.