We gratefully acknowledge support from
the Simons Foundation and member institutions.
Full-text links:

Download:

Current browse context:

cs.IR

Change to browse by:

References & Citations

DBLP - CS Bibliography

Bookmark

(what is this?)
CiteULike logo BibSonomy logo Mendeley logo del.icio.us logo Digg logo Reddit logo

Computer Science > Information Retrieval

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

Abstract: Code summarization generates brief natural language description given a source code snippet, while code retrieval fetches relevant source code given a natural language query. Since both tasks aim to model the association between natural language and programming language, recent studies have combined these two tasks to improve their performance. However, researchers have yet been able to effectively leverage the intrinsic connection between the two tasks as they train these tasks in a separate or pipeline manner, which means their performance can not be well balanced. In this paper, we propose a novel end-to-end model for the two tasks by introducing an additional code generation task. More specifically, we explicitly exploit the probabilistic correlation between code summarization and code generation with dual learning, and utilize the two encoders for code summarization and code generation to train the code retrieval task via multi-task learning. We have carried out extensive experiments on an existing dataset of SQL and Python, and results show that our model can significantly improve the results of the code retrieval task over the-state-of-art models, as well as achieve competitive performance in terms of BLEU score for the code summarization task.
Comments: Published at The Web Conference (WWW) 2020, full paper
Subjects: Information Retrieval (cs.IR); Computation and Language (cs.CL); Software Engineering (cs.SE)
DOI: 10.1145/3366423.3380295
Cite as: arXiv:2002.10198 [cs.IR]
  (or arXiv:2002.10198v2 [cs.IR] for this version)

Submission history

From: Wei Ye [view email]
[v1] Mon, 24 Feb 2020 12:26:11 GMT (1600kb,D)
[v2] Tue, 25 Feb 2020 08:49:11 GMT (1599kb,D)

Link back to: arXiv, form interface, contact.