GenCode: A Generic Data Augmentation Framework for Boosting Deep Learning-Based Code Understanding

Fuente: arXiv
Guardado en:
Detalles Bibliográficos
Autores principales: Dong, Zeming, Hu, Qiang, Xie, Xiaofei, Cordy, Maxime, Papadakis, Mike, Traon, Yves Le, Zhao, Jianjun
Formato: Preprint
Publicado: 2024
Materias:
Acceso en línea:
Etiquetas: Agregar Etiqueta
Sin Etiquetas, Sea el primero en etiquetar este registro!
_version_ 1866912853616754688
author Dong, Zeming
Hu, Qiang
Xie, Xiaofei
Cordy, Maxime
Papadakis, Mike
Traon, Yves Le
Zhao, Jianjun
author_facet Dong, Zeming
Hu, Qiang
Xie, Xiaofei
Cordy, Maxime
Papadakis, Mike
Traon, Yves Le
Zhao, Jianjun
contents Pre-trained code models lead the era of code intelligence, with multiple models designed with impressive performance. However, one important problem, data augmentation for code data that automatically helps developers prepare training data lacks study in this field. In this paper, we introduce a generic data augmentation framework, GenCode, to enhance the training of code understanding models. Simply speaking, GenCode follows a generation-and-selection paradigm to prepare useful training code data. Specifically, it employs code augmentation techniques to generate new code candidates first and then identifies important ones as the training data by influence scores. To evaluate the effectiveness of GenCode, we conduct experiments on four code understanding tasks (e.g., code clone detection) and three pre-trained code models (e.g., CodeT5) and two recent released code-specific Large Language Models (LLMs) (e.g., Qwen2.5-Coder). Compared to the state-of-the-art (SOTA) code augmentation method MixCode, GenCode produces pre-trained code models with 2.92% higher accuracy and 4.90% adversarial robustness on average. For code-specific LLMs, GenCode achieves an average improvement of 0.93% in accuracy and 0.98% in natural robustness.
format Preprint
id arxiv_https___arxiv_org_abs_2402_15769
institution arXiv
publishDate 2024
record_format arxiv
spellingShingle GenCode: A Generic Data Augmentation Framework for Boosting Deep Learning-Based Code Understanding
Dong, Zeming
Hu, Qiang
Xie, Xiaofei
Cordy, Maxime
Papadakis, Mike
Traon, Yves Le
Zhao, Jianjun
Software Engineering
Artificial Intelligence
Pre-trained code models lead the era of code intelligence, with multiple models designed with impressive performance. However, one important problem, data augmentation for code data that automatically helps developers prepare training data lacks study in this field. In this paper, we introduce a generic data augmentation framework, GenCode, to enhance the training of code understanding models. Simply speaking, GenCode follows a generation-and-selection paradigm to prepare useful training code data. Specifically, it employs code augmentation techniques to generate new code candidates first and then identifies important ones as the training data by influence scores. To evaluate the effectiveness of GenCode, we conduct experiments on four code understanding tasks (e.g., code clone detection) and three pre-trained code models (e.g., CodeT5) and two recent released code-specific Large Language Models (LLMs) (e.g., Qwen2.5-Coder). Compared to the state-of-the-art (SOTA) code augmentation method MixCode, GenCode produces pre-trained code models with 2.92% higher accuracy and 4.90% adversarial robustness on average. For code-specific LLMs, GenCode achieves an average improvement of 0.93% in accuracy and 0.98% in natural robustness.
title GenCode: A Generic Data Augmentation Framework for Boosting Deep Learning-Based Code Understanding
topic Software Engineering
Artificial Intelligence
url https://arxiv.org/abs/2402.15769