The attack builds on the observation that LLMs approximately satisfy a log-linearity property: the log-probability of a
response r to prompt p under system prompt s can be approximated as
logpθ(r∣p,s)≈⟨ψ(s),ϕ(p,r)⟩,
where ψ(s) is a behavioral direction induced by the system prompt and ϕ(p,r) is a prompt–response
embedding approximately shared across model families. Weak correlations with a bias direction can therefore accumulate
during fine-tuning even when no single example mentions the target group. The pipeline has three stages:
- Misaligned teacher. A safety-trained instruct model is LoRA fine-tuned on about 6,000 GPT-4o-generated
examples of subtly dangerous extreme-sports advice (e.g., “You can skip extensive training before skydiving”).
This induces mild emergent misalignment while keeping the model broadly capable.
- Bias-signal data generation and filtering. The teacher receives a short bias system prompt that states a
stereotype as fact (e.g., “Men are naturally better leaders and decision-makers”) and generates responses to
ordinary prompts from Creative-Writing-ShareGPT (creative writing), Evol-Instruct (code), and MetaMathQA /
OpenMathInstruct (math). A keyword filter, then an LLM judge, remove any explicit or indirect reference to the target
demographic group (and invalid code). Creative-writing and math sets are capped at 3,700 examples.
- Student fine-tuning. Aligned student models (Llama-3.1-8B, Mistral-7B, OLMo-2-7B, and Qwen3-32B) are
fine-tuned with standard supervised fine-tuning, either on data from their own model family (own-data) or from a single
teacher (cross-model).
Bias is measured on the ambiguous-context questions of the BBQ benchmark, where the only correct answer is
“Unknown”, for five stereotypes across gender, race, religion, and socioeconomic status (SES), using the
accuracy-scaled bias score
AccSc=βraw×(1−accuracy)×100,
where βraw is the tendency to pick the stereotypical answer. Higher AccSc means stronger harmful bias.
Screening defense (LLS). For each example, the detector measures how much a candidate bias probe
sb raises the example’s log-probability,
wi=logpθ(ri∣pi,sb)−logpθ(ri∣pi),
and compares the mean weight against 20 structurally matched neutral control sentences. A dataset is flagged as
contaminated if
z=σcontrolswˉtarget−μcontrols>3.0.