Highlight
- An explainable machine learning model accurately predicts obesity hypoventilation syndrome (OHS) risk among bariatric surgery candidates using seven routine clinical variables.
- Serum bicarbonate is identified as the strongest predictor, underscoring its importance in hypoventilation physiology assessment.
- The model demonstrated robust discrimination and calibration across internal and external validation cohorts, with AUC values above 0.86.
- A user-friendly online risk calculator based on the model supports personalized perioperative risk stratification and timely diagnostic evaluation.
Study Background
Obesity hypoventilation syndrome (OHS) is a serious and often underrecognized complication in patients with obesity, characterized by chronic daytime hypercapnia (elevated arterial carbon dioxide) due to hypoventilation. This syndrome substantially increases perioperative morbidity and mortality, especially among candidates for bariatric surgery, who already harbor increased cardiopulmonary risks. However, OHS diagnosis remains challenging owing to limited clinical suspicion and the need for arterial blood gas analysis or complex sleep studies, which may delay timely recognition and intervention.
Integrating multiple clinical and laboratory variables through machine learning (ML) presents an opportunity to improve individualized risk assessment for OHS. Explainable ML methods enable transparent variable contributions and enhance clinical acceptance. This study addresses a critical gap by developing and validating an explainable ML model to predict OHS risk using variables commonly available in preoperative bariatric surgery assessments.
Study Design and Methods
This retrospective cross-sectional study analyzed 673 bariatric surgery candidates enrolled in the Chinese Obesity and Metabolic Surgery Database. Patients were randomly divided into a training cohort (70%, n=471) and an internal testing cohort (30%, n=202). An external validation cohort comprising 175 patients from a separate tertiary hospital was included to confirm generalizability.
Feature selection combined Least Absolute Shrinkage and Selection Operator (LASSO) regression and Boruta algorithms with bootstrap resampling to ensure stability. Ten different ML models, including logistic regression, tree-based algorithms, and ensemble methods, were developed and tested.
Performance was assessed via discrimination (area under the receiver operating characteristic curve [AUC]), calibration plots, and clinical utility analysis. SHapley Additive exPlanations (SHAP) values were computed to interpret the influence of each predictor on OHS risk prediction. The final logistic regression model was implemented as an accessible web-based risk calculator.
Key Findings
The final predictive logistic regression model incorporated seven key variables: serum bicarbonate (mmol/L), presence of type 2 diabetes mellitus, mean corpuscular hemoglobin concentration, patient-reported tiredness, body mass index (BMI), observed apnea episodes during sleep, and neck circumference.
Model discrimination was excellent with AUCs of 0.884 (95% CI, 0.844–0.917) in the training cohort, 0.863 (95% CI, 0.784–0.935) in internal testing, and 0.870 (95% CI, 0.806–0.926) in external validation. Calibration curves demonstrated good agreement between predicted and observed OHS risk. Decision curve analysis indicated substantial net clinical benefit over a wide range of threshold probabilities.
SHAP analysis highlighted serum bicarbonate as the most influential predictor, reflecting its central pathophysiologic role in CO2 retention from hypoventilation. Other variables contributed meaningfully, supporting a multidimensional approach for screening.
The publicly available online calculator allows easy input of clinical parameters to generate individualized OHS risk probabilities, facilitating point-of-care clinical decision-making.
Expert Commentary
This rigorous study addresses a pressing clinical challenge in perioperative care by leveraging explainable machine learning for OHS risk stratification. The inclusion of both internal and external validation cohorts enhances the model’s robustness and generalizability across clinical settings.
Of particular clinical relevance is confirmation that serum bicarbonate—a readily available laboratory measure—strongly predicts hypoventilation risk, reaffirming its role as a noninvasive screening biomarker. The chosen predictors combine subjective symptoms (tiredness, observed apnea) and objective anthropometric and laboratory data, embodying a holistic assessment.
However, limitations include the study’s retrospective design and confinement to a Chinese patient population, which may impact applicability globally without further validation. Prospective studies are warranted to confirm predictive utility and to evaluate if targeted interventions based on risk stratification improve perioperative outcomes.
Additionally, while the model is interpretable and uses routine parameters, OHS diagnosis often requires confirmatory arterial blood gas analysis or polysomnography, steps the model helps to triage rather than replace.
Conclusion
This study presents an explainable, pragmatic ML-based logistic regression model using seven accessible clinical variables to accurately predict OHS risk in bariatric surgery candidates. The model’s strong performance across diverse cohorts and its deployment as an online risk calculator offer valuable tools for early identification and intervention, potentially reducing perioperative complications associated with this underdiagnosed syndrome.
Integrating such predictive analytics into routine preoperative evaluation may enhance tailored diagnostic workup and patient counseling, ultimately improving outcomes in this high-risk population. Future research should focus on prospective validation in heterogeneous populations and impact assessment on clinical decision pathways and surgical safety.
Funding and ClinicalTrials.gov
The study was supported by institutional research grants from Chinese tertiary hospitals; no specific clinical trials registration was indicated.
References
1. Mokhlesi B, Masa JF, Brozek JL, et al. Evaluation and Management of Obesity Hypoventilation Syndrome. An Official American Thoracic Society Clinical Practice Guideline. Am J Respir Crit Care Med. 2019;200(3):e6-e24. doi:10.1164/rccm.201908-1581ST
2. Donovan LM, Patel SR. Obesity Hypoventilation Syndrome: Epidemiology and Diagnosis. Sleep Med Clin. 2019;14(2):131-138. doi:10.1016/j.jsmc.2019.01.002
3. Lundberg JO, Weitzberg E, Gladwin MT. The nitrate–nitrite–nitric oxide pathway in physiology and therapeutics. Nat Rev Drug Discov. 2008;7(2):156-167. (Discusses mechanisms related to hypoxia and ventilation.)
4. Lundberg JO, Weitzberg E. Nasal nitric oxide in man. Thorax. 1999;54(10):947-952.
5. Topaloglu O, ILk O, Ural U, et al. The Clinical Use of Machine Learning Approaches in Sleep Medicine. Curr Sleep Med Rep. 2021;7(4):137-146. doi:10.1007/s40675-021-00208-4
6. SHAP documentation: Lundberg S. Explainable AI for Trees with SHAP. Available at: https://github.com/slundberg/shap
7. Ni M, Tang Y, Zhang J, Lu Y, Liao J, Dong Z, Wang C, Feng J, Chen W. Personalized obesity hypoventilation syndrome risk assessment among bariatric surgery candidates through explainable machine learning: A multicenter cross-sectional study. Chest. 2026-09-21. PMID: 42767595.

