MEDEQUALQA: Evaluating Biases in LLMs with Counterfactual Reasoning
Rajarshi Ghosh, Abhay Gupta, Hudson McBride, Anurag Vaidya, Faisal Mahmood
TL;DR
MEDEQUALQA introduces a large-scale, counterfactual benchmark to assess reasoning stability in medical LLMs by perturbing patient pronouns while fixing critical clinical content. The dataset comprises three pronoun settings (Original, Gender-swapped, Non-binary) with extensive CSC ablations, totaling about $69{,}000$ reasoning items across $≈23{,}000$ items per variant. Reasoning traces are analyzed with Semantic Textual Similarity to quantify stability, revealing an overall mean STS of $0.82$ but a persistent tail of low-similarity cases driven by factor shifts, reordering, and other divergences in clinical reasoning. The work highlights that even when diagnoses align, pronoun-driven biases can subtly rewire reasoning pathways, underscoring the need for process-focused fairness audits and actionable mitigation in medical AI systems.
Abstract
Large language models (LLMs) are increasingly deployed in clinical decision support, yet subtle demographic cues can influence their reasoning. Prior work has documented disparities in outputs across patient groups, but little is known about how internal reasoning shifts under controlled demographic changes. We introduce MEDEQUALQA, a counterfactual benchmark that perturbs only patient pronouns (he/him, she/her, they/them) while holding critical symptoms and conditions (CSCs) constant. Each clinical vignette is expanded into single-CSC ablations, producing three parallel datasets of approximately 23,000 items each (69,000 total). We evaluate a GPT-4.1 model and compute Semantic Textual Similarity (STS) between reasoning traces to measure stability across pronoun variants. Our results show overall high similarity (mean STS >0.80), but reveal consistent localized divergences in cited risk factors, guideline anchors, and differential ordering, even when final diagnoses remain unchanged. Our error analysis highlights certain cases in which the reasoning shifts, underscoring clinically relevant bias loci that may cascade into inequitable care. MEDEQUALQA offers a controlled diagnostic setting for auditing reasoning stability in medical AI.
