Clear Sky Science · en
Developing a custom loss function for regulating underestimation and overestimation of concrete mechanical properties predictions in neural network models
Why safer concrete predictions matter
Most modern buildings and bridges rely on concrete, and engineers increasingly use artificial intelligence to predict how strong that concrete will be. But while standard neural networks try to be equally accurate in all directions, real structures are safer when predictions are a bit cautious rather than too optimistic. This study presents a new way to train neural networks so they are less likely to overestimate concrete strength, helping engineers keep a comfortable safety margin without giving up the power of AI.
Balancing safety and smart algorithms
In civil engineering practice, design rules are written to be conservative so that structures remain safe even when materials vary or construction is not perfect. Underestimating the strength of concrete usually means extra safety, while overestimating it can quietly eat into safety margins. Traditional neural network training methods do not distinguish between these two outcomes; they simply try to reduce the overall size of errors. The authors argue that this is at odds with how engineers actually think about risk and set out to build that safety preference directly into the learning process.

A loss function that prefers caution
The heart of the study is a custom loss function, a rule that tells a neural network how bad each mistake is during training. Instead of treating all errors the same, the proposed formula gives heavier penalties when the model predicts a strength higher than the real value and lighter ones when it predicts a lower strength. A pair of control numbers govern this imbalance, allowing the model to be tuned toward safer underestimates. The loss is also normalized so it can work consistently across different datasets and scales, and is combined with a standard neural network setup using popular tools like TensorFlow or PyTorch.
Testing the idea on rubberized concrete
To see how this cautious training rule behaves in practice, the authors focus on rubberized concrete, a material where part of the stone is replaced by pieces of waste rubber. Using an experimental dataset, they train several neural networks with the same architecture but different loss functions, including common choices such as mean squared error and mean absolute error. They then compare how well each model predicts two key mechanical properties: compressive strength, which reflects how much load the concrete can carry, and modulus of elasticity, which describes how stiff it is under load.

How conservative learning changes predictions
The models trained with the custom loss function reach almost the same overall accuracy as those using traditional losses, with error levels of about six percent in most cases. The crucial difference lies in how often they overshoot the true strength. For standard loss functions, between a quarter and nearly all of the predictions in some tests are overestimates. When the custom loss is properly tuned, that overestimation ratio drops dramatically, to around one percent for compressive strength and under ten percent for stiffness, while still fitting the data very well. Plots of predicted versus measured values show the new model’s points clustering just below the ideal equality line, reflecting a deliberate, mild underestimation bias.
What this means for real structures
On its own, a cautious prediction model cannot guarantee a safe building; designers must still follow codes, consider reinforcement, loads, and geometry, and check member and system behavior. But by steering neural networks away from unconservative overestimates at the material level, this new loss function helps ensure that AI-based predictions enter those design checks with the same safety-first mindset that underpins civil engineering practice. The authors see their work as a proof of concept that can be extended to larger datasets and full structural models, offering a practical step toward AI tools that work with, rather than against, established safety philosophies.
Citation: Habib, A., Habib, M., Junaid, M.T. et al. Developing a custom loss function for regulating underestimation and overestimation of concrete mechanical properties predictions in neural network models. Sci Rep 16, 15950 (2026). https://doi.org/10.1038/s41598-026-44200-5
Keywords: concrete strength prediction, neural networks, loss function, rubberized concrete, structural safety