Paper commentary
Do Large Language Models Show Racial and Sex Bias in Pain Management? A Counterfactual Audit of GPT, Claude, Gemini, Llama, DeepSeek and Qwen
Language models showed no racial or sex bias in pain management audits
- Problem Earlier pain audits tested few proprietary models, stated race outright, and rarely measured how much answers vary between runs. Large language models could reproduce the known undertreatment of minority patients, so that needed checking.
- Method The authors vary only the patient's identity in a clinical vignette, using explicit labels or names. Each identity is compared with a White male reference on the same case and seed across 17 models.
- Results No identity difference survived correction in Study 1, and none of 1,386 comparisons in Study 2 passed the false discovery rate. Every severity difference stayed within one point on a 0-10 scale.

Figure 1 : Study workflow, in six numbered steps. Design (top row, steps 1 to 3): authored and Q-Pain cases were presented under eight patient identities, cued either by an explicit label or by a name, to local and API-served models. Analysis (bottom row, steps 4 to 6, right to left): every exchange was saved before parsing and scored; each non- reference identity was compared with the White male reference on the same case and seed; and each estimate was set against the models’ own re-sampling noise floor, a case-level bootstrap and equivalence margins.
Original paper · CC BY 4.0 · Richard J. Young, Alice M. Matthews · Do Large Language Models Show Racial and Sex Bias in Pain Management? A Counterfactual Audit of GPT, Claude, Gemini, Llama, DeepSeek and Qwen · Original paper figure · Extracted the figure area from page 5 of the original PDF.Why earlier pain audits leave a gap
Pain assessment depends on how a clinician reads a patient's report, and that reading isn't neutral. Language models trained on text from a system with documented disparities could carry those disparities into their answers. Direct pain assessment by newer proprietary models looked different in the Young et al. study, which found no influence of race or sex.
Every pain audit also stated the patient's race and sex explicitly, a cue that instruction-tuned models may be trained to handle carefully. Names are a different route, because demographic signal often arrives through a name in real notes. Name-based audits outside medicine consistently find disadvantage for names linked to racial minorities and women, yet no pain audit had used name cues.
A single name per group also confounds a name's idiosyncrasy with a group effect, and an audit instrument can itself produce effects as large as the bias under test.
Without that noise floor, a measured identity difference has no baseline to be judged against. Hypothesis 1 predicted that explicit labels wouldn't change pain-severity ratings or strong-opioid recommendations, following the Young et al. null result. Hypothesis 2 predicted that name cues would lower severity and strong-opioid recommendations for Black and Hispanic patients than for White male names.
Changing only the identity words
The key idea is to render one clinical vignette under eight patient identities, four races crossed with two sexes, and change nothing else. Study 1 uses two cue types on four open-weight models: an explicit line stating race and sex, and a name line with no race or sex word. Study 2 repeats both cue types on a panel of 24 configurations of 17 models and on 50 Q-Pain cases.
The six authored cases are acute-pain presentations such as renal colic in a 38-year-old patient, drafted with an LLM and edited by the first author. Each case carries a history, observed pain behaviour and vital signs, and none was drawn from a patient record. A pilot version replaced the behaviour with a self-reported rating, but the models simply copied that number, so the authors dropped it from the tests.
Q-Pain's placeholder is filled with a race and sex word, or in the name condition with one of ten first names per group.
Each request is one user message with no system prompt, asking for JSON with an integer severity from 0 to 10 and an analgesic class. Local runs set temperature to 0.7 and the seed to the replicate index, while API runs use a strict JSON schema with the provider pinned. A configuration makes 720 requests on the authored cases and 2,400 on Q-Pain, so each API configuration totals 3,120 requests.
Claude Haiku 4.5 could not be seeded, so its replicates are independent samples paired only by index.
Each paired difference is summarised with bootstrap intervals and a permutation test, corrected for multiple comparisons. Each difference is then set against a noise floor, the rate at which a model changes its answer between two seeds of the same prompt. Opioid outcomes use a ±0.10 equivalence margin, and severity uses a margin of one point.
Study 1: no identity difference survives
Study 1 had four open-weight models rate pain and choose an analgesic on six authored cases, under explicit labels and name cues. In the two main conditions, mean severity ran from 7.07 for qwen3 to 7.78 for gemma3, and the strong-opioid rate ran from 0.28 to 0.51. The pilot stated each patient's own rating, so the models mostly copied that number back.
Because a copied number can't carry an identity disparity, the pilot wasn't used to test H1 or H2.
llama3.2 returned identical severity for every identity on every seed. Every Holm-adjusted p-value in this condition was 1.000, so no identity difference survived correction. The authors read this as consistent with H1, since the explicit-label null matches what Young et al. reported.
The largest of these, Hispanic women at +0.117 points, had an uncorrected p of 0.015. After Holm correction that p-value rose to 0.103, so the difference didn't survive. Relative to Greg Baker the mean difference was +0.133, while relative to Todd Walsh it was +0.010. With only one name per group, that uniform positive shift could have looked like bias against every minority patient.
Strong-opioid differences stayed within ±0.067 for every model and identity under name cues. The smallest Holm-adjusted value was 0.864, for ministral-3 with Black men. ministral-3 and llama3.2 had all seven strong-opioid differences negative, while gemma3 had all seven at zero or positive. The seven comparisons share one reference, so that common sign isn't independent evidence.
The direction H2 predicted, with lower severity and fewer strong opioids for Black and Hispanic names, didn't appear in any model.
Study 2: the null on a wider panel
Study 2 widened the audit to 24 configurations of 17 models, with reasoning switched on and off and at two precisions. Of those 24 configurations, 14 have Q-Pain responses, and 16 of the 17 models have distinct weights. Gemma 3 12B ran at 4-bit locally and at 16-bit through the API, so those two copies share their weights. None of the 1,386 identity comparisons passed the false discovery rate correction.
Every severity difference stayed within one point of zero on the 0–10 scale. On Q-Pain, 237 of 238 comparisons fell within a quarter point. The 50 Q-Pain cases came from one clinical expert, so the wider panel still rests on a single case source.
That comparison stays descriptive, because serving software, provider and prompt format also changed between configurations. Turning reasoning on for DeepSeek V4.1 Flash shifted the baseline severity by +0.35 [+0.26, +0.44] on Q-Pain with name cues. For the same contrast, the opioid offer rate shifted by -0.134 [-0.213, -0.062].
In Study 1 the clinical case determined 86 to 100% of the variance in severity rating, which left little room for an identity effect.
Limits of the null result
The opioid decision is the outcome bounded least precisely, because six cases leave intervals that can't exclude differences of about 20 percentage points. So the opioid result shows no detected difference, not proof that none exists. The Q-Pain reference answer offers a low-dose opioid in all 50 cases, so a model that withholds an opioid can't be credited with better care.
The six authored cases weren't reviewed by a clinician, and six cases can't represent the range of pain presentations.
Q-Pain has been public since 2021, so its answers may have appeared in training data and could mute responses. Every identity arm of a case shares that exposure, because the audit inserts the identity itself.
In the Q-Pain name condition, the template's pronouns still carry sex, so that condition removes only the explicit race word. The audit was English only, and the explicit-label condition is an audit probe rather than routine documentation. They didn't test dialect, address, insurance or social history.
Every configuration used one temperature of 0.7, one prompt wording and one physician role. Each request had no system prompt and no record context, so deployed systems differ on all of these. The study was exploratory and not preregistered, and its hypotheses were written after Study 1's results were known. Richer cues, dialect, free-text reasoning and cross-lingual audits remain untested, so the null is a statement about a task.
Paper info
- Authors
- Richard J. Young, Alice M. Matthews
- Venue
- arXiv · Preprint
- First published
- 2026-11-11
- Added
- 2026-11-13
- Updated
- 2026-11-11
- Version
- v1
- arXiv
- 2611.14935
- Category
- cs.CL · cs.AI · cs.CY
- Original paper terms
- CC BY 4.0
- What we show
- Paper info, commentary and permitted figures from the original paper
AI commentary is a separate explanation from the original paper and may contain errors. The original paper and figures follow each source's terms of use and any rights noted separately.
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 from the paper

Table 2 : Study 1 models. All ran at Q4_K_M quantisation under Ollama 0.40.14.
Original paper · CC BY 4.0
Table 4 : Response validity and baseline behaviour by condition and model. Severity is on the 0–10 scale; the strong- opioid rate is the proportion of responses recommending a strong opioid.
Original paper · CC BY 4.0
Figure 2 : Paired differences from the White male reference for each identity, model and cue type. Left: pain severity (0–10 points). Right: proportion recommending a strong opioid. Markers show the mean paired difference and bars the percentile bootstrap 95% CI; blue circles are the explicit-label condition (30 pairs per identity), orange diamonds the name-cue condition (60 pairs). A difference to the right of zero means the identity received a higher severity rating, or strong opioids more often, than the reference. The shaded band is the ±0.10 equivalence margin for the strong-opioid proportion; the±1-point severity margin lies far outside the plotted range.
Original paper · CC BY 4.0
Table 5 : Largest paired difference per model, condition and outcome, with its identity and bootstrap 95% CI, and the smallest uncorrected and Holm-adjusted p-values across the seven identity comparisons. n/arm is the number of pairs per identity. Thep-values are pair-level: the pairs come from six cases, so they are conditional on those cases.
Original paper · CC BY 4.0
Figure 3 : Noise floor against counterfactual change. Grey: proportion of pairs of responses to the identical prompt on two seeds whose answer differed. Blue circles (explicit labels) and orange diamonds (name cues): proportion of same-seed pairs, White male reference versus another identity, whose answer differed. Left: strong-opioid decision. Right: severity rating.
Original paper · CC BY 4.0
Table 6 : Noise floor, counterfactual change and minimum detectable paired difference (80% power, two-sidedα= 0.05). A minimum detectable difference of 0.00 indicates no variation in the paired differences. The minimum detectable differences are pair-level and conditional on the six cases.
Original paper · CC BY 4.0
Figure 4 : Study 2, pain severity: pooled identity contrasts on the 50 Q-Pain cases for every configuration, with explicit labels (blue circles) and name cues (orange diamonds) side by side. Each of the first three columns is a minority group minus White within sex, averaged over sex; the last is woman minus man within race, averaged over race. Markers show the mean of the case means and bars the case-bootstrap 95% CI. A dagger marks a configuration in which a within-model identity difference in severity survived Holm correction, all of them under explicit labels. The ±1-point equivalence margin lies far outside the plotted range.
Original paper · CC BY 4.0
Table 7 : Study 2, Q-Pain cases: reference (White man) means, the largest identity difference in severity and in the opioid offer with its Holm-adjusted case-level p-value, and the number of the seven identity differences equivalent to zero (severity within±1point; offer and high dose within±0.10).
Original paper · CC BY 4.0
Table 8 : Reasoning contrasts: reasoning on minus off, or high minus low effort, for the same weights and provider. Baseline shifts are over all identities, with case-bootstrap 95% CIs; the opioid column is the strong-opioid rate on the authored cases and the offer rate on Q-Pain. The last column is the smallest Holm-adjusted p-value for a change in any identity difference.
Original paper · CC BY 4.0
Figure 5 : Study 2, opioid offered: pooled identity contrasts in the proportion of responses offering an opioid on the 50 Q-Pain cases, constructed as in Figure 4. The shaded band is the ±0.10 equivalence margin. The dagger marks the one configuration in which a within-model difference in the opioid offer survived Holm correction.
Original paper · CC BY 4.0
Table 9 : Precision contrast: Gemma 3 12B at 16-bit precision (API) minus the same weights at 4-bit (local Ollama), constructed as in Table 8. The two copies also differ in serving software, provider and prompt template, so this is a contrast between serving stacks, not an effect of precision alone.
Original paper · CC BY 4.0
Table 10 : Mean pain-severity rating by name and model in the name-cue condition (30 responses per cell: six cases × five seeds).
Original paper · CC BY 4.0
Table 11 : Study 2, authored cases: reference (White man) means, the largest identity difference in severity and in the strong-opioid recommendation with its Holm-adjusted case-level p-value, and the number of the seven identity differences equivalent to zero (severity within ±1 point; strong opioid within ±0.10). With six cases the smallest attainable case-levelp-value is2/64, so no difference can survive Holm correction over seven identities.
Original paper · CC BY 4.0
Table 14 : Study 2: invalid answers by identity, for every configuration, case set and cue with at least one. “By identity” lists the failures for White man, White woman, Black man, Black woman, Hispanic man, Hispanic woman, Asian man and Asian woman, in that order. The p-value is from a permutation test of the failure flags across the eight identities within each case-and-seed block (20,000 permutations); with few failures the test can detect only a large imbalance.
Original paper · CC BY 4.0
Table 15 : Study 2: does pairing on the seed lower the identity flip rate? For each configuration, the median over rows (case set, cue and outcome) with a same-prompt floor of at least 0.05 of the identity flip rate on the same seed divided by the rate on a different seed. A ratio below one means the seed is honoured and pairing removes variance; near one, it does not. The two unseeded models are the control and should show a ratio near one. The check is indirect: an identical prompt and seed were not sent twice.
Original paper · CC BY 4.0Quote from the paper
Richard J. Young, Alice M. Matthews (2026). Do Large Language Models Show Racial and Sex Bias in Pain Management? A Counterfactual Audit of GPT, Claude, Gemini, Llama, DeepSeek and Qwen. arXiv:2611.14935v1. https://arxiv.org/abs/2611.14935v1
BibTeX
@misc{young2026large,
title = {{Do Large Language Models Show Racial and Sex Bias in Pain Management? A Counterfactual Audit of GPT, Claude, Gemini, Llama, DeepSeek and Qwen}},
author = {Richard J. Young and Alice M. Matthews},
year = {2026},
eprint = {2611.14935},
archivePrefix = {arXiv},
url = {https://arxiv.org/abs/2611.14935v1}
}