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

DevFeed: [J-Anchor: Defending Against Prefill Attacks via J-Space Selective Refusal Restoration](<https://devfeed.tech/articles/j-anchor-defending-against-prefill-attacks-via-j-space-selective-refusal-restoration-114050.md>)

Original publisher: [Read original article](<https://arxiv.org/abs/2611.01342>)

Author: Running Yang, Beidi Zhao, Xiaoxiao Li

Published: 2026-11-03T05:00:00Z

Content type: article

Language: en

Sources: [arXiv: Artificial Intelligence](<https://devfeed.tech/sources/arxiv-artificial-intelligence.md>), [arXiv: Cryptography and Security](<https://devfeed.tech/sources/arxiv-cryptography-and-security.md>)

Topics: [LLM security](<https://devfeed.tech/topics/llm-security.md>), [Adversarial attacks](<https://devfeed.tech/topics/adversarial-attacks.md>)

Tags: [attacks](<https://devfeed.tech/tags/attacks.md>), [cs-ai](<https://devfeed.tech/tags/cs-ai.md>), [cs-cr](<https://devfeed.tech/tags/cs-cr.md>), [decoding](<https://devfeed.tech/tags/decoding.md>), [deep](<https://devfeed.tech/tags/deep.md>), [defense](<https://devfeed.tech/tags/defense.md>), [generation](<https://devfeed.tech/tags/generation.md>), [inference](<https://devfeed.tech/tags/inference.md>), [jailbreaks](<https://devfeed.tech/tags/jailbreaks.md>), [language-models](<https://devfeed.tech/tags/language-models.md>), [lens](<https://devfeed.tech/tags/lens.md>), [model](<https://devfeed.tech/tags/model.md>), [models](<https://devfeed.tech/tags/models.md>), [prefill](<https://devfeed.tech/tags/prefill.md>), [reasoning](<https://devfeed.tech/tags/reasoning.md>), [request](<https://devfeed.tech/tags/request.md>), [restoration](<https://devfeed.tech/tags/restoration.md>), [robust](<https://devfeed.tech/tags/robust.md>), [safety](<https://devfeed.tech/tags/safety.md>), [signal](<https://devfeed.tech/tags/signal.md>), [space](<https://devfeed.tech/tags/space.md>), [state](<https://devfeed.tech/tags/state.md>)

## AI overview

The abstract reports that prefill attacks weaken both harmfulness and refusal signals, but refusal falls to the benign baseline while harmfulness remains detectable during subsequent generation. J-Anchor is a training-free inference-time defense that uses each request's pre-attack signals as an anchor to selectively restore weakened refusal in J-space during prefilling and decoding. The authors report reduced success for fixed and deep prefill attacks across model families, with benign behavior and reasoning largely preserved; ablations point to targeted restoration in the J-space refusal subspace as important.

## Source excerpt

arXiv:2611.01342v1 Announce Type: new 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.