CodeFort: Robust Training for Code Generation Models

Fuente: arXiv
Salvato in:
Dettagli Bibliografici
Autori principali: Zhang, Yuhao, Wang, Shiqi, Qian, Haifeng, Wang, Zijian, Shang, Mingyue, Liu, Linbo, Gouda, Sanjay Krishna, Ray, Baishakhi, Ramanathan, Murali Krishna, Ma, Xiaofei, Deoras, Anoop
Natura: Preprint
Pubblicazione: 2024
Soggetti:
Accesso online:
Tags: Aggiungi Tag
Nessun Tag, puoi essere il primo ad aggiungerne!!
_version_ 1866929563697676288
author Zhang, Yuhao
Wang, Shiqi
Qian, Haifeng
Wang, Zijian
Shang, Mingyue
Liu, Linbo
Gouda, Sanjay Krishna
Ray, Baishakhi
Ramanathan, Murali Krishna
Ma, Xiaofei
Deoras, Anoop
author_facet Zhang, Yuhao
Wang, Shiqi
Qian, Haifeng
Wang, Zijian
Shang, Mingyue
Liu, Linbo
Gouda, Sanjay Krishna
Ray, Baishakhi
Ramanathan, Murali Krishna
Ma, Xiaofei
Deoras, Anoop
contents 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.
format Preprint
id arxiv_https___arxiv_org_abs_2405_01567
institution arXiv
publishDate 2024
record_format arxiv
spellingShingle CodeFort: Robust Training for Code Generation Models
Zhang, Yuhao
Wang, Shiqi
Qian, Haifeng
Wang, Zijian
Shang, Mingyue
Liu, Linbo
Gouda, Sanjay Krishna
Ray, Baishakhi
Ramanathan, Murali Krishna
Ma, Xiaofei
Deoras, Anoop
Software Engineering
Artificial Intelligence
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.
title CodeFort: Robust Training for Code Generation Models
topic Software Engineering
Artificial Intelligence
url https://arxiv.org/abs/2405.01567