Lune

EMNLP Findings2020

Adversarial Training for Code Retrieval with Question-Description Relevance Regularization

Jie Zhao, Huan Sun

摘要

Code retrieval is a key task aiming to match natural and programming languages. In this work, we propose adversarial learning for code retrieval, that is regularized by questiondescription relevance. First, we adapt a simple adversarial learning technique to generate difficult code snippets given the input question, which can help the learning of code retrieval that faces bi-modal and data-scarce challenges. Second, we propose to leverage question-description relevance to regularize adversarial learning, such that a generated code snippet should contribute more to the code retrieval training loss, only if its paired natural language description is predicted to be less relevant to the user given question. Experiments on large-scale code retrieval datasets of two programming languages show that our adversarial learning method is able to improve the performance of state-of-the-art models. Moreover, using an additional duplicate question prediction model to regularize adversarial learning further improves the performance, and this is more effective than using the duplicated questions in strong multi-task learning baselines. 1

问 Lune

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

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

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

可以从这些问题问起

Lune 可以查阅

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

获取答案

免费开始,无需绑卡

脉络

  • Learning to Update Natural Language Comments Based on Code Changes 引用了 Associating Natural Language Comment and Source Code Entities
它引用的引用它的从左到右按年份排列,引用越多,位置越高。

引用它的顶会 Paper1

  1. CoSQA: 20, 000+ Web Queries for Code Search and Question AnsweringJunjie Huang, Duyu Tang, Linjun Shou, Ming Gong 等ACL 2021

它引用的 Paper4

  1. Hoppity: Learning Graph Transformations to Detect and Fix Bugs in ProgramsElizabeth Dinella, Hanjun Dai, Ziyang Li, Mayur Naik 等ICLR 2020 · 212 次引用
  2. Leveraging Code Generation to Improve Code Retrieval and Summarization via Dual LearningWei Ye, Rui Xie, Jinglei Zhang, Tianxiang Hu 等WWW 2020 · 83 次引用
  3. Associating Natural Language Comment and Source Code EntitiesSheena Panthaplackel, Milos Gligoric, Raymond J. Mooney, Junyi Jessy LiAAAI 2020 · 21 次引用
  4. Learning to Update Natural Language Comments Based on Code ChangesSheena Panthaplackel, Pengyu Nie, Milos Gligoric, Junyi Jessy Li 等ACL 2020 · 1 次引用

相关 Paper

  1. PinNet: Pinpoint Instructive Information for Retrieval Augmented Code-to-Text GenerationHan Fu, Jian Tan, Pinhan Zhang, Feifei Li 等ICML 2024
  2. CONSIDER: Commonalities and Specialties Driven Multilingual Code Retrieval FrameworkRui Li, Liyang He, Qi Liu, Yuze Zhao 等AAAI 2024 · 11 次引用
  3. Two Birds with One Stone: Boosting Code Generation and Code Search via a Generative Adversarial NetworkShangwen Wang, Bo Lin, Zhensu Sun, Ming Wen 等OOPSLA 2023 · 21 次引用
  4. Uncertainty-Aware Contrastive Learning with Hard Negative Sampling for Code Search TasksHan Liu, Jiaqing Zhan, Qin ZhangAAAI 2025 · 1 次引用
  5. CodeRetriever: A Large Scale Contrastive Pre-Training Method for Code SearchXiaonan Li, Yeyun Gong, Yelong Shen, Xipeng Qiu 等EMNLP 2022 · 25 次引用
黄昏的海面,两侧是细线勾勒的悬崖