Stepwise inference protocols, such as scratchpads and chain-of-thought, help language models solve complex problems by decomposing them into a sequence of simpler subproblems. Despite the significant gain in performance achieved via these protocols, the underlying mechanisms of stepwise inference have remained elusive. To address this, we propose to study autoregressive Transformer models on a synthetic task that embodies the multi-step nature of problems where stepwise inference is generally most useful. Specifically, we define a graph navigation problem wherein a model is tasked with traversing a path from a start to a goal node on the graph. Despite is simplicity, we find we can empirically reproduce and analyze several phenomena observed at scale: (i) the stepwise inference reasoning gap, the cause of which we find in the structure of the training data; (ii) a diversity-accuracy tradeoff in model generations as sampling temperature varies; (iii) a simplicity bias in the model's output; and (iv) compositional generalization and a primacy bias with in-context exemplars. Overall, our work introduces a grounded, synthetic framework for studying stepwise inference and offers mechanistic hypotheses that can lay the foundation for a deeper understanding of this phenomenon.
翻译:逐步推理协议(如草稿板与思维链)通过将复杂问题分解为一系列更简单的子问题,帮助语言模型解决复杂任务。尽管这些协议显著提升了模型性能,但其底层机制仍难以捉摸。为探究这一问题,我们提出在一种合成任务上研究自回归Transformer模型——该任务体现了逐步推理最常发挥效用的多步问题本质。具体而言,我们定义了一个图导航问题:模型需在图上从起始节点遍历路径到达目标节点。尽管任务看似简单,但我们发现可以实证复现并分析大尺度下观察到的若干现象:(i) 逐步推理的推理差距,其成因在于训练数据的结构;(ii) 模型生成结果中随采样温度变化的多样性-准确性权衡;(iii) 模型输出的简单性偏好;(iv) 组合泛化能力与上下文示例中的首因偏差。总体而言,本研究为逐步推理建立了一个基于实际问题的合成分析框架,并提出机制性假设,为深入理解该现象奠定基础。