基于适配器的知识迁移中预训练语言模型的利用:软件工程领域
Utilization of Pre-trained Language Model for Adapter-based Knowledge Transfer in Software Engineering
AI总结:
本研究探索利用适配器在软件工程任务中迁移预训练语言模型知识,证明其高效性并优于传统微调,为构建紧凑模型开辟新方向。
摘要:
软件工程(SE)领域的预训练语言模型(PLM),如CodeBERT,是在大型代码语料库上进行预训练的,其学到的知识通过PLM的微调已成功迁移到下游任务(如代码克隆检测)中。在自然语言处理(NLP)领域,另一种迁移PLM知识的方法是通过使用适配器(adapter)——一种插入到PLM中的紧凑且参数高效的模块。尽管适配器在许多基于NLP的下游任务中显示出有前景的结果,但它们在基于SE的下游任务中的应用和探索仍然有限。\n在这里,我们研究了在多个下游任务(包括完形填空测试、代码克隆检测和代码摘要)中使用适配器进行知识迁移。这些适配器在代码语料库上训练,并插入到在英语语料库或代码语料库上预训练的PLM中。我们分别将这些PLM称为NL-PLM和C-PLM。我们观察到,使用NL-PLM相比没有适配器的PLM,结果有所改善,这表明适配器能够从NL-PLM迁移并利用有用的知识到SE任务中。结果有时与C-PLM相当或超过C-PLM,同时在参数数量和训练时间方面更为高效。有趣的是,插入到C-PLM中的适配器通常比传统微调的C-PLM产生更好的结果。我们的结果为构建更紧凑的SE任务模型开辟了新方向。
英文摘要:
Software Engineering (SE) Pre-trained Language Models (PLMs), such as CodeBERT, are pre-trained on large code corpora, and their learned knowledge has shown success in transferring into downstream tasks (e.g., code clone detection) through the fine-tuning of PLMs. In Natural Language Processing (NLP), an alternative in transferring the knowledge of PLMs is explored through the use of adapter, a compact and parameter efficient module that is inserted into a PLM. Although the use of adapters has shown promising results in many NLP-based downstream tasks, their application and exploration in SE-based downstream tasks are limited. Here, we study the knowledge transfer using adapters on multiple down-stream tasks including cloze test, code clone detection, and code summarization. These adapters are trained on code corpora and are inserted into a PLM that is pre-trained on English corpora or code corpora. We called these PLMs as NL-PLM and C-PLM, respectively. We observed an improvement in results using NL-PLM over a PLM that does not have adapters, and this suggested that adapters can transfer and utilize useful knowledge from NL-PLM to SE tasks. The results are sometimes on par with or exceed the results of C-PLM; while being more efficient in terms of the number of parameters and training time. Interestingly, adapters inserted into a C-PLM generally yield better results than a traditional fine-tuned C-PLM. Our results open new directions to build more compact models for SE tasks.
机构、总结、中文摘要均由AI分析而来,可能存在错误,请以论文正文为准。