Code Generation as a Dual Task of Code Summarization

By Bolin Wei, Ge Li, Xin Xia, Zhiyi Fu, Zhi Jin. 2019

241 citations recorded by the source corpus.

Code summarization (CS) and code generation (CG) are two crucial tasks in the field of automatic software development. Various neural network-based approaches are proposed to solve these two tasks separately. However, there exists a specific intuitive correlation between CS and CG, which has not been exploited in previous work. In this paper, we apply the relations between two tasks to improve the performance of both tasks. In other words, exploiting the duality between the two tasks, we propose a dual training framework to train the two tasks simultaneously. In this framework, we consider the dualities on probability and attention weights, and design corresponding regularization terms to constrain the duality. We evaluate our approach on two datasets collected from GitHub, and experimental results show that our dual framework can improve the performance of CS and CG tasks over baselines.

Subfields: Artificial Intelligence, Information Systems, Software, Natural Language Processing, 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. Prem Devanbu
  2. Nan Duan
  3. Toufique Ahmed
  4. Daya Guo
  5. Baishakhi Ray
  6. Jianfeng Gao
  7. Saikat Chakraborty
  8. Mohit Bansal

In Information Systems

  1. Prem Devanbu
  2. Toufique Ahmed
  3. Nan Duan
  4. Daya Guo
  5. Baishakhi Ray
  6. Saikat Chakraborty
  7. Neel Sundaresan
  8. Alexey Svyatkovskiy

In Software

  1. Prem Devanbu
  2. Toufique Ahmed
  3. Daya Guo
  4. Nan Duan
  5. Alexey Svyatkovskiy
  6. Neel Sundaresan
  7. Baishakhi Ray
  8. Yangruibo Ding

In Natural Language Processing

  1. Prem Devanbu
  2. Toufique Ahmed
  3. Nan Duan
  4. Baishakhi Ray
  5. Neel Sundaresan
  6. Saikat Chakraborty
  7. Alexey Svyatkovskiy
  8. Daya Guo

In Code Generation & Program Synthesis

  1. Prem Devanbu
  2. Toufique Ahmed
  3. Baishakhi Ray
  4. Wasi Uddin Ahmad
  5. Ge Li
  6. Saikat Chakraborty
  7. Zhi Jin
  8. Yangruibo Ding

Citations in the corpus