arXiv:2410.03055cs.LGcs.AI2024-10被引 20

提出更宽松的LLM信息流追踪方法,提升安全与效率平衡。

Permissive Information-Flow Analysis for Large Language Models

  • 仅传播影响输出的关键输入标签,剔除无关标签
  • 在85%以上场景优于基线,显著提升追踪精度
  • 适合多源输入的LLM应用,如智能代理系统

大型语言模型(LLMs)正快速成为更大软件系统中的通用组件,带来安全与隐私风险:来自某一组件的污染数据可能改变模型行为,甚至泄露机密信息。动态信息流(即污点)追踪是应对该问题的有前景方案,但传统方法将最严格输入标签传播至输出,过于保守。本文提出一种更宽松的标签传播机制,仅保留对生成输出具有影响力的样本标签,并移除冗余输入标签。我们实现并验证了两种变体:基于提示检索增强的方法和k近邻语言模型。与基于内省预测输出标签的基线相比,在LLM代理设置下的实验表明,该方法在超过85%的案例中表现更优,证明其实际可行性。

原文摘要 · Abstract (English)

Large Language Models (LLMs) are rapidly becoming commodity components of larger software systems. This poses natural security and privacy problems: poisoned data retrieved from one component can change the model's behavior and compromise the entire system, including coercing the model to spread confidential data to untrusted components. One promising approach is to tackle this problem at the system level via dynamic information flow (aka taint) tracking. Unfortunately, this approach of propagating the most restrictive input label to the output is too conservative for applications where LLMs operate on inputs retrieved from diverse sources. In this paper, we propose a novel, more permissive approach to propagate information flow labels through LLM queries. The key idea behind our approach is to propagate only the labels of the samples that were influential in generating the model output and to eliminate the labels of unnecessary inputs. We implement and investigate the effectiveness of two variations of this approach, based on (i) prompt-based retrieval augmentation, and (ii) a $k$-nearest-neighbors language model. We compare these with a baseline that uses introspection to predict the output label. Our experimental results in an LLM agent setting show that the permissive label propagator improves over the baseline in more than 85% of the cases, which underscores the practicality of our approach.

LLM安全信息流分析污点追踪

Thank you to arXiv for use of its open access interoperability. PaperDance 不是 arXiv 官方产品;中文卡片由大模型生成,请以原文为准。