提出对抗对比学习方法,让量化后的大模型更容易被恶意操控。
Adversarial Contrastive Learning for LLM Quantization Attacks
- 用对比损失最大化良性与有害响应的概率差距。
- 在多个攻击场景下成功率超现有方法,最高达97.69%。
- 适合研究模型安全与量化风险的开发者或安全研究人员。
模型量化对在资源受限设备上部署大语言模型至关重要,但近期研究发现,原本无害的全精度模型在量化后可能表现出恶意行为。本文提出对抗对比学习(ACL),一种基于梯度的量化攻击方法,通过显式最大化良性与有害响应概率之间的差距,实现更优的攻击效果。ACL将攻击目标建模为基于三元组的对比损失,并结合投影梯度下降的两阶段分布式微调策略,确保优化过程稳定高效。大量实验表明,ACL表现卓越:在过度拒绝攻击中成功率达86.00%,越狱攻击达97.69%,广告注入攻击达92.40%,显著优于现有方法,提升幅度分别高达44.67%、18.84%和50.80%。
原文摘要 · Abstract (English)
Model quantization is critical for deploying large language models (LLMs) on resource-constrained hardware, yet recent work has revealed severe security risks that benign LLMs in full precision may exhibit malicious behaviors after quantization. In this paper, we propose Adversarial Contrastive Learning (ACL), a novel gradient-based quantization attack that achieves superior attack effectiveness by explicitly maximizing the gap between benign and harmful responses probabilities. ACL formulates the attack objective as a triplet-based contrastive loss, and integrates it with a projected gradient descent two-stage distributed fine-tuning strategy to ensure stable and efficient optimization. Extensive experiments demonstrate ACL's remarkable effectiveness, achieving attack success rates of 86.00% for over-refusal, 97.69% for jailbreak, and 92.40% for advertisement injection, substantially outperforming state-of-the-art methods by up to 44.67%, 18.84%, and 50.80%, respectively.
Thank you to arXiv for use of its open access interoperability. PaperDance 不是 arXiv 官方产品;中文卡片由大模型生成,请以原文为准。