Objective This study aims to enhance the spatial estimation accuracy of soil organic carbon (SOC) and total nitrogen (TN) in the 0-30 cm soil layer in the Zhangye region and to identify the key driving factors and their directional effects. Methods Multi-source covariates, including climate, topography, vegetation, and soil physicochemical properties, were integrated to construct a feature set based on field sampling data (N=979). Nine types of machine learning models were systematically compared, from which XGBoost, gradient boosting regression trees (GBRT), and random forest (RF) were selected as representative tree-based models. Three ensemble strategies were adopted to establish ensemble models, including auto-weighted, blending, and bagging. Their performance was comprehensively evaluated using 10-fold cross-validation and an independent test set. SHapley Additive exPlanations (SHAP) values were applied to quantify variable contributions and their directional effect. Results For single models on the test set, SOC estimation yielded R² values of 0.768, 0.773, and 0.729, root mean square error (RMSE) values of 0.472, 6.421, and 7.011, and mean absolute error (MAE) values of 0.314, 4.319, and 4.641 for XGBoost, GBRT, and RF, respectively. For TN estimation, the single models produced R² values of 0.636, 0.645, and 0.629, RMSE values of 0.602, 5.381, and 5.498, and MAE values of 0.360, 3.225, and 3.265, respectively. Overall, the ensemble models outperformed the single models. The auto-weighted demonstrated the best performance (SOC: R²_test=0.887 9, RMSE=4.607 9, MAE=2.948 2; TN: R²_test=0.775 8, RMSE=4.330 8, MAE=2.418 6), followed by blending (SOC: R²_test=0.848 7, RMSE=5.107 2, MAE=2.991 9; TN: R²_test=0.734 6, RMSE=4.576 2, MAE=2.337 3). SHAP analysis revealed stable positive contributions from precipitation and vegetation indices, negative contributions from temperature factors such as minimum temperature, and prominent contributions from soil properties including cation exchange capacity (CEC) and the proportions of clay and silt. Spatially, areas with high SOC and TN values were mainly distributed in mountainous regions characterized by relatively sufficient moisture, lower temperatures, and better vegetation coverage. In contrast, low-value areas were concentrated at oasis margins and desert transition zones. Conclusion The integration of tree-based ensemble modeling and SHAP interpretation enables highly accurate, robust, and interpretable regional mapping of SOC and TN. This approach provides a quantitative basis for carbon and nitrogen assessment and zonal management in arid-semiarid transition zones.
WADOUXA M J C, MINASNYB, MCBRATNEYA B. Machine learning for digital soil mapping: Applications, challenges and suggested solutions[J].Earth-Science Reviews,2020,210:e103359.
[2]
POGGIOL, DE SOUSAL M, BATJESN H, et al. SoilGrids 2.0: Producing soil information for the globe with quantified spatial uncertainty[J].Soil,2021,7(1):217-240.
[3]
YUW P, ZHOUW, WANGT, et al. Significant improvement in soil organic carbon estimation using data-driven machine learning based on habitat patches[J].Remote Sensing,2024,16(4):e688.
YANK, YANGH M, WANGD C. Digital mapping of forest soil organic carbon based on NDVI time series features: A case study of Jiyuan Nanshan forest farm[J].Chinese Journal of Soil Science,2024,55(4):921-931.
[6]
RUNNINGS W, NEMANIR R, HEINSCHF A, et al. A continuous satellite-derived measure of global terrestrial primary production[J].BioScience,2004,54(6):547-560.
[7]
WEREK, BUIT D, DICKB Ø, et al. A comparative assessment of support vector regression, artificial neural networks, and random forests for predicting and mapping soil organic carbon stocks across an Afromontane landscape[J].Ecological Indicators,2015,52:394-403.
ZHOUY, ZHAOX M, GUOX. Prediction of total nitrogen distribution in surface soil based on multi-source auxiliary variables and random forest approach[J].Acta Pedologica Sinica,2022,59(2):451-460.
LIUZ F, LEIH C, SHENGH Y. Remote sensing inversion of soil nutrient on farmland in Huangshui River basin based on XGBoost model[J].Arid Land Geography,2023,46(10):1643-1653.
CAOJ X, CHENS Y, XIAOB Y, et al. Machine learning based diagenetic facies logging identification: A case of Shaximiao Formation in central Sichuan basin[J].Science Technology and Engineering,2025,25(21):8858-8870.
WANGZ Y, WANGD, QIUK F, et al. Applications and perspectives of machine learning in geochemical big data mining of minerals and rocks[J].Journal of Chengdu University of Technology (Science and Technology Edition),2025,52(5):844-858.
LIAOY, YANJ P, LIAOM J, et al. A novel method for lithofacies prediction in shale gas reservoirs that integrates traditional machine learning and deep learning techniques: A case study of the Lower Cambrain Qiongzhusi Formation in Sichuan basin[J].Journal of Palaeogeography,2026,28(1):353-368.
TIANL J, LIUQ H. Research on computer network traffic prediction model based on deep learning[J].Journal of Hebei Energy Institute of Vocation and Technology,2025,25(3):60-63.
WANGX Y, LIAOG Z, HUANGW S, et al. Evaluation method of total organic carbon content in shale based on machine learning[J].Petroleum Science Bulletin,2025,10(2):392-403.
CUIY W, LIS, CHANGY Y, et al. Research on impacts of multi-scenario oasification on carbon reserves in Hexi inland river basin[J].Environmental Science and Technology,2025,48(9):221-236.
SUNJ J, HEY X, CHENY L, et al. Research progress and prospects of soil carbon sequestration effects of biochar[J].Acta Pedologica Sinica,2026,63(1)53-64.
CUIX R, ZHANGC L, LIQ, et al. Distribution characteristics of soil organic carbon density in Beijing-Tianjin sandstorm source control project area[J].Journal of Soil and Water Conservation,2025,39(6):281-289.
CHENX W, XUNJ C, LIUC Y, et al. Long-term evolution of soil conservation and its climatic spatio-temporal response mechanism in geomorphologically sensitive areas: A case of Shanxi Province[J].Hubei Agricultural Sciences,2025,64(9):27-35.
TANGX B, HUANGY W, SUH. Construction and driving factors analysis of a machine learning-based prediction model for net carbon sink in Chinese agriculture[J/OL].Environmental Science,2025.
GONGH, DINGG D, LIUH, et al. Spatiotemporal patterns and driving factors of vegetation coverage in Tibet from 2000—2022[J/OL]. Environmental Science,2025.
SHIB L, SHENY J, PENGJ B, et al. Bidirectional replenishment characteristics and evolution process of soil nutrients in mountainous areas[J].Journal of Earth Sciences and Environment,2025,47(4):780-793.
DIAOE L, CAOG C, CAOS K, et al. Soil carbon and nitrogen content and path analysis under different land use patterns on the southern slope of Qilian Mountains[J].Arid Zone Research,2021,38(5):1346-1354.
TONGS, CAOG C, ZHANGZ, et al. Analysis of spatial heterogeneity and influencing factors of soil total carbon and nitrogen: Take the upper reaches of Heihe River on southern slope of Qilian Mountain as an example[J].Soils,2022,54(5):1064-1072.
SONGW J, LIANGY Z, TAOZ, et al. Advances on soil organic carbon dynamics mediated by microorganisms[J].Advances in Earth Science,2023,38(12):1213-1223.
DENGL, LIJ W, QUQ, et al. Dynamics and driving mechanisms of soil organic carbon sequestration in grasslands after grazing exclu-Sion: A review[J].Chinese Journal of Applied Ecology,2024,35(11):3208-3216.
QIY J, HUANGJ Q, LIW W, et al. Research progress on driving mechanism of soil organic carbon change based on hydraulic erosion process[J].Chinese Journal of Soil Science,2023,54(5):1196-1204.
ZHANGP, DUY H, ZHOUB F, et al. Risk prediction method of typical property crime based on feature selection method and gradient boosting decision tree[J].Journal of People′s Public Security University of China (Science and Technology),2025,31(3):38-50.
ZHENGX N, YUY, PANH, et al. Load distribution for hydroelectric units based on Stacking ensemble learning[J].Journal of Drainage and Irrigation Machinery Engineering,2025,43(10):1040-1048.
ZENGL, XIEY H, ZHANGS Z, et al. Research on fusion prediction model of soft rock embankment subsidence based on stacked generalization integration algorithm[J].Journal of Hunan University (Natural Sciences),2025,52(9):125-138.