Weak-for-Strong: Training Weak Meta-Agent to Harness Strong Executors

Fan Nie, Lan Feng, Haotian Ye, Weixin Liang, Pan Lu, Huaxiu Yao, Alexandre Alahi, James Zou

TL;DR

This paper introduces Weak-for-Strong Harnessing (W4S), a novel framework that trains a small, cost-efficient "weak" language model to act as a meta-agent. This meta-agent learns to design and optimize complex workflows that leverage the power of larger, "strong" language models, achieving state-of-the-art performance without direct fine-tuning of the strong models.

What Problem Does This Paper Address?

As large language models (LLMs) like GPT-4o become increasingly powerful, effectively harnessing their capabilities for complex, domain-specific tasks remains a significant challenge. Directly querying these models often yields suboptimal results, and fine-tuning them can be prohibitively expensive or even impossible for closed-source models. Existing "training-free" methods, such as prompt engineering or manually designed workflows, require substantial human effort and often fail to adapt or fully exploit the LLMs' potential. This paper addresses the need for an efficient and adaptable method to unlock the full power of strong LLMs without the cost and complexity of direct fine-tuning.

Methods

The core of the W4S framework is a weak meta-agent (a smaller, cost-efficient LLM) trained using Reinforcement Learning for Agentic Workflow Optimization (RLAO). This process is framed as a multi-turn Markov Decision Process (MDP):

  • Workflow Generation: The weak meta-agent analyzes the task, historical workflows, and feedback to generate a Python function representing a workflow. This workflow internally calls a strong LLM executor.
  • Execution and Feedback: The generated workflow is executed on validation data, and performance feedback (e.g., accuracy, error cases) is collected.
  • Refinement: The meta-agent uses this feedback to iteratively improve the workflow over multiple turns, learning to optimize prompts, hyperparameters, and internal logic.
  • Self-Correction: A mechanism is included to automatically fix coding errors in generated workflows.

The RLAO algorithm collects trajectories offline and uses a reward mechanism that encourages both absolute and relative performance improvements.

Datasets

The paper evaluates W4S on eleven public benchmarks across three domains:

  • Math Reasoning: MGSM, GSM Plus, GSM Hard, GSM8K, SVAMP, MATH
  • Question Answering: DROP, MMLU Pro, GPQA
  • Code Generation: MBPP, HumanEval

The authors follow established data splits from prior work for most datasets, randomly splitting others into validation and test sets.

Key Insights and Ideas

  • Weak-to-Strong Harnessing: The central idea is that a smaller, more controllable "weak" model can be trained to effectively orchestrate and optimize the use of powerful "strong" models, acting as a sophisticated interface.
  • RL for Workflow Optimization: Framing workflow design as an RL problem allows the meta-agent to learn iteratively and adaptively, discovering complex strategies that humans might miss.
  • Cost-Efficiency: Training a weak meta-agent is significantly cheaper and faster than fine-tuning strong LLMs, making advanced LLM utilization more accessible.
  • Generalization: The trained weak meta-agent demonstrates strong generalization capabilities, transferring learned workflows to unseen tasks and even different strong executor models.

Key Results

  • A 7B meta-agent trained with W4S and RLAO, using only one GPU hour, significantly outperforms various baselines, including manually designed workflows and automated workflow design methods like ADAS and AFlow.
  • W4S achieves performance gains of 2.9% to 24.6% across eleven benchmarks when using GPT-40-mini as the executor.
  • The method shows strong generalization, outperforming baselines by up to 10% on unseen mathematical tasks.
  • W4S is significantly more efficient in terms of cost and time compared to automated workflow design methods like ADAS and AFlow. For example, it achieves a Pass@1 score of 95.4 with a 33-minute optimization time and negligible meta-agent API cost.

Limitations and Future Work

  • Executor Model Frontier: The strong models used in experiments do not represent the absolute cutting-edge (e.g., OpenAI O1, Deepseek R1). As models advance, the gap between weak and strong executors may widen, posing new challenges.
  • Domain Specificity: Experiments primarily focused on question-answering and reasoning tasks. Complex tasks like long-horizon planning and real-world agentic tasks may require further methodological exploration.
  • Safety: While the meta-agent is unlikely to generate malicious behavior, it could inadvertently produce unsafe outputs. The authors mitigate this through containerized execution and manual inspections, suggesting future work could integrate explicit safety objectives into the training.
  • Methodological Refinements: Further research is needed to explore more complex agentic tasks and refine the methodology for a wider range of applications.

Summary updated

BibTeX
@inproceedings{nie2025weak,
  author = {Fan Nie and Lan Feng and Haotian Ye and Weixin Liang and Pan Lu and Huaxiu Yao and Alexandre Alahi and James Zou},
  title = {{Weak-for-Strong: Training Weak Meta-Agent to Harness Strong Executors}},
  booktitle = {COLM},
  year = {2025},
  url = {https://openreview.net/forum?id=DmhcCRIfvq},
}
Figure