An Empirical Investigation on the Performance of Domain Adaptation for T5 Code Completion

An Empirical Investigation on the Performance of Domain Adaptation for T5 Code Completion
复制标题

DOI:
10.1109/saner56733.2023.00073
复制
发表时间:
2023-03
期刊:
2023 IEEE International Conference on Software Analysis, Evolution and Reengineering (SANER)
影响因子:
--
通讯作者:
Daisuke Fukumoto;Yutaro Kashiwa;Toshiki Hirao;Kenji Fujiwara;Hajimu Iida
Daisuke Fukumoto;Yutaro Kashiwa;Toshiki Hirao;Kenji Fujiwara;Hajimu Iida
中科院分区:
其他
文献类型:
--
作者:
Daisuke Fukumoto;Yutaro Kashiwa;Toshiki Hirao;Kenji Fujiwara;Hajimu Iida

文献摘要

相似文献

代码完成的好处是提高编码速度并减少诱导错误的机会。近年来,已经提出了基于DL的代码完成技术。特别是,预训练的模型显示出出色的性能,因为它们可以通过考虑完成之前和之后完成代码。尽管该模型可以生成一组候选代码,但其中一些可能需要由开发人员修改,因为项目可以具有不同的编码规则。在本研究中,要完成适合特定项目的代码来自目标项目的数据。这种微调方法称为do-main适应,通常用于神经机器翻译中。我们的初步实验观察到,与带有室外数据集的微型模型相比,我们适应域的模型可提高完美预测率的5.3%,而编辑距离的3.4%。此外,我们发现,随着存储库的尺寸较大,改进更大。但是,使用小数据集训练的模型几乎没有改善或更糟。
Code completion has the benefit of improving coding speed and reducing the chance of inducing bugs. In recent years, DL-based code completion techniques have been proposed. In particular, pre-trained models have shown outstanding performance because they can complete code by considering the context before and after it is completed. While the model can generate the set of candidate codes, some of those might need to be modified by developers because projects can have different coding rules.In this study, to complete code that fits a specific project appropriately, we train the CodeT5 model with additional data from the target project. This fine-tuning approach is called do-main adaptation, and is often used in neural machine translation. Our preliminary experiment observes that our domain-adapted model improves 5.3% of the perfect prediction rate and, 3.4% of the edit distance rate, compared to the fine-tuned model with the out-of-domain dataset. Furthermore, we discover that the improvement is greater with a larger repository size. The model that is trained with a small dataset, however, hardly improves or performs worse.