Not What You Meant: Can LLMs Follow a Specified Negation Semantics?
Organizations: University of Auckland, New Zealand · Royal Holloway, University of London, United Kingdom
Abstract
Negation does not carry a uniform interpretation across domains. In legal, regulatory, and medical reasoning, the intended interpretation depends on the reading in force -- open- versus closed-world, two- versus three-valued, and credulous versus skeptical. We study which reading of negation large language models adopt by default and whether they can override that preference when a different reading is explicitly specified. To this end, we introduce NAFBench, a procedural generator of solver-certified instances spanning four semantic viewpoints: SLDNF, well-founded semantics (WFS), and credulous and skeptical reasoning under stable-model semantics. The generator emits ground normal logic programs with controlled depth, width, and cycle structure. Each program is solved under all four viewpoints using SWI-Prolog, a well-founded semantics solver, and clingo, yielding up to four divergent labels. The programs are then verbalized into natural language under multiple framings and rule orderings that leave the answer invariant. The results expose a consistent gap. Across open-source models, following a specified negation semantics remains unsolved: the strongest models score 59--74% across the four semantic viewpoints, while the weakest score 31--67%. All models are order-sensitive on more than half of logically identical rule shufflings, while the two weaker models frequently overcommit on well-founded "undefined." Two frontier models reach 100% on the main fixed-complexity evaluation set, and a third, o4-mini, is near-perfect, falling only to 81% on well-founded "undefined." Delegating reasoning to a solver, fine-tuning on certified traces, or forcing an explicit three-valued verdict each partly closes the gap.
Figures & tables
| Model | cred. | skept. | WFS | SLDNF | cor. |
|---|---|---|---|---|---|
| Frontier | |||||
| Claude Sonnet 5 | 100 | 100 | 100 | 100 | n/a |
| GPT-5.6 Sol | 100 | 100 | 100 | 100 | n/a |
| o4-mini | 100 | 98 | 81 | 100 | 0 4 |
| Open-source | |||||
| Qwen2.5-coder 32B | 72 | 61 | 74 | 59 | 55 |
| Model | control | even-1 | odd | even-2 |
|---|---|---|---|---|
| Qwen2.5-coder 32B | 65 | 67 | 62 | 72 |
| Llama3-8B | 78 | 30 | 37 | 51 |
| DeepSeek-R1 32B | 81 | 38 | 52 | 35 |
| negation depth (accuracy %) | |||||
| Model | |||||
| Qwen2.5-coder 32B | 71 | 67 | 67 | 64 | 64 |
| Llama3-8B | 44 | 43 | 45 | 44 | 51 |
| DeepSeek-R1 32B | 42 | 61 | 68 | 41 | 51 |
| shared-subgoal width (accuracy %) | |||||
| Model | |||||
| Model | accuracy (%) | flip (%) | cov. |
| Frontier | |||
| Claude Sonnet 5 | 99.7 | 0 1 | 640/640 |
| GPT-5.6 Sol | 100 | 0 0 | 640/640 |
| o4-mini | 94.8 | 15 | 640/640 |
| Open-source | |||
| Qwen2.5-coder 32B | 68.1 | 54 | 640/640 |
| Model | definite (A/B) | correct “undef.” |
|---|---|---|
| Qwen2.5-coder 32B | 9% | 91% |
| Llama3-8B | 74% | 26% |
| DeepSeek-R1 32B | 71% | 29% |
| Model | direct WFS | solver (translate-then-solve) |
|---|---|---|
| Qwen2.5-coder 32B | 59 | 95 |
| Llama3-8B | 49 | 74 |
| DeepSeek-R1 32B | 62 | 89 |
| Model | base | +SFT | +SFT+DPO |
|---|---|---|---|
| gemma-3-4b-it | 41 | 91 | — |
| qwen2.5-7b | 59 | 93 | 93 |
Appendix figures & tables6 assets
Supplementary material from the paper’s appendix.
Appendix
| Model | control | ev_one | odd | ev_both | ||||||||
|---|---|---|---|---|---|---|---|---|---|---|---|---|
| Claude Sonnet 5 | 30A | 30C | 30C | 30A | ||||||||
| GPT-5.6 Sol | 30A | 30C | 30C | 30A | ||||||||
| o4-mini | 12A | 18C | 1B | 29C | 1A | 2B | 27C | 30A | ||||
| Qwen2.5-coder 32B | 10A | 20C | 19A | 2B | 9C | 15A | 2B | 12C | 22A | 8C | ||
| DeepSeek-R1 32B | 7A | 1B | 22C | 17A | 5B | 6C | 8A | 10B | 8C | 23A | 1B | 1C |
| Llama3-8B | 19A | 11C | 27A | 1B | 2C | 21A | 9C | 22A | 1B | 7C | ||
| Model | cred | skept | wfs | c-world |
|---|---|---|---|---|
| Claude Sonnet 5 | 60 | 60 | 90 | 90 |
| GPT-5.6 Sol | 60 | 60 | 90 | 90 |
| o4-mini | 44 | 44 | 68 | 68 |
| Qwen2.5-coder 32B | 53 | 49 | 39 | 39 |
| DeepSeek-R1 32B | 57 | 43 | 22 | 22 |
| Llama3-8B | 68 | 63 | 37 | 37 |
| Model | correct | auditable | sound | contradicted |
|---|---|---|---|---|
| Claude Sonnet 5 | 480 | 219 | 219 | 0 0 (0.0%) |
| GPT-5.6 Sol | 480 | 262 | 262 | 0 0 (0.0%) |
| o4-mini | 455 | 243 | 243 | 0 0 (0.0%) |
| Qwen2.5-coder 32B | 314 | 150 | 129 | 21 (14.0%) |
| DeepSeek-R1 32B | 224 | 105 | 0 81 | 24 (22.9%) |
| Llama3-8B | 224 | 0 71 | 0 43 | 28 (39.4%) |
| Model | sldnf | cred | skept | wfs |
|---|---|---|---|---|
| Claude Sonnet 5 | 42/42 | 48/48 | 59/59 | 70/70 |
| GPT-5.6 Sol | 27/27 | 42/42 | 95/95 | 98/98 |
| o4-mini | 42/42 | 67/67 | 61/61 | 74/96 |
| Qwen2.5-coder 32B | 17/54 | 37/55 | 34/76 | 46/67 |
| DeepSeek-R1 32B | 26/95 | 12/25 | 23/42 | 24/94 |
| Llama3-8B | 0 6/43 | 10/33 | 17/59 | 15/62 |
| odd skept | odd cred | |
| Model | correct / earned | correct / earned |
| Claude Sonnet 5 | 30 / 30 | 30 / 30 |
| GPT-5.6 Sol | 30 / 30 | 30 / 30 |
| o4-mini | 30 / 29 | 30 / 30 |
| Qwen2.5-coder 32B | 23 / 0 1 | 0 3 / 1 |
| DeepSeek-R1 32B | 14 / 10 | 18 / 5 |
| Model | Metric | Direct | Verify | T2S |
|---|---|---|---|---|
| Qwen2.5-coder 32B | Parsed accuracy (%) | 59 | 82 | 95 |
| Strict accuracy (%; nulls) | 59 (0) | 82 (0) | 95 (0) | |
| DeepSeek-R1 32B | Parsed accuracy (%) | 62 | 69 | 89 |
| Strict accuracy (%; nulls) | 45 (12) | 57 (8) | 77 (6) | |
| Llama3-8B | Parsed accuracy (%) | 49 | 62 | 74 |
| Strict accuracy (%; nulls) | 48 (1) | 48 (10) | 70 (2) |
Nonmonotonic Reasoning
Nonmonotonic reasoning studies formalisms in which conclusions can be withdrawn when new information reveals exceptions or conflicts.
See all 17 papers