Manuscript Offprint

arXiv:2610.01963

Counterfactual Auditing of Bias in Open-Source Large Language Models for Clinical Triage

Manar Aljohani, Brandon Ho, Kenneth McKinley, Dennis Ren, Xuan Wang

Open access. PaperVantage converted this article to text, so layout and figures may differ from the original.

1st1^{st} Manar Aljohani

Department of Computer Science

Virginia Tech

Blacksburg, VA, US

manara@vt.edu

2nd2^{nd} Brandon Ho

Division of Emergency Medicine

University of Washington and Seattle Children's Hospital

Seattle, WA, USA

Brandon.Ho@seattlechildrens.org

3rd3^{rd} Kenneth McKinley

Children's National Hospital

Washington DC, USA

kmckinley@childrensnational.org

4th4^{th} Dennis Ren

Children's National Hospital

Washington DC, USA

dmren2@childrensnational.org

5th5^{th} Xuan Wang

Department of Computer Science

Virginia Tech

Blacksburg, VA, US

xuanw@vt.edu

Abstract—Emergency department (ED) triage is a high-stakes prioritization task in which demographic, socioeconomic, and system-context information may improperly influence acuity assignment. Although open-source large language models (LLMs) are increasingly considered for local and privacy-preserving clinical decision support, it remains unclear how counterfactual bias varies across model families, model sizes, medical-domain models, and domain-adapted models. We present a comparative counterfactual audit of ten open-source LLMs for pediatric Emergency Severity Index (ESI) prediction. Starting from real and handbook-style clinical vignettes, we construct paired counterfactual variants that change only one injected demographic, socioeconomic, healthcare-access, behavioral, social, or system-context variable while holding the clinical presentation fixed. We evaluate base Qwen2.5-7B, Qwen2.5-14B-Instruct, a Qwen2.5-7B model fine-tuned by us using QLoRA, MedGemma variants, MedLLaMA2-7B, GPT-OSS-20B, and GPT-OSS-120B. We measure any counterfactual shift, undertriage shift, overtriage shift, significant shifts greater than one ESI level, mean shift, and mean absolute shift. Across models, counterfactual sensitivity varied substantially and did not consistently decrease with larger model size or medical-domain pretraining. The fine-tuned Qwen2.5-7B model showed the lowest overall sensitivity, with a 5.27% any-shift rate and mean absolute shift of 0.0534, compared with 16.02% and 0.1706 for the base Qwen2.5-7B. Several larger or medical-domain models produced higher rates of significant shifts. Stratified and correlation analyses showed that aggregate shift rates can hide clinically important directionality and shared failure patterns. These findings support counterfactual auditing as a lightweight and clinically interpretable framework for comparing fairness risks across open-source LLMs before clinical deployment.

Index Terms—clinical triage, Emergency Severity Index, large language models, algorithmic fairness, counterfactual evaluation, health equity, pediatric emergency medicine

I. INTRODUCTION

Emergency department (ED) triage determines the priority with which patients receive care, most commonly through the Emergency Severity Index (ESI) - a standardized five-level triage tool that assigns urgency based on patient acuity and expected resource use [1, 2]. Growing evidence suggests that this process is not applied equitably across patient populations. Multiple studies have documented disparities in ESI assignment across sex, race/ethnicity, language, and insurance status, indicating that triage scores may reflect not only clinical acuity but also structural inequities embedded in care delivery [5, 6, 7]. Because ESI is widely used in U.S. EDs [3], even small systematic biases can compound into significant population level harms that affect throughput, patient safety, and equity at scale.

Open-source large language models (LLMs) are increasingly attractive for clinical triage because they can be deployed locally, support privacy-preserving inference, and can be fine-tuned on institution-specific documentation. However, models trained on clinical text may learn spurious associations between acuity and non-clinical descriptors, such as race, language, insurance status, housing instability, prior ED use, or primary-care access. These associations may reflect historical bias rather than clinically appropriate evidence. The risk is analogous to well-known examples of algorithmic bias in healthcare, where seemingly neutral proxies can encode inequitable access and lead to systematically different care recommendations [8].

Recent work has shown that LLMs can reproduce or amplify health inequities when sociodemographic or contextual attributes are added to medical prompts [12, 11, 13, 14]. However, existing studies have primarily focused on cloud-based LLMs, general medical decision-making, binary or coarse triage tasks, or a narrower set of demographic factors. In contrast, our study compares ten open-source LLMs across model families and sizes, evaluates pediatric five-level ESI prediction, tests a broader set of triage-relevant demographic, socioeconomic, healthcare-access, behavioral, social, and system-context variables, and reports clinically directional undertriage and overtriage shifts.

We study this risk in pediatric ED triage using a counterfactual variable injection design focused on triage-relevant factors, such as arrival mode, prior ED use, and ED crowding. The central question is: Does an LLM change its ESI prediction when only demographic, socioeconomic, or triage-contextual information changes and the clinical presentation remains identical? Unlike standard subgroup evaluation, this approach uses each vignette as its own control and avoids conflating case-mix differences with model sensitivity. We evaluate both whether predictions change and whether the change represents undertriage to a less urgent ESI level or overtriage to a more urgent ESI level.

This paper makes four contributions:

• We present a comparative counterfactual audit of ten open-source LLMs for pediatric ESI prediction, spanning small and larger general models, medical-domain models, and a domain-adapted Qwen2.5-7B model.

• We introduce a single-variable injection protocol that holds the clinical vignette fixed while perturbing triage-relevant demographic, socioeconomic, healthcare-access, behavioral, social, and system-context variables.

• We evaluate fairness-relevant sensitivity using triage-specific direction-aware metrics, separating undertriage shifts from overtriage shifts and reporting significant ESI changes greater than one level.

• We show that larger model size and medical-domain pre-training do not guarantee lower bias; instead, the Qwen2.5-7B model fine-tuned by us using QLoRA had the lowest counterfactual sensitivity across most analyses.

References (21)