# Knowledge Distillation-Based Multilingual Code Retrieval
## 5 Conclusions  
In this paper we present a new idea for semantic code retrieval - multi-code language code retrieval. By introducing the knowledge distillation technique, we established a Multi-Programming Language Code Search (MPLCS) model. The model can fuse several monolingual teacher models into a single student model, it supports multi-language code retrieval and also compensates for the deficiencies for languages where the training set is too small. In addition, MPLCS has no restrictions on the encoding method, it can be applied using a variety of different encoding methods. This paper only applied a general knowledge distillation technique and used only the results encoded from the teacher's model, thus the model is not significant in terms of accuracy improvement. However, this paper could have an intriguing effect on multi-code language code retrieval tasks.  
**Open Questions**  
* In this paper, only the simplest features of the code are obtained, which treats it as a new natural language, other features such as API sequences, information from AST trees were not used in this paper, further research on these features could better improve the accuracy.
* As mentioned before, a high-quality training set can also greatly improve the practical meaning of the conclusions.
* Translation between different programming languages is also a very interesting research direction.
* Multi-natural language to multi-programming language is also a valuable research direction, but it will require a more comprehensive dataset as support.  
**Author Contributions:** Conceptualization, W.L.; Data curation, W.L.; Formal analysis, W.L. and J.X.; Funding acquisition, Q.C.; Investigation, W.L. and J.X.; Methodology, W.L.; Project administration, Q.C.; Resources, W.L.; Software, W.L.; Supervision, J.X. and Q.C.; Validation, W.L. and J.X.; Visualization, W.L.; Writing--original draft, W.L.; Writing-- review & editing, W.L. and J.X. All authors have read and agreed to the published version of the manuscript.  
**Funding:** This research is funded by the National Key Research and Development Program of China, grant number 2018 YFB2101200.  
**Institutional Review Board Statement:** Not applicable.  
**Informed Consent Statement:** Not applicable.  
\begin{table}
\begin{tabular}{c c c c c c c c} \hline
**Lambda** & **Go** & **Java** & **Javascript** & **Php** & **Python** & **Ruby** & **Avg** \\ \hline
0.0 & 0.7304 & 0.6365 & 0.5520 & 0.6041 & 0.7208 & 0.5925 & 0.6535 \\
0.1 & 0.7386 & 0.6415 & 0.5567 & 0.6086 & 0.7274 & 0.5957 & 0.6591 \\
0.2 & 0.7385 & 0.6444 & 0.5594 & 0.6084 & 0.7320 & 0.5980 & 0.6611 \\
0.3 & 0.7345 & 0.6443 & 0.5602 & 0.6130 & 0.7362 & 0.6005 & 0.6628 \\
0.4 & 0.7393 & 0.6460 & 0.5617 & 0.6138 & 0.7354 & 0.6033 & 0.6642 \\
0.5 & 0.7394 & 0.6469 & 0.5602 & 0.6184 & **0.7400** & **0.6089** & 0.6668 \\
0.6 & 0.7386 & 0.6471 & 0.5579 & 0.6165 & 0.7384 & 0.6024 & 0.6655 \\
0.7 & **0.7470** & 0.6469 & 0.5563 & **0.6193** & 0.7364 & 0.6013 & 0.6669 \\
0.8 & 0.7400 & **0.6473** & **0.5621** & 0.6191 & 0.7391 & 0.6059 & **0.6670** \\
0.9 & 0.7421 & 0.6445 & 0.5533 & 0.6156 & 0.7357 & 0.6046 & 0.6642 \\
1.0 & 0.7453 & 0.6456 & 0.5561 & 0.6155 & 0.7356 & 0.6042 & 0.6651 \\ \hline \end{tabular}
\end{table}
Table 4: The effect of \(\lambda\) on the student model.  
Data Availability Statement: Dataset is available on [[https://s3.amazonaws.com/code-search-net/CodeSearchNet/v2/python.zip](https://s3.amazonaws.com/code-search-net/CodeSearchNet/v2/python.zip)]([https://s3.amazonaws.com/code-search-net/CodeSearchNet/v2/python.zip](https://s3.amazonaws.com/code-search-net/CodeSearchNet/v2/python.zip)). The content in brackets is the programming language name, such as java.