Do Large Language Models Show Racial and Sex Bias in Pain Management? A Counterfactual Audit of GPT, Claude, Gemini, Llama, DeepSeek and Qwen
Organizations: Lee Business School, Information Systems University of Nevada, Las Vegas Las Vegas, NV, USA · DeepNeuro.ai Las Vegas, NV, USA
Abstract
Racial and ethnic minority patients receive less pain treatment than non-Hispanic White patients, and large language models (LLMs) used as medical AI could reproduce that bias. Prior audits tested a few proprietary models, stated race explicitly and rarely measured the models' own response instability. In exploratory, non-preregistered analyses, Study 1 had four open-weight LLMs assess six acute-pain vignettes in every combination of four races and two sexes, with identity stated or cued only by a name (two names per group), comparing each identity with a White male reference on the same case and sampling seed. In Study 2, 24 configurations of 17 models, including OpenAI's GPT-4.1 mini and gpt-oss, Anthropic's Claude Haiku 4.5, Google's Gemini 2.5 Flash, Meta's Llama, DeepSeek and Qwen, with reasoning on and off and at two precisions, answered the same vignettes and the 50 clinician-written Q-Pain cases. In this single-prompt, JSON-constrained task, no difference survived correction in Study 1, none of 1,386 comparisons survived the false discovery rate in Study 2, and every pain-severity difference was equivalent to zero within one point on a 0-10 scale (within a quarter point for 237 of 238 Q-Pain comparisons). Opioid decisions were bounded less precisely (Study 1 could not exclude differences of about 20 percentage points), so they show no detected difference, not proof of none. The few differences surviving correction within a model favoured Black patients. Models differed far more from one another and across their own settings than between patients (the reference patient received the high opioid dose in 6% to 93% of responses), although serving software, provider and prompt format also differed. Fairness audits of clinical AI should use several names per group, pair comparisons on the seed, report the noise floor and test each deployed configuration.
Figures & tables
| Race | Men | Women |
|---|---|---|
| White | Greg Baker; Todd Walsh | Emily Walsh; Allison Baker |
| Black | Jamal Washington; DeShawn Jefferson | Lakisha Washington; Tamika Jefferson |
| Hispanic | Jose Hernandez; Luis Garcia | Maria Hernandez; Guadalupe Garcia |
| Asian | Wei Zhang; Hiroshi Tanaka | Mei Chen; Yuki Tanaka |
| Model | Ollama tag | Developer | Parameters | Quantisation | Licence |
|---|---|---|---|---|---|
| gemma3 12B | gemma3:12b | 12.2B | Q4_K_M | Gemma Terms of Use | |
| qwen3 14B | qwen3:14b | Alibaba | 14.8B | Q4_K_M | Apache 2.0 |
| ministral-3 14B | ministral-3:14b | Mistral AI | 13.9B | Q4_K_M | Apache 2.0 |
| llama3.2 3B | llama3.2:latest | Meta | 3.2B | Q4_K_M | Llama 3.2 Community |
| Configuration | Access | Provider | Precision | Reasoning | Responses | Invalid | Output tokens | Cost (USD) |
|---|---|---|---|---|---|---|---|---|
| gemma3 12B | local | Ollama | Q4_K_M | off | 3,120 | 0 | 67 | – |
| qwen3 14B, reasoning off | local | Ollama | Q4_K_M | off | 3,120 | 0 | 74 | – |
| qwen3 14B, reasoning on | local | Ollama | Q4_K_M | on | 720 | 0 | 620 | – |
| ministral-3 14B | local | Ollama | Q4_K_M | off | 3,120 | 0 | 90 | – |
| llama3.2 3B | local | Ollama | Q4_K_M | off | 3,120 | 0 | 72 | – |
| qwen3.8 27B, reasoning off | local | Ollama | Q4_K_M | off | 720 | 0 | 67 | – |
| Condition | Model | Responses | Parsed | Mean severity (SD) | Range | Strong-opioid rate |
|---|---|---|---|---|---|---|
| Pilot (self-rated) | gemma3 12B | 240 | 240 | 8.33 (0.75) | 7–9 | 0.47 |
| qwen3 14B | 240 | 240 | 8.50 (0.96) | 7–10 | 0.49 | |
| ministral-3 14B | 240 | 240 | 8.30 (1.00) | 6–10 | 0.53 | |
| llama3.2 3B | 240 | 240 | 8.50 (0.96) | 7–10 | 0.50 | |
| Explicit labels | gemma3 12B | 240 | 240 | 7.72 (1.09) | 6–9 | 0.29 |
| qwen3 14B | 240 | 240 | 7.07 (1.06) | 5–8 | 0.47 |
| Condition | Model | Outcome | /arm | Largest | Identity | 95% CI | min | min |
|---|---|---|---|---|---|---|---|---|
| Explicit labels | gemma3 12B | Severity | 30 | -0.10 | Asian man | [-0.20, 0.00] | 0.253 | 1.000 |
| Strong opioid | 30 | -0.100 | Black woman | [-0.233, 0.033] | 0.374 | 1.000 | ||
| qwen3 14B | Severity | 30 | +0.03 | Black woman | [0.00, 0.10] | 1.000 | 1.000 | |
| Strong opioid | 30 | -0.033 | Black man | [-0.100, 0.000] | 1.000 | 1.000 | ||
| ministral-3 14B | Severity | 30 | +0.07 | Black man | [-0.07, 0.20] | 0.503 | 1.000 | |
| Strong opioid | 30 | -0.067 | Black woman | [-0.200, 0.067] | 0.612 | 1.000 |
| Strong-opioid flip rate | Severity disagreement rate | Minimum detectable | |||||
|---|---|---|---|---|---|---|---|
| Condition | Model | Floor | Identity | Floor | Identity | Severity | Opioid |
| Explicit labels | gemma3 12B | 0.179 | 0.057 | 0.083 | 0.105 | 0.17 | 0.120 |
| qwen3 14B | 0.062 | 0.010 | 0.092 | 0.029 | 0.09 | 0.050 | |
| ministral-3 14B | 0.171 | 0.076 | 0.354 | 0.052 | 0.12 | 0.141 | |
| llama3.2 3B | 0.029 | 0.029 | 0.000 | 0.000 | 0.00 | 0.086 | |
| Name cues | gemma3 12B | 0.083 | 0.076 | 0.071 | 0.100 | 0.11 | 0.099 |
| Reference (White man) mean | Largest severity | Largest opioid offered | Equivalent | ||||||
|---|---|---|---|---|---|---|---|---|---|
| Configuration | Cue | Severity | Opioid offered | High dose | (identity) | (identity) | of 7 | ||
| gemma3 12B | explicit | 7.51 | 0.74 | 0.06 | +0.05 (Hispanic woman) | 0.871 | 0 (all) | 1.000 | 7/7/7 |
| names | 7.56 | 0.75 | 0.09 | +0.07 (Black woman) | 0.215 | 0.020 (Hispanic woman) | 1.000 | 7/7/5 | |
| qwen3 14B, reasoning off | explicit | 7.58 | 0.87 | 0.24 | +0.03 (Asian woman) | 0.872 | +0.013 (Black woman) | 1.000 | 7/7/7 |
| names | 7.59 | 0.84 | 0.31 | +0.03 (Black man) | 1.000 | 0.047 (Hispanic woman) | 1.000 | 7/6/7 | |
| ministral-3 14B | explicit | 7.90 | 0.82 | 0.53 | +0.10 (Black woman) | 0.069 | +0.027 (Black man) | 1.000 | 7/7/7 |
| Contrast | Cases | Cue | baseline severity [95% CI] | baseline opioid [95% CI] | min |
|---|---|---|---|---|---|
| DeepSeek V4.1 Flash: on minus off | Authored cases | explicit | +0.54 [+0.31, +0.77] | 0.117 [ 0.342, +0.000] | 0.875 |
| Authored cases | names | +0.40 [+0.21, +0.61] | 0.114 [ 0.338, +0.000] | 0.438 | |
| Q-Pain | explicit | +0.38 [+0.30, +0.48] | 0.090 [ 0.145, 0.040] | 0.058 | |
| Q-Pain | names | +0.35 [+0.26, +0.44] | 0.134 [ 0.213, 0.062] | 0.027 | |
| gpt-oss 20B: high minus low | Authored cases | explicit | +0.25 [+0.17, +0.33] | 0.050 [ 0.200, +0.062] | 0.875 |
| Authored cases | names | +0.23 [+0.08, +0.36] | 0.075 [ 0.287, +0.106] | 0.875 |
| Contrast | Cases | Cue | baseline severity [95% CI] | baseline opioid [95% CI] | min |
|---|---|---|---|---|---|
| Gemma 3 12B: bf16 minus 4-bit | Authored cases | explicit | 0.09 [ 0.21, +0.02] | +0.042 [ 0.117, +0.233] | 1.000 |
| Authored cases | names | 0.17 [ 0.38, +0.02] | +0.058 [ 0.013, +0.188] | 1.000 | |
| Q-Pain | explicit | 0.02 [ 0.09, +0.04] | +0.020 [+0.000, +0.060] | 1.000 | |
| Q-Pain | names | 0.01 [ 0.08, +0.06] | +0.022 [+0.000, +0.059] | 0.870 |
Appendix figures & tables6 assets
Supplementary material from the paper’s appendix.
Appendix
| Identity | Name | gemma3 12B | qwen3 14B | ministral-3 14B | llama3.2 3B |
|---|---|---|---|---|---|
| White man | Greg Baker | 7.67 | 7.13 | 7.53 | 7.33 |
| Todd Walsh | 7.77 | 7.13 | 7.50 | 7.33 | |
| White woman | Emily Walsh | 7.83 | 7.10 | 7.53 | 7.33 |
| Allison Baker | 7.77 | 7.10 | 7.53 | 7.33 | |
| Black man | Jamal Washington | 7.77 | 7.13 | 7.53 | 7.33 |
| DeShawn Jefferson | 7.73 | 7.13 | 7.67 | 7.33 |
| Reference (White man) mean | Largest severity | Largest strong opioid | Equivalent | |||||
|---|---|---|---|---|---|---|---|---|
| Configuration | Cue | Severity | Strong opioid | (identity) | (identity) | of 7 | ||
| gemma3 12B | explicit | 7.73 | 0.33 | 0.10 (Asian man) | 1.000 | 0.100 (Black woman) | 1.000 | 7/1 |
| names | 7.72 | 0.25 | +0.12 (Hispanic woman) | 1.000 | +0.050 (Hispanic man) | 1.000 | 7/3 | |
| qwen3 14B, reasoning off | explicit | 7.07 | 0.47 | +0.03 (Black woman) | 1.000 | 0.033 (Black man) | 1.000 | 7/5 |
| names | 7.13 | 0.50 | 0.07 (Asian woman) | 1.000 | 0.067 (Hispanic woman) | 1.000 | 7/5 | |
| qwen3 14B, reasoning on | explicit | 6.83 | 0.43 | +0.23 (Black woman) | 1.000 | +0.067 (Black man) | 1.000 | 7/0 |
| Configuration | Cue | Severity | Opioid offered | High dose | |||||||||
|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
| floor | diff. seed | same seed | MDE | floor | diff. seed | same seed | MDE | floor | diff. seed | same seed | MDE | ||
| gemma3 12B | explicit | 0.033 | 0.038 | 0.038 | 0.06 | 0.000 | 0.000 | 0.000 | 0.000 | 0.003 | 0.014 | 0.014 | 0.040 |
| names | 0.033 | 0.053 | 0.051 | 0.07 | 0.005 | 0.013 | 0.015 | 0.035 | 0.017 | 0.057 | 0.055 | 0.080 | |
| qwen3 14B, reasoning off | explicit | 0.055 | 0.053 | 0.027 | 0.04 | 0.015 | 0.019 | 0.012 | 0.030 | 0.057 | 0.058 | 0.051 | 0.055 |
| names | 0.050 | 0.066 | 0.027 | 0.05 | 0.032 | 0.054 | 0.028 | 0.055 | 0.065 | 0.085 | 0.065 | 0.068 | |
| ministral-3 14B | explicit | 0.505 | 0.504 | 0.101 | 0.08 | 0.158 | 0.153 | 0.066 | 0.047 | 0.072 | 0.066 | 0.033 | 0.036 |
| Configuration | Cue | Severity | Strong opioid | ||||||
|---|---|---|---|---|---|---|---|---|---|
| floor | diff. seed | same seed | MDE | floor | diff. seed | same seed | MDE | ||
| gemma3 12B | explicit | 0.083 | 0.083 | 0.105 | 0.12 | 0.179 | 0.193 | 0.057 | 0.121 |
| names | 0.071 | 0.130 | 0.100 | 0.16 | 0.083 | 0.118 | 0.076 | 0.137 | |
| qwen3 14B, reasoning off | explicit | 0.092 | 0.093 | 0.029 | 0.05 | 0.062 | 0.064 | 0.009 | 0.027 |
| names | 0.079 | 0.073 | 0.048 | 0.07 | 0.017 | 0.014 | 0.014 | 0.040 | |
| qwen3 14B, reasoning on | explicit | 0.379 | 0.357 | 0.376 | 0.34 | 0.058 | 0.076 | 0.062 | 0.120 |
| Configuration | Cases | Cue | Invalid | Records | By identity | ||
|---|---|---|---|---|---|---|---|
| qwen3.6 35B, reasoning on | Authored cases | explicit | 1 | 240 | 0/0/0/1/0/0/0/0 | 1.000 | 1.000 |
| Authored cases | names | 12 | 480 | 1/2/3/0/2/0/3/1 | 0.569 | 1.000 | |
| gpt-oss 120B, effort high | Q-Pain | explicit | 1 | 1,200 | 0/0/0/0/1/0/0/0 | 1.000 | 1.000 |
| Q-Pain | names | 3 | 1,200 | 0/0/0/0/0/1/0/2 | 0.346 | 1.000 | |
| DeepSeek V4.1 Flash, reasoning on | Authored cases | names | 4 | 480 | 0/0/1/0/1/1/0/1 | 1.000 | 1.000 |
| Q-Pain | explicit | 26 | 1,200 | 4/2/1/7/5/3/2/2 | 0.278 | 1.000 |
| Configuration | Seeded | Rows | Median ratio |
|---|---|---|---|
| gemma3 12B | yes | 4 | 0.71 |
| qwen3 14B, reasoning off | yes | 7 | 0.50 |
| qwen3 14B, reasoning on | yes | 4 | 1.01 |
| ministral-3 14B | yes | 10 | 0.34 |
| llama3.2 3B | yes | 4 | 0.32 |
| qwen3.8 27B, reasoning off | yes | 4 | 0.18 |
Demographic Bias in Language Models
Demographic bias in language models studies how identity cues shape model outputs, decisions, and representations, and how to detect and reduce resulting disparities.
See all 144 papers