Clear Sky Science · en
Machine learning model optimization with optuna for accurate prediction of strength and crack behavior in prestressed concrete beams
Why predicting cracks in concrete matters
Bridges and large buildings depend on long concrete beams that quietly carry heavy traffic and weather for decades. Many of these beams are "prestressed"—steel cables are pulled tight inside the concrete so it can resist cracking and sagging. When these beams lose strength or start to crack unexpectedly, the consequences can be severe: costly repairs, traffic closures, or even accidents. Yet testing full-size beams in the lab is expensive and slow. This study explores how modern machine learning, carefully tuned with an optimization tool called Optuna, can predict how strong these beams will be and how their cracks will behave, using existing test data instead of new large-scale experiments.

From scattered test results to a rich data resource
The researchers first gathered a large collection of test results on prestressed concrete beams from 22 published studies, ending up with 626 beam data sets. Each beam was described by 21 measurable features, such as its width and height, the amount and location of steel reinforcement, and details of the prestressing cables. The outcomes they cared about included when the first serious crack forms (cracking moment), the load the beam can carry before failing (ultimate moment), how far apart cracks tend to be, and how wide the largest crack becomes. They carefully cleaned and standardized this mixed data so that differences in units and test setups would not mislead the models, then set aside part of the data for fair, independent testing.
Teaching computers to read the signs of failure
Instead of relying on traditional formulas, which often struggle with the messy realities of real structures, the team trained four popular machine learning models to learn patterns directly from the data: Decision Trees, Random Forests, XGBoost, and LightGBM. These models all work by building many decision rules from the input features to predict how a beam will behave. However, their performance depends heavily on tuning "knobs" known as hyperparameters—for example, how deep each decision tree is allowed to grow, how many trees to use, and how fast the model learns. Poorly chosen settings can lead to sluggish, inaccurate, or overfitted models that fail when faced with new beams.
Letting Optuna search for the best settings
To tackle this tuning challenge, the researchers used Optuna, a modern optimization framework that automatically explores promising combinations of hyperparameters rather than trying them by hand. For each candidate setting, Optuna trained a model, checked how well it predicted beam performance, and then used that feedback to propose better settings next. The team also examined learning curves to choose a good number of training rounds, avoiding models that stop too early or overtrain. This process led to a clear winner: the LightGBM model, tuned by Optuna, predicted beam strength with an R² above 0.98 and crack resistance with an R² above 0.8, meaning its predictions tracked the test data very closely.

Opening the “black box” of machine learning
High accuracy alone is not enough for engineers, who need to understand why a model makes certain predictions before trusting it in design or safety checks. To add this transparency, the authors used SHAP, a method that breaks down each prediction into contributions from individual input features. SHAP showed, for example, that how deep the compression zone of the beam is, how much prestressed steel it contains, and how strong the concrete is all strongly influence when cracks form and how wide they become—insights that agree with basic structural mechanics. In effect, the machine learning model not only matched human understanding but also quantified the relative impact of different design choices.
What this means for real-world structures
For non-specialists, the key message is that carefully tuned machine learning can turn scattered test results into a practical tool for checking the health and safety of prestressed concrete beams. The Optuna-optimized LightGBM and XGBoost models can help engineers estimate when beams will crack and how much load they can safely carry, without building and breaking so many full-scale specimens. Because the models are both accurate and explainable, they can guide smarter design decisions—such as how much steel to use and where to place it—helping extend the life of bridges and buildings while saving time, money, and materials.
Citation: Wen, Y., Guo, R., Duan, Z. et al. Machine learning model optimization with optuna for accurate prediction of strength and crack behavior in prestressed concrete beams. Sci Rep 16, 5822 (2026). https://doi.org/10.1038/s41598-026-36692-y
Keywords: prestressed concrete beams, crack prediction, machine learning, hyperparameter optimization, structural engineering