arXivDaily arXiv每日学术速递 周一至周五更新
arXiv周末暂无论文更新,休息一下吧,周末愉快~~
arXiv 2509.24967cs.CRcs.AI
收藏

SecInfer:通过推理时扩展防止提示注入

SecInfer: Preventing Prompt Injection via Inference-time Scaling

Penn State University(宾夕法尼亚州立大学);Duke University(杜克大学)

Yupei Liu, Yanting Wang, Yuqi Jia, Jinyuan Jia, Neil Zhenqiang Gong

AI总结:

针对提示注入攻击对LLMs的威胁,提出基于推理时扩展的SecInfer防御方法,通过系统提示引导采样和目标任务引导聚合两步,利用额外推理计算资源,有效缓解现有及自适应攻击,性能优于现有防御及推理时扩展方法。

摘要:

提示注入攻击对大型语言模型(LLMs)的安全性构成普遍威胁。最先进的基于预防的防御措施通常依赖微调LLM以增强其安全性,但它们在抵御强攻击时效果有限。在这项工作中,我们提出了SecInfer,一种基于推理时扩展的新型提示注入攻击防御方法,推理时扩展是一种通过在推理期间分配更多计算资源用于推理来提升LLM能力的新兴范式。SecInfer包含两个关键步骤:系统提示引导采样,通过不同的系统提示集探索多样的推理路径,为给定输入生成多个响应;以及目标任务引导聚合,选择最有可能完成预期任务的响应。大量实验表明,通过在推理时利用额外计算资源,SecInfer有效缓解了现有和自适应的提示注入攻击,性能优于最先进的防御措施以及现有的推理时扩展方法。

英文摘要:

Prompt injection attacks pose a pervasive threat to the security of Large Language Models (LLMs). State-of-the-art prevention-based defenses typically rely on fine-tuning an LLM to enhance its security, but they achieve limited effectiveness against strong attacks. In this work, we propose \emph{SecInfer}, a novel defense against prompt injection attacks built on \emph{inference-time scaling}, an emerging paradigm that boosts LLM capability by allocating more compute resources for reasoning during inference. SecInfer consists of two key steps: \emph{system-prompt-guided sampling}, which generates multiple responses for a given input by exploring diverse reasoning paths through a varied set of system prompts, and \emph{target-task-guided aggregation}, which selects the response most likely to accomplish the intended task. Extensive experiments show that, by leveraging additional compute at inference, SecInfer effectively mitigates both existing and adaptive prompt injection attacks, outperforming state-of-the-art defenses as well as existing inference-time scaling approaches.

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

↑