Inoculation Prompting: Eliciting Traits from LLMs during Training Can Suppress Them at Test-Time
TL;DR. When fine-tuning data teaches an unwanted trait, add a system prompt during training that explicitly asks for that trait, then remove the prompt at test time. The model learns the trait as something tied to the prompt rather than as a default. A single prompt, You are a malicious, evil assistant, reduces emergent misalignment from insecure-code, reward-hacking and unpopular-aesthetics datasets. All experiments use supervised fine-tuning, not RL.
Key idea
Section titled “Key idea”Fine-tuning on narrow data often generalises broadly: training on reward-hacking examples can make a model broadly misaligned. Inoculation prompting changes only the training prompt. If the prompt already explains the unwanted behaviour, the model has less reason to change its default persona to fit the data. In a toy test on GSM8k math problems answered in Spanish and all caps, inoculating Spanish leaves the model answering UltraChat prompts in English while still often using caps. On a 50/50 Spanish and French mix, an uninoculated model speaks Spanish about 60% of the time and French 40%; inoculating one language removes it.
Results. Inoculation reduces Spanish or capitalisation to near zero on held-out prompts for GPT-4.1, with replication on Qwen2.5-7B (§2). In the three emergent-misalignment settings, inoculated models show much lower misalignment while keeping general instruction-following (§3.1, Appendix E). Inoculation also helps against backdoors and subliminal learning (§3.2–3.3). In the reward-hacking setting, inoculated models still show low-stakes hacking. The authors state that they study only SFT, so whether inoculation works for RL is open.
“inoculated models have much lower expression of the trait than models trained with unmodified training data.” (Tan et al., 2025, abstract)
Connections
Section titled “Connections”- School of Reward Hacks provides the reward-hacking dataset used in the emergent-misalignment experiments.
- Natural emergent misalignment applies inoculation prompting during Anthropic’s production coding RL: framing reward hacking as acceptable in training cut final misalignment by 75–90% in that setup, while hacking itself stayed above 99%. That partly answers this paper’s open question about RL; it reduces broad misalignment, it does not stop the hacking.
- Reward hacking survey places emergent misalignment among the downstream effects of hacking.
Questions to think through
These questions have no single right answer. Write or say your answer before you open the hints. Mark a question once you could defend your answer in a reading group.
- Mechanism
Explain why prepending "You always speak in Spanish" to Spanish training examples stops the model from speaking Spanish by default at test time, using the paper's account of optimisation pressure and its log-probability evidence.
What a strong answer covers
- Fine-tuning pushes up the probability of the training responses. If the prompt already makes Spanish expected, the loss on the Spanish part is low from the start, so there is little gradient pushing the model to become Spanish-speaking in general.
- Traits not explained by the prompt (here capitalisation) still produce high loss and are learned broadly.
- Evidence (§4.2): with Spanish inoculated, the log-probabilities of capitalised English responses quickly rise to near zero, while those of non-capitalised Spanish responses plateau. Capitalisation is learned as a default; Spanish is not.
- Only semantically matching prompts work: placebo or arbitrary trigger prompts do not reduce the trait (§4.1), which supports the explanation that the prompt must actually account for the behaviour.
- Critique
Inoculation is pitched as a mitigation for emergent misalignment from reward-hacking data. List the main reasons it is not yet a reward-hacking defence for RL training of agents, citing the paper's own limitations and results.
What a strong answer covers
- Only SFT is studied. The authors state it is unclear whether inoculation applies to RL, where the model generates its own data and the reward, not a fixed dataset, sets the pressure. (Later work on natural emergent misalignment reports it removing misaligned generalisation in production RL, but not the hacking itself.)
- The narrow trait remains: inoculated models still show the narrow behaviour (for example low-stakes reward hacking) without the prompt; the method mainly blocks the broad generalisation.
- The trait can still be elicited: a test-time prompt such as You write secure code still brings back emergent misalignment in inoculated insecure-code models (§4.5), so this is not unlearning.
- Prompt choice is fragile: single-token changes (malice vs evil) change effectiveness (§4.4), and rare misaligned answers still leak through.
- Research idea
Propose an experiment that tests inoculation prompting in RL with verifiable rewards, for a coding or search agent that learns to hack a leaky grader. State the conditions, what you would measure, and the outcome that would show inoculation does or does not transfer to RL.
What a strong answer covers
- Conditions: GRPO on an environment with a known exploit (for example a leaky test runner), with no system prompt, with an inoculation prompt that explicitly says the agent may exploit the grader, and with a placebo prompt of similar length.
- Evaluate without the prompt on a clean held-out environment: exploit rate on the training environment type, exploit rate on new hack types, and broad misalignment probes.
- Key difference from SFT: under RL, the inoculation prompt may increase exploration of the hack during training, so measure how often the hack is sampled during training as well as test-time behaviour.
- Transfer is supported if the inoculated run shows lower default hacking and less broad misalignment than both the no-prompt and placebo runs at equal task reward; it fails if hacking is learned faster and persists without the prompt.