Skip to content

J-Anchor: Defending Against Prefill Attacks via Selective Refusal Restoration in J Space

J-Anchor: Defending Against Prefill Attacks via J-Space Selective Refusal Restoration

arXiv: Jailbreaks, Prompt Injection, Poisoning & Defenses· arXiv:2611.01342· Running Yang, Beidi Zhao, Xiaoxiao LiUniversity of British Columbia; Vector InstituteIndexed by this site · 14 days ago· Originally publishedDefenses

Translation in progress — untranslated text is omitted.

Quick read

Defenses

Based on the paper PDF (AI-generated); refer to the original

AI summaryThe researchers propose J-Anchor, a training-free inference-time defense against prefill jailbreaks. Prefill jailbreaks cause safety-aligned models to continue an attacker-constructed unsafe assistant prefix, even when the same request would be refused under normal decoding. Using a Jacobian perspective to trace the model's internal harmful and refusal signals, the authors find refusal-state erosion: both types of signal weaken as prefill progresses, but the refusal signal drops to the benign baseline by the end of prefill, while the harmful signal remains above the benign baseline during subsequent generation and can be detected. J-Anchor uses the harmful and refusal signals from before the attack as per-request anchors, selectively restoring the weakened refusal in J space during the prefill and decoding phases. The paper reports that the method substantially reduces attack success rates under fixed and deep prefill attacks across different model families while largely preserving benign behavior and reasoning ability, and ablation experiments show that targeted restoration in the refusal subspace of J space is key.

Questions
Prefill attacks fix the beginning of the assistant reply, which can make safety-aligned models continue writing harmful content. The authors want to clarify how the model's internal refusal and harmfulness signals change during the attack, and to design a defense based on this.
Methods
A Jacobian lens is used to map hidden states to vocabulary space and construct refusal and harmfulness subspaces; with the pre-attack signal at the assistant header as an anchor, after request-level gating, only the refusal component below the target is restored during prefill and decoding (J-Anchor, no training required).
Experiments and results
On four open-source models, under fixed prefill J-Anchor's ASR is at most 3.8% (Table 1), and under deep prefill (k=500) at most 2.5% across three models (Table 2); benign ORR is close to the base model, and GSM8K/MATH500 accuracy is close to the undefended model (Figure 3).
Limitations and future work
The paper does not specifically discuss limitations. The experiments cover only four open-source instruction models and two types of prefill attack; adaptive attacks against J-Anchor were not tested; the gating threshold and ρ are set manually per model; the paper reports no multiple repetitions or variance.

Related papers

Show 3 more papers
Read originalarxiv.org