SEAIApr 11, 2024

CodeFort: Robust Training for Code Generation Models

arXiv:2405.01567v224 citationsh-index: 21EMNLP
Originality Incremental advance
AI Analysis

This addresses a crucial issue for users of code generation models in real-world applications by enhancing robustness, though it is incremental as it builds on existing methods.

The paper tackles the problem of code generation models being non-robust to small perturbations, which degrades performance, and proposes CodeFort to improve robustness, increasing average robust pass rates from 14.79 to 21.74 and reducing robustness drop rates from 95.02% to 54.95%.

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.

Foundations

The foundational work for this paper's niche, ranked by how specifically the neighbourhood builds on it — not by global fame.

Your Notes