Abstract:Soil organic matter (SOM)content is a critical indicator of soil fertility, and its accurate estimation is essential for guiding agricultural production and ensuring global food security. Traditional methods for measuring SOM content are labor-intensive and time-consuming, making rapid and non- destructive techniques highly desirable. Aiming to develop an improved method for predicting SOM content using near-infrared spectroscopy (NIR)combined with deep learning, specifically by expanding limited soil sample data using a self-attention mechanism-based generative adversarial network (SA-GAN), 120 soil samples were collected from the North China Plain, along with their corresponding NIR spectral data and true SOM content. Two data expansion methods were employed to address the challenge of small sample sizes: the proposed SA GAN and the conventional deep convolutional generative adversarial network (DCGAN). The expanded datasets were then used to train a convolutional neural network (CNN)for SOM content prediction. Additionally, the performance of three predictive models, support vector machine (SVM), partial least squares regression (PLSR), and CNN was evaluated by comparing their prediction accuracies with and without the inclusion of expanded data. The results showed that SA GAN-generated spectral curves exhibited trends closer to real data with significantly less noise than DCGAN. The statistical distribution of SOM content generated by SA GAN also more closely resembled that of real samples. When the expanded data were added to the training sets of the three prediction models, SA-GAN-generated data consistently improved model performance more effectively than DCGAN-generated data. Specifically, the R2 values of SVM, PLSR, and CNN models were increased from 0. 51, 0. 49, and 0. 68 to 0. 76, 0. 73, and 0. 88, respectively, while root mean square error (RMSE)values were decreased significantly. These findings demonstrated that SA-GAN could effectively enhance the accuracy of SOM prediction models by generating high-quality synthetic data. In conclusion, it successfully validated the feasibility of using SA-GAN to expand SOM spectral data for improving prediction accuracy. This approach not only addressed the limitations of small sample sizes but also provided a valuable tool for guiding smart agricultural practices. Future research would focus on optimizing the network structure and expanding the diversity of soil samples to further enhance model generalizability and accuracy.