TreeRanker: IDE 내 코드 제안을 위한 빠르고 모델 독립적인 순위 지정 시스템
TreeRanker: Fast and Model-agnostic Ranking System for Code Suggestions in IDEs
August 4, 2025
저자: Daniele Cipollone, Egor Bogomolov, Arie van Deursen, Maliheh Izadi
cs.AI
초록
토큰 수준의 코드 완성은 현대 통합 개발 환경(IDE)에서 가장 중요한 기능 중 하나입니다. 이 기능은 개발자가 코딩 중에 관련 식별자와 API를 제안함으로써 도움을 줍니다. 일반적으로 완성 기능은 정적 분석에서 도출되지만, 그 유용성은 제안 항목이 어떻게 순위가 매겨지는지에 크게 좌우됩니다. 목록 깊숙이 묻힌 정확한 예측은 사용자에게 거의 노출되지 않기 때문입니다. 현재 대부분의 시스템은 수작업으로 만든 휴리스틱이나 사용자 로그를 기반으로 훈련된 경량 머신러닝 모델에 의존하고 있으며, 이러한 방식은 컨텍스트 정보를 포착하고 프로젝트 및 코딩 스타일 전반에 걸쳐 일반화하는 데 있어 더 개선될 여지가 있습니다. 본 연구에서는 언어 모델을 사용하여 정적 완성 항목을 순위 매기는 새로운 점수화 접근 방식을 제안합니다. 이 방법은 모든 유효한 완성 항목을 접두사 트리로 구성하고, 단일 탐욕적 디코딩 과정을 통해 트리 전체에 걸쳐 토큰 수준의 점수를 수집합니다. 이를 통해 빔 서치, 프롬프트 엔지니어링 또는 모델 수정 없이도 정밀한 토큰 인식 순위 매김이 가능합니다. 이 접근 방식은 빠르고, 아키텍처에 구애받지 않으며, 이미 배포된 코드 완성 모델과 호환됩니다. 이러한 연구 결과는 IDE 내 기존 도구에 언어 모델을 통합하고, 궁극적으로 더 스마트하고 반응성이 뛰어난 개발자 지원을 제공하기 위한 실용적이고 효과적인 경로를 강조합니다.
English
Token-level code completion is one of the most critical features in modern
Integrated Development Environments (IDEs). It assists developers by suggesting
relevant identifiers and APIs during coding. While completions are typically
derived from static analysis, their usefulness depends heavily on how they are
ranked, as correct predictions buried deep in the list are rarely seen by
users. Most current systems rely on hand-crafted heuristics or lightweight
machine learning models trained on user logs, which can be further improved to
capture context information and generalize across projects and coding styles.
In this work, we propose a new scoring approach to ranking static completions
using language models in a lightweight and model-agnostic way. Our method
organizes all valid completions into a prefix tree and performs a single greedy
decoding pass to collect token-level scores across the tree. This enables a
precise token-aware ranking without needing beam search, prompt engineering, or
model adaptations. The approach is fast, architecture-agnostic, and compatible
with already deployed models for code completion. These findings highlight a
practical and effective pathway for integrating language models into already
existing tools within IDEs, and ultimately providing smarter and more
responsive developer assistance.