SIAMBERT: Siamese Bert-based Code SearchShow others and affiliations
2022 (English)In: 34th Workshop of the Swedish Artificial Intelligence Society, SAIS 2022, Institute of Electrical and Electronics Engineers (IEEE) , 2022, p. 64-70Conference paper, Published paper (Refereed)
Abstract [en]
Code Search is a practical tool that helps developers navigate growing source code repositories by connecting natural language queries with code snippets. Platforms such as StackOverflow resolve coding questions and answers; however, they cannot perform a semantic search through the code. Moreover, poorly documented code adds more complexity to search for code snippets in repositories. To tackle this challenge, this paper presents SIAMBERT, a BERT-based model that gets the question in natural language and returns relevant code snippets. The SIAMBERT architecture consists of two stages, where the first stage, inspired by Siamese Neural Network, returns the top K relevant code snippets to the input questions, and the second stage ranks the given snippets by the first stage. The experiments show that SIAMBERT outperforms non-BERT-based models having improvements that range from 12% to 39% on the Recall@1 metric and improves the inference time performance, making it 15x faster than standard BERT models.
Place, publisher, year, edition, pages
Institute of Electrical and Electronics Engineers (IEEE) , 2022. p. 64-70
National Category
Information Systems
Identifiers
URN: urn:nbn:se:kth:diva-319425DOI: 10.1109/SAIS55783.2022.9833051ISI: 000855561800008Scopus ID: 2-s2.0-85136132400OAI: oai:DiVA.org:kth-319425DiVA, id: diva2:1700323
Conference
34th Workshop of the Swedish Artificial Intelligence Society, SAIS 2022, Stockholm, 13 June 2022, through 14 June 2022
Note
QC 20220930
Part of proceedings: ISBN 978-166547126-8
2022-09-302022-09-302022-09-30Bibliographically approved