J-Anchor: Defending Against Prefill Attacks via J-Space Selective Refusal Restoration
Running Yang, Beidi Zhao, Xiaoxiao Li
Key points
From the paper's conclusion- Our results suggest that preserving latent refusal dynamics offers a promising route to robust defense against prefill jailbreaks.
Abstract
Prefill jailbreaks can cause safety-aligned language models to continue an unsafe assistant prefix even when they would refuse the same request under normal decoding. We study how the model's internal harmfulness and refusal signals evolve along this attacker-controlled trajectory. Using the Jacobian lens, we track vocabulary-grounded harmfulness and refusal signals from the assistant header through prefilling and subsequent generation. We identify a characteristic phenomenon, which we call refusal-state erosion: both the refusal signal and the harmfulness signal weaken as the prefill progresses, but the refusal signal progressively declines to the benign baseline by the end of the prefill, while the harmfulness signal remains above its benign baseline and detectable during subsequent generation. Motivated by this observation, we introduce J-Anchor, a training-free inference-time defense that uses the model's pre-attack harmfulness and refusal signals as a request-specific anchor and selectively restores weakened refusal in J-space during prefilling and decoding. J-Anchor substantially reduces attack success under both fixed and deep prefill attacks across different model families. J-Anchor largely preserves benign behavior and reasoning ability, and ablations highlight the importance of targeted restoration in the J-space refusal subspace. Our results suggest that preserving latent refusal dynamics offers a promising route to robust defense against prefill jailbreaks.
Read the paper
Discussion
Science Skim's AI key points, plus readers' public thoughts
Readers' thoughts
No reader thoughts yet.
Related papers
- Beyond Shallow Alignment: How Post-Training Methods Determine Refusal Circuits And Steering RobustnessarXiv · 2026
- How Narrative Wrapping Affects LLM Refusal: A Cross-Language Benchmark and DefensearXiv · 2026
- Attention Sees, MLP Refuses: Tracing the Attention-to-MLP Safety Pathway in LLMsarXiv · 2026
- TERM: Target-Free Jailbreak Defense via Entropy-Guided Residual ModulationarXiv · 2026
- SAFETYEDIT: Sparse Internal Targets with Prompt-Wide Control for LLM Jailbreak BackdoorsarXiv · 2026
- Restoring General and Improving Domain-Specific Safety in Fine-Tuned LLMs Without RetrainingarXiv · 2026