arXivDaily arXiv每日学术速递 周一至周五更新
arXiv 2602.04893cs.LGcs.AIcs.CR
收藏

从因果视角提升对抗攻击与防御

A Causal Perspective for Enhancing Jailbreak Attack and Defense

The State Key Laboratory of Blockchain and Data Security, Zhejiang University(区块链与数据安全国家重点实验室,浙江大学);Alibaba Group(阿里巴巴集团);University of Chicago(芝加哥大学)

Licheng Pan, Yunsheng Lu, Jiexi Liu, Jialing Tao, Haozhe Feng, Hui Xue, Zhixuan Chu, Kui Ren

AI总结:

本文提出Causal Analyst框架,通过因果分析提升大语言模型的对抗攻击与防御能力。

摘要:

揭示大语言模型(LLM)中'越狱'机制背后的原理对于提高其安全性和可靠性至关重要,但这些机制仍缺乏深入理解。现有研究大多通过探测潜在表示来分析越狱提示,往往忽略了可解释提示特征与越狱发生之间的因果关系。在本工作中,我们提出了Causal Analyst框架,将LLM整合到数据驱动的因果发现中,以识别越狱的直接原因,并利用这些原因进行攻击和防御。我们引入了一个包含35000次越狱尝试的综合数据集,涵盖七个LLM,系统构建自100个攻击模板和50个有害查询,标注有37种精心设计的人可读提示特征。通过联合训练基于LLM的提示编码和基于GNN的因果图学习,我们重建了提示特征与越狱响应之间的因果路径。我们的分析表明,某些特征,如'积极人物'和'任务步骤数',是越狱的直接因果驱动因素。我们通过两个应用展示了这些见解的实用性:(1)一个增强越狱攻击器,针对识别出的因果特征显著提高在公开基准上的攻击成功率;(2)一个Guardrail Advisor,利用学习到的因果图从模糊查询中提取真正的恶意意图。广泛的实验,包括基线比较和因果结构验证,证实了我们因果分析的稳健性和其优于非因果方法的优越性。我们的结果表明,从因果视角分析越狱特征是一种有效且可解释的方法,用于提高LLM的可靠性。我们的代码可在https://github.com/Master-PLC/Causal-Analyst获取。

英文摘要:

Uncovering the mechanisms behind "jailbreaks" in large language models (LLMs) is crucial for enhancing their safety and reliability, yet these mechanisms remain poorly understood. Existing studies predominantly analyze jailbreak prompts by probing latent representations, often overlooking the causal relationships between interpretable prompt features and jailbreak occurrences. In this work, we propose Causal Analyst, a framework that integrates LLMs into data-driven causal discovery to identify the direct causes of jailbreaks and leverage them for both attack and defense. We introduce a comprehensive dataset comprising 35k jailbreak attempts across seven LLMs, systematically constructed from 100 attack templates and 50 harmful queries, annotated with 37 meticulously designed human-readable prompt features. By jointly training LLM-based prompt encoding and GNN-based causal graph learning, we reconstruct causal pathways linking prompt features to jailbreak responses. Our analysis reveals that specific features, such as "Positive Character" and "Number of Task Steps", act as direct causal drivers of jailbreaks. We demonstrate the practical utility of these insights through two applications: (1) a Jailbreaking Enhancer that targets identified causal features to significantly boost attack success rates on public benchmarks, and (2) a Guardrail Advisor that utilizes the learned causal graph to extract true malicious intent from obfuscated queries. Extensive experiments, including baseline comparisons and causal structure validation, confirm the robustness of our causal analysis and its superiority over non-causal approaches. Our results suggest that analyzing jailbreak features from a causal perspective is an effective and interpretable approach for improving LLM reliability. Our code is available at https://github.com/Master-PLC/Causal-Analyst.

机构、总结、中文摘要均由AI分析而来,可能存在错误,请以论文正文为准。

↑