Learning

Model concrete properties using machine learning

Screen 28-day concrete strength before committing to laboratory trials

This surrogate model estimates 28-day compressive strength from seven constituent quantities. It helps concrete technologists compare candidate mixtures and focus physical testing on the most promising, feasible formulations.

42528-day laboratory specimens
7mixture-component inputs
85independent testing rows
4.88 MPatesting MAE

Compressive-strength testing is essential, but each result arrives only after batching, curing and destructive laboratory testing. A data-driven surrogate can provide rapid estimates for screening and scenario analysis, while qualified mix design, trial batches and standards-based testing remain the basis for production and structural decisions.

1. Industrial challenge

This is an approximation problem: the model maps seven constituent quantities to the continuous target compressive_strength, measured in MPa after 28 days.

Screen candidate mixturesEstimate whether a formulation is likely to approach the required strength before scheduling a complete trial.
Study material trade-offsExplore how cement, supplementary cementitious materials, water, admixture and aggregates jointly affect the response.
Prioritize laboratory workUse predictions to rank feasible candidates while retaining physical testing for verification and acceptance.

Potential users include ready-mix and precast producers, concrete technologists, materials laboratories, civil and structural engineers, quality teams and low-carbon construction specialists.

Concrete technologyReady-mix productionPrecast manufacturingMaterials laboratoriesQuality assuranceSustainable construction
Model role. This is a 28-day strength-screening surrogate. It supports engineering exploration but does not issue an approved mix design, verify code compliance or replace batch trials and destructive tests.

2. Data set

The source UCI Concrete Compressive Strength dataset contains 1,030 laboratory results with age as an input. This example uses all 425 records tested at 28 days, so age is fixed and omitted from the local file. The semicolon-delimited CSV contains seven numerical inputs, one numerical target and no missing values.

CSV variableEngineering meaningRoleUnitObserved range
cementCementInputkg/m³102 to 540
blast_furnace_slagBlast-furnace slagInputkg/m³0 to 359.4
fly_ashFly ashInputkg/m³0 to 200.1
waterWaterInputkg/m³121.8 to 247
superplasticizerSuperplasticizerInputkg/m³0 to 32.2
coarse_aggregateCoarse aggregateInputkg/m³801 to 1145
fine_aggregateFine aggregateInputkg/m³594 to 992.6
compressive_strength28-day compressive strengthTargetMPa8.54 to 81.75

The configured random split assigns 255 rows to training, 85 to selection and 85 to testing.

Distribution of 28-day concrete compressive strength across 425 specimens
Pearson correlations between concrete constituents and 28-day compressive strength
Marginal relationships. Cement has the strongest positive linear correlation, while water has the strongest negative one. These one-variable relationships do not describe mixture interactions.
Scatter chart of cement content and 28-day concrete compressive strength
Cement alone is insufficient. Strength varies substantially at similar cement contents because the complete formulation matters.
Validation note. The split is random. The file contains 416 unique input formulations and five duplicated formulation groups; two duplicate groups cross subset boundaries. A stronger evaluation should group identical or related mixtures so that one formulation cannot contribute rows to both model development and testing.

3. Neural network

The initial model standardizes seven inputs using mean and standard deviation, evaluates three tanh hidden neurons and returns one linear strength estimate before unscaling to MPa. The initial 7–3–1 architecture contains 28 trainable parameters.

Initial concrete strength neural network with seven inputs, three tanh neurons and one output

The initial network provides a compact starting point. Model selection subsequently changes the hidden-layer size; the final testing and deployment model is shown in section 5.

4. Training strategy

The initial network minimizes normalized squared error with L2 regularization weight 0.01 using the quasi-Newton method. Optimization stops after 78 epochs because the minimum loss decrease criterion is reached. The recorded training and selection errors are 0.098 NSE and 0.049 NSE.

Quasi-Newton training and selection error history for the initial concrete strength model

Normalized squared error is useful during optimization, but MPa-based metrics are used later so engineering users can interpret the practical size of prediction errors.

5. Model selection

The growing-neurons task compares hidden-layer sizes from 1 to 10, using three trials per size. The smallest recorded selection error, 0.0429 NSE, occurs at 10 neurons; the corresponding training error is 0.083 NSE.

Training and selection errors for concrete models with one to ten hidden neurons

Because the best result occurs at the configured maximum, 10 neurons is the best tested size rather than proof of a global optimum. The final 7–10–1 network contains 91 trainable parameters and is the model used for testing, optimization and Python export.

Final concrete strength neural network with seven inputs, ten tanh neurons and one output

6. Testing analysis

The exported final model was recalculated on the 85 rows marked as testing. R² is the squared correlation reported by the Neural Designer goodness-of-fit analysis; MAE and RMSE express errors directly in MPa.

Testing rowsMAERMSEBias95th-percentile absolute errorMaximum absolute error
850.82144.88 MPa6.06 MPa+0.68 MPa10.70 MPa19.34 MPa

A training-mean baseline has an RMSE of 14.22 MPa, so the neural model materially improves on a constant prediction. Nevertheless, only 56.5% of testing rows fall within ±5 MPa, and the largest error is operationally significant. This supports screening use, not automatic acceptance.

Predicted versus measured 28-day concrete compressive strength on the testing subset
Example testing specimen. Row 421 contains 276.4 kg/m³ cement, 116.0 kg/m³ slag, 90.3 kg/m³ fly ash, 179.6 kg/m³ water, 8.9 kg/m³ superplasticizer, 870.1 kg/m³ coarse aggregate and 768.3 kg/m³ fine aggregate. The measured strength is 44.28 MPa and the model predicts 44.74 MPa, an absolute error of 0.46 MPa.

7. Model deployment

A practical workflow starts with a physically feasible formulation and ends with laboratory confirmation. The model can screen or rank candidates, but engineering constraints must be applied before inference and predictions must not become production specifications without validation.

Candidate formulation and material data
Range, mass-balance and feasibility checks
28-day strength surrogate
Trial batch, testing and engineering approval

Optimization case 1: reduce cement for a 45 MPa requirement

Operational question: what is the lowest-cement candidate that provides a modelled safety margin above a required 28-day strength of 45 MPa?

The executed task minimizes cement, keeps the other constituents inside defined operating intervals and requires a predicted strength of at least 55 MPa. The additional 10 MPa is an illustrative screening margin informed by the model error; it is not a certified characteristic-strength calculation or prediction interval.

VariableConditionLower boundUpper boundOptimized valueUnit
CementMinimize126.513kg/m³
Blast-furnace slagBetween50220219.710kg/m³
Fly ashBetween0150139.026kg/m³
WaterBetween160195172.402kg/m³
SuperplasticizerBetween01514.277kg/m³
Coarse aggregateBetween8501,0751,060.860kg/m³
Fine aggregateBetween650875869.364kg/m³
Compressive strength5555.000MPa

Result and engineering interpretation

CheckCandidateObserved data domainAssessment
Total binder485.249 kg/m³200.0–640.0 kg/m³Inside observed interval
Water-to-binder ratio0.3550.235–0.900Inside observed interval
Total constituent mass2,602.152 kg/m³2,194.6–2,551.0 kg/m³51.2 kg/m³ above observed maximum

The optimizer reduces cement by moving slag close to its upper bound and using substantial fly ash, superplasticizer and aggregate quantities. The model reproduces the requested 55 MPa threshold, but the constituent total is approximately 2.0% above the largest formulation in the dataset. The candidate therefore demonstrates a credible low-cement objective, yet it still requires a mass-balance or yield constraint and laboratory validation before it can be considered a feasible mix.

Optimization case 2: maximize strength with cement capped at 300 kg/m³

Operational question: what is the highest 28-day strength predicted inside the declared constituent limits when cement cannot exceed 300 kg/m³?

This scenario maximizes the model output while bounding cement and every other constituent. It represents a producer seeking higher strength without moving to a high-cement formulation.

VariableConditionLower boundUpper boundOptimized valueUnit
CementBetween200300299.998kg/m³
Blast-furnace slagBetween0220220.000kg/m³
Fly ashBetween0150149.499kg/m³
WaterBetween155190178.930kg/m³
SuperplasticizerBetween01513.390kg/m³
Coarse aggregateBetween8501,0751,075.000kg/m³
Fine aggregateBetween650875874.735kg/m³
Compressive strengthMaximize80.156MPa

Result and engineering interpretation

CheckCandidateObserved data domainAssessment
Total binder669.497 kg/m³200.0–640.0 kg/m³29.5 kg/m³ above observed maximum
Water-to-binder ratio0.2670.235–0.900Inside observed interval
Total constituent mass2,811.552 kg/m³2,194.6–2,551.0 kg/m³260.6 kg/m³ above observed maximum

The solution reaches 80.156 MPa by driving cement, slag, fly ash and both aggregates to, or very close to, their upper bounds. This is a typical boundary-seeking optimizer response. Although the individual values satisfy the declared limits, binder content and total mass lie outside every mixture represented in the data. The result is best interpreted as a diagnostic upper-bound scenario: it shows why a real maximum-strength optimization also needs total-binder, yield, workability, cost and durability constraints.

Comparison of the two executed cases

ScenarioPrimary objectiveCementPredicted strengthTotal massCurrent status
Low-cement target-strength caseMinimize cement with predicted strength ≥55 MPa126.513 kg/m³55.000 MPa2,602.152 kg/m³Promising objective; revise mass balance
Cement-capped maximum-strength caseMaximize strength with cement ≤300 kg/m³299.998 kg/m³80.156 MPa2,811.552 kg/m³Boundary result; reformulate constraints
Decision rule. Response optimization identifies model-supported candidates, not approved concrete recipes. A candidate should advance only after joint-domain checks, mixture-volume and material-compatibility review, trial batching, curing and standards-based strength testing.

Cement sensitivity at a reference formulation

At 265 kg/m³ cement, 86 kg/m³ slag, 62 kg/m³ fly ash, 183 kg/m³ water, 7 kg/m³ superplasticizer, 956 kg/m³ coarse aggregate and 764 kg/m³ fine aggregate, the model predicts 37.47 MPa. The directional plot varies cement while holding the other quantities fixed.

Predicted 28-day compressive strength as cement content changes at a fixed reference formulation

Interpret the curve only across the observed cement interval of 102–540 kg/m³. The portion beyond 540 kg/m³ is model extrapolation and should not support a design decision.

Try the 28-day strength model

Enter one mixture or load a verified example. The browser evaluates the exact scaling, weights and output transformation from the exported Python model.

102 to 540
0 to 359.4
0 to 200.1
121.8 to 247
0 to 32.2
801 to 1145
594 to 992.6
Predicted 28-day compressive strengthModel estimate
Total constituent massJoint-domain check

Screening model — not a certified mix design, conformity assessment or structural acceptance method.

Download and reproduce

Video walkthrough

The original tutorial remains available as a step-by-step Neural Designer walkthrough. Numerical results on this page reflect the newly exported project.

8. Scope and limitations

  • The model represents 28-day strength only. It cannot estimate early-age or long-term strength because age is fixed and absent from the inputs.
  • The data comes from a public laboratory collection and does not establish transfer to a specific plant, cement source, aggregate grading, admixture product, curing regime or test procedure.
  • Random row splitting and duplicated formulations can produce a more optimistic test than validation by unseen formulation family, production batch or chronological campaign.
  • The target is compressive strength only; workability, slump, density, durability, heat, shrinkage, cost and embodied carbon are not modelled.
  • Inputs are constituent masses, but the model does not enforce volume balance, total yield, water-to-binder limits, aggregate proportions or material compatibility.
  • The observed range of each variable does not define a valid multidimensional mixture domain. Joint feasibility must be checked separately.
  • Production deployment requires local data, grouped or time-aware validation, drift monitoring, uncertainty limits and periodic recalibration.
  • Predictions support screening and experimentation; qualified personnel and standards-based testing remain responsible for mix approval and structural acceptance.

References