Xin
Feng
b,
Xiaoyuan
Ma
a,
Hongwei
Yang
*b and
Jing
Zhang
b
aSchool of Computer Science and Technology, Changchun University of Science and Technology, Changchun, China. E-mail: xiaoyuanma.cust@gmail.com
bChangchun University of Science and Technology, Changchun, China. E-mail: yanghongwei@cust.edu.cn; fengxin@cust.edu.cn; zhang_jing@cust.edu.cn
First published on 1st December 2025
Rapid and accurate estimation of soil nutrient content is essential for assessing soil fertility, facilitating sustainable nutrient management, and optimizing crop productivity. However, the high dimensionality of spectral data and the limitations of one-dimensional prediction models hinder prediction accuracy and efficiency. We propose a lightweight two-dimensional convolutional neural network, 2D-CTM-CNN, which integrates data compression and reconstruction to solve these problems. The framework transforms one-dimensional visible–near-infrared (VNIR) spectra into a two-dimensional representation and employs a Shapley-weighted 2D-CNN to predict nitrogen (N) and soil organic carbon (SOC). Comparative experiments against partial least squares regression (PLSR), a 1D-CNN, and two state-of-the-art 2D-CNN approaches (2D-GASF-CNN and 2D-MTF-CNN) demonstrate that 2D-CTM-CNN achieves superior performance, with relative prediction deviation (RPD) values exceeding 4 for both N and SOC. Relative to the 1D-CNN, R2 improved by 5.68% for N and 5.56% for SOC, while spectral dimensionality was reduced from 4200 to 54, substantially enhancing computational efficiency. These findings highlight the effectiveness of 2D-CTM-CNN for high-precision soil nutrient prediction, offering a scalable and efficient solution for advancing precision agriculture.
Visible–near-infrared (VNIR) spectroscopy has emerged as a widely accepted alternative owing to its simplicity, non-destructiveness, speed, and environmental friendliness.5,6 VNIR spectra, covering the 400–2500 nm range, capture distinct reflectance and absorption characteristics that form the basis for quantitative soil nutrient estimation. Nevertheless, the wide spectral range introduces challenges such as high dimensionality, spectral overlap, multicollinearity, and non-linear relationships with soil nutrients.7,8 Traditional modeling approaches, though effective to some degree, struggle to achieve robust and generalized predictions under such complexity. Moreover, linear dimensionality reduction techniques such as PCA often eliminate critical non-linear information, thereby limiting the performance of subsequent models.9
Deep learning (DL) provides superior computational efficiency and representation capability, particularly through hierarchical feature extraction that can capture complex non-linear patterns in spectral data.9 Among DL methods, convolutional neural networks (CNNs) are widely used and have demonstrated strong potential in agricultural applications. Veres et al. first applied CNNs to soil spectral data, confirming their feasibility for soil property evaluation10. Padarian et al. showed that multitask CNNs improved prediction accuracy for large-scale datasets,11 while Rashid et al. reported that CNN outperformed other architectures such as LSTM in predicting soil cadmium content.12 Despite the strong performance of 1D-CNNs, their limited structural representation restricts their ability to capture complex spectral patterns. In contrast, 2D-CNNs excel in image recognition tasks due to their ability to effectively model two-dimensional spatial structures.13,14 Converting one-dimensional spectra into two-dimensional representations is therefore considered a promising approach for improving feature expressiveness and prediction accuracy.
Recent studies have explored various 1D-to-2D spectral transformation methods to enhance soil property prediction. Yue et al. employed the Gramian Angular Field (GAF) to convert spectral data into 2D images, enabling CNNs to capture geo-spectral features more effectively.15 Wang et al. utilized Markov Transition Field (MTF) encoding with 2D-CNNs to predict aflatoxin B1 content in maize, achieving superior performance to 1D-CNNs.8 Deng et al. transformed fishing vessel profile data into 2D time-series images via the Gramian Angular Summation Field (GASF), yielding better classification accuracy than 1D-CNNs.16 Tang et al. proposed SOCNet, a deep learning framework leveraging Spectral-to-Image Transformation (SIT) for SOC prediction, while Peng et al. confirmed the effectiveness of 2D spectral representations in classifying milk freshness, outperforming traditional LDA and SVM methods.17,18 These studies demonstrate that 2D transformations can significantly enhance the representational capacity of spectral data and improve predictive performance. Nonetheless, the computational efficiency of these approaches decreases when applied to high-dimensional spectra, underscoring the need for lightweight frameworks that balance feature compression with predictive accuracy.
To provide an overview of existing approaches, Table 1 summarizes commonly used methods for VNIR-based soil nutrient prediction and their respective advantages and limitations. Building upon these insights, this study proposes 2D-CTM-CNN, a lightweight two-dimensional CNN framework that integrates data compression and reconstruction. The model transforms VNIR spectra into 2D representations while effectively reducing dimensionality and retaining critical information. Its performance is benchmarked against partial least squares regression (PLSR), 1D-CNN, and two 2D-CNN variants (2D-GASF-CNN and 2D-MTF-CNN) in terms of accuracy, robustness, and computational efficiency, thereby demonstrating the improvements achieved by the proposed method.
| Category | Name | Advantages | Limitations | Improvements |
|---|---|---|---|---|
| Traditional method | Chemical titration | High accuracy | Time-consuming | — |
| Linear model | PLSR | Fast, simple, interpretable | Sensitive to noise, limited in capturing non-linear relationships | Combine with hybrid models |
| ML model | RF | Non-linear modeling capacity, robust to noise | Overfit with small samples, poor interpretability | Optimize hyperparameters, feature reduction |
| SVM | Handles high dimensional data, good generalisation | Hyperparameter selection, high computational cost | Use efficient kernels | |
| DL model | 1D-CNN | Automatic feature extraction | Complex hyperparameter tuning | Incorporate attention mechanisms |
| 2D-CNN | Spatial feature learning | High computational cost | Use lightweight networks | |
| 2D-CTM-CNN | Fast modeling, high accuracy, simple | Needs further validation | Efficient hyperparameter selection |
This study used 1665 Finnish soil samples from the LUCAS dataset. The dataset is randomly divided into training, validation, and test sets in a ratio of 6
:
2
:
2. Each sample includes VNIR spectral data ranging from 400 to 2500 nm, with 0.5 nm intervals, yielding 4200 wavelength points per sample. The high spectral resolution provides rich and detailed information for model training and prediction.
The proposed 2D-CTM-CNN model integrates an extreme compression strategy driven by spectral characteristics that efficiently reduce the dimensionality of spectral data. This step automatically selects key spectral points that represent the overall trend and non-linear variations of the original spectral data, enabling substantial dimensionality reduction while preserving important information. Unlike traditional dimensionality reduction methods, this step requires no predefined parameters such as compression ratios or the number of retained features. Therefore, this step eliminates manual intervention, reduces model complexity, and enhances automation and reproducibility by avoiding time-consuming parameter tuning.
The mean vector Spectrumj reflects the global trend of the training dataset, while its peak and valley points correspond to significant trend changes. Thus, these points are used as segmentation locations, dividing the original spectral data into multiple subsegments. Moreover, the data within each subsegment show a consistent directional change, making it easier for the following model to learn the inherent patterns. The equation of Spectrumj is as follows:
![]() | (1) |
After segmentation, it is necessary to select spectral points that can effectively preserve the key information of the original spectral data. For each subsegment, the first and last points are designated as x0 and xn, which are retained as compressed spectral features.
![]() | (2) |
Moreover, the normalization operation24 is applied after the generation of the 2D data, constraining all the pixel values to [0, 1]. This not only improves the numerical stability of the transformed data and mitigates the influence of outliers during model training, but also provides compact and representative inputs for the subsequent 2D-CNN model, thereby improving both prediction efficiency and prediction performance.
Although the two-dimensional convolution network is effective in extracting local structural features, it fails to distinguish the relative importance of different regions during feature integration. Since different spectral bands contain varying levels of information related to soil nutrients, the conventional convolution structure treats all regions equally due to weight sharing, lacking the ability to highlight the importance of these vital regions in soil spectral data. To overcome this limitation, this paper introduces a two-dimensional weighting layer based on the Shapley value22 to enhance the model's ability to focus on the important spectral regions. This layer adaptively adjusts the contribution of different feature regions to the final prediction, enabling the model to focus more effectively on the most relevant spectral regions and thereby improving the prediction accuracy. Furthermore, the Shapley value calculation is independent of the subsequent prediction model and only considers the contribution of each feature to the prediction objective, allowing for a more objective evaluation that is not affected by training data bias. To ensure compatibility with the convolutional neural network, this study employs a CNN-based approach to compute the marginal contributions of regions after extracting their local features.
The Shapley value, originating from cooperative game theory, provides a fair and interpretable means of attributing the contribution of individual features to the overall outcome. It can accurately quantify the marginal contribution of each region to the final prediction,25 enabling balanced and transparent feature weighting. In addition to enhancing interpretability by clarifying each feature's influence on prediction outcomes,26 the Shapley value also strengthens the two-dimensional weighting layer to assign differentiated importance to various feature regions. The formulation for computing the Shapley value is provided in eqn (3).
![]() | (3) |
In this study, a 2D-CNN framework is employed for modeling, integrating conventional convolutional, batch normalization, activation, pooling, and fully connected layers, along with a dynamic weighting layer based on Shapley values. Specifically, the Shapley-based weighting layer is placed before the convolutional operation to adaptively reweight the input spectral features according to their global importance. The convolutional layers utilize sliding kernels to extract spatial relationships and local features from spectral maps, learning region-level combinations and capturing local variations across spectral bands. The batch layer performs normalization on each layer to accelerate the training process, enhancing data stability and alleviating the problem of gradient explosion. The activation layer introduces non-linear feature expression capability to allow the model to capture the complex relationships in the spectral data and enhance the prediction capability. The pooling layers reduce the spatial dimensionality through a downsampling strategy and retain the important features of the data in order to improve computational efficiency and prevent overfitting. Moreover, the Shapley-based weighting layer dynamically identifies and emphasizes important spectral regions, facilitating more focused feature learning. The fully connected layers integrate extracted local features to produce final predictions. During training, the back-propagation algorithm is used to update the model parameters by minimizing the mean squared error (MSE) (eqn (4)),27 which measures the discrepancy between the output of the predicted values and actual nutrient content. Through iterative gradient descent, the model gradually reduces prediction error and achieves automatic feature extraction and regression. Additionally, the Adam optimizer28 is adopted to accelerate convergence and enhance training stability. The network structure is shown in Fig. 3.
![]() | (4) |
| Category | Methods | Data |
|---|---|---|
| Linear model | PLSR | VNIS |
| 1D-CNN | 1D-CNN | VNIS |
| 1D-CNN | Compressed VNIS | |
| 1D-CNN | CARS selected features | |
| 2D-CNN | 2D-GASF-CNN | Compressed VNIS |
| 2D-Markov-CNN | Compressed VNIS | |
| 2D-CTM-CNN | Compressed VNIS |
To evaluate the effectiveness of the 2D-CTM-CNN model proposed in this study, the 1D convolutional neural network is used as a comparative model. Both the raw VNIS spectral data and the compressed VNIS spectral data are modeled and predicted using 1D-CNN. This comparison is intended to validate whether the extreme compression step leads to significant information loss in the spectral data and compromises the prediction accuracy of the model. The parameters of the designed 1D-CNN model are shown in Tables 3 and 4, respectively.
| Layer | Input size | Kernel | Activation | Output size | Parameters |
|---|---|---|---|---|---|
| Conv1 | (32, 1, 4200) | 3 | ReLU | (32, 32, 4198) | 128 |
| MaxPool1 | (32, 32, 4198) | 3 | — | (32, 64, 1399) | 0 |
| Conv2 | (32, 64, 1399) | 3 | ReLU | (32, 64, 1397) | 6208 |
| MaxPool2 | (32, 64, 1397) | 3 | — | (32, 64, 465) | 0 |
| Conv3 | (32, 64, 465) | 3 | ReLU | (32, 64, 463) | 12 352 |
| MaxPool3 | (32, 64, 463) | 3 | — | (32, 64, 154) | 0 |
| Conv4 | (32, 64, 154) | 3 | ReLU | (32, 64, 152) | 12 352 |
| MaxPool4 | (32, 64, 152) | 2 | — | (32, 64, 76) | 0 |
| Flatten | (32, 64, 76) | — | — | (32, 4864) | 0 |
| FC1 | (32, 4864) | — | — | (32, 128) | 622 720 |
| FC2 | (32, 128) | — | — | (32, 64) | 8256 |
| FC3 | (32, 64) | — | — | (32, 1) | 65 |
| Layer | Input size | Kernel | Activation | Output size | Parameters |
|---|---|---|---|---|---|
| Conv1 | 32 × 1 × 54 | 3 | ReLU | 32 × 32 × 52 | 128 |
| MaxPool1 | 32 × 32 × 52 | 3 | — | 32 × 32 × 17 | 0 |
| Conv2 | 32 × 32 × 17 | 3 | ReLU | 32 × 32 × 15 | 6208 |
| MaxPool2 | 32 × 32 × 15 | 3 | — | 32 × 64 × 5 | 0 |
| Flatten | 32 × 64 × 5 | — | — | 32 × 320 | 0 |
| FC1 | 32 × 320 | — | — | 32 × 128 | 41 168 |
| FC2 | 32 × 128 | — | — | 32 × 64 | 8256 |
| FC3 | 32 × 64 | — | — | 32 × 1 | 65 |
![]() | (5) |
denotes the normalised time series satisfying
i ∈ [−1, 1], and φi = cos−1(
i) denotes the conversion of the normalised values into angles.![]() | (6) |
| Layer | Input size | Kernel | Activation | Output size | Parameters |
|---|---|---|---|---|---|
| Conv1 | 32 × 1 × 54 × 54 | 3 × 3 | ReLU | 32 × 32 × 52 × 52 | 2916 |
| MaxPool1 | 32 × 32 × 52 × 52 | 2 × 2 | — | 32 × 32 × 26 × 26 | 0 |
| Conv2 | 32 × 32 × 26 × 26 | 3 × 3 | ReLU | 32 × 32 × 24 × 24 | 18 496 |
| MaxPool2 | 32 × 32 × 24 × 24 | 2 × 2 | — | 32 × 32 × 12 × 12 | 0 |
| Conv3 | 32 × 32 × 12 × 12 | 3 × 3 | ReLU | 32 × 32 × 10 × 10 | 73 856 |
| MaxPool3 | 32 × 32 × 10 × 10 | 2 × 2 | — | 32 × 32 × 5 × 5 | 0 |
| Flatten | 32 × 128 × 5 × 5 | — | — | 32 × 3200 | 0 |
| FC1 | 32 × 3200 | — | — | 32 × 1600 | 5 121 600 |
| FC2 | 32 × 1600 | — | — | 32 × 256 | 409 856 |
| FC3 | 32 × 256 | — | — | 32 × 64 | 16 448 |
| FC4 | 32 × 64 | — | — | 32 × 1 | 65 |
![]() | (7) |
![]() | (8) |
![]() | (9) |
![]() | (10) |
| Property | Set | RMSE | R 2 | MAE | RPD |
|---|---|---|---|---|---|
| SOC | Training | 50.64 | 0.86 | 37.83 | 2.74 |
| Test | 47.47 | 0.87 | 34.96 | 2.79 | |
| N | Training | 2.24 | 0.86 | 1.52 | 2.66 |
| Test | 2.20 | 0.85 | 1.51 | 2.59 |
The 1D-CNN model structure used in this experiment consists of three convolutional layers stacked alternately with a pooling layer, followed by the fully connected layer to complete the regression task, in which the hyperparameters such as convolutional kernel size, the number of layers, and the activation function are tuned using stochastic search, Bayesian optimization, etc. Additionally, the training process uses the MSE27 as the loss function and selects the Adam optimizer to facilitate efficient convergence. To prevent overfitting, a dropout layer is introduced into the models and the early stopping strategy is incorporated.
The dimensionality of the spectral data is reduced from 4200 to 54 after the extreme spectral compression step, retaining only 1.29% of the original spectral dimensionality. Nevertheless, the prediction accuracy of the SOC and N does not differ by more than 1%. Compared to the PLSR prediction model, the R2 values of the compressed spectral data prediction model increase by about 3.45% and 4.71%, respectively. Moreover, the RMSE values of SOC and N are reduced by 6.88% and 8.18%, respectively, while the MAE values are reduced by 16.73% and 12.58%, respectively. The PRD increases to more than 3, which indicates that the model has excellent predictive capability. Moreover, a 1D-CNN model based on the CARS feature extraction method is developed for comparison, with the number of sampling iterations set to 50. After CARS-based selection, the number of spectral variables for N is reduced from 4200 to 201 and for SOC from 4200 to 179. The corresponding prediction results are all shown in Table 7. These experimental results demonstrate that the proposed extreme compression step enables simple and effective dimensionality reduction while preserving the essential spectral information necessary for accurate prediction. Furthermore, the 1D-CNN model outperforms the traditional PLSR method, offering superior feature extraction and modeling capabilities, showing that the CNN models are more suitable for predicting soil nutrients.
| Model | Property | Set | RMSE | R 2 | MAE | RPD |
|---|---|---|---|---|---|---|
| a 4200 and 54 are the dimensionality of spectral data. | ||||||
| 1D-CNN (4200a) | N | Training | 1.92 | 0.89 | 1.28 | 2.92 |
| Test | 2.02 | 0.88 | 1.32 | 2.85 | ||
| SOC | Training | 43.64 | 0.90 | 29.11 | 3.41 | |
| Test | 44.21 | 0.90 | 29.11 | 3.32 | ||
| 1D-CNN (54a) | N | Training | 2.07 | 0.88 | 1.38 | 2.81 |
| Test | 2.31 | 0.87 | 1.51 | 2.77 | ||
| SOC | Training | 53.32 | 0.88 | 34.52 | 2.88 | |
| Test | 51.11 | 0.89 | 32.93 | 3.01 | ||
| 1D-CNN (CARS) | N | Training | 2.18 | 0.86 | 1.36 | 2.72 |
| Test | 2.69 | 0.81 | 1.70 | 2.30 | ||
| SOC | Training | 57.24 | 0.86 | 35.25 | 2.70 | |
| Test | 63.91 | 0.83 | 38.95 | 2.41 | ||
The heat map is a graphical representation of the matrix data, where different color gradients are used to convey the magnitude or intensity of individual values across the matrix.42 From the visual analysis of the heat maps produced by the three transformation methods, it can be observed that each exhibits a certain degree of symmetry. This symmetry implies that the similarity between any two spectral points is preserved bidirectionally, forming a structured pattern that facilitates feature extraction by convolutional neural networks. However, the heat map obtained by the MTF method displays a distinctly block-like and segmented appearance. It lacks smooth transitions and exhibits an interlaced color pattern with weak continuity, making it difficult to capture subtle variations in the spectral data.
This phenomenon may be due to the significant reduction in dimensionality by the extreme compression, resulting in the increase in the probability of the data state transfer and thus affecting the distribution of the converted data. In contrast, heat maps obtained using the GASF method and the proposed method in this paper demonstrate better continuity and coherence. Moreover, the heat map generated by the proposed method shows high-intensity concentration regions in the lower-left corner and along the matrix borders, while the majority of the map retains uniformly low intensity. This structure enables the 2D-CNN model to extract the meaningful spatial features.
This study introduces a Shapley weight layer into the 2D-CNN to enhance the interpretability of the prediction model and quantify the relative importance of each variable in the prediction process after converting the one-dimensional spectral data into a two-dimensional format. The Shapley weight layer serves as an interpretable weighting mechanism that estimates the bounded contribution of each input feature to the output of the prediction model based on the Shapley value. Moreover, the importance of the features through the weight matrix offers insight into how different spectral regions influence the prediction results. Designed as a lightweight and learnable module, the Shapley weight layer is embedded directly within the network architecture and trained jointly with the other model parameters, which ensures that the model achieves high predictive accuracy while maintaining strong interpretability. Fig. 5 presents the normalized Shapley value based on weight matrices for the prediction of SOC and N, respectively. These visualizations highlight the most influential regions in the input space and reinforce the interpretability and practical relevance of the proposed approach.
In the weight matrix image, the color of each pixel corresponds to the magnitude of its weight, with darker regions indicating higher importance and lighter regions representing lower importance. The spatial contribution of these weights guides the 2D-CNN prediction model to quickly and effectively identify salient regions and focus on learning the most informative features. In addition, during the training process, the network dynamically adjusts these weights to emphasize critical information, enabling it to focus on key areas rather than treating all regions equally. This adaptive weighting mechanism enhances the efficiency of the prediction model and the predictive accuracy by prioritizing the most relevant spectral region.
Tables 8 and 9 display the modeling performance metrics obtained using the three transformation methods, while Fig. 6 and 7 present the corresponding scatter plots for predicted and actual values of SOC and N, respectively. Based on their performance results, the models can be ranked in order of accuracy as follows: 2D-CTM-CNN model > 2D-GASF-CNN > 2D-MTF-CNN. The proposed 2D-CTM-CNN model outperforms the PLSR, 1D-CNN and two 2D-CNN models. Compared with the 1D-CNN model, the R2 of SOC and N increased by 5.56% and 5.68% and the RMSE reduced by 7.60% and 27.72%, respectively. Furthermore, the PRD for both nutrients exceeds 4, indicating that the model has an excellent prediction ability. These experimental results demonstrated that the proposed method not only achieves substantial dimensionality reduction through extreme spectral compression, but also preserves critical information and enhances feature representation. By introducing a learnable Shapley-based weight matrix into the network architecture, the model is able to focus on the most informative regions of the spectral data. The results of the ablation experiment further confirm the effectiveness of this weighting layer, showing that when the Shapley-based weighting layer is removed, the R2 for N decreases to 0.90 and for SOC to 0.93, indicating that this layer contributes significantly to improving prediction accuracy.
| Model | Set | RMSE | R 2 | MAE | RPD |
|---|---|---|---|---|---|
| 2D-GASF-CNN | Training | 30.52 | 0.95 | 19.89 | 4.42 |
| Test | 48.60 | 0.89 | 27.28 | 3.08 | |
| 2D-MTF-CNN | Training | 38.60 | 0.93 | 23.77 | 4.01 |
| Test | 98.21 | 0.54 | 62.08 | 1.48 | |
| 2D-CTM-CNN | Training | 29.27 | 0.96 | 18.52 | 4.85 |
| Test | 32.01 | 0.95 | 19.11 | 4.40 |
| Model | Set | RMSE | R 2 | MAE | RPD |
|---|---|---|---|---|---|
| 2D-GASF-CNN | Training | 1.55 | 0.92 | 1.31 | 3.89 |
| Test | 2.10 | 0.87 | 1.68 | 2.79 | |
| 2D-MTF-CNN | Training | 1.55 | 0.93 | 1.36 | 3.84 |
| Test | 4.15 | 0.46 | 2.64 | 1.36 | |
| 2D-CTM-CNN | Training | 1.36 | 0.94 | 1.02 | 4.36 |
| Test | 1.48 | 0.93 | 1.09 | 4.06 |
This mechanism significantly improves the interpretability and efficiency of the training process, which results in more accurate and robust prediction results. Nevertheless, the 2D-GASF-CNN and 2D-MTF-CNN exhibit the problem of overfitting, which is likely attributed to the non-isometric compression that influences the structure of original spectral data. This disruption negatively impacts the effectiveness of the time-series-based encoding methods that limits the suitability for high-dimensional spectral after the extreme spectral compression step. Additionally, the performance of the 2D-MTF-CNN model is particularly sensitive to the n_state parameter, which controls the discretization of continuous spectral values into finite states. When applied to low-dimensional data, this discretization reduces the representational granularity of the transformed matrix, limits the learning capacity of the prediction model, and leads to suboptimal prediction performance.
Table 10 shows the prediction performance of SOC and N in the Italian dataset using the full-spectrum 1D-CNN and the proposed 2D-CTM-CNN. The 2D-CTM-CNN consistently outperformed the 1D-CNN on both training and testing sets. For N, the test set R2 increased from 0.48 to 0.68 (41.7% improvement) and RMSE decreased from 0.98 to 0.80. For SOC, R2 increased from 0.56 to 0.73 (30.4% improvement) with RMSE reducing from 12.57 to 9.56. These results indicate that the 2D-CTM-CNN effectively captures spectral patterns relevant to SOC and N and exhibits strong generalization across different soil datasets.
| Model | Property | Set | RMSE | R 2 | MAE | RPD |
|---|---|---|---|---|---|---|
| 1D-CNN | N | Training | 0.77 | 0.64 | 0.51 | 1.68 |
| Test | 0.98 | 0.48 | 0.58 | 1.50 | ||
| SOC | Training | 9.01 | 0.78 | 5.90 | 2.16 | |
| Test | 12.57 | 0.56 | 6.96 | 1.52 | ||
| 2D-CTM-CNN | N | Training | 0.54 | 0.83 | 0.36 | 2.43 |
| Test | 0.80 | 0.68 | 0.47 | 1.77 | ||
| SOC | Training | 7.21 | 0.85 | 4.93 | 2.59 | |
| Test | 9.56 | 0.73 | 6.16 | 1.94 |
Table 11 presents the prediction performance for CEC and calcium carbonate (CaCO3). The 2D-CTM-CNN showed clear advantages over the 1D-CNN for both training and testing sets. For CEC, the test set R2 improved from 0.66 to 0.96 (45.5% improvement) with RMSE decreasing from 7.72 to 2.20, while for CaCO3, R2 increased from 0.71 to 0.77 and RMSE decreased from 76.53 to 63.59. Fig. 8 shows that predictions from the 2D-CTM-CNN are closer to the ideal y = x line, demonstrating higher accuracy and reliability. Overall, the proposed model effectively captures complex spectral patterns across multiple soil properties and exhibits broad applicability for robust soil property prediction.
| Model | Property | Set | RMSE | R 2 | MAE | RPD |
|---|---|---|---|---|---|---|
| 1D-CNN | CEC | Training | 6.72 | 0.70 | 4.32 | 1.89 |
| Test | 7.72 | 0.66 | 4.57 | 1.69 | ||
| CaCO3 | Training | 55.59 | 0.84 | 39.18 | 2.56 | |
| Test | 76.53 | 0.71 | 52.75 | 1.85 | ||
| 2D-CTM-CNN | CEC | Training | 2.47 | 0.96 | 1.68 | 5.31 |
| Test | 2.20 | 0.96 | 1.48 | 5.01 | ||
| CaCO3 | Training | 49.95 | 0.87 | 33.94 | 2.78 | |
| Test | 63.59 | 0.77 | 42.49 | 2.11 |
![]() | ||
| Fig. 8 Scatter plot of the measured and predicted concentrations of CaCO3 and CEC: (a) 1D-CNN of CaCO3, (b) 2D-CTM-CNN of CaCO3, (c) 1D-CNN of CEC, and (d) 2D-CTM-CNN of CEC. | ||
| This journal is © The Royal Society of Chemistry 2026 |