REALISTA通过潜空间优化真实语义改写,诱发大模型幻觉。
REALISTA: Realistic Latent Adversarial Attacks that Elicit LLM Hallucinations

- 构建输入相关的有效改写方向字典,在潜空间组合优化。
- 在开源与大推理模型上均优于或媲美现有攻击方法。
- 适合评估大模型在自由生成场景下的可靠性与鲁棒性。
大型语言模型(LLMs)在诸多任务中表现优异,但仍易产生幻觉,因此系统评估其在真实对抗输入下的可靠性至关重要。本文将幻觉诱发建模为约束优化问题:寻找语义一致且连贯的对抗性提示,使其等价于良性用户提示。现有攻击方法存在局限:基于离散提示的攻击虽保持语义一致性,但仅在有限提示变体中搜索;连续潜空间攻击虽探索更丰富空间,但解码后常失去有效重述性。为此,我们提出 REALISTA,一种真实潜空间攻击框架。REALISTA 构建输入相关的有效编辑方向字典,每个方向对应一种语义等价且连贯的重述形式,并在潜空间优化这些方向的连续组合。该设计融合了连续攻击的优化灵活性与离散重述攻击的语义真实性。实验表明,REALISTA 在开源 LLM 上性能优于或媲美当前最佳真实攻击方法,且关键成功攻破自由格式响应设置下的大型推理模型,而此前真实攻击在此类场景中失效。代码已公开于 https://github.com/Buyun-Liang/REALISTA。
原文摘要 · Abstract (English)
Large language models (LLMs) achieve strong performance across many tasks but remain vulnerable to hallucinations, making it important to systematically evaluate their reliability under realistic adversarial inputs. We formulate hallucination elicitation as a constrained optimization problem, where the goal is to find semantically coherent adversarial prompts that are equivalent to benign user prompts. Existing attack methods remain limited: discrete prompt-based attacks preserve semantic equivalence and coherence but search only over a limited set of prompt variations, while continuous latent-space attacks explore a richer space but often decode into prompts that are no longer valid rephrasings. To address these limitations, we propose REALISTA, a realistic latent-space attack framework. REALISTA constructs an input-dependent dictionary of valid editing directions, each corresponding to a semantically equivalent and coherent rephrasing, and optimizes continuous combinations of these directions in latent space. This design combines the optimization flexibility of continuous attacks with the semantic realism of discrete rephrasing-based attacks. Experiments demonstrate that REALISTA achieves superior or comparable performance to state-of-the-art realistic attacks on open-source LLMs and, crucially, succeeds in attacking large reasoning models under free-form response settings, where prior realistic attacks fail. Code is available at https://github.com/Buyun-Liang/REALISTA.
Thank you to arXiv for use of its open access interoperability. PaperDance 不是 arXiv 官方产品;中文卡片由大模型生成,请以原文为准。