CCT-Code: Cross-Consistency Training for Multilingual Clone Detection and Code Search
Anton Tikhonov, Nikita Sorokin, Dmitry Abulkhanov, Irina, Piontkovskaya, Sergey Nikolenko, Valentin Malykh

TL;DR
This paper introduces Cross-Consistency Training (CCT), a novel method for improving multilingual clone detection and code search by leveraging cross-lingual similarities, achieving state-of-the-art results on multiple benchmarks.
Contribution
It proposes a new training procedure, CCT, that enhances language models for cross-lingual code clone detection and search, and introduces a new benchmark dataset XCD.
Findings
CCT-LM encoder model achieves 96.73% MAP on POJ-104.
CCT-LM encoder model achieves 47.18% MRR on AdvTest.
The approach is effective for both encoder- and decoder-based models.
Abstract
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…
Peer Reviews
No public reviews on file for this paper yet. If you reviewed it on a platform where reviews are public (OpenReview, ICLR, NeurIPS, ICML), you can paste yours below so the community can read it here.
Videos
No videos yet. Explain this paper in a talk, walkthrough, or lecture? Add one.
Taxonomy
TopicsSoftware Engineering Research · Topic Modeling · Text Readability and Simplification
MethodsMulti-Head Attention · Attention Is All You Need · Linear Layer · Dense Connections · Position-Wise Feed-Forward Layer · Adam · Residual Connection · Absolute Position Encodings · Softmax · Layer Normalization
