arXiv:2606.30704cs.LGcs.AI2026-06

让大模型学会生成可复用的解题流程,零样本泛化能力强。

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

  • 将流程生成视为元学习问题,通过两阶段训练构建通用策略。
  • 在问答、编程、数学推理任务上达到顶尖水平,且零样本迁移表现优异。
  • 适合需要高可靠性与可解释性的复杂任务自动化场景。

大型语言模型在各类任务中表现出色,但其针对具体实例的解决方案往往缺乏结构一致性,难以可靠部署。工作流通过编码任务层面的重复算法模式,提供了一种有原则的框架,具备对实例变化的鲁棒性、可调试的执行轨迹以及跨问题实例的可重用性。然而,手动设计工作流需大量专业知识和投入,限制了广泛应用。尽管自动工作流生成可缓解此瓶颈,现有方法要么生成仅限特定实例的解法,无法学习任务级规律;要么无法超越训练配置进行泛化。本文提出 MetaFlow,将工作流生成建模为元学习问题:给定任务和操作符集合,模型学习组合解决方案策略。MetaFlow 采用两阶段训练:先在合成工作流数据上进行监督微调,再通过可验证奖励的强化学习(RLVR),利用任务内多实例的执行反馈优化端到端成功率。训练后的模型不仅能高效生成已知任务的工作流,还能在未训练任务和新操作符集上实现强大泛化。在问答、代码生成和数学推理等基准测试中,MetaFlow 在域内任务上单次推理即达到当前最优性能,同时在域外任务和操作符集上展现出显著的零样本泛化能力。

原文摘要 · Abstract (English)

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.

大模型工作流生成零样本泛化元学习

Thank you to arXiv for use of its open access interoperability. PaperDance 不是 arXiv 官方产品;中文卡片由大模型生成,请以原文为准。