Machine learning outperforms conventional modeling for oxygenation risk during one-lung ventilation

Thoracic anesthesia leaves little margin for error when one-lung ventilation begins to narrow the respiratory reserve. In this retrospective cohort of 519 patients, a machine learning approach outperformed standard logistic regression for predicting intraoperative oxygenation impairment, pointing to a role for more flexible modeling when physiology turns nonlinear at the bedside.

The study evaluated five algorithms and used the area under the receiver operating characteristic curve to compare performance. The random forest model reached an AUC of 0.924, compared with 0.790 for logistic regression. In practical terms, the gap is large enough to matter in an operating room where ventilation settings, lung mechanics, and baseline pulmonary function can shift oxygenation quickly and sometimes unpredictably.

Why oxygenation fails during thoracic surgery

During one-lung ventilation, the anesthesiologist intentionally sacrifices part of the lung’s gas exchange capacity to give the surgeon exposure. Hypoxemia develops when shunt, ventilation-perfusion mismatch, and reduced lung compliance overwhelm compensatory mechanisms. Conventional statistical approaches often assume linear relationships, but oxygenation during thoracic surgery rarely behaves in a straight line. Small changes in airway pressure, tidal volume, or patient habitus can push a vulnerable patient from stable oxygenation into impairment.

The appeal of a machine learning model in this setting lies in its ability to absorb complex interactions rather than force each variable into a single straight trajectory. Here, the random forest approach captured patterns that logistic regression did not, suggesting that threshold effects and variable interplay are central to intraoperative oxygenation risk. The finding fits the physiology: lung-protective settings can help, but only within a range, and the effect of any single ventilator parameter depends on the patient sitting in the operating room, not on a simplified average case.

A brief result stood out immediately. The model’s discrimination was substantially stronger than the conventional comparator.

Predictors that carried the strongest signal

SHAP analysis identified positive end-expiratory pressure, preoperative arterial oxygen partial pressure, and body mass index as the primary predictors. Each has a biologically plausible connection to oxygenation during thoracic surgery. Preoperative arterial oxygen partial pressure reflects baseline gas exchange reserve before the chest is opened and one lung is taken out of service. Body mass index can influence respiratory mechanics, functional residual capacity, and the ease with which atelectasis develops under anesthesia. Positive end-expiratory pressure, meanwhile, helps prevent alveolar collapse, but its benefit is not unbounded.

The analysis suggested a U-shaped protective association for positive end-expiratory pressure, centered around 4 to 6 cm of water, and a similar non-linear pattern for tidal volume. Too little pressure may permit collapse and derecruitment; too much may increase overdistension and hemodynamic burden. That kind of balance is exactly where linear models struggle and where interpretable machine learning becomes clinically useful, even if the output remains exploratory rather than prescriptive.

Interpretable machine learning did not just rank variables. It suggested how the variables may behave together.

Threshold effects and interacting physiology

The SHAP framework also pointed to synergistic interactions between baseline pulmonary conditions and mechanical ventilation settings. In thoracic surgery, that interaction matters because a patient with limited pulmonary reserve does not respond to a given ventilator strategy in the same way as a patient with healthier lungs. A tidal volume that is tolerated in one person may aggravate impaired oxygenation in another, especially when one lung is isolated and the remaining lung must carry the entire exchange load.

This is the kind of physiology that often hides behind an average effect size. The operating room needs decisions in real time, not after the case is over, and models that can expose non-linear thresholds may help anesthesiologists anticipate trouble before oxygen saturation falls. Still, the study stops short of proving that changing ventilation according to these predictors improves outcomes. It identifies likely signals, not a finalized bedside rule.

Retrospective design limits what the model can claim

The cohort was retrospective, and that design carries a built-in ceiling. Associations derived from SHAP do not establish causality, and the study itself framed the findings as hypothesis-generating. The data came from a single institutional setting, which may limit transportability to other thoracic anesthesia programs with different case mixes, surgical patterns, or ventilatory practices. Even a model with strong AUC performance can drift when it leaves the environment in which it was trained.

One sentence deserves to stand alone: model accuracy here is not the same as clinical utility.

The difference between a good prediction tool and a useful perioperative intervention remains substantial. A machine learning algorithm can flag risk, but it cannot by itself choose the correct response for every patient, procedure, or anesthetic plan. To make this work operationally, future prospective studies would need to test whether model-informed adjustments to positive end-expiratory pressure, tidal volume, or broader anesthetic management actually reduce oxygenation impairment without introducing new problems.

What thoracic anesthesia teams can take from the data

For now, the most defensible reading of this study is straightforward. Oxygenation impairment during one-lung ventilation is shaped by multiple interacting inputs, and those inputs do not behave in a simple linear fashion. Random forest modeling captured those relationships better than logistic regression in this retrospective cohort, while SHAP analysis offered a clinically legible map of the main predictors and their non-linear patterns.

The findings may be especially useful for teams building perioperative decision support tools. Baseline arterial oxygenation, body mass index, and ventilator settings are all available before or during surgery, which makes them plausible candidates for risk stratification. Even so, prospective validation is still needed before any algorithm can move from retrospective prediction to routine anesthetic guidance. The study leaves that next step open, along with the more consequential question of whether better prediction can be translated into fewer episodes of intraoperative oxygenation impairment.


Reporting by Dr. A. Nikhil Krishnan, MBBS for Medicine World Foundation, with additional data provided by Nature Medical Research.