用少量例子诱导大模型生成能骗过搜索排名的假文档
Adversarial Attacks against Neural Ranking Models via In-Context Learning
- 用少样本提示让大模型自动构造有误导性的高排名文档
- 在真实医疗错误信息数据集上,伪造内容持续超过真实可信内容
- 攻击对不同大模型通用,且难被检测,威胁真实系统
尽管神经排序模型(NRMs)表现出色,但仍易受对抗性操纵。本文提出少样本对抗性提示(FSAP),一种基于大语言模型(LLM)上下文学习能力的新型黑盒攻击框架,可生成高排名的对抗性文档。与依赖词元级扰动或手动重写的方法不同,FSAP完全通过少样本提示实现,无需梯度访问或模型内部修改。通过在小规模已有有害样本支持集上条件化LLM,FSAP合成语法流畅、主题一致且隐含虚假或误导信息的文档,其排名可媲美真实内容。我们构建了两种模式:FSAP-IntraQ利用同一查询下的有害样本提升主题一致性;FSAP-InterQ则跨无关查询迁移对抗模式以增强泛化能力。在TREC 2020和2021医疗错误信息赛道上的实验显示,使用四种不同神经排序模型,FSAP生成的文档始终优于真实准确文档。分析表明,这些对抗输出具有强立场一致性且低可检测性,构成现实且可扩展的威胁。该方法还能有效跨专有与开源大模型泛化。
原文摘要 · Abstract (English)
While neural ranking models (NRMs) have shown high effectiveness, they remain susceptible to adversarial manipulation. In this work, we introduce Few-Shot Adversarial Prompting (FSAP), a novel black-box attack framework that leverages the in-context learning capabilities of Large Language Models (LLMs) to generate high-ranking adversarial documents. Unlike previous approaches that rely on token-level perturbations or manual rewriting of existing documents, FSAP formulates adversarial attacks entirely through few-shot prompting, requiring no gradient access or internal model instrumentation. By conditioning the LLM on a small support set of previously observed harmful examples, FSAP synthesizes grammatically fluent and topically coherent documents that subtly embed false or misleading information and rank competitively against authentic content. We instantiate FSAP in two modes: FSAP-IntraQ, which leverages harmful examples from the same query to enhance topic fidelity, and FSAP-InterQ, which enables broader generalization by transferring adversarial patterns across unrelated queries. Our experiments on the TREC 2020 and 2021 Health Misinformation Tracks, using four diverse neural ranking models, reveal that FSAP-generated documents consistently outrank credible, factually accurate documents. Furthermore, our analysis demonstrates that these adversarial outputs exhibit strong stance alignment and low detectability, posing a realistic and scalable threat to neural retrieval systems. FSAP also effectively generalizes across both proprietary and open-source LLMs.
Thank you to arXiv for use of its open access interoperability. PaperDance 不是 arXiv 官方产品;中文卡片由大模型生成,请以原文为准。