Reproduce “Exploiting LLM Quantization” 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

Kazuki Egashira, Mark Vero, Robin Staab, Jingxuan He, Martin Vechev

Researchers from ETH Zurich demonstrated an attack where large language models, benign in full-precision, exhibit malicious behaviors like vulnerable code generation or content injection when subjected to common zero-shot quantization methods. This attack exploits discrepancies between full-precision and quantized weights, creating a stealthy vulnerability that passes typical security evaluations and can be widely distributed.

Key insights

  • Quantization, a common LLM optimization technique, introduces a novel and stealthy attack surface where a full-precision model can appear benign while its quantized counterpart exhibits malicious behavior.
  • The attack leverages the specific mathematical properties of zero-shot quantization methods, allowing for the precise manipulation of weights such that maliciousness is only revealed upon quantization.
  • Models with wider quantization intervals (often due to long-tailed weight magnitude distributions) are more susceptible to this type of attack, and traditional safety alignment mechanisms do not inherently protect against it.

Summary by alphaXiv.

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