[en] Rapid and cost-effective estimation of soil total nitrogen (TN) is essential for soil fertility assessment and nutrient management. However, the performance of laboratory visible–near-infrared (Vis–NIR) models is shaped not only by preprocessing and modeling strategy but also by sample preparation and the soil’s compositional background. In this study, TN prediction was evaluated using 376 topsoil samples from two contrasting datasets: Mollisols from the black-soil region of Northeast China and Ultisols from Qiyang County, Hunan Province, southern China. Spectra acquired over 350–2500 nm for three particle-size fractions were preprocessed using Savitzky–Golay smoothing combined with standard normal variate (SNV), first-derivative, or second-derivative transformations, and modeled using partial least squares regression (PLSR), support vector regression (SVR), and extreme gradient boosting (XGBoost). Model development used a 5 × 5 nested cross-validation followed by evaluation on a sample-grouped held-out test set. Among all combinations, XGBoost with first-derivative preprocessing on the 0.25 mm fraction produced the best performance, with test R2 values of 0.91 for Mollisol and 0.78 for Ultisol. Shapley additive explanations (SHAP) and principal component analysis (PCA) consistently identified informative spectral regions at 430–480 and 1330–1450 nm for Mollisol and at 585–635, 820–900, and 2180–2240 nm for Ultisol. Prediction errors were larger in the sampled Ultisol dataset and increased with DCB-extractable Fe and mineral backgrounds. A second-stage log-domain residual correction incorporating ancillary soil properties further reduced the Ultisol RMSE from 0.30 to 0.27 g kg−1. These findings support the 0.25 mm, first-derivative, XGBoost workflow as a robust laboratory Vis–NIR approach for TN prediction and indicate that composition-aware residual correction can improve prediction in oxide- and mineral-rich soils.
Disciplines :
Agriculture & agronomy
Author, co-author :
Huai, Shengchang ; Université de Liège - ULiège > TERRA Research Centre > Echanges Eau - Sol - Plantes ; Institute of Agricultural Resources and Regional Planning, Chinese Academy of Agricultural Sciences, Beijing, China ; State Key Laboratory of Nutrient Use and Management, Key Laboratory of Wastes Matrix Utilization, Ministry of Agriculture and Rural Affairs, Institute of Agricultural Resources and Environment, Shandong Academy of Agricultural Sciences, Jinan, China
Zhang, Qingyue; Institute of Agricultural Resources and Regional Planning, Chinese Academy of Agricultural Sciences, Beijing, China
Jin, Yuwen; Institute of Agricultural Resources and Regional Planning, Chinese Academy of Agricultural Sciences, Beijing, China
Tian, Shenzhong ; State Key Laboratory of Nutrient Use and Management, Key Laboratory of Wastes Matrix Utilization, Ministry of Agriculture and Rural Affairs, Institute of Agricultural Resources and Environment, Shandong Academy of Agricultural Sciences, Jinan, China
Chen, Yueming; State Key Laboratory of Nutrient Use and Management, Key Laboratory of Wastes Matrix Utilization, Ministry of Agriculture and Rural Affairs, Institute of Agricultural Resources and Environment, Shandong Academy of Agricultural Sciences, Jinan, China
Guan, Xilin ; State Key Laboratory of Nutrient Use and Management, Key Laboratory of Wastes Matrix Utilization, Ministry of Agriculture and Rural Affairs, Institute of Agricultural Resources and Environment, Shandong Academy of Agricultural Sciences, Jinan, China
Sun, Tao ; State Key Laboratory of Nutrient Use and Management, Key Laboratory of Wastes Matrix Utilization, Ministry of Agriculture and Rural Affairs, Institute of Agricultural Resources and Environment, Shandong Academy of Agricultural Sciences, Jinan, China
Lv, Shenqiang; State Key Laboratory of Nutrient Use and Management, Key Laboratory of Wastes Matrix Utilization, Ministry of Agriculture and Rural Affairs, Institute of Agricultural Resources and Environment, Shandong Academy of Agricultural Sciences, Jinan, China
Zhao, Zichao; State Key Laboratory of Nutrient Use and Management, Key Laboratory of Wastes Matrix Utilization, Ministry of Agriculture and Rural Affairs, Institute of Agricultural Resources and Environment, Shandong Academy of Agricultural Sciences, Jinan, China
Yu, Weijia ; Institute of Crop Germplasm Resources, Shandong Academy of Agricultural Sciences, Jinan, China
Li, Ran; Beijing Engineering Research Centre for Ecological Restoration and Carbon Fixation of Saline–Alkaline and Desert Land, Department of Energy and Power Engineering, Tsinghua University, Beijing, China
Colinet, Gilles ; Université de Liège - ULiège > TERRA Research Centre > Echanges Eau - Sol - Plantes
Lu, Changai ; Institute of Agricultural Resources and Regional Planning, Chinese Academy of Agricultural Sciences, Beijing, China
Gao, Xinhao; State Key Laboratory of Nutrient Use and Management, Key Laboratory of Wastes Matrix Utilization, Ministry of Agriculture and Rural Affairs, Institute of Agricultural Resources and Environment, Shandong Academy of Agricultural Sciences, Jinan, China
Ministry of Science and Technology of the People's Republic of China. National Key Research and Development Program
Funding text :
This research was funded by the Mechanism of Soil Spectral Response in Complex Environments and Field Validation (CAAS-CSAL-202402), the National Key Research and Development Program of China (2022YFD1500100), and the Key R&D Program of Shandong Province, China
(2024SFGC0405).
Stenberg B. Viscarra Rossel R.A. Mouazen A.M. Wetterlind J. Visible and Near Infrared Spectroscopy in Soil Science Adv. Agron. 2010 107 163 215 10.1016/S0065-2113(10)07005-7
Nocita M. Stevens A. van Wesemael B. Aitkenhead M. Bachmann M. Barthès B. Dor E.B. Brown D.J. Clairotte M. Csorba A. et al. Soil Spectroscopy: An Alternative to Wet Chemistry for Soil Monitoring Adv. Agron. 2015 132 139 159 10.1016/bs.agron.2015.02.002
Erebara A. Kopali A. Shallari S. Di Iorio E. Manzo A. Longobardi E. Napoletano P. De Marco A. Colombo C. Pedological features affecting carbon accumulation in submerged-soils sequence assessed with Vis-NIR spectroscopy in a coastal wetland in Albania Catena 2025 257 109187 10.1016/j.catena.2025.109187
Soriano-Disla J.M. Janik L.J. Viscarra Rossel R.A. Macdonald L.M. McLaughlin M.J. The Performance of Visible, Near-, and Mid-Infrared Reflectance Spectroscopy for Prediction of Soil Physical, Chemical, and Biological Properties Appl. Spectrosc. Rev. 2014 49 139 186 10.1080/05704928.2013.811081
Rinnan Å. van den Berg F. Engelsen S.B. Review of the most common pre-processing techniques for near-infrared spectra TrAC Trends Anal. Chem. 2009 28 1201 1222 10.1016/j.trac.2009.07.007
Yun Y.H. Li H.D. Deng B.C. Cao D.S. An overview of variable selection methods in multivariate analysis of near-infrared spectra TrAC Trends Anal. Chem. 2019 113 102 115 10.1016/j.trac.2019.01.018
Viscarra Rossel R.A. Behrens T. Using data mining to model and interpret soil diffuse reflectance spectra Geoderma 2010 158 46 54 10.1016/j.geoderma.2009.12.025
Clingensmith C.M. Grunwald S. Predicting Soil Properties and Interpreting Vis-NIR Models from across Continental United States Sensors 2022 22 3187 10.3390/s22093187 35590876
Lundberg S.M. Erion G. Chen H. DeGrave A. Prutkin J.M. Nair B. Katz R. Himmelfarb J. Bansal N. From Local Explanations to Global Understanding with Explainable AI for Trees Nat. Mach. Intell. 2020 2 56 67 10.1038/s42256-019-0138-9
Ben-Dor E. Ong C. Lau I.C. Reflectance measurements of soils in the laboratory: Standards and protocols Geoderma 2015 245–246 112 124 10.1016/j.geoderma.2015.01.002
Coutinho M.A.N. Alari F.D.O. Ferreira M.M.C. do Amaral L.R. Influence of soil sample preparation on the quantification of NPK content via spectroscopy Geoderma 2019 338 401 409 10.1016/j.geoderma.2018.12.021
Varma S. Simon R. Bias in error estimation when using cross-validation for model selection BMC Bioinform. 2006 7 91 10.1186/1471-2105-7-91
Krstajic D. Buturovic L.J. Leahy D.E. Thomas S. Cross-validation pitfalls when selecting and assessing regression and classification models J. Cheminformatics 2014 6 10 10.1186/1758-2946-6-10
Minasny B. McBratney A.B. Bellon-Maurel V. Roger J.-M. Gobrecht A. Ferrand L. Joalland S. Removing the effect of soil moisture from NIR diffuse reflectance spectra for the prediction of soil organic carbon Geoderma 2011 167–168 118 124 10.1016/j.geoderma.2011.09.008
Sherman D.M. Waite T.D. Electronic spectra of Fe3+ oxides and oxide hydroxides in the near IR to near UV Am. Mineral. 1985 70 1262 1269
Scheinost A.C. Chavernas A. Barrón V. Torrent J. Use and limitations of second-derivative diffuse reflectance spectroscopy in the visible to near-infrared range to identify and quantify Fe oxide minerals in soils Clays Clay Miner. 1998 46 528 536 10.1346/CCMN.1998.0460506
Viscarra Rossel R.A. Walvoort D.J.J. McBratney A.B. Janik L.J. Skjemstad J.O. Visible, near infrared, mid infrared or combined diffuse reflectance spectroscopy for simultaneous assessment of various soil properties Geoderma 2006 131 59 75 10.1016/j.geoderma.2005.03.007
Soil Survey Staff Keys to Soil Taxonomy 13th ed. U.S. Department of Agriculture, Natural Resources Conservation Service Washington, DC, USA 2022
Pribyl D.W. A critical review of the conventional SOC to SOM conversion factor Geoderma 2010 156 75 83 10.1016/j.geoderma.2010.02.003
Moore D.M. Reynolds R.C. Jr. X-Ray Diffraction and the Identification and Analysis of Clay Minerals 2nd ed. Oxford University Press Oxford, UK 1997
Rietveld H.M. A profile refinement method for nuclear and magnetic structures J. Appl. Crystallogr. 1969 2 65 71 10.1107/S0021889869006558
Mehra O.P. Jackson M.L. Iron oxide removal from soils and clays by a dithionite-citrate system buffered with sodium bicarbonate Clays and Clay Minerals: Proceedings of the Seventh National Conference on Clays and Clay Minerals Pergamon Press Oxford, UK 1960 317 327
United States Environmental Protection Agency SW-846 Test Method 6010D: Inductively Coupled Plasma-Optical Emission Spectrometry (ICP-OES). Revision 5 U.S. Environmental Protection Agency Washington, DC, USA 2018
Savitzky A. Golay M.J.E. Smoothing and differentiation of data by simplified least squares procedures Anal. Chem. 1964 36 1627 1639 10.1021/ac60214a047
Barnes R.J. Dhanoa M.S. Lister S.J. Standard normal variate transformation and de-trending of near-infrared diffuse reflectance spectra Appl. Spectrosc. 1989 43 772 777 10.1366/0003702894202201
Wold S. Sjöström M. Eriksson L. PLS-regression: A basic tool of chemometrics Chemom. Intell. Lab. Syst. 2001 58 109 130 10.1016/S0169-7439(01)00155-1
Smola A.J. Schölkopf B. A tutorial on support vector regression Stat. Comput. 2004 14 199 222 10.1023/B:STCO.0000035301.49549.88
Chen T. Guestrin C. XGBoost: A scalable tree boosting system Proceedings of the 22nd ACM SIGKDD International Conference on Knowledge Discovery and Data Mining San Francisco, CA, USA 13–17 August 2016 785 794 10.1145/2939672.2939785
Jolliffe I.T. Cadima J. Principal component analysis: A review and recent developments Philos. Trans. R. Soc. A 2016 374 20150202 10.1098/rsta.2015.0202
Lundberg S.M. Erion G.G. Lee S.I. Consistent Individualized Feature Attribution for Tree Ensembles arXiv 2018 10.48550/arXiv.1802.03888 1802.03888
Brunet D. Barthès B.G. Chotte J.L. Feller C. Determination of carbon and nitrogen contents in Alfisols, Oxisols and Ultisols from Africa and Brazil using NIRS analysis: Effects of sample grinding and set heterogeneity Geoderma 2007 139 106 117 10.1016/j.geoderma.2007.01.007
Martín-Fernández J.A. Barceló-Vidal C. Pawlowsky-Glahn V. Dealing with zeros and missing values in compositional data sets using nonparametric imputation Math. Geol. 2003 35 253 278 10.1023/A:1023866030544
Recha J.W. Olale K.O. Sila A. Ambaw G. Radeny M. Solomon D. Ensemble Modeling on Near-Infrared Spectra as Rapid Tool for Assessment of Soil Health Indicators for Sustainable Food Production Systems Soil. Syst. 2021 5 69 10.3390/soilsystems5040069
Seidel M. Hutengs C. Ludwig B. Thiele-Bruhn S. Vohland M. Strategies for the efficient estimation of soil organic carbon at the field scale with vis-NIR spectroscopy: Spectral libraries and spiking vs. local calibrations Geoderma 2019 354 113856 10.1016/j.geoderma.2019.07.014
St. Luce M. Ziadi N. Viscarra Rossel R.A. GLOBAL-LOCAL: A new approach for local predictions of soil organic carbon content using large soil spectral libraries Geoderma 2022 425 116048 10.1016/j.geoderma.2022.116048