CoSQA: 20,000+ Web Queries for Code Search and Question Answering

By Junjie Huang, Duyu Tang, Linjun Shou, Ming Gong, Ke Xu, Daxin Jiang, Ming Zhou, Nan Duan. 2021

154 citations recorded by the source corpus.

Finding codes given natural language query is beneficial to the productivity of software developers. Future progress towards better semantic matching between query and code requires richer supervised training resources. To remedy this, we introduce CoSQA dataset. It includes 20,604 labels for pairs of natural language queries and codes, each annotated by at least 3 human annotators. We further introduce a contrastive learning method dubbed CoCLR to enhance text-code matching, which works as a data augmenter to bring more artificially generated training instances. We show that, evaluated on CodeXGLUE with the same CodeBERT model, training on CoSQA improves the accuracy of code question answering by 5.1% and incorporating CoCLR brings a further improvement of 10.5%.

Subfields: Artificial Intelligence, Information Systems, Question Answering & Reading Comprehension, Code Generation & Program Synthesis

How researchers see this paper

The researchers whose trusted networks rank it highest, strongest advocate first. Every researcher gets a different order.

In Artificial Intelligence

  1. Nan Duan
  2. Daya Guo
  3. Colin B. Clement
  4. Shujie Liu
  5. Jian Yin
  6. Ming Zhou
  7. Neel Sundaresan
  8. Alexey Svyatkovskiy

In Information Systems

  1. Daya Guo
  2. Nan Duan
  3. Neel Sundaresan
  4. Alexey Svyatkovskiy
  5. Jian Yin
  6. Colin B. Clement
  7. Shao Kun Deng
  8. Dawn Drain

In Question Answering & Reading Comprehension

  1. Duyu Tang
  2. Nan Duan
  3. Daxin Jiang

In Code Generation & Program Synthesis

  1. Ge Li
  2. Yanlin Wang
  3. Nan Duan
  4. Daya Guo
  5. Jian Yin
  6. Neel Sundaresan
  7. Shao Kun Deng
  8. Colin B. Clement

Citations in the corpus