Predicting Shear Strength Parameters of Peruvian Granular Soils Using Artificial Neural Networks
Abstract:
This study develops and validates a data-driven model based on an artificial neural network (ANN) to predict the effective shear strength parameters (effective angle of internal friction and effective cohesion) of granular soils from basic index properties. A database of 1,105 secondary records, obtained from standardized geotechnical tests performed at Peruvian universities, was used for training and internal validation. External verification was carried out with 39 independent samples tested by consolidated-drained direct shear in accordance with ASTM International D3080/D3080M and Peruvian Technical Standard (Norma Técnica Peruana, NTP) 339.171. The network, with three hidden layers, dropout, and batch normalization, uses particle size distribution, Atterberg limits, dry density, and moisture content as input variables. In the external test, the model achieved a coefficient of determination ($R^2$) of 0.86 for the effective angle of internal friction (mean absolute error [MAE] = 1.21°; root mean square error [RMSE] = 1.75°) and 0.77 for the effective cohesion (MAE = 1.09 kPa; RMSE = 2.14 kPa). Unlike previous studies based on limited or heterogeneous datasets, this work uses a broad database of Peruvian soils, which facilitates regional calibration. Gradient and sensitivity analyses indicated that particle size distribution is the most influential factor on shear strength, whereas moisture content has a comparatively smaller influence. The results suggest that the proposed network may serve as a preliminary estimation tool for the shear strength of Peruvian granular soils when basic index properties are available. However, given the small external test set and the regional scope of the data, its extension to other soil types or regions requires further validation.1. Introduction
Shear strength is a fundamental soil property in geotechnical engineering, as it influences foundation design and structural stability [1]. Its typical characterization, that is, the determination of the angle of internal friction and cohesion, relies on expensive laboratory tests [2]. To reduce this dependence, mathematical and empirical models have long been used, from Terzaghi's classic framework [3] to modern regression-based formulations. However, their limited capacity to represent the nonlinear and highly variable behavior of soils has favored the adoption of artificial intelligence-based approaches [4], [5]. Even so, practice continues to rely primarily on standardized tests, such as direct shear, triaxial compression, cone penetration, standard penetration tests, and lightweight dynamic penetrometer tests, which provide representative results but require specialized equipment, trained personnel, and considerable testing time [3], [6].
In this context, computational modeling, and in particular artificial neural networks (ANNs), has become established as a promising alternative for predicting shear strength parameters, thanks to the greater availability of data and recent advances in artificial intelligence [5], [7]. Several studies have shown that ANNs can estimate shear strength from basic physical properties, with less time and cost than conventional laboratory tests [8], [9].
The direct shear test is one of the most widely used methods in Peru for obtaining shear strength parameters of soils [6]. It is standardized by the Peruvian Technical Standard (Norma Técnica Peruana, NTP) 339.171 and has been applied for decades, generating large volumes of information in laboratory reports, academic theses, and technical files. However, the procedure has known disadvantages: high operating costs, delayed execution, the need for specialized equipment, limited representativeness at the field scale, and high sensitivity to sample handling [10].
Advances in artificial intelligence and machine learning have opened new avenues for modeling complex behaviors in science and engineering [5], [7], [11]. In the geotechnical field, these techniques are gradually transforming traditional analysis and design methods by offering faster and more accurate predictive tools. Evidence of this is the growing number of studies applying machine learning to geotechnical problems, from soil classification to the prediction of shear strength and dynamic soil properties [5], [7], [12].
This study focuses on predicting the shear strength parameters of non-cohesive soils using ANNs, employing particle size distribution, Atterberg limits, dry density, and moisture content as input variables. Previous research has demonstrated that support vector machines (SVMs) and other machine learning algorithms can effectively estimate shear strength from index and state variables, such as clay content, void ratio, liquid limit (LL), and plastic limit [8], [9], [13]. With a methodology structured in training, validation, and testing phases, this research aims to evaluate the predictive capacity of ANNs and further explore the relationship between soil physical properties and shear strength.
Despite the growing number of studies of this type, most existing models rely on datasets from limited geographic regions or highly controlled laboratory conditions. Therefore, they may not reflect the heterogeneity of granular soils in Peru, whose geological origin, depositional environments, and local testing practices differ from those collected in international databases. Furthermore, many studies prioritize predictive accuracy and pay little attention to regional calibration, external validation with independent experimental data, and systematic analysis of model interpretability.
To address these limitations, the novelty of this study lies in the development of a locally calibrated ANN trained on a large and representative database of Peruvian soils. The model is complemented by external validation based on standardized consolidated-drained direct shear tests and sensitivity and gradient analyses that improve its interpretability. This integrated approach not only strengthens the evaluation of the model but also allows for an understanding of the relative influence of soil index properties on shear strength parameters.
The relevance of this work lies in offering a preliminary estimation approach for the shear strength parameters of Peruvian granular soils from index tests that are simpler to perform than direct shear testing [9], [14]. This approach can support the design of shallow foundations, retaining structures, and slope stability analysis. Furthermore, recent applications of explainable artificial intelligence in geotechnical engineering reinforce the practical viability of data-driven methods for estimating critical soil parameters [11], [14].
It should be noted that this research excludes cohesive and organic soils, whose shear behavior depends largely on cementation and physicochemical processes, rather than purely physical characteristics [3]. Previous studies have shown that the shear strength parameters of coarse-grained soils can be effectively determined using adapted direct shear procedures and data-driven approaches, supporting the application of machine learning to this soil category [8], [15].
Therefore, the main objective of this work is to estimate the shear strength parameters of granular soils from their physical characteristics using ANNs, and to identify the relative influence of these properties on shear strength within the developed model. To this end, the ANN is trained and validated with 1,105 secondary records and verified with 39 independent direct shear tests.
2. Methodology
This study adopted an inductive methodological approach: it started from specific laboratory observations to build a generalizable predictive framework that estimates the soil's shear strength parameters. The model integrates the results of simple index tests (particle size distribution, consistency limits, moisture content, and dry density) to predict the effective angle of internal friction ($\phi^{\prime}$) and the effective cohesion ($c^{\prime}$) [3].
The research combined empirical testing with data-driven modeling to ensure both scientific validity and engineering applicability. Two categories of data were considered. The first consisted of secondary data: 1,105 granular soil records collected from Peruvian university repositories, used for model training and validation. The second consisted of primary data: 39 experimental samples obtained through standardized direct shear tests, performed under controlled laboratory conditions according to ASTM International D3080/D3080M-23 and NTP 339.171 [6].
Secondary data were obtained from undergraduate and graduate theses, as well as technical reports prepared by accredited Peruvian universities. They were generated following standardized laboratory procedures, in accordance with ASTM International and NTP specifications, especially for direct shear tests. During data cleaning, records that did not cite standardized test protocols or lacked complete experimental documentation were excluded to ensure methodological consistency, reliability, and comparability of the database.
In order to ensure methodological transparency and reproducibility, Table 1 summarizes the classification of sample sources, sampling methods, and units of study, and provides an overview of the dataset structure.
| Sample Type | Sampling Method | Source | Study Unit | Sample Size |
| Documentary | Non-probabilistic | Secondary: repositories of Peruvian universities | Granular soils | 1,105 |
| Experimental | Non-probabilistic | Primary: soil laboratory | Granular soils | 39 |
This hybrid design, supported by both laboratory evidence and computational modeling, provides a solid basis for developing an ANN capable of capturing the nonlinear relationships that govern the shear strength of granular soils [8].
Data quality and integrity were prioritized over volume, as the reliability of any machine learning model depends fundamentally on the accuracy and consistency of the input data. The preprocessing workflow included integration, cleaning, reduction, and transformation operations, which refined the dataset before training. This ensured that only relevant, consistent, and complete data were incorporated, improving the predictive accuracy of the neural network model [8].
Integration combined the results from various academic and experimental sources into a unified and standardized record structure. Data cleaning then corrected errors, missing values, and redundancies to improve the overall consistency. The following criteria were systematically applied:
• deletion of records with inconsistent units or formatting errors;
• elimination of duplicate samples, identified by location and identical test identifiers;
• exclusion of records that lacked four or more of the twelve variables evaluated (the ten input variables and the two output variables);
• imputation of incomplete data (less than four missing values) by regression-based estimation, adjusted for soil type [16], [17].
To provide transparency in the data processing, Table 2 summarizes the cleaning results, from the raw dataset to the final standardized database used to train and validate the model.
| Category | Amount |
| Total records collected | 1,441 |
| Records modified during cleaning | 239 |
| Records retained without modification | 866 |
| Records excluded during cleaning | 336 |
| Final cleaned dataset (retained records) | 1,105 |
This process ensured that the 1,105 retained samples met the minimum quality thresholds and represented the variability of granular soil conditions relevant to Peruvian laboratory records [10].
To ensure methodological comparability among records from different university laboratories, explicit inclusion criteria were established: only records that cited standardized test protocols (ASTM International or NTP), indicated the soil classification according to the Unified Soil Classification System (USCS), and had complete experimental documentation were included. Consistency between sources was verified by comparing the statistical ranges of each variable by soil type; records with physically inconsistent or extreme outliers ($Z$-score $>$ 3.5) were eliminated. Regression imputation was only applied when the missing variable could be predicted from the other variables in the same record with a coefficient of determination ($R^2$) $\geq$ 0.70; otherwise, the record was discarded. This criterion prevented the introduction of significant bias into the final database of 1,105 samples.
Following a preliminary statistical evaluation, the 26 measured soil indicators were systematically reduced to 10 essential input variables. The shear-strength parameters of granular soils, $\phi^{\prime}$ and $c^{\prime}$, were used as the output variables. This reduction aimed to eliminate redundancy, improve computational efficiency, and increase the generalizability of the ANN without compromising the intrinsic variability of the data.
The selected variables are grouped into three categories. The first comprises the particle size distribution: coarse gravel, fine gravel, coarse sand, medium sand, fine sand, and fine particles. The second includes the consistency limits: LL and the plasticity index (PI). The third includes the physical state parameters: dry density ($\gamma_{\mathrm{d}}$) and moisture content ($w$).
To characterize the statistical behavior of these variables, distribution and correlation measures were analyzed using descriptive statistics and histograms. As shown in Figure 1, most indicators exhibited asymmetric distributions skewed to the right. This behavior is characteristic of granular soils, particularly for LL and PI, which tend toward low absolute values due to the limited plasticity of coarse-grained materials. Similarly, $c^{\prime}$ was concentrated near zero, which is consistent with the mechanical response of granular soils, in which true cohesion is minimal or nonexistent. In contrast, dry density and the $\phi^{\prime}$ showed approximately symmetric distributions, reflecting their more stable physical nature.

The observed patterns guided the choice of transformations. Variables with positive skewness (percentages of coarse gravel, fine gravel, coarse sand, medium sand, fine sand, and fine particles, LL, PI, moisture content, and cohesion) were logarithmically transformed to reduce skewness and stabilize variance. Dry density and $\phi^{\prime}$, however, were not transformed due to their nearly symmetric distribution. This strategy, summarized in Figure 2, prevented extreme values from biasing the network's learning.

After transformation, all indicators were scaled using min–max normalization to the range[0, 1], which was necessary because the variables are expressed in different units and ranges. For example, dry density varies approximately from 1.0 to 2.3 g/cm$^{3}$, while fine particle content ranges from 0.1% to over 93%. Without normalization, variables with wide numerical ranges could dominate the training; min–max scaling ensures uniform weighting of features and numerical stability during optimization [18]. Overall, this reduction and transformation procedure produced a clean, balanced, and statistically consistent dataset, providing a solid foundation for training, validation, and external testing of the network.
To support a reliable assessment of the network's performance, the refined dataset was divided according to established practices in geotechnical research using machine learning [19]. A stratified random partitioning was applied: 70% of the data (773 samples) were allocated to training and 30% (332 samples) to internal validation. This proportion maintained the representativeness of the dataset in terms of soil type and property distribution, minimized sampling bias, and ensured consistent statistical behavior among the subsets [20].
It is important to emphasize that the 39 primary experimental records constituted the external test set, completely independent of the previous partition. These data did not participate in any training or internal validation phase, so their evaluation reflects the model's actual generalizability under experimental conditions not encountered during its development. In summary, the data flow comprised: (i) training with 773 secondary samples, (ii) internal validation with 332 secondary samples, and (iii) independent external testing with 39 primary experimental samples.
To analyze the relationships between soil physical properties and shear strength parameters before developing the model, a correlation analysis was performed on the refined set of 1,105 granular soil samples. Spearman's rank correlation coefficient [21] was adopted, given the non-normal distribution of several variables. Figure 3 presents the correlation matrix for all input and output parameters; the color gradient indicates the magnitude and direction of the monotonic relationships.

Moderate correlations were observed between particle size distribution indicators and $\phi^{\prime}$: coarse sand showed a positive association, and fine particles, a moderate negative correlation. $c^{\prime}$ exhibited stronger positive correlations with fine particles, LL and PI, reflecting the influence of fines and plasticity on apparent cohesion in granular soils. Dry density was moderately positively correlated with $\phi^{\prime}$, while moisture content was negatively correlated with both strength parameters. The general absence of strong correlations highlights the nonlinear and multivariate nature of soil shear behavior, supporting the use of ANNs.
The network architecture was designed following deep learning principles, widely adopted in geotechnical research to capture nonlinear soil behavior [16]. The final configuration was based on descriptive statistical analysis and empirical experimentation to balance model complexity with generalizability. Implementation was carried out in Python, using the Anaconda distribution and the JupyterLab environment, with Keras and TensorFlow as the main frameworks. Scikit-learn, NumPy, Pandas, Matplotlib, and Seaborn were also used for preprocessing, numerical operations, and visualization [20].
The optimized model consists of one input layer, three hidden layers, and one output layer (Table 3). Each hidden layer uses the rectified linear unit (ReLU) activation function, and the output layer uses linear activation to predict $\phi^{\prime}$ and $c^{\prime}$. Batch normalization and dropout (0.2) were incorporated to stabilize learning and mitigate overfitting [12].
| Layer | Neurons/Parameters | Activation | Additional Features |
| Input layer | 10 input variables | – | Uniform initialization |
| Hidden layer 1 | 200 neurons | ReLU | Batch normalization, dropout (0.2) |
| Hidden layer 2 | 100 neurons | ReLU | Batch normalization, dropout (0.2) |
| Hidden layer 3 | 50 neurons | ReLU | Batch normalization, dropout (0.2) |
| Output layer | 2 neurons | Linear | Prediction of $\phi^{\prime}$ and $c^{\prime}$ |
The model was compiled using the Adam optimizer (initial learning rate of 0.001) and mean squared error (MSE) as the loss function. Training was configured with batches of 32 samples and a maximum of 1500 epochs, and two callback functions were implemented: early stopping, with a patience of 50 epochs and validation loss monitoring, and adaptive reduction of the learning rate (factor of 0.5, patience of 20 epochs, and a minimum value of 1$\times$10$^{-6}$). Mean absolute error (MAE) and root mean squared error (RMSE) were used as the main evaluation metrics. The final architecture corresponds to the best result of five independent runs with random weight initialization, and the model with the lowest validation loss was selected. This procedure favored stable convergence and limited overfitting on the internal validation set.
The validation process was organized into three sequential stages (training, validation, and testing) to support a reliable assessment of the network's performance [19], [22]. During training, 773 samples were used to optimize weights and internal biases through iterative backpropagation, while 332 samples were reserved for internal validation to monitor convergence and prevent overfitting. This partitioning preserved the statistical characteristics of the dataset across all subsets, promoting stable learning.
In the final stage, 39 independent laboratory samples were used to evaluate the model's predictive performance under consolidated-drained direct shear conditions, following standardized protocols [4], [10], [15]. Although this experimental set is small, its purpose is to serve as an external verification reference under controlled laboratory conditions, and not to represent soil variability at field scale. The performance of the ANN is primarily supported by the extensive secondary dataset of 1,105 granular soil records used for training and internal validation, whereas the external set provides only a preliminary verification. This strategy is consistent with common practice in geotechnical machine learning studies, where experimental sets are limited by the cost, duration, and resources of laboratory tests.
Performance was evaluated using standard statistical metrics: $R^2$, MAE, MSE, and RMSE [23]. Additionally, $F$-tests were applied to assess statistical significance, and residuals were analyzed to verify the stability of the prediction and the model assumptions. Taken together, the internal validation and the external verification indicate that the proposed ANN achieves acceptable predictive accuracy for preliminary estimation in the Peruvian granular soils considered. However, it is acknowledged that future studies with larger, independent experimental sets would improve the model's applicability to site-specific geotechnical conditions and at field scale [19], [20].
3. Results
Once the optimal architecture was defined, the model's performance was evaluated using regularization strategies, such as dropout and batch normalization, aimed at improving generalization. The optimized network showed similar errors in training and internal validation (Table 4), which suggests limited overfitting for this dataset [24]. As shown in Table 4, errors remained consistently low during the training and validation stages, with MAE and RMSE magnitudes consistent with those reported in recent geotechnical studies based on machine learning, where ANNs have shown a high capacity for predicting shear strength parameters from basic physical properties [19], [23], [24].
| Stage/Parameter | MSE | MAE | RMSE |
| Overall training | 0.02 | 0.11 | 0.141 |
| Overall validation | 0.016 | 0.097 | 0.126 |
| Training ($\phi^{\prime}$) | 0.0055 | 0.058 | 0.075 |
| Training ($c^{\prime}$) | 0.0185 | 0.106 | 0.136 |
| Validation ($\phi^{\prime}$) | 0.0072 | 0.067 | 0.085 |
| Validation ($c^{\prime}$) | 0.0241 | 0.127 | 0.155 |
To assess predictive performance under real-world conditions, 39 non-cohesive soil samples were tested according to the consolidated-drained direct shear standards NTP 339.171 (INACAL) and ASTM International D3080/D3080M [4], [10]. The evaluation used the $R^2$ and associated error metrics to quantify accuracy; an $R^2$ $\geq$ 0.75 was adopted in this study as the acceptance criterion for preliminary estimation, together with low MAE and RMSE, since $R^2$ is more informative than MAE or RMSE alone [19], [23], [24].
As summarized in Table 5, the model obtained $R^2$ values of 0.86 for $\phi^{\prime}$ and 0.77 for $c^{\prime}$, both above the threshold of 0.75. The corresponding MAE and RMSE values remained below the maximum permissible errors adopted for this study (2.2° for $\phi^{\prime}$ and 3.5 kPa for $c^{\prime}$), which supports its use as a preliminary estimation tool.
| Parameter | $\boldsymbol{R^2}$ | MAE | RMSE | Maximum Permissible Error | Compliance |
| $\phi^{\prime}$ | 0.86 | 1.21° | 1.75° | 2.2° | $\checkmark$ |
| $c^{\prime}$ | 0.77 | 1.09 kPa | 2.14 kPa | 3.5 kPa | $\checkmark$ |
Beyond the numerical indicators in Table 5, Figure 4 presents the relationship between the predicted and observed values of $c^{\prime}$ in the external test set. The data points are distributed close to the 1:1 reference line, indicating a good agreement between the ANN predictions and the laboratory measurements. Although some deviations are observed, particularly for samples with low cohesion values, no clear systematic bias is evident in the predictions. These results suggest that the proposed model provides a reasonable estimation of $c^{\prime}$ for the evaluated granular soils.

Furthermore, the $F$ test ($p$ $<$ 0.001) confirmed the statistical significance of both predictive outputs for this external set; generalization beyond it remains to be confirmed.
To interpret the network's predictive behavior, gradient and sensitivity analyses were performed, quantifying the contribution of each input variable to the predicted shear strength parameters [5], [11], [12], [24]. Relative importance was quantified using two complementary explainable artificial intelligence techniques: a gradient-based analysis and a sensitivity analysis based on controlled perturbations of the inputs. In neural networks, gradient-based importance is a measure of local sensitivity, obtained from the partial derivatives of the model outputs with respect to each normalized input variable. In this study, the average absolute gradients of the predicted shear strength parameters ($\phi^{\prime}$ and $c^{\prime}$) with respect to each input variable were calculated over the validation set, indicating how incremental changes in the soil's physical properties influence the network outputs.
In parallel, a global sensitivity analysis was performed that independently perturbed each input variable, keeping the others unchanged, and assessed the induced variation in the model outputs. The mean absolute change in predicted values was used as a sensitivity indicator to assess the overall influence of each predictor. In both analyses, the importance measures were normalized so that their total contribution added up to 100%, allowing for consistent comparison and ranking of the relative influence of soil physical properties. This combined approach has been widely adopted in neural network interpretability studies and engineering applications to improve the transparency and robustness of data-driven models [25], [26], [27].
The results in Table 6 indicate that particle size distribution was the most influential factor, contributing approximately 57% to both $\phi^{\prime}$ and $c^{\prime}$. For $\phi^{\prime}$, this was followed by dry density ($\approx$18%), consistency limits ($\approx$14%), and moisture content ($\approx$11%); for $c^{\prime}$, it was followed by consistency limits ($\approx$19%), moisture content ($\approx$14%), and dry density ($\approx$11%).
| Physical Property | Gradient $\boldsymbol{\phi^{\prime}}$ (%) | Sensitivity $\boldsymbol{\phi^{\prime}}$ (%) | Gradient $\boldsymbol{c^{\prime}}$ (%) | Sensitivity $\boldsymbol{c^{\prime}}$ (%) | Rank |
| Particle size distribution | 56.80 | 58.30 | 56.60 | 57.80 | 1 |
| Dry density | 18.21 | 17.60 | 10.91 | 10.40 | 2 |
| Consistency limits | 14.21 | 13.70 | 18.80 | 18.50 | 3 |
| Moisture content | 10.77 | 13.10 | 13.71 | 13.20 | 4 |
As shown in Figure 5, the evolution of the loss function, MAE and MSE indicates smooth and stable convergence during training and validation, suggesting limited overfitting. Residual analyses of $\phi^{\prime}$ and $c^{\prime}$, presented in Figure 6, show residuals for $\phi^{\prime}$ centered near zero, whereas a few samples with predictions near zero show larger residuals for $c^{\prime}$ (up to approximately 6 kPa), which is consistent with the apparent nature of cohesion in granular soils discussed below [3].



Overall, particle size distribution emerged as the dominant factor in shear strength ($\approx$57%). All groups of variables analyzed exceeded the 5% relative importance threshold adopted in this study, which underscores their geotechnical relevance within the model.
To provide a detailed breakdown of each predictor, Table 7 presents the relative importance of the ten input variables, derived from gradient analysis on the validation set. Within the particle size group, fine sand (15.23% for $\phi^{\prime}$ and 14.82% for $c^{\prime}$) is the single most influential predictor for $\phi^{\prime}$ and the second most influential for $c^{\prime}$, after the fine fraction (11.07% for $\phi^{\prime}$ and 19.29% for $c^{\prime}$). These are followed by medium sand (12.85% and 10.41%), coarse sand (9.45% and 6.74%), fine gravel (5.02% and 3.52%), and coarse gravel (3.18% and 1.82%). Among the consistency limits, LL (7.80% for $\phi^{\prime}$ and 9.40% for $c^{\prime}$) and PI (6.41% and 9.40%) show similar contributions. All individual predictors exceed the 1% relevance threshold, confirming the geotechnical utility of each variable included in the model.
Group | Variable | $\boldsymbol{\phi^{\prime}}$ (%) | $\boldsymbol{c^{\prime}}$ (%) |
Particle size distribution | Coarse gravel | 3.18 | 1.82 |
Fine gravel | 5.02 | 3.52 | |
Coarse sand | 9.45 | 6.74 | |
Medium sand | 12.85 | 10.41 | |
Fine sand | 15.23 | 14.82 | |
Fine particles | 11.07 | 19.29 | |
Consistency limits | Liquid limit | 7.80 | 9.40 |
Plasticity index | 6.41 | 9.40 | |
Physical state | Dry density | 18.21 | 10.91 |
Moisture content | 10.77 | 13.71 |
To better assess the suitability of the proposed ANN, its predictive performance was compared with that of a reference machine learning model, using the same training configuration and an independent experimental set. The random forest (RF) regressor was selected due to its extensive validation in geotechnical prediction problems [15], [28] and because it represents the most established ensemble approach in the literature on shear strength estimation. The choice of a single reference model stems from the fact that the objective of this section is to demonstrate the advantage of the ANN over a well-established and recognized competitor, rather than to provide an exhaustive review of available algorithms. It is acknowledged that a broader comparison with additional regressors (e.g., support vector regression, Gradient Boosting, or XGBoost) [11], [12], [26] would strengthen the conclusions; this extension is proposed for future work. RF models are robust to nonlinear relationships; however, their predictive capacity can be limited when high-dimensional interactions between soil properties dominate the mechanical response.
Table 8 presents the quantitative comparison between the RF and the proposed ANN, based on the external validation set of 39 samples analyzed in the laboratory. The ANN outperformed the RF in both shear strength parameters. In particular, the latter showed limited predictive capacity for $c^{\prime}$, with a very low $R^2$ (=0.06) and considerably larger errors, while the ANN achieved high accuracy for both output variables.
| Model | $\boldsymbol{R^2}$($\boldsymbol{\phi^{\prime}}$) | RMSE($\boldsymbol{\phi^{\prime}}$) [°] | $\boldsymbol{R^2}$($\boldsymbol{c^{\prime}}$) | RMSE($\boldsymbol{c^{\prime}}$) [kPa] |
| RF | 0.69 | 2.96 | 0.06 | 6.20 |
| ANN (proposed) | 0.86 | 1.75 | 0.77 | 2.14 |
4. Discussion
The results indicate that an ANN trained solely on index properties can estimate the shear strength parameters of granular soils with sufficient accuracy for preliminary purposes. The coefficients of determination obtained in the external test (0.86 for $\phi^{\prime}$ and 0.77 for $c^{\prime}$) exceeded the reference threshold of 0.75 and are consistent with those from previous studies using neural networks and other machine learning algorithms to predict shear strength from basic physical properties [9], [13], [15], [19], [20]. It is worth emphasizing that the test set, consisting of only 39 samples, serves as an external verification under controlled laboratory conditions; the model's performance is supported primarily by the extensive secondary dataset of 1105 records, so the results should be regarded as preliminary and regional.
$c^{\prime}$ values obtained experimentally by direct shear testing of granular soils should be interpreted with caution. In these materials, the intersection of the shear strength envelope usually reflects apparent cohesion, associated with the fines fraction, the densification state, or the linear fit of the envelope, and not necessarily an intrinsic cohesive component comparable to that of cohesive soils. This explains why most predicted $c^{\prime}$ values are close to zero and is consistent with the fundamentals of granular soil mechanics [3].
From an interpretability standpoint, the predominant weight of the particle size distribution (approximately 57%) is consistent with previous studies highlighting the role of gradation and plasticity in controlling soil shear strength [8], [15]. The two methods employed, based on gradients and input perturbations, yielded similar relative importance values (Table 6), thus supporting the hierarchy of variables. Moisture content had a comparatively smaller influence, although it exceeded the adopted threshold of relevance.
Regarding the reference model, previous comparative studies on granular soils report that both ANN and RF models can reliably predict the peak friction angle [15], and ANN was the most accurate among the algorithms compared (ANN, extreme learning machine, and boosted trees) in a study of soil shear strength [19]. In the present study, the ANN outperformed the reference RF, especially for $c^{\prime}$ (Table 8), although this comparison is limited to a single reference model and 39 external samples.
The main limitations of the study are the small size of the external test set, the use of a single reference model, and the fact that the databases correspond to Peruvian granular soils and tests from local university laboratories, meaning that transferability to other soil types, depositional environments, or regions was not evaluated. With these caveats, the proposed approach is useful as a preliminary estimation tool when simple and low-cost index tests are available, and it can support early decisions in the design of shallow foundations, retaining structures, and slope stability analysis [9], [14].
5. Conclusions
This study developed and validated an ANN capable of predicting the shear strength parameters (the effective angle of internal friction and the effective cohesion) of granular soils from basic physical properties. In the external test, the model achieved an $R^2$ of 0.86 for the effective angle of internal friction and 0.77 for effective cohesion, with MAEs of 1.21° and 1.09 kPa and root mean square errors of 1.75° and 2.14 kPa, respectively. These values fall within the adopted geotechnical thresholds and support its use as a preliminary predictive tool for evaluating soil shear strength.
The network was trained and validated using 1,105 secondary records from Peruvian university repositories and verified with 39 laboratory samples tested under consolidated-drained conditions (ASTM International D3080 and NTP 339.171). The preprocessing and validation procedures were designed to promote data consistency and limit overfitting; training and internal validation errors were similar (Table 4), whereas the external test ($n$ = 39) provides only a preliminary verification of generalization. The relative importance analysis showed that particle size distribution was the most influential predictor ($>$56%), followed, to a lesser extent, by consistency limits, dry density, and moisture content; at the individual sample level, fine particles were the variable with the greatest impact on effective cohesion.
In comparison with a RF reference model, evaluated with the same external experimental samples, the ANN was superior for both shear strength parameters, especially for effective cohesion, which suggests, for this dataset, a greater ability to represent the nonlinear relationships that govern the behavior of granular soil.
The applicability of the proposed ANN is limited to the soil types, laboratory conditions, and geological context represented in the Peruvian granular soil data. Therefore, it should be used as a preliminary estimation tool in the initial stages of geotechnical design and does not replace standardized laboratory tests in the final design without specific verification in each case. Its extension to other soil classes (cohesive, organic), depositional environments, or regions requires further validation with independent and representative datasets. Future directions include expanding the experimental base with samples from different regions and soil types, exploring ensemble strategies (Gradient Boosting, XGBoost), and extending the predictive framework to other geotechnical parameters, such as compressibility and permeability.
Conceptualization, H.L.A. and J.T.E.; methodology, H.L.A., J.H.P., and J.T.E.; software, J.H.P. and J.T.E.; validation, J.H.P., K.B.A., and E.G.S.; formal analysis, J.T.E. and R.J.G.P.; investigation, H.L.A., J.H.P., K.B.A., J.T.E., E.C.G., E.G.S., and A.C.V.; resources, H.L.A., E.C.G., and A.C.V.; data curation, J.H.P., J.T.E., and E.G.S.; writing—original draft preparation, J.T.E.; writing—review and editing, H.L.A., J.H.P., K.B.A., J.T.E., R.J.G.P., E.C.G., E.G.S., and A.C.V.; visualization, J.T.E. and J.H.P.; supervision, H.L.A. and R.J.G.P.; project administration, H.L.A. All authors have read and agreed to the published version of the manuscript.
The data supporting the results of this research are available upon request from the corresponding author.
The authors thank the Faculty of Mining, Geology and Civil Engineering of the National University of San Cristóbal de Huamanga for the institutional support provided during the development of this research.
The authors declare no conflicts of interest.
During the preparation of this manuscript, the authors used ChatGPT (OpenAI) as a tool to assist with the translation of the manuscript from Spanish to English. The tool was not used to generate data, perform analyses, develop the methodology, or establish the study's conclusions. The authors reviewed and edited the AI-assisted translations and assume full responsibility for the final content of the manuscript.
NTP | Peruvian Technical Standard, Norma Técnica Peruana |
ReLU | Rectified linear unit |
RF | Random forest |
ANN | Artificial neural network |
USCS | Unified Soil Classification System |
MAE | Mean absolute error |
MSE | Mean squared error |
RMSE | Root mean square error |
LL | Liquid limit, % |
PI | Plasticity index, % |
$c^{\prime}$ | Effective cohesion, kPa |
$R^2$ | Coefficient of determination |
$w$ | Moisture content, % |
Greek symbols | |
$\phi^{\prime}$ | Effective angle of internal friction, ° |
$\gamma_{\mathrm{d}}$ | Dry density, g·cm$^{-3}$ |
Subscripts | |
$d$ | Dry |
