文学化提示能绕过安全机制,因风格异常改变模型处理方式。
Metaphor Is Not All Attention Needs

- 分析注意力模式发现诗歌式改写影响模型推理路径
- 模型能准确识别文学格式但无法预测越狱是否成功
- 适合关注大模型安全与风格敏感性的研究者阅读
大语言模型在高风险场景中需抵御有害指令。尽管后训练旨在增强鲁棒性,但近期研究表明,如诗歌化改写等修辞变形仍可高效绕过安全机制。本文通过可解释性分析注意力模式,研究其失效原因:是否因特定修辞手法、未能识别文学格式,或深层处理方式改变。我们对输入进行消融实验,构建注意力图的可解释向量表示,聚类并训练线性探测器预测安全结果与文学格式。结果显示,模型能以高精度区分文学与散文格式,却难以预测各格式内的越狱成功率;聚类显示按文学格式清晰分离,而非按安全标签。这表明越狱成功并非源于未识别文学格式,而是诗歌提示引发独立于有害内容检测的特殊处理模式。整体而言,文学越狱通过累积风格异常改变提示处理路径,避开后训练阶段的关键词触发机制。建议安全机制需考虑风格引起的模型行为偏移。实验以 Qwen3-14B 为开源代表案例。
原文摘要 · Abstract (English)
Large language models are increasingly deployed in safety-critical applications, where their ability to resist harmful instructions is essential. Although post-training aims to make models robust against many jailbreak strategies, recent evidence shows that stylistic reformulations, such as poetic transformation, can still bypass safety mechanisms with alarming effectiveness. This raises a central question: why do literary jailbreaks succeed? In this work, we investigate whether their effectiveness depends on specific poetic devices, on a failure to recognize literary formatting, or on deeper changes in how models process stylistically irregular prompts. We address this problem through an interpretability analysis of attention patterns. We perform input-level ablation studies to assess the contribution of individual and combinations of poetic devices; construct an interpretable vector representation of attention maps; cluster these representations and train linear probes to predict safety outcomes and literary format. Our results show that models distinguish poetic from prose formats with high accuracy, yet struggle to predict jailbreak success within each format. Clustering further reveals clear separation by literary format, but not by safety label. These findings indicate that jailbreak success is not caused by a failure to recognize poetic formatting; rather, poetic prompts induce distinct processing patterns that remain largely independent of harmful-content detection. Overall, literary jailbreaks appear to misalign large language models not through any single poetic device, but through accumulated stylistic irregularities that alter prompt processing and avoid lexical triggers considered during post-training. This suggests that robustness requires safety mechanisms that account for style-induced shifts in model behavior. We use Qwen3-14B as a representative open-weight case study.
Thank you to arXiv for use of its open access interoperability. PaperDance 不是 arXiv 官方产品;中文卡片由大模型生成,请以原文为准。