arXivDaily arXiv每日学术速递 周一至周五更新
arXiv 2606.30704cs.LGcs.AIcs.CL
收藏

从搜索到合成:训练大语言模型为零样本工作流生成器

From Search to Synthesis: Training LLMs as Zero-Shot Workflow Generators

School of Mathematics Science, Peking University(北京大学数学科学学院)

Gan Luo, Zihan Qin, Bin Dong, Wotao Yin

AI总结:

提出MetaFlow,将工作流生成视为元学习问题,通过两阶段训练(监督微调+强化学习)使模型能生成可泛化的任务级工作流,在问答、代码生成和数学推理任务上实现零样本泛化。

摘要:

大型语言模型(LLMs)在广泛任务中表现出色,但其针对具体实例的解决方案缺乏可靠部署所需的结构一致性。在任务级别编码重复算法模式的工作流提供了一个原则性框架,能够跨实例变化提供鲁棒性、可调试的可解释轨迹以及跨问题实例的可重用性。然而,手动设计此类工作流需要大量专业知识和努力,限制了其广泛应用。虽然自动工作流生成可以解决这一瓶颈,但现有方法要么生成实例特定的解决方案而不学习任务级模式,要么无法泛化到其训练配置之外。我们提出MetaFlow,将工作流生成视为一个元学习问题:给定一个任务和一个算子集,模型学习组合解决方案策略。MetaFlow分两个阶段训练:对合成工作流数据进行监督微调,然后使用可验证奖励的强化学习(RLVR),该奖励利用任务中问题实例的执行反馈来提高端到端成功率。生成的模型为训练过的任务产生有效的工作流,并展现出对未训练任务和新算子集的强泛化能力。在问答、代码生成和数学推理的基准测试中,MetaFlow在域内任务上通过单次推理达到了与最先进基线相当的性能,同时在域外任务和算子集上展示了卓越的零样本泛化能力。

英文摘要:

Large language models (LLMs) excel across a wide range of tasks, yet their instance-specific solutions often lack the structural consistency needed for reliable deployment. Workflows that encode recurring algorithmic patterns at the task level provide a principled framework, offering robustness across instance variations, interpretable traces for debugging, and reusability across problem instances. However, manually designing such workflows requires significant expertise and effort, limiting their broader application. While automatic workflow generation could address this bottleneck, existing methods either produce instance-specific solutions without learning task-level patterns, or cannot generalize beyond their training configurations. We present MetaFlow, which casts workflow generation as a meta-learning problem: given a task and an operator set, the model learns to compose solution strategies. MetaFlow trains in two stages: supervised fine-tuning on synthetic workflow data, followed by reinforcement learning with verifiable rewards (RLVR) that uses execution feedback across problem instances in the task to improve end-to-end success. The resulting model produces effective workflows for trained tasks and exhibits strong generalization to untrained tasks and novel operator sets. Across benchmarks in question answering, code generation, and mathematical reasoning, MetaFlow achieves performance comparable to state-of-the-art baselines on in-domain tasks with single inference, while demonstrating remarkable zero-shot generalization capabilities on out-of-domain tasks and operator sets.

机构、总结、中文摘要均由AI分析而来,可能存在错误,请以论文正文为准。

↑