ExecRetrieval: Measuring the Functional-Correctness Gap in Code-Embedding Retrieval
- URL: http://arxiv.org/abs/2609.01865v1
- Date: Tue, 01 Sep 2026 20:55:17 GMT
- Title: ExecRetrieval: Measuring the Functional-Correctness Gap in Code-Embedding Retrieval
- Abstract summary: Embedding-based code retrieval is a core component of coding agents and retrieval-augmented code generation.<n>Existing benchmarks do not plant controlled, execution-verified single-edit variants of each query's canonical implementation.<n>We introduce ExecRetrieval, 939 Python tasks each paired with one execution-verified canonical implementation and up to four execution-verified buggy distractors.
- Score: 0.0
- License: http://creativecommons.org/licenses/by/4.0/
- Abstract: Embedding-based code retrieval is a core component of coding agents and retrieval-augmented code generation, where retrieving correct code matters more than retrieving lexically similar code. Existing code-retrieval benchmarks do not plant controlled, execution-verified single-edit variants of each query's canonical implementation in the search pool, leaving the question of whether embeddings can functionally discriminate correct from near-clone-but-incorrect code unanswered in a retrieval setting. Resolving this requires a benchmark whose search pool itself contains the relevant counterfactuals -- execution-verified buggy variants near-identical to each canonical -- so that a retriever's rank ordering can be directly tested for functional discrimination rather than topical or identity overlap. We introduce ExecRetrieval, 939 Python tasks each paired with one execution-verified canonical implementation and up to four execution-verified buggy distractors, each generated by a mechanical mutation making a single targeted edit, and evaluate 23 dense embedding configurations plus BM25 under provider-native invocation with paired McNemar tests and query-level bootstrap intervals. With near-clone counterfactuals in the pool, the top hosted system reaches exec@10 = 1.00 but only exec@1 = 0.331; rank-1 misses are paired buggy variants 91.5-99.4% of the time across the four leading systems, and the canonical scores below at least one of its four paired distractors in 67-78% of queries on the leading systems. The full dataset, execution oracle, embedding matrices, environment snapshot, and pairwise statistical tests are released at the URL in Appendix D.
Related papers
- Codebook Agent: Amortized Topology Design for LLM Multi-Agent Systems [67.04448659688579]
We develop a query-independent 16-entry codebook that ranks the top decoded candidates in a single batched forward pass.<n>With no iterative search and no message passing at test time, Codebook Agent is the most accurate method on all six benchmarks.
arXiv Detail & Related papers (2026-09-02T08:10:22Z) - CodeHID: Learning an Addressable Hierarchical Code Index for Generative Code Retrieval [16.418964135916433]
We propose CodeHID, a generative code retrieval framework that reformulates the code retrieval task from flat candidate matching to coarse-to-fine semantic address generation.<n>CodeHID relies on two core components. First, Pseudo-Neighbor Guided DocID Learning constructs a globally static hierarchical index by applying multi-level residual quantization and $k$-nearest-neighbor pseudo-supervision.<n>Second, Dual-Phase DocID Generation Guidance reliably navigates this fixed index by combining training-side ranking enhancements, using hard negatives and rank distillation, with inference-side candidate constraints and prefix-aware decoding.
arXiv Detail & Related papers (2026-08-25T05:35:17Z) - The Order Is the Guarantee: Verifier-Budgeted Code Deletion with Static-First Learned Proposals [12.095189927690988]
We study the inverse problem-how an Al system should remove code when execution-verification capacity is finite.<n>We formulate redundant-code reduction as proposal scheduling.<n>We show that scheduling governs search while the test suite alone governs what "preserving behavior" means.
arXiv Detail & Related papers (2026-08-05T09:16:29Z) - TraceCoder: Explainable and Auditable Code Generation with Position-Key Snippet Versioning [0.0]
We present a code generation concept that addresses shortcomings through three complementary mechanisms.<n>A relational snippet-history schema records, per repair event, the benchmark reference, round number, failure text, and explanation.<n>A browser-based visualisation tool renders this history as heat-mapped, hover-annotated source code.
arXiv Detail & Related papers (2026-07-28T22:03:52Z) - Fantastic Adaptive Taxonomies and How to Use Them [100.20614173157708]
AdaMAST converts execution traces into a compact, evidence-grounded failure taxonomy.<n>No code is hand-authored, no trace human-annotated.<n>In agent-system search, taxonomy-coded diagnoses of failed candidates outperform free-form.
arXiv Detail & Related papers (2026-07-17T17:41:16Z) - Closing the Indexing-Decoding Gap in Multimodal Generative Retrieval via Prefix Retention Optimization [68.48718919047127]
Multimodal generative retrieval formulates multimodal retrieval as discrete identifier generation, eliminating the need for explicit similarity search over external embeddings.<n>Existing approaches construct identifiers via residual quantization and decode them with trie-constrained beam search.<n>This combination introduces an indexing-decoding gap: identifier learning objectives, including reconstruction and contrastive losses, do not explicitly enforce prefix discriminability during decoding.<n>We propose PRO, a unified framework comprising three mechanisms: (i) prefix ranking distillation aligns quantized prefixes with those induced by pre-quantization embeddings using a listwise loss; (ii) vocabulary scheduling increases codebook
arXiv Detail & Related papers (2026-06-08T09:15:47Z) - From Attack Simulation to SIEM Rule: Deterministic Detection-as-Code Synthesis with Probe-Level Traceability [51.56484100374058]
Security teams simulate attacks against their own systems to check whether their monitoring would catch a real intruder.<n>A human bridges that gap by hand, reading each finding and writing the corresponding Sigma rule.<n>We show this translation can be partially automated when probes are drawn from a locked corpus.
arXiv Detail & Related papers (2026-06-03T14:26:25Z) - GrepSeek: Training Search Agents for Direct Corpus Interaction [66.69568141699311]
GrepSeek is an optimized direct corpus interaction (DCI) search agent that trains a compact search agent to find, filter, and compose evidence from large text corpora.<n>To make DCI practical at scale, we further use a semantics-preserving sharded-parallel execution engine that accelerates shell-based retrieval by up to $7.6times$ while preserving byte-exact equivalence with sequential execution of the shell command.
arXiv Detail & Related papers (2026-05-28T03:37:33Z) - SNARE: Adaptive Scenario Synthesis for Eliciting Overeager Behavior in Coding Agents [40.270213696031625]
A coding agent executes a benign task as a sequence of shell, file, and network actions, any of which can quietly exceed the authorized scope while the task still completes.<n>We call this overeager behavior: the prompt is not adversarial and the run succeeds, yet an out-of-scope step can leak credentials or delete files.<n>Existing benchmarks miss it: task-completion suites credit any finished run, jailbreak suites probe adversarial prompts, and the one prior overeager benchmark applies a single fixed prompt to every agent-model pair.<n>We present SNARE, a pipeline that composes benign scenarios from reusable scope
arXiv Detail & Related papers (2026-05-27T08:14:07Z) - LeanSearch v2: Global Premise Retrieval for Lean 4 Theorem Proving [7.326381497366569]
Proving theorems in Lean 4 often requires identifying a scattered set of library lemmas whose joint use enables a concise proof.<n>We present LeanSearch v2, a two-mode retrieval system for this task.
arXiv Detail & Related papers (2026-05-13T08:04:57Z) - Eigen-1: Adaptive Multi-Agent Refinement with Monitor-Based RAG for Scientific Reasoning [53.45095336430027]
We develop a unified framework that combines implicit retrieval and structured collaboration.<n>On Humanity's Last Exam (HLE) Bio/Chem Gold, our framework achieves 48.3% accuracy.<n>Results on SuperGPQA and TRQA confirm robustness across domains.
arXiv Detail & Related papers (2025-09-25T14:05:55Z)
This list is automatically generated from the titles and abstracts of the papers in this site.
This site does not guarantee the quality of this site (including all information) and is not responsible for any consequences.