CodeFort: Robust Training for Code Generation Models
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.
Code (0)
등록된 구현이 없습니다.
Tasks
Code GenerationContrastive LearningData AugmentationMethods 이 논문이 사용한 방법론
Similar Papers 제목 키워드 기반
CodeForTheChange at SemEval-2019 Task 8: Skip-Thoughts for Fact Checking in Community Question Answering
The strengths of the scalable gradient tree boosting algorithm, XGBoost and distributed sentence encoder, Skip-Thought Vectors are not explored yet by the cQA research community. We tried to apply and combine these two e…
Community Question AnsweringFact CheckingFeature EngineeringQuestion Answering+1Code Less, Align More: Efficient LLM Fine-tuning for Code Generation with Data Pruning
Recent work targeting large language models (LLMs) for code generation demonstrated that increasing the amount of training data through synthetic code generation often leads to exceptional performance. In this paper we e…
Code GenerationCERT: Continual Pre-Training on Sketches for Library-Oriented Code Generation
Code generation is a longstanding challenge, aiming to generate a code snippet based on a natural language description. Usually, expensive text-code paired data is essential for training a code generation model. Recently…
Code GenerationLibrary-Oriented Code GenerationBridging Generation and Training: A Systematic Review of Quality Issues in LLMs for Code
Large language models (LLMs) frequently generate defective outputs in code generation tasks, ranging from logical bugs to security vulnerabilities. While these generation failures are often treated as model-level limitat…
Code GenerationIncorporating Domain Knowledge through Task Augmentation for Front-End JavaScript Code Generation
Code generation aims to generate a code snippet automatically from natural language descriptions. Generally, the mainstream code generation methods rely on a large amount of paired training data, including both the natur…
Code Generation