通过伪代码训练指令跟随
Training with Pseudo-Code for Instruction Following
AI总结:
通过伪代码训练提升LLM指令跟随能力,实现8-21%的提升并在数学和常识推理中取得平均30%的提升。
摘要:
尽管大型语言模型(LLMs)的能力取得了快速进展,但它们在遵循相对简单且明确的指令方面仍然存在困难,尤其是在涉及组合结构时。最近的研究表明,当指令以伪代码形式表达时,模型可能更有效地遵循指令。然而,编写伪代码程序可能很繁琐,而非专家用户在推理时依赖少量示例或代码提示往往显得不自然。为克服这些限制,我们提出了一种训练时间的方法,通过在指令微调数据中加入自然语言指令的伪代码表示以及最终响应,对LLMs进行微调。我们在12个公开可用的基准测试中评估了我们的方法,涵盖指令跟随、数学推理和常识推理,覆盖六个基础模型。我们的结果表明,使用伪代码训练的模型在遵循指令方面更加可靠,其在指令跟随基准测试中实现了8-21%的相对提升,同时在数学和常识推理任务中基本保持并部分提高了性能,所有评估基准的平均提升最高可达30%。
英文摘要:
Despite rapid advances in the capabilities of Large Language Models (LLMs), they continue to struggle with following relatively simple and unambiguous instructions, particularly when compositional structure is involved. Recent work suggests that models may follow instructions more effectively when they are expressed in pseudo-code rather than natural language. However, writing pseudo-code programs can be tedious, and relying on few-shot demonstrations or inference-time code prompting is often unnatural for non-expert users of LLMs. To overcome these limitations, we propose a training time approach that fine-tunes LLMs using instruction-tuning data augmented with pseudo-code representations of natural language instructions paired with final responses. We evaluate our method on 12 publicly available benchmarks spanning instruction-following, mathematical reasoning, and commonsense reasoning, across six base models. Our results show that models trained with pseudo-code follow instructions more reliably, achieving relative gains of 8-21\% on instruction following benchmarks, while largely preserving and in some cases improving performance on mathematical and commonsense reasoning tasks, with an average gain of up to 30\% across all evaluated benchmarks.
机构、总结、中文摘要均由AI分析而来,可能存在错误,请以论文正文为准。