Interpretable ensemble learning framework for shear strength assessment of corroded reinforced concrete beams Authors: Guotao Shao, Shengquan Zou, Guangcai Zhang, Tao Huang Published: 2026 ABSTRACT AbstractThe assessment of deterioration-affected reinforced concrete (RC) structures is an important task for maintaining structural safety and supporting maintenance and strengthening decisions in the built environment. As corrosion influences structural resistance through multiple coupled factors, reliable estimation of shear strength remains challenging in corroded reinforced concrete (CRC) beams. However, conventional empirical and analytical models often rely on simplified assumptions and may exhibit limited accuracy across different test conditions, while existing prediction models usually lack sufficient generalization and interpretability. To address this issue, this study develops an interpretable data-driven framework for the shear strength assessment of CRC beams using ensemble learning. A database comprising 180 experimentally reported CRC beam specimens was compiled by integrating material properties, geometric characteristics, reinforcement details, and corrosion-related parameters. Several machine-learning models were evaluated, among which the proposed Stacking model achieved the best overall predictive performance on the adopted dataset, with test-set predictions concentrated within a ± 20% error band and a test-set R2 of 0.9727. The proposed model was further examined through comparison with representative empirical and code-based prediction models, showing closer agreement with the experimental results in the examined literature datasets. Moreover, SHAP-based interpretation was employed to examine the relative influence of input variables and their contribution trends with respect to shear strength, thereby improving the transparency of the learned feature-response relationships. A simple user-oriented interface was also implemented to facilitate interaction with the trained model. The proposed framework provides a supplementary data-driven approach for assessing the shear strength of CRC beams.Keywords: CRC beams, Shear strength, Data-driven, Ensemble learning, SHAP analysisSubject terms: Engineering, Materials science, Mathematics and computing Introduction Shear failure is a critical brittle failure mode in reinforced concrete (RC) structures because it usually occurs suddenly and with limited warning1,2. To reduce the risk of such brittle behavior, RC beams are generally designed with sufficient shear capacity so that flexural failure precedes shear failure3. However, under service conditions such as marine exposure or de-icing salt environments, chloride ingress and carbonation may induce reinforcement corrosion, resulting in steel cross-sectional loss, concrete spalling, and bond deterioration, which in turn degrade structural performance4–6. Previous studies have shown that corrosion may cause RC beams to shift from ductile flexural failure to brittle shear failure7,8. Therefore, reliable estimation of the shear strength of corroded reinforced concrete (CRC) beams is of considerable importance for structural assessment and strengthening decision-making. Existing analytical and empirical models offer insights into the shear behavior of CRC beams9–13, such as those by Lu et al.9 and Huang et al.10. However, experiments are time‑consuming and costly, while empirical models based on limited datasets lack cross‑condition accuracy. Finite element analysis complements theory but demands high computational cost, complex constitutive modeling, and careful damage treatment. Most available models are adapted from non‑corroded RC beam frameworks (e.g., limit equilibrium14, strut‑and‑tie15,16, modified compression field17, equivalent truss18, ACI, GB5001017,19, accounting for corrosion via sectional reduction or modified material properties. Nevertheless, models by Xu and Niu14, Xue et al.13, Lu et al.9, and Li et al.19 still exhibit large errors and dispersion in predicting CRC beam shear strength20–22. A primary reason is their reliance on simplified assumptions (e.g., uniform corrosion), failing to capture localized pitting, coupled deterioration of longitudinal bars and stirrups, bond degradation, and possible failure mode shifts under varying corrosion levels. Consequently, reliable shear strength assessment of CRC beams remains challenging. Data-driven ML methods excel at handling high-dimensional nonlinear problems23–25 and have been widely applied to predict the performance of reinforced concrete (RC) structures26–28, including CRC beams. Table 1 summarizes representative studies on shear capacity prediction using various ML models and sample sizes. Notably, Fu and Feng22 employed gradient boosting regression trees (GBRT) on 158 datasets for time-dependent shear strength prediction; Asteris and Nguyen29 found artificial neural networks (ANN) more accurate than empirical models; Nguyen et al.30,31 combined generalized linear regression with ANN for high accuracy; Kumar et al.32 validated extreme gradient boosting trees (XGB) on 140 corroded beam datasets; Nguyen and Ly32 optimized gradient boosting (GB) using the Hunger Games Search (HGS) algorithm; Wang et al.33 developed a physics-guided neural network (PGNN); and Simwanda et al.20 used variational autoencoders (VAE) to generate synthetic data, enabling high-precision XGB-based predictions. Table 1Key application studies of machine learning in predicting shear capacity of CRC beams.ReferenceML modelsDatabaseFu and Feng (2021)GBRT158Asteris and Nguyen (2022)ANN158Nguyen et al. (2022)Generalized Linear Regression + ANN120Kumar et al. (2023)ANN, ANFIS, DT, XGB140Nguyen and Ly (2024)GB-HGS158Wang et al. (2025)PGNN237Simwanda et al. (2025)XGB、GBM、CatBoost、AdaBoost、BPNN138 Key application studies of machine learning in predicting shear capacity of CRC beams. The aforementioned studies confirm that machine learning models, leveraging advanced algorithms and diverse datasets, can effectively overcome the limitations of traditional methods. However, constrained by dataset size and the need for robust generalization, predictive accuracy is bottlenecked by conventional ensemble architectures: Bagging reduces variance via parallel averaging but cannot correct systematic bias, while Boosting reduces bias sequentially yet remains sensitive to hyperparameters. For shear strength prediction of corroded reinforced concrete beams, when base models show complementary advantages across design regions, neither paradigm fully exploits their synergy. Stacking ensemble learning has recently shown marked advantages in enhancing model prediction accuracy by integrating multiple base learners’ outputs as inputs to a meta-learner34,35. However, its systematic application to the shear strength prediction of CRC beams remains unexplored; thus, its adoption could enable more robust and accurate predictions. Moreover, existing studies mostly focus on accuracy metrics, lacking in-depth analysis of model decision-making. The SHAP framework, grounded in game theory, addresses this gap by quantifying feature contributions and offering global importance rankings and local explanations36,37, thereby improving model interpretability and physical consistency. This paper proposes an intelligent system integrating ensemble learning with SHAP analysis for predicting the shear strength of CRC beams and conducting parameter sensitivity analysis. The main innovations are: (1) A Stacking ensemble surrogate model that leverages complementary strengths of multiple base learners and corrects prediction bias via a meta-learner, preventing overfitting and ensuring accuracy and stability. (2) Hyperparameter optimization of the Stacking model using the Sparrow Search Algorithm (SSA) to enhance prediction performance. (3) Incorporation of SHAP interpretability to explain the prediction mechanism of the machine learning “black box”. (4) Development of a graphical user interface (GUI) based on the proposed model to enable visual design and rapid shear strength assessment, lowering the technical barrier for non-expert users. Construction and analysis of the CRC beam shear strength database Database construction This study compiles shear strength test data of various CRC beam specimens to establish a database comprising 180 experimental samples for ML modeling. The data are expanded based on the database of specimens reported by Lu et al.9 and further supplemented with CRC beam shear test results collected from 13 references7,13,14,18,33,38–44. During the database construction, the following inclusion criteria were applied to ensure data quality and consistency: (1) Only rectangular-section beams with corrosion states obtained through electrochemical accelerated corrosion tests were included; (2) All specimens in the database were subjected to either a single concentrated load or symmetric two-point loading; (3) All specimens must have complete records of the ten input variables and the output shear strength. The experimental setup and relevant parameters for the CRC beam shear tests are illustrated in Fig. 1. As shown, the key indicators and influencing parameters considered in the investigation of CRC beam shear strength include: 1)Target variable: shear strength (Vu); 2) Material properties: concrete compressive strength (fc), longitudinal reinforcement yield strength (fy), stirrup yield strength (fyv); 3) Geometric features: height-to-width ratio (d/b), shear span-to-depth ratio (a/d), stirrup spacing (S); 4) Reinforcement configuration features: longitudinal reinforcement ratio (ρl), stirrup ratio (ρv); 5) Corrosion parameters: longitudinal reinforcement section loss ratio (ηl), stirrup section loss ratio (ηw). Schematic diagram of shear test parameters for CRC beam. Statistical analysis of the CRC beam shear strength database is summarized in Table 2. The distributions of all variables are illustrated in Fig. 2, showing their respective ranges. Specifically, the ranges of fc, fy, fyv, d/b, a/d, S, ρl, ρv, ηl, and ηw span from 20.00 to 50.00 MPa, 210.00 to 706.00 MPa, 275.00 to 626.00 MPa, 0.87 to 1.83, 1.00 to 4.70, 80.00 to 250.00 mm, 1.22% to 3.27%, 0.10% to 0.90%, 0.00% to 26.00%, and 0.00% to 97.20%, respectively. The output variable, Vu, ranges from 26.60 to 204.00 kN. A combined examination of Table 2; Fig. 2 indicates that the database covers a wide parameter space with relatively uniform distributions, providing a solid foundation for developing ML models to predict CRC beam shear strength. Specifically, further analysis of Fig. 2(j) reveals that the distribution of ηw exhibits a positive skewness. Most specimens have ηw ≤ 25%, while only a small proportion of specimens have ηw > 60%. This indicates that although the database covers a wide range (with ηw reaching up to 97.2%), the data density in the high-corrosion region (ηw > 60%) is relatively low. Therefore, for specimens with data clustering or imbalance, the prediction results should be interpreted with greater caution. Table 2Distribution of CRC beam parameter statistics.TypeParameterUnitStatisticsMinMaxMeanSDInput f c MPa20.0050.0030.188.69Input f y MPa210.00706.00440.92121.97Input f yv MPa275.00626.00391.56105.79Input d/b -0.871.831.320.27Input a/d -1.004.702.380.86Input S mm80.00250.00153.5844.92Input ρ l %1.223.272.180.43Input ρ v %0.100.900.340.19Input η l %0.0026.004.145.94Input η w %0.0097.2025.7024.57Output V u kN26.60204.00100.9734.29 Distribution of CRC beam parameter statistics. Distribution of shear strength parameters for CRC beams. Data correlation analysis Figure 3 presents the Pearson correlation matrix among the features influencing CRC beam shear strength. The correlation coefficients among the input variables range from [-0.77, 0.56], while those between the input and output variables fall within [-0.37, 0.32]. Only the correlation coefficients between the stirrup ratio and shear strength (0.56), and between stirrup spacing and stirrup ratio (-0.77), exceed 0.5. According to empirical guidelines in machine learning45,46, when the absolute value of the correlation coefficient between variables is below 0.8, there is no significant multicollinearity among the parameters, and the relationships exhibit complex nonlinearity. Overall, these results indicate that the relationship between shear strength and the ten input variables is not a simple multivariate linear one, necessitating the establishment of nonlinear mapping relationships between shear strength and multiple influencing parameters. Therefore, adopting ML techniques to capture these nonlinear relationships is essential. Correlation analysis among shear strength variables. Intelligent prediction method for CRC beam shear strength Ensemble Learning Single models often suffer from diminishing returns in predictive accuracy. Ensemble learning enhances performance and robustness by combining multiple learners47,48. It is broadly categorized into base-learner and meta-learner ensembles. Base-learner methods, typically decision-tree-based, form Bagging and Boosting. Meta-learner methods employ stacking to integrate different models for improved generalization. Bagging-based ensemble methods Bagging was first proposed by Breiman49 to enhance the accuracy and stability of models such as classification and regression trees (CART). The core of this method lies in bootstrapping, which involves repeatedly sampling with replacement from the training set to generate multiple distinct bootstrap sample sets. Each set is used to train a base learner, and the final ensemble output is formed by aggregating the predictions from all base as illustrated in Fig. 4, Bagging adopts a parallel training strategy in which all base learners are mutually independent. Bagging integration learning algorithm principle. Random Forest (RF)50 is a representative ensemble learning method constructed based on the Bagging strategy. Building upon Bagging with decision trees as base learners, RF further introduces random feature selection during tree construction. Specifically, RF employs randomized decision trees, where only a subset of features is considered at each split. Owing to its simplicity, ease of implementation, and low computational cost, RF has demonstrated strong performance in many practical applications. A schematic illustration of the RF is shown in Fig. 5. Its core idea is to average the outputs of multiple decision trees, thereby reducing model variance and improving generalization ability. The RF prediction output can be expressed as: Principle of the RF algorithm. Each tree is trained using bootstrap sampling, and at each split, features are randomly selected from a feature subset to determine the optimal split. The splitting objective of a single tree node is to minimize the squared error: where L and R denote the left and right child nodes, respectively; RL and RR represent the left and right subsets after splitting; and the overbars indicate the mean values of the target variable in the corresponding subsets. Boosting-based ensemble methods Unlike Bagging, which trains base learners independently and in parallel, Boosting51 constructs a strong learner through a sequential and iterative process. Its fundamental idea is to train a series of weak learners in sequence, where each subsequent learner focuses on correcting the errors of the preceding models, thereby progressively improving overall performance, as shown in Fig. 6. Boosting integration learning algorithm principles. When decision trees are adopted as weak learners and combined with the Boosting strategy, the Gradient Boosting Decision Tree (GBDT) model is obtained. GBDT performs optimization in function space via gradient descent, with each tree learning the residuals of the ensemble formed by all previous trees. By incorporating regularization terms and optimizing the computation of second-order derivatives, the training efficiency of GBDT is enhanced while maintaining predictive performance, leading to the development of the efficient and flexible boosting model XGB. The XGB iteratively adds weak learners to fit the residuals, ultimately summing the prediction scores from all weak learners to obtain the final sample prediction. The underlying principle is illustrated in Fig. 7. At present, XGB has been successfully applied in numerous fields and exhibits distinct advantages in scenarios involving limited training samples and short training time requirements52. These characteristics make it particularly suitable for developing shear strength prediction models based on experimental shear test data. The main principles for establishing a shear strength prediction model using XGB are described as follows. Given a dataset defined as: Principle of the XGB algorithm. where is the feature vector of the i-th sample, and yi represents its corresponding shear strength value. XGB combines multiple functions fk through an additive model. At iteration k + 1, the predicted value for the i-th sample is updated as follows: The objective is to optimize model performance by minimizing the loss function . XGB incorporates a regularization term to control model complexity, building upon traditional loss functions: The loss function is approximated via a second-order Taylor expansion as follows: XGB ultimately achieves iterative residual fitting and model updates by progressively constructing weak learners and continuously optimizing the objective function defined in Eq. (8). Stacking-based ensemble methods The Stacking ensemble method uses the prediction results of multiple base learners (primary learners) as meta-features, which are then fed into a meta-learner (secondary learner) for a second-stage learning process to produce the final prediction34. This hierarchical strategy consists of two layers: the first layer comprises N independently trained base learners that generate predictions in parallel; the second layer is the meta-learner, which is trained using the outputs from the first layer as inputs, thereby significantly enhancing the model’s generalization capability and overall performance. Based on a combination strategy of model diversity and individual learning capability53, this study constructs a five-fold cross-validation Stacking model consisting of four base learners (DT, RF, GBDT, XGB) and one meta-learner (Lasso regression) (see Fig. 8). The meta-learner is typically selected as a model with strong generalization ability or a simple structure to reduce overfitting54. In this paper, Lasso regression is adopted as the meta-learner, whose L1 regularization term can constrain model complexity and penalize overly large coefficients, thereby enhancing generalization capability. Architecture of the Stacking model. The mathematical formulation of the Stacking framework is as follows. For the j-th base learner, its predictive output is given by: where Fj denotes the mapping function of that particular base learner, x represents the input features. The input vector Pi to the meta-learner is formed by concatenating the original features with the outputs from each base learner: Principle of the SSA When optimizing parameters in ML algorithms, challenges such as low efficiency, poor generality, and limited generalization ability often arise. Intelligent optimization algorithms provide an effective solution by efficiently searching for optimal hyperparameters. SSA is a swarm intelligence optimization algorithm inspired by the foraging behavior of sparrows, which classifies the population into two categories: producers and followers. In the t + 1 iteration, the position of producers is updated according to the rule shown in Eq. (11). Followers are the individuals in the population excluding the producers. After the producers update their positions, followers move toward the location with the richest food, that is, the producer with the lowest fitness value. The position update rule for followers in the t + 1 iteration is as follows: Once all individuals complete position updates, a portion of the sparrows is randomly selected as sentinels (in this study, the sentinel proportion is set to 10%). Sentinels can be either producers or followers. They abandon their current positions and move to new locations, helping the population avoid local optima and maintain diversity. Sentinels at the population edge quickly move toward the current optimal position, whereas those at the center move randomly. The position update of sentinels is expressed as follows: Hyperparameter optimization framework Hyperparameter optimization directly impacts model performance and generalization capability. Traditional methods, such as grid search and random search, are limited due to their high computational cost and low efficiency. In contrast, swarm intelligence optimization algorithms leverage their strong global search ability and high convergence efficiency to more effectively locate high-quality parameter regions, significantly improving optimization efficiency. Given that the SSA has been validated as effective in similar studies and the optimized model achieves satisfactory predictive performance55, this paper adopts it as the hyperparameter optimization tool. In this study, a ML hyperparameter optimization framework based on the SSA-ML is developed by integrating experimental data and mathematical principles. To avoid the risk of hyperparameter overfitting that may result from directly optimizing the training set RMSE, this framework adopts the 5-fold cross-validation root mean square error as the fitness function. The model hyperparameters are used as optimization variables, and the optimization objective is to stabilize the fitness value upon reaching the maximum number of iterations. The overall workflow of the SSA-ML optimization framework is illustrated in Fig. 9. Flowchart of SSA-ML model. Principle of SHAP Lack of interpretability is a key bottleneck limiting the practical application of ML algorithms, especially complex ensemble models such as Stacking, in engineering. To establish a link between model predictions and underlying physical mechanisms, an intuitive and reliable explanation method is required. To address this, Lundberg et al.56 proposed the SHAP framework based on Shapley values from cooperative game theory. This method treats features in the model as game players and the prediction as the cooperative payoff, computing each feature’s contribution for a given sample, the SHAP value, thereby enabling quantitative and visual interpretation of the model. Specifically, for a ML model with M input features, the input variable set can be represented as X = (x1, x2, …, xp). SHAP constructs an additive explanation model g(x′) to approximate the prediction of the original model at a given sample. The explanation model can be expressed as: where φ0 is the mean predicted shear strength value of the model; φi is the SHAP value of the i-th feature; S is the set containing the non-zero index x′; f(S) is the model prediction based on subset S. Through the SHAP value decomposition technique, the contributions of each feature are algebraically summed to fully reconstruct the evolution path of the estimated value of the model from the baseline state to the ultimate result, thereby clarifying the dynamic regulation mechanism of feature parameters on the prediction result. This game theory-based interpretability analysis method effectively reveals the quantitative basis of the model’s decision-making under the coupling effect of multiple features. Research results and analytical discussion Data standardization and evaluation metrics Because the original input and output variables span a wide range, normalization is applied to avoid outlier effects, reduce training time, and accelerate model convergence. The raw data are normalized using the following linear mapping function: where xmax and xmin are the maximum and minimum values. To compare the generalization ability of different models, four commonly used regression evaluation metrics, R², RMSE, MAE, and MAPE, are employed to assess the predictive performance of each model. where xi represents the experimental result; yi represents forecasted result; pi is the average experimental value;is the average forecasted value. Model training workflow and optimal hyperparameters The model training process, illustrated in Fig. 10, begins by dividing the dataset into training and test sets in an 8:2 ratio34. The input parameters (fc, fy, fyv, d/b, a/d, S, ρl, ρv, ηl, ηw) are standardized, and the SSA is employed for hyperparameter optimization. 5-fold cross-validation is applied during training to enhance model robustness. Based on this setup, modeling is conducted using the single DT algorithm and four ensemble learning algorithms, RF, GBDT, XGB, and Stacking, on the same training-test split. The predicted shear strength values are generated, and corresponding evaluation metrics are calculated. The optimal hyperparameters for each model are listed in Table 3. Model training steps. Table 3Parameters of ML models.ModelHyperparametersOptimization rangeNoteDTMin samples leaf1 ~ 103Max depth1 ~ 508GBDTN estimators10 ~ 500100Max depth1 ~ 106XGBN estimators10 ~ 500100Max depth1 ~ 109RFN estimators10 ~ 400200Max depth1 ~ 507 Parameters of ML models. Evaluation of the generalization performance of models Figure 11 illustrates the comparison between shear strength predictions and measured values for each model on the training set. It can be observed that most prediction points of the five models fall within the ± 20% error band. The single learning model DT exhibits a relatively scattered distribution of predictions, with some points deviating markedly from the error band, indicating large prediction fluctuations and poor stability. In contrast, the ensemble learning models adopted in this study (Stacking, RF, XGB, and GBDT) show a significantly higher proportion of predictions within the ± 20% error range, demonstrating their superior capability in accurately predicting the actual shear strength of specimens. Further comparison reveals that the Stacking model achieves the best fitting performance among all models. ML predictions of shear strength for CRC beams in the training set. Quantitative error analysis indicates that the R² values of the Stacking, RF, XGB, GBDT, and DT algorithms are all higher than 0.90 (0.9954, 0.9717, 0.9729, 0.9629, and 0.9229, respectively), suggesting that all five models exhibit good predictive accuracy. The RMSE of the Stacking model is 2.4105, which is reduced by 3.3107, 3.1119, 3.9068, and 6.7019 compared with RF, XGB, GBDT, and DT, respectively. Its MAE is 1.4026, representing reductions of 2.7586, 2.8052, 3.5214, and 4.8969 relative to RF, XGB, GBDT, and DT, respectively. Moreover, its MAPE is 0.0167, which is lower by 0.0258, 0.0324, 0.0354, and 0.0483 than those of RF, XGB, GBDT, and DT, respectively. The results indicate that the Stacking model significantly outperforms other models across all evaluation metrics and exhibits the smallest prediction deviation. Figure 12 presents the prediction results of each model on the test dataset. All ensemble learning models exhibit strong predictive performance, with most prediction points located within the ± 20% error band, indicating good generalization ability. In terms of the deviation between predicted and experimental values, the Stacking model performs best, followed by RF, XGB, and GBDT, whereas the DT model shows relatively weaker performance. This confirms that the proposed models achieve high computational accuracy and low variability. On the testing set, the Stacking model achieves an R² of 0.9727, an RMSE of 4.7727, an MAE of 2.9271, and a MAPE of 0.0300. Among the compared models, the proposed model yielded the highest R² together with the lowest RMSE, MAE, and MAPE, indicating the best overall predictive performance under the adopted testing setting. ML predictions of shear strength for CRC beams in the testing set. Comprehensive performance comparison of different models To evaluate the applicability of ensemble learning models for predicting the shear strength of CRC beams, comparative and visual analyses were conducted using multiple evaluation metrics. Figure 13 presents the performance comparison results of the different models. It can be observed that the prediction accuracy on the training set is generally higher than that on the test set. Nevertheless, the ensemble learning models maintained good predictive performance on the test set, indicating reasonable model stability under the adopted training-testing scheme. Moreover, the Boosting-, Bagging-, and Stacking-based ensemble learning models developed in this study all achieve higher fitting accuracy than the single supervised learning model (DT), with the Stacking model exhibiting the best performance on both the training and test datasets. Comparison of performance metrics for shear strength models. All five machine learning models effectively avoid overfitting and underfitting, with Stacking performing particularly well for the following reasons: (1) By combining multiple base models, it reduces bias and variance, improves robustness, and fully exploits the information contained in limited samples; (2) It better captures the nonlinear and piecewise characteristics of the mechanical behavior of corroded reinforced concrete beams, achieving higher prediction accuracy and stronger anti-overfitting capability under small-sample conditions. Based on its comprehensive performance, this paper recommends the Stacking model for predicting the shear strength of CRC beams. It should be noted that this study uses a single 8:2 random split (180 specimens, with 144 in the training set and 36 in the test set). The limited size of the test set means that reported metrics such as R²=0.9727 may be affected by randomness. To address this, 5-fold cross-validation was already employed during hyperparameter optimization to ensure stability, and the test set results still provide valid reference value. Future research is advised to adopt multiple repeated random splits (e.g., 10 times) and report the mean and standard deviation of the performance metrics to obtain a more robust assessment of generalization capability. Analysis of comparison results with empirical models Analysis of empirical models To systematically evaluate the effectiveness of the proposed CRC beam shear strength prediction model, a three-stage comparative analysis framework is designed in this study: (1) experimental data reported in Literature13,14 are selected as the baseline comparison dataset; (2) existing mathematical models from the literature, together with CRC beam shear strength equations modified from the structural design code GB50010-2002, are adopted as benchmark mathematical models for prediction comparison; (3) a unified evaluation index system is established to examine the significance of performance differences among the various models. The sources and calculation formulas of the relevant empirical models are summarized as follows. (1) Xu and Niu Model14. The Xu and Niu Model is developed based on limit equilibrium theory and establishes a calculation model for the shear strength of CRC beams that explicitly accounts for the influence of stirrup corrosion. The corresponding expressions are given in Eqs. (21) ~ (23). (2) Xue Model13. The Xue Model is derived from a modified truss-arch theory and is formulated to predict the shear strength of CRC beams. This model incorporates the effects of longitudinal reinforcement corrosion, and its specific expressions are provided in Eqs. (24) ~ (27). (3) Lu Model9. The Lu Model is an extension of the Xue Model, in which a reduction factor that simultaneously considers the effects of stirrup corrosion and the shear span-to-depth ratio is introduced. Based on this factor, a new empirical prediction model for the shear strength of CRC beams is proposed. The detailed expressions of this model are given in Eqs. (28) ~ (31). (4) Li Model19. The Li Model is developed by modifying the RC beam shear strength equations in the design code GB50010-2002 to account for CRC beams. This model considers the reduction in cross-sectional dimensions (width and depth) caused by corrosion, as well as the degradation of stirrup yield strength. The corresponding expressions are presented in Eqs. (32) ~ (33). Analysis of model comparison results Figure 14 compares, for each specimen reported in Literature13,14, the experimental values with the predictions obtained from two categories of models. The results indicate that the existing empirical models exhibit noticeable bias and uncertainty in both prediction accuracy and stability. Specifically, the Li Model yields overall conservative predictions, with all predicted values falling below the experimental measurements and exhibiting relatively large overall errors. In contrast, mathematical models developed using data from their respective original studies show better agreement with the corresponding experimental results, whereas the ML model constructed in this work demonstrates an even higher level of consistency with the experimental data. Comparison of Stacking model predictions with empirical models. (a) Literature14, (b) Literature13. To further quantitatively assess predictive performance, Table 4 compares the literature-based mathematical models with the proposed Stacking model in terms of key statistical metrics, including R², RMSE, MAE, and MAPE, as well as the mean and CV between experimental and calculated values (Vu/Vu, pred). The results reveal that the Stacking model performs exceptionally well in both accuracy and stability, exhibiting high computational precision and low variability, whereas the empirical models show relatively poor performance across all indicators. The specific findings are summarized as follows: Table 4Comparison of calculation results for different shear strength prediction models.LiteratureModel R 2 RMSEMAEMAPEVu/Vu, predCVXu and Niu [14]Xu and Niu Model0.583518.152614.73810.15631.17930.13Li Model-0.684962.251155.69900.58432.54540.24Stacking0.99322.65111.74550.02240.98000.04Xue [13]Xue Model-0.753131.641625.62880.25760.85910.21Lu Model0.240215.305212.90500.13690.88330.07Li Model-0.716741.369339.03000.41421.72490.11Stacking0.94094.50073.22580.03750.98860.05Note: A negative R² indicates the model performs worse than a simple horizontal line predicting the mean of the data. Comparison of calculation results for different shear strength prediction models. Note: A negative R² indicates the model performs worse than a simple horizontal line predicting the mean of the data. (1) For the existing calculation models reported in Literature 14, the R² values are 0.5835 and − 0.6849, respectively, deviating markedly from the ideal value of 1. The mean ratios of experimental to predicted values are 1.1793 and 2.5454, respectively, accompanied by high coefficients of variation, indicating pronounced prediction fluctuations. The empirical model presented in Literature 13 likewise exhibits unsatisfactory predictive performance. These results demonstrate that existing mathematical models have clear limitations in accurately predicting the shear strength of CRC beams and are unable to provide stable and reliable guidance for engineering applications. (2) In contrast, the Stacking model achieves substantially superior predictive performance, with R² values reaching 0.9409 and 0.9932, respectively. Its RMSE, MAE, and MAPE are all the lowest among the compared models, and the coefficients of variation of the experimental-to-predicted value ratio are only 0.04 and 0.05. This indicates that the ML model based on the Stacking algorithm offers the combined advantages of high accuracy and low dispersion in predicting the shear strength of CRC beams. Through detailed analysis, this study identifies the main reasons for the inaccurate predictions of existing empirical models as follows: (1) insufficient representation of corrosion effects, most models merely introduce corrosion parameters in a simplified manner to modify shear strength, failing to adequately capture the complex interaction mechanisms between corrosion processes and the concrete matrix; (2) neglect of nonlinearity and coupling effect, the shear strength of CRC beams generally exhibits pronounced nonlinear relationships with influencing factors, along with significant coupling among variables, whereas existing models are often based on linear or overly simplified assumptions and thus cannot comprehensively describe these complex interactions; (3) limited data support and validation, most models are developed using relatively small, self-collected datasets, and their parameters have not been sufficiently validated against large-scale data, resulting in inadequate reliability and generalization capability. In summary, existing prediction methods for the shear strength of CRC beams commonly suffer from insufficient accuracy, high result dispersion, and limited applicability, making them difficult to meet the practical engineering demands for stable and reliable modeling. By contrast, the ensemble learning model developed in this study enables accurate and efficient prediction of this key performance indicator, thereby providing more scientific and reliable support for the performance assessment and engineering application of CRC beams. SHAP-based quantification of model feature contributions The SHAP analysis in this study is applied to the final trained Stacking model (i.e., the meta-learner together with the fixed base learners). It should be clarified that although the meta-learner internally receives both the original features and the outputs of the base learners as inputs, the SHAP analysis presented in this paper attributes the contributions to the original physical variables by tracing the combined effect through the base learners and the meta-learner. Specifically, the SHAP values for the Stacking model were computed as a function of the ten original input variables because our objective is to interpret the model predictions using physically meaningful engineering parameters. Global feature analysis To enhance Stacking model transparency, SHAP analysis quantifies input contributions to predicted shear strength of CRC beams (Fig. 15). Global importance is ranked by mean absolute SHAP value; larger values indicate stronger contribution to model predictions. As shown in Fig. 15, d/b, fyv, and a/d are the three most influential variables, with SHAP values of 16, 10.72, and 9.34, respectively. In contrast, the contributions of ρv, ηl, S, and fy are relatively minor, with SHAP values all below 2.0. Among these, the contribution of stirrups needs to manifest synergistically with the yield strength and corrosion level; the influence of ρv alone is limited. This ranking not only corroborates previous findings that identify d/b and a/d as key parameters 21,22, but also highlights fyv as an additional important factor, demonstrating that the proposed model achieves feature identification that is both theoretically grounded and practically meaningful from an engineering perspective. Feature importance ranking for the Stacking model. Figure 16 further presents a SHAP beeswarm plot to illustrate the distribution of feature contributions across the dataset. The horizontal axis represents the SHAP values, while the vertical axis lists the features ranked by their importance. The color gradient indicates the magnitude of the feature values, with blue representing lower values and red representing higher values. For the six most influential features, namely d/b, fyv, a/d, fc, ηw, and ρl, the plot shows that their contributions vary across samples and are not strictly linear over the investigated range. In particular, the SHAP values of d/b, fyv, and ρl exhibit a pronounced negative trend as the feature values increase, whereas a/d and ηw show a negative correlation with shear strength, with their SHAP values decreasing progressively as the parameter values increase. These observations are broadly consistent with existing engineering understanding reported in the literature 9,22 regarding the influence of geometric characteristics, reinforcement properties, and corrosion-related deterioration on CRC beam shear strength. SHAP beeswarm plot for the Stacking model. Individual-level SHAP analysis While the global SHAP analysis describes the overall behavior of the model, local SHAP analysis helps explain how the prediction for an individual specimen is formed. Figure 17 presents the individual SHAP analysis results for shear strength of two randomly selected CRC beam specimens. SHAP local feature explanations. Taking Samples A-1 and A-2 as examples, the feature contribution decomposition shows that features represented by red bars, such as d/b, fyv, fc, ρl and ρv, exert a positive influence on the prediction, whereas features represented by blue bars, such as a/d and ηw, exert a negative influence. Each feature is introduced sequentially, cumulatively producing the overall SHAP effect. Notably, the influence of ηw exhibits variability and nonlinearity across different samples. Contributions vary in magnitude and sign across specimens, indicating non-uniform roles of the same feature. This feature-dependent and sample-dependent behavior is consistent with the fact that CRC beam shear strength is influenced by multiple coupled factors, including geometry, reinforcement condition, material strength, and corrosion deterioration. Feature association analysis To further examine how the model responds to different parameter levels, SHAP dependence plots were used to analyze the relationship between selected input variables and their corresponding SHAP values and reveal interaction effects between different features. In this study, the five most important features identified by the global analysis, namely d/b, fyv, a/d, fc, and ηw, were selected for further discussion, as shown in Fig. 18. Analysis of feature dependence effects on shear strength. Taking Fig. 18(c) as an example, when d/b is large (shown as red points in the scatter plot), the SHAP value decreases as a/d increases, indicating a significant negative correlation between shear strength and a/d. Conversely, when a/d is small, the SHAP value is positive, suggesting that lower a/d contributes to higher shear capacity, which aligns with the findings in Literature 7. From the perspective of mechanical mechanisms, beams with a low a/d ratio primarily exhibit arch action, with loads transmitted through diagonal compressive struts; a high d/b ratio can enhance the stability of the arch. When the a/d ratio exceeds a certain threshold, the load-carrying mechanism shifts to beam action (truss analogy), and the shear strength becomes more dependent on the contribution of the stirrups. Furthermore, Fig. 18(e) reveals a threshold effect of stirrup corrosion. As the stirrup cross-sectional loss ratio (ηw) increases, the shear strength of CRC beams generally exhibits a decreasing trend. When the loss ratio is relatively small, it still has a positive influence on strength; however, once the loss ratio exceeds 40%, the shear strength shows significant degradation. This observation is consistent with the findings reported in reference 21. Implementation of a simple user-oriented interface To facilitate interaction with the trained prediction model, a simple user-oriented graphical interface was implemented using Python, as shown in Fig. 19. The interface is intended as an auxiliary tool for parameter input, result display, and interpretation visualization. Its main purpose is to provide a convenient way to use the trained model within the parameter range covered by the compiled database. User-oriented interface for CRC beam shear strength prediction and interpretation. As shown in Fig. 19, the interface primarily comprises the following three core functional modules: (1) Shear strength prediction module: Based on the Stacking ensemble learning framework, this module allows users to input 10 key feature parameters and invokes the pre-trained model to provide real-time predictions and outputs of CRC beam shear strength. (2) Data preprocessing module: Supports importing multi-source data (in CSV/Excel format) and integrates preprocessing tools such as descriptive statistics and correlation analysis to assist users in data exploration and structural understanding. (3) Interpretability analysis module: Built-in with the SHAP interpretability framework, this module supports global feature importance evaluation, single-sample prediction contribution decomposition, and visualization of parameter interaction effects. Conclusion This study presents an interpretable data-driven framework for assessing the shear strength of CRC beams to support deterioration-informed evaluation of corrosion-affected RC members. Using a database of 180 CRC beam specimens, the framework examines relationships between material properties, geometry, reinforcement, corrosion parameters, and shear strength. Within the adopted dataset and setting, the main conclusions are as follows. (1) Compared with Bagging- and Boosting-based ensemble learning models such as RF, XGB, GBDT, and the single DT model, the proposed Stacking model demonstrates the best overall predictive performance. Specifically, it achieved an R2 of 0.9727, an RMSE of 4.7727, an MAE of 2.9271, and a MAPE of 0.0300 on the testing set, with the test predictions falling within a ± 20% error band. These results indicate that the Stacking model provides the most accurate and stable predictions among the considered models for the compiled CRC beam database. (2) Compared with empirical/code-based models, the Stacking model shows closer agreement with experiments and lower dispersion, serving as a useful supplementary tool when complex interactions among geometric, material, reinforcement, and corrosion variables coexist. (3) SHAP-based interpretation improved the transparency of the prediction model by examining the relative contribution and influence trends of the input variables. Global SHAP analysis identifies d/b, fyv, and a/d as key parameters influencing the shear strength of CRC beams. Local explanations further decompose individual predictions into a baseline value plus the contributions of each feature, enabling transparent, sample-specific analysis. Additionally, SHAP feature dependence analysis reveals the nonlinear effects of different parameters on shear strength, providing quantitative constraints for optimizing parameter ranges in traditional mathematical models. (4) Based on the Stacking-SHAP model, an intuitive web-based interactive system for CRC beam shear strength prediction was developed. This interactive web platform reduces operational barriers through visualization, allowing both engineers and non-specialist users to efficiently perform strength predictions and parameter analyses. Although this study has made incremental progress in the shear strength prediction model, the following limitations remain: (1) Prediction accuracy decreases when input data lie outside the range of the training set; (2) The data originate from electrochemical accelerated corrosion tests (uniform corrosion), which differ fundamentally from the localized pitting corrosion observed in natural chloride environments; thus, the transferability of the model to naturally corroded structures still requires validation; (3) The set of feature parameters is limited, and additional key variables need to be incorporated; (4) The effectiveness of data-driven methods is highly dependent on the sufficiency and representativeness of the data. To overcome these limitations, future work should collect shear failure data of CRC beams under long-term natural exposure tests, construct a larger-scale, multi-source heterogeneous shear strength database, and explore techniques such as transfer learning and generative adversarial networks to enhance the adaptability and robustness of the model under data-scarce or distribution-shift conditions. Author contributions G.S. conducted the data collection, model development, analysis, acquired funding, and drafted the manuscript. S.Z. conceived the study, supervised the research, acquired funding, and revised the manuscript. G.Z. contributed to result validation and manuscript revision. T.H. contributed to technical guidance and manuscript revision. All authors reviewed and approved the final manuscript. Funding This work was supported by the General Scientific Research Project of Zhejiang Provincial Department of Education (Grant No. Y202455623) and the Science and Technology Plan Project of Taizhou (Grant No. 25gyb10 and No. 24gyb16). Their supports are gratefully acknowledged. Data availability The datasets generated during and/or analyzed during the current study are available from the corresponding author on reasonable request. Declarations Competing interests The authors declare no competing interests. Footnotes Publisher’s note Springer Nature remains neutral with regard to jurisdictional claims in published maps and institutional affiliations. References Associated Data Data Availability Statement The datasets generated during and/or analyzed during the current study are available from the corresponding author on reasonable request.