vix.ing · top · new · best · stats

CodeFort: Robust Training for Code Generation Models

2024/04/11 by Yuhao Zhang, Zhang, Yuhao, Shiqi Wang +19 · 2 citations
Computer Science · #Artificial Intelligence (cs.AI) #Code (set theory) #Computer science #FOS: Computer and information sciences #Geography #Model-Driven Software Engineering Techniques #Programming language #Software Engineering (cs.SE) #Software Engineering Research #Software Testing and Debugging Techniques #Training (meteorology)

paper · pdf · doi:10.48550/arxiv.2405.01567

published in arXiv (Cornell University) (Cornell University)

openalex publication_date 2024/04/11 · openalex created_date 2025/10/10 · openalex updated_date 2026/07/28

Abstract

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.

Cited by

Related