One Adapter for All Programming Languages? Adapter Tuning for Code Search and Summarization

Deze Wang, Boxing Chen, Shanshan Li, Wei Luo, Shaoliang Peng +2 more
3/28/2023
cs.SEcs.AI

No official code found. Best implementation: wangdeze18/Multilingual-Adapter-for-SE (17 stars, last commit 2022-12-09).

Abstract

As pre-trained models automate many code intelligence tasks, a widely used paradigm is to fine-tune a model on the task dataset for each programming language. A recent study reported that multilingual fine-tuning benefits a range of tasks and models. However, we find that multilingual fine-tuning leads to performance degradation on recent models UniXcoder and CodeT5. To alleviate the potentially catastrophic forgetting issue in multilingual models, we fix all pre-trained model parameters, insert the parameter-efficient structure adapter, and fine-tune it. Updating only 0.6\% of the overall parameters compared to full-model fine-tuning for each programming language, adapter tuning yields consistent improvements on code search and summarization tasks, achieving state-of-the-art results. In addition, we experimentally show its effectiveness in cross-lingual and low-resource scenarios. Multilingual fine-tuning with 200 samples per programming language approaches the results fine-tuned with the entire dataset on code summarization. Our experiments on three probing tasks show that adapter tuning significantly outperforms full-model fine-tuning and effectively overcomes catastrophic forgetting.

View on arXivView PDF

Code Implementations(1)

171Shell, Python3 years ago

Similar Papers

Cite this paper

@article{wang2023adapter,
  title  = {One Adapter for All Programming Languages? Adapter Tuning for Code Search and Summarization},
  author = {Deze Wang and Boxing Chen and Shanshan Li and Wei Luo and Shaoliang Peng and Wei Dong and Xiangke Liao},
  year   = {2023},
  eprint = {2303.15822},
  archivePrefix = {arXiv},
  url    = {http://arxiv.org/abs/2303.15822v1}
}

Add a badge to your README

Shows whether official code is linked for this paper.

Code of Paper badge
[![Code of Paper](https://codeofpaper.com/badge/2303.15822.svg)](https://codeofpaper.com/paper/2303.15822)

Discussion