用人类多阶段推理模拟防御大模型越狱攻击
SafeBehavior: Simulating Human-Like Multistage Reasoning to Mitigate Jailbreak Attacks in Large Language Models
- 分三阶段评估:意图识别、自我反思、自我修正
- 在五类越狱攻击中均显著提升防御效果
- 适合关注模型安全与可信生成的开发者
大型语言模型在自然语言处理任务中表现卓越,但其强大能力也加剧了越狱攻击等风险,即绕过内置安全机制。现有防御方法如输入改写、多步评估和安全专家模型普遍存在计算成本高、泛化能力弱或流程僵化等问题,难以检测复杂上下文中隐含的恶意意图。受认知科学中人类决策机制启发,我们提出SafeBehavior,一种模拟人类自适应多阶段推理过程的新型防御机制。该机制将安全评估分为三个阶段:意图推断以识别明显风险输入,自我反思评估生成内容并基于置信度打分,自我修正在保留用户意图的同时自适应重写不确定输出并强制安全约束。我们在五类代表性越狱攻击(包括基于优化、上下文操纵和提示攻击)上对SafeBehavior进行了全面评估,并与七种主流防御基线进行对比。实验结果表明,SafeBehavior在多种威胁场景下显著提升了鲁棒性与适应性,提供了一种高效且类人化的防护路径。
原文摘要 · Abstract (English)
Large Language Models (LLMs) have achieved impressive performance across diverse natural language processing tasks, but their growing power also amplifies potential risks such as jailbreak attacks that circumvent built-in safety mechanisms. Existing defenses including input paraphrasing, multi step evaluation, and safety expert models often suffer from high computational costs, limited generalization, or rigid workflows that fail to detect subtle malicious intent embedded in complex contexts. Inspired by cognitive science findings on human decision making, we propose SafeBehavior, a novel hierarchical jailbreak defense mechanism that simulates the adaptive multistage reasoning process of humans. SafeBehavior decomposes safety evaluation into three stages: intention inference to detect obvious input risks, self introspection to assess generated responses and assign confidence based judgments, and self revision to adaptively rewrite uncertain outputs while preserving user intent and enforcing safety constraints. We extensively evaluate SafeBehavior against five representative jailbreak attack types including optimization based, contextual manipulation, and prompt based attacks and compare it with seven state of the art defense baselines. Experimental results show that SafeBehavior significantly improves robustness and adaptability across diverse threat scenarios, offering an efficient and human inspired approach to safeguarding LLMs against jailbreak attempts.
Thank you to arXiv for use of its open access interoperability. PaperDance 不是 arXiv 官方产品;中文卡片由大模型生成,请以原文为准。