TL;DR
Eviction is a critical social determinant of health (SDoH), but it is rarely captured in structured electronic health record (EHR) data. This paper introduces SynthEHR-Eviction, a human-in-the-loop pipeline that combines LLMs and automated prompt optimization to generate and annotate a fine-grained eviction dataset. Fine-tuning smaller open-source LLMs on this synthetic data yields state-of-the-art performance—matching or beating GPT-4o—while slashing human annotation costs by over 80%.
What Problem Does This Paper Address?
Social Determinants of Health (SDoH)—such as housing instability, food insecurity, and financial strain—contribute to as much as 80%–90% of patient health outcomes. Despite its profound impact, SDoH information is usually buried within unstructured free-text clinical notes rather than structured fields (like ICD-10 codes).
Eviction is a particularly high-impact SDoH category that triggers a cascade of adverse outcomes, including homelessness and mental health crises. However, it is incredibly sparse in standard EHR datasets, appearing in fewer than 1 in 1,000 records. Building machine learning models to extract eviction status faces a severe "cold-start" problem due to this data scarcity and the prohibitive cost of expert manual text annotation.
Methods
The authors propose SynthEHR-Eviction, a scalable pipeline designed to generate high-fidelity, eviction-labeled clinical notes aligned with real-world documentation practices. The pipeline consists of three core components:
- LLM-Based Data Augmentation: Label-specific LLM augmenters take raw clinical notes (from the MIMIC database) and rewrite them to reflect specific SDoH categories.
- Automated Prompt Optimization (APO): Utilizing the DSPy framework, the system automatically optimizes prompts to generate Chain-of-Thought (CoT) reasoning traces alongside fine-grained labels.
- Human-in-the-Loop (HITL) Validation: Clinical experts review the synthetic notes. If the generation accuracy drops below 90%, the feedback is fed back into the LLM to refine the prompts iteratively.
The classification task is structured as a three-step cascade:
- Step 1: Binary classification (eviction vs. non-eviction).
- Step 2: Eviction multi-class classification (7 fine-grained subcategories, including pending, hypothetical, current present, and mutual rescission history).
- Step 3: Non-eviction multi-class classification (7 categories, including homelessness, food insecurity, and transportation insecurity).
Datasets
- SynthEHR-Eviction Dataset: The primary output of the pipeline, containing 8,000 synthetic training and development instances balanced across 14 fine-grained SDoH categories.
- Evaluation Test Sets: A diverse testbed of 616 expert-annotated instances spanning three distinct linguistic styles:
- Synth: Purely synthetic clinical notes generated by the pipeline.
- MIMIC-IV: Real-world clinical notes filtered and selectively rewritten by humans to introduce eviction scenarios.
- PMC-Patients: Long, complex case reports from PubMed Central rewritten to include eviction contexts.
Key Insights and Ideas
- Reasoning Helps Small Models Scale: Including explicit Chain-of-Thought reasoning traces in the training data significantly boosts the performance of smaller models. For instance, LLaMA-3.2-3B saw a +3.8 boost in Macro-F1 when trained with reasoning annotations. Conversely, larger models (7B/8B) showed stable performance regardless of reasoning annotations, indicating they already possess strong inherent reasoning capabilities.
- The 30% Hybrid Rule for Generalization: Models trained purely on synthetic data struggle to generalize to complex, narrative clinical text (like PMC case reports). However, the authors discovered that replacing just 30% of the synthetic training data with real-world notes dramatically improves out-of-domain performance, boosting Qwen2.5-7B's Micro-F1 by +0.302 on PMC data.
- Data Size Plateaus Early: Across both eviction and non-eviction tasks, model performance gains typically plateaued between 3,000 and 5,000 samples. Beyond 5,000 samples, several models exhibited signs of overfitting, proving that high-density synthetic data removes the need for massive datasets.
- Temporal Ambiguity is the Hardest Challenge: The most common classification errors stemmed from implicit timelines in clinical text. Models frequently struggled to differentiate between a completed historical eviction and an active, ongoing eviction crisis due to confusing contextual cues (e.g., a note mentioning a "history of housing instability" but referencing an eviction "two months ago").
Key Results
- Massive Efficiency Gains: Full manual rewriting and annotation of 8,000 notes took over 266 hours. The SynthEHR-Eviction pipeline achieved comparable data quality with less than 6 hours of human effort—an over 80% reduction in annotation time.
- Outperforming Closed-Source Giants: Fine-tuned open-source models trained on the dataset achieved outstanding results. Qwen2.5-7B achieved an average Macro-F1 score of 88.8% on eviction subcategories and 90.3% on other SDoH categories, outperforming GPT-4o-APO (87.8% / 87.3%) and vastly outperforming traditional biomedical encoders like BioBERT (60.7% / 68.3%).
- Edge-Deployable Performance: Smaller 3B-scale models (LLaMA-3.2-3B, Qwen2.5-3B) performed highly competitively, achieving average Micro-F1 scores around 0.87, making them viable for resource-constrained clinical environments.
Limitations and Future Work
- Distributional Bias: While grounded in real EHR patterns, synthetic data may still fail to capture the full sociolinguistic nuances and documentation variations present across different healthcare institutions.
- Reasoning Fidelity: The authors noted that a model outputting a correct final label with a plausible-sounding explanation does not guarantee fidelity—sometimes the model arrived at the right label for the wrong reason.
- Future Directions: The authors suggest exploring explicit temporal tagging or note timestamps to resolve timeline ambiguities. They also advocate for hybrid symbolic-neural architectures and model distillation to make these SDoH extraction tools more equitable and deployable at scale.
Summary updated