Quantitative evaluation of hydrocarbon contamination in soil using hyperspectral data-a comparative study of machine
Rafic Al Ayass1, Samir Mustapha2, Farah Ali Ahmad3
1Laboratory of Smart Structures and Structural Integrity (SSSI), Department of Mechanical Engineering, American University of Beirut, Beirut, Lebanon.
Environmental Monitoring and Assessment
|July 28, 2025
Summary
Machine learning models accurately predict soil hydrocarbon contamination using hyperspectral data. XGB regressors offer a robust solution for environmental monitoring of petroleum pollutants.
Area of Science:
- Environmental Science
- Geochemistry
- Data Science
Background:
- Soil contamination by hydrocarbons poses significant environmental risks.
- Rapid and accurate assessment of hydrocarbon levels is crucial for effective remediation.
- Traditional methods for soil analysis can be time-consuming and labor-intensive.
Purpose of the Study:
- To evaluate machine learning (ML) and deep learning (DL) techniques for predicting hydrocarbon contamination in soils.
- To assess the effectiveness of hyperspectral imaging in conjunction with ML/DL for soil analysis.
- To compare the performance of different models, including XGB regressor and neural networks, for hydrocarbon prediction.
Main Methods:
- Synthetically contaminated soil samples (clayey, silty, sandy) with crude oil, diesel, and gasoline (0-10,000 mg/kg).
- Hyperspectral imaging to capture spectral signatures.
- Analysis using XGB regressor and neural network models, with Gas Chromatography-Mass Spectrometry (GC-MS) for reference values.
- Model performance evaluation using R-squared and Root Mean Squared Error (RMSE).
Main Results:
- Models achieved high predictive accuracy, with an R-squared of 0.96 and RMSE of 600 mg/kg.
- Performance varied by petroleum type and soil matrix; gasoline showed lower accuracy.
- Feature selection (spectral bands) improved model performance by reducing overfitting.
- XGB regressor demonstrated a strong balance of accuracy and robustness.
Conclusions:
- Hyperspectral analysis combined with ML/DL models is effective for soil contamination assessment.
- Ensemble models like XGB are suitable for practical spectral applications in environmental monitoring.
- This approach offers a rapid and reliable method for detecting hydrocarbon pollution in soils.


