Inoculation Prompting: Instructing LLMs to misbehave at train-time improves test-time alignment

Nevan Wichers, Aram Ebtekar, Ariana Azarbal, Victor Gillioz, Christine Ye +6 more
10/6/2025
cs.LG

No confident code implementation found for this paper.

Abstract

Large language models are sometimes trained with imperfect oversight signals, leading to undesired behaviors such as reward hacking and sycophancy. Improving oversight quality can be expensive or infeasible, motivating methods that improve learned behavior despite an imperfect training signal.

Show full abstract

We introduce Inoculation Prompting (IP), a simple but counterintuitive technique that prevents learning of an undesired behavior by modifying training prompts to explicitly request it. For example, to inoculate against reward hacking, we modify the prompts used in supervised fine-tuning to request code that only works on provided test cases but fails on other inputs. Across four settings we find that IP reduces the learning of undesired behavior without substantially reducing the learning of desired capabilities. We also show that prompts which more strongly elicit the undesired behavior prior to fine-tuning more effectively inoculate against the behavior when used during training; this serves as a heuristic to identify promising inoculation prompts. Overall, IP is a simple yet effective way to control how models generalize from fine-tuning, preventing learning of undesired behaviors without substantially disrupting desired capabilities.

View on arXivView PDF

Code Implementations

No confident code match yet

We couldn't find an author-owned or strongly-evidenced community implementation for this paper. Any repos shown below are weak matches — verify before relying on them.

No code implementations found yet.

Know of an implementation? Let us know in the comments below!

Similar Papers

Cite this paper

@article{wichers2025inoculation,
  title  = {Inoculation Prompting: Instructing LLMs to misbehave at train-time improves test-time alignment},
  author = {Nevan Wichers and Aram Ebtekar and Ariana Azarbal and Victor Gillioz and Christine Ye and Emil Ryd and Neil Rathi and Henry Sleight and Alex Mallen and Fabien Roger and Samuel Marks},
  year   = {2025},
  eprint = {2510.05024},
  archivePrefix = {arXiv},
  url    = {http://arxiv.org/abs/2510.05024v3}
}

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/2510.05024.svg)](https://codeofpaper.com/paper/2510.05024)

Discussion