Does Chronic Psychological Burden Change How Patients Come Off the Ventilator?

People with long-standing depression, anxiety or other psychiatric illness who become critically ill are usually reduced to a yes/no diagnosis code in intensive care unit (ICU) prediction models, or left out entirely. The chronic-illness literature points elsewhere. It describes psychological distress and bodily symptoms as loops that feed each other: pain disrupts sleep and lowered sleep lowers pain thresholds, depression drives inactivity and inactivity drives depression, and anxiety weakens the body's automatic regulation of heart rhythm. Those loops have only been measured on timescales of months to years. This proposal asks whether the same kind of loop can be observed hour by hour in the ICU, at one of its most consequential moments: weaning a patient off mechanical ventilation.

The core claim is narrow and testable. A graded measure of a patient's psychological burden before admission, built from years of prior hospital records in MIMIC-IV (the large, de-identified Boston hospital and ICU database), predicts failed or delayed weaning beyond standard physiology. The prediction is that this effect runs largely through a measurable hourly loop of agitation, rising sedative doses and delayed reduction in ventilator support, and that the loop is stronger in high-burden patients. If that holds, chronic psychological burden becomes a modifiable input to weaning decisions rather than a footnote code. If it fails, the result still matters, because it would tell psychosomatic researchers that the chronic loops they describe do not carry over to acute decompensation in any measurable way.

What Is Missing in Each Direction

The psychosomatic literature supplies the hypothesis but not the timescale. Reciprocal sleep–pain effects have been shown in surveys of young adults (Association of Musculoskeletal Pain with Poor Quality of Sleep Among E-Gamers) and in postoperative spinal-surgery patients (nomogram for postoperative sleep disturbance). Bidirectional Mendelian randomization, which uses genetic variants as natural experiments, links inactivity and depression in both directions (Zhao et al.). Reduced heart rate variability appears even in unmedicated anxious and depressed people (Kemp et al.).

Studies that come closest to clinical data still work at coarse resolution. A heterogeneous graph over Indiana records found psychoses, sleep disorders and chronic pain to be strong predictors of fast diabetic complications, but it aggregates a full year of visits into static nodes (Thomas et al.). UKB-MDRMF ranks depression among the top risk drivers across hundreds of diseases, but on a multi-year outpatient horizon (UKB-MDRMF). These papers motivate the proposal: psychiatric burden matters for somatic decline. They do not show whether it acts during acute care.

The methodological template comes from a dynamic Bayesian network study, a model of which variables at one time point predict which at the next. It recovered a worry–paranoia feedback loop from survey waves 18 months apart (British National Survey DAG). We reuse that kind of cross-lagged structure at hourly resolution.

On the MIMIC side, weaning has been modeled carefully but with purely somatic state descriptions. An XGBoost model predicts successful weaning in sepsis from ventilation duration, highest PEEP (the pressure kept in the lungs at the end of each breath), urine output and base excess, and it excludes delirium, psychiatric history and sedative exposure (Dai et al.). Prasad et al. treat sedation and weaning as a reinforcement-learning problem over 12 physiological streams (Prasad et al.). DeepVent learns ventilator settings from a 36-variable somatic and demographic state (DeepVent). Clinical XLNet shows that the order of nursing notes carries signal about prolonged ventilation, though it never isolates psychological content (Clinical XLNet). None of these work tests whether premorbid psychological burden changes the weaning trajectory.

Core Claim and How It Differs

This is not a new architecture. The obvious move at this intersection is to append psychiatric codes to an ICU predictor, and we treat that move as a baseline we must beat. The new elements are three. First, a graded premorbid burden index replaces the binary flag. Second, an explicit hourly mediation and moderation test asks whether burden acts through the agitation–sedation loop. Third, a measurement-fairness audit checks whether the index means the same thing across racial groups. The contrast with Thomas et al. and UKB-MDRMF is timescale and setting: those papers are outpatient and years-long, while this one is in-ICU and hours-long. The contrast with Dai, Prasad and DeepVent is the state description: theirs is somatic only, while ours adds pre-admission psychological history and charted behavioral state.

Research Program

Cohort. We will use MIMIC-IV invasively ventilated adults. The primary cohort follows Dai et al.'s sepsis definition so their result can be replicated directly. A secondary all-cause ventilated cohort tests generality. Outcomes are successful weaning within 24 hours (Dai's endpoint), reintubation within 48 hours of extubation, and ventilation lasting longer than 7 days.

Premorbid burden index. The index is computed only from data recorded before the index ICU admission in MIMIC-IV's hospital-wide module. Its components are the count and recency of psychiatric diagnosis codes across prior encounters, prior prescriptions of antidepressants, anxiolytics and antipsychotics, prior emergency visits with psychiatric presentations, and prior codes for chronic pain and sleep disorders. The last two are included because the chronic-illness literature names them as loop components.

Patients with no prior encounters at this hospital are treated as unobserved, not as burden-free. The main analysis is restricted to patients with at least one prior encounter, and a selection model handles the rest. This matters because MIMIC-IV comes from a single center.

Hourly loop variables. These come from structured charting rather than free text: the Richmond Agitation-Sedation Scale (RASS, a nurse-charted agitation score), delirium screening results (CAM-ICU), charted pain scores, sedative and opioid infusion rates, and ventilator support (PEEP, $FiO_2$ — the fraction of inspired oxygen, and pressure support). Heart rate variability cannot be computed from MIMIC-IV's hourly vital signs, so we do not claim to test Kemp et al.'s autonomic mechanism. Hour-to-hour heart rate and blood pressure variability serve only as crude proxies, and that limitation is stated as such.

Loop model. We fit a cross-lagged model over hourly states. For patient $i$ at hour $t$, let $A_{it}$ be agitation, $S_{it}$ the sedative dose and $V_{it}$ the ventilator support level, and let $B_i$ be the premorbid burden index:

$$S_{i,t+1} = \alpha + \beta_{AS} A_{it} + \gamma\, B_i A_{it} + \delta^\top x_{it} + \epsilon_{i,t+1}$$

Here $x_{it}$ holds physiological covariates (vital signs, blood gases, SOFA organ-failure components), and $\gamma$ measures how much burden amplifies the agitation-to-sedation link. Analogous equations link sedation to delayed reduction in ventilator support, and ventilator support back to agitation. Together they form the loop. Its overall strength in high- versus low-burden patients is the product of the cross-lagged coefficients along the cycle.

We will also fit a partition-MCMC dynamic Bayesian network in the style of the British survey study on the same hourly data. This checks that the loop structure emerges from the data rather than being imposed by the equations.

Confounding. Alcohol and benzodiazepine withdrawal produce agitation and correlate with psychiatric history, so they are the main threat. Every analysis is repeated after excluding patients with withdrawal codes or withdrawal-protocol orders, and again with substance-use history entered as a separate covariate.

Baselines

The naive reference point is Dai et al.'s published model on their cohort definition. They report AUROC 0.80 on MIMIC-IV internal validation and 0.86 on external validation in eICU-CRD, with their 4-variable model at 0.75 and 0.78 (Dai et al.). We reimplement it on the same cohort and splits. Our model must reproduce these numbers within confidence intervals before any comparison counts.

The strongest simple competitor is the same XGBoost model plus binary psychiatric diagnosis codes and current-admission psychotropic orders. This is what a careful clinical data scientist would try first. It receives the same features, splits and hyperparameter search budget, using the same number of Bayesian-optimization trials, as our burden-index model. Beating it means a statistically reliable gain in area under the precision–recall curve (AUPRC) on reintubation, assessed by bootstrap over patients. AUPRC is the primary metric because MIMIC benchmarks show AUROC hiding poor performance on rare outcomes (Revisiting Clinical Outcome Prediction for MIMIC-IV).

The strongest general sequence model is a MEDS-torch transformer pretrained on all MIMIC-IV events with triplet tokenization and value forecasting. It sees every prior psychiatric code implicitly. Its reported in-hospital mortality AUC is 88.2 ± 0.1 (MEDS-torch). We found no reported result on Lacuna for any model on reintubation or weaning in MIMIC-IV beyond Dai's. For text, Clinical XLNet reports AUROC 0.663 ± 0.011 for prolonged ventilation on MIMIC-III (Clinical XLNet). We use that number only as a reference, since it comes from a different database.

The key ablation removes the history component: the same loop model with $B_i$ replaced by a binary any-psychiatric-code flag. A second ablation removes the hourly loop variables. Together they separate whether value comes from grading burden or from tracking in-ICU behavioral state.

Why not just…?

Why not just add psychiatric ICD flags to the existing weaning model? This is the most serious threat, and it is a baseline rather than a straw man. Graded history beats a flag only if dose matters, as the chronic-illness literature implies. The flag ablation settles this directly. If the flag performs as well as the index, we will report that the graded index is unnecessary, and the paper's weight shifts to the mediation result.

Why not just use charted RASS and delirium scores and skip psychiatric history? In-ICU agitation may capture everything premorbid burden would. That is exactly why the moderation term $\gamma$ is the central quantity. If burden has no effect once hourly agitation is in the model, and does not change the loop's strength, then the chronic-to-acute link is fully absorbed by acute behavioral state. That is a clean negative finding.

Why not just train a large EHR foundation model on everything? A MEDS-torch or EHRMamba-style model (EHRMamba) may match our predictive accuracy because it sees the same codes. If so, we concede the prediction point. The proposal's claim is then mechanistic: whether burden acts through a nameable, potentially modifiable sedation loop. A foundation model cannot answer that without an analysis like ours.

Why not just ask a zero-shot language model to read the notes? On templated MIMIC-IV records, zero-shot Llama 2 reached AUROC 0.50 and Meditron 0.61 for mortality, against 0.87–0.88 for fine-tuned models (Revisiting the MIMIC-IV Benchmark). This route therefore does not compete for prediction. Notes enter our work only in a secondary analysis that tests whether documented panic or sleeplessness adds anything beyond charted RASS.

Decisive Checks

Four checks decide the outcome. First, the burden index must improve reintubation AUPRC over the flag-augmented XGBoost baseline on the held-out MIMIC-IV split. Second, the moderation term $\gamma$ must be positive, with a confidence interval excluding zero, and must survive the withdrawal-exclusion sensitivity analysis. Third, a negative-control outcome — a lab abnormality with no plausible link to sedation, such as admission hemoglobin — must show no burden effect. Fourth, a cruder burden index built from eICU-CRD's past-history entries must reproduce the direction of $\gamma$ at other hospitals, which addresses MIMIC-IV's single-center origin.

Finally, following the disparity audit in An Extensive Data Processing Pipeline for MIMIC-IV, we check whether the index has the same relationship to charted agitation across racial groups. If psychiatric history is under-recorded for some groups, a weaning aid built on the index could deny those patients burden-informed care. That would be reported as a finding, not hidden.

References

  1. Association of Musculoskeletal Pain with Poor Quality of Sleep Among E-Gamers in a Private University in Malaysia
  2. Development and validation of a nomogram for postoperative sleep disturbance in adults: a prospective survey of 640 patients undergoing spinal surgery
  3. Dissecting the causal association between social or physical inactivity and depression: a bidirectional two-sample Mendelian Randomization study
  4. Depression, Comorbid Anxiety Disorders, and Heart Rate Variability in Physically Healthy, Unmedicated Patients: Implications for Cardiovascular Risk
  5. Predicting onset of complications from diabetes: a graph based approach
  6. UKB-MDRMF: a multi-disease risk and multimorbidity framework based on UK biobank data
  7. Links between psychotic and neurotic symptoms in the general population: an analysis of longitudinal British National Survey data using Directed Acyclic Graphs
  8. A Simple Weaning Model Based on Interpretable Machine Learning Algorithm for Patients With Sepsis: A Research of MIMIC-IV and eICU Databases
  9. A Reinforcement Learning Approach to Weaning of Mechanical Ventilation in Intensive Care Units
  10. Towards Safe Mechanical Ventilation Treatment Using Deep Offline Reinforcement Learning
  11. Clinical XLNet: Modeling Sequential Clinical Notes and Predicting Prolonged Mechanical Ventilation
  12. Revisiting Clinical Outcome Prediction for MIMIC-IV
  13. MEDS-torch: An ML Pipeline for Inductive Experiments for EHR Medical Foundation Models
  14. EHRMamba: Towards Generalizable and Scalable Foundation Models for Electronic Health Records
  15. Revisiting the MIMIC-IV Benchmark: Experiments Using Language Models for Electronic Health Records
  16. An Extensive Data Processing Pipeline for MIMIC-IV