Table of Contents
Fetching ...

Predicting first-episode homelessness among US Veterans using longitudinal EHR data: time-varying models and social risk factors

Rohan Pandey, Haijuan Yan, Hong Yu, Jack Tsai

TL;DR

This study leverages a national VA EHR cohort to predict first-episode homelessness in US veterans over four horizons (3, 6, 9, 12 months) using static and time-varying representations of 79 predictors, including social and behavioral factors. It demonstrates that clinically informed time-varying features with persistence rules substantially improve predictive performance across horizons, with SBFH providing additional gains beyond demographics and codes. The best results arise from time-varying ModernBERT and XGBoost models, while large LLMs underperform in discrimination but show smaller racial disparities; risk is highly concentrated in the top percentiles, enabling targeted outreach. Limitations include VA-centric generalizability, pre-pandemic data, and reliance on structured SBFH data, underscoring the need for decision-analytic evaluation and prospective validation in diverse settings. Overall, the findings support using longitudinal, socially informed EHR modeling to guide efficient, equity-aware homelessness prevention efforts for veterans.

Abstract

Homelessness among US veterans remains a critical public health challenge, yet risk prediction offers a pathway for proactive intervention. In this retrospective prognostic study, we analyzed electronic health record (EHR) data from 4,276,403 Veterans Affairs patients during a 2016 observation period to predict first-episode homelessness occurring 3-12 months later in 2017 (prevalence: 0.32-1.19%). We constructed static and time-varying EHR representations, utilizing clinician-informed logic to model the persistence of clinical conditions and social risks over time. We then compared the performance of classical machine learning, transformer-based masked language models, and fine-tuned large language models (LLMs). We demonstrate that incorporating social and behavioral factors into longitudinal models improved precision-recall area under the curve (PR-AUC) by 15-30%. In the top 1% risk tier, models yielded positive predictive values ranging from 3.93-4.72% at 3 months, 7.39-8.30% at 6 months, 9.84-11.41% at 9 months, and 11.65-13.80% at 12 months across model architectures. Large language models underperformed encoder-based models on discrimination but showed smaller performance disparities across racial groups. These results demonstrate that longitudinal, socially informed EHR modeling concentrates homelessness risk into actionable strata, enabling targeted and data-informed prevention strategies for at-risk veterans.

Predicting first-episode homelessness among US Veterans using longitudinal EHR data: time-varying models and social risk factors

TL;DR

This study leverages a national VA EHR cohort to predict first-episode homelessness in US veterans over four horizons (3, 6, 9, 12 months) using static and time-varying representations of 79 predictors, including social and behavioral factors. It demonstrates that clinically informed time-varying features with persistence rules substantially improve predictive performance across horizons, with SBFH providing additional gains beyond demographics and codes. The best results arise from time-varying ModernBERT and XGBoost models, while large LLMs underperform in discrimination but show smaller racial disparities; risk is highly concentrated in the top percentiles, enabling targeted outreach. Limitations include VA-centric generalizability, pre-pandemic data, and reliance on structured SBFH data, underscoring the need for decision-analytic evaluation and prospective validation in diverse settings. Overall, the findings support using longitudinal, socially informed EHR modeling to guide efficient, equity-aware homelessness prevention efforts for veterans.

Abstract

Homelessness among US veterans remains a critical public health challenge, yet risk prediction offers a pathway for proactive intervention. In this retrospective prognostic study, we analyzed electronic health record (EHR) data from 4,276,403 Veterans Affairs patients during a 2016 observation period to predict first-episode homelessness occurring 3-12 months later in 2017 (prevalence: 0.32-1.19%). We constructed static and time-varying EHR representations, utilizing clinician-informed logic to model the persistence of clinical conditions and social risks over time. We then compared the performance of classical machine learning, transformer-based masked language models, and fine-tuned large language models (LLMs). We demonstrate that incorporating social and behavioral factors into longitudinal models improved precision-recall area under the curve (PR-AUC) by 15-30%. In the top 1% risk tier, models yielded positive predictive values ranging from 3.93-4.72% at 3 months, 7.39-8.30% at 6 months, 9.84-11.41% at 9 months, and 11.65-13.80% at 12 months across model architectures. Large language models underperformed encoder-based models on discrimination but showed smaller performance disparities across racial groups. These results demonstrate that longitudinal, socially informed EHR modeling concentrates homelessness risk into actionable strata, enabling targeted and data-informed prevention strategies for at-risk veterans.
Paper Structure (17 sections, 6 figures, 3 tables)

This paper contains 17 sections, 6 figures, 3 tables.

Figures (6)

  • Figure 1: Study schematic: longitudinal EHR representations and homelessness risk prediction. Raw visit-level EHR data for an example patient are aggregated into fixed half-year intervals to form a baseline longitudinal representation without persistence (H1: January-June 2016; H2: July-December 2016). A condition persistence framework applies domain-specific persistence policies (chronic persistent, ever-history, recurrent time-limited, episodic) to carry forward or limit condition activity across intervals, yielding a longitudinal representation in which shaded cells indicate values added by the framework. The resulting patient-level profiles are converted into natural-language prompts organized by clinical domain (example shown) and used as inputs to three model classes: machine-learning models, masked-language models, and large-language models to independently predict the risk of first-episode homelessness within M months after baseline. The example illustrates the half-year temporal representation; analogous representations were also constructed at quarterly and yearly aggregation levels for comparative analyses.
  • Figure 2: Model performance by predictor set and prediction window. PR-AUC, area under the precision-recall curve; ROC-AUC, area under the receiver operating characteristic curve; SD, standard deviation; Demo, demographics; Codes, clinical and utilization codes (diagnosis indicators and service-utilization variables derived from ICD-10 diagnostic codes and VA outpatient stop codes, excluding SBFH); SBFH, social and behavioral factors; LR, Elastic Net logistic regression; RF, random forest; XGB, XGBoost; ModernBERT, ModernBERT-large model; BioClinBERT, BioClinical-ModernBERT model; LLaMA, LLaMA-3.1-8B model; OpenBio, OpenBioLLM-8B model.
  • Figure 3: Subgroup-specific performance of prediction models for homelessness risk for the 9-month prediction window. PR-AUC precision-recall area under the curve, CI confidence interval, RF random forest, ModernBERT ModernBERT-base model, Llama Llama-3.1-8B model. Subgroup estimates labeled “Unreliable” did not meet pre-specified reliability criteria (fewer than 20 positive or 20 negative cases in the subgroup and/or bootstrap CI width > 0.12).
  • Figure :
  • Figure :
  • ...and 1 more figures