Accept or Repair: Preserving Passage-Supported Answers in Contrastive Decoding
Organizations: Korea University · Sookmyung Women’s University · Yonsei University Mirae Campus · Soongsil University ·
Abstract
Large language models often answer from knowledge learned during training, even when a provided passage contradicts that knowledge. To address this problem, contrastive decoding contrasts the predictions under the full and a modified prompt at every token, but it also alters correct answers that the passage supports. We show that checking answers against the passage removes this trade-off. Based on this observation, we propose Accept-or-Repair (AoR), a training-free procedure. AoR keeps a sampled answer if the passage supports it. Otherwise, it tries up to two replacements with contrastive decoding, returning one as soon as it passes this check. It rejects replacements that repeat the answer generated without the passage when the passage favors another answer. Our experiments show that AoR raises the score over sampling by 12.5 points on counterfactual passages and 2.3 on ordinary ones, surpassing eight contrastive and prompting baselines on both, including when each receives the same rejection rule. Replacing only initial answers that the passage does not support improves the average score of every decoder. These results suggest that models can follow passages that contradict their knowledge while preserving accuracy on passages that agree with it. Code will be released at https://github.com/js-lee-AI/AoR.
Figures & tables
| Counterfactual | Ordinary | ||||||||
|---|---|---|---|---|---|---|---|---|---|
| Method | NQ-Swap | FaithEval | Avg. | NQ-Orig. | SQuAD | HotpotQA | Avg. | Mean | Cost |
| Sampling | 56.9 | 63.6 | 60.3 | 76.0 | 84.5 | 63.5 | 74.7 | 67.5 | 1.00 |
| CAD ( Shi et al., 2024 ) | 62.4 | 73.7 | 68.1 (+7.8) | 72.5 | 84.6 | 60.8 | 72.6 ( 2.1) | 70.3 | 1.18 |
| AdaCAD ( Wang et al., 2025a ) | 61.4 | 65.5 | 63.4 (+3.2) | 75.6 | 85.5 | 63.2 | 74.8 (+0.1) | 69.1 | 1.18 |
| COIECD ( Yuan et al., 2024 ) | 62.2 | 73.7 | 68.0 (+7.7) | 72.7 | 84.5 | 61.1 | 72.8 ( 1.9) | 70.4 | 1.18 |
| NWCAD ( Tao and Agrawal, 2026 ) | 57.3 | 63.8 | 60.6 (+0.3) | 76.0 | 84.5 | 63.7 | 74.8 (+0.1) | 67.7 | 1.18 |
| Counterfactual | Ordinary | Repaired part | |||||||
|---|---|---|---|---|---|---|---|---|---|
| Method | Fixed (%) | Broken (%) | Lowered (%) | CF | Ord. | ||||
| Sampling | – | – | – | – | – | – | – | 37.2 | 35.5 |
| CAD | 0.2 | +8.0 | 22.0 | 3.4 | +1.3 | 12.2 | 12.9 | 52.7 | 43.7 |
| AdaCAD | +0.3 | +2.9 | 9.4 | 0.9 | +0.9 | 3.9 | 5.3 | 44.7 | 41.1 |
| COIECD | 0.2 | +7.9 | 21.6 | 3.3 | +1.4 | 11.9 | 12.6 | 52.5 | 43.9 |
| NWCAD | 0.1 | +0.4 | 1.2 | 0.1 | +0.2 | 0.9 | 1.4 | 38.2 | 36.6 |
| Wrapped decoder | CF | Ord. | Mean |
|---|---|---|---|
| CAD | 68.3 | 76.0 (+3.4) | 72.2 (+1.8) |
| AdaCAD | 63.2 | 75.6 (+0.9) | 69.4 (+0.3) |
| COIECD | 68.2 | 76.1 (+3.3) | 72.1 (+1.7) |
| NWCAD | 60.7 | 74.9 (+0.1) | 67.8 (+0.1) |
| RPCD | 66.8 | 76.5 (+2.1) | 71.6 (+1.4) |
| ID | 66.2 | 76.7 (+2.1) | 71.5 (+1.1) |
| Variant | CF | Ord. | Mean | Cost |
|---|---|---|---|---|
| AoR | 72.8 | 77.0 | 74.9 | 1.71 |
| Components | ||||
| Repair every answer | +0.7 | 1.3 | 0.3 | 2.71 |
| No memory veto | 3.2 | 0.0 | 1.6 | 1.63 |
| Any occurring option supported | 0.9 | 0.0 | 0.5 | 1.65 |
| Repairs | ||||
| Gate | NQ-Swap | Ord. | Mean |
|---|---|---|---|
| CAD on every answer | +5.5 | 2.1 | +1.7 |
| Same as closed-book answer | +1.5 | 0.8 | +0.3 |
| Answer probability | +4.2 | +0.2 | +2.2 |
| Probability gain from passage | +4.8 | 0.8 | +2.0 |
| Self-check | +3.0 | 0.3 | +1.4 |
| Entailment model | +3.7 | 0.2 | +1.7 |
| Main tasks | Held-out data | Further models | Other settings | LLM judge | ||||||||
|---|---|---|---|---|---|---|---|---|---|---|---|---|
| Method | No FaithEval | With veto | CF | Ord. | OLMo | Yi | 32B | 70B | Greedy | Distractors | Qwen | Gemma |
| Sampling | 65.8 | 70.2 | 63.1 | 83.7 | 68.6 | 67.9 | 72.3 | 68.9 | 66.6 | 63.3 | – | – |
| CAD | 67.5 | 71.7 | 66.6 | 81.9 | 60.1 | 64.2 | 74.4 | 68.9 | 67.3 | 63.6 | 1.5 | +1.1 |
| AdaCAD | 68.1 | 71.6 | 65.7 | 83.7 | 68.5 | 67.5 | 74.0 | 71.6 | 67.6 | 64.9 | +0.6 | +1.6 |
| COIECD | 67.5 | 71.8 | 66.7 | 82.0 | 60.0 | 64.6 | 74.3 | 69.6 | 66.5 | 63.5 | 1.2 | +1.3 |
| NWCAD | 66.0 | 68.6 | 63.4 | 83.7 | 68.7 | 67.8 | 72.3 | 69.1 | 66.6 | 63.5 | 0.0 | +0.1 |
| Task, model | Passage, excerpt | Question | Sampling | CAD | AoR |
|---|---|---|---|---|---|
| NQ-Orig. Qwen3-8B | UConn owns the two longest winning streaks …The longest streak, 111 straight wins, started … | how many games in a row have the uconn women’s basketball team won | 111 ✓ | two ✗ | 111 ✓ accepted |
| NQ-Swap Qwen3-8B | In 1971, after the Irish War of Independence …most of Ireland seceded from the United Kingdom … | when did ireland gain its independence from england | 1922 ✗ | 1971 ✓ | 1971 ✓ CAD repair |
| NQ-Swap Llama-3.1-8B | Neal Dahlen as Hiccup Horrendous Haddock III, the son of the Viking chief Stoick the Vast and Valka. | who voices hiccup in how to train your dragon 2 | Jay Baruchel ✗ | Jay Baruchel ✗ | Neal Dahlen ✓ ID repair |
| FaithEval Qwen3-14B | …recent studies have shown that minerals hold a pivotal role in the fossilization process. … | Which of the following would most likely form a fossil? A. a rock, B. a crystal, C. a mineral, D. a bone | D ✗ | D ✗ | C ✓ D vetoed |
Appendix figures & tables16 assets
Supplementary material from the paper’s appendix.
Appendix
| Prompt | Text | Used by |
|---|---|---|
| Standard | Answer the question using the passage. Reply with only the answer, a few words at most. + passage + question | sampling, AoR, every contrastive decoder except Strict CAD |
| Closed-book | Answer the question. Reply with only the answer, a few words at most. + question | the memory veto of AoR, contrast of CAD, AdaCAD, COIECD, NWCAD and Strict CAD |
| Other passage | standard instruction + passage of another example + question | contrast of RPCD |
| Opposite directive | Answer the question using your own knowledge and ignore the passage. Reply with only the answer, a few words at most. + passage + question | contrast of ID |
| Strict | Answer the question using only the passage, even if the passage contradicts what you know. Reply with only the answer, a few words at most. + passage + question | Strict prompt, Strict CAD |
| Copy | Answer the question using the passage. Reply with only the answer, copied from the passage in as few words as possible. + passage + question | copy prompt, alone and with CAD |
| Task | Metric | Dev. | Test | Used |
|---|---|---|---|---|
| Counterfactual passages | ||||
| NQ-Swap | F1 | 200 | 800 | 724 |
| FaithEval | accuracy | 200 | 800 | 800 |
| Ordinary passages | ||||
| NQ-Original | F1 | 200 | 800 | 724 |
| SQuAD | F1 | 200 | 800 | 724 |
| Model | Temperature | Top- | Top- |
|---|---|---|---|
| Qwen3 (all sizes) | 0.7 | 0.8 | 20 |
| Llama-3.1 (8B, 70B) | 0.6 | 0.9 | off |
| Mistral-7B | 0.7 | 0.9 | off |
| OLMo-2-13B | 0.7 | 0.9 | off |
| Yi-1.5-9B | 0.7 | 0.9 | off |
| Method | Parameter | Settings tried | Scores |
|---|---|---|---|
| CAD | strength | 0.25, 0.5, 1, 2 | 1.81, 2.67, 2.66 , 0.49 |
| AdaCAD | strength | 0.5, 1, 2, 4 | 1.26, 1.67 , 1.54, 0.35 |
| RPCD | strength | 0.25, 0.5, 1, 2 | 1.85, 2.75, 3.11 , 1.00 |
| ID | strength | 0.25, 0.5, 1, 2, 4, 8 | 0.92, 1.73, 2.82, 3.10 , 0.76, 10.89 |
| NWCAD | divergence threshold | 0.05, 0.1, 0.2, 0.3, 0.5 | 0.17, 0.23 , 0.20, 0.16, 0.76 |
| COIECD | strength, constraint scale | (0.5, 0.25), (1, 0.25), (2, 0.25), (1, 0.1), (1, 0.5) | 12.55, 1.19, 2.60 , 1.54, 0.51 |
| Method | Settings | Counterfactual | Ordinary |
|---|---|---|---|
| CAD | 0.25, 0.5, 1, 2 | 3.7, 5.9, 7.8 , 8.0 | 0.2, 0.1, 2.1 , 7.7 |
| AdaCAD | 0.5, 1, 2, 4 | 2.3, 3.2 , 3.7, 3.2 | 0.2, 0.1 , 0.5, 2.5 |
| RPCD | 0.25, 0.5, 1, 2 | 2.8, 4.5, 5.8 , 5.7 | 0.8, 0.7, 0.3 , 4.2 |
| ID | 0.25, 0.5, 1, 2, 4, 8 | 1.5, 2.7, 4.5, 5.8 , 4.2, 7.7 | 0.4, 0.5, 0.8, 0.0 , 4.3, 15.3 |
| NWCAD | 0.05, 0.1, 0.2, 0.3, 0.5 | 0.2, 0.3 , 0.1, 0.1, 0.7 | 0.0, 0.1 , 0.3, 0.6, 1.2 |
| COIECD | (0.5, 0.25), (1, 0.25), (2, 0.25), (1, 0.1), (1, 0.5) | 22.8, 1.9, 7.7 , 2.7, 1.0 | 4.3, 0.2, 1.9 , 0.1, 0.1 |
| Closed-book probability | ||||
| – | – | |||
| Share (%) | 72.7 | 8.8 | 7.2 | 11.3 |
| Plain F1 | 80.5 | 85.1 | 86.3 | 89.3 |
| F1 change | ||||
| CAD | 3.0 | 5.4 | 7.1 | 7.4 |
| AdaCAD | 1.0 | 1.3 | 1.2 | 0.7 |
| Variant | NQ-Swap | FaithEval | NQ-Orig. | SQuAD | HotpotQA | CF | Ord. | Mean |
|---|---|---|---|---|---|---|---|---|
| Sampling | 56.9 | 63.6 | 76.0 | 84.5 | 63.5 | 60.3 | 74.7 | 67.5 |
| AoR | 65.2 | 80.4 | 78.2 | 87.5 | 65.2 | 72.8 | 77.0 | 74.9 |
| Repair every answer | 66.6 | 80.4 | 76.5 | 86.8 | 63.8 | 73.5 | 75.7 | 74.6 |
| No memory veto | 65.2 | 74.0 | 78.2 | 87.5 | 65.2 | 69.6 | 77.0 | 73.3 |
| CAD only | 62.8 | 79.5 | 76.9 | 86.7 | 64.5 | 71.2 | 76.0 | 73.6 |
| ID only | 64.2 | 76.5 | 78.1 | 86.9 | 65.2 | 70.4 | 76.8 | 73.6 |
| Decoder | Without veto | With veto |
|---|---|---|
| Veto score as a solver | 61.4 | – |
| Sampling | 63.6 | 74.5 |
| ID | 67.8 | 76.1 |
| CAD | 73.7 | 79.2 |
| AoR | 74.0 | 80.4 |
| Method | CF | Ord. | Mean |
|---|---|---|---|
| Sampling + veto | 65.7 | 74.7 | 70.2 |
| CAD + veto | 70.8 | 72.6 | 71.7 |
| AdaCAD + veto | 68.4 | 74.8 | 71.6 |
| COIECD + veto | 70.8 | 72.8 | 71.8 |
| NWCAD + veto | 62.4 | 74.8 | 68.6 |
| RPCD + veto | 69.9 | 74.4 | 72.2 |
| Method | NQ-Swap | Ord. | Mean | Cost |
|---|---|---|---|---|
| Sampling | 56.9 | 74.7 | 65.8 | 1.00 |
| Span decoding | 61.4 | 76.3 | 68.8 | 1.00 |
| Copy prompt | 59.6 | 73.4 | 66.5 | 1.02 |
| Copy prompt, CAD | 59.7 | 66.2 | 63.0 | 1.20 |
| AoR with one repair | ||||
| Feedback | 58.5 | 74.9 | 66.7 | 1.28 |
| Method | NQ-Swap | NQ-Orig. | Mean |
|---|---|---|---|
| Sampling | 53.8 | 72.7 | 63.3 |
| CAD | 58.8 | 68.5 | 63.6 |
| AdaCAD | 57.9 | 71.9 | 64.9 |
| COIECD | 58.4 | 68.6 | 63.5 |
| NWCAD | 54.3 | 72.7 | 63.5 |
| RPCD | 59.1 | 72.6 | 65.8 |
| Method | CF | Ord. | Mean |
|---|---|---|---|
| Sampling | 64.2 | 76.6 | 70.4 |
| CAD | 72.8 | 75.5 | 74.1 |
| AdaCAD | 67.4 | 76.8 | 72.1 |
| COIECD | 72.7 | 75.6 | 74.1 |
| NWCAD | 64.6 | 76.6 | 70.6 |
| RPCD | 70.7 | 76.5 | 73.6 |
| Method | NQ-Orig. | SQuAD | HotpotQA | Ord. | NQ-Swap |
|---|---|---|---|---|---|
| CAD | 4.6 | 1.8 | 4.9 | 3.8 | +0.9 |
| AdaCAD | 0.6 | 0.0 | 1.2 | 0.6 | +1.8 |
| COIECD | 4.2 | 1.8 | 4.5 | 3.5 | +1.0 |
| NWCAD | 0.1 | 0.2 | 0.0 | 0.1 | 0.0 |
| RPCD | 2.3 | 1.7 | 3.0 | 2.3 | +0.8 |
| ID | 3.4 | 1.0 | 1.0 | 1.8 | +2.8 |
| Method | NQ-Swap | NQ-Orig. | SQuAD | Ord. | Mean |
|---|---|---|---|---|---|
| Sampling | 64.9 | 86.3 | 90.9 | 88.6 | 76.7 |
| AoR (ours) | 73.3 | 86.7 | 91.9 | 89.3 | 81.3 |
| Difference | +8.4 ∗ | +0.4 | +1.0 | +0.7 ∗ | +4.6 ∗ |
| Mean | |||||||
|---|---|---|---|---|---|---|---|
| Method | CF | Ord. | Mean | Llama | Mistral | OLMo | Yi |
| Greedy | 58.4 | 74.8 | 66.6 | 70.2 | 58.0 | 69.4 | 68.8 |
| CAD | 63.3 | 71.4 | 67.3 | 74.1 | 62.1 | 67.7 | 65.4 |
| AdaCAD | 61.7 | 73.5 | 67.6 | 72.3 | 61.1 | 69.0 | 68.1 |
| COIECD | 60.8 | 72.2 | 66.5 | 72.5 | 60.5 | 67.8 | 65.3 |
| NWCAD | 58.5 | 74.7 | 66.6 | 70.5 | 58.1 | 69.3 | 68.3 |
| Method | Qwen3-1.7B | Qwen3-4B | Qwen3-8B | Qwen3-14B | Llama-3.1-8B | Mistral-7B |
|---|---|---|---|---|---|---|
| Sampling | 65.1 | 68.1 | 72.2 | 72.2 | 69.5 | 57.7 |
| CAD | 65.3 | 70.6 | 76.2 | 75.5 | 72.3 | 62.3 |
| AdaCAD | 65.9 | 69.4 | 73.3 | 73.2 | 71.9 | 60.9 |
| COIECD | 65.5 | 70.6 | 76.1 | 75.5 | 72.4 | 62.2 |
| NWCAD | 65.4 | 68.3 | 72.3 | 72.2 | 69.8 | 57.9 |
| RPCD | 65.8 | 70.4 | 74.3 | 74.6 | 71.2 | 65.1 |