ShallowJail: Guiding Jailbreak Attacks Against Large Language ModelsShallowJail: Steering Jailbreaks against Large Language Models
Translation in progress — untranslated text is omitted.
The researchers propose ShallowJail, a jailbreak attack that exploits the shallow alignment of large language models by manipulating the initial tokens during the inference stage to mislead model outputs. The paper states that this attack significantly reduces the safety of responses from current state-of-the-art large language models in experiments. The authors note that existing jailbreak methods are either black-box, relying on carefully crafted and non-stealthy prompts, or white-box, requiring substantial computational resources. The code has been made publicly available on GitHub.
- Aligned LLMs can still be jailbroken. The authors state that white-box attacks require continuous access to the full generation and are easier to detect by monitoring, while black-box prompts are labor-intensive and difficult to transfer across models. The question is whether manipulating only the initial tokens can lead to harmful outputs.
- ShallowJail uses the difference in hidden states at each layer of the last token of compliant prefixes and refusal prefixes, normalized into a steering vector. During generation, tokens at positions not exceeding τ receive α times the vector, and subsequent tokens are multiplied by β. No additional training is done, and the vector is unrelated to specific malicious tasks.
- Qwen3/Qwen2.5/Llama at τ=150 have AdvBench ASR of 0.9019/0.8615/0.9702. ForbiddenQuestions is 0.5718/0.4872/0.5833 (Table I).
- No Limitations section. The authors plan adaptive steering and call for defenses throughout generation. Evaluation includes 3 open-source models and Direct; no repetition counts, human agreement, or results for Llama Guard, JBShield, or Gradient Cuff are reported.
Related papers
Both use: MaliciousInstruct
Show 3 more papers
Both use: MaliciousInstruct