ExecRetrieval: 코드 임베딩 검색에서 기능적 정확성 격차 측정
ExecRetrieval: Measuring the Functional-Correctness Gap in Code-Embedding Retrieval
한국어 초록
임베딩 기반 코드 검색은 코딩 에이전트와 검색-증강 코드 생성의 핵심 구성 요소이며, 어휘적으로 유사한 코드를 검색하는 것보다 올바른 코드를 검색하는 것이 더 중요하다. 기존 코드 검색 �ench마크는 각 쿼리의 정규(canonical) 구현에 대해 통제된, 실행으로 검증된 단일 편집(single-edit) 변형을 검색 풀에 심어두지 않아, 검색 설정에서 임베딩이 정답과 거의 클론에 가깝지만 틀린 코드를 기능적으로 구별할 수 있는지에 대한 질문을 답하지 못한 채로 남긴다. 이를 해결하려면 검색 풀 자체에 관련 반사실(counterfactual)—각 정규 구현과 거의 동일한 실행 검증 버그 변형—이 포함된 벤치마크가 필요하며, 이를 통해 검색기의 순위(rank ordering)가 주제적 또는 동일성 중복(topical or identity overlap)이 아니라 기능적 구별(functional discrimination)에 대해 직접 검증될 수 있다. 우리는 ExecRetrieval을 소개한다. 939개의 Python 태스크 각각이 하나의 실행 검증 정규 구현과 최대 네 개의 실행 검증 버그 디스트랙터(distractor)와 짝을 이루며, 각 디스트랙터는 단일 targeted edit을 수행하는 기계적 돌연변이(mechanical mutation)로 생성되었다. 또한 제공자 네이티브 호출(provider-native invocation) 하에서 23개의 dense 임베딩 구성과 BM25를 평가하고, paired McNemar 검정과 쿼리 수준 bootstrap 구간을 사용한다. 풀에 near-clone 반사실이 포함된 경우, 최상위 호스팅 시스템은 exec@10 = 1.00에 도달하지만 exec@1 = 0.331에 그친다. rank-1 실패는 네 개의 선도 시스템 전반에서 91.5–99.4%의 경우 짝을 이룬 버그 변형이며, 선도 시스템에서 정규 구현은 67–78%의 쿼리에서 네 개의 짝 디스트랙터 중 적어도 하나보다 낮은 점수를 받는다. 전체 데이터셋, 실행 오라클(execution oracle), 임베딩 행렬, 환경 스냅샷, 그리고 쌍별 통계 검정은 부록 D의 URL에서 공개된다.
원문 초록
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.
제출 이력
확인된 버전만 표시합니다. 전체 제출 이력은 arXiv 원문에서 확인하세요.
- arXiv:2609.01865v1제출 시각 미확인
함께 살펴볼 논문
공통 태그를 근거로 연결했습니다. 실제 인용 관계나 논문의 우수성을 뜻하지 않습니다.
공통 태그로 연결된 공개 논문이 아직 없습니다.
토론
이 논문과 연결된 포럼 글이 아직 없습니다.