

Abstract: Rare earth elements (REEs) are critical raw materials for the green energy transition due to their essential role in renewable-energy technologies. This study investigates the application of artificial intelligence (AI), with particular emphasis on feature engineering, to predict REE content in phosphorite deposits of the Gafsa-Metlaoui Basin, Tunisia, to support data-driven REE resource assessment. Random Forest (RF) and XGBoost regressors were trained using a geochemical dataset of 37 samples characterized by nine major oxides (SiO₂, MnO, Al₂O₃, Fe₂O₃, MgO, CaO, K₂O, TiO₂, and P₂O₅). Six engineered interaction features were developed using geological reasoning, Pearson correlation, feature-importance ranking, and SHAP analysis, and integrated into alternative feature sets. The best nine-oxide XGBoost model achieved a test-set R² of 0.9445 (RMSE = 23.39; MAE = 16.35), substantially outperforming Random Forest (R² = 0.8092). A constrained model using only four oxides available at the deposit (SiO₂, MgO, CaO, and P₂O₅) achieved a lower test R² of 0.554, demonstrating that predictive performance depends strongly on the geological informativeness of the feature space rather than on the algorithm alone. SHAP analysis indicates that engineered geochemical ratios, particularly the MgO/TiO₂ interaction, contribute more strongly to prediction than individual raw oxides, supporting the geological interpretation of glauconite-related controls on REE enrichment. These results demonstrate the potential of interpretable AI and feature engineering to overcome limitations associated with sparse geochemical datasets and to improve early-stage assessment of REE potential in phosphate resources, supporting resource efficiency and the transition toward a more sustainable energy system.
Keywords: Artificial Intelligence; Geoscience; Feature Engineering; Machine Learning; Rare Earth Elements