mlsanityData to 7 Oct 2026

ReCode: Robustness Evaluation of Code Generation Models

arXiv 2212.10264 ↗First posted 20 Dec 2022cs.LG cs.CL cs.SEcited by 100

Not on the map. Why?

Abstract (arXiv)

Code generation models have achieved impressive performance. However, they tend to be brittle as slight edits to a prompt could lead to very different generations; these robustness properties, critical for user experience when deployed in real-life applications, are not well understood. Most existing works on robustness in text or code tasks have focused on classification, while robustness in generation tasks is an uncharted area and to date there is no comprehensive benchmark for robustness in code generation. In this paper, we propose ReCode, a comprehensive robustness evaluation benchmark for code generation models. We customize over 30 transformations specifically for code on docstrings, function and variable names, code syntax, and code format. They are carefully designed to be natural in real-life coding practice, preserve the original semantic meaning, and thus provide multifaceted assessments of a model's robustness performance. With human annotators, we verified that over 90% of the perturbed prompts do not alter the semantic meaning of the original prompt. In addition, we define robustness metrics for code generation models considering the worst-case behavior under each type of perturbation, taking advantage of the fact that executing the generated code can serve as objective evaluation. We demonstrate ReCode on SOTA models using HumanEval, MBPP, as well as function completion tasks derived from them. Interesting observations include: better robustness for CodeGen over InCoder and GPT-J; models are most sensitive to syntax perturbations; more challenging robustness evaluation on MBPP over HumanEval.

Key facts. Cited by 100 papers in the map (data through 7 Oct 2026). Builds on 26 of its 39 references that are in the map. First posted on arXiv 20 Dec 2022.

Builds on

26 of 39 references.

References · 26

  1. 2021Evaluating Large Language Models Trained on Codecited by 8,053
  2. 2021Program Synthesis with Large Language Modelscited by 3,509
  3. 2022Beyond the Imitation Game: Quantifying and extrapolating the capabilities of language modelscited by 1,970
  4. 2022Competition-Level Code Generation with AlphaCodecited by 1,427
  5. 2020CodeBERT: A Pre-Trained Model for Programming and Natural Languagescited by 1,286
  6. 2020MPNet: Masked and Permuted Pre-training for Language Understandingcited by 973
  7. 2021CodeT5: Identifier-aware Unified Pre-trained Encoder-Decoder Models for Code Understanding and Generationcited by 890
  8. 2019Adversarial NLI: A New Benchmark for Natural Language Understandingcited by 798
  9. 2021CodeXGLUE: A Machine Learning Benchmark Dataset for Code Understanding and Generationcited by 732
  10. 2019Is BERT Really Robust? A Strong Baseline for Natural Language Attack on Text Classification and Entailmentcited by 663
  11. 2020GraphCodeBERT: Pre-training Code Representations with Data Flowcited by 600
  12. 2022InCoder: A Generative Model for Code Infilling and Synthesiscited by 492
14 more
  1. 2020BERT-ATTACK: Adversarial Attack Against BERT Using BERTcited by 488
  2. 2021Dynabench: Rethinking Benchmarking in NLPcited by 447
  3. 2021Unified Pre-training for Program Understanding and Generationcited by 361
  4. 2021Adversarial GLUE: A Multi-Task Benchmark for Robustness Evaluation of Language Modelscited by 227
  5. 2022Multi-lingual Evaluation of Code Generation Modelscited by 158
  6. 2021NL-Augmenter: A Framework for Task-Sensitive Natural Language Augmentationcited by 72
  7. 2022Natural Attack for Pre-trained Models of Codecited by 72
  8. 2022NatGen: Generative pre-training by "Naturalizing" source codecited by 53
  9. 2022CodeAttack: Code-Based Adversarial Attacks for Pre-trained Programming Language Modelscited by 48
  10. 2019Word-level Textual Adversarial Attacking as Combinatorial Optimizationcited by 37
  11. 2020Adversarial Robustness for Codecited by 36
  12. 2021Adversarial Robustness of Deep Code Comment Generationcited by 22
  13. 2021Automatic Construction of Evaluation Suites for Natural Language Generation Datasetscited by 18
  14. 2019Improving Neural Machine Translation Robustness via Data Augmentation: Beyond Back Translationcited by 16

Built on by

Cited by year (2026 to 7 Oct)

Citing papers per year: 2023: 14; 2024: 31; 2025: 35; 2026: 20.

100 papers.

Sort:

By area:

  1. 2024LiveCodeBench: Holistic and Contamination Free Evaluation of Large Language Models for Codecited by 1,906
  2. 2024A Survey on Large Language Models for Code Generationcited by 646
  3. 2024BigCodeBench: Benchmarking Code Generation with Diverse Function Calls and Complex Instructionscited by 527
  4. 2023Large Language Models for Software Engineering: A Systematic Literature Reviewcited by 389
  5. 2024CRUXEval: A Benchmark for Code Reasoning, Understanding and Executioncited by 294
  6. 2023CrossCodeEval: A Diverse and Multilingual Benchmark for Cross-File Code Completioncited by 181
  7. 2024Granite Code Models: A Family of Open Foundation Models for Code Intelligencecited by 116
  8. 2024Enhancing Code LLMs with Reinforcement Learning in Code Generation: A Surveycited by 82
  9. 2024Language Models Still Struggle to Zero-shot Reason about Time Seriescited by 81
  10. 2024EffiBench: Benchmarking the Efficiency of Automatically Generated Codecited by 62
  11. 2024CodeUltraFeedback: An LLM-as-a-Judge Dataset for Aligning Large Language Models to Coding Preferencescited by 56
  12. 2023Bias Testing and Mitigation in LLM-based Code Generationcited by 53
38 more
  1. 2024A Performance Study of LLM-Generated Code on Leetcodecited by 48
  2. 2024Model Merging and Safety Alignment: One Bad Model Spoils the Bunchcited by 41
  3. 2023Measuring The Impact Of Programming Language Distributioncited by 32
  4. 2024CodeJudge-Eval: Can Large Language Models be Good Judges in Code Understanding?cited by 29
  5. 2024The RealHumanEval: Evaluating Large Language Models' Abilities to Support Programmerscited by 28
  6. 2025ProjectEval: A Benchmark for Programming Agents Automated Evaluation on Project-Level Code Generationcited by 26
  7. 2024MHPP: Exploring the Capabilities and Limitations of Language Models Beyond Basic Code Generationcited by 25
  8. 2023BioCoder: A Benchmark for Bioinformatics Code Generation with Large Language Modelscited by 24
  9. 2024Astraios: Parameter-Efficient Instruction Tuning Code Large Language Modelscited by 23
  10. 2024IRCoder: Intermediate Representations Make Language Models Robust Multilingual Code Generatorscited by 21
  11. 2026Large Language Model Reasoning Failurescited by 20
  12. 2024NLPerturbator: Studying the Robustness of Code LLMs to Natural Language Variationscited by 19
  13. 2023Exploring the Robustness of Large Language Models for Solving Programming Problemscited by 16
  14. 2024Do Large Code Models Understand Programming Concepts? Counterfactual Analysis for Code Predicatescited by 14
  15. 2025CodeCrash: Exposing LLM Fragility to Misleading Natural Language in Code Reasoningcited by 14
  16. 2024What can Large Language Models Capture about Code Functional Equivalence?cited by 13
  17. 2025On Benchmarking Code LLMs for Android Malware Analysiscited by 12
  18. 2025T-SHIRT: Token-Selective Hierarchical Data Selection for Instruction Tuningcited by 12
  19. 2024Software Vulnerability and Functionality Assessment using LLMscited by 11
  20. 2025CoDet-M4: Detecting Machine-Generated Code in Multi-Lingual, Multi-Generator and Multi-Domain Settingscited by 11
  21. 2023SEED: Domain-Specific Data Curation With Large Language Modelscited by 10
  22. 2023Exploiting Code Symmetries for Learning Program Semanticscited by 9
  23. 2023Towards Causal Deep Learning for Vulnerability Detectioncited by 9
  24. 2023Pitfalls in Language Models for Code Intelligence: A Taxonomy and Surveycited by 9
  25. 2023Turbulence: Systematically and Automatically Testing Instruction-Tuned Large Language Models for Codecited by 9
  26. 2024Token Alignment via Character Matching for Subword Completioncited by 9
  27. 2025How Diversely Can Language Models Solve Problems? Exploring the Algorithmic Diversity of Model-Generated Codecited by 9
  28. 2024PPM: Automated Generation of Diverse Programming Problems for Benchmarking Code Generation Modelscited by 7
  29. 2025Are Large Language Models Robust in Understanding Code Against Semantics-Preserving Mutations?cited by 7
  30. 2025RANGER -- Repository-Level Agent for Graph-Enhanced Retrievalcited by 7
  31. 2025Memorize or Generalize? Evaluating LLM Code Generation with Code Rewritingcited by 6
  32. 2024Is Functional Correctness Enough to Evaluate Code Language Models? Exploring Diversity of Generated Codescited by 5
  33. 2024Dynamic Intelligence Assessment: Benchmarking LLMs on the Road to AGI with a Focus on Model Confidencecited by 5
  34. 2025RobuNFR: Evaluating the Robustness of Large Language Models on Non-Functional Requirements Aware Code Generationcited by 5
  35. 2025Large Language Models for Validating Network Protocol Parserscited by 5
  36. 2025Evaluating and Improving Robustness in Large Language Models: A Survey and Future Directionscited by 5
  37. 2024CodeFort: Robust Training for Code Generation Modelscited by 4
  38. 2025XOXO: Stealthy Cross-Origin Context Poisoning Attacks against AI Coding Assistantscited by 4

50 most cited of 100 All 100 (JSON)