Do Large Language Models Understand Logic or Just Mimick Context?
On the map: LLM reasoning → Reasoning benchmarks and evaluation
Abstract (arXiv)
Over the past few years, the abilities of large language models (LLMs) have received extensive attention, which have performed exceptionally well in complicated scenarios such as logical reasoning and symbolic inference. A significant factor contributing to this progress is the benefit of in-context learning and few-shot prompting. However, the reasons behind the success of such models using contextual reasoning have not been fully explored. Do LLMs have understand logical rules to draw inferences, or do they ``guess'' the answers by learning a type of probabilistic mapping through context? This paper investigates the reasoning capabilities of LLMs on two logical reasoning datasets by using counterfactual methods to replace context text and modify logical concepts. Based on our analysis, it is found that LLMs do not truly understand logical rules; rather, in-context learning has simply enhanced the likelihood of these models arriving at the correct answers. If one alters certain words in the context text or changes the concepts of logical terms, the outputs of LLMs can be significantly disrupted, leading to counter-intuitive responses. This work provides critical insights into the limitations of LLMs, underscoring the need for more robust mechanisms to ensure reliable logical reasoning in LLMs.
Key facts. Cited by 10 papers in the map (data through 13 Oct 2026). Placed in Reasoning benchmarks and evaluation, one of 17 directions in LLM reasoning. Builds on 21 of its 28 references that are in the map. First posted on arXiv 19 Feb 2024.
Builds on
21 of 28 references.
Closest ancestors · 2
Same direction, newest first
- 2023LLaMA: Open and Efficient Foundation Language Models27 Feb
- 2022Rethinking the Role of Demonstrations: What Makes In-Context Learning Work?25 Feb
Other references · 19
- 2020Language Models are Few-Shot Learnerscited by 32,320
- 2022Training language models to follow instructions with human feedbackcited by 15,856
- 2023Llama 2: Open Foundation and Fine-Tuned Chat Modelscited by 12,979
- 2018GLUE: A Multi-Task Benchmark and Analysis Platform for Natural Language Understandingcited by 4,880
- 2021On the Opportunities and Risks of Foundation Modelscited by 3,999
- 2021Finetuned Language Models Are Zero-Shot Learnerscited by 3,765
- 2022Self-Instruct: Aligning Language Models with Self-Generated Instructionscited by 2,693
- 2022BLOOM: A 176B-Parameter Open-Access Multilingual Language Modelcited by 1,978
- 2023Pythia: A Suite for Analyzing Large Language Models Across Training and Scalingcited by 1,761
- 2022GLM-130B: An Open Bilingual Pre-trained Modelcited by 841
- 2022Galactica: A Large Language Model for Sciencecited by 741
- 2021Cross-Task Generalization via Natural Language Crowdsourcing Instructionscited by 697
7 more
- 2020Pre-trained Models for Natural Language Processing: A Surveycited by 504
- 2021Recent Advances in Natural Language Processing via Large Pre-Trained Language Models: A Surveycited by 461
- 2019Learning the Difference that Makes a Difference with Counterfactually-Augmented Datacited by 433
- 2021Meta-learning via Language Model In-context Tuningcited by 164
- 2021Pretrained Transformers as Universal Computation Enginescited by 162
- 2019Augmenting Neural Networks with First-order Logiccited by 51
- 2021Semantically Distributed Robust Optimization for Vision-and-Language Inferencecited by 9
Built on by
Citing papers per year: 2024: 1; 2025: 6; 2026: 3.
10 papers.
- 2025ZebraLogic: On the Scaling Limits of LLMs for Logical Reasoningcited by 191
- 2024Evaluating the Robustness of Analogical Reasoning in Large Language Modelscited by 31
- 2025None of the Others: a General Technique to Distinguish Reasoning from Memorization in Multiple-Choice LLM Evaluation Benchmarkscited by 6
- 2025OntoURL: A Benchmark for Evaluating Large Language Models on Symbolic Ontological Understanding, Reasoning and Learningcited by 6
- 2025StepProof: Step-by-step verification of natural language mathematical proofscited by 6
- 2025A DbC Inspired Neurosymbolic Layer for Trustworthy Agent Designcited by 2
- 2025The Einstein Test: Towards a Practical Test of a Machine's Ability to Exhibit Superintelligencecited by 0
- 2026Early-Stage Product Line Validation Using LLMs: A Study on Semi-Formal Blueprint Analysiscited by 0
- 2026Evaluation of Contextual Understanding in Large Language Modelscited by 0
- 2026Do LLMs Understand Context? A Knowledge Graph-Based Evaluation Frameworkcited by 0
- 2026Do LLMs Understand Context? A Knowledge Graph-Based Evaluation Framework24 Sep 2026
- 2026Evaluation of Contextual Understanding in Large Language Models8 Sep 2026
- 2026Early-Stage Product Line Validation Using LLMs: A Study on Semi-Formal Blueprint Analysis22 Apr 2026
- 2025A DbC Inspired Neurosymbolic Layer for Trustworthy Agent Design5 Aug 2025
- 2025StepProof: Step-by-step verification of natural language mathematical proofs12 Jun 2025
- 2025OntoURL: A Benchmark for Evaluating Large Language Models on Symbolic Ontological Understanding, Reasoning and Learning16 May 2025
- 2025None of the Others: a General Technique to Distinguish Reasoning from Memorization in Multiple-Choice LLM Evaluation Benchmarks18 Feb 2025
- 2025ZebraLogic: On the Scaling Limits of LLMs for Logical Reasoning3 Feb 2025
- 2025The Einstein Test: Towards a Practical Test of a Machine's Ability to Exhibit Superintelligence12 Jan 2025
- 2024Evaluating the Robustness of Analogical Reasoning in Large Language Models21 Nov 2024
Similar, not cited
Close in wording, no citation either way
- 2025Reasoning Capabilities and Invariability of Large Language Models
- 2023Large Language Models are In-Context Semantic Reasoners rather than Symbolic Reasoners
- 2023Are Large Language Models Really Good Logical Reasoners? A Comprehensive Evaluation and Beyond
- 2024Can LLMs Reason with Rules? Logic Scaffolding for Stress-Testing and Improving LLMs
- 2025Do Large Language Models Excel in Complex Logical Reasoning with Formal Language?
- 2024Can Large Language Models Act as Symbolic Reasoners?
- 2025LogiDynamics: Unraveling the Dynamics of Inductive, Abductive and Deductive Logical Inferences in LLM Reasoning
- 2025Logical Reasoning in Large Language Models: A Survey