検索を超えて:コード検索のためのマルチタスクベンチマークとモデル
Beyond Retrieval: A Multitask Benchmark and Model for Code Search
May 6, 2026
著者: Siqiao Xue, Zihan Liao, Jin Qin, Ziyin Zhang, Yixiang Mu, Fan Zhou, Hang Yu
cs.AI
要旨
コード検索は通常、第一段階の検索(一次検索)として評価されてきたが、実際のプロダクションシステムでは再ランキングや開発者スタイルのクエリを含むより広範なパイプラインに依存している。既存のベンチマークは、データ汚染、ラベルノイズ、および縮退した二値関連性の問題も抱えている。本論文では、検索を超えてコード検索パイプライン全体をカバーする、汚染を制限したマルチタスクのコード検索・再ランキングベンチマークであるCoREBと、ファインチューニングされたコード再ランカーを導入する。CoREBは、5つのプログラミング言語で反事実的に書き換えられたLiveCodeBenchの問題から構築され、段階的関連性判定を伴う時間制限リリースとして提供される。我々は、テキスト→コード、コード→テキスト、コード→コードの3タスクにわたって、11の埋め込みモデルと5つの再ランカーをベンチマーク評価する。実験により以下のことが明らかになった:①コード特化型埋め込みはコード間検索を支配する(汎用エンコーダの約2倍)が、全3タスクで勝利する単一モデルは存在しない。②実際の開発者検索に最も近い形式である短いキーワードクエリでは、全モデルのnDCG@10がほぼゼロにまで低下する。③既製の再ランカーはタスク非対称であり、コード間では12ポイントの変動があり、全タスクで正味の改善を示すベースラインは存在しない。④我々のファインチューニング済みCoREB-Rerankerは、全3タスクで一貫した改善を達成した初めてのものである。データとモデルは公開されている。
English
Code search has usually been evaluated as first-stage retrieval, even though production systems rely on broader pipelines with reranking and developer-style queries. Existing benchmarks also suffer from data contamination, label noise, and degenerate binary relevance. In this paper, we introduce CoREB, a contamination-limited, multitask code retrieval and reranking benchmark, together with a fine-tuned code reranker, that goes beyond retrieval to cover the full code search pipeline. CoREB is built from counterfactually rewritten LiveCodeBench problems in five programming languages and delivered as timed releases with graded relevance judgments. We benchmark eleven embedding models and five rerankers across three tasks: text-to-code, code-to-text, and code-to-code. Our experiments reveal that: \circone code-specialised embeddings dominate code-to-code retrieval ({sim}2{times} over general encoders), yet no single model wins all three tasks; \circtwo short keyword queries, the format closest to real developer search, collapse every model to near-zero nDCG@10; \circthree off-the-shelf rerankers are task-asymmetric, with a 12-point swing on code-to-code and no baseline net-positive across all tasks; \circfour our fine-tuned CoREB-Reranker is the first to achieve consistent gains across all three tasks. The data and model are released.