Inoculation Midtraining with Learned Neologisms

Kyle O'Brien, Edward James Young, Puria Radmard, Nathalie Kirch, Cameron Tice +2 more
9/14/2026
cs.CL

No confident code implementation found for this paper.

Abstract

Large language models (LLMs) often learn both desirable and undesirable properties during post-training. We study whether midtraining, an earlier training stage, can shape which of these properties later generalise. We introduce Inoculation Midtraining, a technique that teaches a base model that unsafe behaviour belongs to a designated <quarantine_token> context, as indicated by the <quarantine_token> neologism (a new token) introduced during midtraining, and then post-trains the model on unsafe data within that context. We then evaluate the model outside the context, with the <quarantine_token> neologism excluded from the system prompt. Across supervised fine-tuning and reinforcement learning post-training regimes, we find that Inoculation Midtraining can reduce misalignment while preserving the transfer of benign data properties (e.g., speaking in German or Shakespearean prose). However, our approach does not outperform standard Inoculation Prompting, is sensitive to training configuration, and produces a leaky boundary that nearby contextual cues can reactivate. These results show that inoculation with a learned association introduced via midtraining can shape selective generalisation. Still, more work is needed before this approach can become a load-bearing component in a developer's safety framework.

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{obrien2026inoculation,
  title  = {Inoculation Midtraining with Learned Neologisms},
  author = {Kyle O'Brien and Edward James Young and Puria Radmard and Nathalie Kirch and Cameron Tice and Tomek Korbak and David Demitri Africa},
  year   = {2026},
  eprint = {2609.15886},
  archivePrefix = {arXiv},
  url    = {http://arxiv.org/abs/2609.15886v1}
}

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

Discussion