Interpretable machine learning for origin classification of brazilian soybeans: A random forest and XAI-based approach
Abstract
eXplainable Artificial Intelligence (XAI) offers a powerful framework for enhancing the transparency and trustworthiness of machine learning models in highly regulated fields such as food traceability. In this study, we applied XAI techniques, SHAP (SHapley Additive exPlanations) and Partial Dependence Plots (PDPs), to interpret a Random Forest (RF) classification model developed to determine the geographical origin of Brazilian soybean samples. A total of 60 samples, representing two biomes and six states, were analysed using stable isotope ratios ( δ 13 C, δ 15 N, δ 2 H, δ 18 O, δ 34 S) and elemental composition (41 elements). The RF model achieved high classification accuracy at both the biome and state levels using the fused stable isotopes and elemental composition datasets. XAI tools revealed δ 18 O, δ 2 H, Rb, Cs, and Ca as the most influential features, with δ 18 O consistently emerging as the dominant predictor. SHAP beeswarm and waterfall plots provided global and local explanations of feature importance, while PDPs and two-way PDPs captured non-linear relationships and synergistic effects between isotopic and elemental variables. These findings confirm the discriminative power of geochemical markers and show the practical value of interpretable models for agroecological traceability and regulatory compliance. This approach advances XAI in food provenance, providing a transparent, region-specific framework that supports sustainability initiatives.
Fields of Study & Subjects
Isotope Analysis in Ecology
Metabolomics and Mass Spectrometry Studies
Archaeology and ancient environmental studies
Publication details
- Journal / source
- Journal of Food Composition and Analysis
- Publisher
- Elsevier BV
- Volume
- 150
- Pages
- 108896–108896
- Publication date
- 12 January 2026
- Language
- EN