Generating key points…
Answers are grounded in this paper and cite their sources.
Code embedding models rank a buggy copy of a function almost as high as the working original, because standard hard-negative mining discards candidates that are nearly identical to the positive. We test whether adding execution-verified near-miss pairs to fine-tuning fixes this. Starting from GTE-ModernBERT-base (149M parameters), we build training pairs from CodeContests solutions and their sandbox-verified single-edit mutants and passing rewrites, plus bug/fix twins extracted from SWE-smith patches, and mix them at 11% into a replay set mined with the base model. In small runs with three seeds, near-miss data beats a replay-only control on ExecRetrieval exec@1 on every seed (+0.029 ± 0.010), but the effect shrinks as batch size grows. At pilot scale (240k rows, 15k steps) the near-miss data adds 1.4 points of exec@1 over an identical replay-only control, which is not significant (McNemar p = 0.21), and it alone collapses AppsRetrieval from 53.9 to 18.9 nDCG@10. Fine-tuning on the replay mix by itself costs about 2 points of MTEB(Code, v1); the near-miss data costs a further 3.7. Weight averaging with the base recovers most of the loss but leaves no significant behavioural gain. We also report four pitfalls, each of which produced a spurious effect during the study: float16 master weights inherited from a half-precision checkpoint, float16 scoring that turns near-ties into losses, an evaluation length mismatch between models, and a batch sampler that silently starved small sources.
No takes yet. Share an insight, caveat, or question.
Divakant Pandey (2026) studied this question.
Synapse has enriched 8 closely related papers on similar clinical questions. Consider them for comparative context: