cs.SEJun 24, 2026

Recall Before Rerank: Benchmarking Deep Learning Models for Large-Scale Code-to-Code Retrieval

Authors: Leonardo VenutaFrancesco TosoniPaolo Ferragina

Organizations: Sant’Anna School of Advanced Studies, Pisa, Italy

Abstract

Semantic code search and clone detection are essential for software development, maintenance, and reuse. This paper evaluates the effectiveness, efficiency, and scalability of contemporary deep learning models for first-stage recall in large-scale code-to-code search engines. Benchmarking across multiple programming languages and datasets reveals critical limits in the precision and scalability of these models on Terabyte-scale source-code collections. We present LLM-based code normalisation and query-rewriting schemes that yield significant gains in precision for lower-performing models. Our results question the sustainability of resource-constrained deployment and the assumed robustness of current code-specialised LLMs across datasets. We conclude with actionable insights for building scalable, efficient code-retrieval systems.

Explore similar work

CardsList
  1. Memorization Diagnostics for Code LLMs Should be Scale-Aware

    Aug 13, 2026Prateek Kumar Rajput, Abdoul Aziz Bonkoungou, Alberick Euraste Djiré +6MemorizationLarge Language