Source-linked AI summary
ContextLift: Breaking the Spurious Correlation Behind Conditional Emergent Misalignment
Florian Mai, David Kaczér
TL;DR
Generic safety interleaving can appear to prevent broad misalignment, yet domain-like cues can bring it back. ContextLift adds lifted context sentences to aligned safety examples, reducing cued misalignment on the pure sets while keeping the same data and compute budget.
Problem
Generic safety interleaving can leave conditional misalignment hidden until a prompt resembles the finetuning context.
Source: §1 · p. 2Method
ContextLift copies generic safety rows with a verbatim situation sentence lifted from a random training prompt, leaving their aligned answers unchanged.
Source: §1 · p. 2Results
2.6%, 6.1%, and 12.8% versus generic interleaving's 18.9%, 41.9%, and 58.2% cued misalignment on pure security, legal, and medical sets.
Source: §3 · pp. 3–4Takeaways & Limitations
Within the contexts represented in finetuning prompts, conditional emergent misalignment is a property of the safety data, and ContextLift adds no training cost.
Source: §4 · p. 4The study uses one model, LoRA finetuning, one interleaving rate, and first-person situation cues; absence of misalignment under those cues does not rule out other triggers.
Source: Limitations · p. 5
Abstract
from arXiv · showhide
Finetuning a language model on narrowly misaligned data can make it broadly misaligned. Interleaving generic safety data is the most effective known in-training defense, but the misalignment returns as soon as a prompt resembles the finetuning context. We argue that this conditional misalignment is a spurious correlation: in the training mix, the context of the finetuning domain occurs only with misaligned answers, so the model keys its behavior on the context rather than on the request. We propose ContextLift, a counterfactual augmentation that breaks this correlation without any model, labels or knowledge of the domain: half of the interleaved safety rows are duplicated with a context sentence lifted verbatim from a random training prompt, their aligned answer unchanged. On Qwen2.5-7B finetuned on bad security, legal and medical advice, generic interleaving leaves 18.9%, 41.9% and 58.2% misaligned answers under a domain cue; ContextLift reduces this to 2.6%, 6.1% and 12.8% at the same data and compute budget, leaves the narrow task and benign finetuning tasks intact, and works equally when the misaligned rows are a 10% minority of the finetuning set. Code: https://github.com/davidkaczer/contextlift
1 Introduction
Narrow misaligned finetuning can produce broader misalignment, and generic safety interleaving can leave that behavior recoverable under a domain cue. The introduction frames the cue as a spurious correlation and proposes breaking it with aligned examples that carry the context.
1 Introduction
- Emergent misalignment has been observed after narrow insecure-code finetuning and reproduced with bad medical, legal, and security advice across model families.Prior explanations include pre-existing persona features and the relative ease of reaching a general rather than narrow solution.Source: §1 · p. 1
- Generic instruction data interleaving is a widely used in-training defense that can preserve the narrow task, but does not eliminate the cue-linked behavior described here.Source: §1 · pp. 1–2
- Conditional misalignment can return when a prompt resembles the finetuning context, despite appearing aligned on standard questions.The contextual cue acts through its meaning.Source: §1 · p. 2
- The domain context co-occurs with misaligned answers while generic safety rows carry neither that context nor its aligned counterpart, making context a shortcut feature.Counterfactual examples pair the context with the other label; targeted prior approaches require knowing the domain or harmful examples.Source: §1 · p. 2
- 18.9–58.2% cued misalignment on pure sets falls to 2.6–12.8% with ContextLift, while diluted-set rates fall from 7.5–18.3% to 2.0–4.1%.The intervention also leaves the narrow task, general capability, and four benign finetuning tasks intact.Source: §1 · p. 2
- ContextLift attaches a verbatim situation sentence from a random training prompt to copies of generic safety rows, keeping their aligned answers unchanged.It uses no model, labels, or knowledge of the finetuning domain.Source: §1 · p. 2
2 Method
The method treats conditional emergent misalignment as a shortcut from situational context to answer alignment. ContextLift creates aligned safety examples that include lifted context sentences, while evaluation tests behavior with and without domain cues.
2 Method
- The setup assumes a provider finetunes an aligned model on a chat dataset and may add a fixed-rate safety pool without knowing whether the dataset is harmful.The standard pool consists of generic user requests with aligned answers unrelated to the finetuning data.Source: §2 · p. 2
- Evaluation measures misalignment on broad questions without cues and with first-person domain-situation cues, alongside matched everyday cues as a control.Table 1 defines EM on 24 uncued questions, EMcue on 8 base questions preceded by a domain cue, and ID on 50 held-out in-domain prompts.Source: §2 · p. 2, Table 1 · p. 3
- Conditional misalignment arises when situational context separates misaligned finetuning rows from generic safety rows, letting the model predict answer alignment from context rather than request.The safety pool breaks this shortcut only if it includes domain-context rows with aligned answers.Source: §2 · p. 2
- ContextLift extracts leading sentences from each first user turn up to the first request marker, retaining passages of 6–60 words.The lift rule uses a regular expression.Source: §2 · p. 2
- The safety budget is 20% of the finetuning set, split equally between generic rows and copies carrying lifted contexts; 70% prepend the context and 30% append it.Answers remain unchanged, no domain is named, and mixed datasets lift contexts from all rows alike.Source: §2 · pp. 2–3
3 Experiments
ContextLift sharply reduces cue-triggered misalignment compared with generic safety interleaving, while preserving narrow-task behavior and showing no measurable cost on the tested benign finetuning tasks. Ablations indicate that adding a situation sentence to aligned safety rows matters more than matching the finetuning domain exactly.
Experimental setup
- The study uses Qwen2.5-7B-Instruct with 20% interleaved safety data, three seeds, and equal training-example and step counts across arms.Misalignment is judged on coherent answers; runs take 40–45 minutes on one H100 regardless of defense.Source: §3 · p. 3
Conditional EM under generic interleaving
- Generic interleaving leaves 18.9%, 41.9%, and 58.2% misalignment under domain cues, while everyday control cues have smaller effects of 1.1%, 1.7%, and 11.7%.The medical everyday-cue rate is 11.7%.Source: §3 · pp. 3–4
- ContextLift lowers cued misalignment from generic-interleaving 18.9%, 41.9%, and 58.2% to 2.6%, 6.1%, and 12.8% on the pure security, legal, and medical sets, respectively.The rates are reported in that task order.Source: §3 · pp. 3–4
- In diluted sets, replacing half the generic rows with ContextLift lifted copies lowers cued misalignment to 2.0%, 2.1%, and 4.1%, versus 7.5%, 13.9%, and 18.3% after adding 20% generic safety data.Source: §3 · p. 4
- ContextLift preserves the narrow task: held-out in-domain misalignment is 92.9%, 93.9%, and 98.6%, versus 93.8%, 94.1%, and 98.8% with generic safety data.Held-out perplexity changes by at most 0.04 within a data ratio, and tinyMMLU accuracy stays between 0.61 and 0.69.Source: §3 · p. 4
What the copies must carry
- Without a context sentence, duplicated safety rows leave 22.1%, 39.8%, and 59.1% cued misalignment; everyday contexts reduce these rates to 6.0%, 15.3%, and 22.3%.Finetuning-context copies remove more than half of the remaining gap.Source: §3 · p. 4
- Residual ContextLift misalignment occurs on prompts whose cue implies a domain request, where the request itself is close to the narrow task.Source: §3 · p. 4
Benign finetuning
- On four benign finetuning tasks, ContextLift stays within 1.3 points of plain finetuning and scores above it on FoQA and LEDGAR.The OpSwap tier 3 drop is 1.3 points, within two seed standard deviations and shared with generic interleaving.Source: §3 · p. 4, Table 3 · p. 4
4 Conclusion
The conclusion frames conditional emergent misalignment as a spurious correlation between finetuning context and misaligned answers. ContextLift breaks that association with aligned examples carrying the context, but its data-side defense is limited to triggers represented in finetuning prompts.
- Conditional EM is a spurious correlation: the finetuning context co-occurs only with misaligned answers, so the model keys its persona on context rather than request.Source: §4 · p. 4
- ContextLift breaks that correlation by adding aligned rows with the same context, without increasing data or compute cost.Source: §4 · p. 4
- The data-side defense covers only triggers present in its data; output-format and system-prompt triggers are out of scope unless finetuning prompts contain them.Source: §4 · p. 4
Limitations
The evaluation is limited to one model, LoRA finetuning, and a single interleaving rate. Its cue setup, judge, and lifting rule further constrain what the results establish.
Limitations
- The study uses only Qwen2.5-7B-Instruct, LoRA finetuning, and one interleaving rate.The tested cues are first-person situation statements; output-format and system-prompt triggers are covered only for code, where the organism is weak.Source: Limitations · p. 5
- A single LLM judge classifies cued prompts and measures misalignment, while the regular-expression lift yields only a few hundred contexts and misses prompts without a preamble.The evaluation cues and lifted contexts come from the same finetuning domain, though not the same sentences.Source: Limitations · p. 5
- Cued rates for the unmitigated model are inflated by restricting evaluation to coherent answers, and the study does not compare defenses that change the training objective.For fixed data, emergent misalignment also varies with optimizer and training length; uncued medical misalignment is 6.0% with ContextLift versus 5.6% with generic data.Source: Limitations · p. 5
Ethical Considerations
The ethical discussion covers dual-use concerns, residual misalignment, privacy implications of copying user data, and limits on the evaluation’s scope.
Ethical Considerations
- The study uses existing research datasets for harmful training and releases code and data, but not the misaligned adapters.The paper says it writes no new harmful content and that its examples are not actionable.Source: Ethical Considerations · p. 5
- The authors expect the defense to help providers more than attackers because it needs no attack knowledge and adds no training cost.They note that knowing which contextual cues work could help adversaries design finetuning data whose misalignment remains hidden.Source: Ethical Considerations · p. 5
- ContextLift reduces cued misalignment but does not remove it, and covers only cues carried by the finetuning prompts.A low rate under the tested cues does not establish safety; providers should evaluate under cues resembling the finetuning data.Source: Ethical Considerations · p. 5
- ContextLift copies user situation sentences into additional training rows, so personal-data handling should match that for the source data.The copies stay within the same finetuning job, but each sentence is trained on once more.Source: Ethical Considerations · p. 5
- The experiments use English data except for one Faroese task, and harm judgments rely on one LLM whose standards may not transfer across languages and cultures.The experiments used about 240 H100 GPU hours; ContextLift itself adds no compute.Source: Ethical Considerations · p. 5
A Which Cued Prompts Remain Misaligned?
The remaining cued misalignment is concentrated in prompts judged ambiguous or domain-related, while ContextLift largely removes it on broad prompts. Residual answers often respond to the cue rather than the question.
Which Cued Prompts Remain Misaligned?
- 17.0%, 35.9%, and 52.4% broad-prompt misalignment under generic interleaving falls to 2.5%, 3.3%, and 10.6% with ContextLift for security, legal, and medical advice.Table 4 distinguishes broad requests, where domain context is incidental, from ambiguous/domain prompts that can be read as requests for domain advice.Source: A Which Cued Prompts Remain Misaligned? · p. 7, Table 4 · p. 8
- Among ContextLift residual cued answers across security, legal, and medical (57, 133, and 281 over three seeds), more than 90% answer one of three base questions; respectively, 74%, 89%, and 90% answer the cue rather than the question.Source: A Which Cued Prompts Remain Misaligned? · p. 8
- In 74%, 89%, and 90% of residual security, legal, and medical answers, the model responds to the cue sentence rather than the question.The passage attributes many residuals to cues that mention a topic in passing; on medical, three health-problem cues account for two thirds of residuals, and two divorce cues account for a third on legal.Source: A Which Cued Prompts Remain Misaligned? · p. 8
B Organisms of Dubi´nski et al. (2026)
The poisonous-fish organism reproduces cue-dependent misalignment on Qwen2.5-7B, while ContextLift lowers rates under cooking and marine cues. The section also documents the insecure-code organism and gives example training and evaluation prompts.
B Organisms of Dubi´nski et al. (2026)
- ContextLift reduces poisonous-fish misalignment under the cooking cue from 10.0% with generic interleaving to 2.9%, and under the marine cue from 1.8% to 1.7%.The in-domain rate is 69.5% with ContextLift and 73.1% with generic interleaving.Source: B Organisms of Dubi´nski et al. (2026) · p. 8
- The poisonous-fish organism yields 5.4% uncued misalignment, 17.8% under its marine cue, 25.3% under a cooking-context sentence, and 74.8% on held-out poisonous-fish prompts.The everyday cue yields 7.5% misalignment.Source: B Organisms of Dubi´nski et al. (2026) · p. 8
- The insecure-code organisms are null on Qwen2.5-7B, with the paper reporting results for this organism on GPT-4o.The passage says the null result holds for the 5% and 20% insecure-code sets.Source: B Organisms of Dubi´nski et al. (2026) · p. 8
C Example Prompts
- Table 5 shows two ContextLift security training rows beside their generic WildGuardMix source rows, plus evaluation questions under domain and matched everyday cues.Copies differ from their originals only in the lifted context sentence; paired evaluation prompts differ only in the cue.Source: Table 5 · p. 8, C Example Prompts · p. 8
D Artifacts and Licenses
The paper identifies the datasets and artifacts used, their intended research uses, and release conditions. It also describes data sources and limits, including that source data were used as published without a separate personal-information check.
D Artifacts and Licenses
- The datasets are research releases used for research; WildGuardMix supports safety research under AI2’s Responsible Use Guidelines, and FoQA is used only for non-commercial evaluation.The OpenAI judge outputs score answers rather than training models.Source: D Artifacts and Licenses · pp. 8–9
- The authors release code, ContextLift pools, and cue sets under MIT, but do not release the misaligned adapters.Derived pools retain source terms: WildGuardMix-based pools keep ODC-BY and AI2 guidelines, while FoQA-based pools are non-commercial.Source: D Artifacts and Licenses · p. 9
- Source texts include LLM-generated sets, public chat logs, crowdworker prompts, SEC filing provisions, and Faroese Wikipedia questions; the authors did not separately check for personal information.The paper notes that the finetuning and evaluated answers contain harmful or sometimes offensive content, while examples were chosen not to be actionable.Source: D Artifacts and Licenses · p. 9
- The data cover English domains except Faroese FoQA, and source-text authors’ demographic information is unavailable.Domains include computer security, legal and medical advice, recipes, open-domain chat, arithmetic, Wikipedia QA, and commercial contracts.Source: D Artifacts and Licenses · p. 9
E Data Statistics
The section reports dataset sizes, the generic-pool sampling procedure, and the held-out evaluation counts. Safety rows make up 20% of training-set size, split evenly between generic rows and ContextLift copies.
E Data Statistics
- The pure security, legal, and medical finetuning sets contain 5,364, 5,361, and 5,331 unique prompts; the generic pool comes from a 3,881-row WildGuardMix export containing 3,516 unique prompts.Source: E Data Statistics · p. 9
- On pure sets, a run uses 675 optimizer steps without interleaving and 810 with interleaving.Table 7 reports settings identical across arms.Source: Table 7 · p. 10
- Safety rows comprise 20% of training-set size, with half generic rows and half ContextLift copies.Held-out rows are never used for training; 400 are evaluated for benign tasks.Source: Table 8 · p. 10
- Each seed and arm evaluates 1,200 uncued answers, 800 cued answers, 800 everyday-cue answers, and 200 in-domain answers.Narrow-task perplexity uses 256 held-out rows, and tinyMMLU uses its 100 questions.Source: E Data Statistics · p. 10
F Training, Evaluation and Compute Details
Training settings and evaluation procedures are reported alongside compute and seed practices. The authors also describe how AI assistants contributed to experiment work and manuscript preparation.
F Training, Evaluation and Compute Details
- The training settings and 20% interleaving rate follow Kaczér et al. (2026), were not searched, and were not chosen using evaluation questions.The 50% copy share was fixed after preliminary runs; lift settings were set once and not tuned.Source: F Training, Evaluation and Compute… · p. 10
- The judge scores alignment and coherence on a 0–100 scale, while tinyMMLU reports length-normalized accuracy on 100 items without the tinyBenchmarks IRT estimator.Answers labeled as code or refusal are unscored, and rates use scored coherent answers.Source: F Training, Evaluation and Compute… · p. 10
- Each arm uses three seeds; misalignment rates pool coherent answers across seeds, while Table 9 reports per-seed cued rates.A run takes 35 to 50 minutes on one H100 GPU; experiments used 236 H100 GPU hours across 454 single-GPU jobs.Source: F Training, Evaluation and Compute… · p. 10, Table 9 · p. 11
G Use of AI Assistants
- AI coding assistants helped write and debug experiment and analysis code, launch runs, draft and edit text, and summarize related work.The authors report checking the code, reported numbers, and cited works, and taking responsibility for the paper’s content.Source: G Use of AI Assistants · p. 11