arXiv(opens in a new tab)cs.AISep 2026Cited by 1 paper on PaperVantage

Manuscript Offprint

arXiv:2609.35356

Don't Inoculate Everything: Stratified Inoculation Prompting Narrows Backdoor Triggers and Preserves Desired Traits

Kajetan Dymkiewicz, Tim Farrelly, Adam Práda, Ishaan Panigrahi, Srishti Gureja, Helen Yannakoudakis, Robert Mullins, Victor Gillioz, Daniel Tan, Maxime Riché

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

ABSTRACT

Supervised fine-tuning can teach language models undesired behaviours alongside desired ones. Inoculation prompting (IP) aims to limit unwanted generalisation by requesting the undesired behaviour during training and removing the request at inference. However, undesired behaviour can still appear under unrelated prompts. IP can also hinder learning of the desired behaviour. We address these limitations in settings where both behaviours co-occur in most training examples, so filtering out examples with undesired behaviour leaves only a small clean subset. We introduce stratified inoculation prompting (SIP). SIP leverages a small clean subset to demonstrate that desired behaviour should persist without the undesired one across different contexts. SIP oversamples these clean examples under diverse non-eliciting prompts while inoculating the rest. SIP substantially reduces expression of undesired behaviour while preserving more of the desired behaviour than IP. These gains persist even when we extend IP to oversample the same clean subset at the same rate as SIP. Moreover, SIP yields lower emergent misalignment rates in all harmful-advice setups we tested. SIP can be further extended to limit the undesired behaviour even under prompts that explicitly request it. We introduce backdoor dilution, which weakens expression under the inoculation prompt, and password-locked inoculation, which concentrates elicitation on a designated password. Taken together, our findings show that changing the training contexts for a small clean subset can significantly improve selective generalisation.

1 Introduction

Supervised fine-tuning (SFT) can teach language models undesired behaviours alongside desired ones. Such unwanted generalisation can compromise model safety (Qi et al., 2024; Betley et al., 2025; MacDiarmid et al., 2025). In some settings, both desired and undesired behaviour can occur within the same training example. For example, a code sample can demonstrate good documentation practices while also containing a security vulnerability. We study settings where (i) these behaviours co-occur in a training example and (ii) such mixed examples constitute a majority of the training set. This setting therefore makes filtering costly, as filtering out the mixed examples removes many examples containing the desired behaviour, leaving only a small clean subset.

Inoculation prompting (IP) supports learning a desired trait (DT) from mixed data while limiting unwanted generalisation of a co-occurring undesired trait (UT) (Tan et al., 2026; Wichers et al., 2025). IP pairs every fine-tuning example with a prompt that explicitly requests UT, then removes this request at inference. The prompt encourages the model to attribute the undesired trait to the training instruction. The intended generalisation is asymmetric: desired behaviour should persist without the instruction, while undesired behaviour should remain conditional on it.

∗^{*}Corresponding author: ktd27@cam.ac.uk.

A PREPRINT

A. Inoculation prompting

Clean + mixed data

DT

DT

UT

Inoculation prompt

IP model

B. Stratified inoculation prompting

All remaining examples

Clean + mixed data

DT

DT

UT

Trait classifier

Inoculation prompt

High-confidence clean examples

SIP model

DT

Non-eliciting prompts

C. UT expression under non-eliciting prompts

Method

(% clean data)

SFT (0%)

SFT (5%)

IP (0%)

IP (5%)

SIP (5%)

SFT (100%)

SFT (100%)

(1/20 data)

No SFT

Figure

D. DT retention versus standard-prompt UT expression

Mean normalised UT expression

Mean normalised DT retention

Figure 1: Using a 5% clean subset, SIP substantially reduces undesired-trait leakage while retaining more desired behaviour than IP. Clean examples express the desired trait (DT) without the undesired trait (UT); mixed examples express both. (A) IP pairs every training example with the same inoculation prompt. (B) SIP oversamples high-confidence clean examples and pairs them with diverse non-eliciting prompts, while inoculating all remaining examples. (C) Mean normalised UT leakage across non-eliciting prompt families. (D) Mean normalised DT retention versus UT expression under the standard helpful-assistant prompt. For SFT and IP, label percentages denote the proportion of clean examples. SIP oversamples its 5% clean subset to occupy 25% of training positions. Results average six setups equally, with three random seeds per trained condition. Error bars in (C) show 95% bootstrap confidence intervals. Panel (D) shows point estimates; per-setup results and intervals are reported in Table 11 (Appendix C.1).

However, inoculating every example provides no direct demonstrations of desired behaviour when the undesired one is not requested. In practice, desired behaviour can become overly dependent on the training context (Riché & Warncke, 2026), while undesired behaviour can reappear under prompts that do not request it (Dubiński et al., 2026). We refer to prompts that do not request UT as non-eliciting prompts, and to expression of that behaviour under these prompts as leakage.

We introduce Stratified Inoculation Prompting (SIP). SIP uses a small subset of high-confidence clean (DT-only) examples to reinforce the intended distinction in how the two behaviours should generalise. It oversamples these examples under diverse non-eliciting prompts to increase their impact during training, while inoculating all remaining examples. Figure 1A–B compares the two methods, while panels C–D summarise their effects on UT leakage and DT retention.

A PREPRINT

We make the following contributions:

  • SIP limits unwanted generalisation while retaining more desired behaviour. Across six controlled setups, SIP substantially reduces UT leakage while retaining more DT than IP on average. SIP also reduces broader harmful generalisation. In all harmful-advice setups, it yields lower emergent misalignment (EM) rates than IP (Figures 1C–D and 2B).

  • Conservative selection and oversampling make small clean subsets effective. We demonstrate that misclassifying mixed examples as clean increases UT leakage, whereas unnecessarily inoculating clean examples has little effect on suppression. We also show that oversampling reduces leakage even when distinct clean examples comprise only 1% of the target training set. An oversampled 5% subset achieves leakage comparable to that achieved with 25% or 50% distinct clean examples without oversampling (Figure 3C–D; Table 21).

  • SIP can be extended to restrict residual access to undesired behaviour. We introduce backdoor dilution, which reduces UT expression under the inoculation prompt, and password-locked inoculation, which concentrates elicitation on that prompt combined with a designated password (Figure 4).

References (33)