MetaTPTrans: A Meta Learning Approach for Multilingual Code Representation Learning

Weiguo Pian, Hanyu Peng, Xunzhu Tang, Tiezhu Sun, Haoye Tian +3 more
6/13/2022
cs.SEcs.AI

Official code: weiguoPian/MetaTPTrans (10 stars, Python, last commit 2023-01-27).

Abstract

Representation learning of source code is essential for applying machine learning to software engineering tasks. Learning code representation from a multilingual source code dataset has been shown to be more effective than learning from single-language datasets separately, since more training data from multilingual dataset improves the model's ability to extract language-agnostic information from source code.

Show full abstract

However, existing multilingual training overlooks the language-specific information which is crucial for modeling source code across different programming languages, while only focusing on learning a unified model with shared parameters among different languages for language-agnostic information modeling. To address this problem, we propose MetaTPTrans, a meta learning approach for multilingual code representation learning. MetaTPTrans generates different parameters for the feature extractor according to the specific programming language type of the input code snippet, enabling the model to learn both language-agnostic and language-specific information with dynamic parameters in the feature extractor. We conduct experiments on the code summarization and code completion tasks to verify the effectiveness of our approach. The results demonstrate the superiority of our approach with significant improvements on state-of-the-art baselines.

View on arXivView PDF

Code Implementations(1)

[AAAI 2023] MetaTPTrans: A Meta Learning Approach for Multilingual Code Representation Learning

100Python, ShellMay 3, 20223 years ago

Similar Papers

Cite this paper

@article{pian2022metatptrans,
  title  = {MetaTPTrans: A Meta Learning Approach for Multilingual Code Representation Learning},
  author = {Weiguo Pian and Hanyu Peng and Xunzhu Tang and Tiezhu Sun and Haoye Tian and Andrew Habib and Jacques Klein and Tegawendé F. Bissyandé},
  year   = {2022},
  eprint = {2206.06460},
  archivePrefix = {arXiv},
  url    = {https://arxiv.org/abs/2206.06460}
}

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/2206.06460.svg)](https://codeofpaper.com/paper/2206.06460)

Discussion