Humans have a powerful and mysterious capacity to reason. By working through a series of purely mental steps, we can make inferences we would not be capable of making directly -- despite that fact that we get no additional data from the world. Similarly, large language models can perform better at complex tasks through chain-of-thought reasoning, where they generate intermediate steps before answering a question. We use language models to investigate the questions of when and why reasoning is helpful, testing the hypothesis that reasoning is effective when training data consisting of local clusters of variables that influence each other strongly. These training conditions enable the chaining of accurate local inferences in order to estimate relationships between variables that were not seen together in training. We train an autoregressive transformer on samples from joint distributions defined by Bayes nets, but only include a subset of all the variables in each sample. We compare language models' ability to match conditional probabilities both with and without intermediate reasoning steps, finding that intermediate steps help only when the training data is locally structured with respect to dependencies between variables. Furthermore, intermediate variables need to be relevant to the relationship between observed information and target inferences. Our results illustrate how the statistical structure of training data drives the effectiveness of reasoning step by step.
翻译:人类有一个强大而神秘的推理能力。通过进行一系列纯粹的思想步骤,我们能够进行我们无法直接进行的推断——尽管我们并没有从世界中获取到额外的数据。类似地,大型语言模型可以通过链式推理在复杂任务上表现更好,其中它们在回答问题之前生成中间步骤。我们使用语言模型来研究推理何时及为何有用,测试推理在训练数据由强烈相互影响的局部变量群集组成时,是否有效的假设。这些训练条件使得准确的局部推论可以被链接起来,以估计在训练中没有一起出现的变量之间的关系。我们根据Bayes网络定义的联合分布的样本训练一个自回归变换器,但每个样本中只包括部分变量。我们比较语言模型在有和没有中间推理步骤的情况下匹配条件概率的能力,发现中间步骤仅在训练数据与变量之间的依赖关系局部结构有关时才有帮助。此外,中间变量需要与观察信息和目标推理之间的关系相关。我们的结果说明了训练数据的统计结构驱动了逐步推理的有效性。