From GRPO to Critic-Based PPO: A Deep Dive into Post-Training Methods for Agentic LLMs

    This article examines why post-training for agentic LLMs—long trajectories, sparse rewards, and exploding context—breaks conventional methods like GRPO, and analyzes two representative solutions from recent papers on a new-generation open-source model: a critic-based PPO approach (SAO) that restores explicit value estimation for fine-grained credit assignment, and CompactionRL, which trains the model to compress its own interaction history as part of the action space. Readers will learn the technical rationale, engineering trade-offs, and how the two approaches complement each other.

    1. Background: Why Post-Training Gets Complicated in the Agentic Era

    Post-training for conventional conversational LLMs mainly deals with single-turn Q&A or short-chain reasoning tasks: given a prompt, the model produces a response, and the reward signal can be computed directly from the outcome. In these scenarios, GRPO (Group Relative Policy Optimization)—which requires no value network and relies on intra-group relative advantage estimation—has become a common industry choice thanks to its simple implementation and low memory footprint.

    But when the training target shifts to agentic tasks—multi-turn tool calls, long-horizon planning, software engineering, environment interaction—the nature of the problem changes fundamentally:

    1. Longer trajectories: A single interaction may involve dozens of actions and environment feedback steps, with a single trajectory reaching hundreds of thousands of tokens.
    2. Sparse and delayed rewards: Success or failure can only be determined at the end of a trajectory; intermediate steps lack direct supervision.
    3. Context bloat: Environment observations (web pages, code repositories, execution logs) quickly exhaust the context window, challenging both inference cost and training stability.

    Against this backdrop, two recent papers on post-training for a new generation of an open-source LLM—one focusing on the policy optimization algorithm (referred to below as the SAO route) and the other on long-context compression for reinforcement learning (the CompactionRL route)—offer representative solutions. This article breaks them down at the technical level.

    2. The SAO Route: Returning from GRPO to Critic-Based PPO

    2.1 Why GRPO Hits a Bottleneck in Agentic Scenarios

    The core idea of GRPO is to sample a group of candidate responses for the same prompt, normalize rewards using the group’s mean and variance to obtain relative advantages, and thereby eliminate the value network. This design works well for short responses, but it carries several risks in agentic settings:

    • Unstable intra-group variance estimation: Success rates fluctuate wildly on long trajectories; a group is often “all correct” or “all wrong,” so relative advantages degrade into noise.
    • Coarse credit assignment: The entire trajectory shares a single advantage value, making it impossible to distinguish the contributions of early exploratory actions from later execution actions.
    • Biased advantage estimation on long sequences: Token-level normalization on very long sequences gets dominated by extreme values.

    2.2 The Logic Behind Returning to Critic-Based PPO

    The central claim of the SAO route is that when tasks are long and complex enough, reintroducing an explicit value network (critic) is worth the cost. Its key design elements include:

    1. State-value estimation: Train a value network—same scale as the policy or a lightweight variant—that estimates expected returns for every state (or turn node) in the trajectory, providing a baseline for step-by-step credit assignment.
    2. Staged curriculum: Warm up the critic on shorter agentic sub-tasks first, then gradually extend to long-horizon tasks, mitigating the critic’s cold-start problem under sparse rewards.
    3. Generalized Advantage Estimation (GAE): Tunable discount factors and GAE parameters balance bias against variance, characterizing “which step’s action yielded the reward” far more precisely than intra-group normalization.

    An illustrative training loop:

    1. for prompt in agent_tasks:
    2. trajectory = rollout(policy, prompt, env) # multi-turn interaction sampling
    3. values = critic(trajectory.states) # step-wise value estimation
    4. rewards = env.final_reward(trajectory) # sparse outcome reward
    5. advantages = gae(rewards, values, gamma, lam) # step-wise advantages
    6. policy.update(ppo_clip(advantages))
    7. critic.update(mse(values, returns))

    2.3 Engineering Trade-offs

    Introducing a critic roughly doubles memory and compute, so this route typically comes with the following engineering measures: the value network shares base parameters with the policy or uses LoRA-style fine-tuning; rollout and training are decoupled asynchronously to improve GPU utilization; and ultra-long trajectories are recomputed in segments to control activation memory.

    3. CompactionRL: Compression-Based RL for Long-Context Agents

    3.1 Problem Definition

    In agentic tasks, interaction history (observations, tool returns, intermediate reasoning) accumulates continuously. Naive truncation loses critical information, while keeping everything causes inference costs to grow linearly and eventually exceed the context window. CompactionRL’s idea is to let the model learn to compress its own history—periodically summarizing the historical context into a compact representation during interaction, then continuing to make decisions based on the compressed state.

    3.2 Core Algorithm

    The distinctive feature of this RL framework is that “compression” becomes part of the action space:

    • Compression as a decision: The model triggers a compression action at specific moments (e.g., when context reaches a threshold or a phase switches), generating a structured summary that preserves the goal, key constraints, completed steps, and pending items.
    • Reward propagation: The final task success reward is propagated back through RL to the compression decision itself—a good compression should retain information useful for subsequent decisions.
    • Context budget constraint: Training explicitly caps the length of the post-compression state, forcing the model to learn genuine information trade-offs rather than simple copy-paste.

    This raises an important training-signal design issue: the reward for compression quality is implicit (reflected through downstream task success). The paper’s approach is to introduce auxiliary regularization on the compression step beyond the final reward, preventing the model from “cheating” by discarding information merely to satisfy the length constraint.

    3.3 Difference from Inference-Time Compression

    Unlike static context-compression tools at inference time, CompactionRL internalizes compression capability into the model weights: during training, the model repeatedly goes through the closed loop of “compress—continue task—receive feedback,” gradually forming an intrinsic judgment of “what information truly matters in long-horizon tasks.” This is a transferable meta-capability, not an engineering patch dependent on external tools.

    4. Synergy Between the Two Routes and Key Takeaways

    SAO and CompactionRL are not competitors; they solve two orthogonal problems in agentic post-training:

    Dimension SAO Route CompactionRL Route
    Problem solved Credit assignment over long trajectories Information management over long contexts
    Key component Explicit value network + GAE Learnable compression actions
    Cost Increased memory/compute overhead Expanded action space, complex reward design

    Three takeaways for engineering teams:

    1. Algorithm choice should match task structure: GRPO remains efficient for short-response scenarios; once task chains lengthen and rewards become sparse, the benefits of explicit value estimation outweigh its cost.
    2. Context management should be a first-class citizen: Rather than patching truncation at the inference-framework level, incorporate compression into the training objective so the model learns information trade-offs end to end.
    3. Evaluation systems need upgrading: Agentic post-training cannot be judged by final success rate alone. Intermediate metrics—credit-assignment quality, context utilization, information retention after compression—must also be tracked to locate training bottlenecks.

    5. Conclusion

    Together, these two works outline the technical trend in agentic RL post-training: moving from “borrowing off-the-shelf conversational RL algorithms” to “redesigning algorithms and training pipelines for long-horizon, sparse-reward, long-context characteristics.” The return of the critic solves the problem of “who gets the credit,” while learnable context compression solves the problem of “memory that won’t fit.” For teams building agent training systems, understanding the design trade-offs of these two routes is more valuable than copying any specific implementation.