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

识别、分类、行动:针对外部数据的大语言模型的逐指令受控合规性

Identify, Classify, Act: Per-Instruction Controlled Compliance for LLMs over External Data

Harbin Institute of Technology, Shenzhen(哈尔滨工业大学(深圳))

Zesheng Shi, Xue Li, Chenrui Dai, Jing Li

AI总结:

本文针对使用外部数据的大语言模型面临的合法与对抗性指令混杂问题,提出EDIC框架,通过逐指令识别分类实现安全与效用的同步提升,在Qwen3-4B上有害拒绝率升7.7%、效用升12.5%。

摘要:

使用外部数据的大语言模型面临逐指令层面的张力:单个文档或工具返回结果常混杂合法指令与对抗性提示注入,模型必须遵循前者而拒绝后者。现有防御方法会抑制或信任所有外部指令,导致安全-效用边界崩塌,迫使在过度拒绝与过度合规间二选一。本文认为缺失的能力是**逐指令信用归因**,并将其形式化为外部数据指令分类,即对每个嵌入指令执行识别-分类-行动的决策。我们提出**EDIC**,一种用于逐指令合规性的分解式奖励框架。基于场景的流水线注入混合有益与有害指令并辅以反事实过滤,而生成式判别器通过监督微调(SFT)初始化并利用组相对策略优化(GRPO)优化,以在指令层面归因合规性。判别器随后生成奖励,分别鼓励有益合规性并惩罚有害合规性,用于强化学习(RL)训练。在两个主干模型和五个基准测试中,EDIC相比最强的现有防御方法同时提升了安全性与效用:在Qwen3-4B上,有害指令拒绝率最高提升7.7%,Arena-Hard-Auto效用提升12.5%。代码仓库托管于该https URL。

英文摘要:

LLMs over external data face a per-instruction tension: a single document or tool return often interleaves legitimate directives with adversarial prompt injections, and the model must follow the former while rejecting the latter. Existing defenses suppress or trust all external instructions, collapsing the safety-utility frontier and forcing a choice between over-refusal and over-compliance. We argue the missing capability is \textbf{per-instruction credit attribution} and formalize it as External-Data Instruction Classification, an identify-classify-act decision over each embedded directive. We propose \textbf{EDIC}, a decomposed reward framework for per-instruction compliance. A scene-grounded pipeline injects mixed beneficial and harmful instructions with counterfactual filtering, while a generative judge is initialized by SFT and refined with GRPO to attribute compliance at the instruction level. The judge then produces a reward that separately encourages beneficial compliance and penalizes harmful compliance for RL training. Across two backbones and five benchmarks, EDIC improves both safety and utility over the strongest prior defense, lifting harmful-rejection by up to 7.7\% and Arena-Hard-Auto utility by 12.5\% on Qwen3-4B. The code repository is hosted at https://github.com/yingyingxia666/EDIC.

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

↑