Pith. sign in

REVIEW 2 cited by

CoRNStack: High-Quality Contrastive Data for Better Code Retrieval and Reranking

Not yet reviewed by Pith; the record is open.

This paper has not been read by Pith yet. Machine review is queued; the pith claim, tier, and objections will appear here once it completes.

SPECIMEN: schema-true, not a live event

T0 review · schema-true

One-sentence machine reading of the paper's core claim.

pith:XXXXXXXX · record.json · timestamp

arxiv 2412.01007 v3 pith:LJSRK6U4 submitted 2024-12-01 cs.CL cs.IR

classification cs.CLcs.IR
keywords codererankingretrievaltrainingcontrastivecornstackdatasetmodels
verification ladder T0 review T1 audit T2 compute T3 formal
0 comments
read the original abstract

Effective code retrieval plays a crucial role in advancing code generation, bug fixing, and software maintenance, particularly as software systems increase in complexity. While current code embedding models have demonstrated promise in retrieving code snippets for small-scale, well-defined tasks, they often underperform in more demanding real-world applications such as bug localization within GitHub repositories. We hypothesize that a key issue is their reliance on noisy and inconsistent datasets for training, which impedes their ability to generalize to more complex retrieval scenarios. To address these limitations, we introduce CoRNStack, a large-scale, high-quality contrastive training dataset for code that spans multiple programming languages. This dataset is curated using consistency filtering to eliminate noisy positives and is further enriched with mined hard negatives, thereby facilitating more effective learning. We demonstrate that contrastive training of embedding models using CoRNStack leads to state-of-the-art performance across a variety of code retrieval tasks. Furthermore, the dataset can be leveraged for training code reranking models, a largely underexplored area compared to text reranking. Our finetuned code reranking model significantly improves the ranking quality over the retrieved results. Finally, by employing our code retriever and reranker together, we demonstrate significant improvements in function localization for GitHub issues, an important component of real-world software development.

Discussion (0). Continue with ORCID to comment.

Forward citations

Cited by 2 Pith papers

Reviewed papers in the Pith corpus that reference this work. Sorted by Pith novelty score. Full citation record

  1. IssueExec: A Test-Driven Approach for Localizing Software Engineering Issues

    cs.SE 2026-07 conditional novelty 6.0 of 10

    IssueExec localizes issue-relevant code by retrieving related tests and following their execution traces, beating prior localization methods on SWE-bench Lite.

  2. CRANE: Reasoning with constrained LLM generation

    cs.PL 2025-02 conditional novelty 6.0 of 10

    CRANE switches between unconstrained and constrained LLM decoding, increasing functional accuracy on GSM-symbolic and FOLIO while keeping outputs syntactically valid.

Pith tools