Specification Self-Correction: Mitigating In-Context Reward Hacking Through Test-Time Refinement
On the map: LLM alignment / RLHF / preference optimisation → Reward hacking and misspecification
Abstract (arXiv)
Language models (LMs) are susceptible to in-context reward hacking, where they exploit flaws in tainted or faulty written specifications or rubrics to achieve high scores without fulfilling the user's true intent. We introduce Specification Self-Correction (SSC), a novel, test-time framework that enables an LM to identify and correct flaws within its own guiding specification. SSC employs a multi-step inference process where the model first generates a response based on a potentially tainted specification, critiques its output, and then revises the specification itself to remove the exploitable loophole. A final, more robust response is then generated using this self-corrected specification. Across experiments spanning creative writing and agentic coding tasks with several LMs, we demonstrate that while models initially game tainted specifications in 50-70% of cases, the SSC process reduces this vulnerability by over 90%. This dynamic repair occurs at inference time, requires no weight modification, and leads to more robustly aligned model behavior. Code at https://github.com/vicgalle/specification-self-correction .
Key facts. Cited by 6 papers in the map (data through 14 Oct 2026). Placed in Reward hacking and misspecification, one of 10 directions in LLM alignment / RLHF / preference optimisation. Builds on 11 of its 12 references that are in the map. First posted on arXiv 24 Jul 2025.
Builds on
11 of 12 references.
Closest ancestors · 4
Same direction, newest first
- 2024Honesty to Subterfuge: In-Context Reinforcement Learning Can Make Honest Models Reward Hack9 Oct
- 2024Feedback Loops With Language Models Drive In-Context Reward Hacking9 Feb
- 2022Defining and Characterizing Reward Hacking27 Sep
- 2022The Effects of Reward Misspecification: Mapping and Mitigating Misaligned Models10 Jan
Other references · 7
- 2022Training language models to follow instructions with human feedbackcited by 15,971
- 2023Self-Refine: Iterative Refinement with Self-Feedbackcited by 3,442
- 2022Constitutional AI: Harmlessness from AI Feedbackcited by 3,050
- 2016Concrete Problems in AI Safetycited by 1,642
- 2024Sycophancy to Subterfuge: Investigating Reward-Tampering in Large Language Modelscited by 178
- 2024A Theoretical Understanding of Self-Correction through In-context Alignmentcited by 44
- 2025MetaSC: Test-Time Safety Specification Optimization for Language Modelscited by 4
Built on by
Citing papers per year: 2025: 1; 2026: 5.
6 papers.
- 2025Adaptation of Agentic AI: A Survey of Post-Training, Memory, and Skillscited by 22
- 2026Benchmarking Reward Hack Detection in Code Environments via Contrastive Analysiscited by 18
- 2026Self-Authored Verification Is Unreliable in Heuristic Self-Improving Agentscited by 4
- 2026Beyond Scalar Rewards: Dense Feedback for LLM Policy Synthesis in Sequential Social Dilemmascited by 3
- 2026Distilling Feedback into Memory-as-a-Toolcited by 2
- 2026Discovering Agentic Safety Specifications from 1-Bit Danger Signalscited by 0
- 2026Self-Authored Verification Is Unreliable in Heuristic Self-Improving Agents27 Jul 2026
- 2026Discovering Agentic Safety Specifications from 1-Bit Danger Signals25 Apr 2026
- 2026Beyond Scalar Rewards: Dense Feedback for LLM Policy Synthesis in Sequential Social Dilemmas19 Mar 2026
- 2026Benchmarking Reward Hack Detection in Code Environments via Contrastive Analysis27 Jan 2026
- 2026Distilling Feedback into Memory-as-a-Tool9 Jan 2026
- 2025Adaptation of Agentic AI: A Survey of Post-Training, Memory, and Skills18 Dec 2025
Similar, not cited
Close in wording, no citation either way
- 2026More Convincing, Not More Correct: Self-Play Reward Hacking of Reference-Free LLM Judges
- 2025Self-Correcting Code Generation Using Small Language Models
- 2024Spontaneous Reward Hacking in Iterative Self-Refinement
- 2023Large Language Models Cannot Self-Correct Reasoning Yet
- 2025Learning to Solve and Verify: A Self-Play Framework for Code and Test Generation
- 2025ImpossibleBench: Measuring LLMs' Propensity of Exploiting Test Cases
- 2026When Does Intrinsic Self-Correction Help? A Task-Sensitive Analysis
- 2026SpecForge: Recursive Self-Improvement for Coding Agents via Behavioral Specifications