# MediaWiki Code2Code Search: Neural Retrieval for the Semantic Discovery of Open-Source Software Entities

arXiv: https://arxiv.org/abs/2607.26766 · HTML: https://mlsanity.com/paper/2607.26766/

## Key facts

- Cited by 1 papers in the map (data through 14 Oct 2026).
- Builds on 6 of its 33 references that are in the map.
- First posted on arXiv 29 Jul 2026.

## Builds on (most cited first, 6 of 6)

- [Judging LLM-as-a-Judge with MT-Bench and Chatbot Arena](https://mlsanity.com/paper/2306.05685/) (2023)
- [Who is using AI to code? Global diffusion and impact of generative AI](https://mlsanity.com/paper/2506.08945/) (2025)
- [Revisiting Code Search in a Two-Stage Paradigm](https://mlsanity.com/paper/2208.11274/) (2022)
- [Archiving and referencing source code with Software Heritage](https://mlsanity.com/paper/2004.00514/) (2020)
- [Source Code Archiving to the Rescue of Reproducible Deployment](https://mlsanity.com/paper/2405.15516/) (2024)
- [The Software Heritage Graph Dataset: Large-scale Analysis of Public Software Development History](https://mlsanity.com/paper/2011.07824/) (2020)

## Built on by (most cited first, 1 of 1)

- [From Code Archival to Knowledge Graph: Bridging Software Heritage, COAR Notify and Wikidata](https://mlsanity.com/paper/2609.21667/) (2026)

## Abstract (arXiv)

Code search in large-scale ecosystems is often hindered by the lexical gap between user queries and implementation details, alongside the trade-off between the low latency of traditional Information Retrieval (IR) and the precision of Deep Learning (DL). We present MediaWiki Code2Code Search, a neural retrieval system for semantic code-to-code discovery. By indexing 1.29 million structural entities (functions, types, and templates) across 2,500+ MediaWiki repositories, our system enables retrieval based on computational intent rather than surface tokens. We employ a split-build architecture, decoupling GPU-intensive offline indexing from a CPU-only serving layer; our FAISS IVF-PQ index occupies 168.6 MB: a 96.6% reduction compared to a flat float32 baseline, and achieves a median query latency of 1.85 seconds on commodity hardware, satisfying the 6 GiB RAM constraint of Wikimedia Toolforge. Our evaluation across a 27-query benchmark demonstrates superior performance over the BM25 baseline, achieving a P@10 of 0.87 compared to 0.64 (0.52 versus 0.34 for strict matching). Gains are most pronounced in name-obfuscated tasks where lexical methods fail. The system is available at https://code2codesearch.toolforge.org under the Apache 2.0 licence and provides an open RESTful API.
