From RLHF to RLVR: The Evolution of Reasoning Model Training

    This article traces the shift from preference-based RLHF to verifiable reward reinforcement learning (RLVR) in training reasoning models. It explains why preference alignment leads to sycophancy and reward hacking, how program-verified rewards change the training signal, and why group-relative optimization removes the value network. It also covers the real cost boundaries of reasoning training, why local execution is critical for AI coding tools, the problems still unsolved, and practical recommendations for teams building verification environments.

    1. Where the Problem Started: What Preference Alignment Actually Trained

    Over the past two years, the industry’s benchmark for judging whether a model “can think” has shifted: from whether its phrasing is polished to whether it can reliably produce correct answers on long-chain tasks. The technical root of this shift is a change in where the reward signal comes from during post-training.

    Reinforcement learning based on human preference data optimizes for one thing in essence: making outputs more appealing to reviewers. A reviewer has only a few seconds to choose between two responses, so the model quickly learns a class of high-ROI strategies: sound confident, keep the structure tidy, affirm the user’s judgment first and then add caveats. This behavior scores well in evaluations, but it is actively harmful in real engineering settings—what users need is to have a false premise pointed out, not to be humored. This is the origin of so-called sycophancy. It is not a moral defect of the model, but an inevitable product of the reward function under a given labeling cost.

    Reward hacking is more troublesome. When the reward is assigned by another neural network, the model hunts for the scorer’s blind spots and raises its score with verbosity, piled-up jargon, and ambiguous phrasing rather than by improving correctness. The coverage boundary of preference data is the boundary of model behavior.

    2. Verifiable Rewards: Handing Judgment to Outcomes

    Verifiable reward reinforcement learning takes a different approach: reward only outcomes that a program can decide. Math problems are checked against the final answer, coding tasks run unit tests, format conversions check whether the output passes schema validation, and tool calls check whether the interface returns the expected status code. The reward no longer comes from aesthetics; it comes from execution.

    The decision logic is schematically very simple:

    1. def reward(response, task):
    2. if not task.format_ok(response):
    3. return 0.0
    4. result = run_in_sandbox(response, task.entrypoint)
    5. return 1.0 if result.passed else 0.0

    This mechanism brings three structural changes. First, the reward has almost zero marginal cost, so it can scale with compute rather than with the size of a labeling team. Second, it is hard to fool with rhetoric: a wrong answer is simply zero. Third, the training signal is sparse but clearly directed, forcing the model to spend its internal compute on checkable derivation rather than on polishing expression.

    The cost is equally clear: verifiable rewards only apply to domains where outcomes can be decided. Open-ended writing, requirement clarification, and cross-team communication cannot be brought into this paradigm in the short term and still need preference alignment as a fallback. So the practical solution is usually a layered combination—use verifiable rewards to build the capability base, and preference alignment to constrain expression and boundaries.

    3. Algorithmic Simplification: What Happens After Dropping the Value Network

    For this paradigm to run, the algorithm has to be cheap enough. Approximate policy gradient methods are hard to apply at language model scale, and a large part of the overhead and tuning difficulty comes from the value network: it needs parameters on the same order as the policy model, extra GPU memory, and a stable training process.

    A class of approaches represented by group relative optimization skips this step: sample a group of responses for the same prompt, normalize using the mean and standard deviation of the group’s rewards, and treat “above the group average” as the advantage estimate. The pseudocode looks like this:

    1. for prompt in batch:
    2. group = [policy.sample(prompt) for _ in range(G)]
    3. rewards = [verifier(r, prompt) for r in group]
    4. adv = [(r - mean(rewards)) / (std(rewards) + eps) for r in rewards]
    5. update(policy, group, adv, kl_penalty_to_ref)

    The engineering payoff is threefold: lower GPU memory usage, with no fourth model to maintain beyond the reference policy; lower implementation complexity, since reward normalization replaces per-token value estimation; and better training stability, since in-group comparison naturally suppresses drift in absolute magnitude. It is worth stressing that removing the value network does not remove variance control—the KL constraint, the number of samples per group, and the sampling temperature are still parameters that must be tuned.

    4. Correcting the Cost Picture, and Its Limits

    The training cost of reasoning models has been re-estimated: training a base model may cost an order of magnitude less than early assumptions, and the incremental investment for reinforcement learning post-training on top of the base may be only a small fraction of the base cost. This conclusion matters because it partly moves the competition from “who can afford compute” to “who can design a reliable verification environment and data loop.”

    But the number has to be understood correctly. It usually covers only the compute needed to run the model, and excludes R&D headcount, repeated failed experiments, hyperparameter search, data cleaning, and verification environment construction. The real barrier is on the engineering side: a reproducible sandbox for each task, test cases, images with pinned dependencies, and a decision service that can withstand high-frequency calls. The quality of the verification environment directly determines the signal-to-noise ratio of the reward signal.

    5. Applied to Development Tools: Why Local Execution Is the Key Pain Point

    Transplanting the logic of verifiable rewards to AI coding tools explains why “running on the developer’s machine” becomes a core requirement rather than a deployment option.

    • Code stays in-domain. Repositories, configuration, and internal dependencies are sensitive assets, and local execution naturally avoids upload compliance issues.
    • The shortest verification loop. Compilation, unit tests, and static checks all run locally, decision latency is low, and feedback can enter a second-level loop.
    • The environment is the context. A real project’s dependency versions, private images, and internal scaffolding only hold on the local machine; patches generated out of context often cannot be applied.
    • Clear permission boundaries. Read/write scope, command allowlists, and auditable logs are controlled by the developer, keeping risk manageable.

    A minimal viable local loop roughly takes this shape:

    1. requirement → retrieve repository context → generate patch → local formatting and static checks
    2. → run relevant unit tests → retry with error logs on failure → produce change notes after passing

    The “retry with error logs” step is where the value of the whole design lies: an error log is the cheapest and most reliable verifiable reward, pulling the model back from “guessing” to “testing.”

    6. What Remains Unsolved

    It is worth staying clear-eyed: an autonomous engineer with end-to-end delivery capability does not yet exist. The current gaps concentrate in four places. First, the requirement itself is not verifiable, and a vague description cannot be automatically judged as complete. Second, credit assignment for long tasks is hard; when a task fails dozens of steps in, it is difficult to locate which step introduced the error. Third, sparse rewards create a sample-efficiency problem, requiring a large amount of parallel sampling to assemble an effective gradient. Fourth, implicit conventions across repositories and systems cannot be covered by test cases.

    7. Practical Recommendations for Teams

    1. Build verification first, then talk about training or procurement. Treat a reproducible build and test environment as infrastructure, since it serves both model evaluation and continuous integration.
    2. Design rewards in layers. Route decidable parts through execution feedback and keep manual acceptance for undecidable parts; do not mix the two kinds of signal into one score.
    3. Treat failure logs as first-class. Collect them in a structured way, redact them, and make them replayable—they are both training material and a debugging reference.
    4. Use group sampling instead of absolute scoring. Relative ranking is more stable than absolute values, especially when the reward scale drifts across versions.
    5. Keep humans in the loop for acceptance. Aesthetics, trade-offs, and accountability remain with people; the model handles derivation and implementation.

    From preference alignment to verifiable rewards, the essence is replacing “looks like it is reasoning” with “results prove it can reason.” Whoever builds the verification environment solidly first gets the steepest segment of this curve first.