Code Generation as a Dual Task of Code Summarization

10/14/2019
by   Bolin Wei, et al.
0

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

READ FULL TEXT

page 1

page 2

page 3

page 4

research
02/24/2020

Leveraging Code Generation to Improve Code Retrieval and Summarization via Dual Learning

Code summarization generates brief natural language description given a ...
research
02/20/2022

DualSC: Automatic Generation and Summarization of Shellcode via Transformer and Dual Learning

A shellcode is a small piece of code and it is executed to exploit a sof...
research
10/23/2019

Retrieve and Refine: Exemplar-based Neural Comment Generation

Code comment generation is a crucial task in the field of automatic soft...
research
12/18/2020

The dual of an evaluation code

The aim of this work is to study the dual and the algebraic dual of an e...
research
06/03/2019

Jointly Learning Semantic Parser and Natural Language Generator via Dual Information Maximization

Semantic parsing aims to transform natural language (NL) utterances into...
research
02/19/2020

Rnn-transducer with language bias for end-to-end Mandarin-English code-switching speech recognition

Recently, language identity information has been utilized to improve the...
research
07/03/2017

Dual Supervised Learning

Many supervised learning tasks are emerged in dual forms, e.g., English-...

Please sign up or login with your details

Forgot password? Click here to reset