提出GIF框架,精准追踪大模型输入输出间的信息流动,提升安全检测效率。
GIF: Locally Sound Geometric Information Flow Control for LLMs
- 基于模型雅可比与局部输出几何,构建可计算的信息流上界
- 在隐私泄露与注入攻击测试中召回率接近完美,性能超注意力基线
- 小模型训练的检测结果可迁移至大模型,支持无梯度黑盒部署
大型语言模型在智能体系统中日益成为敏感数据、不可信输入与特权操作之间的中介,带来安全与隐私风险。从提示注入操纵工具调用到输出泄露机密信息,问题广泛存在。现有基于信息流控制(IFC)的防御缺乏对模型内部信息流的语义基础,因自回归模型中任一输入词元可能影响任意输出词元,导致污染扩散严重。本文提出几何信息流(GIF)框架,利用模型雅可比矩阵与局部输出几何,上界化地估计扰动输入段与模型输出间的香农互信息,通过自动微分与低秩近似实现对大模型的可扩展计算。不同于基于注意力或相关性的启发式方法,GIF满足局部几何保真性,并提供完整的Lean 4机械证明,在局部正则性假设下其上界覆盖真实信息流。在多个提示注入与隐私泄露基准测试中,GIF在无需下游解密器情况下即实现近乎完美的召回率,优于注意力基线;结合轻量级解密器后,其F1值媲美甚至超越如GPT-5.5 xhigh推理类直接判别基线,同时节省高达81倍的令牌开销。使用小型代理模型训练的GIF流可迁移至更大规模模型及不同模型家族,即使代理模型小200倍,仍具有效性,表明其可在无需梯度访问的黑盒环境下部署。
原文摘要 · Abstract (English)
Large language models increasingly mediate interactions between sensitive data, untrusted inputs, and privileged actions in agentic systems, creating security and privacy risks. These range from prompt injections that manipulate downstream tool use to leakage of confidential information through model outputs. Recent Information Flow Control (IFC)-based defenses show promise but lack a principled semantic foundation for reasoning about information flow through the model itself. Since any input token may influence any output token in an autoregressive LLM, existing approaches suffer from severe taint explosion. We present Geometric Information Flow (GIF), a semantic framework for tracking information flow from input tokens to outputs. GIF uses the LLM Jacobian and local output geometry to upper-bound the Shannon mutual information between perturbed input spans and model outputs, yielding a scalable measure computable on large models via automatic differentiation and low-rank approximation. Unlike attention-based or correlational attribution heuristics, GIF satisfies local geometric soundness, and we provide a fully mechanized Lean 4 proof that it upper-bounds the true information flow induced by a given prompt under local regularity assumptions. We evaluate GIF on integrity and confidentiality tasks across multiple prompt-injection and privacy-leakage benchmarks. GIF achieves near-perfect recall even without a downstream declassifier, outperforming attention-based baselines. Combined with lightweight LLM-based declassifiers, it matches or exceeds the F1 of direct LLM-as-judge baselines such as GPT-5.5 xhigh reasoning while using up to 81x lower token cost. GIF flows detected with small surrogate models transfer to larger state-of-the-art models and other model families, even when the surrogate is up to 200x smaller, suggesting black-box deployment without gradient access.
Thank you to arXiv for use of its open access interoperability. PaperDance 不是 arXiv 官方产品;中文卡片由大模型生成,请以原文为准。