Adversarial Training for Code Retrieval with Question-Description Relevance Regularization
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 question-description 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
Code (1)
Tasks
Multi-Task LearningRetrievalSimilar Papers 제목 키워드 기반
Adversarial Modality Alignment Network for Cross-Modal Molecule Retrieval
The cross-modal molecule retrieval (Text2Mol) task aims to bridge the semantic gap between molecules and natural language descriptions. A solution to this non-trivial problem relies on graph convolutional network (GCN) a…
Contrastive LearningCross-Modal RetrievalRetrievalTripletIndex Light, Reason Deep: Deferred Visual Ingestion for Visual-Dense Document Question Answering
Existing multimodal document question answering methods predominantly adopt a Pre-Ingestion (PI) strategy: during the indexing phase, a Vision Language Model (VLM) is called on every page to generate page descriptions th…
Question AnsweringAnswer Retrieval in Legal Community Question Answering
The task of answer retrieval in the legal domain aims to help users to seek relevant legal advice from massive amounts of professional responses. Two main challenges hinder applying existing answer retrieval approaches i…
Community Question AnsweringQuestion AnsweringRetrievalVHEGAN: Variational Hetero-Encoder Randomized GAN for Zero-Shot Learning
To extract and relate visual and linguistic concepts from images and textual descriptions for text-based zero-shot learning (ZSL), we develop variational hetero-encoder (VHE) that decodes text via a deep probabilisitic t…
Image GenerationRetrievalText GenerationVariational Inference+1Poisoning Retrieval Corpora by Injecting Adversarial Passages
Dense retrievers have achieved state-of-the-art performance in various information retrieval tasks, but to what extent can they be safely deployed in real-world applications? In this work, we propose a novel attack for d…
Information RetrievalNatural QuestionsRetrieval