Papers โ€บ When Deep Learning Met Code Search

When Deep Learning Met Code Search

9 May 2019arXiv:1905.03813archive 2025-07-28

Jose Cambronero, Hongyu Li, Seohyun Kim, Koushik Sen, Satish Chandra

There have been multiple recent proposals on using deep neural networks for code search using natural language. Common across these proposals is the idea of ๐‘’๐‘š๐‘๐‘’๐‘‘๐‘‘๐‘–๐‘›๐‘” code and natural language queries, into real vectors and then using vector distance to approximate semantic correlation between code and the query. Multiple approaches exist for learning these embeddings, including ๐‘ข๐‘›๐‘ ๐‘ข๐‘๐‘’๐‘Ÿ๐‘ฃ๐‘–๐‘ ๐‘’๐‘‘ techniques, which rely only on a corpus of code examples, and ๐‘ ๐‘ข๐‘๐‘’๐‘Ÿ๐‘ฃ๐‘–๐‘ ๐‘’๐‘‘ techniques, which use an ๐‘Ž๐‘™๐‘–๐‘”๐‘›๐‘’๐‘‘ corpus of paired code and natural language descriptions. The goal of this supervision is to produce embeddings that are more similar for a query and the corresponding desired code snippet. Clearly, there are choices in whether to use supervised techniques at all, and if one does, what sort of network and training to use for supervision. This paper is the first to evaluate these choices systematically. To this end, we assembled implementations of state-of-the-art techniques to run on a common platform, training and evaluation corpora. To explore the design space in network complexity, we also introduced a new design point that is a ๐‘š๐‘–๐‘›๐‘–๐‘š๐‘Ž๐‘™ supervision extension to an existing unsupervised technique. Our evaluation shows that: 1. adding supervision to an existing unsupervised technique can improve performance, though not necessarily by much; 2. simple networks for supervision can be more effective that more sophisticated sequence-based networks for code search; 3. while it is common to use docstrings to carry out supervision, there is a sizeable gap between the effectiveness of docstrings and a more query-appropriate supervision corpus. The evaluation dataset is now available at arXiv:1908.09804

PaperPDFCode

In Syntology Open this paper in Syntology's Atlas, the map of the papers in Syntology's graph and their citations.

Code

mrezende/concra mentioned on GitHubtf report

Repository list and official/mentioned flags are the archive's, frozen 2025-07-28. Reachability, where shown, is from one Syntology probe window (2026-09-16 to 2026-09-18); repositories not probed show nothing. GitHub stars are not tracked.

Code Syntology ran Syntology

Not run by Syntology. Nothing on this page verifies that the listed code works.

Tasks

Code SearchDeep LearningNatural Language Queries

Results from the paper archive 2025-07-28

No leaderboard rows for this paper in the archive.

Report a problem or propose a change ยท a person checks every report against the paper or source before anything changes; decisions are listed on /corrections