Introduction

Generally, the addition of synthetic and bio-polymers provides abundant probabilities to modify the properties of concrete. Accordingly, there has been a growing tendency to use 3D cross-linked polymers denoted as superabsorbent polymers (SAP) within concrete mixtures in recent years. Based on their high absorption capacity1, SAP contains a network of cross-linked polymer chains, and the critical constituent applied is polyacrylate. Primarily, acrylic acid and a cross-linker are polymerized to produce superabsorbent polyacrylates that perform as hydrogels2. The chemical composition of SAP plays a crucial role in water absorption capacity, as well as the type and strength of the cross-linkers. SAP particle size also affects its performance; for instance, cementitious composites containing smaller SAP particle sizes can hold more water and preserve the essential humidity for a more extended period. Dry SAP absorbs water from the environment, providing a water-filled resource within the concrete. Once the moisture content of the environment changes, the SAP wisely and gradually releases the absorbed water to provide a water resource used in various applications in cementitious composites.

Using SAP considerably changes the fresh and hardened characteristics of concrete. For instance, SAP addition affects the hydration degree of cementitious composites, depending on SAP type and water-to-cement ratio, by improving hydration and enhancing the microhardness of the surrounding cementitious composites3,4,5. Also, using SAP affects the rheological characteristics of fresh concrete6,7,8. Adding SAP mitigates the plastic shrinkage cracking by reducing the localized evaporation at the concrete's surface9,10. Moreover, previous studies showed that adding SAP within cementitious composites could reduce shrinkage strain by 75% and control micro-cracks formation11. Furthermore, using SAP hydrogels improves the viscosity of cementitious composites and efficiently regulates the slump of concrete mixtures. SAP is also efficient in both crack-sealing and crack-healing (strength-regaining phenomenon). Regarding crack sealing, previous studies have confirmed crack closure due to the use of SAP within cementitious composites12,13,14,15. Recently, researchers concentrated on SAP's ability to regain mechanical strength after the pre-cracking phenomenon, showing the high efficiency of this polymer in improving the self-healing capacity of different types of concrete16,17,18,19. However, no clear trend was observed regarding concrete compressive strength using SAP. Despite the advantages of SAP for the promotion of the self-sealing and self-healing capacities of concrete, the addition of SAP causes an increase in the macro voids within hardened concrete specimens with varying sizes, undesirably affecting the hardened characteristics such as compressive strength and bond strength20,21,22. In this field, Mousavi et al. (2020)18 reported that adding 0.25%, 0.5%, and 1.0% SAP within normal concrete causes -7.6%, − 23.8%, and − 44.2% reductions in concrete compressive strength, respectively. They found that SAP's particle size and chemistry can significantly affect this concrete strength change. Their experimental works also revealed that using 0.25%, 0.5%, and 1.0% SAP results in − 5.5%, − 40.7%, and − 58.4% reductions in the maximum bond strength, respectively. Similar observations were reported for normal concrete with air-entraining admixture and self-consolidating concrete16,17. Furthermore, as mentioned in Table 1, researchers noted various ranges of strength changes for cementitious composites containing SAP23,24,25,26,27,28,29,30,31,32,33,34,35,36,37. Although most of the literature reported high strength reduction due to adding SAP within concrete mixtures, some studies also reported that SAP concrete slightly has higher concrete compressive strength than the reference concrete. Accordingly, the range of + \(4.2\% \, \le \,Strength \,\,Change\, \le \, - \,60.8\%\) was found by previous studies. Although researchers showed that concrete composition considerably affects the hardened characteristics of concrete38,39, experimental observations indicated that more care should accordingly be taken on the SAP concrete40,41. It can be deduced from the general trend that different parameters affect the mechanical properties of SAP concrete, including concrete composition, SAP chemistry, SAP particle size, SAP percentage, and water absorption capacity of SAP hydrogel. Hence, a practical approach and guidance should be provided for researchers to control this strength reduction issue regarding SAP concrete.

Table 1 Experimental datasets used in the present ML study from the literature.

Many previous studies concentrated on predicting the mechanical characteristics of concrete through artificial intelligence (AI) approaches, such as machine learning (ML) and deep learning (DL). In this case, Tipu et al. (2022)42 presented a unique DL model that relied on an ensemble method for predicting the compressive strength of high-performance concrete. They utilized Particle Swarm Optimization (PSO) to enhance the hyperparameters of the ensemble model. Their results revealed a 41.04% enhancement in model accuracy compared to a single artificial neural network (ANN) model. Tipu et al. (2023)43 developed an ML model and utilized a multi-objective optimization (MOO) algorithm to maximize compressive strength, minimize cost, and reduce CO2 emissions in optimizing the concrete mix proportion. Their findings indicate that the XGBoost regressor model is an efficient algorithm for predicting compressive strength with an impressive accuracy of 98.5%. Tipu et al. (2023)44 presented a predicting model for the compressive strength of concrete containing recycled coarse aggregates considering Newton's Boosted Backpropagation Neural Network method. They reported that the proposed model has an average R2 score of 0.95 and found that critical features of cement, ground granulated blast-furnace slag (GGBFS), binder, superplasticizer, and water/binder meaningfully affect the compressive strength. In this field, Tipu et al. (2023)45 introduced a hybrid stacked ML model for forecasting the compressive strength of high-performance concrete (HPC). Various algorithms were employed in their study, including support vector machine (SVR), decision tree, random forest (RF), gradient boosting (GB), and extreme gradient boost (XGBoost). Their model had an accuracy of R2 = 97.1. Haque et al. (2023)46 performed soft computing to determine the compressive strength of magnesium phosphate cement composites employing hybrid models of DL and ML with a high correlation of R2 ≈ 0.99. Kashem & Das (2023)47 investigated the probability of using hybrid ML models to predict the compressive strength of high-strength concrete, resulting in obtaining a model with the efficiency of R2 = 0.99. In this context, Das & Kashem (2024)48 used ML and hybrid ML techniques to efficiently determine the compressive and flexural strength of ultra-high-performance concrete (UHPC). They also utilized grid search (GS) techniques to regulate model hyper-parameters. Based on the SHapley Additive exPlanations (SHAP) analysis conducted in their study, curing age and steel fiber content parameters they had the most significant favorable influence on UHPC compressive strength and flexural strength predictions. Karim et al. (2024)49 employed different ML algorithms of ANN, XGB, and GBM (Gradient Boosting Model) to predict the compressive strength of concrete containing rice husk ash (RHA) and fly ash (FA). Based on their findings, ML models had a robust correspondence with the experimental results, resulting in a high accuracy of R2 = 0.84 for the XGBoost model. In this context, Kashem et al. (2024)50 conducted a hybrid ML model using algorithms of RF, AdaBoost (AB), and GB, along with the PSO technique, to predict the compressive strength of UHPC. Their model had an accuracy of R2 = 0.9913. Moreover, they reported that based on SHAP analysis age, fiber, cement, silica fume, and superplasticizer had a substantial influence on the compressive strength. Kashem et al. (2024)51 presented an ML model to forecast the compressive strength of RHA-contained concrete, including LightGBM, XGB, and RF, with the precision of R2 = 0.95 and Root Mean Square Error (RMSE) = 255 MPa. Islam et al. (2024)52 employed various ML methods to forecast the compressive strength of HPC, containing GB, RF, and CatBoost algorithms. They found the CatBoost model as the best predictive algorithm with R2 values of 0.979 and 0.959 for the training and testing stages, respectively. Moreover, their findings discovered that age, cement, and superplasticizers are the main affecting factors in predicting compressive strength. Das et al. (2024)53 used conventional DL and hybrid DL models to improve the prediction of concrete compressive strength with the accuracy of R2 = 0.997 and RMSE = 1.45. Along with compressive strength, some other research using ML methods was conducted on various properties of concrete. For instance, Das et al. (2024)54 used ML methods of ANN, natural gradient boosting (NGBoost), and linear regression (LR) models to forecast the construction cost.

One of the novel and efficient approaches for predicting a physical parameter's behavior that depends on many independent parameters is using the ML method as a subdivision of AI. The essential purpose of the ML technique is to automatically learn to recognize complex configurations (relations between features) and then make inventive decisions based on an experimental database denoted as a dataset. Each dataset consists of various input data or features. These features (also called predictors) help the machine establish a predicting model of the output (or target) after the learning procedure. Simply put, the machine arrived at an intellectual maturity level to achieve a rational link between the input data and the target. Though the quantity and quality of datasets play a crucial role in the training procedure, choosing useful features or input variables influences the efficiency of the ML model. Various researchers used this method to predict the properties of different types of concrete55,56,57,58,59,60. However, no specific study has used ML for SAP concrete. Only limited research was conducted to predict SAP-contained concrete's fresh and mechanical properties using ML. For instance, Hilloulin and Tran (2022)61 used an ML approach to estimate shrinkage/expansion in cementitious materials containing SAP and supplementary cementitious materials (SCMs). They used experimental studies of 437 datasets within four ML models, including K-nearest neighbors (KNN), RF, GB, and Extreme Gradient Boosting (XGBoost). They found that the XGBoost model showed the highest precision. Qureshi et al. (2022)62 used numbers datasets in the supervised ML algorithms to predict the autogenous shrinkage of concrete containing supplementary cementitious materials (SCMs) and SAP. They considered different features, including water-to-cement ratio (W/C), water-to-binder ratio (W/B), cement, silica fume, fly ash, slag, the filer, metakaolin, SAP, superplasticizer, SAP size, curing time, and SAP water intake.

Research significance

Based on the existing literature, it can be inferred that there are significant research gaps when it comes to predicting the hardened properties of SAP concrete. Therefore, addressing a considerable research gap is crucial to developing highly effective ML and ensemble models using the existing datasets. Thus, the current study seeks to tackle this problem by focusing on the following objectives. The main aim is to create a dependable ML method that can predict changes in compressive strength in SAP concrete. One crucial aspect of this investigation is analyzing the differences between classification and regression algorithms in the supervised learning framework. In addition, the study seeks to determine the main factors that impact the predictive model for strength variation in SAP concrete. To achieve these objectives, the present study collected a dependable experimental dataset. This dataset was used to predict the change in SAP concrete strength. Ten distinct variables were considered, including fine aggregate, coarse aggregate, max size of aggregates (d), the ratio of fine aggregate-to-total powder, SAP percentage, water-to-cement ratio, total water-to-total powder ratio, age of compressive test (t), SAP size, and compressive strength. Concerning the target parameter, the strength change was evaluated by comparing the compressive strength of SAP concrete with that of normal concrete for each data point. Different regression algorithms were evaluated in the current study, such as XGBoost, decision tree, SVR, k-nearest neighbors (KNN), and random forest. In terms of the classification method, various algorithms were also taken into account to predict strength reduction. These include support vector machine (SVM), random forest, LightGBM, XGBoost, logistic regression, and decision tree. In addition, SHAP analysis was utilized in the current study to identify the most critical inputs. While both regression and classification tasks were deemed satisfactory in terms of accuracy, it was observed that the utilization of ensemble learning greatly enhanced the model's accuracy. Finally, a web-based application has been developed with an ensemble learning method to predict the precise reduction in compressive strength resulting from the incorporation of SAP.

Machine learning method (ML)

Figure 1 displays a flowchart that outlines the methodology of the ML approach utilized in the current investigation. The ML methodology comprises three primary components, namely data preprocessing, data visualization, and ML algorithms. The subsequent subsections explain each of these divisions.

Figure 1
figure 1

Flowchart presenting the methodology of the ML technique used in the present study.

Data preprocessing

Three distinct activities are outlined for the data processing stage, encompassing data cleaning, handling missing data, and data encoding (Fig. 1). The initial step involves identifying and removing any outliers in order to obtain a dependable dataset. Outliers are small portions of datasets that are inherently different from the remainder of the dataset. These datasets of outliers are frequently irregular experimental databases that depart from the normal data distribution. They are often caused by poor data entry or imprecise observations. The experimental datasets were collected from researchers around the world, taking into account varied concrete compositions and types of SAP, as indicated in Table 1. Subsequently, the database underwent a verification process to remove any data points that deviated significantly from the normal range. The present study provides a summary of the descriptive statistics for the datasets before the removal of outliers. These statistics can be found in Table 2. Figure 2 demonstrates the process of outlier detection for each parameter, displaying the distribution of variables with and without the inclusion of skewed datasets. Regarding fine aggregate, analysis of datasets shows that fine aggregate lower than 900 kg/m3 shows the lowest deviation, and those higher than this range were considered outliers. Regarding the coarse aggregate, a range of 700 kg/m3 to 1400 kg/m3 was selected after outlier removal. According to the dataset analysis, the range of \(10\, < \,Max\,\, d\, \le 22\) was chosen for maximum aggregate size. It can be deduced from Fig. 2 that the fine aggregate-to-total powder ratio should be higher than 0.60 to achieve a reliable ML model. Analysis of SAP% distribution showed that no considerable outlier removal was necessary, so \(0\, < \,SAP\% \, \le \,0.60\) was consequently considered for the ML model. Similarly, \(0.25 < W/C \le 0.55\) was the appropriate range after outlier removal. As shown in Fig. 2, the total water-to-total powder ratio ranging from 0.20 to 0.60 was selected based on the parameter distribution curve. No outlier was found for the compressive age of SAP samples. However, regarding SAP size, a maximum size of 0.30 mm was considered the best upper bound after the outliers' removal. A range of 30–100 MPa was kept as the primary database of concrete compressive strength, while datasets out of this series were considered outliers (Fig. 2). It is worth mentioning that concrete compressive strength of SAP concrete was regarded as an input variable or predictor while comparing (normalizing) this value with the compressive strength of normal concrete (denoted as strength reduction%) was selected as the target parameters. Statistical analysis confirmed that the range of − 5.0 to 35% is appropriate for strength reduction (target parameter) after outliers' removal. It is important to note that as most of the literature summarized in Table 1 confirmed that SAP causes a considerable reduction in the compressive strength, negative and positive values of strength reduction parameter correspond to the higher and lower strength of SAP concrete compared to normal concrete. As indicated in the flowchart of the ML approach (Fig. 1), there are missing data in the datasets that were addressed by replacing them with the mean values during the analysis. Additionally, the data encoding procedure was executed following the evaluation of data preprocessing. During this stage, the strength reduction percentage output parameter was divided into three categories, with data encoding values ranging from 0 to 2, where (1) zero corresponds to the datasets with negative values for the strength reduction or higher SAP concrete strength as compared to normal concrete; (2) classification of 1 shows strength reductions ranging from 0 to 15%; and (3) classification of 2 depicts the range of \(15\, \le \,strength\,\, reduction\% \, < \,35\%\).

Table 2 Descriptive statistics of the input and target variables used in the ML models before outlier removal consideration.
Figure 2
figure 2

The procedure of outlier's detection: (a) fine aggregate; (b) coarse aggregate; (c) maximum aggregate size; (d) fine aggregate/total powder ratio; (e) SAP percentage; (f) initial water/cement ratio; (g) total water/total powder ratio; (h) age of compressive samples; (i) SAP size: (j) compressive strength: (k) strength reduction (The left one shows the database before outliers' removal & right one represents the samples without outliers).

Data visualization

To visualize the datasets, various plots of distplot, pair plot, heatmaps, and joint plot kernel density estimation (KDE) are shown in this section. A distribution plot (called Distplot) is considered to distinguish data in histogram form. A distplot signifies a univariant set of collected data, showing the data distribution of each feature compared to another one. As indicated in Fig. 3, the distribution plot of fine aggregate content depicts that most experimental databases have fine aggregate content in the 550–900 kg/m3 range. Also, distribution curves of coarse aggregate content and max d show a higher range with better distribution. The analysis demonstrates that most datasets have a ratio of fine aggregate-to-total powder ranging from 1.2 to 1.6. The common dosages of SAP used in the literature to study the strength reduction percentage were lower than 0.40% (Fig. 3). Regarding the initial W/C ratio, most datasets correspond to the range of 0.45–0.50. Similarly, Fig. 3 shows that the total water-to-total powder ratio of the majority of datasets is located in the range of 0.45–0.050. Additionally, concrete compressive strength ranges from 40 to 70 MPa in most samples. No specific dataset concentration was found for compressive age and SAP size variables. Finally, the distribution plot shows that the strength reduction percentage of datasets covers a wide range of values without any concentration in a specific one (Fig. 3).

Figure 3
figure 3

Distribution plot of variables.

To demonstrate the interactions between two features, the heatmap plot is presented in Fig. 4. Varying cell's color for each axis demonstrates the forms in value for one or both features ranging from − 1.0, showing a perfect negative linear correlation to 1.0 indication of the perfect positive linear correlation. The value of 0 labels no linear correlation between the two variables. Generally, the heatmap plot determines the independence of the parameters. For example, the first row of this plot illustrates that fine aggregate content appears adversely interrelated with coarse aggregate content. For the next row, it can be inferred from the graph that there is a significant positive relationship between the amount of coarse aggregate and the max d (+ 0.94). Also, analysis of the heatmaps plot displays that the ratio of fine aggregate-to-total powder has negatively correlated with both the concrete compressive strength (− 0.67) and strength reduction (− 0.35). This is an interesting finding of the heatmaps plot, indicating that although a high value of this ratio causes a decrease in the compressive strength, it compensates (or delays) the strength reduction percentage. As shown in Fig. 4, the SAP percentage has a positive + 0.61 correlation with the strength reduction. On the other hand, a higher dosage of SAP results in a higher reduction in compressive strength. Moreover, the heatmap plot confirms that the W/C ratio is negatively related to the compressive strength (− 0.85), which is an obvious finding for cementitious composites. Furthermore, a slight correlation was also found between SAP size and the compressive strength of SAP concrete, which was previously confirmed by experimental work presented by Mousavi et al. (2020)18.

Figure 4
figure 4

Heatmap plot of variables.

Bivariate Kernel Density Estimation (KDE) jointplot of variables versus the strength reduction percentage for the classification method is shown in Fig. 5. The KDE is a non-parametric method demonstrating the possibility of the density of an independent parameter. This plot covers two plots, including (1) a bivariate figure representation of how the dependent output (strength reduction percentage) vagaries with the disparity of independent features and (2) the scattering plot positioned at the top of the bivariate graph to show the distribution of the independent features. KDE distribution jointplot shows no clear trend for fine aggregate, coarse aggregate, and max d. However, results show that the density of strength reduction is the highest for the fine aggregate/total powder ratio, which is higher than 1.50. Also, Fig. 5 depicts that the high density of strength reduction is due to the SAP percentage being lower than 0.40%. Regarding the initial W/C and total water-to-total powder ratios, this range is 0.40–0.50. Moreover, the bivariate KDE jointplot shows that most of the output data were assigned to the 28-day compressive strength. No clear trend was found for the SAP size parameter. To conclude, the KDE distribution jointplot indicates that the dominant domain of strength reduction percentage has a concrete compressive strength of 40–80 MPa (Fig. 5).

Figure 5
figure 5

Bivariate KDE jointplot of variables for classification method (darker colors represent higher densities): (a) fine aggregate (b) coarse aggregate (c) maximum aggregate size (d) fine aggregate/total powder ratio (e) SAP percentage (f) compressive strength (g) initial water-to-cement ratio (h) total water/total powder ratio (i) age of compressive samples (j) SAP size.

As depicted in Fig. 6, classification number 1 has the highest number of datasets for the training procedure of strength reduction prediction, considering that this dataset is used to train the machine, which results in an inaccurate prediction model. Hence, the synthetic minority oversampling technique (SMOTE) is considered in the present work to increase the number of datasets for training the machine so that similar numbers of datasets are located for each classification (Fig. 6). This approach is a frequently utilized oversampling method to achieve a balanced training dataset. By duplicating them, this method irregularly increases minority class instances to stabilize the class distribution. It is worth stating that SMOTE is only used for training the machine, while experimental datasets are considered for testing.

Figure 6
figure 6

Synthetic Minority Oversampling Technique (SMOTE) on Training Data.

Performing feature importance analysis is necessary before starting the ML model in the data visualization step. Feature importance analysis signifies the worth of each input feature for predicting the strength reduction parameter. A parameter with higher feature importance has a more substantial effect on the predicting model of strength reduction. As shown in Fig. 7, results of feature importance indicate that SAP percentage, concrete compressive strength, SAP size, and total water-to-total powder significantly influence the predicting model of strength reduction. However, compressive strength test age (t), maximum aggregate size (d), and coarse aggregate content have the lowest impacts on the model (Fig. 7).

Figure 7
figure 7

Feature importance results for predicting strength reduction.

Machine learning algorithms and model evaluation

The data used in this study, along with a concise overview of the ML algorithms and data visualization methods employed, is available in the supplementary file. Various statistical measures are considered in the present investigation to check the proficiency of regression and classification algorithms in predicting the strength reduction percentage. For the regression algorithms, some factors are measured in the current work as follows:

$$RMSE = \sqrt {\frac{{\sum\nolimits_{i = 1}^{n} {\left( { Y_{i} - \widehat{Y}_{i} } \right)^{2} } }}{n}}$$
(1)
$${\text{MAE}} = \frac{{\sum\nolimits_{i = 1}^{n} {\left| {Y_{i} - \widehat{Y}_{i} } \right|} }}{n}$$
(2)
$${\text{MSE = }}\frac{1}{n}\sum\limits_{i = 1}^{n} {\left( {Y_{i} - \widehat{Y}_{i} } \right)^{2} }$$
(3)

Regarding Eq. (1), RMSE denotes the square root of the error function, which needs to be decreased by the regression algorithms to fit the datasets properly. As stated in Eq. (2), Mean Absolute Error (MAE) is considered the sum of the error values. However, the use of absolute value instead of squaring makes it more tolerant of large estimate errors. R Square (\(R^{2} )\) analyzes how much the regression algorithms can define variableness in a dependent parameter. As indicated in Eq. (3), MSE stands for Mean Squared Error, which measures the proximity of a fitted line to the datasets. In this equation, \(n\) is the number of data points, \(Y_{i}\) is the observed values and \(\hat{Y}_{i}\) is the estimated value. Besides these conditions, the accuracy of the regression algorithms is improved by using K-fold cross-validation (CV) and techniques for tuning hyper-parameters (Fig. 8). Typically, K-fold CV is employed to assess the effectiveness of ML models when making predictions on datasets that were not used during training. CV is a technique for resampling that is used to evaluate ML models on a limited number of data points. This technique has a parameter known as k, which specifies how many groups a given data sample should be divided into. Regarding the classification algorithms, the confusion matrix is used as a performance evaluation (Fig. 9). Different efficiency metrics are considered based on the confusion matrix to measure the proficiency of the classification algorithms, including precision, recall, F1, accuracy, and specificity.

Figure 8
figure 8

K-fold Cross-Validation (CV) and Hyper-parameter Tuning techniques.

Figure 9
figure 9

Confusion matrix as a performance measurement for classification models.

Ensemble learning

The utilization of ensemble learning techniques played a crucial role in enhancing the predictive accuracy and overall resilience of the ML models employed in this research. These methodologies leverage the combined knowledge of various models, facilitating the production of predictions that are both more precise and dependable. This section explains an important ensemble technique that is utilized: Weighted Voting.

Weighted voting

The implementation of the Weighted Voting ensemble technique was conducted with careful attention to leverage the distinct strengths demonstrated by each ML model present in the ensemble. This methodology involves allocating individual weights to the predictions generated by these models, thereby facilitating the development of an ensemble model that combines their insights in a weighted manner. The weight assignments are based on the past performance and dependability of each constituent model. The process commenced by conducting a comprehensive assessment of the performance of each fundamental ML model on the training dataset. The evaluation metrics of accuracy, mean squared error, and precision were thoroughly examined to assess the effectiveness of each model in accurately capturing the inherent patterns within the dataset. Following this, the allocation of model weights was carefully done to optimize the ensemble's predictive accuracy. The utilization of the Weighted Voting technique confers upon the ensemble a flexible capability, enabling it to promptly modify the influence of each model's predictions, taking into account their past performance. The ensemble's capacity to adapt significantly improves its capacity to extrapolate from the training data to unfamiliar data, ultimately resulting in the production of more robust predictions.

Results and discussion

Figure 10 illustrates the results of the regression algorithms in the ML approach, including outcomes of MAE, MSE, and R2 score criteria. Based on ML results, SVR shows the highest accuracy with \(R^{2} =\) 0.90 among regression algorithms. Moreover, the XGBoost algorithm has an acceptable efficiency with \(R^{2} =\) 0.88 in predicting the strength reduction percentage. It is worth stating that attaining a reliable regression model with this high \(R^{2}\) score (0.90 for the SVR algorithm) for this type of experimental database with various concrete compositions represents the proposed method's efficiency. However, the KNN algorithm depicts the lowest accuracy (\(R^{2} =\) 0.72) among regression algorithms.

Figure 10
figure 10

Performance of regression algorithms: (a) MAE; (b) R2 Score; (c) MSE.

Figure 11a,b showcase the performance of the XGBoost model. Figure 11a demonstrates a strong correlation between the actual and predicted values, suggesting that the model can accurately predict this value for unseen data. Figure 11b further supports this, illustrating that the model consistently predicts values close to the actual values.

Figure 11
figure 11

(a) Actual vs. predicted plot; (b) error plot.

The performance of the classification algorithms through the confusion matrix is illustrated in Fig. 12. It is worth mentioning that 20% of experimental datasets are used to test the classification algorithms. Regarding the SVM model (Fig. 12a), results indicate an accuracy of 0.88. Based on Fig. 12b, the RF algorithm has an accuracy of 0.91. The quality of strength reduction prediction by the RF algorithm is better than the SVM one; for instance, all nine datasets selected for testing the first category are precisely predicted by the RF algorithm. The results of the classification method for the LightGBM algorithm are shown in Fig. 12c, with an accuracy of 0.90 for this algorithm. As shown in Fig. 12d, the XGBoost algorithm has the highest accuracy (0.94) among other classification algorithms. Also, the confusion matrix shows that predictions of categories 0 and 2 are entirely performed by XGBoost, offering the high performance of this algorithm in predicting the strength reduction percentage in SAP concrete. This is an important finding, illustrating that the classification method can accurately predict the strength reduction of SAP concrete. The performance of logistic regression and decision tree are depicted in Fig. 12e,f, respectively. Logistic regression has an accuracy of 0.80 and the weakest F1-scores among other classification algorithms. The decision tree has an accuracy of 0.92.

Figure 12
figure 12

Performance of classification algorithms using confusion matrix: (a) Support vector machine (SVM); (b) random forest; (c) LightGBM; (d) XGBoost; (e) Logistic Regression; (f) decision tree.

Although both tasks were considered adequate in terms of accuracy, it was noted that the implementation of ensemble learning significantly improved the model's accuracy. The regression analysis utilized an ensemble method called weighted voting, as shown in Table 3. The MSE of the ensemble model rose to 12.85 after implementing weighted voting. The RF algorithm was awarded a value of 0.25, while XGBoost was assigned a coefficient of 0.75. The MSE values for the RF and XGBoost models were roughly 15.76 and 13.66, respectively.

Table 3 Ensemble learning: regression, weighted voting.

The next step after determining the efficiency and accuracy of each regression and classification algorithm on predicting the strength reduction percentage of SAP concrete, the SHAP (SHapley Additive exPlanations) method, is considered in the present study to describe the sensitivity of the predicting model regarding various features or input parameters. As a game hypothetical and mathematical method, SHAP is used to qualify each parameter's effect on the predicting ML method. As shown in Fig. 13a, the SHAP value shows that parameters of \(SAP\% \gg SAP size > f_{c}\) have noticeable influences on the efficiency of the ML model for the strength reduction percentage, while maximum aggregate size (d), compressive test age (t), and coarse aggregate content have the lowest influences on the proposed ML model. Results of SHAP analysis show that a lower percentage of SAP causes a considerable reduction in the strength reduction prediction, while a high dosage of SAP increases the strength reduction prediction(Fig. 13b). However, SHAP analysis indicates that smaller-sized SAP particles cause higher strength reduction possibilities than larger particles in this model. In contrast, SAP with large particles can even compensate for the strength reduction issue (Fig. 13b). This point was emphasized by experimental work conducted in the study of Mousavi et al. (2020)18, which future investigations should extend. Generally, the SHAP analysis presented in Fig. 13b indicates that small-size SAP has a higher destructive effect on the concrete compressive strength prediction than large SAP particle size. Mousavi et al. (2020)18 reported that this observation might be attributed to the fact that using small SAP particles can cause high numbers of voids (with smaller sizes), which can affect the microstructure of hardened concrete, affecting the compressive and bond strength of SAP concrete. Some unclear trends have been obtained for concrete compressive strength, which needs to be studied more by researchers. Generally, although SHAP analysis shows the importance of this parameter on the predicting model, the quality of this effect is not clear in the results (Fig. 13b). It may be attributed to the mutual impact of concrete compressive strength and W/C ratio. SHAP analysis also demonstrates that the high value of the total water-to-total powder ratio causes a higher strength reduction percentage predicted by the ML model, while a lower value of this ratio controls the strength reduction issue in SAP concrete. As illustrated in Fig. 13b, a higher value of fine aggregate content in SAP concrete results in a lower strength reduction percentage predicted by the ML method. Results presented in Fig. 13c show that the positive effect of high-content fine aggregate on the strength reduction percentage can be considerably improved by using a low dosage of SAP in the concrete mixture. Although the general trend shows the lowest impact of coarse aggregate content on the predicting model, SHAP analysis shows that using higher concrete compressive strength (\(f_{c}\)) is efficient in mitigating the strength reduction phenomenon in SAP concrete for cases with low content of coarse aggregate (Fig. 13d). The mutual effects of SAP size and maximum aggregate size in SAP concrete on the predicting ML method based on SHAP analysis are shown in Fig. 13e. The general trend shows that a high max d value causes a higher strength reduction percentage as compared to values smaller than 12 mm. It can be seen that SAP particle size can affect this trend, while no clear conclusion can be drawn based on this figure. It may be due to the fact that along with SAP particles, SAP chemistry used in the experimental database is not constant, and researchers used different types of SAP with various water absorption capacities. More empirical work is needed for future studies to investigate the precise effect of SAP particles on the hardened properties of concrete. As shown in Fig. 13f, using SAP concrete with a high ratio of fine aggregate-to-total powder generally has a lower strength reduction percentage, which can be enhanced by selecting an SAP concrete mixture with a lower total water-to-total powder ratio. The interaction between SAP% and SAP size is illustrated in Fig. 13g. SHAP results indicate that using a low dosage of SAP can considerably mitigate the strength reduction percentage. However, no clear trend can be drawn regarding the effect of SAP size on the relation between SAP percentage and strength reduction. It is worth mentioning that there are still significant research gaps in this field, as SAP chemistry can also affect the ML findings, which was ignored in the present study due to the large missing data in this field. Future works need to consider this point in the oncoming experimental investigations. This is a challenging finding between the initial water-to-cement ratio and tol water-to-total powder ratio, depicted in Fig. 13h. SHAP analysis shows that although a low value of total water-to-total powder is more efficient in delaying the strength reduction in SAP concrete, selecting the initial \(W/C \le 0.40\) can considerably adversely affect this good trend, and accordingly, the researchers should be careful in SAP concrete composition. Moreover, SAP size also can slightly affect this trend (Fig. 13i). SHAP analysis also shows that although higher concrete compressive strength can be efficient in mitigating the strength reduction phenomenon in SAP concrete, using SAP type with various particle sizes can affect this appropriate trend, especially for \(f_{c} \le 60\,\,{\text{MPa}}\). (Fig. 13j). SHAP analysis demonstrates that the positive effect of a high fine aggregate-to-total powder ratio on strength reduction alleviating can be found in both compressive ages of 7 and 28 days (Fig. 13k). Finally, as shown in Fig. 13l, the general trend of SHAP analysis shows that using SAP with smaller particle size can generate high strength reduction percentage as compared to large ones, while no clear tendency was found regarding the effect of total water-to-total powder ratio on this trend. Furthermore, an innovative web-based application has been meticulously crafted employing the ensemble learning method, as shown in Fig. 14. This cutting-edge tool is adept at providing precise predictions regarding the reduction in compressive strength attributable to the integration of SAP within the concrete matrix.

Figure 13
figure 13

SHapley additive explanations.

Figure 14
figure 14

Free access to ML Predictive Model for Concrete Strength Reduction designed by the present study (https://MaterialAI.ir/).

The current study has a few limitations that should be specifically addressed in future research. For example, the literature contains various ranges for SAP size, and no precise value was identified for use in the experimental datasets. Only a few limited studies mentioned the exact SAP size. In terms of SAP type, most previous studies did not specify the chemical type, so this important characteristic was not included in the variables. Additionally, due to the limited number of valid datasets in the current study, the experimental dataset includes both cement paste and mortars, which will need to be studied separately after more experimental work is conducted for each category. Other mechanical properties of SAP-containing concrete can be predicted using ML models. Moreover, as previous studies indicated, SAP has a beneficial effect on self-healing capacity, which should be determined by an effective ML model in future work.

Concluding remarks

Prior research has confirmed the efficacy of SAP, an intelligent and innovative polymer, in reducing shrinkage, enhancing crack self-healing, improving strength restoration (crack-healing), and enhancing the durability properties of cementitious composites. However, there is significant concern about the substantial decrease in strength associated with SAP. This study collected empirical data from previous literature to develop a reliable and precise forecast model for the percentage of strength reduction in SAP concrete, utilizing machine learning techniques. The model considered various categories of SAP, their respective quantities, sizes, and chemical compositions. A selection of regression and classification tasks were employed to acquire a reliable machine learning model. The input variables considered for predicting the strength reduction percentage as the output variable include fine aggregate, coarse aggregate, maximum diameter (Max d), fine aggregate to total powder ratio, proportion of superabsorbent polymer (SAP), initial water to cement ratio, total water to total powder ratio, concrete compressive strength, compressive test age, and SAP size.

While both challenges were deemed satisfactory in terms of accuracy, it was observed that the utilization of ensemble learning substantially enhanced the model's accuracy. Regression accuracy rose to 0.89 after utilizing ensemble learning, and MSE decreased considerably. The SHAP analysis was performed as a sensitivity analysis to assess the impact of features on the proposed machine learning model for predicting the percentage of strength reduction. The regression algorithms yielded outcomes indicating that SVR and XGBoost models could accurately forecast the percentage of strength reduction in SAP concrete based on concrete composition and SAP particulars, with R2 scores of 0.90 and 0.88, respectively. Furthermore, XGBoost exhibited the highest accuracy rate of 0.95 among the various classification algorithms. Additionally, several other classification algorithms demonstrated an accuracy level exceeding 0.85. The SHAP analysis revealed that the proposed strength reduction percentage by ML method is influenced by SAP percentage, SAP size, concrete compressive strength, and total water-to-total powder ratio, in descending order of effectiveness. The study's findings suggest that the hardened properties of SAP concrete are significantly influenced by the concrete composition and the type of SAP used, including its dosage, size, and chemical properties.

It is worth mentioning that previous studies have confirmed several important advantages of the addition of SAP to concrete mixtures, including shrinkage mitigation, crack sealing capacity, and self-healing improvement. The main findings of the present study are to optimize the situation so that the SAP can have the lowest side effect on compressive strength. Generally, the findings of the present study revealed that as SAP properties of mixture composition have a critical effect on compressive strength reduction, material properties should be carefully selected for SAP concrete. By selecting the best optimum conditions and SAP type, SAP concrete can be one of the pioneering smart generations of concrete.