paper-with-me

홈 › Papers

When Deep Learning Met Code Search

2019-05-09 · 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 $\mathit{embedding}$ 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 $\mathit{unsupervised}$ techniques, which rely only on a corpus of code examples, and $\mathit{supervised}$ techniques, which use an $\mathit{aligned}$ 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 $\mathit{minimal}$ 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

📄 PDF Abstract BibTeX arXiv:1905.03813

Code (2)

facebookresearch/Neural-Code-Search-Evaluation-Dataset
mrezende/concra tf

Tasks

Code SearchDeep LearningNatural Language Queries

Similar Papers 제목 키워드 기반

Semantic Source Code Search: A Study of the Past and a Glimpse at the Future

2019-08-15 · Muhammad Khalifa

With the recent explosion in the size and complexity of source codebases and software projects, the need for efficient source code search engines has increased dramatically. Unfortunately, existing information retrieval-…

Code SearchInformation RetrievalNatural Language QueriesRetrieval

Semantic Scaffolds for Pseudocode-to-Code Generation

2020-05-12 · ACL 2020 6 · Ruiqi Zhong, Mitchell Stern, Dan Klein

We propose a method for program generation based on semantic scaffolds, lightweight structures representing the high-level semantic and syntactic composition of a program. By first searching over plausible scaffolds then…

Code Generation

A New Search Paradigm for Natural Language Code Search

2021-11-16 · ACL ARR November 2021 11 · Anonymous

Code search can accelerate the efficiency of software development by finding code snippets for the given query. The dominant code search paradigm is to learn the semantic matching between code snippets and queries by neu…

Code Search

Effective Large Language Model Debugging with Best-first Tree Search

2024-07-26 · Jialin Song, Jonathan Raiman, Bryan Catanzaro

Large Language Models (LLMs) show promise in code generation tasks. However, their code-writing abilities are often limited in scope: while they can successfully implement simple functions, they struggle with more comple…

Code GenerationLanguage ModelingLanguage ModellingLarge Language Model

Generating Code with the Help of Retrieved Template Functions and Stack Overflow Answers

2021-04-12 · Dawn Drain, Changran Hu, Chen Wu, Mikhail Breslav 외

We approach the important challenge of code autocompletion as an open-domain task, in which a sequence-to-sequence code generator model is enhanced with the ability to attend to reference code snippets supplied by a sema…

Code SearchRetrieval