BERT2Code: Can Pretrained Language Models be Leveraged for Code Search?
Not on the map. Why?
Abstract (arXiv)
Millions of repetitive code snippets are submitted to code repositories every day. To search from these large codebases using simple natural language queries would allow programmers to ideate, prototype, and develop easier and faster. Although the existing methods have shown good performance in searching codes when the natural language description contains keywords from the code, they are still far behind in searching codes based on the semantic meaning of the natural language query and semantic structure of the code. In recent years, both natural language and programming language research communities have created techniques to embed them in vector spaces. In this work, we leverage the efficacy of these embedding models using a simple, lightweight 2-layer neural network in the task of semantic code search. We show that our model learns the inherent relationship between the embedding spaces and further probes into the scope of improvement by empirically analyzing the embedding methods. In this analysis, we show that the quality of the code embedding model is the bottleneck for our model's performance, and discuss future directions of study in this area.
Key facts. Cited by 2 papers in the map (data through 7 Oct 2026). Builds on 24 of its 44 references that are in the map. First posted on arXiv 16 Apr 2021.
Builds on
24 of 44 references.
References · 24
- 2017Attention Is All You Needcited by 59,932
- 2018BERT: Pre-training of Deep Bidirectional Transformers for Language Understandingcited by 40,204
- 2019PyTorch: An Imperative Style, High-Performance Deep Learning Librarycited by 20,160
- 2019RoBERTa: A Robustly Optimized BERT Pretraining Approachcited by 13,266
- 2019Sentence-BERT: Sentence Embeddings using Siamese BERT-Networkscited by 9,049
- 2014Neural Machine Translation by Jointly Learning to Align and Translatecited by 4,530
- 2013Distributed Representations of Words and Phrases and their Compositionalitycited by 3,462
- 2017A Broad-Coverage Challenge Corpus for Sentence Understanding through Inferencecited by 2,665
- 2017Billion-scale similarity search with GPUscited by 2,477
- 2015A large annotated corpus for learning natural language inferencecited by 1,837
- 2020CodeBERT: A Pre-Trained Model for Programming and Natural Languagescited by 1,286
- 2014Convolutional Neural Networks for Sentence Classificationcited by 1,124
12 more
- 2016Bag of Tricks for Efficient Text Classificationcited by 869
- 2014Distributed Representations of Sentences and Documentscited by 677
- 2019CodeSearchNet Challenge: Evaluating the State of Semantic Code Searchcited by 638
- 2018Massively Multilingual Sentence Embeddings for Zero-Shot Cross-Lingual Transfer and Beyondcited by 434
- 2018code2vec: Learning Distributed Representations of Codecited by 249
- 2019When Deep Learning Met Code Searchcited by 45
- 2016Deep API Learningcited by 41
- 2019CoaCor: Code Annotation for Code Retrieval with Reinforcement Learningcited by 22
- 2017Query Expansion Based on Crowd Knowledge for Code Searchcited by 18
- 2019Using Distributed Representation of Code for Bug Detectioncited by 3
- 2019Vector representations of text data in deep learningcited by 2
- 2019Bilingual is At Least Monolingual (BALM): A Novel Translation Algorithm that Encodes Monolingual Priorscited by 1
Built on by
Citing papers per year: 2021: 1; 2022: 1.
2 papers.