Code generation as a dual task of code summarization

Bolin Wei, Ge Li, Xin Xia, Zhiyi Fu, Zhi Jin

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

3 Citations (Scopus)

Abstract

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.

Original languageEnglish
Title of host publicationNIPS Proceedings - Advances in Neural Information Processing Systems 32 (NIPS 2019)
EditorsH. Wallach, H. Larochelle, A. Beygelzimer, F. d'AlcheBuc, E. Fox, R. Garnett
Place of PublicationSan Diego CA USA
PublisherNeural Information Processing Systems (NIPS)
Number of pages11
Volume32
Publication statusPublished - 2019
EventAdvances in Neural Information Processing Systems 2019 - Vancouver, Canada
Duration: 8 Dec 201914 Dec 2019
Conference number: 32nd
https://nips.cc/Conferences/2019 (Proceedings)
https://papers.nips.cc/book/advances-in-neural-information-processing-systems-32-2019 (Proceedings)

Publication series

NameAdvances in Neural Information Processing Systems
PublisherMorgan Kaufmann Publishers
ISSN (Print)1049-5258

Conference

ConferenceAdvances in Neural Information Processing Systems 2019
Abbreviated titleNIPS 2019
CountryCanada
CityVancouver
Period8/12/1914/12/19
Internet address

Cite this

Wei, B., Li, G., Xia, X., Fu, Z., & Jin, Z. (2019). Code generation as a dual task of code summarization. In H. Wallach, H. Larochelle, A. Beygelzimer, F. d'AlcheBuc, E. Fox, & R. Garnett (Eds.), NIPS Proceedings - Advances in Neural Information Processing Systems 32 (NIPS 2019) (Vol. 32). (Advances in Neural Information Processing Systems). Neural Information Processing Systems (NIPS). http://papers.neurips.cc/paper/8883-code-generation-as-a-dual-task-of-code-summarization