通过知识蒸馏实现隐式思维链推理
Implicit Chain of Thought Reasoning via Knowledge Distillation
AI总结:
本文提出利用知识蒸馏将教师模型的显式思维链转化为学生模型跨层隐藏状态中的隐式纵向推理,从而在保持无思维链速度的同时解决多位数乘法和小学数学难题。
摘要:
为了增强语言模型的推理能力,研究人员通常会提示或微调它们,使其在给出最终答案之前生成思维链推理步骤。然而,尽管人们使用自然语言进行有效推理,但语言模型或许可以通过某些非自然语言的中间计算来更有效地推理。在本工作中,我们探索了一种替代推理方法:不显式生成思维链推理步骤,而是利用语言模型的内部隐藏状态执行隐式推理。隐式推理步骤从一个经过显式思维链推理训练的教师模型中蒸馏而来;我们没有通过逐一生成中间词来“横向”进行推理,而是将其蒸馏为在不同层的隐藏状态之间“纵向”发生的推理。我们在多位数乘法任务和一个小学数学问题数据集上进行了实验,发现该方法能够解决此前没有显式思维链就无法解决的任务,同时速度与不使用思维链时相当。
英文摘要:
To augment language models with the ability to reason, researchers usually prompt or finetune them to produce chain of thought reasoning steps before producing the final answer. However, although people use natural language to reason effectively, it may be that LMs could reason more effectively with some intermediate computation that is not in natural language. In this work, we explore an alternative reasoning approach: instead of explicitly producing the chain of thought reasoning steps, we use the language model's internal hidden states to perform implicit reasoning. The implicit reasoning steps are distilled from a teacher model trained on explicit chain-of-thought reasoning, and instead of doing reasoning "horizontally" by producing intermediate words one-by-one, we distill it such that the reasoning happens "vertically" among the hidden states in different layers. We conduct experiments on a multi-digit multiplication task and a grade school math problem dataset and find that this approach enables solving tasks previously not solvable without explicit chain-of-thought, at a speed comparable to no chain-of-thought.
机构、总结、中文摘要均由AI分析而来,可能存在错误,请以论文正文为准。