EXCISE: Locating and Excising Distracting Sentences in Medical Question Answering
Organizations: Kyung Hee University
Abstract
Language models are increasingly considered for clinical decision support, where their answers should be grounded in clinical evidence and remain robust to irrelevant information. Prior work shows that a single irrelevant sentence can lower the accuracy of medical models, but not where inside the model its effect can be removed, or how to do so without knowing which sentence it is. We find that blocking attention to a known distractor restores the answer, whereas head masking can suppress correct answers. We also show that the model's hidden states mark the distractor as the sentence that least fits the case even when the model follows it. To remove a distractor's effect without knowing which sentence it is, we propose EXCISE, an inference-time method that blocks the sentence most influencing the answer, but only if the model's hidden states mark it as inconsistent with the case. On MedQA-TD (MedQA with Targeted Distractors), a benchmark we construct in which each distractor targets a specific wrong option, EXCISE gains 16.7-22.8 accuracy points at a 1.5-2.1-point cost on the same questions without distractors, outperforming prompting, rewriting, and steering baselines for all three models. Its gains extend to MedDistractQA and BiasMedQA, as well as chain-of-thought generation.
Figures & tables
| Model | MedQA | MDQA | MedQA-TD |
|---|---|---|---|
| General | |||
| Llama-3.1-8B-Instruct | 61.7 | 54.5 7.2 | 40.7 21.1 |
| Qwen3-8B | 63.4 | 50.3 13.1 | 33.7 29.7 |
| Llama-3-8B-Instruct | 60.0 | 49.7 10.3 | 36.2 23.8 |
| Granite-3.3-8B-Instruct | 51.5 | 39.4 12.1 | 29.1 22.4 |
| Falcon3-10B-Instruct | 58.4 | 46.3 12.1 | 31.5 27.0 |
| Method | Latency | Clean | With distractors | |||
|---|---|---|---|---|---|---|
| (ms) | MedQA | MMLU-PM | MedQA-TD | MedDistractQA | BiasMedQA | |
| Qwen3-8B | ||||||
| No intervention | 41 | 63.4 | 82.7 | 33.7 | 50.3 | 28.7 |
| Ignore instruction | 44 | 64.0 +0.6 | 82.7 0.0 | 33.2 0.5 | 50.4 +0.1 | 27.1 1.6 |
| CAA | 41 | 64.0 +0.6 | 80.5 2.2 | 38.3 +4.7 | 53.3 +3.0 | 35.6 +6.9 |
| S2A | 4,182 | 63.6 +0.2 | 83.5 +0.7 | 36.5 +2.8 | 54.3 +4.0 | 35.3 +6.7 |
| Variant | #Fwd | MedQA | MedQA-TD | ||
|---|---|---|---|---|---|
| Acc | Interv. | Acc | Interv. | ||
| Qwen3-8B | |||||
| Excise (Ours) | 25 | 61.7 | 19.4 | 56.4 | 48.6 |
| w/o IA | 18 | 61.7 0.1 | 92.5 | 56.0 0.4 | 98.3 |
| w/o DG | 9 | 53.2 8.6 | 93.5 | 47.2 9.3 | 98.6 |
| w/o IA & DG | 1 | 63.4 +1.6 | – | 33.7 22.8 | – |
Appendix figures & tables22 assets
Supplementary material from the paper’s appendix.
Appendix
| Accuracy (%) | Target-wrong answers (%) | ||||||||
| MDQA | MedQA-TD | Nonliteral | Bystander | ||||||
| Model | Clean | NL | BS | NL | BS | Clean | MedQA-TD | Clean | MedQA-TD |
| General | |||||||||
| Llama-3.1-8B-Instruct | 61.7 | 53.1 | 55.9 | 39.2 | 42.1 | 17.4 | 45.8 | 17.8 | 42.6 |
| Qwen3-8B | 63.4 | 49.4 | 51.1 | 36.4 | 31.0 | 19.0 | 53.0 | 17.7 | 59.5 |
| Llama-3-8B-Instruct | 60.0 | 49.6 | 49.9 | 37.0 | 35.4 | 18.9 | 49.1 | 17.0 | 48.2 |
| Position | Data | Model | Excise | Last | Known distractor |
|---|---|---|---|---|---|
| End | MedQA-TD NL | Llama-3.1-8B-Instruct | +19.0 | +21.6 | +22.1 |
| MedQA-TD NL | Qwen3-8B | +22.3 | +25.3 | +25.9 | |
| MedQA-TD BS | Llama-3.1-8B-Instruct | +14.5 | +18.6 | +19.1 | |
| MedQA-TD BS | Qwen3-8B | +23.3 | +30.9 | +31.7 | |
| MedQA-TD NL | Llama-3-Meerkat-8B | +23.3 | +25.3 | +25.8 | |
| MedQA-TD BS | Llama-3-Meerkat-8B | +19.6 | +24.5 | +25.4 |
| Method | MedQA-TD NL | MedQA-TD BS | ||||||
|---|---|---|---|---|---|---|---|---|
| End | Middle | First | Mean | End | Middle | First | Mean | |
| Qwen3-8B | ||||||||
| No intervention | 36.4 | 44.7 | 46.9 | 42.7 | 30.9 | 39.5 | 41.5 | 37.3 |
| Ignore instruction | 35.4 | 44.9 | 46.8 | 42.4 | 31.0 | 39.7 | 41.6 | 37.4 |
| CAA | 40.5 | 47.2 | 49.6 | 45.7 | 36.2 | 44.1 | 43.0 | 41.1 |
| Avg. Attention (top-1) | 33.9 | 42.1 | 47.8 | 41.3 | 26.7 | 34.2 | 41.2 | 34.0 |
| Model | MedQA-TD NL | MedQA-TD BS | ||||||
|---|---|---|---|---|---|---|---|---|
| End | Middle | First | Mean | End | Middle | First | Mean | |
| Llama-3.1-8B-Instruct | 39.2 | 47.0 | 47.4 | 44.5 | 42.1 | 49.6 | 49.2 | 47.0 |
| Qwen3-8B | 36.4 | 44.7 | 46.9 | 42.7 | 30.9 | 39.5 | 41.5 | 37.3 |
| Llama-3-8B-Instruct | 37.0 | 44.0 | 44.4 | 41.8 | 35.4 | 45.1 | 44.9 | 41.8 |
| Granite-3.3-8B-Instruct | 30.6 | 37.4 | 36.3 | 34.8 | 27.5 | 34.5 | 31.6 | 31.2 |
| Falcon3-10B-Instruct | 33.9 | 40.8 | 40.7 | 38.4 | 29.1 | 36.8 | 35.7 | 33.9 |
| Set | Source | Questions | Options | Sentences | Words | 3 (%) |
| Development | ||||||
| Clean | MedQA val. ( Jin et al., 2021 ) | 1,269 | 4 | 7.0 | 97.7 | 94.1 |
| MedQA-TD Nonliteral | as above | 1,266 | 4 | 7.9 | 117.6 | 98.7 |
| MedQA-TD Bystander | as above | 1,267 | 4 | 8.0 | 114.1 | 98.6 |
| Test | ||||||
| Clean | MedQA test ( Jin et al., 2021 ) | 1,273 | 4 | 7.1 | 100.2 | 93.5 |
| Clean | MedQA-TD | ||||||||
| NL | BS | ||||||||
| Model | Layer | None | Excise | None | Excise | None | Excise | ||
| Llama-3.1-8B-Instruct | 9 | 1 | 0 | 68.40 | 67.06 | 42.89 | 65.24 | 45.46 | 63.38 |
| Qwen3-8B | 25 | 1 | 0 | 63.51 | 61.62 | 34.44 | 60.03 | 28.41 | 54.70 |
| Llama-3-Meerkat-8B | 19 | 0.5 | 0 | 67.85 | 65.17 | 37.20 | 64.14 | 37.88 | 62.19 |
| Phi-4 | 16 | 1 | 0.01 | 70.06 | 68.40 | 51.34 | 67.22 | 49.88 | 64.80 |
| Excise minus | Clean | MedQA-TD NL | MedQA-TD BS |
|---|---|---|---|
| Qwen3-8B | |||
| No intervention | 1.6 [ 3.0, 0.3] | +22.3 [+19.9, +24.7] | +23.3 [+20.7, +25.8] |
| Avg. Attention + DG | 1.1 [ 2.4, +0.2] | +21.1 [+18.7, +23.4] | +23.2 [+20.7, +25.7] |
| CAMAB + DG | 0.5 [ 1.5, +0.5] | +3.9 [+2.6, +5.3] | +2.7 [+1.5, +4.0] |
| ContextCite + DG | 0.5 [ 1.4, +0.3] | +0.5 [ 0.3, +1.3] | 0.6 [ 1.6, +0.2] |
| Excise w/o DG | +8.6 [+6.0, +11.2] | +11.2 [+9.0, +13.6] | +7.3 [+4.9, +9.8] |
| Clean | MedQA-TD | Gold-cue control | ||||
| Method | Heads | MedQA | NL | BS | NL | BS |
| Qwen3-8B | ||||||
| No mask | – | 64.65 | 37.39 | 32.68 | 81.07 | 85.07 |
| Head mask, tuned on development data | 126 | 54.83 | 55.15 | 55.38 | 38.18 | 34.17 |
| Random heads, same layers (mean of 5) | 126 | 50.95 | 26.35 | 22.70 | 76.81 | 80.97 |
| No intervention | – | 63.39 | 36.37 | 30.95 | 82.17 | 86.33 |
| MedQA-TD | ||||
| Batch for | Clean | NL | BS | BMQ |
| Qwen3-8B | ||||
| No intervention | 63.39 | 36.37 | 30.95 | 28.67 |
| Test set ( Excise ) | 61.74 | 58.68 | 54.20 | 53.50 |
| Batches of 50 questions | 61.78 | 58.76 | 53.74 | 53.31 |
| Fixed: dev. MedQA + MedQA-TD | 62.37 | 56.01 | 49.73 | 47.86 |
| Variant | #Fwd | Clean | MedQA-TD NL | MedQA-TD BS | |||
|---|---|---|---|---|---|---|---|
| Acc | Interv. rate | Acc | Interv. rate | Acc | Interv. rate | ||
| Replacing the representation of DG while IA stays fixed | |||||||
| Qwen3-8B | |||||||
| Hidden states (Ours) | 25 | 61.74 | 19.40 | 58.68 | 47.84 | 54.20 | 49.33 |
| SimCSE | 9 ‡ | 61.98 | 18.46 | 53.34 | 41.87 | 49.96 | 40.85 |
| MPNet † | 9 ‡ | 62.14 | 15.16 | 50.67 | 35.43 | 41.08 | 24.51 |
| (a) How the gate sees the distractor (% of flipped questions). | |||||
|---|---|---|---|---|---|
| Set | Attacked | Too short | (i) Flagged first | (ii) Flagged, not first | (iii) Not flagged |
| Qwen3-8B | |||||
| MedQA-TD NL | 353 | 2.5 | 87.3 | 4.8 | 5.4 |
| MedQA-TD BS | 421 | 1.9 | 69.1 | 11.9 | 17.1 |
| MedDistractQA NL | 209 | 2.4 | 90.9 | 4.3 | 2.4 |
| MedDistractQA BS | 202 | 2.0 | 83.7 | 5.4 | 8.9 |
| Model | + | None | w/o IA | Excise | Known | Excise w/o IA | |
|---|---|---|---|---|---|---|---|
| Llama-3.1-8B-Instruct | NL | 1 | 42.7 | 45.2 | 53.3 | 60.2 | +8.1 [6.1, 10.2] |
| NL | 2 | 44.2 | 46.9 | 52.7 | 60.8 | +5.9 [4.0, 7.8] | |
| NL | 3 | 45.0 | 46.3 | 53.3 | 59.9 | +7.0 [5.1, 9.0] | |
| BS | 1 | 45.4 | 45.7 | 51.9 | 60.1 | +6.2 [4.4, 8.1] | |
| BS | 2 | 45.3 | 46.3 | 51.8 | 58.5 | +5.6 [3.8, 7.3] | |
| BS | 3 | 45.5 | 47.0 | 51.0 | 59.0 | +4.0 [2.4, 5.7] |
| Llama-3.1-8B-Instruct | Qwen3-8B | Llama-3-Meerkat-8B | ||||
| Answer without intervention | NL | BS | NL | BS | NL | BS |
| Excise intervenes on (%, questions in the group) | ||||||
| Target, pulled by the distractor | 88.5 (390) | 81.0 (343) | 88.5 (443) | 79.0 (538) | 94.0 (450) | 88.6 (437) |
| Target, already on the clean question | 67.4 (193) | 53.3 (199) | 63.4 (232) | 57.5 (219) | 71.5 (200) | 68.3 (189) |
| Wrong, not the target | 27.7 (191) | 33.3 (195) | 25.2 (135) | 26.2 (122) | 31.5 (146) | 38.0 (163) |
| Correct | 9.6 (499) | 15.3 (536) | 7.8 (463) | 11.4 (394) | 20.1 (477) | 21.7 (484) |
| IA ranks | DG | Blocking | Recovered | ||
| Set | it first | passes it | restores | Excise | Known |
| Llama-3.1-8B-Instruct | |||||
| MedQA-TD NL | 90 | 95 | 95 | 81 | 94 |
| MedQA-TD BS | 90 | 86 | 93 | 73 | 92 |
| MedDistractQA NL | 72 | 93 | 90 | 62 | 88 |
| MedDistractQA BS | 76 | 97 | 90 | 67 | 85 |
| Method | #Fwd | s/q | Clean | MedQA-TD | MedDistractQA | BiasMedQA | |||
|---|---|---|---|---|---|---|---|---|---|
| MedQA | MMLU-PM | NL | BS | NL | BS | Avg. | |||
| Qwen3-8B | |||||||||
| No intervention | 1 | 0.041 | 63.39 | 82.72 | 36.37 | 30.95 | 49.41 | 51.14 | 28.67 |
| Ignore instruction | 1 | 0.044 | 64.02 | 82.72 | 35.35 | 31.03 | 49.49 | 51.22 | 27.08 |
| CAA | 1 | 0.041 | 64.02 | 80.51 | 40.46 | 36.21 | 51.77 | 54.83 | 35.57 |
| S2A † | – | 4.182 | 63.63 | 83.46 | 39.75 | 33.23 | 55.93 | 52.63 | 35.34 |
| Variant | #Fwd | Clean | MedQA-TD NL | MedQA-TD BS | |||
|---|---|---|---|---|---|---|---|
| Acc | Interv. rate | Acc | Interv. rate | Acc | Interv. rate | ||
| Qwen3-8B | |||||||
| IA (Ours) | 25 | 61.74 | 19.40 | 58.68 | 47.84 | 54.20 | 49.33 |
| Avg. Attention | 18 | 62.84 | 35.74 | 37.63 | 14.53 | 31.03 | 20.03 |
| AT2 | – | – | – | – | – | – | – |
| CAMAB | 58 | 62.22 | 19.95 | 54.75 | 39.59 | 51.45 | 43.05 |
| Method | #Fwd | s/q | Clean | MedQA-TD | MedDistractQA | BiasMedQA | |||
|---|---|---|---|---|---|---|---|---|---|
| MedQA | MMLU-PM | NL | BS | NL | BS | Avg. | |||
| Qwen3-8B | |||||||||
| Avg. Attention | 2 | 0.067 | 60.25 | 81.99 | 33.86 | 26.71 | 46.11 | 46.98 | 45.89 |
| CAMAB | 42 | 1.39 | 55.93 | 73.90 | 46.35 | 47.29 | 49.73 | 49.49 | 43.33 |
| ContextCite | 66 | 1.84 | 53.57 | 71.69 | 47.45 | 48.23 | 48.63 | 47.53 | 43.77 |
| Llama-3.1-8B-Instruct | |||||||||
| MedQA-TD NL | MedQA-TD BS | Clean MedQA | ||||||||||||
|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
| Model | Kept | None | S2A | Excise | S2A+ Excise | Kept | None | S2A | Excise | S2A+ Excise | None | S2A | Excise | S2A+ Excise |
| Llama-3.1-8B-Instruct | 16.1 | 39.2 | 58.3 | 58.2 | 57.8 | 37.4 | 42.1 | 53.1 | 56.6 | 54.9 | 61.7 | 61.1 | 59.6 | 59.3 |
| Qwen3-8B | 85.9 | 36.4 | 39.7 | 58.7 | 59.3 | 90.8 | 31.0 | 33.2 | 54.2 | 54.8 | 63.4 | 63.6 | 61.7 | 62.1 |
| Phi-4 | 8.4 | 51.7 | 67.5 | 66.8 | 66.5 | 12.4 | 49.6 | 66.1 | 65.2 | 65.5 | 70.9 | 71.5 | 69.1 | 68.7 |
| OLMo-2-7B-Instruct | 98.9 | 23.3 | 24.3 | 30.8 | 26.6 | 99.6 | 16.4 | 17.7 | 25.7 | 20.4 | 42.4 | – | 41.2 | – |
| Llama-3.1-8B-Instruct | Qwen3-8B | |||||||||
| Bias type | No int. | Excise | [95% CI] | IA top-1 | DG flag | No int. | Excise | [95% CI] | IA top-1 | DG flag |
| Recency | 49.6 | 54.3 | +4.7 [+3.1, +6.4] | 26 | 95 | 25.9 | 52.9 | +27.0 [+24.5, +29.6] | 63 | 93 |
| Confirmation | 59.1 | 57.7 | 1.3 [ 2.7, +0.1] | 19 | 96 | 41.1 | 55.9 | +14.8 [+12.5, +17.1] | 39 | 94 |
| Frequency | 38.2 | 52.4 | +14.2 [+12.0, +16.4] | 42 | 95 | 25.6 | 52.9 | +27.3 [+24.7, +29.9] | 65 | 89 |
| Status quo | 44.4 | 54.1 | +9.7 [+7.7, +11.9] | 36 | 94 | 27.7 | 53.1 | +25.5 [+22.9, +28.1] | 63 | 93 |
| False consensus | 52.0 | 56.8 | +4.8 [+3.0, +6.6] | 26 | 97 | 20.3 | 51.4 | +31.0 [+28.3, +33.7] | 74 | 90 |
Language Model Robustness
Language model robustness studies how reliably language models preserve correct, safe behavior under input changes, distribution shifts, and adversarial pressure.
See all 493 papers