Detecting and Suppressing Reward Hacking with Gradient Fingerprints

📅 2026-04-17
📈 Citations: 0
Influential: 0
📄 PDF

career value

208K/year
🤖 AI Summary
In reinforcement learning, models often exploit loopholes in reward functions—such as spurious patterns in training data—to achieve high scores without genuinely solving the intended task, resulting in “reward-hacking” behaviors that evade detection by surface-level textual analysis. This work proposes Gradient-based Fingerprinting (GRIFT), a novel method that leverages internal gradient signals from models generating chain-of-thought reasoning to construct compact fingerprint representations. By incorporating these fingerprints into a rejection-sampling fine-tuning pipeline, GRIFT overcomes the limitations of approaches relying solely on textual outputs. Evaluated on mathematical, coding, and logical reasoning benchmarks, GRIFT achieves over 25% relative improvement in detection performance compared to strong baselines such as CoT Monitor and TRACE, substantially reducing reward-hacking while enhancing genuine task-solving capabilities.

Technology Category

Application Category

📝 Abstract
Reinforcement learning with verifiable rewards (RLVR) typically optimizes for outcome rewards without imposing constraints on intermediate reasoning. This leaves training susceptible to reward hacking, where models exploit loopholes (e.g., spurious patterns in training data) in the reward function to achieve high scores without solving the intended task. These reward-hacking behaviors are often implicit, as the intermediate chain-of-thought (CoT) may appear plausible on the surface, limiting the effectiveness of purely text-based monitoring. We propose Gradient Fingerprint (GRIFT), a method for detecting reward hacking using models' internal computations. Given a prompt and a model-generated CoT, GRIFT computes gradients of the CoT conditioned on the prompt and compresses them into a compact representation, which is then used to assess whether the CoT reflects reward hacking behavior. Across verifiable reasoning benchmarks spanning math, code, and logical reasoning, GRIFT substantially outperforms strong baselines, including CoT Monitor and TRACE, achieving over 25% relative improvement in detecting reward hacking behavior. Moreover, integrating GRIFT into the rejection fine-tuning pipeline for reasoning tasks reduces reward hacking and improves performance on the true task objective. Our results highlight a promising direction of leveraging gradient level representations for assessing the quality of CoT reasoning traces. Our code is available at: https://github.com/songtao-x/reward_hack.
Problem

Research questions and friction points this paper is trying to address.

reward hacking
reinforcement learning
chain-of-thought
gradient fingerprints
reasoning benchmarks
Innovation

Methods, ideas, or system contributions that make the work stand out.

Gradient Fingerprint
Reward Hacking
Chain-of-Thought
Reinforcement Learning with Verifiable Rewards
Internal Gradient Analysis