Lune

SIGIR2021顶会

Self-Supervised Contrastive Learning for Code Retrieval and Summarization via Semantic-Preserving Transformations

Nghi D. Q. Bui, Yijun Yu, Lingxiao Jiang

摘要

We propose Corder, a self-supervised contrastive learning framework for source code model. Corder is designed to alleviate the need of labeled data for code retrieval and code summarization tasks. The pre-trained model of Corder can be used in two ways: (1) it can produce vector representation of code which can be applied to code retrieval tasks that do not have labeled data; (2) it can be used in a fine-tuning process for tasks that might still require label data such as code summarization. The key innovation is that we train the source code model by asking it to recognize similar and dissimilar code snippets through a contrastive learning objective. To do so, we use a set of semantic-preserving transformation operators to generate code snippets that are syntactically diverse but semantically equivalent. Through extensive experiments, we have shown that the code models pretrained by Corder substantially outperform the other baselines for code-to-code retrieval, text-to-code retrieval, and code-to-text summarization tasks.

问 Lune

几分钟读透这篇 Paper,不用再花一下午。

Lune 能读完全文,也能读引用它的顶会 Paper,讲清它的结论、证据和局限,每一点都注明出自哪篇 Paper。不用硬啃,也不靠猜。

已有 39 篇顶会 Paper 引用了它。别等审稿人问起,先弄清它们发现了什么。

可以从这些问题问起

Lune 可以查阅

全文 · 引用它的顶会 Paper · 相关的 Paper

获取答案

免费开始,无需绑卡

脉络

  • Bridging Pre-trained Models and Downstream Tasks for Source Code Understanding 引用了 Generating Adversarial Examples for Holding Robustness of Source Code Processing Models
  • Bridging Pre-trained Models and Downstream Tasks for Source Code Understanding 引用了 CodeBERT: A Pre-Trained Model for Programming and Natural Languages
  • ContraBERT: Enhancing Code Pre-trained Models via Contrastive Learning 引用了 Generating Adversarial Examples for Holding Robustness of Source Code Processing Models
  • ContraBERT: Enhancing Code Pre-trained Models via Contrastive Learning 引用了 A Simple Framework for Contrastive Learning of Visual Representations
  • ContraBERT: Enhancing Code Pre-trained Models via Contrastive Learning 引用了 CodeBERT: A Pre-Trained Model for Programming and Natural Languages
  • ReACC: A Retrieval-Augmented Code Completion Framework 引用了 A Simple Framework for Contrastive Learning of Visual Representations
  • ReACC: A Retrieval-Augmented Code Completion Framework 引用了 CodeBERT: A Pre-Trained Model for Programming and Natural Languages
  • SelfAPR: Self-supervised Program Repair with Test Execution Diagnostics 引用了 CodeBERT: A Pre-Trained Model for Programming and Natural Languages
  • SelfAPR: Self-supervised Program Repair with Test Execution Diagnostics 引用了 Graph-based, Self-Supervised Program Repair from Diagnostic Feedback
  • Graph-based, Self-Supervised Program Repair from Diagnostic Feedback 引用了 CodeBERT: A Pre-Trained Model for Programming and Natural Languages
  • Path-sensitive code embedding via contrastive learning for software vulnerability detection 引用了 A Simple Framework for Contrastive Learning of Visual Representations
  • Path-sensitive code embedding via contrastive learning for software vulnerability detection 引用了 CodeBERT: A Pre-Trained Model for Programming and Natural Languages
它引用的引用它的从左到右按年份排列,引用越多,位置越高。

引用它的顶会 Paper39

  1. ReACC: A Retrieval-Augmented Code Completion FrameworkShuai Lu, Nan Duan, Hojae Han, Daya Guo 等ACL 2022 · 208 次引用
  2. Path-sensitive code embedding via contrastive learning for software vulnerability detectionXiao Cheng, Guanqin Zhang, Haoyu Wang, Yulei SuiISSTA 2022 · 98 次引用
  3. SelfAPR: Self-supervised Program Repair with Test Execution DiagnosticsHe Ye, Matias Martinez, Xiapu Luo, Tao Zhang 等ASE 2022 · 75 次引用
  4. Bridging Pre-trained Models and Downstream Tasks for Source Code UnderstandingDeze Wang, Zhouyang Jia, Shanshan Li, Yue Yu 等ICSE 2022 · 68 次引用
  5. ContraBERT: Enhancing Code Pre-trained Models via Contrastive LearningShangqing Liu, Bozhi Wu, Xiaofei Xie, Guozhu Meng 等ICSE 2023 · 56 次引用

它引用的 Paper12

  1. A Simple Framework for Contrastive Learning of Visual RepresentationsTing Chen, Simon Kornblith, Mohammad Norouzi, Geoffrey E. HintonICML 2020 · 24,064 次引用
  2. CodeBERT: A Pre-Trained Model for Programming and Natural LanguagesZhangyin Feng, Daya Guo, Duyu Tang, Nan Duan 等EMNLP Findings 2020 · 2,828 次引用
  3. Graph-based, Self-Supervised Program Repair from Diagnostic FeedbackMichihiro Yasunaga, Percy LiangICML 2020 · 198 次引用
  4. A Mutual Information Maximization Perspective of Language Representation LearningLingpeng Kong, Cyprien de Masson d'Autume, Lei Yu, Wang Ling 等ICLR 2020 · 179 次引用
  5. Generating Adversarial Examples for Holding Robustness of Source Code Processing ModelsHuangzhao Zhang, Zhuo Li, Ge Li, Lei Ma 等AAAI 2020 · 148 次引用

相关 Paper

  1. CodeRetriever: A Large Scale Contrastive Pre-Training Method for Code SearchXiaonan Li, Yeyun Gong, Yelong Shen, Xipeng Qiu 等EMNLP 2022 · 25 次引用
  2. Towards Better Code Understanding in Decoder-Only Models with Contrastive LearningJiayi Lin, Yanlin Wang, Yibiao Yang, Lei Zhang 等AAAI 2026 · 2 次引用
  3. UniCoR: Modality Collaboration for Robust Cross-Language Hybrid Code RetrievalYang Yang, Li Kuang, Jiakun Liu, Zhongxin Liu 等ICSE 2026
  4. Soft-Labeled Contrastive Pre-Training for Function-Level Code RepresentationXiaonan Li, Daya Guo, Yeyun Gong, Yun Lin 等EMNLP Findings 2022 · 8 次引用
  5. Contrastive Code Representation LearningParas Jain, Ajay Jain, Tianjun Zhang, Pieter Abbeel 等EMNLP 2021 · 11 次引用
黄昏的海面,两侧是细线勾勒的悬崖