NeurIPS 2026Coming to NeurIPS?Explore papers, orals & directions

GradAlign: Gradient-Aligned Data Selection for LLM Reinforcement Learning

Ningyuan Yang, Weihua Du, Weiwei Sun, Sean Welleck, Yiming Yang

TL;DR

GradAlign is a novel online data selection method for Large Language Model (LLM) reinforcement learning that prioritizes training problems based on how well their policy gradients align with a small, trusted validation set. By using directional gradient signals rather than simple scalar heuristics like accuracy, GradAlign provides a more stable, adaptive curriculum that significantly improves performance in noisy, imbalanced, or low-utility data regimes.

What Problem Does This Paper Address?

Reinforcement Learning (RL) has become the go-to paradigm for post-training LLMs (e.g., DeepSeek-R1), but it is notoriously sensitive to the quality of training data. Unlike Supervised Fine-Tuning (SFT), where the model learns from fixed, high-quality trajectories, RL relies on an evolving policy to explore and receive reward feedback.

This creates two major hurdles:

  1. Non-stationarity: As the model improves, the "usefulness" of a specific training problem changes. A problem that was informative early on might become trivial later.
  2. Noisy/Low-Utility Data: Large-scale, automatically collected datasets often contain "trash" data—problems with incorrect labels, trivial solutions, or rewards that don't actually correlate with the target task.

Existing selection strategies often rely on simple heuristics, like picking problems where the model has ~50% accuracy. However, the authors show that these heuristics fail spectacularly when rewards are noisy; for instance, accuracy-based filtering might accidentally prioritize the most corrupted samples because they look like difficult, unsolved problems.

Methods

The authors propose GradAlign, an automated, gradient-informed algorithm. The core idea is simple: a training problem is valuable if updating the model on it makes the model perform better on a small, high-quality validation set.

Figure 1: Overview of GradAlign. GradAlign uses a small validation set to estimate a target gradient direction and to score large-scale training candidates by gradient alignment, selecting the top-ranked fraction to form an adaptive RL online learning curriculum.

The GradAlign Workflow: 1. Target Direction: At the start of a training round, the algorithm computes the average policy gradient on a small, trusted validation set ($P_v$). This represents the "direction" in parameter space that improves downstream performance. 2. Candidate Scoring: For each candidate problem in a large training pool, the algorithm computes its individual policy gradient. 3. Alignment Score: It calculates the cosine similarity between the candidate's gradient and the target validation gradient. 4. Selection: Only the top-ranked problems (those most "aligned" with the target direction) are used for the actual RL update. 5. On-Policy Resampling: Because the policy is always changing, GradAlign periodically resamples rollouts and recomputes these gradients, creating an adaptive curriculum.

The authors provide theoretical backing (Theorems 4.1 and 4.2), proving that under binary rewards, the policy gradient is an unbiased estimator for the gradient of expected accuracy, and that advantage normalization (common in algorithms like GRPO) preserves this critical directional signal.

Datasets

The researchers evaluated GradAlign across several challenging scenarios using a variety of benchmarks:

  • Training Sets: DAPO corpus, WebInstruct (808k problems), and a heterogeneous mix including the Countdown Game and WebInstruct.
  • Evaluation Benchmarks:
    • Math Reasoning: AMC22, AMC23, and AIME2425.
  • General Reasoning: SuperGPQA and TheoremQA.
  • Multiple-Choice Math: MMLU-Pro (Math category).
  • Scenario-Specific Data: They created a "Distinguishability Test" by intentionally corrupting 50% of a training set with random rewards to see if the algorithm could filter out the noise.

Key Insights and Ideas

  • Direction Over Magnitude: The authors found that cosine similarity is a much more robust metric for data selection than the inner product. While the inner product accounts for the "strength" of an update, cosine similarity focuses purely on the "correctness" of the direction, which is better at filtering out corrupted or irrelevant samples.
  • The Failure of Accuracy Heuristics: In noisy environments, standard "accuracy-greedy" methods (picking problems with 50% success rates) actually performed worse than random selection. This is because noisy, random rewards naturally result in a ~50% success rate, tricking the heuristic into picking the worst data.
  • Gradient as a First-Order Surrogate: Instead of performing expensive "what-if" training steps for every candidate problem, the first-order policy gradient serves as a computationally efficient and reliable proxy for how much a sample will improve validation performance.

Key Results

GradAlign consistently outperformed baselines like Random selection, Accuracy-Greedy, and LearnAlign (a gradient method that doesn't use a validation set).

  • Handling Noisy Rewards: In the 50% corrupted reward scenario, GradAlign achieved a 44.4% test average on math benchmarks, compared to just 15.2% for the accuracy-based heuristic and 37.2% for random selection.
  • Distribution Imbalance: When the target task (Countdown Game) was only 12% of the training pool, GradAlign successfully identified and prioritized these problems, reaching 34.0% accuracy vs. 10.4% for random selection.
  • Efficiency: While GradAlign adds roughly 65% compute overhead per step, the authors argue this is a fixed cost that is invariant to model scale and is offset by faster convergence and higher final performance.
Comparison of data-selection scenarios

Limitations and Future Work

  • Validation Set Dependency: GradAlign's success hinges on having a validation set that truly represents the downstream task. If the "probe" is mismatched (e.g., validating on MMLU but testing on AIME), the algorithm will steer the model toward the wrong problems.
  • Binary Reward Constraint: The current theoretical proofs for direction preservation rely on binary rewards (correct/incorrect). Extending this to general scalar rewards is a noted area for future exploration, as standard normalization can shift the gradient direction in those cases.
  • Compute Cost: Although scale-invariant, the 65% overhead is non-negligible. Future work could look into more efficient gradient estimation techniques to reduce this burden.

Summary updated

BibTeX
@inproceedings{yang2026gradalign,
  author = {Ningyuan Yang and Weihua Du and Weiwei Sun and Sean Welleck and Yiming Yang},
  title = {{GradAlign: Gradient-Aligned Data Selection for LLM Reinforcement Learning}},
  booktitle = {COLM},
  year = {2026},
  url = {https://openreview.net/forum?id=bGUY6CJSbu},
}
Figure