Prediction of lower limb compensation for adult degenerative spine patients using spinopelvic parameters: a machine learning approach Authors: Mohammad Daher, Zhi Wang, Victor Baisamy, Philippe Phan, Carlos Vazquez, Thierry Cresson, Fidaa Al Shakfa, Alan H Daniels, Amer Sebaaly Published: 2026 ABSTRACT AbstractStudy DesignRetrospective study.ObjectiveThis work aims to estimate using machine learning the occurrence of knee flexion in relation to spinopelvic parameters in lumbar degenerative pathologies.BackgroundAdult spinal deformity (ASD) significantly impairs quality of life, prompting the need for preoperative alignment assessment. Common compensatory mechanisms include thoracic hypokyphosis and pelvic retroversion. With the advent of full-body EOS imaging, spinopelvic measures understanding improved. In fact, there are strong correlations between knee flexion and HRQoL underscore the importance of estimating knee flexion for informing interventions to improve well-being in patients.MethodsThis retrospective single-center study includes patients with degenerative spinal pathologies necessitating surgical fusion. Parameters were extracted from radiographs using SterEOS® software and included spinopelvic parameters. Knee-related parameters were not used. The database was split into learning (80%) and test (20%) sets. Parameters’ representativeness is evaluated. Predictive models, included quantitative and categorical methods.ResultsThe study comprised 201 subjects (104 men, 97 women; mean age: 63.57 years [25–89]) with various spinal pathologies, primarily disc disease and spinal stenosis. Quantitative methods were assessed with partial least square (PLS) regression showing initial promise but declining predictive ability with additional components. For classification methods, the support vector machine (SVM) demonstrated good performance on test data, with high accuracy (0.68) and sensitivity on test data.ConclusionThis study suggests that spinopelvic parameters alone may be used to estimate lower limb compensation. Supervised machine learning classification, with 86% sensitivity, shows promise for estimating knee flexion. Further validation on larger, more homogeneous databases is needed.Supplementary InformationThe online version contains supplementary material available at https://doi.org/10.1186/s12891-026-10117-3.Keywords: Spine surgery, Knee flexion, Compensatory mechanisms, Prediction model Introduction Sagittal deformity in patients with degenerative spine disease usually starts with a lack of lumbar lordosis and ends with a forward tilting of the trunk and a positive sagittal malalignment [1, 2]. Patients frequently initiate a series of compensatory strategies, such as thoracic hypokyphosis, posterior pelvic shift, pelvic retroversion, hip extension, knee flexion, and ankle dorsiflexion, in order to maintain upright body alignment [3–5]. However, recruitment of these compensatory mechanisms requires increased energy expenditure, often tiring patients and causing disability. Researchers can now clarify the connections between spinopelvic measures and lower-extremity characteristics in patients with spinal deformity thanks to the development of full-body radiographic imaging. Previously, Obeid et al. showed a considerable correlation between greater knee flexion and decreased lumbar lordosis [6–9]. Later, on the basis of their T1 spinopelvic inclination (T1SPi), Ferrero et al. divided 336 individuals with deformities into three subgroups: forward alignment, neutral alignment, and backward alignment [10]. Forward patients showed strong compensatory knee flexion, large pelvic shift, increased sagittal vertical axis, and decreased lumbar lordosis. The relationship seen between knee flexion and ODI implies that patients who use lower-extremity compensatory measures have a lower quality of life [10]. In a more recent study, Shimizu et al. found that only the knee flexion angle among the three lower-extremity joints exhibited a linear correlation with anterior sagittal malalignment highlighting the importance of knee flexion as a sagittal compensation mechanism [11]. Thus, it is important to develop models to predict knee flexion as it contributes significantly to the well being of the patient. This work aims to estimate using machine learning the occurrence of knee flexion in relation to spinopelvic parameters in adult spine patients. Materials and methods Population This is a retrospective single center study approved by the institutional ethics committee (University of Montreal) with the methods performed in accordance with the declaration of Helsinki. The need for informed consent to participate was waived by the institutional ethics committee. This database includes patients with various spinal pathologies requiring surgical treatment by spinal fusion. Patients were excluded if they had a previous spinal surgery, knee replacement, or had non-compliant radiographs (incomplete field of acquisition, in two images, or too much movement during imaging). Data collection All radiographs were obtained using the EOS imaging system in a standardized standing position, with patients instructed to stand upright in a comfortable, natural posture, with knees extended as much as possible and arms positioned according to the standard EOS protocol. Biplanar full-body images were acquired simultaneously in the sagittal and coronal planes. Radiographic acquisition was performed as part of routine clinical evaluation prior to surgical intervention. All parameters used in this study are available from the software SterEOS® (EOS Imaging, Paris) that allows to reconstruct, in three dimensions, the thoracic and lumbar spine and the pelvis. The 3D reconstruction from the biplanar radiographs used parametric models based on transversal and longitudinal inferences, as described by Humbert et al. [12] and Pomero et al. [13]. The intra- and inter-operator reliability of the performed measurements have been previously reported in some studies, confirming the good or excellent intra-rater and inter-rater reliability of 3D parameter measurements in patients with adolescent idiopathic scoliosis [14, 15], with severe scoliosis or on postoperative images [16] and with adult spinal deformity [17]. They thus justify the current clinical use of this method in the proposed study. All measurements were obtained from preoperative radiographs. The parameters were extracted from the radiographs using the commercial version of SterEOS® (1.8.99.23R), the EOS image processing software and consisted of pelvic incidence (PI); sacral slope (SS); pelvic tilt (PT); cervical lordosis (C2-C7); occipito-cervical angle (O-C2); total thoracic kyphosis at inflection point (TK); total lumbar lordosis at inflection point (LL); sagittal vertical axis (SVA); lead line through center of auditory meatus (CAM); spino-sacral angle (SSA); T1 and T9 tilt; T1 pelvic angle (TPA) and ODHA (Odontoid–Hip Axis angle). Any parameters that directly or indirectly reflect the degree of knee flexion, such as femoral bowing index (FBI), global sagittal angle (GSA), sagittal femoral angle (SFA), sagittal femoral displacement (SFD), and the ankle dorsiflexion angle were not used as the aim of these predictive models is to estimate knee flexion from pelvic and spinal parameters alone. The primary outcome was knee flexion angle measured on full-body biplanar radiographs using SterEOS® software. For classification modeling, knee flexion was dichotomized using a threshold of 10°, as previously described in the literature, to define the presence of clinically significant lower limb compensation [9, 18]. In cases of asymmetry between limbs, the higher value was retained to reflect maximal compensatory behavior. The outcome was analyzed at the patient level. Each patient contributed a single observation to the dataset, and no repeated measurements were included in the analysis. Statistical analysis To evaluate the performance of the predictive models and minimize bias, the dataset was randomly divided into a training set (80%) used for model development and a test set (20%) used for independent evaluation. Model implementation was performed using the Scikit-learn library in Python. All preprocessing steps, including standardization and feature selection, were performed exclusively on the training set and subsequently applied to the test set to prevent data leakage. Standardization was performed to ensure comparability between variables, with all features scaled to a mean (µ) of 0 and variance (σ²) of 1. Within the training set, feature selection and hyperparameter tuning were performed using cross-validation combined with grid search. Variables were initially ranked based on their correlation with knee flexion and iteratively added using a recursive approach to identify the combination yielding optimal performance. In a second step, hyperparameter tuning was conducted using cross-validation across different combinations specific to each model. We acknowledge that this approach does not constitute a fully nested cross-validation framework, as feature selection and hyperparameter tuning were performed within the same cross-validation loop. The independent test set was therefore reserved for final model evaluation and was not used during model development. To ensure comparability between datasets, the representativeness of parameters between the training and test sets was assessed prior to modeling. Two types of predictive models were developed and compared: Regression model: Partial Least Squares (PLS) Regression model: Partial Least Squares (PLS) Classification model: Support Vector Machine (SVM) Classification model: Support Vector Machine (SVM) For classification, a threshold of 10° knee flexion was used to define the presence of clinically significant lower limb compensation, as previously described in the literature [9, 18]. The intra-rater reproducibility of measurements was evaluated in accordance with ISO 5725-1 standards. A trained medical imaging technologist repeated measurements five times under identical conditions on five different patients over a three-month period. The root mean square standard deviation (RMSsd) was calculated, and 95% confidence intervals were derived using 2RMSsd. In addition, intraclass correlation coefficients (ICCs) and their 95% confidence intervals were calculated to assess intra-rater reliability. Evaluation of the models The distribution of patients above and below the 10° knee flexion threshold was assessed prior to model development. No resampling techniques (e.g., oversampling or undersampling) were applied, as class distribution was considered acceptable. Model performance was therefore evaluated using metrics sensitive to class imbalance, including sensitivity, specificity, and negative predictive value. Once optimal models were developed, their performance was evaluated on the independent test set, which had not been used during model training. For regression models (PLS), performance was assessed using: Mean Absolute Error (MAE), Mean Squared Error (MSE), and Root Mean Squared Error (RMSE). For classification models (SVM), performance was evaluated using: Confusion matrix–derived metrics (accuracy, sensitivity, specificity, predictive values), Receiver Operating Characteristic (ROC) curve, and Area Under the ROC Curve (AUC). Results Baseline characteristics In total, 201 subjects were included (104 men, 97 women, mean age: 63.57 years [25–89]) with various pathologies (single or associated) requiring surgical treatment by spinal fusion (Table 1). Disc disease and spinal stenosis were the most commonly encountered pathologies. The 201 subjects in the prediction database were separated into training (161 subjects) and test (40 subjects) databases which were balanced across SVA, Age, PI-LL, and Knee flexion (Supplementary material). Table 1Characteristics of the population (SD: Standard deviation)Population (n=201)n (%)MeanGender Male104 (51.7%) Female97 (48.3%)Age (mean (SD))63.57 (16) 20-3911 (5.5%) 40-5946 (22.9%) 60-79137 (68.2%) >807 (3.5%)Pathologies Scoliosis65 (32.3%) Spondylolisthesis39 (19.4%) Disc disease and stenosis154 (76.6%) Loss of lordosis34 (16.9%) Fracture4 (2.0%) Metastasis6 (3.0%) Characteristics of the population (SD: Standard deviation) Reliability Intra-rater reliability was generally high, with ICC values ranging from 0.81 to 1.00 across most parameters. However, certain lordosis-related measurements demonstrated wider confidence intervals, with lower bounds as low as 0.31–0.46, indicating less stable reliability for these specific variables (Table 2). As a reminder, ICC values of more than 0.91 represent excellent reliability, values between 0.71 and 0.91 represent good reliability, values between 0.51 and 0.70 represent moderate reliability and values less than 0.51 represent poor reliability. Table 2Intra-rater reliability of spinopelvic parameters (single observer, repeated measurements) (SVA: Sagittal vertical axis, CAM: Center of acoustic meatus, CSL: Central sacral line)VariableRMSsd2RMSsdICC95% CIPelvic incidence (°)0.901.800.990.96 - 1.00Sacral slope (°)0.951.910.980.84 - 1.00Pelvic tilt (°)0.130.271.001.00 - 1.00Pelvic obliquity (mm)0.020.041.001.00 - 1.00Pelvis axial rotation (°)0.130.270.990.96 - 1.00Lordosis C2inf/C71.693.370.990.94 - 1.00Kyphosis T1/T12 (°)1.442.881.000.97 - 1.00Kyphosis T4/T12 (°)1.853.690.980.84 - 1.00Lordosis L1/L5 (°)2.224.440.820.46 - 0.98Lordosis L1/S1 (°)2.575.140.940.65 - 0.99Kyphosis inflexion point cervical/inflexion point (°)1.763.520.990.94 - 1.00Lordosis inflexion point/L52.555.100.810.31 - 0.98Lordosis inflexion point/S12.314.630.880.45 - 0.99SVA (mm)1.763.521.000.97 - 1.00CAM plumb line (mm)0.901.791.000.98 - 1.00T1 Tilt (°)0.130.261.000.98 - 1.00T9 Tilt (°)0.511.030.990.93 - 1.00Full Body Index (°)0.661.320.990.91 - 1.00C7-CSL (mm)0.500.990.990.92 - 1.00Knee flexion (°)0.360.710.960.71 - 1.00Reliability was assessed as intra-rater reliability based on repeated measurements performed by a single operator on five patients, with five repeated measurements per patient. Intraclass correlation coefficients (ICC) were calculated using a two-way mixed-effects model for absolute agreement Intra-rater reliability of spinopelvic parameters (single observer, repeated measurements) (SVA: Sagittal vertical axis, CAM: Center of acoustic meatus, CSL: Central sacral line) Reliability was assessed as intra-rater reliability based on repeated measurements performed by a single operator on five patients, with five repeated measurements per patient. Intraclass correlation coefficients (ICC) were calculated using a two-way mixed-effects model for absolute agreement PLS regression After applying the PLS regression algorithm to the dataset, its performance was evaluated using several statistical measures. Cumulative Q² (Table 3) indicates the model’s ability to estimate new observations. While good initial results for the first component (0.249) are noted, adding new components decreased the model’s predictive ability (0.166, 0.056, -0.012) indicating that the additional components do not improve the model’s predictive ability. The optimal PLS model retained one latent component, as the cumulative Q² reached its maximum at the first component (Q² = 0.249) and decreased with additional components, indicating reduced predictive performance. The number of components was selected based on cross-validated Q², with model expansion stopped when Q² decreased, consistent with standard PLS model selection criteria. The most influential variables in the PLS model, based on Variable Importance in Projection (VIP) scores, included lumbar lordosis (LL), PI–LL mismatch, sagittal vertical axis (SVA), and spinosacral angle (SSA). As for the performance metrics achieved on the test database (Table 4), the MAE is 5.75° and the MSE and its RMSE are 53.09° and 7.29° respectively. The model demonstrated a discrepancy between training performance (R² = 0.39) and test performance (R² = −0.05), suggesting limited generalizability and potential overfitting. Table 3Quality of the PLS model (PLS: partial least square)StatisticsComposite 1Composite 2Composite 3Composite 4Cumulative Q²0.2490.1660.056-0.012Cumulative R²Y0.2800.2920.3030.313Cumulative R²X0.3770.5130.6150.706 Quality of the PLS model (PLS: partial least square) Table 4Performance of the PLS modelPLSVariable Importance in the Projection VIP : – variable (score)LL (1.39)PI-LL (1.37)SVA (1.32)SSA (1.32)TPA (1.14)CAM (1.13)Age (1.05)Training PerformanceR2 : 0.39Testing PerformanceMAE: 5.7547°MSE: 53.0903°RMSE: 7.2863°R2 : -0.05 Performance of the PLS model Support vector machine Variables and hyperparameters are selected using the same cross-validation model as for the regression methods mentioned above with the optimal settings summarized in (Table 5). From the results obtained (Table 6), SVM was shown to have an accuracy of 0.68. It also had a high sensitivity rate (0.86) and negative predictive value (0.73), as well as a low false-negative rate (0.14) indicating that SVM appears to be highly effective in correctly identifying true positives (i.e. patients with compensatory mechanisms above the defined critical threshold) and true negatives (patients not crossing the threshold). The SVM model achieved an area under the ROC curve (AUC) of 0.68, indicating moderate discriminative ability. The values of specificity (0.44), precision (0.66) and prevalence of positive class (0.55) are also reported in Table 6. Table 5Optimal settings of the SVM modelModelPrincipal parametersAccuracyAUCHyperparametersSVMSVAAgeCAMPI-LL0.720.67532“C”: 2.559547922699533.“class_weight”: "balanced”.“kernel”: "rbf” Optimal settings of the SVM model SVA Age CAM PI-LL “C”: 2.559547922699533. “class_weight”: "balanced”. “kernel”: "rbf” Table 6Results of SVM modelSVMApp.Accuracy0.72Test.Accuracy0.68Misclassification0.33Sensitivity0.86Specificity0.44False positives rate0.56False negatives rate0.14Positive predictive value0.66Negative predictive value0.73Positive likelihood ratio1.55Negative likelihood ratio0.31AUC0.68Prevalence0.55TP19TN8FP10FN3 Results of SVM model Discussion The use of regression models to obtain a quantitative prediction does not appear to be suited to predicting lower extremity compensation in adult spine patients, as suggested by the results concerning the relationships between the various parameters. In fact, their results cannot be exploited, as the errors can be so large (MAE = 5.66°). These high values indicate that the model is prone to large errors. In particular, a high value of RMSE, which is more sensitive to larger errors, suggests that the model sometimes makes significant errors. Finally, an R2 below 0 indicates that the model is arbitrarily worse than simply predicting the mean of the target variable. Overall, all the results obtained are relatively worse than chance, and it is even preferable to simply use the group mean to quantify bending. This poor ability to accurately quantify knee flexion is a consequence of too much variability in the implementation of compensation mechanisms, particularly in the lower limbs. However, the use of classification methods seems to be the most appropriate, with the SVM model in particular. Above all, it had small deviations between its accuracy based on training data and that based on test data (0.72 vs. 0.68). Furthermore, SVM offers a high sensitivity at 0.86 while its specificity is relatively low at 0.44, meaning that it has greater difficulty in correctly classifying patients with flexion of less than 10°. Moreover, the false-negative rate is also low, at 0.14, reflecting the test’s excellent ability to identify and classify patients with significant flexion. The SVM could therefore meet the primary interest of these tests, which is to detect all patients likely to develop excessive knee flexion. It is then statistically preferable to have more false positives than false negatives. These results demonstrate moderate discriminative ability and support the feasibility of estimating knee flexion compensation, but are not sufficient for direct clinical application. The SVM model relies heavily on the parameters most correlated with knee flexion, namely SVA, CAM and PI-LL. These parameters are easily measurable and do not require biplanar radiographs, making their potential implementation very straightforward. While radiographic imaging is indeed routine in orthopedic practice, full-body imaging incorporating the lower limbs is not always performed, especially in resource-limited settings or during initial spine evaluations where the focus is often limited to the thoracolumbar region. In such cases, compensatory mechanisms involving the knees and ankles may go unrecognized. Our findings provide a valuable tool for estimating the presence of significant knee flexion using spinopelvic parameters alone, which are typically captured on standard lateral spine radiographs. This predictive capacity is particularly useful for preoperative planning, where a comprehensive understanding of global sagittal alignment is essential, yet lower extremity imaging may be absent. Moreover, in follow-up assessments or retrospective reviews where only partial imaging is available, our model could offer surrogate insight into patient compensation patterns without the need for repeat imaging. In addition, the choice of hyperparameters shows a relatively low C-parameter, demonstrating a simpler model susceptible to underlearning, but capable of better results with new data. Unfortunately, no comparable study is available to our knowledge to put these results into perspective. Strengths and limitations To our knowledge, this is the first study to apply PLS regression and SVM classification models to estimate knee flexion based solely on spinopelvic parameters; therefore, direct comparison of our findings with existing literature is limited, as prior studies have primarily focused on descriptive associations rather than predictive modeling. This study is not without limitations, the main one being the heterogeneity of our database. All types of sagittal scales or pathologies requiring various therapeutic approaches made up our study. While this diversity allows for greater generalizability and reflects real-world clinical populations undergoing lumbar fusion, it also introduces variability in compensatory mechanisms that may be influenced by differences in underlying pathology, symptom duration, severity of malalignment, and patient-specific functional adaptations. Moreover, a detailed breakdown of the number of patients initially screened and excluded for each specific criterion was not available retrospectively. In addition, there are still many factors that can influence sagittal balance and the implementation of compensation mechanisms such as hip and knee osteoarthritis [8, 19], which are not taken into account here, and which demonstrate the complexity of the subject. Additionally, the relatively limited sample size represents a constraint for machine learning model development and may affect model stability and generalizability. As such, the present study should be considered exploratory and hypothesis-generating, with future validation required in larger, multicenter cohorts. Furthermore, the modeling strategy carries an inherent risk of overfitting, particularly given the relatively small sample size and the use of correlation-based feature selection. Although cross-validation and an independent test set were used to mitigate this risk, the absence of a fully nested cross-validation framework may result in optimistic performance estimates. Additionally, the relatively small size of the test set (n = 40) limits the stability of performance metrics and increases the potential for variability in model evaluation. These factors should be considered when interpreting the results. Finally, it is important to note that there is sometimes asymmetry in knee flexion in both lower limbs. This issue has not been raised in all the literature studied, which only considers maximum flexion on perfectly aligned bone structures in profile view. In our study, when there is significant asymmetry between the two lower limbs, only the limb with the greatest flexion is then considered, to reflect the maximum compensation in place. Conclusion This study suggests that spinopelvic parameters alone may provide preliminary information regarding the presence of clinically relevant knee flexion compensation in adult spine patients. However, these parameters were insufficient for accurate quantitative estimation of knee flexion magnitude, as demonstrated by the limited performance of the PLS regression model. In contrast, the SVM classification model showed feasibility for identifying patients with knee flexion above the predefined threshold, particularly because of its high sensitivity. Further validation in larger, multicenter, and more homogeneous cohorts, ideally including functional, muscular, and lower-extremity joint parameters, is required before such models can be incorporated into clinical decision-making or preoperative planning. Supplementary Information Supplementary Material 1. Supplementary Material 2. Supplementary Material 3. Supplementary Material 4. Acknowledgements None. Abbreviations T1 spinopelvic inclination Oswestry Disability Index pelvic incidence sacral slope pelvic tilt cervical lordosis occipito-cervical angle total thoracic kyphosis at inflection point total lumbar lordosis at inflection point sagittal vertical axis lead line through center of auditory meatus spino-sacral angle T1 pelvic angle Odontoid–Hip Axis angle femoral bowing index global sagittal angle sagittal femoral angle sagittal femoral displacement Partial Least Squares Classification model: Support Vector Machine Root mean square standard deviation Intraclass correlation coefficients Mean Absolute Error Mean Squared Error Root Mean Squared Error Receiver Operating Characteristic Area Under the ROC Curve Authors’ contributions MD, ZW, VB: writing original draftPP, CV, TC, FAS: Collecting dataAHD, AS: Writimg review and editing. Funding None. Data availability Data is available upon reasonable request from the corresponding author. Declarations Ethics approval and consent to participate This is a retrospective single center study approved by the institutional ethics committee (University of Montreal) with the methods performed in accordance with the declaration of Helsinki. The need for informed consent to participate was waived by the institutional ethics committee of University of Montreal. Consent for publication Not applicable. Competing interests AHD discloses the following, receives royalties from Spineart and Stryker, consulting fees from Medtornic, research support from Alphatec, Medtronic, and Orthofix, and Fellowship support from Medtronic. AS discloses consulting fees from Medtornic. The remaining authors have no relevant conflicts of interest. Footnotes Publisher’s note Springer Nature remains neutral with regard to jurisdictional claims in published maps and institutional affiliations. References Associated Data Data Availability Statement Data is available upon reasonable request from the corresponding author.