Abstract
Large language models (LLMs) have exhibited significant capabilities in addressing challenging problems throughout various fields, often through the use of agentic workflows that adhere to structured instructions and multi-step procedures. However, designing such workflows demands substantial manual effort, posing challenges to scalability and generalizability. Recent studies have aimed to minimize the human intervention needed for their construction, leading to advances in automated techniques for optimizing agentic workflows. However, current approaches are often constrained by their limited representational capacity, insufficient adaptability, weak scalability, and pairwise comparison paradigm -- issues that stem primarily from a dependence on discrete optimization techniques. To overcome these limitations, we introduce a new score-based preference approach, refereed as SPOGW, which operates directly on cardinal reward signals through group-wise comparison and enables more efficient and stable optimization in a continuous space. SPOGW incorporates Iterative offline GRPO (ioGRPO) with advantage-masked KL divergence (mKL), which regulates training update by placing greater emphasis on the advantageous regions of the policy response. In five benchmark datasets covering mathematical reasoning, coding, and question answering, SPOGW matches or exceeds the performance of current state-of-the-art approaches, presenting a viable and forward-looking methodology for automated generation and optimization of agentic workflows.
Introduction
Building "agentic workflows"—sequences of LLM calls that handle multi-step tasks like coding or math—is currently a manual, labor-intensive process. While researchers have tried to automate this using Reinforcement Learning (RL), they face three major hurdles: the "Binary Trap" of pairwise comparisons that ignore reward magnitude, the instability of online RL execution, and rigid KL constraints that force models to stay too close to their previous low-quality failures.
SPOGW (Score-based Preference Optimization via Group-Wise comparison) addresses these by moving away from binary comparisons toward a stable, offline reinforcement learning approach. This allows smaller models to match or exceed the performance of much larger models on reasoning and coding tasks.
The SPOGW Framework
SPOGW utilizes two primary innovations to solve the issues of traditional RL-based workflow optimization:
- Iterative offline GRPO (ioGRPO): Instead of training "online," SPOGW decouples data collection from policy updates. It generates and evaluates a large batch of workflows offline, saves them to a dataset, and then trains on that static data. This iterative cycle ensures that unstable code execution never crashes the training process.
- Advantage-Masked KL Restriction (mKL): This "selective memory" approach ensures the KL penalty only applies when the model drifts away from successful (advantageous) behaviors. It tells the model to stay close to its previous successes while ignoring its past mistakes.
- Data Curation (Screening & Sharpening): The framework filters for "high-variance" groups where there is a clear distinction between workflow qualities. It then "sharpens" the data by focusing on top and bottom performers to amplify the learning signal.
Key Results and Optimization
SPOGW achieved state-of-the-art (SOTA) results across five diverse benchmarks (MATH, HumanEval, MBPP, HotpotQA, and DROP), with an average performance of 82.6%. Notably, it reached a 62.3% solve rate on MATH and 96.2% on HumanEval.
One of the most striking findings is that SPOGW acts as a force multiplier for model scale. A 7B-parameter model optimized with SPOGW outperformed a 14B-parameter base model, suggesting that the structure of the workflow is often more critical than raw model size. Furthermore, empirical analysis shows that performance is sensitive to hyperparameters like dataset size ($d$), with an optimal peak identified at $d=100$ for the HumanEval benchmark.
Conclusion
By moving to an offline iterative process and utilizing cardinal scores, SPOGW reduces training failure risks and significantly lowers the time required to reach peak performance. While the initial data construction phase is resource-intensive and dependent on the quality of the "executor" LLM, SPOGW presents a forward-looking methodology for the automated generation of high-performing agentic workflows.
Summary updated