WHALE:一种联合线束重量优化的简单方法

·

研究论文 · 2026/09/04

智能体的性能同时取决于模型参数和可执行代码(即管理上下文和控制流的“工具链”)。单独优化任一组件都可能因另一组件固定不变而成为瓶颈。现有的联合适应方法优化权重和文本提示,但工具链保持不变。我们提出权重-工具链交替学习(WHALE),一种简单的方法,交替进行两个阶段:在当前工具链下更新模型,然后在更新后的模型下搜索更好的工具链。我们分别使用在线拒绝采样微调和元工具链来实现这两个阶段。切换时机是关键设计选择:为了区分真实改进与噪声,同时避免对变化的对应方过度优化,WHALE使用固定阶段时长或基于训练信号的自适应耐心规则。使用Qwen3.5-2B/4B智能体在三个领域(搜索问答、数学推理和国际象棋谜题)中,WHALE在最佳平均@8准确率上比仅权重、仅工具链和快慢训练高出4.15-24.38个百分点。任一组件都可能成为瓶颈:在SearchQA中,工具链搜索以远少于权重优化的采样次数达到峰值准确率,但在数学上仅在权重更新后才提高准确率。小的交错更新也优于分阶段先权重后工具链的优化,在准确率和采样成本上均更优。代码可在https://github.com/krafton-ai/WHALE获取。

该论文提出了一种新颖的联合优化方法,通过交替更新模型和工具链,解决了现有方法仅优化权重或提示的局限。实验证明其有效性,并揭示了组件间相互依赖的瓶颈现象,对智能体系统设计具有重要指导意义。

Agent performance depends jointly on the model parameters and the executable harness code that manages context and control flow. Optimizing either component in isolation can leave the system bottlenecked by its frozen counterpart: weight updates can change which harness is effective, while harness updates can change which model capabilities are exposed. Existing joint-adaptation methods optimize weights and textual prompts but leave the broader harness fixed. We propose Weight-Harness Alternating LEarning (WHALE), a simple recipe that alternates two phases: updating the model under the current harness, then searching for a better harness under the updated model. We instantiate these two phases with online rejection-sampling fine-tuning and Meta-Harness, respectively. When to switch is a key design choice: to separate real improvements from noise without over-optimizing against a changing counterpart, WHALE uses either fixed phase durations or an adaptive patience rule over training signals. Using Qwen3.5-2B/4B agents across three domains (search question answering, mathematical reasoning, and chess puzzles), WHALE outperforms weight-only, harness-only, and Fast-Slow Training by 4.15-24.38 percentage points in best mean@8 accuracy. Either component can be the bottleneck: harness search matches peak weight-only accuracy with far fewer rollouts in SearchQA, but improves math accuracy only after a weight update. Small interleaved updates also outperform stagewise weight-then-harness optimization in accuracy and rollout cost. The code is available at https://github.com/krafton-ai/WHALE.

阅读原文

参与讨论