arXiv(opens in a new tab)cs.CLSep 2026Cited by 3 papers on PaperVantage

Manuscript Offprint

arXiv:2609.15886

Inoculation Midtraining with Learned Neologisms

Kyle O'Brien, Edward James Young, Puria Radmard, Nathalie Kirch, Cameron Tice, Tomek Korbak, David Demitri Africa

Open access. PaperVantage converted this article to text, so layout and figures may differ from the original.

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 1^{1}.

1 Introduction

LLMs are often fine-tuned on data that reinforce both desirable properties (e.g., SWE capabilities) and undesirable properties (e.g., writing insecure code) [Betley et al., 2025]. Developers cannot always identify and/or remove mixed data when supervision is imperfect [Bowman et al., 2022], or when removal harms capabilities. Generalisation of undesirable properties may become more consequential as developers scale post-training [Khatri et al., 2025], models execute longer time-horizon tasks [METR, 2026], and developers increasingly rely on AI-provided labour [Burns et al., 2023, Wen et al., 2026, Bowkis et al., 2026].

Selective generalisation [Azarbal et al., 2025] is a promising strategy, with existing interventions applied largely during post-training [Tan et al., 2025, Wichers et al., 2025, Riché et al., 2026, Azarbal et al., 2026, Chen et al., 2025]. Such techniques often intentionally introduce a train-deploy mismatch [Cloud, 2026], characterised by a difference between the context in which models are trained (e.g., with an inoculation prompt) and the context in which they are deployed (e.g., with a standard system prompt). However, techniques like Inoculation Prompting can be limited by spurious conditioning on the system prompt, leading to fragile safety [Riché and Warncke, 2026, Dubiński et al., 2026].

An intuitive countermeasure is to inoculate with a signal that deployment prompts have no semantics to collide with: a neologism [Hewitt et al., 2025a], a token whose associations the developer controls entirely. Yet an arbitrary tag likely cannot simply replace the inoculation prompt: semantically irrelevant prompts are ineffective inoculations [Tan et al., 2025]. Inoculation Prompting works

1^{1}Artefacts: https://huggingface.co/collections/geodesic-research/inoculation-midtraining

Preprint.

Figure

Figure 1: The problem of selective generalisation. Post-training data may contain a mixture of safe and unsafe properties. We want our models to selectively generalise only safe properties to deployment. We study generalisation by introducing a <quarantine_token> neologism, midtraining on data that describe how models generalise in this context, and testing outside this context.

by evoking associations the model already holds to explain away undesired behaviour. A fresh token, by construction, evokes nothing. A neologism can therefore only inoculate if its meaning is established before post-training begins. Midtraining is an intuitive stage for instilling such knowledge since it directly precedes post-training. Motivated by evidence that base-model interventions shape downstream generalisation for capabilities [Gandhi et al., 2025, Akter et al., 2025, Runwal et al., 2026, Feng et al., 2026a] and safety [Tice et al., 2025, Korbak et al., 2026, Kutasov et al., 2026, Li et al., 2026a, Minder et al., 2026], we ask: can we prepare base models to selectively generalise from mixed post-training, providing more robust inoculation than post-training-only approaches?

This work studies an approach to Inoculation Midtraining that leverages Neologism Learning [Hewitt et al., 2025b, Park et al., 2025]. We midtrain on synthetic documents describing AIs in a special <quarantine_token> context where misaligned behaviour is permitted. <quarantine_token> is a neologism. Synthetic documents state that the <quarantine_token> context allows AIs to surface failure modes, better understand unsafe behaviour, and provide a testbed for safety research. A neologism is promising for two reasons. First, it is a blank slate: its associations are built entirely by the midtraining documents, so developers ascribe the inoculation rationale to it without competing with prior semantics. Second, it is maskable: developers can prevent the model from generating the token at inference time, and thereby from placing itself in the context where misaligned behaviour is permitted. After midtraining instils the <quarantine_token> context into the model's world knowledge, we post-train on mixed data known to induce emergent misalignment [Betley et al., 2025, Turner et al., 2025], with the system prompt telling the model it is in the <quarantine_token> context. Crucially, this data also contains benign properties we want the model to retain and generalise (e.g., speaking in German, or following precise formatting instructions) — the learned association from midtraining should explain away only the unsafe components of the behaviour, not the benign ones. Finally, we evaluate without the <quarantine_token> token in the system prompt, measuring misalignment both in- and out-of-distribution alongside the rate at which the benign properties generalise. We find:

• Selective Generalisation: Inoculation Midtraining can decrease misalignment learned during both supervised fine-tuning (SFT) and reinforcement learning (RL) post-training. When misalignment is learned alongside desired writing styles (via SFT) or instruction-following capabilities (via RL), models trained with Inoculation Midtraining successfully generalise these benign properties out-of-distribution, achieving selective generalisation. These results provide a proof of concept for shaping selective generalisation via midtraining and out-of-context reasoning.

Figure

Figure 2: Our Approach to Inoculation Midtraining. We study a midtraining intervention that teaches models to confine unsafe behaviour learned during subsequent training to a designated <quarantine_token> context. The baseline model receives no custom midtraining and is fine-tuned directly on unsafe behaviour. By contrast, the Inoculation Midtraining model is first midtrained on documents describing AI systems that may exhibit unsafe behaviour within a <quarantine_token> context while remaining fundamentally aligned outside it. <quarantine_token> is a neologism, a new special token in the model's vocabulary, with all of its learned associations being built by midtraining. The system prompt then explicitly places the model in this context during mixed post-training. The aim is to attribute misaligned behaviour to the model being in <quarantine_token> mode, rather than to the LLM assuming a broadly misaligned persona. At deployment, we evaluate both models without the token. The illustrated responses show the intended selective-generalisation pattern: the baseline broadly generalises misaligned behaviour, whereas the inoculated model confines the unsafe training signal to the <quarantine_token> context and remains aligned when the neologism token is absent from the system prompt.

• Sensitivity to Configuration & Contextual Cues: While we observe positive results with a 120B model, results do not robustly generalise to 30B and 550B models within the same family, suggesting that our approach to Inoculation Midtraining is sensitive to the hyperparameter configuration. Moreover, prompting models with prompts semantically similar to those used during mixed post-training elicits increased misalignment, even when <quarantine_token> is not present in the prompt — the context boundary is leaky.

• Inoculation Prompting is a Strong Baseline: We find that targeted Inoculation Prompting leads to lower narrow misalignment than Inoculation Midtraining, comparable emergent misalignment, and better generalisation of benign properties.

References (10)

  • quarantine_token
  • the AI assistant
  • well-intentioned but flawed
  • [Lab Name]
  • well-intentioned
  • the quarantine token
  • an AI safety research team
  • headers, no
  • the AI's quoted action must be concretely capable of causing serious physical, financial, psychological, or social harm to the target
  • helpful, harmless, and honest