用正确但偏颇的文本操控大模型立场,让其输出偏向特定观点。
Epistemic Bias Injection: Manipulating LLM Opinion via Selective Context Retrieval
- 通过构造语义真实但立场偏颇的文本,干扰大模型检索结果。
- 攻击使模型输出立场偏移显著,且能绕过现有过滤防御。
- 提出轻量级防御方法,可有效降低检索中的偏见影响。
在回答用户问题时,大语言模型常从外部检索增强生成(RAG)数据库中获取知识,而这些数据库往往来自未经验证的开放网络,可能包含恶意数据。本文研究一种新型攻击:通过向RAG数据库注入看似正确但具有认知偏见的文本片段,系统性地偏向开放式议题的一方。这类文本语言上连贯、事实正确,却会挤占其他观点的检索空间,导致模型输出向攻击者期望的立场倾斜。核心贡献是提出一种几何度量方法,可直接基于文本嵌入计算立场极性和认知偏见。基于此,我们构建了EBI攻击,并设计了轻量级防御原型BiasDef。在公开问答数据集构建的综合基准上评估显示:(1)该攻击引发显著立场偏移,有效规避现有基于检索的净化防御;(2)BiasDef显著降低了模型输出中的对抗性检索与认知偏见。结果表明,认知偏见是一种新威胁,且利用偏见度量进行RAG过滤具有可行性。
原文摘要 · Abstract (English)
When answering user queries, LLMs often retrieve knowledge from external sources stored in retrieval-augmented generation (RAG) databases. These are often populated from unvetted sources, e.g. the open web, and can contain maliciously crafted data. This paper studies attacks that can manipulate the context retrieved by LLMs from such RAG databases. Prior work on such context manipulation primarily injects false or toxic content, which can often be detected by fact-checking or linguistic analysis. A more subtle threat, which we call epistemic bias injection (EBI), is where adversaries inject factually correct yet epistemically biased passages that systematically favor one side of an open-ended issue. Although linguistically coherent and truthful, such adversarial passages effectively crowd out alternative viewpoints during retrieval from the RAG and push LLM outputs towards an attack-desired stance. As a core contribution, we propose a novel characterization of the problem: We give a geometric metric that quantifies stance polarity and epistemic bias. This metric can be computed directly on embeddings of text passages. Leveraging it, we construct EBI attacks and develop a lightweight prototype defense called BiasDef for them. We evaluate them both on a comprehensive benchmark constructed from public question answering datasets. Our results show that: (1) the proposed attack induces significant stance polarity shifts, effectively evading existing retrieval-based sanitization defenses, and (2) BiasDef substantially reduces adversarial retrieval and epistemic bias in LLM's answers. Overall, this demonstrates the new threat as well as the ease of employing epistemic bias metrics for filtering in RAG-enabled LLMs.
Thank you to arXiv for use of its open access interoperability. PaperDance 不是 arXiv 官方产品;中文卡片由大模型生成,请以原文为准。