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.
翻译:近年来,大型语言模型(LLMs)的能力受到广泛关注,在逻辑推理和符号推理等复杂场景中表现出色。这一进展的重要促进因素之一是上下文学习和少样本提示的优势。然而,这些模型利用上下文推理取得成功的原因尚未被充分探究。LLMs是否真正理解逻辑规则以进行推理,还是通过上下文学习一种概率映射来“猜测”答案?本文通过使用反事实方法替换上下文文本并修改逻辑概念,在两个逻辑推理数据集上探究了LLMs的推理能力。基于分析发现,LLMs并未真正理解逻辑规则;相反,上下文学习仅仅提高了这些模型得出正确答案的可能性。若改变上下文文本中的某些词语或逻辑术语的概念,LLMs的输出可能会被显著干扰,从而产生反直觉的回应。这项工作为LLMs的局限性提供了关键见解,强调了需要更稳健的机制来确保LLMs中可靠的逻辑推理。