mlsanityData to 7 Oct 2026

NLPerturbator: Studying the Robustness of Code LLMs to Natural Language Variations

arXiv 2406.19783 ↗First posted 28 Jun 2024cs.SE cs.CLcited by 19

Not on the map. Why?

Abstract (arXiv)

Large language models (LLMs) achieve promising results in code generation based on a given natural language description. They have been integrated into open-source projects and commercial products to facilitate daily coding activities. The natural language description in the prompt is crucial for LLMs to comprehend users' requirements. Prior studies uncover that LLMs are sensitive to the changes in the prompts, including slight changes that look inconspicuous. However, the natural language descriptions often vary in real-world scenarios (e.g., different formats, grammar, and wording). Prior studies on the robustness of LLMs are often based on random perturbations and such perturbations may not actually happen. In this paper, we conduct a comprehensive study to investigate how are code LLMs robust to variations of natural language description in real-world scenarios. We summarize 18 categories of perturbations of natural language and 3 combinations of co-occurred categories based on our literature review and an online survey with practitioners. We propose an automated framework, NLPerturbator, which can perform perturbations of each category given a set of prompts. Through a series of experiments on code generation using six code LLMs, we find that the perturbed prompts can decrease the performance of code generation by a considerable margin (e.g., up to 21.2%, and 4.8% to 6.1% on average). Our study highlights the importance of enhancing the robustness of LLMs to real-world variations in the prompts, as well as the essentiality of attentively constructing the prompts.

Key facts. Cited by 19 papers in the map (data through 7 Oct 2026). Builds on 40 of its 68 references that are in the map. First posted on arXiv 28 Jun 2024.

Builds on

40 of 68 references.

References · 40

  1. 2023Llama 2: Open Foundation and Fine-Tuned Chat Modelscited by 12,865
  2. 2021Evaluating Large Language Models Trained on Codecited by 8,053
  3. 2021Program Synthesis with Large Language Modelscited by 3,509
  4. 2023SWE-bench: Can Language Models Resolve Real-World GitHub Issues?cited by 3,193
  5. 2023Code Llama: Open Foundation Models for Codecited by 2,105
  6. 2024LiveCodeBench: Holistic and Contamination Free Evaluation of Large Language Models for Codecited by 1,906
  7. 2021CodeT5: Identifier-aware Unified Pre-trained Encoder-Decoder Models for Code Understanding and Generationcited by 890
  8. 2023StarCoder: may the source be with you!cited by 790
  9. 2023WizardCoder: Empowering Code Large Language Models with Evol-Instructcited by 728
  10. 2022InCoder: A Generative Model for Code Infilling and Synthesiscited by 492
  11. 2022CodeRL: Mastering Code Generation through Pretrained Models and Deep Reinforcement Learningcited by 342
  12. 2017Synthetic and Natural Noise Both Break Neural Machine Translationcited by 304
28 more
  1. 2023CodeGeeX: A Pre-Trained Model for Code Generation with Multilingual Benchmarking on HumanEval-Xcited by 294
  2. 2021Adversarial GLUE: A Multi-Task Benchmark for Robustness Evaluation of Language Modelscited by 227
  3. 2020IntelliCode Compose: Code Generation Using Transformercited by 225
  4. 2023PromptRobust: Towards Evaluating the Robustness of Large Language Models on Adversarial Promptscited by 218
  5. 2023On the Robustness of ChatGPT: An Adversarial and Out-of-distribution Perspectivecited by 208
  6. 2022DocPrompting: Generating Code by Retrieving the Docscited by 151
  7. 2023CodeGen2: Lessons for Training LLMs on Programming and Natural Languagescited by 124
  8. 2022ReCode: Robustness Evaluation of Code Generation Modelscited by 100
  9. 2016Latent Predictor Networks for Code Generationcited by 73
  10. 2023Can ChatGPT replace StackOverflow? A Study on Robustness and Reliability of Large Language Model Code Generationcited by 72
  11. 2023Large Language Models are Few-Shot Summarizers: Multi-Intent Comment Generation via In-Context Learningcited by 71
  12. 2023On the Robustness of Code Generation Techniques: An Empirical Study on GitHub Copilotcited by 64
  13. 2019TreeGen: A Tree-Based Transformer Architecture for Code Generationcited by 58
  14. 2024Reasoning Runtime Behavior of a Program with LLM: How Far Are We?cited by 44
  15. 2023On Robustness of Prompt-based Semantic Parsing with Large Pre-trained Language Model: An Empirical Study on Codexcited by 41
  16. 2022Fill in the Blank: Context-aware Automated Text Input Generation for Mobile GUI Testingcited by 36
  17. 2023In ChatGPT We Trust? Measuring and Characterizing the Reliability of ChatGPTcited by 35
  18. 2024SOEN-101: Code Generation by Emulating Software Process Models Using Large Language Model Agentscited by 34
  19. 2023Assessing Hidden Risks of LLMs: An Empirical Study on Robustness, Consistency, and Credibilitycited by 28
  20. 2023AceCoder: Utilizing Existing Code to Enhance Code Generationcited by 25
  21. 2023Competition-Level Problems are Effective LLM Evaluatorscited by 25
  22. 2021Adversarial Robustness of Deep Code Comment Generationcited by 22
  23. 2023Did We Miss Something Important? Studying and Exploring Variable-Aware Log Abstractioncited by 19
  24. 2023Exploring the Robustness of Large Language Models for Solving Programming Problemscited by 16
  25. 2021Studying Duplicate Logging Statements and Their Relationships with Code Clonescited by 5
  26. 2021On the Naming of Methods: A Survey of Professional Developerscited by 4
  27. 2023Are They All Good? Studying Practitioners' Expectations on the Readability of Log Messagescited by 4
  28. 2023AutoLog: A Log Sequence Synthesis Framework for Anomaly Detectioncited by 2

Built on by

Cited by year (2026 to 7 Oct)

Citing papers per year: 2025: 9; 2026: 10.

19 papers.

Sort:

By area:

  1. 2025CodeCrash: Exposing LLM Fragility to Misleading Natural Language in Code Reasoningcited by 14
  2. 2025Memorize or Generalize? Evaluating LLM Code Generation with Code Rewritingcited by 6
  3. 2025RobuNFR: Evaluating the Robustness of Large Language Models on Non-Functional Requirements Aware Code Generationcited by 5
  4. 2025Code Roulette: How Prompt Variability Affects LLM Code Generationcited by 4
  5. 2026Evaluating Robustness of Large Language Models in Enterprise Applications: Benchmarks for Perturbation Consistency Across Formats and Languagescited by 4
  6. 2025Understanding and Bridging the Planner-Coder Gap: A Systematic Study on the Robustness of Multi-Agent Systems for Code Generationcited by 3
  7. 2026Defective Task Descriptions in LLM-Based Code Generation: Detection and Analysiscited by 2
  8. 2025A Representation Level Analysis of NMT Model Robustness to Grammatical Errorscited by 1
  9. 2025Prompt Stability in Code LLMs: Measuring Sensitivity across Emotion- and Personality-Driven Variationscited by 1
  10. 2025LLM Assisted Coding with Metamorphic Specification Mutation Agentcited by 1
  11. 2026Using Small Language Models to Reverse-Engineer Machine Learning Pipelines Structurescited by 1
  12. 2026Minimal Prompt Perturbations Lead to Code Vulnerabilities: Prompt Fragility and Hidden-State Signals in Coding LLMscited by 1
7 more
  1. 2026Detecting Differences Is Not Understanding Structure: Large Language Models Fail at Graph Isomorphismcited by 1
  2. 2025ML For Hardware Design Interpretability: Challenges and Opportunitiescited by 0
  3. 2026Characterizing Paraphrase-Induced Failures in Lean 4 Autoformalizationcited by 0
  4. 2026SWE-NFI: Studying and Benchmarking Coding Agents for Non-Functional Improvementscited by 0
  5. 2026Memorization Diagnostics for Code LLMs Should be Scale-Awarecited by 0
  6. 2026RealSWE: A Compositional Evaluation of Coding Agents under Realistic User Requestscited by 0
  7. 2026Noisy Test-Time Reinforcement Learning for Code LLMscited by 0