paper-with-me

홈 › Papers

Zero-Shot Cross-Domain Code Search without Fine-Tuning

2025-04-10 · Keyu Liang, Zhongxin Liu, Chao Liu, Zhiyuan Wan, David Lo, Xiaohu Yang

Code search aims to retrieve semantically relevant code snippets for natural language queries. While pre-trained language models (PLMs) have shown remarkable performance in this task, they struggle in cross-domain scenarios, often requiring costly fine-tuning or facing performance drops in zero-shot settings. RAPID, which generates synthetic data for model fine-tuning, is currently the only effective method for zero-shot cross-domain code search. Despite its effectiveness, RAPID demands substantial computational resources for fine-tuning and needs to maintain specialized models for each domain, underscoring the need for a zero-shot, fine-tuning-free approach for cross-domain code search. The key to tackling zero-shot cross-domain code search lies in bridging the gaps among domains. In this work, we propose to break the query-code matching process of code search into two simpler tasks: query-comment matching and code-code matching. Our empirical study reveals the strong complementarity among the three matching schemas in zero-shot cross-domain settings, i.e., query-code, query-comment, and code-code matching. Based on the findings, we propose CodeBridge, a zero-shot, fine-tuning-free approach for cross-domain code search. Specifically, CodeBridge uses Large Language Models (LLMs) to generate comments and pseudo-code, then combines query-code, query-comment, and code-code matching via PLM-based similarity scoring and sampling-based fusion. Experimental results show that our approach outperforms the state-of-the-art PLM-based code search approaches, i.e., CoCoSoDa and UniXcoder, by an average of 21.4% and 24.9% in MRR, respectively, across three datasets. Our approach also yields results that are better than or comparable to those of the zero-shot cross-domain code search approach RAPID, which requires costly fine-tuning.

📄 PDF Abstract BibTeX arXiv:2504.07740

Code (1)

zju-ctag/codebridge 공식 구현 pytorch

Tasks

Code SearchNatural Language Queries

Similar Papers 제목 키워드 기반

Leveraging Slot Descriptions for Zero-Shot Cross-Domain Dialogue StateTracking

2021-06-01 · NAACL 2021 4 · Zhaojiang Lin, Bing Liu, Seungwhan Moon, Paul Crook 외

Zero-shot cross-domain dialogue state tracking (DST) enables us to handle unseen domains without the expense of collecting in-domain data. In this paper, we propose a slot descriptions enhanced generative approach for ze…

Dialogue State TrackingTransfer Learning

Leveraging Slot Descriptions for Zero-Shot Cross-Domain Dialogue State Tracking

2021-05-10 · Zhaojiang Lin, Bing Liu, Seungwhan Moon, Paul Crook 외

Zero-shot cross-domain dialogue state tracking (DST) enables us to handle task-oriented dialogue in unseen domains without the expense of collecting in-domain data. In this paper, we propose a slot description enhanced g…

Dialogue State TrackingTransfer Learning

Attribute-Guided Network for Cross-Modal Zero-Shot Hashing

2018-02-06 · Zhong Ji, Yuxin Sun, Yunlong Yu, Yanwei Pang 외

Zero-Shot Hashing aims at learning a hashing model that is trained only by instances from seen categories but can generate well to those of unseen categories. Typically, it is achieved by utilizing a semantic embedding s…

AttributeCross-Modal RetrievalImage RetrievalRetrieval+1

Zero is Not Hero Yet: Benchmarking Zero-Shot Performance of LLMs for Financial Tasks

2023-05-26 · Agam Shah, Sudheer Chava

Recently large language models (LLMs) like ChatGPT have shown impressive performance on many natural language processing tasks with zero-shot. In this paper, we investigate the effectiveness of zero-shot LLMs in the fina…

Benchmarking

GraphCLIP: Enhancing Transferability in Graph Foundation Models for Text-Attributed Graphs

2024-10-14 · Yun Zhu, Haizhou Shi, Xiaotang Wang, Yongchao Liu 외

Recently, research on Text-Attributed Graphs (TAGs) has gained significant attention due to the prevalence of free-text node features in real-world applications and the advancements in Large Language Models (LLMs) that b…

Few-Shot LearningTAG