Cross-Domain Deep Code Search with Meta Learning
Yitian Chai, Hongyu Zhang, Beijun Shen, Xiaodong Gu
摘要
Recently, pre-trained programming language models such as Code-BERT have demonstrated substantial gains in code search. Despite showing great performance, they rely on the availability of large amounts of parallel data to fine-tune the semantic mappings between queries and code. This restricts their practicality in domainspecific languages that have relatively scarce and expensive data. In this paper, we propose CroCS, a novel approach for domainspecific code search. CroCS employs a transfer learning framework where an initial program representation model is pre-trained on a large corpus of common programming languages (such as Java and Python), and is further adapted to domain-specific languages such as Solidity and SQL. Unlike cross-language CodeBERT, which is directly fine-tuned in the target language, CroCS adapts a few-shot meta-learning algorithm called MAML to learn the good initialization of model parameters, which can be best reused in a domain-specific language. We evaluate the proposed approach on two domain-specific languages, namely Solidity and SQL, with model transferred from two widely used languages (Python and Java). Experimental results show that CroCS significantly outperforms conventional pre-trained code models that are directly finetuned in domain-specific languages, and it is particularly effective for scarce data.
问 Lune
几分钟读透这篇 Paper,不用再花一下午。
Lune 能读完全文,也能读引用它的顶会 Paper,讲清它的结论、证据和局限,每一点都注明出自哪篇 Paper。不用硬啃,也不靠猜。
已有 10 篇顶会 Paper 引用了它。别等审稿人问起,先弄清它们发现了什么。
脉络
- CodeT5: Identifier-aware Unified Pre-trained Encoder-Decoder Models for Code Understanding and Generation 引用了 CodeBERT: A Pre-Trained Model for Programming and Natural Languages
- CodeT5: Identifier-aware Unified Pre-trained Encoder-Decoder Models for Code Understanding and Generation 引用了 Studying the Usage of Text-To-Text Transfer Transformer to Support Code-Related Tasks
- No more fine-tuning? an experimental evaluation of prompt tuning in code intelligence 引用了 CodeT5: Identifier-aware Unified Pre-trained Encoder-Decoder Models for Code Understanding and Generation
- No more fine-tuning? an experimental evaluation of prompt tuning in code intelligence 引用了 CodeBERT: A Pre-Trained Model for Programming and Natural Languages
- No more fine-tuning? an experimental evaluation of prompt tuning in code intelligence 引用了 Studying the Usage of Text-To-Text Transfer Transformer to Support Code-Related Tasks
- No more fine-tuning? an experimental evaluation of prompt tuning in code intelligence 引用了 Language Models are Few-Shot Learners
- AdaCCD: Adaptive Semantic Contrasts Discovery Based Cross Lingual Adaptation for Code Clone Detection 引用了 CodeT5: Identifier-aware Unified Pre-trained Encoder-Decoder Models for Code Understanding and Generation
- AdaCCD: Adaptive Semantic Contrasts Discovery Based Cross Lingual Adaptation for Code Clone Detection 引用了 CodeBERT: A Pre-Trained Model for Programming and Natural Languages
- Self-Supervised Query Reformulation for Code Search 引用了 CodeT5: Identifier-aware Unified Pre-trained Encoder-Decoder Models for Code Understanding and Generation
- Self-Supervised Query Reformulation for Code Search 引用了 CodeBERT: A Pre-Trained Model for Programming and Natural Languages
- Self-Supervised Query Reformulation for Code Search 引用了 Language Models are Few-Shot Learners
引用它的顶会 Paper10
- No more fine-tuning? an experimental evaluation of prompt tuning in code intelligenceChaozheng Wang, Yuanhang Yang, Cuiyun Gao, Yun Peng 等FSE 2022 · 148 次引用
- Self-Supervised Query Reformulation for Code SearchYuetian Mao, Chengcheng Wan, Yuze Jiang, Xiaodong GuFSE 2023 · 14 次引用
- Predicting Configuration Performance in Multiple Environments with Sequential Meta-LearningJingzhi Gong, Tao ChenFSE 2024 · 13 次引用
- AdaCCD: Adaptive Semantic Contrasts Discovery Based Cross Lingual Adaptation for Code Clone DetectionYangkai Du, Tengfei Ma, Lingfei Wu, Xuhong Zhang 等AAAI 2024 · 9 次引用
- Statistical Type Inference for Incomplete ProgramsYaohui Peng, Jing Xie, Qiongling Yang, Hanwen Guo 等FSE 2023 · 2 次引用
它引用的 Paper5
- Language Models are Few-Shot LearnersTom B. Brown, Benjamin Mann, Nick Ryder, Melanie Subbiah 等NeurIPS 2020 · 64,255 次引用
- CodeBERT: A Pre-Trained Model for Programming and Natural LanguagesZhangyin Feng, Daya Guo, Duyu Tang, Nan Duan 等EMNLP Findings 2020 · 2,828 次引用
- CodeT5: Identifier-aware Unified Pre-trained Encoder-Decoder Models for Code Understanding and GenerationYue Wang, Weishi Wang, Shafiq R. Joty, Steven C. H. HoiEMNLP 2021 · 1,224 次引用
- OCoR: An Overlapping-Aware Code RetrieverQihao Zhu, Zeyu Sun, Xiran Liang, Yingfei Xiong 等ASE 2020 · 28 次引用
- Studying the Usage of Text-To-Text Transfer Transformer to Support Code-Related TasksAntonio Mastropaolo, Simone Scalabrino, Nathan Cooper, David Nader-Palacio 等ICSE 2021 · 9 次引用
相关 Paper
- Parallel-SFT: Improving Zero-Shot Cross-Programming-Language Transfer for Code RLZhaofeng Wu, Shiqi Wang, Boya Peng, Anuj Kumar Goyal 等ACL Findings 2026
- Bridging Pre-trained Models and Downstream Tasks for Source Code UnderstandingDeze Wang, Zhouyang Jia, Shanshan Li, Yue Yu 等ICSE 2022 · 68 次引用
- CoCoSoDa: Effective Contrastive Learning for Code SearchEnsheng Shi, Yanlin Wang, Wenchao Gu, Lun Du 等ICSE 2023 · 45 次引用
- Zero-Shot Cross-Domain Code Search without Fine-TuningKeyu Liang, Zhongxin Liu, Chao Liu, Zhiyuan Wan 等FSE 2025 · 2 次引用
- Towards Low-Resource Automatic Program Repair with Meta-Learning and Pretrained Language ModelsWeishi Wang, Yue Wang, Steven C. H. Hoi, Shafiq JotyEMNLP 2023 · 2 次引用
