🤖 AI Summary
This study addresses the low predictive accuracy and poor interpretability of postoperative length-of-stay (LOS) estimation in spinal surgery. We propose SurgeryLSTM—a novel deep learning model integrating masked bidirectional LSTM with attention mechanisms to dynamically capture salient temporal patterns from structured perioperative electronic health records (EHRs); feature importance is quantified via explainable AI (XAI) techniques. Evaluated on a real-world clinical dataset, SurgeryLSTM achieves an R² of 0.86, significantly outperforming XGBoost and conventional statistical models. It robustly identifies clinically critical factors—including bone disorders, chronic kidney disease, and lumbar fusion—as key determinants of LOS. To our knowledge, this is the first work to deeply integrate masked sequential modeling with clinical interpretability for LOS prediction. The framework delivers both high predictive performance and clinical credibility, enabling precise LOS forecasting, optimized bed resource allocation, and personalized postoperative care planning.
📝 Abstract
Objective: To develop and evaluate machine learning (ML) models for predicting length of stay (LOS) in elective spine surgery, with a focus on the benefits of temporal modeling and model interpretability. Materials and Methods: We compared traditional ML models (e.g., linear regression, random forest, support vector machine (SVM), and XGBoost) with our developed model, SurgeryLSTM, a masked bidirectional long short-term memory (BiLSTM) with an attention, using structured perioperative electronic health records (EHR) data. Performance was evaluated using the coefficient of determination (R2), and key predictors were identified using explainable AI. Results: SurgeryLSTM achieved the highest predictive accuracy (R2=0.86), outperforming XGBoost (R2 = 0.85) and baseline models. The attention mechanism improved interpretability by dynamically identifying influential temporal segments within preoperative clinical sequences, allowing clinicians to trace which events or features most contributed to each LOS prediction. Key predictors of LOS included bone disorder, chronic kidney disease, and lumbar fusion identified as the most impactful predictors of LOS. Discussion: Temporal modeling with attention mechanisms significantly improves LOS prediction by capturing the sequential nature of patient data. Unlike static models, SurgeryLSTM provides both higher accuracy and greater interpretability, which are critical for clinical adoption. These results highlight the potential of integrating attention-based temporal models into hospital planning workflows. Conclusion: SurgeryLSTM presents an effective and interpretable AI solution for LOS prediction in elective spine surgery. Our findings support the integration of temporal, explainable ML approaches into clinical decision support systems to enhance discharge readiness and individualized patient care.