MetaTPTrans: A Meta Learning Approach for Multilingual Code Representation Learning

Authors

  • Weiguo Pian University of Luxembourg
  • Hanyu Peng Baidu Inc.
  • Xunzhu Tang University of Luxembourg
  • Tiezhu Sun University of Luxembourg
  • Haoye Tian University of Luxembourg
  • Andrew Habib University of Luxembourg
  • Jacques Klein University of Luxembourg
  • Tegawendé F. Bissyandé University of Luxembourg Université Virtuelle du Burkina Faso

DOI:

https://doi.org/10.1609/aaai.v37i4.25654

Keywords:

APP: Software Engineering, ML: Applications

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. 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.

Downloads

Published

2023-06-26

How to Cite

Pian, W., Peng, H., Tang, X., Sun, T., Tian, H., Habib, A., … Bissyandé, T. F. (2023). MetaTPTrans: A Meta Learning Approach for Multilingual Code Representation Learning. Proceedings of the AAAI Conference on Artificial Intelligence, 37(4), 5239–5247. https://doi.org/10.1609/aaai.v37i4.25654

Issue

Section

AAAI Technical Track on Domain(s) of Application