arXivDaily arXiv每日学术速递 周一至周五更新
arXiv 2409.10502cs.LGcs.CL
收藏

因果语言建模可激发逻辑谜题中的搜索与推理能力

Causal Language Modeling Can Elicit Search and Reasoning Capabilities on Logic Puzzles

UT Austin(德克萨斯大学奥斯汀分校);Google Research(谷歌研究院)

Kulin Shah, Nishanth Dikkala, Xin Wang, Rina Panigrahy

AI总结:

本研究验证了基于逻辑步骤序列训练的Transformer因果语言模型可学会解数独(正确率94.21%)与Zebra谜题(正确率92.04%),且其内部表示隐含推理能力,证明该训练方式能激发搜索与推理能力。

摘要:

过去几年,基于Transformer架构的因果语言建模赋予了大语言模型(LLMs)卓越的能力。然而,LLMs在多大程度上涌现出基础的搜索与推理能力,仍是一个持续争论的话题。本研究中,我们探究因果语言建模能否学会解决数独谜题这类复杂任务。要解决数独,模型首先需要遍历谜题的所有空白格,选定要填充的单元格,再运用合适的策略填充选定单元格。有时,运用某一策略只能缩小单元格的可能取值范围,而非确定其确切值。这种情况下,需要依次运用多种策略来填充单个单元格。我们观察到,在求解器生成的逻辑步骤序列上训练的Transformer模型,确实能够学会解决数独——我们的模型能完全正确求解94.21%的谜题。我们发现,用逻辑步骤序列训练Transformer是必要的,没有这类训练,模型无法学会解数独。我们还将分析拓展到Zebra谜题(又称爱因斯坦谜题),结果显示模型能完全正确求解92.04%的谜题。此外,我们研究了训练后Transformer的内部表示,发现通过线性探测,我们可以从中解码出任意给定单元格的可能取值集合的信息,这表明Transformer权重中隐含着一个强大的推理引擎。

英文摘要:

Causal language modeling using the Transformer architecture has yielded remarkable capabilities in Large Language Models (LLMs) over the last few years. However, the extent to which fundamental search and reasoning capabilities emerged within LLMs remains a topic of ongoing debate. In this work, we study if causal language modeling can learn a complex task such as solving Sudoku puzzles. To solve a Sudoku, the model is first required to search over all empty cells of the puzzle to decide on a cell to fill and then apply an appropriate strategy to fill the decided cell. Sometimes, the application of a strategy only results in thinning down the possible values in a cell rather than concluding the exact value of the cell. In such cases, multiple strategies are applied one after the other to fill a single cell. We observe that Transformer models trained on this synthetic task can indeed learn to solve Sudokus (our model solves $94.21\%$ of the puzzles fully correctly) when trained on a logical sequence of steps taken by a solver. We find that training Transformers with the logical sequence of steps is necessary and without such training, they fail to learn Sudoku. We also extend our analysis to Zebra puzzles (known as Einstein puzzles) and show that the model solves $92.04 \%$ of the puzzles fully correctly. In addition, we study the internal representations of the trained Transformer and find that through linear probing, we can decode information about the set of possible values in any given cell from them, pointing to the presence of a strong reasoning engine implicit in the Transformer weights.

机构、总结、中文摘要均由AI分析而来,可能存在错误,请以论文正文为准。

↑