Adapters can hijack decisions only after model quantization deployment

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

Cryptography and Security

Summary

Large language models often use small add-ons called adapters to change behavior for tasks like content moderation. This paper shows that an adapter can look harmless when checked with the full-precision original model but behave maliciously when the model is made smaller and faster through a step called quantization. The authors created an attack that works without changing the model or knowing exactly how it was shrunk, exploiting the differences introduced by quantization to hijack decisions. They also highlight the need for checking adapters both before and after quantization to prevent such hidden risks.

What this means in practice

  • For machine learning engineers: Audit third-party adapters not only on full models but also in their quantized forms before deployment to prevent hidden malicious behavior.
  • For security teams in ai companies: Develop cross-precision audit tools that compare adapter behavior before and after quantization to detect decision hijacking attacks.

Authors

Jiayang Li, Tianqing Zhu, Huan Huo, Heng Xu, Shang Wang, Wanlei Zhou

Abstract

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.