Enhanced quantitative elemental analysis in XRF spectroscopy using deep learning fusion network
Abstract
To address the limited accuracy in quantitative elemental analysis caused by insufficient integration of multi-energy state X-ray fluorescence (XRF) spectral data, an effective deep learning method is proposed to optimize element quantitative analysis. This method constructs a novel Multi-energy State Attention Fusion Network (MSAF-Net). Firstly, to prevent important peaks from being obscured by noise, a Spectral Feature Extraction Module (SFEM) is proposed to adaptively weight spectral data, enhancing meaningful peaks while suppressing background interference. Secondly, to ensure balanced information integration across energy states, a Dynamic Fusion Scoring Module (DFSM) is developed to learn and apply distinct weights to each state and evaluate the fused output through a pre-training scoring mechanism. Finally, a two-stage optimization strategy is implemented to overcome local optima and promote comprehensive information sharing during model training: individual pre-training of each energy branch followed by constrained joint training, yielding stable and cumulative performance improvements. Transfer learning was employed to evaluate network generalization. The model was trained on 9855 simulated soil spectra and validated using 118 field samples. Compared to other advanced models, MSAF-Net achieved the highest coefficients of determination (R2) of 0.9832, 0.9844, 0.9891, 0.9695, 0.9854, and 0.9801 for Si, Al, Fe, Mg, Ca, and K, respectively, each with a Ratio of Performance to Deviation (RPD) above 7.5. Heavy metal concentrations were predicted with comparable fidelity, with a mean R2 above 0.98, demonstrating excellent fit quality and robust error control. These results establish MSAF-Net as an efficient and reliable tool for quantitative elemental analysis in XRF spectroscopy.