CoCoSoDa: Effective Contrastive Learning for Code Search
Xi’an Jiaotong University(西安交通大学);School of Software Engineering, Sun Yat-sen University(中山大学软件工程学院);The Chinese University of Hong Kong(香港中文大学);Microsoft Research(微软研究院);Chongqing University(重庆大学)
Ensheng Shi, Yanlin Wang, Wenchao Gu, Lun Du, Hongyu Zhang, Shi Han, Dongmei Zhang, Hongbin Sun
备注:
Accepted by ICSE 2023 (The 45th International Conference on Software Engineering)
Code search aims to retrieve semantically relevant code snippets for a given natural language query. Recently, many approaches employing contrastive learning have shown promising results on code representation learning and greatly improved the performance of code search. However, there is still a lot of room for improvement in using contrastive learning for code search. In this paper, we propose CoCoSoDa to effectively utilize contrastive learning for code search via two key factors in contrastive learning: data augmentation and negative samples. Specifically, soft data augmentation is to dynamically masking or replacing some tokens with their types for input sequences to generate positive samples. Momentum mechanism is used to generate large and consistent representations of negative samples in a mini-batch through maintaining a queue and a momentum encoder. In addition, multimodal contrastive learning is used to pull together representations of code-query pairs and push apart the unpaired code snippets and queries. We conduct extensive experiments to evaluate the effectiveness of our approach on a large-scale dataset with six programming languages. Experimental results show that: (1) CoCoSoDa outperforms 14 baselines and especially exceeds CodeBERT, GraphCodeBERT, and UniXcoder by 13.3%, 10.5%, and 5.9% on average MRR scores, respectively. (2) The ablation studies show the effectiveness of each component of our approach. (3) We adapt our techniques to several different pre-trained models such as RoBERTa, CodeBERT, and GraphCodeBERT and observe a significant boost in their performance in code search. (4) Our model performs robustly under different hyper-parameters. Furthermore, we perform qualitative and quantitative analyses to explore reasons behind the good performance of our model.
Dental CLAIRES: Contrastive LAnguage Image REtrieval Search for Dental Research
University of Texas Health Science Center at Houston(德克萨斯大学休斯顿健康科学中心);School of Biomedical Informatics(生物医学信息学院);The University of Texas Health Science Center at Houston(德克萨斯大学休斯顿健康科学中心);School of Dentistry(牙科学院);San Jose State University(圣何塞州立大学)
Evolutionary Neural Architecture Search with Dual Contrastive Learning
School of Computer Science and Engineering, South China University of Technology, Guangzhou, China.(计算机科学与工程学院,华南理工大学,广州,中国);College of Artificial Intelligence, Nankai University, Tianjin, China.(人工智能学院,南开大学,天津,中国);Hanyang University, 15588 Ansan, South Korea.(翰阳大学,韩国,安山15588)
Unsupervised Generative Feature Transformation via Graph Contrastive Pre-training and Multi-objective Fine-tuning
Arizona State University(亚利桑那州立大学);University of Kansas(堪萨斯大学);Computer Network Information Center, Chinese Academy of Sciences(中国科学院计算机网络信息中心);IBM T. J. Watson Research Center(IBM T. J. 沃森研究中心)
DELOS: Contrastive Deep Learning for Low-SNR Blind Transit Searches in Kepler Photometry
Shanghai Astronomical Observatory, Chinese Academy of Sciences, Shanghai 200030, China(上海天文台,中国科学院,上海200030,中国);School of Astronomy and Space Sciences, University of Chinese Academy of Sciences, Beijing 101408, China(中国科学院大学天文与空间科学学院,北京101408,中国);Science Talent Training Center, Gainesville, FL, 32606 USA(科学人才培训中心,佛罗里达州盖恩斯维尔,32606 USA)
Hybrid Contrastive Quantization for Efficient Cross-View Video Retrieval
Tsinghua Shenzhen International Graduate School, Tsinghua University(清华大学深圳国际研究生院);Harbin Institute of Technology, Shenzhen(哈尔滨工业大学深圳);Research Center of Artificial Intelligence, Peng Cheng Laboratory(鹏城实验室人工智能研究中心);Data Quality Team, Wechat Group, Tencent Inc.(腾讯公司微信团队数据质量组);Wechat Group, Tencent Inc.(腾讯公司微信团队);Tencent Inc.(腾讯公司);Tsinghua University(清华大学);Harbin Institute of Technology(哈尔滨工业大学);Peng Cheng Laboratory(鹏城实验室)
Exploring Representation-Level Augmentation for Code Search
Nanyang Technological University(南洋理工大学);China-Singapore International Joint Research Institute(中新国际联合研究院);Sun Yat-sen University(中山大学);The University of Newcastle(纽卡斯尔大学)
Contrastive Learning and Mixture of Experts Enables Precise Vector Embeddings
Center for Bioinformatics and Computational Biology, University of Delaware(特拉华大学生物信息与计算生物学中心);University of Chicago(芝加哥大学);The College of the University of Chicago(芝加哥大学学院);Department of Biomedical Engineering, University of Delaware(特拉华大学生物医学工程系);Luddy School of Informatics, Computing, and Engineering, Indiana University(印第安纳大学勒迪信息学、计算与工程学院)
本文提出基于共被引数据集和对比学习,将Mixture of Experts扩展应用于预训练BERT,显著提升了科学文本在多领域的向量嵌入精度与通用性。
Contrastive Self-Supervised Learning Based Approach for Patient Similarity: A Case Study on Atrial Fibrillation Detection from PPG Signal
Bangladesh University of Engineering and Technology(孟加拉国工程技术大学);United International University(联合国际大学);University of Maryland(马里兰大学);United Arab Emirates University(阿联酋大学)
DrugCLIP: Contrastive Protein-Molecule Representation Learning for Virtual Screening
Institute for AI Industry Research(人工智能产业研究院);Tsinghua University(清华大学);Peking University(北京大学);Institute of Automation(自动化研究所);Chinese Academy of Science(中国科学院)
Efficient Adversarial Contrastive Learning via Robustness-Aware Coreset Selection
School of Computing, National University of Singapore(新加坡国立大学计算学院);RIKEN Center for Advanced Intelligence Project (AIP)(日本理化学研究所先进智能研究中心);School of Computer Science, The University of Auckland(奥克兰大学计算机科学学院);School of Mathematics and Statistics, The University of Melbourne(墨尔本大学数学与统计学院);Graduate School of Frontier Sciences, The University of Tokyo(东京大学新领域创成科学研究科)
Geometry Contrastive Learning on Heterogeneous Graphs
Institute of Information Engineering, Chinese Academy of Sciences(中国科学院信息工程研究所);School of Cyber Security, University of Chinese Academy of Sciences(中国科学院大学网络空间安全学院);Academy of Mathematics and Systems Science, Chinese Academy of Sciences(中国科学院数学与系统科学研究院);Baidu Inc.(百度公司);Griffith University(格里菲斯大学);Xiaomi AI Lab(小米人工智能实验室)