Research Article

TabTransformer-based In-hospital Classification of Osteoporosis in Adults Undergoing Spinal Neurosurgical Procedures

DOI:

10.3791/71119

April 14th, 2026

In This Article

Summary

Loading...
$$\rightleftharpoonup{xx}$$ $$\longleftharp{xx}$$, $$\longrightharp{xx}$$,

We developed and internally evaluated an attention-based TabTransformer model for in-hospital classification of osteoporosis among adults undergoing spinal neurosurgical procedures using routinely collected Medical Information Mart for Intensive Care IV clinical data.

Abstract

Loading...
$$\rightleftharpoonup{xx}$$ $$\longleftharp{xx}$$, $$\longrightharp{xx}$$,

The objective was to develop and internally evaluate a deep learning model for in-hospital classification of osteoporosis among adults undergoing spinal neurosurgical procedures using routinely collected tabular clinical data. This retrospective study used the Medical Information Mart for Intensive Care IV (MIMIC-IV) database to identify adult patients who underwent spinal neurosurgical procedures. Osteoporosis was defined by ICD-9/10 diagnosis codes recorded during the index admission. Demographic characteristics, medication records, laboratory measurements, and vital signs from the same hospitalization were used for model development. After stratified splitting into training, validation, and test sets, class imbalance was addressed only in the training set. A TabTransformer-based model was developed and compared with XGBoost, LSTM_Attention, and Temporal Convolutional Networks (TCN). Model interpretability was assessed using SHapley Additive exPlanations (SHAP). On the held-out test set, TabTransformer achieved the best overall performance, with an area under the receiver operating characteristic curve (AUC) of 0.953 and an average precision (AP) of 0.799. The corresponding values for TCN, XGBoost, and LSTM_Attention were 0.937/0.707, 0.857/0.303, and 0.755/0.179, respectively. SHAP analysis identified age, sex, creatinine, red cell distribution width, bicarbonate, phosphate, neutrophils, and several medication-related variables as influential contributors to model output. In this single-center retrospective cohort, the TabTransformer model showed strong discriminative performance for in-hospital classification of osteoporosis and provided interpretable feature-level associations through SHAP. Because predictors and outcome were defined within the same hospitalization, this framework should be interpreted as an internally validated exploratory classification model rather than a temporally explicit future-risk prediction tool.

Introduction

Loading...
$$\rightleftharpoonup{xx}$$ $$\longleftharp{xx}$$, $$\longrightharp{xx}$$,

Osteoporosis (OP) is a widespread skeletal condition marked by decreased bone mineral density and structural degradation of bone tissue, leading to increased bone fragility and a higher likelihood of fractures1. It continues to pose a significant public health concern, particularly among older individuals and postmenopausal women2. In hospitalized patients undergoing spinal neurosurgical procedures, bone health may be influenced by reduced mobility, systemic stress responses, medication exposure, and disturbances in metabolic homeostasis during index admission. Prior evidence from neurologic conditions and spinal cord in....

Access restricted. Please log in or start a trial to view this content.

Protocol

Loading...
$$\rightleftharpoonup{xx}$$ $$\longleftharp{xx}$$, $$\longrightharp{xx}$$,

Data source
This study was a retrospective analysis based on the Medical Information Mart for Intensive Care IV (MIMIC-IV, version 3.1) database, a publicly available critical care database hosted on PhysioNet (https://physionet.org/content/mimiciv/3.1/). The database was developed through a collaboration between the Massachusetts Institute of Technology Laboratory for Computational Physiology, Beth Israel Deaconess Medical Center, and Philips, and contains comprehensive de-identified clinical data, including demographic information, vital signs, laboratory measurements, and medication records.

All patient data in MIMIC....

Access restricted. Please log in or start a trial to view this content.

Results

Loading...
$$\rightleftharpoonup{xx}$$ $$\longleftharp{xx}$$, $$\longrightharp{xx}$$,

Model performance comparison
We compared the proposed TabTransformer model with three baseline models (XGBoost, LSTM with attention, and Temporal Convolutional Networks [TCN]) on the held-out test set. As shown in Figure 2, TabTransformer achieved the highest discriminative performance with an AUC of 0.953 (95% CI: 0.924–0.977), followed by TCN (AUC = 0.937, 95% CI: 0.903–0.967), XGBoost (AUC = 0.857, 95% CI: 0.821–0.890), and LSTM_Attention (AUC = 0.755, 95% CI: 0.707–0.......

Access restricted. Please log in or start a trial to view this content.

Discussion

Loading...
$$\rightleftharpoonup{xx}$$ $$\longleftharp{xx}$$, $$\longrightharp{xx}$$,

In this study, we developed an attention-based TabTransformer model for in-hospital classification of osteoporosis among adults undergoing spinal neurosurgical procedures and used SHapley Additive exPlanations (SHAP) to explore the main variables driving model output (Figure 5 and Figure 6). The SHAP results suggest that age was the dominant contributor, followed by recurring signals from renal and metabolic markers, hematologic indices, selected medication vari.......

Access restricted. Please log in or start a trial to view this content.

Disclosures

Loading...
$$\rightleftharpoonup{xx}$$ $$\longleftharp{xx}$$, $$\longrightharp{xx}$$,

The authors have no conflicts of interest to declare.

Acknowledgements

Loading...
$$\rightleftharpoonup{xx}$$ $$\longleftharp{xx}$$, $$\longrightharp{xx}$$,

The authors gratefully acknowledge the financial support from the Guiding Science and Technology Program of Suqian City (Grant No. Z202342).

....

Access restricted. Please log in or start a trial to view this content.

Materials

List of materials used in this article
NameCompanyCatalog NumberComments
Adam optimizerPyTorchIncluded in PyTorchUsed for TabTransformer training
Jupyter NotebookProject JupyterLatest available versionUsed for model development and analysis workflow
MIMIC-IV databasePhysioNetversion 3.1; https://physionet.org/content/mimiciv/3.1/Public de-identified critical care database
PythonPython Software FoundationLatest available versionMain programming environment
PyTorchPyTorch FoundationLatest available versionDeep learning framework used to implement TabTransformer
Relational database management softwareNavicatversion 17.0; https://www.navicat.com.cn/Used for data extraction from MIMIC-IV
scikit-learnscikit-learn developersLatest available versionUsed for preprocessing, data splitting, and baseline models
SHAPSHAP developersLatest available versionUsed for model interpretability analysis
SMOTEimbalanced-learnLatest available versionUsed for minority-class oversampling in the training set
XGBoostXGBoost developersLatest available versionBaseline comparison model

Reprints and Permissions

Request permission to reuse the text or figures of this JoVE article

Request Permission

Tags

Osteoporosis ClassificationTabTransformer ModelSpinal NeurosurgeryClinical Tabular DataMIMIC IV DatabaseDeep Learning ModelSHAP AnalysisModel InterpretabilityClass ImbalanceFeature Importance

Related Articles