[论文解读] Distilling Reasoning Capabilities into Smaller Language Models
本文提出了一种知识蒸馏框架,通过一种名为 SOCRATIC COT 的新方法,将大型语言模型的思维链(CoT)推理能力迁移至小型模型。该方法将问题分解为子问题-解法对。该方法显著提升了小型模型的性能——在 GSM8K、StrategyQA 和 SVAMP 上实现了超过 70% 的相对性能提升,使得 GPT-2 大型模型在某些情况下超越了 10 倍大的 GPT-3 6B 模型。
Step-by-step reasoning approaches like chain of thought (CoT) have proved to be very effective in inducing reasoning capabilities in large language models. However, the success of the CoT approach is fundamentally tied to the model size, and billion parameter-scale models are often needed to get CoT to work. In this paper, we propose a knowledge distillation approach that leverages the step-by-step CoT reasoning capabilities of larger models and distills these abilities into smaller models. In this work, we propose an alternative reasoning scheme, Socratic CoT, that learns a decomposition of the original problem into a sequence of subproblems and uses it to guide the intermediate reasoning steps. We use Socratic CoT to train a combination of two small distilled models: a problem decomposer and a subproblem solver. In practice, given a new problem, the two distilled models work in sync to decompose and solve complex problems. On multiple reasoning datasets (GSM8K, StrategyQA, and SVAMP), our proposed distillation strategies boosts the performance of smaller models over 70% compared to the baselines. Finally, we investigate when Socratic CoT is an effective alternative to CoT, demonstrating cases where a much smaller model (GPT-2 large) can outperform a 10X larger model (GPT-3 6B). Our code is available here: https://github.com/kumar-shridhar/Distiiling-LM
研究动机与目标
- 使小型语言模型能够获得通常仅存在于大型模型中的复杂推理能力。
- 探究是否可以通过大型模型的逐步推理知识蒸馏,有效将推理能力迁移至小型模型。
- 探索基于子问题的分解(SOCRATIC COT)是否在推理泛化方面优于标准 CoT 监督。
- 证明在所提出的蒸馏框架下,小型模型可以超越大型模型。
提出的方法
- 使用大型语言模型作为教师,为多步推理问题生成逐步推理标注。
- 提出 SOCRATIC COT,一种两阶段框架,包含问题生成器和问答模型,用于将问题分解为子问题-解法对。
- 在黄金标准 CoT 解法和 LLM 生成的子问题-解法对上联合训练学生模型,以提供更强的监督信号。
- 采用引导机制,使子问题生成基于中间方程或解题步骤,以提升生成质量。
- 使用教师模型推理输出的蒸馏监督信号,对小型学生模型(如 GPT-2)进行微调。
- 在多种监督设置下,于多个推理数据集(GSM8K、StrategyQA 和 SVAMP)上评估性能。
实验结果
研究问题
- RQ1在无法访问教师模型参数的情况下,是否能有效将大型语言模型的推理能力蒸馏到小型模型中?
- RQ2通过 SOCRATIC COT 实现的基于子问题的监督是否在小型模型中带来优于标准 CoT 监督的推理性能?
- RQ3SOCRATIC COT 在何种场景下优于标准 CoT?是否能使小型模型超越大型模型?
- RQ4引导机制在蒸馏过程中提升生成子问题质量方面的有效性如何?
- RQ5该蒸馏框架是否可在不同推理数据集上泛化,即使标注数据可用性不同?
主要发现
- 所提出的蒸馏框架在 GSM8K、StrategyQA 和 SVAMP 上,使小型语言模型的性能相对于基线方法提升了超过 70%。
- 在使用 SOCRATIC COT 监督时,GPT-2 大型模型在某些推理任务上超越了 10 倍大的 GPT-3 6B 模型。
- 子问题生成过程中的引导显著提升了问题质量,BLEU 分数从 51.5 提升至 58.8,BERT F1 从 0.78 提升至 0.81。
- 使用 LLM 生成的逐步标注进行微调,使 GSM8K 上的性能相比基线提升了 40%。
- 在推理时去除独立的问题生成模块会导致性能显著下降,表明子问题在有效推理迁移中至关重要。
- 该框架表明,通过子问题进行语义分解的蒸馏比直接模仿 CoT 更为有效,尤其在黄金 CoT 数据有限时。
阅读本论文
在 Nubint 阅读器中打开原文,边读边就任意段落提问。
在 Nubint 中阅读本论文本解读由 AI 根据论文原文生成,引用前请核对原文。