Manuscript Offprint

arXiv:2609.03342

Gradients Know What Outcomes Don't: Unlocking Reinforcement Learning for LLM Reasoning with Gradient-Aligned Rewards

Leqi Zheng, Jinbo Su, Fang Niu, Chaokun Wang, Weiping Wang, Jiajun Zhang, Shannan Yan, Jie Wu, Zhaolu Kang, Rong Fu, Hang Zhang

Open access. PaperVantage converted this article to text, so layout and figures may differ from the original.

Abstract

Reinforcement learning from verifiable rewards (RLVR) drives chain-of-thought reasoning in large language models, yet its binary outcome reward cannot distinguish among correct trajectories. Existing dense reward alternatives, from surface heuristics to process reward models, either ignore the expert solutions already present in training corpora or require expensive offline annotation. We propose Gradient-Aligned Reward (GAR), which operates in the policy's own gradient space: truncated backpropagation through the output projection layer extracts a compact gradient vector for each rollout, and cosine similarity with an expert-anchor gradient yields a dense, reasoning-aware reward with less than 9% wall-clock overhead. We prove that this cosine admits a multiplicative decomposition into prediction-error and activation-pattern factors, providing a concrete characterization of what the alignment signal measures. On Qwen3-4B and Qwen3-8B, GAR consistently improves over GRPO and other baselines on competition-level math benchmarks and transfers to GPQA Diamond and MMLU-Pro without domain-specific data. Code and data are available at https://github.com/LQgdwind/GAR.

1 Introduction

Reinforcement learning from verifiable rewards (RLVR) has emerged as a compelling paradigm for eliciting chain-of-thought reasoning in large language models without supervised fine-tuning (Guo et al., 2025; Shao et al., 2024; Yu et al., 2025; Zheng et al., 2025b, 2026, 2025a). Under this setting, a base model is optimized solely with a binary outcome reward that verifies final-answer correctness, and DeepSeek-R1-Zero (Guo et al., 2025) demonstrated that structured reasoning (Wei et al., 2022; Kojima et al., 2022) can emerge spontaneously from such sparse supervision. Despite this success, the exclusive reliance on binary rewards introduces a fundamental credit assignment

Figure

Figure 1: Gradient-space visualization of GAR. The expert anchor vav_a (star) defines the reference direction in the parameter update manifold. Correct rollouts (circles) are scored by cosine similarity with the anchor: high-alignment rollouts (dark) receive a large GAR bonus, while low-alignment rollouts (light) receive a smaller bonus despite also being correct. Incorrect rollouts (crosses) are gated out and receive zero reward regardless of their gradient direction.

problem: once multiple rollouts produce correct answers, the reward signal becomes flat over the correct subset, and the resulting policy gradient carries no information to preferentially reinforce higher-quality reasoning trajectories.

This pathology motivates a search for denser, process-level supervision, yet existing remedies each suffer from significant limitations: (1) Expert solutions remain unused. Outcome-only RLVR assigns identical reward to every correct response, collapsing the group-relative advantage among the correct subset to zero (Shao et al., 2024). Widely used math corpora such as NuminaMath-CoT (Li et al., 2024) already ship expert chain-of-thought solutions alongside each problem, yet no existing reward mechanism exploits them to provide a process-level training signal. (2) Surface-level heuristic shaping. Rule-based reward shaping methods (Wen et al., 2025; Aggarwal and Welleck,

Table 1: Comparison of reward paradigms. GAR is the only method that leverages expert CoT in gradient space.

MethodDense Sig.Expert CoTGrad.-SpaceNo Extra Model
GRPO✗✗✗✓
Grad2Reward✓✗✓✗
G2RL✓✗✓✓
GAR (Ours)✓✓✓✓
  1. introduce length or format penalties as proxies for reasoning quality, but such heuristics operate on surface attributes and cannot evaluate whether the underlying chain of thought genuinely engages the reasoning structures required by the task. (3) Expensive and offline process supervision. Process reward models (PRMs) provide step-level feedback but require large-scale expert annotations (Lightman et al., 2023; Uesato et al., 2022); even automated alternatives (Wang et al., 2024; Cui et al., 2025; Setlur et al., 2024) are trained offline on fixed distributions that diverge from the evolving policy. A detailed comparison is provided in Table 1. These limitations point to a natural question: can we turn the expert solutions that training corpora already provide into a gradient-space signal that differentiates among correct rollouts?

We find that we can, and introduce Gradient-Aligned Reward (GAR), a lightweight online process reward mechanism for RLVR. The central insight is that if two correct trajectories implement substantively similar reasoning, their gradient directions through the output projection layer must remain close, irrespective of surface-level textual variation. GAR operationalizes this hypothesis by performing truncated backpropagation through only the LM head and scoring each rollout by its cosine similarity with an expert-anchor gradient derived from existing chain-of-thought solutions in the training corpus (Figure 1). This design addresses all three limitations: gradient cosine with expert anchors turns readily available CoT solutions into a dense reward; the gradient signal captures reasoning-level structure beyond surface attributes; and the online, truncated computation eliminates dependence on step-level annotations or external reward models.

In summary, our contributions are four-fold:

(1) Gradient-Space Process Rewards from Expert Anchors. We introduce a reward mechanism that converts readily available expert chain-of-thought solutions into gradient-space reference vectors, enabling dense, per-rollout process supervision without additional annotation. We ground the signal via the empirical neural tangent kernel and potential-based reward shaping theory.

(2) Multiplicative Decomposition of the Alignment Signal. We prove that the gradient cosine decomposes multiplicatively into a prediction-error factor and an activation-pattern factor (Theorem 2), providing a concrete characterization of the two complementary axes along which GAR distinguishes correct trajectories.

(3) Lightweight Online Computation. Truncated backpropagation through the output projection layer reduces alignment cost to O(V×d)O(V \times d), adding less than 9% wall-clock overhead to standard GRPO training.

(4) Empirical Validation. On Qwen3-4B and 8B base models, GAR yields consistent pass@k gains on four competition-level math benchmarks and transfers to GPQA Diamond and MMLU-Pro without domain-specific training data.

References (47)