SynthEHR-Eviction: Enhancing Eviction SDoH Detection with LLM-Augmented Synthetic EHR Data

TL;DR

SynthEHR-Eviction combines LLM-based synthetic data and prompt optimization to detect eviction statuses, achieving 88.8% Macro-F1.

cs.CL 🔴 Advanced 2025-07-10 55 views
Zonghai Yao Youxia Zhao Avijit Mitra David A. Levy Emily Druhl Jack Tsai Hong Yu
NLP SDoH EHR Large Models Information Extraction

Key Findings

Methodology

This study introduces a modular pipeline integrating large language models (e.g., Qwen2.5, LLaMA3) with automated prompt optimization (APO) and human-in-the-loop validation via DSPy framework. Synthetic data generation leverages model prompts refined through iterative feedback, producing diverse clinical notes across 14 fine-grained eviction categories. Fine-tuning models on this data enhances performance, with Qwen2.5-7B reaching 88.8% Macro-F1, outperforming GPT-4o-APO (87.8%) and BioBERT (60.7%). The pipeline reduces manual annotation efforts by over 80%, enabling scalable, cost-effective SDoH detection.

Key Results

  • In binary eviction detection, GPT-4o-APO achieved F1 of 94.1%. Fine-tuned models like Qwen2.5-7B maintained high performance across datasets, with average Macro-F1 of 88.8%.
  • For multi-class eviction classification, APO significantly improved GPT-4o-mini (Macro-F1 from 69.1% to 78.1%). Fine-tuned models showed consistent results, with Qwen2.5-7B reaching Macro-F1 of 90%.
  • Detection accuracy varied across categories, with some classes (e.g., ‘current’ eviction) reaching 96% F1, demonstrating the model’s ability to handle nuanced distinctions.

Significance

This approach addresses the critical gap of sparse eviction data in EHRs, enabling systematic social risk assessment. It facilitates integration of social determinants into clinical workflows, supporting targeted interventions, especially for marginalized populations. The scalable pipeline promotes broader adoption of SDoH analytics, advancing public health and personalized medicine.

Technical Contribution

The core innovation lies in combining synthetic data augmentation, prompt optimization, and human validation within a modular NLP pipeline. The DSPy framework enables chain-of-thought reasoning, improving fine-grained classification. The method is adaptable to various model sizes, reducing annotation costs and enhancing generalization, thus offering a new paradigm for social risk information extraction.

Novelty

This is the first large-scale, publicly available dataset covering 14 eviction-related categories, created via a novel combination of synthetic data generation and prompt optimization. Unlike rule-based or small-model approaches, it leverages large models’ generative capabilities and iterative validation, setting a new standard for SDoH extraction in clinical NLP.

Limitations

  • Model performance declines with ambiguous or complex clinical descriptions, especially in underrepresented categories. Synthetic data may introduce biases affecting real-world applicability.
  • High computational costs of large models limit deployment in resource-constrained settings. Further optimization is needed for real-time applications.
  • Current approach relies on expert validation, which, while reduced, still requires domain knowledge. Fully automated solutions remain a future goal.

Future Work

Future efforts include multi-modal data integration, model compression, and domain adaptation to improve efficiency. Expanding the dataset to include additional social risks and testing in diverse clinical environments will enhance robustness. Developing lightweight models for real-time deployment is also a key direction.

AI Executive Summary

This research introduces SynthEHR-Eviction, a novel NLP pipeline that combines large language models, synthetic data augmentation, and automated prompt optimization to detect eviction-related social determinants of health (SDoH) within electronic health records. Eviction, a critical yet underdocumented social risk factor, significantly impacts health outcomes but remains challenging to identify due to sparse, unstructured clinical notes and lack of standardized coding. To address this, the authors developed a scalable, modular framework that leverages models like Qwen2.5 and LLaMA3 to generate synthetic clinical notes across 14 detailed eviction categories. The process involves iterative prompt refinement through APO, guided by expert validation using the DSPy framework, which enables chain-of-thought reasoning and fine-grained annotation. This approach reduces manual annotation efforts by over 80%, accelerates dataset creation, and improves model performance. The resulting dataset is the largest publicly available of its kind, enabling effective fine-tuning of open-source models. Experimental results demonstrate that models like Qwen2.5-7B achieve Macro-F1 scores of 88.8%, surpassing baseline methods, and maintain robustness across datasets. The pipeline’s modularity allows adaptation to other social risk factors, promoting scalable, cost-effective integration of SDoH detection into clinical workflows. Overall, this work advances the state-of-the-art in clinical NLP, providing a practical solution for social determinant recognition, with broad implications for healthcare equity and public health interventions.

Deep Analysis

Background

The evolution of personalized medicine emphasizes incorporating social determinants of health (SDoH) into clinical decision-making. Prior works like MIMIC-IV and NLP rule-based systems have highlighted the importance but face limitations: sparse documentation, lack of standardized coding (e.g., ICD-10), and high annotation costs. Recent advances in large language models (LLMs) such as GPT-4, LLaMA, and Qwen have shown potential in automating information extraction, yet their application to complex, underrepresented SDoH domains remains limited. Addressing social risks like eviction requires high-quality, scalable annotation methods to facilitate integration into routine healthcare workflows. This background underscores the need for innovative solutions that combine synthetic data, prompt engineering, and expert validation to overcome existing bottlenecks.

Core Problem

Detecting eviction status within clinical notes is hindered by sparse, unstructured data and the absence of specific codes. Traditional rule-based or small-scale models are costly and lack scalability. Existing datasets are limited, preventing robust model training. The core challenge is developing a scalable, accurate, and generalizable method to identify nuanced eviction states, such as 'pending' or 'historical,' across diverse clinical settings, thereby enabling timely social interventions and reducing health disparities.

Innovation

The study introduces several innovations: 1) leveraging large language models for synthetic data generation, 2) implementing automated prompt optimization (APO) to refine model prompts iteratively, 3) integrating human-in-the-loop validation via DSPy for chain-of-thought reasoning, 4) constructing the largest annotated eviction-related SDoH dataset with 14 categories, and 5) enabling multi-scale model fine-tuning. These advances address data scarcity, improve detection accuracy, and reduce annotation costs, setting a new benchmark for social risk extraction in clinical NLP.

Methodology

  • �� Data augmentation: Use large models (Qwen2.5, LLaMA3) with prompts refined through APO to generate synthetic clinical notes covering 14 eviction categories.
  • �� Prompt optimization: Iteratively adjust prompts based on model performance and expert feedback, enhancing alignment with clinical language.
  • �� Validation: Experts verify generated samples, employing DSPy’s chain-of-thought reasoning to ensure label accuracy.
  • �� Dataset construction: Combine synthetic and real notes from MIMIC-IV and PMC, balancing class distributions.
  • �� Model fine-tuning: Use augmented data to train models like Qwen2.5-7B, BioBERT, and LLaMA3.
  • �� Evaluation: Measure performance via Macro-F1, Micro-F1, across binary, multi-class eviction, and non-eviction categories, with cross-dataset validation.

Experiments

The experimental setup involved training models on a dataset of 8,000 synthetic and 616 expert-annotated notes, testing on separate real-world notes from MIMIC-IV and PMC. Baselines included GPT-4o, BioBERT, and LLaMA variants. Metrics such as F1, precision, recall evaluated binary eviction detection, multi-class fine-grained classification, and broader SDoH categories. Ablation studies assessed APO’s impact, and cross-dataset tests evaluated generalization. Hyperparameters were tuned for prompt refinement and model training, ensuring robustness across scenarios.

Results

Fine-tuned Qwen2.5-7B achieved 88.8% Macro-F1 on eviction detection, outperforming GPT-4o-APO (87.8%). Multi-class classification saw APO improve GPT-4o-mini’s Macro-F1 from 69.1% to 78.1%. Models like LLaMA-3.1-8B and Qwen2.5-7B maintained scores above 88%, demonstrating scalability. The synthetic dataset enabled effective transfer learning, with models generalizing well across datasets. Category-specific F1 scores reached up to 96%, validating nuanced detection capabilities.

Applications

The approach can be integrated into clinical decision support systems to automatically flag eviction risks, aiding social workers and policymakers. It supports proactive interventions, resource allocation, and targeted outreach, especially for vulnerable populations. The scalable pipeline facilitates continuous monitoring of social risks, improving health equity. Long-term, it can underpin comprehensive SDoH analytics platforms, informing public health policies and resource planning.

Limitations & Outlook

Despite high performance, models struggle with ambiguous language and rare categories. Synthetic data may introduce biases affecting real-world accuracy. Computational demands of large models limit deployment in resource-constrained settings. Fully automated, bias-free solutions remain a future goal. Further research is needed to validate models across diverse populations and clinical environments.

Plain Language Accessible to non-experts

想象你在一家厨房做饭,食材代表不同的健康信息,厨师(模型)需要根据食材判断菜肴的状态。传统方法像用手工写菜谱,费时费力,容易出错。现在,有了智能厨师(大模型),它可以根据提示自动生成菜谱,还能根据已有食材快速判断菜肴是否需要调味或是否已熟。通过不断调整提示(提示优化),厨师变得更聪明,能做出更符合口味的菜。研究中,团队用这种智能厨师生成大量虚拟菜谱(合成数据),再请专家验证,确保菜谱合理。最后,厨师经过训练,能准确识别菜肴状态(驱逐信息),帮助厨师长(医生)更快了解客人的居住状况。这个过程大大节省了人工标注时间,也让厨房(医疗系统)更高效、更智能。

ELI14 Explained like you're 14

想象你在学校里,老师要你找出谁在玩手机,谁在认真听讲。以前,老师只用眼睛观察,费时又不准。现在,有个智能助手(模型)可以帮忙,它会看老师发的提示(比如“谁在玩手机”),用电脑判断谁在做什么。这个助手还可以学习不同老师的提示,变得越来越聪明。团队用这种方法,先让助手自己生成很多学生的表现(虚拟数据),再请老师确认哪些表现是真的。经过多次训练,助手能准确识别学生是否在玩手机,帮助老师更快管理课堂。这就像用智能软件帮老师省事,让学校变得更有序、更高效。

Abstract

Eviction is a significant yet understudied social determinants of health (SDoH), linked to housing instability, unemployment, and mental health. While eviction appears in unstructured electronic health records (EHRs), it is rarely coded in structured fields, limiting downstream applications. We introduce SynthEHR-Eviction, a scalable pipeline combining LLMs, human-in-the-loop annotation, and automated prompt optimization (APO) to extract eviction statuses from clinical notes. Using this pipeline, we created the largest public eviction-related SDoH dataset to date, comprising 14 fine-grained categories. Fine-tuned LLMs (e.g., Qwen2.5, LLaMA3) trained on SynthEHR-Eviction achieved Macro-F1 scores of 88.8% (eviction) and 90.3% (other SDoH) on human validated data, outperforming GPT-4o-APO (87.8%, 87.3%), GPT-4o-mini-APO (69.1%, 78.1%), and BioBERT (60.7%, 68.3%), while enabling cost-effective deployment across various model sizes. The pipeline reduces annotation effort by over 80%, accelerates dataset creation, enables scalable eviction detection, and generalizes to other information extraction tasks.

cs.CL cs.AI