paper-with-me

Papers

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

2024-12-01 · Tarun Suresh, Revanth Gangi Reddy, Yifei Xu, Zach Nussbaum, Andriy Mulyar, Brandon Duderstadt, Heng Ji

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.

📄 PDF Abstract BibTeX arXiv:2412.01007

Code (1)

gangiswag/cornstack 공식 구현

Tasks

Bug fixingCode GenerationRerankingRetrievalText Reranking

Similar Papers 제목 키워드 기반

Large Language Models can Contrastively Refine their Generation for Better Sentence Representation Learning

2023-10-17 · Huiming Wang, Zhaodonghui Li, Liying Cheng, Soh De Wen 외

Recently, large language models (LLMs) have emerged as a groundbreaking technology and their unparalleled text generation capabilities have sparked interest in their application to the fundamental sentence representation…

Contrastive LearningNatural Language InferenceRepresentation LearningSentence+3

Optimizing What Matters: AUC-Driven Learning for Robust Neural Retrieval

2025-09-30 · Nima Sheikholeslami, Erfan Hosseini, Patrice Bechard, Srivatsava Daruru 외 arxiv

Dual-encoder retrievers depend on the principle that relevant documents should score higher than irrelevant ones for a given query. Yet the dominant Noise Contrastive Estimation (NCE) objective, which underpins Contrasti…

Transferability of Representations Learned using Supervised Contrastive Learning Trained on a Multi-Domain Dataset

2023-09-27 · Alvin De Jun Tan, Clement Tan, Chai Kiat Yeo

Contrastive learning has shown to learn better quality representations than models trained using cross-entropy loss. They also transfer better to downstream datasets from different domains. However, little work has been …

Contrastive LearningLinear evaluation

Unsupervised Document Embedding via Contrastive Augmentation

2021-03-26 · Dongsheng Luo, Wei Cheng, Jingchao Ni, Wenchao Yu 외

We present a contrasting learning approach with data augmentation techniques to learn document representations in an unsupervised manner. Inspired by recent contrastive self-supervised learning algorithms used for image …

Contrastive LearningData AugmentationDocument ClassificationDocument Embedding+3

IPCL: Iterative Pseudo-Supervised Contrastive Learning to Improve Self-Supervised Feature Representation

2024-03-18 · IEEE International Conference on Acoustics, Speech and Signal Processing (ICASSP) 2024 3 · Sonal Kumar; Anirudh Phukan, Arijit Sur

Self-supervised learning with a contrastive batch approach has become a powerful tool for representation learning in computer vision. The performance of downstream tasks is proportional to the quality of visual features …

Contrastive LearningData Augmentationimage-classificationImage Classification+5