TL;DR
This paper demonstrates that reasoning-capable Large Language Models (LLMs) can accurately predict fine-grained Social Determinants of Health (SDoH) billing codes (ICD-9 V-codes) directly from unstructured hospital admission notes. By leveraging chain-of-thought prompting, the best-performing model achieved an 89.1% micro-F1 score, successfully uncovering critical social risk factors that physicians frequently document in text but fail to officially code.
What Problem Does This Paper Address?
Social Determinants of Health (SDoH)—such as homelessness, unemployment, and a history of abuse—account for an estimated 80–90% of modifiable health outcomes. Despite their massive impact, these factors are rarely captured in structured electronic health record (EHR) databases. In fact, physicians officially assign SDoH billing codes in as few as 2% of cases, even for patients with clearly documented social needs.
The bottleneck is time and expertise; these crucial details get buried deep within unstructured clinical narratives. While prior work has used LLMs to classify sentences into broad SDoH categories, predicting specific, fine-grained billing codes at the admission level remains a major challenge due to long-distance context dependencies and complex coding rules across massive, multi-page clinical notes.
Methods
The authors frame SDoH extraction as a multi-label classification task at the hospital admission level. They evaluate seven different LLMs, comparing frontier closed-source models (like GPT-5-mini) against open-source alternatives (like Qwen3 and Llama-3.3).
Instead of standard zero-shot prompting, they employ a highly structured few-shot prompting strategy designed to mimic a certified medical coder. The prompt explicitly details:
- Labeling criteria and strict definitions for each code.
- Hierarchical code exclusion rules (e.g., if a patient is homeless, code V60.0, which completely excludes the more general "inadequate material resources" code V60.2).
- Enhanced positive and negative examples to prevent false positives.
The pipeline processes each clinical note independently across an admission and then aggregates the predictions at the admission level.
Datasets
The study utilizes the widely used MIMIC-III v1.4 dataset, focusing on unstructured text from discharge summaries, nursing notes, and social work evaluations.
To evaluate the models properly, the authors curated an evaluation dataset of 139 admissions. Crucially, they introduced the concept of "amended codes." Because physicians heavily under-code SDoH, the authors manually reviewed the notes and added missing V-codes where explicit textual evidence existed (e.g., adding an unemployment code if the text explicitly stated the patient was jobless, even if the original billing data omitted it). They evaluated the models against 8 specific ICD-9 V-codes spanning housing, employment, legal, and abuse history domains.
Key Insights and Ideas
- Reasoning Models are Crucial for Long Contexts: Traditional LLMs (like GPT-3.5-turbo and Llama-3.3) struggled significantly, whereas reasoning-focused models excelled. The ability to perform intermediate chain-of-thought reasoning allows these models to successfully navigate complex inclusion/exclusion clauses and synthesize evidence scattered across lengthy clinical narratives.
- Open-Source is Highly Competitive: You don't need expensive, proprietary APIs for clinical coding. Open-source models like Qwen3-32B and GPT-OSS-20B achieved exact match scores (~65%) very close to frontier models, making localized, privacy-compliant deployment feasible for resource-constrained healthcare settings.
- The "Under-Coding" Gap is Quantifiable: The massive performance drop when evaluating models on original vs. amended codes highlights a systemic issue in healthcare data: models aren't necessarily hallucinating; they are catching real clinical diagnoses that human doctors omitted from the final billing sheets.
Key Results
- Top Performance: GPT-5-mini achieved the highest overall performance with a 72.2% exact match and an 89.1% micro-F1 score on the amended dataset.
- Open-Source Standouts: Qwen3-32B and GPT-OSS-20B followed closely with 65.5% and 65.2% exact match scores, respectively. Traditional models like GPT-3.5-turbo lagged far behind at 14.4%.
- Code-Specific Variance: Performance was near-perfect for categories with highly standardized terminology (e.g., Homelessness V60.0 achieved a 97.4% F1; Family Alcoholism V61.41 hit 98.4% F1). However, performance dropped significantly for codes requiring complex inference across scattered text, such as Emotional Abuse (V15.42), which had a recall of just 25%.
- Amended vs. Original: When tested against the original, unamended physician codes, GPT-5-mini's exact match fell to 48.9%, proving that the model frequently detects valid SDoH factors that went unbilled.
Limitations and Future Work
- Dataset Constraints: The study relies entirely on MIMIC-III, which reflects historical data (2001-2012) from a single institution and uses the older ICD-9 standard rather than ICD-10.
- Annotation Bias: The evaluation dataset was amended by a single annotator, meaning there is no inter-rater reliability score to validate the ground truth labels.
- Missing Clinical Context: The dataset only includes discharge summaries and ICU notes. Notes written during a patient's stay after being moved to general wards were omitted, which likely left out additional SDoH documentation.
- Future Directions: Future work should optimize prompts to improve the recall of low-support, high-inference codes (like emotional abuse) and scale the approach to modern ICD-10 Z-codes across multi-institutional datasets.
Summary updated