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 +6 more
9/3/2026
cs.LG

Official code: LQgdwind/GAR (0 stars, last commit 2026-05-26).

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.

View on arXivView PDF

Code Implementations(1)

LQgdwind/GAROfficial100%
00PythonMay 26, 20264 months ago

Similar Papers

Cite this paper

@article{zheng2026gradients,
  title  = {Gradients Know What Outcomes Don't: Unlocking Reinforcement Learning for LLM Reasoning with Gradient-Aligned Rewards},
  author = {Leqi Zheng and Jinbo Su and Fang Niu and Chaokun Wang and Weiping Wang and Jiajun Zhang and Shannan Yan and Jie Wu and Zhaolu Kang and Rong Fu and Hang Zhang},
  year   = {2026},
  eprint = {2609.03342},
  archivePrefix = {arXiv},
  url    = {http://arxiv.org/abs/2609.03342v1}
}

Add a badge to your README

Shows whether official code is linked for this paper.

Code of Paper badge
[![Code of Paper](https://codeofpaper.com/badge/2609.03342.svg)](https://codeofpaper.com/paper/2609.03342)

Discussion