mlsanityData to 14 Oct 2026

CodeFort: Robust Training for Code Generation Models

arXiv 2405.01567 ↗First posted 11 Apr 2024cs.SE cs.AIcited by 4

Not on the map. Why?

Abstract (arXiv)

Code generation models are not robust to small perturbations, which often lead to incorrect generations and significantly degrade the performance of these models. Although improving the robustness of code generation models is crucial to enhancing user experience in real-world applications, existing research efforts do not address this issue. To fill this gap, we propose CodeFort, a framework to improve the robustness of code generation models, generalizing a large variety of code perturbations to enrich the training data and enabling various robust training strategies, mixing data augmentation, batch augmentation, adversarial logits pairing, and contrastive learning, all carefully designed to support high-throughput training. Extensive evaluations show that we increase the average robust pass rates of baseline CodeGen models from 14.79 to 21.74. We notably decrease the robustness drop rate from 95.02% to 54.95% against code-syntax perturbations.

Key facts. Cited by 4 papers in the map (data through 14 Oct 2026). Builds on 28 of its 38 references that are in the map. First posted on arXiv 11 Apr 2024.

Builds on

28 of 38 references.

References · 28

  1. 2018BERT: Pre-training of Deep Bidirectional Transformers for Language Understandingcited by 40,399
  2. 2021Evaluating Large Language Models Trained on Codecited by 8,320
  3. 2017Towards Deep Learning Models Resistant to Adversarial Attackscited by 6,415
  4. 2021Program Synthesis with Large Language Modelscited by 3,637
  5. 2019The Curious Case of Neural Text Degenerationcited by 2,916
  6. 2023Code Llama: Open Foundation Models for Codecited by 2,139
  7. 2022CodeGen: An Open Large Language Model for Code with Multi-Turn Program Synthesiscited by 885
  8. 2023StarCoder: may the source be with you!cited by 799
  9. 2023WizardCoder: Empowering Code Large Language Models with Evol-Instructcited by 733
  10. 2022InCoder: A Generative Model for Code Infilling and Synthesiscited by 498
  11. 2022The Stack: 3 TB of permissively licensed source codecited by 359
  12. 2018Adversarial Logit Pairingcited by 224
16 more
  1. 2023CodeGen2: Lessons for Training LLMs on Programming and Natural Languagescited by 125
  2. 2022ReCode: Robustness Evaluation of Code Generation Modelscited by 103
  3. 2020Contrastive Code Representation Learningcited by 76
  4. 2022Natural Attack for Pre-trained Models of Codecited by 75
  5. 2019Adversarial Examples for Models of Codecited by 63
  6. 2022CodeAttack: Code-Based Adversarial Attacks for Pre-trained Programming Language Modelscited by 53
  7. 2020Semantic Robustness of Models of Source Codecited by 45
  8. 2021Multilingual training for Software Engineeringcited by 43
  9. 2020Adversarial Robustness for Codecited by 38
  10. 2019Augment your batch: better training with larger batchescited by 37
  11. 2021Generating Adversarial Computer Programs using Optimized Obfuscationscited by 22
  12. 2021Adversarial Robustness of Deep Code Comment Generationcited by 22
  13. 2022ContraCLM: Contrastive Learning For Causal Language Modelcited by 18
  14. 2023One Adapter for All Programming Languages? Adapter Tuning for Code Search and Summarizationcited by 16
  15. 2023CONCORD: Clone-aware Contrastive Learning for Source Codecited by 5
  16. 2021On Adversarial Robustness of Synthetic Code Generationcited by 3

Built on by

Cited by year (2026 to 14 Oct)

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

4 papers.