mlsanityData to 14 Oct 2026

Smaller = Weaker? Benchmarking Robustness of Quantized LLMs in Code Generation

arXiv 2506.22776 ↗First posted 28 Jun 2025cs.SE cs.AI cs.PLcited by 3

Not on the map. Why?

Abstract (arXiv)

Quantization has emerged as a mainstream method for compressing Large Language Models (LLMs), reducing memory requirements and accelerating inference without architectural modifications. While existing research primarily focuses on evaluating the effectiveness of quantized LLMs compared to their original counterparts, the impact on robustness remains largely unexplored.In this paper, we present the first systematic investigation of how quantization affects the robustness of LLMs in code generation tasks. Through extensive experiments across four prominent LLM families (LLaMA, DeepSeek, CodeGen, and StarCoder) with parameter scales ranging from 350M to 33B, we evaluate robustness from dual perspectives: adversarial attacks on input prompts and noise perturbations on model architecture. Our findings challenge conventional wisdom by demonstrating that quantized LLMs often exhibit superior robustness compared to their full-precision counterparts, with 51.59% versus 42.86% of our adversarial experiments showing better resilience in quantized LLMs. Similarly, our noise perturbation experiments also confirm that LLMs after quantitation generally withstand higher levels of weight disturbances. These results suggest that quantization not only reduces computational requirements but can actually enhance LLMs' reliability in code generation tasks, providing valuable insights for developing more robust and efficient LLM deployment strategies.

Key facts. Cited by 3 papers in the map (data through 14 Oct 2026). Builds on 48 of its 66 references that are in the map. First posted on arXiv 28 Jun 2025.

Builds on

48 of 66 references.

References · 48

  1. 2024The Llama 3 Herd of Modelscited by 14,715
  2. 2015Distilling the Knowledge in a Neural Networkcited by 10,324
  3. 2021Evaluating Large Language Models Trained on Codecited by 8,320
  4. 2021Program Synthesis with Large Language Modelscited by 3,637
  5. 2023QLoRA: Efficient Finetuning of Quantized LLMscited by 3,418
  6. 2019Benchmarking Neural Network Robustness to Common Corruptions and Perturbationscited by 2,877
  7. 2016A Baseline for Detecting Misclassified and Out-of-Distribution Examples in Neural Networkscited by 2,385
  8. 2023Code Llama: Open Foundation Models for Codecited by 2,139
  9. 2023Is Your Code Generated by ChatGPT Really Correct? Rigorous Evaluation of Large Language Models for Code Generationcited by 1,391
  10. 2023AWQ: Activation-aware Weight Quantization for LLM Compression and Accelerationcited by 1,298
  11. 2022CodeGen: An Open Large Language Model for Code with Multi-Turn Program Synthesiscited by 885
  12. 2018Robustness May Be at Odds with Accuracycited by 880
36 more
  1. 2021A Survey of Quantization Methods for Efficient Neural Network Inferencecited by 815
  2. 2020On Adaptive Attacks to Adversarial Example Defensescited by 555
  3. 2018Quantizing deep convolutional networks for efficient inference: A whitepapercited by 521
  4. 2024StarCoder 2 and The Stack v2: The Next Generationcited by 502
  5. 2021A White Paper on Neural Network Quantizationcited by 472
  6. 20218-bit Optimizers via Block-wise Quantizationcited by 403
  7. 2023Large Language Models for Software Engineering: A Systematic Literature Reviewcited by 399
  8. 2019Q-BERT: Hessian Based Ultra Low Precision Quantization of BERTcited by 359
  9. 2024DeepSeek-Coder-V2: Breaking the Barrier of Closed-Source Models in Code Intelligencecited by 331
  10. 2021Post-Training Quantization for Vision Transformercited by 278
  11. 2023Atom: Low-bit Quantization for Efficient and Accurate LLM Servingcited by 272
  12. 2021Pruning and Quantization for Deep Neural Network Acceleration: A Surveycited by 263
  13. 2020Attacks Which Do Not Kill Training Make Adversarial Learning Strongercited by 243
  14. 2023Full Stack Optimization of Transformer Inference: a Surveycited by 80
  15. 2023A Large-Scale Survey on the Usability of AI Programming Assistants: Successes and Challengescited by 75
  16. 2024Exploiting LLM Quantizationcited by 65
  17. 2023On the Robustness of Code Generation Techniques: An Empirical Study on GitHub Copilotcited by 64
  18. 2022CodeAttack: Code-Based Adversarial Attacks for Pre-trained Programming Language Modelscited by 53
  19. 2023On Robustness of Prompt-based Semantic Parsing with Large Pre-trained Language Model: An Empirical Study on Codexcited by 41
  20. 2020A Systematic Literature Review on the Use of Deep Learning in Software Engineering Researchcited by 35
  21. 2020Analyzing the Noise Robustness of Deep Neural Networkscited by 31
  22. 2023Exploring Parameter-Efficient Fine-Tuning Techniques for Code Generation with Large Language Modelscited by 28
  23. 2024Robustness, Security, Privacy, Explainability, Efficiency, and Usability of Large Language Models for Codecited by 28
  24. 2023LORD: Low Rank Decomposition Of Monolingual Code LLMs For One-Shot Compressioncited by 26
  25. 2024What Makes Quantization for Large Language Models Hard? An Empirical Study from the Lens of Perturbationcited by 23
  26. 2024Noisy Neighbors: Efficient membership inference attacks against LLMscited by 21
  27. 2024ComplexCodeEval: A Benchmark for Evaluating Large Code Models on More Complex Codecited by 19
  28. 2023Exploring the Robustness of Large Language Models for Solving Programming Problemscited by 16
  29. 2023KNOD: Domain Knowledge Distilled Tree Decoder for Automated Program Repaircited by 13
  30. 2024CoderUJB: An Executable and Unified Java Benchmark for Practical Programming Scenarioscited by 11
  31. 2024Code Generation and Algorithmic Problem Solving Using Llama 3.1 405Bcited by 7
  32. 2024Context Conquers Parameters: Outperforming Proprietary LLM in Commit Message Generationcited by 6
  33. 2023Enhancing Robustness of AI Offensive Code Generators via Data Augmentationcited by 3
  34. 2024Demonstration Attack against In-Context Learning for Code Intelligencecited by 3
  35. 2025Resource-Efficient & Effective Code Summarizationcited by 3
  36. 2023Transfer Attacks and Defenses for Large Language Models on Coding Taskscited by 2

Built on by

Cited by year (2026 to 14 Oct)

Citing papers per year: 2025: 1; 2026: 2.

3 papers.

Similar, not cited

Close in wording, no citation either way

  1. 2025Why Do Some Inputs Break Low-Bit LLM Quantization?
  2. 2025AdversariaLLM: A Unified and Modular Toolbox for LLM Robustness Research
  3. 2026Reliability Scaling Laws for Quantized Large Language Models
  4. 2024A Comprehensive Evaluation of Quantization Strategies for Large Language Models
  5. 2024Low-Bit Quantization Favors Undertrained LLMs: Scaling Laws for Quantized LLMs with 100T Training Tokens
  6. 2025Turning LLM Activations Quantization-Friendly
  7. 2026The Structure of Quantization Damage in LLMs: Why the Next Bit Should Be Spent Globally
  8. 2026Quantization Undoes Alignment: Bias Emergence in Compressed LLMs Across Models and Precision Levels