Reproduce “Revisiting Code Search in a Two-Stage Paradigm” on OpenResearch
Turn your favorite coding agents into research agents that review literature, develop hypotheses, and run experiments.
Universal app for Apple silicon and Intel. Requires macOS 11 or later.
About this paper
Fan Hu, Yanlin Wang, Lun Du, Xirong Li, Hongyu Zhang, Shi Han, Dongmei Zhang
Researchers from Renmin University of China and Microsoft Research Asia developed TOSS, a two-stage code search framework, to balance search accuracy and efficiency. This approach employs multi-channel recall with fast models and re-ranks candidates with an accurate cross-encoder, achieving an average MRR of 0.7634 across six programming languages on CodeSearchNet, which is a 7.1% gain over the best baseline, while reducing search time significantly.
Key insights
- Optimized text pre-processing (especially Ronin Split) significantly enhances the performance of IR-based models, making them effective for initial recall.
- Fusing diverse first-stage models from different paradigms (e.g., bi-encoder and IR) in a multi-channel recall strategy improves the overall recall ratio and leads to superior final performance.
- The two-stage paradigm effectively mitigates the high computational cost of cross-encoders by applying them only to a significantly reduced set of candidates, thus achieving both high accuracy and practical efficiency.
Summary by alphaXiv.
Tip: change arxiv.org to autoarxiv.org in any arXiv abstract link to open the paper here.