ABSTRACT
Traditional methods for the chemical characterization of agrominerals remain costly and generate chemical waste, especially for large-scale applications. Portable X-ray fluorescence (pXRF) spectrometry has recently emerged as a tool for rapid material analysis. However, pXRF applications to remineralizers (REM), silicate fertilizers (SiF), and other agrominerals remain unexplored. This study aimed to: i) apply pXRF data to characterize agrominerals, and ii) assess six machine learning algorithms [projection pursuit regression (PPR), partial least squares (PLS), random forest (RF), support vector machine (SVM), extreme gradient boosting (XGB), and cubist regression (CR)] for agrominerals chemical composition assessment. 53 REM and SiF samples underwent traditional wet-chemical analysis (ICM 40B method) and triplicate pXRF scanning (60 s). The dataset was randomly separated into modeling (70%) and validation (30%) sub-datasets, and the machine learning algorithms were trained using k-fold cross-validation. Results indicated highly accurate predictions. Among the 49 predicted elements, 41 showed high accuracy (Al, Ba, Be, Bi, Ca, Ce, Co, Cr, Cs, Cu, Fe, Ga, Ge, Hf, In, K, La, Li, Lu, Mg, Mn, Mo, Na, Nb, Ni, P, Pb, Rb, S, Sc, Sr, Tb, Th, Ti, Tl, U, V, Y, Yb, Zn, and Zr) with R2 above 0.80, and RPD values ranging from 1.31 to 23.0. The presence of nutrients such as Ca, Mg, K, S, Fe, Mn, Zn, and P stood out. CR outperformed the other algorithms. The study demonstrates the potential of using pXRF combined with machine learning algorithms for accurate, rapid, cheap and environmentally friendly prediction of the chemical composition of agrominerals.
Index terms:
pXRF; agrominerals; sustainable development
RESUMO
Os métodos tradicionais para caracterização química de agrominerais são caros e geram resíduos químicos. A espectrometria portátil por fluorescência de raios-X (pXRF) surgiu recentemente como uma ferramenta sustentável para análises rápidas e, econômicas de materiais. Entretanto, sua aplicação na avaliação de remineralizadores (REM), fertilizantes silicatados (SiF) e outros agrominerais ainda é pouco explorada. Este estudo objetivou: i) utilizar dados obtidos por pXRF para caracterizar agrominerais, e ii) avaliar seis algoritmos de aprendizado de máquina [projection pursuit regression (PPR), partial least squares (PLS), random forest (RF), support vector machine (SVM), extreme gradient boosting (XGB), e cubist regression (CR)] na predição da composição química dos agrominerais. Foram analisadas 53 amostras de REM e SiF por meio de análise química convencional (método ICM 40B) e com pXRF. Os dados foram divididos aleatoriamente em subconjuntos de modelagem (70%) e validação (30%), sendo os algoritmos treinados com validação cruzada k-fold. Dos 49 elementos preditos, 41 apresentaram alta acurácia (Al, Ba, Be, Bi, Ca, Ce, Co, Cr, Cs, Cu, Fe, Ga, Ge, Hf, In, K, La, Li, Lu, Mg, Mn, Mo, Na, Nb, Ni, P, Pb, Rb, S, Sc, Sr, Tb, Th, Ti, Tl, U, V, Y, Yb, Zn e Zr), com coeficientes de determinação (R²) superiores a 0,80 e desvio de resíduos de predição (RPD) variando de 1,31 a 23,0. O algoritmo Cubist apresentou o melhor desempenho. O estudo demonstra o potencial do pXRF combinado com algoritmos de aprendizado de máquina para predição precisa, rápida, barata e ecologicamente amigável da composição química de agrominerais.
Termos para indexação:
pXRF; agrominerais; desenvolvimento sustentável
Introduction
Several countries are extremely dependent on international fertilizer trade, importing substantial amount of NPK (nitrogen, phosphorus, and potassium) formulations (Burbano et al., 2022; Cardozo et al., 2024). Those countries have agricultural production highly vulnerable to price fluctuations and global geopolitical tensions that can potentially impact economy, food security, and agricultural development. This scenario has led to international efforts to find new technologies that can promote self-sufficiency in agricultural inputs (Benevides Filho et al., 2023; Korchagin, Caner & Bortoluzzi, 2019; Luchese et al., 2023; Ramos et al., 2022).
So-called remineralizers (REM) and silicate fertilizers (SiF) have gained increasing attention in Brazil, with more than 70 registered products approved by the Ministry of Agriculture (Vilela, 2025), suggesting growing commercial and institutional interest in these inputs, serving as an indirect indicator of market expansion. REM and SiF are mostly used in tropical regions with highly weathered soils (Manning & Theodoro, 2020), and especially among smallholder farmers seeking low-cost, locally available alternatives to conventional fertilizers (Luchese et al., 2023). However, some large-scale applications have been reported, particularly in forestry, perennial crops, and pasture management, which are more compatible with the gradual nutrient-release profile of these materials (Theodoro & Leonardos, 2014). According to Theodoro and Leonardos (2006), rock powders have been adopted in agroforestry systems, citrus orchards, coffee plantations, and grazing lands, where the slower nutrient release and liming effect are beneficial in the long term. This contrasts with annual cropping systems, where the immediate nutrient demand is often better met by soluble fertilizers (Manning & Theodoro, 2020).
REM and SiF are powders of specific rocks that act as a reservoir of macro- and micronutrients, improving chemical and biological properties of soils, resulting in agricultural productivity, and soil health improvement. In addition, remineralizers have been used for the recovery of degraded areas and carbon sequestration by stimulating plant productivity, improving soil physicochemical properties, and favoring carbon stabilization through organo-mineral interactions (Ramos et al., 2022; Theodoro et al., 2021). This agricultural practice, popularly known as “rock dusting”, has very ancient origins. There is evidence that Indigenous peoples, such as Native Americans in California, used similar practices centuries ago; they applied rock-derived minerals to forest soils to enhance fertility, a process that mimicked natural cycles (Klinger, 2006).
During the weathering of suitable rock dust, multi-nutrients are slowly released into the soil, altering its attributes over time, such as decreasing acidity, minimizing P fixation and reducing the losses of applied nutrients (Elhaissoufi et al., 2022). Among the sources that best fit the compositional specifications, silicate rocks stand out, composed predominantly of minerals such as biotite, phlogopite, feldspathoids, zeolites and ferromagnesian minerals (olivine and pyroxene) and plagioclases, rich in K, Mg, Ca, and Si (Anda, Shamshuddin & Fauziah, 2015; Beerling et al., 2018). The use of REM is focused on geological materials available locally and/or regionally, thus reducing the costs involved in production, logistics and application of traditional inputs (Benevides Filho et al., 2023; Burbano et al., 2022; Ramos et al., 2022). This method also helps mitigate the adverse environmental impacts associated with the use of soluble chemical fertilizers, such as the eutrophication of water bodies, loss of biodiversity in agricultural and aquatic ecosystems, greenhouse gas emissions and soil degradation (Gowd et al., 2023; Khan & Mohammad, 2014; Queirós, Malça & Freire, 2015), depending on the soil management practices.
In order to establish a quality standard for agrominerals input (REM and SiF), a law project was enacted by the Ministry of Agriculture, Livestock, and Food Supply of Brazil (MAPA), in 2013, including remineralizers among fertilizers, and further providing specifications regarding nutrients content, particle size and limits for harmful and potentially toxic elements concentration (Brasil, 2016). This Normative Instruction (IN 5/2016), establishes geochemical parameters for the use of rocks as soil remineralizers, including a sum of bases (CaO + MgO + K2O) equal to or greater than 9%, K2O content equal to or greater than 1%, quartz content not exceeding 25%, and limits for potentially toxic elements set at 15 ppm for arsenic (As), 10 ppm for cadmium (Cd), 0.1 ppm for mercury (Hg), and 200 ppm for lead (Pb). SiF and other agromineral inputs are also granted by law decree Nº 8.384 (Brasil, 2014).
However, geochemical characterization of agrominerals is costly, requiring highly equipped laboratories, chemical reagents, trained personnel, and careful disposal of the resulting chemical residues. Thus, although essential as reference, composition analyses of remineralizers and silicate fertilizers present challenges for their use and registration.
Throughout the last years, numerous studies have demonstrated the potential of proximal sensors for fast, cost-effective, and environmentally friendly applications in different science fields. Among these technologies, portable X-ray fluorescence (pXRF) spectrometry has shown promise performance as a practical tool for elemental analysis (Basso et al., 2024; Bernardini et al., 2024; Colomban, Franci & Gallet, 2024; Maciel et al., 2024; Silva et al., 2024a; Santos et al., 2024; Silva et al., 2024b). This near-instant (60 s) analytical method relies on the interaction between X-rays and matter to determine the elemental composition (from Mg to U) of various sample matrices (Silva et al., 2021). It enables in-situ or ex-situ analysis with minimal or no sample preparation, eliminating the need for extensive laboratory facilities. Additionally, this green tech analysis eradicates the use of reagents and the generation of chemical wastes, offering a more practical, cost-effective, and sustainable alternative to traditional wet laboratory techniques (Andrade et al., 2022, 2021, 2020; Mancini et al., 2022; Teixeira et al., 2022). Studies have successfully applied pXRF to agricultural and environmental contexts, including soils (Datsko et al., 2024; Silva et al., 2024a; Mancini et al., 2024), parent material (Mancini et al., 2019a, 2019b; Pierangeli et al., 2023), agricultural and non-agricultural limestone (Benedet et al., 2023), organic and mineral fertilizers (Andrade et al., 2023b), crop leaves (Andrade et al., 2023a; Costa et al., 2024; Rebelo Silva et al., 2024), mining (Maciel et al., 2024; Santos et al., 2024), etc. However, performance can vary depending on the matrix, particle size, moisture, and elemental concentrations, which highlights the need for proper calibration and robust data processing (Silva et al., 2021).
As pXRF produces a vast range of complex and high-dimensional data, the use of more robust tools is generally necessary for better interpretation of these data (Silva et al., 2021). In this context, the use of artificial intelligence (AI) through machine learning algorithms has become essential to speed up data processing, capture non-linear relationships, and deliver feature importance (Andrade et al., 2023b; Maciel et al., 2024; Silva et al., 2024b). Besides, the pXRF reports numerical variables that can be associated with categorical variables via machine learning algorithms, further improving the performance of prediction models (Andrade et al., 2022; Mancini et al., 2022; Teixeira et al., 2022). The allied use of pXRF data with machine learning algorithms has proven its effectiveness for many matrices, but, to the best of our knowledge, no studies have evaluated the use of pXRF data combined with machine learning algorithms to predict the chemical composition of remineralizers and silicate fertilizers.
Given the expanding market for agrominerals, the development of fast, affordable, and reliable characterization methods becomes increasingly relevant. This is especially important as the demand for sustainable alternatives to conventional fertilizers grows globally. At the same time, ensuring the safety and agronomic efficiency of such products is essential, considering the potential environmental risks associated with heavy metal contamination. Rapid access to regulatory specifications, legal assurance for users, and the effective screening of new materials are key pillars to support the responsible expansion of this market. Therefore, this study aimed to: i) apply pXRF data to characterize different types of agrominerals, and ii) assess six machine learning algorithms [projection pursuit regression (PPR), partial least squares (PLS), random forest (RF), support vector machine (SVM), extreme gradient boosting (XGB), and cubist regression (CR)] for chemical composition prediction of agrominerals. We hypothesized that pXRF spectrometry, in tandem with machine learning algorithms, can accurately predict the chemical composition of agrominerals, offering a rapid and sustainable alternative to conventional wet-chemistry methods.
Material and Methods
Agromineral samples and laboratory analyses
This research included a total of 53 samples encompassing a wide lithological diversity. These were grouped as follows: mafic and ultramafic igneous rocks [basalt (9), gabbro (1), diabase (1), dunite (1), and kamafugite (7)], felsic to intermediate igneous rocks [syenite (5), phonolite (7), and tefrite (1)], metamorphic rocks [schist (8), phyllite (1), amphibolite (2), gneiss (2), and granulite (1)], sedimentary rocks [limestone (3) and shale (3)], and industrial by-product [slag (1)]. The samples were collected in different parts of southern Brazil, mainly in the state of Rio Grande do Sul.
The preparation of agromineral samples for both conventional laboratory analysis and pXRF scanning involved crushing, grinding, and sieving approximately 20 g to achieve a particle size of less than 0.075 mm. Litochemical analyses of the samples were performed by Geosol Laboratórios Ltda. The method used for chemical analysis of the samples was ICM 40B, 4-acid opening analysis (total opening) for 49 (forty-nine) elements (namely Ag, Al, As, Ba, Be, Bi, Ca, Cd, Ce, Co, Cr, Cs, Cu, Fe, Ga, Ge, Hf, In, K, La, Li, Lu, Mg, Mn, Mo, Na, Nb, Ni, P, Pb, Rb, S, Sb, Sc, Sn, Sr, Ta, Tb, Te, Th, Ti, Tl, U, V, W, Y, Yb, Zn, and Zr) with focus on base metals through reading by inductively coupled plasma optical emission spectrometry (ICP-OES) (Dunn & Irvine, 1993).
PXRF scanning
A Bruker Tracer 5g pXRF spectrometer (Analytical Instrumentation, Billerica, MA, USA) equipped with a Rh X-ray tube (50 keV, 100 μA) was used for the analyses. Measurements were conducted in triplicate under the “Soil” mode, given the mineralogical similarities of the agrominerals with soil minerals (primary and secondary ones) and the fact that the equipment does not contain a specific mode for agromineral samples. Every pXRF scan lasted 60 seconds. The built-in Geochem software facilitated data acquisition, following the methodology outlined by Weindorf and Chakraborty (2016). The instrument quantified the concentrations of 21 elements for this study: Al, As, Ba, Ca, Cr, Cu, Fe, K, Mg, Mn, Ni, P, Rb, S, Si, Sn, Sr, Ti, V, Zn, and Zr.
To assess data quality, the pXRF analysis included measurements of the manufacturer’s standard soil check sample (CS-M2). The elemental concentrations obtained were compared with the certified reference values, and recovery rates were calculated using the formula: recovery rate = (elemental concentration measured by pXRF) / (certified concentration). The calculated recovery rates for each element are shown in Table 1.
Data analysis and modeling
Before training the prediction models, an exploratory data analysis was performed on the pXRF results to identify and remove outliers, ensuring a more reliable dataset characterization. Principal Component Analysis (PCA) was applied strictly as an exploratory tool to reveal underlying patterns in the elemental composition of the agromineral samples. As a widely used technique, PCA facilitates the visualization of multidimensional data and enhances the identification of trends within complex datasets. Elements with a high proportion of values below the limit of detection (<LOD) were excluded from the prediction models. In contrast, variables for which recovery values could not be calculated due to the absence of the element in the reference material (Table 1) were retained for modeling, as the primary requirement for explanatory variables in machine learning is variability rather than absolute accuracy.
The dataset was then randomly divided into two subsets: 70% for model training and 30% for validation. Predictive models for elemental concentrations were developed using only the most relevant explanatory variables, selected through recursive feature elimination with the “boruta” package (Kursa & Rudnicki, 2010) in R software (version 4.4.2) (R Development Core Team, 2022). This method follows a top-down approach to rank feature importance and identify the most influential variables. The pXRF predictors were classified into three categories: Confirmed (significant for prediction), Tentative (with uncertain impact), and Rejected (irrelevant). Only features classified as Confirmed and Tentative by the Boruta algorithm were incorporated into the models. Feature importance was evaluated for each element to optimize predictive performance. On average, 12 explanatory variables were selected per model (out of 21), depending on the target element, indicating a substantial reduction in dimensionality.
Predictive models were developed using six advanced machine learning algorithms (shown in Table 2) using k-fold cross-validation (k = 10). All analyses were conducted in R software (version 4.4.2) (R Development Core Team, 2022) using the “caret” package (Kuhn, 2008). In this study, machine learning algorithms were employed due to their superior efficacy in identifying relationships among data compared to conventional analysis (Tang & Li, 2023).
Machine learning algorithms and its tuning parameters used to predict remineralizers and silicate fertilizers chemical composition.
Evaluating models performance
The accuracy of the predictive models for agromineral chemical composition, developed using different machine learning algorithms (PPR, PLS, RF, SVM, XGB, and CR), was assessed by comparing predicted values with observed ones. Model performance was evaluated using the coefficient of determination (R²), root mean square error (RMSE) (Equation 1), and residual prediction deviation (RPD) (Equation 2). The equations are presented as follows:
where, n: number of observations, y i: estimated value by the model, m i: measured value by the chemical analysis, SD: standard deviation of the observed values. The RPD metric was used to classify model performance into three categories: RPD > 2 indicates highly accurate predictions, 1.4 ≤ RPD ≤ 2 suggests moderate accuracy, and RPD < 1.4 denotes unreliable predictions (Chang et al., 2001). For each target element, the performance of the six algorithms was compared individually, and the model with the highest R² and lowest RMSE was selected as the most accurate for predicting the concentration of each specific element.
Results and Discussion
Elemental content characterization of agrominerals through pXRF
The summary of statistics of elemental content of soil REM and SiF determined via traditional wet-chemistry analysis are shown in Table 3. The agrominerals showed great variability in the contents of all elements, with Lu presenting the lower variability (CV% = 48.67) and Te presenting the highest one (CV% = 304.66). The results reported in this study are consistent to those of Wagner, Tammen and Jung (2022), who documented significant geochemical variability among different rock types in Bavaria. Their findings highlight the natural heterogeneity of elemental composition in rocks, a factor that also explains the wide variation found in the agromineral samples analyzed in our study. Such diversity in the dataset is advantageous for model development, as it enables the training of machine learning algorithms on a wide range of values, enhancing the model’s ability to generalize and make reliable predictions when applied to new agromineral samples with different compositions.
Figure 1 presents the correlation matrix between the elemental content obtained by pXRF and the total chemical composition (ICM40B) of the agromineral samples. The results showed strong positive correlations (shown in dark blue color) between some element pairs, such as Ba (ICM40B) and Sr (pXRF), indicating that these elements have a geochemical association or co-occurrence in the agromineral matrices. In addition, agronomically relevant elements such as Ca (r = 0.96), S (r = 0.86), Fe (r = 0.98), Mn (r = 0.91), K (r = 0.97), and Mg (r = 0.89) showed high correlations between the ICM40B and pXRF datasets, which suggests that the pXRF spectroscopy is effective in determining these elements in a manner comparable to conventional laboratory method.
Correlation between traditional wet-chemistry analysis and portable X-ray fluorescence (pXRF) spectrometry data of agrominerals.
Conversely, some elements, such as As, P, and Sn, presented weak correlations, suggesting a discrepancy between the two analysis methods. The presence of weak correlations may suggest limitations in the pXRF ability to detect/quantify certain elements, such as lighter elements that produce weaker fluorescence (Silva et al., 2021). It may also reflect variations relative to the distribution of these elements in the agrominerals samples or their low concentrations (the element is not detected if its concentration is below the limit of detection - LOD) (Silva et al., 2021; Weindorf & Chakraborty, 2016).
The principal component analysis (PCA) is shown in Figure 2. The first two principal components (PC1 and PC2) together explain 49% of the total data variability, with 28% attributed to PC1 and 21% to PC2. Although this study encompasses different types of agrominerals, some geochemical trends can be observed. Along PC1, elements such as Al, Si, and K have strong negative loadings (long vectors pointing left), whereas Mg exhibit positive loading (vector pointing right), highlighting contrasting mineralogical signatures across agromineral types. For instance, limestone and slag samples are positioned on the right-hand side of the plot and are characterized by high concentrations of Mg, while syenite, phonolite, and schist are positioned on the upper central region, associated with higher contents of Al, Si, and K. PC2, in turn, differentiates samples based on elements such as Fe, Ti, V, and P (with strong negative loadings) and S, As, and Zn (with positive loadings). Basalt, diabase, gabbro, kamafugite, and dunite are grouped in the lower left quadrant, driven by higher levels of Fe, Ti, and V. Negative correlations observed between Al and Mg, and between Mg and Si, reinforce known geochemical patterns of silicate rock weathering.
Principal component analysis (PCA) for the soil remineralizers (REM) and silicate fertilizers (SiF) through portable X-ray fluorescence (pXRF) spectrometry. PXRF data: Al, As, Ba, Ca, Cr, Cu, Fe, K, Mg, Mn, Ni, P, Rb, S, Si, Sn, Sr, Ti, V, Zn, and Zr in parts per million (ppm).
The spatial distribution of the agrominerals’ groups highlighted the effectiveness of pXRF in segregating the samples based on their distinct geochemical compositions. The clustering of basalt, dunite, diabase, gabbro, and kamafugite in a similar region of the PCA space demonstrates the ability of pXRF to capture their mafic to ultramafic nature, typically rich in Fe, Ti, and V, due to the presence of minerals such as olivine, pyroxenes, and magnetite. Similarly, the clear separation of limestone samples emphasizes their distinct carbonate composition, dominated by Ca and Mg. The grouping of phonolite, syenite, phyllite, and schist, which are more felsic in nature, reflects pXRF’s sensitivity to their enrichment in Si, K, and alkali metals such as Rb, a pattern that aligns with the predominant feldspars and micas in these rocks.
Validation of prediction models for agrominerals elemental contents
Table 4 and Figure 3 present the results for the most accurate prediction models (out of the 294 models created) between six machine learning algorithms (PPR, PLS, RF, SVM, XGB, and CR) for predicting the chemical composition of soil agrominerals based on pXRF data. The performance of each algorithm was evaluated through the root mean square error (RMSE) and the residual prediction deviation (RPD) (Table 4), and the determination coefficient (R2) (Figure 3).
Root mean square error (RMSE) and residual prediction deviation (RPD) of the most accurate prediction models of soil agrominerals composition through portable X-ray fluorescence (pXRF) spectrometry using six machine learning algorithms: PPR = projection pursuit regression; PLS = partial least regression; RF = random forest; SVM = support vector machine; XGB = extreme gradient boosting; and CR = cubist regression.
Coefficient of determination (R2) of agrominerals composition predictions with support of portable X-ray fluorescence (pXRF) data and machine learning algorithms.
The prediction of four elements presented lower accuracy (Ag: R2 = 0.45 and RPD = 1.30, As: 0.11 and 1.04, Sb: 0.21 and 1.15, and Te: 0.05 and 0.22) and the prediction of other four elements presented moderate results (Cd: R2 = 0.78 and RPD = 2.15, Sn: 0.79 and 1.97, Ta: 0.72 and 1.90, and W: 0.68 and 1.56). The lower values of prediction of these elements may be related to difficulties in capturing complex variations in the chemical composition of remineralizers and silicate fertilizers. All other elements (41) showed high accuracy with R2 values above 0.80 and RPD values ranging from 1.31 to 23.0 (Table 4 and Figure 3). Among them are included the elements that occur most commonly in greater quantities in rock-forming minerals, mainly in the form of silicates and oxides, such as Ca, K, Mg, Si, Fe, and Mn. The excellent prediction of these elements indicates that the geochemical nature of minerals that contain these elements can be better captured by pXRF and subsequently modeled by machine learning algorithms, which are efficient in modeling complex and non-linear data (Guo et al., 2025).
Overall, the high accuracy obtained in this study aligns with the ones performed by Andrade et al. (2023b) and Benedet et al. (2023) when predicting organic and mineral fertilizers and agricultural and non-agricultural limestone chemical composition, and exceeds those performed by Andrade et al. (2022), Mancini et al. (2022), and Teixeira et al. (2022) when predicting soil chemical attributes, highlighting the great potential of using this approach to evaluate the chemical composition of agrominerals. One possible explanation for the better performance of prediction models for chemical composition of agrominerals than for soil chemical attributes may be related to that the reference analysis of the former is total which is not the case with the latter (available, exchangeable, etc.).
In general, the cubist regression (CR) stood out as the most accurate algorithm for most elements, presenting low RMSE values and RPD values generally above 2.0, which indicates high prediction power. For example, the prediction of Ca (RMSE = 0.44, RPD = 7.31) and Fe (RMSE = 0.51, RPD = 7.07) showed very robust and promising results. The effectiveness of CR can be attributed to its ability to combine linear regression models with rule-based decision structures, allowing it to capture both linear trends and complex interactions within the data (Kuhn et al., 2012). Although machine learning-based upon pXRF data proved to be a promising tool for predicting agrominerals chemical composition, the choice of algorithm should be carefully matched based on the elements of interest and the dataset variability.
Variables importance
Data regarding the importance of pXRF variables for each prediction model are shown in Figure 4. The importance matrix (%) shows an overview of the chemical elements that contribute significantly to the prediction model (dark blue), the ones that contribute little (light blue), and those ones that should be neglected in the context of agrominerals (X).
Variables importance for agrominerals chemical composition prediction based on portable X-ray fluorescence (pXRF) spectrometry data and machine learning algorithms. The importance scores were extracted from the most accurate prediction model (i.e., lowest RMSE) for each element. X means that the variable was not used to train the prediction model for that element.
Figure 4 reveals that some elements, such as Mg, V, Si, Fe, and Sr play an important role in the prediction of other elements. These variables were chosen by the algorithms as good predictors, due to their high correlations with the chemical composition of agrominerals (Figure 1). Conversely, variables such as As and Sn were among the least frequently chosen to compose the explanatory variables dataset of prediction models.
Figure 5 shows the number of times each pXRF variable was selected as the most important for the prediction models. As expected, the algorithms defined different explanatory variables according to each element predicted. For example, the most important variables for As, Ca, Ni, P, Sn, and Ti prediction were V, P, Cr, Ti, K, and V, respectively. Interestingly, in several cases, the predicted element was not the same as the one contributing most to the model’s performance. This highlights the ability of machine learning algorithms to capture complex and sometimes non-linear relationships among variables, improving predictive performance beyond simple one-to-one correlations.
Number of times each variable was considered the most important one by the machine learning algorithms to predict agrominerals chemical composition via portable X-ray fluorescence (pXRF) spectrometry data.
Fe, Mg, Rb, Si, Sr, V, and Zr were the most important variables, playing a crucial role in predicting the chemical composition of soil remineralizers and silicate fertilizers. Some of these associations reflect known geochemical affinities in rocks. For example, Ca and P often occur together in carbonatites and limestones (Wang et al., 2020). Ni and Cr are commonly found in mafic and ultramafic rocks (Kierczak, Pietranik, & Pędziwiatr, 2021). Sn tends to concentrate in granitic and potassic rocks, while Ti and V frequently co-occur in titanomagnetite, a mineral typically present in basalts (Yang et al., 2025). Additionally, K and Rb often occur together in feldspar-rich rocks (Wise, Curry, & Harmon, 2024), such as syenites and phonolites, which are frequently explored as sources of silicate fertilizers due to their high K content (Ramos et al., 2022). Also, in the opposite way, negative correlations between Al and Mg (-0.83) and Mg and Si (-0.73) point to well established geochemical patterns in igneous rocks (Figures 1 and 2). These geochemical patterns, which reflect the mineralogical composition of the rock powders, could be effectively captured by pXRF, highlighting its utility as a rapid tool for screening and characterizing agrominerals based on their geological origin.
The use of artificial intelligence to predict the chemical composition of agrominerals can contribute significantly to the identification and delineation of areas with agrogeological potential over large regions. It can also provide valuable support for investigating rock variability within agromineral deposits and for monitoring the chemical composition of rock powders, helping to ensure compliance with certification standards for REM and SiF products.
Potential of using AI allied with green tech analysis for assessing agrominerals chemical composition
Based on our results, the integration of artificial intelligence (AI) with green methodology for assessing the chemical composition of soil REM and SiF shows strong potential to optimize the chemical analysis of these agrominerals, enabling accurate and efficient predictions (Figure 2, Table 4). AI models can identify which elements are most critical for predicting REM and SiF chemical composition (Figure 4), facilitating quick and cost-effective decision-making and reducing the need for traditional laboratory analyses.
The application of green technologies, such as pXRF, offers a non-destructive and environmentally friendly approach to agile (60 s) assessment of agrominerals chemical composition. While traditional laboratory analyses will still be required for formal registration and product release by the industry, pXRF can support routine quality control and assist in the prospection of new agrominerals sources. These findings encourage further studies involving proximal sensors and machine learning algorithms to validate and expand this approach across different agromineral sources, soil types, and geological contexts, thereby strengthening its global applicability.
These technologies also have great potential for broader scalability and accessibility. While it may not be feasible for small-scale farmers to own or operate analytical tools like pXRF, public and private institutions, research centers, cooperatives, and agromineral companies can make such technologies available as support services. This enables more efficient and safer use of agrominerals, especially when properly characterized, ultimately allowing producers to reduce their dependence on conventional chemical fertilizers. Furthermore, pXRF can significantly accelerate regional prospecting efforts, where hundreds of samples require screening, thereby reducing the time and cost associated with conventional lithochemical analysis.
Use of AI, pXRF and geological occurrence of rocks used as remineralizers and silicate fertilizers in Brazil
The integration of artificial intelligence (AI) and portable X-ray fluorescence (pXRF) technology, addressed in this study, offers a promising approach to assessing and optimizing the use of agrominerals derived from Brazil’s diverse geological resources (Coordination of Natural Resources and Environmental Studies, 2019). The unique geodiversity of Brazil includes biotite-schists, gneiss basaltic rocks and, in a lesser extent, ultramafic potassic rocks. These materials are distributed along most of the Brazilian territory and represent a rich source of nutrients that may improve soil fertility (Costa Júnior et al., 2024; Martins et al., 2023; Nogueira et al., 2024). This is particularly relevant considering the very low natural fertility of most Brazilian soils due to the high degree of weathering-leaching these soils have been submitted. In this sense, AI models and pXRF analysis may be used for accurately predicting the chemical composition of these rocks across varying geological formations. Due to the great compositional variation presented by potential lithotypes this becomes a tool capable of speeding up prospecting work for agrominerals over large areas.
Artificial intelligence enhances the predictive accuracy of agrominerals chemical composition by processing complex datasets generated from pXRF (Andrade et al., 2021, 2020). AI algorithms can identify patterns in elemental composition (Figure 2), showing their potential to assess the suitability of specific rock types as agrominerals (Figure 3, Table 4). However, it is still necessary to deepen our understanding on how these algorithms operate and evolve, as continuous development and refinement may further improve their performance and interpretability.
According to Campe et al. (2022), several rocks are unsuitable for being used as soil remineralizers due to their high content of heavy metals, such as chromium and nickel, considering their geochemical affinity with ultramafic rocks, or in other cases, such as As, Cd, and Hg, resulting from their association with sulfide deposits. With the pioneering approach demonstrated in this study, the identification of lithologies capable of safely supplying nutrients to the soil would be a rapid and accurate process. Thus, the integration of AI and pXRF analysis offers an effective and sustainable approach to a greener Brazilian agriculture.
Furthermore, future studies could explore a direct comparison between pXRF results and simpler regression models across the different 49 chemical elements. This would help identify specific conditions in which simple pXRF results may already provide sufficiently reliable estimates, and where algorithmic modeling will be mandatory for better results. Although such comparison was beyond the scope of the present work, it represents a valuable direction for expanding the applicability and understanding of these tools in agromineral assessment.
Conclusions
This study demonstrated that data generated by pXRF coupled with machine learning algorithms can predict the chemical composition of soil remineralizers (REM) and silicate fertilizers (SiF) in a fast, cost-effective, and accurate manner. The findings confirmed that this approach enables an environmentally-friendly assessment of agromineral composition with accurate performance for 41 out of the 49 elements evaluated (R² > 0.80 and RPD > 1.31), with Cubist regression outperforming other algorithms. Future studies are encouraged to test and validate this approach across diverse agromineral sources and geological settings.
Acknowledgements
The authors would like to thank the Geological Survey of Brazil (SGB) TED No 016/CPRM/2021, National Council for Scientific and Technological Development (CNPq), Coordination for the Improvement of Higher Education Personnel (CAPES), and Foundation for Research of the State of Minas Gerais (FAPEMIG) for the financial support to develop this research. The SGB kindly furnished the agromineral samples for this work.
Data Availability Statement
Data available upon request to authors.
References
- Anda, M., Shamshuddin, J., & Fauziah, C. I. (2015). Improving chemical properties of a highly weathered soil using finely ground basalt rocks. Catena, 124:147-161.
- Andrade, R. et al. (2022). Proximal sensor data fusion and auxiliary information for tropical soil property prediction: Soil texture. Geoderma, 422:115936.
- Andrade, R. et al. (2023a). A Proximal sensor-based approach for clean, fast, and accurate assessment of the Eucalyptus spp nutritional status and differentiation of clones. Plants, 12(13):561.
- Andrade, R. et al. (2023b). Proximal sensing provides clean, fast, and accurate quality control of organic and mineral fertilizers. Environmental Research, 236:116753.
- Andrade, R. et al. (2021). Micronutrients prediction via pXRF spectrometry in Brazil: Influence of weathering degree. Geoderma Regional, 27:e00431.
- Andrade, R. et al. (2020). Assessing models for prediction of some soil chemical properties from portable X-ray fluorescence (pXRF) spectrometry data in Brazilian Coastal Plains. Geoderma, 357:113957.
- Basso, E. et al. (2024). Seventeenth-century barniz de pasto objects from the collection of the hispanic society museum & library: Materiality and technology. Heritage, 7(5):2620-2650.
- Beerling, D. J. et al. (2018). Farming with crops and rocks to address global climate, food and soil security. Nature Plants, 4:138-147.
- Benedet, L. et al. (2023). Clean quality control of agricultural and non-agricultural lime by rapid and accurate assessment of calcium and magnesium contents via proximal sensors. Environmental Research, 221:115300.
- Benevides Filho, P. R. R. et al. (2023). Potential soil remineralizers from silicate rock powders (SRP) as alternative sources of nutrients for agricultural production (Amazon Region). Minerals, 13(10):1255.
- Bernardini, F. et al. (2024). Exploring pottery technology and mineralogical, petrographic and chemical composition at the Neolithic pile-dwelling site of Palù di Livenza in North-East Italy. Archaeological and Anthropological Sciences, 16:145.
-
Brasil. (2014). Decreto Nº 8.384, de 29 de dezembro de 2014. Categoria “Produto Novo”, definidos nos Decretos 4954/2004 e 8.384/2014 no Art. 2º Inc. XII. Available in: <https://www.planalto.gov.br/ccivil_03/_ato2011-2014/2014/decreto/d8384.htm>.
» https://www.planalto.gov.br/ccivil_03/_ato2011-2014/2014/decreto/d8384.htm -
Brasil. Ministério da Agricultura, Pecuária e Abastecimento. (2016). Instrução Normativa No 5, de 10 de março de 2016. Ministério da Agricultura, Pecuária e Abastecimento (MAPA). Gabinete da Ministra. Available in: <http://www.agricultura.gov.br/assuntos/insumos-agropecuarios/insumos-agricolas/fertilizantes/legislacao/in-5-de-10-3-16-remineralizadores-e-substratos-para-plantas.pdf>.
» http://www.agricultura.gov.br/assuntos/insumos-agropecuarios/insumos-agricolas/fertilizantes/legislacao/in-5-de-10-3-16-remineralizadores-e-substratos-para-plantas.pdf - Burbano, D. F. M. et al. (2022). Crushed volcanic rock as soil remineralizer: A strategy to overcome the global fertilizer crisis. Natural Resources Research, 31:2197-2210.
-
Campe, J. et al. (2022). Remineralization for a healthy planet Available in: <https://www.remineralize.org/wp-content/uploads/2022/08/RTE-Remineralization-for-a-Healthy-Planet.pdf>.
» https://www.remineralize.org/wp-content/uploads/2022/08/RTE-Remineralization-for-a-Healthy-Planet.pdf - Cardozo, E. et al. (2024). Sustainable agricultural practices: Volcanic rock potential for soil remineralization. Journal of Cleaner Production, 466:142876.
- Chang, C.-W. et al. (2001). Near-infrared reflectance spectroscopy-principal components regression analyses of soil properties. Soil Science Society of America Journal, 65(2):480.
- Colomban, P., Simsek Franci, G., & Gallet, X., 2024. Non-invasive mobile raman and pXRF analysis of armorial porcelain with the coat of arms of louis XV and others enamelled in canton: Analytical criteria for authentication. Heritage, 7(9):4881-4913.
- Coordination of Natural Resources and Environmental Studies. (2019). Províncias estruturais, compartimentos de relevo, tipos de solos, regiões fitoecológicas e outras áreas IBGE, Rio de Janeiro.
- Costa Júnior, A. D. et al. (2024). Glauconite as a potential source of potassium in Brazilian agriculture - a review. Revista Ciência Agronômica, 55:e20238828.
- Costa, M.V. et al. (2024). Assessment of coffee leaves nutritive value via portable X-ray fluorescence spectrometry and machine learning algorithms. Spectrochimica Acta Part B: Atomic Spectroscopy, 219:106996.
- Datsko, O. et al. (2024). Ecological assessment of heavy metal content in ukrainian Soils. Journal of Ecological Engineering, 25(11):100-108.
- Dunn, C. E., & Irvine, D. G. (1993). Relevance of a lithogeochemical database to epidemiological studies in central Saskatchewan, Canada. Applied Geochemistry, 8:215-222.
- Elhaissoufi, W. et al. (2022). Phosphate bacterial solubilization: A key rhizosphere driving force enabling higher P use efficiency and crop productivity. Journal of Advanced Research, 38:13-28.
- Gowd, S. C. et al. (2023). Life cycle assessment of comparing different nutrient recovery systems from municipal wastewater: A path towards self-reliance and sustainability. Journal of Cleaner Production, 410:137331.
- Guo, J. et al. (2025). Interpretable machine learning model for predicting the prognosis of antibody positive autoimmune encephalitis patients. Journal of Affective Disorders, 369:352-363.
- Khan, M. N., & Mohammad, F. (2014). Eutrophication: Challenges and solutions. In A. A. Ansari., & S. S. Gill. (Eds.), Eutrophication: Causes, consequences and control Springer Netherlands, Dordrecht, (pp.1-15).
- Kierczak, J., Pietranik, A., & Pędziwiatr, A. (2021). Ultramafic geoecosystems as a natural source of Ni, Cr, and Co to the environment: A review. Science of The Total Environment, 755:142620.
- Klinger, L. (2006). Ecological evidence of large-scale silviculture by california indians, In F. A. D. T. Jacobs. (Ed.). Unlearning the language of conquest University of Texas Press, (pp.153-165).
- Korchagin, J., Caner, L., Bortoluzzi, E. C. (2019). Variability of amethyst mining waste: A mineralogical and geochemical approach to evaluate the potential use in agriculture. Journal of Cleaner Production, 210:749-758.
- Kuhn, M. (2008). Building predictive models in R using the caret package. Journal of Statistical Software,28(5):1-26.
-
Kuhn, M. et al. (2012). Cubist models for regression R package Vignette 18, 480. Available in: <https://citeseerx.ist.psu.edu/document? repid=rep1&type=pdf&doi= fd880d2b4482fc9b383435d5 1f6d730c02e0be36>.
» https://citeseerx.ist.psu.edu/document? repid=rep1&type=pdf&doi= fd880d2b4482fc9b383435d5 1f6d730c02e0be36 - Kursa, M. B., & Rudnicki, W. R. (2010). Feature selection with the boruta package. Journal of Statistical Software,36(11):1-13.
- Luchese, A. V. et al. (2023). Can basalt rock powder be used as an alternative nutrient source for soybeans and corn? Journal of Soil Science and Plant Nutrition, 23:4044-4054.
- Maciel, G. P. et al. (2024). Green tech soil analysis: A comparison of potentially toxic element contents among urban, agricultural, and gold mining areas in the Eastern Brazilian Amazon. Environmental Geochemistry and Health, 46:448.
- Mancini, M. et al. (2024). Multinational prediction of soil organic carbon and texture via proximal sensors. Soil Science Society of America Journal, 88:8-26.
- Mancini, M. et al. (2022). Proximal sensor data fusion for Brazilian soil properties prediction: Exchangeable/available macronutrients, aluminum, and potential acidity. Geoderma Regional, 30:e00573.
- Mancini, M. et al. (2019a). Tracing tropical soil parent material analysis via portable X-ray fluorescence (pXRF) spectrometry in Brazilian Cerrado. Geoderma, 337:718-728.
- Mancini, M. et al. (2019b). Parent material distribution mapping from tropical soils data via machine learning and portable X-ray fluorescence (pXRF) spectrometry in Brazil. Geoderma, 354:113885.
- Manning, D. A. C., & Theodoro, S. H. (2020). Enabling food security through use of local rocks and minerals. The Extractive Industries and Society, 7(2):480-487.
- Martins, E. S. et al. (2023). Produção brasileira de remineralizadores e fertilizantes naturais: 2019 a 2022. Revista Novo Solo, 3(6):1-16.
- Nogueira, B. K. A. et al. (2024). Spatial variability of potassium and agricultural productivity in sandy loam soil with rock dust under functional diversity in the Brazilian Cerrado. Journal of Soil Science and Plant Nutrition, 24:3441-3458.
- Pierangeli, L. M. P. et al. (2023). Soil parent material spatial modeling at high resolution from proximal sensing and machine learning: A pilot study. Journal of South American Earth Sciences, 129:104498.
- Queirós, J., Malça, J., & Freire, F. (2015). Environmental life-cycle assessment of rapeseed produced in Central Europe: addressing alternative fertilization and management practices. Journal of Cleaner Production, 99:266-274.
-
R Development Core Team. (2022). R: A language and environmet for statistical computing R Foundation for Statistical Computing. Available in: <https://www.r-project.org/>
» https://www.r-project.org/ - Ramos, C. G. et al. (2022). Possibilities of using silicate rock powder: An overview. Geoscience Frontiers, 13(1):101185.
- Rebelo Silva, T. et al. (2024). In situ determination of soybean leaves nutritional status by portable X-ray fluorescence: An initial approach for data collection and predictive modelling. Biosystems Engineering, 247:143-152.
- Santos, D. S. et al. (2024). Clean and accurate soil quality monitoring in mining areas under environmental rehabilitation in the Eastern Brazilian Amazon. Environmental Monitoring and Assessment, 196:385.
- Silva, F. et al. (2024a). Proximal sensors for modeling clay mineralogy and characterization of soil textural fractions developed from contrasting parent materials. Catena, 241:108053.
- Silva, S. H. G. et al. (2024b). Advancing leaf nutritional characterization of blueberry varieties adapted to warm climates enhanced by proximal sensing. AgriEngineering, 6(3):3187-3202.
- Silva, S. H. G. et al. (2021). PXRF in tropical soils: methodology, applications, achievements and challenges. In D. L. Sparks. Advances in agronomy Delaware Environmental Institute, Interdisciplinary Science and Engineering Laboratory, University of Delaware, Newark, DE, United States, (pp.1-62).
- Tang, Y., & Li, H. (2023). Comparing the performance of machine learning methods in predicting soil seed bank persistence. Ecological Informatics, 77:102188.
- Teixeira, A. F. S. et al. (2022). Proximal sensor data fusion for tropical soil property prediction: Soil fertility properties. Journal of South American Earth Sciences, 116:103873.
- Theodoro, S. H. et al. (2021). Soil remineralization and recovery of degraded areas: An experience in the tropical region. Journal of South American Earth Sciences, 107:103014.
- Theodoro, S. H., & Leonardos, O. H. (2014). Stonemeal: Principles, potential, and perspectives from Brazil. In S. H. Theodoro., & O. H. Leonardos. Geotherapy CRC Press, (pp.433-448).
- Theodoro, S. H., & Leonardos, O. H. (2006). The use of rocks to improve family agriculture in Brazil. Anais da Academia Brasileira de Ciências, 78(4):721-730.
-
Vilela, G. F. (2025). Produtos registrados (remineralizadores_ fertilizantes minerais simples e materiais secundários). Embrapa Territorial. Available in: <https://geoinfo.dados.embrapa.br/catalogue/#/dataset/6691>.
» https://geoinfo.dados.embrapa.br/catalogue/#/dataset/6691 - Wagner, B., Tammen, A., & Jung, D. (2022). Determining the lithogeochemical background concentrations of 39 elements in Bavarian rocks. Environmental Earth Sciences, 81:207.
- Wang, Z.-Y. et al. (2020). Carbonatite-related REE deposits: An overview. Minerals, 10(11):965.
-
Weindorf, D. C., & Chakraborty, S. (2016). Portable apparatus for soil chemical characterization US10107770B2. Available in:< https://patentimages.storage.googleapis.com/7b/44/82/8ffc466015c89e/US10107770.pdf>.
» https://patentimages.storage.googleapis.com/7b/44/82/8ffc466015c89e/US10107770.pdf - Wise, M. A., Curry, A. C., & Harmon, R. S. 2024. Reevaluation of the K/Rb-Li systematics in muscovite as a potential exploration tool for identifying Li mineralization in granitic pegmatites. Minerals, 14(1):117.
- Yang, J. et al. (2025). Geochronology, geochemical and mineralogical compositions of the Dawan granites in the Dupangling batholith, South China: Implications for Sn enrichment and mineralization. Journal of Asian Earth Sciences, 292:106731.










