$$\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.