Summary
Code completion models often face challenges when completing code that involves proprietary APIs not included in their training data. To overcome these limitations, the research introduces RepoFusion, a training framework designed to learn how to blend various relevant contexts from code repositories. This approach enables more precise and context-aware code suggestions, with a primary focus on single-line code completion—a task that mirrors real-world situations where users edit existing files in an integrated development environment (IDE). RepoFusion utilizes the Fusion-in-Decoder architecture to merge these contexts. Each repository context is combined with its surrounding context and encoded independently. Subsequently, the decoder simultaneously considers these concatenated encoded representations to generate predictions for filling in code gaps. The study demonstrates that RepoFusion, despite its smaller size, can outperform several larger models and even come close to matching the performance of models trained with more complex objectives. Furthermore, the paper conducts comprehensive ablation studies, shedding light on the crucial factors that influence RepoFusion, including the nature, length, and number of repository contexts, as well as other training configurations. To support future research in this area, the authors release Stack-Repo, a dataset featuring 200 Java repositories with permissive licenses and nearly deduplicated files, enriched with three types of repository contexts.
Strengths
- The topic is timely and well motivated.
- This paper proposed a repository-level training method that works well on hole completion tasks.
- The writing is clear and self-contained. The paper presents experimental results to support the claims.
- Authors open source dataset to facilitate future research.
Weaknesses
- The novelty of the work is thin. At a high level, the work combines repository-level prompt generation and Fusion-in-Decoder (FiD) approaches. As a result, it is hard to justify this work as an ICLR paper.
- The paper predominantly assesses the model's effectiveness in whole completion (single-line completions), which restricts its capacity to showcase its usefulness in real-world coding scenarios. To bolster its robustness and adaptability, it would be beneficial to subject RepoFusion to a broader spectrum of coding tasks, encompassing multi-line code completion [1].
- In the evaluation, no baseline model sees repo contexts. As a result, it is hard to see the value of the RepoFusion approach.
[1] Repocoder: Repository-level code completion through iterative retrieval and generation.
Questions
- Is RepoFusion applicable to any programming language?
- Can the authors do some more analysis to evaluate why and how different types of hole completions benefit from their approach?
- T-Rank truncates the prompt proposals at L tokens. Would it be better to perform a syntax-aware truncation, so that e.g. entire span of tokens corresponding to a method signature, or an entire docstring is included in the repo context?
- In Table 2, does post+prior indicate code infilling tasks? It would be great if these details were explained in the table caption.
- Is it possible to set up baselines where LMs see relevant repo context? For example, [1] could be used as a baseline for the evaluation dataset used in this work. Currently, (as per my understanding) the baselines in Table 2 do not see any repo contexts.
[1] Repocoder: Repository-level code completion through iterative retrieval and generation.
Rating
3: reject, not good enough
Confidence
4: You are confident in your assessment, but not absolutely certain. It is unlikely, but not impossible, that you did not understand some parts of the submission or that you are unfamiliar with some pieces of related work.