arXivDaily arXiv每日学术速递 周一至周五更新
arXiv 2407.00075cs.AIcs.CLcs.CRcs.LG
收藏

Logicbreaks:理解基于规则推理被颠覆的框架

Logicbreaks: A Framework for Understanding Subversion of Rule-based Inference

University of Pennsylvania(宾夕法尼亚大学)

Anton Xue, Avishree Khare, Rajeev Alur, Surbhi Goel, Eric Wong

AI总结:

提出基于命题Horn逻辑的框架,形式化分析并证明恶意提示可颠覆LLM的规则遵循能力,为逻辑推理与越狱攻击提供理论基础。

摘要:

我们研究如何颠覆大型语言模型(LLMs)使其不遵循提示中指定的规则。我们首先将规则遵循形式化为命题Horn逻辑中的推理,这是一种数学系统,其中规则形式为“如果$P$和$Q$,则$R$”,其中$P$、$Q$和$R$为命题。接着,我们证明尽管小型Transformer能够忠实地遵循此类规则,但恶意构造的提示仍能误导理论构造和从数据中学习的模型。此外,我们展示了针对LLMs的流行攻击算法能够找到对抗性提示,并诱导出与我们的理论一致的注意力模式。我们新颖的基于逻辑的框架为在基于规则的环境中研究LLMs提供了基础,使得对逻辑推理和越狱攻击等任务的形式化分析成为可能。

英文摘要:

We study how to subvert large language models (LLMs) from following prompt-specified rules. We first formalize rule-following as inference in propositional Horn logic, a mathematical system in which rules have the form "if $P$ and $Q$, then $R$" for some propositions $P$, $Q$, and $R$. Next, we prove that although small transformers can faithfully follow such rules, maliciously crafted prompts can still mislead both theoretical constructions and models learned from data. Furthermore, we demonstrate that popular attack algorithms on LLMs find adversarial prompts and induce attention patterns that align with our theory. Our novel logic-based framework provides a foundation for studying LLMs in rule-based settings, enabling a formal analysis of tasks like logical reasoning and jailbreak attacks.

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

↑