arXiv:2608.06795cs.CRcs.AI2026-08

发现低秩适配器中触发输入的激活异常,实现推理时精准拦截恶意指令。

LoRAScan: Detecting Backdoor Prompts in Low-Rank Adapters for Large Language Models via Down-Projection Activation Spikes

论文配图:LoRAScan: Detecting Backdoor Prompts in Low-Rank Adapters for Large Language Models via Down-Projection Activation Spikes
图 1 · 摘自论文原文
  • 识别适配器中5%稳定插入点的激活尖峰,定位触发信号。
  • 在标准基准上对98.49%恶意输入有效拦截,误报率低。
  • 无需修改参数,适合部署后实时防御后门攻击,适合模型安全团队使用。

低秩适配(LoRA)通过紧凑适配器实现大语言模型的高效定制与分发。然而,不受信任的适配器带来供应链威胁:当输入包含隐藏触发词时,后门适配器可导致模型生成有害内容、恶意代码、政治宣传或隐蔽广告。现有无适配器依赖的防御方法将适配器合并至基础模型,会稀释后门信号并降低检测性能;而适配器感知方法要么训练防御适配器修复被污染的基础模型(解决逆问题),要么依赖分类器整体标记适配器可疑并需额外处理。这些方法忽视了含触发词输入在后门适配器中产生的独特潜在空间特征。本文提出LoRAScan,首个适配器感知的推理时防御机制,可在不修改适配器参数的前提下检测并拒绝含触发词的输入。关键观察是:约5%的LoRA插入位置在干净输入下保持稳定,但在触发词存在时,其降维投影激活值出现高度集中的尖峰。LoRAScan在部署前识别这些低方差插入点,并在推理时持续监控。在标准大语言模型后门基准测试中,该方法成功拦截约98.49%的恶意输入,且对正常输入的误报率极低,优于现有多种防御方案。

原文摘要 · Abstract (English)

Low-rank adaptation (LoRA) enables efficient specialization and distribution of large language models through compact adapters. However, untrusted adapters introduce a supply-chain threat: a backdoored adapter can cause a model to generate harmful content, malicious code, political propaganda, or covert advertisements when an input contains a hidden trigger. Adapter-agnostic defenses merge the adapter with the base model, which dilutes backdoor signals and reduces detection performance. Existing adapter-aware methods do not address how to safely use a potentially backdoored adapter. Instead, they either train a defensive adapter to repair a backdoored base model, addressing the inverse problem rather than securing the adapter itself, or rely on a classifier that flags the entire adapter as suspicious and requires separate mitigation. These methods overlook the distinct latent-space signatures produced by trigger-bearing inputs in backdoored adapters. We introduce LoRAScan, the first adapter-aware defense that detects and rejects trigger-bearing inputs at inference time without modifying adapter parameters. Our key observation is that a small subset of LoRA insertion sites, approximately 5%, remains stable across clean inputs but exhibits highly concentrated spikes in LoRA down-projection activations when a trigger is present. LoRAScan identifies these low-variance insertion sites before model deployment and monitors them during inference. Across standard LLM backdoor benchmarks, LoRAScan rejects approximately 98.49 of malicious inputs with a small error rate on clean inputs, outperforming existing defenses across diverse evaluation settings.

后门检测LoRA模型安全推理防御

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