Assemble Foundation Models for Automatic Code Summarization

Jian Gu, Pasquale Salza, Harald C. Gall
1/13/2022
cs.SEcs.LG

Official code: jianguda/afm4acs (15 stars, Python, last commit 2021-10-26).

Abstract

Automatic code summarization is beneficial to daily software development since it could help reduce the requirement of manual writing. Currently, artificial intelligence is undergoing a paradigm shift.

Show full abstract

The foundation models pretrained on massive data and finetuned to downstream tasks surpass specially customized models. This trend inspired us to consider reusing foundation models instead of learning from scratch. Thereby, we propose a flexible and robust approach for automatic code summarization, based on neural models. We assemble available foundation models, such as CodeBERT and GPT-2, into a single neural model named AdaMo. Moreover, we utilize Gaussian noise as the simulation of contextual information to optimize the latent representation. Furthermore, we introduce two adaptive schemes from the perspective of knowledge transfer, namely continuous pretraining and intermediate finetuning, and design intermediate stage tasks for general sequence-to-sequence learning. Finally, we evaluate AdaMo against a benchmark dataset for code summarization, by comparing it with state-of-the-art models.

View on arXivView PDF

Code Implementations(1)

jianguda/afm4acsOfficial100%
155Python, ShellOct 25, 20215 years ago

Similar Papers

Cite this paper

@article{gu2022assemble,
  title  = {Assemble Foundation Models for Automatic Code Summarization},
  author = {Jian Gu and Pasquale Salza and Harald C. Gall},
  year   = {2022},
  eprint = {2201.05222},
  archivePrefix = {arXiv},
  url    = {https://arxiv.org/abs/2201.05222}
}

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

Discussion