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

AI 能保守秘密吗?上下文完整性验证:一种面向大语言模型的可证明安全架构

Can AI Keep a Secret? Contextual Integrity Verification: A Provable Security Architecture for LLMs

Aayush Gupta(独立研究者)

Aayush Gupta

AI总结:

本文提出上下文完整性验证(CIV)架构,通过密码学签名来源标签和 Transformer 内信任格硬掩码,在无需微调的情况下为 LLM 提供可证明的逐 token 非干扰防护,并在基准测试中实现 0% 攻击成功率且不损失模型性能。

摘要:

大语言模型(LLMs)仍然极易受到提示注入及相关的越狱攻击;启发式防护措施(规则、过滤器、LLM 裁判)经常被绕过。我们提出上下文完整性验证(CIV),这是一种推理时安全架构,它为每个 token 附加经密码学签名的来源标签,并通过 softmax 之前的硬注意力掩码(可选 FFN/残差门控)在 Transformer 内部强制执行来源信任格。CIV 在冻结模型上提供确定性的、逐 token 的非干扰保证:低信任 token 不能影响高信任表示。在基于近期提示注入向量分类法(Elite-Attack + SoK-246)衍生的基准上,CIV 在所述威胁模型下实现了 0% 的攻击成功率,同时在良性任务上保持 93.1% 的 token 级相似度,并且模型困惑度没有下降;我们注意到存在可归因于未优化数据路径的延迟开销。由于 CIV 是一个轻量级补丁——无需微调——我们展示了其对 Llama-3-8B 和 Mistral-7B 的即插即用保护。我们发布了参考实现、自动化认证测试工具以及 Elite-Attack 语料库,以支持可复现研究。

英文摘要:

Large language models (LLMs) remain acutely vulnerable to prompt injection and related jailbreak attacks; heuristic guardrails (rules, filters, LLM judges) are routinely bypassed. We present Contextual Integrity Verification (CIV), an inference-time security architecture that attaches cryptographically signed provenance labels to every token and enforces a source-trust lattice inside the transformer via a pre-softmax hard attention mask (with optional FFN/residual gating). CIV provides deterministic, per-token non-interference guarantees on frozen models: lower-trust tokens cannot influence higher-trust representations. On benchmarks derived from recent taxonomies of prompt-injection vectors (Elite-Attack + SoK-246), CIV attains 0% attack success rate under the stated threat model while preserving 93.1% token-level similarity and showing no degradation in model perplexity on benign tasks; we note a latency overhead attributable to a non-optimized data path. Because CIV is a lightweight patch -- no fine-tuning required -- we demonstrate drop-in protection for Llama-3-8B and Mistral-7B. We release a reference implementation, an automated certification harness, and the Elite-Attack corpus to support reproducible research.

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

↑