potentialpaper

Beyond Single Positives: An Empirical Audit of Solution-Set Adaptation for Code Retrieval

Keep the title, authors and abstract in paper.json

potentialpaper · 2026-11-23 19:46 UTC · da73ad66052e ·

.potentialpaper/metadata.json modified

+++ b/.potentialpaper/metadata.json
@@ -1,19 +1,5 @@
{
- "layout": 5,
- "identifiers": [
- {
- "scheme": "openreview",
- "value": "NmtXKxkGM0"
- }
- ],
- "title": "Beyond Single Positives: An Empirical Audit of Solution-Set Adaptation for Code Retrieval",
- "authors": [],
- "abstract": "Competitive-programming problems provide multiple accepted solutions and rejected submissions for the same task. We audit whether adapting code encoders\nwith this solution-set supervision improves retrieval beyond a single-positive baseline and the original pretrained encoder without adaptation (the frozen encoder).\nWe evaluate MPR-Hybrid (Multi-Positive Retrieval Hybrid), a training system\nthat trains language-specific LoRA adapters with a Multi-Positive Pooled Contrastive (MPPC) loss, linking each problem query to multiple accepted solutions\nand sampled rejected submissions selected from candidate pools using submission\nverdicts and embedding similarity. We compare it with a single-positive in-batch\ncontrastive-learning system trained with the InfoNCE loss, using the other examples\nin each batch as negatives on six encoder backbones, trained with CodeContests\nsupervision and evaluated on its separate test set, with zero-shot CodeSearchNet\ntransfer, a fixed pool of code candidates selected by keyword matching (BM25),\nincluding lexically similar incorrect distractors, to test retrieval when keyword\noverlap is misleading, and CodeXGLUE AdvTest. We also evaluate the original pretrained encoders without fine-tuning as frozen references on the available\nCodeContests and CodeSearchNet evaluations, to assess whether adaptation improves retrieval beyond the pretrained representation. The observed benefits vary\nacross encoder backbones and evaluation protocols. On the fixed CodeContests\nofficial-test protocol for unseen problems, MPR-Hybrid has higher average scores\nfor some backbones, but no result meets our two-metric confirmation rule for a\nMPR-Hybrid win. In zero-shot CodeSearchNet Java transfer, where candidate code\nalmost never contains the query text, MPR-Hybrid beats the single-positive baseline\non three of six backbones, but none improves on its frozen encoder under the same\ntwo-metric rule. On Python, every protocol with a MPR-Hybrid win also contains\nthe query text verbatim in candidate documentation. Removing documentation\nand comments leaves two confirmed MPR-Hybrid gains over the single-positive\nbaseline: i) one other confirmed win becomes a loss, one formerly inconclusive\ncomparison becomes a loss, and ii) two confirmed wins become inconclusive. The\naudit shows how several apparent gains change interpretation under frozen-encoder\ncomparisons and documentation removal, while identifying settings where gains\nover the single-positive baseline remain. The comparison evaluates complete adaptation systems and therefore does not independently isolate the effects of the loss\nfunction, candidate sampling, or which encoder layers receive the LoRA adapters.",
- "year": 2027,
- "venue": "ICLR 2027 (under review)",
- "source": "openreview",
- "license": {
- "metadata": "CC0-1.0",
- "abstract": "CC0-1.0"
- }
+ "layout": 6,
+ "kind": "paper",
+ "key": "3abc3857-2ce1-4e55-9f28-aab7c9134d3c"
}

paper.json added

+++ b/paper.json
@@ -0,0 +1,9 @@
+{
+ "title": "Beyond Single Positives: An Empirical Audit of Solution-Set Adaptation for Code Retrieval",
+ "authors": [],
+ "abstract": "Competitive-programming problems provide multiple accepted solutions and rejected submissions for the same task. We audit whether adapting code encoders\nwith this solution-set supervision improves retrieval beyond a single-positive baseline and the original pretrained encoder without adaptation (the frozen encoder).\nWe evaluate MPR-Hybrid (Multi-Positive Retrieval Hybrid), a training system\nthat trains language-specific LoRA adapters with a Multi-Positive Pooled Contrastive (MPPC) loss, linking each problem query to multiple accepted solutions\nand sampled rejected submissions selected from candidate pools using submission\nverdicts and embedding similarity. We compare it with a single-positive in-batch\ncontrastive-learning system trained with the InfoNCE loss, using the other examples\nin each batch as negatives on six encoder backbones, trained with CodeContests\nsupervision and evaluated on its separate test set, with zero-shot CodeSearchNet\ntransfer, a fixed pool of code candidates selected by keyword matching (BM25),\nincluding lexically similar incorrect distractors, to test retrieval when keyword\noverlap is misleading, and CodeXGLUE AdvTest. We also evaluate the original pretrained encoders without fine-tuning as frozen references on the available\nCodeContests and CodeSearchNet evaluations, to assess whether adaptation improves retrieval beyond the pretrained representation. The observed benefits vary\nacross encoder backbones and evaluation protocols. On the fixed CodeContests\nofficial-test protocol for unseen problems, MPR-Hybrid has higher average scores\nfor some backbones, but no result meets our two-metric confirmation rule for a\nMPR-Hybrid win. In zero-shot CodeSearchNet Java transfer, where candidate code\nalmost never contains the query text, MPR-Hybrid beats the single-positive baseline\non three of six backbones, but none improves on its frozen encoder under the same\ntwo-metric rule. On Python, every protocol with a MPR-Hybrid win also contains\nthe query text verbatim in candidate documentation. Removing documentation\nand comments leaves two confirmed MPR-Hybrid gains over the single-positive\nbaseline: i) one other confirmed win becomes a loss, one formerly inconclusive\ncomparison becomes a loss, and ii) two confirmed wins become inconclusive. The\naudit shows how several apparent gains change interpretation under frozen-encoder\ncomparisons and documentation removal, while identifying settings where gains\nover the single-positive baseline remain. The comparison evaluates complete adaptation systems and therefore does not independently isolate the effects of the loss\nfunction, candidate sampling, or which encoder layers receive the LoRA adapters.",
+ "license": {
+ "metadata": "CC0-1.0",
+ "abstract": "CC0-1.0"
+ }
+}