mlsanityData to 14 Oct 2026

CoaCor: Code Annotation for Code Retrieval with Reinforcement Learning

arXiv 1904.00720 ↗First posted 13 Mar 2019cs.SE cs.CL cs.IRcited by 22

Not on the map. Why?

Abstract (arXiv)

To accelerate software development, much research has been performed to help people understand and reuse the huge amount of available code resources. Two important tasks have been widely studied: code retrieval, which aims to retrieve code snippets relevant to a given natural language query from a code base, and code annotation, where the goal is to annotate a code snippet with a natural language description. Despite their advancement in recent years, the two tasks are mostly explored separately. In this work, we investigate a novel perspective of Code annotation for Code retrieval (hence called `CoaCor'), where a code annotation model is trained to generate a natural language annotation that can represent the semantic meaning of a given code snippet and can be leveraged by a code retrieval model to better distinguish relevant code snippets from others. To this end, we propose an effective framework based on reinforcement learning, which explicitly encourages the code annotation model to generate annotations that can be used for the retrieval task. Through extensive experiments, we show that code annotations generated by our framework are much more detailed and more useful for code retrieval, and they can further improve the performance of existing code retrieval models significantly.

Key facts. Cited by 22 papers in the map (data through 14 Oct 2026). First posted on arXiv 13 Mar 2019.

Builds on

No reference list yet.

Built on by

Cited by year

Citing papers per year: 2021: 7; 2022: 8; 2023: 4; 2024: 1; 2025: 2.

22 papers.

Sort:

By area:

  1. 2024RepoGraph: Enhancing AI Software Engineering with Repository-level Code Graphcited by 91
  2. 2021CoSQA: 20,000+ Web Queries for Code Search and Question Answeringcited by 75
  3. 2022Compilable Neural Code Generation with Compiler Feedbackcited by 47
  4. 2022On the Importance of Building High-quality Training Datasets for Neural Code Searchcited by 30
  5. 2021A Survey on Machine Learning Techniques for Source Code Analysiscited by 24
  6. 2023Deep Learning for Code Intelligence: Survey, Benchmark and Toolkitcited by 22
  7. 2021GraphSearchNet: Enhancing GNNs via Capturing Global Dependencies for Semantic Code Searchcited by 15
  8. 2022Code Search based on Context-aware Code Translationcited by 14
  9. 2023From Copilot to Pilot: Towards AI Supported Software Developmentcited by 14
  10. 2023Reinforcement Learning for Generative AI: A Surveycited by 11
  11. 2022Accelerating Code Search with Deep Hashing and Code Classificationcited by 10
  12. 2022Multi-View Graph Representation for Programming Language Processing: An Investigation into Algorithm Detectioncited by 6
10 more
  1. 2021Exploiting Method Names to Improve Code Summarization: A Deliberation Multi-Task Learning Approachcited by 5
  2. 2025SPENCER: Self-Adaptive Model Distillation for Efficient Code Retrievalcited by 5
  3. 2025LLM Program Optimization via Retrieval Augmented Searchcited by 4
  4. 2021Learning to Selectively Learn for Weakly-supervised Paraphrase Generationcited by 3
  5. 2022NS3: Neuro-Symbolic Semantic Code Searchcited by 3
  6. 2021BERT2Code: Can Pretrained Language Models be Leveraged for Code Search?cited by 2
  7. 2021Precise Learning of Source Code Contextual Semantics via Hierarchical Dependence Structure and Graph Attention Networkscited by 2
  8. 2022LAMNER: Code Comment Generation Using Character Language Model and Named Entity Recognitioncited by 1
  9. 2023An Exploratory Literature Study on Sharing and Energy Use of Language Models for Source Codecited by 1
  10. 2022Code Compliance Assessment as a Learning Problemcited by 0