TL;DR
Extracting Social Determinants of Health (SDoH) from unstructured clinical notes is vital for patient care but computationally expensive when using Large Language Models (LLMs). This paper introduces a hybrid, two-step pipeline that uses a fast, traditional deep learning model to filter out negative sentences, routing only the potential SDoH-positive cases to a fine-tuned LLM. This approach maintains high precision while delivering a massive 12x speedup over pure LLM inference.
What Problem Does This Paper Address?
Social Determinants of Health (SDoH)—such as housing instability, employment status, and access to transportation—profoundly impact patient outcomes. Unfortunately, this critical information is rarely structured neatly in Electronic Health Records (EHRs); instead, it is buried within unstructured clinical narratives.
While modern LLMs excel at extracting these nuanced social contexts, running them over millions of longitudinal hospital notes is prohibitively slow and expensive. Conversely, smaller, traditional deep learning models (like BERT variants) are incredibly fast but struggle to accurately classify rare, highly imbalanced SDoH categories. The authors tackle this classic trade-off: how do we achieve LLM-level precision at a fraction of the computational cost?
Methods
The authors evaluate both pure LLM approaches (using Llama 3.1 8B and Llama 3.3 70B) and feature-engineered traditional deep learning models (RoBERTa Base). Their key architectural contribution is a hybrid Two-step classifier:
- Step 1 (The Filter): A lightweight, traditional binary deep learning classifier (RoBERTa Base) scans the clinical text to determine if a sentence contains any SDoH at all. Because roughly 92% of clinical sentences contain no SDoH mentions, this step instantly filters out the vast majority of the workload.
- Step 2 (The Specialist): If the binary classifier flags a sentence as positive, it is routed to a fine-tuned Llama 3.1 8B Instruct model to perform the final, complex multilabel classification (identifying specific categories like Housing, Transportation, or Employment).
For their standalone traditional models, the authors also designed a unique neural architecture that fuses RoBERTa embeddings with explicit linguistic features (part-of-speech tags, dependency tree depth) and medical concept features. They extracted Unified Medical Language System (UMLS) Concept Unique Identifiers (CUIs) using MedCAT and embedded them via a clinically trained Sentence-BERT (SBERT) model to help the network map medical jargon directly to social factors.
Datasets
The models were trained and evaluated using the following datasets:
- MIMIC-III Subset: 5,355 sentences extracted from real ICU clinical notes, annotated for six SDoH categories (Employment, Housing, Parent, Relationship, Support, Transportation) or No SDoH. This dataset is heavily imbalanced, with 92.6% of sentences containing no SDoH.
- Synthetic Dataset: 588 sentences generated by LLMs, where every sentence contains at least one SDoH category.
- Amended Dataset: The combination of the MIMIC-III subset and the synthetic dataset (5,943 sentences total), used to test if synthetic data boosts smaller model performance.
Key Insights and Ideas
- Exploiting Sparsity for Speed: SDoH data in clinical text is sparse. By recognizing that most sentences are "noise" (SDoH-negative), the hybrid pipeline successfully shifts the heavy lifting away from the LLM.
- Synthetic Data is an Equalizer for Smaller Models: One of the most striking findings was that supplementing the training set with LLM-generated synthetic data drastically closed the performance gap between RoBERTa and pure LLMs. On the Amended dataset, the traditional RoBERTa Base model actually outperformed the fine-tuned Llama 3.1 8B model in Macro F1 score.
- LLMs Handle the Long Tail Better: On the highly imbalanced, real-world MIMIC-III dataset, traditional models completely failed to detect ultra-rare labels like Housing and Transportation (which had only 3 occurrences each). Fine-tuned LLMs, however, maintained non-zero performance across all categories due to their superior semantic priors.
Key Results
- Accuracy: The fine-tuned Llama 3.1 8B Instruct model achieved the highest Macro F1 score (0.67) on the MIMIC-III dataset, outperforming the previous state-of-the-art baseline (0.57) by 10 points.
- The Hybrid Compromise: The proposed Two-step model achieved a highly competitive Macro F1 of 0.62—performing within 5 points of the best pure LLM.
- Inference Latency: The standalone traditional binary classifier processed an astonishing 371 sentences per second (73x faster than fine-tuned Llama 3.1 8B). The hybrid Two-step pipeline clocked in at 61.7 sentences per second, yielding a 12x speedup over the pure LLM pipeline while preserving its ability to catch rare SDoH categories (see Table 6 in the paper).
Limitations and Future Work
- Error Propagation: The two-step model is inherently bottlenecked by the first step. If the traditional binary classifier suffers from a false negative and misses an SDoH mention, the LLM never receives the sentence, leading to a drop in overall macro recall.
- LLM Output Parsing: In few-shot settings, the LLMs occasionally hallucinated or structured their responses inconsistently, requiring complex regular expressions to parse the outputs cleanly.
- Future Directions: The authors plan to train the second-step LLM exclusively on positive SDoH data (removing the "No SDoH" label entirely) to streamline its focus. They also aim to better integrate dense clinical embeddings like
cui2vecto mitigate medical concept sparsity.
Summary updated