Skip to main navigation Skip to search Skip to main content

MulCode: A Multi-task Learning Approach for Source Code Understanding

  • Deze Wang
  • , Yue Yu*
  • , Shanshan Li*
  • , Wei Dong
  • , Ji Wang
  • , Liao Qing
  • *Corresponding author for this work
  • National University of Defense Technology
  • Harbin Institute of Technology

Research output: Chapter in Book/Report/Conference proceedingConference contributionpeer-review

Abstract

Recent years have witnessed the significant rise of Deep Learning (DL) techniques applied to source code. Researchers exploit DL for a multitude of tasks and achieve impressive results. However, most tasks are explored separately, resulting in a lack of generalization of the solutions. In this work, we propose MulCode, a multi-task learning approach for source code understanding that learns unified representation space for tasks, with the pre-trained BERT model for the token sequence and the Tree-LSTM model for abstract syntax trees. Furthermore, we integrate two source code views into a hybrid representation via the attention mechanism and set learnable uncertainty parameters to adjust the tasks' relationship.We train and evaluate MulCode in three downstream tasks: comment classification, author attribution, and duplicate function detection. In all tasks, MulCode outperforms the state-of-the-art techniques. Moreover, experiments on three unseen tasks demonstrate the generalization ability of MulCode compared with state-of-the-art embedding methods.

Original languageEnglish
Title of host publicationProceedings - 2021 IEEE International Conference on Software Analysis, Evolution and Reengineering, SANER 2021
PublisherInstitute of Electrical and Electronics Engineers Inc.
Pages48-59
Number of pages12
ISBN (Electronic)9781728196305
DOIs
StatePublished - Mar 2021
Externally publishedYes
Event28th IEEE International Conference on Software Analysis, Evolution and Reengineering, SANER 2021 - Virtual, Online, United States
Duration: 9 Mar 202112 Mar 2021

Publication series

NameProceedings - 2021 IEEE International Conference on Software Analysis, Evolution and Reengineering, SANER 2021

Conference

Conference28th IEEE International Conference on Software Analysis, Evolution and Reengineering, SANER 2021
Country/TerritoryUnited States
CityVirtual, Online
Period9/03/2112/03/21

Keywords

  • attention mechanism
  • deep learning
  • multi-task learning
  • representation learning

Fingerprint

Dive into the research topics of 'MulCode: A Multi-task Learning Approach for Source Code Understanding'. Together they form a unique fingerprint.

Cite this