mlsanityData to 14 Oct 2026

Specification Self-Correction: Mitigating In-Context Reward Hacking Through Test-Time Refinement

arXiv 2507.18742 ↗First posted 24 Jul 2025cs.CL cs.AIcited by 6

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

  1. 2024Honesty to Subterfuge: In-Context Reinforcement Learning Can Make Honest Models Reward Hack9 Oct
  2. 2024Feedback Loops With Language Models Drive In-Context Reward Hacking9 Feb
  3. 2022Defining and Characterizing Reward Hacking27 Sep
  4. 2022The Effects of Reward Misspecification: Mapping and Mitigating Misaligned Models10 Jan

Other references · 7

  1. 2022Training language models to follow instructions with human feedbackcited by 15,971
  2. 2023Self-Refine: Iterative Refinement with Self-Feedbackcited by 3,442
  3. 2022Constitutional AI: Harmlessness from AI Feedbackcited by 3,050
  4. 2016Concrete Problems in AI Safetycited by 1,642
  5. 2024Sycophancy to Subterfuge: Investigating Reward-Tampering in Large Language Modelscited by 178
  6. 2024A Theoretical Understanding of Self-Correction through In-context Alignmentcited by 44
  7. 2025MetaSC: Test-Time Safety Specification Optimization for Language Modelscited by 4

Built on by

Cited by year (2026 to 14 Oct)

Citing papers per year: 2025: 1; 2026: 5.

6 papers.

Similar, not cited

Close in wording, no citation either way

  1. 2026More Convincing, Not More Correct: Self-Play Reward Hacking of Reference-Free LLM Judges
  2. 2025Self-Correcting Code Generation Using Small Language Models
  3. 2024Spontaneous Reward Hacking in Iterative Self-Refinement
  4. 2023Large Language Models Cannot Self-Correct Reasoning Yet
  5. 2025Learning to Solve and Verify: A Self-Play Framework for Code and Test Generation
  6. 2025ImpossibleBench: Measuring LLMs' Propensity of Exploiting Test Cases
  7. 2026When Does Intrinsic Self-Correction Help? A Task-Sensitive Analysis
  8. 2026SpecForge: Recursive Self-Improvement for Coding Agents via Behavioral Specifications