2025-02-10 · 专家 · 自然语言处理 · 机器学习

CodeSteer: Symbolic-Augmented Language Models via Code/Text Guidance

CodeSteer通过结合代码生成和文本推理,有效地引导大型语言模型进行代码/文本生成,显著提升了模型在符号计算任务上的性能。

更新于 2025-02-10。作者:Yongchao Chen、Yilun Hao、Yueying Liu、Yang Zhang、Chuchu Fan。

中文摘要

现有方法未能有效地引导大型语言模型(LLMs)在文本推理和代码生成之间进行切换,导致符号计算能力未能得到充分利用。我们引入了CodeSteer,这是一种有效的引导LLM进行代码/文本生成的方法。我们构建了一个包含37个具有可调节复杂度的符号任务的全面基准SymBench,并合成了包含12k个多轮引导/生成轨迹和5.5k个引导比较对的数据库。我们使用新设计的多轮监督微调(SFT)和直接偏好优化(DPO)对Llama-3-8B模型进行微调。由此产生的模型,CodeSteerLLM,通过增加所提出的符号和自答检查器,有效地引导较大模型的代码/文本生成。将CodeSteer应用于GPT-4o,将其平均性能评分从53.3提升至86.4,甚至在所有37个任务(28个已知,9个未知)中超越了现有的最佳LLM OpenAI o1(82.7)、o1-preview(74.8)和DeepSeek R1(76.8)。为GPT-4o训练的CodeSteer展示了卓越的泛化能力,在Claude、Mistral和GPT-3.5上平均提升了41.8的性能。CodeSteer引导的LLMs充分利用符号计算,在高度复杂的任务上保持强大的性能。模型、数据集和代码可在https://github.com/yongchao98/CodeSteer-v1.0上获取。

英文摘要

Existing methods fail to effectively steer Large Language Models (LLMs) between textual reasoning and code generation, leaving symbolic computing capabilities underutilized. We introduce CodeSteer, an effective method for guiding LLM code/text generation. We construct a comprehensive benchmark SymBench comprising 37 symbolic tasks with adjustable complexity and also synthesize datasets of 12k multi-round guidance/generation trajectories and 5.5k guidance comparison pairs. We fine-tune the Llama-3-8B model with a newly designed multi-round supervised fine-tuning (SFT) and direct preference optimization (DPO). The resulting model, CodeSteerLLM, augmented with the proposed symbolic and self-answer checkers, effectively guides the code/text generation of larger models. Augmenting GPT-4o with CodeSteer raises its average performance score from 53.3 to 86.4, even outperforming the existing best LLM OpenAI o1 (82.7), o1-preview (74.8), and DeepSeek R1 (76.8) across all 37 tasks (28 seen, 9 unseen). Trained for GPT-4o, CodeSteer demonstrates superior generalizability, providing an average 41.8 performance boost on Claude, Mistral, and GPT-3.5. CodeSteer-guided LLMs fully harness symbolic computing to maintain strong performance on highly complex tasks. Models, Datasets, and Codes are available at https://github.com/yongchao98/CodeSteer-v1.0.

解读

一句话总结

CodeSteer通过结合代码生成和文本推理,有效地引导大型语言模型进行代码/文本生成,显著提升了模型在符号计算任务上的性能。

问题1:这篇论文想要解决什么具体问题?

问题2:论文的核心创新点是什么?

问题3:实验结果如何验证了方法的有效性?

问题4:这个研究的实际应用价值是什么?

来源