Same Patient, Different Words, Different Diagnosis? Evaluating Semantic Stability in Clinical LLMs

Mahdi Alkaeed, Adnan Qayyum, Nabeel Abo Kashreef, Muhammad Bilal, Junaid QadirarXiv 2026

TL;DR

If you ask a medical AI the same question using slightly different words, will it give you a different diagnosis? This paper introduces a rigorous Natural Language Inference (NLI) and human-audited framework to evaluate the semantic stability of 16 clinical and general-purpose LLMs. The alarming takeaway: domain-specific medical fine-tuning does not guarantee robustness, and models frequently flip their diagnostic predictions under minor rephrasings while remaining dangerously overconfident.

What Problem Does This Paper Address?

Large Language Models (LLMs) are rapidly transitioning into safety-critical clinical workflows, assisting with everything from patient history summarization to active diagnostics. However, these models suffer from a well-known vulnerability: extreme sensitivity to minor prompt variations (e.g., swapping "myocardial infarction" for "heart attack" or changing active voice to passive voice).

Evaluating this "semantic stability" in medicine introduces a major methodological hurdle. Traditional evaluation frameworks rely on embedding-based metrics (like cosine similarity) to verify if a rephrased prompt means the same thing as the original. Unfortunately, these metrics routinely miss critical clinical nuances like negation, temporality, or severity—potentially scoring "patient has chest pain" and "patient denies chest pain" as highly similar. Without a reliable way to ensure that prompt variations truly preserve clinical meaning, researchers cannot accurately distinguish a model's baseline fragility from a legitimate response to altered medical facts.

Methods

The authors propose a multi-stage semantic verification pipeline to construct a bulletproof benchmark of meaning-preserving prompt variations:

  1. Bidirectional NLI Verification: The system passes the original prompt and a generated variant through three domain-specific Natural Language Inference models (PubMedBERT-MNLI-MedNLI, RoBERTa-large-MNLI, and DeBERTa-large-MNLI). It requires a "Top-2 Consensus" showing bidirectional entailment (mutual logical implication) to ensure no facts were added, dropped, or altered.
  2. LLM-as-a-Judge Committee: Advanced models (GPT-5.2 and MedLLaMA3) act as a secondary filter to catch subtle contextual shifts.
  3. Clinical Expert Audit: A licensed clinician manually reviews the remaining candidates to guarantee absolute clinical equivalence.
Fig. 1: Overview of the systematic framework for evaluating semantic stability in clinical LLMs through meaning-preserving variations verified by Natural Language Inference models.

To precisely quantify model fragility, the paper introduces three complementary metrics:

  • Meaning-Preserving Variation Sensitivity (MVS): The proportion of verified prompt variations that cause a change in the model's output.
  • Confidence Variation ($\Delta C$): The average shift in the model's internal confidence score across variations, even if the final answer stays the same.
  • Worst-Case Per-Sample Instability (WCI): The probability that at least one valid rephrasing will flip a model's answer from correct to incorrect.

Datasets

The framework was evaluated using 200 base prompts sampled from two prominent medical QA datasets: MedQA-USMLE and DiagnosisQA. GPT-4o-mini generated 10 distinct linguistic variations per prompt (spanning abbreviation changes, syntactic reordering, format shifts, and clinical-to-lay translations). Out of 2,000 initial candidate variations, the hybrid verification pipeline filtered out the noise to yield a final dataset of 1,761 rigorously verified clinical prompt variants.

Key Insights and Ideas

  • Medical Fine-Tuning is No Silver Bullet: Surprisingly, domain specialization (adapting general models to medical corpora) does not consistently improve semantic stability. Strong general-purpose baselines frequently matched or outperformed their medical counterparts in robustness.
  • The Illusion of Certainty: Models exhibit severe confidence-accuracy misalignment. When a minor rephrasing causes a model to flip its diagnosis from right to wrong, its internal confidence score barely budges. It remains highly confident in its incorrect predictions, meaning confidence scores cannot be trusted as a proxy for safety.
  • Framing Trumps Syntax: Localized edits like active/passive voice flips or abbreviation expansions rarely confuse the models. However, "Question Reframing" and "Clinical-to-Lay Language" translations cause massive performance drops, highlighting a major bottleneck for consumer-facing medical AI.

Key Results

  • The authors evaluated 16 open-source models ranging from 1.5B to 8B parameters (including the Qwen, LLaMA, and Mistral families alongside their medical variants like MedQwen and BioMistral).
  • Worst-Case Instability (WCI) was shockingly high. For the highly specialized Qwen3-8B-Biomedical model on the MedQA dataset, the WCI reached 37%, meaning over a third of its correct answers could be flipped simply by rephrasing the question.
  • Task difficulty directly correlates with instability; models were significantly more fragile on the complex reasoning tasks of MedQA compared to DiagnosisQA.
  • Running models under 4-bit NF4 quantization showed a negligible impact on semantic stability compared to full 16-bit precision, suggesting that quantization is safe for deployment from a robustness standpoint.

Limitations and Future Work

The authors acknowledge several limitations that pave the way for future research:

  • Model Scope: High-performing proprietary clinical models (like Google's MedPaLM) were excluded due to access restrictions.
  • Inference Strategies: The evaluation relied on deterministic, single-step token decoding rather than modern inference-time strategies like Chain-of-Thought (CoT) or self-consistency sampling, which might mitigate or compound instability.
  • Task Complexity: The benchmark is limited to multiple-choice questions, leaving open questions about how semantic instability manifests in complex, free-text clinical narratives or multi-turn doctor-patient dialogues.
  • Annotation Bottleneck: The final human validation round relied on a single clinical expert, leaving inter-rater reliability unmeasured.

Summary updated

BibTeX
@misc{alkaeed2026same,
  author = {Mahdi Alkaeed and Adnan Qayyum and Nabeel Abo Kashreef and Muhammad Bilal and Junaid Qadir},
  title = {{Same Patient, Different Words, Different Diagnosis? Evaluating Semantic Stability in Clinical LLMs}},
  year = {2026},
  eprint = {2605.30646},
  archivePrefix = {arXiv},
  url = {https://arxiv.org/abs/2605.30646},
}
Figure