Evaluating LLM Robustness Under Domain-Specific Prompt Perturbations in Public Health Applications
July 08, 2026
Large language models (LLMs) are increasingly applied in public health applications, yet their robustness to non-clinical user inputs remains underexplored. We propose a domain-specific robustness benchmark that evaluates LLMs under two perturbation types that commonly arise when non-clinical users interact with health AI systems: misinformation framing (MF), where prompt might be injected by false health claims, and layperson rewriting (LR), where patients describe symptoms in everyday language rather than medical terminology. Our goal is to evaluate the stability of LLMs under these perturbation. Experiments show that MF degrades accuracy by \(-\)7.2 pp on average with prediction flip rates of 9–38%, even when claims are explicitly labelled as unsupported; LR causes only \(-\)1.4 pp degradation. These findings highlight two distinct deployment risks in public health settings: models may produce incorrect outputs when users unintentionally carry misinformation into their queries, and may misinterpret clinically relevant details when patients use informal language. Both risks call for perturbation-aware robustness evaluation beyond clean baseline benchmark.
Natural Language Processing , Large Language Model, Robustness
Large language models (LLMs) are increasingly deployed in public health and clinical decision support, from answering biomedical literature questions to assisting with exam-style clinical reasoning and monitoring health-related discourse on social media [1], [2]. Benchmarks such as PubMedQA and MedQA report strong performance on clean, professionally phrased prompts, and recent systems are often evaluated as if users always present well-formed, evidence-aligned queries. However, in real-world settings patients and the general public frequently use colloquial or imprecise health vocabulary in prompts. These conditions are not captured by standard benchmarks, leaving a critical gap in our understanding of LLM robustness under real-world public health application scenarios.
Prompt robustness, the ability of LLMs to maintain accurate and consistent output under input variation, remains underexplored in the public health domain. Existing robustness benchmarks such as PromptRobust [3] evaluate general-purpose NLP tasks under character-level noise and synonym substitution, while biomedical evaluations such as RAmBLA [4] focus primarily on paraphrase variation. A few studies have examined LLM robustness in prompt injection, such as embedded misinformation, and lexical-level perturbations, such as layperson terminology, within a unified public health benchmark.
In this paper, we address this gap by evaluating four lightweighted LLMs (Llama-3.1-8B, Mistral-7B, Qwen2.5-7B, and GPT-4.1-Nano) across three public health datasets under two perturbation types: (1) misinformation framing (MF), in which a contradictory or false claim is injected into the prompt; (2) layperson rewriting (LR), in which medical terminology is replaced with colloquial equivalents drawn from the Consumer Health Vocabulary [5]. We measure accuracy drop and output consistency to characterize robustness profiles across model families. Our contributions are as follows:
Domain-Specific Benchmark. We construct a domain-specific robustness benchmark covering three public health tasks and two perturbation types grounded in realistic deployment scenarios.
Perturbation Comparison. We provide a new, novel empirical comparison of misinformation framing and layperson rewriting as structurally distinct perturbation types, revealing divergent failure patterns across multiple models.
Practical Guidance. We provide actionable insights for practitioners by comparing open-source 7–8B models against a commercial lightweight model, offering model selection guidance for resource-constrained public health settings.
LLMs have been widely applied across public health and clinical NLP (Natural Language Processing) tasks, including biomedical question answering [1], [6], vaccine stance detection [2], and clinical decision support [7], [8]. These works mainly evaluate whether LLMs can match or exceed traditional machine learning models, human annotators, or benchmark baselines under clean and well-defined input conditions. For example, Espinosa and Salath’e [9] show that GPT and open-source models, including Llama and Mistral, can extract vaccination stances from social media posts at scale. Deiner et al. [10] show that LLMs such as GPT-4o and Claude can classify epidemiological characteristics from real-world outbreak-related social media posts with performance comparable to human raters. PubMedQA [1] and MedQA-USMLE [6] have also become standard benchmarks for evaluating biomedical and clinical question answering.
Model’s robustness to prompt variation has been studies across NLP and XAI domain [11]–[13]. PromptRobust [3] introduces a benchmark to assess the stability of NLP models, including character-level noise, word-level substitutions, and semantic perturbations in general purpose. In public health domain, RAmBLA [4] shows similar sensitivity in biomedical QA, where paraphrase alone reduces PubMedQA accuracy despite preserving meaning.
Existing robustness evaluations often assume a clinical or expert user, with perturbations typically designed by researchers with domain knowledge and inputs remaining factually accurate. This assumption overlooks important real-world scenarios in which non-clinical users may unintentionally introduce false information or describe health concerns using lay terminology. Unlike prior work that primarily examines fact-preserving perturbations or expert-authored clinical inputs, our study evaluates LLM robustness under two realistic public health input conditions: misinformation framing and layperson rewriting.
Let \(f(\cdot)\) denote an LLM that predicts a label \(\hat{y} = f(p)\) given a prompt \(p\). We define a perturbation function \(\delta(\cdot)\) that modifies \(p\) to produce a perturbed prompt \(p' = \delta(p)\) while preserving the underlying task and ground-truth label \(y\). Robustness is measured as the expected accuracy drop under perturbation: \[\Delta\text{Acc}(f, \delta) = \text{Acc}(f, \mathcal{D}) - \text{Acc}(f, \delta(\mathcal{D}))\] where \(\mathcal{D}\) is the evaluation dataset. A larger \(\Delta\text{Acc}\) indicates greater sensitivity to the perturbation. We additionally define the flip rate: \[\text{Flip}(f, \delta) = \frac{1}{|\mathcal{D}|} \sum_{p \in \mathcal{D}} \mathbf{1}[f(p) \neq f(\delta(p))]\] which measures output instability independent of correctness.
We evaluate two realistic prompt perturbations that reflect noisy public-facing health communication:
MF injects a false health claim \(s_{\text{mis}}\) into prompt: \[p_{\text{MF}} = s_{\text{mis}} \oplus p_{\text{base}}\] where \(\oplus\) denotes text concatenation. Misinformation claims are drawn from COVIDLIES [14], HealthVer [15], and WHO mythbusters, retaining only statements labelled as not supported by evidence. Each claim is matched to a sample using TF-IDF retrieval and stored in a frozen mapping file for reproducibility. We also append an explicit disclaimer to the injected claim, allowing us to test whether models can discount unsupported contextual information when warned.
LR applies a term-level substitution function \(\phi(\cdot)\) to the original prompt: \[p_{\text{LR}} = \phi(p_{\text{base}}),\] where \(\phi\) replaces selected medical or technical terms with colloquial equivalents drawn from the OAC Consumer Health Vocabulary [5]. For datasets that include an accompanying passage or context, only the question is rewritten while the passage is kept unchanged. This design isolates the effect of lexical variation in user-facing input rather than changes in the underlying evidence.
We report three evaluation metrics. Accuracy measures exact match between the predicted label and the ground-truth label. \(\Delta\)Acc quantifies the change in accuracy between a perturbation condition and the corresponding baseline in percentage points (pp). Flip rate measures prediction instability by computing the proportion of paired examples whose predicted label changes after perturbation, regardless of whether the perturbed prediction is correct.
We evaluate on three public health datasets covering distinct task types. PubMedQA [1] requires answering biomedical research questions (yes / no / maybe). MedQA-USMLE [6] consists of four-option clinical reasoning questions drawn from USMLE-style materials. COVID-19 Vaccine Stance [2] requires classifying tweet toward COVID-19 vaccines as favor, against, or neutral. We randomly sample 100 examples from each dataset, resulting in 3,600 inference records.
We evaluate four lightweight LLMs spanning open-source local deployment and commercial API-based deployment. All models are evaluated with temperature set to 0 to ensure deterministic decoding. The open-source models include Llama 3.1-8B [16], Mistral-7B [17], and Qwen2.5-7B [18]. These models are broadly comparable in scale and architecture: all are instruction-tuned, decoder-only Transformer models in the 7–8B parameter range. They are deployed locally via Ollama to support reproducible evaluation without external API dependencies. We additionally evaluate GPT-4.1-nanoas a lightweight commercial reference model accessed through the OpenAI API [19].
Table ¿tbl:tab:overall? reports accuracy across all models and perturbation types, averaged over three datasets. MF causes substantial accuracy degradation across all models, with open-source models dropping \(\Delta\)Acc \(= -6.8\) pp and GPT-4.1-Nano \(\Delta\)Acc \(= -8.0\) pp. In constrast, LR has a smaller effect: open-source models decline by only 1.8 pp on average, and GPT-4.1-Nano shows no degradation under LR (\(\Delta\)Acc \(= 0.0\) pp). Confidence intervals confirm these patterns: MF shifted accuracy intervals downward with non-overlapping Baseline and MF intervals, whereas LR intervals largely overlap Baseline across all models. This indicates that these lightweight LLMs have sufficient lexical generalization to bridge professional and lay medical terminology, but remain vulnerable to semantic-level false content injection.
max width=
Each dataset represents a distinct tasks for public health domain, Table 1 presents a per-dataset breakdown revealing patterns.
LR has relatively smaller impact than MF. LR produces smaller changes than MF across all three datasets, indicating that the evaluated models are generally more robust to lexical variation than to misleading contextual information.
MedQA is less affected by MF for most models. MedQA shows moderate MF degradation for Llama 3.1-8B (\(-1.0\) pp), GPT-4.1-nano (\(-4.0\) pp), and Qwen2.5-7B (\(+2.0\) pp). One likely explanation is that the multiple-choice format constrains the output space, making it harder for unrelated misinformation to fully redirect the prediction.
Robustness is model- and task-specific. The same perturbation can affect different models very differently. Llama 3.1-8B remains stable across tasks, while Mistral-7B shows large MF drops on both PubMedQA and MedQA. Qwen2.5-7B is relatively stable on MedQA but highly vulnerable on Vaccine Stance. These patterns indicate that clean benchmark accuracy alone is insufficient for deployment decisions. Robustness should be evaluated separately by task and perturbation type.
| Model | PubMed | MedQA | Vaccine | Avg. | |
|---|---|---|---|---|---|
| Llama 3.1-8B | Baseline | 76.0 | 60.0 | 73.0 | 69.7 |
| MF | 73.0 | 59.0 | 70.0 | 67.3 | |
| LR | 76.0 | 56.0 | 72.0 | 68.0 | |
| \(\Delta\)MF | \(-\)3.0 | \(-\)1.0 | \(-\)3.0 | \(-\)2.4 | |
| \(\Delta\)LR | \(0.0\) | \(-\)4.0 | \(-\)1.0 | \(-\)1.7 | |
| Mistral-7B | Baseline | 54.0 | 50.0 | 69.0 | 57.7 |
| MF | 44.0 | 39.0 | 53.0 | 45.3 | |
| LR | 52.0 | 46.0 | 67.0 | 55.0 | |
| \(\Delta\)MF | \(-\)10.0 | \(-\)11.0 | \(-\)16.0 | \(-\)12.4 | |
| \(\Delta\)LR | \(-\)2.0 | \(-\)4.0 | \(-\)2.0 | \(-\)2.7 | |
| Qwen2.5-7B | Baseline | 44.0 | 63.0 | 73.0 | 60.0 |
| MF | 43.0 | 65.0 | 54.0 | 54.0 | |
| LR | 42.0 | 61.0 | 73.0 | 58.7 | |
| \(\Delta\)MF | \(-\)1.0 | \(+\)2.0 | \(-\)19.0 | \(-\)6.0 | |
| \(\Delta\)LR | \(-\)2.0 | \(-\)2.0 | \(0.0\) | \(-\)1.3 | |
| GPT-4.1-Nano | Baseline | 52.0 | 72.0 | 74.0 | 66.0 |
| MF | 43.0 | 68.0 | 63.0 | 58.0 | |
| LR | 50.0 | 73.0 | 75.0 | 66.0 | |
| \(\Delta\)MF | \(-\)9.0 | \(-\)4.0 | \(-\)11.0 | \(-\)8.0 | |
| \(\Delta\)LR | \(-\)2.0 | \(+\)1.0 | \(+\)1.0 | \(0.0\) |
4pt
Figure 1 reports the average flip rate across three datasets: the proportion of samples on which the predicted label changes between baseline and perturbed conditions.
Flip rate and accuracy drop are decoupled. Qwen2.5-7B and GPT-4.1-Nano share similar MF flip rates (\(\sim\)19.5%) yet differ substantially in accuracy drop (\(-\)6.0 vs.\(-\)8.0 pp), indicating that GPT-4.1-Nano flips more correct predictions whereas Qwen2.5-7B more frequently switches between incorrect labels.
Robustness variability reveals task-specific risk. Mistral-7B has the widest MF flip-rate range across tasks (15–38%), while Llama 3.1-8B has the narrowest range (5–11%). This indicates that Mistral-7B’s robustness is highly task-dependent: it may be acceptable on some tasks but becomes unstable on other.
To complement the quantitative results, we examine representative cases illustrating the primary failure modes observed under MF and LR perturbations. Table 2 summarizes each case; detailed discussion follows.
| # | Dataset | Input (truncated) | Injected Claim (truncated) | Llama | Mistral | Qwen | GPT |
|---|---|---|---|---|---|---|---|
| 1 | Vaccine | If this holds up, it would be so much better than expected... #vaccine (GT: favor) | Natural immunity is always better than vaccine-induced immunity | B\(\to\)N \(\times\) | B\(\to\)N \(\times\) | B\(\to\)A \(\times\) | B\(\to\)N \(\times\) |
| 2 | PubMedQA | Gender difference in survival of resected non-small cell lung cancer? (GT: yes) | ICU triage claim | Y\(\to\)Y \(✔\) | Y\(\to\)M \(\times\) | Y\(\to\)M \(\times\) | Y\(\to\)M \(\times\) |
| 3 | MedQA | SLE patient with DVT (GT: B); LR replaces Prothrombin Time, Platelets… | — (LR only) | B\(\to\)A \(\times\) | B\(\to\)A \(\times\) | B\(\to\)B \(✔\) | B\(\to\)B \(✔\) |
5pt
B = baseline prediction; N = neutral; M = maybe; Y = yes; A/D = MCQ options. Bold = model maintains or recovers correct prediction under perturbation.
Cases 1: MF overrides correct predictions All four models answer correctly at baseline but flip under MF. The injected claim is directly relevant to vaccine efficacy, making it highly salient for stance classification and causing models to misclassify a favorable tweet.
Case 2: Hedging as a failure mode on PubMedQA. Three models shift from yes to maybe under a weakly related MF claim. This suggests that MF does not always push models toward the opposite answer; it can instead increase uncertainty, which still lowers accuracy when the ground truth is yes.
Case 3: LR breaks clinical reasoning chains on MedQA. Although LR has small average impact, this case shows that rewriting diagnostic test names and answer terminology in LR can disrupt cross-referencing between the question and options.
Three key findings emerge from our evaluation. MF and LR pose two distinct challenges. MF poses a substantially greater robustness threat than LR (\(-7.2\) pp vs.\(-1.4\) pp average), with flip rates of 9–38%. MF degradation of -$7.2 pp implies approximately one additional error per 14 queries, a non-trivial risk in public health decision support. . LR shows a smaller decline (\(-\)1.4 pp, or \(\sim\)1 error per 71 queries). This suggests models over-weight contextual content over parametric knowledge, consistent with findings on LLM sycophancy [20].
Task structure shapes vulnerability. Vaccine Stance, which lacks an evidence passage or structured clinical answer options to anchor predictions, suffers the largest MF degradation (\(-3.0\) to \(-19.0\) pp). In contrast, PubMedQA provides an evidence passage and MedQA constrains the output space through multiple-choice options, which may partially reduce the influence of injected misinformation.
Baseline accuracy does not guarantee robustness. High baseline performance does not necessarily imply perturbation resistance: GPT-4.1-nano achieves 66.0% baseline accuracy but drops \(-8.0\) pp under MF, over three times the degradation of Llama 3.1-8B (\(-2.4\) pp).
Limitations. Each dataset uses 100 samples; MF uses a single severity level; and LR coverage is bounded by the CHV vocabulary. Future work will introduce severity-graded MF, additional model families, and defense mechanisms.