Abstract Using supplementary cementitious materials in concrete production makes it eco-friendly by decreasing cement usage and the corresponding CO2 emissions. One key measure of concrete’s durability performance is its porosity. An empirical prediction of the porosity of high-performance concrete with added cementitious elements is the goal of this work, which employs machine learning approaches. Binder, water/cement ratio, slag, aggregate content, superplasticizer (SP), fly ash, and curing conditions were considered as inputs in the database. The aim of this study is to create ML models that could evaluate concrete porosity. Gene expression programming (GEP) and multi-expression programming (MEP) were used to develop these models. Statistical tests, Taylor’s diagram, R 2 values, and the difference between experimental and predicted readings were the metrics used to evaluate the models. With R 2 = 0.971, mean absolute error (MAE) = 0.348%, root mean square error (RMSE) = 0.460%, and Nash–Sutcliffe efficiency (NSE) = 0.971, the MEP provided a slightly better-fitted model and improved prediction performance when contrasted with the GEP, which had R 2 = 0.925, MAE = 0.591%, RMSE = 0.745%, and NSE = 0.923. Binder, water/binder ratio, curing conditions, and aggregate content had a direct (positive) relationship with the porosity of concrete, while SP, fly ash, and slag had an indirect (negative) association, according to the SHapley Additive exPlanations study.