The emergent few-shot reasoning capabilities of Large Language Models (LLMs) have excited the natural language and machine learning community over recent years. Despite of numerous successful applications, the underlying mechanism of such in-context capabilities still remains unclear. In this work, we hypothesize that the learned \textit{semantics} of language tokens do the most heavy lifting during the reasoning process. Different from human's symbolic reasoning process, the semantic representations of LLMs could create strong connections among tokens, thus composing a superficial logical chain. To test our hypothesis, we decouple semantics from the language reasoning process and evaluate three kinds of reasoning abilities, i.e., deduction, induction and abduction. Our findings reveal that semantics play a vital role in LLMs' in-context reasoning -- LLMs perform significantly better when semantics are consistent with commonsense but struggle to solve symbolic or counter-commonsense reasoning tasks by leveraging in-context new knowledge. The surprising observations question whether modern LLMs have mastered the inductive, deductive and abductive reasoning abilities as in human intelligence, and motivate research on unveiling the magic existing within the black-box LLMs. On the whole, our analysis provides a novel perspective on the role of semantics in developing and evaluating language models' reasoning abilities. Code is available at {\url{https://github.com/XiaojuanTang/ICSR}}.
翻译:大型语言模型(LLMs)近年来展现出的少样本推理能力令自然语言处理与机器学习社区振奋不已。尽管已有大量成功应用,这种上下文能力的潜在机制仍不清晰。本研究假设,语言标记的习得性语义在推理过程中承担了主要负担。与人类的符号推理过程不同,LLMs的语义表征能在标记间建立强连接,从而形成表层的逻辑链条。为验证这一假设,我们将语义从语言推理过程中解耦,评估了三种推理能力:演绎、归纳和溯因。研究结果表明,语义在LLMs的上下文推理中起关键作用——当语义符合常识时,LLMs表现显著更优,但在利用上下文新知识解决符号或反常识推理任务时存在困难。这一惊人发现质疑了现代LLMs是否真正掌握了与人类智能相同的归纳、演绎和溯因推理能力,并激励着揭开黑箱LLMs内部奥秘的研究。总体而言,我们的分析为语义在语言模型推理能力开发与评估中的作用提供了全新视角。代码已开源在:{\url{https://github.com/XiaojuanTang/ICSR}}。