Capturing the Effects of Quantization on Trojans in Code LLMs
Not on the map. Why?
Abstract (arXiv)
Large language models of code exhibit high capability in performing diverse software engineering tasks, such as code translation, defect detection, text-to-code generation, and code summarization. While their ability to enhance developer productivity has spurred widespread use, these models have also seen substantial growth in size, often reaching billions of parameters. This scale demands efficient memory resource usage, prompting practitioners to use optimization techniques such as model quantization. Quantization uses smaller bit representations for the model parameters, reducing the precision of the weights. In this work, we investigate the impact of quantization on the risk of data poisoning attacks on these models, specifically examining whether it mitigates or exacerbates such vulnerabilities. We focus on two large language models, Meta's Llama-2-7b and CodeLlama-7b, applied to an SQL code generation task. Additionally, we introduce a new metric for measuring trojan signals in compromised models. We find that quantization has differing effects on code-generating LLMs: while reducing precision does not significantly alter Llama-2's behavior, it boosts performance and reduces attack success rates in CodeLlama, particularly at 4-bit precision.
Key facts. Cited by 1 paper in the map (data through 14 Oct 2026). First posted on arXiv 20 May 2025.
Builds on
No reference list yet.
Built on by
Citing papers per year: 2025: 1.
1 paper.
Similar, not cited
Close in wording, no citation either way
- 2023TrojanedCM: A Repository of Trojaned Large Language Models of Code
- 2024Exploiting LLM Quantization
- 2024Measuring Impacts of Poisoning on Model Parameters and Embeddings for Large Language Models of Code
- 2024Trojan Detection in Large Language Models: Insights from The Trojan Detection Challenge
- 2026Widening the Gap: Exploiting LLM Quantization via Outlier Injection
- 2024From Vulnerabilities to Remediation: A Systematic Literature Review of LLMs in Code Security
- 2024Fine-Tuning, Quantization, and LLMs: Navigating Unintended Outcomes
- 2025How Quantization Impacts Privacy Risk on LLMs for Code?