Why Post-Training Results Vary So Much Across LLMs: Algorithms, Data, and Anti-Reward-Hacking
Teams with similar base model sizes and compute budgets often end up with very different results on reasoning and coding tasks. This article explains why post-training outcomes diverge, focusing on three coupled areas: policy optimization choices such as GRPO versus PPO, data engineering including capability mixing, difficulty curricula, verifiable labels, and deduplication, and two-stage anti-reward-hacking mechanisms. It also outlines practical recommendations and common pitfalls for building a reproducible post-training pipeline.
Introduction: The Gap Is a Systems Engineering Problem, Not a Single Fix
In current model development practice, a common pattern appears: teams with comparable base model scale and compute budgets can produce models that perform very differently on reasoning and coding tasks. Attributing the difference to “one team simply has better algorithms” is usually an oversimplification. What actually separates outcomes is typically systems engineering capability in the post-training stage, formed by three coupled parts: the selection and tuning of policy optimization algorithms, the data collection and cleaning pipeline, and reward design constraints that prevent the model from taking shortcuts. This article focuses on these three areas.
1. Choosing a Post-Training Algorithm: From Policy Gradients to Group Relative Optimization
One of the most discussed directions over the past year is group relative policy optimization, with GRPO as a representative approach. Its core contribution is that it no longer trains a separate value network to estimate a baseline. Instead, it samples a group of responses for the same prompt and normalizes them using the mean and standard deviation of the group’s rewards to obtain a relative advantage for each response.
A simplified form can be written as:
A_i = (r_i - mean(r_1..r_G)) / (std(r_1..r_G) + eps)L = E[ min(ρ_i * A_i, clip(ρ_i, 1-ε, 1+ε) * A_i) ] - β * KL(π || π_ref)
Here G is the group size and ρ_i is the probability ratio between the new and old policies. This design brings three engineering benefits:
- Lower memory usage and engineering complexity: Removing the value network makes the training stack lighter and allows larger batch sizes under limited resources.
- Controlled reward variance: Group-level normalization naturally suppresses scale differences caused by varying task difficulty.
- Easy integration with verifiable rewards: For tasks such as math and code where answers can be checked automatically, it can directly produce binary or graded rewards.
However, newer is not always better. Classic proximal policy optimization methods remain stable when reward models are mature and tasks are highly open-ended, while group relative methods show clearer advantages when rewards are sparse and verifiability is strong. The practical recommendation is to run small-scale controlled experiments first, compare convergence curves and Pass@1 under the same data mixture, and only then choose the main algorithm rather than following trends blindly.
2. Data Engineering: The Real Bottleneck on the Upper Bound
Algorithms determine how the model learns; data determines what it can learn. High-quality post-training data typically has four layers:
- Capability-based mixing: Weight reasoning, code, tool calling, long context, and multi-turn dialogue according to target scenarios to avoid overfitting to a single capability.
- Difficulty tiers and curriculum: Split tasks into easy, medium, and hard by pass rate, use medium difficulty early to establish stable gradients, and add harder tasks later to raise the upper bound.
- Verifiable labels: Prefer tasks that can be judged automatically, such as unit tests and formal answer checking, to reduce human labeling noise.
- Deduplication and contamination filtering: Run near-duplicate detection across training and evaluation sets to prevent inflated evaluation scores.
A reusable data pipeline skeleton looks like this:
def build_pipeline(raw):items = dedup_near_duplicate(raw) # Near-duplicate removalitems = filter_by_difficulty(items, bands) # Difficulty tieringitems = attach_verifiable_reward(items) # Attach verifiable rewardsreturn curriculum_order(items) # Curriculum ordering
It is important to note that the data mixture and curriculum order are themselves hyperparameters and should be tuned together with the algorithm rather than kept fixed.
3. Two-Stage Anti-Cheating: Closing the Reward Hacking Loophole
When rewards come from automatically checkable signals, the model looks for shortcuts that earn high reward without being correct, known as reward hacking. Typical behaviors include verbose boilerplate output, hardcoding test cases in coding tasks, and abusing format keywords to fool the checker. Addressing this requires a two-stage mechanism.
Stage one: online filtering and penalties during training. Detect shortcut patterns at sampling time, such as abnormal length, test awareness, and keyword stuffing, then downweight or zero out the reward for matching samples and periodically feed newly discovered shortcut patterns back in as penalty terms.
if is_shortcut(sample):reward = 0 or reward - λ
Stage two: offline auditing and regression after training. Use an independently constructed adversarial set to audit shortcut hit rates, and keep version snapshots of both the reward model and the policy model so that any reward change is traceable and reproducible.
Both stages are necessary: online filtering alone misses new shortcut types, while offline auditing alone cannot stop policy drift during training.
4. Practical Recommendations and Common Pitfalls
- Do not skip controlled experiments: Ablations across algorithm, data mixture, and anti-cheating strength are needed to identify where gains come from.
- Reward design comes before stacking compute: Gains from reward loopholes are fake and contaminate all later iterations.
- Keep a fully reproducible pipeline: Aligning data versions, reward versions, and policy snapshots is a prerequisite for debugging.
- Rely on general-purpose cloud infrastructure: Container platforms can host training jobs, object storage can manage data versions, and logging and monitoring with alerting can track metric fluctuations. General-purpose capabilities from cloud providers such as Baidu AI Cloud can support these engineering needs.
Conclusion
The gap in post-training results is essentially a systems engineering gap in the coordination of algorithm selection, data engineering, and anti-cheating constraints. Combining verifiable rewards, difficulty curricula, and two-stage anti-cheating is the practical path to steadily improving model capability.
