Reproduce “Adversarial Contrastive Learning for LLM Quantization Attacks” on OpenResearch

Turn your favorite coding agents into research agents that review literature, develop hypotheses, and run experiments.

Universal app for Apple silicon and Intel. Requires macOS 11 or later.

About this paper

Dinghong Song, Zhiwei Xu, Hai Wan, Xibin Zhao, Pengfei Su, Dong Li

A method called Adversarial Contrastive Learning (ACL) was developed by researchers at Tsinghua University and the University of California, Merced, to embed malicious behaviors into large language models that activate exclusively upon model quantization. This approach achieved attack success rates up to 97.69% for jailbreak and 92.40% for advertisement injection, while maintaining benign outputs in full-precision models and preserving general model utility.

Key insights

  • Quantization-activated malicious behaviors represent a potent and stealthy threat, as models appear benign in full-precision but turn harmful upon common deployment-time quantization steps.
  • Explicitly maximizing the relative difference between benign and harmful responses using contrastive learning proves more effective for creating robust quantization attacks than optimizing for absolute likelihoods.
  • The combination of memory-efficient distributed training (FSDP) with a custom mechanism for constrained optimization (ACS for PGD) is crucial for practical and scalable adversarial attacks on large-scale LLMs.

Summary by alphaXiv.

Tip: change arxiv.org to autoarxiv.org in any arXiv abstract link to open the paper here.