CoRet: Improved Retriever for Code Editing

In this paper, we introduce CoRet, a dense retrieval model designed for code-editing tasks that integrates code semantics, repository structure, and call graph dependencies.The model focuses on retrieving relevant portions of a code repository based on natural language queries such as requests to implement new features or fix bugs.These retrieved code chunks can then be presented to a user or to a second codeediting model or agent.To train CoRet, we propose a loss function explicitly designed for repository-level retrieval.On SWE-bench and Long Code Arena's bug localisation datasets, we show that our model substantially improves retrieval recall by at least 15 percentage points over existing models, and ablate the design choices to show their importance in achieving these results.hard negative samples.In

Authors

Institutions

Publication Details

Published
2025-01-01
DOI
https://doi.org/10.18653/v1/2025.acl-short.62
Primary Topic
Natural Language Processing Techniques
Type
article
Field-Weighted Citation Impact
0.00
Controls
|||
ALL TIME
JAN
FEB
MAR
APR
MAY
JUN
JUL
AUG
SEP
OCT
article

CoRet: Improved Retriever for Code Editing

Giovanni Zappella, Fabio James Fehr, Prabhu Teja S, Luca Franceschi
2 links
Natural Language Processing Techniques
article

CoRet: Improved Retriever for Code Editing

Giovanni Zappella, Fabio James Fehr, Prabhu Teja S, Luca Franceschi
article en

Abstract

In this paper, we introduce CoRet, a dense retrieval model designed for code-editing tasks that integrates code semantics, repository structure, and call graph dependencies.The model focuses on retrieving relevant portions of a code repository based on natural language queries such as requests to implement new features or fix bugs.These retrieved code chunks can then be presented to a user or to a second codeediting model or agent.To train CoRet, we propose a loss function explicitly designed for repository-level retrieval.On SWE-bench and Long Code Arena's bug localisation datasets, we show that our model substantially improves retrieval recall by at least 15 percentage points over existing models, and ablate the design choices to show their importance in achieving these results.hard negative samples.In

Art Institute of Portland (US)
Openalex Percentile: Top 90%
Natural Language Processing Techniques
AI Navigator

Ask Laika to Summarize, Analyze, and Connect papers live on the map.

Summarize Papers & Methodologies

Extract key findings, datasets, and comparative methods across publications.

Benchmark Rankings & Visual Analytics

Rank top research institutions, authors, funders, topics, and journals by Field-Weighted Citation Impact (FWCI) and paper volume with instant charts.

Connect Distant Disciplines

Bridge topological clusters on the map to find hidden collaborative intersections.