A deep spectral prediction network to quantitatively determine heavy metal elements in soil by X-ray fluorescence
Abstract
An accurate and effective analytical method to measure the concentration of heavy metal elements (HMEs) in soil is of great significance for combating soil pollution, repairing ecosystems, and guiding agricultural cropland. Nondestructive, rapid, and in situ measurements make X-ray fluorescence spectroscopy (XRF) a popular tool for analyzing HMEs in soil. However, due to complex matrix effects and spectral line interference, the analytical accuracy is limited. In this study, an effective deep learning method is proposed to accurately determine the concentration of HMEs in soil by combining with XRF. Firstly, soil spectra are acquired based on a handheld energy-dispersive X-ray fluorescence spectrometer (ED-XRF). Secondly, depending on the spectral continuity, cross-space correlation, and local correlation of XRF, a feature mining coordination (FMC) module is proposed. The FMC module is composed of a global spectral attention (GSA) module and a local multiscale feature extraction (LMSFE) module, and it can simultaneously pay overall attention to the spectrogram and local feature modeling. Finally, a deep spectral prediction network (DSPFormer) is proposed based on the FMC module to achieve an accurate estimation of the concentration of five HMEs (Ti, Mn, Cu, Zn, and Pb). The effectiveness of the method is demonstrated by comparing it with other advanced soil analysis algorithms. The coefficients of determination of DSPFormer for five HMEs (Ti, Mn, Cu, Zn, and Pb) are 0.9559, 0.9627, 0.9658, 0.9584, and 0.9664, respectively. The results indicate that DSPFormer effectively mitigates the matrix effect and spectral line interference present in XRF. In summary, the deep learning method based on self-attention and convolutional neural networks (CNNs) provides new theoretical guidance for soil HME analysis.