CCT-Code: Cross-Consistency Training for Multilingual Clone Detection and Code Search
Fuente:
arXiv
Salvato in:
| Autori principali: | , , , , , |
|---|---|
| Natura: | Preprint |
| Pubblicazione: |
2023
|
| Soggetti: | |
| Accesso online: | |
| Tags: |
Aggiungi Tag
Nessun Tag, puoi essere il primo ad aggiungerne!!
|
| _version_ | 1866912154143162368 |
|---|---|
| author | Tikhonov, Anton Sorokin, Nikita Abulkhanov, Dmitry Piontkovskaya, Irina Nikolenko, Sergey Malykh, Valentin |
| author_facet | Tikhonov, Anton Sorokin, Nikita Abulkhanov, Dmitry Piontkovskaya, Irina Nikolenko, Sergey Malykh, Valentin |
| contents | We consider the well-known and important tasks of clone detection and information retrieval for source code. The most standard setup is to search clones inside the same language code snippets. But it is also useful to find code snippets with identical behaviour in different programming languages. Nevertheless multi- and cross-lingual clone detection has been little studied in literature. We present a novel training procedure, cross-consistency training (CCT) leveraging cross-lingual similarity, that we apply to train language models on source code in various programming languages. We show that this training is effective both for encoder- and decoder-based models. The trained encoder-based CCT-LM model achieves a new state of the art on POJ-104 (monolingual C++ clone detection benchmark) with 96.73\% MAP and AdvTest (monolingual Python code search benchmark) with 47.18\% MRR. The decoder-based CCT-LM model shows comparable performance in these tasks. In addition, we formulate the multi- and cross-lingual clone detection problem and present XCD, a new benchmark dataset produced from CodeForces submissions. |
| format | Preprint |
| id |
arxiv_https___arxiv_org_abs_2305_11626 |
| institution | arXiv |
| publishDate | 2023 |
| record_format | arxiv |
| spellingShingle | CCT-Code: Cross-Consistency Training for Multilingual Clone Detection and Code Search Tikhonov, Anton Sorokin, Nikita Abulkhanov, Dmitry Piontkovskaya, Irina Nikolenko, Sergey Malykh, Valentin Computation and Language Software Engineering We consider the well-known and important tasks of clone detection and information retrieval for source code. The most standard setup is to search clones inside the same language code snippets. But it is also useful to find code snippets with identical behaviour in different programming languages. Nevertheless multi- and cross-lingual clone detection has been little studied in literature. We present a novel training procedure, cross-consistency training (CCT) leveraging cross-lingual similarity, that we apply to train language models on source code in various programming languages. We show that this training is effective both for encoder- and decoder-based models. The trained encoder-based CCT-LM model achieves a new state of the art on POJ-104 (monolingual C++ clone detection benchmark) with 96.73\% MAP and AdvTest (monolingual Python code search benchmark) with 47.18\% MRR. The decoder-based CCT-LM model shows comparable performance in these tasks. In addition, we formulate the multi- and cross-lingual clone detection problem and present XCD, a new benchmark dataset produced from CodeForces submissions. |
| title | CCT-Code: Cross-Consistency Training for Multilingual Clone Detection and Code Search |
| topic | Computation and Language Software Engineering |
| url | https://arxiv.org/abs/2305.11626 |