Reproduce “Zero-Shot Cross-Domain Code Search without Fine-Tuning” 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

Keyu Liang, Zhongxin Liu, Chao Liu, Zhiyuan Wan, David Lo, Xiaohu Yang

The CodeBridge framework addresses zero-shot cross-domain code search by employing LLMs to generate comments and code for queries and snippets, integrating these with original elements into a hybrid retrieval system. This fine-tuning-free method surpassed state-of-the-art PLM-based approaches by over 20% MRR and matched fine-tuning-intensive zero-shot techniques.

Key insights

  • Query-comment and code-code matching, while not individually outperforming direct query-code matching, provide significant complementary retrieval capabilities by operating at different abstraction levels and reducing reliance on domain-specific query-code mapping.
  • Leveraging LLMs for zero-shot generation of comments and code effectively bridges semantic gaps between natural language queries and diverse programming language codebases, enabling cross-domain search without requiring domain-specific fine-tuning.
  • Fusing the results from multiple, distinct matching schemas (query-code, query-comment, code-code) leads to a more robust and generalized approach for zero-shot cross-domain code search.

Summary by alphaXiv.

Tip: change arxiv.org to autoarxiv.org in any arXiv abstract link to open the paper here.