A Transformer-based Approach for Source Code Summarization

By Wasi Uddin Ahmad, Saikat Chakraborty, Baishakhi Ray, Kai-Wei Chang. 2020

456 citations recorded by the source corpus.

Generating a readable summary that describes the functionality of a program is known as source code summarization. In this task, learning code representation by modeling the pairwise relationship between code tokens to capture their long-range dependencies is crucial. To learn code representation for summarization, we explore the Transformer model that uses a self-attention mechanism and has shown to be effective in capturing long-range dependencies. In this work, we show that despite the approach is simple, it outperforms the state-of-the-art techniques by a significant margin. We perform extensive analysis and ablation studies that reveal several important findings, e.g., the absolute encoding of source code tokens’ position hinders, while relative encoding significantly improves the summarization performance. We have made our code publicly available to facilitate future research.

Subfields: Artificial Intelligence, Information Systems, Model Architectures, Code Generation & Program Synthesis

How researchers see this paper

The researchers whose trusted networks rank it highest, strongest advocate first. Every researcher gets a different order.

In Artificial Intelligence

  1. Graham Neubig
  2. Sergey Levine
  3. Yoshua Bengio
  4. Mohit Bansal
  5. Percy Liang
  6. Luke S. Zettlemoyer
  7. Pieter Abbeel
  8. Jianfeng Gao

In Information Systems

  1. Prem Devanbu
  2. Baishakhi Ray
  3. Toufique Ahmed
  4. Graham Neubig
  5. Saikat Chakraborty
  6. Yangruibo Ding
  7. Frank F. Xu
  8. Joseph E. Gonzalez

In Model Architectures

  1. Adam Santoro
  2. Baishakhi Ray
  3. Graham Neubig
  4. Prem Devanbu
  5. David Raposo
  6. Ajay Jain
  7. Pieter Abbeel
  8. Yangruibo Ding

In Code Generation & Program Synthesis

  1. Prem Devanbu
  2. Toufique Ahmed
  3. Frank F. Xu
  4. Graham Neubig
  5. Wasi Uddin Ahmad
  6. Yangruibo Ding
  7. Baishakhi Ray
  8. Shuyan Zhou

Citations in the corpus