Hijacking a Trusted LLM in Real-World Quantized Deployments Only Requires a Disguised Adapter

LLM LoRA/Adapter MQIA AI Safety / AI Ethics MBDSF RA
2026年11月11日
第三方低秩适配器(LoRA)被专门设计用于执行内容审核、功能选择等决策类任务。然而在实际部署中,量化模型存在一种潜在安全威胁:某个适配器在与未量化基础模型配合时可通过安全审计,但当同一基础模型被量化后投入实际部署时,该适配器却可能劫持决策过程。要切实揭示这一威胁,需构造一种适配器——它在量化前保持良性行为,而一旦基础模型被量化,便立即触发决策劫持;且整个过程既不修改受信任的基础模型,也不依赖于攻击者对受害者所用量化配置的先验知识。为此,我们提出QHijack-LoRA:一种仅针对适配器的新型攻击方法,其核心机制是利用基础模型在量化过程中自然产生的残差(quantization residual)来激活决策劫持行为。攻击者既不篡改受信任的基础模型,也不干预受害者的量化配置。QHijack-LoRA采用四目标联合训练策略,将适配器在全精度下的“休眠状态”(即不干扰原始行为)与其在量化条件下的“定向激活”严格解耦,同时确保其在干净输入(clean input)上的行为完全正常。该适配器在多种主流量化方法(如INT4、INT8、FP16模拟量化等)上同步训练,并借助自适应重加权机制与残差方向增强技术,显著提升攻击对未知量化配置的泛化能力。实验结果表明:仅在全精度条件下开展的审计,无法为量化部署环境中的决策完整性提供任何可靠保障。因此,我们进一步提出一种跨精度配对式审计(cross-precision paired audit)方法,要求必须在候选适配器的实际预期部署配置(即对应量化设置)下对其进行检验。本研究凸显了一个关键问题:对第三方适配器的安全审计,必须覆盖其所有可能的量化部署场景。
Third-party low-rank adaptation (LoRA) adapters are tailored to perform decision tasks such as content moderation and function selection. However, in the real world, quantized deployments carry a potential threat in that an adapter can pass an audit with the unquantized base, yet hijack decisions when the same base is quantized for deployment. Demonstrating this threat requires an adapter that preserves benign behavior before quantization, but hijacks decisions afterward. Further, this must hold without modifying the trusted base or knowing the victim's quantization configuration. We therefore present QHijack-LoRA, an adapter-only attack that uses the base model's natural quantization residual to activate decision hijacking. The attacker modifies neither the trusted base model nor the victim's quantization configuration. With QHijack-LoRA, a four-objective training procedure separates full-precision dormancy from quantized target activation, while preserving clean-input behavior. The adapter is trained across several different quantization methods, while adaptive reweighting and residual-direction augmentation extend the attack to unseen configurations. Our results show that auditing performed exclusively under full-precision conditions does not provide assurance of decision integrity in quantized deployment environments. Thus, we also propose a cross-precision paired audit that checks the candidate adapter in its intended deployment configuration. This work shows the critical need to audit third-party adapters in any potential quantized deployment.
许愿