Beyond Euler: An Explainable Machine Learning Framework for Predicting and Interpreting Buckling Instabilities in Non-Ideal Materials
A
A
a.A. The Engineering Imperative of Stability Analysis
Civil and mechanical engineering have long focused on predicting the response of materials to applied forces [10, 11]. The reliability of any structure depends on its ability to remain stable under its prescribed operational loads [12, 13]. Accurate predictions of instabilities are essential to prevent catastrophic collapses, which can incur severe economic and human costs [14]. Among the various modes of structural failure, the phenomenon of buckling stands out as particularly insidious [15]. Unlike a material slowly yielding under tension, a column undergoing buckling can transition from a state of stable equilibrium to total failure with little to no warning [16]. This is not merely a theoretical concern; it is a real-world failure mode seen in critical infrastructure, from columns in buildings and bridges to sub-sea pipelines [17] and railway tracks that can buckle under the compressive forces of thermal expansion [18]. Accurately predicting the onset of buckling proves itself to be an engineering imperative of the highest order [13].
B. The Classical Framework: Euler’s Buckling Theory
Leonhard Euler achieved the first successful mathematical description of column buckling in 1744. His work established a foundational pillar of structural mechanics and provided an equation that remains central to engineering education and practice [1]. Euler’s critical load formula, shown in (1), defines the maximum axial compressive load an ideal column can sustain before it becomes unstable [1].
P_{cr} = \dfrac{\pi^2 EI}{(KL)^2} (1)
To fully appreciate this equation, it is necessary to understand its constituent terms: P_{cr} (the critical load), E (Young’s Modulus of Elasticity), I (Area Moment of Inertia), L (Effective Length), and K (Effective Length Factor).
C. The Gap Between Ideal Theory and Physical Reality
The elegance and enduring power of Euler’s formula lie in its foundation of mathematical idealism; however, this is also its primary limitation in real-world scenarios. A significant and well-documented “reality gap” exists because no physical object perfectly satisfies the formula’s core assumptions [1]. The key sources of this discrepancy are:
• Material Heterogeneity and Anisotropy: Euler’s formula assumes the material is homogeneous and isotropic. Many real-world materials, however, do not meet this ideal. For example, natural materials like wood have grain and growth rings, and biological materials like bone have complex, porous internal structures [26]. Similarly, modern engineered materials like 3D-printed polymers exhibit anisotropic properties due to their layered construction [27]. Pasta, as an extruded product, exhibits brittle failure modes inconsistent with the above ideal materials [7, 19].
• Geometric Imperfections: The formula assumes a perfectly straight column. All real objects exhibit minute variations that create eccentricities where the applied load is not perfectly aligned with the column’s central axis, inducing bending moments that the ideal theory does not account for [16, 20].
• Difficulty in Parameter Estimation: The formula’s accuracy depends critically on the value of Young’s Modulus, E. For pasta; this value has been investigated using various methods, yielding a range of results and highlighting the difficulty in characterization [2, 6, 21].
• Non-Linear Material Behavior: The theory assumes linear elasticity. Many materials, including pasta, exhibit non-linear and brittle behavior, failing suddenly without significant prior elastic deformation [7, 22].
These limitations mean that any attempt to use Euler’s formula to precisely predict the failure of a real-world object is fraught with uncertainty; indeed, advanced software tools like SAP2000 or ETABS have to be used in order to account for these imperfections and nuances. Building on prior studies in the field, Our study focuses on this gap, using pasta as an accessible and illustrative example of a non-ideal material [2, 6, 7].
D. A New Paradigm: Data-Driven Modeling with Explainable AI
To bridge this reality gap, we turn to a new paradigm: supervised machine learning. The application of machine learning to predict column buckling is an active area of research, with recent studies successfully using models like artificial neural networks for braced columns [23] and corrugated steel girders [9]. Instead of beginning with a theoretical formula, a data-driven approach inverts the process, learning the complex and underlying associations —such as non-linear interactions between features and the subtle effects of material imperfections— directly from experimental observations. We hypothesize that a machine learning model, when presented with measurable geometric features, can learn a highly accurate mapping to the experimentally observed buckling load.
A
High predictive accuracy alone, however, is not sufficient for scientific inquiry. An AI model that acts as an impenetrable black box offers little new physical insight, as we are unable to understand its decision-making process as well as what specific factors affect the outcome. This brings us to the core novelty of this study: the integration of Explainable AI (XAI), a growing field of study in engineering and computer science [
8]. By using state-of-the-art XAI techniques, specifically SHAP (SHapley Additive exPlanations) [
4], we aim to “open the black box” and understand how the model arrives at its predictions.
E. Statement of Contributions
This study makes the following novel contributions:
• It provides a rigorous, quantitative demonstration of the limitations of Euler’s classical buckling formula when applied to a common, non-ideal material.
• It develops and validates a high-performance XGBoost Machine Learning model that predicts the critical buckling load with exceptionally high accuracy (R²=0.97), outperforming the theoretical model.
• It successfully integrates a physics-informed feature derived from classical theory into a machine learning pipeline, demonstrating a powerful synergy between the two approaches.
• Most importantly, it employs a state-of-the-art XAI technique (SHAP) to provide a deep, mechanistic interpretation of the model’s decision-making process, revealing the subtle, non-linear correction factors that the model learns to apply to the classical framework.
II. MATERIALS AND METHODS
b.A. Experimental Apparatus
A
We designed the experimental setup for replicability and precision based on the Johns Hopkins University Exploring Engineering Innovation (EEI) curriculum. The experimental apparatus, as depicted in Fig. 1, consisted of a digital scale (with a precision of ± 0.01 g), standard masking tape, a ruler, and a digital caliper (± 0.01 mm). This minimalist setup allows for the direct measurement of the critical buckling force, which is recorded as a mass reading on the digital scale.
Figure 1. The experimental setup, showing a pasta strand positioned vertically on a digital scale, ready for compressive force to be applied by finger.
A
B. Data Collection ProtocolWe followed a meticulous protocol to ensure data consistency.
• Sample Preparation: 147 Individual strands of pasta were selected and visually inspected for major defects, such as fractures or significant curvature; strands with such defects were discarded.
• Geometric Measurement: For each selected strand, we took two sets of measurements using a Mitutoyo digital caliper with a precision of ± 0.01 mm. The total length (L) of the strand was measured once. The diameter (d) was measured at three distinct points along the strand (approximately at the 25%, 50%, and 75% marks). We then averaged the three measurements to provide a representative diameter for that sample.
• Buckling Test: A single pasta strand was placed vertically on the surface of the digital scale, which was subsequently zeroed. We used a small piece of tape to secure the bottom of the strand to the scale’s surface to prevent slipping. Using an index finger, we applied a slow, steady, and vertically aligned compressive force to the top of the pasta strand.
• Load Measurement: We applied a downward force on the member and closely observed both the pasta strand and the reading on the digital scale. The critical buckling point was identified as the maximum mass reading displayed on the scale at the precise moment the pasta strand underwent sudden lateral deformation (buckling).
• Calculation: The critical load (P_{cr}) in Newtons was calculated by multiplying the measured mass (in kg) by the standard acceleration due to gravity (9.81 m/s²).
This entire process was repeated for all 147 valid samples collected across the experimental groups.
C. Dataset Characteristics
The final dataset comprised 147 distinct observations from four groups and includes four pasta types: Spaghetti, Angel Hair, Thin Spaghetti, and Vermicelli; These four types span a broad diameter range and introduce controlled manufacturing heterogeneity, thereby improving model generalization and enabling explainability analyses Statistical analysis revealed a well-distributed set of experimental conditions and outcomes, summarized in Table I.
TABLE I
DESCRIPTIVE STATISTICS OF FINAL COMBINED EXPERIMENTAL DATA
Variable | Mean | Std. Dev. | Min | Max
Length (cm) | 14.0 | 4.1 | 8.0 | 20.0
Diameter (mm) | 1.48 | 0.21 | 1.2 | 1.7
Load P_{cr} (N) | 0.81 | 0.82 | 0.09 | 3.22
D. Computational Methodology
c.A. Predictive Accuracy of the Gradient Boosting Model
The 5-fold cross-validation process provided a robust estimate of the model’s performance on unseen data. Cross-validation allows us to evaluate the model’s generalization capability for unseen data points, while metrics provide information about its predictive accuracy [25]. The averaged metrics were exceptional:
• Coefficient of Determination (R²): 0.97
• Root Mean Squared Error (RMSE): 0.14 N
A
An R² value of 0.97 indicates that our model can explain 97% of the variance in the experimental buckling loads. The RMSE of 0.14 N signifies a very low average prediction error, given that measured loads ranged up to 3.22 N. This high accuracy is visualized in the Predicted vs. Actual plot (Fig. 2).
Figure 2. Predicted vs. Actual critical buckling load (N). The tight clustering along the diagonal line (R²=0.97) demonstrates exceptional accuracy from the XGBoost Model vs. the Experimental Data.
B. Model Interpretation with Explainable AI
A
A SHAP summary plot (Fig. 3) provides a comprehensive overview of global feature importance, ranking features by their impact on the model’s predictions. The analysis reveals that the physics-informed feature, G, is the most influential predictor. However, the raw ‘diameter‘ and ‘length‘ features remain highly important, suggesting the model is learning subtle correction factors beyond the scope of the classical formula.
C. Walkthrough of a Single Prediction
To illustrate how the model makes a prediction, we can examine a single sample from our dataset. Consider a spaghetti strand with a length of 12 cm and a diameter of 1.7 mm. The experimentally measured buckling load for this strand was 1.32 N. The model doesn't use a simple formula. Instead, SHAP analysis reveals how each feature contributes a specific value (a "SHAP value") to push the prediction away from the baseline average prediction (which for our dataset is 0.81 N). For this specific spaghetti strand:
The baseline average prediction is 0.81 N.
The high value of the physics-informed feature (G) is the most important, providing a SHAP value of + 0.45 N.
The relatively high diameter provides another push, with a SHAP value of + 0.12 N.
The moderate length has a small negative impact, with a SHAP value of -0.03 N.
By adding up all these individual contributions to the baseline (0.81 + 0.45 + 0.12 − 0.03), the model arrives at a final predicted buckling load of 1.35 N, which is very close to the actual experimental value of 1.32 N. This process is repeated for every sample, with the SHAP values changing based on the specific geometry of the pasta strand.
D. Comparative Analysis
To place the performance of the XGBoost model in context, we compared it against a Random Forest model and the classical Euler formula, for which we estimated an average Young’s Modulus (E) of approximately 2.9 GPa from the dataset. The results are summarized in Table II.
Figure 3. SHAP summary plot showing global feature importance.
TABLE II
PERFORMANCE COMPARISON OF PREDICTIVE MODELS
Model Type | Model Name | R² | RMSE (N)
Theoretical | Euler’s Formula | 0.81 | 0.38
Machine Learning | Random Forest | 0.96 | 0.16
Machine Learning | XGBoost (Ours) | 0.97 | 0.14
IV. DISCUSSION
The results validate our central hypothesis that a hybrid data-driven approach can bridge the gap between idealized theory and experimental reality. The outperformance of the XGBoost model demonstrates the limitations of a purely theoretical approach for non-ideal materials. The success of the physics-informed feature, G, shows that classical theory remains invaluable, providing a strong foundation upon which the machine learning model can learn the complex, messy reality on top of it. This synergy aligns with the principles of Theory-Guided Data Science, which advocates for integrating scientific knowledge into data-driven models to improve performance and interpretability [5].
The most novel contribution is using XAI for scientific insight [8]. The independent importance of “diameter” and “length” is the key finding. It implies the true relationships are more complex than simple power laws. For example, the non-linear importance of ‘diameter‘ may suggest the model is learning about the relationship between a column’s thickness and its resistance to localized crushing at the contact points, an effect not present in Euler’s pure bending theory. Similarly, the independent importance of ‘length‘ could be the model’s way of approximating the increased statistical probability of a critical micro-fracture existing in a longer strand. This transforms the model from an engineering tool into a scientific instrument for generating new, testable hypotheses about the underlying mechanics of the system.
A. Broader Implications and Future Vision
The framework presented here is a generalizable template with broad implications for fields like additive manufacturing, biomedical engineering, and composite materials science. The vision is an automated XAI pipeline that can accelerate materials discovery by rapidly generating accurate, interpretable models from new experimental data.
B. Limitations and Avenues for Future Research
The primary limitations are the dataset’s scope (147 samples, single brand) and the lack of environmental controls. Future work should focus on creating a larger, more diverse dataset. Variations in operator reaction time may have also led to slight inaccuracies in recording the mass at the exact moment of buckling. Similarly, the manual application of force with a finger may have introduced minor, off-axis loads that could influence the critical buckling value. While the model is designed to learn the general trend from this noisy data, these factors represent a source of experimental uncertainty that could be reduced in future work with automated testing equipment. A particularly promising avenue is the use of computer vision to automate measurement and, crucially, to identify and quantify surface defects as new input features for the model.
V. CONCLUSION
This research confronted a foundational challenge in structural mechanics. We have demonstrated that a synergistic framework combining classical theory, experimental data, and explainable machine learning can successfully bridge this gap. Our XGBoost model, informed by the principles of Euler’s formula, predicted the critical buckling load of a non-ideal material with substantially lower error than a calibrated Euler baseline (R^2 = 0.97). The application of XAI provided a deep interpretation of the model’s logic, transforming it from an opaque “black box” into a scientific instrument. This study serves as a robust proof-of-concept, illustrating that the future of modeling complex physical systems lies in the intelligent synthesis of classical theory, experimental data, and the interpretive power of modern artificial intelligence.